/*! Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one or more contributor license agreements. * Licensed under the Elastic License 2.0; you may not use this file except in compliance with the Elastic License 2.0. */ (window.maps_bundle_jsonpfunction=window.maps_bundle_jsonpfunction||[]).push([[13],{102:function(e,t,r){e.exports=r(22)(448)},106:function(e,t,r){"use strict";r.d(t,"a",(function(){return AbstractLayer}));var s=r(2),i=r.n(s),n=r(39),a=r.n(n),o=(r(4),r(14)),u=r(41),c=r(87),d=r(0),l=r(88),p=r(3);class AbstractLayer{static createDescriptor(e){return{...e,sourceDescriptor:e.sourceDescriptor?e.sourceDescriptor:null,__dataRequests:a.a.get(e,"__dataRequests",[]),id:a.a.get(e,"id",Object(u.v4)()),label:e.label&&e.label.length>0?e.label:null,minZoom:a.a.get(e,"minZoom",d.lb),maxZoom:a.a.get(e,"maxZoom",d.hb),alpha:a.a.get(e,"alpha",.75),visible:a.a.get(e,"visible",!0),style:a.a.get(e,"style",null),includeInFitToBounds:"boolean"!=typeof e.includeInFitToBounds||e.includeInFitToBounds}}constructor({layerDescriptor:e,source:t}){i()(this,"_descriptor",void 0),i()(this,"_source",void 0),i()(this,"_dataRequests",void 0),this._descriptor=AbstractLayer.createDescriptor(e),this._source=t,this._descriptor.__dataRequests?this._dataRequests=this._descriptor.__dataRequests.map((e=>new c.a(e))):this._dataRequests=[]}static getBoundDataForSource(e,t){return e.getStyle().sources[t].data}getDescriptor(){return this._descriptor}async cloneDescriptor(){const e=Object(l.b)(this._descriptor);e.id=Object(u.v4)();const t=await this.getDisplayName();return e.label=`Clone of ${t}`,e.sourceDescriptor=this.getSource().cloneDescriptor(),[e]}makeMbLayerId(e){return`${this.getId()}${d.jb}${e}`}isPreviewLayer(){return!!this._descriptor.__isPreviewLayer}supportsElasticsearchFilters(){return this.getSource().isESSource()}async supportsFitToBounds(){return await this.getSource().supportsFitToBounds()}async isFittable(){return await this.supportsFitToBounds()&&this.isVisible()&&this.isIncludeInFitToBounds()}isIncludeInFitToBounds(){return!!this._descriptor.includeInFitToBounds}async isFilteredByGlobalTime(){return!1}async getDisplayName(e){return this._descriptor.label?this._descriptor.label:(e?await e.getDisplayName():await this.getSource().getDisplayName())||`Layer ${this._descriptor.id}`}async getAttributions(){if(this.hasErrors()||!this.isVisible())return[];const e=this.getSource().getAttributionProvider();return e?e():void 0!==this._descriptor.attribution?[this._descriptor.attribution]:[]}getStyleForEditing(){throw new Error("Should implement AbstractLayer#getStyleForEditing")}getStyle(){throw new Error("Should implement AbstractLayer#getStyle")}getCurrentStyle(){throw new Error("Should implement AbstractLayer#getCurrentStyle")}getLabel(){return this._descriptor.label?this._descriptor.label:""}getLocale(){return null}getLayerIcon(e){return{icon:Object(p.jsx)(o.EuiIcon,{size:"m",type:this.getLayerTypeIconName()})}}async hasLegendDetails(){return!1}renderLegendDetails(){return null}getId(){return this._descriptor.id}getSource(){return this._source}getSourceForEditing(){return this._source}isVisible(){return!!this._descriptor.visible}showAtZoomLevel(e){return e>=this.getMinZoom()&&e<=this.getMaxZoom()}getMinZoom(){return"number"==typeof this._descriptor.minZoom?this._descriptor.minZoom:d.lb}getMaxZoom(){return"number"==typeof this._descriptor.maxZoom?this._descriptor.maxZoom:d.hb}getMinSourceZoom(){return this._source.getMinZoom()}getMbSourceId(){return this.getId()}_requiresPrevSourceCleanup(e){return!1}_removeStaleMbSourcesAndLayers(e){if(this._requiresPrevSourceCleanup(e)){const t=e.getStyle();t.layers.forEach((t=>{this.ownsMbLayerId(t.id)&&e.removeLayer(t.id)})),Object.keys(t.sources).some((t=>{this.ownsMbSourceId(t)&&e.removeSource(t)}))}}getAlpha(){return"number"==typeof this._descriptor.alpha?this._descriptor.alpha:1}getQuery(){return this._descriptor.query?this._descriptor.query:null}renderSourceSettingsEditor(e){return this.getSourceForEditing().renderSourceSettingsEditor(e)}getPrevRequestToken(e){const t=this.getDataRequest(e);if(t)return t.getRequestToken()}getInFlightRequestTokens(){if(!this._dataRequests)return[];const e=this._dataRequests.map((e=>e.getRequestToken()));return a.a.compact(e)}getSourceDataRequest(){return this.getDataRequest(d.xb)}getDataRequest(e){return this._dataRequests.find((t=>t.getDataId()===e))}isLayerLoading(e){if(!this.isVisible()||!this.showAtZoomLevel(e))return!1;const t=this._dataRequests.some((e=>e.isLoading()));return this._isTiled()?t||void 0===this._descriptor.__areTilesLoaded||!this._descriptor.__areTilesLoaded:!this.getSourceDataRequest()||t}hasErrors(){return a.a.get(this._descriptor,"__isInErrorState",!1)}getErrors(){return this.hasErrors()&&this._descriptor.__errorMessage?this._descriptor.__errorMessage:""}async syncData(e){}getMbLayerIds(){throw new Error("Should implement AbstractLayer#getMbLayerIds")}ownsMbLayerId(e){throw new Error("Should implement AbstractLayer#ownsMbLayerId")}ownsMbSourceId(e){throw new Error("Should implement AbstractLayer#ownsMbSourceId")}syncLayerWithMB(e){throw new Error("Should implement AbstractLayer#syncLayerWithMB")}getLayerTypeIconName(){throw new Error("should implement Layer#getLayerTypeIconName")}async getBounds(e){return null}renderStyleEditor(e,t){const r=this.getStyleForEditing();return r?r.renderEditor(e,t):null}getIndexPatternIds(){return[]}getQueryableIndexPatternIds(){return[]}syncVisibilityWithMb(e,t){e.setLayoutProperty(t,"visibility",this.isVisible()?"visible":"none")}getType(){return this._descriptor.type}areLabelsOnTop(){return!1}supportsLabelsOnTop(){return!1}supportsLabelLocales(){return!1}async getLicensedFeatures(){return[]}getGeoFieldNames(){const e=this.getSource();return e.isESSource()?[e.getGeoFieldName()]:[]}async getStyleMetaDescriptorFromLocalFeatures(){return null}isBasemap(e){return!1}getParent(){return this._descriptor.parent}_getMetaFromTiles(){return this._descriptor.__metaFromTiles||[]}_isTiled(){throw new Error("Must implement AbstractLayer#_isTiled")}}},110:function(e,t,r){"use strict";r.d(t,"a",(function(){return AbstractSource}));var s=r(2),i=r.n(s),n=r(88),a=r(0);class AbstractSource{constructor(e){i()(this,"_descriptor",void 0),this._descriptor=e}cloneDescriptor(){return Object(n.b)(this._descriptor)}async supportsFitToBounds(){return!1}async getImmutableProperties(){return[]}getType(){return this._descriptor.type}async getDisplayName(){return""}getAttributionProvider(){return null}isFieldAware(){return!1}isQueryAware(){return!1}renderSourceSettingsEditor(e){return null}getApplyGlobalQuery(){return!1}getApplyGlobalTime(){return!1}getApplyForceRefresh(){return!1}getIndexPatternIds(){return[]}getQueryableIndexPatternIds(){return[]}isESSource(){return!1}async createFieldFormatter(e){return null}async getValueSuggestions(e,t){return[]}async isTimeAware(){return!1}isFilterByMapBounds(){return!1}getMinZoom(){return a.lb}getMaxZoom(){return a.hb}async getLicensedFeatures(){return[]}getUpdateDueToTimeslice(e,t){return!0}}},74:function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"f",(function(){return n})),r.d(t,"e",(function(){return a})),r.d(t,"b",(function(){return o})),r.d(t,"d",(function(){return u})),r.d(t,"c",(function(){return c}));var s=r(1);function i(){return s.i18n.translate("xpack.maps.source.dataSourceLabel",{defaultMessage:"Data source"})}function n(){return s.i18n.translate("xpack.maps.source.urlLabel",{defaultMessage:"Url"})}function a(e){switch(e){case"intersects":return s.i18n.translate("xpack.maps.common.esSpatialRelation.intersectsLabel",{defaultMessage:"intersects"});case"disjoint":return s.i18n.translate("xpack.maps.common.esSpatialRelation.disjointLabel",{defaultMessage:"disjoint"});case"within":return s.i18n.translate("xpack.maps.common.esSpatialRelation.withinLabel",{defaultMessage:"within"});case"contains":return s.i18n.translate("xpack.maps.common.esSpatialRelation.containsLabel",{defaultMessage:"contains"});default:return e}}function o(){return s.i18n.translate("xpack.maps.dataView.label",{defaultMessage:"Data view"})}function u(){return s.i18n.translate("xpack.maps.dataView.selectPlacholder",{defaultMessage:"Select data view"})}function c(e){return s.i18n.translate("xpack.maps.dataView.notFoundMessage",{defaultMessage:"Unable to find data view '{id}'",values:{id:e}})}},87:function(e,t,r){"use strict";r.d(t,"a",(function(){return DataRequest})),r.d(t,"b",(function(){return DataRequestAbortError}));var s=r(2),i=r.n(s);class DataRequest{constructor(e){i()(this,"_descriptor",void 0),this._descriptor={...e}}getData(){return this._descriptor.data}isLoading(){return!!this._descriptor.dataRequestToken}getMeta(){return this._descriptor.dataRequestMetaAtStart?this._descriptor.dataRequestMetaAtStart:this._descriptor.dataRequestMeta?this._descriptor.dataRequestMeta:{}}hasData(){return!!this._descriptor.data}hasDataOrRequestInProgress(){return this.hasData()||this.isLoading()}getDataId(){return this._descriptor.dataId}getRequestToken(){return this._descriptor.dataRequestToken}}class DataRequestAbortError extends Error{constructor(){super()}}},88:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return i}));const s="__trackedLayerDescriptor";function i(e){if("object"!=typeof e||null===e)return e;const t=Array.isArray(e)?[]:{};for(const r in e)r.startsWith("__")||(t[r]=i(e[r]));return t}},93:function(e,t,r){e.exports=r(22)(190)}}]);