From 67d6a8a4e340aae3a2c7c02c9aa1627e320331d1 Mon Sep 17 00:00:00 2001 From: mbeckem Date: Mon, 18 Nov 2024 13:59:36 +0000 Subject: [PATCH] =?UTF-8?q?Deploy=20preview=20for=20PR=20371=20?= =?UTF-8?q?=F0=9F=9B=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{DT8wy5kYI49U.js => -ilupxkH0oi2.js} | 2 +- .../pr-previews/pr-371/assets/0Ump2O8Jg_uq.js | 1 + .../{BTEHqhSAUrUR.js => BEc19nv24p4W.js} | 2 +- .../{CxiOyT3ujOOX.js => BH5Lv4UduK--.js} | 4 ++-- .../{DsXJQLY20iHp.js => BWsYSh9PkSaL.js} | 2 +- .../pr-previews/pr-371/assets/BoVtdLuQVu4J.js | 1 + .../{Bu2XxZuHwi9Y.js => C1QgS6aRUKHA.js} | 2 +- .../{BMUaL9fwyTyD.js => CIcCgABVk_3-.js} | 2 +- .../{C_en_SddDDnC.js => CtwSIQ881oV-.js} | 2 +- .../pr-previews/pr-371/assets/CuGvFDdWxbib.js | 1 - .../{Cc6J-fLMy29d.js => CviiDeIRsDvc.js} | 2 +- .../{Cm0lgFxqMvMR.js => D0dVTtrd3drA.js} | 2 +- .../{Bwz5Rvo1RSBv.js => D4hWyDE3P_yA.js} | 2 +- .../{JZ5RcWTlF_6Y.js => D8rToQP6FvST.js} | 2 +- .../{A1UaLFN2YVoc.js => DV2kZNA-6G5s.js} | 2 +- .../{BCa-qOKx2WQP.js => DfLHb0ay1Pr1.js} | 4 ++-- .../{DgAO1auW02-w.js => DfzPiMvHeyHZ.js} | 2 +- .../{BBt4Ba3H9gMn.js => Ds9MLKVSYIgg.js} | 2 +- .../pr-previews/pr-371/assets/TnHTIdi4bAVU.js | 1 - .../{CbmA6rtzzDRA.js => g3imqe_H-zjU.js} | 2 +- .../{CncSlnPsjr9P.js => p-jlpmJ86TPh.js} | 16 +++++++------- .../{BRYmAG34-9j7.js => rsBy-C9pttN-.js} | 2 +- .../{QHG522PSVRAP.js => vkgtH7KoFSDR.js} | 2 +- .../{BormsuGtFsVQ.js => w7OhIb2wibYa.js} | 6 ++--- .../samples/experimental-sidebar/index.html | 4 ++-- .../pr-371/samples/map-sample/index.html | 22 +++++++++---------- .../pr-371/samples/ogc-api-sample/index.html | 14 ++++++------ .../pr-371/samples/showcase/index.html | 22 +++++++++---------- .../samples/test-basemap-switcher/index.html | 6 ++--- .../test-highlight-and-zoom/index.html | 6 ++--- .../pr-371/samples/test-menu-fix/index.html | 2 +- .../samples/test-printing-api/index.html | 10 ++++----- .../samples/test-result-list/index.html | 6 ++--- .../pr-371/samples/test-toc/index.html | 14 ++++++------ 34 files changed, 86 insertions(+), 86 deletions(-) rename openlayers-base-packages/pr-previews/pr-371/assets/{DT8wy5kYI49U.js => -ilupxkH0oi2.js} (93%) create mode 100644 openlayers-base-packages/pr-previews/pr-371/assets/0Ump2O8Jg_uq.js rename openlayers-base-packages/pr-previews/pr-371/assets/{BTEHqhSAUrUR.js => BEc19nv24p4W.js} (99%) rename openlayers-base-packages/pr-previews/pr-371/assets/{CxiOyT3ujOOX.js => BH5Lv4UduK--.js} (99%) rename openlayers-base-packages/pr-previews/pr-371/assets/{DsXJQLY20iHp.js => BWsYSh9PkSaL.js} (93%) create mode 100644 openlayers-base-packages/pr-previews/pr-371/assets/BoVtdLuQVu4J.js rename openlayers-base-packages/pr-previews/pr-371/assets/{Bu2XxZuHwi9Y.js => C1QgS6aRUKHA.js} (91%) rename openlayers-base-packages/pr-previews/pr-371/assets/{BMUaL9fwyTyD.js => CIcCgABVk_3-.js} (97%) rename openlayers-base-packages/pr-previews/pr-371/assets/{C_en_SddDDnC.js => CtwSIQ881oV-.js} (96%) delete mode 100644 openlayers-base-packages/pr-previews/pr-371/assets/CuGvFDdWxbib.js rename openlayers-base-packages/pr-previews/pr-371/assets/{Cc6J-fLMy29d.js => CviiDeIRsDvc.js} (91%) rename openlayers-base-packages/pr-previews/pr-371/assets/{Cm0lgFxqMvMR.js => D0dVTtrd3drA.js} (93%) rename openlayers-base-packages/pr-previews/pr-371/assets/{Bwz5Rvo1RSBv.js => D4hWyDE3P_yA.js} (99%) rename openlayers-base-packages/pr-previews/pr-371/assets/{JZ5RcWTlF_6Y.js => D8rToQP6FvST.js} (98%) rename openlayers-base-packages/pr-previews/pr-371/assets/{A1UaLFN2YVoc.js => DV2kZNA-6G5s.js} (98%) rename openlayers-base-packages/pr-previews/pr-371/assets/{BCa-qOKx2WQP.js => DfLHb0ay1Pr1.js} (99%) rename openlayers-base-packages/pr-previews/pr-371/assets/{DgAO1auW02-w.js => DfzPiMvHeyHZ.js} (99%) rename openlayers-base-packages/pr-previews/pr-371/assets/{BBt4Ba3H9gMn.js => Ds9MLKVSYIgg.js} (99%) delete mode 100644 openlayers-base-packages/pr-previews/pr-371/assets/TnHTIdi4bAVU.js rename openlayers-base-packages/pr-previews/pr-371/assets/{CbmA6rtzzDRA.js => g3imqe_H-zjU.js} (87%) rename openlayers-base-packages/pr-previews/pr-371/assets/{CncSlnPsjr9P.js => p-jlpmJ86TPh.js} (72%) rename openlayers-base-packages/pr-previews/pr-371/assets/{BRYmAG34-9j7.js => rsBy-C9pttN-.js} (98%) rename openlayers-base-packages/pr-previews/pr-371/assets/{QHG522PSVRAP.js => vkgtH7KoFSDR.js} (95%) rename openlayers-base-packages/pr-previews/pr-371/assets/{BormsuGtFsVQ.js => w7OhIb2wibYa.js} (99%) diff --git a/openlayers-base-packages/pr-previews/pr-371/assets/DT8wy5kYI49U.js b/openlayers-base-packages/pr-previews/pr-371/assets/-ilupxkH0oi2.js similarity index 93% rename from openlayers-base-packages/pr-previews/pr-371/assets/DT8wy5kYI49U.js rename to openlayers-base-packages/pr-previews/pr-371/assets/-ilupxkH0oi2.js index 9f8b899..5bedab2 100644 --- a/openlayers-base-packages/pr-previews/pr-371/assets/DT8wy5kYI49U.js +++ b/openlayers-base-packages/pr-previews/pr-371/assets/-ilupxkH0oi2.js @@ -1 +1 @@ -import{j as t,c as q,a as U,r as p,B as I,i as K,b as $,d as A,F as Z,e as Y}from"./Bh0CuZ3gy5tC.js";import{B as d,V as J,S as j,T as X,O as Q,a as C,b as N,c as ee,C as te,F as oe,r as T,d as D,e as re,w as ie,H as ne,M as ae,u as se,f as le,g as v,h as x,i as L,j as M,k as y,D as ce,l as pe,m as de}from"./CncSlnPsjr9P.js";import{W as V,P as ue,a as me,b as ge,c as he,d as fe,e as be,f as ve,g as xe,h as we}from"./A1UaLFN2YVoc.js";import{W as R,E as Se,V as ye,S as ke,O as Me,C as je,a as Ce,b as Le,L as ze,M as _e,c as Pe,d as Ie,P as Ae,N as Te}from"./CxiOyT3ujOOX.js";import{G as O,u as De,T as h,P as Re,a as Ee,b as Fe,c as qe,d as Ne,e as Ve}from"./TnHTIdi4bAVU.js";import{T as z}from"./Tz2xttM4F6S2.js";import{N as Oe,P as He}from"./BBt4Ba3H9gMn.js";import{V as Ge,S as Be,I as We,Z as Ue,a as Ke}from"./BMUaL9fwyTyD.js";import{_ as E}from"./CmsKOCeNyeyo.js";import{u as b,D as $e}from"./BTEHqhSAUrUR.js";import{H}from"./L25RkWOQSN8A.js";import{G}from"./CL_VRsbiqLzM.js";import{R as Ze}from"./Bwz5Rvo1RSBv.js";import{C as Ye}from"./BCXJt8t_qqq7.js";import"./JZ5RcWTlF_6Y.js";import"./DsXJQLY20iHp.js";import"./Cq1ZpfgEg4XJ.js";import"./D03oE8cEQPSj.js";import"./BO_q12Vdyug-.js";import"./CreVQ-qFRzOc.js";import"./CjjyePfBQlZ7.js";import"./DUys4rac0YQP.js";import"./2d5-QpxJNHTD.js";import"./BeFcF3Ti4kY-.js";const Je={height:"25px",width:"25px",borderColor:"#4cb3ff",borderWidth:"3px",borderRadius:"50%",display:"inline-block "};function Xe(r){return t.jsxs(d,{children:[t.jsx(z,{children:r.layer.title}),t.jsx(d,{style:Je})]})}const _="main";class Qe{mapId=_;vectorSourceFactory;constructor(e){this.vectorSourceFactory=e.references.vectorSourceFactory}async getMapConfig(){return{advanced:{view:new J({center:[404747,5757920],zoom:13,constrainResolution:!0,projection:"EPSG:25832"})},layers:[...et(),rt(),tt(this.vectorSourceFactory),ot(),it()]}}}function et(){return[new R({isBaseLayer:!0,title:"Topplus grau",url:"https://www.wmts.nrw.de/topplus_open/1.0.0/WMTSCapabilities.xml",name:"topplus_grau",matrixSet:"EPSG_25832_14",visible:!1,sourceOptions:{attributions:`Kartendarstellung und Präsentationsgraphiken: © Bundesamt für Kartographie und Geodäsie ${new Date().getFullYear()}, Datenquellen`}}),new R({isBaseLayer:!0,title:"Topplus farbig",url:"https://www.wmts.nrw.de/topplus_open/1.0.0/WMTSCapabilities.xml",name:"topplus_col",matrixSet:"EPSG_25832_14",visible:!0,sourceOptions:{attributions:`Kartendarstellung und Präsentationsgraphiken: © Bundesamt für Kartographie und Geodäsie ${new Date().getFullYear()}, Datenquellen`}}),new j({title:"OpenStreetMaps",visible:!1,isBaseLayer:!0,olLayer:new X({source:new Q})})]}function tt(r){const e="https://ogc-api-test.nrw.de/inspire-us-krankenhaus/v1",o="governmentalservice",i=r.createVectorSource({strategy:"next",baseUrl:e,collectionId:o,limit:1e3,crs:"http://www.opengis.net/def/crs/EPSG/0/25832",attributions:`Land NRW (${new Date().getFullYear()}), Datenlizenz Deutschland - Namensnennung - Version 2.0, Datenquelle`}),n=new C({source:i});return new j({id:"krankenhaus",title:"Krankenhäuser",visible:!1,olLayer:n,attributes:{collectionURL:e+"/collections/"+o}})}function ot(){return new V({title:"Schulstandorte",description:"Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.",visible:!0,url:"https://www.wms.nrw.de/wms/wms_nw_inspire-schulen",sublayers:[{name:"US.education",title:"INSPIRE - WMS Schulstandorte NRW",attributes:{legend:{}}}],sourceOptions:{ratio:1}})}function rt(){return new V({title:"Straßennetz Landesbetrieb Straßenbau NRW",url:"https://www.wms.nrw.de/wms/strassen_nrw_wms",visible:!0,sublayers:[{name:"1",title:"Verwaltungen",attributes:{legend:{imageUrl:"https://www.wms.nrw.de/legends/wms/strassen_nrw_wms/1.png"}}},{name:"4",title:"Abschnitte und Äste"},{name:"6",title:"Unfälle"}]})}function it(){const r={Component:Xe},e=new N({url:"https://ogc-api.nrw.de/inspire-us-kindergarten/v1/collections/governmentalservice/items?f=json&limit=10000",format:new O,attributions:'© Bundesamt für Kartographie und Geodäsie 2017, Datenquellen'}),o=new C({source:e,style:new ee({image:new te({fill:new oe({color:"blue"}),radius:4})})});return new j({id:"ogc_kitas",title:"Kindertagesstätten",visible:!0,olLayer:o,attributes:{legend:r,resultListMetadata:[{id:"id",displayName:"ID",width:100,getPropertyValue(i){return i.id}},{propertyName:"pointOfContact.address.postCode",displayName:"PLZ",width:120},{propertyName:"name",displayName:"Name"},{propertyName:"inspireId",displayName:"inspireID"},{displayName:"Gefördert",width:160,getPropertyValue(i){switch(i.properties?.gefoerdert){case"ja":return!0;case"nein":return!1;default:return i.properties?.gefoerdert}}}]}})}class nt{label;filteredTypes;httpService;constructor(e,o,i){this.label=e,this.filteredTypes=o,this.httpService=i}async search(e,{mapProjection:o,signal:i}){const n=await this.request(e,100,i),a=new O({dataProjection:"EPSG:4326",featureProjection:o});return n.features.filter(s=>this.filteredTypes.includes(s.properties.type)).map((s,l)=>{const c=a.readGeometry(s.geometry);return{id:s.properties.osm_id||l,label:this.createLabel(s),geometry:c,properties:s.properties}})}async request(e,o,i){const n=new URL("https://photon.komoot.io/api?");n.searchParams.set("q",e),n.searchParams.set("lang","de"),n.searchParams.set("lat","51.961563"),n.searchParams.set("lon","7.628202"),n.searchParams.set("limit",o.toString());const a=await this.httpService.fetch(n,{signal:i});if(!a.ok)throw new Error("Request failed: "+a.status);return await a.json()}createLabel(e){return`${e.properties.name} (${e.properties.osm_value?e.properties.osm_value+", ":""}${e.properties.postcode?e.properties.postcode+", ":""}${e.properties.city?e.properties.city+", ":""}${e.properties.country?e.properties.country+")":")"}`}}const at=q("ol-app:AppModel");function k(r){return r==="selection"||r==="measurement"||r.startsWith("editing-")}class st{_mapRegistry;_vectorSelectionSourceFactory;_httpService;_resources=[];_featureHighlight=void 0;_mainContent=T(["toc"]);_searchSources=D();_selectionSources=D();_sourceMetadata=re();_resultListState=T({key:0,open:!1,input:void 0});constructor({references:e}){this._mapRegistry=e.mapRegistry,this._vectorSelectionSourceFactory=e.vectorSelectionSourceFactory,this._httpService=e.httpService,this.initSearchSources(),this.initSelectionSources().catch(o=>{at.error("Failed to initialize selection sources",o)})}destroy(){this.clearHighlight(),this._resources.forEach(e=>e.destroy())}get mainContent(){return this._mainContent.value}get searchSources(){return this._searchSources}get selectionSources(){return this._selectionSources}get sourceMetadata(){return this._sourceMetadata}get resultListState(){return this._resultListState.value}toggleMainContent(e){const o=this._mainContent.value;if(o.includes(e)){this._mainContent.value=o.filter(n=>n!==e);return}let i;k(e)?(i=[e],this.clearHighlight()):(i=o.filter(n=>!k(n)),i.push(e)),this._mainContent.value=i}hideContent(e){this._mainContent.value=this._mainContent.value.filter(o=>o!==e)}clearInteractions(){this._mainContent.value=this._mainContent.value.filter(e=>!k(e))}setResultListInput(e){const o=this._resultListState.value;this._resultListState.value={open:!0,key:o.key+1,input:e}}setResultListVisibility(e){this._resultListState.value={...this._resultListState.value,open:e}}highlightAndZoom(e,o){const i=e.olMap.getViewport();this.clearHighlight(),this._featureHighlight=e.highlightAndZoom(o,{viewPadding:i&&i.offsetWidth<1e3?{top:150,right:75,bottom:50,left:75}:{top:150,right:400,bottom:50,left:400}})}zoom(e,o){const i=e.olMap.getViewport();e.zoom(o,{viewPadding:i&&i.offsetWidth<1e3?{top:150,right:75,bottom:50,left:75}:{top:150,right:400,bottom:50,left:400}})}clearHighlight(){this._featureHighlight&&(this._featureHighlight.destroy(),this._featureHighlight=void 0)}initSearchSources(){const e=new nt("Photon Geocoder",["city","street"],this._httpService);this._searchSources.push(e)}async initSelectionSources(){const e=["ogc_kitas","ogc_kataster"],i=(await this._mapRegistry.expectMapModel(_)).layers.getOperationalLayers({sortByDisplayOrder:!0});for(const n of i){if(!e.includes(n.id)||!lt(n.olLayer))continue;const a=this._vectorSelectionSourceFactory.createSelectionSource({vectorLayer:n.olLayer,label:n.title}),s=ie(()=>[a.status],([l])=>{l!=="available"&&(l==="unavailable"||l?.kind==="unavailable")&&this.clearHighlight()});this._resources.push(s,a),this._selectionSources.unshift(a),this._sourceMetadata.set(a,n.attributes.resultListMetadata)}}}function lt(r){return r instanceof C&&r.getSource()instanceof N}const ct={"ol-map":{name:"ol-map",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:Qe,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{vectorSourceFactory:{name:"ogc-features.VectorSourceFactory",qualifier:void 0,all:!1}}},AppModel:{name:"AppModel",clazz:st,provides:[{name:"ol-app.AppModel",qualifier:void 0}],references:{vectorSelectionSourceFactory:{name:"selection.VectorSelectionSourceFactory",qualifier:void 0,all:!1},httpService:{name:"http.HttpService",qualifier:void 0,all:!1},mapRegistry:{name:"map.MapRegistry",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1},{name:"ol-app.AppModel",qualifier:void 0,all:!1},{name:"notifier.NotificationService",qualifier:void 0,all:!1},{name:"editing.EditingService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:ne,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/notifier":{name:"@open-pioneer/notifier",services:{NotificationServiceImpl:{name:"NotificationServiceImpl",clazz:Oe,provides:[{name:"notifier.NotificationService",qualifier:"notifier.NotificationService"}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/reactivity":{name:"@open-pioneer/reactivity",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:ae,provides:[{name:"map.MapRegistry",qualifier:void 0}],references:{providers:{name:"map.MapConfigProvider",qualifier:void 0,all:!0},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/theme":{name:"@open-pioneer/theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/ogc-features":{name:"@open-pioneer/ogc-features",services:{VectorSourceFactory:{name:"VectorSourceFactory",clazz:Ge,provides:[{name:"ogc-features.VectorSourceFactory",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}},SearchSourceFactory:{name:"SearchSourceFactory",clazz:Be,provides:[{name:"ogc-features.SearchSourceFactory",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[]},properties:{}},"@open-pioneer/coordinate-viewer":{name:"@open-pioneer/coordinate-viewer",services:{},ui:{references:[]},properties:{}},"@open-pioneer/scale-bar":{name:"@open-pioneer/scale-bar",services:{},ui:{references:[]},properties:{}},"@open-pioneer/scale-viewer":{name:"@open-pioneer/scale-viewer",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map-ui-components":{name:"@open-pioneer/map-ui-components",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map-navigation":{name:"@open-pioneer/map-navigation",services:{},ui:{references:[]},properties:{}},"@open-pioneer/toc":{name:"@open-pioneer/toc",services:{},ui:{references:[]},properties:{}},"@open-pioneer/editing":{name:"@open-pioneer/editing",services:{EditingServiceImpl:{name:"EditingServiceImpl",clazz:Se,provides:[{name:"editing.EditingService",qualifier:void 0}],references:{mapRegistry:{name:"map.MapRegistry",qualifier:void 0,all:!1},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[]},properties:{polygonStyle:{value:{"fill-color":"rgba(255,255,255,0.4)","stroke-color":"red","stroke-width":1.25,"circle-radius":3,"circle-fill-color":"red","circle-stroke-width":1.25,"circle-stroke-color":"red"},required:!1},vertexStyle:{value:{"circle-radius":3,"circle-fill-color":"red","circle-stroke-width":1.25,"circle-stroke-color":"red"},required:!1}}},"@open-pioneer/legend":{name:"@open-pioneer/legend",services:{},ui:{references:[]},properties:{}},"@open-pioneer/measurement":{name:"@open-pioneer/measurement",services:{},ui:{references:[]},properties:{}},"@open-pioneer/printing":{name:"@open-pioneer/printing",services:{PrintingServiceImpl:{name:"PrintingServiceImpl",clazz:He,provides:[{name:"printing.PrintingService",qualifier:void 0}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1},{name:"printing.PrintingService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/result-list":{name:"@open-pioneer/result-list",services:{},ui:{references:[]},properties:{}},"@open-pioneer/search":{name:"@open-pioneer/search",services:{},ui:{references:[]},properties:{}},"@open-pioneer/selection":{name:"@open-pioneer/selection",services:{VectorSelectionSourceFactory:{name:"VectorSelectionSourceFactory",clazz:ye,provides:[{name:"selection.VectorSelectionSourceFactory",qualifier:void 0}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}},"@open-pioneer/basemap-switcher":{name:"@open-pioneer/basemap-switcher",services:{},ui:{references:[]},properties:{}}},pt='.search-box{position:absolute;width:500px;max-width:100%;z-index:1}:root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.map-container .ol-viewport .ol-attribution{bottom:var(--map-padding-bottom);right:var(--map-padding-right)}.editing-tooltip{position:relative;background:#fffc;border-radius:4px;color:#000;padding:4px 8px;opacity:1;white-space:nowrap;font-size:12px;cursor:default;-webkit-user-select:none;user-select:none;font-weight:700}.editing-tooltip-hidden{visibility:hidden}.measurement-tooltip{position:relative;background:#fffc;border-radius:4px;color:#000;padding:4px 8px;opacity:1;white-space:nowrap;font-size:12px;cursor:default;-webkit-user-select:none;user-select:none;font-weight:700}.measurement-active-tooltip{background:#000000e6;border-radius:4px;border-color:#000000e6;opacity:.9;color:#fff}.measurement-finished-tooltip{background-color:#4cb3ffe6;color:#000;border:1px solid white}.measurement-active-tooltip:before,.measurement-finished-tooltip:before{border-top:6px solid rgba(0,0,0,.9);border-right:6px solid transparent;border-left:6px solid transparent;content:"";position:absolute;bottom:-6px;margin-left:-7px;left:50%}.measurement-finished-tooltip:before{border-top-color:#4cb3ff}.printing-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:10000;-webkit-user-select:none;user-select:none;pointer-events:all;cursor:wait;display:flex;flex-direction:row;align-items:center;justify-content:center;background-color:#b4b4b4cc}.printing-overlay-status{flex:1 1 auto;font-size:1.5em;text-align:center}.printing-scale-bar.ol-scale-bar{left:var(--printing-scale-bar-left);bottom:var(--printing-scale-bar-bottom)}.search-component .chakra-divider{display:none}.search-component .search-highlighted-match{font-weight:700}.search-component .search-value-container{cursor:text;padding-left:30px!important}.search-component .search-invisible{display:none}.selection-drag-box{background-color:#ffffff4d!important;border:3px solid var(--chakra-colors-background_primary)!important}.selection-tooltip{position:relative;background:#fffc;border-radius:4px;color:#000;padding:4px 8px;opacity:1;white-space:nowrap;font-size:12px;cursor:default;-webkit-user-select:none;user-select:none;font-weight:700}.selection .react-select{cursor:default}.map-container .selection-active{cursor:crosshair}.map-container .selection-inactive{cursor:no-drop}.selection-source-value.selection-source-value--disabled{opacity:.4}.selection-source-value.selection-source-value--disabled span{margin:0 6px 0 0}.scale-bar .ol-scale-bar{margin-bottom:8px;margin-right:8px}.scale-bar .ol-scale-bar,.scale-bar .ol-scale-line{position:relative;bottom:0;left:0;background:none}.scale-bar .ol-scale-bar .ol-scale-bar-inner,.scale-bar .ol-scale-bar .ol-scale-line-inner,.scale-bar .ol-scale-line .ol-scale-bar-inner,.scale-bar .ol-scale-line .ol-scale-line-inner{color:var(--chakra-white);border-color:var(--chakra-white)}.result-list-no-data-message{text-align:center;margin-top:50px;font-weight:700;font-size:larger}.result-list-table th,.result-list-table td{overflow-wrap:break-word}.result-list-table.result-list-table--is-resizing *{cursor:col-resize}.result-list-table thead{position:sticky;top:0;z-index:1;background:var(--chakra-colors-background_body)}.result-list-table th{position:relative;border-right-width:thin}.result-list-table tbody tr:hover{background:var(--chakra-colors-background_light)}.result-list-table .result-list-resizer{position:absolute;top:0;height:100%;right:0;width:8px;background:var(--chakra-colors-trails-100);transform:scaleX(.25);cursor:col-resize;-webkit-user-select:none;user-select:none;touch-action:none;padding-left:0}.result-list-table th:last-child .result-list-resizer{width:8px;transform:translate(50%) scaleX(.25)}.result-list-table th .result-list-resizer.result-list-resizer--is-resizing{background:var(--chakra-colors-trails-500);transform:scale(1)}.result-list-table th .result-list-resizer:hover{transform:scale(1)}',dt=["en","de"];function ut(r){switch(r){case"en":return E(()=>import("./BYGrfKr5WBJ9.js"),[],import.meta.url).then(e=>e.default);case"de":return E(()=>import("./C-s9YzO5rJEK.js"),[],import.meta.url).then(e=>e.default)}throw new Error(`Unsupported locale: '${r}'`)}const mt=U(pt),gt=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:ut,locales:dt,packages:ct,styles:mt},Symbol.toStringTag,{value:"Module"})),B="ol-map",g=le.bind(void 0,B),u=se.bind(void 0,B),ht=q("ol-app:Editing");function F(r){const e=ft(r.kind),o=p.useId(),i=u();return t.jsx(d,{role:"dialog","aria-labelledby":o,children:t.jsx(v,{title:t.jsx(x,{id:o,size:"md",mb:2,children:i.formatMessage({id:"editing.title"})}),children:t.jsxs(d,{overflowY:"auto",maxHeight:300,children:[t.jsx(z,{textAlign:"center",children:i.formatMessage({id:"editing.active"})}),t.jsxs(H,{mt:4,align:"center",justify:"center",children:[t.jsx(I,{onClick:()=>{e?.reset()},children:i.formatMessage({id:"editing.resetGeometry"})}),t.jsx(I,{onClick:()=>{e?.destroy()},children:i.formatMessage({id:"editing.abort"})})]})]})})})}function ft(r){const e=g("notifier.NotificationService"),o=g("editing.EditingService"),i=u(),n=g("ol-app.AppModel"),{map:a}=L(),[s,l]=p.useState();return p.useEffect(()=>{if(!a)return;const c=new bt(e,o,a,i,n,r);return l(c),()=>{c.destroy(),l(void 0)}},[n,o,i,a,e,r]),s}class bt{notificationService;editingService;map;intl;appModel;kind;job;constructor(e,o,i,n,a,s){this.notificationService=e,this.editingService=o,this.map=i,this.intl=n,this.appModel=a,this.kind=s;let l;switch(s){case"create":l=this.createJob();break;case"update":l=this.updateJob();break}this.job=l,this.job.run().catch(c=>{K(c)||(ht.error("Edit operation failed",c),this.notificationService.notify({level:"error",message:this.intl.formatMessage({id:"editing.error"})}))}).finally(()=>{this.destroy()})}destroy(){this.job?.destroy(),this.job=void 0,this.appModel.hideContent(`editing-${this.kind}`)}reset(){this.job?.reset()}createJob(){let e;return{destroy(){e?.stop(),e=void 0},reset(){e?.reset()},run:async()=>{const o=this.findLayer(),i=new URL(o.attributes.collectionURL+"/items");e=this.editingService.createFeature(this.map,i);const n=await e.whenComplete();if(e=void 0,!n)return;this.notificationService.notify({level:"info",message:this.intl.formatMessage({id:"editing.create.featureCreated"},{featureId:n.featureId})}),(o?.olLayer).getSource()?.refresh()}}}updateJob(){const e=this.map,o=new AbortController,i=o.signal;let n,a,s;function l(){a&&e.olMap.removeInteraction(a),a&&a.dispose(),n&&n.destroy(),o.abort(),a=void 0,n=void 0}return{destroy(){l(),s?.stop(),s=void 0},reset(){s?.reset()},run:async()=>{const c=this.findLayer(),m=c.olLayer,w=new URL(c.attributes.collectionURL+"/items");a=new ke({layers:[m]}),e.olMap.addInteraction(a),n=vt(this.intl,e.olMap),n.element.classList.remove("editing-tooltip-hidden");let f;for(;;){const{selected:P,deselected:W}=await xt(a,i);if(P.length===1&&W.length===0){l(),f=P[0];break}}if(!f)throw Error("Feature is undefined");s=this.editingService.updateFeature(e,w,f);const S=await s.whenComplete();S&&(this.notificationService.notify({level:"info",message:this.intl.formatMessage({id:"editing.update.featureModified"},{featureId:S.featureId})}),m.getSource()?.refresh())}}}findLayer(){const e=this.map.layers.getLayerById("krankenhaus");if(!e)throw new Error("Layer not found");return e}}function vt(r,e){const o=document.createElement("div");o.className="editing-tooltip editing-tooltip-hidden",o.textContent=r.formatMessage({id:"editing.update.tooltip.select"});const i=new Me({element:o,offset:[15,0],positioning:"center-left"}),n=e.on("pointermove",a=>{a.dragging||i.setPosition(a.coordinate)});return e.addOverlay(i),{overlay:i,element:o,destroy(){M(n),e.removeOverlay(i)}}}function xt(r,e){let o;const{promise:i,resolve:n,reject:a}=$();if(e.aborted)return a(A()),i;const s=()=>{o&&M(o),o=void 0,a(A())};return e.addEventListener("abort",s),o=r.on("select",l=>{e.removeEventListener("abort",s),o&&M(o),o=void 0,n(l)}),i}function wt(){const r=u();return t.jsxs(y,{role:"region","aria-label":r.formatMessage({id:"ariaLabel.footer"}),gap:3,alignItems:"center",justifyContent:"center",children:[t.jsx(je,{precision:2,displayProjectionCode:"EPSG:4326"}),t.jsx(Ce,{}),t.jsx(Le,{})]})}function St(){const r=p.useId(),e=u();return t.jsx(d,{role:"dialog","aria-labelledby":r,children:t.jsx(v,{title:t.jsx(x,{id:r,size:"md",mb:2,children:e.formatMessage({id:"legendTitle"})}),children:t.jsx(d,{overflowY:"auto",maxHeight:300,children:t.jsx(ze,{showBaseLayers:!0})})})})}function yt(r){return G({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M19 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M15 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M6.5 9.5l1.546 -1.311"},child:[]},{tag:"path",attr:{d:"M14 5.5l3 1.5"},child:[]},{tag:"path",attr:{d:"M18.5 10l-1.185 3.318m-1.062 2.972l-.253 .71"},child:[]},{tag:"path",attr:{d:"M13.5 17.5l-7 -5"},child:[]},{tag:"path",attr:{d:"M3 3l18 18"},child:[]}]})(r)}function kt(r){return G({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M19 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M15 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M6.5 9.5l3.5 -3"},child:[]},{tag:"path",attr:{d:"M14 5.5l3 1.5"},child:[]},{tag:"path",attr:{d:"M18.5 10l-2.5 7"},child:[]},{tag:"path",attr:{d:"M13.5 17.5l-7 -5"},child:[]}]})(r)}function Mt(){const r=u(),e=g("ol-app.AppModel"),o=b(()=>e.resultListState,[e]),i=o.open,{isTocActive:n,isLegendActive:a,isPrintingActive:s}=b(()=>({isTocActive:e.mainContent.includes("toc"),isLegendActive:e.mainContent.includes("legend"),isPrintingActive:e.mainContent.includes("printing")}),[e]);return t.jsxs(y,{role:"toolbar","aria-label":r.formatMessage({id:"ariaLabel.toolbar"}),direction:"column",gap:1,padding:1,children:[t.jsx(jt,{}),o.input&&t.jsx(h,{label:r.formatMessage({id:"resultListTitle"}),icon:t.jsx(me,{}),isActive:o.open,onClick:()=>e.setResultListVisibility(!i)}),t.jsx(h,{label:r.formatMessage({id:"tocTitle"}),icon:t.jsx(ge,{}),isActive:n,onClick:()=>e.toggleMainContent("toc")}),t.jsx(h,{label:r.formatMessage({id:"legendTitle"}),icon:t.jsx(he,{}),isActive:a,onClick:()=>e.toggleMainContent("legend")}),t.jsx(h,{label:r.formatMessage({id:"printingTitle"}),icon:t.jsx(fe,{}),isActive:s,onClick:()=>e.toggleMainContent("printing")}),t.jsx(We,{}),t.jsx(Ue,{}),t.jsx(Ke,{})]})}function jt(){const r=u(),e=g("ol-app.AppModel"),[o,i]=p.useState(!1),{isSelectionActive:n,isMeasurementActive:a,isEditingCreateActive:s,isEditingUpdateActive:l}=b(()=>({isSelectionActive:e.mainContent.includes("selection"),isMeasurementActive:e.mainContent.includes("measurement"),isEditingCreateActive:e.mainContent.includes("editing-create"),isEditingUpdateActive:e.mainContent.includes("editing-update")}),[e]),c=f=>()=>{f(),i(!1)},m={placement:"top"},w=t.jsxs(t.Fragment,{children:[t.jsx(h,{label:s?r.formatMessage({id:"editing.stopTitle"}):r.formatMessage({id:"editing.create.startTitle"}),icon:s?t.jsx(yt,{}):t.jsx(kt,{}),isActive:s,onClick:c(()=>e.toggleMainContent("editing-create")),tooltipProps:m}),t.jsx(h,{label:l?r.formatMessage({id:"editing.stopTitle"}):r.formatMessage({id:"editing.update.startTitle"}),icon:l?t.jsx(be,{}):t.jsx(ve,{}),isActive:l,onClick:c(()=>e.toggleMainContent("editing-update")),tooltipProps:m}),t.jsx(h,{label:r.formatMessage({id:"measurementTitle"}),icon:t.jsx(xe,{}),isActive:a,onClick:c(()=>e.toggleMainContent("measurement")),tooltipProps:m}),t.jsx(h,{label:r.formatMessage({id:"selectionTitle"}),icon:t.jsx(we,{}),isActive:n,onClick:c(()=>e.toggleMainContent("selection")),tooltipProps:m})]});return t.jsxs(Re,{placement:"left",isLazy:!0,onOpen:()=>i(!0),onClose:()=>i(!1),isOpen:o,children:[t.jsx(Ee,{children:t.jsx(Ct,{})}),t.jsx(Z,{children:t.jsxs(Fe,{width:"auto",children:[t.jsx(qe,{}),t.jsx(Ne,{children:t.jsx(H,{spacing:2,children:w})})]})})]})}const Ct=p.forwardRef(function(e,o){const i=u(),n=De(),{onClick:a,...s}=n.getTriggerProps();return t.jsx(h,{ref:o,label:i.formatMessage({id:"mapInteractions.title"}),icon:t.jsx(ue,{}),onClick:a,buttonProps:s})});function Lt(){const r=p.useId(),e=u();return t.jsx(d,{role:"dialog","aria-labelledby":r,children:t.jsx(v,{title:t.jsx(x,{id:r,size:"md",mb:2,children:e.formatMessage({id:"measurementTitle"})}),children:t.jsx(_e,{})})})}function zt(){const r=g("ol-app.AppModel"),e=b(()=>r.resultListState,[r]),[o,i]=p.useState([]),[n,a]=p.useState([]),s=p.useCallback(l=>{i(l.features),a(l.getFeatureIds())},[]);return p.useEffect(()=>{console.log("Anzahl Features: "+o.length),console.log("SelectedIds: "+n.toString())},[o,n]),e.input&&t.jsx(d,{className:"result-list-container",position:"absolute",visibility:e.open?"visible":"hidden",bottom:"0",backgroundColor:"white",width:"100%",height:"400px",zIndex:1,borderTop:"2px solid",borderBottom:"2px solid",borderColor:"trails.100",children:t.jsx(Ze,{input:e.input,onSelectionChange:s},e.key)})}function _t(){const{map:r}=L(),e=g("ol-app.AppModel"),o=b(()=>e.searchSources.getItems(),[e]);function i(a){if(console.debug("The user selected the following item: ",a.result),!r)return;const s=a.result.geometry;s&&e.highlightAndZoom(r,[s])}function n(){console.debug("The user cleared the search"),e.clearHighlight()}return t.jsx(d,{backgroundColor:"white",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",mt:5,className:"search-box",children:t.jsx(Pe,{sources:o,maxResultsPerGroup:10,onSelect:i,onClear:n})})}function Pt(){const r=u(),e=g("notifier.NotificationService"),o=p.useId(),{map:i}=L(),n=g("ol-app.AppModel"),a=b(()=>n.selectionSources.getItems(),[n]),s={numberOptions:{maximumFractionDigits:3},dateOptions:{dateStyle:"medium",timeStyle:"medium",timeZone:"UTC"}};function l(m){const{source:w,results:f}=m;if(!i){console.debug("Map not ready");return}const S=n.sourceMetadata.get(w);if(!S){console.warn("Can not show results because no metadata could be found");return}n.setResultListInput({columns:S,data:f,formatOptions:s}),e.notify({level:"info",message:r.formatMessage({id:"foundResults"},{resultsCount:f.length}),displayDuration:4e3})}function c(m){n.clearHighlight()}return t.jsx(d,{role:"dialog","aria-labelledby":o,children:t.jsx(v,{title:t.jsx(x,{id:o,size:"md",mb:2,children:r.formatMessage({id:"selectionTitle"})}),children:t.jsx(Ie,{sources:a,onSelectionComplete:l,onSelectionSourceChanged:c})})})}function It(){const r=p.useId(),e=u();return t.jsx(d,{role:"dialog","aria-labelledby":r,children:t.jsx(v,{title:t.jsx(x,{id:r,size:"md",mb:2,children:t.jsx(z,{children:e.formatMessage({id:"tocTitle"})})}),children:t.jsx(d,{overflowY:"auto",maxHeight:300,children:t.jsx(Ve,{showTools:!0,basemapSwitcherProps:{allowSelectingEmptyBasemap:!0}})})})})}function At(){const r=p.useId(),e=u();return t.jsx(d,{role:"dialog","aria-labelledby":r,children:t.jsx(v,{title:t.jsx(x,{id:r,size:"md",mb:2,children:e.formatMessage({id:"printingTitle"})}),children:t.jsx(Ae,{})})})}function Tt(){const r=u(),e=g("ol-app.AppModel"),{resultListState:o,mainContent:i}=b(()=>({resultListState:e.resultListState,mainContent:e.mainContent}),[e]),n=o.input&&o.open;return t.jsx(ce,{mapId:_,children:t.jsxs(y,{height:"100%",direction:"column",overflow:"hidden",children:[t.jsx(Te,{position:"top-right"}),t.jsxs(v,{title:t.jsx(d,{role:"region","aria-label":r.formatMessage({id:"ariaLabel.header"}),textAlign:"center",py:1,children:t.jsx(x,{size:"md",children:"Sample Application"})}),children:[t.jsx(y,{flex:"1",direction:"column",position:"relative",children:t.jsxs(pe,{role:"main","aria-label":r.formatMessage({id:"ariaLabel.map"}),viewPadding:n?{bottom:400}:void 0,children:[t.jsx(Ye,{centerContent:!0,children:t.jsx(_t,{})}),t.jsx(Dt,{mainContent:i}),t.jsx(de,{position:"bottom-right",horizontalGap:10,verticalGap:45,children:t.jsx(Mt,{})}),t.jsx(zt,{})]})}),t.jsx(wt,{})]})]})})}function Dt(r){const{mainContent:e}=r,o=p.useMemo(()=>{const i=n=>{switch(n){case"toc":return t.jsx(It,{},n);case"legend":return t.jsx(St,{},n);case"printing":return t.jsx(At,{},n);case"selection":return t.jsx(Pt,{},n);case"measurement":return t.jsx(Lt,{},n);case"editing-create":return t.jsx(F,{kind:"create"},n);case"editing-update":return t.jsx(F,{kind:"update"},n)}};return e.map(n=>i(n))},[e]);return t.jsx(Rt,{children:o})}function Rt(r){const e=r.children,o=[];for(const i of e)i&&(o.length&&o.push(t.jsx($e,{mt:4,mb:4},o.length)),o.push(i));if(o.length!==0)return t.jsx(d,{position:"absolute",top:"100px",left:4,maxHeight:"calc(100% - 140px)",width:350,maxWidth:350,zIndex:1,backgroundColor:"white",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",overflow:"auto",children:o})}const Et=new URLSearchParams(window.location.search),Ft=Et.get("lang")||void 0,qt=Y({component:Tt,appMetadata:gt,config:{locale:Ft,properties:{"@open-pioneer/local-storage":{storageId:"ol-app-state"}}}});customElements.define("ol-map-app",qt); +import{j as t,c as q,a as U,r as p,B as I,i as K,b as $,d as A,F as Z,e as Y}from"./Bh0CuZ3gy5tC.js";import{B as d,V as J,S as j,T as X,O as Q,a as C,b as N,c as ee,C as te,F as oe,r as T,d as D,e as re,w as ie,H as ne,M as ae,u as se,f as le,g as v,h as x,i as L,j as M,k as y,D as ce,l as pe,m as de}from"./p-jlpmJ86TPh.js";import{W as V,P as ue,a as me,b as ge,c as he,d as fe,e as be,f as ve,g as xe,h as we}from"./DV2kZNA-6G5s.js";import{W as R,E as Se,V as ye,S as ke,O as Me,C as je,a as Ce,b as Le,L as ze,M as _e,c as Pe,d as Ie,P as Ae,N as Te}from"./BH5Lv4UduK--.js";import{G as O,u as De,T as h,P as Re,a as Ee,b as Fe,c as qe,d as Ne,e as Ve}from"./0Ump2O8Jg_uq.js";import{T as z}from"./Tz2xttM4F6S2.js";import{N as Oe,P as He}from"./Ds9MLKVSYIgg.js";import{V as Ge,S as Be,I as We,Z as Ue,a as Ke}from"./CIcCgABVk_3-.js";import{_ as E}from"./CmsKOCeNyeyo.js";import{u as b,D as $e}from"./BEc19nv24p4W.js";import{H}from"./L25RkWOQSN8A.js";import{G}from"./CL_VRsbiqLzM.js";import{R as Ze}from"./D4hWyDE3P_yA.js";import{C as Ye}from"./BCXJt8t_qqq7.js";import"./D8rToQP6FvST.js";import"./BWsYSh9PkSaL.js";import"./Cq1ZpfgEg4XJ.js";import"./D03oE8cEQPSj.js";import"./BO_q12Vdyug-.js";import"./CreVQ-qFRzOc.js";import"./CjjyePfBQlZ7.js";import"./DUys4rac0YQP.js";import"./2d5-QpxJNHTD.js";import"./BeFcF3Ti4kY-.js";const Je={height:"25px",width:"25px",borderColor:"#4cb3ff",borderWidth:"3px",borderRadius:"50%",display:"inline-block "};function Xe(r){return t.jsxs(d,{children:[t.jsx(z,{children:r.layer.title}),t.jsx(d,{style:Je})]})}const _="main";class Qe{mapId=_;vectorSourceFactory;constructor(e){this.vectorSourceFactory=e.references.vectorSourceFactory}async getMapConfig(){return{advanced:{view:new J({center:[404747,5757920],zoom:13,constrainResolution:!0,projection:"EPSG:25832"})},layers:[...et(),rt(),tt(this.vectorSourceFactory),ot(),it()]}}}function et(){return[new R({isBaseLayer:!0,title:"Topplus grau",url:"https://www.wmts.nrw.de/topplus_open/1.0.0/WMTSCapabilities.xml",name:"topplus_grau",matrixSet:"EPSG_25832_14",visible:!1,sourceOptions:{attributions:`Kartendarstellung und Präsentationsgraphiken: © Bundesamt für Kartographie und Geodäsie ${new Date().getFullYear()}, Datenquellen`}}),new R({isBaseLayer:!0,title:"Topplus farbig",url:"https://www.wmts.nrw.de/topplus_open/1.0.0/WMTSCapabilities.xml",name:"topplus_col",matrixSet:"EPSG_25832_14",visible:!0,sourceOptions:{attributions:`Kartendarstellung und Präsentationsgraphiken: © Bundesamt für Kartographie und Geodäsie ${new Date().getFullYear()}, Datenquellen`}}),new j({title:"OpenStreetMaps",visible:!1,isBaseLayer:!0,olLayer:new X({source:new Q})})]}function tt(r){const e="https://ogc-api-test.nrw.de/inspire-us-krankenhaus/v1",o="governmentalservice",i=r.createVectorSource({strategy:"next",baseUrl:e,collectionId:o,limit:1e3,crs:"http://www.opengis.net/def/crs/EPSG/0/25832",attributions:`Land NRW (${new Date().getFullYear()}), Datenlizenz Deutschland - Namensnennung - Version 2.0, Datenquelle`}),n=new C({source:i});return new j({id:"krankenhaus",title:"Krankenhäuser",visible:!1,olLayer:n,attributes:{collectionURL:e+"/collections/"+o}})}function ot(){return new V({title:"Schulstandorte",description:"Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.",visible:!0,url:"https://www.wms.nrw.de/wms/wms_nw_inspire-schulen",sublayers:[{name:"US.education",title:"INSPIRE - WMS Schulstandorte NRW",attributes:{legend:{}}}],sourceOptions:{ratio:1}})}function rt(){return new V({title:"Straßennetz Landesbetrieb Straßenbau NRW",url:"https://www.wms.nrw.de/wms/strassen_nrw_wms",visible:!0,sublayers:[{name:"1",title:"Verwaltungen",attributes:{legend:{imageUrl:"https://www.wms.nrw.de/legends/wms/strassen_nrw_wms/1.png"}}},{name:"4",title:"Abschnitte und Äste"},{name:"6",title:"Unfälle"}]})}function it(){const r={Component:Xe},e=new N({url:"https://ogc-api.nrw.de/inspire-us-kindergarten/v1/collections/governmentalservice/items?f=json&limit=10000",format:new O,attributions:'© Bundesamt für Kartographie und Geodäsie 2017, Datenquellen'}),o=new C({source:e,style:new ee({image:new te({fill:new oe({color:"blue"}),radius:4})})});return new j({id:"ogc_kitas",title:"Kindertagesstätten",visible:!0,olLayer:o,attributes:{legend:r,resultListMetadata:[{id:"id",displayName:"ID",width:100,getPropertyValue(i){return i.id}},{propertyName:"pointOfContact.address.postCode",displayName:"PLZ",width:120},{propertyName:"name",displayName:"Name"},{propertyName:"inspireId",displayName:"inspireID"},{displayName:"Gefördert",width:160,getPropertyValue(i){switch(i.properties?.gefoerdert){case"ja":return!0;case"nein":return!1;default:return i.properties?.gefoerdert}}}]}})}class nt{label;filteredTypes;httpService;constructor(e,o,i){this.label=e,this.filteredTypes=o,this.httpService=i}async search(e,{mapProjection:o,signal:i}){const n=await this.request(e,100,i),a=new O({dataProjection:"EPSG:4326",featureProjection:o});return n.features.filter(s=>this.filteredTypes.includes(s.properties.type)).map((s,l)=>{const c=a.readGeometry(s.geometry);return{id:s.properties.osm_id||l,label:this.createLabel(s),geometry:c,properties:s.properties}})}async request(e,o,i){const n=new URL("https://photon.komoot.io/api?");n.searchParams.set("q",e),n.searchParams.set("lang","de"),n.searchParams.set("lat","51.961563"),n.searchParams.set("lon","7.628202"),n.searchParams.set("limit",o.toString());const a=await this.httpService.fetch(n,{signal:i});if(!a.ok)throw new Error("Request failed: "+a.status);return await a.json()}createLabel(e){return`${e.properties.name} (${e.properties.osm_value?e.properties.osm_value+", ":""}${e.properties.postcode?e.properties.postcode+", ":""}${e.properties.city?e.properties.city+", ":""}${e.properties.country?e.properties.country+")":")"}`}}const at=q("ol-app:AppModel");function k(r){return r==="selection"||r==="measurement"||r.startsWith("editing-")}class st{_mapRegistry;_vectorSelectionSourceFactory;_httpService;_resources=[];_featureHighlight=void 0;_mainContent=T(["toc"]);_searchSources=D();_selectionSources=D();_sourceMetadata=re();_resultListState=T({key:0,open:!1,input:void 0});constructor({references:e}){this._mapRegistry=e.mapRegistry,this._vectorSelectionSourceFactory=e.vectorSelectionSourceFactory,this._httpService=e.httpService,this.initSearchSources(),this.initSelectionSources().catch(o=>{at.error("Failed to initialize selection sources",o)})}destroy(){this.clearHighlight(),this._resources.forEach(e=>e.destroy())}get mainContent(){return this._mainContent.value}get searchSources(){return this._searchSources}get selectionSources(){return this._selectionSources}get sourceMetadata(){return this._sourceMetadata}get resultListState(){return this._resultListState.value}toggleMainContent(e){const o=this._mainContent.value;if(o.includes(e)){this._mainContent.value=o.filter(n=>n!==e);return}let i;k(e)?(i=[e],this.clearHighlight()):(i=o.filter(n=>!k(n)),i.push(e)),this._mainContent.value=i}hideContent(e){this._mainContent.value=this._mainContent.value.filter(o=>o!==e)}clearInteractions(){this._mainContent.value=this._mainContent.value.filter(e=>!k(e))}setResultListInput(e){const o=this._resultListState.value;this._resultListState.value={open:!0,key:o.key+1,input:e}}setResultListVisibility(e){this._resultListState.value={...this._resultListState.value,open:e}}highlightAndZoom(e,o){const i=e.olMap.getViewport();this.clearHighlight(),this._featureHighlight=e.highlightAndZoom(o,{viewPadding:i&&i.offsetWidth<1e3?{top:150,right:75,bottom:50,left:75}:{top:150,right:400,bottom:50,left:400}})}zoom(e,o){const i=e.olMap.getViewport();e.zoom(o,{viewPadding:i&&i.offsetWidth<1e3?{top:150,right:75,bottom:50,left:75}:{top:150,right:400,bottom:50,left:400}})}clearHighlight(){this._featureHighlight&&(this._featureHighlight.destroy(),this._featureHighlight=void 0)}initSearchSources(){const e=new nt("Photon Geocoder",["city","street"],this._httpService);this._searchSources.push(e)}async initSelectionSources(){const e=["ogc_kitas","ogc_kataster"],i=(await this._mapRegistry.expectMapModel(_)).layers.getOperationalLayers({sortByDisplayOrder:!0});for(const n of i){if(!e.includes(n.id)||!lt(n.olLayer))continue;const a=this._vectorSelectionSourceFactory.createSelectionSource({vectorLayer:n.olLayer,label:n.title}),s=ie(()=>[a.status],([l])=>{l!=="available"&&(l==="unavailable"||l?.kind==="unavailable")&&this.clearHighlight()});this._resources.push(s,a),this._selectionSources.unshift(a),this._sourceMetadata.set(a,n.attributes.resultListMetadata)}}}function lt(r){return r instanceof C&&r.getSource()instanceof N}const ct={"ol-map":{name:"ol-map",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:Qe,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{vectorSourceFactory:{name:"ogc-features.VectorSourceFactory",qualifier:void 0,all:!1}}},AppModel:{name:"AppModel",clazz:st,provides:[{name:"ol-app.AppModel",qualifier:void 0}],references:{vectorSelectionSourceFactory:{name:"selection.VectorSelectionSourceFactory",qualifier:void 0,all:!1},httpService:{name:"http.HttpService",qualifier:void 0,all:!1},mapRegistry:{name:"map.MapRegistry",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1},{name:"ol-app.AppModel",qualifier:void 0,all:!1},{name:"notifier.NotificationService",qualifier:void 0,all:!1},{name:"editing.EditingService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:ne,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/notifier":{name:"@open-pioneer/notifier",services:{NotificationServiceImpl:{name:"NotificationServiceImpl",clazz:Oe,provides:[{name:"notifier.NotificationService",qualifier:"notifier.NotificationService"}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/reactivity":{name:"@open-pioneer/reactivity",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:ae,provides:[{name:"map.MapRegistry",qualifier:void 0}],references:{providers:{name:"map.MapConfigProvider",qualifier:void 0,all:!0},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/theme":{name:"@open-pioneer/theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/ogc-features":{name:"@open-pioneer/ogc-features",services:{VectorSourceFactory:{name:"VectorSourceFactory",clazz:Ge,provides:[{name:"ogc-features.VectorSourceFactory",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}},SearchSourceFactory:{name:"SearchSourceFactory",clazz:Be,provides:[{name:"ogc-features.SearchSourceFactory",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[]},properties:{}},"@open-pioneer/coordinate-viewer":{name:"@open-pioneer/coordinate-viewer",services:{},ui:{references:[]},properties:{}},"@open-pioneer/scale-bar":{name:"@open-pioneer/scale-bar",services:{},ui:{references:[]},properties:{}},"@open-pioneer/scale-viewer":{name:"@open-pioneer/scale-viewer",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map-ui-components":{name:"@open-pioneer/map-ui-components",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map-navigation":{name:"@open-pioneer/map-navigation",services:{},ui:{references:[]},properties:{}},"@open-pioneer/toc":{name:"@open-pioneer/toc",services:{},ui:{references:[]},properties:{}},"@open-pioneer/result-list":{name:"@open-pioneer/result-list",services:{},ui:{references:[]},properties:{}},"@open-pioneer/editing":{name:"@open-pioneer/editing",services:{EditingServiceImpl:{name:"EditingServiceImpl",clazz:Se,provides:[{name:"editing.EditingService",qualifier:void 0}],references:{mapRegistry:{name:"map.MapRegistry",qualifier:void 0,all:!1},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[]},properties:{polygonStyle:{value:{"fill-color":"rgba(255,255,255,0.4)","stroke-color":"red","stroke-width":1.25,"circle-radius":3,"circle-fill-color":"red","circle-stroke-width":1.25,"circle-stroke-color":"red"},required:!1},vertexStyle:{value:{"circle-radius":3,"circle-fill-color":"red","circle-stroke-width":1.25,"circle-stroke-color":"red"},required:!1}}},"@open-pioneer/legend":{name:"@open-pioneer/legend",services:{},ui:{references:[]},properties:{}},"@open-pioneer/measurement":{name:"@open-pioneer/measurement",services:{},ui:{references:[]},properties:{}},"@open-pioneer/printing":{name:"@open-pioneer/printing",services:{PrintingServiceImpl:{name:"PrintingServiceImpl",clazz:He,provides:[{name:"printing.PrintingService",qualifier:void 0}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1},{name:"printing.PrintingService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/search":{name:"@open-pioneer/search",services:{},ui:{references:[]},properties:{}},"@open-pioneer/selection":{name:"@open-pioneer/selection",services:{VectorSelectionSourceFactory:{name:"VectorSelectionSourceFactory",clazz:ye,provides:[{name:"selection.VectorSelectionSourceFactory",qualifier:void 0}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}},"@open-pioneer/basemap-switcher":{name:"@open-pioneer/basemap-switcher",services:{},ui:{references:[]},properties:{}}},pt='.search-box{position:absolute;width:500px;max-width:100%;z-index:1}:root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.map-container .ol-viewport .ol-attribution{bottom:var(--map-padding-bottom);right:var(--map-padding-right)}.editing-tooltip{position:relative;background:#fffc;border-radius:4px;color:#000;padding:4px 8px;opacity:1;white-space:nowrap;font-size:12px;cursor:default;-webkit-user-select:none;user-select:none;font-weight:700}.editing-tooltip-hidden{visibility:hidden}.measurement-tooltip{position:relative;background:#fffc;border-radius:4px;color:#000;padding:4px 8px;opacity:1;white-space:nowrap;font-size:12px;cursor:default;-webkit-user-select:none;user-select:none;font-weight:700}.measurement-active-tooltip{background:#000000e6;border-radius:4px;border-color:#000000e6;opacity:.9;color:#fff}.measurement-finished-tooltip{background-color:#4cb3ffe6;color:#000;border:1px solid white}.measurement-active-tooltip:before,.measurement-finished-tooltip:before{border-top:6px solid rgba(0,0,0,.9);border-right:6px solid transparent;border-left:6px solid transparent;content:"";position:absolute;bottom:-6px;margin-left:-7px;left:50%}.measurement-finished-tooltip:before{border-top-color:#4cb3ff}.printing-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:10000;-webkit-user-select:none;user-select:none;pointer-events:all;cursor:wait;display:flex;flex-direction:row;align-items:center;justify-content:center;background-color:#b4b4b4cc}.printing-overlay-status{flex:1 1 auto;font-size:1.5em;text-align:center}.printing-scale-bar.ol-scale-bar{left:var(--printing-scale-bar-left);bottom:var(--printing-scale-bar-bottom)}.search-component .chakra-divider{display:none}.search-component .search-highlighted-match{font-weight:700}.search-component .search-value-container{cursor:text;padding-left:30px!important}.search-component .search-invisible{display:none}.selection-drag-box{background-color:#ffffff4d!important;border:3px solid var(--chakra-colors-background_primary)!important}.selection-tooltip{position:relative;background:#fffc;border-radius:4px;color:#000;padding:4px 8px;opacity:1;white-space:nowrap;font-size:12px;cursor:default;-webkit-user-select:none;user-select:none;font-weight:700}.selection .react-select{cursor:default}.map-container .selection-active{cursor:crosshair}.map-container .selection-inactive{cursor:no-drop}.selection-source-value.selection-source-value--disabled{opacity:.4}.selection-source-value.selection-source-value--disabled span{margin:0 6px 0 0}.scale-bar .ol-scale-bar{margin-bottom:8px;margin-right:8px}.scale-bar .ol-scale-bar,.scale-bar .ol-scale-line{position:relative;bottom:0;left:0;background:none}.scale-bar .ol-scale-bar .ol-scale-bar-inner,.scale-bar .ol-scale-bar .ol-scale-line-inner,.scale-bar .ol-scale-line .ol-scale-bar-inner,.scale-bar .ol-scale-line .ol-scale-line-inner{color:var(--chakra-white);border-color:var(--chakra-white)}.result-list-no-data-message{text-align:center;margin-top:50px;font-weight:700;font-size:larger}.result-list-table th,.result-list-table td{overflow-wrap:break-word}.result-list-table.result-list-table--is-resizing *{cursor:col-resize}.result-list-table thead{position:sticky;top:0;z-index:1;background:var(--chakra-colors-background_body)}.result-list-table th{position:relative;border-right-width:thin}.result-list-table tbody tr:hover{background:var(--chakra-colors-background_light)}.result-list-table .result-list-resizer{position:absolute;top:0;height:100%;right:0;width:8px;background:var(--chakra-colors-trails-100);transform:scaleX(.25);cursor:col-resize;-webkit-user-select:none;user-select:none;touch-action:none;padding-left:0}.result-list-table th:last-child .result-list-resizer{width:8px;transform:translate(50%) scaleX(.25)}.result-list-table th .result-list-resizer.result-list-resizer--is-resizing{background:var(--chakra-colors-trails-500);transform:scale(1)}.result-list-table th .result-list-resizer:hover{transform:scale(1)}',dt=["en","de"];function ut(r){switch(r){case"en":return E(()=>import("./BYGrfKr5WBJ9.js"),[],import.meta.url).then(e=>e.default);case"de":return E(()=>import("./C-s9YzO5rJEK.js"),[],import.meta.url).then(e=>e.default)}throw new Error(`Unsupported locale: '${r}'`)}const mt=U(pt),gt=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:ut,locales:dt,packages:ct,styles:mt},Symbol.toStringTag,{value:"Module"})),B="ol-map",g=le.bind(void 0,B),u=se.bind(void 0,B),ht=q("ol-app:Editing");function F(r){const e=ft(r.kind),o=p.useId(),i=u();return t.jsx(d,{role:"dialog","aria-labelledby":o,children:t.jsx(v,{title:t.jsx(x,{id:o,size:"md",mb:2,children:i.formatMessage({id:"editing.title"})}),children:t.jsxs(d,{overflowY:"auto",maxHeight:300,children:[t.jsx(z,{textAlign:"center",children:i.formatMessage({id:"editing.active"})}),t.jsxs(H,{mt:4,align:"center",justify:"center",children:[t.jsx(I,{onClick:()=>{e?.reset()},children:i.formatMessage({id:"editing.resetGeometry"})}),t.jsx(I,{onClick:()=>{e?.destroy()},children:i.formatMessage({id:"editing.abort"})})]})]})})})}function ft(r){const e=g("notifier.NotificationService"),o=g("editing.EditingService"),i=u(),n=g("ol-app.AppModel"),{map:a}=L(),[s,l]=p.useState();return p.useEffect(()=>{if(!a)return;const c=new bt(e,o,a,i,n,r);return l(c),()=>{c.destroy(),l(void 0)}},[n,o,i,a,e,r]),s}class bt{notificationService;editingService;map;intl;appModel;kind;job;constructor(e,o,i,n,a,s){this.notificationService=e,this.editingService=o,this.map=i,this.intl=n,this.appModel=a,this.kind=s;let l;switch(s){case"create":l=this.createJob();break;case"update":l=this.updateJob();break}this.job=l,this.job.run().catch(c=>{K(c)||(ht.error("Edit operation failed",c),this.notificationService.notify({level:"error",message:this.intl.formatMessage({id:"editing.error"})}))}).finally(()=>{this.destroy()})}destroy(){this.job?.destroy(),this.job=void 0,this.appModel.hideContent(`editing-${this.kind}`)}reset(){this.job?.reset()}createJob(){let e;return{destroy(){e?.stop(),e=void 0},reset(){e?.reset()},run:async()=>{const o=this.findLayer(),i=new URL(o.attributes.collectionURL+"/items");e=this.editingService.createFeature(this.map,i);const n=await e.whenComplete();if(e=void 0,!n)return;this.notificationService.notify({level:"info",message:this.intl.formatMessage({id:"editing.create.featureCreated"},{featureId:n.featureId})}),(o?.olLayer).getSource()?.refresh()}}}updateJob(){const e=this.map,o=new AbortController,i=o.signal;let n,a,s;function l(){a&&e.olMap.removeInteraction(a),a&&a.dispose(),n&&n.destroy(),o.abort(),a=void 0,n=void 0}return{destroy(){l(),s?.stop(),s=void 0},reset(){s?.reset()},run:async()=>{const c=this.findLayer(),m=c.olLayer,w=new URL(c.attributes.collectionURL+"/items");a=new ke({layers:[m]}),e.olMap.addInteraction(a),n=vt(this.intl,e.olMap),n.element.classList.remove("editing-tooltip-hidden");let f;for(;;){const{selected:P,deselected:W}=await xt(a,i);if(P.length===1&&W.length===0){l(),f=P[0];break}}if(!f)throw Error("Feature is undefined");s=this.editingService.updateFeature(e,w,f);const S=await s.whenComplete();S&&(this.notificationService.notify({level:"info",message:this.intl.formatMessage({id:"editing.update.featureModified"},{featureId:S.featureId})}),m.getSource()?.refresh())}}}findLayer(){const e=this.map.layers.getLayerById("krankenhaus");if(!e)throw new Error("Layer not found");return e}}function vt(r,e){const o=document.createElement("div");o.className="editing-tooltip editing-tooltip-hidden",o.textContent=r.formatMessage({id:"editing.update.tooltip.select"});const i=new Me({element:o,offset:[15,0],positioning:"center-left"}),n=e.on("pointermove",a=>{a.dragging||i.setPosition(a.coordinate)});return e.addOverlay(i),{overlay:i,element:o,destroy(){M(n),e.removeOverlay(i)}}}function xt(r,e){let o;const{promise:i,resolve:n,reject:a}=$();if(e.aborted)return a(A()),i;const s=()=>{o&&M(o),o=void 0,a(A())};return e.addEventListener("abort",s),o=r.on("select",l=>{e.removeEventListener("abort",s),o&&M(o),o=void 0,n(l)}),i}function wt(){const r=u();return t.jsxs(y,{role:"region","aria-label":r.formatMessage({id:"ariaLabel.footer"}),gap:3,alignItems:"center",justifyContent:"center",children:[t.jsx(je,{precision:2,displayProjectionCode:"EPSG:4326"}),t.jsx(Ce,{}),t.jsx(Le,{})]})}function St(){const r=p.useId(),e=u();return t.jsx(d,{role:"dialog","aria-labelledby":r,children:t.jsx(v,{title:t.jsx(x,{id:r,size:"md",mb:2,children:e.formatMessage({id:"legendTitle"})}),children:t.jsx(d,{overflowY:"auto",maxHeight:300,children:t.jsx(ze,{showBaseLayers:!0})})})})}function yt(r){return G({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M19 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M15 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M6.5 9.5l1.546 -1.311"},child:[]},{tag:"path",attr:{d:"M14 5.5l3 1.5"},child:[]},{tag:"path",attr:{d:"M18.5 10l-1.185 3.318m-1.062 2.972l-.253 .71"},child:[]},{tag:"path",attr:{d:"M13.5 17.5l-7 -5"},child:[]},{tag:"path",attr:{d:"M3 3l18 18"},child:[]}]})(r)}function kt(r){return G({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M19 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M15 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M6.5 9.5l3.5 -3"},child:[]},{tag:"path",attr:{d:"M14 5.5l3 1.5"},child:[]},{tag:"path",attr:{d:"M18.5 10l-2.5 7"},child:[]},{tag:"path",attr:{d:"M13.5 17.5l-7 -5"},child:[]}]})(r)}function Mt(){const r=u(),e=g("ol-app.AppModel"),o=b(()=>e.resultListState,[e]),i=o.open,{isTocActive:n,isLegendActive:a,isPrintingActive:s}=b(()=>({isTocActive:e.mainContent.includes("toc"),isLegendActive:e.mainContent.includes("legend"),isPrintingActive:e.mainContent.includes("printing")}),[e]);return t.jsxs(y,{role:"toolbar","aria-label":r.formatMessage({id:"ariaLabel.toolbar"}),direction:"column",gap:1,padding:1,children:[t.jsx(jt,{}),o.input&&t.jsx(h,{label:r.formatMessage({id:"resultListTitle"}),icon:t.jsx(me,{}),isActive:o.open,onClick:()=>e.setResultListVisibility(!i)}),t.jsx(h,{label:r.formatMessage({id:"tocTitle"}),icon:t.jsx(ge,{}),isActive:n,onClick:()=>e.toggleMainContent("toc")}),t.jsx(h,{label:r.formatMessage({id:"legendTitle"}),icon:t.jsx(he,{}),isActive:a,onClick:()=>e.toggleMainContent("legend")}),t.jsx(h,{label:r.formatMessage({id:"printingTitle"}),icon:t.jsx(fe,{}),isActive:s,onClick:()=>e.toggleMainContent("printing")}),t.jsx(We,{}),t.jsx(Ue,{}),t.jsx(Ke,{})]})}function jt(){const r=u(),e=g("ol-app.AppModel"),[o,i]=p.useState(!1),{isSelectionActive:n,isMeasurementActive:a,isEditingCreateActive:s,isEditingUpdateActive:l}=b(()=>({isSelectionActive:e.mainContent.includes("selection"),isMeasurementActive:e.mainContent.includes("measurement"),isEditingCreateActive:e.mainContent.includes("editing-create"),isEditingUpdateActive:e.mainContent.includes("editing-update")}),[e]),c=f=>()=>{f(),i(!1)},m={placement:"top"},w=t.jsxs(t.Fragment,{children:[t.jsx(h,{label:s?r.formatMessage({id:"editing.stopTitle"}):r.formatMessage({id:"editing.create.startTitle"}),icon:s?t.jsx(yt,{}):t.jsx(kt,{}),isActive:s,onClick:c(()=>e.toggleMainContent("editing-create")),tooltipProps:m}),t.jsx(h,{label:l?r.formatMessage({id:"editing.stopTitle"}):r.formatMessage({id:"editing.update.startTitle"}),icon:l?t.jsx(be,{}):t.jsx(ve,{}),isActive:l,onClick:c(()=>e.toggleMainContent("editing-update")),tooltipProps:m}),t.jsx(h,{label:r.formatMessage({id:"measurementTitle"}),icon:t.jsx(xe,{}),isActive:a,onClick:c(()=>e.toggleMainContent("measurement")),tooltipProps:m}),t.jsx(h,{label:r.formatMessage({id:"selectionTitle"}),icon:t.jsx(we,{}),isActive:n,onClick:c(()=>e.toggleMainContent("selection")),tooltipProps:m})]});return t.jsxs(Re,{placement:"left",isLazy:!0,onOpen:()=>i(!0),onClose:()=>i(!1),isOpen:o,children:[t.jsx(Ee,{children:t.jsx(Ct,{})}),t.jsx(Z,{children:t.jsxs(Fe,{width:"auto",children:[t.jsx(qe,{}),t.jsx(Ne,{children:t.jsx(H,{spacing:2,children:w})})]})})]})}const Ct=p.forwardRef(function(e,o){const i=u(),n=De(),{onClick:a,...s}=n.getTriggerProps();return t.jsx(h,{ref:o,label:i.formatMessage({id:"mapInteractions.title"}),icon:t.jsx(ue,{}),onClick:a,buttonProps:s})});function Lt(){const r=p.useId(),e=u();return t.jsx(d,{role:"dialog","aria-labelledby":r,children:t.jsx(v,{title:t.jsx(x,{id:r,size:"md",mb:2,children:e.formatMessage({id:"measurementTitle"})}),children:t.jsx(_e,{})})})}function zt(){const r=g("ol-app.AppModel"),e=b(()=>r.resultListState,[r]),[o,i]=p.useState([]),[n,a]=p.useState([]),s=p.useCallback(l=>{i(l.features),a(l.getFeatureIds())},[]);return p.useEffect(()=>{console.log("Anzahl Features: "+o.length),console.log("SelectedIds: "+n.toString())},[o,n]),e.input&&t.jsx(d,{className:"result-list-container",position:"absolute",visibility:e.open?"visible":"hidden",bottom:"0",backgroundColor:"white",width:"100%",height:"400px",zIndex:1,borderTop:"2px solid",borderBottom:"2px solid",borderColor:"trails.100",children:t.jsx(Ze,{input:e.input,onSelectionChange:s},e.key)})}function _t(){const{map:r}=L(),e=g("ol-app.AppModel"),o=b(()=>e.searchSources.getItems(),[e]);function i(a){if(console.debug("The user selected the following item: ",a.result),!r)return;const s=a.result.geometry;s&&e.highlightAndZoom(r,[s])}function n(){console.debug("The user cleared the search"),e.clearHighlight()}return t.jsx(d,{backgroundColor:"white",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",mt:5,className:"search-box",children:t.jsx(Pe,{sources:o,maxResultsPerGroup:10,onSelect:i,onClear:n})})}function Pt(){const r=u(),e=g("notifier.NotificationService"),o=p.useId(),{map:i}=L(),n=g("ol-app.AppModel"),a=b(()=>n.selectionSources.getItems(),[n]),s={numberOptions:{maximumFractionDigits:3},dateOptions:{dateStyle:"medium",timeStyle:"medium",timeZone:"UTC"}};function l(m){const{source:w,results:f}=m;if(!i){console.debug("Map not ready");return}const S=n.sourceMetadata.get(w);if(!S){console.warn("Can not show results because no metadata could be found");return}n.setResultListInput({columns:S,data:f,formatOptions:s}),e.notify({level:"info",message:r.formatMessage({id:"foundResults"},{resultsCount:f.length}),displayDuration:4e3})}function c(m){n.clearHighlight()}return t.jsx(d,{role:"dialog","aria-labelledby":o,children:t.jsx(v,{title:t.jsx(x,{id:o,size:"md",mb:2,children:r.formatMessage({id:"selectionTitle"})}),children:t.jsx(Ie,{sources:a,onSelectionComplete:l,onSelectionSourceChanged:c})})})}function It(){const r=p.useId(),e=u();return t.jsx(d,{role:"dialog","aria-labelledby":r,children:t.jsx(v,{title:t.jsx(x,{id:r,size:"md",mb:2,children:t.jsx(z,{children:e.formatMessage({id:"tocTitle"})})}),children:t.jsx(d,{overflowY:"auto",maxHeight:300,children:t.jsx(Ve,{showTools:!0,basemapSwitcherProps:{allowSelectingEmptyBasemap:!0}})})})})}function At(){const r=p.useId(),e=u();return t.jsx(d,{role:"dialog","aria-labelledby":r,children:t.jsx(v,{title:t.jsx(x,{id:r,size:"md",mb:2,children:e.formatMessage({id:"printingTitle"})}),children:t.jsx(Ae,{})})})}function Tt(){const r=u(),e=g("ol-app.AppModel"),{resultListState:o,mainContent:i}=b(()=>({resultListState:e.resultListState,mainContent:e.mainContent}),[e]),n=o.input&&o.open;return t.jsx(ce,{mapId:_,children:t.jsxs(y,{height:"100%",direction:"column",overflow:"hidden",children:[t.jsx(Te,{position:"top-right"}),t.jsxs(v,{title:t.jsx(d,{role:"region","aria-label":r.formatMessage({id:"ariaLabel.header"}),textAlign:"center",py:1,children:t.jsx(x,{size:"md",children:"Sample Application"})}),children:[t.jsx(y,{flex:"1",direction:"column",position:"relative",children:t.jsxs(pe,{role:"main","aria-label":r.formatMessage({id:"ariaLabel.map"}),viewPadding:n?{bottom:400}:void 0,children:[t.jsx(Ye,{centerContent:!0,children:t.jsx(_t,{})}),t.jsx(Dt,{mainContent:i}),t.jsx(de,{position:"bottom-right",horizontalGap:10,verticalGap:45,children:t.jsx(Mt,{})}),t.jsx(zt,{})]})}),t.jsx(wt,{})]})]})})}function Dt(r){const{mainContent:e}=r,o=p.useMemo(()=>{const i=n=>{switch(n){case"toc":return t.jsx(It,{},n);case"legend":return t.jsx(St,{},n);case"printing":return t.jsx(At,{},n);case"selection":return t.jsx(Pt,{},n);case"measurement":return t.jsx(Lt,{},n);case"editing-create":return t.jsx(F,{kind:"create"},n);case"editing-update":return t.jsx(F,{kind:"update"},n)}};return e.map(n=>i(n))},[e]);return t.jsx(Rt,{children:o})}function Rt(r){const e=r.children,o=[];for(const i of e)i&&(o.length&&o.push(t.jsx($e,{mt:4,mb:4},o.length)),o.push(i));if(o.length!==0)return t.jsx(d,{position:"absolute",top:"100px",left:4,maxHeight:"calc(100% - 140px)",width:350,maxWidth:350,zIndex:1,backgroundColor:"white",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",overflow:"auto",children:o})}const Et=new URLSearchParams(window.location.search),Ft=Et.get("lang")||void 0,qt=Y({component:Tt,appMetadata:gt,config:{locale:Ft,properties:{"@open-pioneer/local-storage":{storageId:"ol-app-state"}}}});customElements.define("ol-map-app",qt); diff --git a/openlayers-base-packages/pr-previews/pr-371/assets/0Ump2O8Jg_uq.js b/openlayers-base-packages/pr-previews/pr-371/assets/0Ump2O8Jg_uq.js new file mode 100644 index 0000000..b45ebde --- /dev/null +++ b/openlayers-base-packages/pr-previews/pr-371/assets/0Ump2O8Jg_uq.js @@ -0,0 +1 @@ +import{b3 as je,ak as x,bY as h,aD as st,bZ as at,ap as we,as as it,ar as lt,b_ as ct,b$ as ut,c0 as dt,c1 as pt,ag as mt,c2 as L,c3 as xe,c4 as ft,b2 as Ce,b9 as Oe,u as yt,B as U,k as te,i as gt,g as he,h as Pe}from"./p-jlpmJ86TPh.js";import{G as ht,a as Pt,b as bt,M as vt}from"./D8rToQP6FvST.js";import{L as jt}from"./BWsYSh9PkSaL.js";import{y as wt,z as Fe,h as _,j as s,f as M,q as R,r as d,D as xt,G as Ct,H as Q,J as A,K as v,o as Ot,p as Ft,L as St,M as Mt,C as Lt,N as Nt,O as Gt,l as Se,B as ne,F as Me}from"./Bh0CuZ3gy5tC.js";import{u as $,B as kt}from"./BEc19nv24p4W.js";import{F as Tt,f as Le}from"./CL_VRsbiqLzM.js";import{S as Ne}from"./CjjyePfBQlZ7.js";import{T as re,L as At}from"./Tz2xttM4F6S2.js";import{u as _t,a as Rt,b as Bt,l as Et,M as It}from"./DUys4rac0YQP.js";import{C as Dt}from"./2d5-QpxJNHTD.js";import{a as Ht,b as Jt,M as Vt}from"./BeFcF3Ti4kY-.js";function zt(t){return"current"in t}var Ge=()=>typeof window<"u";function Ut(){var t;const e=navigator.userAgentData;return(t=e?.platform)!=null?t:navigator.platform}var $t=t=>Ge()&&t.test(navigator.vendor),Wt=t=>Ge()&&t.test(Ut()),Kt=()=>Wt(/mac|iphone|ipad|ipod/i),qt=()=>Kt()&&$t(/apple/i);function Yt(t){const{ref:e,elements:r,enabled:o}=t,n=()=>{var a,i;return(i=(a=e.current)==null?void 0:a.ownerDocument)!=null?i:document};wt(n,"pointerdown",a=>{if(!qt()||!o)return;const i=a.target,u=(r??[e]).some(l=>{const m=zt(l)?l.current:l;return m?.contains(i)||m===i});n().activeElement!==i&&u&&(a.preventDefault(),i.focus())})}var[Zt,O]=Fe({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[Qt,B]=Fe({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),ke=_(function(e,r){const{getHeaderProps:o}=O(),n=B();return s.jsx(M.header,{...o(e,r),className:R("chakra-popover__header",e.className),__css:n.header})});ke.displayName="PopoverHeader";function Te(t){const e=d.Children.only(t.children),{getTriggerProps:r}=O();return d.cloneElement(e,r(e.props,e.ref))}Te.displayName="PopoverTrigger";var S={click:"click",hover:"hover"};function Xt(t={}){const{closeOnBlur:e=!0,closeOnEsc:r=!0,initialFocusRef:o,id:n,returnFocusOnClose:a=!0,autoFocus:i=!0,arrowSize:p,arrowShadowColor:u,trigger:l=S.click,openDelay:m=200,closeDelay:g=200,isLazy:j,lazyBehavior:N="unmount",computePositionOnMount:G,...K}=t,{isOpen:f,onClose:P,onOpen:k,onToggle:le}=xt(t),q=d.useRef(null),E=d.useRef(null),F=d.useRef(null),T=d.useRef(!1),ce=d.useRef(!1);f&&(ce.current=!0);const[ue,Ue]=d.useState(!1),[de,$e]=d.useState(!1),We=d.useId(),Ke=n??We,[pe,I,D,H]=["popover-trigger","popover-content","popover-header","popover-body"].map(c=>`${c}-${Ke}`),{referenceRef:J,getArrowProps:qe,getPopperProps:me,getArrowInnerProps:Ye,forceUpdate:Ze}=Ct({...K,enabled:f||!!G}),fe=_t({isOpen:f,ref:F});Yt({enabled:f,ref:E}),Rt(F,{focusRef:E,visible:f,shouldFocus:a&&l===S.click}),Bt(F,{focusRef:o,visible:f,shouldFocus:i&&l===S.click});const ye=Et({wasSelected:ce.current,enabled:j,mode:N,isSelected:fe.present}),Qe=d.useCallback((c={},b=null)=>{const y={...c,style:{...c.style,transformOrigin:Q.transformOrigin.varRef,[Q.arrowSize.var]:p?`${p}px`:void 0,[Q.arrowShadowColor.var]:u},ref:A(F,b),children:ye?c.children:null,id:I,tabIndex:-1,role:"dialog",onKeyDown:v(c.onKeyDown,w=>{r&&w.key==="Escape"&&P()}),onBlur:v(c.onBlur,w=>{const V=be(w),Z=X(F.current,V),nt=X(E.current,V);f&&e&&(!Z&&!nt)&&P()}),"aria-labelledby":ue?D:void 0,"aria-describedby":de?H:void 0};return l===S.hover&&(y.role="tooltip",y.onMouseEnter=v(c.onMouseEnter,()=>{T.current=!0}),y.onMouseLeave=v(c.onMouseLeave,w=>{w.nativeEvent.relatedTarget!==null&&(T.current=!1,setTimeout(()=>P(),g))})),y},[ye,I,ue,D,de,H,l,r,P,f,e,g,u,p]),Xe=d.useCallback((c={},b=null)=>me({...c,style:{visibility:f?"visible":"hidden",...c.style}},b),[f,me]),et=d.useCallback((c,b=null)=>({...c,ref:A(b,q,J)}),[q,J]),C=d.useRef(),Y=d.useRef(),ge=d.useCallback(c=>{q.current==null&&J(c)},[J]),tt=d.useCallback((c={},b=null)=>{const y={...c,ref:A(E,b,ge),id:pe,"aria-haspopup":"dialog","aria-expanded":f,"aria-controls":I};return l===S.click&&(y.onClick=v(c.onClick,le)),l===S.hover&&(y.onFocus=v(c.onFocus,()=>{C.current===void 0&&k()}),y.onBlur=v(c.onBlur,w=>{const V=be(w),Z=!X(F.current,V);f&&e&&Z&&P()}),y.onKeyDown=v(c.onKeyDown,w=>{w.key==="Escape"&&P()}),y.onMouseEnter=v(c.onMouseEnter,()=>{T.current=!0,C.current=window.setTimeout(()=>k(),m)}),y.onMouseLeave=v(c.onMouseLeave,()=>{T.current=!1,C.current&&(clearTimeout(C.current),C.current=void 0),Y.current=window.setTimeout(()=>{T.current===!1&&P()},g)})),y},[pe,f,I,l,ge,le,k,e,P,m,g]);d.useEffect(()=>()=>{C.current&&clearTimeout(C.current),Y.current&&clearTimeout(Y.current)},[]);const rt=d.useCallback((c={},b=null)=>({...c,id:D,ref:A(b,y=>{Ue(!!y)})}),[D]),ot=d.useCallback((c={},b=null)=>({...c,id:H,ref:A(b,y=>{$e(!!y)})}),[H]);return{forceUpdate:Ze,isOpen:f,onAnimationComplete:fe.onComplete,onClose:P,getAnchorProps:et,getArrowProps:qe,getArrowInnerProps:Ye,getPopoverPositionerProps:Xe,getPopoverProps:Qe,getTriggerProps:tt,getHeaderProps:rt,getBodyProps:ot}}function X(t,e){return t===e||t?.contains(e)}function be(t){var e;const r=t.currentTarget.ownerDocument.activeElement;return(e=t.relatedTarget)!=null?e:r}function Ae(t){const e=Ot("Popover",t),{children:r,...o}=Ft(t),n=St(),a=Xt({...o,direction:n.direction});return s.jsx(Zt,{value:a,children:s.jsx(Qt,{value:e,children:Mt(r,{isOpen:a.isOpen,onClose:a.onClose,forceUpdate:a.forceUpdate})})})}Ae.displayName="Popover";var ee=(t,e)=>e?`${t}.${e}, ${e}`:void 0;function _e(t){var e;const{bg:r,bgColor:o,backgroundColor:n,shadow:a,boxShadow:i,shadowColor:p}=t,{getArrowProps:u,getArrowInnerProps:l}=O(),m=B(),g=(e=r??o)!=null?e:n,j=a??i;return s.jsx(M.div,{...u(),className:"chakra-popover__arrow-positioner",children:s.jsx(M.div,{className:R("chakra-popover__arrow",t.className),...l(t),__css:{"--popper-arrow-shadow-color":ee("colors",p),"--popper-arrow-bg":ee("colors",g),"--popper-arrow-shadow":ee("shadows",j),...m.arrow}})})}_e.displayName="PopoverArrow";var Re=_(function(e,r){const{getBodyProps:o}=O(),n=B();return s.jsx(M.div,{...o(e,r),className:R("chakra-popover__body",e.className),__css:n.body})});Re.displayName="PopoverBody";var Be=_(function(e,r){const{onClose:o}=O(),n=B();return s.jsx(Lt,{size:"sm",onClick:o,className:R("chakra-popover__close-btn",e.className),__css:n.closeButton,ref:r,...e})});Be.displayName="PopoverCloseButton";function er(t){if(t)return{enter:{...t.enter,visibility:"visible"},exit:{...t.exit,transitionEnd:{visibility:"hidden"}}}}var tr={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},rr=M(Nt.section),Ee=_(function(e,r){const{variants:o=tr,...n}=e,{isOpen:a}=O();return s.jsx(rr,{ref:r,variants:er(o),initial:!1,animate:a?"enter":"exit",...n})});Ee.displayName="PopoverTransition";var Ie=_(function(e,r){const{rootProps:o,motionProps:n,...a}=e,{getPopoverProps:i,getPopoverPositionerProps:p,onAnimationComplete:u}=O(),l=B(),m={position:"relative",display:"flex",flexDirection:"column",...l.content};return s.jsx(M.div,{...p(o),__css:l.popper,className:"chakra-popover__popper",children:s.jsx(Ee,{...n,...i(a,r),onAnimationComplete:Gt(u,a.onAnimationComplete),className:R("chakra-popover__content",e.className),__css:m})})});Ie.displayName="PopoverContent";function or(t){return"parentLayer"in t}function Wr(t){return"olLayer"in t}class nr{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.featureClass=je,this.supportedMediaTypes=null}getReadOptions(e,r){if(r){let o=r.dataProjection?x(r.dataProjection):this.readProjection(e);r.extent&&o&&o.getUnits()==="tile-pixels"&&(o=x(o),o.setWorldExtent(r.extent)),r={dataProjection:o,featureProjection:r.featureProjection}}return this.adaptOptions(r)}adaptOptions(e){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection,featureClass:this.featureClass},e)}getType(){return h()}readFeature(e,r){return h()}readFeatures(e,r){return h()}readGeometry(e,r){return h()}readProjection(e){return h()}writeFeature(e,r){return h()}writeFeatures(e,r){return h()}writeGeometry(e,r){return h()}}function se(t,e,r){const o=r?x(r.featureProjection):null,n=r?x(r.dataProjection):null;let a=t;if(o&&n&&!st(o,n)){e&&(a=t.clone());const i=e?o:n,p=e?n:o;i.getUnits()==="tile-pixels"?a.transform(i,p):a.applyTransform(at(i,p))}if(e&&r&&r.decimals!==void 0){const i=Math.pow(10,r.decimals),p=function(u){for(let l=0,m=u.length;lDe({...t,geometry:a})).flat();const o=r.type==="MultiPolygon"?"Polygon":r.type;if(o==="GeometryCollection"||o==="Circle")throw new Error("Unsupported geometry type: "+o);const n=r.layout.length;return se(new we(o,o==="Polygon"?ar(r.flatCoordinates,r.ends,n):r.flatCoordinates,r.ends?.flat(),n,t.properties||{},t.id).enableSimplifyTransformed(),!1,e)}function ae(t,e){if(!t)return null;if(Array.isArray(t)){const o=t.map(n=>ae(n,e));return new ht(o)}const r=sr[t.type];return se(new r(t.flatCoordinates,t.layout,t.ends),!1,e)}class ir extends nr{constructor(){super()}getType(){return"json"}readFeature(e,r){return this.readFeatureFromObject(z(e),this.getReadOptions(e,r))}readFeatures(e,r){return this.readFeaturesFromObject(z(e),this.getReadOptions(e,r))}readFeatureFromObject(e,r){return h()}readFeaturesFromObject(e,r){return h()}readGeometry(e,r){return this.readGeometryFromObject(z(e),this.getReadOptions(e,r))}readGeometryFromObject(e,r){return h()}readProjection(e){return this.readProjectionFromObject(z(e))}readProjectionFromObject(e){return h()}writeFeature(e,r){return JSON.stringify(this.writeFeatureObject(e,r))}writeFeatureObject(e,r){return h()}writeFeatures(e,r){return JSON.stringify(this.writeFeaturesObject(e,r))}writeFeaturesObject(e,r){return h()}writeGeometry(e,r){return JSON.stringify(this.writeGeometryObject(e,r))}writeGeometryObject(e,r){return h()}}function z(t){if(typeof t=="string"){const e=JSON.parse(t);return e||null}return t!==null?t:null}class Kr extends ir{constructor(e){e=e||{},super(),this.dataProjection=x(e.dataProjection?e.dataProjection:"EPSG:4326"),e.featureProjection&&(this.defaultFeatureProjection=x(e.featureProjection)),e.featureClass&&(this.featureClass=e.featureClass),this.geometryName_=e.geometryName,this.extractGeometryName_=e.extractGeometryName,this.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"]}readFeatureFromObject(e,r){let o=null;e.type==="Feature"?o=e:o={type:"Feature",geometry:e,properties:null};const n=ie(o.geometry);if(this.featureClass===we)return De({geometry:n,id:o.id,properties:o.properties},r);const a=new je;return this.geometryName_?a.setGeometryName(this.geometryName_):this.extractGeometryName_&&o.geometry_name&&a.setGeometryName(o.geometry_name),a.setGeometry(ae(n,r)),"id"in o&&a.setId(o.id),o.properties&&a.setProperties(o.properties,!0),a}readFeaturesFromObject(e,r){const o=e;let n=null;if(o.type==="FeatureCollection"){const a=e;n=[];const i=a.features;for(let p=0,u=i.length;p{f(!1),a?.(k)};return s.jsx(Se,{label:o,placement:"auto",openDelay:500,...l,isOpen:K,onOpen:()=>f(!0),onClose:()=>f(!1),children:s.jsx(xr,{className:N,ref:r,"aria-label":o,leftIcon:n,iconSpacing:0,padding:0,isDisabled:p,isLoading:i,isActive:u,"aria-pressed":G,...j,...m,onClick:P})})}),xr=d.forwardRef(function(e,r){const{"aria-labelledby":o,"aria-describedby":n,...a}=e;return s.jsx(ne,{ref:r,...a})}),Cr="@open-pioneer/toc",W=yt.bind(void 0,Cr),He=d.createContext(void 0),Or=He.Provider;function Fr(){const t=d.useContext(He);if(!t)throw new Error("useTocWidgetOptions must be used within a TocWidgetOptionsProvider");return t}function Sr(t){const{map:e,"aria-label":r}=t,o=W(),n=Nr(e);return n.length?Je(n,{"aria-label":r}):s.jsx(re,{className:"toc-missing-layers","aria-label":r,children:o.formatMessage({id:"missingLayers"})})}function Je(t,e){const r=t.map(o=>s.jsx(Mr,{layer:o},o.id));return s.jsx(At,{as:"ul",className:"toc-layer-list",listStyleType:"none",role:"group",...e,children:r})}function Mr(t){const{layer:e}=t,r=W(),o=Fr(),{title:n,description:a,isVisible:i}=$(()=>({title:e.title,description:e.description,isVisible:e.visible}),[e]),p=Gr(e),u=ze(e)!=="error",l=r.formatMessage({id:"layerNotAvailable"});let m;return p?.length&&(m=Je(p,{ml:4,"aria-label":r.formatMessage({id:"childgroupLabel"},{title:n})})),s.jsxs(U,{as:"li",className:Oe("toc-layer-item",`layer-${kr(e.id)}`),children:[s.jsxs(te,{className:"toc-layer-item-content",width:"100%",flexDirection:"row",align:"center",justifyContent:"space-between",gap:2,minHeight:10,children:[s.jsx(Dt,{"aria-label":n+(u?"":" "+l),isChecked:i,isDisabled:!u,onChange:g=>Ve(e,g.target.checked,o.autoShowParents),children:n}),!u&&s.jsx(Se,{className:"toc-layer-item-content-tooltip",label:l,placement:"right",openDelay:500,children:s.jsx("span",{children:s.jsx(Tt,{className:"toc-layer-item-content-icon",color:"red","aria-label":l})})}),s.jsx(Ne,{}),a&&s.jsx(Lr,{layer:e,title:n,description:a,intl:r})]}),m]})}function Ve(t,e,r){t.setVisible(e),e&&r&&t.parent&&Ve(t.parent,!0,!0)}function Lr(t){const{layer:e,title:r,description:o,intl:n}=t,a=n.formatMessage({id:"descriptionLabel"}),i=ze(e)!=="error";return s.jsxs(Ae,{placement:"bottom-start",children:[s.jsx(Te,{children:s.jsx(ne,{isDisabled:!i,className:"toc-layer-item-details-button","aria-label":a,borderRadius:"full",iconSpacing:0,padding:0,variant:"ghost",leftIcon:s.jsx(Le,{})})}),s.jsx(Me,{children:s.jsxs(Ie,{className:"toc-layer-item-details",overflowY:"auto",maxHeight:"400",children:[s.jsx(_e,{}),s.jsx(Be,{mt:1}),s.jsx(ke,{children:r}),s.jsx(Re,{children:o})]})})]})}function Nr(t){return $(()=>{const e=t.layers.getOperationalLayers({sortByDisplayOrder:!0})??[];return e.reverse(),e},[t])}function Gr(t){return $(()=>{const e=t.children?.getItems({sortByDisplayOrder:!0});return e?.reverse(),e},[t])}function ze(t){return $(()=>(or(t)?t.parentLayer:t).loadState,[t])}function kr(t){return t.toLowerCase().replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-")}const Tr=t=>{const e=W(),{map:r,showHideAllLayers:o=!0}=t;return!!o&&s.jsx(U,{className:"toc-tools",children:s.jsxs(It,{placement:"bottom-start",children:[s.jsx(Ht,{as:ne,className:"toc-tools-button","aria-label":e.formatMessage({id:"toolsLabel"}),borderRadius:"full",iconSpacing:0,padding:3,variant:"ghost",leftIcon:s.jsx(Le,{})}),s.jsx(Me,{children:s.jsx(Jt,{className:"tools-menu",children:s.jsx(Vt,{"aria-label":e.formatMessage({id:"tools.hideAllLayers"}),onClick:()=>{Ar(r)},children:e.formatMessage({id:"tools.hideAllLayers"})})})})]})})};function Ar(t){const e=r=>{r.setVisible(!1);const o=r.children?.getItems();if(o)for(const n of o)e(n)};t?.layers.getOperationalLayers().forEach(r=>{e(r)})}const ve=2,Yr=t=>{const e=W(),{showTools:r=!1,toolsConfig:o,showBasemapSwitcher:n=!0,basemapSwitcherProps:a,autoShowParents:i=!0}=t,{containerProps:p}=Ce("toc",t),u=d.useId(),l=d.useMemo(()=>({autoShowParents:i}),[i]),m=gt(t);let g;switch(m.kind){case"loading":g=null;break;case"rejected":g=s.jsx(re,{className:"toc-error",children:e.formatMessage({id:"error"})});break;case"resolved":{const j=m.map,N=n&&s.jsx(U,{className:"toc-basemap-switcher",children:s.jsx(he,{title:s.jsx(Pe,{id:u,size:"sm",mb:ve,children:e.formatMessage({id:"basemapsLabel"})}),children:s.jsx(kt,{map:j,"aria-labelledby":u,...a})})}),G=s.jsx(U,{className:"toc-operational-layers",children:s.jsx(he,{title:s.jsx(Pe,{size:"sm",mb:2,children:s.jsxs(te,{children:[s.jsx(re,{my:3,children:e.formatMessage({id:"operationalLayerLabel"})}),s.jsx(Ne,{}),r&&s.jsx(Tr,{map:j,...o})]})}),children:s.jsx(Sr,{map:j,"aria-label":e.formatMessage({id:"operationalLayerLabel"})})})});g=s.jsxs(s.Fragment,{children:[N,G]});break}}return s.jsx(te,{...p,direction:"column",gap:ve,children:s.jsx(Or,{value:l,children:g})})};export{nr as F,Kr as G,Ae as P,qr as T,Te as a,Ie as b,_e as c,Re as d,Yr as e,Wr as i,se as t,O as u}; diff --git a/openlayers-base-packages/pr-previews/pr-371/assets/BTEHqhSAUrUR.js b/openlayers-base-packages/pr-previews/pr-371/assets/BEc19nv24p4W.js similarity index 99% rename from openlayers-base-packages/pr-previews/pr-371/assets/BTEHqhSAUrUR.js rename to openlayers-base-packages/pr-previews/pr-371/assets/BEc19nv24p4W.js index f8f72bf..80650c4 100644 --- a/openlayers-base-packages/pr-previews/pr-371/assets/BTEHqhSAUrUR.js +++ b/openlayers-base-packages/pr-previews/pr-371/assets/BEc19nv24p4W.js @@ -1,4 +1,4 @@ -import{h as bn,P as Mt,p as Sn,j as I,f as Re,q as yn,Q as On,r as h,L as De,R as Vt,S as Cn,T as w,_ as P,U as xn,V as Lt,o as ne,W as In,X as rt,I as Xe,l as wn,x as Pn}from"./Bh0CuZ3gy5tC.js";import{ba as Mn,w as Vn,B as _,u as Ln,b2 as Rn,i as Dn,k as En}from"./CncSlnPsjr9P.js";import{u as Fn}from"./Cq1ZpfgEg4XJ.js";import{u as kn}from"./BO_q12Vdyug-.js";import{b as Tn,c as An}from"./Tz2xttM4F6S2.js";import{c as Nn,M as _n}from"./DUys4rac0YQP.js";import{F as jn}from"./CL_VRsbiqLzM.js";function Bn(n,e){if(n==null)return{};var r={};for(var i in n)if({}.hasOwnProperty.call(n,i)){if(e.includes(i))continue;r[i]=n[i]}return r}function We(n,e){return We=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},We(n,e)}function re(n){"@babel/helpers - typeof";return re=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},re(n)}function $n(n,e){if(re(n)!="object"||!n)return n;var r=n[Symbol.toPrimitive];if(r!==void 0){var i=r.call(n,e||"default");if(re(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function Rt(n){var e=$n(n,"string");return re(e)=="symbol"?e:e+""}function le(n,e,r){return(e=Rt(e))in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}var Dt=bn(function(e,r){const{borderLeftWidth:i,borderBottomWidth:t,borderTopWidth:o,borderRightWidth:s,borderWidth:u,borderStyle:a,borderColor:l,...c}=Mt("Divider",e),{className:d,orientation:p="horizontal",__css:f,...g}=Sn(e),m={vertical:{borderLeftWidth:i||s||u||"1px",height:"100%"},horizontal:{borderBottomWidth:t||o||u||"1px",width:"100%"}};return I.jsx(Re.hr,{ref:r,"aria-orientation":p,...g,__css:{...c,border:"0",borderColor:l,borderStyle:a,...m[p],...f},className:yn("chakra-divider",d)})});Dt.displayName="Divider";function Hn(n,e={}){const{ssr:r=!0,fallback:i}=e,{getWindow:t}=On(),o=Array.isArray(n)?n:[n];let s=Array.isArray(i)?i:[i];s=s.filter(l=>l!=null);const[u,a]=h.useState(()=>o.map((l,c)=>({media:l,matches:r?!!s[c]:t().matchMedia(l).matches})));return h.useEffect(()=>{const l=t();a(o.map(p=>({media:p,matches:l.matchMedia(p).matches})));const c=o.map(p=>l.matchMedia(p)),d=p=>{a(f=>f.slice().map(g=>g.media===p.media?{...g,matches:p.matches}:g))};return c.forEach(p=>{typeof p.addListener=="function"?p.addListener(d):p.addEventListener("change",d)}),()=>{c.forEach(p=>{typeof p.removeListener=="function"?p.removeListener(d):p.removeEventListener("change",d)})}},[t]),u.map(l=>l.matches)}function zn(n,e,r=Tn){let i=Object.keys(n).indexOf(e);if(i!==-1)return n[e];let t=r.indexOf(e);for(;t>=0;){const o=r[t];if(n.hasOwnProperty(o)){i=t;break}t-=1}if(i!==-1){const o=r[i];return n[o]}}function Un(n){var e,r;const i=Vt(n)?n:{fallback:n??"base"},o=De().__breakpoints.details.map(({minMaxQuery:l,breakpoint:c})=>({breakpoint:c,query:l.replace("@media screen and ","")})),s=o.map(l=>l.breakpoint===i.fallback),a=Hn(o.map(l=>l.query),{fallback:s,ssr:i.ssr}).findIndex(l=>l==!0);return(r=(e=o[a])==null?void 0:e.breakpoint)!=null?r:i.fallback}function Wn(n,e){var r;const i=Vt(e)?e:{fallback:e??"base"},t=Un(i),o=De();if(!t)return;const s=Array.from(((r=o.__breakpoints)==null?void 0:r.keys)||[]),u=Array.isArray(n)?Object.fromEntries(Object.entries(An(n,s)).map(([a,l])=>[a,l])):n;return zn(u,t,s)}function Yn(n,e){const r=h.useRef(n);r.current=n;const i=qn(e);return h.useMemo(()=>Mn(()=>r.current()),[i])}function Gn(n){const e=h.useCallback(()=>n.peek(),[n]),r=h.useCallback(t=>{const o=Vn(()=>[n.value],t);return()=>o.destroy()},[n]),i=h.useSyncExternalStore(r,e);return h.useDebugValue(i),i}function Ke(n,e){const r=Yn(n,e),i=Gn(r);return h.useDebugValue(i),i}function qn(n){const e=h.useRef();return(e.current==null||!Xn(e.current,n))&&(e.current=n??[]),e.current}function Xn(n,e){return n===e?!0:n.length===(e?.length??0)&&n.every((r,i)=>r===e[i])}function it(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})),r.push.apply(r,i)}return r}function C(n){for(var e=1;en.length)&&(e=n.length);for(var r=0,i=Array(e);rl!=null);const[u,a]=h.useState(()=>o.map((l,c)=>({media:l,matches:r?!!s[c]:t().matchMedia(l).matches})));return h.useEffect(()=>{const l=t();a(o.map(p=>({media:p,matches:l.matchMedia(p).matches})));const c=o.map(p=>l.matchMedia(p)),d=p=>{a(f=>f.slice().map(g=>g.media===p.media?{...g,matches:p.matches}:g))};return c.forEach(p=>{typeof p.addListener=="function"?p.addListener(d):p.addEventListener("change",d)}),()=>{c.forEach(p=>{typeof p.removeListener=="function"?p.removeListener(d):p.removeEventListener("change",d)})}},[t]),u.map(l=>l.matches)}function zn(n,e,r=Tn){let i=Object.keys(n).indexOf(e);if(i!==-1)return n[e];let t=r.indexOf(e);for(;t>=0;){const o=r[t];if(n.hasOwnProperty(o)){i=t;break}t-=1}if(i!==-1){const o=r[i];return n[o]}}function Un(n){var e,r;const i=Vt(n)?n:{fallback:n??"base"},o=De().__breakpoints.details.map(({minMaxQuery:l,breakpoint:c})=>({breakpoint:c,query:l.replace("@media screen and ","")})),s=o.map(l=>l.breakpoint===i.fallback),a=Hn(o.map(l=>l.query),{fallback:s,ssr:i.ssr}).findIndex(l=>l==!0);return(r=(e=o[a])==null?void 0:e.breakpoint)!=null?r:i.fallback}function Wn(n,e){var r;const i=Vt(e)?e:{fallback:e??"base"},t=Un(i),o=De();if(!t)return;const s=Array.from(((r=o.__breakpoints)==null?void 0:r.keys)||[]),u=Array.isArray(n)?Object.fromEntries(Object.entries(An(n,s)).map(([a,l])=>[a,l])):n;return zn(u,t,s)}function Yn(n,e){const r=h.useRef(n);r.current=n;const i=qn(e);return h.useMemo(()=>Mn(()=>r.current()),[i])}function Gn(n){const e=h.useCallback(()=>n.peek(),[n]),r=h.useCallback(t=>{const o=Vn(()=>[n.value],t);return()=>o.destroy()},[n]),i=h.useSyncExternalStore(r,e);return h.useDebugValue(i),i}function Ke(n,e){const r=Yn(n,e),i=Gn(r);return h.useDebugValue(i),i}function qn(n){const e=h.useRef();return(e.current==null||!Xn(e.current,n))&&(e.current=n??[]),e.current}function Xn(n,e){return n===e?!0:n.length===(e?.length??0)&&n.every((r,i)=>r===e[i])}function it(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})),r.push.apply(r,i)}return r}function C(n){for(var e=1;en.length)&&(e=n.length);for(var r=0,i=Array(e);r({x:n,y:n});function pr(n){const{x:e,y:r,width:i,height:t}=n;return{width:i,height:t,top:r,left:e,right:e+i,bottom:r+t,x:e,y:r}}function kt(n){return At(n)?(n.nodeName||"").toLowerCase():"#document"}function te(n){var e;return(n==null||(e=n.ownerDocument)==null?void 0:e.defaultView)||window}function Tt(n){var e;return(e=(At(n)?n.ownerDocument:n.document)||window.document)==null?void 0:e.documentElement}function At(n){return n instanceof Node||n instanceof te(n).Node}function fr(n){return n instanceof Element||n instanceof te(n).Element}function Ze(n){return n instanceof HTMLElement||n instanceof te(n).HTMLElement}function at(n){return typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof te(n).ShadowRoot}function Nt(n){const{overflow:e,overflowX:r,overflowY:i,display:t}=Je(n);return/auto|scroll|overlay|hidden|clip/.test(e+i+r)&&!["inline","contents"].includes(t)}function vr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function mr(n){return["html","body","#document"].includes(kt(n))}function Je(n){return te(n).getComputedStyle(n)}function hr(n){if(kt(n)==="html")return n;const e=n.assignedSlot||n.parentNode||at(n)&&n.host||Tt(n);return at(e)?e.host:e}function _t(n){const e=hr(n);return mr(e)?n.ownerDocument?n.ownerDocument.body:n.body:Ze(e)&&Nt(e)?e:_t(e)}function we(n,e,r){var i;e===void 0&&(e=[]),r===void 0&&(r=!0);const t=_t(n),o=t===((i=n.ownerDocument)==null?void 0:i.body),s=te(t);return o?e.concat(s,s.visualViewport||[],Nt(t)?t:[],s.frameElement&&r?we(s.frameElement):[]):e.concat(t,we(t,[],r))}function gr(n){const e=Je(n);let r=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const t=Ze(n),o=t?n.offsetWidth:r,s=t?n.offsetHeight:i,u=xe(r)!==o||xe(i)!==s;return u&&(r=o,i=s),{width:r,height:i,$:u}}function Qe(n){return fr(n)?n:n.contextElement}function st(n){const e=Qe(n);if(!Ze(e))return Ie(1);const r=e.getBoundingClientRect(),{width:i,height:t,$:o}=gr(e);let s=(o?xe(r.width):r.width)/i,u=(o?xe(r.height):r.height)/t;return(!s||!Number.isFinite(s))&&(s=1),(!u||!Number.isFinite(u))&&(u=1),{x:s,y:u}}const br=Ie(0);function Sr(n){const e=te(n);return!vr()||!e.visualViewport?br:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function yr(n,e,r){return!1}function lt(n,e,r,i){e===void 0&&(e=!1);const t=n.getBoundingClientRect(),o=Qe(n);let s=Ie(1);e&&(s=st(n));const u=yr()?Sr(o):Ie(0);let a=(t.left+u.x)/s.x,l=(t.top+u.y)/s.y,c=t.width/s.x,d=t.height/s.y;if(o){const p=te(o),f=i;let g=p,m=g.frameElement;for(;m&&i&&f!==g;){const v=st(m),b=m.getBoundingClientRect(),S=Je(m),O=b.left+(m.clientLeft+parseFloat(S.paddingLeft))*v.x,y=b.top+(m.clientTop+parseFloat(S.paddingTop))*v.y;a*=v.x,l*=v.y,c*=v.x,d*=v.y,a+=O,l+=y,g=te(m),m=g.frameElement}}return pr({width:c,height:d,x:a,y:l})}function Or(n,e){let r=null,i;const t=Tt(n);function o(){var u;clearTimeout(i),(u=r)==null||u.disconnect(),r=null}function s(u,a){u===void 0&&(u=!1),a===void 0&&(a=1),o();const{left:l,top:c,width:d,height:p}=n.getBoundingClientRect();if(u||e(),!d||!p)return;const f=be(c),g=be(t.clientWidth-(l+d)),m=be(t.clientHeight-(c+p)),v=be(l),S={rootMargin:-f+"px "+-g+"px "+-m+"px "+-v+"px",threshold:dr(0,cr(1,a))||1};let O=!0;function y(M){const V=M[0].intersectionRatio;if(V!==a){if(!O)return s();V?s(!1,V):i=setTimeout(()=>{s(!1,1e-7)},1e3)}O=!1}try{r=new IntersectionObserver(y,{...S,root:t.ownerDocument})}catch{r=new IntersectionObserver(y,S)}r.observe(n)}return s(!0),o}function Cr(n,e,r,i){i===void 0&&(i={});const{ancestorScroll:t=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:a=!1}=i,l=Qe(n),c=t||o?[...l?we(l):[],...we(e)]:[];c.forEach(b=>{t&&b.addEventListener("scroll",r,{passive:!0}),o&&b.addEventListener("resize",r)});const d=l&&u?Or(l,r):null;let p=-1,f=null;s&&(f=new ResizeObserver(b=>{let[S]=b;S&&S.target===l&&f&&(f.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var O;(O=f)==null||O.observe(e)})),r()}),l&&!a&&f.observe(l),f.observe(e));let g,m=a?lt(n):null;a&&v();function v(){const b=lt(n);m&&(b.x!==m.x||b.y!==m.y||b.width!==m.width||b.height!==m.height)&&r(),m=b,g=requestAnimationFrame(v)}return r(),()=>{var b;c.forEach(S=>{t&&S.removeEventListener("scroll",r),o&&S.removeEventListener("resize",r)}),d?.(),(b=f)==null||b.disconnect(),f=null,a&&cancelAnimationFrame(g)}}var Ge=h.useLayoutEffect,xr=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Pe=function(){};function Ir(n,e){return e?e[0]==="-"?n+e:n+"__"+e:n}function wr(n,e){for(var r=arguments.length,i=new Array(r>2?r-2:0),t=2;t-1}function Mr(n){return Fe(n)?window.innerHeight:n.clientHeight}function Bt(n){return Fe(n)?window.pageYOffset:n.scrollTop}function Ve(n,e){if(Fe(n)){window.scrollTo(0,e);return}n.scrollTop=e}function Vr(n){var e=getComputedStyle(n),r=e.position==="absolute",i=/(auto|scroll)/;if(e.position==="fixed")return document.documentElement;for(var t=n;t=t.parentElement;)if(e=getComputedStyle(t),!(r&&e.position==="static")&&i.test(e.overflow+e.overflowY+e.overflowX))return t;return document.documentElement}function Lr(n,e,r,i){return r*((n=n/i-1)*n*n+1)+e}function Se(n,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Pe,t=Bt(n),o=e-t,s=10,u=0;function a(){u+=s;var l=Lr(u,t,o,r);Ve(n,l),ur.bottom?Ve(n,Math.min(e.offsetTop+e.clientHeight-n.offsetHeight+t,n.scrollHeight)):i.top-t1?r-1:0),t=1;t=g)return{placement:"bottom",maxHeight:e};if(R>=g&&!s)return o&&Se(a,E,D),{placement:"bottom",maxHeight:e};if(!s&&R>=i||s&&L>=i){o&&Se(a,E,D);var j=s?L-y:R-y;return{placement:"bottom",maxHeight:j}}if(t==="auto"||s){var $=e,F=s?V:x;return F>=i&&($=Math.min(F-y-u,e)),{placement:"top",maxHeight:$}}if(t==="bottom")return o&&Ve(a,E),{placement:"bottom",maxHeight:e};break;case"top":if(V>=g)return{placement:"top",maxHeight:e};if(x>=g&&!s)return o&&Se(a,A,D),{placement:"top",maxHeight:e};if(!s&&x>=i||s&&V>=i){var k=e;return(!s&&x>=i||s&&V>=i)&&(k=s?V-M:x-M),o&&Se(a,A,D),{placement:"top",maxHeight:k}}return{placement:"bottom",maxHeight:e};default:throw new Error('Invalid placement provided "'.concat(t,'".'))}return l}function Br(n){var e={bottom:"top",top:"bottom"};return n?e[n]:"bottom"}var Ht=function(e){return e==="auto"?"bottom":e},$r=function(e,r){var i,t=e.placement,o=e.theme,s=o.borderRadius,u=o.spacing,a=o.colors;return C((i={label:"menu"},le(i,Br(t),"100%"),le(i,"position","absolute"),le(i,"width","100%"),le(i,"zIndex",1),i),r?{}:{backgroundColor:a.neutral0,borderRadius:s,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:u.menuGutter,marginTop:u.menuGutter})},zt=h.createContext(null),Hr=function(e){var r=e.children,i=e.minMenuHeight,t=e.maxMenuHeight,o=e.menuPlacement,s=e.menuPosition,u=e.menuShouldScrollIntoView,a=e.theme,l=h.useContext(zt)||{},c=l.setPortalPlacement,d=h.useRef(null),p=h.useState(t),f=B(p,2),g=f[0],m=f[1],v=h.useState(null),b=B(v,2),S=b[0],O=b[1],y=a.spacing.controlHeight;return Ge(function(){var M=d.current;if(M){var V=s==="fixed",L=u&&!V,x=jr({maxHeight:t,menuEl:M,minHeight:i,placement:o,shouldScroll:L,isFixedPosition:V,controlHeight:y});m(x.maxHeight),O(x.placement),c?.(x.placement)}},[t,o,s,u,i,c,y]),r({ref:d,placerProps:C(C({},e),{},{placement:S||Ht(o),maxHeight:g})})},zr=function(e){var r=e.children,i=e.innerRef,t=e.innerProps;return w("div",P({},N(e,"menu",{menu:!0}),{ref:i},t),r)},Ur=zr,Wr=function(e,r){var i=e.maxHeight,t=e.theme.spacing.baseUnit;return C({maxHeight:i,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},r?{}:{paddingBottom:t,paddingTop:t})},Yr=function(e){var r=e.children,i=e.innerProps,t=e.innerRef,o=e.isMulti;return w("div",P({},N(e,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:t},i),r)},Ut=function(e,r){var i=e.theme,t=i.spacing.baseUnit,o=i.colors;return C({textAlign:"center"},r?{}:{color:o.neutral40,padding:"".concat(t*2,"px ").concat(t*3,"px")})},Gr=Ut,qr=Ut,Xr=function(e){var r=e.children,i=r===void 0?"No options":r,t=e.innerProps,o=Z(e,Nr);return w("div",P({},N(C(C({},o),{},{children:i,innerProps:t}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),t),i)},Kr=function(e){var r=e.children,i=r===void 0?"Loading...":r,t=e.innerProps,o=Z(e,_r);return w("div",P({},N(C(C({},o),{},{children:i,innerProps:t}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),t),i)},Zr=function(e){var r=e.rect,i=e.offset,t=e.position;return{left:r.left,position:t,top:i,width:r.width,zIndex:1}},Jr=function(e){var r=e.appendTo,i=e.children,t=e.controlElement,o=e.innerProps,s=e.menuPlacement,u=e.menuPosition,a=h.useRef(null),l=h.useRef(null),c=h.useState(Ht(s)),d=B(c,2),p=d[0],f=d[1],g=h.useMemo(function(){return{setPortalPlacement:f}},[]),m=h.useState(null),v=B(m,2),b=v[0],S=v[1],O=h.useCallback(function(){if(t){var L=Rr(t),x=u==="fixed"?0:window.pageYOffset,R=L[p]+x;(R!==b?.offset||L.left!==b?.rect.left||L.width!==b?.rect.width)&&S({offset:R,rect:L})}},[t,u,p,b?.offset,b?.rect.left,b?.rect.width]);Ge(function(){O()},[O]);var y=h.useCallback(function(){typeof l.current=="function"&&(l.current(),l.current=null),t&&a.current&&(l.current=Cr(t,a.current,O,{elementResize:"ResizeObserver"in window}))},[t,O]);Ge(function(){y()},[y]);var M=h.useCallback(function(L){a.current=L,y()},[y]);if(!r&&u!=="fixed"||!b)return null;var V=w("div",P({ref:M},N(C(C({},e),{},{offset:b.offset,position:u,rect:b.rect}),"menuPortal",{"menu-portal":!0}),o),i);return w(zt.Provider,{value:g},r?xn.createPortal(V,r):V)},Qr=function(e){var r=e.isDisabled,i=e.isRtl;return{label:"container",direction:i?"rtl":void 0,pointerEvents:r?"none":void 0,position:"relative"}},ei=function(e){var r=e.children,i=e.innerProps,t=e.isDisabled,o=e.isRtl;return w("div",P({},N(e,"container",{"--is-disabled":t,"--is-rtl":o}),i),r)},ti=function(e,r){var i=e.theme.spacing,t=e.isMulti,o=e.hasValue,s=e.selectProps.controlShouldRenderValue;return C({alignItems:"center",display:t&&o&&s?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},r?{}:{padding:"".concat(i.baseUnit/2,"px ").concat(i.baseUnit*2,"px")})},ni=function(e){var r=e.children,i=e.innerProps,t=e.isMulti,o=e.hasValue;return w("div",P({},N(e,"valueContainer",{"value-container":!0,"value-container--is-multi":t,"value-container--has-value":o}),i),r)},ri=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},ii=function(e){var r=e.children,i=e.innerProps;return w("div",P({},N(e,"indicatorsContainer",{indicators:!0}),i),r)},dt,oi=["size"],ai=["innerProps","isRtl","size"],si={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Wt=function(e){var r=e.size,i=Z(e,oi);return w("svg",P({height:r,width:r,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:si},i))},et=function(e){return w(Wt,P({size:20},e),w("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Yt=function(e){return w(Wt,P({size:20},e),w("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Gt=function(e,r){var i=e.isFocused,t=e.theme,o=t.spacing.baseUnit,s=t.colors;return C({label:"indicatorContainer",display:"flex",transition:"color 150ms"},r?{}:{color:i?s.neutral60:s.neutral20,padding:o*2,":hover":{color:i?s.neutral80:s.neutral40}})},li=Gt,ui=function(e){var r=e.children,i=e.innerProps;return w("div",P({},N(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),i),r||w(Yt,null))},ci=Gt,di=function(e){var r=e.children,i=e.innerProps;return w("div",P({},N(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),i),r||w(et,null))},pi=function(e,r){var i=e.isDisabled,t=e.theme,o=t.spacing.baseUnit,s=t.colors;return C({label:"indicatorSeparator",alignSelf:"stretch",width:1},r?{}:{backgroundColor:i?s.neutral10:s.neutral20,marginBottom:o*2,marginTop:o*2})},fi=function(e){var r=e.innerProps;return w("span",P({},r,N(e,"indicatorSeparator",{"indicator-separator":!0})))},vi=Cn(dt||(dt=ur([` 0%, 80%, 100% { opacity: 0; } diff --git a/openlayers-base-packages/pr-previews/pr-371/assets/CxiOyT3ujOOX.js b/openlayers-base-packages/pr-previews/pr-371/assets/BH5Lv4UduK--.js similarity index 99% rename from openlayers-base-packages/pr-previews/pr-371/assets/CxiOyT3ujOOX.js rename to openlayers-base-packages/pr-previews/pr-371/assets/BH5Lv4UduK--.js index e687f24..614e974 100644 --- a/openlayers-base-packages/pr-previews/pr-371/assets/CxiOyT3ujOOX.js +++ b/openlayers-base-packages/pr-previews/pr-371/assets/BH5Lv4UduK--.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./BormsuGtFsVQ.js","./CmsKOCeNyeyo.js","./BTEHqhSAUrUR.js","./Bh0CuZ3gy5tC.js","./CncSlnPsjr9P.js","./Cq1ZpfgEg4XJ.js","./BO_q12Vdyug-.js","./Tz2xttM4F6S2.js","./DUys4rac0YQP.js","./CL_VRsbiqLzM.js"])))=>i.map(i=>d[i]); -var en=Object.defineProperty;var Je=i=>{throw TypeError(i)};var tn=(i,e,t)=>e in i?en(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var _=(i,e,t)=>tn(i,typeof e!="symbol"?e+"":e,t),Ie=(i,e,t)=>e.has(i)||Je("Cannot "+t);var v=(i,e,t)=>(Ie(i,e,"read from private field"),t?t.call(i):e.get(i)),x=(i,e,t)=>e.has(i)?Je("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),w=(i,e,t,s)=>(Ie(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t),ne=(i,e,t)=>(Ie(i,e,"access private method"),t);import{aJ as nn,bc as sn,bd as rn,be as on,bf as an,aU as ln,b0 as cn,bg as un,bh as dn,K as hn,bi as gn,b5 as fn,j as N,bj as mn,bk as pn,bl as yn,bm as St,bn as _n,bo as vn,a as ee,b as Ce,aQ as _e,bp as Xe,bq as K,ad as Ze,I as j,br as Te,b3 as Z,as as Qe,bs as me,bt as et,bu as A,o as C,bv as U,bw as Oe,bx as Sn,by as xn,z as wn,bz as je,bA as bn,bB as Mn,bC as xt,at as wt,bD as En,bE as Cn,bF as tt,bG as Pn,bH as nt,bI as Fn,bJ as st,r as He,b4 as Be,bK as bt,bL as Ln,b6 as In,f as $e,u as z,b2 as H,i as B,B as P,bM as Tn,b9 as Pe,bN as An,ar as ve,bO as Nn,bP as kn,c as Se,aC as ie,F as Re,C as On,bQ as it,bR as jn,bS as rt,k as ot}from"./CncSlnPsjr9P.js";import{u as Rn,m as Dn,r as m,n as Gn,h as Ue,o as Mt,p as Et,q as Ct,j as d,f as D,s as Vn,t as Hn,c as fe,b as Pt,v as at,B as Ft,C as Bn,w as $n,i as Lt,x as It,l as Un,I as Wn}from"./Bh0CuZ3gy5tC.js";import{G as Tt,i as zn}from"./TnHTIdi4bAVU.js";import{a as Kn}from"./JZ5RcWTlF_6Y.js";import{D as At,S as qn,I as Yn,c as Jn,a as Xn}from"./BBt4Ba3H9gMn.js";import{u as V}from"./Cq1ZpfgEg4XJ.js";import{T as Q,L as Zn,V as Qn}from"./Tz2xttM4F6S2.js";import{u as te,F as k,r as Nt}from"./BTEHqhSAUrUR.js";import{c as kt}from"./D03oE8cEQPSj.js";import{L as De}from"./DsXJQLY20iHp.js";import{u as Ot,F as xe}from"./BO_q12Vdyug-.js";import{F as we}from"./CreVQ-qFRzOc.js";import{H as Ge}from"./L25RkWOQSN8A.js";import{F as es}from"./CL_VRsbiqLzM.js";import{_ as ts}from"./CmsKOCeNyeyo.js";function ns(i){const{theme:e}=Rn(),t=Dn();return m.useMemo(()=>Gn(e.direction,{...t,...i}),[i,e.direction,t])}var We=Ue(function(e,t){const{htmlSize:s,...n}=e,r=Mt("Input",n),o=Et(n),a=Ot(o),l=Ct("chakra-input",e.className);return d.jsx(D.input,{size:s,...a,__css:r.field,ref:t,className:l})});We.displayName="Input";We.id="Input";var jt=Ue(function(e,t){const{children:s,placeholder:n,className:r,...o}=e;return d.jsxs(D.select,{...o,ref:t,className:Ct("chakra-select",r),children:[n&&d.jsx("option",{value:"",children:n}),s]})});jt.displayName="SelectField";function ss(i,e){const t={},s={};for(const[n,r]of Object.entries(i))e.includes(n)?t[n]=r:s[n]=r;return[t,s]}var ze=Ue((i,e)=>{var t;const s=Mt("Select",i),{rootProps:n,placeholder:r,icon:o,color:a,height:l,h:c,minH:u,minHeight:h,iconColor:f,iconSize:g,...p}=Et(i),[y,b]=ss(p,Hn),F=Ot(b),O={width:"100%",height:"fit-content",position:"relative",color:a},S={paddingEnd:"2rem",...s.field,_focus:{zIndex:"unset",...(t=s.field)==null?void 0:t._focus}};return d.jsxs(D.div,{className:"chakra-select__wrapper",__css:O,...y,...n,children:[d.jsx(jt,{ref:e,height:c??l,minH:u??h,placeholder:r,...F,__css:S,children:i.children}),d.jsx(Rt,{"data-disabled":Vn(F.disabled),...(f||a)&&{color:f||a},__css:s.icon,...g&&{fontSize:g},children:o})]})});ze.displayName="Select";var is=i=>d.jsx("svg",{viewBox:"0 0 24 24",...i,children:d.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),rs=D("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),Rt=i=>{const{children:e=d.jsx(is,{}),...t}=i,s=m.cloneElement(e,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return d.jsx(rs,{...t,className:"chakra-select__icon-wrapper",children:m.isValidElement(e)?s:null})};Rt.displayName="SelectIcon";const M={ELEMENT:"element",MAP:"map",OFFSET:"offset",POSITION:"position",POSITIONING:"positioning"};class Fe extends nn{constructor(e){super(),this.on,this.once,this.un,this.options=e,this.id=e.id,this.insertFirst=e.insertFirst!==void 0?e.insertFirst:!0,this.stopEvent=e.stopEvent!==void 0?e.stopEvent:!0,this.element=document.createElement("div"),this.element.className=e.className!==void 0?e.className:"ol-overlay-container "+sn,this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.autoPan=e.autoPan===!0?{}:e.autoPan||void 0,this.rendered={transform_:"",visible:!0},this.mapPostrenderListenerKey=null,this.addChangeListener(M.ELEMENT,this.handleElementChanged),this.addChangeListener(M.MAP,this.handleMapChanged),this.addChangeListener(M.OFFSET,this.handleOffsetChanged),this.addChangeListener(M.POSITION,this.handlePositionChanged),this.addChangeListener(M.POSITIONING,this.handlePositioningChanged),e.element!==void 0&&this.setElement(e.element),this.setOffset(e.offset!==void 0?e.offset:[0,0]),this.setPositioning(e.positioning||"top-left"),e.position!==void 0&&this.setPosition(e.position)}getElement(){return this.get(M.ELEMENT)}getId(){return this.id}getMap(){return this.get(M.MAP)||null}getOffset(){return this.get(M.OFFSET)}getPosition(){return this.get(M.POSITION)}getPositioning(){return this.get(M.POSITIONING)}handleElementChanged(){rn(this.element);const e=this.getElement();e&&this.element.appendChild(e)}handleMapChanged(){this.mapPostrenderListenerKey&&(on(this.element),an(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);const e=this.getMap();if(e){this.mapPostrenderListenerKey=ln(e,cn.POSTRENDER,this.render,this),this.updatePixelPosition();const t=this.stopEvent?e.getOverlayContainerStopEvent():e.getOverlayContainer();this.insertFirst?t.insertBefore(this.element,t.childNodes[0]||null):t.appendChild(this.element),this.performAutoPan()}}render(){this.updatePixelPosition()}handleOffsetChanged(){this.updatePixelPosition()}handlePositionChanged(){this.updatePixelPosition(),this.performAutoPan()}handlePositioningChanged(){this.updatePixelPosition()}setElement(e){this.set(M.ELEMENT,e)}setMap(e){this.set(M.MAP,e)}setOffset(e){this.set(M.OFFSET,e)}setPosition(e){this.set(M.POSITION,e)}performAutoPan(){this.autoPan&&this.panIntoView(this.autoPan)}panIntoView(e){const t=this.getMap();if(!t||!t.getTargetElement()||!this.get(M.POSITION))return;const s=this.getRect(t.getTargetElement(),t.getSize()),n=this.getElement(),r=this.getRect(n,[un(n),dn(n)]);e=e||{};const o=e.margin===void 0?20:e.margin;if(!hn(s,r)){const a=r[0]-s[0],l=s[2]-r[2],c=r[1]-s[1],u=s[3]-r[3],h=[0,0];if(a<0?h[0]=a-o:l<0&&(h[0]=Math.abs(l)+o),c<0?h[1]=c-o:u<0&&(h[1]=Math.abs(u)+o),h[0]!==0||h[1]!==0){const f=t.getView().getCenterInternal(),g=t.getPixelFromCoordinateInternal(f);if(!g)return;const p=[g[0]+h[0],g[1]+h[1]],y=e.animation||{};t.getView().animateInternal({center:t.getCoordinateFromPixelInternal(p),duration:y.duration,easing:y.easing})}}}getRect(e,t){const s=e.getBoundingClientRect(),n=s.left+window.pageXOffset,r=s.top+window.pageYOffset;return[n,r,n+t[0],r+t[1]]}setPositioning(e){this.set(M.POSITIONING,e)}setVisible(e){this.rendered.visible!==e&&(this.element.style.display=e?"":"none",this.rendered.visible=e)}updatePixelPosition(){const e=this.getMap(),t=this.getPosition();if(!e||!e.isRendered()||!t){this.setVisible(!1);return}const s=e.getPixelFromCoordinate(t),n=e.getSize();this.updateRenderedPosition(s,n)}updateRenderedPosition(e,t){const s=this.element.style,n=this.getOffset(),r=this.getPositioning();this.setVisible(!0);const o=Math.round(e[0]+n[0])+"px",a=Math.round(e[1]+n[1])+"px";let l="0%",c="0%";r=="bottom-right"||r=="center-right"||r=="top-right"?l="-100%":(r=="bottom-center"||r=="center-center"||r=="top-center")&&(l="-50%"),r=="bottom-left"||r=="bottom-center"||r=="bottom-right"?c="-100%":(r=="center-left"||r=="center-center"||r=="center-right")&&(c="-50%");const u=`translate(${l}, ${c}) translate(${o}, ${a})`;this.rendered.transform_!=u&&(this.rendered.transform_=u,s.transform=u)}getOptions(){return this.options}}const cr=gn,os=25.4/.28,as=39.37;function Ke(i){return qe(i,ls,cs)}function ls(i){return i.getView()}function cs(i,e){return i.on("change:view",e)}function Dt(i){return Ke(i)?.getProjection()}function us(i){const e=Ke(i);return qe(e,ds,hs)}function ds(i){return i.getResolution()}function hs(i,e){return i.on("change:resolution",e)}function gs(i){const e=Ke(i);return qe(e,fs,ms)}function fs(i){return i.getCenter()}function ms(i,e){return i.on("change:center",e)}function ps(i){const e=gs(i),t=us(i),s=Dt(i);return m.useMemo(()=>{if(s==null||t==null||e==null)return;const r=fn(s,t,e);return Math.round(r*as*os)},[s,t,e])}function qe(i,e,t){const s=m.useCallback(()=>i?e(i):void 0,[i,e]),n=m.useCallback(r=>{if(!i)return()=>{};const o=t(i,r);return()=>N(o)},[i,t]);return m.useSyncExternalStore(n,s)}const lt=0,re=1,ct=[0,0,0,0],q=[],Ae={MODIFYSTART:"modifystart",MODIFYEND:"modifyend"};class Ne extends wt{constructor(e,t,s){super(e),this.features=t,this.mapBrowserEvent=s}}class ys extends mn{constructor(e){super(e),this.on,this.once,this.un,this.boundHandleFeatureChange_=this.handleFeatureChange_.bind(this),this.condition_=e.condition?e.condition:pn,this.defaultDeleteCondition_=function(s){return yn(s)&&St(s)},this.deleteCondition_=e.deleteCondition?e.deleteCondition:this.defaultDeleteCondition_,this.insertVertexCondition_=e.insertVertexCondition?e.insertVertexCondition:_n,this.vertexFeature_=null,this.vertexSegments_=null,this.lastPixel_=[0,0],this.ignoreNextSingleClick_=!1,this.featuresBeingModified_=null,this.rBush_=new vn,this.pixelTolerance_=e.pixelTolerance!==void 0?e.pixelTolerance:10,this.snappedToVertex_=!1,this.changingFeature_=!1,this.dragSegments_=[],this.overlay_=new ee({source:new Ce({useSpatialIndex:!1,wrapX:!!e.wrapX}),style:e.style?e.style:vs(),updateWhileAnimating:!0,updateWhileInteracting:!0}),this.SEGMENT_WRITERS_={Point:this.writePointGeometry_.bind(this),LineString:this.writeLineStringGeometry_.bind(this),LinearRing:this.writeLineStringGeometry_.bind(this),Polygon:this.writePolygonGeometry_.bind(this),MultiPoint:this.writeMultiPointGeometry_.bind(this),MultiLineString:this.writeMultiLineStringGeometry_.bind(this),MultiPolygon:this.writeMultiPolygonGeometry_.bind(this),Circle:this.writeCircleGeometry_.bind(this),GeometryCollection:this.writeGeometryCollectionGeometry_.bind(this)},this.source_=null,this.hitDetection_=null;let t;if(e.features?t=e.features:e.source&&(this.source_=e.source,t=new _e(this.source_.getFeatures()),this.source_.addEventListener(Xe.ADDFEATURE,this.handleSourceAdd_.bind(this)),this.source_.addEventListener(Xe.REMOVEFEATURE,this.handleSourceRemove_.bind(this))),!t)throw new Error("The modify interaction requires features, a source or a layer");e.hitDetection&&(this.hitDetection_=e.hitDetection),this.features_=t,this.features_.forEach(this.addFeature_.bind(this)),this.features_.addEventListener(K.ADD,this.handleFeatureAdd_.bind(this)),this.features_.addEventListener(K.REMOVE,this.handleFeatureRemove_.bind(this)),this.lastPointerEvent_=null,this.delta_=[0,0],this.snapToPointer_=e.snapToPointer===void 0?!this.hitDetection_:e.snapToPointer}addFeature_(e){const t=e.getGeometry();if(t){const n=this.SEGMENT_WRITERS_[t.getType()];n&&n(e,t)}const s=this.getMap();s&&s.isRendered()&&this.getActive()&&this.handlePointerAtPixel_(this.lastPixel_,s),e.addEventListener(Ze.CHANGE,this.boundHandleFeatureChange_)}willModifyFeatures_(e,t){if(!this.featuresBeingModified_){this.featuresBeingModified_=new _e;const s=this.featuresBeingModified_.getArray();for(let n=0,r=t.length;n=0;--n){const r=s[n];for(let o=this.dragSegments_.length-1;o>=0;--o)this.dragSegments_[o][0]===r&&this.dragSegments_.splice(o,1);t.remove(r)}}setActive(e){this.vertexFeature_&&!e&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),super.setActive(e)}setMap(e){this.overlay_.setMap(e),super.setMap(e)}getOverlay(){return this.overlay_}handleSourceAdd_(e){e.feature&&this.features_.push(e.feature)}handleSourceRemove_(e){e.feature&&this.features_.remove(e.feature)}handleFeatureAdd_(e){this.addFeature_(e.element)}handleFeatureChange_(e){if(!this.changingFeature_){const t=e.target;this.removeFeature_(t),this.addFeature_(t)}}handleFeatureRemove_(e){this.removeFeature_(e.element)}writePointGeometry_(e,t){const s=t.getCoordinates(),n={feature:e,geometry:t,segment:[s,s]};this.rBush_.insert(t.getExtent(),n)}writeMultiPointGeometry_(e,t){const s=t.getCoordinates();for(let n=0,r=s.length;n=0;--c)this.insertVertex_(n[c],r)}return!!this.vertexFeature_}handleUpEvent(e){for(let t=this.dragSegments_.length-1;t>=0;--t){const s=this.dragSegments_[t][0],n=s.geometry;if(n.getType()==="Circle"){const r=n.getCenter(),o=s.featureSegments[0],a=s.featureSegments[1];o.segment[0]=r,o.segment[1]=r,a.segment[0]=r,a.segment[1]=r,this.rBush_.update(Te(r),o);let l=n;this.rBush_.update(l.getExtent(),a)}else this.rBush_.update(j(s.segment),s)}return this.featuresBeingModified_&&(this.dispatchEvent(new Ne(Ae.MODIFYEND,this.featuresBeingModified_,e)),this.featuresBeingModified_=null),!1}handlePointerMove_(e){this.lastPixel_=e.pixel,this.handlePointerAtPixel_(e.pixel,e.map,e.coordinate)}handlePointerAtPixel_(e,t,s){const n=s||t.getCoordinateFromPixel(e);t.getView().getProjection();const r=function(l,c){return ut(n,l)-ut(n,c)};let o,a;if(this.hitDetection_){const l=typeof this.hitDetection_=="object"?c=>c===this.hitDetection_:void 0;t.forEachFeatureAtPixel(e,(c,u,h)=>{h&&h.getType()==="Point"&&(h=new Qe(Oe(h.getCoordinates())));const f=h||c.getGeometry();if(c instanceof Z&&this.features_.getArray().includes(c)){a=f;const g=c.getGeometry().getFlatCoordinates().slice(0,2);o=[{feature:c,geometry:a,segment:[g,g]}]}return!0},{layerFilter:l})}if(!o){const l=Sn(Te(n,ct)),c=t.getView().getResolution()*this.pixelTolerance_,u=xn(wn(l,c,ct));o=this.rBush_.getInExtent(u)}if(o&&o.length>0){const l=o.sort(r)[0],c=l.segment;let u=dt(n,l);const h=t.getPixelFromCoordinate(u);let f=et(e,h);if(a||f<=this.pixelTolerance_){const g={};if(g[C(c)]=!0,this.snapToPointer_||(this.delta_[0]=u[0]-n[0],this.delta_[1]=u[1]-n[1]),l.geometry.getType()==="Circle"&&l.index===re)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(u,[l.feature],[l.geometry]);else{const p=t.getPixelFromCoordinate(c[0]),y=t.getPixelFromCoordinate(c[1]),b=je(h,p),F=je(h,y);f=Math.sqrt(Math.min(b,F)),this.snappedToVertex_=f<=this.pixelTolerance_,this.snappedToVertex_&&(u=b>F?c[1]:c[0]),this.createOrUpdateVertexFeature_(u,[l.feature],[l.geometry]);const O={};O[C(l.geometry)]=!0;for(let S=1,L=o.length;S=0;--l)o=e[l],g=o[0],p=C(g.feature),g.depth&&(p+="-"+g.depth.join("-")),p in t||(t[p]={}),o[1]===0?(t[p].right=g,t[p].index=g.index):o[1]==1&&(t[p].left=g,t[p].index=g.index+1);for(p in t){switch(f=t[p].right,u=t[p].left,c=t[p].index,h=c-1,u!==void 0?g=u:g=f,h<0&&(h=0),a=g.geometry,r=a.getCoordinates(),n=r,s=!1,a.getType()){case"MultiLineString":r[g.depth[0]].length>2&&(r[g.depth[0]].splice(c,1),s=!0);break;case"LineString":r.length>2&&(r.splice(c,1),s=!0);break;case"MultiPolygon":n=n[g.depth[1]];case"Polygon":n=n[g.depth[0]],n.length>4&&(c==n.length-1&&(c=0),n.splice(c,1),s=!0,c===0&&(n.pop(),n.push(n[0]),h=n.length-1));break}if(s){this.setGeometryCoordinates_(a,r);const y=[];if(u!==void 0&&(this.rBush_.remove(u),y.push(u.segment[0])),f!==void 0&&(this.rBush_.remove(f),y.push(f.segment[1])),u!==void 0&&f!==void 0){const b={depth:g.depth,feature:g.feature,geometry:g.geometry,index:h,segment:y};this.rBush_.insert(j(b.segment),b)}this.updateSegmentIndices_(a,c,g.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),e.length=0}}return s}setGeometryCoordinates_(e,t){this.changingFeature_=!0,e.setCoordinates(t),this.changingFeature_=!1}updateSegmentIndices_(e,t,s,n){this.rBush_.forEachInExtent(e.getExtent(),function(r){r.geometry===e&&(s===void 0||r.depth===void 0||bn(r.depth,s))&&r.index>t&&(r.index+=n)})}}function _s(i,e){return i.index-e.index}function ut(i,e,t){const s=e.geometry;if(s.getType()==="Circle"){let r=s;if(e.index===re){const o=je(r.getCenter(),A(i)),a=Math.sqrt(o)-r.getRadius();return a*a}}const n=A(i);return q[0]=A(e.segment[0]),q[1]=A(e.segment[1]),En(n,q)}function dt(i,e,t){const s=e.geometry;if(s.getType()==="Circle"&&e.index===re)return Oe(s.getClosestPoint(A(i)));const n=A(i);return q[0]=A(e.segment[0]),q[1]=A(e.segment[1]),Oe(Mn(n,q))}function vs(){const i=xt();return function(e,t){return i.Point}}const Ss={SELECT:"select"};class xs extends wt{constructor(e,t,s,n){super(e),this.selected=t,this.deselected=s,this.mapBrowserEvent=n}}const pe={};class Gt extends Cn{constructor(e){super(),this.on,this.once,this.un,e=e||{},this.boundAddFeature_=this.addFeature_.bind(this),this.boundRemoveFeature_=this.removeFeature_.bind(this),this.condition_=e.condition?e.condition:St,this.addCondition_=e.addCondition?e.addCondition:tt,this.removeCondition_=e.removeCondition?e.removeCondition:tt,this.toggleCondition_=e.toggleCondition?e.toggleCondition:Pn,this.multi_=e.multi?e.multi:!1,this.filter_=e.filter?e.filter:nt,this.hitTolerance_=e.hitTolerance?e.hitTolerance:0,this.style_=e.style!==void 0?e.style:ws(),this.features_=e.features||new _e;let t;if(e.layers)if(typeof e.layers=="function")t=e.layers;else{const s=e.layers;t=function(n){return s.includes(n)}}else t=nt;this.layerFilter_=t,this.featureLayerAssociation_={}}addFeatureLayerAssociation_(e,t){this.featureLayerAssociation_[C(e)]=t}getFeatures(){return this.features_}getHitTolerance(){return this.hitTolerance_}getLayer(e){return this.featureLayerAssociation_[C(e)]}setHitTolerance(e){this.hitTolerance_=e}setMap(e){this.getMap()&&this.style_&&this.features_.forEach(this.restorePreviousStyle_.bind(this)),super.setMap(e),e?(this.features_.addEventListener(K.ADD,this.boundAddFeature_),this.features_.addEventListener(K.REMOVE,this.boundRemoveFeature_),this.style_&&this.features_.forEach(this.applySelectedStyle_.bind(this))):(this.features_.removeEventListener(K.ADD,this.boundAddFeature_),this.features_.removeEventListener(K.REMOVE,this.boundRemoveFeature_))}addFeature_(e){const t=e.element;if(this.style_&&this.applySelectedStyle_(t),!this.getLayer(t)){const s=this.getMap().getAllLayers().find(function(n){if(n instanceof ee&&n.getSource()&&n.getSource().hasFeature(t))return n});s&&this.addFeatureLayerAssociation_(t,s)}}removeFeature_(e){this.style_&&this.restorePreviousStyle_(e.element)}getStyle(){return this.style_}applySelectedStyle_(e){const t=C(e);t in pe||(pe[t]=e.getStyle()),e.setStyle(this.style_)}restorePreviousStyle_(e){const t=this.getMap().getInteractions().getArray();for(let n=t.length-1;n>=0;--n){const r=t[n];if(r!==this&&r instanceof Gt&&r.getStyle()&&r.getFeatures().getArray().lastIndexOf(e)!==-1){e.setStyle(r.getStyle());return}}const s=C(e);e.setStyle(pe[s]),delete pe[s]}removeFeatureLayerAssociation_(e){delete this.featureLayerAssociation_[C(e)]}handleEvent(e){if(!this.condition_(e))return!0;const t=this.addCondition_(e),s=this.removeCondition_(e),n=this.toggleCondition_(e),r=!t&&!s&&!n,o=e.map,a=this.getFeatures(),l=[],c=[];if(r){Fn(this.featureLayerAssociation_),o.forEachFeatureAtPixel(e.pixel,(u,h)=>{if(!(!(u instanceof Z)||!this.filter_(u,h)))return this.addFeatureLayerAssociation_(u,h),c.push(u),!this.multi_},{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(let u=a.getLength()-1;u>=0;--u){const h=a.item(u),f=c.indexOf(h);f>-1?c.splice(f,1):(a.remove(h),l.push(h))}c.length!==0&&a.extend(c)}else{o.forEachFeatureAtPixel(e.pixel,(u,h)=>{if(!(!(u instanceof Z)||!this.filter_(u,h)))return(t||n)&&!a.getArray().includes(u)?(this.addFeatureLayerAssociation_(u,h),c.push(u)):(s||n)&&a.getArray().includes(u)&&(l.push(u),this.removeFeatureLayerAssociation_(u)),!this.multi_},{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(let u=l.length-1;u>=0;--u)a.remove(l[u]);a.extend(c)}return(c.length>0||l.length>0)&&this.dispatchEvent(new xs(Ss.SELECT,c,l,e)),!0}}function ws(){const i=xt();return st(i.Polygon,i.LineString),st(i.GeometryCollection,i.LineString),function(e){return e.getGeometry()?i[e.getGeometry().getType()]:null}}async function bs(i,e,t,s){const r=s.getCode().replace("EPSG:","http://www.opengis.net/def/crs/EPSG/0/"),o=await i.fetch(e,{method:"POST",body:JSON.stringify({type:"Feature",properties:{},geometry:t}),headers:{"Content-Type":"application/geo+json; charset=utf-8","Content-Crs":`<${r}>`}});if(!o||!o.ok||o.status!==201)throw new Error("Request failed: "+o.status);const a=o.headers.get("location");if(!a)throw new Error("Request failed: no Location response header");const l=a.substring(a.lastIndexOf("/")+1);return Promise.resolve(l)}async function Ms(i,e,t,s,n){const o=n.getCode().replace("EPSG:","http://www.opengis.net/def/crs/EPSG/0/"),a=new URL(`${e.toString()}/${t}`),l=await i.fetch(a,{method:"PATCH",body:JSON.stringify({type:"Feature",properties:{},geometry:s}),headers:{"Content-Type":"application/geo+json; charset=utf-8","Content-Crs":`<${o}>`}});if(!l||!l.ok||l.status!==204)throw new Error("Request failed: "+l.status);return Promise.resolve(t)}function Vt(i,e){const t=document.createElement("div");t.className="editing-tooltip editing-tooltip-hidden",t.role="tooltip";const s=document.createElement("span");s.textContent=e,t.appendChild(s);const n=new Fe({element:t,offset:[15,0],positioning:"center-left"}),r=i.on("pointermove",o=>{o.dragging||n.setPosition(o.coordinate)});return i.addOverlay(n),{destroy(){N(r),i.removeOverlay(n)},setVisible(o){t.classList.toggle("editing-tooltip-hidden",!o)},setText(o){s.textContent=o}}}function Ht(i){let e=ht(i.polygon);Array.isArray(e)&&(e=e[0]);let t=ht(i.vertex);Array.isArray(t)&&(t=t[0]);const s=[];return e&&s.push(e),t&&(t.setGeometry(Es),s.push(t)),s}const Es=i=>{if(i){const e=i.getGeometry();if(e&&e.getType()==="Polygon"){const t=e.getCoordinates()[0];if(t)return new Kn(t)}}},ht=i=>{const e=new Z,s=new ee({style:i}).getStyleFunction();if(!s)throw new Error("can't retrieve style function");const n=s(e,1);if(!n)throw new Error("can't retrieve styles from feature style function");return Array.isArray(n)&&n.length?n.length>1?n:n[0]:n},Cs=fe("editing:EditingCreateWorkflowImpl");var R;class Ps{constructor(e){x(this,R);_(this,"_httpService");_(this,"_intl");_(this,"_map");_(this,"_polygonStyle");_(this,"_vertexStyle");_(this,"_state");_(this,"_editLayerURL");_(this,"_featureId");_(this,"_editingSource");_(this,"_editingLayer");_(this,"_drawInteraction");_(this,"_olMap");_(this,"_tooltip");_(this,"_enterHandler");_(this,"_escapeHandler");_(this,"_error");_(this,"_interactionListener");_(this,"_mapListener");this._httpService=e.httpService,this._intl=e.intl,this._polygonStyle=e.polygonStyle,this._vertexStyle=e.vertexStyle,this._map=e.map,this._olMap=e.map.olMap,this._state=He("active:initialized"),this._editLayerURL=e.ogcApiFeatureLayerUrl,this._editingSource=new Ce,this._editingLayer=new ee({source:this._editingSource,zIndex:Be,properties:{name:"editing-layer"}}),this._drawInteraction=new At({source:this._editingSource,type:"Polygon",style:Ht({polygon:this._polygonStyle,vertex:this._vertexStyle})}),this._tooltip=Vt(this._olMap,this._intl.formatMessage({id:"create.tooltip.begin"})),this._enterHandler=t=>{if((t.code==="Enter"||t.code==="NumpadEnter")&&t.target===this._olMap.getTargetElement()){const s=this._drawInteraction.getOverlay().getSource()?.getFeatures()??[];s[0]&&s[0].getGeometry().getCoordinates()[0].length>4&&this.triggerSave()}},this._escapeHandler=t=>{t.code==="Escape"&&t.target===this._olMap.getTargetElement()&&this.reset()},this._interactionListener=[],this._mapListener=[],this._start()}getDrawInteraction(){return this._drawInteraction}getState(){return this._state.value}_setState(e){this._state.value=e}_save(e){this._setState("active:saving");const t=this._editLayerURL,s=e.getGeometry();if(!s){this._destroy(),this._error=new Error("no geometry available"),v(this,R)?.reject(this._error);return}const n=this._olMap.getView().getProjection(),o=new Tt({dataProjection:n}).writeGeometryObject(s,{rightHanded:!0,decimals:10});this._olMap.removeInteraction(this._drawInteraction),this._tooltip.destroy(),bs(this._httpService,t,o,n).then(a=>{this._featureId=a,this._destroy(),v(this,R)?.resolve({featureId:this._featureId})}).catch(a=>{Cs.error(a),this._destroy(),this._error=new Error("Failed to save feature",{cause:a}),v(this,R)?.reject(this._error)})}_start(){this._olMap.addLayer(this._editingLayer),this._olMap.addInteraction(this._drawInteraction);const e=bt(()=>{const n=this._map.container;if(n)return n.addEventListener("keydown",this._enterHandler,!1),n.addEventListener("keydown",this._escapeHandler,!1),()=>{n.removeEventListener("keydown",this._enterHandler),n.removeEventListener("keydown",this._escapeHandler)}});this._tooltip.setVisible(!0);const t=this._drawInteraction.on("drawstart",()=>{this._setState("active:drawing"),this._tooltip.setText(this._intl.formatMessage({id:"create.tooltip.continue"}))}),s=this._drawInteraction.on("drawend",n=>{const r=n.feature;if(!r){this._destroy(),this._error=new Error("no feature available"),v(this,R)?.reject(this._error);return}this._save(r)});this._interactionListener.push(t,s),this._mapListener.push(e)}reset(){this._drawInteraction.abortDrawing(),this._tooltip.setText(this._intl.formatMessage({id:"create.tooltip.begin"})),this._setState("active:initialized")}stop(){this._destroy(),v(this,R)?.resolve(void 0)}_destroy(){this._olMap.removeLayer(this._editingLayer),this._olMap.removeInteraction(this._drawInteraction),this._tooltip.destroy(),this._interactionListener.forEach(e=>{N(e)}),this._mapListener.forEach(e=>{e.destroy()}),this._setState("destroyed")}triggerSave(){this._drawInteraction.finishDrawing()}whenComplete(){return this._state.value==="destroyed"?this._error?Promise.reject(this._error):this._featureId?Promise.resolve({featureId:this._featureId}):Promise.resolve(void 0):(v(this,R)??w(this,R,Pt())).promise}}R=new WeakMap;var I;class Fs{constructor(e){x(this,I);_(this,"_httpService");_(this,"_intl");_(this,"_map");_(this,"_polygonStyle");_(this,"_vertexStyle");_(this,"_state");_(this,"_editLayerURL");_(this,"_featureId");_(this,"_initialFeature");_(this,"_editFeature");_(this,"_editingSource");_(this,"_editingLayer");_(this,"_modifyInteraction");_(this,"_olMap");_(this,"_tooltip");_(this,"_enterHandler");_(this,"_escapeHandler");_(this,"_error");_(this,"_interactionListener");_(this,"_mapListener");this._httpService=e.httpService,this._intl=e.intl,this._polygonStyle=e.polygonStyle,this._vertexStyle=e.vertexStyle,this._map=e.map,this._olMap=e.map.olMap,this._state=He("active:initialized"),this._editLayerURL=e.ogcApiFeatureLayerUrl,this._initialFeature=e.feature.clone(),this._initialFeature.setId(e.feature.getId()),this._editFeature=e.feature.clone(),this._editFeature.setId(e.feature.getId()),this._editFeature.setStyle(Ht({polygon:this._polygonStyle,vertex:this._vertexStyle})),this._editingSource=new Ce({features:new _e([this._editFeature])}),this._editingLayer=new ee({source:this._editingSource,zIndex:Be,properties:{name:"editing-layer"}}),this._modifyInteraction=new ys({source:this._editingSource}),this._tooltip=Vt(this._olMap,this._intl.formatMessage({id:"create.tooltip.deselect"})),this._enterHandler=t=>{if((t.code==="Enter"||t.code==="NumpadEnter")&&t.target===this._olMap.getTargetElement()){const s=this._editingSource.getFeatures()[0];if(!s)throw Error("no updated feature found");this._save(s)}},this._escapeHandler=t=>{t.code==="Escape"&&t.target===this._olMap.getTargetElement()&&this.reset()},this._interactionListener=[],this._mapListener=[],this._start()}getModifyInteraction(){return this._modifyInteraction}getState(){return this._state.value}_setState(e){this._state.value=e}_save(e){this._setState("active:saving");const t=this._editLayerURL;if(this._featureId=e.getId()?.toString(),!this._featureId){this._destroy(),this._error=new Error("no feature id available"),v(this,I)?.reject(this._error);return}const s=e?.getGeometry();if(!s){this._destroy(),this._error=new Error("no geometry available"),v(this,I)?.reject(this._error);return}const n=this._olMap.getView().getProjection(),o=new Tt({dataProjection:n}).writeGeometryObject(s,{rightHanded:!0,decimals:10});this._olMap.removeInteraction(this._modifyInteraction),this._tooltip.destroy(),Ms(this._httpService,t,this._featureId,o,n).then(a=>{this._destroy(),v(this,I)?.resolve({featureId:a})}).catch(a=>{this._destroy(),this._error=new Error("Failed to save feature",{cause:a}),v(this,I)?.reject(this._error)})}_start(){this._olMap.addLayer(this._editingLayer),this._olMap.addInteraction(this._modifyInteraction);const e=this._editingSource.getFeatures()[0];if(e&&!e.getId()?.toString()){this._destroy(),this._error=new Error("no feature id available"),v(this,I)?.reject(this._error);return}const t=bt(()=>{const r=this._map.container;if(r)return r.addEventListener("keydown",this._enterHandler,!1),r.addEventListener("keydown",this._escapeHandler,!1),()=>{r.removeEventListener("keydown",this._enterHandler),r.removeEventListener("keydown",this._escapeHandler)}});this._tooltip.setVisible(!0);const s=this._map.olMap.on("click",r=>{const o=r.coordinate,a=r.originalEvent.altKey,l=this._editingSource.getFeaturesAtCoordinate(o);a||l.length===0&&this.triggerSave()}),n=this._modifyInteraction.on("modifystart",()=>{this._setState("active:drawing")});this._interactionListener.push(s,n),this._mapListener.push(t)}reset(){const e=this._initialFeature.getGeometry()?.clone(),t=this._editingSource.getFeatures()[0];if(!t)throw Error("no updated feature found");t.setGeometry(e),this._setState("active:initialized")}stop(){this._destroy(),v(this,I)?.resolve(void 0)}_destroy(){this._editingSource.clear(),this._olMap.removeLayer(this._editingLayer),this._olMap.removeInteraction(this._modifyInteraction),this._tooltip.destroy(),this._interactionListener.forEach(e=>{N(e)}),this._mapListener.forEach(e=>{e.destroy()}),this._setState("destroyed")}triggerSave(){const e=this._editingSource.getFeatures()[0];if(!e)throw Error("no updated feature found");this._save(e)}whenComplete(){return this._state.value==="destroyed"?this._error?Promise.reject(this._error):this._featureId?Promise.resolve({featureId:this._featureId}):Promise.resolve(void 0):(v(this,I)??w(this,I,Pt())).promise}}I=new WeakMap;class ur{_serviceOptions;_workflows;constructor(e){this._serviceOptions=e,this._workflows=new Map}createFeature(e,t){if(!t||!e||!e.id)throw new Error("Map, mapId or url is undefined.");const s=e.id;let n=this._workflows.get(s);if(n)throw new Error("EditingWorkflow could not be started. EditingWorkflow already in progress for this map.");return n=new Ps({map:e,ogcApiFeatureLayerUrl:t,polygonStyle:this._serviceOptions.properties.polygonStyle,vertexStyle:this._serviceOptions.properties.vertexStyle,httpService:this._serviceOptions.references.httpService,intl:this._serviceOptions.intl}),this._workflows.set(s,n),this._connectToWorkflowDestroyEvent(n,s),n}updateFeature(e,t,s){if(!t||!e||!e.id)throw new Error("Map, mapId or url is undefined.");const n=e.id;let r=this._workflows.get(n);if(r)throw new Error("EditingWorkflow could not be started. EditingWorkflow already in progress for this map.");return r=new Fs({map:e,ogcApiFeatureLayerUrl:t,feature:s,polygonStyle:this._serviceOptions.properties.polygonStyle,vertexStyle:this._serviceOptions.properties.vertexStyle,httpService:this._serviceOptions.references.httpService,intl:this._serviceOptions.intl}),this._workflows.set(n,r),this._connectToWorkflowDestroyEvent(r,n),r}stop(e){const t=this._workflows.get(e);t&&t.stop()}reset(e){const t=this._workflows.get(e);if(t)t.reset();else throw new Error("No workflow found for mapId: "+e)}_connectToWorkflowDestroyEvent(e,t){const s=Ln(()=>[e.getState()],([n])=>{n==="destroyed"&&(this._workflows.get(t)===e&&this._workflows.delete(t),s.destroy())})}}var W,G,oe,ae,le,Ve;class Ls{constructor(e,t,s){x(this,le);_(this,"label");x(this,W,He({kind:"available"}));x(this,G);x(this,oe);x(this,ae);this.label=t,w(this,G,e),w(this,ae,s),ne(this,le,Ve).call(this),w(this,oe,v(this,G).on("change:visible",()=>{ne(this,le,Ve).call(this)}))}destroy(){N(v(this,oe))}get status(){return v(this,W).value}async select(e,t){if(e.type!=="extent")throw new Error(`Unsupported selection kind: ${e.type}`);if(v(this,W).value.kind!=="available"||v(this,G).getSource()===null)return[];const s=[];v(this,G).getSource().forEachFeatureIntersectingExtent(e.extent,o=>{if(!o.getGeometry())return;const a={...o.getProperties()};delete a.geometries;const l={id:o.getId()?.toString()||In(),geometry:o.getGeometry(),properties:a};s.push(l)});const n=s.filter(o=>o!=null);return n.length>t.maxResults?n.slice(0,t.maxResults):n}}W=new WeakMap,G=new WeakMap,oe=new WeakMap,ae=new WeakMap,le=new WeakSet,Ve=function(){const t=v(this,G).getVisible()?{kind:"available"}:{kind:"unavailable",reason:v(this,ae)};t.kind!==v(this,W).value.kind&&(v(this,W).value=t)};var ce;class dr{constructor({intl:e}){x(this,ce);w(this,ce,e)}createSelectionSource(e){return new Ls(e.vectorLayer,e.label,v(this,ce).formatMessage({id:"layerNotVisibleReason"}))}}ce=new WeakMap;const Is="@open-pioneer/notifier",Ts=$e.bind(void 0,Is),As=kt({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"}),Bt=kt({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"}),Ns=!1;function hr(i){const{position:e="top-right"}=i,t=ns(),s=Ts("notifier.NotificationService"),[n,r]=m.useState(!Ns),o=V(l=>{const c=l.level==="error"?d.jsx(Bt,{h:"100%",w:"100%"}):void 0;t({position:e,title:l.title,description:l.message||null,status:l.level,isClosable:!0,duration:l.displayDuration??null,icon:c})}),a=V(()=>{t.closeAll()});return m.useEffect(()=>{const l=s.registerHandler({showNotification:o,closeAll:a});return()=>l.destroy()},[n,s,o,a]),d.jsx(d.Fragment,{})}const ks="@open-pioneer/coordinate-viewer",Os=z.bind(void 0,ks),js=4,Rs="decimal",gr=i=>{const{precision:e,displayProjectionCode:t,format:s}=i,{containerProps:n}=H("coordinate-viewer",i),{map:r}=B(i),o=r?.olMap,a=Dt(o)?.getCode()??"";let{coordinates:l}=Gs(o);l=l&&t?Hs(l,a,t):l;const c=Ds(l,e,s),u=t||a,h=c?c+" "+u:"";return d.jsx(P,{...n,children:d.jsx(Q,{className:"coordinate-viewer-text",children:h})})};function Ds(i,e,t){const s=Os();return i?Vs(i,e,s,t):""}function Gs(i){const[e,t]=m.useState();return m.useEffect(()=>{if(!i)return;const s=i.on("pointermove",n=>{t(n.coordinate)});return()=>N(s)},[i]),{coordinates:e}}function Vs(i,e,t,s){if(i[0]==null||i[1]==null)return"";const n=e??js,r=s??Rs,[o,a]=i;let l;if(r==="degree"&&isFinite(o)&&isFinite(a)){const[c,u,h]=gt(o,t,n),[f,g,p]=gt(a,t,n),y=`${Math.abs(c)}°${u}'${h}"${0<=c?"(E)":"(W)"}`,b=`${Math.abs(f)}°${g}'${p}"${0<=f?"(N)":"(S)"}`;l=y+" "+b}else{const c=t.formatNumber(o,{maximumFractionDigits:n,minimumFractionDigits:n}),u=t.formatNumber(a,{maximumFractionDigits:n,minimumFractionDigits:n});l=c+" "+u}return l}function gt(i,e,t){const s=Math.floor(i),n=i-s,r=Math.floor(60*n),a=60*(60*n-r),l=e.formatNumber(a,{maximumFractionDigits:t,minimumFractionDigits:t});return[s,r,l]}function Hs(i,e,t){return Tn(i,e,t)}const fr=i=>{const{displayMode:e="line"}=i,{containerProps:t}=H("scale-bar",i),{map:s}=B(i),n=m.useRef(null);return m.useEffect(()=>{if(n.current&&s){const r=s.olMap,o=new qn({units:"metric",target:n.current,bar:e==="bar"});return r.addControl(o),()=>{r.removeControl(o)}}},[e,s]),d.jsx(P,{...t,ref:n})},Bs="@open-pioneer/scale-viewer",$s=z.bind(void 0,Bs),mr=i=>{const{containerProps:e}=H("scale-viewer",i),{map:t}=B(i),s=$s(),n=ps(t?.olMap),r=n?s.formatNumber(n):void 0;return d.jsx(P,{...e,children:r&&d.jsxs(Q,{children:["1:",r]})})},Us="@open-pioneer/legend",$t=z.bind(void 0,Us),pr=i=>{const{showBaseLayers:e=!1}=i,{containerProps:t}=H("legend",i),{map:s}=B(i);return d.jsx(P,{...t,children:s?d.jsx(Ws,{map:s,showBaseLayers:e}):null})};function Ws(i){const{map:e,showBaseLayers:t}=i,n=Ks(e).map(r=>d.jsx(Ut,{layer:r,showBaseLayers:t},r.id));return d.jsx(Zn,{as:"ul",className:"legend-layer-list",listStyleType:"none",spacing:2,children:n})}function Ut(i){const{layer:e,showBaseLayers:t}=i,s=te(()=>e.visible,[e]),n=qs(e);if(!s||!t&&zn(e)&&Wt(e))return;const r=[];return n?.length&&n.forEach(o=>{r.push(d.jsx(Ut,{layer:o,showBaseLayers:t},o.id))}),d.jsxs(d.Fragment,{children:[d.jsx(zs,{layer:e,showBaseLayers:t}),r]})}function zs(i){const e=$t(),{layer:t,showBaseLayers:s}=i,n=Wt(t),r=Ys(t),o=te(()=>t.legend,[t]);let a;return r?.Component?a=d.jsx(r.Component,{layer:t}):r?.imageUrl?a=d.jsx(ft,{layer:t,imageUrl:r.imageUrl}):o&&(a=d.jsx(ft,{layer:t,imageUrl:o})),a?d.jsxs(P,{as:"li",className:Pe("legend-item",`layer-${Js(t.id)}`),children:[s&&n?d.jsx(Q,{as:"b",children:e.formatMessage({id:"basemapLabel"})}):null,a]}):void 0}function ft(i){const e=$t(),{layer:t,imageUrl:s}=i;return d.jsxs(P,{children:[d.jsx(Q,{children:t.title}),d.jsx(Yn,{maxW:"none",maxH:"none",src:s,alt:e.formatMessage({id:"altLabel"},{layerName:t.title}),className:"legend-item__image",fallbackStrategy:"onError",fallback:d.jsx(P,{children:d.jsxs(Q,{children:[d.jsx(Bt,{me:2}),e.formatMessage({id:"fallbackLabel"})]})})})]})}function Ks(i){return te(()=>{const e=i.layers.getAllLayers({sortByDisplayOrder:!0})??[];return e.reverse(),e},[i])}function qs(i){return te(()=>{const e=i.sublayers?.getSublayers({sortByDisplayOrder:!0});if(e)return e.reverse(),e},[i])}function Ys(i){return te(()=>i.attributes.legend,[i])}function Wt(i){return!("parentLayer"in i)&&i.isBaseLayer}function Js(i){return i.toLowerCase().replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-")}const Xs="@open-pioneer/measurement",Zs=z.bind(void 0,Xs);class Qs{olMap;messages;activeFeatureStyle;layer;source;draw=void 0;activeMeasurement;predefinedMeasurements=new Map;finishedMeasurements=new Set;helpTooltip;resources=[];measurementChangedHandler;constructor(e,t){this.olMap=e,this.messages=t;const s=this.source=new Ce;this.layer=new ee({source:s,zIndex:Be,properties:{name:"measurement-layer"}}),e.addLayer(this.layer);const n=e.on("pointermove",this.handlePointerMove.bind(this));this.resources.push({destroy(){N(n)}});const r=()=>{this.helpTooltip.element.classList.add("hidden")};e.getViewport().addEventListener("mouseout",r),this.resources.push({destroy(){e.getViewport().removeEventListener("mouseout",r)}}),this.helpTooltip=ti(this.olMap)}destroy(){this.stopMeasurement();for(const e of this.resources)e.destroy();this.resources=[],this.activeMeasurement=at(this.activeMeasurement);for(const e of this.finishedMeasurements)e.destroy();this.finishedMeasurements.clear(),this.helpTooltip.destroy(),this.olMap.removeLayer(this.layer),this.layer.dispose(),this.source.dispose(),this.measurementChangedHandler=void 0,this.predefinedMeasurements.clear()}getVectorLayer(){return this.layer}setFinishedFeatureStyle(e){this.layer.setStyle(e)}setMeasurementSourceChangedHandler(e){this.measurementChangedHandler=e}setPredefinedMeasurements(e){this.updatePredefinedMeasurements(e)}setActiveFeatureStyle(e){const t=An(e);this.activeFeatureStyle=(s,...n)=>{const r=s?.getGeometry()?.getType();if(r==="Polygon"||r==="LineString"||r==="Point")return t(s,...n)},this.draw?.getOverlay().setStyle(this.activeFeatureStyle)}clearMeasurements(){const e=this.source.getFeatures();this.source.clear(),e.forEach(t=>{this.raiseMeasurementsChangeEvent("remove-measurement",t)}),this.predefinedMeasurements.clear();for(const t of this.finishedMeasurements)t.destroy();this.finishedMeasurements.clear()}startMeasurement(e){if(this.draw)throw new Error("Internal error: another measurement interaction is still active.");const t=e==="area"?"Polygon":"LineString",s=this.draw=new At({source:this.source,type:t,style:this.activeFeatureStyle});this.olMap.addInteraction(s);let n,r;s.on("drawstart",o=>{const a=o.feature;a&&(n=this.activeMeasurement=new mt("active",a,this),r=a.getGeometry()?.on("change",()=>{n?.updateTooltipContent(),n?.updateTooltipPosition()}))}),s.on("drawend",()=>{if(n&&n===this.activeMeasurement){const o=n;o.updateState("finished"),this.finishedMeasurements.add(o),this.raiseMeasurementsChangeEvent("add-measurement",o.feature),this.activeMeasurement=n=void 0}n=void 0,r&&N(r)}),s.on("drawabort",()=>{n&&(n.destroy(),n===this.activeMeasurement&&(this.activeMeasurement=void 0),n=void 0),r&&N(r)})}stopMeasurement(){this.draw&&(this.olMap.removeInteraction(this.draw),this.draw.abortDrawing(),this.draw.dispose(),this.draw=void 0),this.activeMeasurement=at(this.activeMeasurement)}handlePointerMove(e){if(e.dragging)return;const t=this.helpTooltip,s=si(this.messages,this.activeMeasurement);t.setText(s),t.overlay.setPosition(e.coordinate),t.element.classList.remove("hidden")}updatePredefinedMeasurements(e){const t=e.filter(n=>!this.predefinedMeasurements.has(n)),s=[];for(const n of this.predefinedMeasurements.keys())e.includes(n)||s.push(n);t.forEach(n=>{const r=new Z(n);this.source.addFeature(r);const o=new mt("finished",r,this);this.finishedMeasurements.add(o),this.predefinedMeasurements.set(n,o),this.raiseMeasurementsChangeEvent("add-measurement",r)}),s.forEach(n=>{const r=this.predefinedMeasurements.get(n);r&&(this.source.removeFeature(r.feature),this.finishedMeasurements.delete(r),r.destroy(),this.raiseMeasurementsChangeEvent("remove-measurement",r.feature)),this.predefinedMeasurements.delete(n)})}raiseMeasurementsChangeEvent(e,t){const s=t.getGeometry();this.measurementChangedHandler&&s&&this.measurementChangedHandler({kind:e,geometry:(s instanceof ve,s)})}}class mt{controller;feature;_state;tooltip;constructor(e,t,s){this.controller=s,this._state=e,this.feature=t,this.tooltip=ni(this.olMap),this.updateTooltipContent(),this.updateTooltipPosition(),this.tooltip.setActive(e==="active")}destroy(){this.tooltip.destroy()}get state(){return this._state}updateState(e){this._state!==e&&(this._state=e,this.tooltip.setActive(e==="active"))}updateTooltipContent(){const e=this.feature.getGeometry();if(!e)return;const t=this.olMap.getView().getProjection();let s;e instanceof ve?s=ii(e,t,this.messages):e instanceof De&&(s=ri(e,t,this.messages)),s&&this.tooltip.setHtml(s)}updateTooltipPosition(){const e=this.feature.getGeometry();if(!e)return;let t;if(e instanceof ve)t=e.getInteriorPoint().getCoordinates()||null;else if(e instanceof De)t=e.getLastCoordinate()||null;else return;this.tooltip.overlay.setPosition(t)}get olMap(){return this.controller.olMap}get messages(){return this.controller.messages}}const pt=[0,-15],ei=[0,-7];function ti(i){const e=document.createElement("div");e.className="measurement-tooltip printing-hide hidden",e.role="tooltip";const t=document.createElement("span");e.appendChild(t);const s=new Fe({element:e,offset:[15,0],positioning:"center-left"});return i.addOverlay(s),{overlay:s,element:e,destroy(){i.removeOverlay(s)},setText(n){t.textContent=n},setHtml(n){t.innerHTML=n}}}function ni(i){const e=document.createElement("div");e.role="tooltip",e.className="measurement-tooltip measurement-active-tooltip printing-hide";const t=document.createElement("span");e.appendChild(t);const s=new Fe({element:e,offset:pt,positioning:"bottom-center",stopEvent:!1,insertFirst:!1});return i.addOverlay(s),{overlay:s,element:e,destroy(){i.removeOverlay(s)},setActive(n){n?(e.className="measurement-tooltip measurement-active-tooltip printing-hide",s.setOffset(pt)):(e.className="measurement-tooltip measurement-finished-tooltip",s.setOffset(ei))},setText(n){t.textContent=n},setHtml(n){t.innerHTML=n}}}function si(i,e){if(e){const t=e.feature.getGeometry();if(t instanceof ve||t instanceof De)return i.getContinueMessage()}return i.getHelpMessage()}function ii(i,e,t){const s=Nn(i,{projection:e});let n;return s>=1e6?n=`${t.formatNumber(s/1e6)} km2`:n=`${t.formatNumber(s)} m2`,n}function ri(i,e,t){const s=kn(i,{projection:e});let n;return s>=1e3?n=`${t.formatNumber(s/1e3)} km`:n=`${t.formatNumber(s)} m`,n}const yr=i=>{const e=Zs(),{containerProps:t}=H("measurement",i),[s,n]=m.useState("distance"),r=u=>e.formatMessage({id:u}),o=B(i),a=oi(o.map,i,e);m.useEffect(()=>{if(a)return a.startMeasurement(s),()=>{a.stopMeasurement()}},[a,s]);function l(u){if(u==="distance"||u==="area")n(u);else throw new Error(`Unexpected measurement type: '${u}'.`)}function c(){a?.clearMeasurements()}return d.jsxs(P,{...t,children:[d.jsx(Q,{mb:3,children:e.formatMessage({id:"measurementInfoText"})}),d.jsx(xe,{mb:4,alignItems:"center",children:d.jsxs(Ge,{mb:2,children:[d.jsx(we,{mb:1,children:r("measurementLabel")}),d.jsxs(ze,{value:s,onChange:u=>l(u.target.value),className:"measurement-select",children:[d.jsx("option",{value:"distance",children:r("distance")}),d.jsx("option",{value:"area",children:r("area")})]})]})}),d.jsx(Ft,{padding:2,className:"measurement-delete-button",onClick:c,width:"100%",children:r("deleteMeasurementLabel")})]})};function oi(i,e,t){const{activeFeatureStyle:s,finishedFeatureStyle:n,onMeasurementsChange:r,predefinedMeasurements:o}=e,[a,l]=m.useState(void 0);return m.useEffect(()=>{if(!i)return;const c=new Qs(i.olMap,{getContinueMessage(){return t.formatMessage({id:"tooltips.continue"})},getHelpMessage(){return t.formatMessage({id:"tooltips.help"})},formatNumber(u){return t.formatNumber(u,{maximumFractionDigits:2})}});return l(c),()=>{c.destroy(),l(void 0)}},[i,t]),m.useEffect(()=>{a?.setActiveFeatureStyle(s??ai())},[a,s]),m.useEffect(()=>{a?.setFinishedFeatureStyle(n??li())},[a,n]),m.useEffect(()=>{a?.setMeasurementSourceChangedHandler(r)},[a,r]),m.useEffect(()=>{a?.setPredefinedMeasurements(o??[])},[a,o]),a}function ai(){return[new Se({stroke:new ie({color:"#fff",lineDash:[10,10],width:5})}),new Se({fill:new Re({color:"rgba(0,0,0,0.15)"}),stroke:new ie({color:"rgba(0, 0, 0, 0.7)",lineDash:[10,10],width:3}),image:new On({radius:5,stroke:new ie({color:"rgba(0, 0, 0, 0.7)",width:2}),fill:new Re({color:"rgba(255, 255, 255, 0.2)"})})})]}function li(){return[new Se({stroke:new ie({color:"#fff",width:5})}),new Se({stroke:new ie({color:"#0b96fc",width:3}),fill:new Re({color:"rgba(11,150,252,0.15)"})})]}const ci="@open-pioneer/search",Le=z.bind(void 0,ci);function ui(i){const e=i.selectProps.inputValue.length>0,t={...i,className:Pe(i.className,{"search-invisible":!e})};return d.jsx(k.Menu,{...t,children:i.children})}function di(i){const e=i.data.label,t={...i.innerProps,"aria-label":e,role:"group"};return d.jsx(k.Group,{...i,innerProps:t})}function hi(i){const t=Le().formatMessage({id:"noOptionsText"});return d.jsx(k.NoOptionsMessage,{...i,children:d.jsx(D.span,{className:"search-no-match",children:t})})}function gi(i){const t=Le().formatMessage({id:"loadingText"});return d.jsx(k.LoadingMessage,{...i,children:d.jsx(D.span,{className:"search-loading-text",children:t})})}function fi({children:i,...e}){const t={...e,className:Pe(e.className,"search-value-container")};return d.jsxs(k.ValueContainer,{...t,children:[!!i&&d.jsx(As,{style:{position:"absolute",left:8}}),i]})}function mi(i){const e={...i,isHidden:!1};return d.jsx(k.Input,{...e})}function pi(i){return null}function yi(i){return d.jsxs(k.IndicatorsContainer,{...i,children:[i.children,!i.selectProps.isLoading&&i.selectProps.inputValue&&d.jsx(_i,{selectProps:i.selectProps,clearValue:i.clearValue})]})}function _i(i){const t=Le().formatMessage({id:"ariaLabel.clearButton"}),s=n=>{n.preventDefault(),n.stopPropagation(),i.clearValue()};return d.jsx(Bn,{role:"button",size:"md",mr:1,"aria-label":t,onClick:s,onTouchEnd:s,onMouseDown:n=>n.preventDefault()})}function vi(i){return null}function Si(i){const e=i.selectProps.inputValue,t=i.data.label,s={...i,className:Pe(i.className,"search-option")};return d.jsx(k.Option,{...s,children:d.jsx(D.div,{className:"search-option-label",children:e.trim().length>0?xi(t,e):t})})}function xi(i,e){const t=i.toLowerCase().indexOf(e.toLowerCase());return t>=0?d.jsxs(d.Fragment,{children:[i.substring(0,t),d.jsx(D.span,{className:"search-highlighted-match",children:i.substring(t,t+e.length)},"highlighted"),i.substring(t+e.length)]}):i}const yt=fe("search:SearchController"),_t=200,vt=5;var ue,Y,J,X,T,Me,zt;class wi{constructor(e,t){x(this,Me);x(this,ue);x(this,Y,[]);x(this,J,vt);x(this,X,_t);x(this,T);w(this,ue,e),w(this,Y,t)}destroy(){v(this,T)?.abort(),w(this,T,void 0)}async search(e){if(v(this,T)?.abort(),w(this,T,void 0),!e)return[];const t=w(this,T,new AbortController);try{return await bi(t.signal,v(this,X)),t.signal.aborted&&(yt.debug(`search canceled with ${e}`),$n()),(await Promise.all(v(this,Y).map(n=>ne(this,Me,zt).call(this,n,e,t.signal)))).filter(n=>n!=null)}finally{v(this,T)===t&&w(this,T,void 0)}}get searchTypingDelay(){return v(this,X)}set searchTypingDelay(e){w(this,X,e??_t)}get maxResultsPerSource(){return v(this,J)}set maxResultsPerSource(e){w(this,J,e??vt)}get sources(){return v(this,Y)}}ue=new WeakMap,Y=new WeakMap,J=new WeakMap,X=new WeakMap,T=new WeakMap,Me=new WeakSet,zt=async function(e,t,s){const n=e.label,r=v(this,ue).olMap.getView().getProjection();try{const o=v(this,J);let a=await e.search(t,{maxResults:o,signal:s,mapProjection:r});return a.length>o&&(a=a.slice(0,o)),{label:n,source:e,results:a}}catch(o){Lt(o)||yt.error(`search for source ${n} failed`,o);return}};async function bi(i,e){i.aborted||await new Promise(t=>{const s=()=>{i.removeEventListener("abort",s),clearTimeout(n),t()};i.addEventListener("abort",s);const n=setTimeout(s,e)})}const be=fe("search:Search"),_r=i=>{const{sources:e,searchTypingDelay:t,maxResultsPerGroup:s,onSelect:n,onClear:r}=i,{containerProps:o}=H("search",i),{map:a}=B(i),l=Le(),c=Pi(e,t,s,a),{input:u,search:h,selectedOption:f,onInputChanged:g,onResultConfirmed:p}=Fi(c),y=Ci(),b=Mi(l),F=Ei(),O=V((E,$)=>{$.action==="input-change"&&g(E)}),S=V((E,$)=>{switch($.action){case"select-option":E&&(p(E),n?.({source:E.source,result:E.result}));break;case"clear":g(""),L.current?.blur(),L.current?.focus(),r?.();break;default:be.debug(`Unhandled action type '${$.action}'.`);break}}),L=m.useRef(null);return d.jsx(P,{...o,children:d.jsx(Nt,{className:"search-component",classNamePrefix:"react-select",ref:L,inputValue:u,onInputChange:O,"aria-label":l.formatMessage({id:"ariaLabel.search"}),ariaLiveMessages:b,colorScheme:"trails",selectedOptionStyle:"color",selectedOptionColorScheme:"trails",chakraStyles:y,isClearable:!0,placeholder:l.formatMessage({id:"searchPlaceholder"}),closeMenuOnSelect:!0,isLoading:h.kind==="loading",options:h.kind==="ready"?h.results:void 0,filterOption:()=>!0,tabSelectsValue:!1,components:F,onChange:S,value:f,menuPosition:"fixed"})})};function Mi(i){return m.useMemo(()=>({onFocus:()=>"",onChange:()=>"",guidance:()=>`${i.formatMessage({id:"ariaLabel.instructions"})}`,onFilter:()=>""}),[i])}function Ei(){return m.useMemo(()=>({Menu:ui,Input:mi,SingleValue:pi,Option:Si,NoOptionsMessage:hi,LoadingMessage:gi,ValueContainer:fi,IndicatorsContainer:yi,ClearIndicator:vi,Group:di}),[])}function Ci(){const[i,e]=It("colors",["trails.100","trails.50"],["#d5e5ec","#eaf2f5"]);return m.useMemo(()=>({groupHeading:s=>({...s,backgroundColor:i,padding:"8px 12px",fontSize:"inherit",fontWeight:"inherit"}),option:s=>({...s,backgroundColor:"inherit",_focus:{backgroundColor:e}}),dropdownIndicator:s=>({...s,display:"none"})}),[i,e])}function Pi(i,e,t,s){const[n,r]=m.useState(void 0);return m.useEffect(()=>{if(!s)return;const o=new wi(s,i);return r(o),()=>{o.destroy(),r(void 0)}},[s,i]),m.useEffect(()=>{n&&(n.searchTypingDelay=e)},[n,e]),m.useEffect(()=>{n&&(n.maxResultsPerSource=t)},[n,t]),n}function Fi(i){const[e,t]=m.useReducer((a,l)=>{switch(l.kind){case"input":return{...a,query:l.query,selectedOption:null};case"select-option":return{...a,selectedOption:l.option,query:l.option.label};case"load-results":return{...a,search:{kind:"loading"}};case"accept-results":return{...a,search:{kind:"ready",results:l.results}}}},void 0,()=>({query:"",selectedOption:null,search:{kind:"ready",results:[]}})),s=m.useRef(),n=V(a=>{if(!i){s.current=void 0,t({kind:"accept-results",results:[]});return}be.isDebug()&&be.debug(`Starting new search for query ${JSON.stringify(a)}.`),t({kind:"load-results"});const l=s.current=Li(i,a).then(c=>{s.current===l&&t({kind:"accept-results",results:c})})}),r=m.useCallback(a=>{t({kind:"select-option",option:a})},[]),o=m.useCallback(a=>{t({kind:"input",query:a}),n(a)},[n]);return{input:e.query,search:e.search,selectedOption:e.selectedOption,onResultConfirmed:r,onInputChanged:o}}async function Li(i,e){let t;try{t=await i.search(e)}catch(s){Lt(s)||be.error("Search failed",s),t=[]}return Ii(t)}function Ii(i){return i.map((t,s)=>({label:t.label,options:t.results.map(n=>({value:`${s}-${n.id}`,label:n.label,source:t.source,result:n}))}))}const Kt="@open-pioneer/selection",Ti=$e.bind(void 0,Kt),Ye=z.bind(void 0,Kt),se="selection-active",ye="selection-inactive";class Ai{tooltip;interactionResources=[];olMap;isActive=!0;tooltipMessage;tooltipDisabledMessage;constructor(e,t,s,n){const r=this.initViewport(e);this.interactionResources.push(this.createDragBox(e,n,r,this.interactionResources)),this.interactionResources.push(this.createDrag(e,r,this.interactionResources)),this.tooltip=this.createHelpTooltip(e,t),this.olMap=e,this.tooltipMessage=t,this.tooltipDisabledMessage=s}initViewport(e){const t=e.getViewport();return t.classList.add(se),t.oncontextmenu=s=>(s.preventDefault(),!1),t}destroy(){this.tooltip.destroy(),this.interactionResources.forEach(e=>{e.destroy()})}setActive(e){if(this.isActive===e)return;const t=this.olMap.getViewport();e?(this.interactionResources.forEach(s=>this.olMap.addInteraction(s.interaction)),this.tooltip.setText(this.tooltipMessage),t.classList.remove(ye),t.classList.add(se),this.isActive=!0):(this.interactionResources.forEach(s=>this.olMap.removeInteraction(s.interaction)),this.tooltip.setText(this.tooltipDisabledMessage),t.classList.remove(se),t.classList.add(ye),this.isActive=!1)}createDragBox(e,t,s,n){const r=new it({className:"selection-drag-box",condition:jn});return e.addInteraction(r),r.on("boxend",function(){t(r.getGeometry())}),{interaction:r,destroy(){e.removeInteraction(r),n.splice(n.indexOf(this)),r.dispose(),s.classList.remove(se),s.classList.remove(ye),s.oncontextmenu=null}}}createDrag(e,t,s){const n=function(a){return a.originalEvent.button==2},r=new rt({condition:n});return e.addInteraction(r),{interaction:r,destroy(){e.removeInteraction(r),s.splice(s.indexOf(this)),r.dispose(),t.classList.remove(se),t.classList.remove(ye),t.oncontextmenu=null}}}createHelpTooltip(e,t){const s=document.createElement("div");s.className="selection-tooltip printing-hide",s.role="tooltip";const n=document.createElement("span");n.textContent=t,s.appendChild(n);const r=new Fe({element:s,offset:[15,0],positioning:"center-left"}),o=e.on("pointermove",a=>{r.setPosition(a.coordinate)});return e.addOverlay(r),{overlay:r,element:s,destroy(){e.removeOverlay(r),r.dispose(),N(o)},setText(a){n.textContent=a}}}getDragboxInteraction(){return this.interactionResources.find(e=>e.interaction instanceof it)}getDragPanInteraction(){return this.interactionResources.find(e=>e.interaction instanceof rt)}}const ke=fe("selection:SelectionController"),Ni=1e4;var de,he,ge,Ee,qt;class ki{constructor(e){x(this,Ee);x(this,de);x(this,he);x(this,ge);const{mapModel:t,onError:s,maxResults:n=Ni}=e;w(this,de,t),w(this,he,n),w(this,ge,s)}destroy(){}async select(e,t){if(t)return await ne(this,Ee,qt).call(this,e,t)}}de=new WeakMap,he=new WeakMap,ge=new WeakMap,Ee=new WeakSet,qt=async function(e,t){const s=v(this,de).olMap.getView().getProjection();try{ke.debug(`Starting selection on source '${e.label}'`);const n=v(this,he);let r=await e.select({type:"extent",extent:t},{maxResults:n,mapProjection:s,signal:new AbortController().signal});return r.length>n&&(r=r.slice(0,n)),ke.debug(`Found ${r.length} results on source '${e.label}'`),{source:e,results:r}}catch(n){ke.error(`selection from source ${e.label} failed`,n),v(this,ge).call(this);return}};const Oi={classNamePrefix:"react-select",menuPosition:"fixed",isSearchable:!1,isClearable:!1},vr=i=>{const e=Ye(),{sources:t,onSelectionComplete:s,onSelectionSourceChanged:n}=i,{containerProps:r}=H("selection",i),o=e.formatMessage({id:"sourceNotAvailable"}),[a,l]=Di(t,n),c=Xt(a,o),u=B(i),{onExtentSelected:h}=Gi(u.map,t,a,s),f=Hi(),[g,p]=m.useState(!1);Vi(u.map,e,h,c.kind==="available",!!a);const y=m.useMemo(()=>t.map(S=>({label:S.label,value:S})),[t]),b=m.useMemo(()=>y.find(L=>L.value===a)||null,[y,a]),F=V(S=>{l(S?.value)}),O=V(S=>{!g&&S.key==="Enter"&&p(!0)});return d.jsx(Qn,{...r,spacing:2,children:d.jsxs(xe,{children:[d.jsx(we,{children:e.formatMessage({id:"selectSource"})}),d.jsx(Nt,{className:"selection-source react-select",...Oi,options:y,placeholder:e.formatMessage({id:"selectionPlaceholder"}),value:b,onChange:F,components:{Option:ji,SingleValue:Ri},isOptionDisabled:()=>!1,getOptionLabel:S=>{const L=S.label,E=Jt(S.value,o);return E.kind=="available"?L:L+" "+E.reason},ariaLiveMessages:{guidance:()=>"",onChange:S=>S.action=="select-option"||S.action=="initial-input-focus"?S.label+" "+e.formatMessage({id:"selected"}):"",onFilter:()=>"",onFocus:()=>""},chakraStyles:f,onKeyDown:O,menuIsOpen:g,onMenuOpen:()=>p(!0),onMenuClose:()=>p(!1)})]})})};function ji(i){const{value:e}=i.data,{isAvailable:t,content:s}=Yt(e,!1);return d.jsx(k.Option,{...i,isDisabled:!t,className:"selection-source-option",children:s})}function Ri(i){const{value:e}=i.data,{isAvailable:t,content:s}=Yt(e,!0),n=t?"selection-source-value":"selection-source-value selection-source-value--disabled";return d.jsx(k.SingleValue,{...i,isDisabled:!t,className:n,children:s})}function Di(i,e){const[t,s]=m.useState(()=>i[0]);m.useEffect(()=>{t&&!i.includes(t)&&s(void 0)},[i,t]);const n=m.useRef(void 0);return m.useEffect(()=>{t!==n.current&&(n.current=t,e?.({source:t}))},[t,e]),[t,s]}function Yt(i,e){const t=Ye(),s=i?.label,n=t.formatMessage({id:"sourceNotAvailable"}),r=Xt(i,n);return{isAvailable:r.kind==="available",content:d.jsxs(ot,{direction:"row",alignItems:"center",grow:1,children:[!e&&d.jsx(ot,{grow:1,children:s}),r.kind==="unavailable"&&d.jsx(P,{ml:2,children:d.jsx(Un,{label:r.reason,placement:"right",openDelay:500,children:d.jsx(D.span,{children:d.jsx(Wn,{as:es,color:"red",className:"warning-icon","aria-label":r.reason})})})}),e&&s]})}}function Gi(i,e,t,s){const n=Ti("notifier.NotificationService"),r=Ye(),[o,a]=m.useState(void 0);m.useEffect(()=>{if(!i)return;const c=new ki({mapModel:i,onError(){n.notify({level:"error",message:r.formatMessage({id:"selectionFailed"})})}});return a(c),()=>{c.destroy()}},[i,n,e,r]);const l=V(async c=>{if(!o||!t)return;const u=await o.select(t,c.getExtent());u&&s?.(u)});return{controller:o,onExtentSelected:l}}function Jt(i,e){const t=i.status??"available",s=typeof t=="string"?{kind:t}:t;return s.kind==="available"?s:{kind:"unavailable",reason:s.reason??e}}function Xt(i,e){return te(()=>i?Jt(i,e):{kind:"unavailable",reason:e},[i,e])}function Vi(i,e,t,s,n){m.useEffect(()=>{if(!i)return;const r=n?e.formatMessage({id:"disabledTooltip"}):e.formatMessage({id:"noSourceTooltip"}),o=new Ai(i.olMap,e.formatMessage({id:"tooltip"}),r,t);return o.setActive(s),()=>{o?.destroy()}},[i,e,t,s,n])}function Hi(){const[i,e]=It("colors",["background_body","border"],["#ffffff","#ffffff"]);return m.useMemo(()=>({control:s=>({...s,cursor:"pointer"}),indicatorSeparator:s=>({...s,borderColor:e}),dropdownIndicator:s=>({...s,backgroundColor:i})}),[i,e])}const Zt="@open-pioneer/printing",Qt=$e.bind(void 0,Zt),Bi=z.bind(void 0,Zt),$i="map";class Ui{olMap;i18n;printingService;viewPadding;printMap=void 0;overlay=void 0;constructor(e,t,s){this.olMap=e,this.printingService=t,this.i18n=s}destroy(){this.reset()}setViewPadding(e){this.viewPadding=e}async handleMapExport(e){if(this.olMap)try{this.begin(),this.printMap=await this.printingService.printMap(this.olMap,{blockUserInteraction:!1,viewPadding:this.viewPadding});const t=this.printMap.getCanvas();if(t)e.fileFormat=="png"?await this.exportMapInPNG(t,e):await this.exportMapInPDF(t,e);else throw new Error("Canvas export failed")}finally{this.reset()}}begin(){const e=this.olMap.getTargetElement();e&&(this.overlay=Jn(e,this.i18n.overlayText))}reset(){this.overlay?.destroy(),this.overlay=void 0}getTitleAndFileName(e){const t=e.title||"",s=e.title||$i;return{title:t,fileName:s}}async exportMapInPNG(e,t){const s=document.createElement("canvas");s.width=e.width,s.height=e.height+50,s.style.backgroundColor="#fff";const n=s.getContext("2d");if(!n)throw new Error("2d canvas rendering context not available");const{title:r,fileName:o}=this.getTitleAndFileName(t);n.fillStyle="#fff",n.fillRect(0,0,s.width,s.height),n.font="20px bold sans-serif",n.textAlign="center",n.fillStyle="#000";const a=s.width/2;n.fillText(r,a,20),n.drawImage(e,0,50);const l=document.createElement("a");l.setAttribute("download",o+".png");const c=Xn(s);if(!c)throw new Error("Failed to get image data URL");l.href=c,l.click()}async exportMapInPDF(e,t){const{jsPDF:s}=await ts(async()=>{const{jsPDF:F}=await import("./BormsuGtFsVQ.js");return{jsPDF:F}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]),import.meta.url),n=new s({orientation:"landscape",unit:"mm",format:"a4"}),r=n.internal.pageSize.getWidth(),o=n.internal.pageSize.getHeight(),a=15,l=20,c=o-l;n.setFontSize(20);const{title:u,fileName:h}=this.getTitleAndFileName(t);n.text(u,r/2,a,{align:"center"});const f=e.width/e.height;let g=c,p=g*f;p>=r&&(p=r,g=p/f);const y=(r-p)/2,b=l+(c-g)/2;n.addImage(e,"",y,b,p,g),n.save(h+".pdf")}}const Wi=fe("printing"),Sr=i=>{const e=Bi(),{viewPadding:t="auto"}=i,{containerProps:s}=H("printing",i),[n,r]=m.useState("pdf"),[o,a]=m.useState(""),[l,c]=m.useState(!1),u=Qt("notifier.NotificationService"),{map:h}=B(i),f=zi(h,e,t);function g(y){(y==="png"||y==="pdf")&&r(y)}function p(){l||!f||(c(!0),f.handleMapExport({title:o,fileFormat:n}).catch(y=>{const b=e.formatMessage({id:"printingFailed"});u.notify({level:"error",message:b}),Wi.error("Failed to print the map",y)}).finally(()=>{c(!1)}))}return d.jsx(P,{...s,children:d.jsxs(P,{as:"form",m:2,alignItems:"center",onSubmit:y=>{y.preventDefault(),p()},children:[d.jsxs(xe,{as:Ge,mb:2,children:[d.jsx(we,{minWidth:"82",mb:1,children:e.formatMessage({id:"title"})}),d.jsx(We,{placeholder:e.formatMessage({id:"input.placeholder"}),value:o,onChange:y=>{a(y.target.value)},autoFocus:!0})]}),d.jsxs(xe,{as:Ge,mb:2,children:[d.jsx(we,{minWidth:"82",mb:1,children:e.formatMessage({id:"fileFormat"})}),d.jsxs(ze,{value:n,onChange:y=>g(y.target.value),className:"printing-select",children:[d.jsx("option",{value:"png",children:"PNG"}),d.jsx("option",{value:"pdf",children:"PDF"})]})]}),d.jsx(Ft,{isLoading:l,loadingText:e.formatMessage({id:"printingMap"}),disabled:l,mt:2,p:2,className:"printing-export-button",type:"submit",width:"100%",children:e.formatMessage({id:"export"})})]})})};function zi(i,e,t){const s=Qt("printing.PrintingService"),[n,r]=m.useState(void 0);return m.useEffect(()=>{if(!i)return;const o=new Ui(i.olMap,s,{overlayText:e.formatMessage({id:"printingMap"})});return r(o),()=>{o.destroy(),r(void 0)}},[i,e,s]),m.useEffect(()=>{n?.setViewPadding(t)},[n,t]),n}export{gr as C,ur as E,We as I,pr as L,yr as M,hr as N,Fe as O,Sr as P,Gt as S,dr as V,cr as W,fr as a,mr as b,_r as c,vr as d,ze as e,ps as u}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./w7OhIb2wibYa.js","./CmsKOCeNyeyo.js","./BEc19nv24p4W.js","./Bh0CuZ3gy5tC.js","./p-jlpmJ86TPh.js","./Cq1ZpfgEg4XJ.js","./BO_q12Vdyug-.js","./Tz2xttM4F6S2.js","./DUys4rac0YQP.js","./CL_VRsbiqLzM.js"])))=>i.map(i=>d[i]); +var en=Object.defineProperty;var Je=i=>{throw TypeError(i)};var tn=(i,e,t)=>e in i?en(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var _=(i,e,t)=>tn(i,typeof e!="symbol"?e+"":e,t),Ie=(i,e,t)=>e.has(i)||Je("Cannot "+t);var v=(i,e,t)=>(Ie(i,e,"read from private field"),t?t.call(i):e.get(i)),x=(i,e,t)=>e.has(i)?Je("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),w=(i,e,t,s)=>(Ie(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t),ne=(i,e,t)=>(Ie(i,e,"access private method"),t);import{aJ as nn,bc as sn,bd as rn,be as on,bf as an,aU as ln,b0 as cn,bg as un,bh as dn,K as hn,bi as gn,b5 as fn,j as N,bj as mn,bk as pn,bl as yn,bm as St,bn as _n,bo as vn,a as ee,b as Ce,aQ as _e,bp as Xe,bq as K,ad as Ze,I as j,br as Te,b3 as Z,as as Qe,bs as me,bt as et,bu as A,o as C,bv as U,bw as Oe,bx as Sn,by as xn,z as wn,bz as je,bA as bn,bB as Mn,bC as xt,at as wt,bD as En,bE as Cn,bF as tt,bG as Pn,bH as nt,bI as Fn,bJ as st,r as He,b4 as Be,bK as bt,bL as Ln,b6 as In,f as $e,u as z,b2 as H,i as B,B as P,bM as Tn,b9 as Pe,bN as An,ar as ve,bO as Nn,bP as kn,c as Se,aC as ie,F as Re,C as On,bQ as it,bR as jn,bS as rt,k as ot}from"./p-jlpmJ86TPh.js";import{u as Rn,m as Dn,r as m,n as Gn,h as Ue,o as Mt,p as Et,q as Ct,j as d,f as D,s as Vn,t as Hn,c as fe,b as Pt,v as at,B as Ft,C as Bn,w as $n,i as Lt,x as It,l as Un,I as Wn}from"./Bh0CuZ3gy5tC.js";import{G as Tt,i as zn}from"./0Ump2O8Jg_uq.js";import{a as Kn}from"./D8rToQP6FvST.js";import{D as At,S as qn,I as Yn,c as Jn,a as Xn}from"./Ds9MLKVSYIgg.js";import{u as V}from"./Cq1ZpfgEg4XJ.js";import{T as Q,L as Zn,V as Qn}from"./Tz2xttM4F6S2.js";import{u as te,F as k,r as Nt}from"./BEc19nv24p4W.js";import{c as kt}from"./D03oE8cEQPSj.js";import{L as De}from"./BWsYSh9PkSaL.js";import{u as Ot,F as xe}from"./BO_q12Vdyug-.js";import{F as we}from"./CreVQ-qFRzOc.js";import{H as Ge}from"./L25RkWOQSN8A.js";import{F as es}from"./CL_VRsbiqLzM.js";import{_ as ts}from"./CmsKOCeNyeyo.js";function ns(i){const{theme:e}=Rn(),t=Dn();return m.useMemo(()=>Gn(e.direction,{...t,...i}),[i,e.direction,t])}var We=Ue(function(e,t){const{htmlSize:s,...n}=e,r=Mt("Input",n),o=Et(n),a=Ot(o),l=Ct("chakra-input",e.className);return d.jsx(D.input,{size:s,...a,__css:r.field,ref:t,className:l})});We.displayName="Input";We.id="Input";var jt=Ue(function(e,t){const{children:s,placeholder:n,className:r,...o}=e;return d.jsxs(D.select,{...o,ref:t,className:Ct("chakra-select",r),children:[n&&d.jsx("option",{value:"",children:n}),s]})});jt.displayName="SelectField";function ss(i,e){const t={},s={};for(const[n,r]of Object.entries(i))e.includes(n)?t[n]=r:s[n]=r;return[t,s]}var ze=Ue((i,e)=>{var t;const s=Mt("Select",i),{rootProps:n,placeholder:r,icon:o,color:a,height:l,h:c,minH:u,minHeight:h,iconColor:f,iconSize:g,...p}=Et(i),[y,b]=ss(p,Hn),F=Ot(b),O={width:"100%",height:"fit-content",position:"relative",color:a},S={paddingEnd:"2rem",...s.field,_focus:{zIndex:"unset",...(t=s.field)==null?void 0:t._focus}};return d.jsxs(D.div,{className:"chakra-select__wrapper",__css:O,...y,...n,children:[d.jsx(jt,{ref:e,height:c??l,minH:u??h,placeholder:r,...F,__css:S,children:i.children}),d.jsx(Rt,{"data-disabled":Vn(F.disabled),...(f||a)&&{color:f||a},__css:s.icon,...g&&{fontSize:g},children:o})]})});ze.displayName="Select";var is=i=>d.jsx("svg",{viewBox:"0 0 24 24",...i,children:d.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),rs=D("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),Rt=i=>{const{children:e=d.jsx(is,{}),...t}=i,s=m.cloneElement(e,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return d.jsx(rs,{...t,className:"chakra-select__icon-wrapper",children:m.isValidElement(e)?s:null})};Rt.displayName="SelectIcon";const M={ELEMENT:"element",MAP:"map",OFFSET:"offset",POSITION:"position",POSITIONING:"positioning"};class Fe extends nn{constructor(e){super(),this.on,this.once,this.un,this.options=e,this.id=e.id,this.insertFirst=e.insertFirst!==void 0?e.insertFirst:!0,this.stopEvent=e.stopEvent!==void 0?e.stopEvent:!0,this.element=document.createElement("div"),this.element.className=e.className!==void 0?e.className:"ol-overlay-container "+sn,this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.autoPan=e.autoPan===!0?{}:e.autoPan||void 0,this.rendered={transform_:"",visible:!0},this.mapPostrenderListenerKey=null,this.addChangeListener(M.ELEMENT,this.handleElementChanged),this.addChangeListener(M.MAP,this.handleMapChanged),this.addChangeListener(M.OFFSET,this.handleOffsetChanged),this.addChangeListener(M.POSITION,this.handlePositionChanged),this.addChangeListener(M.POSITIONING,this.handlePositioningChanged),e.element!==void 0&&this.setElement(e.element),this.setOffset(e.offset!==void 0?e.offset:[0,0]),this.setPositioning(e.positioning||"top-left"),e.position!==void 0&&this.setPosition(e.position)}getElement(){return this.get(M.ELEMENT)}getId(){return this.id}getMap(){return this.get(M.MAP)||null}getOffset(){return this.get(M.OFFSET)}getPosition(){return this.get(M.POSITION)}getPositioning(){return this.get(M.POSITIONING)}handleElementChanged(){rn(this.element);const e=this.getElement();e&&this.element.appendChild(e)}handleMapChanged(){this.mapPostrenderListenerKey&&(on(this.element),an(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);const e=this.getMap();if(e){this.mapPostrenderListenerKey=ln(e,cn.POSTRENDER,this.render,this),this.updatePixelPosition();const t=this.stopEvent?e.getOverlayContainerStopEvent():e.getOverlayContainer();this.insertFirst?t.insertBefore(this.element,t.childNodes[0]||null):t.appendChild(this.element),this.performAutoPan()}}render(){this.updatePixelPosition()}handleOffsetChanged(){this.updatePixelPosition()}handlePositionChanged(){this.updatePixelPosition(),this.performAutoPan()}handlePositioningChanged(){this.updatePixelPosition()}setElement(e){this.set(M.ELEMENT,e)}setMap(e){this.set(M.MAP,e)}setOffset(e){this.set(M.OFFSET,e)}setPosition(e){this.set(M.POSITION,e)}performAutoPan(){this.autoPan&&this.panIntoView(this.autoPan)}panIntoView(e){const t=this.getMap();if(!t||!t.getTargetElement()||!this.get(M.POSITION))return;const s=this.getRect(t.getTargetElement(),t.getSize()),n=this.getElement(),r=this.getRect(n,[un(n),dn(n)]);e=e||{};const o=e.margin===void 0?20:e.margin;if(!hn(s,r)){const a=r[0]-s[0],l=s[2]-r[2],c=r[1]-s[1],u=s[3]-r[3],h=[0,0];if(a<0?h[0]=a-o:l<0&&(h[0]=Math.abs(l)+o),c<0?h[1]=c-o:u<0&&(h[1]=Math.abs(u)+o),h[0]!==0||h[1]!==0){const f=t.getView().getCenterInternal(),g=t.getPixelFromCoordinateInternal(f);if(!g)return;const p=[g[0]+h[0],g[1]+h[1]],y=e.animation||{};t.getView().animateInternal({center:t.getCoordinateFromPixelInternal(p),duration:y.duration,easing:y.easing})}}}getRect(e,t){const s=e.getBoundingClientRect(),n=s.left+window.pageXOffset,r=s.top+window.pageYOffset;return[n,r,n+t[0],r+t[1]]}setPositioning(e){this.set(M.POSITIONING,e)}setVisible(e){this.rendered.visible!==e&&(this.element.style.display=e?"":"none",this.rendered.visible=e)}updatePixelPosition(){const e=this.getMap(),t=this.getPosition();if(!e||!e.isRendered()||!t){this.setVisible(!1);return}const s=e.getPixelFromCoordinate(t),n=e.getSize();this.updateRenderedPosition(s,n)}updateRenderedPosition(e,t){const s=this.element.style,n=this.getOffset(),r=this.getPositioning();this.setVisible(!0);const o=Math.round(e[0]+n[0])+"px",a=Math.round(e[1]+n[1])+"px";let l="0%",c="0%";r=="bottom-right"||r=="center-right"||r=="top-right"?l="-100%":(r=="bottom-center"||r=="center-center"||r=="top-center")&&(l="-50%"),r=="bottom-left"||r=="bottom-center"||r=="bottom-right"?c="-100%":(r=="center-left"||r=="center-center"||r=="center-right")&&(c="-50%");const u=`translate(${l}, ${c}) translate(${o}, ${a})`;this.rendered.transform_!=u&&(this.rendered.transform_=u,s.transform=u)}getOptions(){return this.options}}const cr=gn,os=25.4/.28,as=39.37;function Ke(i){return qe(i,ls,cs)}function ls(i){return i.getView()}function cs(i,e){return i.on("change:view",e)}function Dt(i){return Ke(i)?.getProjection()}function us(i){const e=Ke(i);return qe(e,ds,hs)}function ds(i){return i.getResolution()}function hs(i,e){return i.on("change:resolution",e)}function gs(i){const e=Ke(i);return qe(e,fs,ms)}function fs(i){return i.getCenter()}function ms(i,e){return i.on("change:center",e)}function ps(i){const e=gs(i),t=us(i),s=Dt(i);return m.useMemo(()=>{if(s==null||t==null||e==null)return;const r=fn(s,t,e);return Math.round(r*as*os)},[s,t,e])}function qe(i,e,t){const s=m.useCallback(()=>i?e(i):void 0,[i,e]),n=m.useCallback(r=>{if(!i)return()=>{};const o=t(i,r);return()=>N(o)},[i,t]);return m.useSyncExternalStore(n,s)}const lt=0,re=1,ct=[0,0,0,0],q=[],Ae={MODIFYSTART:"modifystart",MODIFYEND:"modifyend"};class Ne extends wt{constructor(e,t,s){super(e),this.features=t,this.mapBrowserEvent=s}}class ys extends mn{constructor(e){super(e),this.on,this.once,this.un,this.boundHandleFeatureChange_=this.handleFeatureChange_.bind(this),this.condition_=e.condition?e.condition:pn,this.defaultDeleteCondition_=function(s){return yn(s)&&St(s)},this.deleteCondition_=e.deleteCondition?e.deleteCondition:this.defaultDeleteCondition_,this.insertVertexCondition_=e.insertVertexCondition?e.insertVertexCondition:_n,this.vertexFeature_=null,this.vertexSegments_=null,this.lastPixel_=[0,0],this.ignoreNextSingleClick_=!1,this.featuresBeingModified_=null,this.rBush_=new vn,this.pixelTolerance_=e.pixelTolerance!==void 0?e.pixelTolerance:10,this.snappedToVertex_=!1,this.changingFeature_=!1,this.dragSegments_=[],this.overlay_=new ee({source:new Ce({useSpatialIndex:!1,wrapX:!!e.wrapX}),style:e.style?e.style:vs(),updateWhileAnimating:!0,updateWhileInteracting:!0}),this.SEGMENT_WRITERS_={Point:this.writePointGeometry_.bind(this),LineString:this.writeLineStringGeometry_.bind(this),LinearRing:this.writeLineStringGeometry_.bind(this),Polygon:this.writePolygonGeometry_.bind(this),MultiPoint:this.writeMultiPointGeometry_.bind(this),MultiLineString:this.writeMultiLineStringGeometry_.bind(this),MultiPolygon:this.writeMultiPolygonGeometry_.bind(this),Circle:this.writeCircleGeometry_.bind(this),GeometryCollection:this.writeGeometryCollectionGeometry_.bind(this)},this.source_=null,this.hitDetection_=null;let t;if(e.features?t=e.features:e.source&&(this.source_=e.source,t=new _e(this.source_.getFeatures()),this.source_.addEventListener(Xe.ADDFEATURE,this.handleSourceAdd_.bind(this)),this.source_.addEventListener(Xe.REMOVEFEATURE,this.handleSourceRemove_.bind(this))),!t)throw new Error("The modify interaction requires features, a source or a layer");e.hitDetection&&(this.hitDetection_=e.hitDetection),this.features_=t,this.features_.forEach(this.addFeature_.bind(this)),this.features_.addEventListener(K.ADD,this.handleFeatureAdd_.bind(this)),this.features_.addEventListener(K.REMOVE,this.handleFeatureRemove_.bind(this)),this.lastPointerEvent_=null,this.delta_=[0,0],this.snapToPointer_=e.snapToPointer===void 0?!this.hitDetection_:e.snapToPointer}addFeature_(e){const t=e.getGeometry();if(t){const n=this.SEGMENT_WRITERS_[t.getType()];n&&n(e,t)}const s=this.getMap();s&&s.isRendered()&&this.getActive()&&this.handlePointerAtPixel_(this.lastPixel_,s),e.addEventListener(Ze.CHANGE,this.boundHandleFeatureChange_)}willModifyFeatures_(e,t){if(!this.featuresBeingModified_){this.featuresBeingModified_=new _e;const s=this.featuresBeingModified_.getArray();for(let n=0,r=t.length;n=0;--n){const r=s[n];for(let o=this.dragSegments_.length-1;o>=0;--o)this.dragSegments_[o][0]===r&&this.dragSegments_.splice(o,1);t.remove(r)}}setActive(e){this.vertexFeature_&&!e&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),super.setActive(e)}setMap(e){this.overlay_.setMap(e),super.setMap(e)}getOverlay(){return this.overlay_}handleSourceAdd_(e){e.feature&&this.features_.push(e.feature)}handleSourceRemove_(e){e.feature&&this.features_.remove(e.feature)}handleFeatureAdd_(e){this.addFeature_(e.element)}handleFeatureChange_(e){if(!this.changingFeature_){const t=e.target;this.removeFeature_(t),this.addFeature_(t)}}handleFeatureRemove_(e){this.removeFeature_(e.element)}writePointGeometry_(e,t){const s=t.getCoordinates(),n={feature:e,geometry:t,segment:[s,s]};this.rBush_.insert(t.getExtent(),n)}writeMultiPointGeometry_(e,t){const s=t.getCoordinates();for(let n=0,r=s.length;n=0;--c)this.insertVertex_(n[c],r)}return!!this.vertexFeature_}handleUpEvent(e){for(let t=this.dragSegments_.length-1;t>=0;--t){const s=this.dragSegments_[t][0],n=s.geometry;if(n.getType()==="Circle"){const r=n.getCenter(),o=s.featureSegments[0],a=s.featureSegments[1];o.segment[0]=r,o.segment[1]=r,a.segment[0]=r,a.segment[1]=r,this.rBush_.update(Te(r),o);let l=n;this.rBush_.update(l.getExtent(),a)}else this.rBush_.update(j(s.segment),s)}return this.featuresBeingModified_&&(this.dispatchEvent(new Ne(Ae.MODIFYEND,this.featuresBeingModified_,e)),this.featuresBeingModified_=null),!1}handlePointerMove_(e){this.lastPixel_=e.pixel,this.handlePointerAtPixel_(e.pixel,e.map,e.coordinate)}handlePointerAtPixel_(e,t,s){const n=s||t.getCoordinateFromPixel(e);t.getView().getProjection();const r=function(l,c){return ut(n,l)-ut(n,c)};let o,a;if(this.hitDetection_){const l=typeof this.hitDetection_=="object"?c=>c===this.hitDetection_:void 0;t.forEachFeatureAtPixel(e,(c,u,h)=>{h&&h.getType()==="Point"&&(h=new Qe(Oe(h.getCoordinates())));const f=h||c.getGeometry();if(c instanceof Z&&this.features_.getArray().includes(c)){a=f;const g=c.getGeometry().getFlatCoordinates().slice(0,2);o=[{feature:c,geometry:a,segment:[g,g]}]}return!0},{layerFilter:l})}if(!o){const l=Sn(Te(n,ct)),c=t.getView().getResolution()*this.pixelTolerance_,u=xn(wn(l,c,ct));o=this.rBush_.getInExtent(u)}if(o&&o.length>0){const l=o.sort(r)[0],c=l.segment;let u=dt(n,l);const h=t.getPixelFromCoordinate(u);let f=et(e,h);if(a||f<=this.pixelTolerance_){const g={};if(g[C(c)]=!0,this.snapToPointer_||(this.delta_[0]=u[0]-n[0],this.delta_[1]=u[1]-n[1]),l.geometry.getType()==="Circle"&&l.index===re)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(u,[l.feature],[l.geometry]);else{const p=t.getPixelFromCoordinate(c[0]),y=t.getPixelFromCoordinate(c[1]),b=je(h,p),F=je(h,y);f=Math.sqrt(Math.min(b,F)),this.snappedToVertex_=f<=this.pixelTolerance_,this.snappedToVertex_&&(u=b>F?c[1]:c[0]),this.createOrUpdateVertexFeature_(u,[l.feature],[l.geometry]);const O={};O[C(l.geometry)]=!0;for(let S=1,L=o.length;S=0;--l)o=e[l],g=o[0],p=C(g.feature),g.depth&&(p+="-"+g.depth.join("-")),p in t||(t[p]={}),o[1]===0?(t[p].right=g,t[p].index=g.index):o[1]==1&&(t[p].left=g,t[p].index=g.index+1);for(p in t){switch(f=t[p].right,u=t[p].left,c=t[p].index,h=c-1,u!==void 0?g=u:g=f,h<0&&(h=0),a=g.geometry,r=a.getCoordinates(),n=r,s=!1,a.getType()){case"MultiLineString":r[g.depth[0]].length>2&&(r[g.depth[0]].splice(c,1),s=!0);break;case"LineString":r.length>2&&(r.splice(c,1),s=!0);break;case"MultiPolygon":n=n[g.depth[1]];case"Polygon":n=n[g.depth[0]],n.length>4&&(c==n.length-1&&(c=0),n.splice(c,1),s=!0,c===0&&(n.pop(),n.push(n[0]),h=n.length-1));break}if(s){this.setGeometryCoordinates_(a,r);const y=[];if(u!==void 0&&(this.rBush_.remove(u),y.push(u.segment[0])),f!==void 0&&(this.rBush_.remove(f),y.push(f.segment[1])),u!==void 0&&f!==void 0){const b={depth:g.depth,feature:g.feature,geometry:g.geometry,index:h,segment:y};this.rBush_.insert(j(b.segment),b)}this.updateSegmentIndices_(a,c,g.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),e.length=0}}return s}setGeometryCoordinates_(e,t){this.changingFeature_=!0,e.setCoordinates(t),this.changingFeature_=!1}updateSegmentIndices_(e,t,s,n){this.rBush_.forEachInExtent(e.getExtent(),function(r){r.geometry===e&&(s===void 0||r.depth===void 0||bn(r.depth,s))&&r.index>t&&(r.index+=n)})}}function _s(i,e){return i.index-e.index}function ut(i,e,t){const s=e.geometry;if(s.getType()==="Circle"){let r=s;if(e.index===re){const o=je(r.getCenter(),A(i)),a=Math.sqrt(o)-r.getRadius();return a*a}}const n=A(i);return q[0]=A(e.segment[0]),q[1]=A(e.segment[1]),En(n,q)}function dt(i,e,t){const s=e.geometry;if(s.getType()==="Circle"&&e.index===re)return Oe(s.getClosestPoint(A(i)));const n=A(i);return q[0]=A(e.segment[0]),q[1]=A(e.segment[1]),Oe(Mn(n,q))}function vs(){const i=xt();return function(e,t){return i.Point}}const Ss={SELECT:"select"};class xs extends wt{constructor(e,t,s,n){super(e),this.selected=t,this.deselected=s,this.mapBrowserEvent=n}}const pe={};class Gt extends Cn{constructor(e){super(),this.on,this.once,this.un,e=e||{},this.boundAddFeature_=this.addFeature_.bind(this),this.boundRemoveFeature_=this.removeFeature_.bind(this),this.condition_=e.condition?e.condition:St,this.addCondition_=e.addCondition?e.addCondition:tt,this.removeCondition_=e.removeCondition?e.removeCondition:tt,this.toggleCondition_=e.toggleCondition?e.toggleCondition:Pn,this.multi_=e.multi?e.multi:!1,this.filter_=e.filter?e.filter:nt,this.hitTolerance_=e.hitTolerance?e.hitTolerance:0,this.style_=e.style!==void 0?e.style:ws(),this.features_=e.features||new _e;let t;if(e.layers)if(typeof e.layers=="function")t=e.layers;else{const s=e.layers;t=function(n){return s.includes(n)}}else t=nt;this.layerFilter_=t,this.featureLayerAssociation_={}}addFeatureLayerAssociation_(e,t){this.featureLayerAssociation_[C(e)]=t}getFeatures(){return this.features_}getHitTolerance(){return this.hitTolerance_}getLayer(e){return this.featureLayerAssociation_[C(e)]}setHitTolerance(e){this.hitTolerance_=e}setMap(e){this.getMap()&&this.style_&&this.features_.forEach(this.restorePreviousStyle_.bind(this)),super.setMap(e),e?(this.features_.addEventListener(K.ADD,this.boundAddFeature_),this.features_.addEventListener(K.REMOVE,this.boundRemoveFeature_),this.style_&&this.features_.forEach(this.applySelectedStyle_.bind(this))):(this.features_.removeEventListener(K.ADD,this.boundAddFeature_),this.features_.removeEventListener(K.REMOVE,this.boundRemoveFeature_))}addFeature_(e){const t=e.element;if(this.style_&&this.applySelectedStyle_(t),!this.getLayer(t)){const s=this.getMap().getAllLayers().find(function(n){if(n instanceof ee&&n.getSource()&&n.getSource().hasFeature(t))return n});s&&this.addFeatureLayerAssociation_(t,s)}}removeFeature_(e){this.style_&&this.restorePreviousStyle_(e.element)}getStyle(){return this.style_}applySelectedStyle_(e){const t=C(e);t in pe||(pe[t]=e.getStyle()),e.setStyle(this.style_)}restorePreviousStyle_(e){const t=this.getMap().getInteractions().getArray();for(let n=t.length-1;n>=0;--n){const r=t[n];if(r!==this&&r instanceof Gt&&r.getStyle()&&r.getFeatures().getArray().lastIndexOf(e)!==-1){e.setStyle(r.getStyle());return}}const s=C(e);e.setStyle(pe[s]),delete pe[s]}removeFeatureLayerAssociation_(e){delete this.featureLayerAssociation_[C(e)]}handleEvent(e){if(!this.condition_(e))return!0;const t=this.addCondition_(e),s=this.removeCondition_(e),n=this.toggleCondition_(e),r=!t&&!s&&!n,o=e.map,a=this.getFeatures(),l=[],c=[];if(r){Fn(this.featureLayerAssociation_),o.forEachFeatureAtPixel(e.pixel,(u,h)=>{if(!(!(u instanceof Z)||!this.filter_(u,h)))return this.addFeatureLayerAssociation_(u,h),c.push(u),!this.multi_},{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(let u=a.getLength()-1;u>=0;--u){const h=a.item(u),f=c.indexOf(h);f>-1?c.splice(f,1):(a.remove(h),l.push(h))}c.length!==0&&a.extend(c)}else{o.forEachFeatureAtPixel(e.pixel,(u,h)=>{if(!(!(u instanceof Z)||!this.filter_(u,h)))return(t||n)&&!a.getArray().includes(u)?(this.addFeatureLayerAssociation_(u,h),c.push(u)):(s||n)&&a.getArray().includes(u)&&(l.push(u),this.removeFeatureLayerAssociation_(u)),!this.multi_},{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(let u=l.length-1;u>=0;--u)a.remove(l[u]);a.extend(c)}return(c.length>0||l.length>0)&&this.dispatchEvent(new xs(Ss.SELECT,c,l,e)),!0}}function ws(){const i=xt();return st(i.Polygon,i.LineString),st(i.GeometryCollection,i.LineString),function(e){return e.getGeometry()?i[e.getGeometry().getType()]:null}}async function bs(i,e,t,s){const r=s.getCode().replace("EPSG:","http://www.opengis.net/def/crs/EPSG/0/"),o=await i.fetch(e,{method:"POST",body:JSON.stringify({type:"Feature",properties:{},geometry:t}),headers:{"Content-Type":"application/geo+json; charset=utf-8","Content-Crs":`<${r}>`}});if(!o||!o.ok||o.status!==201)throw new Error("Request failed: "+o.status);const a=o.headers.get("location");if(!a)throw new Error("Request failed: no Location response header");const l=a.substring(a.lastIndexOf("/")+1);return Promise.resolve(l)}async function Ms(i,e,t,s,n){const o=n.getCode().replace("EPSG:","http://www.opengis.net/def/crs/EPSG/0/"),a=new URL(`${e.toString()}/${t}`),l=await i.fetch(a,{method:"PATCH",body:JSON.stringify({type:"Feature",properties:{},geometry:s}),headers:{"Content-Type":"application/geo+json; charset=utf-8","Content-Crs":`<${o}>`}});if(!l||!l.ok||l.status!==204)throw new Error("Request failed: "+l.status);return Promise.resolve(t)}function Vt(i,e){const t=document.createElement("div");t.className="editing-tooltip editing-tooltip-hidden",t.role="tooltip";const s=document.createElement("span");s.textContent=e,t.appendChild(s);const n=new Fe({element:t,offset:[15,0],positioning:"center-left"}),r=i.on("pointermove",o=>{o.dragging||n.setPosition(o.coordinate)});return i.addOverlay(n),{destroy(){N(r),i.removeOverlay(n)},setVisible(o){t.classList.toggle("editing-tooltip-hidden",!o)},setText(o){s.textContent=o}}}function Ht(i){let e=ht(i.polygon);Array.isArray(e)&&(e=e[0]);let t=ht(i.vertex);Array.isArray(t)&&(t=t[0]);const s=[];return e&&s.push(e),t&&(t.setGeometry(Es),s.push(t)),s}const Es=i=>{if(i){const e=i.getGeometry();if(e&&e.getType()==="Polygon"){const t=e.getCoordinates()[0];if(t)return new Kn(t)}}},ht=i=>{const e=new Z,s=new ee({style:i}).getStyleFunction();if(!s)throw new Error("can't retrieve style function");const n=s(e,1);if(!n)throw new Error("can't retrieve styles from feature style function");return Array.isArray(n)&&n.length?n.length>1?n:n[0]:n},Cs=fe("editing:EditingCreateWorkflowImpl");var R;class Ps{constructor(e){x(this,R);_(this,"_httpService");_(this,"_intl");_(this,"_map");_(this,"_polygonStyle");_(this,"_vertexStyle");_(this,"_state");_(this,"_editLayerURL");_(this,"_featureId");_(this,"_editingSource");_(this,"_editingLayer");_(this,"_drawInteraction");_(this,"_olMap");_(this,"_tooltip");_(this,"_enterHandler");_(this,"_escapeHandler");_(this,"_error");_(this,"_interactionListener");_(this,"_mapListener");this._httpService=e.httpService,this._intl=e.intl,this._polygonStyle=e.polygonStyle,this._vertexStyle=e.vertexStyle,this._map=e.map,this._olMap=e.map.olMap,this._state=He("active:initialized"),this._editLayerURL=e.ogcApiFeatureLayerUrl,this._editingSource=new Ce,this._editingLayer=new ee({source:this._editingSource,zIndex:Be,properties:{name:"editing-layer"}}),this._drawInteraction=new At({source:this._editingSource,type:"Polygon",style:Ht({polygon:this._polygonStyle,vertex:this._vertexStyle})}),this._tooltip=Vt(this._olMap,this._intl.formatMessage({id:"create.tooltip.begin"})),this._enterHandler=t=>{if((t.code==="Enter"||t.code==="NumpadEnter")&&t.target===this._olMap.getTargetElement()){const s=this._drawInteraction.getOverlay().getSource()?.getFeatures()??[];s[0]&&s[0].getGeometry().getCoordinates()[0].length>4&&this.triggerSave()}},this._escapeHandler=t=>{t.code==="Escape"&&t.target===this._olMap.getTargetElement()&&this.reset()},this._interactionListener=[],this._mapListener=[],this._start()}getDrawInteraction(){return this._drawInteraction}getState(){return this._state.value}_setState(e){this._state.value=e}_save(e){this._setState("active:saving");const t=this._editLayerURL,s=e.getGeometry();if(!s){this._destroy(),this._error=new Error("no geometry available"),v(this,R)?.reject(this._error);return}const n=this._olMap.getView().getProjection(),o=new Tt({dataProjection:n}).writeGeometryObject(s,{rightHanded:!0,decimals:10});this._olMap.removeInteraction(this._drawInteraction),this._tooltip.destroy(),bs(this._httpService,t,o,n).then(a=>{this._featureId=a,this._destroy(),v(this,R)?.resolve({featureId:this._featureId})}).catch(a=>{Cs.error(a),this._destroy(),this._error=new Error("Failed to save feature",{cause:a}),v(this,R)?.reject(this._error)})}_start(){this._olMap.addLayer(this._editingLayer),this._olMap.addInteraction(this._drawInteraction);const e=bt(()=>{const n=this._map.container;if(n)return n.addEventListener("keydown",this._enterHandler,!1),n.addEventListener("keydown",this._escapeHandler,!1),()=>{n.removeEventListener("keydown",this._enterHandler),n.removeEventListener("keydown",this._escapeHandler)}});this._tooltip.setVisible(!0);const t=this._drawInteraction.on("drawstart",()=>{this._setState("active:drawing"),this._tooltip.setText(this._intl.formatMessage({id:"create.tooltip.continue"}))}),s=this._drawInteraction.on("drawend",n=>{const r=n.feature;if(!r){this._destroy(),this._error=new Error("no feature available"),v(this,R)?.reject(this._error);return}this._save(r)});this._interactionListener.push(t,s),this._mapListener.push(e)}reset(){this._drawInteraction.abortDrawing(),this._tooltip.setText(this._intl.formatMessage({id:"create.tooltip.begin"})),this._setState("active:initialized")}stop(){this._destroy(),v(this,R)?.resolve(void 0)}_destroy(){this._olMap.removeLayer(this._editingLayer),this._olMap.removeInteraction(this._drawInteraction),this._tooltip.destroy(),this._interactionListener.forEach(e=>{N(e)}),this._mapListener.forEach(e=>{e.destroy()}),this._setState("destroyed")}triggerSave(){this._drawInteraction.finishDrawing()}whenComplete(){return this._state.value==="destroyed"?this._error?Promise.reject(this._error):this._featureId?Promise.resolve({featureId:this._featureId}):Promise.resolve(void 0):(v(this,R)??w(this,R,Pt())).promise}}R=new WeakMap;var I;class Fs{constructor(e){x(this,I);_(this,"_httpService");_(this,"_intl");_(this,"_map");_(this,"_polygonStyle");_(this,"_vertexStyle");_(this,"_state");_(this,"_editLayerURL");_(this,"_featureId");_(this,"_initialFeature");_(this,"_editFeature");_(this,"_editingSource");_(this,"_editingLayer");_(this,"_modifyInteraction");_(this,"_olMap");_(this,"_tooltip");_(this,"_enterHandler");_(this,"_escapeHandler");_(this,"_error");_(this,"_interactionListener");_(this,"_mapListener");this._httpService=e.httpService,this._intl=e.intl,this._polygonStyle=e.polygonStyle,this._vertexStyle=e.vertexStyle,this._map=e.map,this._olMap=e.map.olMap,this._state=He("active:initialized"),this._editLayerURL=e.ogcApiFeatureLayerUrl,this._initialFeature=e.feature.clone(),this._initialFeature.setId(e.feature.getId()),this._editFeature=e.feature.clone(),this._editFeature.setId(e.feature.getId()),this._editFeature.setStyle(Ht({polygon:this._polygonStyle,vertex:this._vertexStyle})),this._editingSource=new Ce({features:new _e([this._editFeature])}),this._editingLayer=new ee({source:this._editingSource,zIndex:Be,properties:{name:"editing-layer"}}),this._modifyInteraction=new ys({source:this._editingSource}),this._tooltip=Vt(this._olMap,this._intl.formatMessage({id:"create.tooltip.deselect"})),this._enterHandler=t=>{if((t.code==="Enter"||t.code==="NumpadEnter")&&t.target===this._olMap.getTargetElement()){const s=this._editingSource.getFeatures()[0];if(!s)throw Error("no updated feature found");this._save(s)}},this._escapeHandler=t=>{t.code==="Escape"&&t.target===this._olMap.getTargetElement()&&this.reset()},this._interactionListener=[],this._mapListener=[],this._start()}getModifyInteraction(){return this._modifyInteraction}getState(){return this._state.value}_setState(e){this._state.value=e}_save(e){this._setState("active:saving");const t=this._editLayerURL;if(this._featureId=e.getId()?.toString(),!this._featureId){this._destroy(),this._error=new Error("no feature id available"),v(this,I)?.reject(this._error);return}const s=e?.getGeometry();if(!s){this._destroy(),this._error=new Error("no geometry available"),v(this,I)?.reject(this._error);return}const n=this._olMap.getView().getProjection(),o=new Tt({dataProjection:n}).writeGeometryObject(s,{rightHanded:!0,decimals:10});this._olMap.removeInteraction(this._modifyInteraction),this._tooltip.destroy(),Ms(this._httpService,t,this._featureId,o,n).then(a=>{this._destroy(),v(this,I)?.resolve({featureId:a})}).catch(a=>{this._destroy(),this._error=new Error("Failed to save feature",{cause:a}),v(this,I)?.reject(this._error)})}_start(){this._olMap.addLayer(this._editingLayer),this._olMap.addInteraction(this._modifyInteraction);const e=this._editingSource.getFeatures()[0];if(e&&!e.getId()?.toString()){this._destroy(),this._error=new Error("no feature id available"),v(this,I)?.reject(this._error);return}const t=bt(()=>{const r=this._map.container;if(r)return r.addEventListener("keydown",this._enterHandler,!1),r.addEventListener("keydown",this._escapeHandler,!1),()=>{r.removeEventListener("keydown",this._enterHandler),r.removeEventListener("keydown",this._escapeHandler)}});this._tooltip.setVisible(!0);const s=this._map.olMap.on("click",r=>{const o=r.coordinate,a=r.originalEvent.altKey,l=this._editingSource.getFeaturesAtCoordinate(o);a||l.length===0&&this.triggerSave()}),n=this._modifyInteraction.on("modifystart",()=>{this._setState("active:drawing")});this._interactionListener.push(s,n),this._mapListener.push(t)}reset(){const e=this._initialFeature.getGeometry()?.clone(),t=this._editingSource.getFeatures()[0];if(!t)throw Error("no updated feature found");t.setGeometry(e),this._setState("active:initialized")}stop(){this._destroy(),v(this,I)?.resolve(void 0)}_destroy(){this._editingSource.clear(),this._olMap.removeLayer(this._editingLayer),this._olMap.removeInteraction(this._modifyInteraction),this._tooltip.destroy(),this._interactionListener.forEach(e=>{N(e)}),this._mapListener.forEach(e=>{e.destroy()}),this._setState("destroyed")}triggerSave(){const e=this._editingSource.getFeatures()[0];if(!e)throw Error("no updated feature found");this._save(e)}whenComplete(){return this._state.value==="destroyed"?this._error?Promise.reject(this._error):this._featureId?Promise.resolve({featureId:this._featureId}):Promise.resolve(void 0):(v(this,I)??w(this,I,Pt())).promise}}I=new WeakMap;class ur{_serviceOptions;_workflows;constructor(e){this._serviceOptions=e,this._workflows=new Map}createFeature(e,t){if(!t||!e||!e.id)throw new Error("Map, mapId or url is undefined.");const s=e.id;let n=this._workflows.get(s);if(n)throw new Error("EditingWorkflow could not be started. EditingWorkflow already in progress for this map.");return n=new Ps({map:e,ogcApiFeatureLayerUrl:t,polygonStyle:this._serviceOptions.properties.polygonStyle,vertexStyle:this._serviceOptions.properties.vertexStyle,httpService:this._serviceOptions.references.httpService,intl:this._serviceOptions.intl}),this._workflows.set(s,n),this._connectToWorkflowDestroyEvent(n,s),n}updateFeature(e,t,s){if(!t||!e||!e.id)throw new Error("Map, mapId or url is undefined.");const n=e.id;let r=this._workflows.get(n);if(r)throw new Error("EditingWorkflow could not be started. EditingWorkflow already in progress for this map.");return r=new Fs({map:e,ogcApiFeatureLayerUrl:t,feature:s,polygonStyle:this._serviceOptions.properties.polygonStyle,vertexStyle:this._serviceOptions.properties.vertexStyle,httpService:this._serviceOptions.references.httpService,intl:this._serviceOptions.intl}),this._workflows.set(n,r),this._connectToWorkflowDestroyEvent(r,n),r}stop(e){const t=this._workflows.get(e);t&&t.stop()}reset(e){const t=this._workflows.get(e);if(t)t.reset();else throw new Error("No workflow found for mapId: "+e)}_connectToWorkflowDestroyEvent(e,t){const s=Ln(()=>[e.getState()],([n])=>{n==="destroyed"&&(this._workflows.get(t)===e&&this._workflows.delete(t),s.destroy())})}}var W,G,oe,ae,le,Ve;class Ls{constructor(e,t,s){x(this,le);_(this,"label");x(this,W,He({kind:"available"}));x(this,G);x(this,oe);x(this,ae);this.label=t,w(this,G,e),w(this,ae,s),ne(this,le,Ve).call(this),w(this,oe,v(this,G).on("change:visible",()=>{ne(this,le,Ve).call(this)}))}destroy(){N(v(this,oe))}get status(){return v(this,W).value}async select(e,t){if(e.type!=="extent")throw new Error(`Unsupported selection kind: ${e.type}`);if(v(this,W).value.kind!=="available"||v(this,G).getSource()===null)return[];const s=[];v(this,G).getSource().forEachFeatureIntersectingExtent(e.extent,o=>{if(!o.getGeometry())return;const a={...o.getProperties()};delete a.geometries;const l={id:o.getId()?.toString()||In(),geometry:o.getGeometry(),properties:a};s.push(l)});const n=s.filter(o=>o!=null);return n.length>t.maxResults?n.slice(0,t.maxResults):n}}W=new WeakMap,G=new WeakMap,oe=new WeakMap,ae=new WeakMap,le=new WeakSet,Ve=function(){const t=v(this,G).getVisible()?{kind:"available"}:{kind:"unavailable",reason:v(this,ae)};t.kind!==v(this,W).value.kind&&(v(this,W).value=t)};var ce;class dr{constructor({intl:e}){x(this,ce);w(this,ce,e)}createSelectionSource(e){return new Ls(e.vectorLayer,e.label,v(this,ce).formatMessage({id:"layerNotVisibleReason"}))}}ce=new WeakMap;const Is="@open-pioneer/notifier",Ts=$e.bind(void 0,Is),As=kt({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"}),Bt=kt({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"}),Ns=!1;function hr(i){const{position:e="top-right"}=i,t=ns(),s=Ts("notifier.NotificationService"),[n,r]=m.useState(!Ns),o=V(l=>{const c=l.level==="error"?d.jsx(Bt,{h:"100%",w:"100%"}):void 0;t({position:e,title:l.title,description:l.message||null,status:l.level,isClosable:!0,duration:l.displayDuration??null,icon:c})}),a=V(()=>{t.closeAll()});return m.useEffect(()=>{const l=s.registerHandler({showNotification:o,closeAll:a});return()=>l.destroy()},[n,s,o,a]),d.jsx(d.Fragment,{})}const ks="@open-pioneer/coordinate-viewer",Os=z.bind(void 0,ks),js=4,Rs="decimal",gr=i=>{const{precision:e,displayProjectionCode:t,format:s}=i,{containerProps:n}=H("coordinate-viewer",i),{map:r}=B(i),o=r?.olMap,a=Dt(o)?.getCode()??"";let{coordinates:l}=Gs(o);l=l&&t?Hs(l,a,t):l;const c=Ds(l,e,s),u=t||a,h=c?c+" "+u:"";return d.jsx(P,{...n,children:d.jsx(Q,{className:"coordinate-viewer-text",children:h})})};function Ds(i,e,t){const s=Os();return i?Vs(i,e,s,t):""}function Gs(i){const[e,t]=m.useState();return m.useEffect(()=>{if(!i)return;const s=i.on("pointermove",n=>{t(n.coordinate)});return()=>N(s)},[i]),{coordinates:e}}function Vs(i,e,t,s){if(i[0]==null||i[1]==null)return"";const n=e??js,r=s??Rs,[o,a]=i;let l;if(r==="degree"&&isFinite(o)&&isFinite(a)){const[c,u,h]=gt(o,t,n),[f,g,p]=gt(a,t,n),y=`${Math.abs(c)}°${u}'${h}"${0<=c?"(E)":"(W)"}`,b=`${Math.abs(f)}°${g}'${p}"${0<=f?"(N)":"(S)"}`;l=y+" "+b}else{const c=t.formatNumber(o,{maximumFractionDigits:n,minimumFractionDigits:n}),u=t.formatNumber(a,{maximumFractionDigits:n,minimumFractionDigits:n});l=c+" "+u}return l}function gt(i,e,t){const s=Math.floor(i),n=i-s,r=Math.floor(60*n),a=60*(60*n-r),l=e.formatNumber(a,{maximumFractionDigits:t,minimumFractionDigits:t});return[s,r,l]}function Hs(i,e,t){return Tn(i,e,t)}const fr=i=>{const{displayMode:e="line"}=i,{containerProps:t}=H("scale-bar",i),{map:s}=B(i),n=m.useRef(null);return m.useEffect(()=>{if(n.current&&s){const r=s.olMap,o=new qn({units:"metric",target:n.current,bar:e==="bar"});return r.addControl(o),()=>{r.removeControl(o)}}},[e,s]),d.jsx(P,{...t,ref:n})},Bs="@open-pioneer/scale-viewer",$s=z.bind(void 0,Bs),mr=i=>{const{containerProps:e}=H("scale-viewer",i),{map:t}=B(i),s=$s(),n=ps(t?.olMap),r=n?s.formatNumber(n):void 0;return d.jsx(P,{...e,children:r&&d.jsxs(Q,{children:["1:",r]})})},Us="@open-pioneer/legend",$t=z.bind(void 0,Us),pr=i=>{const{showBaseLayers:e=!1}=i,{containerProps:t}=H("legend",i),{map:s}=B(i);return d.jsx(P,{...t,children:s?d.jsx(Ws,{map:s,showBaseLayers:e}):null})};function Ws(i){const{map:e,showBaseLayers:t}=i,n=Ks(e).map(r=>d.jsx(Ut,{layer:r,showBaseLayers:t},r.id));return d.jsx(Zn,{as:"ul",className:"legend-layer-list",listStyleType:"none",spacing:2,children:n})}function Ut(i){const{layer:e,showBaseLayers:t}=i,s=te(()=>e.visible,[e]),n=qs(e);if(!s||!t&&zn(e)&&Wt(e))return;const r=[];return n?.length&&n.forEach(o=>{r.push(d.jsx(Ut,{layer:o,showBaseLayers:t},o.id))}),d.jsxs(d.Fragment,{children:[d.jsx(zs,{layer:e,showBaseLayers:t}),r]})}function zs(i){const e=$t(),{layer:t,showBaseLayers:s}=i,n=Wt(t),r=Ys(t),o=te(()=>t.legend,[t]);let a;return r?.Component?a=d.jsx(r.Component,{layer:t}):r?.imageUrl?a=d.jsx(ft,{layer:t,imageUrl:r.imageUrl}):o&&(a=d.jsx(ft,{layer:t,imageUrl:o})),a?d.jsxs(P,{as:"li",className:Pe("legend-item",`layer-${Js(t.id)}`),children:[s&&n?d.jsx(Q,{as:"b",children:e.formatMessage({id:"basemapLabel"})}):null,a]}):void 0}function ft(i){const e=$t(),{layer:t,imageUrl:s}=i;return d.jsxs(P,{children:[d.jsx(Q,{children:t.title}),d.jsx(Yn,{maxW:"none",maxH:"none",src:s,alt:e.formatMessage({id:"altLabel"},{layerName:t.title}),className:"legend-item__image",fallbackStrategy:"onError",fallback:d.jsx(P,{children:d.jsxs(Q,{children:[d.jsx(Bt,{me:2}),e.formatMessage({id:"fallbackLabel"})]})})})]})}function Ks(i){return te(()=>{const e=i.layers.getAllLayers({sortByDisplayOrder:!0})??[];return e.reverse(),e},[i])}function qs(i){return te(()=>{const e=i.sublayers?.getSublayers({sortByDisplayOrder:!0});if(e)return e.reverse(),e},[i])}function Ys(i){return te(()=>i.attributes.legend,[i])}function Wt(i){return!("parentLayer"in i)&&i.isBaseLayer}function Js(i){return i.toLowerCase().replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-")}const Xs="@open-pioneer/measurement",Zs=z.bind(void 0,Xs);class Qs{olMap;messages;activeFeatureStyle;layer;source;draw=void 0;activeMeasurement;predefinedMeasurements=new Map;finishedMeasurements=new Set;helpTooltip;resources=[];measurementChangedHandler;constructor(e,t){this.olMap=e,this.messages=t;const s=this.source=new Ce;this.layer=new ee({source:s,zIndex:Be,properties:{name:"measurement-layer"}}),e.addLayer(this.layer);const n=e.on("pointermove",this.handlePointerMove.bind(this));this.resources.push({destroy(){N(n)}});const r=()=>{this.helpTooltip.element.classList.add("hidden")};e.getViewport().addEventListener("mouseout",r),this.resources.push({destroy(){e.getViewport().removeEventListener("mouseout",r)}}),this.helpTooltip=ti(this.olMap)}destroy(){this.stopMeasurement();for(const e of this.resources)e.destroy();this.resources=[],this.activeMeasurement=at(this.activeMeasurement);for(const e of this.finishedMeasurements)e.destroy();this.finishedMeasurements.clear(),this.helpTooltip.destroy(),this.olMap.removeLayer(this.layer),this.layer.dispose(),this.source.dispose(),this.measurementChangedHandler=void 0,this.predefinedMeasurements.clear()}getVectorLayer(){return this.layer}setFinishedFeatureStyle(e){this.layer.setStyle(e)}setMeasurementSourceChangedHandler(e){this.measurementChangedHandler=e}setPredefinedMeasurements(e){this.updatePredefinedMeasurements(e)}setActiveFeatureStyle(e){const t=An(e);this.activeFeatureStyle=(s,...n)=>{const r=s?.getGeometry()?.getType();if(r==="Polygon"||r==="LineString"||r==="Point")return t(s,...n)},this.draw?.getOverlay().setStyle(this.activeFeatureStyle)}clearMeasurements(){const e=this.source.getFeatures();this.source.clear(),e.forEach(t=>{this.raiseMeasurementsChangeEvent("remove-measurement",t)}),this.predefinedMeasurements.clear();for(const t of this.finishedMeasurements)t.destroy();this.finishedMeasurements.clear()}startMeasurement(e){if(this.draw)throw new Error("Internal error: another measurement interaction is still active.");const t=e==="area"?"Polygon":"LineString",s=this.draw=new At({source:this.source,type:t,style:this.activeFeatureStyle});this.olMap.addInteraction(s);let n,r;s.on("drawstart",o=>{const a=o.feature;a&&(n=this.activeMeasurement=new mt("active",a,this),r=a.getGeometry()?.on("change",()=>{n?.updateTooltipContent(),n?.updateTooltipPosition()}))}),s.on("drawend",()=>{if(n&&n===this.activeMeasurement){const o=n;o.updateState("finished"),this.finishedMeasurements.add(o),this.raiseMeasurementsChangeEvent("add-measurement",o.feature),this.activeMeasurement=n=void 0}n=void 0,r&&N(r)}),s.on("drawabort",()=>{n&&(n.destroy(),n===this.activeMeasurement&&(this.activeMeasurement=void 0),n=void 0),r&&N(r)})}stopMeasurement(){this.draw&&(this.olMap.removeInteraction(this.draw),this.draw.abortDrawing(),this.draw.dispose(),this.draw=void 0),this.activeMeasurement=at(this.activeMeasurement)}handlePointerMove(e){if(e.dragging)return;const t=this.helpTooltip,s=si(this.messages,this.activeMeasurement);t.setText(s),t.overlay.setPosition(e.coordinate),t.element.classList.remove("hidden")}updatePredefinedMeasurements(e){const t=e.filter(n=>!this.predefinedMeasurements.has(n)),s=[];for(const n of this.predefinedMeasurements.keys())e.includes(n)||s.push(n);t.forEach(n=>{const r=new Z(n);this.source.addFeature(r);const o=new mt("finished",r,this);this.finishedMeasurements.add(o),this.predefinedMeasurements.set(n,o),this.raiseMeasurementsChangeEvent("add-measurement",r)}),s.forEach(n=>{const r=this.predefinedMeasurements.get(n);r&&(this.source.removeFeature(r.feature),this.finishedMeasurements.delete(r),r.destroy(),this.raiseMeasurementsChangeEvent("remove-measurement",r.feature)),this.predefinedMeasurements.delete(n)})}raiseMeasurementsChangeEvent(e,t){const s=t.getGeometry();this.measurementChangedHandler&&s&&this.measurementChangedHandler({kind:e,geometry:(s instanceof ve,s)})}}class mt{controller;feature;_state;tooltip;constructor(e,t,s){this.controller=s,this._state=e,this.feature=t,this.tooltip=ni(this.olMap),this.updateTooltipContent(),this.updateTooltipPosition(),this.tooltip.setActive(e==="active")}destroy(){this.tooltip.destroy()}get state(){return this._state}updateState(e){this._state!==e&&(this._state=e,this.tooltip.setActive(e==="active"))}updateTooltipContent(){const e=this.feature.getGeometry();if(!e)return;const t=this.olMap.getView().getProjection();let s;e instanceof ve?s=ii(e,t,this.messages):e instanceof De&&(s=ri(e,t,this.messages)),s&&this.tooltip.setHtml(s)}updateTooltipPosition(){const e=this.feature.getGeometry();if(!e)return;let t;if(e instanceof ve)t=e.getInteriorPoint().getCoordinates()||null;else if(e instanceof De)t=e.getLastCoordinate()||null;else return;this.tooltip.overlay.setPosition(t)}get olMap(){return this.controller.olMap}get messages(){return this.controller.messages}}const pt=[0,-15],ei=[0,-7];function ti(i){const e=document.createElement("div");e.className="measurement-tooltip printing-hide hidden",e.role="tooltip";const t=document.createElement("span");e.appendChild(t);const s=new Fe({element:e,offset:[15,0],positioning:"center-left"});return i.addOverlay(s),{overlay:s,element:e,destroy(){i.removeOverlay(s)},setText(n){t.textContent=n},setHtml(n){t.innerHTML=n}}}function ni(i){const e=document.createElement("div");e.role="tooltip",e.className="measurement-tooltip measurement-active-tooltip printing-hide";const t=document.createElement("span");e.appendChild(t);const s=new Fe({element:e,offset:pt,positioning:"bottom-center",stopEvent:!1,insertFirst:!1});return i.addOverlay(s),{overlay:s,element:e,destroy(){i.removeOverlay(s)},setActive(n){n?(e.className="measurement-tooltip measurement-active-tooltip printing-hide",s.setOffset(pt)):(e.className="measurement-tooltip measurement-finished-tooltip",s.setOffset(ei))},setText(n){t.textContent=n},setHtml(n){t.innerHTML=n}}}function si(i,e){if(e){const t=e.feature.getGeometry();if(t instanceof ve||t instanceof De)return i.getContinueMessage()}return i.getHelpMessage()}function ii(i,e,t){const s=Nn(i,{projection:e});let n;return s>=1e6?n=`${t.formatNumber(s/1e6)} km2`:n=`${t.formatNumber(s)} m2`,n}function ri(i,e,t){const s=kn(i,{projection:e});let n;return s>=1e3?n=`${t.formatNumber(s/1e3)} km`:n=`${t.formatNumber(s)} m`,n}const yr=i=>{const e=Zs(),{containerProps:t}=H("measurement",i),[s,n]=m.useState("distance"),r=u=>e.formatMessage({id:u}),o=B(i),a=oi(o.map,i,e);m.useEffect(()=>{if(a)return a.startMeasurement(s),()=>{a.stopMeasurement()}},[a,s]);function l(u){if(u==="distance"||u==="area")n(u);else throw new Error(`Unexpected measurement type: '${u}'.`)}function c(){a?.clearMeasurements()}return d.jsxs(P,{...t,children:[d.jsx(Q,{mb:3,children:e.formatMessage({id:"measurementInfoText"})}),d.jsx(xe,{mb:4,alignItems:"center",children:d.jsxs(Ge,{mb:2,children:[d.jsx(we,{mb:1,children:r("measurementLabel")}),d.jsxs(ze,{value:s,onChange:u=>l(u.target.value),className:"measurement-select",children:[d.jsx("option",{value:"distance",children:r("distance")}),d.jsx("option",{value:"area",children:r("area")})]})]})}),d.jsx(Ft,{padding:2,className:"measurement-delete-button",onClick:c,width:"100%",children:r("deleteMeasurementLabel")})]})};function oi(i,e,t){const{activeFeatureStyle:s,finishedFeatureStyle:n,onMeasurementsChange:r,predefinedMeasurements:o}=e,[a,l]=m.useState(void 0);return m.useEffect(()=>{if(!i)return;const c=new Qs(i.olMap,{getContinueMessage(){return t.formatMessage({id:"tooltips.continue"})},getHelpMessage(){return t.formatMessage({id:"tooltips.help"})},formatNumber(u){return t.formatNumber(u,{maximumFractionDigits:2})}});return l(c),()=>{c.destroy(),l(void 0)}},[i,t]),m.useEffect(()=>{a?.setActiveFeatureStyle(s??ai())},[a,s]),m.useEffect(()=>{a?.setFinishedFeatureStyle(n??li())},[a,n]),m.useEffect(()=>{a?.setMeasurementSourceChangedHandler(r)},[a,r]),m.useEffect(()=>{a?.setPredefinedMeasurements(o??[])},[a,o]),a}function ai(){return[new Se({stroke:new ie({color:"#fff",lineDash:[10,10],width:5})}),new Se({fill:new Re({color:"rgba(0,0,0,0.15)"}),stroke:new ie({color:"rgba(0, 0, 0, 0.7)",lineDash:[10,10],width:3}),image:new On({radius:5,stroke:new ie({color:"rgba(0, 0, 0, 0.7)",width:2}),fill:new Re({color:"rgba(255, 255, 255, 0.2)"})})})]}function li(){return[new Se({stroke:new ie({color:"#fff",width:5})}),new Se({stroke:new ie({color:"#0b96fc",width:3}),fill:new Re({color:"rgba(11,150,252,0.15)"})})]}const ci="@open-pioneer/search",Le=z.bind(void 0,ci);function ui(i){const e=i.selectProps.inputValue.length>0,t={...i,className:Pe(i.className,{"search-invisible":!e})};return d.jsx(k.Menu,{...t,children:i.children})}function di(i){const e=i.data.label,t={...i.innerProps,"aria-label":e,role:"group"};return d.jsx(k.Group,{...i,innerProps:t})}function hi(i){const t=Le().formatMessage({id:"noOptionsText"});return d.jsx(k.NoOptionsMessage,{...i,children:d.jsx(D.span,{className:"search-no-match",children:t})})}function gi(i){const t=Le().formatMessage({id:"loadingText"});return d.jsx(k.LoadingMessage,{...i,children:d.jsx(D.span,{className:"search-loading-text",children:t})})}function fi({children:i,...e}){const t={...e,className:Pe(e.className,"search-value-container")};return d.jsxs(k.ValueContainer,{...t,children:[!!i&&d.jsx(As,{style:{position:"absolute",left:8}}),i]})}function mi(i){const e={...i,isHidden:!1};return d.jsx(k.Input,{...e})}function pi(i){return null}function yi(i){return d.jsxs(k.IndicatorsContainer,{...i,children:[i.children,!i.selectProps.isLoading&&i.selectProps.inputValue&&d.jsx(_i,{selectProps:i.selectProps,clearValue:i.clearValue})]})}function _i(i){const t=Le().formatMessage({id:"ariaLabel.clearButton"}),s=n=>{n.preventDefault(),n.stopPropagation(),i.clearValue()};return d.jsx(Bn,{role:"button",size:"md",mr:1,"aria-label":t,onClick:s,onTouchEnd:s,onMouseDown:n=>n.preventDefault()})}function vi(i){return null}function Si(i){const e=i.selectProps.inputValue,t=i.data.label,s={...i,className:Pe(i.className,"search-option")};return d.jsx(k.Option,{...s,children:d.jsx(D.div,{className:"search-option-label",children:e.trim().length>0?xi(t,e):t})})}function xi(i,e){const t=i.toLowerCase().indexOf(e.toLowerCase());return t>=0?d.jsxs(d.Fragment,{children:[i.substring(0,t),d.jsx(D.span,{className:"search-highlighted-match",children:i.substring(t,t+e.length)},"highlighted"),i.substring(t+e.length)]}):i}const yt=fe("search:SearchController"),_t=200,vt=5;var ue,Y,J,X,T,Me,zt;class wi{constructor(e,t){x(this,Me);x(this,ue);x(this,Y,[]);x(this,J,vt);x(this,X,_t);x(this,T);w(this,ue,e),w(this,Y,t)}destroy(){v(this,T)?.abort(),w(this,T,void 0)}async search(e){if(v(this,T)?.abort(),w(this,T,void 0),!e)return[];const t=w(this,T,new AbortController);try{return await bi(t.signal,v(this,X)),t.signal.aborted&&(yt.debug(`search canceled with ${e}`),$n()),(await Promise.all(v(this,Y).map(n=>ne(this,Me,zt).call(this,n,e,t.signal)))).filter(n=>n!=null)}finally{v(this,T)===t&&w(this,T,void 0)}}get searchTypingDelay(){return v(this,X)}set searchTypingDelay(e){w(this,X,e??_t)}get maxResultsPerSource(){return v(this,J)}set maxResultsPerSource(e){w(this,J,e??vt)}get sources(){return v(this,Y)}}ue=new WeakMap,Y=new WeakMap,J=new WeakMap,X=new WeakMap,T=new WeakMap,Me=new WeakSet,zt=async function(e,t,s){const n=e.label,r=v(this,ue).olMap.getView().getProjection();try{const o=v(this,J);let a=await e.search(t,{maxResults:o,signal:s,mapProjection:r});return a.length>o&&(a=a.slice(0,o)),{label:n,source:e,results:a}}catch(o){Lt(o)||yt.error(`search for source ${n} failed`,o);return}};async function bi(i,e){i.aborted||await new Promise(t=>{const s=()=>{i.removeEventListener("abort",s),clearTimeout(n),t()};i.addEventListener("abort",s);const n=setTimeout(s,e)})}const be=fe("search:Search"),_r=i=>{const{sources:e,searchTypingDelay:t,maxResultsPerGroup:s,onSelect:n,onClear:r}=i,{containerProps:o}=H("search",i),{map:a}=B(i),l=Le(),c=Pi(e,t,s,a),{input:u,search:h,selectedOption:f,onInputChanged:g,onResultConfirmed:p}=Fi(c),y=Ci(),b=Mi(l),F=Ei(),O=V((E,$)=>{$.action==="input-change"&&g(E)}),S=V((E,$)=>{switch($.action){case"select-option":E&&(p(E),n?.({source:E.source,result:E.result}));break;case"clear":g(""),L.current?.blur(),L.current?.focus(),r?.();break;default:be.debug(`Unhandled action type '${$.action}'.`);break}}),L=m.useRef(null);return d.jsx(P,{...o,children:d.jsx(Nt,{className:"search-component",classNamePrefix:"react-select",ref:L,inputValue:u,onInputChange:O,"aria-label":l.formatMessage({id:"ariaLabel.search"}),ariaLiveMessages:b,colorScheme:"trails",selectedOptionStyle:"color",selectedOptionColorScheme:"trails",chakraStyles:y,isClearable:!0,placeholder:l.formatMessage({id:"searchPlaceholder"}),closeMenuOnSelect:!0,isLoading:h.kind==="loading",options:h.kind==="ready"?h.results:void 0,filterOption:()=>!0,tabSelectsValue:!1,components:F,onChange:S,value:f,menuPosition:"fixed"})})};function Mi(i){return m.useMemo(()=>({onFocus:()=>"",onChange:()=>"",guidance:()=>`${i.formatMessage({id:"ariaLabel.instructions"})}`,onFilter:()=>""}),[i])}function Ei(){return m.useMemo(()=>({Menu:ui,Input:mi,SingleValue:pi,Option:Si,NoOptionsMessage:hi,LoadingMessage:gi,ValueContainer:fi,IndicatorsContainer:yi,ClearIndicator:vi,Group:di}),[])}function Ci(){const[i,e]=It("colors",["trails.100","trails.50"],["#d5e5ec","#eaf2f5"]);return m.useMemo(()=>({groupHeading:s=>({...s,backgroundColor:i,padding:"8px 12px",fontSize:"inherit",fontWeight:"inherit"}),option:s=>({...s,backgroundColor:"inherit",_focus:{backgroundColor:e}}),dropdownIndicator:s=>({...s,display:"none"})}),[i,e])}function Pi(i,e,t,s){const[n,r]=m.useState(void 0);return m.useEffect(()=>{if(!s)return;const o=new wi(s,i);return r(o),()=>{o.destroy(),r(void 0)}},[s,i]),m.useEffect(()=>{n&&(n.searchTypingDelay=e)},[n,e]),m.useEffect(()=>{n&&(n.maxResultsPerSource=t)},[n,t]),n}function Fi(i){const[e,t]=m.useReducer((a,l)=>{switch(l.kind){case"input":return{...a,query:l.query,selectedOption:null};case"select-option":return{...a,selectedOption:l.option,query:l.option.label};case"load-results":return{...a,search:{kind:"loading"}};case"accept-results":return{...a,search:{kind:"ready",results:l.results}}}},void 0,()=>({query:"",selectedOption:null,search:{kind:"ready",results:[]}})),s=m.useRef(),n=V(a=>{if(!i){s.current=void 0,t({kind:"accept-results",results:[]});return}be.isDebug()&&be.debug(`Starting new search for query ${JSON.stringify(a)}.`),t({kind:"load-results"});const l=s.current=Li(i,a).then(c=>{s.current===l&&t({kind:"accept-results",results:c})})}),r=m.useCallback(a=>{t({kind:"select-option",option:a})},[]),o=m.useCallback(a=>{t({kind:"input",query:a}),n(a)},[n]);return{input:e.query,search:e.search,selectedOption:e.selectedOption,onResultConfirmed:r,onInputChanged:o}}async function Li(i,e){let t;try{t=await i.search(e)}catch(s){Lt(s)||be.error("Search failed",s),t=[]}return Ii(t)}function Ii(i){return i.map((t,s)=>({label:t.label,options:t.results.map(n=>({value:`${s}-${n.id}`,label:n.label,source:t.source,result:n}))}))}const Kt="@open-pioneer/selection",Ti=$e.bind(void 0,Kt),Ye=z.bind(void 0,Kt),se="selection-active",ye="selection-inactive";class Ai{tooltip;interactionResources=[];olMap;isActive=!0;tooltipMessage;tooltipDisabledMessage;constructor(e,t,s,n){const r=this.initViewport(e);this.interactionResources.push(this.createDragBox(e,n,r,this.interactionResources)),this.interactionResources.push(this.createDrag(e,r,this.interactionResources)),this.tooltip=this.createHelpTooltip(e,t),this.olMap=e,this.tooltipMessage=t,this.tooltipDisabledMessage=s}initViewport(e){const t=e.getViewport();return t.classList.add(se),t.oncontextmenu=s=>(s.preventDefault(),!1),t}destroy(){this.tooltip.destroy(),this.interactionResources.forEach(e=>{e.destroy()})}setActive(e){if(this.isActive===e)return;const t=this.olMap.getViewport();e?(this.interactionResources.forEach(s=>this.olMap.addInteraction(s.interaction)),this.tooltip.setText(this.tooltipMessage),t.classList.remove(ye),t.classList.add(se),this.isActive=!0):(this.interactionResources.forEach(s=>this.olMap.removeInteraction(s.interaction)),this.tooltip.setText(this.tooltipDisabledMessage),t.classList.remove(se),t.classList.add(ye),this.isActive=!1)}createDragBox(e,t,s,n){const r=new it({className:"selection-drag-box",condition:jn});return e.addInteraction(r),r.on("boxend",function(){t(r.getGeometry())}),{interaction:r,destroy(){e.removeInteraction(r),n.splice(n.indexOf(this)),r.dispose(),s.classList.remove(se),s.classList.remove(ye),s.oncontextmenu=null}}}createDrag(e,t,s){const n=function(a){return a.originalEvent.button==2},r=new rt({condition:n});return e.addInteraction(r),{interaction:r,destroy(){e.removeInteraction(r),s.splice(s.indexOf(this)),r.dispose(),t.classList.remove(se),t.classList.remove(ye),t.oncontextmenu=null}}}createHelpTooltip(e,t){const s=document.createElement("div");s.className="selection-tooltip printing-hide",s.role="tooltip";const n=document.createElement("span");n.textContent=t,s.appendChild(n);const r=new Fe({element:s,offset:[15,0],positioning:"center-left"}),o=e.on("pointermove",a=>{r.setPosition(a.coordinate)});return e.addOverlay(r),{overlay:r,element:s,destroy(){e.removeOverlay(r),r.dispose(),N(o)},setText(a){n.textContent=a}}}getDragboxInteraction(){return this.interactionResources.find(e=>e.interaction instanceof it)}getDragPanInteraction(){return this.interactionResources.find(e=>e.interaction instanceof rt)}}const ke=fe("selection:SelectionController"),Ni=1e4;var de,he,ge,Ee,qt;class ki{constructor(e){x(this,Ee);x(this,de);x(this,he);x(this,ge);const{mapModel:t,onError:s,maxResults:n=Ni}=e;w(this,de,t),w(this,he,n),w(this,ge,s)}destroy(){}async select(e,t){if(t)return await ne(this,Ee,qt).call(this,e,t)}}de=new WeakMap,he=new WeakMap,ge=new WeakMap,Ee=new WeakSet,qt=async function(e,t){const s=v(this,de).olMap.getView().getProjection();try{ke.debug(`Starting selection on source '${e.label}'`);const n=v(this,he);let r=await e.select({type:"extent",extent:t},{maxResults:n,mapProjection:s,signal:new AbortController().signal});return r.length>n&&(r=r.slice(0,n)),ke.debug(`Found ${r.length} results on source '${e.label}'`),{source:e,results:r}}catch(n){ke.error(`selection from source ${e.label} failed`,n),v(this,ge).call(this);return}};const Oi={classNamePrefix:"react-select",menuPosition:"fixed",isSearchable:!1,isClearable:!1},vr=i=>{const e=Ye(),{sources:t,onSelectionComplete:s,onSelectionSourceChanged:n}=i,{containerProps:r}=H("selection",i),o=e.formatMessage({id:"sourceNotAvailable"}),[a,l]=Di(t,n),c=Xt(a,o),u=B(i),{onExtentSelected:h}=Gi(u.map,t,a,s),f=Hi(),[g,p]=m.useState(!1);Vi(u.map,e,h,c.kind==="available",!!a);const y=m.useMemo(()=>t.map(S=>({label:S.label,value:S})),[t]),b=m.useMemo(()=>y.find(L=>L.value===a)||null,[y,a]),F=V(S=>{l(S?.value)}),O=V(S=>{!g&&S.key==="Enter"&&p(!0)});return d.jsx(Qn,{...r,spacing:2,children:d.jsxs(xe,{children:[d.jsx(we,{children:e.formatMessage({id:"selectSource"})}),d.jsx(Nt,{className:"selection-source react-select",...Oi,options:y,placeholder:e.formatMessage({id:"selectionPlaceholder"}),value:b,onChange:F,components:{Option:ji,SingleValue:Ri},isOptionDisabled:()=>!1,getOptionLabel:S=>{const L=S.label,E=Jt(S.value,o);return E.kind=="available"?L:L+" "+E.reason},ariaLiveMessages:{guidance:()=>"",onChange:S=>S.action=="select-option"||S.action=="initial-input-focus"?S.label+" "+e.formatMessage({id:"selected"}):"",onFilter:()=>"",onFocus:()=>""},chakraStyles:f,onKeyDown:O,menuIsOpen:g,onMenuOpen:()=>p(!0),onMenuClose:()=>p(!1)})]})})};function ji(i){const{value:e}=i.data,{isAvailable:t,content:s}=Yt(e,!1);return d.jsx(k.Option,{...i,isDisabled:!t,className:"selection-source-option",children:s})}function Ri(i){const{value:e}=i.data,{isAvailable:t,content:s}=Yt(e,!0),n=t?"selection-source-value":"selection-source-value selection-source-value--disabled";return d.jsx(k.SingleValue,{...i,isDisabled:!t,className:n,children:s})}function Di(i,e){const[t,s]=m.useState(()=>i[0]);m.useEffect(()=>{t&&!i.includes(t)&&s(void 0)},[i,t]);const n=m.useRef(void 0);return m.useEffect(()=>{t!==n.current&&(n.current=t,e?.({source:t}))},[t,e]),[t,s]}function Yt(i,e){const t=Ye(),s=i?.label,n=t.formatMessage({id:"sourceNotAvailable"}),r=Xt(i,n);return{isAvailable:r.kind==="available",content:d.jsxs(ot,{direction:"row",alignItems:"center",grow:1,children:[!e&&d.jsx(ot,{grow:1,children:s}),r.kind==="unavailable"&&d.jsx(P,{ml:2,children:d.jsx(Un,{label:r.reason,placement:"right",openDelay:500,children:d.jsx(D.span,{children:d.jsx(Wn,{as:es,color:"red",className:"warning-icon","aria-label":r.reason})})})}),e&&s]})}}function Gi(i,e,t,s){const n=Ti("notifier.NotificationService"),r=Ye(),[o,a]=m.useState(void 0);m.useEffect(()=>{if(!i)return;const c=new ki({mapModel:i,onError(){n.notify({level:"error",message:r.formatMessage({id:"selectionFailed"})})}});return a(c),()=>{c.destroy()}},[i,n,e,r]);const l=V(async c=>{if(!o||!t)return;const u=await o.select(t,c.getExtent());u&&s?.(u)});return{controller:o,onExtentSelected:l}}function Jt(i,e){const t=i.status??"available",s=typeof t=="string"?{kind:t}:t;return s.kind==="available"?s:{kind:"unavailable",reason:s.reason??e}}function Xt(i,e){return te(()=>i?Jt(i,e):{kind:"unavailable",reason:e},[i,e])}function Vi(i,e,t,s,n){m.useEffect(()=>{if(!i)return;const r=n?e.formatMessage({id:"disabledTooltip"}):e.formatMessage({id:"noSourceTooltip"}),o=new Ai(i.olMap,e.formatMessage({id:"tooltip"}),r,t);return o.setActive(s),()=>{o?.destroy()}},[i,e,t,s,n])}function Hi(){const[i,e]=It("colors",["background_body","border"],["#ffffff","#ffffff"]);return m.useMemo(()=>({control:s=>({...s,cursor:"pointer"}),indicatorSeparator:s=>({...s,borderColor:e}),dropdownIndicator:s=>({...s,backgroundColor:i})}),[i,e])}const Zt="@open-pioneer/printing",Qt=$e.bind(void 0,Zt),Bi=z.bind(void 0,Zt),$i="map";class Ui{olMap;i18n;printingService;viewPadding;printMap=void 0;overlay=void 0;constructor(e,t,s){this.olMap=e,this.printingService=t,this.i18n=s}destroy(){this.reset()}setViewPadding(e){this.viewPadding=e}async handleMapExport(e){if(this.olMap)try{this.begin(),this.printMap=await this.printingService.printMap(this.olMap,{blockUserInteraction:!1,viewPadding:this.viewPadding});const t=this.printMap.getCanvas();if(t)e.fileFormat=="png"?await this.exportMapInPNG(t,e):await this.exportMapInPDF(t,e);else throw new Error("Canvas export failed")}finally{this.reset()}}begin(){const e=this.olMap.getTargetElement();e&&(this.overlay=Jn(e,this.i18n.overlayText))}reset(){this.overlay?.destroy(),this.overlay=void 0}getTitleAndFileName(e){const t=e.title||"",s=e.title||$i;return{title:t,fileName:s}}async exportMapInPNG(e,t){const s=document.createElement("canvas");s.width=e.width,s.height=e.height+50,s.style.backgroundColor="#fff";const n=s.getContext("2d");if(!n)throw new Error("2d canvas rendering context not available");const{title:r,fileName:o}=this.getTitleAndFileName(t);n.fillStyle="#fff",n.fillRect(0,0,s.width,s.height),n.font="20px bold sans-serif",n.textAlign="center",n.fillStyle="#000";const a=s.width/2;n.fillText(r,a,20),n.drawImage(e,0,50);const l=document.createElement("a");l.setAttribute("download",o+".png");const c=Xn(s);if(!c)throw new Error("Failed to get image data URL");l.href=c,l.click()}async exportMapInPDF(e,t){const{jsPDF:s}=await ts(async()=>{const{jsPDF:F}=await import("./w7OhIb2wibYa.js");return{jsPDF:F}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]),import.meta.url),n=new s({orientation:"landscape",unit:"mm",format:"a4"}),r=n.internal.pageSize.getWidth(),o=n.internal.pageSize.getHeight(),a=15,l=20,c=o-l;n.setFontSize(20);const{title:u,fileName:h}=this.getTitleAndFileName(t);n.text(u,r/2,a,{align:"center"});const f=e.width/e.height;let g=c,p=g*f;p>=r&&(p=r,g=p/f);const y=(r-p)/2,b=l+(c-g)/2;n.addImage(e,"",y,b,p,g),n.save(h+".pdf")}}const Wi=fe("printing"),Sr=i=>{const e=Bi(),{viewPadding:t="auto"}=i,{containerProps:s}=H("printing",i),[n,r]=m.useState("pdf"),[o,a]=m.useState(""),[l,c]=m.useState(!1),u=Qt("notifier.NotificationService"),{map:h}=B(i),f=zi(h,e,t);function g(y){(y==="png"||y==="pdf")&&r(y)}function p(){l||!f||(c(!0),f.handleMapExport({title:o,fileFormat:n}).catch(y=>{const b=e.formatMessage({id:"printingFailed"});u.notify({level:"error",message:b}),Wi.error("Failed to print the map",y)}).finally(()=>{c(!1)}))}return d.jsx(P,{...s,children:d.jsxs(P,{as:"form",m:2,alignItems:"center",onSubmit:y=>{y.preventDefault(),p()},children:[d.jsxs(xe,{as:Ge,mb:2,children:[d.jsx(we,{minWidth:"82",mb:1,children:e.formatMessage({id:"title"})}),d.jsx(We,{placeholder:e.formatMessage({id:"input.placeholder"}),value:o,onChange:y=>{a(y.target.value)},autoFocus:!0})]}),d.jsxs(xe,{as:Ge,mb:2,children:[d.jsx(we,{minWidth:"82",mb:1,children:e.formatMessage({id:"fileFormat"})}),d.jsxs(ze,{value:n,onChange:y=>g(y.target.value),className:"printing-select",children:[d.jsx("option",{value:"png",children:"PNG"}),d.jsx("option",{value:"pdf",children:"PDF"})]})]}),d.jsx(Ft,{isLoading:l,loadingText:e.formatMessage({id:"printingMap"}),disabled:l,mt:2,p:2,className:"printing-export-button",type:"submit",width:"100%",children:e.formatMessage({id:"export"})})]})})};function zi(i,e,t){const s=Qt("printing.PrintingService"),[n,r]=m.useState(void 0);return m.useEffect(()=>{if(!i)return;const o=new Ui(i.olMap,s,{overlayText:e.formatMessage({id:"printingMap"})});return r(o),()=>{o.destroy(),r(void 0)}},[i,e,s]),m.useEffect(()=>{n?.setViewPadding(t)},[n,t]),n}export{gr as C,ur as E,We as I,pr as L,yr as M,hr as N,Fe as O,Sr as P,Gt as S,dr as V,cr as W,fr as a,mr as b,_r as c,vr as d,ze as e,ps as u}; diff --git a/openlayers-base-packages/pr-previews/pr-371/assets/DsXJQLY20iHp.js b/openlayers-base-packages/pr-previews/pr-371/assets/BWsYSh9PkSaL.js similarity index 93% rename from openlayers-base-packages/pr-previews/pr-371/assets/DsXJQLY20iHp.js rename to openlayers-base-packages/pr-previews/pr-371/assets/BWsYSh9PkSaL.js index c910d4a..351e5ad 100644 --- a/openlayers-base-packages/pr-previews/pr-371/assets/DsXJQLY20iHp.js +++ b/openlayers-base-packages/pr-previews/pr-371/assets/BWsYSh9PkSaL.js @@ -1 +1 @@ -import{c5 as a,bJ as o,cj as r,cF as h,cG as l,cH as d,cI as f,ct as C,cq as g,cJ as c,cK as u,cL as p,cv as m}from"./CncSlnPsjr9P.js";class e extends a{constructor(t,i){super(),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,i!==void 0&&!Array.isArray(t[0])?this.setFlatCoordinates(i,t):this.setCoordinates(t,i)}appendCoordinate(t){o(this.flatCoordinates,t),this.changed()}clone(){const t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,i,n,s){return s{throw TypeError(o)};var x=(o,e,t)=>e.has(o)||w("Cannot "+t);var i=(o,e,t)=>(x(o,e,"read from private field"),t?t.call(o):e.get(o)),m=(o,e,t)=>e.has(o)?w("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),c=(o,e,t,r)=>(x(o,e,"write to private field"),r?r.call(o,t):e.set(o,t),t);import{a as j,r as y,j as n,e as R}from"./Bh0CuZ3gy5tC.js";import{bV as T,ay as A,bW as G,S as s,T as M,O as E,bT as O,bU as W,b as I,a as P,M as q,H as B,u as H,k as g,g as k,B as b,h as S,l as N,m as h}from"./p-jlpmJ86TPh.js";import{W as D,b as U}from"./DV2kZNA-6G5s.js";import{G as C,e as V,T as F}from"./0Ump2O8Jg_uq.js";import{_}from"./CmsKOCeNyeyo.js";import{V as K,T as z}from"./Tz2xttM4F6S2.js";import"./CL_VRsbiqLzM.js";import"./D8rToQP6FvST.js";import"./BWsYSh9PkSaL.js";import"./BEc19nv24p4W.js";import"./Cq1ZpfgEg4XJ.js";import"./BO_q12Vdyug-.js";import"./DUys4rac0YQP.js";import"./CjjyePfBQlZ7.js";import"./2d5-QpxJNHTD.js";import"./BeFcF3Ti4kY-.js";var u;class $ extends T{constructor(t){const r=t.layers,p=new A({layers:r.map(l=>l.olLayer)});super({...t,olLayer:p});m(this,u);c(this,u,new J(r,this))}get type(){return"group"}get legend(){}get layers(){return i(this,u)}get sublayers(){}get olLayer(){return super.olLayer}__attachToMap(t){super.__attachToMap(t),this.layers.__getRawLayers().forEach(r=>r.__attachToMap(t))}}u=new WeakMap;var a,d;class J{constructor(e,t){m(this,a);m(this,d);e=e.slice();for(const r of e)if(r instanceof T)r.__attachToGroup(t);else throw new Error(`Layer '${r.id}' of group '${t.id}' does not implement abstract class '${G.name}`);c(this,a,e),c(this,d,t)}destroy(){for(const e of i(this,a))e.__detachFromGroup(),e.destroy();c(this,a,[])}getItems(e){return this.getLayers(e)}getLayers(e){return i(this,a).slice()}__getRawLayers(){return i(this,a)}__getParent(){return i(this,d)}}a=new WeakMap,d=new WeakMap;const L=$,f="main";class Y{mapId=f;async getMapConfig(){return{initialView:{kind:"position",center:{x:404747,y:5757920},zoom:14},projection:"EPSG:25832",layers:[new s({id:"topplus_open",title:"TopPlus Open",isBaseLayer:!0,visible:!0,healthCheck:"https://sgx.geodatenzentrum.de/wmts_topplus_openERROR/1.0.0/WMTSCapabilities.xml",olLayer:v("web")}),new s({id:"topplus_open_grau",title:"TopPlus Open (Grau)",isBaseLayer:!0,visible:!1,healthCheck:async()=>{function e(t){return new Promise(r=>setTimeout(r,t))}return await e(2e3),"error"},olLayer:v("web_grau")}),new s({id:"topplus_open_light",title:"TopPlus Open (Light)",isBaseLayer:!0,visible:!1,healthCheck:"https://sgx.geodatenzentrum.de/wmts_topplus_open/1.0.0/WMTSCapabilities.xml",olLayer:v("web_light")}),new s({title:"OSM",visible:!1,isBaseLayer:!0,olLayer:new M({source:new E})}),new L({id:"group_edu",title:"Bildung",layers:[new s({title:"Kindertagesstätten",id:"kitas",visible:!0,healthCheck:"https://sgx.geodatenzentrum.de/wmts_topplus_open/1.0.0/WMTSCapabilities.xml",olLayer:Q()}),X()]}),new L({title:"Verkehr",id:"group_transport",layers:[new s({title:"Haltestellen Stadt Rostock",id:"bustops",visible:!0,description:"Haltestellen des öffentlichen Personenverkehrs in der Hanse- und Universitätsstadt Rostock.",olLayer:Z()}),ee()]})]}}}function v(o){const e=[-380316598427299e-8,880590808284866e-8],t=[4891.96981025128,2445.98490512564,1222.99245256282,611.49622628141,305.748113140705,152.874056570353,76.4370282851763,38.2185141425881,19.1092570712941,9.55462853564703,4.77731426782352,2.38865713391176,1.19432856695588,.59716428347794],r=new Array(t.length);for(let l=0;lDatenquellen`});return new M({source:p})}function Z(){const o=new I({url:"https://geo.sv.rostock.de/download/opendata/haltestellen/haltestellen.json",format:new C,attributions:"Haltestellen Stadt Rostock, Creative Commons CC Zero License (cc-zero)"});return new P({source:o})}function Q(){const o=new I({url:"https://ogc-api.nrw.de/inspire-us-kindergarten/v1/collections/governmentalservice/items?f=json&limit=10000",format:new C,attributions:'© Bundesamt für Kartographie und Geodäsie 2017, Datenquellen'});return new P({source:o})}function X(){return new D({title:"Schulstandorte",id:"schools",description:"Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.",visible:!0,healthCheck:async()=>{function o(e){return new Promise(t=>setTimeout(t,e))}return await o(3e3),"error"},url:"https://www.wms.nrw.de/wms/wms_nw_inspire-schulen",sublayers:[{name:"US.education",title:"INSPIRE - WMS Schulstandorte NRW"}],sourceOptions:{ratio:1}})}function ee(){return new D({title:"Straßennetz Landesbetrieb Straßenbau NRW",url:"https://www.wms.nrw.de/wms/strassen_nrw_wms",sublayers:[{name:"1",title:"Verwaltungen"},{name:"4",title:"Abschnitte und Äste"},{name:"6",title:"Unfälle"}]})}const oe={"toc-map":{name:"toc-map",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:Y,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:q,provides:[{name:"map.MapRegistry",qualifier:void 0}],references:{providers:{name:"map.MapConfigProvider",qualifier:void 0,all:!0},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/map-ui-components":{name:"@open-pioneer/map-ui-components",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:B,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/toc":{name:"@open-pioneer/toc",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}},"@open-pioneer/basemap-switcher":{name:"@open-pioneer/basemap-switcher",services:{},ui:{references:[]},properties:{}},"@open-pioneer/reactivity":{name:"@open-pioneer/reactivity",services:{},ui:{references:[]},properties:{}}},te=':root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.map-container .ol-viewport .ol-attribution{bottom:var(--map-padding-bottom);right:var(--map-padding-right)}',re=["en","de"];function ne(o){switch(o){case"en":return _(()=>import("./Clif7aTs2LHR.js"),[],import.meta.url).then(e=>e.default);case"de":return _(()=>import("./Cx-LAL-6-WEp.js"),[],import.meta.url).then(e=>e.default)}throw new Error(`Unsupported locale: '${o}'`)}const ae=j(te),le=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:ne,locales:re,packages:oe,styles:ae},Symbol.toStringTag,{value:"Module"})),ie="toc-map",se=H.bind(void 0,ie);function pe(){const o=se(),e=y.useId(),[t,r]=y.useState(!0);function p(){r(!t)}return n.jsx(g,{height:"100%",direction:"column",overflow:"hidden",children:n.jsx(k,{title:n.jsx(b,{role:"region","aria-label":o.formatMessage({id:"ariaLabel.header"}),textAlign:"center",py:1,children:n.jsx(S,{size:"md",children:"OpenLayers Base Packages - TOC and Health Check Sample"})}),children:n.jsx(g,{flex:"1",direction:"column",children:n.jsxs(N,{mapId:f,role:"main","aria-label":o.formatMessage({id:"ariaLabel.map"}),children:[n.jsx(h,{position:"top-left",horizontalGap:10,verticalGap:10,children:t&&n.jsx(b,{backgroundColor:"white",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",maxWidth:350,children:t&&n.jsx(b,{role:"dialog","aria-labelledby":e,children:n.jsx(k,{title:n.jsx(S,{id:e,size:"md",mb:2,children:o.formatMessage({id:"tocTitle"})}),children:n.jsx(V,{mapId:f,showTools:!0,basemapSwitcherProps:{allowSelectingEmptyBasemap:!0}})})})})}),n.jsx(h,{position:"top-right",horizontalGap:10,verticalGap:10,children:n.jsxs(K,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",maxWidth:"400px",children:[n.jsx(z,{as:"b",children:"Description"}),n.jsxs(z,{children:["This application can be used to test the TOC, including health checks for configured layers. Two base layers (",'"',"TopPlus Open",'"'," and ",'"',"TopPlus Open (Grau)",'"',") and one operational layer (",'"',"Schulstandorte",'"',") will be unavailable and should be marked as such by the UI."]})]})}),n.jsx(h,{position:"bottom-right",horizontalGap:10,verticalGap:45,children:n.jsx(g,{role:"toolbar","aria-label":o.formatMessage({id:"ariaLabel.toolbar"}),direction:"column",gap:1,padding:1,children:n.jsx(F,{label:o.formatMessage({id:"tocTitle"}),icon:n.jsx(U,{}),isActive:t,onClick:p})})})]})})})})}const ce=R({component:pe,appMetadata:le,async resolveConfig(o){const e=o.getAttribute("forced-locale");if(e)return{locale:e}}});customElements.define("toc-map-app",ce);const ue=document.getElementsByTagName("body")[0];de();function de(){const o=window.location.search,t=new URLSearchParams(o).get("lang"),r=document.createElement("toc-map-app");r.classList.add("full-height"),r.classList.add("app"),r.setAttribute("id","test"),t&&r.setAttribute("forced-locale",t),ue.appendChild(r)} diff --git a/openlayers-base-packages/pr-previews/pr-371/assets/Bu2XxZuHwi9Y.js b/openlayers-base-packages/pr-previews/pr-371/assets/C1QgS6aRUKHA.js similarity index 91% rename from openlayers-base-packages/pr-previews/pr-371/assets/Bu2XxZuHwi9Y.js rename to openlayers-base-packages/pr-previews/pr-371/assets/C1QgS6aRUKHA.js index b537740..91d45d1 100644 --- a/openlayers-base-packages/pr-previews/pr-371/assets/Bu2XxZuHwi9Y.js +++ b/openlayers-base-packages/pr-previews/pr-371/assets/C1QgS6aRUKHA.js @@ -1 +1 @@ -import{a as E,r as n,j as e,B as s,F,l as U,f as A,e as D}from"./Bh0CuZ3gy5tC.js";import{t as H}from"./B99qq3IKf4kH.js";import{S as B,T as V,O as q,M as W,H as $,k as y,g as X,B as N,h as Y,l as Z,m as j}from"./CncSlnPsjr9P.js";import{_ as S}from"./CmsKOCeNyeyo.js";import{a as z,b as u,R as J}from"./Bwz5Rvo1RSBv.js";import{C as K}from"./CbOUyl8QGaaZ.js";import{S as L,T as g,V as Q,U as ee,a as p}from"./Tz2xttM4F6S2.js";import{M as oe}from"./DUys4rac0YQP.js";import{a as re,b as te,M as c}from"./BeFcF3Ti4kY-.js";import{F as C}from"./BO_q12Vdyug-.js";import{F as I}from"./CreVQ-qFRzOc.js";import{C as ie}from"./2d5-QpxJNHTD.js";import"./D03oE8cEQPSj.js";import"./Cq1ZpfgEg4XJ.js";const G="main";class le{mapId=G;async getMapConfig(){return{initialView:{kind:"position",center:{x:404747,y:5757920},zoom:14},layers:[new B({title:"OSM",isBaseLayer:!0,olLayer:new V({source:new q})})]}}}const ne={"result-list-app":{name:"result-list-app",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:le,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{}}},ui:{references:[]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:W,provides:[{name:"map.MapRegistry",qualifier:void 0}],references:{providers:{name:"map.MapConfigProvider",qualifier:void 0,all:!0},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/result-list":{name:"@open-pioneer/result-list",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/theme":{name:"@open-pioneer/theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:$,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}}},ae=':root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.map-container .ol-viewport .ol-attribution{bottom:var(--map-padding-bottom);right:var(--map-padding-right)}.result-list-no-data-message{text-align:center;margin-top:50px;font-weight:700;font-size:larger}.result-list-table th,.result-list-table td{overflow-wrap:break-word}.result-list-table.result-list-table--is-resizing *{cursor:col-resize}.result-list-table thead{position:sticky;top:0;z-index:1;background:var(--chakra-colors-background_body)}.result-list-table th{position:relative;border-right-width:thin}.result-list-table tbody tr:hover{background:var(--chakra-colors-background_light)}.result-list-table .result-list-resizer{position:absolute;top:0;height:100%;right:0;width:8px;background:var(--chakra-colors-trails-100);transform:scaleX(.25);cursor:col-resize;-webkit-user-select:none;user-select:none;touch-action:none;padding-left:0}.result-list-table th:last-child .result-list-resizer{width:8px;transform:translate(50%) scaleX(.25)}.result-list-table th .result-list-resizer.result-list-resizer--is-resizing{background:var(--chakra-colors-trails-500);transform:scale(1)}.result-list-table th .result-list-resizer:hover{transform:scale(1)}',se=["en","de"];function pe(o){switch(o){case"en":return S(()=>import("./CWewJjE-xeCE.js"),[],import.meta.url).then(i=>i.default);case"de":return S(()=>import("./BbSw8Fldfnox.js"),[],import.meta.url).then(i=>i.default)}throw new Error(`Unsupported locale: '${o}'`)}const ce=E(ae),de=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:pe,locales:se,packages:ne,styles:ce},Symbol.toStringTag,{value:"Module"})),M=400;function ue(){const[o,i]=n.useState(0),[r,x]=n.useState(),[T,m]=n.useState(!1),[d,R]=n.useState(!1),[h,_]=n.useState("multi"),[v,f]=n.useState("checkbox"),w=!!r&&T,a=l=>{x(l),m(!0),i(o+1)},k=n.useMemo(()=>{if(!r||!d)return r;const l=r.columns.filter((b,P)=>P%2==1);return{...r,columns:l}},[d,r]);return e.jsx(y,{height:"100%",direction:"column",overflow:"hidden",children:e.jsx(X,{title:e.jsx(N,{textAlign:"center",py:1,children:e.jsx(Y,{size:"md",children:"OpenLayers Base Packages - Result List"})}),children:e.jsxs(y,{flex:"1",direction:"column",position:"relative",children:[e.jsxs(Z,{mapId:G,viewPadding:{bottom:w?M:0},children:[e.jsx(j,{position:"top-left",horizontalGap:10,verticalGap:10,children:e.jsx(N,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",children:e.jsxs(L,{children:[e.jsx(g,{align:"center",children:"Test Controls:"}),e.jsxs(oe,{placement:"right-end",children:[e.jsx(re,{as:s,rightIcon:e.jsx(K,{}),children:"Fill result list"}),e.jsx(F,{children:e.jsxs(te,{children:[e.jsx(c,{onClick:()=>a(he),children:"Persons"}),e.jsx(c,{onClick:()=>a(Ne),children:"Custom render"}),e.jsx(c,{onClick:()=>a(be),children:"Generated"}),e.jsx(c,{onClick:()=>a(ge),children:"Long Strings"}),e.jsx(c,{onClick:()=>a(Oe),children:"Many Columns"})]})})]}),e.jsxs(s,{onClick:()=>R(!d),children:[d?"Show":"Hide"," even columns"]}),e.jsx(s,{isDisabled:r===void 0,onClick:()=>m(!0),children:"Show result list"}),e.jsx(s,{onClick:()=>m(!1),children:"Hide result list"}),e.jsx(s,{isDisabled:r===void 0,onClick:()=>x(void 0),children:"Close result list"}),e.jsxs(C,{children:[e.jsx(I,{children:"Selection mode"}),e.jsx(z,{value:h,onChange:l=>{const b=l;_(b),f(b==="single"?"radio":"checkbox")},children:e.jsxs(L,{direction:"row",children:[e.jsx(u,{value:"single",children:"Single"}),e.jsx(u,{value:"multi",children:"Multi"})]})})]}),e.jsxs(C,{children:[e.jsx(I,{children:"Selection style"}),e.jsx(z,{value:v,onChange:l=>{f(l)},children:e.jsxs(L,{direction:"row",children:[e.jsx(u,{value:"radio",isDisabled:h==="multi",children:"Radio"}),e.jsx(u,{value:"checkbox",children:"Checkbox"})]})})]})]})})}),e.jsx(j,{position:"top-right",horizontalGap:10,verticalGap:10,children:e.jsxs(Q,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",maxWidth:"400px",maxHeight:"300px",overflow:"auto",children:[e.jsx(g,{as:"b",children:"Description"}),e.jsx(g,{children:"This application can be used to test the result list component. Internally, this application keeps track of the current result list input and displays it when the component shall be shown."}),e.jsxs(ee,{children:[e.jsx(p,{children:"If the result list has been filled, it can be hidden and shown again while preserving the state (selection, sort, scroll, ...)."}),e.jsx(p,{children:"The result list is embedded with a fixed height (with internal scrolling) above the map (using view padding). Showing or hiding the component will animate the view."}),e.jsx(p,{children:"Toggling columns will preserve the state of the result list."}),e.jsx(p,{children:"Filling the result list again resets the state (even when using equal data)."}),e.jsx(p,{children:"Fully closing the result list drops all state."})]})]})})]}),k&&e.jsx(N,{position:"absolute",visibility:w?"visible":"hidden",bottom:"0",backgroundColor:"white",width:"100%",height:`${M}px`,borderTop:"2px solid",borderColor:"trails.500",zIndex:1,children:e.jsx(J,{mapId:G,input:k,selectionMode:h,selectionStyle:v},String(o))})]})})})}let me=1;function t(o,i,r){return{id:String(me++),properties:{name:o,age:i,city:r}}}const he={data:[t("Test User A",21,"Cologne"),t("Test User B",33,"Berlin"),t("Test User C",44,"New York"),t("Test User D",55,"London"),t("Test User E",8,"Rome"),t("Test User F",14,"Vienna"),t("Test User G",17,"Paris"),t("Test User H",27,"Brussels"),t("Test User I",19,"Warsaw")],columns:[{displayName:"id",getPropertyValue(o){return o.id}},{propertyName:"name"},{propertyName:"age"},{propertyName:"city"}]},be={data:Array.from(Array(100).keys()).map(o=>({id:o,properties:{boolean:o%2==0,empty:o%2==0?null:void 0,number:o,float:o/7,string:`Item ${o}`,date:new Date}})),columns:[{propertyName:"boolean"},{propertyName:"number"},{propertyName:"float"},{propertyName:"string"},{propertyName:"date"},{propertyName:"empty"}],formatOptions:{numberOptions:{maximumFractionDigits:2},dateOptions:{timeStyle:"full",dateStyle:"full",timeZone:"UTC"}}},Ne={data:[{id:1,properties:{bool:!0}},{id:2,properties:{bool:!1}},{id:3,properties:{bool:void 0}}],columns:[{displayName:"id (with tooltip)",getPropertyValue(o){return o.id},renderCell({feature:o}){return e.jsx(Le,{id:o.id})}},{displayName:"boolean as checkbox (read only)",propertyName:"bool",renderCell({value:o}){return e.jsx(ie,{isIndeterminate:o===void 0,isChecked:!!o})}}]};function Le(o){return e.jsx(U,{label:`tooltip for feature ${o.id}`,placement:"top",children:e.jsx(A.span,{children:o.id})})}const ge={data:[{id:1,properties:{short:"Short 1",long:"LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG "}},{id:2,properties:{short:"Short 2",long:"LONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONG"}}],columns:[{propertyName:"short"},{propertyName:"long",width:300}]},Oe={columns:[{propertyName:"a"},{propertyName:"b"},{propertyName:"c"},{propertyName:"d"},{propertyName:"e"},{propertyName:"f"},{propertyName:"g"},{propertyName:"h"},{propertyName:"i"}],data:[{id:0,properties:{a:1,b:1,c:1,d:1,e:1,f:1,g:1,h:1,i:1}}]},Ge=new URLSearchParams(window.location.search),O=Ge.get("lang"),xe=D({component:ue,theme:H,appMetadata:de,config:{locale:O==="de"||O==="en"?O:void 0}});customElements.define("result-list-app",xe); +import{a as E,r as n,j as e,B as s,F,l as U,f as A,e as D}from"./Bh0CuZ3gy5tC.js";import{t as H}from"./B99qq3IKf4kH.js";import{S as B,T as V,O as q,M as W,H as $,k as y,g as X,B as N,h as Y,l as Z,m as j}from"./p-jlpmJ86TPh.js";import{_ as S}from"./CmsKOCeNyeyo.js";import{a as z,b as u,R as J}from"./D4hWyDE3P_yA.js";import{C as K}from"./CbOUyl8QGaaZ.js";import{S as L,T as g,V as Q,U as ee,a as p}from"./Tz2xttM4F6S2.js";import{M as oe}from"./DUys4rac0YQP.js";import{a as re,b as te,M as c}from"./BeFcF3Ti4kY-.js";import{F as C}from"./BO_q12Vdyug-.js";import{F as I}from"./CreVQ-qFRzOc.js";import{C as ie}from"./2d5-QpxJNHTD.js";import"./D03oE8cEQPSj.js";import"./Cq1ZpfgEg4XJ.js";const G="main";class le{mapId=G;async getMapConfig(){return{initialView:{kind:"position",center:{x:404747,y:5757920},zoom:14},layers:[new B({title:"OSM",isBaseLayer:!0,olLayer:new V({source:new q})})]}}}const ne={"result-list-app":{name:"result-list-app",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:le,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{}}},ui:{references:[]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:W,provides:[{name:"map.MapRegistry",qualifier:void 0}],references:{providers:{name:"map.MapConfigProvider",qualifier:void 0,all:!0},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/theme":{name:"@open-pioneer/theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:$,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/result-list":{name:"@open-pioneer/result-list",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}}},ae=':root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.map-container .ol-viewport .ol-attribution{bottom:var(--map-padding-bottom);right:var(--map-padding-right)}.result-list-no-data-message{text-align:center;margin-top:50px;font-weight:700;font-size:larger}.result-list-table th,.result-list-table td{overflow-wrap:break-word}.result-list-table.result-list-table--is-resizing *{cursor:col-resize}.result-list-table thead{position:sticky;top:0;z-index:1;background:var(--chakra-colors-background_body)}.result-list-table th{position:relative;border-right-width:thin}.result-list-table tbody tr:hover{background:var(--chakra-colors-background_light)}.result-list-table .result-list-resizer{position:absolute;top:0;height:100%;right:0;width:8px;background:var(--chakra-colors-trails-100);transform:scaleX(.25);cursor:col-resize;-webkit-user-select:none;user-select:none;touch-action:none;padding-left:0}.result-list-table th:last-child .result-list-resizer{width:8px;transform:translate(50%) scaleX(.25)}.result-list-table th .result-list-resizer.result-list-resizer--is-resizing{background:var(--chakra-colors-trails-500);transform:scale(1)}.result-list-table th .result-list-resizer:hover{transform:scale(1)}',se=["en","de"];function pe(o){switch(o){case"en":return S(()=>import("./CWewJjE-xeCE.js"),[],import.meta.url).then(i=>i.default);case"de":return S(()=>import("./BbSw8Fldfnox.js"),[],import.meta.url).then(i=>i.default)}throw new Error(`Unsupported locale: '${o}'`)}const ce=E(ae),de=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:pe,locales:se,packages:ne,styles:ce},Symbol.toStringTag,{value:"Module"})),M=400;function ue(){const[o,i]=n.useState(0),[r,x]=n.useState(),[T,m]=n.useState(!1),[d,R]=n.useState(!1),[h,_]=n.useState("multi"),[v,f]=n.useState("checkbox"),w=!!r&&T,a=l=>{x(l),m(!0),i(o+1)},k=n.useMemo(()=>{if(!r||!d)return r;const l=r.columns.filter((b,P)=>P%2==1);return{...r,columns:l}},[d,r]);return e.jsx(y,{height:"100%",direction:"column",overflow:"hidden",children:e.jsx(X,{title:e.jsx(N,{textAlign:"center",py:1,children:e.jsx(Y,{size:"md",children:"OpenLayers Base Packages - Result List"})}),children:e.jsxs(y,{flex:"1",direction:"column",position:"relative",children:[e.jsxs(Z,{mapId:G,viewPadding:{bottom:w?M:0},children:[e.jsx(j,{position:"top-left",horizontalGap:10,verticalGap:10,children:e.jsx(N,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",children:e.jsxs(L,{children:[e.jsx(g,{align:"center",children:"Test Controls:"}),e.jsxs(oe,{placement:"right-end",children:[e.jsx(re,{as:s,rightIcon:e.jsx(K,{}),children:"Fill result list"}),e.jsx(F,{children:e.jsxs(te,{children:[e.jsx(c,{onClick:()=>a(he),children:"Persons"}),e.jsx(c,{onClick:()=>a(Ne),children:"Custom render"}),e.jsx(c,{onClick:()=>a(be),children:"Generated"}),e.jsx(c,{onClick:()=>a(ge),children:"Long Strings"}),e.jsx(c,{onClick:()=>a(Oe),children:"Many Columns"})]})})]}),e.jsxs(s,{onClick:()=>R(!d),children:[d?"Show":"Hide"," even columns"]}),e.jsx(s,{isDisabled:r===void 0,onClick:()=>m(!0),children:"Show result list"}),e.jsx(s,{onClick:()=>m(!1),children:"Hide result list"}),e.jsx(s,{isDisabled:r===void 0,onClick:()=>x(void 0),children:"Close result list"}),e.jsxs(C,{children:[e.jsx(I,{children:"Selection mode"}),e.jsx(z,{value:h,onChange:l=>{const b=l;_(b),f(b==="single"?"radio":"checkbox")},children:e.jsxs(L,{direction:"row",children:[e.jsx(u,{value:"single",children:"Single"}),e.jsx(u,{value:"multi",children:"Multi"})]})})]}),e.jsxs(C,{children:[e.jsx(I,{children:"Selection style"}),e.jsx(z,{value:v,onChange:l=>{f(l)},children:e.jsxs(L,{direction:"row",children:[e.jsx(u,{value:"radio",isDisabled:h==="multi",children:"Radio"}),e.jsx(u,{value:"checkbox",children:"Checkbox"})]})})]})]})})}),e.jsx(j,{position:"top-right",horizontalGap:10,verticalGap:10,children:e.jsxs(Q,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",maxWidth:"400px",maxHeight:"300px",overflow:"auto",children:[e.jsx(g,{as:"b",children:"Description"}),e.jsx(g,{children:"This application can be used to test the result list component. Internally, this application keeps track of the current result list input and displays it when the component shall be shown."}),e.jsxs(ee,{children:[e.jsx(p,{children:"If the result list has been filled, it can be hidden and shown again while preserving the state (selection, sort, scroll, ...)."}),e.jsx(p,{children:"The result list is embedded with a fixed height (with internal scrolling) above the map (using view padding). Showing or hiding the component will animate the view."}),e.jsx(p,{children:"Toggling columns will preserve the state of the result list."}),e.jsx(p,{children:"Filling the result list again resets the state (even when using equal data)."}),e.jsx(p,{children:"Fully closing the result list drops all state."})]})]})})]}),k&&e.jsx(N,{position:"absolute",visibility:w?"visible":"hidden",bottom:"0",backgroundColor:"white",width:"100%",height:`${M}px`,borderTop:"2px solid",borderColor:"trails.500",zIndex:1,children:e.jsx(J,{mapId:G,input:k,selectionMode:h,selectionStyle:v},String(o))})]})})})}let me=1;function t(o,i,r){return{id:String(me++),properties:{name:o,age:i,city:r}}}const he={data:[t("Test User A",21,"Cologne"),t("Test User B",33,"Berlin"),t("Test User C",44,"New York"),t("Test User D",55,"London"),t("Test User E",8,"Rome"),t("Test User F",14,"Vienna"),t("Test User G",17,"Paris"),t("Test User H",27,"Brussels"),t("Test User I",19,"Warsaw")],columns:[{displayName:"id",getPropertyValue(o){return o.id}},{propertyName:"name"},{propertyName:"age"},{propertyName:"city"}]},be={data:Array.from(Array(100).keys()).map(o=>({id:o,properties:{boolean:o%2==0,empty:o%2==0?null:void 0,number:o,float:o/7,string:`Item ${o}`,date:new Date}})),columns:[{propertyName:"boolean"},{propertyName:"number"},{propertyName:"float"},{propertyName:"string"},{propertyName:"date"},{propertyName:"empty"}],formatOptions:{numberOptions:{maximumFractionDigits:2},dateOptions:{timeStyle:"full",dateStyle:"full",timeZone:"UTC"}}},Ne={data:[{id:1,properties:{bool:!0}},{id:2,properties:{bool:!1}},{id:3,properties:{bool:void 0}}],columns:[{displayName:"id (with tooltip)",getPropertyValue(o){return o.id},renderCell({feature:o}){return e.jsx(Le,{id:o.id})}},{displayName:"boolean as checkbox (read only)",propertyName:"bool",renderCell({value:o}){return e.jsx(ie,{isIndeterminate:o===void 0,isChecked:!!o})}}]};function Le(o){return e.jsx(U,{label:`tooltip for feature ${o.id}`,placement:"top",children:e.jsx(A.span,{children:o.id})})}const ge={data:[{id:1,properties:{short:"Short 1",long:"LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG "}},{id:2,properties:{short:"Short 2",long:"LONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONG"}}],columns:[{propertyName:"short"},{propertyName:"long",width:300}]},Oe={columns:[{propertyName:"a"},{propertyName:"b"},{propertyName:"c"},{propertyName:"d"},{propertyName:"e"},{propertyName:"f"},{propertyName:"g"},{propertyName:"h"},{propertyName:"i"}],data:[{id:0,properties:{a:1,b:1,c:1,d:1,e:1,f:1,g:1,h:1,i:1}}]},Ge=new URLSearchParams(window.location.search),O=Ge.get("lang"),xe=D({component:ue,theme:H,appMetadata:de,config:{locale:O==="de"||O==="en"?O:void 0}});customElements.define("result-list-app",xe); diff --git a/openlayers-base-packages/pr-previews/pr-371/assets/BMUaL9fwyTyD.js b/openlayers-base-packages/pr-previews/pr-371/assets/CIcCgABVk_3-.js similarity index 97% rename from openlayers-base-packages/pr-previews/pr-371/assets/BMUaL9fwyTyD.js rename to openlayers-base-packages/pr-previews/pr-371/assets/CIcCgABVk_3-.js index 180762c..66a39e7 100644 --- a/openlayers-base-packages/pr-previews/pr-371/assets/BMUaL9fwyTyD.js +++ b/openlayers-base-packages/pr-previews/pr-371/assets/CIcCgABVk_3-.js @@ -1 +1 @@ -var se=Object.defineProperty;var z=t=>{throw TypeError(t)};var re=(t,e,s)=>e in t?se(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var x=(t,e,s)=>re(t,typeof e!="symbol"?e+"":e,s),A=(t,e,s)=>e.has(t)||z("Cannot "+s);var h=(t,e,s)=>(A(t,e,"read from private field"),s?s.call(t):e.get(t)),y=(t,e,s)=>e.has(t)?z("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),S=(t,e,s,r)=>(A(t,e,"write to private field"),r?r.call(t,s):e.set(t,s),s),R=(t,e,s)=>(A(t,e,"access private method"),s);import{c as oe,i as B,r as b,j as m}from"./Bh0CuZ3gy5tC.js";import{G as H,T as q}from"./TnHTIdi4bAVU.js";import{b as ae,aE as ne,b6 as ie,u as ce,b2 as Z,i as D,b9 as T,e as ue,r as le,j as fe,V as de}from"./CncSlnPsjr9P.js";import{a as he,b as me,c as we,d as ge,e as pe}from"./CL_VRsbiqLzM.js";import{u as be}from"./BTEHqhSAUrUR.js";const ve="next";function ye(t,e,s,r){const o=new URL(t),n=o.searchParams;return n.set("bbox",e.join(",")),n.set("bbox-crs",s),n.set("crs",s),n.set("f","json"),r?.(new URL(o))??o}function Re(t,e,s){const r=new URL(t),o=r.searchParams;return o.set("offset",e.toString()),o.set("limit",s.toString()),r.toString()}function G(t){if(!Array.isArray(t))return;const s=t.filter(r=>r.rel===ve);if(s.length===1)return s[0]?.href}async function K(t,e,s,r){let o=[];const n={headers:{Accept:"application/geo+json"},signal:r},a=await s.fetch(t,n);if(a.status!==200)throw new Error(`Failed to query features from service (status code ${a.status})`);const i=await a.json();e&&(o=e.readFeatures(i));const c=G(i.links);return{features:o,numberMatched:i.numberMatched,nextURL:c}}async function xe(t,e){const s={supportsOffsetStrategy:!1},r=new URL(t);r.searchParams.set("limit","1"),r.searchParams.set("f","json");const o=await e.fetch(r.toString(),{headers:{Accept:"application/geo+json"}});if(o.status!==200)throw new Error(`Failed to probe collection information (status code ${o.status})`);const n=await o.json(),a=G(n.links);if(!a)return s;const c=new URL(a).searchParams.has("offset");return s.supportsOffsetStrategy=c,s}async function Fe(t){const{fullURL:e,featureFormat:s,signal:r,addFeatures:o,queryFeatures:n}=t,a=t.limit,i=t.maxConcurrentRequests;let c=0,l=e;const f=[];let u;for(;l;){let g;u==null?g=i:g=Math.ceil((u-c)/a),g=Math.max(1,Math.min(g,i));const v=[];for(let F=0;F{l??=a(r,s);let I;try{I=await l}catch(L){U.error("Failed to retrieve collection information",L),F?.(),l=void 0;return}c?.abort("Extent changed"),c=new AbortController;const te=ye(r,u,t.crs,t.rewriteUrl);let N=t?.strategy||(I?.supportsOffsetStrategy?"offset":"next");N==="offset"&&!I?.supportsOffsetStrategy&&(N="next");try{const L=await Me(N,{fullURL:te.toString(),httpService:s,featureFormat:o.getFormat(),queryFeatures:n,addFeatures:i,limit:t.limit??Le,maxConcurrentRequests:t.maxConcurrentRequests??Se,signal:c.signal,collectionInfos:I});d?.(L),U.debug("Finished loading features for extent:",u)}catch(L){B(L)?(U.debug("Query-Feature-Request aborted",L),o.removeLoadedExtent(u),F?.()):U.error("Failed to load features",L)}};return o.setLoader(f),o}function Me(t,e){switch(t){case"next":return Pe(e);case"offset":return Fe(e)}}async function Pe(t){const e=t.limit;let s=new URL(t.fullURL);s.searchParams.set("limit",e.toString());let r=[];do{const o=await J([s.toString()],t.featureFormat,t.httpService,t.signal,t.addFeatures,t.queryFeatures);if(r=r.concat(o.features),!o.nextURL)break;s=new URL(o.nextURL)}while(!0);return r}async function J(t,e,s,r,o,n=K){const a={nextURL:void 0,numberMatched:void 0,features:[]},i=t.map(async(c,l)=>{const f=l===t.length-1,u=await n(c,e,s,r);o(u.features),U.debug(`NextURL for index = ${l} (isLast = ${f}): ${u.nextURL||"No Next URL"}`),a.features.push(...u.features),f&&(a.numberMatched=u.numberMatched,a.nextURL=u.nextURL)});return await Promise.all(i),a}var p,P,V,C,M,W,X;class Ve{constructor(e,s){y(this,M);x(this,"label");y(this,p);y(this,P);y(this,V);y(this,C);this.label=e.label,S(this,p,e),S(this,P,s);const{baseUrl:r,params:o}=Ee(e.baseUrl);S(this,V,r),S(this,C,o)}async search(e,{mapProjection:s,maxResults:r,signal:o}){const n=R(this,M,X).call(this,e,r),a=new H({dataProjection:"EPSG:4326",featureProjection:s});return(await Ce(h(this,P),n,o)).features.map(c=>R(this,M,W).call(this,c,a))}}p=new WeakMap,P=new WeakMap,V=new WeakMap,C=new WeakMap,M=new WeakSet,W=function(e,s){const r=h(this,p).renderLabel?.(e),o=e.properties[h(this,p).labelProperty],n=e.properties[h(this,p).searchProperty],a=r||(o!==void 0?String(o):n!==void 0?String(n):"");return{id:e.id??ie(),label:a,geometry:s.readGeometry(e.geometry),properties:e.properties}},X=function(e,s){const r=new URL(`${h(this,V)}/collections/${h(this,p).collectionId}/items`);for(const[o,n]of h(this,C))r.searchParams.append(o,n);return r.searchParams.set(h(this,p).searchProperty,`*${e}*`),r.searchParams.set("limit",String(s)),r.searchParams.set("f","json"),h(this,p).rewriteUrl?.(new URL(r))??r};async function Ce(t,e,s){try{const r=await t.fetch(e,{signal:s,headers:{Accept:"application/json"}});if(!r.ok)throw new Error("Request failed with status "+r.status);return await r.json()}catch(r){throw B(r)?r:new Error("Failed to search on OGC API Features service",{cause:r})}}function Ee(t){const e=new URL(t),s=new URLSearchParams(e.searchParams);return e.search="",{baseUrl:e.href.replace(/\/+$/,""),params:s}}var E;class He{constructor({references:e}){y(this,E);S(this,E,e.httpService)}createVectorSource(e){return Ie(e,h(this,E))}}E=new WeakMap;var j;class Te{constructor({references:e}){y(this,j);S(this,j,e.httpService)}createSearchSource(e){return new Ve(e,h(this,j))}}j=new WeakMap;const je="@open-pioneer/map-navigation",$=ce.bind(void 0,je),Ge=b.forwardRef(function(e,s){const{containerProps:r}=Z("initial-extent",e),{map:o}=D(e),n=$();function a(){const i=o?.initialExtent,c=o?.olMap;if(i&&c){const l=[i.xMin,i.yMin,i.xMax,i.yMax];c.getView().fit(l,{duration:200})}}return m.jsx(q,{ref:s,label:n.formatMessage({id:"initial-extent.title"}),icon:m.jsx(he,{}),onClick:a,...r})}),Ke=b.forwardRef(function(e,s){return m.jsx(Q,{zoomDirection:"in",ref:s,...e})}),Je=b.forwardRef(function(e,s){return m.jsx(Q,{zoomDirection:"out",ref:s,...e})}),Q=b.forwardRef(function(e,s){const{zoomDirection:r}=e,{map:o}=D(e),n=$(),[a,i]=b.useState(!1),{defaultClassName:c,buttonLabel:l,buttonIcon:f}=ke(n,r),{containerProps:u}=Z(T("zoom",c),e);function g(){if(a)return;i(!0);const v=o?.olMap.getView();let d=v?.getZoom();const F=v?.getMaxZoom()||Number.MAX_SAFE_INTEGER,I=v?.getMinZoom()||0;v&&d!==void 0&&(r==="in"&&dI&&--d,v.animate({zoom:d,duration:200},()=>i(!1)))}return m.jsx(q,{ref:s,label:l,icon:f,onClick:g,...u})});function ke(t,e){switch(e){case"in":return{defaultClassName:"zoom-in",buttonLabel:t.formatMessage({id:"zoom-in.title"}),buttonIcon:m.jsx(we,{})};case"out":return{defaultClassName:"zoom-out",buttonLabel:t.formatMessage({id:"zoom-out.title"}),buttonIcon:m.jsx(me,{})}}}const Ne=200;var w,_,k,Y;class Ae{constructor(e){y(this,w);x(this,"olMap");x(this,"handle");x(this,"_mapViews",ue());x(this,"_activeViewId",le(0));x(this,"backward",()=>{if(this.canBackward)R(this,w,k).call(this,this.activeViewId-1),R(this,w,_).call(this,this.activeViewId);else throw new Error("Backward is not possible at the moment")});x(this,"forward",()=>{if(this.canForward)R(this,w,k).call(this,this.activeViewId+1),R(this,w,_).call(this,this.activeViewId);else throw new Error("Forward is not possible at the moment")});this.olMap=e.olMap,this.handle=R(this,w,Y).call(this)}destroy(){this.handle&&fe(this.handle),this.handle=void 0}get activeViewId(){return this._activeViewId.value}get mapViews(){return this._mapViews}get canBackward(){return this.mapViews.get(this.activeViewId-1)!=null}get canForward(){return this.mapViews.get(this.activeViewId+1)!=null}}w=new WeakSet,_=function(e){const s=this.olMap.getView();this.olMap.setView(new de({center:this.mapViews.get(e).center,resolution:this.mapViews.get(e).resolution,projection:s.getProjection()}))},k=function(e){this._activeViewId.value=e},Y=function(){const e=this.olMap.on("moveend",()=>{s()}),s=()=>{const r=this.olMap,o=this.mapViews,n=r.getView(),a=n.getResolution(),i=n.getCenter();if(a!=null&&i!=null&&(i!==o.get(this.activeViewId)?.center||a!==o.get(this.activeViewId)?.resolution)){const c={resolution:a,center:i},l=this.activeViewId+1;for(const f of o.keys())f>l&&o.delete(f);for(const f of o.keys()){if(o.size{if(!t)return;let r=O.get(t);return r==null?(r={vm:new Ae(t),useCount:1},O.set(t,r)):r.useCount++,s(r.vm),()=>{s(void 0),r.useCount--,r.useCount===0&&(r.vm.destroy(),O.delete(t))}},[t]),e}const We=b.forwardRef(function(e,s){return m.jsx(ee,{viewDirection:"forward",ref:s,...e})}),Xe=b.forwardRef(function(e,s){return m.jsx(ee,{viewDirection:"backward",ref:s,...e})}),ee=b.forwardRef(function(e,s){const r=$(),{viewDirection:o}=e,{map:n}=D(e),a=Oe(n),{defaultClassName:i,buttonLabel:c,buttonIcon:l}=_e(r,o),{containerProps:f}=Z(T("view",i),e),u=be(()=>a?o==="forward"?a.canForward:a.canBackward:!1,[a,o]),g=()=>{a&&(o==="forward"?a.forward():a.backward())};return a&&m.jsx(q,{ref:s,...f,label:c,icon:l,onClick:g,isDisabled:!u})});function _e(t,e){switch(e){case"forward":return{defaultClassName:"view-forward",buttonLabel:t.formatMessage({id:"view-forward.title"}),buttonIcon:m.jsx(pe,{})};case"backward":return{defaultClassName:"view-backward",buttonLabel:t.formatMessage({id:"view-backward.title"}),buttonIcon:m.jsx(ge,{})}}}export{Xe as H,Ge as I,Te as S,He as V,Ke as Z,Je as a,We as b}; +var se=Object.defineProperty;var z=t=>{throw TypeError(t)};var re=(t,e,s)=>e in t?se(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var x=(t,e,s)=>re(t,typeof e!="symbol"?e+"":e,s),A=(t,e,s)=>e.has(t)||z("Cannot "+s);var h=(t,e,s)=>(A(t,e,"read from private field"),s?s.call(t):e.get(t)),y=(t,e,s)=>e.has(t)?z("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),S=(t,e,s,r)=>(A(t,e,"write to private field"),r?r.call(t,s):e.set(t,s),s),R=(t,e,s)=>(A(t,e,"access private method"),s);import{c as oe,i as B,r as b,j as m}from"./Bh0CuZ3gy5tC.js";import{G as H,T as q}from"./0Ump2O8Jg_uq.js";import{b as ae,aE as ne,b6 as ie,u as ce,b2 as Z,i as D,b9 as T,e as ue,r as le,j as fe,V as de}from"./p-jlpmJ86TPh.js";import{a as he,b as me,c as we,d as ge,e as pe}from"./CL_VRsbiqLzM.js";import{u as be}from"./BEc19nv24p4W.js";const ve="next";function ye(t,e,s,r){const o=new URL(t),n=o.searchParams;return n.set("bbox",e.join(",")),n.set("bbox-crs",s),n.set("crs",s),n.set("f","json"),r?.(new URL(o))??o}function Re(t,e,s){const r=new URL(t),o=r.searchParams;return o.set("offset",e.toString()),o.set("limit",s.toString()),r.toString()}function G(t){if(!Array.isArray(t))return;const s=t.filter(r=>r.rel===ve);if(s.length===1)return s[0]?.href}async function K(t,e,s,r){let o=[];const n={headers:{Accept:"application/geo+json"},signal:r},a=await s.fetch(t,n);if(a.status!==200)throw new Error(`Failed to query features from service (status code ${a.status})`);const i=await a.json();e&&(o=e.readFeatures(i));const c=G(i.links);return{features:o,numberMatched:i.numberMatched,nextURL:c}}async function xe(t,e){const s={supportsOffsetStrategy:!1},r=new URL(t);r.searchParams.set("limit","1"),r.searchParams.set("f","json");const o=await e.fetch(r.toString(),{headers:{Accept:"application/geo+json"}});if(o.status!==200)throw new Error(`Failed to probe collection information (status code ${o.status})`);const n=await o.json(),a=G(n.links);if(!a)return s;const c=new URL(a).searchParams.has("offset");return s.supportsOffsetStrategy=c,s}async function Fe(t){const{fullURL:e,featureFormat:s,signal:r,addFeatures:o,queryFeatures:n}=t,a=t.limit,i=t.maxConcurrentRequests;let c=0,l=e;const f=[];let u;for(;l;){let g;u==null?g=i:g=Math.ceil((u-c)/a),g=Math.max(1,Math.min(g,i));const v=[];for(let F=0;F{l??=a(r,s);let I;try{I=await l}catch(L){U.error("Failed to retrieve collection information",L),F?.(),l=void 0;return}c?.abort("Extent changed"),c=new AbortController;const te=ye(r,u,t.crs,t.rewriteUrl);let N=t?.strategy||(I?.supportsOffsetStrategy?"offset":"next");N==="offset"&&!I?.supportsOffsetStrategy&&(N="next");try{const L=await Me(N,{fullURL:te.toString(),httpService:s,featureFormat:o.getFormat(),queryFeatures:n,addFeatures:i,limit:t.limit??Le,maxConcurrentRequests:t.maxConcurrentRequests??Se,signal:c.signal,collectionInfos:I});d?.(L),U.debug("Finished loading features for extent:",u)}catch(L){B(L)?(U.debug("Query-Feature-Request aborted",L),o.removeLoadedExtent(u),F?.()):U.error("Failed to load features",L)}};return o.setLoader(f),o}function Me(t,e){switch(t){case"next":return Pe(e);case"offset":return Fe(e)}}async function Pe(t){const e=t.limit;let s=new URL(t.fullURL);s.searchParams.set("limit",e.toString());let r=[];do{const o=await J([s.toString()],t.featureFormat,t.httpService,t.signal,t.addFeatures,t.queryFeatures);if(r=r.concat(o.features),!o.nextURL)break;s=new URL(o.nextURL)}while(!0);return r}async function J(t,e,s,r,o,n=K){const a={nextURL:void 0,numberMatched:void 0,features:[]},i=t.map(async(c,l)=>{const f=l===t.length-1,u=await n(c,e,s,r);o(u.features),U.debug(`NextURL for index = ${l} (isLast = ${f}): ${u.nextURL||"No Next URL"}`),a.features.push(...u.features),f&&(a.numberMatched=u.numberMatched,a.nextURL=u.nextURL)});return await Promise.all(i),a}var p,P,V,C,M,W,X;class Ve{constructor(e,s){y(this,M);x(this,"label");y(this,p);y(this,P);y(this,V);y(this,C);this.label=e.label,S(this,p,e),S(this,P,s);const{baseUrl:r,params:o}=Ee(e.baseUrl);S(this,V,r),S(this,C,o)}async search(e,{mapProjection:s,maxResults:r,signal:o}){const n=R(this,M,X).call(this,e,r),a=new H({dataProjection:"EPSG:4326",featureProjection:s});return(await Ce(h(this,P),n,o)).features.map(c=>R(this,M,W).call(this,c,a))}}p=new WeakMap,P=new WeakMap,V=new WeakMap,C=new WeakMap,M=new WeakSet,W=function(e,s){const r=h(this,p).renderLabel?.(e),o=e.properties[h(this,p).labelProperty],n=e.properties[h(this,p).searchProperty],a=r||(o!==void 0?String(o):n!==void 0?String(n):"");return{id:e.id??ie(),label:a,geometry:s.readGeometry(e.geometry),properties:e.properties}},X=function(e,s){const r=new URL(`${h(this,V)}/collections/${h(this,p).collectionId}/items`);for(const[o,n]of h(this,C))r.searchParams.append(o,n);return r.searchParams.set(h(this,p).searchProperty,`*${e}*`),r.searchParams.set("limit",String(s)),r.searchParams.set("f","json"),h(this,p).rewriteUrl?.(new URL(r))??r};async function Ce(t,e,s){try{const r=await t.fetch(e,{signal:s,headers:{Accept:"application/json"}});if(!r.ok)throw new Error("Request failed with status "+r.status);return await r.json()}catch(r){throw B(r)?r:new Error("Failed to search on OGC API Features service",{cause:r})}}function Ee(t){const e=new URL(t),s=new URLSearchParams(e.searchParams);return e.search="",{baseUrl:e.href.replace(/\/+$/,""),params:s}}var E;class He{constructor({references:e}){y(this,E);S(this,E,e.httpService)}createVectorSource(e){return Ie(e,h(this,E))}}E=new WeakMap;var j;class Te{constructor({references:e}){y(this,j);S(this,j,e.httpService)}createSearchSource(e){return new Ve(e,h(this,j))}}j=new WeakMap;const je="@open-pioneer/map-navigation",$=ce.bind(void 0,je),Ge=b.forwardRef(function(e,s){const{containerProps:r}=Z("initial-extent",e),{map:o}=D(e),n=$();function a(){const i=o?.initialExtent,c=o?.olMap;if(i&&c){const l=[i.xMin,i.yMin,i.xMax,i.yMax];c.getView().fit(l,{duration:200})}}return m.jsx(q,{ref:s,label:n.formatMessage({id:"initial-extent.title"}),icon:m.jsx(he,{}),onClick:a,...r})}),Ke=b.forwardRef(function(e,s){return m.jsx(Q,{zoomDirection:"in",ref:s,...e})}),Je=b.forwardRef(function(e,s){return m.jsx(Q,{zoomDirection:"out",ref:s,...e})}),Q=b.forwardRef(function(e,s){const{zoomDirection:r}=e,{map:o}=D(e),n=$(),[a,i]=b.useState(!1),{defaultClassName:c,buttonLabel:l,buttonIcon:f}=ke(n,r),{containerProps:u}=Z(T("zoom",c),e);function g(){if(a)return;i(!0);const v=o?.olMap.getView();let d=v?.getZoom();const F=v?.getMaxZoom()||Number.MAX_SAFE_INTEGER,I=v?.getMinZoom()||0;v&&d!==void 0&&(r==="in"&&dI&&--d,v.animate({zoom:d,duration:200},()=>i(!1)))}return m.jsx(q,{ref:s,label:l,icon:f,onClick:g,...u})});function ke(t,e){switch(e){case"in":return{defaultClassName:"zoom-in",buttonLabel:t.formatMessage({id:"zoom-in.title"}),buttonIcon:m.jsx(we,{})};case"out":return{defaultClassName:"zoom-out",buttonLabel:t.formatMessage({id:"zoom-out.title"}),buttonIcon:m.jsx(me,{})}}}const Ne=200;var w,_,k,Y;class Ae{constructor(e){y(this,w);x(this,"olMap");x(this,"handle");x(this,"_mapViews",ue());x(this,"_activeViewId",le(0));x(this,"backward",()=>{if(this.canBackward)R(this,w,k).call(this,this.activeViewId-1),R(this,w,_).call(this,this.activeViewId);else throw new Error("Backward is not possible at the moment")});x(this,"forward",()=>{if(this.canForward)R(this,w,k).call(this,this.activeViewId+1),R(this,w,_).call(this,this.activeViewId);else throw new Error("Forward is not possible at the moment")});this.olMap=e.olMap,this.handle=R(this,w,Y).call(this)}destroy(){this.handle&&fe(this.handle),this.handle=void 0}get activeViewId(){return this._activeViewId.value}get mapViews(){return this._mapViews}get canBackward(){return this.mapViews.get(this.activeViewId-1)!=null}get canForward(){return this.mapViews.get(this.activeViewId+1)!=null}}w=new WeakSet,_=function(e){const s=this.olMap.getView();this.olMap.setView(new de({center:this.mapViews.get(e).center,resolution:this.mapViews.get(e).resolution,projection:s.getProjection()}))},k=function(e){this._activeViewId.value=e},Y=function(){const e=this.olMap.on("moveend",()=>{s()}),s=()=>{const r=this.olMap,o=this.mapViews,n=r.getView(),a=n.getResolution(),i=n.getCenter();if(a!=null&&i!=null&&(i!==o.get(this.activeViewId)?.center||a!==o.get(this.activeViewId)?.resolution)){const c={resolution:a,center:i},l=this.activeViewId+1;for(const f of o.keys())f>l&&o.delete(f);for(const f of o.keys()){if(o.size{if(!t)return;let r=O.get(t);return r==null?(r={vm:new Ae(t),useCount:1},O.set(t,r)):r.useCount++,s(r.vm),()=>{s(void 0),r.useCount--,r.useCount===0&&(r.vm.destroy(),O.delete(t))}},[t]),e}const We=b.forwardRef(function(e,s){return m.jsx(ee,{viewDirection:"forward",ref:s,...e})}),Xe=b.forwardRef(function(e,s){return m.jsx(ee,{viewDirection:"backward",ref:s,...e})}),ee=b.forwardRef(function(e,s){const r=$(),{viewDirection:o}=e,{map:n}=D(e),a=Oe(n),{defaultClassName:i,buttonLabel:c,buttonIcon:l}=_e(r,o),{containerProps:f}=Z(T("view",i),e),u=be(()=>a?o==="forward"?a.canForward:a.canBackward:!1,[a,o]),g=()=>{a&&(o==="forward"?a.forward():a.backward())};return a&&m.jsx(q,{ref:s,...f,label:c,icon:l,onClick:g,isDisabled:!u})});function _e(t,e){switch(e){case"forward":return{defaultClassName:"view-forward",buttonLabel:t.formatMessage({id:"view-forward.title"}),buttonIcon:m.jsx(pe,{})};case"backward":return{defaultClassName:"view-backward",buttonLabel:t.formatMessage({id:"view-backward.title"}),buttonIcon:m.jsx(ge,{})}}}export{Xe as H,Ge as I,Te as S,He as V,Ke as Z,Je as a,We as b}; diff --git a/openlayers-base-packages/pr-previews/pr-371/assets/C_en_SddDDnC.js b/openlayers-base-packages/pr-previews/pr-371/assets/CtwSIQ881oV-.js similarity index 96% rename from openlayers-base-packages/pr-previews/pr-371/assets/C_en_SddDDnC.js rename to openlayers-base-packages/pr-previews/pr-371/assets/CtwSIQ881oV-.js index b9dc330..a96e6ad 100644 --- a/openlayers-base-packages/pr-previews/pr-371/assets/C_en_SddDDnC.js +++ b/openlayers-base-packages/pr-previews/pr-371/assets/CtwSIQ881oV-.js @@ -1 +1 @@ -var Ft=Object.defineProperty;var Xe=o=>{throw TypeError(o)};var Bt=(o,e,t)=>e in o?Ft(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var w=(o,e,t)=>Bt(o,typeof e!="symbol"?e+"":e,t),Ne=(o,e,t)=>e.has(o)||Xe("Cannot "+t);var a=(o,e,t)=>(Ne(o,e,"read from private field"),t?t.call(o):e.get(o)),u=(o,e,t)=>e.has(o)?Xe("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),h=(o,e,t,i)=>(Ne(o,e,"write to private field"),i?i.call(o,t):e.set(o,t),t),x=(o,e,t)=>(Ne(o,e,"access private method"),t);import{f as ft,h as Gt,j as r,r as b,c as we,B as Y,F as Ht,A as Ve,k as Oe,l as Ut,E as j,a as Wt,e as qt}from"./Bh0CuZ3gy5tC.js";import{aJ as $t,aK as Kt,al as Yt,ak as Je,aL as Zt,aM as Xt,at as Jt,aN as Qt,aO as eo,aP as to,ad as oo,ax as io,aQ as Qe,aR as ro,aS as so,aT as et,aU as ao,aV as no,aW as ze,V as lo,aX as tt,A as co,N as po,aY as uo,K as ho,aZ as mo,a_ as go,a$ as fo,b0 as vo,b1 as ot,B as R,S as Ue,T as vt,O as bt,a as We,b as wt,b2 as je,i as Te,f as qe,u as Pe,r as re,b3 as it,b4 as bo,as as wo,j as Be,c as yt,C as yo,F as xt,aC as kt,b5 as xo,d as ko,w as $e,b6 as So,b7 as Mo,b8 as _o,k as F,b9 as Io,g as Se,h as Ge,ba as Eo,bb as Co,H as Lo,M as Ao,D as jo,l as To,m as rt}from"./CncSlnPsjr9P.js";import{W as Po,i as Ro,j as St}from"./A1UaLFN2YVoc.js";import{O as Mt,W as Do,c as No,u as Vo,I as Oo,C as zo,b as Fo,a as Bo,M as Go,P as Ho,L as Uo,d as Wo,S as qo,E as $o,V as Ko,e as _t,N as Yo}from"./CxiOyT3ujOOX.js";import{G as It,T as Zo,e as Xo}from"./TnHTIdi4bAVU.js";import{T as Re,V as He,L as Jo}from"./Tz2xttM4F6S2.js";import{u as $}from"./BTEHqhSAUrUR.js";import{G as Qo}from"./CL_VRsbiqLzM.js";import{Z as ei,a as ti,H as oi,b as ii,I as ri,V as si,S as ai}from"./BMUaL9fwyTyD.js";import{c as ni}from"./D03oE8cEQPSj.js";import{M as li,a as ci,b as di}from"./BeFcF3Ti4kY-.js";import{M as pi}from"./DUys4rac0YQP.js";import{S as ui}from"./CjjyePfBQlZ7.js";import{R as hi}from"./Bwz5Rvo1RSBv.js";import{N as mi,P as gi}from"./BBt4Ba3H9gMn.js";import{_ as st}from"./CmsKOCeNyeyo.js";import{F as fi}from"./BO_q12Vdyug-.js";import{H as vi}from"./L25RkWOQSN8A.js";import{F as bi}from"./CreVQ-qFRzOc.js";import"./JZ5RcWTlF_6Y.js";import"./DsXJQLY20iHp.js";import"./Cq1ZpfgEg4XJ.js";import"./2d5-QpxJNHTD.js";var Et=ft("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});Et.displayName="Center";var wi={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Gt(function(e,t){const{axis:i="both",...s}=e;return r.jsx(ft.div,{ref:t,__css:wi[i],...s,position:"absolute"})});const f={ACCURACY:"accuracy",ACCURACY_GEOMETRY:"accuracyGeometry",ALTITUDE:"altitude",ALTITUDE_ACCURACY:"altitudeAccuracy",HEADING:"heading",POSITION:"position",PROJECTION:"projection",SPEED:"speed",TRACKING:"tracking",TRACKING_OPTIONS:"trackingOptions"},yi={ERROR:"error"};class xi extends Jt{constructor(e){super(yi.ERROR),this.code=e.code,this.message=e.message}}let ki=class extends $t{constructor(e){super(),this.on,this.once,this.un,e=e||{},this.position_=null,this.transform_=Kt,this.watchId_=void 0,this.addChangeListener(f.PROJECTION,this.handleProjectionChanged_),this.addChangeListener(f.TRACKING,this.handleTrackingChanged_),e.projection!==void 0&&this.setProjection(e.projection),e.trackingOptions!==void 0&&this.setTrackingOptions(e.trackingOptions),this.setTracking(e.tracking!==void 0?e.tracking:!1)}disposeInternal(){this.setTracking(!1),super.disposeInternal()}handleProjectionChanged_(){const e=this.getProjection();e&&(this.transform_=Yt(Je("EPSG:4326"),e),this.position_&&this.set(f.POSITION,this.transform_(this.position_)))}handleTrackingChanged_(){if("geolocation"in navigator){const e=this.getTracking();e&&this.watchId_===void 0?this.watchId_=navigator.geolocation.watchPosition(this.positionChange_.bind(this),this.positionError_.bind(this),this.getTrackingOptions()):!e&&this.watchId_!==void 0&&(navigator.geolocation.clearWatch(this.watchId_),this.watchId_=void 0)}}positionChange_(e){const t=e.coords;this.set(f.ACCURACY,t.accuracy),this.set(f.ALTITUDE,t.altitude===null?void 0:t.altitude),this.set(f.ALTITUDE_ACCURACY,t.altitudeAccuracy===null?void 0:t.altitudeAccuracy),this.set(f.HEADING,t.heading===null?void 0:Zt(t.heading)),this.position_?(this.position_[0]=t.longitude,this.position_[1]=t.latitude):this.position_=[t.longitude,t.latitude];const i=this.transform_(this.position_);this.set(f.POSITION,i.slice()),this.set(f.SPEED,t.speed===null?void 0:t.speed);const s=Xt(this.position_,t.accuracy);s.applyTransform(this.transform_),this.set(f.ACCURACY_GEOMETRY,s),this.changed()}positionError_(e){this.dispatchEvent(new xi(e))}getAccuracy(){return this.get(f.ACCURACY)}getAccuracyGeometry(){return this.get(f.ACCURACY_GEOMETRY)||null}getAltitude(){return this.get(f.ALTITUDE)}getAltitudeAccuracy(){return this.get(f.ALTITUDE_ACCURACY)}getHeading(){return this.get(f.HEADING)}getPosition(){return this.get(f.POSITION)}getProjection(){return this.get(f.PROJECTION)}getSpeed(){return this.get(f.SPEED)}getTracking(){return this.get(f.TRACKING)}getTrackingOptions(){return this.get(f.TRACKING_OPTIONS)}setProjection(e){this.set(f.PROJECTION,Je(e))}setTracking(e){this.set(f.TRACKING,e)}setTrackingOptions(e){this.set(f.TRACKING_OPTIONS,e)}};const Si=1.2;function Mi(o,e=Si){_i(o);const t=Qt(o),i=eo(o),s=t*e,n=i*e;return[o[0]-(s-t)/2,o[1]-(n-i)/2,o[2]+(s-t)/2,o[3]+(n-i)/2]}function _i(o){if(o.length!==4)throw new Error(`Invalid extent (expected length 4, but got length ${o.length}).`)}const Fe=.75,ke=.1;let Ii=class extends to{constructor(e){e=e||{},super({element:document.createElement("div"),render:e.render,target:e.target}),this.boundHandleRotationChanged_=this.handleRotationChanged_.bind(this),this.collapsed_=e.collapsed!==void 0?e.collapsed:!0,this.collapsible_=e.collapsible!==void 0?e.collapsible:!0,this.collapsible_||(this.collapsed_=!1),this.rotateWithView_=e.rotateWithView!==void 0?e.rotateWithView:!1,this.viewExtent_=void 0;const t=e.className!==void 0?e.className:"ol-overviewmap",i=e.tipLabel!==void 0?e.tipLabel:"Overview map",s=e.collapseLabel!==void 0?e.collapseLabel:"‹";typeof s=="string"?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=s):this.collapseLabel_=s;const n=e.label!==void 0?e.label:"›";typeof n=="string"?(this.label_=document.createElement("span"),this.label_.textContent=n):this.label_=n;const l=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_,c=document.createElement("button");c.setAttribute("type","button"),c.title=i,c.appendChild(l),c.addEventListener(oo.CLICK,this.handleClick_.bind(this),!1),this.ovmapDiv_=document.createElement("div"),this.ovmapDiv_.className="ol-overviewmap-map",this.view_=e.view;const d=new io({view:e.view,controls:new Qe,interactions:new Qe});this.ovmap_=d,e.layers&&e.layers.forEach(function(I){d.addLayer(I)});const p=document.createElement("div");p.className="ol-overviewmap-box",p.style.boxSizing="border-box",this.boxOverlay_=new Mt({position:[0,0],positioning:"center-center",element:p}),this.ovmap_.addOverlay(this.boxOverlay_);const g=t+" "+ro+" "+so+(this.collapsed_&&this.collapsible_?" "+et:"")+(this.collapsible_?"":" ol-uncollapsible"),m=this.element;m.className=g,m.appendChild(this.ovmapDiv_),m.appendChild(c);const v=this,S=this.boxOverlay_,M=this.boxOverlay_.getElement(),ce=function(I){return{clientX:I.clientX,clientY:I.clientY}},ye=function(I){const E=ce(I),Ze=d.getEventCoordinateInternal(E);S.setPosition(Ze)},xe=function(I){const E=d.getEventCoordinateInternal(I);v.getMap().getView().setCenterInternal(E),window.removeEventListener("mousemove",ye),window.removeEventListener("mouseup",xe)};M.addEventListener("mousedown",function(){window.addEventListener("mousemove",ye),window.addEventListener("mouseup",xe)})}setMap(e){const t=this.getMap();if(e!==t){if(t){const i=t.getView();i&&this.unbindView_(i),this.ovmap_.setTarget(null)}if(super.setMap(e),e){this.ovmap_.setTarget(this.ovmapDiv_),this.listenerKeys.push(ao(e,no.PROPERTYCHANGE,this.handleMapPropertyChange_,this));const i=e.getView();i&&(this.bindView_(i),i.isDef()&&(this.ovmap_.updateSize(),this.resetExtent_())),this.ovmap_.isRendered()||this.updateBoxAfterOvmapIsRendered_()}}}handleMapPropertyChange_(e){if(e.key===ze.VIEW){const t=e.oldValue;t&&this.unbindView_(t);const i=this.getMap().getView();this.bindView_(i)}else!this.ovmap_.isRendered()&&(e.key===ze.TARGET||e.key===ze.SIZE)&&this.ovmap_.updateSize()}bindView_(e){if(!this.view_){const t=new lo({projection:e.getProjection()});this.ovmap_.setView(t)}e.addChangeListener(tt.ROTATION,this.boundHandleRotationChanged_),this.handleRotationChanged_()}unbindView_(e){e.removeChangeListener(tt.ROTATION,this.boundHandleRotationChanged_)}handleRotationChanged_(){this.rotateWithView_&&this.ovmap_.getView().setRotation(this.getMap().getView().getRotation())}validateExtent_(){const e=this.getMap(),t=this.ovmap_;if(!e.isRendered()||!t.isRendered())return;const i=e.getSize(),n=e.getView().calculateExtentInternal(i);if(this.viewExtent_&&co(n,this.viewExtent_))return;this.viewExtent_=n;const l=t.getSize(),d=t.getView().calculateExtentInternal(l),p=t.getPixelFromCoordinateInternal(po(n)),g=t.getPixelFromCoordinateInternal(uo(n)),m=Math.abs(p[0]-g[0]),v=Math.abs(p[1]-g[1]),S=l[0],M=l[1];mS*Fe||v>M*Fe?this.resetExtent_():ho(d,n)||this.recenter_()}resetExtent_(){const e=this.getMap(),t=this.ovmap_,i=e.getSize(),n=e.getView().calculateExtentInternal(i),l=t.getView(),c=Math.log(Fe/ke)/Math.LN2,d=1/(Math.pow(2,c/2)*ke);mo(n,d),l.fitInternal(go(n))}recenter_(){const e=this.getMap(),t=this.ovmap_,i=e.getView();t.getView().setCenterInternal(i.getCenterInternal())}updateBox_(){const e=this.getMap(),t=this.ovmap_;if(!e.isRendered()||!t.isRendered())return;const i=e.getSize(),s=e.getView(),n=t.getView(),l=this.rotateWithView_?0:-s.getRotation(),c=this.boxOverlay_,d=this.boxOverlay_.getElement(),p=s.getCenterInternal(),g=s.getResolution(),m=n.getResolution(),v=i[0]*g/m,S=i[1]*g/m;if(c.setPosition(p),d){d.style.width=v+"px",d.style.height=S+"px";const M="rotate("+l+"rad)";d.style.transform=M}}updateBoxAfterOvmapIsRendered_(){this.ovmapPostrenderKey_||(this.ovmapPostrenderKey_=fo(this.ovmap_,vo.POSTRENDER,function(e){delete this.ovmapPostrenderKey_,this.updateBox_()},this))}handleClick_(e){e.preventDefault(),this.handleToggle_()}handleToggle_(){this.element.classList.toggle(et),this.collapsed_?ot(this.collapseLabel_,this.label_):ot(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_;const e=this.ovmap_;if(!this.collapsed_){if(e.isRendered()){this.viewExtent_=void 0,e.render();return}e.updateSize(),this.resetExtent_(),this.updateBoxAfterOvmapIsRendered_()}}getCollapsible(){return this.collapsible_}setCollapsible(e){this.collapsible_!==e&&(this.collapsible_=e,this.element.classList.toggle("ol-uncollapsible"),!e&&this.collapsed_&&this.handleToggle_())}setCollapsed(e){!this.collapsible_||this.collapsed_===e||this.handleToggle_()}getCollapsed(){return this.collapsed_}getRotateWithView(){return this.rotateWithView_}setRotateWithView(e){this.rotateWithView_!==e&&(this.rotateWithView_=e,this.getMap().getView().getRotation()!==0&&(this.rotateWithView_?this.handleRotationChanged_():this.ovmap_.getView().setRotation(0),this.viewExtent_=void 0,this.validateExtent_(),this.updateBox_()))}getOverviewMap(){return this.ovmap_}render(e){this.validateExtent_(),this.updateBox_()}};const Ei=ni({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"}),Ci={height:"25px",width:"25px",borderColor:"#4cb3ff",borderWidth:"3px",borderRadius:"50%",display:"inline-block "};function Li(o){return r.jsxs(R,{children:[r.jsx(Re,{children:o.layer.title}),r.jsx(R,{style:Ci})]})}const De="main";class Ai{mapId=De;vectorSourceFactory;constructor(e){this.vectorSourceFactory=e.references.vectorSourceFactory}async getMapConfig(){return{initialView:{kind:"position",center:{x:823091,y:6724521},zoom:8},layers:[new Ue({title:"OSM",id:"osm",isBaseLayer:!0,olLayer:new vt({source:new bt})}),new Do({isBaseLayer:!0,title:"Orthofotos NRW",url:"https://www.wmts.nrw.de/geobasis/wmts_nw_dop/1.0.0/WMTSCapabilities.xml",name:"nw_dop",matrixSet:"EPSG_3857_16",sourceOptions:{attributions:'Die Geobasisdaten des amtlichen Vermessungswesens werden als öffentliche Aufgabe gem. VermKatG NRW und gebührenfrei nach Open Data-Prinzipien über online-Verfahren bereitgestellt. Nutzungsbedingungen: siehe '}}),Pi(),Ti(),ji(this.vectorSourceFactory)]}}}function ji(o){const e="https://ogc-api-test.nrw.de/inspire-us-krankenhaus/v1",t="governmentalservice",i=o.createVectorSource({baseUrl:e,collectionId:t,limit:1e3,crs:"http://www.opengis.net/def/crs/EPSG/0/3857",attributions:`Land NRW (${new Date().getFullYear()}), Datenlizenz Deutschland - Namensnennung - Version 2.0, Datenquelle`}),s=new We({source:i});return new Ue({id:"krankenhaus",title:"Krankenhäuser-Demo-Dienst",visible:!1,olLayer:s,attributes:{collectionURL:e+"/collections/"+t}})}function Ti(){const o=new wt({url:"https://ogc-api.nrw.de/inspire-us-kindergarten/v1/collections/governmentalservice/items?f=json&limit=10000",format:new It,attributions:'© Bundesamt für Kartographie und Geodäsie 2017, Datenquellen'}),e=new We({source:o}),t={Component:Li};return new Ue({id:"ogc_kitas",title:"Kindertagesstätten",visible:!0,olLayer:e,attributes:{legend:t}})}function Pi(){return new Po({title:"Verwaltungsgebiete",id:"verwaltungsgebiete",visible:!1,url:"https://www.wms.nrw.de/geobasis/wms_nw_dvg",sublayers:[{name:"nw_dvg_krs",title:"Kreise und kreisfreie Städte"}]})}const Ri="200px",Di="300px",Ni=o=>{const{olLayer:e,height:t=Ri,width:i=Di}=o,{containerProps:s}=je("overview-map",o),n=b.useRef(null),{map:l}=Te(o);return b.useEffect(()=>{if(n.current&&l&&e){const c=l.olMap,d=new Ii({className:"ol-overviewmap",layers:[e],collapsible:!1,collapsed:!1,target:n.current});return c.addControl(d),()=>{c.removeControl(d)}}},[l,e]),r.jsx(R,{height:t,width:i,ref:n,...s})};function Vi({intl:o}){return{id:"overviewMap",title:o.formatMessage({id:"demos.overviewMap.title"}),createModel(){const e=new vt({source:new bt});return{description:o.formatMessage({id:"demos.overviewMap.description"}),mainWidget:r.jsx(Ni,{olLayer:e}),destroy(){e.dispose()}}}}}class Oi{label;filteredTypes;httpService;constructor(e,t,i){this.label=e,this.filteredTypes=t,this.httpService=i}async search(e,{mapProjection:t,signal:i}){const s=await this.request(e,100,i),n=new It({dataProjection:"EPSG:4326",featureProjection:t});return s.features.filter(l=>this.filteredTypes.includes(l.properties.type)).map((l,c)=>{const d=n.readGeometry(l.geometry);return{id:l.properties.osm_id||c,label:this.createLabel(l),geometry:d,properties:l.properties}})}async request(e,t,i){const s=new URL("https://photon.komoot.io/api?");s.searchParams.set("q",e),s.searchParams.set("lang","de"),s.searchParams.set("lat","51.961563"),s.searchParams.set("lon","7.628202"),s.searchParams.set("limit",t.toString());const n=await this.httpService.fetch(s,{signal:i});if(!n.ok)throw new Error("Request failed: "+n.status);return await n.json()}createLabel(e){return`${e.properties.name} (${e.properties.osm_value?e.properties.osm_value+", ":""}${e.properties.postcode?e.properties.postcode+", ":""}${e.properties.city?e.properties.city+", ":""}${e.properties.country?e.properties.country+")":")"}`}}function zi({intl:o,httpService:e,mapModel:t}){return{id:"searchAndHighlight",title:o.formatMessage({id:"demos.searchAndHighlight.title"}),createModel(){return new Fi(o,t,e)}}}var pe,ue,Z,Me,X,mt;let Fi=(mt=class{constructor(e,t,i){u(this,pe);u(this,ue);u(this,Z);w(this,"description");w(this,"mainWidget");u(this,Me,e=>{const t=e.result.geometry;t&&(a(this,X).call(this),h(this,Z,Bi(a(this,ue),[t])))});u(this,X,()=>{a(this,Z)?.destroy(),h(this,Z,void 0)});h(this,pe,new Oi("Photon Geocoder",["city","street"],i)),h(this,ue,t),this.description=e.formatMessage({id:"demos.searchAndHighlight.description"}),this.mainWidget=r.jsx(No,{sources:[a(this,pe)],onSelect:a(this,Me),onClear:a(this,X)})}destroy(){a(this,X).call(this)}},pe=new WeakMap,ue=new WeakMap,Z=new WeakMap,Me=new WeakMap,X=new WeakMap,mt);function Bi(o,e){const t=o.olMap.getViewport();return o.highlightAndZoom(e,{viewPadding:t&&t.offsetWidth<1e3?{top:150,right:75,bottom:50,left:75}:{top:150,right:400,bottom:50,left:400}})}const Ct="@open-pioneer/geolocation",Gi=qe.bind(void 0,Ct),Lt=Pe.bind(void 0,Ct);function Hi(o){return Qo({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3A8.994 8.994 0 0 0 13 3.06V1h-2v2.06A8.994 8.994 0 0 0 3.06 11H1v2h2.06A8.994 8.994 0 0 0 11 20.94V23h2v-2.06A8.994 8.994 0 0 0 20.94 13H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"},child:[]}]})(o)}const at=we("geolocation:GeolocationController"),nt=17;var B,G;class Ui{constructor(e,t,i){w(this,"supported",!!navigator.geolocation);w(this,"olMap");w(this,"positionHighlightLayer");w(this,"geolocation");w(this,"onError");w(this,"maxZoom",nt);w(this,"accuracyFeature");w(this,"positionFeature");w(this,"changeHandlers",[]);w(this,"setMapToPosition",!0);w(this,"trackingOptions",{});w(this,"isInitialZoom",!0);u(this,B,re(!1));u(this,G,re(!1));this.olMap=e,this.onError=t,this.isInitialZoom=!0,this.accuracyFeature=new it,this.accuracyFeature.setStyle(ct()),this.positionFeature=new it,this.positionFeature.setStyle(lt()),this.positionHighlightLayer=new We({source:new wt({features:[this.accuracyFeature,this.positionFeature]})}),this.positionHighlightLayer.setZIndex(bo);const s=i||Wi();this.geolocation=new ki({tracking:!1,trackingOptions:s,projection:e.getView()?.getProjection()}),this.trackingOptions=s,this.geolocation.on("error",n=>this.handleGeolocationError(n))}destroy(){this.stopGeolocation(),this.geolocation?.setTracking(!1),this.geolocation.dispose(),this.accuracyFeature=void 0,this.positionFeature=void 0,this.positionHighlightLayer.dispose()}startGeolocation(){if(a(this,G).value)return;const e=this.olMap;new Promise(i=>{a(this,G).value=!0,a(this,B).value=!0,this.geolocation?.setProjection(e.getView()?.getProjection()),this.geolocation?.setTracking(!0);const s=this.geolocation.on("change:accuracyGeometry",()=>{const d=this.geolocation.getAccuracyGeometry()||void 0;if(this.accuracyFeature?.setGeometry(d),this.accuracyFeature?.getGeometry()!==void 0&&i(),this.isInitialZoom){const p=this?.accuracyFeature?.getGeometry()?.getExtent();if(p){const g=Mi(p);if(!g)return;e.getView().fit(g,{maxZoom:this.maxZoom}),this.isInitialZoom=!1}}}),n=this.geolocation.on("change:position",()=>{const d=this.geolocation.getPosition();d&&(d[0]||d[1])!==void 0&&(this.positionFeature?.setGeometry(new wo(d)),this.setMapToPosition&&e.getView().setCenter(d),this.positionFeature?.getGeometry()!==void 0&&i())}),l=e.getView().on("change:resolution",()=>{this.setMapToPosition=this.isInitialZoom}),c=e.on("pointermove",d=>{d.dragging&&(this.setMapToPosition=!1)});this.changeHandlers.push(s,n,l,c),e.addLayer(this.positionHighlightLayer)}).then(()=>{a(this,B).value=!1}).catch(i=>{at.error("Failed to determine location",i)})}stopGeolocation(){this.geolocation?.setTracking(!1),a(this,G).value=!1,a(this,B).value=!1,this.trackingOptions={},this.setMapToPosition=!0,this.isInitialZoom=!0,this.changeHandlers.forEach(e=>{Be(e)}),this.changeHandlers=[],this.accuracyFeature?.setGeometry(void 0),this.positionFeature?.setGeometry(void 0),this.olMap.removeLayer(this.positionHighlightLayer)}get active(){return a(this,G).value}get loading(){return a(this,B).value}setPositionFeatureStyle(e){this.positionFeature?.setStyle(e??lt())}setAccuracyFeatureStyle(e){this.accuracyFeature?.setStyle(e??ct())}setMaxZoom(e){this.maxZoom=e??nt}getMaxZoom(){return this.maxZoom}getPositionFeature(){return this.positionFeature}getAccuracyFeature(){return this.accuracyFeature}getTrackingOptions(){return this.trackingOptions}getGeolocation(){return this.geolocation}handleGeolocationError(e){at.error("Error from geolocation API:",e.message),this.stopGeolocation();const t=(()=>{switch(e.code){case 1:return"permission-denied";case 2:return"position-unavailable";case 3:return"timeout";default:return"unknown"}})();this.onError(t)}}B=new WeakMap,G=new WeakMap;const lt=()=>new yt({image:new yo({radius:6,fill:new xt({color:"#3399CC"}),stroke:new kt({color:"#fff",width:2})})}),ct=()=>new yt({stroke:new kt({color:"#3399CC",width:3}),fill:new xt({color:"rgba(0, 0, 255, 0.05)"})}),Wi=()=>({enableHighAccuracy:!0,timeout:6e4,maximumAge:6e5}),qi=b.forwardRef(function(e,t){const{maxZoom:i,positionFeatureStyle:s,accuracyFeatureStyle:n,trackingOptions:l}=e,{map:c}=Te(e),d=Ki(c,i,l,s,n);return d&&r.jsx($i,{...e,controller:d,ref:t})}),$i=b.forwardRef(function(e,t){const{controller:i}=e,{containerProps:s}=je("geolocation",e),{isLoading:n,isActive:l}=$(()=>({isLoading:i.loading,isActive:i.active}),[i]),c=Lt(),d=i.supported?l?c.formatMessage({id:"locateMeEnd"}):c.formatMessage({id:"locateMeStart"}):c.formatMessage({id:"locateNotSupported"}),p=()=>{i.active?i.stopGeolocation():i.startGeolocation()};return r.jsx(Zo,{ref:t,label:d,icon:r.jsx(Hi,{}),onClick:()=>p(),isActive:l,isLoading:n,isDisabled:!i.supported,...s})});function Ki(o,e,t,i,s){const n=Lt(),l=Gi("notifier.NotificationService"),[c,d]=b.useState();return b.useEffect(()=>{if(!o)return;const p=m=>{const v=n.formatMessage({id:"error"}),S=(()=>{switch(m){case"permission-denied":return n.formatMessage({id:"permissionDenied"});case"position-unavailable":return n.formatMessage({id:"positionUnavailable"});case"timeout":return n.formatMessage({id:"timeout"});case"unknown":return n.formatMessage({id:"unknownError"})}})();l.notify({level:"error",title:v,message:S})},g=new Ui(o.olMap,p,t);return d(g),()=>{g.destroy(),d(void 0)}},[o,t,n,l]),b.useEffect(()=>{c?.setPositionFeatureStyle(i)},[c,i]),b.useEffect(()=>{c?.setAccuracyFeatureStyle(s)},[c,s]),b.useEffect(()=>{c?.setMaxZoom(e)},[c,e]),c}const Yi="@open-pioneer/scale-setter",Zi=Pe.bind(void 0,Yi),Xi=25.4/.28,Ji=39.37,Qi=[17471320,8735660,4367830,2183915,1091957,545978,272989,136494,68247,34123,17061,8530,4265,2132],er=o=>{const{scales:e=Qi}=o,{containerProps:t}=je("scale-setter",o),{map:i}=Te(o),s=Zi(),n=Vo(i?.olMap)??1;function l(p){if(!i)return;const g=i.olMap.getView(),m=i.olMap.getView().getProjection(),v=m.getMetersPerUnit()??1,S=Ji*Xi*v,M=i.olMap.getView().getCenter();if(!M)return;const ce=p/xo(m,S,M);g.setResolution(ce)}const c=e.map(p=>r.jsx(li,{value:p,onClick:()=>l(p),onFocus:g=>{g.target?.scrollIntoView?.({block:"nearest"})},className:"scale-setter-option",children:dt(s,p)},p)),d=dt(s,n);return r.jsx(R,{...t,children:r.jsxs(pi,{isLazy:!0,children:[r.jsx(ci,{as:Y,rightIcon:r.jsx(Ei,{}),className:"scale-setter-menubutton","aria-label":s.formatMessage({id:"button.ariaLabel"},{scale:d}),"aria-description":s.formatMessage({id:"button.ariaDescription"}),children:d}),r.jsx(Ht,{children:r.jsx(di,{className:"scale-setter-menuoptions",maxHeight:"20em",overflowY:"auto",children:c})})]})})};function dt(o,e){return"1 : "+o.formatNumber(e)}const At="@open-pioneer/spatial-bookmarks",tr=qe.bind(void 0,At),or=Pe.bind(void 0,At),D=we("spatial-bookmark:SpatialBookmarkViewModel");class ir{map;packageNamespace;writableBookmarks=ko([]);watchBookmarksHandle;get bookmarks(){return this.writableBookmarks.getItems()}constructor(e,t){this.map=e,this.packageNamespace=t.getNamespace("spatial-bookmarks"),this.loadState(),this.watchBookmarksHandle=$e(()=>[this.writableBookmarks.getItems()],([i])=>this.saveState(i),{immediate:!1})}destroy(){this.watchBookmarksHandle.destroy()}createBookmark(e){const t=this.map.olMap,i=t.getView().calculateExtent(),s=t.getView().getProjection().getCode(),n={minX:i[0],minY:i[1],maxX:i[2],maxY:i[3]},l={id:So(),title:e,extent:n,projection:s};D.debug("Created a new bookmark",l),this.writableBookmarks.push(l)}activateBookmark(e){D.debug("Activating bookmark",e);const t=this.getBookmarkExtent(e);D.debug("Attempting to apply extent",t),this.applyExtent(t)}deleteBookmark(e){D.debug("Deleting bookmark",e);const t=this.writableBookmarks.findIndex(i=>i.id===e);t>-1&&this.writableBookmarks.splice(t,1)}deleteAllBookmarks(){D.debug("Deleting all bookmarks"),this.writableBookmarks.splice(0)}loadState(){D.debug("Restoring bookmarks from local storage");const e=this.packageNamespace.get("bookmarks")??[];try{rr(e),this.writableBookmarks.push(...e)}catch(t){D.error("Bookmarks data in local storage is invalid, resetting to default value.",t),this.writableBookmarks.splice(0),this.saveState([])}}saveState(e){D.debug("Saving bookmarks to local storage"),this.packageNamespace.set("bookmarks",e)}getBookmarkExtent(e){const i=this.map.olMap.getView(),s=e.extent,n=[s.minX,s.minY,s.maxX,s.maxY],l=i.getProjection(),c=e.projection;return Mo(n,c,l)}applyExtent(e){const i=this.map.olMap.getView(),s=_o(e),n=i.getResolutionForExtent(e);i.setCenter(s),i.setResolution(n)}}function rr(o){if(!Array.isArray(o))throw new Error("Expected bookmarks from local storage to be an array.");for(const e of o)sr(e)}function sr(o){if(!o||typeof o!="object")throw new Error("Expected bookmark from local storage to be an object.");const e=o;if(typeof e.id!="string")throw new Error("Bookmark does not have a valid id.");if(typeof e.title!="string")throw new Error("Bookmark does not have a valid title.");if(ar(e.extent),typeof e.projection!="string")throw new Error("Bookmark does not have a valid projection value.")}function ar(o){if(!o||typeof o!="object")throw new Error("Expected bookmark extent from local storage to be an object.");const e=o;if(typeof e.minX!="number"||typeof e.minY!="number"||typeof e.maxX!="number"||typeof e.maxY!="number")throw new Error("Expected bookmark extent from local storage to have valid coordinates.")}const nr=o=>{const{map:e}=Te(o),t=tr("local-storage.LocalStorageService"),i=mr(e,t);return i&&r.jsx(lr,{...o,viewModel:i})};function lr(o){const{viewModel:e}=o,t=or(),i=b.useRef([]),[s,n]=b.useState(!1),l=$(()=>e.bookmarks,[e]),[c,d]=b.useState(""),p=c.trim().length>0,{containerProps:g}=je("spatial-bookmarks",o),[m,v]=b.useState("list"),S=()=>{e.deleteAllBookmarks(),v("list")},M=()=>{p&&(e.createBookmark(c),v("list"),d(""),n(!0))};b.useEffect(()=>{if(s){const E=i.current;E&&E[l.length-1]?.scrollIntoView?.(),n(!1)}},[l,s]);const ce=()=>r.jsxs(He,{children:[r.jsxs(Ve,{rounded:"md",status:"warning",children:[r.jsx(Oe,{}),t.formatMessage({id:"bookmark.alert.delete"})]}),r.jsx(ur,{intl:t,onClear:S,onCancel:()=>v("list")})]}),ye=()=>r.jsxs(He,{children:[r.jsxs(Ve,{rounded:"md",status:"info",children:[r.jsx(Oe,{}),t.formatMessage({id:"bookmark.alert.create"})]}),r.jsx(Oo,{"aria-label":t.formatMessage({id:"bookmark.input.label"}),placeholder:t.formatMessage({id:"bookmark.input.placeholder"}),value:c,onChange:E=>{d(E.target.value)},onKeyDown:E=>{E.key==="Enter"&&M()},isRequired:!0,isInvalid:!p,autoFocus:!0}),r.jsx(hr,{intl:t,isInvalid:!p,onCancel:()=>{d(""),v("list")},onSave:M})]}),xe=()=>r.jsxs(r.Fragment,{children:[l.length?cr(l,e,t,i):r.jsxs(Ve,{rounded:"md",status:"info",children:[r.jsx(Oe,{}),t.formatMessage({id:"bookmark.alert.noSaved"})]}),r.jsx(pr,{intl:t,bookmarks:l,showCreate:()=>v("create"),showDelete:()=>v("delete")})]}),I=r.jsxs(r.Fragment,{children:[m==="list"&&xe(),m==="create"&&ye(),m==="delete"&&ce()]});return r.jsx(F,{flexDirection:"column",...g,children:I})}function cr(o,e,t,i){const s=t.formatMessage({id:"bookmark.button.deleteOne"}),n=o.map((l,c)=>r.jsx(dr,{index:c,listItemNodes:i,bookmark:l,onActivate:()=>e.activateBookmark(l),onDelete:()=>e.deleteBookmark(l.id),deleteBtnLabel:s},l.id));return r.jsx(Jo,{as:"ul",className:"spatial-bookmark-list",role:"listbox","aria-label":t.formatMessage({id:"bookmark.list.label"}),flexShrink:1,flexGrow:1,p:1,spacing:1,overflowY:"auto",listStyleType:"none",children:n})}const pt={ArrowDown:1,ArrowUp:-1};function dr(o){const{index:e,listItemNodes:t,bookmark:i,onDelete:s,onActivate:n,deleteBtnLabel:l}=o,c=i.title,d=p=>{const g=p.key;if(g==="Enter"){p.target===p.currentTarget&&n();return}if(pt[g]!=null){const m=t.current?.length;if(!m)return;let v=(e+pt[g])%m;v<0&&(v=m-1),t.current[v]?.focus()}};return r.jsx(R,{as:"li",p:1,ref:p=>{if(!p){t.current.splice(e,1);return}t.current[e]=p},className:Io("spatial-bookmarks-item"),tabIndex:0,rounded:"md",role:"option",cursor:"pointer",outline:0,_hover:{background:"trails.50"},_focusVisible:{boxShadow:"outline"},onKeyDown:d,onClick:n,children:r.jsxs(F,{width:"100%",flexDirection:"row",align:"center",gap:1,children:[r.jsx(Et,{children:r.jsx(Ro,{})}),r.jsx(Re,{ps:2,noOfLines:1,children:c}),r.jsx(ui,{}),r.jsx(Ut,{hasArrow:!0,label:l,placement:"right",children:r.jsx(Y,{className:"spatial-bookmarks-item-delete","aria-label":l,borderRadius:"full",iconSpacing:0,padding:0,colorScheme:"red",variant:"ghost",leftIcon:r.jsx(St,{}),onClick:p=>{s(),p.stopPropagation()}})},e)]})})}function pr(o){const{intl:e,bookmarks:t,showCreate:i,showDelete:s}=o;return r.jsxs(Ke,{children:[r.jsx(se,{isDisabled:t.length===0,colorScheme:"red",width:void 0,iconSpacing:0,leftIcon:r.jsx(St,{}),onClick:s,"aria-label":e.formatMessage({id:"bookmark.button.deleteAll"}),variant:"outline"}),r.jsx(se,{onClick:i,width:"100%",children:e.formatMessage({id:"bookmark.button.create"})})]})}function ur(o){const{intl:e,onCancel:t,onClear:i}=o;return r.jsxs(Ke,{children:[r.jsx(se,{variant:"outline",onClick:t,children:e.formatMessage({id:"bookmark.button.cancelDelete"})}),r.jsx(se,{onClick:i,children:e.formatMessage({id:"bookmark.button.confirmDelete"})})]})}function hr(o){const{intl:e,onCancel:t,onSave:i,isInvalid:s}=o;return r.jsxs(Ke,{children:[r.jsx(se,{variant:"outline",onClick:()=>t(),children:e.formatMessage({id:"bookmark.button.cancel"})}),r.jsx(se,{isDisabled:s,onClick:()=>i(),children:e.formatMessage({id:"bookmark.button.save"})})]})}function Ke(o){return r.jsx(F,{width:"100%",flexDirection:"row",mt:2,gap:1,flexGrow:0,flexShrink:0,children:o.children})}function se(o){return r.jsx(Y,{width:"100%",...o})}function mr(o,e){const[t,i]=b.useState();return b.useEffect(()=>{let s;return o?s=new ir(o,e):s=void 0,i(s),()=>s?.destroy()},[o,e]),t}function gr({intl:o}){return{id:"coordinateViewer",title:o.formatMessage({id:"demos.coordinateViewer.title"}),createModel(){return{description:o.formatMessage({id:"demos.coordinateViewer.description"}),mainWidget:r.jsx(zo,{})}}}}function fr({intl:o}){return{id:"scaleViewer",title:o.formatMessage({id:"demos.scaleViewer.title"}),createModel(){return{description:o.formatMessage({id:"demos.scaleViewer.description"}),mainWidget:r.jsx(Fo,{})}}}}function vr({intl:o}){return{id:"scaleSetter",title:o.formatMessage({id:"demos.scaleSetter.title"}),createModel(){return{description:o.formatMessage({id:"demos.scaleSetter.description"}),mainWidget:r.jsx(er,{})}}}}function br({intl:o}){return{id:"scaleBar",title:o.formatMessage({id:"demos.scaleBar.title"}),createModel(){return{description:o.formatMessage({id:"demos.scaleBar.description"}),tools:r.jsx(Bo,{})}}}}function wr({intl:o}){return{id:"measurement",title:o.formatMessage({id:"demos.measurement.title"}),createModel(){return{description:o.formatMessage({id:"demos.measurement.description"}),mainWidget:r.jsx(Go,{})}}}}function yr({intl:o}){return{id:"mapNavigation",title:o.formatMessage({id:"demos.mapNavigation.title"}),createModel(){return{description:o.formatMessage({id:"demos.mapNavigation.description"}),tools:r.jsxs(r.Fragment,{children:[r.jsx(ei,{}),r.jsx(ti,{}),r.jsx(oi,{}),r.jsx(ii,{}),r.jsx(ri,{})]})}}}}function xr({intl:o}){return{id:"geolocation",title:o.formatMessage({id:"demos.geolocation.title"}),createModel(){return{description:o.formatMessage({id:"demos.geolocation.description"}),tools:r.jsx(qi,{})}}}}function kr({intl:o}){return{id:"spatialBookmarks",title:o.formatMessage({id:"demos.spatialBookmarks.title"}),createModel(){return{description:o.formatMessage({id:"demos.spatialBookmarks.description"}),mainWidget:r.jsx(nr,{})}}}}function Sr({intl:o}){return{id:"printing",title:o.formatMessage({id:"demos.printing.title"}),createModel(){return{description:o.formatMessage({id:"demos.printing.description"}),mainWidget:r.jsx(Ho,{})}}}}const jt="showcase-app",Tt=qe.bind(void 0,jt),le=Pe.bind(void 0,jt);function Mr({intl:o,mapModel:e}){return{id:"tocLegend",title:o.formatMessage({id:"demos.tocLegend.title"}),createModel(){function t(s=!0){e.layers.getLayerById("verwaltungsgebiete").setVisible(s),e.layers.getLayerById("krankenhaus").setVisible(s),e.layers.getLayerById("ogc_kitas").setVisible(s)}function i(){t(!1),e?.layers.activateBaseLayer("osm")}return{description:o.formatMessage({id:"demos.tocLegend.description"}),mainWidget:r.jsx(_r,{}),destroy:i}}}}function _r(){const o=b.useId(),e=b.useId(),t=le();return r.jsxs(r.Fragment,{children:[r.jsx(R,{role:"dialog","aria-labelledby":o,children:r.jsx(Se,{title:r.jsx(Ge,{id:o,size:"md",mb:2,children:r.jsx(Re,{children:t.formatMessage({id:"demos.tocLegend.tocTitle"})})}),children:r.jsx(Xo,{showTools:!0,basemapSwitcherProps:{allowSelectingEmptyBasemap:!0}})})}),r.jsx(R,{pt:2,role:"dialog","aria-labelledby":e,children:r.jsx(Se,{title:r.jsx(Ge,{id:e,size:"md",mb:2,children:t.formatMessage({id:"demos.tocLegend.legendTitle"})}),children:r.jsx(Uo,{showBaseLayers:!0})})})]})}function Ir(o){return{id:"selectionResultList",title:o.intl.formatMessage({id:"demos.selectionResultList.title"}),createModel(){return new Er(o)}}}var he,J,Q,_e,Ie,gt;let Er=(gt=class{constructor(e){u(this,he);u(this,J);u(this,Q,re({key:0,input:void 0,open:!1}));w(this,"description");w(this,"mainWidget");u(this,_e,e=>{const{results:t}=e,n={columns:[{id:"id",displayName:"ID",width:100,getPropertyValue(c){return c.id}},{propertyName:"pointOfContact.address.postCode",displayName:"PLZ",width:120},{propertyName:"name",displayName:"Name"},{propertyName:"inspireId",displayName:"inspireID"},{displayName:"Gefördert",width:160,getPropertyValue(c){switch(c.properties?.gefoerdert){case"ja":return!0;case"nein":return!1;default:return c.properties?.gefoerdert}}}],data:t,formatOptions:{numberOptions:{maximumFractionDigits:3},dateOptions:{dateStyle:"medium",timeStyle:"medium",timeZone:"UTC"}}},l=a(this,Q).value.key;a(this,Q).value={open:!0,key:l+1,input:n}});u(this,Ie,e=>{console.log("Selected features: ",e.features)});const{mapModel:t,vectorSelectionSourceFactory:i,intl:s}=e;h(this,he,t),h(this,J,Cr(t,i)),this.description=s.formatMessage({id:"demos.selectionResultList.description"}),this.mainWidget=r.jsx(Wo,{sources:[a(this,J)],onSelectionComplete:a(this,_e)}),t.layers.getLayerById("ogc_kitas").setVisible(!0)}destroy(){a(this,J).destroy(),a(this,he).layers.getLayerById("ogc_kitas").setVisible(!1)}get listContainer(){const e=a(this,Q).value;if(!(!e.open||!e.input))return r.jsx(hi,{input:e.input,onSelectionChange:a(this,Ie)},e.key)}},he=new WeakMap,J=new WeakMap,Q=new WeakMap,_e=new WeakMap,Ie=new WeakMap,gt);function Cr(o,e){const t=o.layers.getLayerById("ogc_kitas");return e.createSelectionSource({vectorLayer:t.olLayer,label:t.title})}const Lr="krankenhaus";function Ar(o){return{id:"editing",title:o.intl.formatMessage({id:"demos.editing.title"}),createModel(){return new jr(o)}}}var me,ee;class jr{constructor(e){w(this,"description");w(this,"mainWidget");u(this,me);u(this,ee);const{mapModel:t,intl:i,editingService:s,notificationService:n}=e;h(this,me,t),this.description=i.formatMessage({id:"demos.editing.description"}),h(this,ee,new Tr(t,s,n,i)),this.mainWidget=r.jsx(Pr,{editingController:a(this,ee)}),this._setEditLayerVisible(!0)}destroy(){this._setEditLayerVisible(!1),a(this,ee).stopEditing()}_setEditLayerVisible(e=!0){a(this,me).layers.getLayerById(Lr).setVisible(e)}}me=new WeakMap,ee=new WeakMap;var k,_,H,U,N,P,W,V;class Tr{constructor(e,t,i,s){u(this,k);u(this,_);u(this,H);u(this,U);u(this,N);u(this,P);u(this,W);u(this,V);h(this,k,re(!1)),h(this,_,e),h(this,H,t),h(this,U,i),h(this,N,s)}editingActive(){return a(this,k).value}startCreateWorkflow(){if(!a(this,k).value)try{a(this,k).value=!0;const e=a(this,_).layers.getLayerById("krankenhaus"),t=new URL(e.attributes.collectionURL+"/items"),i=a(this,H).createFeature(a(this,_),t);this._watchState(i),i.whenComplete().then(s=>{if(!s)return;a(this,U).notify({level:"info",message:a(this,N).formatMessage({id:"demos.editing.create.featureCreated"},{featureId:s.featureId})}),(e?.olLayer).getSource()?.refresh()}).catch(s=>{console.error(s)}).finally(()=>{a(this,k).value=!1})}catch(e){a(this,k).value=!1,console.error(e)}}startUpdateWorkflow(){if(!a(this,k).value)try{a(this,k).value=!0,h(this,V,this._createEditingSelectTooltip());const e=a(this,_).layers.getLayerById("krankenhaus"),t=e?.olLayer;h(this,P,new qo({layers:[t]})),a(this,_).olMap.addInteraction(a(this,P)),a(this,V).element.classList.remove("editing-tooltip-hidden"),h(this,W,a(this,P).on("select",i=>{const s=i.selected,n=i.deselected;if(s.length!==1||n.length!==0)return;this._stopUpdateSelection();const l=s[0];if(!l)throw Error("feature is undefined");const c=new URL(e.attributes.collectionURL+"/items"),d=a(this,H).updateFeature(a(this,_),c,l);this._watchState(d),d.whenComplete().then(p=>{p&&(a(this,U).notify({level:"info",message:a(this,N).formatMessage({id:"demos.editing.update.featureModified"},{featureId:p.featureId})}),t.getSource()?.refresh())}).catch(p=>{console.error(p)}).finally(()=>{a(this,k).value=!1})}))}catch(e){a(this,k).value=!1,console.error(e)}}_watchState(e){const t=$e(()=>[e.getState()],i=>{i[0]==="active:saving"&&a(this,U).notify({level:"info",message:a(this,N).formatMessage({id:"demos.editing.update.savingStared"})}),i[0]==="destroyed"&&(t.destroy(),console.log("destroyed"))})}_createEditingSelectTooltip(){const e=document.createElement("div");e.className="editing-tooltip editing-tooltip-hidden",e.textContent=a(this,N).formatMessage({id:"demos.editing.update.tooltip.select"});const t=new Mt({element:e,offset:[15,0],positioning:"center-left"}),i=a(this,_).olMap,s=i.on("pointermove",n=>{n.dragging||t.setPosition(n.coordinate)});return i.addOverlay(t),{overlay:t,element:e,destroy(){Be(s),i.removeOverlay(t)}}}_stopUpdateSelection(){a(this,P)&&a(this,_).olMap.removeInteraction(a(this,P)),a(this,W)&&Be(a(this,W)),a(this,V)&&a(this,V).destroy(),h(this,P,void 0),h(this,W,void 0),h(this,V,void 0)}stopEditing(){a(this,H).stop(De),this._stopUpdateSelection(),a(this,k).value=!1}}k=new WeakMap,_=new WeakMap,H=new WeakMap,U=new WeakMap,N=new WeakMap,P=new WeakMap,W=new WeakMap,V=new WeakMap;function Pr({editingController:o}){const e=le(),t=$(()=>o.editingActive(),[o]),i=t?e.formatMessage({id:"demos.editing.activeInfo"}):e.formatMessage({id:"demos.editing.inactiveInfo"});return r.jsxs(r.Fragment,{children:[r.jsxs(F,{px:1,py:1,children:[r.jsx(Y,{mr:2,isDisabled:t,onClick:()=>{o.startCreateWorkflow()},children:e.formatMessage({id:"demos.editing.startCreateButton"})}),r.jsx(Y,{mr:2,isDisabled:t,onClick:()=>{o.startUpdateWorkflow()},children:e.formatMessage({id:"demos.editing.startUpdateButton"})}),r.jsx(Y,{isDisabled:!t,onClick:()=>{o.stopEditing()},children:e.formatMessage({id:"demos.editing.stopButton"})})]}),r.jsx(F,{px:1,py:1,children:i})]})}function Rr(o){return[Mr(o),gr(o),fr(o),vr(o),br(o),wr(o),Ar(o),yr(o),xr(o),kr(o),Vi(o),Sr(o),Ir(o),zi(o)]}const Dr=we("app::AppModel");var Ee,ge,fe,O,C,Ce,Le,ne,Pt,Rt;class Nr{constructor(e,t,i,s){u(this,ne);u(this,Ee);u(this,ge);u(this,fe);u(this,O);u(this,C);u(this,Ce,Eo(()=>Array.from(a(this,O).values())));u(this,Le,[]);if(h(this,Ee,e),h(this,ge,t),h(this,fe,i),h(this,O,new Map(s.map(l=>[l.id,l]))),a(this,O).size===0)throw new Error("No demos defined.");const n=s[0];h(this,C,re([n,n.createModel()])),x(this,ne,Pt).call(this),a(this,Le).push(x(this,ne,Rt).call(this))}destroy(){a(this,C).value[1].destroy?.()}get currentDemo(){return a(this,C).value[0]}get currentDemoModel(){return a(this,C).value[1]}get allDemoInfos(){return a(this,Ce).value}selectDemo(e){const t=a(this,O).get(e);if(!t)throw new Error(`Demo '${e}' does not exist.`);Co(()=>{const[,i]=a(this,C).value;i.destroy?.(),a(this,C).value=[t,t.createModel()]})}}Ee=new WeakMap,ge=new WeakMap,fe=new WeakMap,O=new WeakMap,C=new WeakMap,Ce=new WeakMap,Le=new WeakMap,ne=new WeakSet,Pt=function(){const t=new URL(window.location.href).searchParams.get("demo");if(t){if(!a(this,O).has(t)){a(this,ge).notify({title:a(this,fe).formatMessage({id:"demoSelection.notFound"},{demoId:t})});return}try{this.selectDemo(t)}catch(i){Dr.error("Failed to select demo from URL",i)}}},Rt=function(){return $e(()=>[a(this,C).value[0].id],([e])=>{const t=new URL(window.location.href);t.searchParams.set("demo",e),window.history.replaceState(null,"",t.toString())},{immediate:!0})};var te,ve,be,Ae,Dt;class Vr{constructor(e){u(this,Ae);u(this,te,re({kind:"loading"}));u(this,ve,[]);u(this,be,!1);const{mapRegistry:t,httpService:i,notifier:s,vectorSelectionSourceFactory:n,editingService:l,notificationService:c}=e.references,d=e.intl;x(this,Ae,Dt).call(this,{mapRegistry:t,httpService:i,notifier:s,vectorSelectionSourceFactory:n,editingService:l,intl:d,notificationService:c}).catch(p=>{a(this,te).value={kind:"error",message:p.message||"Unknown error"}})}destroy(){h(this,be,!0);for(const e of a(this,ve))e.destroy()}get appState(){return a(this,te).value}}te=new WeakMap,ve=new WeakMap,be=new WeakMap,Ae=new WeakSet,Dt=async function(e){const{mapRegistry:t,httpService:i,notifier:s,vectorSelectionSourceFactory:n,editingService:l,intl:c,notificationService:d}=e,p=await t.getMapModel(De);if(!p)throw new Error("No mapModel found.");const g=Rr({intl:c,httpService:i,mapModel:p,vectorSelectionSourceFactory:n,editingService:l,notificationService:d}),m={kind:"ready",appModel:new Nr(p,s,c,g),destroy(){this.appModel.destroy()}};if(a(this,be)){m.destroy();return}a(this,te).value=m,a(this,ve).push(m)};const q=we("local-storage"),Or=0,T={CORRUPTED_DATA:"local-storage:corrupted-data",INVALID_PATH:"local-storage:invalid-path",INVALID_VALUE:"local-storage:invalid-value",NOT_SUPPORTED:"local-storage:not-supported",INTERNAL:"local-storage:internal-error"};var oe,L,z,ie,A,y,Nt,Vt,de,K,Ot;class zr{constructor(e){u(this,y);u(this,oe);u(this,L,{});u(this,z);u(this,ie);u(this,A);h(this,oe,Hr(e.properties)),h(this,z,Ur()),a(this,z)&&(x(this,y,Vt).call(this),h(this,ie,x(this,y,Ot).call(this)))}destroy(){a(this,A)&&(clearTimeout(a(this,A)),h(this,A,void 0)),a(this,z)&&x(this,y,de).call(this)}get isSupported(){return!!a(this,ie)}get(e){return x(this,y,K).call(this).get(e)}set(e,t){return x(this,y,K).call(this).set(e,t)}remove(e){return x(this,y,K).call(this).remove(e)}removeAll(){return x(this,y,K).call(this).removeAll()}getNamespace(e){return x(this,y,K).call(this).getNamespace(e)}}oe=new WeakMap,L=new WeakMap,z=new WeakMap,ie=new WeakMap,A=new WeakMap,y=new WeakSet,Nt=function(){a(this,A)&&clearTimeout(a(this,A)),h(this,A,setTimeout(()=>{h(this,A,void 0),x(this,y,de).call(this)},Or))},Vt=function(){try{const e=a(this,z);if(!e)throw new j(T.INTERNAL,"Local storage is not available.");const t=e.getItem(a(this,oe));if(t==null){h(this,L,{}),x(this,y,de).call(this);return}try{const i=JSON.parse(t);if(!ae(i))throw new j(T.CORRUPTED_DATA,"Persisted value should be an object.");h(this,L,i)}catch(i){q.warn("Invalid persisted data, reverting to default.",i),h(this,L,{}),x(this,y,de).call(this)}}catch(e){q.error("Failed to load from local storage",e)}},de=function(){try{const e=a(this,z);if(!e)throw new j(T.INTERNAL,"Local storage is not available.");const t=JSON.stringify(a(this,L));e.setItem(a(this,oe),t)}catch(e){q.error("Failed to save to local storage",e)}},K=function(){const e=a(this,ie);if(!e)throw new j(T.NOT_SUPPORTED,"Local storage is not supported by this browser.");return e},Ot=function(){const e={getByPath:t=>ht(Fr(a(this,L),t)),setByPath:(t,i)=>{if(!Gr(i))throw new j(T.INVALID_VALUE,"The value is not supported by local storage.");if(i=ht(i),t.length===0){if(!ae(i))throw new j(T.INVALID_VALUE,"The root value must be a plain object.");h(this,L,i)}else Br(a(this,L),t,i);x(this,y,Nt).call(this)}};return new Ye([],e)};class Ye{path;access;constructor(e,t){this.path=e,this.access=t}get(e){return this.access.getByPath([...this.path,e])}set(e,t){this.access.setByPath([...this.path,e],t)}remove(e){this.access.setByPath([...this.path,e],void 0)}removeAll(){this.access.setByPath(this.path,{})}getNamespace(e){const t=this.get(e);if(t===void 0)this.set(e,{});else if(!ae(t))throw new j(T.INVALID_PATH,`Cannot use '${e}' as a namespace because it is not associated with an object.`);return new Ye(this.path.concat([e]),this.access)}}const ut="trails-state";function Fr(o,e){let t=o;for(const i of e){if(!ae(t))throw new j(T.INVALID_PATH,`Cannot get nested property '${i}' because the parent is no object.`);t=t[i]}return t}function Br(o,e,t){if(!e.length)throw new j(T.INTERNAL,"Path must not be empty.");let i=o;for(let n=0,l=e.length-1;n"u"){q.warn("Local storage is not supported by this browser.");return}try{const o=globalThis.localStorage;if(!o){q.warn("Local storage is not supported by this browser.");return}return o}catch(o){q.warn("Local storage is not supported by this browser.",o);return}}function ht(o){return o!=null&&(o=JSON.parse(JSON.stringify(o))),o}const Wr={"showcase-app":{name:"showcase-app",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:Ai,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{vectorSourceFactory:{name:"ogc-features.VectorSourceFactory",qualifier:void 0,all:!1}}},AppInitModel:{name:"AppInitModel",clazz:Vr,provides:[{name:"app.AppInitModel",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1},mapRegistry:{name:"map.MapRegistry",qualifier:void 0,all:!1},notifier:{name:"notifier.NotificationService",qualifier:void 0,all:!1},vectorSelectionSourceFactory:{name:"selection.VectorSelectionSourceFactory",qualifier:void 0,all:!1},editingService:{name:"editing.EditingService",qualifier:void 0,all:!1},notificationService:{name:"notifier.NotificationService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"app.AppInitModel",qualifier:void 0,all:!1},{name:"runtime.ApplicationContext",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:Lo,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/notifier":{name:"@open-pioneer/notifier",services:{NotificationServiceImpl:{name:"NotificationServiceImpl",clazz:mi,provides:[{name:"notifier.NotificationService",qualifier:"notifier.NotificationService"}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/reactivity":{name:"@open-pioneer/reactivity",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:Ao,provides:[{name:"map.MapRegistry",qualifier:void 0}],references:{providers:{name:"map.MapConfigProvider",qualifier:void 0,all:!0},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/ogc-features":{name:"@open-pioneer/ogc-features",services:{VectorSourceFactory:{name:"VectorSourceFactory",clazz:si,provides:[{name:"ogc-features.VectorSourceFactory",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}},SearchSourceFactory:{name:"SearchSourceFactory",clazz:ai,provides:[{name:"ogc-features.SearchSourceFactory",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[]},properties:{}},"@open-pioneer/coordinate-viewer":{name:"@open-pioneer/coordinate-viewer",services:{},ui:{references:[]},properties:{}},"@open-pioneer/overview-map":{name:"@open-pioneer/overview-map",services:{},ui:{references:[]},properties:{}},"@open-pioneer/scale-bar":{name:"@open-pioneer/scale-bar",services:{},ui:{references:[]},properties:{}},"@open-pioneer/scale-viewer":{name:"@open-pioneer/scale-viewer",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map-navigation":{name:"@open-pioneer/map-navigation",services:{},ui:{references:[]},properties:{}},"@open-pioneer/toc":{name:"@open-pioneer/toc",services:{},ui:{references:[]},properties:{}},"@open-pioneer/editing":{name:"@open-pioneer/editing",services:{EditingServiceImpl:{name:"EditingServiceImpl",clazz:$o,provides:[{name:"editing.EditingService",qualifier:void 0}],references:{mapRegistry:{name:"map.MapRegistry",qualifier:void 0,all:!1},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[]},properties:{polygonStyle:{value:{"fill-color":"rgba(255,255,255,0.4)","stroke-color":"red","stroke-width":1.25,"circle-radius":3,"circle-fill-color":"red","circle-stroke-width":1.25,"circle-stroke-color":"red"},required:!1},vertexStyle:{value:{"circle-radius":3,"circle-fill-color":"red","circle-stroke-width":1.25,"circle-stroke-color":"red"},required:!1}}},"@open-pioneer/geolocation":{name:"@open-pioneer/geolocation",services:{},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/legend":{name:"@open-pioneer/legend",services:{},ui:{references:[]},properties:{}},"@open-pioneer/measurement":{name:"@open-pioneer/measurement",services:{},ui:{references:[]},properties:{}},"@open-pioneer/printing":{name:"@open-pioneer/printing",services:{PrintingServiceImpl:{name:"PrintingServiceImpl",clazz:gi,provides:[{name:"printing.PrintingService",qualifier:void 0}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1},{name:"printing.PrintingService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/result-list":{name:"@open-pioneer/result-list",services:{},ui:{references:[]},properties:{}},"@open-pioneer/scale-setter":{name:"@open-pioneer/scale-setter",services:{},ui:{references:[]},properties:{}},"@open-pioneer/search":{name:"@open-pioneer/search",services:{},ui:{references:[]},properties:{}},"@open-pioneer/selection":{name:"@open-pioneer/selection",services:{VectorSelectionSourceFactory:{name:"VectorSelectionSourceFactory",clazz:Ko,provides:[{name:"selection.VectorSelectionSourceFactory",qualifier:void 0}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/spatial-bookmarks":{name:"@open-pioneer/spatial-bookmarks",services:{},ui:{references:[{name:"local-storage.LocalStorageService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map-ui-components":{name:"@open-pioneer/map-ui-components",services:{},ui:{references:[]},properties:{}},"@open-pioneer/basemap-switcher":{name:"@open-pioneer/basemap-switcher",services:{},ui:{references:[]},properties:{}},"@open-pioneer/local-storage":{name:"@open-pioneer/local-storage",services:{LocalStorageServiceImpl:{name:"LocalStorageServiceImpl",clazz:zr,provides:[{name:"local-storage.LocalStorageService",qualifier:"local-storage.LocalStorageService"}],references:{}}},ui:{references:[]},properties:{storageId:{value:null,required:!1}}}},qr=':root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.map-container .ol-viewport .ol-attribution{bottom:var(--map-padding-bottom);right:var(--map-padding-right)}.editing-tooltip{position:relative;background:#fffc;border-radius:4px;color:#000;padding:4px 8px;opacity:1;white-space:nowrap;font-size:12px;cursor:default;-webkit-user-select:none;user-select:none;font-weight:700}.editing-tooltip-hidden{visibility:hidden}.measurement-tooltip{position:relative;background:#fffc;border-radius:4px;color:#000;padding:4px 8px;opacity:1;white-space:nowrap;font-size:12px;cursor:default;-webkit-user-select:none;user-select:none;font-weight:700}.measurement-active-tooltip{background:#000000e6;border-radius:4px;border-color:#000000e6;opacity:.9;color:#fff}.measurement-finished-tooltip{background-color:#4cb3ffe6;color:#000;border:1px solid white}.measurement-active-tooltip:before,.measurement-finished-tooltip:before{border-top:6px solid rgba(0,0,0,.9);border-right:6px solid transparent;border-left:6px solid transparent;content:"";position:absolute;bottom:-6px;margin-left:-7px;left:50%}.measurement-finished-tooltip:before{border-top-color:#4cb3ff}.printing-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:10000;-webkit-user-select:none;user-select:none;pointer-events:all;cursor:wait;display:flex;flex-direction:row;align-items:center;justify-content:center;background-color:#b4b4b4cc}.printing-overlay-status{flex:1 1 auto;font-size:1.5em;text-align:center}.printing-scale-bar.ol-scale-bar{left:var(--printing-scale-bar-left);bottom:var(--printing-scale-bar-bottom)}.search-component .chakra-divider{display:none}.search-component .search-highlighted-match{font-weight:700}.search-component .search-value-container{cursor:text;padding-left:30px!important}.search-component .search-invisible{display:none}.selection-drag-box{background-color:#ffffff4d!important;border:3px solid var(--chakra-colors-background_primary)!important}.selection-tooltip{position:relative;background:#fffc;border-radius:4px;color:#000;padding:4px 8px;opacity:1;white-space:nowrap;font-size:12px;cursor:default;-webkit-user-select:none;user-select:none;font-weight:700}.selection .react-select{cursor:default}.map-container .selection-active{cursor:crosshair}.map-container .selection-inactive{cursor:no-drop}.selection-source-value.selection-source-value--disabled{opacity:.4}.selection-source-value.selection-source-value--disabled span{margin:0 6px 0 0}.map-anchor.main-map-anchor{overflow-x:hidden;overflow-y:auto}.map-container:focus-visible{outline:none}.map-container:focus-visible:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;border:3px solid var(--chakra-colors-trails-500)}@media screen and (max-width: 48em){.map-anchor.main-map-anchor{max-height:45%}}.overview-map .ol-overviewmap{position:relative;height:100%;width:100%}.overview-map .ol-overviewmap:not(.ol-collapsed){border:1px solid black}.overview-map .ol-overviewmap .ol-overviewmap-map{border:none;width:100%;height:100%}.overview-map .ol-overviewmap .ol-overviewmap-box{border:2px solid red}.scale-bar .ol-scale-bar{margin-bottom:8px;margin-right:8px}.scale-bar .ol-scale-bar,.scale-bar .ol-scale-line{position:relative;bottom:0;left:0;background:none}.scale-bar .ol-scale-bar .ol-scale-bar-inner,.scale-bar .ol-scale-bar .ol-scale-line-inner,.scale-bar .ol-scale-line .ol-scale-bar-inner,.scale-bar .ol-scale-line .ol-scale-line-inner{color:var(--chakra-white);border-color:var(--chakra-white)}.result-list-no-data-message{text-align:center;margin-top:50px;font-weight:700;font-size:larger}.result-list-table th,.result-list-table td{overflow-wrap:break-word}.result-list-table.result-list-table--is-resizing *{cursor:col-resize}.result-list-table thead{position:sticky;top:0;z-index:1;background:var(--chakra-colors-background_body)}.result-list-table th{position:relative;border-right-width:thin}.result-list-table tbody tr:hover{background:var(--chakra-colors-background_light)}.result-list-table .result-list-resizer{position:absolute;top:0;height:100%;right:0;width:8px;background:var(--chakra-colors-trails-100);transform:scaleX(.25);cursor:col-resize;-webkit-user-select:none;user-select:none;touch-action:none;padding-left:0}.result-list-table th:last-child .result-list-resizer{width:8px;transform:translate(50%) scaleX(.25)}.result-list-table th .result-list-resizer.result-list-resizer--is-resizing{background:var(--chakra-colors-trails-500);transform:scale(1)}.result-list-table th .result-list-resizer:hover{transform:scale(1)}',$r=["en","de"];function Kr(o){switch(o){case"en":return st(()=>import("./DEc3M1w42gc3.js"),[],import.meta.url).then(e=>e.default);case"de":return st(()=>import("./BaIyqT_8vxnW.js"),[],import.meta.url).then(e=>e.default)}throw new Error(`Unsupported locale: '${o}'`)}const Yr=Wt(qr),Zr=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:Kr,locales:$r,packages:Wr,styles:Yr},Symbol.toStringTag,{value:"Module"}));function zt({label:o,children:e}){return r.jsxs(fi,{as:vi,maxWidth:{base:"none",md:"20em"},width:{base:"100%",sm:"47%",md:void 0},children:[r.jsx(bi,{flexBasis:{base:"8em",sm:"auto"},m:0,children:o}),e]})}const Xr=we("app::DemoSelection");function Jr({appModel:o}){const e=le(),{allDemos:t,currentDemo:i}=$(()=>({allDemos:o.allDemoInfos,currentDemo:o.currentDemo}),[o]),s=b.useMemo(()=>t.map(n=>r.jsx("option",{value:n.id,children:n.title},n.id)),[t]);return r.jsx(zt,{label:e.formatMessage({id:"demoSelection.label"}),children:r.jsx(_t,{value:i.id,onChange:n=>{const l=n.target.value;try{o.selectDemo(l)}catch(c){Xr.error("Failed to select demo",c)}},children:s})})}function Qr(){const o=le(),e=Tt("runtime.ApplicationContext"),t=es(e.getLocale()),i=s=>{switch(s){case"en":e.setLocale("en-GB");break;case"de":e.setLocale("de-DE");break}};return r.jsx(zt,{label:o.formatMessage({id:"localeSwitcher.label"}),children:r.jsxs(_t,{value:t,onChange:s=>i(s.target.value),children:[r.jsx("option",{value:"de",children:o.formatMessage({id:"localeSwitcher.locale.de"})}),r.jsx("option",{value:"en",children:o.formatMessage({id:"localeSwitcher.locale.en"})})]})})}function es(o){const e=o.match(/^[a-z]+/i)?.[0];if(e==="en"||e=="de")return e;throw new Error("unexpected locale prefix: "+e)}function ts({appModel:o}){const e=le();return r.jsxs(F,{as:"header",px:2,py:3,flexWrap:{base:"wrap",md:"nowrap"},alignItems:"baseline",gap:2,boxShadow:"1px 0px 3px rgba(0, 0, 0, 0.5)",bgColor:"white",zIndex:100,children:[r.jsx(Ge,{size:"md",flexShrink:0,flexGrow:1,textAlign:{base:"center",md:"left"},width:{base:"100%",md:"auto"},mb:{base:2,md:0},children:e.formatMessage({id:"header.title"})}),r.jsx(Jr,{appModel:o}),r.jsx(Qr,{})]})}function os(){const o=Tt("app.AppInitModel"),e=$(()=>o.appState,[o]);let t;switch(e.kind){case"loading":t="Loading...";break;case"error":t="Error: "+e.message;break;case"ready":t=r.jsx(is,{state:e})}return t}function is(o){const e=le(),t=o.state.appModel,{currentDemo:i,currentDemoModel:s}=$(()=>({currentDemo:t.currentDemo,currentDemoModel:t.currentDemoModel}),[t]),n=$(()=>s.listContainer,[s]),l=b.useMemo(()=>({left:0,right:0,bottom:n!=null?400:0,top:0}),[n]);return r.jsxs(r.Fragment,{children:[r.jsx(Yo,{position:"top-right"}),r.jsx(F,{height:"100%",direction:"column",children:r.jsx(Se,{title:r.jsx(ts,{appModel:t}),children:r.jsx(F,{flex:"1",direction:"column",position:"relative",children:r.jsx(jo,{mapId:De,children:r.jsxs(To,{viewPadding:l,role:"main","aria-label":e.formatMessage({id:"ariaLabels.map"}),children:[r.jsx(rt,{className:"main-map-anchor",position:"top-left",horizontalGap:10,verticalGap:10,children:r.jsx(R,{bgColor:"white",borderRadius:10,p:2,maxW:"500px",children:r.jsxs(Se,{title:i.title,sectionHeadingProps:{size:"lg"},children:[r.jsx(Re,{py:4,dangerouslySetInnerHTML:{__html:s.description}}),s.mainWidget]})})}),r.jsx(rt,{position:"bottom-right",horizontalGap:6,children:r.jsx(He,{p:1,children:s.tools})}),n&&r.jsx(R,{className:"list-container",position:"absolute",bottom:"0",backgroundColor:"white",width:"100%",height:"400px",zIndex:1,borderTop:"2px solid",borderColor:"trails.100",children:n})]})})})})})]})}const rs=new URLSearchParams(window.location.search),ss=rs.get("lang")||void 0,as=qt({component:os,appMetadata:Zr,config:{properties:{"@open-pioneer/local-storage":{storageId:"ol-showcase-state"}},locale:ss}});customElements.define("showcase-app",as); +var Ft=Object.defineProperty;var Xe=o=>{throw TypeError(o)};var Bt=(o,e,t)=>e in o?Ft(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var w=(o,e,t)=>Bt(o,typeof e!="symbol"?e+"":e,t),Ne=(o,e,t)=>e.has(o)||Xe("Cannot "+t);var a=(o,e,t)=>(Ne(o,e,"read from private field"),t?t.call(o):e.get(o)),u=(o,e,t)=>e.has(o)?Xe("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),h=(o,e,t,i)=>(Ne(o,e,"write to private field"),i?i.call(o,t):e.set(o,t),t),x=(o,e,t)=>(Ne(o,e,"access private method"),t);import{f as ft,h as Gt,j as r,r as b,c as we,B as Y,F as Ht,A as Ve,k as Oe,l as Ut,E as j,a as Wt,e as qt}from"./Bh0CuZ3gy5tC.js";import{aJ as $t,aK as Kt,al as Yt,ak as Je,aL as Zt,aM as Xt,at as Jt,aN as Qt,aO as eo,aP as to,ad as oo,ax as io,aQ as Qe,aR as ro,aS as so,aT as et,aU as ao,aV as no,aW as ze,V as lo,aX as tt,A as co,N as po,aY as uo,K as ho,aZ as mo,a_ as go,a$ as fo,b0 as vo,b1 as ot,B as R,S as Ue,T as vt,O as bt,a as We,b as wt,b2 as je,i as Te,f as qe,u as Pe,r as re,b3 as it,b4 as bo,as as wo,j as Be,c as yt,C as yo,F as xt,aC as kt,b5 as xo,d as ko,w as $e,b6 as So,b7 as Mo,b8 as _o,k as F,b9 as Io,g as Se,h as Ge,ba as Eo,bb as Co,H as Lo,M as Ao,D as jo,l as To,m as rt}from"./p-jlpmJ86TPh.js";import{W as Po,i as Ro,j as St}from"./DV2kZNA-6G5s.js";import{O as Mt,W as Do,c as No,u as Vo,I as Oo,C as zo,b as Fo,a as Bo,M as Go,P as Ho,L as Uo,d as Wo,S as qo,E as $o,V as Ko,e as _t,N as Yo}from"./BH5Lv4UduK--.js";import{G as It,T as Zo,e as Xo}from"./0Ump2O8Jg_uq.js";import{T as Re,V as He,L as Jo}from"./Tz2xttM4F6S2.js";import{u as $}from"./BEc19nv24p4W.js";import{G as Qo}from"./CL_VRsbiqLzM.js";import{Z as ei,a as ti,H as oi,b as ii,I as ri,V as si,S as ai}from"./CIcCgABVk_3-.js";import{c as ni}from"./D03oE8cEQPSj.js";import{M as li,a as ci,b as di}from"./BeFcF3Ti4kY-.js";import{M as pi}from"./DUys4rac0YQP.js";import{S as ui}from"./CjjyePfBQlZ7.js";import{R as hi}from"./D4hWyDE3P_yA.js";import{N as mi,P as gi}from"./Ds9MLKVSYIgg.js";import{_ as st}from"./CmsKOCeNyeyo.js";import{F as fi}from"./BO_q12Vdyug-.js";import{H as vi}from"./L25RkWOQSN8A.js";import{F as bi}from"./CreVQ-qFRzOc.js";import"./D8rToQP6FvST.js";import"./BWsYSh9PkSaL.js";import"./Cq1ZpfgEg4XJ.js";import"./2d5-QpxJNHTD.js";var Et=ft("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});Et.displayName="Center";var wi={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Gt(function(e,t){const{axis:i="both",...s}=e;return r.jsx(ft.div,{ref:t,__css:wi[i],...s,position:"absolute"})});const f={ACCURACY:"accuracy",ACCURACY_GEOMETRY:"accuracyGeometry",ALTITUDE:"altitude",ALTITUDE_ACCURACY:"altitudeAccuracy",HEADING:"heading",POSITION:"position",PROJECTION:"projection",SPEED:"speed",TRACKING:"tracking",TRACKING_OPTIONS:"trackingOptions"},yi={ERROR:"error"};class xi extends Jt{constructor(e){super(yi.ERROR),this.code=e.code,this.message=e.message}}let ki=class extends $t{constructor(e){super(),this.on,this.once,this.un,e=e||{},this.position_=null,this.transform_=Kt,this.watchId_=void 0,this.addChangeListener(f.PROJECTION,this.handleProjectionChanged_),this.addChangeListener(f.TRACKING,this.handleTrackingChanged_),e.projection!==void 0&&this.setProjection(e.projection),e.trackingOptions!==void 0&&this.setTrackingOptions(e.trackingOptions),this.setTracking(e.tracking!==void 0?e.tracking:!1)}disposeInternal(){this.setTracking(!1),super.disposeInternal()}handleProjectionChanged_(){const e=this.getProjection();e&&(this.transform_=Yt(Je("EPSG:4326"),e),this.position_&&this.set(f.POSITION,this.transform_(this.position_)))}handleTrackingChanged_(){if("geolocation"in navigator){const e=this.getTracking();e&&this.watchId_===void 0?this.watchId_=navigator.geolocation.watchPosition(this.positionChange_.bind(this),this.positionError_.bind(this),this.getTrackingOptions()):!e&&this.watchId_!==void 0&&(navigator.geolocation.clearWatch(this.watchId_),this.watchId_=void 0)}}positionChange_(e){const t=e.coords;this.set(f.ACCURACY,t.accuracy),this.set(f.ALTITUDE,t.altitude===null?void 0:t.altitude),this.set(f.ALTITUDE_ACCURACY,t.altitudeAccuracy===null?void 0:t.altitudeAccuracy),this.set(f.HEADING,t.heading===null?void 0:Zt(t.heading)),this.position_?(this.position_[0]=t.longitude,this.position_[1]=t.latitude):this.position_=[t.longitude,t.latitude];const i=this.transform_(this.position_);this.set(f.POSITION,i.slice()),this.set(f.SPEED,t.speed===null?void 0:t.speed);const s=Xt(this.position_,t.accuracy);s.applyTransform(this.transform_),this.set(f.ACCURACY_GEOMETRY,s),this.changed()}positionError_(e){this.dispatchEvent(new xi(e))}getAccuracy(){return this.get(f.ACCURACY)}getAccuracyGeometry(){return this.get(f.ACCURACY_GEOMETRY)||null}getAltitude(){return this.get(f.ALTITUDE)}getAltitudeAccuracy(){return this.get(f.ALTITUDE_ACCURACY)}getHeading(){return this.get(f.HEADING)}getPosition(){return this.get(f.POSITION)}getProjection(){return this.get(f.PROJECTION)}getSpeed(){return this.get(f.SPEED)}getTracking(){return this.get(f.TRACKING)}getTrackingOptions(){return this.get(f.TRACKING_OPTIONS)}setProjection(e){this.set(f.PROJECTION,Je(e))}setTracking(e){this.set(f.TRACKING,e)}setTrackingOptions(e){this.set(f.TRACKING_OPTIONS,e)}};const Si=1.2;function Mi(o,e=Si){_i(o);const t=Qt(o),i=eo(o),s=t*e,n=i*e;return[o[0]-(s-t)/2,o[1]-(n-i)/2,o[2]+(s-t)/2,o[3]+(n-i)/2]}function _i(o){if(o.length!==4)throw new Error(`Invalid extent (expected length 4, but got length ${o.length}).`)}const Fe=.75,ke=.1;let Ii=class extends to{constructor(e){e=e||{},super({element:document.createElement("div"),render:e.render,target:e.target}),this.boundHandleRotationChanged_=this.handleRotationChanged_.bind(this),this.collapsed_=e.collapsed!==void 0?e.collapsed:!0,this.collapsible_=e.collapsible!==void 0?e.collapsible:!0,this.collapsible_||(this.collapsed_=!1),this.rotateWithView_=e.rotateWithView!==void 0?e.rotateWithView:!1,this.viewExtent_=void 0;const t=e.className!==void 0?e.className:"ol-overviewmap",i=e.tipLabel!==void 0?e.tipLabel:"Overview map",s=e.collapseLabel!==void 0?e.collapseLabel:"‹";typeof s=="string"?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=s):this.collapseLabel_=s;const n=e.label!==void 0?e.label:"›";typeof n=="string"?(this.label_=document.createElement("span"),this.label_.textContent=n):this.label_=n;const l=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_,c=document.createElement("button");c.setAttribute("type","button"),c.title=i,c.appendChild(l),c.addEventListener(oo.CLICK,this.handleClick_.bind(this),!1),this.ovmapDiv_=document.createElement("div"),this.ovmapDiv_.className="ol-overviewmap-map",this.view_=e.view;const d=new io({view:e.view,controls:new Qe,interactions:new Qe});this.ovmap_=d,e.layers&&e.layers.forEach(function(I){d.addLayer(I)});const p=document.createElement("div");p.className="ol-overviewmap-box",p.style.boxSizing="border-box",this.boxOverlay_=new Mt({position:[0,0],positioning:"center-center",element:p}),this.ovmap_.addOverlay(this.boxOverlay_);const g=t+" "+ro+" "+so+(this.collapsed_&&this.collapsible_?" "+et:"")+(this.collapsible_?"":" ol-uncollapsible"),m=this.element;m.className=g,m.appendChild(this.ovmapDiv_),m.appendChild(c);const v=this,S=this.boxOverlay_,M=this.boxOverlay_.getElement(),ce=function(I){return{clientX:I.clientX,clientY:I.clientY}},ye=function(I){const E=ce(I),Ze=d.getEventCoordinateInternal(E);S.setPosition(Ze)},xe=function(I){const E=d.getEventCoordinateInternal(I);v.getMap().getView().setCenterInternal(E),window.removeEventListener("mousemove",ye),window.removeEventListener("mouseup",xe)};M.addEventListener("mousedown",function(){window.addEventListener("mousemove",ye),window.addEventListener("mouseup",xe)})}setMap(e){const t=this.getMap();if(e!==t){if(t){const i=t.getView();i&&this.unbindView_(i),this.ovmap_.setTarget(null)}if(super.setMap(e),e){this.ovmap_.setTarget(this.ovmapDiv_),this.listenerKeys.push(ao(e,no.PROPERTYCHANGE,this.handleMapPropertyChange_,this));const i=e.getView();i&&(this.bindView_(i),i.isDef()&&(this.ovmap_.updateSize(),this.resetExtent_())),this.ovmap_.isRendered()||this.updateBoxAfterOvmapIsRendered_()}}}handleMapPropertyChange_(e){if(e.key===ze.VIEW){const t=e.oldValue;t&&this.unbindView_(t);const i=this.getMap().getView();this.bindView_(i)}else!this.ovmap_.isRendered()&&(e.key===ze.TARGET||e.key===ze.SIZE)&&this.ovmap_.updateSize()}bindView_(e){if(!this.view_){const t=new lo({projection:e.getProjection()});this.ovmap_.setView(t)}e.addChangeListener(tt.ROTATION,this.boundHandleRotationChanged_),this.handleRotationChanged_()}unbindView_(e){e.removeChangeListener(tt.ROTATION,this.boundHandleRotationChanged_)}handleRotationChanged_(){this.rotateWithView_&&this.ovmap_.getView().setRotation(this.getMap().getView().getRotation())}validateExtent_(){const e=this.getMap(),t=this.ovmap_;if(!e.isRendered()||!t.isRendered())return;const i=e.getSize(),n=e.getView().calculateExtentInternal(i);if(this.viewExtent_&&co(n,this.viewExtent_))return;this.viewExtent_=n;const l=t.getSize(),d=t.getView().calculateExtentInternal(l),p=t.getPixelFromCoordinateInternal(po(n)),g=t.getPixelFromCoordinateInternal(uo(n)),m=Math.abs(p[0]-g[0]),v=Math.abs(p[1]-g[1]),S=l[0],M=l[1];mS*Fe||v>M*Fe?this.resetExtent_():ho(d,n)||this.recenter_()}resetExtent_(){const e=this.getMap(),t=this.ovmap_,i=e.getSize(),n=e.getView().calculateExtentInternal(i),l=t.getView(),c=Math.log(Fe/ke)/Math.LN2,d=1/(Math.pow(2,c/2)*ke);mo(n,d),l.fitInternal(go(n))}recenter_(){const e=this.getMap(),t=this.ovmap_,i=e.getView();t.getView().setCenterInternal(i.getCenterInternal())}updateBox_(){const e=this.getMap(),t=this.ovmap_;if(!e.isRendered()||!t.isRendered())return;const i=e.getSize(),s=e.getView(),n=t.getView(),l=this.rotateWithView_?0:-s.getRotation(),c=this.boxOverlay_,d=this.boxOverlay_.getElement(),p=s.getCenterInternal(),g=s.getResolution(),m=n.getResolution(),v=i[0]*g/m,S=i[1]*g/m;if(c.setPosition(p),d){d.style.width=v+"px",d.style.height=S+"px";const M="rotate("+l+"rad)";d.style.transform=M}}updateBoxAfterOvmapIsRendered_(){this.ovmapPostrenderKey_||(this.ovmapPostrenderKey_=fo(this.ovmap_,vo.POSTRENDER,function(e){delete this.ovmapPostrenderKey_,this.updateBox_()},this))}handleClick_(e){e.preventDefault(),this.handleToggle_()}handleToggle_(){this.element.classList.toggle(et),this.collapsed_?ot(this.collapseLabel_,this.label_):ot(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_;const e=this.ovmap_;if(!this.collapsed_){if(e.isRendered()){this.viewExtent_=void 0,e.render();return}e.updateSize(),this.resetExtent_(),this.updateBoxAfterOvmapIsRendered_()}}getCollapsible(){return this.collapsible_}setCollapsible(e){this.collapsible_!==e&&(this.collapsible_=e,this.element.classList.toggle("ol-uncollapsible"),!e&&this.collapsed_&&this.handleToggle_())}setCollapsed(e){!this.collapsible_||this.collapsed_===e||this.handleToggle_()}getCollapsed(){return this.collapsed_}getRotateWithView(){return this.rotateWithView_}setRotateWithView(e){this.rotateWithView_!==e&&(this.rotateWithView_=e,this.getMap().getView().getRotation()!==0&&(this.rotateWithView_?this.handleRotationChanged_():this.ovmap_.getView().setRotation(0),this.viewExtent_=void 0,this.validateExtent_(),this.updateBox_()))}getOverviewMap(){return this.ovmap_}render(e){this.validateExtent_(),this.updateBox_()}};const Ei=ni({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"}),Ci={height:"25px",width:"25px",borderColor:"#4cb3ff",borderWidth:"3px",borderRadius:"50%",display:"inline-block "};function Li(o){return r.jsxs(R,{children:[r.jsx(Re,{children:o.layer.title}),r.jsx(R,{style:Ci})]})}const De="main";class Ai{mapId=De;vectorSourceFactory;constructor(e){this.vectorSourceFactory=e.references.vectorSourceFactory}async getMapConfig(){return{initialView:{kind:"position",center:{x:823091,y:6724521},zoom:8},layers:[new Ue({title:"OSM",id:"osm",isBaseLayer:!0,olLayer:new vt({source:new bt})}),new Do({isBaseLayer:!0,title:"Orthofotos NRW",url:"https://www.wmts.nrw.de/geobasis/wmts_nw_dop/1.0.0/WMTSCapabilities.xml",name:"nw_dop",matrixSet:"EPSG_3857_16",sourceOptions:{attributions:'Die Geobasisdaten des amtlichen Vermessungswesens werden als öffentliche Aufgabe gem. VermKatG NRW und gebührenfrei nach Open Data-Prinzipien über online-Verfahren bereitgestellt. Nutzungsbedingungen: siehe '}}),Pi(),Ti(),ji(this.vectorSourceFactory)]}}}function ji(o){const e="https://ogc-api-test.nrw.de/inspire-us-krankenhaus/v1",t="governmentalservice",i=o.createVectorSource({baseUrl:e,collectionId:t,limit:1e3,crs:"http://www.opengis.net/def/crs/EPSG/0/3857",attributions:`Land NRW (${new Date().getFullYear()}), Datenlizenz Deutschland - Namensnennung - Version 2.0, Datenquelle`}),s=new We({source:i});return new Ue({id:"krankenhaus",title:"Krankenhäuser-Demo-Dienst",visible:!1,olLayer:s,attributes:{collectionURL:e+"/collections/"+t}})}function Ti(){const o=new wt({url:"https://ogc-api.nrw.de/inspire-us-kindergarten/v1/collections/governmentalservice/items?f=json&limit=10000",format:new It,attributions:'© Bundesamt für Kartographie und Geodäsie 2017, Datenquellen'}),e=new We({source:o}),t={Component:Li};return new Ue({id:"ogc_kitas",title:"Kindertagesstätten",visible:!0,olLayer:e,attributes:{legend:t}})}function Pi(){return new Po({title:"Verwaltungsgebiete",id:"verwaltungsgebiete",visible:!1,url:"https://www.wms.nrw.de/geobasis/wms_nw_dvg",sublayers:[{name:"nw_dvg_krs",title:"Kreise und kreisfreie Städte"}]})}const Ri="200px",Di="300px",Ni=o=>{const{olLayer:e,height:t=Ri,width:i=Di}=o,{containerProps:s}=je("overview-map",o),n=b.useRef(null),{map:l}=Te(o);return b.useEffect(()=>{if(n.current&&l&&e){const c=l.olMap,d=new Ii({className:"ol-overviewmap",layers:[e],collapsible:!1,collapsed:!1,target:n.current});return c.addControl(d),()=>{c.removeControl(d)}}},[l,e]),r.jsx(R,{height:t,width:i,ref:n,...s})};function Vi({intl:o}){return{id:"overviewMap",title:o.formatMessage({id:"demos.overviewMap.title"}),createModel(){const e=new vt({source:new bt});return{description:o.formatMessage({id:"demos.overviewMap.description"}),mainWidget:r.jsx(Ni,{olLayer:e}),destroy(){e.dispose()}}}}}class Oi{label;filteredTypes;httpService;constructor(e,t,i){this.label=e,this.filteredTypes=t,this.httpService=i}async search(e,{mapProjection:t,signal:i}){const s=await this.request(e,100,i),n=new It({dataProjection:"EPSG:4326",featureProjection:t});return s.features.filter(l=>this.filteredTypes.includes(l.properties.type)).map((l,c)=>{const d=n.readGeometry(l.geometry);return{id:l.properties.osm_id||c,label:this.createLabel(l),geometry:d,properties:l.properties}})}async request(e,t,i){const s=new URL("https://photon.komoot.io/api?");s.searchParams.set("q",e),s.searchParams.set("lang","de"),s.searchParams.set("lat","51.961563"),s.searchParams.set("lon","7.628202"),s.searchParams.set("limit",t.toString());const n=await this.httpService.fetch(s,{signal:i});if(!n.ok)throw new Error("Request failed: "+n.status);return await n.json()}createLabel(e){return`${e.properties.name} (${e.properties.osm_value?e.properties.osm_value+", ":""}${e.properties.postcode?e.properties.postcode+", ":""}${e.properties.city?e.properties.city+", ":""}${e.properties.country?e.properties.country+")":")"}`}}function zi({intl:o,httpService:e,mapModel:t}){return{id:"searchAndHighlight",title:o.formatMessage({id:"demos.searchAndHighlight.title"}),createModel(){return new Fi(o,t,e)}}}var pe,ue,Z,Me,X,mt;let Fi=(mt=class{constructor(e,t,i){u(this,pe);u(this,ue);u(this,Z);w(this,"description");w(this,"mainWidget");u(this,Me,e=>{const t=e.result.geometry;t&&(a(this,X).call(this),h(this,Z,Bi(a(this,ue),[t])))});u(this,X,()=>{a(this,Z)?.destroy(),h(this,Z,void 0)});h(this,pe,new Oi("Photon Geocoder",["city","street"],i)),h(this,ue,t),this.description=e.formatMessage({id:"demos.searchAndHighlight.description"}),this.mainWidget=r.jsx(No,{sources:[a(this,pe)],onSelect:a(this,Me),onClear:a(this,X)})}destroy(){a(this,X).call(this)}},pe=new WeakMap,ue=new WeakMap,Z=new WeakMap,Me=new WeakMap,X=new WeakMap,mt);function Bi(o,e){const t=o.olMap.getViewport();return o.highlightAndZoom(e,{viewPadding:t&&t.offsetWidth<1e3?{top:150,right:75,bottom:50,left:75}:{top:150,right:400,bottom:50,left:400}})}const Ct="@open-pioneer/geolocation",Gi=qe.bind(void 0,Ct),Lt=Pe.bind(void 0,Ct);function Hi(o){return Qo({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3A8.994 8.994 0 0 0 13 3.06V1h-2v2.06A8.994 8.994 0 0 0 3.06 11H1v2h2.06A8.994 8.994 0 0 0 11 20.94V23h2v-2.06A8.994 8.994 0 0 0 20.94 13H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"},child:[]}]})(o)}const at=we("geolocation:GeolocationController"),nt=17;var B,G;class Ui{constructor(e,t,i){w(this,"supported",!!navigator.geolocation);w(this,"olMap");w(this,"positionHighlightLayer");w(this,"geolocation");w(this,"onError");w(this,"maxZoom",nt);w(this,"accuracyFeature");w(this,"positionFeature");w(this,"changeHandlers",[]);w(this,"setMapToPosition",!0);w(this,"trackingOptions",{});w(this,"isInitialZoom",!0);u(this,B,re(!1));u(this,G,re(!1));this.olMap=e,this.onError=t,this.isInitialZoom=!0,this.accuracyFeature=new it,this.accuracyFeature.setStyle(ct()),this.positionFeature=new it,this.positionFeature.setStyle(lt()),this.positionHighlightLayer=new We({source:new wt({features:[this.accuracyFeature,this.positionFeature]})}),this.positionHighlightLayer.setZIndex(bo);const s=i||Wi();this.geolocation=new ki({tracking:!1,trackingOptions:s,projection:e.getView()?.getProjection()}),this.trackingOptions=s,this.geolocation.on("error",n=>this.handleGeolocationError(n))}destroy(){this.stopGeolocation(),this.geolocation?.setTracking(!1),this.geolocation.dispose(),this.accuracyFeature=void 0,this.positionFeature=void 0,this.positionHighlightLayer.dispose()}startGeolocation(){if(a(this,G).value)return;const e=this.olMap;new Promise(i=>{a(this,G).value=!0,a(this,B).value=!0,this.geolocation?.setProjection(e.getView()?.getProjection()),this.geolocation?.setTracking(!0);const s=this.geolocation.on("change:accuracyGeometry",()=>{const d=this.geolocation.getAccuracyGeometry()||void 0;if(this.accuracyFeature?.setGeometry(d),this.accuracyFeature?.getGeometry()!==void 0&&i(),this.isInitialZoom){const p=this?.accuracyFeature?.getGeometry()?.getExtent();if(p){const g=Mi(p);if(!g)return;e.getView().fit(g,{maxZoom:this.maxZoom}),this.isInitialZoom=!1}}}),n=this.geolocation.on("change:position",()=>{const d=this.geolocation.getPosition();d&&(d[0]||d[1])!==void 0&&(this.positionFeature?.setGeometry(new wo(d)),this.setMapToPosition&&e.getView().setCenter(d),this.positionFeature?.getGeometry()!==void 0&&i())}),l=e.getView().on("change:resolution",()=>{this.setMapToPosition=this.isInitialZoom}),c=e.on("pointermove",d=>{d.dragging&&(this.setMapToPosition=!1)});this.changeHandlers.push(s,n,l,c),e.addLayer(this.positionHighlightLayer)}).then(()=>{a(this,B).value=!1}).catch(i=>{at.error("Failed to determine location",i)})}stopGeolocation(){this.geolocation?.setTracking(!1),a(this,G).value=!1,a(this,B).value=!1,this.trackingOptions={},this.setMapToPosition=!0,this.isInitialZoom=!0,this.changeHandlers.forEach(e=>{Be(e)}),this.changeHandlers=[],this.accuracyFeature?.setGeometry(void 0),this.positionFeature?.setGeometry(void 0),this.olMap.removeLayer(this.positionHighlightLayer)}get active(){return a(this,G).value}get loading(){return a(this,B).value}setPositionFeatureStyle(e){this.positionFeature?.setStyle(e??lt())}setAccuracyFeatureStyle(e){this.accuracyFeature?.setStyle(e??ct())}setMaxZoom(e){this.maxZoom=e??nt}getMaxZoom(){return this.maxZoom}getPositionFeature(){return this.positionFeature}getAccuracyFeature(){return this.accuracyFeature}getTrackingOptions(){return this.trackingOptions}getGeolocation(){return this.geolocation}handleGeolocationError(e){at.error("Error from geolocation API:",e.message),this.stopGeolocation();const t=(()=>{switch(e.code){case 1:return"permission-denied";case 2:return"position-unavailable";case 3:return"timeout";default:return"unknown"}})();this.onError(t)}}B=new WeakMap,G=new WeakMap;const lt=()=>new yt({image:new yo({radius:6,fill:new xt({color:"#3399CC"}),stroke:new kt({color:"#fff",width:2})})}),ct=()=>new yt({stroke:new kt({color:"#3399CC",width:3}),fill:new xt({color:"rgba(0, 0, 255, 0.05)"})}),Wi=()=>({enableHighAccuracy:!0,timeout:6e4,maximumAge:6e5}),qi=b.forwardRef(function(e,t){const{maxZoom:i,positionFeatureStyle:s,accuracyFeatureStyle:n,trackingOptions:l}=e,{map:c}=Te(e),d=Ki(c,i,l,s,n);return d&&r.jsx($i,{...e,controller:d,ref:t})}),$i=b.forwardRef(function(e,t){const{controller:i}=e,{containerProps:s}=je("geolocation",e),{isLoading:n,isActive:l}=$(()=>({isLoading:i.loading,isActive:i.active}),[i]),c=Lt(),d=i.supported?l?c.formatMessage({id:"locateMeEnd"}):c.formatMessage({id:"locateMeStart"}):c.formatMessage({id:"locateNotSupported"}),p=()=>{i.active?i.stopGeolocation():i.startGeolocation()};return r.jsx(Zo,{ref:t,label:d,icon:r.jsx(Hi,{}),onClick:()=>p(),isActive:l,isLoading:n,isDisabled:!i.supported,...s})});function Ki(o,e,t,i,s){const n=Lt(),l=Gi("notifier.NotificationService"),[c,d]=b.useState();return b.useEffect(()=>{if(!o)return;const p=m=>{const v=n.formatMessage({id:"error"}),S=(()=>{switch(m){case"permission-denied":return n.formatMessage({id:"permissionDenied"});case"position-unavailable":return n.formatMessage({id:"positionUnavailable"});case"timeout":return n.formatMessage({id:"timeout"});case"unknown":return n.formatMessage({id:"unknownError"})}})();l.notify({level:"error",title:v,message:S})},g=new Ui(o.olMap,p,t);return d(g),()=>{g.destroy(),d(void 0)}},[o,t,n,l]),b.useEffect(()=>{c?.setPositionFeatureStyle(i)},[c,i]),b.useEffect(()=>{c?.setAccuracyFeatureStyle(s)},[c,s]),b.useEffect(()=>{c?.setMaxZoom(e)},[c,e]),c}const Yi="@open-pioneer/scale-setter",Zi=Pe.bind(void 0,Yi),Xi=25.4/.28,Ji=39.37,Qi=[17471320,8735660,4367830,2183915,1091957,545978,272989,136494,68247,34123,17061,8530,4265,2132],er=o=>{const{scales:e=Qi}=o,{containerProps:t}=je("scale-setter",o),{map:i}=Te(o),s=Zi(),n=Vo(i?.olMap)??1;function l(p){if(!i)return;const g=i.olMap.getView(),m=i.olMap.getView().getProjection(),v=m.getMetersPerUnit()??1,S=Ji*Xi*v,M=i.olMap.getView().getCenter();if(!M)return;const ce=p/xo(m,S,M);g.setResolution(ce)}const c=e.map(p=>r.jsx(li,{value:p,onClick:()=>l(p),onFocus:g=>{g.target?.scrollIntoView?.({block:"nearest"})},className:"scale-setter-option",children:dt(s,p)},p)),d=dt(s,n);return r.jsx(R,{...t,children:r.jsxs(pi,{isLazy:!0,children:[r.jsx(ci,{as:Y,rightIcon:r.jsx(Ei,{}),className:"scale-setter-menubutton","aria-label":s.formatMessage({id:"button.ariaLabel"},{scale:d}),"aria-description":s.formatMessage({id:"button.ariaDescription"}),children:d}),r.jsx(Ht,{children:r.jsx(di,{className:"scale-setter-menuoptions",maxHeight:"20em",overflowY:"auto",children:c})})]})})};function dt(o,e){return"1 : "+o.formatNumber(e)}const At="@open-pioneer/spatial-bookmarks",tr=qe.bind(void 0,At),or=Pe.bind(void 0,At),D=we("spatial-bookmark:SpatialBookmarkViewModel");class ir{map;packageNamespace;writableBookmarks=ko([]);watchBookmarksHandle;get bookmarks(){return this.writableBookmarks.getItems()}constructor(e,t){this.map=e,this.packageNamespace=t.getNamespace("spatial-bookmarks"),this.loadState(),this.watchBookmarksHandle=$e(()=>[this.writableBookmarks.getItems()],([i])=>this.saveState(i),{immediate:!1})}destroy(){this.watchBookmarksHandle.destroy()}createBookmark(e){const t=this.map.olMap,i=t.getView().calculateExtent(),s=t.getView().getProjection().getCode(),n={minX:i[0],minY:i[1],maxX:i[2],maxY:i[3]},l={id:So(),title:e,extent:n,projection:s};D.debug("Created a new bookmark",l),this.writableBookmarks.push(l)}activateBookmark(e){D.debug("Activating bookmark",e);const t=this.getBookmarkExtent(e);D.debug("Attempting to apply extent",t),this.applyExtent(t)}deleteBookmark(e){D.debug("Deleting bookmark",e);const t=this.writableBookmarks.findIndex(i=>i.id===e);t>-1&&this.writableBookmarks.splice(t,1)}deleteAllBookmarks(){D.debug("Deleting all bookmarks"),this.writableBookmarks.splice(0)}loadState(){D.debug("Restoring bookmarks from local storage");const e=this.packageNamespace.get("bookmarks")??[];try{rr(e),this.writableBookmarks.push(...e)}catch(t){D.error("Bookmarks data in local storage is invalid, resetting to default value.",t),this.writableBookmarks.splice(0),this.saveState([])}}saveState(e){D.debug("Saving bookmarks to local storage"),this.packageNamespace.set("bookmarks",e)}getBookmarkExtent(e){const i=this.map.olMap.getView(),s=e.extent,n=[s.minX,s.minY,s.maxX,s.maxY],l=i.getProjection(),c=e.projection;return Mo(n,c,l)}applyExtent(e){const i=this.map.olMap.getView(),s=_o(e),n=i.getResolutionForExtent(e);i.setCenter(s),i.setResolution(n)}}function rr(o){if(!Array.isArray(o))throw new Error("Expected bookmarks from local storage to be an array.");for(const e of o)sr(e)}function sr(o){if(!o||typeof o!="object")throw new Error("Expected bookmark from local storage to be an object.");const e=o;if(typeof e.id!="string")throw new Error("Bookmark does not have a valid id.");if(typeof e.title!="string")throw new Error("Bookmark does not have a valid title.");if(ar(e.extent),typeof e.projection!="string")throw new Error("Bookmark does not have a valid projection value.")}function ar(o){if(!o||typeof o!="object")throw new Error("Expected bookmark extent from local storage to be an object.");const e=o;if(typeof e.minX!="number"||typeof e.minY!="number"||typeof e.maxX!="number"||typeof e.maxY!="number")throw new Error("Expected bookmark extent from local storage to have valid coordinates.")}const nr=o=>{const{map:e}=Te(o),t=tr("local-storage.LocalStorageService"),i=mr(e,t);return i&&r.jsx(lr,{...o,viewModel:i})};function lr(o){const{viewModel:e}=o,t=or(),i=b.useRef([]),[s,n]=b.useState(!1),l=$(()=>e.bookmarks,[e]),[c,d]=b.useState(""),p=c.trim().length>0,{containerProps:g}=je("spatial-bookmarks",o),[m,v]=b.useState("list"),S=()=>{e.deleteAllBookmarks(),v("list")},M=()=>{p&&(e.createBookmark(c),v("list"),d(""),n(!0))};b.useEffect(()=>{if(s){const E=i.current;E&&E[l.length-1]?.scrollIntoView?.(),n(!1)}},[l,s]);const ce=()=>r.jsxs(He,{children:[r.jsxs(Ve,{rounded:"md",status:"warning",children:[r.jsx(Oe,{}),t.formatMessage({id:"bookmark.alert.delete"})]}),r.jsx(ur,{intl:t,onClear:S,onCancel:()=>v("list")})]}),ye=()=>r.jsxs(He,{children:[r.jsxs(Ve,{rounded:"md",status:"info",children:[r.jsx(Oe,{}),t.formatMessage({id:"bookmark.alert.create"})]}),r.jsx(Oo,{"aria-label":t.formatMessage({id:"bookmark.input.label"}),placeholder:t.formatMessage({id:"bookmark.input.placeholder"}),value:c,onChange:E=>{d(E.target.value)},onKeyDown:E=>{E.key==="Enter"&&M()},isRequired:!0,isInvalid:!p,autoFocus:!0}),r.jsx(hr,{intl:t,isInvalid:!p,onCancel:()=>{d(""),v("list")},onSave:M})]}),xe=()=>r.jsxs(r.Fragment,{children:[l.length?cr(l,e,t,i):r.jsxs(Ve,{rounded:"md",status:"info",children:[r.jsx(Oe,{}),t.formatMessage({id:"bookmark.alert.noSaved"})]}),r.jsx(pr,{intl:t,bookmarks:l,showCreate:()=>v("create"),showDelete:()=>v("delete")})]}),I=r.jsxs(r.Fragment,{children:[m==="list"&&xe(),m==="create"&&ye(),m==="delete"&&ce()]});return r.jsx(F,{flexDirection:"column",...g,children:I})}function cr(o,e,t,i){const s=t.formatMessage({id:"bookmark.button.deleteOne"}),n=o.map((l,c)=>r.jsx(dr,{index:c,listItemNodes:i,bookmark:l,onActivate:()=>e.activateBookmark(l),onDelete:()=>e.deleteBookmark(l.id),deleteBtnLabel:s},l.id));return r.jsx(Jo,{as:"ul",className:"spatial-bookmark-list",role:"listbox","aria-label":t.formatMessage({id:"bookmark.list.label"}),flexShrink:1,flexGrow:1,p:1,spacing:1,overflowY:"auto",listStyleType:"none",children:n})}const pt={ArrowDown:1,ArrowUp:-1};function dr(o){const{index:e,listItemNodes:t,bookmark:i,onDelete:s,onActivate:n,deleteBtnLabel:l}=o,c=i.title,d=p=>{const g=p.key;if(g==="Enter"){p.target===p.currentTarget&&n();return}if(pt[g]!=null){const m=t.current?.length;if(!m)return;let v=(e+pt[g])%m;v<0&&(v=m-1),t.current[v]?.focus()}};return r.jsx(R,{as:"li",p:1,ref:p=>{if(!p){t.current.splice(e,1);return}t.current[e]=p},className:Io("spatial-bookmarks-item"),tabIndex:0,rounded:"md",role:"option",cursor:"pointer",outline:0,_hover:{background:"trails.50"},_focusVisible:{boxShadow:"outline"},onKeyDown:d,onClick:n,children:r.jsxs(F,{width:"100%",flexDirection:"row",align:"center",gap:1,children:[r.jsx(Et,{children:r.jsx(Ro,{})}),r.jsx(Re,{ps:2,noOfLines:1,children:c}),r.jsx(ui,{}),r.jsx(Ut,{hasArrow:!0,label:l,placement:"right",children:r.jsx(Y,{className:"spatial-bookmarks-item-delete","aria-label":l,borderRadius:"full",iconSpacing:0,padding:0,colorScheme:"red",variant:"ghost",leftIcon:r.jsx(St,{}),onClick:p=>{s(),p.stopPropagation()}})},e)]})})}function pr(o){const{intl:e,bookmarks:t,showCreate:i,showDelete:s}=o;return r.jsxs(Ke,{children:[r.jsx(se,{isDisabled:t.length===0,colorScheme:"red",width:void 0,iconSpacing:0,leftIcon:r.jsx(St,{}),onClick:s,"aria-label":e.formatMessage({id:"bookmark.button.deleteAll"}),variant:"outline"}),r.jsx(se,{onClick:i,width:"100%",children:e.formatMessage({id:"bookmark.button.create"})})]})}function ur(o){const{intl:e,onCancel:t,onClear:i}=o;return r.jsxs(Ke,{children:[r.jsx(se,{variant:"outline",onClick:t,children:e.formatMessage({id:"bookmark.button.cancelDelete"})}),r.jsx(se,{onClick:i,children:e.formatMessage({id:"bookmark.button.confirmDelete"})})]})}function hr(o){const{intl:e,onCancel:t,onSave:i,isInvalid:s}=o;return r.jsxs(Ke,{children:[r.jsx(se,{variant:"outline",onClick:()=>t(),children:e.formatMessage({id:"bookmark.button.cancel"})}),r.jsx(se,{isDisabled:s,onClick:()=>i(),children:e.formatMessage({id:"bookmark.button.save"})})]})}function Ke(o){return r.jsx(F,{width:"100%",flexDirection:"row",mt:2,gap:1,flexGrow:0,flexShrink:0,children:o.children})}function se(o){return r.jsx(Y,{width:"100%",...o})}function mr(o,e){const[t,i]=b.useState();return b.useEffect(()=>{let s;return o?s=new ir(o,e):s=void 0,i(s),()=>s?.destroy()},[o,e]),t}function gr({intl:o}){return{id:"coordinateViewer",title:o.formatMessage({id:"demos.coordinateViewer.title"}),createModel(){return{description:o.formatMessage({id:"demos.coordinateViewer.description"}),mainWidget:r.jsx(zo,{})}}}}function fr({intl:o}){return{id:"scaleViewer",title:o.formatMessage({id:"demos.scaleViewer.title"}),createModel(){return{description:o.formatMessage({id:"demos.scaleViewer.description"}),mainWidget:r.jsx(Fo,{})}}}}function vr({intl:o}){return{id:"scaleSetter",title:o.formatMessage({id:"demos.scaleSetter.title"}),createModel(){return{description:o.formatMessage({id:"demos.scaleSetter.description"}),mainWidget:r.jsx(er,{})}}}}function br({intl:o}){return{id:"scaleBar",title:o.formatMessage({id:"demos.scaleBar.title"}),createModel(){return{description:o.formatMessage({id:"demos.scaleBar.description"}),tools:r.jsx(Bo,{})}}}}function wr({intl:o}){return{id:"measurement",title:o.formatMessage({id:"demos.measurement.title"}),createModel(){return{description:o.formatMessage({id:"demos.measurement.description"}),mainWidget:r.jsx(Go,{})}}}}function yr({intl:o}){return{id:"mapNavigation",title:o.formatMessage({id:"demos.mapNavigation.title"}),createModel(){return{description:o.formatMessage({id:"demos.mapNavigation.description"}),tools:r.jsxs(r.Fragment,{children:[r.jsx(ei,{}),r.jsx(ti,{}),r.jsx(oi,{}),r.jsx(ii,{}),r.jsx(ri,{})]})}}}}function xr({intl:o}){return{id:"geolocation",title:o.formatMessage({id:"demos.geolocation.title"}),createModel(){return{description:o.formatMessage({id:"demos.geolocation.description"}),tools:r.jsx(qi,{})}}}}function kr({intl:o}){return{id:"spatialBookmarks",title:o.formatMessage({id:"demos.spatialBookmarks.title"}),createModel(){return{description:o.formatMessage({id:"demos.spatialBookmarks.description"}),mainWidget:r.jsx(nr,{})}}}}function Sr({intl:o}){return{id:"printing",title:o.formatMessage({id:"demos.printing.title"}),createModel(){return{description:o.formatMessage({id:"demos.printing.description"}),mainWidget:r.jsx(Ho,{})}}}}const jt="showcase-app",Tt=qe.bind(void 0,jt),le=Pe.bind(void 0,jt);function Mr({intl:o,mapModel:e}){return{id:"tocLegend",title:o.formatMessage({id:"demos.tocLegend.title"}),createModel(){function t(s=!0){e.layers.getLayerById("verwaltungsgebiete").setVisible(s),e.layers.getLayerById("krankenhaus").setVisible(s),e.layers.getLayerById("ogc_kitas").setVisible(s)}function i(){t(!1),e?.layers.activateBaseLayer("osm")}return{description:o.formatMessage({id:"demos.tocLegend.description"}),mainWidget:r.jsx(_r,{}),destroy:i}}}}function _r(){const o=b.useId(),e=b.useId(),t=le();return r.jsxs(r.Fragment,{children:[r.jsx(R,{role:"dialog","aria-labelledby":o,children:r.jsx(Se,{title:r.jsx(Ge,{id:o,size:"md",mb:2,children:r.jsx(Re,{children:t.formatMessage({id:"demos.tocLegend.tocTitle"})})}),children:r.jsx(Xo,{showTools:!0,basemapSwitcherProps:{allowSelectingEmptyBasemap:!0}})})}),r.jsx(R,{pt:2,role:"dialog","aria-labelledby":e,children:r.jsx(Se,{title:r.jsx(Ge,{id:e,size:"md",mb:2,children:t.formatMessage({id:"demos.tocLegend.legendTitle"})}),children:r.jsx(Uo,{showBaseLayers:!0})})})]})}function Ir(o){return{id:"selectionResultList",title:o.intl.formatMessage({id:"demos.selectionResultList.title"}),createModel(){return new Er(o)}}}var he,J,Q,_e,Ie,gt;let Er=(gt=class{constructor(e){u(this,he);u(this,J);u(this,Q,re({key:0,input:void 0,open:!1}));w(this,"description");w(this,"mainWidget");u(this,_e,e=>{const{results:t}=e,n={columns:[{id:"id",displayName:"ID",width:100,getPropertyValue(c){return c.id}},{propertyName:"pointOfContact.address.postCode",displayName:"PLZ",width:120},{propertyName:"name",displayName:"Name"},{propertyName:"inspireId",displayName:"inspireID"},{displayName:"Gefördert",width:160,getPropertyValue(c){switch(c.properties?.gefoerdert){case"ja":return!0;case"nein":return!1;default:return c.properties?.gefoerdert}}}],data:t,formatOptions:{numberOptions:{maximumFractionDigits:3},dateOptions:{dateStyle:"medium",timeStyle:"medium",timeZone:"UTC"}}},l=a(this,Q).value.key;a(this,Q).value={open:!0,key:l+1,input:n}});u(this,Ie,e=>{console.log("Selected features: ",e.features)});const{mapModel:t,vectorSelectionSourceFactory:i,intl:s}=e;h(this,he,t),h(this,J,Cr(t,i)),this.description=s.formatMessage({id:"demos.selectionResultList.description"}),this.mainWidget=r.jsx(Wo,{sources:[a(this,J)],onSelectionComplete:a(this,_e)}),t.layers.getLayerById("ogc_kitas").setVisible(!0)}destroy(){a(this,J).destroy(),a(this,he).layers.getLayerById("ogc_kitas").setVisible(!1)}get listContainer(){const e=a(this,Q).value;if(!(!e.open||!e.input))return r.jsx(hi,{input:e.input,onSelectionChange:a(this,Ie)},e.key)}},he=new WeakMap,J=new WeakMap,Q=new WeakMap,_e=new WeakMap,Ie=new WeakMap,gt);function Cr(o,e){const t=o.layers.getLayerById("ogc_kitas");return e.createSelectionSource({vectorLayer:t.olLayer,label:t.title})}const Lr="krankenhaus";function Ar(o){return{id:"editing",title:o.intl.formatMessage({id:"demos.editing.title"}),createModel(){return new jr(o)}}}var me,ee;class jr{constructor(e){w(this,"description");w(this,"mainWidget");u(this,me);u(this,ee);const{mapModel:t,intl:i,editingService:s,notificationService:n}=e;h(this,me,t),this.description=i.formatMessage({id:"demos.editing.description"}),h(this,ee,new Tr(t,s,n,i)),this.mainWidget=r.jsx(Pr,{editingController:a(this,ee)}),this._setEditLayerVisible(!0)}destroy(){this._setEditLayerVisible(!1),a(this,ee).stopEditing()}_setEditLayerVisible(e=!0){a(this,me).layers.getLayerById(Lr).setVisible(e)}}me=new WeakMap,ee=new WeakMap;var k,_,H,U,N,P,W,V;class Tr{constructor(e,t,i,s){u(this,k);u(this,_);u(this,H);u(this,U);u(this,N);u(this,P);u(this,W);u(this,V);h(this,k,re(!1)),h(this,_,e),h(this,H,t),h(this,U,i),h(this,N,s)}editingActive(){return a(this,k).value}startCreateWorkflow(){if(!a(this,k).value)try{a(this,k).value=!0;const e=a(this,_).layers.getLayerById("krankenhaus"),t=new URL(e.attributes.collectionURL+"/items"),i=a(this,H).createFeature(a(this,_),t);this._watchState(i),i.whenComplete().then(s=>{if(!s)return;a(this,U).notify({level:"info",message:a(this,N).formatMessage({id:"demos.editing.create.featureCreated"},{featureId:s.featureId})}),(e?.olLayer).getSource()?.refresh()}).catch(s=>{console.error(s)}).finally(()=>{a(this,k).value=!1})}catch(e){a(this,k).value=!1,console.error(e)}}startUpdateWorkflow(){if(!a(this,k).value)try{a(this,k).value=!0,h(this,V,this._createEditingSelectTooltip());const e=a(this,_).layers.getLayerById("krankenhaus"),t=e?.olLayer;h(this,P,new qo({layers:[t]})),a(this,_).olMap.addInteraction(a(this,P)),a(this,V).element.classList.remove("editing-tooltip-hidden"),h(this,W,a(this,P).on("select",i=>{const s=i.selected,n=i.deselected;if(s.length!==1||n.length!==0)return;this._stopUpdateSelection();const l=s[0];if(!l)throw Error("feature is undefined");const c=new URL(e.attributes.collectionURL+"/items"),d=a(this,H).updateFeature(a(this,_),c,l);this._watchState(d),d.whenComplete().then(p=>{p&&(a(this,U).notify({level:"info",message:a(this,N).formatMessage({id:"demos.editing.update.featureModified"},{featureId:p.featureId})}),t.getSource()?.refresh())}).catch(p=>{console.error(p)}).finally(()=>{a(this,k).value=!1})}))}catch(e){a(this,k).value=!1,console.error(e)}}_watchState(e){const t=$e(()=>[e.getState()],i=>{i[0]==="active:saving"&&a(this,U).notify({level:"info",message:a(this,N).formatMessage({id:"demos.editing.update.savingStared"})}),i[0]==="destroyed"&&(t.destroy(),console.log("destroyed"))})}_createEditingSelectTooltip(){const e=document.createElement("div");e.className="editing-tooltip editing-tooltip-hidden",e.textContent=a(this,N).formatMessage({id:"demos.editing.update.tooltip.select"});const t=new Mt({element:e,offset:[15,0],positioning:"center-left"}),i=a(this,_).olMap,s=i.on("pointermove",n=>{n.dragging||t.setPosition(n.coordinate)});return i.addOverlay(t),{overlay:t,element:e,destroy(){Be(s),i.removeOverlay(t)}}}_stopUpdateSelection(){a(this,P)&&a(this,_).olMap.removeInteraction(a(this,P)),a(this,W)&&Be(a(this,W)),a(this,V)&&a(this,V).destroy(),h(this,P,void 0),h(this,W,void 0),h(this,V,void 0)}stopEditing(){a(this,H).stop(De),this._stopUpdateSelection(),a(this,k).value=!1}}k=new WeakMap,_=new WeakMap,H=new WeakMap,U=new WeakMap,N=new WeakMap,P=new WeakMap,W=new WeakMap,V=new WeakMap;function Pr({editingController:o}){const e=le(),t=$(()=>o.editingActive(),[o]),i=t?e.formatMessage({id:"demos.editing.activeInfo"}):e.formatMessage({id:"demos.editing.inactiveInfo"});return r.jsxs(r.Fragment,{children:[r.jsxs(F,{px:1,py:1,children:[r.jsx(Y,{mr:2,isDisabled:t,onClick:()=>{o.startCreateWorkflow()},children:e.formatMessage({id:"demos.editing.startCreateButton"})}),r.jsx(Y,{mr:2,isDisabled:t,onClick:()=>{o.startUpdateWorkflow()},children:e.formatMessage({id:"demos.editing.startUpdateButton"})}),r.jsx(Y,{isDisabled:!t,onClick:()=>{o.stopEditing()},children:e.formatMessage({id:"demos.editing.stopButton"})})]}),r.jsx(F,{px:1,py:1,children:i})]})}function Rr(o){return[Mr(o),gr(o),fr(o),vr(o),br(o),wr(o),Ar(o),yr(o),xr(o),kr(o),Vi(o),Sr(o),Ir(o),zi(o)]}const Dr=we("app::AppModel");var Ee,ge,fe,O,C,Ce,Le,ne,Pt,Rt;class Nr{constructor(e,t,i,s){u(this,ne);u(this,Ee);u(this,ge);u(this,fe);u(this,O);u(this,C);u(this,Ce,Eo(()=>Array.from(a(this,O).values())));u(this,Le,[]);if(h(this,Ee,e),h(this,ge,t),h(this,fe,i),h(this,O,new Map(s.map(l=>[l.id,l]))),a(this,O).size===0)throw new Error("No demos defined.");const n=s[0];h(this,C,re([n,n.createModel()])),x(this,ne,Pt).call(this),a(this,Le).push(x(this,ne,Rt).call(this))}destroy(){a(this,C).value[1].destroy?.()}get currentDemo(){return a(this,C).value[0]}get currentDemoModel(){return a(this,C).value[1]}get allDemoInfos(){return a(this,Ce).value}selectDemo(e){const t=a(this,O).get(e);if(!t)throw new Error(`Demo '${e}' does not exist.`);Co(()=>{const[,i]=a(this,C).value;i.destroy?.(),a(this,C).value=[t,t.createModel()]})}}Ee=new WeakMap,ge=new WeakMap,fe=new WeakMap,O=new WeakMap,C=new WeakMap,Ce=new WeakMap,Le=new WeakMap,ne=new WeakSet,Pt=function(){const t=new URL(window.location.href).searchParams.get("demo");if(t){if(!a(this,O).has(t)){a(this,ge).notify({title:a(this,fe).formatMessage({id:"demoSelection.notFound"},{demoId:t})});return}try{this.selectDemo(t)}catch(i){Dr.error("Failed to select demo from URL",i)}}},Rt=function(){return $e(()=>[a(this,C).value[0].id],([e])=>{const t=new URL(window.location.href);t.searchParams.set("demo",e),window.history.replaceState(null,"",t.toString())},{immediate:!0})};var te,ve,be,Ae,Dt;class Vr{constructor(e){u(this,Ae);u(this,te,re({kind:"loading"}));u(this,ve,[]);u(this,be,!1);const{mapRegistry:t,httpService:i,notifier:s,vectorSelectionSourceFactory:n,editingService:l,notificationService:c}=e.references,d=e.intl;x(this,Ae,Dt).call(this,{mapRegistry:t,httpService:i,notifier:s,vectorSelectionSourceFactory:n,editingService:l,intl:d,notificationService:c}).catch(p=>{a(this,te).value={kind:"error",message:p.message||"Unknown error"}})}destroy(){h(this,be,!0);for(const e of a(this,ve))e.destroy()}get appState(){return a(this,te).value}}te=new WeakMap,ve=new WeakMap,be=new WeakMap,Ae=new WeakSet,Dt=async function(e){const{mapRegistry:t,httpService:i,notifier:s,vectorSelectionSourceFactory:n,editingService:l,intl:c,notificationService:d}=e,p=await t.getMapModel(De);if(!p)throw new Error("No mapModel found.");const g=Rr({intl:c,httpService:i,mapModel:p,vectorSelectionSourceFactory:n,editingService:l,notificationService:d}),m={kind:"ready",appModel:new Nr(p,s,c,g),destroy(){this.appModel.destroy()}};if(a(this,be)){m.destroy();return}a(this,te).value=m,a(this,ve).push(m)};const q=we("local-storage"),Or=0,T={CORRUPTED_DATA:"local-storage:corrupted-data",INVALID_PATH:"local-storage:invalid-path",INVALID_VALUE:"local-storage:invalid-value",NOT_SUPPORTED:"local-storage:not-supported",INTERNAL:"local-storage:internal-error"};var oe,L,z,ie,A,y,Nt,Vt,de,K,Ot;class zr{constructor(e){u(this,y);u(this,oe);u(this,L,{});u(this,z);u(this,ie);u(this,A);h(this,oe,Hr(e.properties)),h(this,z,Ur()),a(this,z)&&(x(this,y,Vt).call(this),h(this,ie,x(this,y,Ot).call(this)))}destroy(){a(this,A)&&(clearTimeout(a(this,A)),h(this,A,void 0)),a(this,z)&&x(this,y,de).call(this)}get isSupported(){return!!a(this,ie)}get(e){return x(this,y,K).call(this).get(e)}set(e,t){return x(this,y,K).call(this).set(e,t)}remove(e){return x(this,y,K).call(this).remove(e)}removeAll(){return x(this,y,K).call(this).removeAll()}getNamespace(e){return x(this,y,K).call(this).getNamespace(e)}}oe=new WeakMap,L=new WeakMap,z=new WeakMap,ie=new WeakMap,A=new WeakMap,y=new WeakSet,Nt=function(){a(this,A)&&clearTimeout(a(this,A)),h(this,A,setTimeout(()=>{h(this,A,void 0),x(this,y,de).call(this)},Or))},Vt=function(){try{const e=a(this,z);if(!e)throw new j(T.INTERNAL,"Local storage is not available.");const t=e.getItem(a(this,oe));if(t==null){h(this,L,{}),x(this,y,de).call(this);return}try{const i=JSON.parse(t);if(!ae(i))throw new j(T.CORRUPTED_DATA,"Persisted value should be an object.");h(this,L,i)}catch(i){q.warn("Invalid persisted data, reverting to default.",i),h(this,L,{}),x(this,y,de).call(this)}}catch(e){q.error("Failed to load from local storage",e)}},de=function(){try{const e=a(this,z);if(!e)throw new j(T.INTERNAL,"Local storage is not available.");const t=JSON.stringify(a(this,L));e.setItem(a(this,oe),t)}catch(e){q.error("Failed to save to local storage",e)}},K=function(){const e=a(this,ie);if(!e)throw new j(T.NOT_SUPPORTED,"Local storage is not supported by this browser.");return e},Ot=function(){const e={getByPath:t=>ht(Fr(a(this,L),t)),setByPath:(t,i)=>{if(!Gr(i))throw new j(T.INVALID_VALUE,"The value is not supported by local storage.");if(i=ht(i),t.length===0){if(!ae(i))throw new j(T.INVALID_VALUE,"The root value must be a plain object.");h(this,L,i)}else Br(a(this,L),t,i);x(this,y,Nt).call(this)}};return new Ye([],e)};class Ye{path;access;constructor(e,t){this.path=e,this.access=t}get(e){return this.access.getByPath([...this.path,e])}set(e,t){this.access.setByPath([...this.path,e],t)}remove(e){this.access.setByPath([...this.path,e],void 0)}removeAll(){this.access.setByPath(this.path,{})}getNamespace(e){const t=this.get(e);if(t===void 0)this.set(e,{});else if(!ae(t))throw new j(T.INVALID_PATH,`Cannot use '${e}' as a namespace because it is not associated with an object.`);return new Ye(this.path.concat([e]),this.access)}}const ut="trails-state";function Fr(o,e){let t=o;for(const i of e){if(!ae(t))throw new j(T.INVALID_PATH,`Cannot get nested property '${i}' because the parent is no object.`);t=t[i]}return t}function Br(o,e,t){if(!e.length)throw new j(T.INTERNAL,"Path must not be empty.");let i=o;for(let n=0,l=e.length-1;n"u"){q.warn("Local storage is not supported by this browser.");return}try{const o=globalThis.localStorage;if(!o){q.warn("Local storage is not supported by this browser.");return}return o}catch(o){q.warn("Local storage is not supported by this browser.",o);return}}function ht(o){return o!=null&&(o=JSON.parse(JSON.stringify(o))),o}const Wr={"showcase-app":{name:"showcase-app",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:Ai,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{vectorSourceFactory:{name:"ogc-features.VectorSourceFactory",qualifier:void 0,all:!1}}},AppInitModel:{name:"AppInitModel",clazz:Vr,provides:[{name:"app.AppInitModel",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1},mapRegistry:{name:"map.MapRegistry",qualifier:void 0,all:!1},notifier:{name:"notifier.NotificationService",qualifier:void 0,all:!1},vectorSelectionSourceFactory:{name:"selection.VectorSelectionSourceFactory",qualifier:void 0,all:!1},editingService:{name:"editing.EditingService",qualifier:void 0,all:!1},notificationService:{name:"notifier.NotificationService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"app.AppInitModel",qualifier:void 0,all:!1},{name:"runtime.ApplicationContext",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:Lo,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/notifier":{name:"@open-pioneer/notifier",services:{NotificationServiceImpl:{name:"NotificationServiceImpl",clazz:mi,provides:[{name:"notifier.NotificationService",qualifier:"notifier.NotificationService"}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/reactivity":{name:"@open-pioneer/reactivity",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:Ao,provides:[{name:"map.MapRegistry",qualifier:void 0}],references:{providers:{name:"map.MapConfigProvider",qualifier:void 0,all:!0},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/ogc-features":{name:"@open-pioneer/ogc-features",services:{VectorSourceFactory:{name:"VectorSourceFactory",clazz:si,provides:[{name:"ogc-features.VectorSourceFactory",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}},SearchSourceFactory:{name:"SearchSourceFactory",clazz:ai,provides:[{name:"ogc-features.SearchSourceFactory",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[]},properties:{}},"@open-pioneer/coordinate-viewer":{name:"@open-pioneer/coordinate-viewer",services:{},ui:{references:[]},properties:{}},"@open-pioneer/overview-map":{name:"@open-pioneer/overview-map",services:{},ui:{references:[]},properties:{}},"@open-pioneer/scale-bar":{name:"@open-pioneer/scale-bar",services:{},ui:{references:[]},properties:{}},"@open-pioneer/scale-viewer":{name:"@open-pioneer/scale-viewer",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map-navigation":{name:"@open-pioneer/map-navigation",services:{},ui:{references:[]},properties:{}},"@open-pioneer/toc":{name:"@open-pioneer/toc",services:{},ui:{references:[]},properties:{}},"@open-pioneer/result-list":{name:"@open-pioneer/result-list",services:{},ui:{references:[]},properties:{}},"@open-pioneer/editing":{name:"@open-pioneer/editing",services:{EditingServiceImpl:{name:"EditingServiceImpl",clazz:$o,provides:[{name:"editing.EditingService",qualifier:void 0}],references:{mapRegistry:{name:"map.MapRegistry",qualifier:void 0,all:!1},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[]},properties:{polygonStyle:{value:{"fill-color":"rgba(255,255,255,0.4)","stroke-color":"red","stroke-width":1.25,"circle-radius":3,"circle-fill-color":"red","circle-stroke-width":1.25,"circle-stroke-color":"red"},required:!1},vertexStyle:{value:{"circle-radius":3,"circle-fill-color":"red","circle-stroke-width":1.25,"circle-stroke-color":"red"},required:!1}}},"@open-pioneer/geolocation":{name:"@open-pioneer/geolocation",services:{},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/legend":{name:"@open-pioneer/legend",services:{},ui:{references:[]},properties:{}},"@open-pioneer/measurement":{name:"@open-pioneer/measurement",services:{},ui:{references:[]},properties:{}},"@open-pioneer/printing":{name:"@open-pioneer/printing",services:{PrintingServiceImpl:{name:"PrintingServiceImpl",clazz:gi,provides:[{name:"printing.PrintingService",qualifier:void 0}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1},{name:"printing.PrintingService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/scale-setter":{name:"@open-pioneer/scale-setter",services:{},ui:{references:[]},properties:{}},"@open-pioneer/search":{name:"@open-pioneer/search",services:{},ui:{references:[]},properties:{}},"@open-pioneer/selection":{name:"@open-pioneer/selection",services:{VectorSelectionSourceFactory:{name:"VectorSelectionSourceFactory",clazz:Ko,provides:[{name:"selection.VectorSelectionSourceFactory",qualifier:void 0}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/spatial-bookmarks":{name:"@open-pioneer/spatial-bookmarks",services:{},ui:{references:[{name:"local-storage.LocalStorageService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map-ui-components":{name:"@open-pioneer/map-ui-components",services:{},ui:{references:[]},properties:{}},"@open-pioneer/basemap-switcher":{name:"@open-pioneer/basemap-switcher",services:{},ui:{references:[]},properties:{}},"@open-pioneer/local-storage":{name:"@open-pioneer/local-storage",services:{LocalStorageServiceImpl:{name:"LocalStorageServiceImpl",clazz:zr,provides:[{name:"local-storage.LocalStorageService",qualifier:"local-storage.LocalStorageService"}],references:{}}},ui:{references:[]},properties:{storageId:{value:null,required:!1}}}},qr=':root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.map-container .ol-viewport .ol-attribution{bottom:var(--map-padding-bottom);right:var(--map-padding-right)}.editing-tooltip{position:relative;background:#fffc;border-radius:4px;color:#000;padding:4px 8px;opacity:1;white-space:nowrap;font-size:12px;cursor:default;-webkit-user-select:none;user-select:none;font-weight:700}.editing-tooltip-hidden{visibility:hidden}.measurement-tooltip{position:relative;background:#fffc;border-radius:4px;color:#000;padding:4px 8px;opacity:1;white-space:nowrap;font-size:12px;cursor:default;-webkit-user-select:none;user-select:none;font-weight:700}.measurement-active-tooltip{background:#000000e6;border-radius:4px;border-color:#000000e6;opacity:.9;color:#fff}.measurement-finished-tooltip{background-color:#4cb3ffe6;color:#000;border:1px solid white}.measurement-active-tooltip:before,.measurement-finished-tooltip:before{border-top:6px solid rgba(0,0,0,.9);border-right:6px solid transparent;border-left:6px solid transparent;content:"";position:absolute;bottom:-6px;margin-left:-7px;left:50%}.measurement-finished-tooltip:before{border-top-color:#4cb3ff}.printing-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:10000;-webkit-user-select:none;user-select:none;pointer-events:all;cursor:wait;display:flex;flex-direction:row;align-items:center;justify-content:center;background-color:#b4b4b4cc}.printing-overlay-status{flex:1 1 auto;font-size:1.5em;text-align:center}.printing-scale-bar.ol-scale-bar{left:var(--printing-scale-bar-left);bottom:var(--printing-scale-bar-bottom)}.search-component .chakra-divider{display:none}.search-component .search-highlighted-match{font-weight:700}.search-component .search-value-container{cursor:text;padding-left:30px!important}.search-component .search-invisible{display:none}.selection-drag-box{background-color:#ffffff4d!important;border:3px solid var(--chakra-colors-background_primary)!important}.selection-tooltip{position:relative;background:#fffc;border-radius:4px;color:#000;padding:4px 8px;opacity:1;white-space:nowrap;font-size:12px;cursor:default;-webkit-user-select:none;user-select:none;font-weight:700}.selection .react-select{cursor:default}.map-container .selection-active{cursor:crosshair}.map-container .selection-inactive{cursor:no-drop}.selection-source-value.selection-source-value--disabled{opacity:.4}.selection-source-value.selection-source-value--disabled span{margin:0 6px 0 0}.map-anchor.main-map-anchor{overflow-x:hidden;overflow-y:auto}.map-container:focus-visible{outline:none}.map-container:focus-visible:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;border:3px solid var(--chakra-colors-trails-500)}@media screen and (max-width: 48em){.map-anchor.main-map-anchor{max-height:45%}}.overview-map .ol-overviewmap{position:relative;height:100%;width:100%}.overview-map .ol-overviewmap:not(.ol-collapsed){border:1px solid black}.overview-map .ol-overviewmap .ol-overviewmap-map{border:none;width:100%;height:100%}.overview-map .ol-overviewmap .ol-overviewmap-box{border:2px solid red}.scale-bar .ol-scale-bar{margin-bottom:8px;margin-right:8px}.scale-bar .ol-scale-bar,.scale-bar .ol-scale-line{position:relative;bottom:0;left:0;background:none}.scale-bar .ol-scale-bar .ol-scale-bar-inner,.scale-bar .ol-scale-bar .ol-scale-line-inner,.scale-bar .ol-scale-line .ol-scale-bar-inner,.scale-bar .ol-scale-line .ol-scale-line-inner{color:var(--chakra-white);border-color:var(--chakra-white)}.result-list-no-data-message{text-align:center;margin-top:50px;font-weight:700;font-size:larger}.result-list-table th,.result-list-table td{overflow-wrap:break-word}.result-list-table.result-list-table--is-resizing *{cursor:col-resize}.result-list-table thead{position:sticky;top:0;z-index:1;background:var(--chakra-colors-background_body)}.result-list-table th{position:relative;border-right-width:thin}.result-list-table tbody tr:hover{background:var(--chakra-colors-background_light)}.result-list-table .result-list-resizer{position:absolute;top:0;height:100%;right:0;width:8px;background:var(--chakra-colors-trails-100);transform:scaleX(.25);cursor:col-resize;-webkit-user-select:none;user-select:none;touch-action:none;padding-left:0}.result-list-table th:last-child .result-list-resizer{width:8px;transform:translate(50%) scaleX(.25)}.result-list-table th .result-list-resizer.result-list-resizer--is-resizing{background:var(--chakra-colors-trails-500);transform:scale(1)}.result-list-table th .result-list-resizer:hover{transform:scale(1)}',$r=["en","de"];function Kr(o){switch(o){case"en":return st(()=>import("./DEc3M1w42gc3.js"),[],import.meta.url).then(e=>e.default);case"de":return st(()=>import("./BaIyqT_8vxnW.js"),[],import.meta.url).then(e=>e.default)}throw new Error(`Unsupported locale: '${o}'`)}const Yr=Wt(qr),Zr=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:Kr,locales:$r,packages:Wr,styles:Yr},Symbol.toStringTag,{value:"Module"}));function zt({label:o,children:e}){return r.jsxs(fi,{as:vi,maxWidth:{base:"none",md:"20em"},width:{base:"100%",sm:"47%",md:void 0},children:[r.jsx(bi,{flexBasis:{base:"8em",sm:"auto"},m:0,children:o}),e]})}const Xr=we("app::DemoSelection");function Jr({appModel:o}){const e=le(),{allDemos:t,currentDemo:i}=$(()=>({allDemos:o.allDemoInfos,currentDemo:o.currentDemo}),[o]),s=b.useMemo(()=>t.map(n=>r.jsx("option",{value:n.id,children:n.title},n.id)),[t]);return r.jsx(zt,{label:e.formatMessage({id:"demoSelection.label"}),children:r.jsx(_t,{value:i.id,onChange:n=>{const l=n.target.value;try{o.selectDemo(l)}catch(c){Xr.error("Failed to select demo",c)}},children:s})})}function Qr(){const o=le(),e=Tt("runtime.ApplicationContext"),t=es(e.getLocale()),i=s=>{switch(s){case"en":e.setLocale("en-GB");break;case"de":e.setLocale("de-DE");break}};return r.jsx(zt,{label:o.formatMessage({id:"localeSwitcher.label"}),children:r.jsxs(_t,{value:t,onChange:s=>i(s.target.value),children:[r.jsx("option",{value:"de",children:o.formatMessage({id:"localeSwitcher.locale.de"})}),r.jsx("option",{value:"en",children:o.formatMessage({id:"localeSwitcher.locale.en"})})]})})}function es(o){const e=o.match(/^[a-z]+/i)?.[0];if(e==="en"||e=="de")return e;throw new Error("unexpected locale prefix: "+e)}function ts({appModel:o}){const e=le();return r.jsxs(F,{as:"header",px:2,py:3,flexWrap:{base:"wrap",md:"nowrap"},alignItems:"baseline",gap:2,boxShadow:"1px 0px 3px rgba(0, 0, 0, 0.5)",bgColor:"white",zIndex:100,children:[r.jsx(Ge,{size:"md",flexShrink:0,flexGrow:1,textAlign:{base:"center",md:"left"},width:{base:"100%",md:"auto"},mb:{base:2,md:0},children:e.formatMessage({id:"header.title"})}),r.jsx(Jr,{appModel:o}),r.jsx(Qr,{})]})}function os(){const o=Tt("app.AppInitModel"),e=$(()=>o.appState,[o]);let t;switch(e.kind){case"loading":t="Loading...";break;case"error":t="Error: "+e.message;break;case"ready":t=r.jsx(is,{state:e})}return t}function is(o){const e=le(),t=o.state.appModel,{currentDemo:i,currentDemoModel:s}=$(()=>({currentDemo:t.currentDemo,currentDemoModel:t.currentDemoModel}),[t]),n=$(()=>s.listContainer,[s]),l=b.useMemo(()=>({left:0,right:0,bottom:n!=null?400:0,top:0}),[n]);return r.jsxs(r.Fragment,{children:[r.jsx(Yo,{position:"top-right"}),r.jsx(F,{height:"100%",direction:"column",children:r.jsx(Se,{title:r.jsx(ts,{appModel:t}),children:r.jsx(F,{flex:"1",direction:"column",position:"relative",children:r.jsx(jo,{mapId:De,children:r.jsxs(To,{viewPadding:l,role:"main","aria-label":e.formatMessage({id:"ariaLabels.map"}),children:[r.jsx(rt,{className:"main-map-anchor",position:"top-left",horizontalGap:10,verticalGap:10,children:r.jsx(R,{bgColor:"white",borderRadius:10,p:2,maxW:"500px",children:r.jsxs(Se,{title:i.title,sectionHeadingProps:{size:"lg"},children:[r.jsx(Re,{py:4,dangerouslySetInnerHTML:{__html:s.description}}),s.mainWidget]})})}),r.jsx(rt,{position:"bottom-right",horizontalGap:6,children:r.jsx(He,{p:1,children:s.tools})}),n&&r.jsx(R,{className:"list-container",position:"absolute",bottom:"0",backgroundColor:"white",width:"100%",height:"400px",zIndex:1,borderTop:"2px solid",borderColor:"trails.100",children:n})]})})})})})]})}const rs=new URLSearchParams(window.location.search),ss=rs.get("lang")||void 0,as=qt({component:os,appMetadata:Zr,config:{properties:{"@open-pioneer/local-storage":{storageId:"ol-showcase-state"}},locale:ss}});customElements.define("showcase-app",as); diff --git a/openlayers-base-packages/pr-previews/pr-371/assets/CuGvFDdWxbib.js b/openlayers-base-packages/pr-previews/pr-371/assets/CuGvFDdWxbib.js deleted file mode 100644 index c2338c5..0000000 --- a/openlayers-base-packages/pr-previews/pr-371/assets/CuGvFDdWxbib.js +++ /dev/null @@ -1 +0,0 @@ -var w=e=>{throw TypeError(e)};var x=(e,t,o)=>t.has(e)||w("Cannot "+o);var s=(e,t,o)=>(x(e,t,"read from private field"),o?o.call(e):t.get(e)),m=(e,t,o)=>t.has(e)?w("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,o),c=(e,t,o,r)=>(x(e,t,"write to private field"),r?r.call(e,o):t.set(e,o),o);import{a as j,r as y,j as n,e as R}from"./Bh0CuZ3gy5tC.js";import{bV as T,bW as A,ay as G,S as p,T as I,O as E,bT as O,bU as W,b as M,a as P,M as q,H as B,u as H,k as g,g as k,B as b,h as S,l as N,m as h}from"./CncSlnPsjr9P.js";import{W as D,b as U}from"./A1UaLFN2YVoc.js";import{G as C,e as V,T as F}from"./TnHTIdi4bAVU.js";import{_}from"./CmsKOCeNyeyo.js";import{V as K,T as z}from"./Tz2xttM4F6S2.js";import"./CL_VRsbiqLzM.js";import"./JZ5RcWTlF_6Y.js";import"./DsXJQLY20iHp.js";import"./BTEHqhSAUrUR.js";import"./Cq1ZpfgEg4XJ.js";import"./BO_q12Vdyug-.js";import"./DUys4rac0YQP.js";import"./CjjyePfBQlZ7.js";import"./2d5-QpxJNHTD.js";import"./BeFcF3Ti4kY-.js";var l,u;class ${constructor(t,o){m(this,l);m(this,u);const r=[];for(const a of t)if(a instanceof T)r.push(a),a.__attachToGroup(o);else throw new Error(`layer '${a.id}' of group '${o.id}' does not implement abstract class '${A.name}`);c(this,l,r),c(this,u,o)}getLayers(t){return s(this,l).map(o=>o)}__getRawLayers(){return s(this,l)}destroy(){for(const t of s(this,l))t.__detachFromGroup(),t.destroy();c(this,l,[])}getParent(){return s(this,u)}}l=new WeakMap,u=new WeakMap;var d;class J extends T{constructor(o){const r=o.layers,a=new G({layers:r.map(i=>i.olLayer)});super({...o,olLayer:a});m(this,d);c(this,d,new $(r,this))}get type(){return"group"}get legend(){}get layers(){return s(this,d)}get sublayers(){}get olLayer(){return super.olLayer}__attach(o){super.__attach(o),this.layers.__getRawLayers().forEach(r=>r.__attach(o))}}d=new WeakMap;const L=J,f="main";class Y{mapId=f;async getMapConfig(){return{initialView:{kind:"position",center:{x:404747,y:5757920},zoom:14},projection:"EPSG:25832",layers:[new p({id:"topplus_open",title:"TopPlus Open",isBaseLayer:!0,visible:!0,healthCheck:"https://sgx.geodatenzentrum.de/wmts_topplus_openERROR/1.0.0/WMTSCapabilities.xml",olLayer:v("web")}),new p({id:"topplus_open_grau",title:"TopPlus Open (Grau)",isBaseLayer:!0,visible:!1,healthCheck:async()=>{function t(o){return new Promise(r=>setTimeout(r,o))}return await t(2e3),"error"},olLayer:v("web_grau")}),new p({id:"topplus_open_light",title:"TopPlus Open (Light)",isBaseLayer:!0,visible:!1,healthCheck:"https://sgx.geodatenzentrum.de/wmts_topplus_open/1.0.0/WMTSCapabilities.xml",olLayer:v("web_light")}),new p({title:"OSM",visible:!1,isBaseLayer:!0,olLayer:new I({source:new E})}),new L({id:"group_edu",title:"Bildung",layers:[new p({title:"Kindertagesstätten",id:"kitas",visible:!0,healthCheck:"https://sgx.geodatenzentrum.de/wmts_topplus_open/1.0.0/WMTSCapabilities.xml",olLayer:Q()}),X()]}),new L({title:"Verkehr",id:"group_transport",layers:[new p({title:"Haltestellen Stadt Rostock",id:"bustops",visible:!0,description:"Haltestellen des öffentlichen Personenverkehrs in der Hanse- und Universitätsstadt Rostock.",olLayer:Z()}),ee()]})]}}}function v(e){const t=[-380316598427299e-8,880590808284866e-8],o=[4891.96981025128,2445.98490512564,1222.99245256282,611.49622628141,305.748113140705,152.874056570353,76.4370282851763,38.2185141425881,19.1092570712941,9.55462853564703,4.77731426782352,2.38865713391176,1.19432856695588,.59716428347794],r=new Array(o.length);for(let i=0;iDatenquellen`});return new I({source:a})}function Z(){const e=new M({url:"https://geo.sv.rostock.de/download/opendata/haltestellen/haltestellen.json",format:new C,attributions:"Haltestellen Stadt Rostock, Creative Commons CC Zero License (cc-zero)"});return new P({source:e})}function Q(){const e=new M({url:"https://ogc-api.nrw.de/inspire-us-kindergarten/v1/collections/governmentalservice/items?f=json&limit=10000",format:new C,attributions:'© Bundesamt für Kartographie und Geodäsie 2017, Datenquellen'});return new P({source:e})}function X(){return new D({title:"Schulstandorte",id:"schools",description:"Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.",visible:!0,healthCheck:async()=>{function e(t){return new Promise(o=>setTimeout(o,t))}return await e(3e3),"error"},url:"https://www.wms.nrw.de/wms/wms_nw_inspire-schulen",sublayers:[{name:"US.education",title:"INSPIRE - WMS Schulstandorte NRW"}],sourceOptions:{ratio:1}})}function ee(){return new D({title:"Straßennetz Landesbetrieb Straßenbau NRW",url:"https://www.wms.nrw.de/wms/strassen_nrw_wms",sublayers:[{name:"1",title:"Verwaltungen"},{name:"4",title:"Abschnitte und Äste"},{name:"6",title:"Unfälle"}]})}const oe={"toc-map":{name:"toc-map",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:Y,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:q,provides:[{name:"map.MapRegistry",qualifier:void 0}],references:{providers:{name:"map.MapConfigProvider",qualifier:void 0,all:!0},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/map-ui-components":{name:"@open-pioneer/map-ui-components",services:{},ui:{references:[]},properties:{}},"@open-pioneer/toc":{name:"@open-pioneer/toc",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:B,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}},"@open-pioneer/basemap-switcher":{name:"@open-pioneer/basemap-switcher",services:{},ui:{references:[]},properties:{}},"@open-pioneer/reactivity":{name:"@open-pioneer/reactivity",services:{},ui:{references:[]},properties:{}}},te=':root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.map-container .ol-viewport .ol-attribution{bottom:var(--map-padding-bottom);right:var(--map-padding-right)}',re=["en","de"];function ne(e){switch(e){case"en":return _(()=>import("./Clif7aTs2LHR.js"),[],import.meta.url).then(t=>t.default);case"de":return _(()=>import("./Cx-LAL-6-WEp.js"),[],import.meta.url).then(t=>t.default)}throw new Error(`Unsupported locale: '${e}'`)}const ae=j(te),le=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:ne,locales:re,packages:oe,styles:ae},Symbol.toStringTag,{value:"Module"})),ie="toc-map",se=H.bind(void 0,ie);function pe(){const e=se(),t=y.useId(),[o,r]=y.useState(!0);function a(){r(!o)}return n.jsx(g,{height:"100%",direction:"column",overflow:"hidden",children:n.jsx(k,{title:n.jsx(b,{role:"region","aria-label":e.formatMessage({id:"ariaLabel.header"}),textAlign:"center",py:1,children:n.jsx(S,{size:"md",children:"OpenLayers Base Packages - TOC and Health Check Sample"})}),children:n.jsx(g,{flex:"1",direction:"column",children:n.jsxs(N,{mapId:f,role:"main","aria-label":e.formatMessage({id:"ariaLabel.map"}),children:[n.jsx(h,{position:"top-left",horizontalGap:10,verticalGap:10,children:o&&n.jsx(b,{backgroundColor:"white",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",maxWidth:350,children:o&&n.jsx(b,{role:"dialog","aria-labelledby":t,children:n.jsx(k,{title:n.jsx(S,{id:t,size:"md",mb:2,children:e.formatMessage({id:"tocTitle"})}),children:n.jsx(V,{mapId:f,showTools:!0,basemapSwitcherProps:{allowSelectingEmptyBasemap:!0}})})})})}),n.jsx(h,{position:"top-right",horizontalGap:10,verticalGap:10,children:n.jsxs(K,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",maxWidth:"400px",children:[n.jsx(z,{as:"b",children:"Description"}),n.jsxs(z,{children:["This application can be used to test the TOC, including health checks for configured layers. Two base layers (",'"',"TopPlus Open",'"'," and ",'"',"TopPlus Open (Grau)",'"',") and one operational layer (",'"',"Schulstandorte",'"',") will be unavailable and should be marked as such by the UI."]})]})}),n.jsx(h,{position:"bottom-right",horizontalGap:10,verticalGap:45,children:n.jsx(g,{role:"toolbar","aria-label":e.formatMessage({id:"ariaLabel.toolbar"}),direction:"column",gap:1,padding:1,children:n.jsx(F,{label:e.formatMessage({id:"tocTitle"}),icon:n.jsx(U,{}),isActive:o,onClick:a})})})]})})})})}const ce=R({component:pe,appMetadata:le,async resolveConfig(e){const t=e.getAttribute("forced-locale");if(t)return{locale:t}}});customElements.define("toc-map-app",ce);const ue=document.getElementsByTagName("body")[0];de();function de(){const e=window.location.search,o=new URLSearchParams(e).get("lang"),r=document.createElement("toc-map-app");r.classList.add("full-height"),r.classList.add("app"),r.setAttribute("id","test"),o&&r.setAttribute("forced-locale",o),ue.appendChild(r)} diff --git a/openlayers-base-packages/pr-previews/pr-371/assets/Cc6J-fLMy29d.js b/openlayers-base-packages/pr-previews/pr-371/assets/CviiDeIRsDvc.js similarity index 91% rename from openlayers-base-packages/pr-previews/pr-371/assets/Cc6J-fLMy29d.js rename to openlayers-base-packages/pr-previews/pr-371/assets/CviiDeIRsDvc.js index b80e699..0bc95f0 100644 --- a/openlayers-base-packages/pr-previews/pr-371/assets/Cc6J-fLMy29d.js +++ b/openlayers-base-packages/pr-previews/pr-371/assets/CviiDeIRsDvc.js @@ -1 +1 @@ -import{j as o,f as I,a as O,r as v,B as t,e as W}from"./Bh0CuZ3gy5tC.js";import{S as F,T as G,O as U,M as T,H as B,c as i,aG as f,aC as l,F as w,i as N,as as h,ar as m,k,g as Q,B as y,h as E,l as V,m as A}from"./CncSlnPsjr9P.js";import{L as z}from"./DsXJQLY20iHp.js";import{T as u,S as C,V as K,U as q,a}from"./Tz2xttM4F6S2.js";import{H as d}from"./L25RkWOQSN8A.js";import{C as Y}from"./2d5-QpxJNHTD.js";import"./BO_q12Vdyug-.js";var M=r=>o.jsx(I.div,{className:"chakra-stack__divider",...r,__css:{...r.__css,borderWidth:0,alignSelf:"stretch",borderColor:"inherit",width:"auto",height:"auto"}});M.displayName="StackDivider";const b="main";class J{mapId=b;async getMapConfig(){return{initialView:{kind:"position",center:{x:404747,y:5757920},zoom:14},layers:[new F({title:"OSM",isBaseLayer:!0,olLayer:new G({source:new U})})]}}}const X={"highlight-and-zoom-app":{name:"highlight-and-zoom-app",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:J,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{}}},ui:{references:[]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:T,provides:[{name:"map.MapRegistry",qualifier:void 0}],references:{providers:{name:"map.MapConfigProvider",qualifier:void 0,all:!0},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:B,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}}},_=':root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.map-container .ol-viewport .ol-attribution{bottom:var(--map-padding-bottom);right:var(--map-padding-right)}',$=[];function oo(r){throw new Error(`Unsupported locale: '${r}'`)}const eo=O(_),ro=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:oo,locales:$,packages:X,styles:eo},Symbol.toStringTag,{value:"Module"})),j="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAuCAYAAABXuSs3AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAM6SURBVGhD7Zn7TtRAFMZn2l2MRuWuBg2aGEX/MMLCC5iUx/UJ6CNw0WiiRBFBJaLAilyMbNvxO8tpgkDbM9MxarK/ZNPvdJfpt6dnznQW1aOHDM1Hb1x9PrvYSEx/YNQlijOtDpOG3v3+eK7V/YAnvBgfWozeKKPGYbCPT51LMzE/8UXW2634Pp9yppbxgaXZl4ExE0moG3xKRCM1nSzQy98m5x7xKWucjQ8vRO87DX2bQydwB9a2p+M7HFrhZHxkPto8auprHNair2O+bs3E1mMFfBSDTH/wZZrAWKMYc41DMVbGBxejZZTHLQ69gTHHB5eiVxyKsDKOCXWPpXeM1hMsRYiN02Q02n/fz0Gb1HQNDisRG88CZVUiYWYyenEoAubF1xBlkFZDHKaOo3KaHbOxPRPf5LDL8Hz0qdPUYxyWghVW5EmUcZgZZVkKlvp3p00TdI56NoelDC1EqyxLERlHCgZYFoLVMNmZju9yeAZaaMLUpBwWgmecIZaliIwblCzLQoJMHbIsJMzUD5aFSK5FiCengA4fyzjiYxn+ahwjVZpCq7zMshB0jcrP4FoJy1KkGa+8xVj9LrAspOqxl0CpHLAsRWQczxMbLEtBRygsBTyzS8pEoW1+ZlmKqJ4I9HIkQwae+DbTULUhdZiqAXzx68fvVOO1jxO0e2FZCRlNA/0Arwkb01gvKksyR2wck+8jyz9GFqp1lpWIS4WwKRcXpGVCiDNOoHb3WHoHY++wFGFlHPW6wtI72L4NsxRhZRy3cgqZ2efQGxhzi6UYqxrP8V3rNrWdY5XxHGToC8vaoM2KO8lJnDJO9D+bzepu5fCYm7RbcZNDK5wyTgSZecvSmTTUL1haUytj2JId4tniIodWUPuz7SQnqWWccJmo2iizOznnfLeJWn9M0D6TpRhtjNWPP+dRO+PEyHy0h8WpcpNAoEQ2USI3OHTGi3FCUjLdDbVjFzlN7VLJCTPzmmUhT1ux00Q+D2/G21PxQyoDDs+AubDyRLiflOCtVHLQIg/QIrv//8nBF3L6DbwM78aJwaUowe6n+/sITO/D9JXuG/8DNFmxeRZv9/4ZNsbGfiuXHj3+Ckr9AhPaF/aBpAV7AAAAAElFTkSuQmCC";function io(){const{map:r}=N(b),n=v.useRef(new Map),[S,R]=v.useState(!1),H=[new h([852011.307424,6788511322702e-6]),new h([829800.379064,6809086916672e-6])],P=[new z([[851890.680238,6788133616293e-6],[851298.293269,6790235634571e-6],[853419.420804,6790407617885e-6]]),new z([[848107.047338,6790579601198e-6],[849081.619449,6793197569417e-6]])],L=[new m([[[851728.251553,6788384425292e-6],[851518.049725,6788651954891e-6],[852182.096409,6788881265976e-6],[851728.251553,6788384425292e-6]]]),new m([[[845183.331006,6794496998898e-6],[850132.628588,6794764528497e-6],[850629.469272,6791707047365e-6],[844399.851466,6791229315939e-6],[845183.331006,6794496998898e-6]]])],D=[new h([852011.307424,6788511322702e-6]),new m([[[845183.331006,6794496998898e-6],[850132.628588,6794764528497e-6],[850629.469272,6791707047365e-6],[844399.851466,6791229315939e-6],[845183.331006,6794496998898e-6]]])];function c(e,x,g){if(e&&!n.current.has(g))if(S){const s=e.highlightAndZoom(x,{highlightStyle:to});s&&n.current.set(g,s)}else{const s=e.highlightAndZoom(x,{});s&&n.current.set(g,s)}}function p(e){n.current.has(e)&&(n.current.get(e)?.destroy(),n.current.delete(e))}function Z(e){e&&(e.removeHighlights(),n.current=new Map)}return o.jsx(k,{height:"100%",direction:"column",overflow:"hidden",children:o.jsx(Q,{title:o.jsx(y,{textAlign:"center",py:1,children:o.jsx(E,{size:"md",children:"OpenLayers Base Packages - Highlight and Zoom"})}),children:o.jsx(k,{flex:"1",direction:"column",position:"relative",children:o.jsxs(V,{mapId:b,children:[o.jsx(A,{position:"top-left",horizontalGap:10,verticalGap:10,children:o.jsxs(y,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",children:[o.jsx(u,{align:"center",children:"Test Controls:"}),o.jsx(C,{align:"center",divider:o.jsx(M,{borderColor:"gray.200"}),pt:5,children:o.jsx(Y,{onChange:e=>{R(e.target.checked)},children:"Own Style"})}),o.jsxs(C,{pt:5,children:[o.jsxs(d,{align:"center",children:[o.jsx(t,{width:105,onClick:()=>c(r,H,"point"),children:"Points"}),o.jsx(t,{onClick:()=>p("point"),children:"Remove"})]}),o.jsxs(d,{children:[o.jsx(t,{width:105,onClick:()=>c(r,P,"line"),children:"LineString"}),o.jsx(t,{onClick:()=>p("line"),children:"Remove"})]}),o.jsxs(d,{children:[o.jsx(t,{width:105,onClick:()=>c(r,L,"polygon"),children:"Polygons"}),o.jsx(t,{onClick:()=>p("polygon"),children:"Remove"})]}),o.jsxs(d,{children:[o.jsx(t,{width:105,onClick:()=>c(r,D,"mix"),children:"Mixed"}),o.jsx(t,{onClick:()=>p("mix"),children:"Remove"})]}),o.jsx(t,{onClick:()=>Z(r),children:"Reset All"})]})]})}),o.jsx(A,{position:"top-right",horizontalGap:10,verticalGap:10,children:o.jsxs(K,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",maxWidth:"400px",children:[o.jsx(u,{as:"b",children:"Description"}),o.jsx(u,{children:"This application can be used to test adding highlight or marker, zoom to their extent, and removing highlight and marker. The highlight and zoom for point, line string and polygon geometries in two different styles can be tested."}),o.jsxs(q,{children:[o.jsxs(a,{children:["Clicking on ","'Points'"," adds markers for point geometries."]}),o.jsxs(a,{children:["Clicking on ","'LineString'"," adds highlight for linestring geometries."]}),o.jsxs(a,{children:["Clicking on ","'Polygon'"," adds highlight for polygon geometries."]}),o.jsxs(a,{children:["Clicking on ","'Mixed'"," adds highlight for geometries of different types."]}),o.jsxs(a,{children:["Clicking on ","'Remove'"," will remove the marker or highlight added by the button on the left."]}),o.jsxs(a,{children:["Clicking on ","'Reset All'"," removes all highlights and markers from the map."]}),o.jsxs(a,{children:["Clicking on ","'Own Style'"," activates highlighting with customstyle."]})]})]})})]})})})})}const to={Point:new i({image:new f({anchor:[.5,1],src:j})}),MultiPoint:new i({image:new f({anchor:[.5,1],src:j})}),LineString:[new i({stroke:new l({color:"#ff0000",width:5})}),new i({stroke:new l({color:"#ff0000",width:3})})],MultiLineString:[new i({stroke:new l({color:"#ff0000",width:5})}),new i({stroke:new l({color:"#ff0000",width:3})})],Polygon:[new i({stroke:new l({color:"#ff0000",width:5})}),new i({stroke:new l({color:"#ff0000",width:3}),fill:new w({color:"rgba(51, 171, 71,0.35)"})})],MultiPolygon:[new i({stroke:new l({color:"#ff0000",width:5})}),new i({stroke:new l({color:"#ff0000",width:3}),fill:new w({color:"rgba(51, 171, 71,0.35)"})})]},lo=W({component:io,appMetadata:ro});customElements.define("highlight-and-zoom-app",lo); +import{j as o,f as I,a as O,r as v,B as t,e as W}from"./Bh0CuZ3gy5tC.js";import{S as F,T as G,O as U,M as T,H as B,c as i,aG as f,aC as l,F as w,i as N,as as h,ar as m,k,g as Q,B as y,h as E,l as V,m as A}from"./p-jlpmJ86TPh.js";import{L as z}from"./BWsYSh9PkSaL.js";import{T as u,S as C,V as K,U as q,a}from"./Tz2xttM4F6S2.js";import{H as d}from"./L25RkWOQSN8A.js";import{C as Y}from"./2d5-QpxJNHTD.js";import"./BO_q12Vdyug-.js";var M=r=>o.jsx(I.div,{className:"chakra-stack__divider",...r,__css:{...r.__css,borderWidth:0,alignSelf:"stretch",borderColor:"inherit",width:"auto",height:"auto"}});M.displayName="StackDivider";const b="main";class J{mapId=b;async getMapConfig(){return{initialView:{kind:"position",center:{x:404747,y:5757920},zoom:14},layers:[new F({title:"OSM",isBaseLayer:!0,olLayer:new G({source:new U})})]}}}const X={"highlight-and-zoom-app":{name:"highlight-and-zoom-app",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:J,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{}}},ui:{references:[]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:T,provides:[{name:"map.MapRegistry",qualifier:void 0}],references:{providers:{name:"map.MapConfigProvider",qualifier:void 0,all:!0},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:B,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}}},_=':root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.map-container .ol-viewport .ol-attribution{bottom:var(--map-padding-bottom);right:var(--map-padding-right)}',$=[];function oo(r){throw new Error(`Unsupported locale: '${r}'`)}const eo=O(_),ro=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:oo,locales:$,packages:X,styles:eo},Symbol.toStringTag,{value:"Module"})),j="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAuCAYAAABXuSs3AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAM6SURBVGhD7Zn7TtRAFMZn2l2MRuWuBg2aGEX/MMLCC5iUx/UJ6CNw0WiiRBFBJaLAilyMbNvxO8tpgkDbM9MxarK/ZNPvdJfpt6dnznQW1aOHDM1Hb1x9PrvYSEx/YNQlijOtDpOG3v3+eK7V/YAnvBgfWozeKKPGYbCPT51LMzE/8UXW2634Pp9yppbxgaXZl4ExE0moG3xKRCM1nSzQy98m5x7xKWucjQ8vRO87DX2bQydwB9a2p+M7HFrhZHxkPto8auprHNair2O+bs3E1mMFfBSDTH/wZZrAWKMYc41DMVbGBxejZZTHLQ69gTHHB5eiVxyKsDKOCXWPpXeM1hMsRYiN02Q02n/fz0Gb1HQNDisRG88CZVUiYWYyenEoAubF1xBlkFZDHKaOo3KaHbOxPRPf5LDL8Hz0qdPUYxyWghVW5EmUcZgZZVkKlvp3p00TdI56NoelDC1EqyxLERlHCgZYFoLVMNmZju9yeAZaaMLUpBwWgmecIZaliIwblCzLQoJMHbIsJMzUD5aFSK5FiCengA4fyzjiYxn+ahwjVZpCq7zMshB0jcrP4FoJy1KkGa+8xVj9LrAspOqxl0CpHLAsRWQczxMbLEtBRygsBTyzS8pEoW1+ZlmKqJ4I9HIkQwae+DbTULUhdZiqAXzx68fvVOO1jxO0e2FZCRlNA/0Arwkb01gvKksyR2wck+8jyz9GFqp1lpWIS4WwKRcXpGVCiDNOoHb3WHoHY++wFGFlHPW6wtI72L4NsxRhZRy3cgqZ2efQGxhzi6UYqxrP8V3rNrWdY5XxHGToC8vaoM2KO8lJnDJO9D+bzepu5fCYm7RbcZNDK5wyTgSZecvSmTTUL1haUytj2JId4tniIodWUPuz7SQnqWWccJmo2iizOznnfLeJWn9M0D6TpRhtjNWPP+dRO+PEyHy0h8WpcpNAoEQ2USI3OHTGi3FCUjLdDbVjFzlN7VLJCTPzmmUhT1ux00Q+D2/G21PxQyoDDs+AubDyRLiflOCtVHLQIg/QIrv//8nBF3L6DbwM78aJwaUowe6n+/sITO/D9JXuG/8DNFmxeRZv9/4ZNsbGfiuXHj3+Ckr9AhPaF/aBpAV7AAAAAElFTkSuQmCC";function io(){const{map:r}=N(b),n=v.useRef(new Map),[S,R]=v.useState(!1),H=[new h([852011.307424,6788511322702e-6]),new h([829800.379064,6809086916672e-6])],P=[new z([[851890.680238,6788133616293e-6],[851298.293269,6790235634571e-6],[853419.420804,6790407617885e-6]]),new z([[848107.047338,6790579601198e-6],[849081.619449,6793197569417e-6]])],L=[new m([[[851728.251553,6788384425292e-6],[851518.049725,6788651954891e-6],[852182.096409,6788881265976e-6],[851728.251553,6788384425292e-6]]]),new m([[[845183.331006,6794496998898e-6],[850132.628588,6794764528497e-6],[850629.469272,6791707047365e-6],[844399.851466,6791229315939e-6],[845183.331006,6794496998898e-6]]])],D=[new h([852011.307424,6788511322702e-6]),new m([[[845183.331006,6794496998898e-6],[850132.628588,6794764528497e-6],[850629.469272,6791707047365e-6],[844399.851466,6791229315939e-6],[845183.331006,6794496998898e-6]]])];function c(e,x,g){if(e&&!n.current.has(g))if(S){const s=e.highlightAndZoom(x,{highlightStyle:to});s&&n.current.set(g,s)}else{const s=e.highlightAndZoom(x,{});s&&n.current.set(g,s)}}function p(e){n.current.has(e)&&(n.current.get(e)?.destroy(),n.current.delete(e))}function Z(e){e&&(e.removeHighlights(),n.current=new Map)}return o.jsx(k,{height:"100%",direction:"column",overflow:"hidden",children:o.jsx(Q,{title:o.jsx(y,{textAlign:"center",py:1,children:o.jsx(E,{size:"md",children:"OpenLayers Base Packages - Highlight and Zoom"})}),children:o.jsx(k,{flex:"1",direction:"column",position:"relative",children:o.jsxs(V,{mapId:b,children:[o.jsx(A,{position:"top-left",horizontalGap:10,verticalGap:10,children:o.jsxs(y,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",children:[o.jsx(u,{align:"center",children:"Test Controls:"}),o.jsx(C,{align:"center",divider:o.jsx(M,{borderColor:"gray.200"}),pt:5,children:o.jsx(Y,{onChange:e=>{R(e.target.checked)},children:"Own Style"})}),o.jsxs(C,{pt:5,children:[o.jsxs(d,{align:"center",children:[o.jsx(t,{width:105,onClick:()=>c(r,H,"point"),children:"Points"}),o.jsx(t,{onClick:()=>p("point"),children:"Remove"})]}),o.jsxs(d,{children:[o.jsx(t,{width:105,onClick:()=>c(r,P,"line"),children:"LineString"}),o.jsx(t,{onClick:()=>p("line"),children:"Remove"})]}),o.jsxs(d,{children:[o.jsx(t,{width:105,onClick:()=>c(r,L,"polygon"),children:"Polygons"}),o.jsx(t,{onClick:()=>p("polygon"),children:"Remove"})]}),o.jsxs(d,{children:[o.jsx(t,{width:105,onClick:()=>c(r,D,"mix"),children:"Mixed"}),o.jsx(t,{onClick:()=>p("mix"),children:"Remove"})]}),o.jsx(t,{onClick:()=>Z(r),children:"Reset All"})]})]})}),o.jsx(A,{position:"top-right",horizontalGap:10,verticalGap:10,children:o.jsxs(K,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",maxWidth:"400px",children:[o.jsx(u,{as:"b",children:"Description"}),o.jsx(u,{children:"This application can be used to test adding highlight or marker, zoom to their extent, and removing highlight and marker. The highlight and zoom for point, line string and polygon geometries in two different styles can be tested."}),o.jsxs(q,{children:[o.jsxs(a,{children:["Clicking on ","'Points'"," adds markers for point geometries."]}),o.jsxs(a,{children:["Clicking on ","'LineString'"," adds highlight for linestring geometries."]}),o.jsxs(a,{children:["Clicking on ","'Polygon'"," adds highlight for polygon geometries."]}),o.jsxs(a,{children:["Clicking on ","'Mixed'"," adds highlight for geometries of different types."]}),o.jsxs(a,{children:["Clicking on ","'Remove'"," will remove the marker or highlight added by the button on the left."]}),o.jsxs(a,{children:["Clicking on ","'Reset All'"," removes all highlights and markers from the map."]}),o.jsxs(a,{children:["Clicking on ","'Own Style'"," activates highlighting with customstyle."]})]})]})})]})})})})}const to={Point:new i({image:new f({anchor:[.5,1],src:j})}),MultiPoint:new i({image:new f({anchor:[.5,1],src:j})}),LineString:[new i({stroke:new l({color:"#ff0000",width:5})}),new i({stroke:new l({color:"#ff0000",width:3})})],MultiLineString:[new i({stroke:new l({color:"#ff0000",width:5})}),new i({stroke:new l({color:"#ff0000",width:3})})],Polygon:[new i({stroke:new l({color:"#ff0000",width:5})}),new i({stroke:new l({color:"#ff0000",width:3}),fill:new w({color:"rgba(51, 171, 71,0.35)"})})],MultiPolygon:[new i({stroke:new l({color:"#ff0000",width:5})}),new i({stroke:new l({color:"#ff0000",width:3}),fill:new w({color:"rgba(51, 171, 71,0.35)"})})]},lo=W({component:io,appMetadata:ro});customElements.define("highlight-and-zoom-app",lo); diff --git a/openlayers-base-packages/pr-previews/pr-371/assets/Cm0lgFxqMvMR.js b/openlayers-base-packages/pr-previews/pr-371/assets/D0dVTtrd3drA.js similarity index 93% rename from openlayers-base-packages/pr-previews/pr-371/assets/Cm0lgFxqMvMR.js rename to openlayers-base-packages/pr-previews/pr-371/assets/D0dVTtrd3drA.js index f575ba3..becaf03 100644 --- a/openlayers-base-packages/pr-previews/pr-371/assets/Cm0lgFxqMvMR.js +++ b/openlayers-base-packages/pr-previews/pr-371/assets/D0dVTtrd3drA.js @@ -1 +1 @@ -import{a as v,j as e,r as f,B as d,e as w}from"./Bh0CuZ3gy5tC.js";import{t as y}from"./B99qq3IKf4kH.js";import{bT as k,bU as z,S as h,T as x,O as S,M as j,H as M,u as I,k as m,g as T,B as b,h as L,l as _,m as g,i as u}from"./CncSlnPsjr9P.js";import{_ as B}from"./CmsKOCeNyeyo.js";import{B as C}from"./BTEHqhSAUrUR.js";import{T as p,S as A,V as P,U as E,a as c}from"./Tz2xttM4F6S2.js";import{F}from"./BO_q12Vdyug-.js";import{F as R}from"./CreVQ-qFRzOc.js";import"./Cq1ZpfgEg4XJ.js";import"./DUys4rac0YQP.js";import"./CL_VRsbiqLzM.js";class q extends k{constructor(a){const r=[-380316598427299e-8,880590808284866e-8],i=[4891.96981025128,2445.98490512564,1222.99245256282,611.49622628141,305.748113140705,152.874056570353,76.4370282851763,38.2185141425881,19.1092570712941,9.55462853564703,4.77731426782352,2.38865713391176,1.19432856695588,.59716428347794],n=new Array(i.length);for(let t=0;tDatenquellen`})}}const s="main";class G{mapId=s;async getMapConfig(){return{initialView:{kind:"position",center:{x:404747,y:5757920},zoom:14},layers:[new h({title:"OSM",isBaseLayer:!0,olLayer:new x({source:new S})})]}}}const O={"basemap-switcher-app":{name:"basemap-switcher-app",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:G,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{}}},ui:{references:[]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:j,provides:[{name:"map.MapRegistry",qualifier:void 0}],references:{providers:{name:"map.MapConfigProvider",qualifier:void 0,all:!0},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/theme":{name:"@open-pioneer/theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/basemap-switcher":{name:"@open-pioneer/basemap-switcher",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:M,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}},"@open-pioneer/reactivity":{name:"@open-pioneer/reactivity",services:{},ui:{references:[]},properties:{}}},H=':root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.map-container .ol-viewport .ol-attribution{bottom:var(--map-padding-bottom);right:var(--map-padding-right)}',U=["en"];function D(o){switch(o){case"en":return B(()=>import("./BFyPnFni35WZ.js"),[],import.meta.url).then(a=>a.default)}throw new Error(`Unsupported locale: '${o}'`)}const W=v(H),V=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:D,locales:U,packages:O,styles:W},Symbol.toStringTag,{value:"Module"})),$="basemap-switcher-app",K=I.bind(void 0,$);function N(){const o=K();return e.jsx(m,{height:"100%",direction:"column",overflow:"hidden",children:e.jsx(T,{title:e.jsx(b,{textAlign:"center",py:1,children:e.jsx(L,{size:"md",children:"OpenLayers Base Packages - Basemap Switcher"})}),children:e.jsx(m,{flex:"1",direction:"column",position:"relative",children:e.jsxs(_,{mapId:s,children:[e.jsx(g,{position:"top-left",horizontalGap:10,verticalGap:10,children:e.jsxs(b,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",children:[e.jsxs(F,{children:[e.jsx(R,{ps:1,children:e.jsx(p,{as:"b",children:o.formatMessage({id:"basemapLabel"})})}),e.jsx(C,{allowSelectingEmptyBasemap:!0,mapId:s})]}),e.jsxs(A,{pt:5,children:[e.jsx(p,{align:"center",children:"Test Controls:"}),e.jsx(Y,{mapId:s}),e.jsx(J,{mapId:s}),e.jsx(Q,{mapId:s})]})]})}),e.jsx(g,{position:"top-right",horizontalGap:10,verticalGap:10,children:e.jsxs(P,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",maxWidth:"400px",children:[e.jsx(p,{as:"b",children:"Description"}),e.jsx(p,{children:"This application can be used to test the basemap switcher. The basemap switcher synchronizes with the state of the shared map model. If the map model is changed (for example, by changing the current basemap), the basemap switcher must update itself accordingly."}),e.jsxs(E,{children:[e.jsx(c,{children:"Adding a new basemap updates the dropdown menu (new option)"}),e.jsx(c,{children:"Changing the current basemap to another basemap updates the selected option"}),e.jsxs(c,{children:["Setting the current basemap to ","'undefined'"," also updates the selection"]})]})]})})]})})})})}function Y(o){const{mapId:a}=o,{map:r}=u(a),i=f.useRef(1),n=()=>{if(!r)return;const l=i.current++,t=new h({title:`New Layer ${l}`,isBaseLayer:!0,olLayer:new x({source:new q({layer:"web_grau"})})});r.layers.addLayer(t),console.log("generated base layer with id",t.id)};return e.jsx(d,{onClick:n,children:"Add base layer"})}function J(o){const{mapId:a}=o,{map:r}=u(a),i=()=>{if(!r)return;const n=r.layers.getAllLayers();if(n.length===0){console.error("There is no base layer");return}const l=Math.floor(Math.random()*n.length),t=n[l];if(!t){console.error("Failed to find a layer");return}console.log("activating base layer",t.id),r.layers.activateBaseLayer(t.id)};return e.jsx(d,{onClick:i,children:"Activate random base layer"})}function Q(o){const{mapId:a}=o,{map:r}=u(a),i=()=>{r&&(console.log("setting active base layer to undefined"),r.layers.activateBaseLayer(void 0))};return e.jsx(d,{onClick:i,children:"Clear base layer"})}const X=w({component:N,theme:y,appMetadata:V});customElements.define("basemap-switcher-app",X); +import{a as v,j as e,r as f,B as d,e as w}from"./Bh0CuZ3gy5tC.js";import{t as y}from"./B99qq3IKf4kH.js";import{bT as k,bU as z,S as h,T as x,O as S,M as j,H as M,u as I,k as m,g as T,B as b,h as L,l as _,m as g,i as u}from"./p-jlpmJ86TPh.js";import{_ as B}from"./CmsKOCeNyeyo.js";import{B as C}from"./BEc19nv24p4W.js";import{T as p,S as A,V as P,U as E,a as c}from"./Tz2xttM4F6S2.js";import{F}from"./BO_q12Vdyug-.js";import{F as R}from"./CreVQ-qFRzOc.js";import"./Cq1ZpfgEg4XJ.js";import"./DUys4rac0YQP.js";import"./CL_VRsbiqLzM.js";class q extends k{constructor(a){const r=[-380316598427299e-8,880590808284866e-8],i=[4891.96981025128,2445.98490512564,1222.99245256282,611.49622628141,305.748113140705,152.874056570353,76.4370282851763,38.2185141425881,19.1092570712941,9.55462853564703,4.77731426782352,2.38865713391176,1.19432856695588,.59716428347794],n=new Array(i.length);for(let t=0;tDatenquellen`})}}const s="main";class G{mapId=s;async getMapConfig(){return{initialView:{kind:"position",center:{x:404747,y:5757920},zoom:14},layers:[new h({title:"OSM",isBaseLayer:!0,olLayer:new x({source:new S})})]}}}const O={"basemap-switcher-app":{name:"basemap-switcher-app",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:G,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{}}},ui:{references:[]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:j,provides:[{name:"map.MapRegistry",qualifier:void 0}],references:{providers:{name:"map.MapConfigProvider",qualifier:void 0,all:!0},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/theme":{name:"@open-pioneer/theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/basemap-switcher":{name:"@open-pioneer/basemap-switcher",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:M,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/reactivity":{name:"@open-pioneer/reactivity",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}}},H=':root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.map-container .ol-viewport .ol-attribution{bottom:var(--map-padding-bottom);right:var(--map-padding-right)}',U=["en"];function D(o){switch(o){case"en":return B(()=>import("./BFyPnFni35WZ.js"),[],import.meta.url).then(a=>a.default)}throw new Error(`Unsupported locale: '${o}'`)}const W=v(H),V=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:D,locales:U,packages:O,styles:W},Symbol.toStringTag,{value:"Module"})),$="basemap-switcher-app",K=I.bind(void 0,$);function N(){const o=K();return e.jsx(m,{height:"100%",direction:"column",overflow:"hidden",children:e.jsx(T,{title:e.jsx(b,{textAlign:"center",py:1,children:e.jsx(L,{size:"md",children:"OpenLayers Base Packages - Basemap Switcher"})}),children:e.jsx(m,{flex:"1",direction:"column",position:"relative",children:e.jsxs(_,{mapId:s,children:[e.jsx(g,{position:"top-left",horizontalGap:10,verticalGap:10,children:e.jsxs(b,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",children:[e.jsxs(F,{children:[e.jsx(R,{ps:1,children:e.jsx(p,{as:"b",children:o.formatMessage({id:"basemapLabel"})})}),e.jsx(C,{allowSelectingEmptyBasemap:!0,mapId:s})]}),e.jsxs(A,{pt:5,children:[e.jsx(p,{align:"center",children:"Test Controls:"}),e.jsx(Y,{mapId:s}),e.jsx(J,{mapId:s}),e.jsx(Q,{mapId:s})]})]})}),e.jsx(g,{position:"top-right",horizontalGap:10,verticalGap:10,children:e.jsxs(P,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",maxWidth:"400px",children:[e.jsx(p,{as:"b",children:"Description"}),e.jsx(p,{children:"This application can be used to test the basemap switcher. The basemap switcher synchronizes with the state of the shared map model. If the map model is changed (for example, by changing the current basemap), the basemap switcher must update itself accordingly."}),e.jsxs(E,{children:[e.jsx(c,{children:"Adding a new basemap updates the dropdown menu (new option)"}),e.jsx(c,{children:"Changing the current basemap to another basemap updates the selected option"}),e.jsxs(c,{children:["Setting the current basemap to ","'undefined'"," also updates the selection"]})]})]})})]})})})})}function Y(o){const{mapId:a}=o,{map:r}=u(a),i=f.useRef(1),n=()=>{if(!r)return;const l=i.current++,t=new h({title:`New Layer ${l}`,isBaseLayer:!0,olLayer:new x({source:new q({layer:"web_grau"})})});r.layers.addLayer(t),console.log("generated base layer with id",t.id)};return e.jsx(d,{onClick:n,children:"Add base layer"})}function J(o){const{mapId:a}=o,{map:r}=u(a),i=()=>{if(!r)return;const n=r.layers.getAllLayers();if(n.length===0){console.error("There is no base layer");return}const l=Math.floor(Math.random()*n.length),t=n[l];if(!t){console.error("Failed to find a layer");return}console.log("activating base layer",t.id),r.layers.activateBaseLayer(t.id)};return e.jsx(d,{onClick:i,children:"Activate random base layer"})}function Q(o){const{mapId:a}=o,{map:r}=u(a),i=()=>{r&&(console.log("setting active base layer to undefined"),r.layers.activateBaseLayer(void 0))};return e.jsx(d,{onClick:i,children:"Clear base layer"})}const X=w({component:N,theme:y,appMetadata:V});customElements.define("basemap-switcher-app",X); diff --git a/openlayers-base-packages/pr-previews/pr-371/assets/Bwz5Rvo1RSBv.js b/openlayers-base-packages/pr-previews/pr-371/assets/D4hWyDE3P_yA.js similarity index 99% rename from openlayers-base-packages/pr-previews/pr-371/assets/Bwz5Rvo1RSBv.js rename to openlayers-base-packages/pr-previews/pr-371/assets/D4hWyDE3P_yA.js index c0e5301..ba02dc8 100644 --- a/openlayers-base-packages/pr-previews/pr-371/assets/Bwz5Rvo1RSBv.js +++ b/openlayers-base-packages/pr-previews/pr-371/assets/D4hWyDE3P_yA.js @@ -1,4 +1,4 @@ -import{r as w,J as it,R as ye,z as De,h as T,j as v,f as V,q as ze,s as D,K as G,Y as ie,o as Ee,p as He,O as rt,t as lt,c as st,x as ut,Z as at,l as gt}from"./Bh0CuZ3gy5tC.js";import{u as dt,b9 as Ge,b2 as ct,i as ft,B as pt}from"./CncSlnPsjr9P.js";import{c as Ae}from"./D03oE8cEQPSj.js";import{u as mt}from"./Cq1ZpfgEg4XJ.js";import{t as St,C as Ct}from"./2d5-QpxJNHTD.js";import{a as ht}from"./BO_q12Vdyug-.js";function Rt(e){return e&&ye(e)&&ye(e.target)}function vt(e={}){const{onChange:o,value:t,defaultValue:n,name:i,isDisabled:r,isFocusable:l,isNative:s,...u}=e,[a,d]=w.useState(n||""),p=typeof t<"u",c=p?t:a,g=w.useRef(null),f=w.useCallback(()=>{const _=g.current;if(!_)return;let F="input:not(:disabled):checked";const z=_.querySelector(F);if(z){z.focus();return}F="input:not(:disabled)";const $=_.querySelector(F);$?.focus()},[]),S=`radio-${w.useId()}`,C=i||S,x=w.useCallback(_=>{const F=Rt(_)?_.target.value:_;p||d(F),o?.(String(F))},[o,p]),P=w.useCallback((_={},F=null)=>({..._,ref:it(F,g),role:"radiogroup"}),[]),y=w.useCallback((_={},F=null)=>({..._,ref:F,name:C,[s?"checked":"isChecked"]:c!=null?_.value===c:void 0,onChange($){x($)},"data-radiogroup":!0}),[s,C,x,c]);return{getRootProps:P,getRadioProps:y,name:C,ref:g,focus:f,setValue:d,value:c,onChange:x,isDisabled:r,isFocusable:l,htmlProps:u}}var[wt,Le]=De({name:"RadioGroupContext",strict:!1}),_t=T((e,o)=>{const{colorScheme:t,size:n,variant:i,children:r,className:l,isDisabled:s,isFocusable:u,...a}=e,{value:d,onChange:p,getRootProps:c,name:g,htmlProps:f}=vt(a),m=w.useMemo(()=>({name:g,size:n,onChange:p,colorScheme:t,value:d,variant:i,isDisabled:s,isFocusable:u}),[g,n,p,t,d,i,s,u]);return v.jsx(wt,{value:m,children:v.jsx(V.div,{...c(f,o),className:ze("chakra-radio-group",l),children:r})})});_t.displayName="RadioGroup";var xt={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"};function Ft(e={}){const{defaultChecked:o,isChecked:t,isFocusable:n,isDisabled:i,isReadOnly:r,isRequired:l,onChange:s,isInvalid:u,name:a,value:d,id:p,"data-radiogroup":c,"aria-describedby":g,...f}=e,m=`radio-${w.useId()}`,S=ht(),x=!!Le()||!!c;let y=!!S&&!x?S.id:m;y=p??y;const _=i??S?.isDisabled,F=r??S?.isReadOnly,z=l??S?.isRequired,$=u??S?.isInvalid,[B,U]=w.useState(!1),[A,Y]=w.useState(!1),[b,Z]=w.useState(!1),[ne,q]=w.useState(!1),[tt,nt]=w.useState(!!o),oe=typeof t<"u",j=oe?t:tt;w.useEffect(()=>St(U),[]);const ve=w.useCallback(M=>{if(F||_){M.preventDefault();return}oe||nt(M.target.checked),s?.(M)},[oe,_,F,s]),we=w.useCallback(M=>{M.key===" "&&q(!0)},[q]),_e=w.useCallback(M=>{M.key===" "&&q(!1)},[q]),xe=w.useCallback((M={},N=null)=>({...M,ref:N,"data-active":D(ne),"data-hover":D(b),"data-disabled":D(_),"data-invalid":D($),"data-checked":D(j),"data-focus":D(A),"data-focus-visible":D(A&&B),"data-readonly":D(F),"aria-hidden":!0,onMouseDown:G(M.onMouseDown,()=>q(!0)),onMouseUp:G(M.onMouseUp,()=>q(!1)),onMouseEnter:G(M.onMouseEnter,()=>Z(!0)),onMouseLeave:G(M.onMouseLeave,()=>Z(!1))}),[ne,b,_,$,j,A,F,B]),{onFocus:Fe,onBlur:Pe}=S??{},ot=w.useCallback((M={},N=null)=>{const Me=_&&!n;return{...M,id:y,ref:N,type:"radio",name:a,value:d,onChange:G(M.onChange,ve),onBlur:G(Pe,M.onBlur,()=>Y(!1)),onFocus:G(Fe,M.onFocus,()=>Y(!0)),onKeyDown:G(M.onKeyDown,we),onKeyUp:G(M.onKeyUp,_e),checked:j,disabled:Me,readOnly:F,required:z,"aria-invalid":ie($),"aria-disabled":ie(Me),"aria-required":ie(z),"data-readonly":D(F),"aria-describedby":g,style:xt}},[_,n,y,a,d,ve,Pe,Fe,we,_e,j,F,z,$,g]);return{state:{isInvalid:$,isFocused:A,isChecked:j,isActive:ne,isHovered:b,isDisabled:_,isReadOnly:F,isRequired:z},getCheckboxProps:xe,getRadioProps:xe,getInputProps:ot,getLabelProps:(M={},N=null)=>({...M,ref:N,onMouseDown:G(M.onMouseDown,Pt),"data-disabled":D(_),"data-checked":D(j),"data-invalid":D($)}),getRootProps:(M,N=null)=>({...M,ref:N,"data-disabled":D(_),"data-checked":D(j),"data-invalid":D($)}),htmlProps:f}}function Pt(e){e.preventDefault(),e.stopPropagation()}function Mt(e,o){const t={},n={};for(const[i,r]of Object.entries(e))o.includes(i)?t[i]=r:n[i]=r;return[t,n]}var ke=T((e,o)=>{var t;const n=Le(),{onChange:i,value:r}=e,l=Ee("Radio",{...n,...e}),s=He(e),{spacing:u="0.5rem",children:a,isDisabled:d=n?.isDisabled,isFocusable:p=n?.isFocusable,inputProps:c,...g}=s;let f=e.isChecked;n?.value!=null&&r!=null&&(f=n.value===r);let m=i;n?.onChange&&r!=null&&(m=rt(n.onChange,i));const S=(t=e?.name)!=null?t:n?.name,{getInputProps:C,getCheckboxProps:x,getLabelProps:P,getRootProps:y,htmlProps:_}=Ft({...g,isChecked:f,isFocusable:p,isDisabled:d,onChange:m,name:S}),[F,z]=Mt(_,lt),$=x(z),B=C(c,o),U=P(),A=Object.assign({},F,y()),Y={display:"inline-flex",alignItems:"center",verticalAlign:"top",cursor:"pointer",position:"relative",...l.container},b={display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,...l.control},Z={userSelect:"none",marginStart:u,...l.label};return v.jsxs(V.label,{className:"chakra-radio",...A,__css:Y,children:[v.jsx("input",{className:"chakra-radio__input",...B}),v.jsx(V.span,{className:"chakra-radio__control",...$,__css:b}),a&&v.jsx(V.span,{className:"chakra-radio__label",...U,__css:Z,children:a})]})});ke.displayName="Radio";var[yt,X]=De({name:"TableStylesContext",errorMessage:`useTableStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Oe=T((e,o)=>{const t=Ee("Table",e),{className:n,layout:i,...r}=He(e);return v.jsx(yt,{value:t,children:v.jsx(V.table,{ref:o,__css:{tableLayout:i,...t.table},className:ze("chakra-table",n),...r})})});Oe.displayName="Table";var $t=T((e,o)=>{const t=X();return v.jsx(V.thead,{...e,ref:o,__css:t.thead})}),Te=T((e,o)=>{const t=X();return v.jsx(V.tr,{...e,ref:o,__css:t.tr})}),It=T((e,o)=>{const t=X();return v.jsx(V.tbody,{...e,ref:o,__css:t.tbody})}),Vt=T(({isNumeric:e,...o},t)=>{const n=X();return v.jsx(V.td,{...o,ref:t,__css:n.td,"data-is-numeric":e})}),Dt=T(({isNumeric:e,...o},t)=>{const n=X();return v.jsx(V.th,{...o,ref:t,__css:n.th,"data-is-numeric":e})});function zt(e){var o=w.useRef();return w.useEffect(function(){o.current=e}),o.current}const Et=Ae({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"}),Ht=Ae({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"}),Gt="@open-pioneer/result-list",je=dt.bind(void 0,Gt);/** +import{r as w,J as it,R as ye,z as De,h as T,j as v,f as V,q as ze,s as D,K as G,Y as ie,o as Ee,p as He,O as rt,t as lt,c as st,x as ut,Z as at,l as gt}from"./Bh0CuZ3gy5tC.js";import{u as dt,b9 as Ge,b2 as ct,i as ft,B as pt}from"./p-jlpmJ86TPh.js";import{c as Ae}from"./D03oE8cEQPSj.js";import{u as mt}from"./Cq1ZpfgEg4XJ.js";import{t as St,C as Ct}from"./2d5-QpxJNHTD.js";import{a as ht}from"./BO_q12Vdyug-.js";function Rt(e){return e&&ye(e)&&ye(e.target)}function vt(e={}){const{onChange:o,value:t,defaultValue:n,name:i,isDisabled:r,isFocusable:l,isNative:s,...u}=e,[a,d]=w.useState(n||""),p=typeof t<"u",c=p?t:a,g=w.useRef(null),f=w.useCallback(()=>{const _=g.current;if(!_)return;let F="input:not(:disabled):checked";const z=_.querySelector(F);if(z){z.focus();return}F="input:not(:disabled)";const $=_.querySelector(F);$?.focus()},[]),S=`radio-${w.useId()}`,C=i||S,x=w.useCallback(_=>{const F=Rt(_)?_.target.value:_;p||d(F),o?.(String(F))},[o,p]),P=w.useCallback((_={},F=null)=>({..._,ref:it(F,g),role:"radiogroup"}),[]),y=w.useCallback((_={},F=null)=>({..._,ref:F,name:C,[s?"checked":"isChecked"]:c!=null?_.value===c:void 0,onChange($){x($)},"data-radiogroup":!0}),[s,C,x,c]);return{getRootProps:P,getRadioProps:y,name:C,ref:g,focus:f,setValue:d,value:c,onChange:x,isDisabled:r,isFocusable:l,htmlProps:u}}var[wt,Le]=De({name:"RadioGroupContext",strict:!1}),_t=T((e,o)=>{const{colorScheme:t,size:n,variant:i,children:r,className:l,isDisabled:s,isFocusable:u,...a}=e,{value:d,onChange:p,getRootProps:c,name:g,htmlProps:f}=vt(a),m=w.useMemo(()=>({name:g,size:n,onChange:p,colorScheme:t,value:d,variant:i,isDisabled:s,isFocusable:u}),[g,n,p,t,d,i,s,u]);return v.jsx(wt,{value:m,children:v.jsx(V.div,{...c(f,o),className:ze("chakra-radio-group",l),children:r})})});_t.displayName="RadioGroup";var xt={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"};function Ft(e={}){const{defaultChecked:o,isChecked:t,isFocusable:n,isDisabled:i,isReadOnly:r,isRequired:l,onChange:s,isInvalid:u,name:a,value:d,id:p,"data-radiogroup":c,"aria-describedby":g,...f}=e,m=`radio-${w.useId()}`,S=ht(),x=!!Le()||!!c;let y=!!S&&!x?S.id:m;y=p??y;const _=i??S?.isDisabled,F=r??S?.isReadOnly,z=l??S?.isRequired,$=u??S?.isInvalid,[B,U]=w.useState(!1),[A,Y]=w.useState(!1),[b,Z]=w.useState(!1),[ne,q]=w.useState(!1),[tt,nt]=w.useState(!!o),oe=typeof t<"u",j=oe?t:tt;w.useEffect(()=>St(U),[]);const ve=w.useCallback(M=>{if(F||_){M.preventDefault();return}oe||nt(M.target.checked),s?.(M)},[oe,_,F,s]),we=w.useCallback(M=>{M.key===" "&&q(!0)},[q]),_e=w.useCallback(M=>{M.key===" "&&q(!1)},[q]),xe=w.useCallback((M={},N=null)=>({...M,ref:N,"data-active":D(ne),"data-hover":D(b),"data-disabled":D(_),"data-invalid":D($),"data-checked":D(j),"data-focus":D(A),"data-focus-visible":D(A&&B),"data-readonly":D(F),"aria-hidden":!0,onMouseDown:G(M.onMouseDown,()=>q(!0)),onMouseUp:G(M.onMouseUp,()=>q(!1)),onMouseEnter:G(M.onMouseEnter,()=>Z(!0)),onMouseLeave:G(M.onMouseLeave,()=>Z(!1))}),[ne,b,_,$,j,A,F,B]),{onFocus:Fe,onBlur:Pe}=S??{},ot=w.useCallback((M={},N=null)=>{const Me=_&&!n;return{...M,id:y,ref:N,type:"radio",name:a,value:d,onChange:G(M.onChange,ve),onBlur:G(Pe,M.onBlur,()=>Y(!1)),onFocus:G(Fe,M.onFocus,()=>Y(!0)),onKeyDown:G(M.onKeyDown,we),onKeyUp:G(M.onKeyUp,_e),checked:j,disabled:Me,readOnly:F,required:z,"aria-invalid":ie($),"aria-disabled":ie(Me),"aria-required":ie(z),"data-readonly":D(F),"aria-describedby":g,style:xt}},[_,n,y,a,d,ve,Pe,Fe,we,_e,j,F,z,$,g]);return{state:{isInvalid:$,isFocused:A,isChecked:j,isActive:ne,isHovered:b,isDisabled:_,isReadOnly:F,isRequired:z},getCheckboxProps:xe,getRadioProps:xe,getInputProps:ot,getLabelProps:(M={},N=null)=>({...M,ref:N,onMouseDown:G(M.onMouseDown,Pt),"data-disabled":D(_),"data-checked":D(j),"data-invalid":D($)}),getRootProps:(M,N=null)=>({...M,ref:N,"data-disabled":D(_),"data-checked":D(j),"data-invalid":D($)}),htmlProps:f}}function Pt(e){e.preventDefault(),e.stopPropagation()}function Mt(e,o){const t={},n={};for(const[i,r]of Object.entries(e))o.includes(i)?t[i]=r:n[i]=r;return[t,n]}var ke=T((e,o)=>{var t;const n=Le(),{onChange:i,value:r}=e,l=Ee("Radio",{...n,...e}),s=He(e),{spacing:u="0.5rem",children:a,isDisabled:d=n?.isDisabled,isFocusable:p=n?.isFocusable,inputProps:c,...g}=s;let f=e.isChecked;n?.value!=null&&r!=null&&(f=n.value===r);let m=i;n?.onChange&&r!=null&&(m=rt(n.onChange,i));const S=(t=e?.name)!=null?t:n?.name,{getInputProps:C,getCheckboxProps:x,getLabelProps:P,getRootProps:y,htmlProps:_}=Ft({...g,isChecked:f,isFocusable:p,isDisabled:d,onChange:m,name:S}),[F,z]=Mt(_,lt),$=x(z),B=C(c,o),U=P(),A=Object.assign({},F,y()),Y={display:"inline-flex",alignItems:"center",verticalAlign:"top",cursor:"pointer",position:"relative",...l.container},b={display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,...l.control},Z={userSelect:"none",marginStart:u,...l.label};return v.jsxs(V.label,{className:"chakra-radio",...A,__css:Y,children:[v.jsx("input",{className:"chakra-radio__input",...B}),v.jsx(V.span,{className:"chakra-radio__control",...$,__css:b}),a&&v.jsx(V.span,{className:"chakra-radio__label",...U,__css:Z,children:a})]})});ke.displayName="Radio";var[yt,X]=De({name:"TableStylesContext",errorMessage:`useTableStyles returned is 'undefined'. Seems you forgot to wrap the components in "
" `}),Oe=T((e,o)=>{const t=Ee("Table",e),{className:n,layout:i,...r}=He(e);return v.jsx(yt,{value:t,children:v.jsx(V.table,{ref:o,__css:{tableLayout:i,...t.table},className:ze("chakra-table",n),...r})})});Oe.displayName="Table";var $t=T((e,o)=>{const t=X();return v.jsx(V.thead,{...e,ref:o,__css:t.thead})}),Te=T((e,o)=>{const t=X();return v.jsx(V.tr,{...e,ref:o,__css:t.tr})}),It=T((e,o)=>{const t=X();return v.jsx(V.tbody,{...e,ref:o,__css:t.tbody})}),Vt=T(({isNumeric:e,...o},t)=>{const n=X();return v.jsx(V.td,{...o,ref:t,__css:n.td,"data-is-numeric":e})}),Dt=T(({isNumeric:e,...o},t)=>{const n=X();return v.jsx(V.th,{...o,ref:t,__css:n.th,"data-is-numeric":e})});function zt(e){var o=w.useRef();return w.useEffect(function(){o.current=e}),o.current}const Et=Ae({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"}),Ht=Ae({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"}),Gt="@open-pioneer/result-list",je=dt.bind(void 0,Gt);/** * table-core * * Copyright (c) TanStack diff --git a/openlayers-base-packages/pr-previews/pr-371/assets/JZ5RcWTlF_6Y.js b/openlayers-base-packages/pr-previews/pr-371/assets/D8rToQP6FvST.js similarity index 98% rename from openlayers-base-packages/pr-previews/pr-371/assets/JZ5RcWTlF_6Y.js rename to openlayers-base-packages/pr-previews/pr-371/assets/D8rToQP6FvST.js index 70b5792..485279a 100644 --- a/openlayers-base-packages/pr-previews/pr-371/assets/JZ5RcWTlF_6Y.js +++ b/openlayers-base-packages/pr-previews/pr-371/assets/D8rToQP6FvST.js @@ -1 +1 @@ -import{ci as F,bf as M,aU as x,ad as w,cj as c,ck as L,cl as X,b8 as Y,c5 as y,bJ as g,cm as I,cn as S,co as O,cp as T,cq as j,cr as b,cs as D,c3 as K,cg as $,ct as k,as as v,cu as z,cv as B,cw as U,cx as H,cy as J,cz as N,b$ as E,cA as Z,cB as Q,cC as V,b_ as W,cD as q,ar as P,cE as tt,c4 as et}from"./CncSlnPsjr9P.js";import{L as A}from"./DsXJQLY20iHp.js";class C extends F{constructor(t){super(),this.geometries_=t,this.changeEventsKeys_=[],this.listenGeometriesChange_()}unlistenGeometriesChange_(){this.changeEventsKeys_.forEach(M),this.changeEventsKeys_.length=0}listenGeometriesChange_(){const t=this.geometries_;for(let e=0,s=t.length;et.clone())}class m extends y{constructor(t,e,s){if(super(),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(t[0]))this.setCoordinates(t,e);else if(e!==void 0&&s)this.setFlatCoordinates(e,t),this.ends_=s;else{const i=t,n=[],o=[];for(let a=0,l=i.length;at.clone())}class m extends y{constructor(t,e,s){if(super(),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(t[0]))this.setCoordinates(t,e);else if(e!==void 0&&s)this.setFlatCoordinates(e,t),this.ends_=s;else{const i=t,n=[],o=[];for(let a=0,l=i.length;a{const I=$?r.declutter[$].all().map(A=>A.value):null;for(let A=0,j=k.length;A{const i=this.getLayer(),o=se(i),a=i.getSource(),s=this.renderedProjection,l=s.getExtent(),u=this.renderedResolution,c=a.getTileGridForProjection(s),p=co(this.renderedPixelToCoordinateTransform_,e.slice()),d=c.getTileCoordForCoordAndResolution(p,u);let f;for(let E=0,F=this.renderedTiles.length;E0){r([]);return}const h=c.getTileCoordExtent(f.wrappedTileCoord),g=oi(h),m=[(p[0]-g[0])/u,(g[1]-p[1])/u],_=f.getSourceTiles().reduce(function(E,F){return E.concat(F.getFeatures())},[]);let C=f.hitDetectionImageData[o];if(!C){const E=ai(c.getTileSize(c.getZForResolution(u,a.zDirection))),F=this.renderedRotation_,S=[this.getRenderTransform(c.getTileCoordCenter(f.wrappedTileCoord),u,0,rr,E[0]*rr,E[1]*rr,0)];C=ho(E,S,_,i.getStyleFunction(),c.getTileCoordExtent(f.wrappedTileCoord),f.getReplayState(i).renderedResolution,F),f.hitDetectionImageData[o]=C}r(mo(m,_,C))})}handleFontsChanged(){const e=this.getLayer();e.getVisible()&&this.renderedLayerRevision_!==void 0&&e.changed()}handleStyleImageChange_(e){this.renderIfReadyAndVisible()}renderDeclutter(e,r){const n=this.context,i=n.globalAlpha;n.globalAlpha=r.opacity;const o=e.viewHints,a=!(o[Le.ANIMATING]||o[Le.INTERACTING]),s=this.renderedTiles;for(let l=0,u=s.length;l=0;--f)p[f].execute(this.context,[this.context.canvas.width,this.context.canvas.height],this.getTileRenderTransform(c,e),e.viewState.rotation,a,xn,d?e.declutter[d]:void 0)}n.globalAlpha=i}renderDeferredInternal(e){const n=this.renderedTiles.reduce((s,l,u)=>(l.executorGroups[se(this.getLayer())].forEach(c=>s.push({executorGroup:c,index:u})),s),[]),i=n.map(({executorGroup:s})=>s.getDeferredZIndexContexts()),o={};for(let s=0,l=n.length;s{i.forEach((l,u)=>{l[s]&&(l[s].forEach(c=>{const{executorGroup:p,index:d}=n[u],f=p.getRenderedContext(),h=f.globalAlpha;f.globalAlpha=this.renderedOpacity_;const g=this.tileClipContexts_[d];g&&g.draw(f),c.draw(f),g&&f.restore(),f.globalAlpha=h,c.clear()}),l[s].length=0)})})}getTileRenderTransform(e,r){const n=r.pixelRatio,i=r.viewState,o=i.center,a=i.resolution,s=i.rotation,l=r.size,u=Math.round(l[0]*n),c=Math.round(l[1]*n),d=this.getLayer().getSource().getTileGridForProjection(r.viewState.projection),f=e.tileCoord,h=d.getTileCoordExtent(e.wrappedTileCoord),g=d.getTileCoordExtent(f,this.tmpExtent)[0]-h[0];return go(nr(this.inversePixelTransform.slice(),1/n,1/n),this.getRenderTransform(o,a,s,n,u,c,g))}postRender(e,r){const n=r.viewHints,i=!(n[Le.ANIMATING]||n[Le.INTERACTING]);this.renderedPixelToCoordinateTransform_=r.pixelToCoordinateTransform.slice(),this.renderedRotation_=r.viewState.rotation,this.renderedOpacity_=r.layerStatesArray[r.layerIndex].opacity;const o=this.getLayer(),a=o.getRenderMode(),s=e.globalAlpha;e.globalAlpha=this.renderedOpacity_;const l=o.getDeclutter(),u=l?In[a].filter(F=>!xn.includes(F)):In[a],c=r.viewState,p=c.rotation,d=o.getSource(),h=d.getTileGridForProjection(c.projection).getZForResolution(c.resolution,d.zDirection),g=this.renderedTiles,m=[],_=[],C=[];let E=!0;for(let F=g.length-1;F>=0;--F){const S=g[F];E=E&&!S.getReplayState(o).dirty;const $=S.executorGroups[se(o)].filter(N=>N.hasExecutors(u));if($.length===0)continue;const k=this.getTileRenderTransform(S,r),I=S.tileCoord[0];let A=!1;const j=$[0].getClipCoords(k);let V=e,b;if(j){b=new xo,V=b.getContext();for(let N=0,T=m.length;N{const s=Co(a),l=n.peek(s);if(l){const u=l.sourceTiles;for(let c=0,p=u.length;c{const f=this.tileUrlFunction(d,e,r),h=this.sourceTileCache.containsKey(f)?this.sourceTileCache.get(f):new this.tileClass(d,f?G.IDLE:G.EMPTY,f,this.format_,this.tileLoadFunction);n.sourceTiles.push(h);const g=h.getState();if(g{this.handleTileChange(_);const C=h.getState();if(C===G.LOADED||C===G.ERROR){const E=h.getKey();E in n.errorTileKeys?h.getState()===G.LOADED&&delete n.errorTileKeys[E]:n.loadingSourceTiles--,C===G.ERROR?n.errorTileKeys[E]=!0:h.removeEventListener(kr.CHANGE,m),n.loadingSourceTiles===0&&n.setState(Io(n.errorTileKeys)?G.LOADED:G.ERROR)}};h.addEventListener(kr.CHANGE,m),n.loadingSourceTiles++}g===G.IDLE&&(h.extent=u.getTileCoordExtent(d),h.projection=r,h.resolution=u.getResolution(d[0]),this.sourceTileCache.set(f,h),h.load())}),n.loadingSourceTiles||n.setState(n.sourceTiles.some(d=>d.getState()===G.ERROR)?G.ERROR:G.LOADED)}return n.sourceTiles}getTile(e,r,n,i,o){const a=Mo(e,r,n),s=this.getKey();let l;if(this.tileCache.containsKey(a)&&(l=this.tileCache.get(a),l.key===s))return l;const u=[e,r,n];let c=this.getTileCoordForTileUrlFunction(u,o);const p=this.getTileGrid().getExtent(),d=this.getTileGridForProjection(o);if(c&&p){const g=d.getTileCoordExtent(c);ct(g,-d.getResolution(e),g),Ae(p,g)||(c=null)}let f=!0;if(c!==null){const g=this.tileGrid,m=d.getResolution(e),_=g.getZForResolution(m,1),C=d.getTileCoordExtent(c);ct(C,-m,C),g.forEachTileCoord(C,_,E=>{f=f&&!this.tileUrlFunction(E,i,o)})}const h=new ya(u,f?G.EMPTY:G.IDLE,c,this.getSourceTiles.bind(this,i,o));return h.key=s,l?(h.interimTile=l,h.refreshInterimChain(),this.tileCache.replace(a,h)):this.tileCache.set(a,h),h}getTileGridForProjection(e){const r=e.getCode();let n=this.tileGrids_[r];if(!n){const i=this.tileGrid,o=i.getResolutions().slice(),a=o.map(function(u,c){return i.getOrigin(c)}),s=o.map(function(u,c){return i.getTileSize(c)}),l=Ro+1;for(let u=o.length;u=200&&r.status<300){let n;try{n=JSON.parse(r.responseText)}catch{this.handleTileJSONError();return}this.handleTileJSONResponse(n)}else this.handleTileJSONError()}onXHRError_(e){this.handleTileJSONError()}getTileJSON(){return this.tileJSON_}handleTileJSONResponse(e){const r=Ke("EPSG:4326"),n=this.getProjection();let i;if(e.bounds!==void 0){const u=Po(r,n);i=Ao(e.bounds,u)}const o=si(n),a=e.minzoom||0,s=e.maxzoom||22,l=$r({extent:o,maxZoom:s,minZoom:a,tileSize:this.tileSize_});if(this.tileGrid=l,this.tileUrlFunction=Do(e.tiles,l),e.attribution&&!this.getAttributions()){const u=i!==void 0?i:o;this.setAttributions(function(c){return Ae(u,c.extent)?[e.attribution]:null})}this.tileJSON_=e,this.setState("ready")}handleTileJSONError(){this.setState("error")}}var Or={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */Or.read=function(t,e,r,n,i){var o,a,s=i*8-n-1,l=(1<>1,c=-7,p=r?i-1:0,d=r?-1:1,f=t[e+p];for(p+=d,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=o*256+t[e+p],p+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=a*256+t[e+p],p+=d,c-=8);if(o===0)o=1-u;else{if(o===l)return a?NaN:(f?-1:1)*(1/0);a=a+Math.pow(2,n),o=o-u}return(f?-1:1)*a*Math.pow(2,o-n)};Or.write=function(t,e,r,n,i,o){var a,s,l,u=o*8-i-1,c=(1<>1,d=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,h=n?1:-1,g=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+p>=1?e+=d/l:e+=d*Math.pow(2,1-p),e*l>=2&&(a++,l/=2),a+p>=c?(s=0,a=c):a+p>=1?(s=(e*l-1)*Math.pow(2,i),a=a+p):(s=e*Math.pow(2,p-1)*Math.pow(2,i),a=0));i>=8;t[r+f]=s&255,f+=h,s/=256,i-=8);for(a=a<0;t[r+f]=a&255,f+=h,a/=256,u-=8);t[r+f-h]|=g*128};var wa=L,Ft=Or;function L(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}L.Varint=0;L.Fixed64=1;L.Bytes=2;L.Fixed32=5;var Sr=65536*65536,Mn=1/Sr,Ta=12,fi=typeof TextDecoder>"u"?null:new TextDecoder("utf8");L.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos>3,o=this.pos;this.type=n&7,t(i,e,this),this.pos===o&&this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=St(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=_n(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=St(this.buf,this.pos)+St(this.buf,this.pos+4)*Sr;return this.pos+=8,t},readSFixed64:function(){var t=St(this.buf,this.pos)+_n(this.buf,this.pos+4)*Sr;return this.pos+=8,t},readFloat:function(){var t=Ft.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=Ft.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e=this.buf,r,n;return n=e[this.pos++],r=n&127,n<128||(n=e[this.pos++],r|=(n&127)<<7,n<128)||(n=e[this.pos++],r|=(n&127)<<14,n<128)||(n=e[this.pos++],r|=(n&127)<<21,n<128)?r:(n=e[this.pos],r|=(n&15)<<28,ka(r,t,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2===1?(t+1)/-2:t/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=Ta&&fi?$a(this.buf,e,t):ja(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==L.Bytes)return t.push(this.readVarint(e));var r=ze(this);for(t=t||[];this.pos127;);else if(e===L.Bytes)this.pos=this.readVarint()+this.pos;else if(e===L.Fixed32)this.pos+=4;else if(e===L.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+e)},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e268435455||t<0){za(t,this);return}this.realloc(4),this.buf[this.pos++]=t&127|(t>127?128:0),!(t<=127)&&(this.buf[this.pos++]=(t>>>=7)&127|(t>127?128:0),!(t<=127)&&(this.buf[this.pos++]=(t>>>=7)&127|(t>127?128:0),!(t<=127)&&(this.buf[this.pos++]=t>>>7&127)))},writeSVarint:function(t){this.writeVarint(t<0?-t*2-1:t*2)},writeBoolean:function(t){this.writeVarint(!!t)},writeString:function(t){t=String(t),this.realloc(t.length*4),this.pos++;var e=this.pos;this.pos=La(this.buf,t,this.pos);var r=this.pos-e;r>=128&&Rn(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),Ft.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),Ft.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var r=0;r=128&&Rn(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,L.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,Ca,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,Ea,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,Ra,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,Ia,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,Ma,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,_a,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,Pa,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,Aa,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,Da,e)},writeBytesField:function(t,e){this.writeTag(t,L.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,L.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,L.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,L.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,L.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,L.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,L.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,L.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,L.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,L.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,!!e)}};function ka(t,e,r){var n=r.buf,i,o;if(o=n[r.pos++],i=(o&112)>>4,o<128||(o=n[r.pos++],i|=(o&127)<<3,o<128)||(o=n[r.pos++],i|=(o&127)<<10,o<128)||(o=n[r.pos++],i|=(o&127)<<17,o<128)||(o=n[r.pos++],i|=(o&127)<<24,o<128)||(o=n[r.pos++],i|=(o&1)<<31,o<128))return Oe(t,i,e);throw new Error("Expected varint not more than 10 bytes")}function ze(t){return t.type===L.Bytes?t.readVarint()+t.pos:t.pos+1}function Oe(t,e,r){return r?e*4294967296+(t>>>0):(e>>>0)*4294967296+(t>>>0)}function za(t,e){var r,n;if(t>=0?(r=t%4294967296|0,n=t/4294967296|0):(r=~(-t%4294967296),n=~(-t/4294967296),r^4294967295?r=r+1|0:(r=0,n=n+1|0)),t>=18446744073709552e3||t<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),Fa(r,n,e),Sa(n,e)}function Fa(t,e,r){r.buf[r.pos++]=t&127|128,t>>>=7,r.buf[r.pos++]=t&127|128,t>>>=7,r.buf[r.pos++]=t&127|128,t>>>=7,r.buf[r.pos++]=t&127|128,t>>>=7,r.buf[r.pos]=t&127}function Sa(t,e){var r=(t&7)<<4;e.buf[e.pos++]|=r|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127)))))}function Rn(t,e,r){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(Math.LN2*7));r.realloc(n);for(var i=r.pos-1;i>=t;i--)r.buf[i+n]=r.buf[i]}function Ca(t,e){for(var r=0;r>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function _n(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}function ja(t,e,r){for(var n="",i=e;i239?4:o>223?3:o>191?2:1;if(i+s>r)break;var l,u,c;s===1?o<128&&(a=o):s===2?(l=t[i+1],(l&192)===128&&(a=(o&31)<<6|l&63,a<=127&&(a=null))):s===3?(l=t[i+1],u=t[i+2],(l&192)===128&&(u&192)===128&&(a=(o&15)<<12|(l&63)<<6|u&63,(a<=2047||a>=55296&&a<=57343)&&(a=null))):s===4&&(l=t[i+1],u=t[i+2],c=t[i+3],(l&192)===128&&(u&192)===128&&(c&192)===128&&(a=(o&15)<<18|(l&63)<<12|(u&63)<<6|c&63,(a<=65535||a>=1114112)&&(a=null))),a===null?(a=65533,s=1):a>65535&&(a-=65536,n+=String.fromCharCode(a>>>10&1023|55296),a=56320|a&1023),n+=String.fromCharCode(a),i+=s}return n}function $a(t,e,r){return fi.decode(t.subarray(e,r))}function La(t,e,r){for(var n=0,i,o;n55295&&i<57344)if(o)if(i<56320){t[r++]=239,t[r++]=191,t[r++]=189,o=i;continue}else i=o-55296<<10|i-56320|65536,o=null;else{i>56319||n+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):o=i;continue}else o&&(t[r++]=239,t[r++]=191,t[r++]=189,o=null);i<128?t[r++]=i:(i<2048?t[r++]=i>>6|192:(i<65536?t[r++]=i>>12|224:(t[r++]=i>>18|240,t[r++]=i>>12&63|128),t[r++]=i>>6&63|128),t[r++]=i&63|128)}return r}const Oa=Qi(wa);class qr extends na{constructor(e){super(),e=e||{},this.dataProjection=new jo({code:"",units:"tile-pixels"}),this.featureClass=e.featureClass?e.featureClass:zr,this.geometryName_=e.geometryName,this.layerName_=e.layerName?e.layerName:"layer",this.layers_=e.layers?e.layers:null,this.idProperty_=e.idProperty,this.supportedMediaTypes=["application/vnd.mapbox-vector-tile","application/x-protobuf"]}readRawGeometry_(e,r,n,i){e.pos=r.geometry;const o=e.readVarint()+e.pos;let a=1,s=0,l=0,u=0,c=0,p=0;for(;e.pos>3}if(s--,a===1||a===2)l+=e.readSVarint(),u+=e.readSVarint(),a===1&&c>p&&(i.push(c),p=c),n.push(l,u),c+=2;else if(a===7)c>p&&(n.push(n[p],n[p+1]),c+=2);else throw new Error("Invalid command found in the PBF")}c>p&&(i.push(c),p=c)}createFeature_(e,r,n){const i=r.type;if(i===0)return null;let o;const a=r.properties;let s;this.idProperty_?(s=a[this.idProperty_],delete a[this.idProperty_]):s=r.id,a[this.layerName_]=r.layer.name;const l=[],u=[];this.readRawGeometry_(e,r,l,u);const c=Ba(i,u.length);if(this.featureClass===zr)o=new this.featureClass(c,l,u,2,a,s),o.transform(n.dataProjection);else{let p;if(c=="Polygon"){const h=$o(l,u);p=h.length>1?new sa(l,"XY",h):new Lo(l,"XY",u)}else p=c==="Point"?new Oo(l,"XY"):c==="LineString"?new aa(l,"XY"):c==="MultiPoint"?new la(l,"XY"):c==="MultiLineString"?new ua(l,"XY",u):null;const d=this.featureClass;o=new d,this.geometryName_&&o.setGeometryName(this.geometryName_);const f=ia(p,!1,n);o.setGeometry(f),s!==void 0&&o.setId(s),o.setProperties(a,!0)}return o}getType(){return"arraybuffer"}readFeatures(e,r){const n=this.layers_;r=this.adaptOptions(r);const i=Ke(r.dataProjection);i.setWorldExtent(r.extent),r.dataProjection=i;const o=new Oa(e),a=o.readFields(qa,{}),s=[];for(const l in a){if(n&&!n.includes(l))continue;const u=a[l],c=u?[0,0,u.extent,u.extent]:null;i.setExtent(c);for(let p=0,d=u.length;p>3,n=t===1?r.readString():t===2?r.readFloat():t===3?r.readDouble():t===4?r.readVarint64():t===5?r.readVarint():t===6?r.readSVarint():t===7?r.readBoolean():null;e.values.push(n)}}function Na(t,e,r){if(t==1)e.id=r.readVarint();else if(t==2){const n=r.readVarint()+r.pos;for(;r.pos255?255:t}function An(t){return t<0?0:t>1?1:t}function lr(t){return t[t.length-1]==="%"?dt(parseFloat(t)/100*255):dt(parseInt(t))}function Ct(t){return t[t.length-1]==="%"?An(parseFloat(t)/100):An(parseFloat(t))}function ur(t,e,r){return r<0?r+=1:r>1&&(r-=1),r*6<1?t+(e-t)*r*6:r*2<1?e:r*3<2?t+(e-t)*(2/3-r)*6:t}function Za(t){var e=t.replace(/ /g,"").toLowerCase();if(e in Pn)return Pn[e].slice();if(e[0]==="#"){if(e.length===4){var r=parseInt(e.substr(1),16);return r>=0&&r<=4095?[(r&3840)>>4|(r&3840)>>8,r&240|(r&240)>>4,r&15|(r&15)<<4,1]:null}else if(e.length===7){var r=parseInt(e.substr(1),16);return r>=0&&r<=16777215?[(r&16711680)>>16,(r&65280)>>8,r&255,1]:null}return null}var n=e.indexOf("("),i=e.indexOf(")");if(n!==-1&&i+1===e.length){var o=e.substr(0,n),a=e.substr(n+1,i-(n+1)).split(","),s=1;switch(o){case"rgba":if(a.length!==4)return null;s=Ct(a.pop());case"rgb":return a.length!==3?null:[lr(a[0]),lr(a[1]),lr(a[2]),s];case"hsla":if(a.length!==4)return null;s=Ct(a.pop());case"hsl":if(a.length!==3)return null;var l=(parseFloat(a[0])%360+360)%360/360,u=Ct(a[1]),c=Ct(a[2]),p=c<=.5?c*(u+1):c+u-c*u,d=c*2-p;return[dt(ur(d,p,l+1/3)*255),dt(ur(d,p,l)*255),dt(ur(d,p,l-1/3)*255),s];default:return null}}return null}try{mi=Ua.parseCSSColor=Za}catch{}class le{constructor(e,r,n,i=1){this.r=e,this.g=r,this.b=n,this.a=i}static parse(e){if(!e)return;if(e instanceof le)return e;if(typeof e!="string")return;const r=mi(e);if(r)return new le(r[0]/255*r[3],r[1]/255*r[3],r[2]/255*r[3],r[3])}toString(){const[e,r,n,i]=this.toArray();return`rgba(${Math.round(e)},${Math.round(r)},${Math.round(n)},${i})`}toArray(){const{r:e,g:r,b:n,a:i}=this;return i===0?[0,0,0,0]:[e*255/i,r*255/i,n*255/i,i]}toArray01(){const{r:e,g:r,b:n,a:i}=this;return i===0?[0,0,0,0]:[e/i,r/i,n/i,i]}toArray01PremultipliedAlpha(){const{r:e,g:r,b:n,a:i}=this;return[e,r,n,i]}}le.black=new le(0,0,0,1);le.white=new le(1,1,1,1);le.transparent=new le(0,0,0,0);le.red=new le(1,0,0,1);le.blue=new le(0,0,1,1);var pe=le;function mt(t){return typeof t=="object"?["literal",t]:t}function Ha(t,e){let r=t.stops;if(!r)return Wa(t,e);const n=r&&typeof r[0][0]=="object",i=n||t.property!==void 0,o=n||!i;return r=r.map(a=>!i&&e.tokens&&typeof a[1]=="string"?[a[0],Ya(a[1])]:[a[0],mt(a[1])]),n?Xa(t,e,r):o?Ka(t,e,r):Cr(t,e,r)}function Wa(t,e){const r=["get",t.property];if(t.default===void 0)return e.type==="string"?["string",r]:r;if(e.type==="enum")return["match",r,Object.keys(e.values),r,t.default];{const n=[e.type==="color"?"to-color":e.type,r,mt(t.default)];return e.type==="array"&&n.splice(1,0,e.value,e.length||null),n}}function Gr(t){switch(t.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function Xa(t,e,r){const n={},i={},o=[];for(let s=0;s3&&e===t[t.length-2]||(n&&t.length===2||t.push(e),t.push(r))}function Vr(t,e){return t.type?t.type:e.expression.interpolated?"exponential":"interval"}function Ya(t){const e=["concat"],r=/{([^{}]+)}/g;let n=0;for(let i=r.exec(t);i!==null;i=r.exec(t)){const o=t.slice(n,r.lastIndex-i[0].length);n=r.lastIndex,o.length>0&&e.push(o),e.push(["get",i[1]])}if(e.length===1)return t;if(n`:t.itemType.kind==="value"?"array":`array<${e}>`}else return t.kind}const rs=[Ut,y,P,M,Se,Ht,We,ge(R),xt];function yt(t,e){if(e.kind==="error")return null;if(t.kind==="array"){if(e.kind==="array"&&(e.N===0&&e.itemType.kind==="value"||!yt(t.itemType,e.itemType))&&(typeof t.N!="number"||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if(t.kind==="value"){for(const r of rs)if(!yt(r,e))return null}}return`Expected ${Z(t)} but found ${Z(e)} instead.`}function Ur(t,e){return e.some(r=>r.kind===t.kind)}function gt(t,e){return e.some(r=>r==="null"?t===null:r==="array"?Array.isArray(t):r==="object"?t&&!Array.isArray(t)&&typeof t=="object":r===typeof t)}class Zr{constructor(e,r,n){e?this.sensitivity=r?"variant":"case":this.sensitivity=r?"accent":"base",this.locale=n,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,r){return this.collator.compare(e,r)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Er{constructor(e,r,n,i,o){this.text=e.normalize?e.normalize():e,this.image=r,this.scale=n,this.fontStack=i,this.textColor=o}}class we{constructor(e){this.sections=e}static fromString(e){return new we([new Er(e,null,null,null,null)])}isEmpty(){return this.sections.length===0?!0:!this.sections.some(e=>e.text.length!==0||e.image&&e.image.name.length!==0)}static factory(e){return e instanceof we?e:we.fromString(e)}toString(){return this.sections.length===0?"":this.sections.map(e=>e.text).join("")}serialize(){const e=["format"];for(const r of this.sections){if(r.image){e.push(["image",r.image.name]);continue}e.push(r.text);const n={};r.fontStack&&(n["text-font"]=["literal",r.fontStack.split(",")]),r.scale&&(n["font-scale"]=r.scale),r.textColor&&(n["text-color"]=["rgba"].concat(r.textColor.toArray())),e.push(n)}return e}}class Re{constructor(e){this.name=e.name,this.available=e.available}toString(){return this.name}static fromString(e){return e?new Re({name:e,available:!1}):null}serialize(){return["image",this.name]}}function yi(t,e,r,n){return typeof t=="number"&&t>=0&&t<=255&&typeof e=="number"&&e>=0&&e<=255&&typeof r=="number"&&r>=0&&r<=255?typeof n>"u"||typeof n=="number"&&n>=0&&n<=1?null:`Invalid rgba value [${[t,e,r,n].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof n=="number"?[t,e,r,n]:[t,e,r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function jt(t){if(t===null)return!0;if(typeof t=="string")return!0;if(typeof t=="boolean")return!0;if(typeof t=="number")return!0;if(t instanceof pe)return!0;if(t instanceof Zr)return!0;if(t instanceof we)return!0;if(t instanceof Re)return!0;if(Array.isArray(t)){for(const e of t)if(!jt(e))return!1;return!0}else if(typeof t=="object"){for(const e in t)if(!jt(t[e]))return!1;return!0}else return!1}function ee(t){if(t===null)return Ut;if(typeof t=="string")return P;if(typeof t=="boolean")return M;if(typeof t=="number")return y;if(t instanceof pe)return Se;if(t instanceof Zr)return Zt;if(t instanceof we)return Ht;if(t instanceof Re)return xt;if(Array.isArray(t)){const e=t.length;let r;for(const n of t){const i=ee(n);if(!r)r=i;else{if(r===i)continue;r=R;break}}return ge(r||R,e)}else return We}function ft(t){const e=typeof t;return t===null?"":e==="string"||e==="number"||e==="boolean"?String(t):t instanceof pe||t instanceof we||t instanceof Re?t.toString():JSON.stringify(t)}class Hr{constructor(e,r){this.type=e,this.value=r}static parse(e,r){if(e.length!==2)return r.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!jt(e[1]))return r.error("invalid value");const n=e[1];let i=ee(n);const o=r.expectedType;return i.kind==="array"&&i.N===0&&o&&o.kind==="array"&&(typeof o.N!="number"||o.N===0)&&(i=o),new Hr(i,n)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}serialize(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof pe?["rgba"].concat(this.value.toArray()):this.value instanceof we?this.value.serialize():this.value}}var $t=Hr;class ns{constructor(e){this.name="ExpressionEvaluationError",this.message=e}toJSON(){return this.message}}var re=ns;const cr={string:P,number:y,boolean:M,object:We};class Wr{constructor(e,r){this.type=e,this.args=r}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");let n=1,i;const o=e[0];if(o==="array"){let s;if(e.length>2){const u=e[1];if(typeof u!="string"||!(u in cr)||u==="object")return r.error('The item type argument of "array" must be one of string, number, boolean',1);s=cr[u],n++}else s=R;let l;if(e.length>3){if(e[2]!==null&&(typeof e[2]!="number"||e[2]<0||e[2]!==Math.floor(e[2])))return r.error('The length argument to "array" must be a positive integer literal',2);l=e[2],n++}i=ge(s,l)}else i=cr[o];const a=[];for(;ne.outputDefined())}serialize(){const e=this.type,r=[e.kind];if(e.kind==="array"){const n=e.itemType;if(n.kind==="string"||n.kind==="number"||n.kind==="boolean"){r.push(n.kind);const i=e.N;(typeof i=="number"||this.args.length>1)&&r.push(i)}}return r.concat(this.args.map(n=>n.serialize()))}}var Fe=Wr;class Wt{constructor(e){this.type=Ht,this.sections=e}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");const n=e[1];if(!Array.isArray(n)&&typeof n=="object")return r.error("First argument must be an image or text section.");const i=[];let o=!1;for(let a=1;a<=e.length-1;++a){const s=e[a];if(o&&typeof s=="object"&&!Array.isArray(s)){o=!1;let l=null;if(s["font-scale"]&&(l=r.parse(s["font-scale"],1,y),!l))return null;let u=null;if(s["text-font"]&&(u=r.parse(s["text-font"],1,ge(P)),!u))return null;let c=null;if(s["text-color"]&&(c=r.parse(s["text-color"],1,Se),!c))return null;const p=i[i.length-1];p.scale=l,p.font=u,p.textColor=c}else{const l=r.parse(e[a],1,R);if(!l)return null;const u=l.type.kind;if(u!=="string"&&u!=="value"&&u!=="null"&&u!=="resolvedImage")return r.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");o=!0,i.push({content:l,scale:null,font:null,textColor:null})}}return new Wt(i)}evaluate(e){const r=n=>{const i=n.content.evaluate(e);return ee(i)===xt?new Er("",i,null,null,null):new Er(ft(i),null,n.scale?n.scale.evaluate(e):null,n.font?n.font.evaluate(e).join(","):null,n.textColor?n.textColor.evaluate(e):null)};return new we(this.sections.map(r))}eachChild(e){for(const r of this.sections)e(r.content),r.scale&&e(r.scale),r.font&&e(r.font),r.textColor&&e(r.textColor)}outputDefined(){return!1}serialize(){const e=["format"];for(const r of this.sections){e.push(r.content.serialize());const n={};r.scale&&(n["font-scale"]=r.scale.serialize()),r.font&&(n["text-font"]=r.font.serialize()),r.textColor&&(n["text-color"]=r.textColor.serialize()),e.push(n)}return e}}class Xt{constructor(e){this.type=xt,this.input=e}static parse(e,r){if(e.length!==2)return r.error("Expected two arguments.");const n=r.parse(e[1],1,P);return n?new Xt(n):r.error("No image name provided.")}evaluate(e){const r=this.input.evaluate(e),n=Re.fromString(r);return n&&e.availableImages&&(n.available=e.availableImages.indexOf(r)>-1),n}eachChild(e){e(this.input)}outputDefined(){return!1}serialize(){return["image",this.input.serialize()]}}const is={"to-boolean":M,"to-color":Se,"to-number":y,"to-string":P};class Xr{constructor(e,r){this.type=e,this.args=r}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");const n=e[0];if((n==="to-boolean"||n==="to-string")&&e.length!==2)return r.error("Expected one argument.");const i=is[n],o=[];for(let a=1;a4?n=`Invalid rbga value ${JSON.stringify(r)}: expected an array containing either three or four numeric values.`:n=yi(r[0],r[1],r[2],r[3]),!n))return new pe(r[0]/255,r[1]/255,r[2]/255,r[3])}throw new re(n||`Could not parse color from value '${typeof r=="string"?r:String(JSON.stringify(r))}'`)}else if(this.type.kind==="number"){let r=null;for(const n of this.args){if(r=n.evaluate(e),r===null)return 0;const i=Number(r);if(!isNaN(i))return i}throw new re(`Could not convert ${JSON.stringify(r)} to number.`)}else return this.type.kind==="formatted"?we.fromString(ft(this.args[0].evaluate(e))):this.type.kind==="resolvedImage"?Re.fromString(ft(this.args[0].evaluate(e))):ft(this.args[0].evaluate(e))}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){if(this.type.kind==="formatted")return new Wt([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new Xt(this.args[0]).serialize();const e=[`to-${this.type.kind}`];return this.eachChild(r=>{e.push(r.serialize())}),e}}var Ue=Xr;const os=["Unknown","Point","LineString","Polygon"];class as{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null,this.featureTileCoord=null,this.featureDistanceData=null}id(){return this.feature&&this.feature.id!==void 0?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?os[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}distanceFromCenter(){if(this.featureTileCoord&&this.featureDistanceData){const e=this.featureDistanceData.center,r=this.featureDistanceData.scale,{x:n,y:i}=this.featureTileCoord,o=n*r-e[0],a=i*r-e[1],s=this.featureDistanceData.bearing[0],l=this.featureDistanceData.bearing[1];return s*o+l*a}return 0}parseColor(e){let r=this._parseColorCache[e];return r||(r=this._parseColorCache[e]=pe.parse(e)),r}}var gi=as;class Ze{constructor(e,r,n,i){this.name=e,this.type=r,this._evaluate=n,this.args=i}evaluate(e){return this._evaluate(e,this.args)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}serialize(){return[this.name].concat(this.args.map(e=>e.serialize()))}static parse(e,r){const n=e[0],i=Ze.definitions[n];if(!i)return r.error(`Unknown expression "${n}". If you wanted a literal array, use ["literal", [...]].`,0);const o=Array.isArray(i)?i[0]:i.type,a=Array.isArray(i)?[[i[1],i[2]]]:i.overloads,s=a.filter(([u])=>!Array.isArray(u)||u.length===e.length-1);let l=null;for(const[u,c]of s){l=new Ti(r.registry,r.path,null,r.scope);const p=[];let d=!1;for(let f=1;fss(d)).join(" | "),p=[];for(let d=1;d=e[2]||t[1]<=e[1]||t[3]>=e[3])}function cs(t,e){const r=ls(t[0]),n=us(t[1]),i=Math.pow(2,e.z);return[Math.round(r*i*Me),Math.round(n*i*Me)]}function ps(t,e,r){const n=t[0]-e[0],i=t[1]-e[1],o=t[0]-r[0],a=t[1]-r[1];return n*a-o*i===0&&n*o<=0&&i*a<=0}function ds(t,e,r){return e[1]>t[1]!=r[1]>t[1]&&t[0]<(r[0]-e[0])*(t[1]-e[1])/(r[1]-e[1])+e[0]}function Kr(t,e){let r=!1;for(let n=0,i=e.length;n0&&p<0||c<0&&p>0}function ms(t,e,r,n){const i=[e[0]-t[0],e[1]-t[1]],o=[n[0]-r[0],n[1]-r[1]];return hs(o,i)===0?!1:!!(jn(t,e,r,n)&&jn(r,n,t,e))}function ys(t,e,r){for(const n of r)for(let i=0;ir[2]){const i=n*.5;let o=t[0]-r[0]>i?-n:r[0]-t[0]>i?n:0;o===0&&(o=t[0]-r[2]>i?-n:r[2]-t[0]>i?n:0),t[0]+=o}Jr(e,t)}function xs(t){t[0]=t[1]=1/0,t[2]=t[3]=-1/0}function $n(t,e,r,n){const i=Math.pow(2,n.z)*Me,o=[n.x*Me,n.y*Me],a=[];if(!t)return a;for(const s of t)for(const l of s){const u=[l.x+o[0],l.y+o[1]];bi(u,e,r,i),a.push(u)}return a}function Ln(t,e,r,n){const i=Math.pow(2,n.z)*Me,o=[n.x*Me,n.y*Me],a=[];if(!t)return a;for(const s of t){const l=[];for(const u of s){const c=[u.x+o[0],u.y+o[1]];Jr(e,c),l.push(c)}a.push(l)}if(e[2]-e[0]<=i/2){xs(e);for(const s of a)for(const l of s)bi(l,e,r,i)}return a}function vs(t,e){const r=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],i=t.canonicalID();if(!i)return!1;if(e.type==="Polygon"){const o=Yr(e.coordinates,n,i),a=$n(t.geometry(),r,n,i);if(!Lt(r,n))return!1;for(const s of a)if(!Kr(s,o))return!1}if(e.type==="MultiPolygon"){const o=vi(e.coordinates,n,i),a=$n(t.geometry(),r,n,i);if(!Lt(r,n))return!1;for(const s of a)if(!fs(s,o))return!1}return!0}function bs(t,e){const r=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],i=t.canonicalID();if(!i)return!1;if(e.type==="Polygon"){const o=Yr(e.coordinates,n,i),a=Ln(t.geometry(),r,n,i);if(!Lt(r,n))return!1;for(const s of a)if(!xi(s,o))return!1}if(e.type==="MultiPolygon"){const o=vi(e.coordinates,n,i),a=Ln(t.geometry(),r,n,i);if(!Lt(r,n))return!1;for(const s of a)if(!gs(s,o))return!1}return!0}class ht{constructor(e,r){this.type=M,this.geojson=e,this.geometries=r}static parse(e,r){if(e.length!==2)return r.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(jt(e[1])){const n=e[1];if(n.type==="FeatureCollection")for(let i=0;i{e&&!Kt(r)&&(e=!1)}),e}function en(t){if(t instanceof Qe&&t.name==="feature-state")return!1;let e=!0;return t.eachChild(r=>{e&&!en(r)&&(e=!1)}),e}function tn(t,e){if(t instanceof Qe&&e.indexOf(t.name)>=0)return!1;let r=!0;return t.eachChild(n=>{r&&!tn(n,e)&&(r=!1)}),r}class rn{constructor(e,r){this.type=r.type,this.name=e,this.boundExpression=r}static parse(e,r){if(e.length!==2||typeof e[1]!="string")return r.error("'var' expression requires exactly one string literal argument.");const n=e[1];return r.scope.has(n)?new rn(n,r.scope.get(n)):r.error(`Unknown variable "${n}". Make sure "${n}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(e){return this.boundExpression.evaluate(e)}eachChild(){}outputDefined(){return!1}serialize(){return["var",this.name]}}var wi=rn;class nn{constructor(e,r=[],n,i=new es,o=[]){this.registry=e,this.path=r,this.key=r.map(a=>`[${a}]`).join(""),this.scope=i,this.errors=o,this.expectedType=n}parse(e,r,n,i,o={}){return r?this.concat(r,n,i)._parse(e,o):this._parse(e,o)}_parse(e,r){(e===null||typeof e=="string"||typeof e=="boolean"||typeof e=="number")&&(e=["literal",e]);function n(i,o,a){return a==="assert"?new Fe(o,[i]):a==="coerce"?new Ue(o,[i]):i}if(Array.isArray(e)){if(e.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const i=e[0];if(typeof i!="string")return this.error(`Expression name must be a string, but found ${typeof i} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const o=this.registry[i];if(o){let a=o.parse(e,this);if(!a)return null;if(this.expectedType){const s=this.expectedType,l=a.type;if((s.kind==="string"||s.kind==="number"||s.kind==="boolean"||s.kind==="object"||s.kind==="array")&&l.kind==="value")a=n(a,s,r.typeAnnotation||"assert");else if((s.kind==="color"||s.kind==="formatted"||s.kind==="resolvedImage")&&(l.kind==="value"||l.kind==="string"))a=n(a,s,r.typeAnnotation||"coerce");else if(this.checkSubtype(s,l))return null}if(!(a instanceof $t)&&a.type.kind!=="resolvedImage"&&Ir(a)){const s=new gi;try{a=new $t(a.type,a.evaluate(s))}catch(l){return this.error(l.message),null}}return a}return this.error(`Unknown expression "${i}". If you wanted a literal array, use ["literal", [...]].`,0)}else return typeof e>"u"?this.error("'undefined' value invalid. Use null instead."):typeof e=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error(`Expected an array, but found ${typeof e} instead.`)}concat(e,r,n){const i=typeof e=="number"?this.path.concat(e):this.path,o=n?this.scope.concat(n):this.scope;return new nn(this.registry,i,r||null,o,this.errors)}error(e,...r){const n=`${this.key}${r.map(i=>`[${i}]`).join("")}`;this.errors.push(new be(n,e))}checkSubtype(e,r){const n=yt(e,r);return n&&this.error(n),n}}var Ti=nn;function Ir(t){if(t instanceof wi)return Ir(t.boundExpression);if(t instanceof Qe&&t.name==="error")return!1;if(t instanceof Jt)return!1;if(t instanceof Qr)return!1;const e=t instanceof Ue||t instanceof Fe;let r=!0;return t.eachChild(n=>{e?r=r&&Ir(n):r=r&&n instanceof $t}),r?Kt(t)&&tn(t,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center"]):!1}function ki(t,e){const r=t.length-1;let n=0,i=r,o=0,a,s;for(;n<=i;)if(o=Math.floor((n+i)/2),a=t[o],s=t[o+1],a<=e){if(o===r||ee)i=o-1;else throw new re("Input is not a number.");return 0}class on{constructor(e,r,n){this.type=e,this.input=r,this.labels=[],this.outputs=[];for(const[i,o]of n)this.labels.push(i),this.outputs.push(o)}static parse(e,r){if(e.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!==0)return r.error("Expected an even number of arguments.");const n=r.parse(e[1],1,y);if(!n)return null;const i=[];let o=null;r.expectedType&&r.expectedType.kind!=="value"&&(o=r.expectedType);for(let a=1;a=s)return r.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',u);const p=r.parse(l,c,o);if(!p)return null;o=o||p.type,i.push([s,p])}return new on(o,n,i)}evaluate(e){const r=this.labels,n=this.outputs;if(r.length===1)return n[0].evaluate(e);const i=this.input.evaluate(e);if(i<=r[0])return n[0].evaluate(e);const o=r.length;if(i>=r[o-1])return n[o-1].evaluate(e);const a=ki(r,i);return n[a].evaluate(e)}eachChild(e){e(this.input);for(const r of this.outputs)e(r)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}serialize(){const e=["step",this.input.serialize()];for(let r=0;r0&&e.push(this.labels[r]),e.push(this.outputs[r].serialize());return e}}var zi=on,ws=et;function et(t,e,r,n){this.cx=3*t,this.bx=3*(r-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(n-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=n,this.p2x=r,this.p2y=n}et.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t};et.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t};et.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx};et.prototype.solveCurveX=function(t,e){typeof e>"u"&&(e=1e-6);var r,n,i,o,a;for(i=t,a=0;a<8;a++){if(o=this.sampleCurveX(i)-t,Math.abs(o)n)return n;for(;ro?r=i:n=i,i=(n-r)*.5+r}return i};et.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var Ts=hi(ws);function ce(t,e,r){return t*(1-r)+e*r}function ks(t,e,r){return new pe(ce(t.r,e.r,r),ce(t.g,e.g,r),ce(t.b,e.b,r),ce(t.a,e.a,r))}function zs(t,e,r){return t.map((n,i)=>ce(n,e[i],r))}var Fs=Object.freeze({__proto__:null,number:ce,color:ks,array:zs});const Fi=.95047,Si=1,Ci=1.08883,Ei=4/29,Xe=6/29,Ii=3*Xe*Xe,Ss=Xe*Xe*Xe,Cs=Math.PI/180,Es=180/Math.PI;function pr(t){return t>Ss?Math.pow(t,1/3):t/Ii+Ei}function dr(t){return t>Xe?t*t*t:Ii*(t-Ei)}function fr(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function hr(t){return t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Mi(t){const e=hr(t.r),r=hr(t.g),n=hr(t.b),i=pr((.4124564*e+.3575761*r+.1804375*n)/Fi),o=pr((.2126729*e+.7151522*r+.072175*n)/Si),a=pr((.0193339*e+.119192*r+.9503041*n)/Ci);return{l:116*o-16,a:500*(i-o),b:200*(o-a),alpha:t.a}}function Ri(t){let e=(t.l+16)/116,r=isNaN(t.a)?e:e+t.a/500,n=isNaN(t.b)?e:e-t.b/200;return e=Si*dr(e),r=Fi*dr(r),n=Ci*dr(n),new pe(fr(3.2404542*r-1.5371385*e-.4985314*n),fr(-.969266*r+1.8760108*e+.041556*n),fr(.0556434*r-.2040259*e+1.0572252*n),t.alpha)}function Is(t,e,r){return{l:ce(t.l,e.l,r),a:ce(t.a,e.a,r),b:ce(t.b,e.b,r),alpha:ce(t.alpha,e.alpha,r)}}function Ms(t){const{l:e,a:r,b:n}=Mi(t),i=Math.atan2(n,r)*Es;return{h:i<0?i+360:i,c:Math.sqrt(r*r+n*n),l:e,alpha:t.a}}function Rs(t){const e=t.h*Cs,r=t.c,n=t.l;return Ri({l:n,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})}function _s(t,e,r){const n=e-t;return t+r*(n>180||n<-180?n-360*Math.round(n/360):n)}function Ps(t,e,r){return{h:_s(t.h,e.h,r),c:ce(t.c,e.c,r),l:ce(t.l,e.l,r),alpha:ce(t.alpha,e.alpha,r)}}const Et={forward:Mi,reverse:Ri,interpolate:Is},It={forward:Ms,reverse:Rs,interpolate:Ps};class Ot{constructor(e,r,n,i,o){this.type=e,this.operator=r,this.interpolation=n,this.input=i,this.labels=[],this.outputs=[];for(const[a,s]of o)this.labels.push(a),this.outputs.push(s)}static interpolationFactor(e,r,n,i){let o=0;if(e.name==="exponential")o=mr(r,e.base,n,i);else if(e.name==="linear")o=mr(r,1,n,i);else if(e.name==="cubic-bezier"){const a=e.controlPoints;o=new Ts(a[0],a[1],a[2],a[3]).solve(mr(r,1,n,i))}return o}static parse(e,r){let[n,i,o,...a]=e;if(!Array.isArray(i)||i.length===0)return r.error("Expected an interpolation type expression.",1);if(i[0]==="linear")i={name:"linear"};else if(i[0]==="exponential"){const u=i[1];if(typeof u!="number")return r.error("Exponential interpolation requires a numeric base.",1,1);i={name:"exponential",base:u}}else if(i[0]==="cubic-bezier"){const u=i.slice(1);if(u.length!==4||u.some(c=>typeof c!="number"||c<0||c>1))return r.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);i={name:"cubic-bezier",controlPoints:u}}else return r.error(`Unknown interpolation type ${String(i[0])}`,1,0);if(e.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!==0)return r.error("Expected an even number of arguments.");if(o=r.parse(o,2,y),!o)return null;const s=[];let l=null;n==="interpolate-hcl"||n==="interpolate-lab"?l=Se:r.expectedType&&r.expectedType.kind!=="value"&&(l=r.expectedType);for(let u=0;u=c)return r.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',d);const h=r.parse(p,f,l);if(!h)return null;l=l||h.type,s.push([c,h])}return l.kind!=="number"&&l.kind!=="color"&&!(l.kind==="array"&&l.itemType.kind==="number"&&typeof l.N=="number")?r.error(`Type ${Z(l)} is not interpolatable.`):new Ot(l,n,i,o,s)}evaluate(e){const r=this.labels,n=this.outputs;if(r.length===1)return n[0].evaluate(e);const i=this.input.evaluate(e);if(i<=r[0])return n[0].evaluate(e);const o=r.length;if(i>=r[o-1])return n[o-1].evaluate(e);const a=ki(r,i),s=r[a],l=r[a+1],u=Ot.interpolationFactor(this.interpolation,i,s,l),c=n[a].evaluate(e),p=n[a+1].evaluate(e);return this.operator==="interpolate"?Fs[this.type.kind.toLowerCase()](c,p,u):this.operator==="interpolate-hcl"?It.reverse(It.interpolate(It.forward(c),It.forward(p),u)):Et.reverse(Et.interpolate(Et.forward(c),Et.forward(p),u))}eachChild(e){e(this.input);for(const r of this.outputs)e(r)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}serialize(){let e;this.interpolation.name==="linear"?e=["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?e=["linear"]:e=["exponential",this.interpolation.base]:e=["cubic-bezier"].concat(this.interpolation.controlPoints);const r=[this.operator,e,this.input.serialize()];for(let n=0;nyt(i,s.type))?new qt(R,o):new qt(n,o)}evaluate(e){let r=null,n=0,i;for(const o of this.args){if(n++,r=o.evaluate(e),r&&r instanceof Re&&!r.available&&(i||(i=r),r=null,n===this.args.length))return i;if(r!==null)break}return r}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){const e=["coalesce"];return this.eachChild(r=>{e.push(r.serialize())}),e}}var _i=qt;class an{constructor(e,r){this.type=r.type,this.bindings=[].concat(e),this.result=r}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(const r of this.bindings)e(r[1]);e(this.result)}static parse(e,r){if(e.length<4)return r.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);const n=[];for(let o=1;o=n.length)throw new re(`Array index out of bounds: ${r} > ${n.length-1}.`);if(r!==Math.floor(r))throw new re(`Array index must be an integer, but found ${r} instead.`);return n[r]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}serialize(){return["at",this.index.serialize(),this.input.serialize()]}}var As=sn;class ln{constructor(e,r){this.type=M,this.needle=e,this.haystack=r}static parse(e,r){if(e.length!==3)return r.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const n=r.parse(e[1],1,R),i=r.parse(e[2],2,R);return!n||!i?null:Ur(n.type,[M,P,y,Ut,R])?new ln(n,i):r.error(`Expected first argument to be of type boolean, string, number or null, but found ${Z(n.type)} instead`)}evaluate(e){const r=this.needle.evaluate(e),n=this.haystack.evaluate(e);if(n==null)return!1;if(!gt(r,["boolean","string","number","null"]))throw new re(`Expected first argument to be of type boolean, string, number or null, but found ${Z(ee(r))} instead.`);if(!gt(n,["string","array"]))throw new re(`Expected second argument to be of type array or string, but found ${Z(ee(n))} instead.`);return n.indexOf(r)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}serialize(){return["in",this.needle.serialize(),this.haystack.serialize()]}}var Ds=ln;class Gt{constructor(e,r,n){this.type=y,this.needle=e,this.haystack=r,this.fromIndex=n}static parse(e,r){if(e.length<=2||e.length>=5)return r.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const n=r.parse(e[1],1,R),i=r.parse(e[2],2,R);if(!n||!i)return null;if(!Ur(n.type,[M,P,y,Ut,R]))return r.error(`Expected first argument to be of type boolean, string, number or null, but found ${Z(n.type)} instead`);if(e.length===4){const o=r.parse(e[3],3,y);return o?new Gt(n,i,o):null}else return new Gt(n,i)}evaluate(e){const r=this.needle.evaluate(e),n=this.haystack.evaluate(e);if(!gt(r,["boolean","string","number","null"]))throw new re(`Expected first argument to be of type boolean, string, number or null, but found ${Z(ee(r))} instead.`);if(!gt(n,["string","array"]))throw new re(`Expected second argument to be of type array or string, but found ${Z(ee(n))} instead.`);if(this.fromIndex){const i=this.fromIndex.evaluate(e);return n.indexOf(r,i)}return n.indexOf(r)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}serialize(){if(this.fromIndex!=null&&this.fromIndex!==void 0){const e=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),e]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}var js=Gt;class un{constructor(e,r,n,i,o,a){this.inputType=e,this.type=r,this.input=n,this.cases=i,this.outputs=o,this.otherwise=a}static parse(e,r){if(e.length<5)return r.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!==1)return r.error("Expected an even number of arguments.");let n,i;r.expectedType&&r.expectedType.kind!=="value"&&(i=r.expectedType);const o={},a=[];for(let u=2;uNumber.MAX_SAFE_INTEGER)return d.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof h=="number"&&Math.floor(h)!==h)return d.error("Numeric branch labels must be integer values.");if(!n)n=ee(h);else if(d.checkSubtype(n,ee(h)))return null;if(typeof o[String(h)]<"u")return d.error("Branch labels must be unique.");o[String(h)]=a.length}const f=r.parse(p,u,i);if(!f)return null;i=i||f.type,a.push(f)}const s=r.parse(e[1],1,R);if(!s)return null;const l=r.parse(e[e.length-1],e.length-1,i);return!l||s.type.kind!=="value"&&r.concat(1).checkSubtype(n,s.type)?null:new un(n,i,s,o,a,l)}evaluate(e){const r=this.input.evaluate(e);return(ee(r)===this.inputType&&this.outputs[this.cases[r]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}serialize(){const e=["match",this.input.serialize()],r=Object.keys(this.cases).sort(),n=[],i={};for(const a of r){const s=i[this.cases[a]];s===void 0?(i[this.cases[a]]=n.length,n.push([this.cases[a],[a]])):n[s][1].push(a)}const o=a=>this.inputType.kind==="number"?Number(a):a;for(const[a,s]of n)s.length===1?e.push(o(s[0])):e.push(s.map(o)),e.push(this.outputs[a].serialize());return e.push(this.otherwise.serialize()),e}}var $s=un;class cn{constructor(e,r,n){this.type=e,this.branches=r,this.otherwise=n}static parse(e,r){if(e.length<4)return r.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!==0)return r.error("Expected an odd number of arguments.");let n;r.expectedType&&r.expectedType.kind!=="value"&&(n=r.expectedType);const i=[];for(let a=1;ar.outputDefined())&&this.otherwise.outputDefined()}serialize(){const e=["case"];return this.eachChild(r=>{e.push(r.serialize())}),e}}var Ls=cn;class Nt{constructor(e,r,n,i){this.type=e,this.input=r,this.beginIndex=n,this.endIndex=i}static parse(e,r){if(e.length<=2||e.length>=5)return r.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const n=r.parse(e[1],1,R),i=r.parse(e[2],2,y);if(!n||!i)return null;if(!Ur(n.type,[ge(R),P,R]))return r.error(`Expected first argument to be of type array or string, but found ${Z(n.type)} instead`);if(e.length===4){const o=r.parse(e[3],3,y);return o?new Nt(n.type,n,i,o):null}else return new Nt(n.type,n,i)}evaluate(e){const r=this.input.evaluate(e),n=this.beginIndex.evaluate(e);if(!gt(r,["string","array"]))throw new re(`Expected first argument to be of type array or string, but found ${Z(ee(r))} instead.`);if(this.endIndex){const i=this.endIndex.evaluate(e);return r.slice(n,i)}return r.slice(n)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}serialize(){if(this.endIndex!=null&&this.endIndex!==void 0){const e=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),e]}return["slice",this.input.serialize(),this.beginIndex.serialize()]}}var Os=Nt;function On(t,e){return t==="=="||t==="!="?e.kind==="boolean"||e.kind==="string"||e.kind==="number"||e.kind==="null"||e.kind==="value":e.kind==="string"||e.kind==="number"||e.kind==="value"}function qs(t,e,r){return e===r}function Gs(t,e,r){return e!==r}function Ns(t,e,r){return er}function Bs(t,e,r){return e<=r}function Us(t,e,r){return e>=r}function Ai(t,e,r,n){return n.compare(e,r)===0}function Zs(t,e,r,n){return!Ai(t,e,r,n)}function Hs(t,e,r,n){return n.compare(e,r)<0}function Ws(t,e,r,n){return n.compare(e,r)>0}function Xs(t,e,r,n){return n.compare(e,r)<=0}function Js(t,e,r,n){return n.compare(e,r)>=0}function tt(t,e,r){const n=t!=="=="&&t!=="!=";return class Di{constructor(o,a,s){this.type=M,this.lhs=o,this.rhs=a,this.collator=s,this.hasUntypedArgument=o.type.kind==="value"||a.type.kind==="value"}static parse(o,a){if(o.length!==3&&o.length!==4)return a.error("Expected two or three arguments.");const s=o[0];let l=a.parse(o[1],1,R);if(!l)return null;if(!On(s,l.type))return a.concat(1).error(`"${s}" comparisons are not supported for type '${Z(l.type)}'.`);let u=a.parse(o[2],2,R);if(!u)return null;if(!On(s,u.type))return a.concat(2).error(`"${s}" comparisons are not supported for type '${Z(u.type)}'.`);if(l.type.kind!==u.type.kind&&l.type.kind!=="value"&&u.type.kind!=="value")return a.error(`Cannot compare types '${Z(l.type)}' and '${Z(u.type)}'.`);n&&(l.type.kind==="value"&&u.type.kind!=="value"?l=new Fe(u.type,[l]):l.type.kind!=="value"&&u.type.kind==="value"&&(u=new Fe(l.type,[u])));let c=null;if(o.length===4){if(l.type.kind!=="string"&&u.type.kind!=="string"&&l.type.kind!=="value"&&u.type.kind!=="value")return a.error("Cannot use collator to compare non-string types.");if(c=a.parse(o[3],3,Zt),!c)return null}return new Di(l,u,c)}evaluate(o){const a=this.lhs.evaluate(o),s=this.rhs.evaluate(o);if(n&&this.hasUntypedArgument){const l=ee(a),u=ee(s);if(l.kind!==u.kind||!(l.kind==="string"||l.kind==="number"))throw new re(`Expected arguments for "${t}" to be (string, string) or (number, number), but found (${l.kind}, ${u.kind}) instead.`)}if(this.collator&&!n&&this.hasUntypedArgument){const l=ee(a),u=ee(s);if(l.kind!=="string"||u.kind!=="string")return e(o,a,s)}return this.collator?r(o,a,s,this.collator.evaluate(o)):e(o,a,s)}eachChild(o){o(this.lhs),o(this.rhs),this.collator&&o(this.collator)}outputDefined(){return!0}serialize(){const o=[t];return this.eachChild(a=>{o.push(a.serialize())}),o}}}const Ks=tt("==",qs,Ai),Ys=tt("!=",Gs,Zs),Qs=tt("<",Ns,Hs),el=tt(">",Vs,Ws),tl=tt("<=",Bs,Xs),rl=tt(">=",Us,Js);class pn{constructor(e,r,n,i,o,a){this.type=P,this.number=e,this.locale=r,this.currency=n,this.unit=i,this.minFractionDigits=o,this.maxFractionDigits=a}static parse(e,r){if(e.length!==3)return r.error("Expected two arguments.");const n=r.parse(e[1],1,y);if(!n)return null;const i=e[2];if(typeof i!="object"||Array.isArray(i))return r.error("NumberFormat options argument must be an object.");let o=null;if(i.locale&&(o=r.parse(i.locale,1,P),!o))return null;let a=null;if(i.currency&&(a=r.parse(i.currency,1,P),!a))return null;let s=null;if(i.unit&&(s=r.parse(i.unit,1,P),!s))return null;let l=null;if(i["min-fraction-digits"]&&(l=r.parse(i["min-fraction-digits"],1,y),!l))return null;let u=null;return i["max-fraction-digits"]&&(u=r.parse(i["max-fraction-digits"],1,y),!u)?null:new pn(n,o,a,s,l,u)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency&&"currency"||this.unit&&"unit"||"decimal",currency:this.currency?this.currency.evaluate(e):void 0,unit:this.unit?this.unit.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.unit&&e(this.unit),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}serialize(){const e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.unit&&(e.unit=this.unit.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]}}class dn{constructor(e){this.type=y,this.input=e}static parse(e,r){if(e.length!==2)return r.error(`Expected 1 argument, but found ${e.length-1} instead.`);const n=r.parse(e[1],1);return n?n.type.kind!=="array"&&n.type.kind!=="string"&&n.type.kind!=="value"?r.error(`Expected argument of type string or array, but found ${Z(n.type)} instead.`):new dn(n):null}evaluate(e){const r=this.input.evaluate(e);if(typeof r=="string")return r.length;if(Array.isArray(r))return r.length;throw new re(`Expected value to be of type string or array, but found ${Z(ee(r))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}serialize(){const e=["length"];return this.eachChild(r=>{e.push(r.serialize())}),e}}var nl=dn;const ji={"==":Ks,"!=":Ys,">":el,"<":Qs,">=":rl,"<=":tl,array:Fe,at:As,boolean:Fe,case:Ls,coalesce:_i,collator:Jt,format:Wt,image:Xt,in:Ds,"index-of":js,interpolate:De,"interpolate-hcl":De,"interpolate-lab":De,length:nl,let:Pi,literal:$t,match:$s,number:Fe,"number-format":pn,object:Fe,slice:Os,step:zi,string:Fe,"to-boolean":Ue,"to-color":Ue,"to-number":Ue,"to-string":Ue,var:wi,within:Qr};function qn(t,[e,r,n,i]){e=e.evaluate(t),r=r.evaluate(t),n=n.evaluate(t);const o=i?i.evaluate(t):1,a=yi(e,r,n,o);if(a)throw new re(a);return new pe(e/255*o,r/255*o,n/255*o,o)}function Gn(t,e){return t in e}function yr(t,e){const r=e[t];return typeof r>"u"?null:r}function il(t,e,r,n){for(;r<=n;){const i=r+n>>1;if(e[i]===t)return!0;e[i]>t?n=i-1:r=i+1}return!1}function _e(t){return{type:t}}Qe.register(ji,{error:[ts,[P],(t,[e])=>{throw new re(e.evaluate(t))}],typeof:[P,[R],(t,[e])=>Z(ee(e.evaluate(t)))],"to-rgba":[ge(y,4),[Se],(t,[e])=>e.evaluate(t).toArray()],rgb:[Se,[y,y,y],qn],rgba:[Se,[y,y,y,y],qn],has:{type:M,overloads:[[[P],(t,[e])=>Gn(e.evaluate(t),t.properties())],[[P,We],(t,[e,r])=>Gn(e.evaluate(t),r.evaluate(t))]]},get:{type:R,overloads:[[[P],(t,[e])=>yr(e.evaluate(t),t.properties())],[[P,We],(t,[e,r])=>yr(e.evaluate(t),r.evaluate(t))]]},"feature-state":[R,[P],(t,[e])=>yr(e.evaluate(t),t.featureState||{})],properties:[We,[],t=>t.properties()],"geometry-type":[P,[],t=>t.geometryType()],id:[R,[],t=>t.id()],zoom:[y,[],t=>t.globals.zoom],pitch:[y,[],t=>t.globals.pitch||0],"distance-from-center":[y,[],t=>t.distanceFromCenter()],"heatmap-density":[y,[],t=>t.globals.heatmapDensity||0],"line-progress":[y,[],t=>t.globals.lineProgress||0],"sky-radial-progress":[y,[],t=>t.globals.skyRadialProgress||0],accumulated:[R,[],t=>t.globals.accumulated===void 0?null:t.globals.accumulated],"+":[y,_e(y),(t,e)=>{let r=0;for(const n of e)r+=n.evaluate(t);return r}],"*":[y,_e(y),(t,e)=>{let r=1;for(const n of e)r*=n.evaluate(t);return r}],"-":{type:y,overloads:[[[y,y],(t,[e,r])=>e.evaluate(t)-r.evaluate(t)],[[y],(t,[e])=>-e.evaluate(t)]]},"/":[y,[y,y],(t,[e,r])=>e.evaluate(t)/r.evaluate(t)],"%":[y,[y,y],(t,[e,r])=>e.evaluate(t)%r.evaluate(t)],ln2:[y,[],()=>Math.LN2],pi:[y,[],()=>Math.PI],e:[y,[],()=>Math.E],"^":[y,[y,y],(t,[e,r])=>Math.pow(e.evaluate(t),r.evaluate(t))],sqrt:[y,[y],(t,[e])=>Math.sqrt(e.evaluate(t))],log10:[y,[y],(t,[e])=>Math.log(e.evaluate(t))/Math.LN10],ln:[y,[y],(t,[e])=>Math.log(e.evaluate(t))],log2:[y,[y],(t,[e])=>Math.log(e.evaluate(t))/Math.LN2],sin:[y,[y],(t,[e])=>Math.sin(e.evaluate(t))],cos:[y,[y],(t,[e])=>Math.cos(e.evaluate(t))],tan:[y,[y],(t,[e])=>Math.tan(e.evaluate(t))],asin:[y,[y],(t,[e])=>Math.asin(e.evaluate(t))],acos:[y,[y],(t,[e])=>Math.acos(e.evaluate(t))],atan:[y,[y],(t,[e])=>Math.atan(e.evaluate(t))],min:[y,_e(y),(t,e)=>Math.min(...e.map(r=>r.evaluate(t)))],max:[y,_e(y),(t,e)=>Math.max(...e.map(r=>r.evaluate(t)))],abs:[y,[y],(t,[e])=>Math.abs(e.evaluate(t))],round:[y,[y],(t,[e])=>{const r=e.evaluate(t);return r<0?-Math.round(-r):Math.round(r)}],floor:[y,[y],(t,[e])=>Math.floor(e.evaluate(t))],ceil:[y,[y],(t,[e])=>Math.ceil(e.evaluate(t))],"filter-==":[M,[P,R],(t,[e,r])=>t.properties()[e.value]===r.value],"filter-id-==":[M,[R],(t,[e])=>t.id()===e.value],"filter-type-==":[M,[P],(t,[e])=>t.geometryType()===e.value],"filter-<":[M,[P,R],(t,[e,r])=>{const n=t.properties()[e.value],i=r.value;return typeof n==typeof i&&n{const r=t.id(),n=e.value;return typeof r==typeof n&&r":[M,[P,R],(t,[e,r])=>{const n=t.properties()[e.value],i=r.value;return typeof n==typeof i&&n>i}],"filter-id->":[M,[R],(t,[e])=>{const r=t.id(),n=e.value;return typeof r==typeof n&&r>n}],"filter-<=":[M,[P,R],(t,[e,r])=>{const n=t.properties()[e.value],i=r.value;return typeof n==typeof i&&n<=i}],"filter-id-<=":[M,[R],(t,[e])=>{const r=t.id(),n=e.value;return typeof r==typeof n&&r<=n}],"filter->=":[M,[P,R],(t,[e,r])=>{const n=t.properties()[e.value],i=r.value;return typeof n==typeof i&&n>=i}],"filter-id->=":[M,[R],(t,[e])=>{const r=t.id(),n=e.value;return typeof r==typeof n&&r>=n}],"filter-has":[M,[R],(t,[e])=>e.value in t.properties()],"filter-has-id":[M,[],t=>t.id()!==null&&t.id()!==void 0],"filter-type-in":[M,[ge(P)],(t,[e])=>e.value.indexOf(t.geometryType())>=0],"filter-id-in":[M,[ge(R)],(t,[e])=>e.value.indexOf(t.id())>=0],"filter-in-small":[M,[P,ge(R)],(t,[e,r])=>r.value.indexOf(t.properties()[e.value])>=0],"filter-in-large":[M,[P,ge(R)],(t,[e,r])=>il(t.properties()[e.value],r.value,0,r.value.length-1)],all:{type:M,overloads:[[[M,M],(t,[e,r])=>e.evaluate(t)&&r.evaluate(t)],[_e(M),(t,e)=>{for(const r of e)if(!r.evaluate(t))return!1;return!0}]]},any:{type:M,overloads:[[[M,M],(t,[e,r])=>e.evaluate(t)||r.evaluate(t)],[_e(M),(t,e)=>{for(const r of e)if(r.evaluate(t))return!0;return!1}]]},"!":[M,[M],(t,[e])=>!e.evaluate(t)],"is-supported-script":[M,[P],(t,[e])=>{const r=t.globals&&t.globals.isSupportedScript;return r?r(e.evaluate(t)):!0}],upcase:[P,[P],(t,[e])=>e.evaluate(t).toUpperCase()],downcase:[P,[P],(t,[e])=>e.evaluate(t).toLowerCase()],concat:[P,_e(R),(t,e)=>e.map(r=>ft(r.evaluate(t))).join("")],"resolved-locale":[P,[Zt],(t,[e])=>e.evaluate(t).resolvedLocale()]});var $i=ji;function Mr(t){return{result:"success",value:t}}function Ne(t){return{result:"error",value:t}}function ol(t){return t["property-type"]==="data-driven"}function al(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function sl(t){return!!t.expression&&t.expression.interpolated}function Li(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}class ll{constructor(e,r){this.expression=e,this._warningHistory={},this._evaluator=new gi,this._defaultValue=r?dl(r):null,this._enumValues=r&&r.type==="enum"?r.values:null}evaluateWithoutErrorHandling(e,r,n,i,o,a,s,l){return this._evaluator.globals=e,this._evaluator.feature=r,this._evaluator.featureState=n,this._evaluator.canonical=i||null,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=a,this._evaluator.featureTileCoord=s||null,this._evaluator.featureDistanceData=l||null,this.expression.evaluate(this._evaluator)}evaluate(e,r,n,i,o,a,s,l){this._evaluator.globals=e,this._evaluator.feature=r||null,this._evaluator.featureState=n||null,this._evaluator.canonical=i||null,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=a||null,this._evaluator.featureTileCoord=s||null,this._evaluator.featureDistanceData=l||null;try{const u=this.expression.evaluate(this._evaluator);if(u==null||typeof u=="number"&&u!==u)return this._defaultValue;if(this._enumValues&&!(u in this._enumValues))throw new re(`Expected value to be one of ${Object.keys(this._enumValues).map(c=>JSON.stringify(c)).join(", ")}, but found ${JSON.stringify(u)} instead.`);return u}catch(u){return this._warningHistory[u.message]||(this._warningHistory[u.message]=!0,typeof console<"u"&&console.warn(u.message)),this._defaultValue}}}function ul(t){return Array.isArray(t)&&t.length>0&&typeof t[0]=="string"&&t[0]in $i}function Rr(t,e){const r=new Ti($i,[],e?pl(e):void 0),n=r.parse(t,void 0,void 0,void 0,e&&e.type==="string"?{typeAnnotation:"coerce"}:void 0);return n?Mr(new ll(n,e)):Ne(r.errors)}class Nn{constructor(e,r){this.kind=e,this._styleExpression=r,this.isStateDependent=e!=="constant"&&!en(r.expression)}evaluateWithoutErrorHandling(e,r,n,i,o,a){return this._styleExpression.evaluateWithoutErrorHandling(e,r,n,i,o,a)}evaluate(e,r,n,i,o,a){return this._styleExpression.evaluate(e,r,n,i,o,a)}}class Vn{constructor(e,r,n,i){this.kind=e,this.zoomStops=n,this._styleExpression=r,this.isStateDependent=e!=="camera"&&!en(r.expression),this.interpolationType=i}evaluateWithoutErrorHandling(e,r,n,i,o,a){return this._styleExpression.evaluateWithoutErrorHandling(e,r,n,i,o,a)}evaluate(e,r,n,i,o,a){return this._styleExpression.evaluate(e,r,n,i,o,a)}interpolationFactor(e,r,n){return this.interpolationType?De.interpolationFactor(this.interpolationType,e,r,n):0}}function cl(t,e){if(t=Rr(t,e),t.result==="error")return t;const r=t.value.expression,n=Kt(r);if(!n&&!ol(e))return Ne([new be("","data expressions not supported")]);const i=tn(r,["zoom","pitch","distance-from-center"]);if(!i&&!al(e))return Ne([new be("","zoom expressions not supported")]);const o=Pt(r);if(!o&&!i)return Ne([new be("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(o instanceof be)return Ne([o]);if(o instanceof De&&!sl(e))return Ne([new be("",'"interpolate" expressions cannot be used with this property')]);if(!o)return Mr(n?new Nn("constant",t.value):new Nn("source",t.value));const a=o instanceof De?o.interpolation:void 0;return Mr(n?new Vn("camera",t.value,o.labels,a):new Vn("composite",t.value,o.labels,a))}function Pt(t){let e=null;if(t instanceof Pi)e=Pt(t.result);else if(t instanceof _i){for(const r of t.args)if(e=Pt(r),e)break}else(t instanceof zi||t instanceof De)&&t.input instanceof Qe&&t.input.name==="zoom"&&(e=t);return e instanceof be||t.eachChild(r=>{const n=Pt(r);n instanceof be?e=n:!e&&n?e=new be("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&n&&e!==n&&(e=new be("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),e}function pl(t){const e={color:Se,string:P,number:y,enum:P,boolean:M,formatted:Ht,resolvedImage:xt};return t.type==="array"?ge(e[t.value]||R,t.length):e[t.type]}function dl(t){return t.type==="color"&&(Li(t.default)||Array.isArray(t.default))?new pe(0,0,0,0):t.type==="color"?pe.parse(t.default)||null:t.default===void 0?null:t.default}function fl(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function _r(t){if(Array.isArray(t))return t.map(_r);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){const e={};for(const r in t)e[r]=_r(t[r]);return e}return fl(t)}var Oi={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},terrain:{type:"terrain"},fog:{type:"fog"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},projection:{type:"projection"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{},sky:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background","layout_sky"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_sky:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"},"fill-extrusion-edge-radius":{type:"number",private:!0,default:0,minimum:0,maximum:1,"property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_symbol:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature","pitch","distance-from-center"]}},filter_fill:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_line:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_circle:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},"filter_fill-extrusion":{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_heatmap:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},"index-of":{group:"Lookup"},slice:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Camera"},pitch:{group:"Camera"},"distance-from-center":{group:"Camera"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},"sky-radial-progress":{group:"sky"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},distance:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},within:{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},fog:{range:{type:"array",default:[.5,10],minimum:-20,maximum:20,length:2,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"high-color":{type:"color","property-type":"data-constant",default:"#245cdf",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"space-color":{type:"color","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-blend":{type:"number","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],4,.2,7,.1],minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"star-intensity":{type:"number","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],5,.35,6,0],minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},projection:{name:{type:"enum",values:{albers:{},equalEarth:{},equirectangular:{},lambertConformalConic:{},mercator:{},naturalEarth:{},winkelTripel:{},globe:{}},default:"mercator",required:!0},center:{type:"array",length:2,value:"number","property-type":"data-constant",minimum:[-180,-90],maximum:[180,90],transition:!1,requires:[{name:["albers","lambertConformalConic"]}]},parallels:{type:"array",length:2,value:"number","property-type":"data-constant",minimum:[-90,-90],maximum:[90,90],transition:!1,requires:[{name:["albers","lambertConformalConic"]}]}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number","property-type":"data-constant",default:1,minimum:0,maximum:1e3,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,requires:["source"]}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!1,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!1,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-ambient-occlusion-intensity":{"property-type":"data-constant",type:"number",private:!0,default:0,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fill-extrusion-ambient-occlusion-radius":{"property-type":"data-constant",type:"number",private:!0,default:3,minimum:0,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,requires:["fill-extrusion-edge-radius"]}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!1,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-pattern":{type:"resolvedImage",transition:!1,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"},"line-trim-offset":{type:"array",value:"number",length:2,default:[0,0],minimum:[0,0],maximum:[1,1],transition:!1,requires:[{source:"geojson",has:{lineMetrics:!0}}],"property-type":"constant"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_sky:{"sky-type":{type:"enum",values:{gradient:{},atmosphere:{}},default:"atmosphere",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{type:"array",value:"number",length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,requires:[{"sky-type":"atmosphere"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{type:"number",requires:[{"sky-type":"atmosphere"}],default:10,minimum:0,maximum:100,transition:!1,"property-type":"data-constant"},"sky-gradient-center":{type:"array",requires:[{"sky-type":"gradient"}],value:"number",default:[0,0],length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{type:"number",requires:[{"sky-type":"gradient"}],default:90,minimum:0,maximum:180,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient":{type:"color",default:["interpolate",["linear"],["sky-radial-progress"],.8,"#87ceeb",1,"white"],transition:!1,requires:[{"sky-type":"gradient"}],expression:{interpolated:!0,parameters:["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{type:"color",default:"white",transition:!1,requires:[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-atmosphere-color":{type:"color",default:"white",transition:!1,requires:[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};function qi(t){if(t===!0||t===!1)return!0;if(!Array.isArray(t)||t.length===0)return!1;switch(t[0]){case"has":return t.length>=2&&t[1]!=="$id"&&t[1]!=="$type";case"in":return t.length>=3&&(typeof t[1]!="string"||Array.isArray(t[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return t.length!==3||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(const e of t.slice(1))if(!qi(e)&&typeof e!="boolean")return!1;return!0;default:return!0}}function hl(t,e="fill"){if(t==null)return{filter:()=>!0,needGeometry:!1,needFeature:!1};qi(t)||(t=Vt(t));const r=t;let n=!0;try{n=ml(r)}catch{console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate. +import{g as Qi,a as eo,j as Q,e as to}from"./Bh0CuZ3gy5tC.js";import{t as ro}from"./B99qq3IKf4kH.js";import{n as ni,o as se,p as no,q as io,s as G,t as oo,v as ao,x as Le,y as ii,z as ct,A as so,E as Ae,G as lo,I as uo,J as co,K as po,L as fo,N as oi,P as ai,Q as rr,R as ho,U as mo,W as xn,X as yo,Y as go,Z as nr,_ as xo,$ as vn,a0 as bn,a1 as vo,a2 as bo,a3 as wo,a4 as To,a5 as ko,a6 as zt,a7 as zo,a8 as si,a9 as $r,aa as Fo,ab as So,ac as Co,ad as kr,ae as li,af as Eo,ag as Io,ah as Mo,ai as Ro,aj as _o,ak as Ke,al as Po,am as Ao,an as Do,ao as jo,ap as zr,aq as $o,ar as Lo,as as Oo,a as Fr,at as qo,au as Dt,av as Go,aw as ui,ax as No,ay as Vo,az as Bo,aA as Uo,aB as Zo,aC as ut,F as Be,aD as Ho,b as ir,aE as Wo,aF as Xo,c as Ie,aG as wn,C as ci,aH as Jo,aI as Tn,S as st,T as Ko,O as Yo,H as Qo,M as ea,u as ta,k as or,g as kn,B as zn,h as Fn,l as ra,m as ar}from"./p-jlpmJ86TPh.js";import{F as na,t as ia,G as Sn,e as oa}from"./0Ump2O8Jg_uq.js";import{L as aa}from"./BWsYSh9PkSaL.js";import{M as sa,a as la,b as ua}from"./D8rToQP6FvST.js";import{V as ca,S as pa,I as da,Z as fa,a as ha}from"./CIcCgABVk_3-.js";import{_ as Cn}from"./CmsKOCeNyeyo.js";import{V as ma,T as sr}from"./Tz2xttM4F6S2.js";import"./BEc19nv24p4W.js";import"./Cq1ZpfgEg4XJ.js";import"./BO_q12Vdyug-.js";import"./DUys4rac0YQP.js";import"./CL_VRsbiqLzM.js";import"./CjjyePfBQlZ7.js";import"./2d5-QpxJNHTD.js";import"./BeFcF3Ti4kY-.js";const En=[];class ya extends ni{constructor(e,r,n,i){super(e,r,{transition:0}),this.context_={},this.executorGroups={},this.loadingSourceTiles=0,this.hitDetectionImageData={},this.replayState_={},this.sourceTiles=[],this.errorTileKeys={},this.wantedResolution,this.getSourceTiles=i.bind(void 0,this),this.wrappedTileCoord=n}getContext(e){const r=se(e);return r in this.context_||(this.context_[r]=no(1,1,En)),this.context_[r]}hasContext(e){return se(e)in this.context_}getImage(e){return this.hasContext(e)?this.getContext(e).canvas:null}getReplayState(e){const r=se(e);return r in this.replayState_||(this.replayState_[r]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedTileZ:-1}),this.replayState_[r]}load(){this.getSourceTiles()}release(){for(const e in this.context_){const r=this.context_[e];io(r),En.push(r.canvas),delete this.context_[e]}super.release()}}let pi=class extends ni{constructor(e,r,n,i,o,a){super(e,r,a),this.extent=null,this.format_=i,this.features_=null,this.loader_,this.projection=null,this.resolution,this.tileLoadFunction_=o,this.url_=n,this.key=n}getFormat(){return this.format_}getFeatures(){return this.features_}load(){this.state==G.IDLE&&(this.setState(G.LOADING),this.tileLoadFunction_(this,this.url_),this.loader_&&this.loader_(this.extent,this.resolution,this.projection))}onLoad(e,r){this.setFeatures(e)}onError(){this.setState(G.ERROR)}setFeatures(e){this.features_=e,this.setState(G.LOADED)}setLoader(e){this.loader_=e}};const ga={image:["Polygon","Circle","LineString","Image","Text"],hybrid:["Polygon","LineString"],vector:[]},In={hybrid:["Image","Text","Default"],vector:["Polygon","Circle","LineString","Image","Text","Default"]};class xa extends oo{constructor(e){super(e),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.renderedLayerRevision_,this.renderedPixelToCoordinateTransform_=null,this.renderedRotation_,this.renderedOpacity_=1,this.tmpTransform_=ao(),this.tileClipContexts_=null}prepareTile(e,r,n){let i;const o=e.getState();return(o===G.LOADED||o===G.ERROR)&&(this.updateExecutorGroup_(e,r,n),this.tileImageNeedsRender_(e)&&(i=!0)),i}getTile(e,r,n,i){const o=i.pixelRatio,a=i.viewState,s=a.resolution,l=a.projection,u=this.getLayer(),c=u.getSource().getTile(e,r,n,o,l),p=i.viewHints,d=!(p[Le.ANIMATING]||p[Le.INTERACTING]);return(d||!c.wantedResolution)&&(c.wantedResolution=s),this.prepareTile(c,o,l)&&(d||Date.now()-i.time<8)&&u.getRenderMode()!=="vector"&&this.renderTileImage_(c,i),super.getTile(e,r,n,i)}isDrawableTile(e){const r=this.getLayer();return super.isDrawableTile(e)&&(r.getRenderMode()==="vector"?se(r)in e.executorGroups:e.hasContext(r))}getTileImage(e){return e.getImage(this.getLayer())}prepareFrame(e){const r=this.getLayer().getRevision();return this.renderedLayerRevision_!==r&&(this.renderedLayerRevision_=r,this.renderedTiles.length=0),super.prepareFrame(e)}updateExecutorGroup_(e,r,n){const i=this.getLayer(),o=i.getRevision(),a=i.getRenderOrder()||null,s=e.wantedResolution,l=e.getReplayState(i);if(!l.dirty&&l.renderedResolution===s&&l.renderedRevision==o&&l.renderedRenderOrder==a)return;const u=i.getSource(),c=!!i.getDeclutter(),p=u.getTileGrid(),f=u.getTileGridForProjection(n).getTileCoordExtent(e.wrappedTileCoord),h=u.getSourceTiles(r,n,e),g=se(i);delete e.hitDetectionImageData[g],e.executorGroups[g]=[],l.dirty=!1;for(let m=0,_=h.length;m<_;++m){const C=h[m];if(C.getState()!=G.LOADED)continue;const E=C.tileCoord,F=p.getTileCoordExtent(E),S=ii(f,F),$=ct(S,i.getRenderBuffer()*s,this.tmpExtent),k=so(F,S)?null:$,I=new bo(0,S,s,r),A=wo(s,r),j=function(x,U){let xe;const vt=x.getStyleFunction()||i.getStyleFunction();if(vt&&(xe=vt(x,s)),xe){const bt=this.renderFeature(x,A,xe,I,c,U);l.dirty=l.dirty||bt}},V=C.getFeatures();a&&a!==l.renderedRenderOrder&&V.sort(a);for(let x=0,U=V.length;x{const I=$?r.declutter[$].all().map(A=>A.value):null;for(let A=0,j=k.length;A{const i=this.getLayer(),o=se(i),a=i.getSource(),s=this.renderedProjection,l=s.getExtent(),u=this.renderedResolution,c=a.getTileGridForProjection(s),p=co(this.renderedPixelToCoordinateTransform_,e.slice()),d=c.getTileCoordForCoordAndResolution(p,u);let f;for(let E=0,F=this.renderedTiles.length;E0){r([]);return}const h=c.getTileCoordExtent(f.wrappedTileCoord),g=oi(h),m=[(p[0]-g[0])/u,(g[1]-p[1])/u],_=f.getSourceTiles().reduce(function(E,F){return E.concat(F.getFeatures())},[]);let C=f.hitDetectionImageData[o];if(!C){const E=ai(c.getTileSize(c.getZForResolution(u,a.zDirection))),F=this.renderedRotation_,S=[this.getRenderTransform(c.getTileCoordCenter(f.wrappedTileCoord),u,0,rr,E[0]*rr,E[1]*rr,0)];C=ho(E,S,_,i.getStyleFunction(),c.getTileCoordExtent(f.wrappedTileCoord),f.getReplayState(i).renderedResolution,F),f.hitDetectionImageData[o]=C}r(mo(m,_,C))})}handleFontsChanged(){const e=this.getLayer();e.getVisible()&&this.renderedLayerRevision_!==void 0&&e.changed()}handleStyleImageChange_(e){this.renderIfReadyAndVisible()}renderDeclutter(e,r){const n=this.context,i=n.globalAlpha;n.globalAlpha=r.opacity;const o=e.viewHints,a=!(o[Le.ANIMATING]||o[Le.INTERACTING]),s=this.renderedTiles;for(let l=0,u=s.length;l=0;--f)p[f].execute(this.context,[this.context.canvas.width,this.context.canvas.height],this.getTileRenderTransform(c,e),e.viewState.rotation,a,xn,d?e.declutter[d]:void 0)}n.globalAlpha=i}renderDeferredInternal(e){const n=this.renderedTiles.reduce((s,l,u)=>(l.executorGroups[se(this.getLayer())].forEach(c=>s.push({executorGroup:c,index:u})),s),[]),i=n.map(({executorGroup:s})=>s.getDeferredZIndexContexts()),o={};for(let s=0,l=n.length;s{i.forEach((l,u)=>{l[s]&&(l[s].forEach(c=>{const{executorGroup:p,index:d}=n[u],f=p.getRenderedContext(),h=f.globalAlpha;f.globalAlpha=this.renderedOpacity_;const g=this.tileClipContexts_[d];g&&g.draw(f),c.draw(f),g&&f.restore(),f.globalAlpha=h,c.clear()}),l[s].length=0)})})}getTileRenderTransform(e,r){const n=r.pixelRatio,i=r.viewState,o=i.center,a=i.resolution,s=i.rotation,l=r.size,u=Math.round(l[0]*n),c=Math.round(l[1]*n),d=this.getLayer().getSource().getTileGridForProjection(r.viewState.projection),f=e.tileCoord,h=d.getTileCoordExtent(e.wrappedTileCoord),g=d.getTileCoordExtent(f,this.tmpExtent)[0]-h[0];return go(nr(this.inversePixelTransform.slice(),1/n,1/n),this.getRenderTransform(o,a,s,n,u,c,g))}postRender(e,r){const n=r.viewHints,i=!(n[Le.ANIMATING]||n[Le.INTERACTING]);this.renderedPixelToCoordinateTransform_=r.pixelToCoordinateTransform.slice(),this.renderedRotation_=r.viewState.rotation,this.renderedOpacity_=r.layerStatesArray[r.layerIndex].opacity;const o=this.getLayer(),a=o.getRenderMode(),s=e.globalAlpha;e.globalAlpha=this.renderedOpacity_;const l=o.getDeclutter(),u=l?In[a].filter(F=>!xn.includes(F)):In[a],c=r.viewState,p=c.rotation,d=o.getSource(),h=d.getTileGridForProjection(c.projection).getZForResolution(c.resolution,d.zDirection),g=this.renderedTiles,m=[],_=[],C=[];let E=!0;for(let F=g.length-1;F>=0;--F){const S=g[F];E=E&&!S.getReplayState(o).dirty;const $=S.executorGroups[se(o)].filter(N=>N.hasExecutors(u));if($.length===0)continue;const k=this.getTileRenderTransform(S,r),I=S.tileCoord[0];let A=!1;const j=$[0].getClipCoords(k);let V=e,b;if(j){b=new xo,V=b.getContext();for(let N=0,T=m.length;N{const s=Co(a),l=n.peek(s);if(l){const u=l.sourceTiles;for(let c=0,p=u.length;c{const f=this.tileUrlFunction(d,e,r),h=this.sourceTileCache.containsKey(f)?this.sourceTileCache.get(f):new this.tileClass(d,f?G.IDLE:G.EMPTY,f,this.format_,this.tileLoadFunction);n.sourceTiles.push(h);const g=h.getState();if(g{this.handleTileChange(_);const C=h.getState();if(C===G.LOADED||C===G.ERROR){const E=h.getKey();E in n.errorTileKeys?h.getState()===G.LOADED&&delete n.errorTileKeys[E]:n.loadingSourceTiles--,C===G.ERROR?n.errorTileKeys[E]=!0:h.removeEventListener(kr.CHANGE,m),n.loadingSourceTiles===0&&n.setState(Io(n.errorTileKeys)?G.LOADED:G.ERROR)}};h.addEventListener(kr.CHANGE,m),n.loadingSourceTiles++}g===G.IDLE&&(h.extent=u.getTileCoordExtent(d),h.projection=r,h.resolution=u.getResolution(d[0]),this.sourceTileCache.set(f,h),h.load())}),n.loadingSourceTiles||n.setState(n.sourceTiles.some(d=>d.getState()===G.ERROR)?G.ERROR:G.LOADED)}return n.sourceTiles}getTile(e,r,n,i,o){const a=Mo(e,r,n),s=this.getKey();let l;if(this.tileCache.containsKey(a)&&(l=this.tileCache.get(a),l.key===s))return l;const u=[e,r,n];let c=this.getTileCoordForTileUrlFunction(u,o);const p=this.getTileGrid().getExtent(),d=this.getTileGridForProjection(o);if(c&&p){const g=d.getTileCoordExtent(c);ct(g,-d.getResolution(e),g),Ae(p,g)||(c=null)}let f=!0;if(c!==null){const g=this.tileGrid,m=d.getResolution(e),_=g.getZForResolution(m,1),C=d.getTileCoordExtent(c);ct(C,-m,C),g.forEachTileCoord(C,_,E=>{f=f&&!this.tileUrlFunction(E,i,o)})}const h=new ya(u,f?G.EMPTY:G.IDLE,c,this.getSourceTiles.bind(this,i,o));return h.key=s,l?(h.interimTile=l,h.refreshInterimChain(),this.tileCache.replace(a,h)):this.tileCache.set(a,h),h}getTileGridForProjection(e){const r=e.getCode();let n=this.tileGrids_[r];if(!n){const i=this.tileGrid,o=i.getResolutions().slice(),a=o.map(function(u,c){return i.getOrigin(c)}),s=o.map(function(u,c){return i.getTileSize(c)}),l=Ro+1;for(let u=o.length;u=200&&r.status<300){let n;try{n=JSON.parse(r.responseText)}catch{this.handleTileJSONError();return}this.handleTileJSONResponse(n)}else this.handleTileJSONError()}onXHRError_(e){this.handleTileJSONError()}getTileJSON(){return this.tileJSON_}handleTileJSONResponse(e){const r=Ke("EPSG:4326"),n=this.getProjection();let i;if(e.bounds!==void 0){const u=Po(r,n);i=Ao(e.bounds,u)}const o=si(n),a=e.minzoom||0,s=e.maxzoom||22,l=$r({extent:o,maxZoom:s,minZoom:a,tileSize:this.tileSize_});if(this.tileGrid=l,this.tileUrlFunction=Do(e.tiles,l),e.attribution&&!this.getAttributions()){const u=i!==void 0?i:o;this.setAttributions(function(c){return Ae(u,c.extent)?[e.attribution]:null})}this.tileJSON_=e,this.setState("ready")}handleTileJSONError(){this.setState("error")}}var Or={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */Or.read=function(t,e,r,n,i){var o,a,s=i*8-n-1,l=(1<>1,c=-7,p=r?i-1:0,d=r?-1:1,f=t[e+p];for(p+=d,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=o*256+t[e+p],p+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=a*256+t[e+p],p+=d,c-=8);if(o===0)o=1-u;else{if(o===l)return a?NaN:(f?-1:1)*(1/0);a=a+Math.pow(2,n),o=o-u}return(f?-1:1)*a*Math.pow(2,o-n)};Or.write=function(t,e,r,n,i,o){var a,s,l,u=o*8-i-1,c=(1<>1,d=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,h=n?1:-1,g=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+p>=1?e+=d/l:e+=d*Math.pow(2,1-p),e*l>=2&&(a++,l/=2),a+p>=c?(s=0,a=c):a+p>=1?(s=(e*l-1)*Math.pow(2,i),a=a+p):(s=e*Math.pow(2,p-1)*Math.pow(2,i),a=0));i>=8;t[r+f]=s&255,f+=h,s/=256,i-=8);for(a=a<0;t[r+f]=a&255,f+=h,a/=256,u-=8);t[r+f-h]|=g*128};var wa=L,Ft=Or;function L(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}L.Varint=0;L.Fixed64=1;L.Bytes=2;L.Fixed32=5;var Sr=65536*65536,Mn=1/Sr,Ta=12,fi=typeof TextDecoder>"u"?null:new TextDecoder("utf8");L.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos>3,o=this.pos;this.type=n&7,t(i,e,this),this.pos===o&&this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=St(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=_n(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=St(this.buf,this.pos)+St(this.buf,this.pos+4)*Sr;return this.pos+=8,t},readSFixed64:function(){var t=St(this.buf,this.pos)+_n(this.buf,this.pos+4)*Sr;return this.pos+=8,t},readFloat:function(){var t=Ft.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=Ft.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e=this.buf,r,n;return n=e[this.pos++],r=n&127,n<128||(n=e[this.pos++],r|=(n&127)<<7,n<128)||(n=e[this.pos++],r|=(n&127)<<14,n<128)||(n=e[this.pos++],r|=(n&127)<<21,n<128)?r:(n=e[this.pos],r|=(n&15)<<28,ka(r,t,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2===1?(t+1)/-2:t/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=Ta&&fi?$a(this.buf,e,t):ja(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==L.Bytes)return t.push(this.readVarint(e));var r=ze(this);for(t=t||[];this.pos127;);else if(e===L.Bytes)this.pos=this.readVarint()+this.pos;else if(e===L.Fixed32)this.pos+=4;else if(e===L.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+e)},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e268435455||t<0){za(t,this);return}this.realloc(4),this.buf[this.pos++]=t&127|(t>127?128:0),!(t<=127)&&(this.buf[this.pos++]=(t>>>=7)&127|(t>127?128:0),!(t<=127)&&(this.buf[this.pos++]=(t>>>=7)&127|(t>127?128:0),!(t<=127)&&(this.buf[this.pos++]=t>>>7&127)))},writeSVarint:function(t){this.writeVarint(t<0?-t*2-1:t*2)},writeBoolean:function(t){this.writeVarint(!!t)},writeString:function(t){t=String(t),this.realloc(t.length*4),this.pos++;var e=this.pos;this.pos=La(this.buf,t,this.pos);var r=this.pos-e;r>=128&&Rn(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),Ft.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),Ft.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var r=0;r=128&&Rn(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,L.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,Ca,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,Ea,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,Ra,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,Ia,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,Ma,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,_a,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,Pa,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,Aa,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,Da,e)},writeBytesField:function(t,e){this.writeTag(t,L.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,L.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,L.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,L.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,L.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,L.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,L.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,L.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,L.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,L.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,!!e)}};function ka(t,e,r){var n=r.buf,i,o;if(o=n[r.pos++],i=(o&112)>>4,o<128||(o=n[r.pos++],i|=(o&127)<<3,o<128)||(o=n[r.pos++],i|=(o&127)<<10,o<128)||(o=n[r.pos++],i|=(o&127)<<17,o<128)||(o=n[r.pos++],i|=(o&127)<<24,o<128)||(o=n[r.pos++],i|=(o&1)<<31,o<128))return Oe(t,i,e);throw new Error("Expected varint not more than 10 bytes")}function ze(t){return t.type===L.Bytes?t.readVarint()+t.pos:t.pos+1}function Oe(t,e,r){return r?e*4294967296+(t>>>0):(e>>>0)*4294967296+(t>>>0)}function za(t,e){var r,n;if(t>=0?(r=t%4294967296|0,n=t/4294967296|0):(r=~(-t%4294967296),n=~(-t/4294967296),r^4294967295?r=r+1|0:(r=0,n=n+1|0)),t>=18446744073709552e3||t<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),Fa(r,n,e),Sa(n,e)}function Fa(t,e,r){r.buf[r.pos++]=t&127|128,t>>>=7,r.buf[r.pos++]=t&127|128,t>>>=7,r.buf[r.pos++]=t&127|128,t>>>=7,r.buf[r.pos++]=t&127|128,t>>>=7,r.buf[r.pos]=t&127}function Sa(t,e){var r=(t&7)<<4;e.buf[e.pos++]|=r|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127)))))}function Rn(t,e,r){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(Math.LN2*7));r.realloc(n);for(var i=r.pos-1;i>=t;i--)r.buf[i+n]=r.buf[i]}function Ca(t,e){for(var r=0;r>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function _n(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}function ja(t,e,r){for(var n="",i=e;i239?4:o>223?3:o>191?2:1;if(i+s>r)break;var l,u,c;s===1?o<128&&(a=o):s===2?(l=t[i+1],(l&192)===128&&(a=(o&31)<<6|l&63,a<=127&&(a=null))):s===3?(l=t[i+1],u=t[i+2],(l&192)===128&&(u&192)===128&&(a=(o&15)<<12|(l&63)<<6|u&63,(a<=2047||a>=55296&&a<=57343)&&(a=null))):s===4&&(l=t[i+1],u=t[i+2],c=t[i+3],(l&192)===128&&(u&192)===128&&(c&192)===128&&(a=(o&15)<<18|(l&63)<<12|(u&63)<<6|c&63,(a<=65535||a>=1114112)&&(a=null))),a===null?(a=65533,s=1):a>65535&&(a-=65536,n+=String.fromCharCode(a>>>10&1023|55296),a=56320|a&1023),n+=String.fromCharCode(a),i+=s}return n}function $a(t,e,r){return fi.decode(t.subarray(e,r))}function La(t,e,r){for(var n=0,i,o;n55295&&i<57344)if(o)if(i<56320){t[r++]=239,t[r++]=191,t[r++]=189,o=i;continue}else i=o-55296<<10|i-56320|65536,o=null;else{i>56319||n+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):o=i;continue}else o&&(t[r++]=239,t[r++]=191,t[r++]=189,o=null);i<128?t[r++]=i:(i<2048?t[r++]=i>>6|192:(i<65536?t[r++]=i>>12|224:(t[r++]=i>>18|240,t[r++]=i>>12&63|128),t[r++]=i>>6&63|128),t[r++]=i&63|128)}return r}const Oa=Qi(wa);class qr extends na{constructor(e){super(),e=e||{},this.dataProjection=new jo({code:"",units:"tile-pixels"}),this.featureClass=e.featureClass?e.featureClass:zr,this.geometryName_=e.geometryName,this.layerName_=e.layerName?e.layerName:"layer",this.layers_=e.layers?e.layers:null,this.idProperty_=e.idProperty,this.supportedMediaTypes=["application/vnd.mapbox-vector-tile","application/x-protobuf"]}readRawGeometry_(e,r,n,i){e.pos=r.geometry;const o=e.readVarint()+e.pos;let a=1,s=0,l=0,u=0,c=0,p=0;for(;e.pos>3}if(s--,a===1||a===2)l+=e.readSVarint(),u+=e.readSVarint(),a===1&&c>p&&(i.push(c),p=c),n.push(l,u),c+=2;else if(a===7)c>p&&(n.push(n[p],n[p+1]),c+=2);else throw new Error("Invalid command found in the PBF")}c>p&&(i.push(c),p=c)}createFeature_(e,r,n){const i=r.type;if(i===0)return null;let o;const a=r.properties;let s;this.idProperty_?(s=a[this.idProperty_],delete a[this.idProperty_]):s=r.id,a[this.layerName_]=r.layer.name;const l=[],u=[];this.readRawGeometry_(e,r,l,u);const c=Ba(i,u.length);if(this.featureClass===zr)o=new this.featureClass(c,l,u,2,a,s),o.transform(n.dataProjection);else{let p;if(c=="Polygon"){const h=$o(l,u);p=h.length>1?new sa(l,"XY",h):new Lo(l,"XY",u)}else p=c==="Point"?new Oo(l,"XY"):c==="LineString"?new aa(l,"XY"):c==="MultiPoint"?new la(l,"XY"):c==="MultiLineString"?new ua(l,"XY",u):null;const d=this.featureClass;o=new d,this.geometryName_&&o.setGeometryName(this.geometryName_);const f=ia(p,!1,n);o.setGeometry(f),s!==void 0&&o.setId(s),o.setProperties(a,!0)}return o}getType(){return"arraybuffer"}readFeatures(e,r){const n=this.layers_;r=this.adaptOptions(r);const i=Ke(r.dataProjection);i.setWorldExtent(r.extent),r.dataProjection=i;const o=new Oa(e),a=o.readFields(qa,{}),s=[];for(const l in a){if(n&&!n.includes(l))continue;const u=a[l],c=u?[0,0,u.extent,u.extent]:null;i.setExtent(c);for(let p=0,d=u.length;p>3,n=t===1?r.readString():t===2?r.readFloat():t===3?r.readDouble():t===4?r.readVarint64():t===5?r.readVarint():t===6?r.readSVarint():t===7?r.readBoolean():null;e.values.push(n)}}function Na(t,e,r){if(t==1)e.id=r.readVarint();else if(t==2){const n=r.readVarint()+r.pos;for(;r.pos255?255:t}function An(t){return t<0?0:t>1?1:t}function lr(t){return t[t.length-1]==="%"?dt(parseFloat(t)/100*255):dt(parseInt(t))}function Ct(t){return t[t.length-1]==="%"?An(parseFloat(t)/100):An(parseFloat(t))}function ur(t,e,r){return r<0?r+=1:r>1&&(r-=1),r*6<1?t+(e-t)*r*6:r*2<1?e:r*3<2?t+(e-t)*(2/3-r)*6:t}function Za(t){var e=t.replace(/ /g,"").toLowerCase();if(e in Pn)return Pn[e].slice();if(e[0]==="#"){if(e.length===4){var r=parseInt(e.substr(1),16);return r>=0&&r<=4095?[(r&3840)>>4|(r&3840)>>8,r&240|(r&240)>>4,r&15|(r&15)<<4,1]:null}else if(e.length===7){var r=parseInt(e.substr(1),16);return r>=0&&r<=16777215?[(r&16711680)>>16,(r&65280)>>8,r&255,1]:null}return null}var n=e.indexOf("("),i=e.indexOf(")");if(n!==-1&&i+1===e.length){var o=e.substr(0,n),a=e.substr(n+1,i-(n+1)).split(","),s=1;switch(o){case"rgba":if(a.length!==4)return null;s=Ct(a.pop());case"rgb":return a.length!==3?null:[lr(a[0]),lr(a[1]),lr(a[2]),s];case"hsla":if(a.length!==4)return null;s=Ct(a.pop());case"hsl":if(a.length!==3)return null;var l=(parseFloat(a[0])%360+360)%360/360,u=Ct(a[1]),c=Ct(a[2]),p=c<=.5?c*(u+1):c+u-c*u,d=c*2-p;return[dt(ur(d,p,l+1/3)*255),dt(ur(d,p,l)*255),dt(ur(d,p,l-1/3)*255),s];default:return null}}return null}try{mi=Ua.parseCSSColor=Za}catch{}class le{constructor(e,r,n,i=1){this.r=e,this.g=r,this.b=n,this.a=i}static parse(e){if(!e)return;if(e instanceof le)return e;if(typeof e!="string")return;const r=mi(e);if(r)return new le(r[0]/255*r[3],r[1]/255*r[3],r[2]/255*r[3],r[3])}toString(){const[e,r,n,i]=this.toArray();return`rgba(${Math.round(e)},${Math.round(r)},${Math.round(n)},${i})`}toArray(){const{r:e,g:r,b:n,a:i}=this;return i===0?[0,0,0,0]:[e*255/i,r*255/i,n*255/i,i]}toArray01(){const{r:e,g:r,b:n,a:i}=this;return i===0?[0,0,0,0]:[e/i,r/i,n/i,i]}toArray01PremultipliedAlpha(){const{r:e,g:r,b:n,a:i}=this;return[e,r,n,i]}}le.black=new le(0,0,0,1);le.white=new le(1,1,1,1);le.transparent=new le(0,0,0,0);le.red=new le(1,0,0,1);le.blue=new le(0,0,1,1);var pe=le;function mt(t){return typeof t=="object"?["literal",t]:t}function Ha(t,e){let r=t.stops;if(!r)return Wa(t,e);const n=r&&typeof r[0][0]=="object",i=n||t.property!==void 0,o=n||!i;return r=r.map(a=>!i&&e.tokens&&typeof a[1]=="string"?[a[0],Ya(a[1])]:[a[0],mt(a[1])]),n?Xa(t,e,r):o?Ka(t,e,r):Cr(t,e,r)}function Wa(t,e){const r=["get",t.property];if(t.default===void 0)return e.type==="string"?["string",r]:r;if(e.type==="enum")return["match",r,Object.keys(e.values),r,t.default];{const n=[e.type==="color"?"to-color":e.type,r,mt(t.default)];return e.type==="array"&&n.splice(1,0,e.value,e.length||null),n}}function Gr(t){switch(t.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function Xa(t,e,r){const n={},i={},o=[];for(let s=0;s3&&e===t[t.length-2]||(n&&t.length===2||t.push(e),t.push(r))}function Vr(t,e){return t.type?t.type:e.expression.interpolated?"exponential":"interval"}function Ya(t){const e=["concat"],r=/{([^{}]+)}/g;let n=0;for(let i=r.exec(t);i!==null;i=r.exec(t)){const o=t.slice(n,r.lastIndex-i[0].length);n=r.lastIndex,o.length>0&&e.push(o),e.push(["get",i[1]])}if(e.length===1)return t;if(n`:t.itemType.kind==="value"?"array":`array<${e}>`}else return t.kind}const rs=[Ut,y,P,M,Se,Ht,We,ge(R),xt];function yt(t,e){if(e.kind==="error")return null;if(t.kind==="array"){if(e.kind==="array"&&(e.N===0&&e.itemType.kind==="value"||!yt(t.itemType,e.itemType))&&(typeof t.N!="number"||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if(t.kind==="value"){for(const r of rs)if(!yt(r,e))return null}}return`Expected ${Z(t)} but found ${Z(e)} instead.`}function Ur(t,e){return e.some(r=>r.kind===t.kind)}function gt(t,e){return e.some(r=>r==="null"?t===null:r==="array"?Array.isArray(t):r==="object"?t&&!Array.isArray(t)&&typeof t=="object":r===typeof t)}class Zr{constructor(e,r,n){e?this.sensitivity=r?"variant":"case":this.sensitivity=r?"accent":"base",this.locale=n,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,r){return this.collator.compare(e,r)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Er{constructor(e,r,n,i,o){this.text=e.normalize?e.normalize():e,this.image=r,this.scale=n,this.fontStack=i,this.textColor=o}}class we{constructor(e){this.sections=e}static fromString(e){return new we([new Er(e,null,null,null,null)])}isEmpty(){return this.sections.length===0?!0:!this.sections.some(e=>e.text.length!==0||e.image&&e.image.name.length!==0)}static factory(e){return e instanceof we?e:we.fromString(e)}toString(){return this.sections.length===0?"":this.sections.map(e=>e.text).join("")}serialize(){const e=["format"];for(const r of this.sections){if(r.image){e.push(["image",r.image.name]);continue}e.push(r.text);const n={};r.fontStack&&(n["text-font"]=["literal",r.fontStack.split(",")]),r.scale&&(n["font-scale"]=r.scale),r.textColor&&(n["text-color"]=["rgba"].concat(r.textColor.toArray())),e.push(n)}return e}}class Re{constructor(e){this.name=e.name,this.available=e.available}toString(){return this.name}static fromString(e){return e?new Re({name:e,available:!1}):null}serialize(){return["image",this.name]}}function yi(t,e,r,n){return typeof t=="number"&&t>=0&&t<=255&&typeof e=="number"&&e>=0&&e<=255&&typeof r=="number"&&r>=0&&r<=255?typeof n>"u"||typeof n=="number"&&n>=0&&n<=1?null:`Invalid rgba value [${[t,e,r,n].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof n=="number"?[t,e,r,n]:[t,e,r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function jt(t){if(t===null)return!0;if(typeof t=="string")return!0;if(typeof t=="boolean")return!0;if(typeof t=="number")return!0;if(t instanceof pe)return!0;if(t instanceof Zr)return!0;if(t instanceof we)return!0;if(t instanceof Re)return!0;if(Array.isArray(t)){for(const e of t)if(!jt(e))return!1;return!0}else if(typeof t=="object"){for(const e in t)if(!jt(t[e]))return!1;return!0}else return!1}function ee(t){if(t===null)return Ut;if(typeof t=="string")return P;if(typeof t=="boolean")return M;if(typeof t=="number")return y;if(t instanceof pe)return Se;if(t instanceof Zr)return Zt;if(t instanceof we)return Ht;if(t instanceof Re)return xt;if(Array.isArray(t)){const e=t.length;let r;for(const n of t){const i=ee(n);if(!r)r=i;else{if(r===i)continue;r=R;break}}return ge(r||R,e)}else return We}function ft(t){const e=typeof t;return t===null?"":e==="string"||e==="number"||e==="boolean"?String(t):t instanceof pe||t instanceof we||t instanceof Re?t.toString():JSON.stringify(t)}class Hr{constructor(e,r){this.type=e,this.value=r}static parse(e,r){if(e.length!==2)return r.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!jt(e[1]))return r.error("invalid value");const n=e[1];let i=ee(n);const o=r.expectedType;return i.kind==="array"&&i.N===0&&o&&o.kind==="array"&&(typeof o.N!="number"||o.N===0)&&(i=o),new Hr(i,n)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}serialize(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof pe?["rgba"].concat(this.value.toArray()):this.value instanceof we?this.value.serialize():this.value}}var $t=Hr;class ns{constructor(e){this.name="ExpressionEvaluationError",this.message=e}toJSON(){return this.message}}var re=ns;const cr={string:P,number:y,boolean:M,object:We};class Wr{constructor(e,r){this.type=e,this.args=r}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");let n=1,i;const o=e[0];if(o==="array"){let s;if(e.length>2){const u=e[1];if(typeof u!="string"||!(u in cr)||u==="object")return r.error('The item type argument of "array" must be one of string, number, boolean',1);s=cr[u],n++}else s=R;let l;if(e.length>3){if(e[2]!==null&&(typeof e[2]!="number"||e[2]<0||e[2]!==Math.floor(e[2])))return r.error('The length argument to "array" must be a positive integer literal',2);l=e[2],n++}i=ge(s,l)}else i=cr[o];const a=[];for(;ne.outputDefined())}serialize(){const e=this.type,r=[e.kind];if(e.kind==="array"){const n=e.itemType;if(n.kind==="string"||n.kind==="number"||n.kind==="boolean"){r.push(n.kind);const i=e.N;(typeof i=="number"||this.args.length>1)&&r.push(i)}}return r.concat(this.args.map(n=>n.serialize()))}}var Fe=Wr;class Wt{constructor(e){this.type=Ht,this.sections=e}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");const n=e[1];if(!Array.isArray(n)&&typeof n=="object")return r.error("First argument must be an image or text section.");const i=[];let o=!1;for(let a=1;a<=e.length-1;++a){const s=e[a];if(o&&typeof s=="object"&&!Array.isArray(s)){o=!1;let l=null;if(s["font-scale"]&&(l=r.parse(s["font-scale"],1,y),!l))return null;let u=null;if(s["text-font"]&&(u=r.parse(s["text-font"],1,ge(P)),!u))return null;let c=null;if(s["text-color"]&&(c=r.parse(s["text-color"],1,Se),!c))return null;const p=i[i.length-1];p.scale=l,p.font=u,p.textColor=c}else{const l=r.parse(e[a],1,R);if(!l)return null;const u=l.type.kind;if(u!=="string"&&u!=="value"&&u!=="null"&&u!=="resolvedImage")return r.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");o=!0,i.push({content:l,scale:null,font:null,textColor:null})}}return new Wt(i)}evaluate(e){const r=n=>{const i=n.content.evaluate(e);return ee(i)===xt?new Er("",i,null,null,null):new Er(ft(i),null,n.scale?n.scale.evaluate(e):null,n.font?n.font.evaluate(e).join(","):null,n.textColor?n.textColor.evaluate(e):null)};return new we(this.sections.map(r))}eachChild(e){for(const r of this.sections)e(r.content),r.scale&&e(r.scale),r.font&&e(r.font),r.textColor&&e(r.textColor)}outputDefined(){return!1}serialize(){const e=["format"];for(const r of this.sections){e.push(r.content.serialize());const n={};r.scale&&(n["font-scale"]=r.scale.serialize()),r.font&&(n["text-font"]=r.font.serialize()),r.textColor&&(n["text-color"]=r.textColor.serialize()),e.push(n)}return e}}class Xt{constructor(e){this.type=xt,this.input=e}static parse(e,r){if(e.length!==2)return r.error("Expected two arguments.");const n=r.parse(e[1],1,P);return n?new Xt(n):r.error("No image name provided.")}evaluate(e){const r=this.input.evaluate(e),n=Re.fromString(r);return n&&e.availableImages&&(n.available=e.availableImages.indexOf(r)>-1),n}eachChild(e){e(this.input)}outputDefined(){return!1}serialize(){return["image",this.input.serialize()]}}const is={"to-boolean":M,"to-color":Se,"to-number":y,"to-string":P};class Xr{constructor(e,r){this.type=e,this.args=r}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");const n=e[0];if((n==="to-boolean"||n==="to-string")&&e.length!==2)return r.error("Expected one argument.");const i=is[n],o=[];for(let a=1;a4?n=`Invalid rbga value ${JSON.stringify(r)}: expected an array containing either three or four numeric values.`:n=yi(r[0],r[1],r[2],r[3]),!n))return new pe(r[0]/255,r[1]/255,r[2]/255,r[3])}throw new re(n||`Could not parse color from value '${typeof r=="string"?r:String(JSON.stringify(r))}'`)}else if(this.type.kind==="number"){let r=null;for(const n of this.args){if(r=n.evaluate(e),r===null)return 0;const i=Number(r);if(!isNaN(i))return i}throw new re(`Could not convert ${JSON.stringify(r)} to number.`)}else return this.type.kind==="formatted"?we.fromString(ft(this.args[0].evaluate(e))):this.type.kind==="resolvedImage"?Re.fromString(ft(this.args[0].evaluate(e))):ft(this.args[0].evaluate(e))}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){if(this.type.kind==="formatted")return new Wt([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new Xt(this.args[0]).serialize();const e=[`to-${this.type.kind}`];return this.eachChild(r=>{e.push(r.serialize())}),e}}var Ue=Xr;const os=["Unknown","Point","LineString","Polygon"];class as{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null,this.featureTileCoord=null,this.featureDistanceData=null}id(){return this.feature&&this.feature.id!==void 0?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?os[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}distanceFromCenter(){if(this.featureTileCoord&&this.featureDistanceData){const e=this.featureDistanceData.center,r=this.featureDistanceData.scale,{x:n,y:i}=this.featureTileCoord,o=n*r-e[0],a=i*r-e[1],s=this.featureDistanceData.bearing[0],l=this.featureDistanceData.bearing[1];return s*o+l*a}return 0}parseColor(e){let r=this._parseColorCache[e];return r||(r=this._parseColorCache[e]=pe.parse(e)),r}}var gi=as;class Ze{constructor(e,r,n,i){this.name=e,this.type=r,this._evaluate=n,this.args=i}evaluate(e){return this._evaluate(e,this.args)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}serialize(){return[this.name].concat(this.args.map(e=>e.serialize()))}static parse(e,r){const n=e[0],i=Ze.definitions[n];if(!i)return r.error(`Unknown expression "${n}". If you wanted a literal array, use ["literal", [...]].`,0);const o=Array.isArray(i)?i[0]:i.type,a=Array.isArray(i)?[[i[1],i[2]]]:i.overloads,s=a.filter(([u])=>!Array.isArray(u)||u.length===e.length-1);let l=null;for(const[u,c]of s){l=new Ti(r.registry,r.path,null,r.scope);const p=[];let d=!1;for(let f=1;fss(d)).join(" | "),p=[];for(let d=1;d=e[2]||t[1]<=e[1]||t[3]>=e[3])}function cs(t,e){const r=ls(t[0]),n=us(t[1]),i=Math.pow(2,e.z);return[Math.round(r*i*Me),Math.round(n*i*Me)]}function ps(t,e,r){const n=t[0]-e[0],i=t[1]-e[1],o=t[0]-r[0],a=t[1]-r[1];return n*a-o*i===0&&n*o<=0&&i*a<=0}function ds(t,e,r){return e[1]>t[1]!=r[1]>t[1]&&t[0]<(r[0]-e[0])*(t[1]-e[1])/(r[1]-e[1])+e[0]}function Kr(t,e){let r=!1;for(let n=0,i=e.length;n0&&p<0||c<0&&p>0}function ms(t,e,r,n){const i=[e[0]-t[0],e[1]-t[1]],o=[n[0]-r[0],n[1]-r[1]];return hs(o,i)===0?!1:!!(jn(t,e,r,n)&&jn(r,n,t,e))}function ys(t,e,r){for(const n of r)for(let i=0;ir[2]){const i=n*.5;let o=t[0]-r[0]>i?-n:r[0]-t[0]>i?n:0;o===0&&(o=t[0]-r[2]>i?-n:r[2]-t[0]>i?n:0),t[0]+=o}Jr(e,t)}function xs(t){t[0]=t[1]=1/0,t[2]=t[3]=-1/0}function $n(t,e,r,n){const i=Math.pow(2,n.z)*Me,o=[n.x*Me,n.y*Me],a=[];if(!t)return a;for(const s of t)for(const l of s){const u=[l.x+o[0],l.y+o[1]];bi(u,e,r,i),a.push(u)}return a}function Ln(t,e,r,n){const i=Math.pow(2,n.z)*Me,o=[n.x*Me,n.y*Me],a=[];if(!t)return a;for(const s of t){const l=[];for(const u of s){const c=[u.x+o[0],u.y+o[1]];Jr(e,c),l.push(c)}a.push(l)}if(e[2]-e[0]<=i/2){xs(e);for(const s of a)for(const l of s)bi(l,e,r,i)}return a}function vs(t,e){const r=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],i=t.canonicalID();if(!i)return!1;if(e.type==="Polygon"){const o=Yr(e.coordinates,n,i),a=$n(t.geometry(),r,n,i);if(!Lt(r,n))return!1;for(const s of a)if(!Kr(s,o))return!1}if(e.type==="MultiPolygon"){const o=vi(e.coordinates,n,i),a=$n(t.geometry(),r,n,i);if(!Lt(r,n))return!1;for(const s of a)if(!fs(s,o))return!1}return!0}function bs(t,e){const r=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],i=t.canonicalID();if(!i)return!1;if(e.type==="Polygon"){const o=Yr(e.coordinates,n,i),a=Ln(t.geometry(),r,n,i);if(!Lt(r,n))return!1;for(const s of a)if(!xi(s,o))return!1}if(e.type==="MultiPolygon"){const o=vi(e.coordinates,n,i),a=Ln(t.geometry(),r,n,i);if(!Lt(r,n))return!1;for(const s of a)if(!gs(s,o))return!1}return!0}class ht{constructor(e,r){this.type=M,this.geojson=e,this.geometries=r}static parse(e,r){if(e.length!==2)return r.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(jt(e[1])){const n=e[1];if(n.type==="FeatureCollection")for(let i=0;i{e&&!Kt(r)&&(e=!1)}),e}function en(t){if(t instanceof Qe&&t.name==="feature-state")return!1;let e=!0;return t.eachChild(r=>{e&&!en(r)&&(e=!1)}),e}function tn(t,e){if(t instanceof Qe&&e.indexOf(t.name)>=0)return!1;let r=!0;return t.eachChild(n=>{r&&!tn(n,e)&&(r=!1)}),r}class rn{constructor(e,r){this.type=r.type,this.name=e,this.boundExpression=r}static parse(e,r){if(e.length!==2||typeof e[1]!="string")return r.error("'var' expression requires exactly one string literal argument.");const n=e[1];return r.scope.has(n)?new rn(n,r.scope.get(n)):r.error(`Unknown variable "${n}". Make sure "${n}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(e){return this.boundExpression.evaluate(e)}eachChild(){}outputDefined(){return!1}serialize(){return["var",this.name]}}var wi=rn;class nn{constructor(e,r=[],n,i=new es,o=[]){this.registry=e,this.path=r,this.key=r.map(a=>`[${a}]`).join(""),this.scope=i,this.errors=o,this.expectedType=n}parse(e,r,n,i,o={}){return r?this.concat(r,n,i)._parse(e,o):this._parse(e,o)}_parse(e,r){(e===null||typeof e=="string"||typeof e=="boolean"||typeof e=="number")&&(e=["literal",e]);function n(i,o,a){return a==="assert"?new Fe(o,[i]):a==="coerce"?new Ue(o,[i]):i}if(Array.isArray(e)){if(e.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const i=e[0];if(typeof i!="string")return this.error(`Expression name must be a string, but found ${typeof i} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const o=this.registry[i];if(o){let a=o.parse(e,this);if(!a)return null;if(this.expectedType){const s=this.expectedType,l=a.type;if((s.kind==="string"||s.kind==="number"||s.kind==="boolean"||s.kind==="object"||s.kind==="array")&&l.kind==="value")a=n(a,s,r.typeAnnotation||"assert");else if((s.kind==="color"||s.kind==="formatted"||s.kind==="resolvedImage")&&(l.kind==="value"||l.kind==="string"))a=n(a,s,r.typeAnnotation||"coerce");else if(this.checkSubtype(s,l))return null}if(!(a instanceof $t)&&a.type.kind!=="resolvedImage"&&Ir(a)){const s=new gi;try{a=new $t(a.type,a.evaluate(s))}catch(l){return this.error(l.message),null}}return a}return this.error(`Unknown expression "${i}". If you wanted a literal array, use ["literal", [...]].`,0)}else return typeof e>"u"?this.error("'undefined' value invalid. Use null instead."):typeof e=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error(`Expected an array, but found ${typeof e} instead.`)}concat(e,r,n){const i=typeof e=="number"?this.path.concat(e):this.path,o=n?this.scope.concat(n):this.scope;return new nn(this.registry,i,r||null,o,this.errors)}error(e,...r){const n=`${this.key}${r.map(i=>`[${i}]`).join("")}`;this.errors.push(new be(n,e))}checkSubtype(e,r){const n=yt(e,r);return n&&this.error(n),n}}var Ti=nn;function Ir(t){if(t instanceof wi)return Ir(t.boundExpression);if(t instanceof Qe&&t.name==="error")return!1;if(t instanceof Jt)return!1;if(t instanceof Qr)return!1;const e=t instanceof Ue||t instanceof Fe;let r=!0;return t.eachChild(n=>{e?r=r&&Ir(n):r=r&&n instanceof $t}),r?Kt(t)&&tn(t,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center"]):!1}function ki(t,e){const r=t.length-1;let n=0,i=r,o=0,a,s;for(;n<=i;)if(o=Math.floor((n+i)/2),a=t[o],s=t[o+1],a<=e){if(o===r||ee)i=o-1;else throw new re("Input is not a number.");return 0}class on{constructor(e,r,n){this.type=e,this.input=r,this.labels=[],this.outputs=[];for(const[i,o]of n)this.labels.push(i),this.outputs.push(o)}static parse(e,r){if(e.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!==0)return r.error("Expected an even number of arguments.");const n=r.parse(e[1],1,y);if(!n)return null;const i=[];let o=null;r.expectedType&&r.expectedType.kind!=="value"&&(o=r.expectedType);for(let a=1;a=s)return r.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',u);const p=r.parse(l,c,o);if(!p)return null;o=o||p.type,i.push([s,p])}return new on(o,n,i)}evaluate(e){const r=this.labels,n=this.outputs;if(r.length===1)return n[0].evaluate(e);const i=this.input.evaluate(e);if(i<=r[0])return n[0].evaluate(e);const o=r.length;if(i>=r[o-1])return n[o-1].evaluate(e);const a=ki(r,i);return n[a].evaluate(e)}eachChild(e){e(this.input);for(const r of this.outputs)e(r)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}serialize(){const e=["step",this.input.serialize()];for(let r=0;r0&&e.push(this.labels[r]),e.push(this.outputs[r].serialize());return e}}var zi=on,ws=et;function et(t,e,r,n){this.cx=3*t,this.bx=3*(r-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(n-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=n,this.p2x=r,this.p2y=n}et.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t};et.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t};et.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx};et.prototype.solveCurveX=function(t,e){typeof e>"u"&&(e=1e-6);var r,n,i,o,a;for(i=t,a=0;a<8;a++){if(o=this.sampleCurveX(i)-t,Math.abs(o)n)return n;for(;ro?r=i:n=i,i=(n-r)*.5+r}return i};et.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var Ts=hi(ws);function ce(t,e,r){return t*(1-r)+e*r}function ks(t,e,r){return new pe(ce(t.r,e.r,r),ce(t.g,e.g,r),ce(t.b,e.b,r),ce(t.a,e.a,r))}function zs(t,e,r){return t.map((n,i)=>ce(n,e[i],r))}var Fs=Object.freeze({__proto__:null,number:ce,color:ks,array:zs});const Fi=.95047,Si=1,Ci=1.08883,Ei=4/29,Xe=6/29,Ii=3*Xe*Xe,Ss=Xe*Xe*Xe,Cs=Math.PI/180,Es=180/Math.PI;function pr(t){return t>Ss?Math.pow(t,1/3):t/Ii+Ei}function dr(t){return t>Xe?t*t*t:Ii*(t-Ei)}function fr(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function hr(t){return t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Mi(t){const e=hr(t.r),r=hr(t.g),n=hr(t.b),i=pr((.4124564*e+.3575761*r+.1804375*n)/Fi),o=pr((.2126729*e+.7151522*r+.072175*n)/Si),a=pr((.0193339*e+.119192*r+.9503041*n)/Ci);return{l:116*o-16,a:500*(i-o),b:200*(o-a),alpha:t.a}}function Ri(t){let e=(t.l+16)/116,r=isNaN(t.a)?e:e+t.a/500,n=isNaN(t.b)?e:e-t.b/200;return e=Si*dr(e),r=Fi*dr(r),n=Ci*dr(n),new pe(fr(3.2404542*r-1.5371385*e-.4985314*n),fr(-.969266*r+1.8760108*e+.041556*n),fr(.0556434*r-.2040259*e+1.0572252*n),t.alpha)}function Is(t,e,r){return{l:ce(t.l,e.l,r),a:ce(t.a,e.a,r),b:ce(t.b,e.b,r),alpha:ce(t.alpha,e.alpha,r)}}function Ms(t){const{l:e,a:r,b:n}=Mi(t),i=Math.atan2(n,r)*Es;return{h:i<0?i+360:i,c:Math.sqrt(r*r+n*n),l:e,alpha:t.a}}function Rs(t){const e=t.h*Cs,r=t.c,n=t.l;return Ri({l:n,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})}function _s(t,e,r){const n=e-t;return t+r*(n>180||n<-180?n-360*Math.round(n/360):n)}function Ps(t,e,r){return{h:_s(t.h,e.h,r),c:ce(t.c,e.c,r),l:ce(t.l,e.l,r),alpha:ce(t.alpha,e.alpha,r)}}const Et={forward:Mi,reverse:Ri,interpolate:Is},It={forward:Ms,reverse:Rs,interpolate:Ps};class Ot{constructor(e,r,n,i,o){this.type=e,this.operator=r,this.interpolation=n,this.input=i,this.labels=[],this.outputs=[];for(const[a,s]of o)this.labels.push(a),this.outputs.push(s)}static interpolationFactor(e,r,n,i){let o=0;if(e.name==="exponential")o=mr(r,e.base,n,i);else if(e.name==="linear")o=mr(r,1,n,i);else if(e.name==="cubic-bezier"){const a=e.controlPoints;o=new Ts(a[0],a[1],a[2],a[3]).solve(mr(r,1,n,i))}return o}static parse(e,r){let[n,i,o,...a]=e;if(!Array.isArray(i)||i.length===0)return r.error("Expected an interpolation type expression.",1);if(i[0]==="linear")i={name:"linear"};else if(i[0]==="exponential"){const u=i[1];if(typeof u!="number")return r.error("Exponential interpolation requires a numeric base.",1,1);i={name:"exponential",base:u}}else if(i[0]==="cubic-bezier"){const u=i.slice(1);if(u.length!==4||u.some(c=>typeof c!="number"||c<0||c>1))return r.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);i={name:"cubic-bezier",controlPoints:u}}else return r.error(`Unknown interpolation type ${String(i[0])}`,1,0);if(e.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!==0)return r.error("Expected an even number of arguments.");if(o=r.parse(o,2,y),!o)return null;const s=[];let l=null;n==="interpolate-hcl"||n==="interpolate-lab"?l=Se:r.expectedType&&r.expectedType.kind!=="value"&&(l=r.expectedType);for(let u=0;u=c)return r.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',d);const h=r.parse(p,f,l);if(!h)return null;l=l||h.type,s.push([c,h])}return l.kind!=="number"&&l.kind!=="color"&&!(l.kind==="array"&&l.itemType.kind==="number"&&typeof l.N=="number")?r.error(`Type ${Z(l)} is not interpolatable.`):new Ot(l,n,i,o,s)}evaluate(e){const r=this.labels,n=this.outputs;if(r.length===1)return n[0].evaluate(e);const i=this.input.evaluate(e);if(i<=r[0])return n[0].evaluate(e);const o=r.length;if(i>=r[o-1])return n[o-1].evaluate(e);const a=ki(r,i),s=r[a],l=r[a+1],u=Ot.interpolationFactor(this.interpolation,i,s,l),c=n[a].evaluate(e),p=n[a+1].evaluate(e);return this.operator==="interpolate"?Fs[this.type.kind.toLowerCase()](c,p,u):this.operator==="interpolate-hcl"?It.reverse(It.interpolate(It.forward(c),It.forward(p),u)):Et.reverse(Et.interpolate(Et.forward(c),Et.forward(p),u))}eachChild(e){e(this.input);for(const r of this.outputs)e(r)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}serialize(){let e;this.interpolation.name==="linear"?e=["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?e=["linear"]:e=["exponential",this.interpolation.base]:e=["cubic-bezier"].concat(this.interpolation.controlPoints);const r=[this.operator,e,this.input.serialize()];for(let n=0;nyt(i,s.type))?new qt(R,o):new qt(n,o)}evaluate(e){let r=null,n=0,i;for(const o of this.args){if(n++,r=o.evaluate(e),r&&r instanceof Re&&!r.available&&(i||(i=r),r=null,n===this.args.length))return i;if(r!==null)break}return r}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){const e=["coalesce"];return this.eachChild(r=>{e.push(r.serialize())}),e}}var _i=qt;class an{constructor(e,r){this.type=r.type,this.bindings=[].concat(e),this.result=r}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(const r of this.bindings)e(r[1]);e(this.result)}static parse(e,r){if(e.length<4)return r.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);const n=[];for(let o=1;o=n.length)throw new re(`Array index out of bounds: ${r} > ${n.length-1}.`);if(r!==Math.floor(r))throw new re(`Array index must be an integer, but found ${r} instead.`);return n[r]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}serialize(){return["at",this.index.serialize(),this.input.serialize()]}}var As=sn;class ln{constructor(e,r){this.type=M,this.needle=e,this.haystack=r}static parse(e,r){if(e.length!==3)return r.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const n=r.parse(e[1],1,R),i=r.parse(e[2],2,R);return!n||!i?null:Ur(n.type,[M,P,y,Ut,R])?new ln(n,i):r.error(`Expected first argument to be of type boolean, string, number or null, but found ${Z(n.type)} instead`)}evaluate(e){const r=this.needle.evaluate(e),n=this.haystack.evaluate(e);if(n==null)return!1;if(!gt(r,["boolean","string","number","null"]))throw new re(`Expected first argument to be of type boolean, string, number or null, but found ${Z(ee(r))} instead.`);if(!gt(n,["string","array"]))throw new re(`Expected second argument to be of type array or string, but found ${Z(ee(n))} instead.`);return n.indexOf(r)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}serialize(){return["in",this.needle.serialize(),this.haystack.serialize()]}}var Ds=ln;class Gt{constructor(e,r,n){this.type=y,this.needle=e,this.haystack=r,this.fromIndex=n}static parse(e,r){if(e.length<=2||e.length>=5)return r.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const n=r.parse(e[1],1,R),i=r.parse(e[2],2,R);if(!n||!i)return null;if(!Ur(n.type,[M,P,y,Ut,R]))return r.error(`Expected first argument to be of type boolean, string, number or null, but found ${Z(n.type)} instead`);if(e.length===4){const o=r.parse(e[3],3,y);return o?new Gt(n,i,o):null}else return new Gt(n,i)}evaluate(e){const r=this.needle.evaluate(e),n=this.haystack.evaluate(e);if(!gt(r,["boolean","string","number","null"]))throw new re(`Expected first argument to be of type boolean, string, number or null, but found ${Z(ee(r))} instead.`);if(!gt(n,["string","array"]))throw new re(`Expected second argument to be of type array or string, but found ${Z(ee(n))} instead.`);if(this.fromIndex){const i=this.fromIndex.evaluate(e);return n.indexOf(r,i)}return n.indexOf(r)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}serialize(){if(this.fromIndex!=null&&this.fromIndex!==void 0){const e=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),e]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}var js=Gt;class un{constructor(e,r,n,i,o,a){this.inputType=e,this.type=r,this.input=n,this.cases=i,this.outputs=o,this.otherwise=a}static parse(e,r){if(e.length<5)return r.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!==1)return r.error("Expected an even number of arguments.");let n,i;r.expectedType&&r.expectedType.kind!=="value"&&(i=r.expectedType);const o={},a=[];for(let u=2;uNumber.MAX_SAFE_INTEGER)return d.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof h=="number"&&Math.floor(h)!==h)return d.error("Numeric branch labels must be integer values.");if(!n)n=ee(h);else if(d.checkSubtype(n,ee(h)))return null;if(typeof o[String(h)]<"u")return d.error("Branch labels must be unique.");o[String(h)]=a.length}const f=r.parse(p,u,i);if(!f)return null;i=i||f.type,a.push(f)}const s=r.parse(e[1],1,R);if(!s)return null;const l=r.parse(e[e.length-1],e.length-1,i);return!l||s.type.kind!=="value"&&r.concat(1).checkSubtype(n,s.type)?null:new un(n,i,s,o,a,l)}evaluate(e){const r=this.input.evaluate(e);return(ee(r)===this.inputType&&this.outputs[this.cases[r]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}serialize(){const e=["match",this.input.serialize()],r=Object.keys(this.cases).sort(),n=[],i={};for(const a of r){const s=i[this.cases[a]];s===void 0?(i[this.cases[a]]=n.length,n.push([this.cases[a],[a]])):n[s][1].push(a)}const o=a=>this.inputType.kind==="number"?Number(a):a;for(const[a,s]of n)s.length===1?e.push(o(s[0])):e.push(s.map(o)),e.push(this.outputs[a].serialize());return e.push(this.otherwise.serialize()),e}}var $s=un;class cn{constructor(e,r,n){this.type=e,this.branches=r,this.otherwise=n}static parse(e,r){if(e.length<4)return r.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!==0)return r.error("Expected an odd number of arguments.");let n;r.expectedType&&r.expectedType.kind!=="value"&&(n=r.expectedType);const i=[];for(let a=1;ar.outputDefined())&&this.otherwise.outputDefined()}serialize(){const e=["case"];return this.eachChild(r=>{e.push(r.serialize())}),e}}var Ls=cn;class Nt{constructor(e,r,n,i){this.type=e,this.input=r,this.beginIndex=n,this.endIndex=i}static parse(e,r){if(e.length<=2||e.length>=5)return r.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const n=r.parse(e[1],1,R),i=r.parse(e[2],2,y);if(!n||!i)return null;if(!Ur(n.type,[ge(R),P,R]))return r.error(`Expected first argument to be of type array or string, but found ${Z(n.type)} instead`);if(e.length===4){const o=r.parse(e[3],3,y);return o?new Nt(n.type,n,i,o):null}else return new Nt(n.type,n,i)}evaluate(e){const r=this.input.evaluate(e),n=this.beginIndex.evaluate(e);if(!gt(r,["string","array"]))throw new re(`Expected first argument to be of type array or string, but found ${Z(ee(r))} instead.`);if(this.endIndex){const i=this.endIndex.evaluate(e);return r.slice(n,i)}return r.slice(n)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}serialize(){if(this.endIndex!=null&&this.endIndex!==void 0){const e=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),e]}return["slice",this.input.serialize(),this.beginIndex.serialize()]}}var Os=Nt;function On(t,e){return t==="=="||t==="!="?e.kind==="boolean"||e.kind==="string"||e.kind==="number"||e.kind==="null"||e.kind==="value":e.kind==="string"||e.kind==="number"||e.kind==="value"}function qs(t,e,r){return e===r}function Gs(t,e,r){return e!==r}function Ns(t,e,r){return er}function Bs(t,e,r){return e<=r}function Us(t,e,r){return e>=r}function Ai(t,e,r,n){return n.compare(e,r)===0}function Zs(t,e,r,n){return!Ai(t,e,r,n)}function Hs(t,e,r,n){return n.compare(e,r)<0}function Ws(t,e,r,n){return n.compare(e,r)>0}function Xs(t,e,r,n){return n.compare(e,r)<=0}function Js(t,e,r,n){return n.compare(e,r)>=0}function tt(t,e,r){const n=t!=="=="&&t!=="!=";return class Di{constructor(o,a,s){this.type=M,this.lhs=o,this.rhs=a,this.collator=s,this.hasUntypedArgument=o.type.kind==="value"||a.type.kind==="value"}static parse(o,a){if(o.length!==3&&o.length!==4)return a.error("Expected two or three arguments.");const s=o[0];let l=a.parse(o[1],1,R);if(!l)return null;if(!On(s,l.type))return a.concat(1).error(`"${s}" comparisons are not supported for type '${Z(l.type)}'.`);let u=a.parse(o[2],2,R);if(!u)return null;if(!On(s,u.type))return a.concat(2).error(`"${s}" comparisons are not supported for type '${Z(u.type)}'.`);if(l.type.kind!==u.type.kind&&l.type.kind!=="value"&&u.type.kind!=="value")return a.error(`Cannot compare types '${Z(l.type)}' and '${Z(u.type)}'.`);n&&(l.type.kind==="value"&&u.type.kind!=="value"?l=new Fe(u.type,[l]):l.type.kind!=="value"&&u.type.kind==="value"&&(u=new Fe(l.type,[u])));let c=null;if(o.length===4){if(l.type.kind!=="string"&&u.type.kind!=="string"&&l.type.kind!=="value"&&u.type.kind!=="value")return a.error("Cannot use collator to compare non-string types.");if(c=a.parse(o[3],3,Zt),!c)return null}return new Di(l,u,c)}evaluate(o){const a=this.lhs.evaluate(o),s=this.rhs.evaluate(o);if(n&&this.hasUntypedArgument){const l=ee(a),u=ee(s);if(l.kind!==u.kind||!(l.kind==="string"||l.kind==="number"))throw new re(`Expected arguments for "${t}" to be (string, string) or (number, number), but found (${l.kind}, ${u.kind}) instead.`)}if(this.collator&&!n&&this.hasUntypedArgument){const l=ee(a),u=ee(s);if(l.kind!=="string"||u.kind!=="string")return e(o,a,s)}return this.collator?r(o,a,s,this.collator.evaluate(o)):e(o,a,s)}eachChild(o){o(this.lhs),o(this.rhs),this.collator&&o(this.collator)}outputDefined(){return!0}serialize(){const o=[t];return this.eachChild(a=>{o.push(a.serialize())}),o}}}const Ks=tt("==",qs,Ai),Ys=tt("!=",Gs,Zs),Qs=tt("<",Ns,Hs),el=tt(">",Vs,Ws),tl=tt("<=",Bs,Xs),rl=tt(">=",Us,Js);class pn{constructor(e,r,n,i,o,a){this.type=P,this.number=e,this.locale=r,this.currency=n,this.unit=i,this.minFractionDigits=o,this.maxFractionDigits=a}static parse(e,r){if(e.length!==3)return r.error("Expected two arguments.");const n=r.parse(e[1],1,y);if(!n)return null;const i=e[2];if(typeof i!="object"||Array.isArray(i))return r.error("NumberFormat options argument must be an object.");let o=null;if(i.locale&&(o=r.parse(i.locale,1,P),!o))return null;let a=null;if(i.currency&&(a=r.parse(i.currency,1,P),!a))return null;let s=null;if(i.unit&&(s=r.parse(i.unit,1,P),!s))return null;let l=null;if(i["min-fraction-digits"]&&(l=r.parse(i["min-fraction-digits"],1,y),!l))return null;let u=null;return i["max-fraction-digits"]&&(u=r.parse(i["max-fraction-digits"],1,y),!u)?null:new pn(n,o,a,s,l,u)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency&&"currency"||this.unit&&"unit"||"decimal",currency:this.currency?this.currency.evaluate(e):void 0,unit:this.unit?this.unit.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.unit&&e(this.unit),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}serialize(){const e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.unit&&(e.unit=this.unit.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]}}class dn{constructor(e){this.type=y,this.input=e}static parse(e,r){if(e.length!==2)return r.error(`Expected 1 argument, but found ${e.length-1} instead.`);const n=r.parse(e[1],1);return n?n.type.kind!=="array"&&n.type.kind!=="string"&&n.type.kind!=="value"?r.error(`Expected argument of type string or array, but found ${Z(n.type)} instead.`):new dn(n):null}evaluate(e){const r=this.input.evaluate(e);if(typeof r=="string")return r.length;if(Array.isArray(r))return r.length;throw new re(`Expected value to be of type string or array, but found ${Z(ee(r))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}serialize(){const e=["length"];return this.eachChild(r=>{e.push(r.serialize())}),e}}var nl=dn;const ji={"==":Ks,"!=":Ys,">":el,"<":Qs,">=":rl,"<=":tl,array:Fe,at:As,boolean:Fe,case:Ls,coalesce:_i,collator:Jt,format:Wt,image:Xt,in:Ds,"index-of":js,interpolate:De,"interpolate-hcl":De,"interpolate-lab":De,length:nl,let:Pi,literal:$t,match:$s,number:Fe,"number-format":pn,object:Fe,slice:Os,step:zi,string:Fe,"to-boolean":Ue,"to-color":Ue,"to-number":Ue,"to-string":Ue,var:wi,within:Qr};function qn(t,[e,r,n,i]){e=e.evaluate(t),r=r.evaluate(t),n=n.evaluate(t);const o=i?i.evaluate(t):1,a=yi(e,r,n,o);if(a)throw new re(a);return new pe(e/255*o,r/255*o,n/255*o,o)}function Gn(t,e){return t in e}function yr(t,e){const r=e[t];return typeof r>"u"?null:r}function il(t,e,r,n){for(;r<=n;){const i=r+n>>1;if(e[i]===t)return!0;e[i]>t?n=i-1:r=i+1}return!1}function _e(t){return{type:t}}Qe.register(ji,{error:[ts,[P],(t,[e])=>{throw new re(e.evaluate(t))}],typeof:[P,[R],(t,[e])=>Z(ee(e.evaluate(t)))],"to-rgba":[ge(y,4),[Se],(t,[e])=>e.evaluate(t).toArray()],rgb:[Se,[y,y,y],qn],rgba:[Se,[y,y,y,y],qn],has:{type:M,overloads:[[[P],(t,[e])=>Gn(e.evaluate(t),t.properties())],[[P,We],(t,[e,r])=>Gn(e.evaluate(t),r.evaluate(t))]]},get:{type:R,overloads:[[[P],(t,[e])=>yr(e.evaluate(t),t.properties())],[[P,We],(t,[e,r])=>yr(e.evaluate(t),r.evaluate(t))]]},"feature-state":[R,[P],(t,[e])=>yr(e.evaluate(t),t.featureState||{})],properties:[We,[],t=>t.properties()],"geometry-type":[P,[],t=>t.geometryType()],id:[R,[],t=>t.id()],zoom:[y,[],t=>t.globals.zoom],pitch:[y,[],t=>t.globals.pitch||0],"distance-from-center":[y,[],t=>t.distanceFromCenter()],"heatmap-density":[y,[],t=>t.globals.heatmapDensity||0],"line-progress":[y,[],t=>t.globals.lineProgress||0],"sky-radial-progress":[y,[],t=>t.globals.skyRadialProgress||0],accumulated:[R,[],t=>t.globals.accumulated===void 0?null:t.globals.accumulated],"+":[y,_e(y),(t,e)=>{let r=0;for(const n of e)r+=n.evaluate(t);return r}],"*":[y,_e(y),(t,e)=>{let r=1;for(const n of e)r*=n.evaluate(t);return r}],"-":{type:y,overloads:[[[y,y],(t,[e,r])=>e.evaluate(t)-r.evaluate(t)],[[y],(t,[e])=>-e.evaluate(t)]]},"/":[y,[y,y],(t,[e,r])=>e.evaluate(t)/r.evaluate(t)],"%":[y,[y,y],(t,[e,r])=>e.evaluate(t)%r.evaluate(t)],ln2:[y,[],()=>Math.LN2],pi:[y,[],()=>Math.PI],e:[y,[],()=>Math.E],"^":[y,[y,y],(t,[e,r])=>Math.pow(e.evaluate(t),r.evaluate(t))],sqrt:[y,[y],(t,[e])=>Math.sqrt(e.evaluate(t))],log10:[y,[y],(t,[e])=>Math.log(e.evaluate(t))/Math.LN10],ln:[y,[y],(t,[e])=>Math.log(e.evaluate(t))],log2:[y,[y],(t,[e])=>Math.log(e.evaluate(t))/Math.LN2],sin:[y,[y],(t,[e])=>Math.sin(e.evaluate(t))],cos:[y,[y],(t,[e])=>Math.cos(e.evaluate(t))],tan:[y,[y],(t,[e])=>Math.tan(e.evaluate(t))],asin:[y,[y],(t,[e])=>Math.asin(e.evaluate(t))],acos:[y,[y],(t,[e])=>Math.acos(e.evaluate(t))],atan:[y,[y],(t,[e])=>Math.atan(e.evaluate(t))],min:[y,_e(y),(t,e)=>Math.min(...e.map(r=>r.evaluate(t)))],max:[y,_e(y),(t,e)=>Math.max(...e.map(r=>r.evaluate(t)))],abs:[y,[y],(t,[e])=>Math.abs(e.evaluate(t))],round:[y,[y],(t,[e])=>{const r=e.evaluate(t);return r<0?-Math.round(-r):Math.round(r)}],floor:[y,[y],(t,[e])=>Math.floor(e.evaluate(t))],ceil:[y,[y],(t,[e])=>Math.ceil(e.evaluate(t))],"filter-==":[M,[P,R],(t,[e,r])=>t.properties()[e.value]===r.value],"filter-id-==":[M,[R],(t,[e])=>t.id()===e.value],"filter-type-==":[M,[P],(t,[e])=>t.geometryType()===e.value],"filter-<":[M,[P,R],(t,[e,r])=>{const n=t.properties()[e.value],i=r.value;return typeof n==typeof i&&n{const r=t.id(),n=e.value;return typeof r==typeof n&&r":[M,[P,R],(t,[e,r])=>{const n=t.properties()[e.value],i=r.value;return typeof n==typeof i&&n>i}],"filter-id->":[M,[R],(t,[e])=>{const r=t.id(),n=e.value;return typeof r==typeof n&&r>n}],"filter-<=":[M,[P,R],(t,[e,r])=>{const n=t.properties()[e.value],i=r.value;return typeof n==typeof i&&n<=i}],"filter-id-<=":[M,[R],(t,[e])=>{const r=t.id(),n=e.value;return typeof r==typeof n&&r<=n}],"filter->=":[M,[P,R],(t,[e,r])=>{const n=t.properties()[e.value],i=r.value;return typeof n==typeof i&&n>=i}],"filter-id->=":[M,[R],(t,[e])=>{const r=t.id(),n=e.value;return typeof r==typeof n&&r>=n}],"filter-has":[M,[R],(t,[e])=>e.value in t.properties()],"filter-has-id":[M,[],t=>t.id()!==null&&t.id()!==void 0],"filter-type-in":[M,[ge(P)],(t,[e])=>e.value.indexOf(t.geometryType())>=0],"filter-id-in":[M,[ge(R)],(t,[e])=>e.value.indexOf(t.id())>=0],"filter-in-small":[M,[P,ge(R)],(t,[e,r])=>r.value.indexOf(t.properties()[e.value])>=0],"filter-in-large":[M,[P,ge(R)],(t,[e,r])=>il(t.properties()[e.value],r.value,0,r.value.length-1)],all:{type:M,overloads:[[[M,M],(t,[e,r])=>e.evaluate(t)&&r.evaluate(t)],[_e(M),(t,e)=>{for(const r of e)if(!r.evaluate(t))return!1;return!0}]]},any:{type:M,overloads:[[[M,M],(t,[e,r])=>e.evaluate(t)||r.evaluate(t)],[_e(M),(t,e)=>{for(const r of e)if(r.evaluate(t))return!0;return!1}]]},"!":[M,[M],(t,[e])=>!e.evaluate(t)],"is-supported-script":[M,[P],(t,[e])=>{const r=t.globals&&t.globals.isSupportedScript;return r?r(e.evaluate(t)):!0}],upcase:[P,[P],(t,[e])=>e.evaluate(t).toUpperCase()],downcase:[P,[P],(t,[e])=>e.evaluate(t).toLowerCase()],concat:[P,_e(R),(t,e)=>e.map(r=>ft(r.evaluate(t))).join("")],"resolved-locale":[P,[Zt],(t,[e])=>e.evaluate(t).resolvedLocale()]});var $i=ji;function Mr(t){return{result:"success",value:t}}function Ne(t){return{result:"error",value:t}}function ol(t){return t["property-type"]==="data-driven"}function al(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function sl(t){return!!t.expression&&t.expression.interpolated}function Li(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}class ll{constructor(e,r){this.expression=e,this._warningHistory={},this._evaluator=new gi,this._defaultValue=r?dl(r):null,this._enumValues=r&&r.type==="enum"?r.values:null}evaluateWithoutErrorHandling(e,r,n,i,o,a,s,l){return this._evaluator.globals=e,this._evaluator.feature=r,this._evaluator.featureState=n,this._evaluator.canonical=i||null,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=a,this._evaluator.featureTileCoord=s||null,this._evaluator.featureDistanceData=l||null,this.expression.evaluate(this._evaluator)}evaluate(e,r,n,i,o,a,s,l){this._evaluator.globals=e,this._evaluator.feature=r||null,this._evaluator.featureState=n||null,this._evaluator.canonical=i||null,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=a||null,this._evaluator.featureTileCoord=s||null,this._evaluator.featureDistanceData=l||null;try{const u=this.expression.evaluate(this._evaluator);if(u==null||typeof u=="number"&&u!==u)return this._defaultValue;if(this._enumValues&&!(u in this._enumValues))throw new re(`Expected value to be one of ${Object.keys(this._enumValues).map(c=>JSON.stringify(c)).join(", ")}, but found ${JSON.stringify(u)} instead.`);return u}catch(u){return this._warningHistory[u.message]||(this._warningHistory[u.message]=!0,typeof console<"u"&&console.warn(u.message)),this._defaultValue}}}function ul(t){return Array.isArray(t)&&t.length>0&&typeof t[0]=="string"&&t[0]in $i}function Rr(t,e){const r=new Ti($i,[],e?pl(e):void 0),n=r.parse(t,void 0,void 0,void 0,e&&e.type==="string"?{typeAnnotation:"coerce"}:void 0);return n?Mr(new ll(n,e)):Ne(r.errors)}class Nn{constructor(e,r){this.kind=e,this._styleExpression=r,this.isStateDependent=e!=="constant"&&!en(r.expression)}evaluateWithoutErrorHandling(e,r,n,i,o,a){return this._styleExpression.evaluateWithoutErrorHandling(e,r,n,i,o,a)}evaluate(e,r,n,i,o,a){return this._styleExpression.evaluate(e,r,n,i,o,a)}}class Vn{constructor(e,r,n,i){this.kind=e,this.zoomStops=n,this._styleExpression=r,this.isStateDependent=e!=="camera"&&!en(r.expression),this.interpolationType=i}evaluateWithoutErrorHandling(e,r,n,i,o,a){return this._styleExpression.evaluateWithoutErrorHandling(e,r,n,i,o,a)}evaluate(e,r,n,i,o,a){return this._styleExpression.evaluate(e,r,n,i,o,a)}interpolationFactor(e,r,n){return this.interpolationType?De.interpolationFactor(this.interpolationType,e,r,n):0}}function cl(t,e){if(t=Rr(t,e),t.result==="error")return t;const r=t.value.expression,n=Kt(r);if(!n&&!ol(e))return Ne([new be("","data expressions not supported")]);const i=tn(r,["zoom","pitch","distance-from-center"]);if(!i&&!al(e))return Ne([new be("","zoom expressions not supported")]);const o=Pt(r);if(!o&&!i)return Ne([new be("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(o instanceof be)return Ne([o]);if(o instanceof De&&!sl(e))return Ne([new be("",'"interpolate" expressions cannot be used with this property')]);if(!o)return Mr(n?new Nn("constant",t.value):new Nn("source",t.value));const a=o instanceof De?o.interpolation:void 0;return Mr(n?new Vn("camera",t.value,o.labels,a):new Vn("composite",t.value,o.labels,a))}function Pt(t){let e=null;if(t instanceof Pi)e=Pt(t.result);else if(t instanceof _i){for(const r of t.args)if(e=Pt(r),e)break}else(t instanceof zi||t instanceof De)&&t.input instanceof Qe&&t.input.name==="zoom"&&(e=t);return e instanceof be||t.eachChild(r=>{const n=Pt(r);n instanceof be?e=n:!e&&n?e=new be("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&n&&e!==n&&(e=new be("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),e}function pl(t){const e={color:Se,string:P,number:y,enum:P,boolean:M,formatted:Ht,resolvedImage:xt};return t.type==="array"?ge(e[t.value]||R,t.length):e[t.type]}function dl(t){return t.type==="color"&&(Li(t.default)||Array.isArray(t.default))?new pe(0,0,0,0):t.type==="color"?pe.parse(t.default)||null:t.default===void 0?null:t.default}function fl(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function _r(t){if(Array.isArray(t))return t.map(_r);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){const e={};for(const r in t)e[r]=_r(t[r]);return e}return fl(t)}var Oi={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},terrain:{type:"terrain"},fog:{type:"fog"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},projection:{type:"projection"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{},sky:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background","layout_sky"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_sky:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"},"fill-extrusion-edge-radius":{type:"number",private:!0,default:0,minimum:0,maximum:1,"property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_symbol:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature","pitch","distance-from-center"]}},filter_fill:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_line:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_circle:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},"filter_fill-extrusion":{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_heatmap:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},"index-of":{group:"Lookup"},slice:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Camera"},pitch:{group:"Camera"},"distance-from-center":{group:"Camera"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},"sky-radial-progress":{group:"sky"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},distance:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},within:{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},fog:{range:{type:"array",default:[.5,10],minimum:-20,maximum:20,length:2,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"high-color":{type:"color","property-type":"data-constant",default:"#245cdf",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"space-color":{type:"color","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-blend":{type:"number","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],4,.2,7,.1],minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"star-intensity":{type:"number","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],5,.35,6,0],minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},projection:{name:{type:"enum",values:{albers:{},equalEarth:{},equirectangular:{},lambertConformalConic:{},mercator:{},naturalEarth:{},winkelTripel:{},globe:{}},default:"mercator",required:!0},center:{type:"array",length:2,value:"number","property-type":"data-constant",minimum:[-180,-90],maximum:[180,90],transition:!1,requires:[{name:["albers","lambertConformalConic"]}]},parallels:{type:"array",length:2,value:"number","property-type":"data-constant",minimum:[-90,-90],maximum:[90,90],transition:!1,requires:[{name:["albers","lambertConformalConic"]}]}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number","property-type":"data-constant",default:1,minimum:0,maximum:1e3,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,requires:["source"]}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!1,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!1,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-ambient-occlusion-intensity":{"property-type":"data-constant",type:"number",private:!0,default:0,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fill-extrusion-ambient-occlusion-radius":{"property-type":"data-constant",type:"number",private:!0,default:3,minimum:0,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,requires:["fill-extrusion-edge-radius"]}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!1,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-pattern":{type:"resolvedImage",transition:!1,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"},"line-trim-offset":{type:"array",value:"number",length:2,default:[0,0],minimum:[0,0],maximum:[1,1],transition:!1,requires:[{source:"geojson",has:{lineMetrics:!0}}],"property-type":"constant"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_sky:{"sky-type":{type:"enum",values:{gradient:{},atmosphere:{}},default:"atmosphere",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{type:"array",value:"number",length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,requires:[{"sky-type":"atmosphere"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{type:"number",requires:[{"sky-type":"atmosphere"}],default:10,minimum:0,maximum:100,transition:!1,"property-type":"data-constant"},"sky-gradient-center":{type:"array",requires:[{"sky-type":"gradient"}],value:"number",default:[0,0],length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{type:"number",requires:[{"sky-type":"gradient"}],default:90,minimum:0,maximum:180,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient":{type:"color",default:["interpolate",["linear"],["sky-radial-progress"],.8,"#87ceeb",1,"white"],transition:!1,requires:[{"sky-type":"gradient"}],expression:{interpolated:!0,parameters:["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{type:"color",default:"white",transition:!1,requires:[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-atmosphere-color":{type:"color",default:"white",transition:!1,requires:[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};function qi(t){if(t===!0||t===!1)return!0;if(!Array.isArray(t)||t.length===0)return!1;switch(t[0]){case"has":return t.length>=2&&t[1]!=="$id"&&t[1]!=="$type";case"in":return t.length>=3&&(typeof t[1]!="string"||Array.isArray(t[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return t.length!==3||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(const e of t.slice(1))if(!qi(e)&&typeof e!="boolean")return!1;return!0;default:return!0}}function hl(t,e="fill"){if(t==null)return{filter:()=>!0,needGeometry:!1,needFeature:!1};qi(t)||(t=Vt(t));const r=t;let n=!0;try{n=ml(r)}catch{console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate. This is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md and paste the contents of this message in the report. Thank you! @@ -16,4 +16,4 @@ ${s}`)!==100){const l=e.replace("{font-family}",s.replace(/ /g,"-").toLowerCase( `)return B.push(` `,""),B;if(N==2){B.push(Ar(Y,ot),K);return}Y=Dr(Y,K,tr,ot).split(` `);for(let fe=0,ue=Y.length;fe0&&B.push(` -`,""),B.push(Y[fe],K);return B},[]):te=Tr(W,j).trim(),Te=z(v,"paint","text-opacity",b,T,m,x)}if(te&&Te&&!er){kt||(++U,w=S[U],(!w||!w.getText()||w.getFill()||w.getStroke())&&(w=new Ie,S[U]=w),w.setImage(void 0),w.setGeometry(void 0));const H=ti(v,b,T,"text",m);w.getText()||w.setText(q),q=w.getText(),(!q||"getDeclutterMode"in q&&q.getDeclutterMode()!==H)&&(q=new Jo({padding:[2,2,2,2],declutterMode:H}),w.setText(q));const W=z(v,"layout","text-transform",b,T,m,x);W=="uppercase"?te=Array.isArray(te)?te.map((ne,at)=>at%2?ne:ne.toUpperCase()):te.toUpperCase():W=="lowercase"&&(te=Array.isArray(te)?te.map((ne,at)=>at%2?ne:ne.toLowerCase()):te.toLowerCase());const B=Array.isArray(te)?te:N==2?Ar(te,ot):Dr(te,nt,tr,ot);q.setText(B),q.setFont(nt),q.setRotation(xr(z(v,"layout","text-rotate",b,T,m,x)));const X=z(v,"layout","text-anchor",b,T,m,x),D=kt||N==1?"point":z(v,"layout","symbol-placement",b,T,m,x);let O;if(D==="line-center"?(q.setPlacement("line"),O="center"):q.setPlacement(D),D==="line"&&typeof q.setRepeat=="function"){const ne=z(v,"layout","symbol-spacing",b,T,m,x);q.setRepeat(ne*2)}q.setOverflow(D==="point");let K=z(v,"paint","text-halo-width",b,T,m,x);const Y=z(v,"layout","text-offset",b,T,m,x),fe=z(v,"paint","text-translate",b,T,m,x);let ue=0,oe=0;if(D=="point"){O="center",X.indexOf("left")!==-1?(O="left",oe=K):X.indexOf("right")!==-1&&(O="right",oe=-K);const ne=z(v,"layout","text-rotation-alignment",b,T,m,x);q.setRotateWithView(ne=="map")}else q.setMaxAngle(xr(z(v,"layout","text-max-angle",b,T,m,x))*te.length/B.length),q.setRotateWithView(!1);q.setTextAlign(O);let ae="middle";X.indexOf("bottom")==0?(ae="bottom",ue=-K-.5*(it-1)*Ce):X.indexOf("top")==0&&(ae="top",ue=K+.5*(it-1)*Ce),q.setTextBaseline(ae);const J=z(v,"layout","text-justify",b,T,m,x);q.setJustify(J==="auto"?void 0:J),q.setOffsetX(Y[0]*Ce+oe+fe[0]),q.setOffsetY(Y[1]*Ce+ue+fe[1]),F.setColor(Ee(z(v,"paint","text-color",b,T,m,x),Te)),q.setFill(F);const he=Ee(z(v,"paint","text-halo-color",b,T,m,x),Te);if(he&&K>0){E.setColor(he),K*=2;const ne=.5*Ce;E.setWidth(K<=ne?K:ne),q.setStroke(E)}else q.setStroke(void 0);const me=z(v,"layout","text-padding",b,T,m,x),ye=q.getPadding();me!==ye[0]&&(ye[0]=me,ye[1]=me,ye[2]=me,ye[3]=me),w.setZIndex($e)}}}if(U>-1)return S.length=U+1,S};return t.setStyle($),t.set("mapbox-source",C),t.set("mapbox-layers",f),t.set("mapbox-featurestate",t.get("mapbox-featurestate")||{}),$}function Ul(t,e=512){return t.getExtent()?$r({extent:t.getExtent(),tileSize:e,maxZoom:22}).getResolutions():Yt}function Zl(t,e){return e.accessToken||(e=Object.assign({},e),new URL(t).searchParams.forEach((n,i)=>{e.accessToken=n,e.accessTokenParam=i})),e}function Hl(t,e,r="",n={},i=void 0){let o,a,s,l,u=!0;return typeof r!="string"&&!Array.isArray(r)?(s=r,l=s.source||s.layers,n=s):l=r,typeof n=="string"?(o=n,s={}):(o=n.styleUrl,s=n),s.updateSource===!1&&(u=!1),i||(i=s.resolutions),!o&&typeof e=="string"&&!e.trim().startsWith("{")&&(o=e),o&&(o=o.startsWith("data:")?location.href:Ui(o,s.accessToken),s=Zl(o,s)),new Promise(function(c,p){Hi(e,s).then(function(d){if(d.version!=8)return p(new Error("glStyle version 8 required."));if(!(t instanceof Fr||t instanceof pt))return p(new Error("Can only apply to VectorLayer or VectorTileLayer"));const f=t instanceof pt?"vector":"geojson";if(l?Array.isArray(l)?a=d.layers.find(function(F){return F.id===l[0]}).source:a=l:(a=Object.keys(d.sources).find(function(F){return d.sources[F].type===f}),l=a),!a)return p(new Error(`No ${f} source found in the glStyle.`));function h(){if(!u)return Promise.resolve();if(t instanceof pt)return Ql(d.sources[a],o,s).then(function(k){const I=t.getSource();I?k!==I&&(I.setTileUrlFunction(k.getTileUrlFunction()),typeof I.setUrls=="function"&&typeof k.getUrls=="function"&&I.setUrls(k.getUrls()),I.format_||(I.format_=k.format_),I.getAttributions()||I.setAttributions(k.getAttributions()),I.getTileLoadFunction()===di&&I.setTileLoadFunction(k.getTileLoadFunction()),Ho(I.getProjection(),k.getProjection())&&(I.tileGrid=k.getTileGrid())):t.setSource(k);const A=t.getSource().getTileGrid();!isFinite(t.getMaxResolution())&&!isFinite(t.getMinZoom())&&A.getMinZoom()>0&&t.setMaxResolution(Ml(Math.max(0,A.getMinZoom()-1e-12),A.getResolutions()))});const F=d.sources[a];let S=t.getSource();(!S||S.get("mapbox-source")!==F)&&(S=tu(F,o,s));const $=t.getSource();return $?S!==$&&($.getAttributions()||$.setAttributions(S.getAttributions()),$.format_||($.format_=S.getFormat()),$.url_=S.getUrl()):t.setSource(S),Promise.resolve()}let g,m,_,C;function E(){if(!C&&(!d.sprite||m)){if(s.projection&&!i){const S=Ke(s.projection).getUnits();S!=="m"&&(i=Yt.map($=>$/Go[S]))}C=Bl(t,d,l,i,m,_,(F,S=s.webfonts)=>$l(F,S),s.getImage),t.getStyle()?h().then(c).catch(p):p(new Error(`Nothing to show for source [${a}]`))}else C?(t.setStyle(C),h().then(c).catch(p)):p(new Error("Something went wrong trying to apply style."))}if(d.sprite){const F=new URL(Fl(d.sprite,s.accessToken,o||location.href));g=window.devicePixelRatio>=1.5?.5:1;const S=g==.5?"@2x":"";let $=F.origin+F.pathname+S+".json"+F.search;new Promise(function(k,I){Ye("Sprite",$,s).then(k).catch(function(A){$=F.origin+F.pathname+".json"+F.search,Ye("Sprite",$,s).then(k).catch(I)})}).then(function(k){if(k===void 0&&p(new Error("No sprites found.")),m=k,_=F.origin+F.pathname+S+".png"+F.search,s.transformRequest){const I=s.transformRequest(_,"SpriteImage")||_;(I instanceof Request||I instanceof Promise)&&(_=I)}E()}).catch(function(k){p(new Error(`Sprites cannot be loaded: ${$}: ${k.message}`))})}else E()}).catch(p)})}const ri={};function Wl(t,e,r){e.layers.some(function(n){if(n.type==="background"){if(t instanceof ui)return t.setBackground(function(i){return Xi(n,i,r,{})}),!0;if(t instanceof No||t instanceof Vo)return t.getLayers().insertAt(0,Yl(n,r,{})),!0}})}function Xl(t,e,r={}){return Hi(e,r).then(function(n){Wl(t,n,r)})}function Jl(t,e){const r=t.bounds;if(r){const n=Tn([r[0],r[1]],e),i=Tn([r[2],r[3]],e);return[n[0],n[1],i[0],i[1]]}return Ke(e).getExtent()}function Kl(t,e,r){const n=new ba({tileJSON:e,tileSize:t.tileSize||e.tileSize||512}),i=n.getTileJSON(),o=n.getTileGrid(),a=Ke(r.projection||"EPSG:3857"),s=Jl(i,a),l=a.getExtent(),u=i.minzoom||0,c=i.maxzoom||22,p={attributions:n.getAttributions(),projection:a,tileGrid:new li({origin:l?oi(l):o.getOrigin(0),extent:s||o.getExtent(),minZoom:u,resolutions:Ul(a,e.tileSize).slice(0,c+1),tileSize:o.getTileSize(0)})};return Array.isArray(i.tiles)?p.urls=i.tiles:p.url=i.tiles,p}function Xi(t,e,r,n){const i={id:t.id,type:t.type},o=t.layout||{},a=t.paint||{};i.paint=a;const s=Zi(e,r.resolutions||Yt);let l;const u=z(i,"paint","background-color",s,ri,n);return a["background-opacity"]!==void 0&&(l=z(i,"paint","background-opacity",s,ri,n)),o.visibility=="none"?void 0:Ee(u,l)}function Yl(t,e,r){const n=document.createElement("div");return n.className="ol-mapbox-style-background",n.style.position="absolute",n.style.width="100%",n.style.height="100%",new ui({source:new Bo({}),render(i){const o=Xi(t,i.viewState.resolution,e,r);return n.style.backgroundColor=o,n}})}function Ql(t,e,r){return new Promise(function(n,i){Rl(t,e,r).then(function({tileJson:o,tileLoadFunction:a}){const s=Kl(t,o,r);s.tileLoadFunction=a,s.format=new qr,n(new Lr(s))}).catch(i)})}function eu(t){return`{bbox-${(t?t.getCode():"EPSG:3857").toLowerCase().replace(/[^a-z0-9]/g,"-")}}`}function tu(t,e,r){const n=r.projection?new Sn({dataProjection:r.projection}):new Sn,i=t.data,o={};if(typeof i=="string"){const s=At(i,r.accessToken,r.accessTokenParam||"access_token",e||location.href);if(/\{bbox-[0-9a-z-]+\}/.test(s)){const u=(p,d,f)=>{const h=eu(f);return s.replace(h,`${p.join(",")}`)},c=new ir({attributions:t.attribution,format:n,loader:(p,d,f,h,g)=>{const m=typeof u=="function"?u(p,d,f):u;Ye("GeoJSON",m,r).then(_=>{const C=c.getFormat().readFeatures(_,{featureProjection:f});c.addFeatures(C),h(C)}).catch(_=>{c.removeLoadedExtent(p),g()})},strategy:Wo});return c.set("mapbox-source",t),c}const l=new ir({attributions:t.attribution,format:n,url:s,loader:(u,c,p,d,f)=>{Ye("GeoJSON",s,r).then(h=>{const g=l.getFormat().readFeatures(h,{featureProjection:p});l.addFeatures(g),d(g)}).catch(h=>{l.removeLoadedExtent(u),f()})}});return l}o.features=n.readFeatures(i,{featureProjection:"EPSG:3857"});const a=new ir(Object.assign({attributions:t.attribution,format:n},o));return a.set("mapbox-source",t),a}class ru extends qo{constructor(e){super(kr.ERROR),this.error=e}}class nu extends pt{constructor(e){const r="declutter"in e?e.declutter:!0,n=new Lr({state:"loading",format:new qr});super({source:n,background:e.background===!1?null:e.background,declutter:r,className:e.className,opacity:e.opacity,visible:e.visible,zIndex:e.zIndex,minResolution:e.minResolution,maxResolution:e.maxResolution,minZoom:e.minZoom,maxZoom:e.maxZoom,renderOrder:e.renderOrder,renderBuffer:e.renderBuffer,renderMode:e.renderMode,map:e.map,updateWhileAnimating:e.updateWhileAnimating,updateWhileInteracting:e.updateWhileInteracting,preload:e.preload,useInterimTilesOnError:e.useInterimTilesOnError,properties:e.properties}),e.accessToken&&(this.accessToken=e.accessToken);const i=e.styleUrl,o=[Hl(this,i,e.layers||e.source,{accessToken:this.accessToken})];this.getBackground()===void 0&&o.push(Xl(this,e.styleUrl,{accessToken:this.accessToken})),Promise.all(o).then(()=>{n.setState("ready")}).catch(a=>{this.dispatchEvent(new ru(a)),this.getSource().setState("error")})}}const Ve="main";class iu{mapId=Ve;vectorSourceFactory;constructor({references:e}){this.vectorSourceFactory=e.vectorSourceFactory}async getMapConfig(){return{projection:"EPSG:3857",initialView:{kind:"position",center:{x:848890,y:6793350},zoom:13},layers:[new st({title:"OSM",visible:!0,isBaseLayer:!0,olLayer:new Ko({source:new Yo})}),new st({id:"inspire-us-kindergarten",title:"Kindertageseinrichtungen in NRW",visible:!0,olLayer:new Fr({style:new Ie({image:new ci({fill:new Be({color:"blue"}),radius:5})}),source:this.vectorSourceFactory.createVectorSource({baseUrl:"https://ogc-api.nrw.de/inspire-us-kindergarten/v1",collectionId:"governmentalservice",crs:"http://www.opengis.net/def/crs/EPSG/0/3857",attributions:"Datenlizenz Deutschland - Namensnennung - Version 2.0"})})}),new st({id:"ogc_katasterbezirk",title:"Liegenschaftskatasterbezirke in NRW (viele Daten)",visible:!1,olLayer:new Fr({source:this.vectorSourceFactory.createVectorSource({baseUrl:"https://ogc-api.nrw.de/lika/v1",collectionId:"katasterbezirk",limit:1e3,crs:"http://www.opengis.net/def/crs/EPSG/0/3857",attributions:"Datenlizenz Deutschland - Namensnennung - Version 2.0"})})}),new st({title:"Abschnitte / Äste mit Unfällen (Mapbox Style)",visible:!1,olLayer:new nu({styleUrl:"https://demo.ldproxy.net/strassen/styles/default?f=mbs"})}),new st({title:"Pendleratlas",visible:!0,olLayer:new pt({source:new Lr({url:"https://pendleratlas.statistikportal.de/_vector_tiles/2022/vg250/{z}/{x}/{y}.pbf",format:new qr,projection:"EPSG:3857",attributions:`© Statistische Ämter der Länder ${new Date().getFullYear()} | GeoBasis-DE/BKG ${new Date().getFullYear()}`}),style:new Ie({fill:new Be({color:"rgba(173, 209, 158, 0.6)"}),stroke:new ut({color:"#2d7d9f",width:3})})})})]}}}class ou{beforeRequest({target:e,options:r}){e.protocol==="https:"&&e.hostname==="ogc-api.nrw.de"&&r.headers.set("Authorization","Bearer 12345")}}const au={"ogc-api-app":{name:"ogc-api-app",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:iu,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{vectorSourceFactory:{name:"ogc-features.VectorSourceFactory",qualifier:void 0,all:!1}}},SampleTokenInterceptor:{name:"SampleTokenInterceptor",clazz:ou,provides:[{name:"http.Interceptor",qualifier:void 0}],references:{}}},ui:{references:[]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:Qo,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:ea,provides:[{name:"map.MapRegistry",qualifier:void 0}],references:{providers:{name:"map.MapConfigProvider",qualifier:void 0,all:!0},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/theme":{name:"@open-pioneer/theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/ogc-features":{name:"@open-pioneer/ogc-features",services:{VectorSourceFactory:{name:"VectorSourceFactory",clazz:ca,provides:[{name:"ogc-features.VectorSourceFactory",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}},SearchSourceFactory:{name:"SearchSourceFactory",clazz:pa,provides:[{name:"ogc-features.SearchSourceFactory",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[]},properties:{}},"@open-pioneer/basemap-switcher":{name:"@open-pioneer/basemap-switcher",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map-navigation":{name:"@open-pioneer/map-navigation",services:{},ui:{references:[]},properties:{}},"@open-pioneer/toc":{name:"@open-pioneer/toc",services:{},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}},"@open-pioneer/reactivity":{name:"@open-pioneer/reactivity",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map-ui-components":{name:"@open-pioneer/map-ui-components",services:{},ui:{references:[]},properties:{}}},su=':root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.map-container .ol-viewport .ol-attribution{bottom:var(--map-padding-bottom);right:var(--map-padding-right)}',lu=["en","de"];function uu(t){switch(t){case"en":return Cn(()=>import("./Bi5QOsk-GySW.js"),[],import.meta.url).then(e=>e.default);case"de":return Cn(()=>import("./wAUNb4P8esoo.js"),[],import.meta.url).then(e=>e.default)}throw new Error(`Unsupported locale: '${t}'`)}const cu=eo(su),pu=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:uu,locales:lu,packages:au,styles:cu},Symbol.toStringTag,{value:"Module"})),du="ogc-api-app",fu=ta.bind(void 0,du);function hu(){const t=fu();return Q.jsx(or,{height:"100%",direction:"column",overflow:"hidden",children:Q.jsx(kn,{title:Q.jsx(zn,{textAlign:"center",py:1,children:Q.jsx(Fn,{size:"md",children:"Open Pioneer - OGC API Features and OGC API Tiles Sample"})}),children:Q.jsx(or,{flex:"1",direction:"column",position:"relative",children:Q.jsxs(ra,{mapId:Ve,children:[Q.jsx(ar,{position:"top-left",horizontalGap:20,verticalGap:20,children:Q.jsx(zn,{backgroundColor:"white",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",children:Q.jsx(kn,{title:Q.jsx(Fn,{size:"md",children:t.formatMessage({id:"tocTitle"})}),children:Q.jsx(oa,{mapId:Ve,basemapSwitcherProps:{allowSelectingEmptyBasemap:!0}})})})}),Q.jsx(ar,{position:"top-right",horizontalGap:10,verticalGap:10,children:Q.jsxs(ma,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",maxWidth:"400px",children:[Q.jsx(sr,{as:"b",children:"Description"}),Q.jsx(sr,{children:"This application can be used to test OGC API Features and OGC API Tiles."}),Q.jsx(sr,{children:"Vector Tiles cannot be reprojected and require the map to use the same projection. Currently all known MVT vector tile sets are using WebMercator, making them unusable in the Default Sample App which uses ETRS89/UTM zone 32N. This Sample App uses WebMercator."})]})}),Q.jsx(ar,{position:"bottom-right",horizontalGap:10,verticalGap:30,children:Q.jsxs(or,{direction:"column",gap:1,padding:1,children:[Q.jsx(da,{mapId:Ve}),Q.jsx(fa,{mapId:Ve}),Q.jsx(ha,{mapId:Ve})]})})]})})})})}const mu=to({component:hu,theme:ro,appMetadata:pu,async resolveConfig(t){const e=t.getAttribute("forced-locale");if(e)return{locale:e}}});customElements.define("ogc-api-app",mu);const yu=document.getElementsByTagName("body")[0];gu();function gu(){const t=window.location.search,r=new URLSearchParams(t).get("lang"),n=document.createElement("ogc-api-app");n.classList.add("full-height"),n.setAttribute("id","test"),r&&n.setAttribute("forced-locale",r),yu.appendChild(n)} +`,""),B.push(Y[fe],K);return B},[]):te=Tr(W,j).trim(),Te=z(v,"paint","text-opacity",b,T,m,x)}if(te&&Te&&!er){kt||(++U,w=S[U],(!w||!w.getText()||w.getFill()||w.getStroke())&&(w=new Ie,S[U]=w),w.setImage(void 0),w.setGeometry(void 0));const H=ti(v,b,T,"text",m);w.getText()||w.setText(q),q=w.getText(),(!q||"getDeclutterMode"in q&&q.getDeclutterMode()!==H)&&(q=new Jo({padding:[2,2,2,2],declutterMode:H}),w.setText(q));const W=z(v,"layout","text-transform",b,T,m,x);W=="uppercase"?te=Array.isArray(te)?te.map((ne,at)=>at%2?ne:ne.toUpperCase()):te.toUpperCase():W=="lowercase"&&(te=Array.isArray(te)?te.map((ne,at)=>at%2?ne:ne.toLowerCase()):te.toLowerCase());const B=Array.isArray(te)?te:N==2?Ar(te,ot):Dr(te,nt,tr,ot);q.setText(B),q.setFont(nt),q.setRotation(xr(z(v,"layout","text-rotate",b,T,m,x)));const X=z(v,"layout","text-anchor",b,T,m,x),D=kt||N==1?"point":z(v,"layout","symbol-placement",b,T,m,x);let O;if(D==="line-center"?(q.setPlacement("line"),O="center"):q.setPlacement(D),D==="line"&&typeof q.setRepeat=="function"){const ne=z(v,"layout","symbol-spacing",b,T,m,x);q.setRepeat(ne*2)}q.setOverflow(D==="point");let K=z(v,"paint","text-halo-width",b,T,m,x);const Y=z(v,"layout","text-offset",b,T,m,x),fe=z(v,"paint","text-translate",b,T,m,x);let ue=0,oe=0;if(D=="point"){O="center",X.indexOf("left")!==-1?(O="left",oe=K):X.indexOf("right")!==-1&&(O="right",oe=-K);const ne=z(v,"layout","text-rotation-alignment",b,T,m,x);q.setRotateWithView(ne=="map")}else q.setMaxAngle(xr(z(v,"layout","text-max-angle",b,T,m,x))*te.length/B.length),q.setRotateWithView(!1);q.setTextAlign(O);let ae="middle";X.indexOf("bottom")==0?(ae="bottom",ue=-K-.5*(it-1)*Ce):X.indexOf("top")==0&&(ae="top",ue=K+.5*(it-1)*Ce),q.setTextBaseline(ae);const J=z(v,"layout","text-justify",b,T,m,x);q.setJustify(J==="auto"?void 0:J),q.setOffsetX(Y[0]*Ce+oe+fe[0]),q.setOffsetY(Y[1]*Ce+ue+fe[1]),F.setColor(Ee(z(v,"paint","text-color",b,T,m,x),Te)),q.setFill(F);const he=Ee(z(v,"paint","text-halo-color",b,T,m,x),Te);if(he&&K>0){E.setColor(he),K*=2;const ne=.5*Ce;E.setWidth(K<=ne?K:ne),q.setStroke(E)}else q.setStroke(void 0);const me=z(v,"layout","text-padding",b,T,m,x),ye=q.getPadding();me!==ye[0]&&(ye[0]=me,ye[1]=me,ye[2]=me,ye[3]=me),w.setZIndex($e)}}}if(U>-1)return S.length=U+1,S};return t.setStyle($),t.set("mapbox-source",C),t.set("mapbox-layers",f),t.set("mapbox-featurestate",t.get("mapbox-featurestate")||{}),$}function Ul(t,e=512){return t.getExtent()?$r({extent:t.getExtent(),tileSize:e,maxZoom:22}).getResolutions():Yt}function Zl(t,e){return e.accessToken||(e=Object.assign({},e),new URL(t).searchParams.forEach((n,i)=>{e.accessToken=n,e.accessTokenParam=i})),e}function Hl(t,e,r="",n={},i=void 0){let o,a,s,l,u=!0;return typeof r!="string"&&!Array.isArray(r)?(s=r,l=s.source||s.layers,n=s):l=r,typeof n=="string"?(o=n,s={}):(o=n.styleUrl,s=n),s.updateSource===!1&&(u=!1),i||(i=s.resolutions),!o&&typeof e=="string"&&!e.trim().startsWith("{")&&(o=e),o&&(o=o.startsWith("data:")?location.href:Ui(o,s.accessToken),s=Zl(o,s)),new Promise(function(c,p){Hi(e,s).then(function(d){if(d.version!=8)return p(new Error("glStyle version 8 required."));if(!(t instanceof Fr||t instanceof pt))return p(new Error("Can only apply to VectorLayer or VectorTileLayer"));const f=t instanceof pt?"vector":"geojson";if(l?Array.isArray(l)?a=d.layers.find(function(F){return F.id===l[0]}).source:a=l:(a=Object.keys(d.sources).find(function(F){return d.sources[F].type===f}),l=a),!a)return p(new Error(`No ${f} source found in the glStyle.`));function h(){if(!u)return Promise.resolve();if(t instanceof pt)return Ql(d.sources[a],o,s).then(function(k){const I=t.getSource();I?k!==I&&(I.setTileUrlFunction(k.getTileUrlFunction()),typeof I.setUrls=="function"&&typeof k.getUrls=="function"&&I.setUrls(k.getUrls()),I.format_||(I.format_=k.format_),I.getAttributions()||I.setAttributions(k.getAttributions()),I.getTileLoadFunction()===di&&I.setTileLoadFunction(k.getTileLoadFunction()),Ho(I.getProjection(),k.getProjection())&&(I.tileGrid=k.getTileGrid())):t.setSource(k);const A=t.getSource().getTileGrid();!isFinite(t.getMaxResolution())&&!isFinite(t.getMinZoom())&&A.getMinZoom()>0&&t.setMaxResolution(Ml(Math.max(0,A.getMinZoom()-1e-12),A.getResolutions()))});const F=d.sources[a];let S=t.getSource();(!S||S.get("mapbox-source")!==F)&&(S=tu(F,o,s));const $=t.getSource();return $?S!==$&&($.getAttributions()||$.setAttributions(S.getAttributions()),$.format_||($.format_=S.getFormat()),$.url_=S.getUrl()):t.setSource(S),Promise.resolve()}let g,m,_,C;function E(){if(!C&&(!d.sprite||m)){if(s.projection&&!i){const S=Ke(s.projection).getUnits();S!=="m"&&(i=Yt.map($=>$/Go[S]))}C=Bl(t,d,l,i,m,_,(F,S=s.webfonts)=>$l(F,S),s.getImage),t.getStyle()?h().then(c).catch(p):p(new Error(`Nothing to show for source [${a}]`))}else C?(t.setStyle(C),h().then(c).catch(p)):p(new Error("Something went wrong trying to apply style."))}if(d.sprite){const F=new URL(Fl(d.sprite,s.accessToken,o||location.href));g=window.devicePixelRatio>=1.5?.5:1;const S=g==.5?"@2x":"";let $=F.origin+F.pathname+S+".json"+F.search;new Promise(function(k,I){Ye("Sprite",$,s).then(k).catch(function(A){$=F.origin+F.pathname+".json"+F.search,Ye("Sprite",$,s).then(k).catch(I)})}).then(function(k){if(k===void 0&&p(new Error("No sprites found.")),m=k,_=F.origin+F.pathname+S+".png"+F.search,s.transformRequest){const I=s.transformRequest(_,"SpriteImage")||_;(I instanceof Request||I instanceof Promise)&&(_=I)}E()}).catch(function(k){p(new Error(`Sprites cannot be loaded: ${$}: ${k.message}`))})}else E()}).catch(p)})}const ri={};function Wl(t,e,r){e.layers.some(function(n){if(n.type==="background"){if(t instanceof ui)return t.setBackground(function(i){return Xi(n,i,r,{})}),!0;if(t instanceof No||t instanceof Vo)return t.getLayers().insertAt(0,Yl(n,r,{})),!0}})}function Xl(t,e,r={}){return Hi(e,r).then(function(n){Wl(t,n,r)})}function Jl(t,e){const r=t.bounds;if(r){const n=Tn([r[0],r[1]],e),i=Tn([r[2],r[3]],e);return[n[0],n[1],i[0],i[1]]}return Ke(e).getExtent()}function Kl(t,e,r){const n=new ba({tileJSON:e,tileSize:t.tileSize||e.tileSize||512}),i=n.getTileJSON(),o=n.getTileGrid(),a=Ke(r.projection||"EPSG:3857"),s=Jl(i,a),l=a.getExtent(),u=i.minzoom||0,c=i.maxzoom||22,p={attributions:n.getAttributions(),projection:a,tileGrid:new li({origin:l?oi(l):o.getOrigin(0),extent:s||o.getExtent(),minZoom:u,resolutions:Ul(a,e.tileSize).slice(0,c+1),tileSize:o.getTileSize(0)})};return Array.isArray(i.tiles)?p.urls=i.tiles:p.url=i.tiles,p}function Xi(t,e,r,n){const i={id:t.id,type:t.type},o=t.layout||{},a=t.paint||{};i.paint=a;const s=Zi(e,r.resolutions||Yt);let l;const u=z(i,"paint","background-color",s,ri,n);return a["background-opacity"]!==void 0&&(l=z(i,"paint","background-opacity",s,ri,n)),o.visibility=="none"?void 0:Ee(u,l)}function Yl(t,e,r){const n=document.createElement("div");return n.className="ol-mapbox-style-background",n.style.position="absolute",n.style.width="100%",n.style.height="100%",new ui({source:new Bo({}),render(i){const o=Xi(t,i.viewState.resolution,e,r);return n.style.backgroundColor=o,n}})}function Ql(t,e,r){return new Promise(function(n,i){Rl(t,e,r).then(function({tileJson:o,tileLoadFunction:a}){const s=Kl(t,o,r);s.tileLoadFunction=a,s.format=new qr,n(new Lr(s))}).catch(i)})}function eu(t){return`{bbox-${(t?t.getCode():"EPSG:3857").toLowerCase().replace(/[^a-z0-9]/g,"-")}}`}function tu(t,e,r){const n=r.projection?new Sn({dataProjection:r.projection}):new Sn,i=t.data,o={};if(typeof i=="string"){const s=At(i,r.accessToken,r.accessTokenParam||"access_token",e||location.href);if(/\{bbox-[0-9a-z-]+\}/.test(s)){const u=(p,d,f)=>{const h=eu(f);return s.replace(h,`${p.join(",")}`)},c=new ir({attributions:t.attribution,format:n,loader:(p,d,f,h,g)=>{const m=typeof u=="function"?u(p,d,f):u;Ye("GeoJSON",m,r).then(_=>{const C=c.getFormat().readFeatures(_,{featureProjection:f});c.addFeatures(C),h(C)}).catch(_=>{c.removeLoadedExtent(p),g()})},strategy:Wo});return c.set("mapbox-source",t),c}const l=new ir({attributions:t.attribution,format:n,url:s,loader:(u,c,p,d,f)=>{Ye("GeoJSON",s,r).then(h=>{const g=l.getFormat().readFeatures(h,{featureProjection:p});l.addFeatures(g),d(g)}).catch(h=>{l.removeLoadedExtent(u),f()})}});return l}o.features=n.readFeatures(i,{featureProjection:"EPSG:3857"});const a=new ir(Object.assign({attributions:t.attribution,format:n},o));return a.set("mapbox-source",t),a}class ru extends qo{constructor(e){super(kr.ERROR),this.error=e}}class nu extends pt{constructor(e){const r="declutter"in e?e.declutter:!0,n=new Lr({state:"loading",format:new qr});super({source:n,background:e.background===!1?null:e.background,declutter:r,className:e.className,opacity:e.opacity,visible:e.visible,zIndex:e.zIndex,minResolution:e.minResolution,maxResolution:e.maxResolution,minZoom:e.minZoom,maxZoom:e.maxZoom,renderOrder:e.renderOrder,renderBuffer:e.renderBuffer,renderMode:e.renderMode,map:e.map,updateWhileAnimating:e.updateWhileAnimating,updateWhileInteracting:e.updateWhileInteracting,preload:e.preload,useInterimTilesOnError:e.useInterimTilesOnError,properties:e.properties}),e.accessToken&&(this.accessToken=e.accessToken);const i=e.styleUrl,o=[Hl(this,i,e.layers||e.source,{accessToken:this.accessToken})];this.getBackground()===void 0&&o.push(Xl(this,e.styleUrl,{accessToken:this.accessToken})),Promise.all(o).then(()=>{n.setState("ready")}).catch(a=>{this.dispatchEvent(new ru(a)),this.getSource().setState("error")})}}const Ve="main";class iu{mapId=Ve;vectorSourceFactory;constructor({references:e}){this.vectorSourceFactory=e.vectorSourceFactory}async getMapConfig(){return{projection:"EPSG:3857",initialView:{kind:"position",center:{x:848890,y:6793350},zoom:13},layers:[new st({title:"OSM",visible:!0,isBaseLayer:!0,olLayer:new Ko({source:new Yo})}),new st({id:"inspire-us-kindergarten",title:"Kindertageseinrichtungen in NRW",visible:!0,olLayer:new Fr({style:new Ie({image:new ci({fill:new Be({color:"blue"}),radius:5})}),source:this.vectorSourceFactory.createVectorSource({baseUrl:"https://ogc-api.nrw.de/inspire-us-kindergarten/v1",collectionId:"governmentalservice",crs:"http://www.opengis.net/def/crs/EPSG/0/3857",attributions:"Datenlizenz Deutschland - Namensnennung - Version 2.0"})})}),new st({id:"ogc_katasterbezirk",title:"Liegenschaftskatasterbezirke in NRW (viele Daten)",visible:!1,olLayer:new Fr({source:this.vectorSourceFactory.createVectorSource({baseUrl:"https://ogc-api.nrw.de/lika/v1",collectionId:"katasterbezirk",limit:1e3,crs:"http://www.opengis.net/def/crs/EPSG/0/3857",attributions:"Datenlizenz Deutschland - Namensnennung - Version 2.0"})})}),new st({title:"Abschnitte / Äste mit Unfällen (Mapbox Style)",visible:!1,olLayer:new nu({styleUrl:"https://demo.ldproxy.net/strassen/styles/default?f=mbs"})}),new st({title:"Pendleratlas",visible:!0,olLayer:new pt({source:new Lr({url:"https://pendleratlas.statistikportal.de/_vector_tiles/2022/vg250/{z}/{x}/{y}.pbf",format:new qr,projection:"EPSG:3857",attributions:`© Statistische Ämter der Länder ${new Date().getFullYear()} | GeoBasis-DE/BKG ${new Date().getFullYear()}`}),style:new Ie({fill:new Be({color:"rgba(173, 209, 158, 0.6)"}),stroke:new ut({color:"#2d7d9f",width:3})})})})]}}}class ou{beforeRequest({target:e,options:r}){e.protocol==="https:"&&e.hostname==="ogc-api.nrw.de"&&r.headers.set("Authorization","Bearer 12345")}}const au={"ogc-api-app":{name:"ogc-api-app",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:iu,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{vectorSourceFactory:{name:"ogc-features.VectorSourceFactory",qualifier:void 0,all:!1}}},SampleTokenInterceptor:{name:"SampleTokenInterceptor",clazz:ou,provides:[{name:"http.Interceptor",qualifier:void 0}],references:{}}},ui:{references:[]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:Qo,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:ea,provides:[{name:"map.MapRegistry",qualifier:void 0}],references:{providers:{name:"map.MapConfigProvider",qualifier:void 0,all:!0},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/theme":{name:"@open-pioneer/theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/ogc-features":{name:"@open-pioneer/ogc-features",services:{VectorSourceFactory:{name:"VectorSourceFactory",clazz:ca,provides:[{name:"ogc-features.VectorSourceFactory",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}},SearchSourceFactory:{name:"SearchSourceFactory",clazz:pa,provides:[{name:"ogc-features.SearchSourceFactory",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[]},properties:{}},"@open-pioneer/basemap-switcher":{name:"@open-pioneer/basemap-switcher",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map-navigation":{name:"@open-pioneer/map-navigation",services:{},ui:{references:[]},properties:{}},"@open-pioneer/toc":{name:"@open-pioneer/toc",services:{},ui:{references:[]},properties:{}},"@open-pioneer/reactivity":{name:"@open-pioneer/reactivity",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map-ui-components":{name:"@open-pioneer/map-ui-components",services:{},ui:{references:[]},properties:{}}},su=':root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.map-container .ol-viewport .ol-attribution{bottom:var(--map-padding-bottom);right:var(--map-padding-right)}',lu=["en","de"];function uu(t){switch(t){case"en":return Cn(()=>import("./Bi5QOsk-GySW.js"),[],import.meta.url).then(e=>e.default);case"de":return Cn(()=>import("./wAUNb4P8esoo.js"),[],import.meta.url).then(e=>e.default)}throw new Error(`Unsupported locale: '${t}'`)}const cu=eo(su),pu=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:uu,locales:lu,packages:au,styles:cu},Symbol.toStringTag,{value:"Module"})),du="ogc-api-app",fu=ta.bind(void 0,du);function hu(){const t=fu();return Q.jsx(or,{height:"100%",direction:"column",overflow:"hidden",children:Q.jsx(kn,{title:Q.jsx(zn,{textAlign:"center",py:1,children:Q.jsx(Fn,{size:"md",children:"Open Pioneer - OGC API Features and OGC API Tiles Sample"})}),children:Q.jsx(or,{flex:"1",direction:"column",position:"relative",children:Q.jsxs(ra,{mapId:Ve,children:[Q.jsx(ar,{position:"top-left",horizontalGap:20,verticalGap:20,children:Q.jsx(zn,{backgroundColor:"white",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",children:Q.jsx(kn,{title:Q.jsx(Fn,{size:"md",children:t.formatMessage({id:"tocTitle"})}),children:Q.jsx(oa,{mapId:Ve,basemapSwitcherProps:{allowSelectingEmptyBasemap:!0}})})})}),Q.jsx(ar,{position:"top-right",horizontalGap:10,verticalGap:10,children:Q.jsxs(ma,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",maxWidth:"400px",children:[Q.jsx(sr,{as:"b",children:"Description"}),Q.jsx(sr,{children:"This application can be used to test OGC API Features and OGC API Tiles."}),Q.jsx(sr,{children:"Vector Tiles cannot be reprojected and require the map to use the same projection. Currently all known MVT vector tile sets are using WebMercator, making them unusable in the Default Sample App which uses ETRS89/UTM zone 32N. This Sample App uses WebMercator."})]})}),Q.jsx(ar,{position:"bottom-right",horizontalGap:10,verticalGap:30,children:Q.jsxs(or,{direction:"column",gap:1,padding:1,children:[Q.jsx(da,{mapId:Ve}),Q.jsx(fa,{mapId:Ve}),Q.jsx(ha,{mapId:Ve})]})})]})})})})}const mu=to({component:hu,theme:ro,appMetadata:pu,async resolveConfig(t){const e=t.getAttribute("forced-locale");if(e)return{locale:e}}});customElements.define("ogc-api-app",mu);const yu=document.getElementsByTagName("body")[0];gu();function gu(){const t=window.location.search,r=new URLSearchParams(t).get("lang"),n=document.createElement("ogc-api-app");n.classList.add("full-height"),n.setAttribute("id","test"),r&&n.setAttribute("forced-locale",r),yu.appendChild(n)} diff --git a/openlayers-base-packages/pr-previews/pr-371/assets/DgAO1auW02-w.js b/openlayers-base-packages/pr-previews/pr-371/assets/DfzPiMvHeyHZ.js similarity index 99% rename from openlayers-base-packages/pr-previews/pr-371/assets/DgAO1auW02-w.js rename to openlayers-base-packages/pr-previews/pr-371/assets/DfzPiMvHeyHZ.js index 34cbde1..5d76a32 100644 --- a/openlayers-base-packages/pr-previews/pr-371/assets/DgAO1auW02-w.js +++ b/openlayers-base-packages/pr-previews/pr-371/assets/DfzPiMvHeyHZ.js @@ -1,4 +1,4 @@ -import{ac as Ke,g as Ao}from"./Bh0CuZ3gy5tC.js";import{a as mi}from"./BTEHqhSAUrUR.js";import"./CncSlnPsjr9P.js";import"./Cq1ZpfgEg4XJ.js";import"./BO_q12Vdyug-.js";import"./Tz2xttM4F6S2.js";import"./DUys4rac0YQP.js";import"./CL_VRsbiqLzM.js";var vt=function(a){return a&&a.Math===Math&&a},D=vt(typeof globalThis=="object"&&globalThis)||vt(typeof window=="object"&&window)||vt(typeof self=="object"&&self)||vt(typeof Ke=="object"&&Ke)||vt(typeof Ke=="object"&&Ke)||function(){return this}()||Function("return this")(),Et={},k=function(a){try{return!!a()}catch{return!0}},bl=k,le=!bl(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),xl=k,pr=!xl(function(){var a=(function(){}).bind();return typeof a!="function"||a.hasOwnProperty("prototype")}),Tl=pr,Ft=Function.prototype.call,Y=Tl?Ft.bind(Ft):function(){return Ft.apply(Ft,arguments)},Po={},Ro={}.propertyIsEnumerable,No=Object.getOwnPropertyDescriptor,Ol=No&&!Ro.call({1:2},1);Po.f=Ol?function(e){var t=No(this,e);return!!t&&t.enumerable}:Ro;var bi=function(a,e){return{enumerable:!(a&1),configurable:!(a&2),writable:!(a&4),value:e}},Io=pr,Mo=Function.prototype,Ua=Mo.call,Sl=Io&&Mo.bind.bind(Ua,Ua),L=Io?Sl:function(a){return function(){return Ua.apply(a,arguments)}},_o=L,El=_o({}.toString),$l=_o("".slice),Be=function(a){return $l(El(a),8,-1)},wl=L,Cl=k,Al=Be,Wr=Object,Pl=wl("".split),Vo=Cl(function(){return!Wr("z").propertyIsEnumerable(0)})?function(a){return Al(a)==="String"?Pl(a,""):Wr(a)}:Wr,je=function(a){return a==null},Rl=je,Nl=TypeError,he=function(a){if(Rl(a))throw new Nl("Can't call method on "+a);return a},Il=Vo,Ml=he,$t=function(a){return Il(Ml(a))},qr=typeof document=="object"&&document.all,B=typeof qr>"u"&&qr!==void 0?function(a){return typeof a=="function"||a===qr}:function(a){return typeof a=="function"},_l=B,ve=function(a){return typeof a=="object"?a!==null:_l(a)},Qr=D,Vl=B,Dl=function(a){return Vl(a)?a:void 0},Fe=function(a,e){return arguments.length<2?Dl(Qr[a]):Qr[a]&&Qr[a][e]},kl=L,yr=kl({}.isPrototypeOf),mr=typeof navigator<"u"&&String(navigator.userAgent)||"",Do=D,Kr=mr,fn=Do.process,cn=Do.Deno,gn=fn&&fn.versions||cn&&cn.version,dn=gn&&gn.v8,ue,hr;dn&&(ue=dn.split("."),hr=ue[0]>0&&ue[0]<4?1:+(ue[0]+ue[1]));!hr&&Kr&&(ue=Kr.match(/Edge\/(\d+)/),(!ue||ue[1]>=74)&&(ue=Kr.match(/Chrome\/(\d+)/),ue&&(hr=+ue[1])));var xi=hr,pn=xi,Ll=k,Bl=D,jl=Bl.String,ko=!!Object.getOwnPropertySymbols&&!Ll(function(){var a=Symbol("symbol detection");return!jl(a)||!(Object(a)instanceof Symbol)||!Symbol.sham&&pn&&pn<41}),Fl=ko,Lo=Fl&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Ul=Fe,Gl=B,zl=yr,Hl=Lo,Yl=Object,Bo=Hl?function(a){return typeof a=="symbol"}:function(a){var e=Ul("Symbol");return Gl(e)&&zl(e.prototype,Yl(a))},Xl=String,br=function(a){try{return Xl(a)}catch{return"Object"}},Wl=B,ql=br,Ql=TypeError,Te=function(a){if(Wl(a))return a;throw new Ql(ql(a)+" is not a function")},Kl=Te,Zl=je,ot=function(a,e){var t=a[e];return Zl(t)?void 0:Kl(t)},Zr=Y,Jr=B,ea=ve,Jl=TypeError,eh=function(a,e){var t,r;if(e==="string"&&Jr(t=a.toString)&&!ea(r=Zr(t,a))||Jr(t=a.valueOf)&&!ea(r=Zr(t,a))||e!=="string"&&Jr(t=a.toString)&&!ea(r=Zr(t,a)))return r;throw new Jl("Can't convert object to primitive value")},jo={exports:{}},yn=D,th=Object.defineProperty,Ti=function(a,e){try{th(yn,a,{value:e,configurable:!0,writable:!0})}catch{yn[a]=e}return e},rh=D,ah=Ti,mn="__core-js_shared__",bn=jo.exports=rh[mn]||ah(mn,{});(bn.versions||(bn.versions=[])).push({version:"3.37.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Oi=jo.exports,xn=Oi,Si=function(a,e){return xn[a]||(xn[a]=e||{})},ih=he,nh=Object,xr=function(a){return nh(ih(a))},sh=L,oh=xr,uh=sh({}.hasOwnProperty),fe=Object.hasOwn||function(e,t){return uh(oh(e),t)},lh=L,hh=0,vh=Math.random(),fh=lh(1 .toString),Fo=function(a){return"Symbol("+(a===void 0?"":a)+")_"+fh(++hh+vh,36)},ch=D,gh=Si,Tn=fe,dh=Fo,ph=ko,yh=Lo,Ze=ch.Symbol,ta=gh("wks"),mh=yh?Ze.for||Ze:Ze&&Ze.withoutSetter||dh,z=function(a){return Tn(ta,a)||(ta[a]=ph&&Tn(Ze,a)?Ze[a]:mh("Symbol."+a)),ta[a]},bh=Y,On=ve,Sn=Bo,xh=ot,Th=eh,Oh=z,Sh=TypeError,Eh=Oh("toPrimitive"),$h=function(a,e){if(!On(a)||Sn(a))return a;var t=xh(a,Eh),r;if(t){if(e===void 0&&(e="default"),r=bh(t,a,e),!On(r)||Sn(r))return r;throw new Sh("Can't convert object to primitive value")}return e===void 0&&(e="number"),Th(a,e)},wh=$h,Ch=Bo,Uo=function(a){var e=wh(a,"string");return Ch(e)?e:e+""},Ah=D,En=ve,Ga=Ah.document,Ph=En(Ga)&&En(Ga.createElement),Tr=function(a){return Ph?Ga.createElement(a):{}},Rh=le,Nh=k,Ih=Tr,Go=!Rh&&!Nh(function(){return Object.defineProperty(Ih("div"),"a",{get:function(){return 7}}).a!==7}),Mh=le,_h=Y,Vh=Po,Dh=bi,kh=$t,Lh=Uo,Bh=fe,jh=Go,$n=Object.getOwnPropertyDescriptor;Et.f=Mh?$n:function(e,t){if(e=kh(e),t=Lh(t),jh)try{return $n(e,t)}catch{}if(Bh(e,t))return Dh(!_h(Vh.f,e,t),e[t])};var Oe={},Fh=le,Uh=k,zo=Fh&&Uh(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Gh=ve,zh=String,Hh=TypeError,J=function(a){if(Gh(a))return a;throw new Hh(zh(a)+" is not an object")},Yh=le,Xh=Go,Wh=zo,Ut=J,wn=Uo,qh=TypeError,ra=Object.defineProperty,Qh=Object.getOwnPropertyDescriptor,aa="enumerable",ia="configurable",na="writable";Oe.f=Yh?Wh?function(e,t,r){if(Ut(e),t=wn(t),Ut(r),typeof e=="function"&&t==="prototype"&&"value"in r&&na in r&&!r[na]){var i=Qh(e,t);i&&i[na]&&(e[t]=r.value,r={configurable:ia in r?r[ia]:i[ia],enumerable:aa in r?r[aa]:i[aa],writable:!1})}return ra(e,t,r)}:ra:function(e,t,r){if(Ut(e),t=wn(t),Ut(r),Xh)try{return ra(e,t,r)}catch{}if("get"in r||"set"in r)throw new qh("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var Kh=le,Zh=Oe,Jh=bi,wt=Kh?function(a,e,t){return Zh.f(a,e,Jh(1,t))}:function(a,e,t){return a[e]=t,a},Ho={exports:{}},za=le,ev=fe,Yo=Function.prototype,tv=za&&Object.getOwnPropertyDescriptor,Ei=ev(Yo,"name"),rv=Ei&&(function(){}).name==="something",av=Ei&&(!za||za&&tv(Yo,"name").configurable),Or={EXISTS:Ei,PROPER:rv,CONFIGURABLE:av},iv=L,nv=B,Ha=Oi,sv=iv(Function.toString);nv(Ha.inspectSource)||(Ha.inspectSource=function(a){return sv(a)});var $i=Ha.inspectSource,ov=D,uv=B,Cn=ov.WeakMap,lv=uv(Cn)&&/native code/.test(String(Cn)),hv=Si,vv=Fo,An=hv("keys"),wi=function(a){return An[a]||(An[a]=vv(a))},Ci={},fv=lv,Xo=D,cv=ve,gv=wt,sa=fe,oa=Oi,dv=wi,pv=Ci,Pn="Object already initialized",Ya=Xo.TypeError,yv=Xo.WeakMap,vr,Tt,fr,mv=function(a){return fr(a)?Tt(a):vr(a,{})},bv=function(a){return function(e){var t;if(!cv(e)||(t=Tt(e)).type!==a)throw new Ya("Incompatible receiver, "+a+" required");return t}};if(fv||oa.state){var de=oa.state||(oa.state=new yv);de.get=de.get,de.has=de.has,de.set=de.set,vr=function(a,e){if(de.has(a))throw new Ya(Pn);return e.facade=a,de.set(a,e),e},Tt=function(a){return de.get(a)||{}},fr=function(a){return de.has(a)}}else{var Ye=dv("state");pv[Ye]=!0,vr=function(a,e){if(sa(a,Ye))throw new Ya(Pn);return e.facade=a,gv(a,Ye,e),e},Tt=function(a){return sa(a,Ye)?a[Ye]:{}},fr=function(a){return sa(a,Ye)}}var Sr={set:vr,get:Tt,has:fr,enforce:mv,getterFor:bv},Ai=L,xv=k,Tv=B,Gt=fe,Xa=le,Ov=Or.CONFIGURABLE,Sv=$i,Wo=Sr,Ev=Wo.enforce,$v=Wo.get,Rn=String,ir=Object.defineProperty,wv=Ai("".slice),Cv=Ai("".replace),Av=Ai([].join),Pv=Xa&&!xv(function(){return ir(function(){},"length",{value:8}).length!==8}),Rv=String(String).split("String"),Nv=Ho.exports=function(a,e,t){wv(Rn(e),0,7)==="Symbol("&&(e="["+Cv(Rn(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),t&&t.getter&&(e="get "+e),t&&t.setter&&(e="set "+e),(!Gt(a,"name")||Ov&&a.name!==e)&&(Xa?ir(a,"name",{value:e,configurable:!0}):a.name=e),Pv&&t&&Gt(t,"arity")&&a.length!==t.arity&&ir(a,"length",{value:t.arity});try{t&&Gt(t,"constructor")&&t.constructor?Xa&&ir(a,"prototype",{writable:!1}):a.prototype&&(a.prototype=void 0)}catch{}var r=Ev(a);return Gt(r,"source")||(r.source=Av(Rv,typeof e=="string"?e:"")),a};Function.prototype.toString=Nv(function(){return Tv(this)&&$v(this).source||Sv(this)},"toString");var qo=Ho.exports,Iv=B,Mv=Oe,_v=qo,Vv=Ti,Ue=function(a,e,t,r){r||(r={});var i=r.enumerable,n=r.name!==void 0?r.name:e;if(Iv(t)&&_v(t,n,r),r.global)i?a[e]=t:Vv(e,t);else{try{r.unsafe?a[e]&&(i=!0):delete a[e]}catch{}i?a[e]=t:Mv.f(a,e,{value:t,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return a},Qo={},Dv=Math.ceil,kv=Math.floor,Lv=Math.trunc||function(e){var t=+e;return(t>0?kv:Dv)(t)},Bv=Lv,Er=function(a){var e=+a;return e!==e||e===0?0:Bv(e)},jv=Er,Fv=Math.max,Uv=Math.min,Gv=function(a,e){var t=jv(a);return t<0?Fv(t+e,0):Uv(t,e)},zv=Er,Hv=Math.min,ut=function(a){var e=zv(a);return e>0?Hv(e,9007199254740991):0},Yv=ut,Pi=function(a){return Yv(a.length)},Xv=$t,Wv=Gv,qv=Pi,Nn=function(a){return function(e,t,r){var i=Xv(e),n=qv(i);if(n===0)return!a&&-1;var o=Wv(r,n),s;if(a&&t!==t){for(;n>o;)if(s=i[o++],s!==s)return!0}else for(;n>o;o++)if((a||o in i)&&i[o]===t)return a||o||0;return!a&&-1}},Ko={includes:Nn(!0),indexOf:Nn(!1)},Qv=L,ua=fe,Kv=$t,Zv=Ko.indexOf,Jv=Ci,In=Qv([].push),Zo=function(a,e){var t=Kv(a),r=0,i=[],n;for(n in t)!ua(Jv,n)&&ua(t,n)&&In(i,n);for(;e.length>r;)ua(t,n=e[r++])&&(~Zv(i,n)||In(i,n));return i},Ri=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ef=Zo,tf=Ri,rf=tf.concat("length","prototype");Qo.f=Object.getOwnPropertyNames||function(e){return ef(e,rf)};var Jo={};Jo.f=Object.getOwnPropertySymbols;var af=Fe,nf=L,sf=Qo,of=Jo,uf=J,lf=nf([].concat),hf=af("Reflect","ownKeys")||function(e){var t=sf.f(uf(e)),r=of.f;return r?lf(t,r(e)):t},Mn=fe,vf=hf,ff=Et,cf=Oe,gf=function(a,e,t){for(var r=vf(e),i=cf.f,n=ff.f,o=0;of;f++)if(v=y(a[f]),v&&ls(vs,v))return v;return new or(!1)}l=yd(a,h)}for(d=n?a.next:l.next;!(g=fd(d,l)).done;){try{v=y(g.value)}catch(x){hs(l,"throw",x)}if(typeof v=="object"&&v&&ls(vs,v))return v}return new or(!1)},xd=z,Iu=xd("iterator"),Mu=!1;try{var Td=0,fs={next:function(){return{done:!!Td++}},return:function(){Mu=!0}};fs[Iu]=function(){return this},Array.from(fs,function(){throw 2})}catch{}var Od=function(a,e){try{if(!e&&!Mu)return!1}catch{return!1}var t=!1;try{var r={};r[Iu]=function(){return{next:function(){return{done:t=!0}}}},a(r)}catch{}return t},Sd=Cr,Ed=Od,$d=Pt.CONSTRUCTOR,_u=$d||!Ed(function(a){Sd.all(a).then(void 0,function(){})}),wd=ee,Cd=Y,Ad=Te,Pd=lt,Rd=Vi,Nd=Nu,Id=_u;wd({target:"Promise",stat:!0,forced:Id},{all:function(e){var t=this,r=Pd.f(t),i=r.resolve,n=r.reject,o=Rd(function(){var s=Ad(t.resolve),u=[],l=0,h=1;Nd(e,function(f){var c=l++,v=!1;h++,Cd(s,t,f).then(function(d){v||(v=!0,u[c]=d,--h||i(u))},n)}),--h||i(u)});return o.error&&n(o.value),r.promise}});var Md=ee,_d=Pt.CONSTRUCTOR,ti=Cr,Vd=Fe,Dd=B,kd=Ue,cs=ti&&ti.prototype;Md({target:"Promise",proto:!0,forced:_d,real:!0},{catch:function(a){return this.then(void 0,a)}});if(Dd(ti)){var gs=Vd("Promise").prototype.catch;cs.catch!==gs&&kd(cs,"catch",gs,{unsafe:!0})}var Ld=ee,Bd=Y,jd=Te,Fd=lt,Ud=Vi,Gd=Nu,zd=_u;Ld({target:"Promise",stat:!0,forced:zd},{race:function(e){var t=this,r=Fd.f(t),i=r.reject,n=Ud(function(){var o=jd(t.resolve);Gd(e,function(s){Bd(o,t,s).then(r.resolve,i)})});return n.error&&i(n.value),r.promise}});var Hd=ee,Yd=lt,Xd=Pt.CONSTRUCTOR;Hd({target:"Promise",stat:!0,forced:Xd},{reject:function(e){var t=Yd.f(this),r=t.reject;return r(e),t.promise}});var Wd=J,qd=ve,Qd=lt,Kd=function(a,e){if(Wd(a),qd(e)&&e.constructor===a)return e;var t=Qd.f(a),r=t.resolve;return r(e),t.promise},Zd=ee,Jd=Fe,ep=Pt.CONSTRUCTOR,tp=Kd;Jd("Promise");Zd({target:"Promise",stat:!0,forced:ep},{resolve:function(e){return tp(this,e)}});function ds(a,e,t,r,i,n,o){try{var s=a[n](o),u=s.value}catch(l){return void t(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function xe(a){return function(){var e=this,t=arguments;return new Promise(function(r,i){var n=a.apply(e,t);function o(u){ds(n,r,i,o,s,"next",u)}function s(u){ds(n,r,i,o,s,"throw",u)}o(void 0)})}}var rp=Ni,ap=String,pe=function(a){if(rp(a)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return ap(a)},ip=J,Vu=function(){var a=ip(this),e="";return a.hasIndices&&(e+="d"),a.global&&(e+="g"),a.ignoreCase&&(e+="i"),a.multiline&&(e+="m"),a.dotAll&&(e+="s"),a.unicode&&(e+="u"),a.unicodeSets&&(e+="v"),a.sticky&&(e+="y"),e},ji=k,np=D,Fi=np.RegExp,Ui=ji(function(){var a=Fi("a","y");return a.lastIndex=2,a.exec("abcd")!==null}),sp=Ui||ji(function(){return!Fi("a","y").sticky}),op=Ui||ji(function(){var a=Fi("^r","gy");return a.lastIndex=2,a.exec("str")!==null}),Du={BROKEN_CARET:op,MISSED_STICKY:sp,UNSUPPORTED_Y:Ui},ku={},up=Zo,lp=Ri,hp=Object.keys||function(e){return up(e,lp)},vp=le,fp=zo,cp=Oe,gp=J,dp=$t,pp=hp;ku.f=vp&&!fp?Object.defineProperties:function(e,t){gp(e);for(var r=dp(t),i=pp(t),n=i.length,o=0,s;n>o;)cp.f(e,s=i[o++],r[s]);return e};var yp=J,mp=ku,ps=Ri,bp=Ci,xp=hu,Tp=Tr,Op=wi,ys=">",ms="<",ri="prototype",ai="script",Lu=Op("IE_PROTO"),xa=function(){},Bu=function(a){return ms+ai+ys+a+ms+"/"+ai+ys},bs=function(a){a.write(Bu("")),a.close();var e=a.parentWindow.Object;return a=null,e},Sp=function(){var a=Tp("iframe"),e="java"+ai+":",t;return a.style.display="none",xp.appendChild(a),a.src=String(e),t=a.contentWindow.document,t.open(),t.write(Bu("document.F=Object")),t.close(),t.F},Kt,ur=function(){try{Kt=new ActiveXObject("htmlfile")}catch{}ur=typeof document<"u"?document.domain&&Kt?bs(Kt):Sp():bs(Kt);for(var a=ps.length;a--;)delete ur[ri][ps[a]];return ur()};bp[Lu]=!0;var Gi=Object.create||function(e,t){var r;return e!==null?(xa[ri]=yp(e),r=new xa,xa[ri]=null,r[Lu]=e):r=ur(),t===void 0?r:mp.f(r,t)},Ep=k,$p=D,wp=$p.RegExp,Cp=Ep(function(){var a=wp(".","s");return!(a.dotAll&&a.test(` +import{ac as Ke,g as Ao}from"./Bh0CuZ3gy5tC.js";import{a as mi}from"./BEc19nv24p4W.js";import"./p-jlpmJ86TPh.js";import"./Cq1ZpfgEg4XJ.js";import"./BO_q12Vdyug-.js";import"./Tz2xttM4F6S2.js";import"./DUys4rac0YQP.js";import"./CL_VRsbiqLzM.js";var vt=function(a){return a&&a.Math===Math&&a},D=vt(typeof globalThis=="object"&&globalThis)||vt(typeof window=="object"&&window)||vt(typeof self=="object"&&self)||vt(typeof Ke=="object"&&Ke)||vt(typeof Ke=="object"&&Ke)||function(){return this}()||Function("return this")(),Et={},k=function(a){try{return!!a()}catch{return!0}},bl=k,le=!bl(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),xl=k,pr=!xl(function(){var a=(function(){}).bind();return typeof a!="function"||a.hasOwnProperty("prototype")}),Tl=pr,Ft=Function.prototype.call,Y=Tl?Ft.bind(Ft):function(){return Ft.apply(Ft,arguments)},Po={},Ro={}.propertyIsEnumerable,No=Object.getOwnPropertyDescriptor,Ol=No&&!Ro.call({1:2},1);Po.f=Ol?function(e){var t=No(this,e);return!!t&&t.enumerable}:Ro;var bi=function(a,e){return{enumerable:!(a&1),configurable:!(a&2),writable:!(a&4),value:e}},Io=pr,Mo=Function.prototype,Ua=Mo.call,Sl=Io&&Mo.bind.bind(Ua,Ua),L=Io?Sl:function(a){return function(){return Ua.apply(a,arguments)}},_o=L,El=_o({}.toString),$l=_o("".slice),Be=function(a){return $l(El(a),8,-1)},wl=L,Cl=k,Al=Be,Wr=Object,Pl=wl("".split),Vo=Cl(function(){return!Wr("z").propertyIsEnumerable(0)})?function(a){return Al(a)==="String"?Pl(a,""):Wr(a)}:Wr,je=function(a){return a==null},Rl=je,Nl=TypeError,he=function(a){if(Rl(a))throw new Nl("Can't call method on "+a);return a},Il=Vo,Ml=he,$t=function(a){return Il(Ml(a))},qr=typeof document=="object"&&document.all,B=typeof qr>"u"&&qr!==void 0?function(a){return typeof a=="function"||a===qr}:function(a){return typeof a=="function"},_l=B,ve=function(a){return typeof a=="object"?a!==null:_l(a)},Qr=D,Vl=B,Dl=function(a){return Vl(a)?a:void 0},Fe=function(a,e){return arguments.length<2?Dl(Qr[a]):Qr[a]&&Qr[a][e]},kl=L,yr=kl({}.isPrototypeOf),mr=typeof navigator<"u"&&String(navigator.userAgent)||"",Do=D,Kr=mr,fn=Do.process,cn=Do.Deno,gn=fn&&fn.versions||cn&&cn.version,dn=gn&&gn.v8,ue,hr;dn&&(ue=dn.split("."),hr=ue[0]>0&&ue[0]<4?1:+(ue[0]+ue[1]));!hr&&Kr&&(ue=Kr.match(/Edge\/(\d+)/),(!ue||ue[1]>=74)&&(ue=Kr.match(/Chrome\/(\d+)/),ue&&(hr=+ue[1])));var xi=hr,pn=xi,Ll=k,Bl=D,jl=Bl.String,ko=!!Object.getOwnPropertySymbols&&!Ll(function(){var a=Symbol("symbol detection");return!jl(a)||!(Object(a)instanceof Symbol)||!Symbol.sham&&pn&&pn<41}),Fl=ko,Lo=Fl&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Ul=Fe,Gl=B,zl=yr,Hl=Lo,Yl=Object,Bo=Hl?function(a){return typeof a=="symbol"}:function(a){var e=Ul("Symbol");return Gl(e)&&zl(e.prototype,Yl(a))},Xl=String,br=function(a){try{return Xl(a)}catch{return"Object"}},Wl=B,ql=br,Ql=TypeError,Te=function(a){if(Wl(a))return a;throw new Ql(ql(a)+" is not a function")},Kl=Te,Zl=je,ot=function(a,e){var t=a[e];return Zl(t)?void 0:Kl(t)},Zr=Y,Jr=B,ea=ve,Jl=TypeError,eh=function(a,e){var t,r;if(e==="string"&&Jr(t=a.toString)&&!ea(r=Zr(t,a))||Jr(t=a.valueOf)&&!ea(r=Zr(t,a))||e!=="string"&&Jr(t=a.toString)&&!ea(r=Zr(t,a)))return r;throw new Jl("Can't convert object to primitive value")},jo={exports:{}},yn=D,th=Object.defineProperty,Ti=function(a,e){try{th(yn,a,{value:e,configurable:!0,writable:!0})}catch{yn[a]=e}return e},rh=D,ah=Ti,mn="__core-js_shared__",bn=jo.exports=rh[mn]||ah(mn,{});(bn.versions||(bn.versions=[])).push({version:"3.37.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Oi=jo.exports,xn=Oi,Si=function(a,e){return xn[a]||(xn[a]=e||{})},ih=he,nh=Object,xr=function(a){return nh(ih(a))},sh=L,oh=xr,uh=sh({}.hasOwnProperty),fe=Object.hasOwn||function(e,t){return uh(oh(e),t)},lh=L,hh=0,vh=Math.random(),fh=lh(1 .toString),Fo=function(a){return"Symbol("+(a===void 0?"":a)+")_"+fh(++hh+vh,36)},ch=D,gh=Si,Tn=fe,dh=Fo,ph=ko,yh=Lo,Ze=ch.Symbol,ta=gh("wks"),mh=yh?Ze.for||Ze:Ze&&Ze.withoutSetter||dh,z=function(a){return Tn(ta,a)||(ta[a]=ph&&Tn(Ze,a)?Ze[a]:mh("Symbol."+a)),ta[a]},bh=Y,On=ve,Sn=Bo,xh=ot,Th=eh,Oh=z,Sh=TypeError,Eh=Oh("toPrimitive"),$h=function(a,e){if(!On(a)||Sn(a))return a;var t=xh(a,Eh),r;if(t){if(e===void 0&&(e="default"),r=bh(t,a,e),!On(r)||Sn(r))return r;throw new Sh("Can't convert object to primitive value")}return e===void 0&&(e="number"),Th(a,e)},wh=$h,Ch=Bo,Uo=function(a){var e=wh(a,"string");return Ch(e)?e:e+""},Ah=D,En=ve,Ga=Ah.document,Ph=En(Ga)&&En(Ga.createElement),Tr=function(a){return Ph?Ga.createElement(a):{}},Rh=le,Nh=k,Ih=Tr,Go=!Rh&&!Nh(function(){return Object.defineProperty(Ih("div"),"a",{get:function(){return 7}}).a!==7}),Mh=le,_h=Y,Vh=Po,Dh=bi,kh=$t,Lh=Uo,Bh=fe,jh=Go,$n=Object.getOwnPropertyDescriptor;Et.f=Mh?$n:function(e,t){if(e=kh(e),t=Lh(t),jh)try{return $n(e,t)}catch{}if(Bh(e,t))return Dh(!_h(Vh.f,e,t),e[t])};var Oe={},Fh=le,Uh=k,zo=Fh&&Uh(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Gh=ve,zh=String,Hh=TypeError,J=function(a){if(Gh(a))return a;throw new Hh(zh(a)+" is not an object")},Yh=le,Xh=Go,Wh=zo,Ut=J,wn=Uo,qh=TypeError,ra=Object.defineProperty,Qh=Object.getOwnPropertyDescriptor,aa="enumerable",ia="configurable",na="writable";Oe.f=Yh?Wh?function(e,t,r){if(Ut(e),t=wn(t),Ut(r),typeof e=="function"&&t==="prototype"&&"value"in r&&na in r&&!r[na]){var i=Qh(e,t);i&&i[na]&&(e[t]=r.value,r={configurable:ia in r?r[ia]:i[ia],enumerable:aa in r?r[aa]:i[aa],writable:!1})}return ra(e,t,r)}:ra:function(e,t,r){if(Ut(e),t=wn(t),Ut(r),Xh)try{return ra(e,t,r)}catch{}if("get"in r||"set"in r)throw new qh("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var Kh=le,Zh=Oe,Jh=bi,wt=Kh?function(a,e,t){return Zh.f(a,e,Jh(1,t))}:function(a,e,t){return a[e]=t,a},Ho={exports:{}},za=le,ev=fe,Yo=Function.prototype,tv=za&&Object.getOwnPropertyDescriptor,Ei=ev(Yo,"name"),rv=Ei&&(function(){}).name==="something",av=Ei&&(!za||za&&tv(Yo,"name").configurable),Or={EXISTS:Ei,PROPER:rv,CONFIGURABLE:av},iv=L,nv=B,Ha=Oi,sv=iv(Function.toString);nv(Ha.inspectSource)||(Ha.inspectSource=function(a){return sv(a)});var $i=Ha.inspectSource,ov=D,uv=B,Cn=ov.WeakMap,lv=uv(Cn)&&/native code/.test(String(Cn)),hv=Si,vv=Fo,An=hv("keys"),wi=function(a){return An[a]||(An[a]=vv(a))},Ci={},fv=lv,Xo=D,cv=ve,gv=wt,sa=fe,oa=Oi,dv=wi,pv=Ci,Pn="Object already initialized",Ya=Xo.TypeError,yv=Xo.WeakMap,vr,Tt,fr,mv=function(a){return fr(a)?Tt(a):vr(a,{})},bv=function(a){return function(e){var t;if(!cv(e)||(t=Tt(e)).type!==a)throw new Ya("Incompatible receiver, "+a+" required");return t}};if(fv||oa.state){var de=oa.state||(oa.state=new yv);de.get=de.get,de.has=de.has,de.set=de.set,vr=function(a,e){if(de.has(a))throw new Ya(Pn);return e.facade=a,de.set(a,e),e},Tt=function(a){return de.get(a)||{}},fr=function(a){return de.has(a)}}else{var Ye=dv("state");pv[Ye]=!0,vr=function(a,e){if(sa(a,Ye))throw new Ya(Pn);return e.facade=a,gv(a,Ye,e),e},Tt=function(a){return sa(a,Ye)?a[Ye]:{}},fr=function(a){return sa(a,Ye)}}var Sr={set:vr,get:Tt,has:fr,enforce:mv,getterFor:bv},Ai=L,xv=k,Tv=B,Gt=fe,Xa=le,Ov=Or.CONFIGURABLE,Sv=$i,Wo=Sr,Ev=Wo.enforce,$v=Wo.get,Rn=String,ir=Object.defineProperty,wv=Ai("".slice),Cv=Ai("".replace),Av=Ai([].join),Pv=Xa&&!xv(function(){return ir(function(){},"length",{value:8}).length!==8}),Rv=String(String).split("String"),Nv=Ho.exports=function(a,e,t){wv(Rn(e),0,7)==="Symbol("&&(e="["+Cv(Rn(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),t&&t.getter&&(e="get "+e),t&&t.setter&&(e="set "+e),(!Gt(a,"name")||Ov&&a.name!==e)&&(Xa?ir(a,"name",{value:e,configurable:!0}):a.name=e),Pv&&t&&Gt(t,"arity")&&a.length!==t.arity&&ir(a,"length",{value:t.arity});try{t&&Gt(t,"constructor")&&t.constructor?Xa&&ir(a,"prototype",{writable:!1}):a.prototype&&(a.prototype=void 0)}catch{}var r=Ev(a);return Gt(r,"source")||(r.source=Av(Rv,typeof e=="string"?e:"")),a};Function.prototype.toString=Nv(function(){return Tv(this)&&$v(this).source||Sv(this)},"toString");var qo=Ho.exports,Iv=B,Mv=Oe,_v=qo,Vv=Ti,Ue=function(a,e,t,r){r||(r={});var i=r.enumerable,n=r.name!==void 0?r.name:e;if(Iv(t)&&_v(t,n,r),r.global)i?a[e]=t:Vv(e,t);else{try{r.unsafe?a[e]&&(i=!0):delete a[e]}catch{}i?a[e]=t:Mv.f(a,e,{value:t,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return a},Qo={},Dv=Math.ceil,kv=Math.floor,Lv=Math.trunc||function(e){var t=+e;return(t>0?kv:Dv)(t)},Bv=Lv,Er=function(a){var e=+a;return e!==e||e===0?0:Bv(e)},jv=Er,Fv=Math.max,Uv=Math.min,Gv=function(a,e){var t=jv(a);return t<0?Fv(t+e,0):Uv(t,e)},zv=Er,Hv=Math.min,ut=function(a){var e=zv(a);return e>0?Hv(e,9007199254740991):0},Yv=ut,Pi=function(a){return Yv(a.length)},Xv=$t,Wv=Gv,qv=Pi,Nn=function(a){return function(e,t,r){var i=Xv(e),n=qv(i);if(n===0)return!a&&-1;var o=Wv(r,n),s;if(a&&t!==t){for(;n>o;)if(s=i[o++],s!==s)return!0}else for(;n>o;o++)if((a||o in i)&&i[o]===t)return a||o||0;return!a&&-1}},Ko={includes:Nn(!0),indexOf:Nn(!1)},Qv=L,ua=fe,Kv=$t,Zv=Ko.indexOf,Jv=Ci,In=Qv([].push),Zo=function(a,e){var t=Kv(a),r=0,i=[],n;for(n in t)!ua(Jv,n)&&ua(t,n)&&In(i,n);for(;e.length>r;)ua(t,n=e[r++])&&(~Zv(i,n)||In(i,n));return i},Ri=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ef=Zo,tf=Ri,rf=tf.concat("length","prototype");Qo.f=Object.getOwnPropertyNames||function(e){return ef(e,rf)};var Jo={};Jo.f=Object.getOwnPropertySymbols;var af=Fe,nf=L,sf=Qo,of=Jo,uf=J,lf=nf([].concat),hf=af("Reflect","ownKeys")||function(e){var t=sf.f(uf(e)),r=of.f;return r?lf(t,r(e)):t},Mn=fe,vf=hf,ff=Et,cf=Oe,gf=function(a,e,t){for(var r=vf(e),i=cf.f,n=ff.f,o=0;of;f++)if(v=y(a[f]),v&&ls(vs,v))return v;return new or(!1)}l=yd(a,h)}for(d=n?a.next:l.next;!(g=fd(d,l)).done;){try{v=y(g.value)}catch(x){hs(l,"throw",x)}if(typeof v=="object"&&v&&ls(vs,v))return v}return new or(!1)},xd=z,Iu=xd("iterator"),Mu=!1;try{var Td=0,fs={next:function(){return{done:!!Td++}},return:function(){Mu=!0}};fs[Iu]=function(){return this},Array.from(fs,function(){throw 2})}catch{}var Od=function(a,e){try{if(!e&&!Mu)return!1}catch{return!1}var t=!1;try{var r={};r[Iu]=function(){return{next:function(){return{done:t=!0}}}},a(r)}catch{}return t},Sd=Cr,Ed=Od,$d=Pt.CONSTRUCTOR,_u=$d||!Ed(function(a){Sd.all(a).then(void 0,function(){})}),wd=ee,Cd=Y,Ad=Te,Pd=lt,Rd=Vi,Nd=Nu,Id=_u;wd({target:"Promise",stat:!0,forced:Id},{all:function(e){var t=this,r=Pd.f(t),i=r.resolve,n=r.reject,o=Rd(function(){var s=Ad(t.resolve),u=[],l=0,h=1;Nd(e,function(f){var c=l++,v=!1;h++,Cd(s,t,f).then(function(d){v||(v=!0,u[c]=d,--h||i(u))},n)}),--h||i(u)});return o.error&&n(o.value),r.promise}});var Md=ee,_d=Pt.CONSTRUCTOR,ti=Cr,Vd=Fe,Dd=B,kd=Ue,cs=ti&&ti.prototype;Md({target:"Promise",proto:!0,forced:_d,real:!0},{catch:function(a){return this.then(void 0,a)}});if(Dd(ti)){var gs=Vd("Promise").prototype.catch;cs.catch!==gs&&kd(cs,"catch",gs,{unsafe:!0})}var Ld=ee,Bd=Y,jd=Te,Fd=lt,Ud=Vi,Gd=Nu,zd=_u;Ld({target:"Promise",stat:!0,forced:zd},{race:function(e){var t=this,r=Fd.f(t),i=r.reject,n=Ud(function(){var o=jd(t.resolve);Gd(e,function(s){Bd(o,t,s).then(r.resolve,i)})});return n.error&&i(n.value),r.promise}});var Hd=ee,Yd=lt,Xd=Pt.CONSTRUCTOR;Hd({target:"Promise",stat:!0,forced:Xd},{reject:function(e){var t=Yd.f(this),r=t.reject;return r(e),t.promise}});var Wd=J,qd=ve,Qd=lt,Kd=function(a,e){if(Wd(a),qd(e)&&e.constructor===a)return e;var t=Qd.f(a),r=t.resolve;return r(e),t.promise},Zd=ee,Jd=Fe,ep=Pt.CONSTRUCTOR,tp=Kd;Jd("Promise");Zd({target:"Promise",stat:!0,forced:ep},{resolve:function(e){return tp(this,e)}});function ds(a,e,t,r,i,n,o){try{var s=a[n](o),u=s.value}catch(l){return void t(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function xe(a){return function(){var e=this,t=arguments;return new Promise(function(r,i){var n=a.apply(e,t);function o(u){ds(n,r,i,o,s,"next",u)}function s(u){ds(n,r,i,o,s,"throw",u)}o(void 0)})}}var rp=Ni,ap=String,pe=function(a){if(rp(a)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return ap(a)},ip=J,Vu=function(){var a=ip(this),e="";return a.hasIndices&&(e+="d"),a.global&&(e+="g"),a.ignoreCase&&(e+="i"),a.multiline&&(e+="m"),a.dotAll&&(e+="s"),a.unicode&&(e+="u"),a.unicodeSets&&(e+="v"),a.sticky&&(e+="y"),e},ji=k,np=D,Fi=np.RegExp,Ui=ji(function(){var a=Fi("a","y");return a.lastIndex=2,a.exec("abcd")!==null}),sp=Ui||ji(function(){return!Fi("a","y").sticky}),op=Ui||ji(function(){var a=Fi("^r","gy");return a.lastIndex=2,a.exec("str")!==null}),Du={BROKEN_CARET:op,MISSED_STICKY:sp,UNSUPPORTED_Y:Ui},ku={},up=Zo,lp=Ri,hp=Object.keys||function(e){return up(e,lp)},vp=le,fp=zo,cp=Oe,gp=J,dp=$t,pp=hp;ku.f=vp&&!fp?Object.defineProperties:function(e,t){gp(e);for(var r=dp(t),i=pp(t),n=i.length,o=0,s;n>o;)cp.f(e,s=i[o++],r[s]);return e};var yp=J,mp=ku,ps=Ri,bp=Ci,xp=hu,Tp=Tr,Op=wi,ys=">",ms="<",ri="prototype",ai="script",Lu=Op("IE_PROTO"),xa=function(){},Bu=function(a){return ms+ai+ys+a+ms+"/"+ai+ys},bs=function(a){a.write(Bu("")),a.close();var e=a.parentWindow.Object;return a=null,e},Sp=function(){var a=Tp("iframe"),e="java"+ai+":",t;return a.style.display="none",xp.appendChild(a),a.src=String(e),t=a.contentWindow.document,t.open(),t.write(Bu("document.F=Object")),t.close(),t.F},Kt,ur=function(){try{Kt=new ActiveXObject("htmlfile")}catch{}ur=typeof document<"u"?document.domain&&Kt?bs(Kt):Sp():bs(Kt);for(var a=ps.length;a--;)delete ur[ri][ps[a]];return ur()};bp[Lu]=!0;var Gi=Object.create||function(e,t){var r;return e!==null?(xa[ri]=yp(e),r=new xa,xa[ri]=null,r[Lu]=e):r=ur(),t===void 0?r:mp.f(r,t)},Ep=k,$p=D,wp=$p.RegExp,Cp=Ep(function(){var a=wp(".","s");return!(a.dotAll&&a.test(` `)&&a.flags==="s")}),Ap=k,Pp=D,Rp=Pp.RegExp,Np=Ap(function(){var a=Rp("(?b)","g");return a.exec("b").groups.a!=="b"||"b".replace(a,"$c")!=="bc"}),et=Y,Pr=L,Ip=pe,Mp=Vu,_p=Du,Vp=Si,Dp=Gi,kp=Sr.get,Lp=Cp,Bp=Np,jp=Vp("native-string-replace",String.prototype.replace),dr=RegExp.prototype.exec,ii=dr,Fp=Pr("".charAt),Up=Pr("".indexOf),Gp=Pr("".replace),Ta=Pr("".slice),ni=function(){var a=/a/,e=/b*/g;return et(dr,a,"a"),et(dr,e,"a"),a.lastIndex!==0||e.lastIndex!==0}(),ju=_p.BROKEN_CARET,si=/()??/.exec("")[1]!==void 0,zp=ni||si||ju||Lp||Bp;zp&&(ii=function(e){var t=this,r=kp(t),i=Ip(e),n=r.raw,o,s,u,l,h,f,c;if(n)return n.lastIndex=t.lastIndex,o=et(ii,n,i),t.lastIndex=n.lastIndex,o;var v=r.groups,d=ju&&t.sticky,g=et(Mp,t),p=t.source,y=0,x=i;if(d&&(g=Gp(g,"y",""),Up(g,"g")===-1&&(g+="g"),x=Ta(i,t.lastIndex),t.lastIndex>0&&(!t.multiline||t.multiline&&Fp(i,t.lastIndex-1)!==` `)&&(p="(?: "+p+")",x=" "+x,y++),s=new RegExp("^(?:"+p+")",g)),si&&(s=new RegExp("^"+p+"$(?!\\s)",g)),ni&&(u=t.lastIndex),l=et(dr,d?s:t,x),d?l?(l.input=Ta(l.input,y),l[0]=Ta(l[0],y),l.index=t.lastIndex,t.lastIndex+=l[0].length):t.lastIndex=0:ni&&l&&(t.lastIndex=t.global?l.index+l[0].length:u),si&&l&&l.length>1&&et(jp,l[0],s,function(){for(h=1;h=n?a?"":void 0:(o=Es(r,i),o<55296||o>56319||i+1===n||(s=Es(r,i+1))<56320||s>57343?a?Zp(r,i):o:a?Jp(r,i,i+2):(o-55296<<10)+(s-56320)+65536)}},ey={codeAt:$s(!1),charAt:$s(!0)},ty=ey.charAt,Xi=function(a,e,t){return e+(t?ty(a,e).length:1)},ws=Y,ry=J,ay=B,iy=Be,ny=zi,sy=TypeError,Wi=function(a,e){var t=a.exec;if(ay(t)){var r=ws(t,a,e);return r!==null&&ry(r),r}if(iy(a)==="RegExp")return ws(ny,a,e);throw new sy("RegExp#exec called on incompatible receiver")},oy=Y,uy=Hi,ly=J,hy=je,vy=ut,Sa=pe,fy=he,cy=ot,gy=Xi,Cs=Wi;uy("match",function(a,e,t){return[function(i){var n=fy(this),o=hy(i)?void 0:cy(i,a);return o?oy(o,i,n):new RegExp(i)[a](Sa(n))},function(r){var i=ly(this),n=Sa(r),o=t(e,i,n);if(o.done)return o.value;if(!i.global)return Cs(i,n);var s=i.unicode;i.lastIndex=0;for(var u=[],l=0,h;(h=Cs(i,n))!==null;){var f=Sa(h[0]);u[l]=f,f===""&&(i.lastIndex=gy(n,vy(i.lastIndex),s)),l++}return l===0?null:u}]});var qi=L,dy=xr,py=Math.floor,Ea=qi("".charAt),yy=qi("".replace),$a=qi("".slice),my=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,by=/\$([$&'`]|\d{1,2})/g,xy=function(a,e,t,r,i,n){var o=t+a.length,s=r.length,u=by;return i!==void 0&&(i=dy(i),u=my),yy(n,u,function(l,h){var f;switch(Ea(h,0)){case"$":return"$";case"&":return a;case"`":return $a(e,0,t);case"'":return $a(e,o);case"<":f=i[$a(h,1,-1)];break;default:var c=+h;if(c===0)return l;if(c>s){var v=py(c/10);return v===0?l:v<=s?r[v-1]===void 0?Ea(h,1):r[v-1]+Ea(h,1):l}f=r[c-1]}return f===void 0?"":f})},Ty=lu,As=Y,Rr=L,Oy=Hi,Sy=k,Ey=J,$y=B,wy=je,Cy=Er,Ay=ut,We=pe,Py=he,Ry=Xi,Ny=ot,Iy=xy,My=Wi,_y=z,oi=_y("replace"),Vy=Math.max,Dy=Math.min,ky=Rr([].concat),wa=Rr([].push),Ps=Rr("".indexOf),Rs=Rr("".slice),Ly=function(a){return a===void 0?a:String(a)},By=function(){return"a".replace(/./,"$0")==="$0"}(),Ns=function(){return/./[oi]?/./[oi]("a","$0")==="":!1}(),jy=!Sy(function(){var a=/./;return a.exec=function(){var e=[];return e.groups={a:"7"},e},"".replace(a,"$")!=="7"});Oy("replace",function(a,e,t){var r=Ns?"$":"$0";return[function(n,o){var s=Py(this),u=wy(n)?void 0:Ny(n,oi);return u?As(u,n,s,o):As(e,We(s),n,o)},function(i,n){var o=Ey(this),s=We(i);if(typeof n=="string"&&Ps(n,r)===-1&&Ps(n,"$<")===-1){var u=t(e,o,s,n);if(u.done)return u.value}var l=$y(n);l||(n=We(n));var h=o.global,f;h&&(f=o.unicode,o.lastIndex=0);for(var c=[],v;v=My(o,s),!(v===null||(wa(c,v),!h));){var d=We(v[0]);d===""&&(o.lastIndex=Ry(s,Ay(o.lastIndex),f))}for(var g="",p=0,y=0;y=p&&(g+=Rs(s,p,b)+$,p=b+x.length)}return g+Rs(s,p)}]},!jy||!By||Ns);var Fy=ve,Uy=Be,Gy=z,zy=Gy("match"),Hy=function(a){var e;return Fy(a)&&((e=a[zy])!==void 0?!!e:Uy(a)==="RegExp")},Yy=Hy,Xy=TypeError,Qi=function(a){if(Yy(a))throw new Xy("The method doesn't accept regular expressions");return a},Wy=z,qy=Wy("match"),Ki=function(a){var e=/./;try{"/./"[a](e)}catch{try{return e[qy]=!1,"/./"[a](e)}catch{}}return!1},Qy=ee,Ky=wr,Zy=Et.f,Jy=ut,Is=pe,em=Qi,tm=he,rm=Ki,am=Ky("".slice),im=Math.min,Uu=rm("startsWith"),nm=!Uu&&!!function(){var a=Zy(String.prototype,"startsWith");return a&&!a.writable}();Qy({target:"String",proto:!0,forced:!nm&&!Uu},{startsWith:function(e){var t=Is(tm(this));em(e);var r=Jy(im(arguments.length>1?arguments[1]:void 0,t.length)),i=Is(e);return am(t,r,r+i.length)===i}});var sm=z,om=Gi,um=Oe.f,ui=sm("unscopables"),li=Array.prototype;li[ui]===void 0&&um(li,ui,{configurable:!0,value:om(null)});var lm=function(a){li[ui][a]=!0},hm=k,vm=!hm(function(){function a(){}return a.prototype.constructor=null,Object.getPrototypeOf(new a)!==a.prototype}),fm=fe,cm=B,gm=xr,dm=wi,pm=vm,Ms=dm("IE_PROTO"),hi=Object,ym=hi.prototype,Gu=pm?hi.getPrototypeOf:function(a){var e=gm(a);if(fm(e,Ms))return e[Ms];var t=e.constructor;return cm(t)&&e instanceof t?t.prototype:e instanceof hi?ym:null},mm=k,bm=B,xm=ve,_s=Gu,Tm=Ue,Om=z,vi=Om("iterator"),zu=!1,ke,Ca,Aa;[].keys&&(Aa=[].keys(),"next"in Aa?(Ca=_s(_s(Aa)),Ca!==Object.prototype&&(ke=Ca)):zu=!0);var Sm=!xm(ke)||mm(function(){var a={};return ke[vi].call(a)!==a});Sm&&(ke={});bm(ke[vi])||Tm(ke,vi,function(){return this});var Hu={IteratorPrototype:ke,BUGGY_SAFARI_ITERATORS:zu},Em=Hu.IteratorPrototype,$m=Gi,wm=bi,Cm=$r,Am=Rt,Pm=function(){return this},Rm=function(a,e,t,r){var i=e+" Iterator";return a.prototype=$m(Em,{next:wm(+!r,t)}),Cm(a,i,!1),Am[i]=Pm,a},Nm=ee,Im=Y,Yu=Or,Mm=B,_m=Rm,Vs=Gu,Ds=tu,Vm=$r,Dm=wt,Pa=Ue,km=z,Lm=Rt,Xu=Hu,Bm=Yu.PROPER,jm=Yu.CONFIGURABLE,ks=Xu.IteratorPrototype,Zt=Xu.BUGGY_SAFARI_ITERATORS,ct=km("iterator"),Ls="keys",gt="values",Bs="entries",Fm=function(){return this},Um=function(a,e,t,r,i,n,o){_m(t,e,r);var s=function(y){if(y===i&&c)return c;if(!Zt&&y&&y in h)return h[y];switch(y){case Ls:return function(){return new t(this,y)};case gt:return function(){return new t(this,y)};case Bs:return function(){return new t(this,y)}}return function(){return new t(this)}},u=e+" Iterator",l=!1,h=a.prototype,f=h[ct]||h["@@iterator"]||i&&h[i],c=!Zt&&f||s(i),v=e==="Array"&&h.entries||f,d,g,p;if(v&&(d=Vs(v.call(new a)),d!==Object.prototype&&d.next&&(Vs(d)!==ks&&(Ds?Ds(d,ks):Mm(d[ct])||Pa(d,ct,Fm)),Vm(d,u,!0))),Bm&&i===gt&&f&&f.name!==gt&&(jm?Dm(h,"name",gt):(l=!0,c=function(){return Im(f,this)})),i)if(g={values:s(gt),keys:n?c:s(Ls),entries:s(Bs)},o)for(p in g)(Zt||l||!(p in h))&&Pa(h,p,g[p]);else Nm({target:e,proto:!0,forced:Zt||l},g);return h[ct]!==c&&Pa(h,ct,c,{name:i}),Lm[e]=c,g},Gm=function(a,e){return{value:a,done:e}},zm=$t,Zi=lm,js=Rt,Wu=Sr,Hm=Oe.f,Ym=Um,Jt=Gm,Xm=le,qu="Array Iterator",Wm=Wu.set,qm=Wu.getterFor(qu),Qm=Ym(Array,"Array",function(a,e){Wm(this,{type:qu,target:zm(a),index:0,kind:e})},function(){var a=qm(this),e=a.target,t=a.index++;if(!e||t>=e.length)return a.target=void 0,Jt(void 0,!0);switch(a.kind){case"keys":return Jt(t,!1);case"values":return Jt(e[t],!1)}return Jt([t,e[t]],!1)},"values"),Fs=js.Arguments=js.Array;Zi("keys");Zi("values");Zi("entries");if(Xm&&Fs.name!=="values")try{Hm(Fs,"name",{value:"values"})}catch{}var Km={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Zm=Tr,Ra=Zm("span").classList,Us=Ra&&Ra.constructor&&Ra.constructor.prototype,Jm=Us===Object.prototype?void 0:Us,Gs=D,Qu=Km,e0=Jm,pt=Qm,zs=wt,t0=$r,r0=z,Na=r0("iterator"),Ia=pt.values,Ku=function(a,e){if(a){if(a[Na]!==Ia)try{zs(a,Na,Ia)}catch{a[Na]=Ia}if(t0(a,e,!0),Qu[e]){for(var t in pt)if(a[t]!==pt[t])try{zs(a,t,pt[t])}catch{a[t]=pt[t]}}}};for(var Ma in Qu)Ku(Gs[Ma]&&Gs[Ma].prototype,Ma);Ku(e0,"DOMTokenList");var a0=Te,i0=xr,n0=Vo,s0=Pi,Hs=TypeError,Ys="Reduce of empty array with no initial value",Xs=function(a){return function(e,t,r,i){var n=i0(e),o=n0(n),s=s0(n);if(a0(t),s===0&&r<2)throw new Hs(Ys);var u=a?s-1:0,l=a?-1:1;if(r<2)for(;;){if(u in o){i=o[u],u+=l;break}if(u+=l,a?u<0:s<=u)throw new Hs(Ys)}for(;a?u>=0:s>u;u+=l)u in o&&(i=t(i,o[u],u,n));return i}},o0={left:Xs(!1),right:Xs(!0)},u0=k,Zu=function(a,e){var t=[][a];return!!t&&u0(function(){t.call(null,e||function(){return 1},1)})},l0=ee,h0=o0.left,v0=Zu,Ws=xi,f0=At,c0=!f0&&Ws>79&&Ws<83,g0=c0||!v0("reduce");l0({target:"Array",proto:!0,forced:g0},{reduce:function(e){var t=arguments.length;return h0(this,e,t,t>1?arguments[1]:void 0)}});var d0=ee,p0=wr,y0=Et.f,m0=ut,qs=pe,b0=Qi,x0=he,T0=Ki,O0=p0("".slice),S0=Math.min,Ju=T0("endsWith"),E0=!Ju&&!!function(){var a=y0(String.prototype,"endsWith");return a&&!a.writable}();d0({target:"String",proto:!0,forced:!E0&&!Ju},{endsWith:function(e){var t=qs(x0(this));b0(e);var r=arguments.length>1?arguments[1]:void 0,i=t.length,n=r===void 0?i:S0(m0(r),i),o=qs(e);return O0(t,n-o.length,n)===o}});var _a=Y,el=L,$0=Hi,w0=J,C0=je,A0=he,P0=ou,R0=Xi,N0=ut,Qs=pe,I0=ot,Ks=Wi,M0=Du,_0=k,qe=M0.UNSUPPORTED_Y,V0=4294967295,D0=Math.min,Va=el([].push),Da=el("".slice),k0=!_0(function(){var a=/(?:)/,e=a.exec;a.exec=function(){return e.apply(this,arguments)};var t="ab".split(a);return t.length!==2||t[0]!=="a"||t[1]!=="b"}),Zs="abbc".split(/(b)*/)[1]==="c"||"test".split(/(?:)/,-1).length!==4||"ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||".".split(/()()/).length>1||"".split(/.?/).length;$0("split",function(a,e,t){var r="0".split(void 0,0).length?function(i,n){return i===void 0&&n===0?[]:_a(e,this,i,n)}:e;return[function(n,o){var s=A0(this),u=C0(n)?void 0:I0(n,a);return u?_a(u,n,s,o):_a(r,Qs(s),n,o)},function(i,n){var o=w0(this),s=Qs(i);if(!Zs){var u=t(r,o,s,n,r!==e);if(u.done)return u.value}var l=P0(o,RegExp),h=o.unicode,f=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(qe?"g":"y"),c=new l(qe?"^(?:"+o.source+")":o,f),v=n===void 0?V0:n>>>0;if(v===0)return[];if(s.length===0)return Ks(c,s)===null?[s]:[];for(var d=0,g=0,p=[];g"u"?Ke:window,er=["moz","webkit"],rt="AnimationFrame",st=be["request"+rt],St=be["cancel"+rt]||be["cancelRequest"+rt];for(var dt=0;!st&&dt3&&(this.alpha=s[3]),this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=function(){var u=this.r.toString(16),l=this.g.toString(16),h=this.b.toString(16);return u.length==1&&(u="0"+u),l.length==1&&(l="0"+l),h.length==1&&(h="0"+h),"#"+u+l+h},this.getHelpXML=function(){for(var u=new Array,l=0;l "+g.toRGB()+" -> "+g.toHex());d.appendChild(p),d.appendChild(y),v.appendChild(d)}catch{}return v}};const ci=Ao(eb);var tb=ee,rb=wr,ab=Ko.indexOf,ib=Zu,gi=rb([].indexOf),rl=!!gi&&1/gi([1],1,-0)<0,nb=rl||!ib("indexOf");tb({target:"Array",proto:!0,forced:nb},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return rl?gi(this,e,t)||0:ab(this,e,t)}});var sb=ee,ob=L,ub=Qi,lb=he,ao=pe,hb=Ki,vb=ob("".indexOf);sb({target:"String",proto:!0,forced:!hb("includes")},{includes:function(e){return!!~vb(ao(lb(this)),ao(ub(e)),arguments.length>1?arguments[1]:void 0)}});var fb=Be,cb=Array.isArray||function(e){return fb(e)==="Array"},gb=ee,db=L,pb=cb,yb=db([].reverse),io=[1,2];gb({target:"Array",proto:!0,forced:String(io)===String(io.reverse())},{reverse:function(){return pb(this)&&(this.length=this.length),yb(this)}});/*! ***************************************************************************** diff --git a/openlayers-base-packages/pr-previews/pr-371/assets/BBt4Ba3H9gMn.js b/openlayers-base-packages/pr-previews/pr-371/assets/Ds9MLKVSYIgg.js similarity index 99% rename from openlayers-base-packages/pr-previews/pr-371/assets/BBt4Ba3H9gMn.js rename to openlayers-base-packages/pr-previews/pr-371/assets/Ds9MLKVSYIgg.js index 4be3a96..1e85c1a 100644 --- a/openlayers-base-packages/pr-previews/pr-371/assets/BBt4Ba3H9gMn.js +++ b/openlayers-base-packages/pr-previews/pr-371/assets/Ds9MLKVSYIgg.js @@ -1,4 +1,4 @@ -var K=a=>{throw TypeError(a)};var j=(a,e,t)=>e.has(a)||K("Cannot "+t);var C=(a,e,t)=>(j(a,e,"read from private field"),t?t.call(a):e.get(a)),D=(a,e,t)=>e.has(a)?K("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(a):e.set(a,t),x=(a,e,t,i)=>(j(a,e,"write to private field"),i?i.call(a,t):e.set(a,t),t),W=(a,e,t)=>(j(a,e,"access private method"),t);import{h as ie,j as X,r as I,a0 as de,f as J,c as ue,b as fe}from"./Bh0CuZ3gy5tC.js";import{_ as ge}from"./CmsKOCeNyeyo.js";import{c5 as _e,c6 as me,E as pe,c7 as ye,c8 as Ce,c9 as we,bj as ke,ca as Te,bH as xe,bu as Q,bz as ve,a as Pe,b as Se,cb as Le,bn as Z,bG as De,cc as Ee,ad as be,bs as w,cd as Me,I as Ie,bt as se,b3 as E,as as V,ce as ee,bC as Fe,at as Re,ar as ne,bF as Ne,cf as Oe,cg as re,ch as Ge,aP as Ue,aR as Ae,b5 as te,av as je}from"./CncSlnPsjr9P.js";import{a as We,b as oe,M as ae,G as Ve}from"./JZ5RcWTlF_6Y.js";import{L as U}from"./DsXJQLY20iHp.js";var Y=ie(function(e,t){const{htmlWidth:i,htmlHeight:s,alt:r,...n}=e;return X.jsx("img",{width:i,height:s,ref:t,alt:r,...n})});Y.displayName="NativeImage";function Be(a){const{loading:e,src:t,srcSet:i,onLoad:s,onError:r,crossOrigin:n,sizes:o,ignoreFallback:h}=a,[l,c]=I.useState("pending");I.useEffect(()=>{c(t?"loading":"pending")},[t]);const d=I.useRef(),u=I.useCallback(()=>{if(!t)return;f();const g=new Image;g.src=t,n&&(g.crossOrigin=n),i&&(g.srcset=i),o&&(g.sizes=o),e&&(g.loading=e),g.onload=_=>{f(),c("loaded"),s?.(_)},g.onerror=_=>{f(),c("failed"),r?.(_)},d.current=g},[t,n,i,o,s,r,e]),f=()=>{d.current&&(d.current.onload=null,d.current.onerror=null,d.current=null)};return de(()=>{if(!h)return l==="loading"&&u(),()=>{f()}},[l,u,h]),h?"loaded":l}var qe=(a,e)=>a!=="loaded"&&e==="beforeLoadOrError"||a==="failed"&&e==="onError";function He(a,e=[]){const t=Object.assign({},a);for(const i of e)i in t&&delete t[i];return t}var $e=ie(function(e,t){const{fallbackSrc:i,fallback:s,src:r,srcSet:n,align:o,fit:h,loading:l,ignoreFallback:c,crossOrigin:d,fallbackStrategy:u="beforeLoadOrError",referrerPolicy:f,...g}=e,_=i!==void 0||s!==void 0,m=l!=null||c||!_,T=Be({...e,crossOrigin:d,ignoreFallback:m}),k=qe(T,u),p={ref:t,objectFit:h,objectPosition:o,...m?g:He(g,["onError","onLoad"])};return k?s||X.jsx(J.img,{as:Y,className:"chakra-image__placeholder",src:i,...p}):X.jsx(J.img,{as:Y,src:r,srcSet:n,crossOrigin:d,loading:l,referrerPolicy:f,className:"chakra-image",...p})});$e.displayName="Image";class A extends _e{constructor(e,t,i){super(),i!==void 0&&t===void 0?this.setFlatCoordinates(i,e):(t=t||0,this.setCenterAndRadius(e,t,i))}clone(){const e=new A(this.flatCoordinates.slice(),void 0,this.layout);return e.applyProperties(this),e}closestPointXY(e,t,i,s){const r=this.flatCoordinates,n=e-r[0],o=t-r[1],h=n*n+o*o;if(h=i[0]||e[1]<=i[1]&&e[3]>=i[1]?!0:ye(e,this.intersectsCoordinate.bind(this))}return!1}setCenter(e){const t=this.stride,i=this.flatCoordinates[t]-this.flatCoordinates[0],s=e.slice();s[t]=s[0]+i;for(let r=1;r{throw TypeError(a)};var j=(a,e,t)=>e.has(a)||K("Cannot "+t);var C=(a,e,t)=>(j(a,e,"read from private field"),t?t.call(a):e.get(a)),D=(a,e,t)=>e.has(a)?K("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(a):e.set(a,t),x=(a,e,t,i)=>(j(a,e,"write to private field"),i?i.call(a,t):e.set(a,t),t),W=(a,e,t)=>(j(a,e,"access private method"),t);import{h as ie,j as X,r as I,a0 as de,f as J,c as ue,b as fe}from"./Bh0CuZ3gy5tC.js";import{_ as ge}from"./CmsKOCeNyeyo.js";import{c5 as _e,c6 as me,E as pe,c7 as ye,c8 as Ce,c9 as we,bj as ke,ca as Te,bH as xe,bu as Q,bz as ve,a as Pe,b as Se,cb as Le,bn as Z,bG as De,cc as Ee,ad as be,bs as w,cd as Me,I as Ie,bt as se,b3 as E,as as V,ce as ee,bC as Fe,at as Re,ar as ne,bF as Ne,cf as Oe,cg as re,ch as Ge,aP as Ue,aR as Ae,b5 as te,av as je}from"./p-jlpmJ86TPh.js";import{a as We,b as oe,M as ae,G as Ve}from"./D8rToQP6FvST.js";import{L as U}from"./BWsYSh9PkSaL.js";var Y=ie(function(e,t){const{htmlWidth:i,htmlHeight:s,alt:r,...n}=e;return X.jsx("img",{width:i,height:s,ref:t,alt:r,...n})});Y.displayName="NativeImage";function Be(a){const{loading:e,src:t,srcSet:i,onLoad:s,onError:r,crossOrigin:n,sizes:o,ignoreFallback:h}=a,[l,c]=I.useState("pending");I.useEffect(()=>{c(t?"loading":"pending")},[t]);const d=I.useRef(),u=I.useCallback(()=>{if(!t)return;f();const g=new Image;g.src=t,n&&(g.crossOrigin=n),i&&(g.srcset=i),o&&(g.sizes=o),e&&(g.loading=e),g.onload=_=>{f(),c("loaded"),s?.(_)},g.onerror=_=>{f(),c("failed"),r?.(_)},d.current=g},[t,n,i,o,s,r,e]),f=()=>{d.current&&(d.current.onload=null,d.current.onerror=null,d.current=null)};return de(()=>{if(!h)return l==="loading"&&u(),()=>{f()}},[l,u,h]),h?"loaded":l}var qe=(a,e)=>a!=="loaded"&&e==="beforeLoadOrError"||a==="failed"&&e==="onError";function He(a,e=[]){const t=Object.assign({},a);for(const i of e)i in t&&delete t[i];return t}var $e=ie(function(e,t){const{fallbackSrc:i,fallback:s,src:r,srcSet:n,align:o,fit:h,loading:l,ignoreFallback:c,crossOrigin:d,fallbackStrategy:u="beforeLoadOrError",referrerPolicy:f,...g}=e,_=i!==void 0||s!==void 0,m=l!=null||c||!_,T=Be({...e,crossOrigin:d,ignoreFallback:m}),k=qe(T,u),p={ref:t,objectFit:h,objectPosition:o,...m?g:He(g,["onError","onLoad"])};return k?s||X.jsx(J.img,{as:Y,className:"chakra-image__placeholder",src:i,...p}):X.jsx(J.img,{as:Y,src:r,srcSet:n,crossOrigin:d,loading:l,referrerPolicy:f,className:"chakra-image",...p})});$e.displayName="Image";class A extends _e{constructor(e,t,i){super(),i!==void 0&&t===void 0?this.setFlatCoordinates(i,e):(t=t||0,this.setCenterAndRadius(e,t,i))}clone(){const e=new A(this.flatCoordinates.slice(),void 0,this.layout);return e.applyProperties(this),e}closestPointXY(e,t,i,s){const r=this.flatCoordinates,n=e-r[0],o=t-r[1],h=n*n+o*o;if(h=i[0]||e[1]<=i[1]&&e[3]>=i[1]?!0:ye(e,this.intersectsCoordinate.bind(this))}return!1}setCenter(e){const t=this.stride,i=this.flatCoordinates[t]-this.flatCoordinates[0],s=e.slice();s[t]=s[0]+i;for(let r=1;r component has likely been used twice in your application.`),{destroy(){}};x(this,y,e);const t=C(this,S);if(x(this,S,void 0),t)for(const[s,...r]of t)e[s](...r);let i=!1;return{destroy:()=>{i||(i=!0,C(this,y)===e&&x(this,y,void 0))}}}}y=new WeakMap,S=new WeakMap,M=new WeakMap,L=new WeakSet,z=function(e,...t){if(C(this,y))C(this,y)[e](...t);else{const i=C(this,S)??x(this,S,[]);if(i.length>=1024){B.error(`Internal notification buffer overflow: this event will be dropped to prevent a memory leak. Make sure that the UI is configured to display notifications (use ).`,{method:e,args:t});return}i.push([e,...t])}},Xe=function(){C(this,y)||B.warn(`No notification handler has been registered: notifications will not be visible. Make sure that your app contains the component.`)};const F={DRAWSTART:"drawstart",DRAWEND:"drawend",DRAWABORT:"drawabort"};class R extends Re{constructor(e,t){super(e),this.feature=t}}function Ye(a,e){const t=[];for(let i=0;i=t?a[e-t]:a[e]}function O(a,e,t){let i,s;en){const h=P(a,i),l=P(a,s);return N(h,l)}let o=0;if(iu.startIndex?_u.startIndex&&(_-=f.length)),h=_,o=d)}const l=e.targets[o];let c=l.ring;if(e.targetIndex===o&&c){const d=P(l.coordinates,h),u=t.getPixelFromCoordinate(d);se(u,e.startPx)>i&&(c=!1)}if(c){const d=l.coordinates,u=d.length,f=l.startIndex,g=h;if(f=t?i-=t:i<0&&(i+=t);let r=i+1;r>=t&&(r-=t);const n=a[i],o=n[0],h=n[1],l=a[r],c=l[0]-o,d=l[1]-h;return[o+c*s,h+d*s]}class Ke extends ke{constructor(e){const t=e;t.stopDown||(t.stopDown=Te),super(t),this.on,this.once,this.un,this.shouldHandle_=!1,this.downPx_=null,this.downTimeout_,this.lastDragTime_,this.pointerType_,this.freehand_=!1,this.source_=e.source?e.source:null,this.features_=e.features?e.features:null,this.snapTolerance_=e.snapTolerance?e.snapTolerance:12,this.type_=e.type,this.mode_=Qe(this.type_),this.stopClick_=!!e.stopClick,this.minPoints_=e.minPoints?e.minPoints:this.mode_==="Polygon"?3:2,this.maxPoints_=this.mode_==="Circle"?2:e.maxPoints?e.maxPoints:1/0,this.finishCondition_=e.finishCondition?e.finishCondition:xe,this.geometryLayout_=e.geometryLayout?e.geometryLayout:"XY";let i=e.geometryFunction;if(!i){const s=this.mode_;if(s==="Circle")i=function(r,n,o){const h=n||new A([NaN,NaN]),l=Q(r[0]),c=ve(l,Q(r[r.length-1]));return h.setCenterAndRadius(l,Math.sqrt(c),this.geometryLayout_),h};else{let r;s==="Point"?r=V:s==="LineString"?r=U:s==="Polygon"&&(r=ne),i=function(n,o,h){return o?s==="Polygon"?n[0].length?o.setCoordinates([n[0].concat([n[0][0]])],this.geometryLayout_):o.setCoordinates([],this.geometryLayout_):o.setCoordinates(n,this.geometryLayout_):o=new r(n,this.geometryLayout_),o}}}this.geometryFunction_=i,this.dragVertexDelay_=e.dragVertexDelay!==void 0?e.dragVertexDelay:500,this.finishCoordinate_=null,this.sketchFeature_=null,this.sketchPoint_=null,this.sketchCoords_=null,this.sketchLine_=null,this.sketchLineCoords_=null,this.squaredClickTolerance_=e.clickTolerance?e.clickTolerance*e.clickTolerance:36,this.overlay_=new Pe({source:new Se({useSpatialIndex:!1,wrapX:e.wrapX?e.wrapX:!1}),style:e.style?e.style:Je(),updateWhileInteracting:!0}),this.geometryName_=e.geometryName,this.condition_=e.condition?e.condition:Le,this.freehandCondition_,e.freehand?this.freehandCondition_=Z:this.freehandCondition_=e.freehandCondition?e.freehandCondition:De,this.traceCondition_,this.setTrace(e.trace||!1),this.traceState_={active:!1},this.traceSource_=e.traceSource||e.source||null,this.addChangeListener(Ee.ACTIVE,this.updateState_)}setTrace(e){let t;e?e===!0?t=Z:t=e:t=Ne,this.traceCondition_=t}setMap(e){super.setMap(e),this.updateState_()}getOverlay(){return this.overlay_}handleEvent(e){e.originalEvent.type===be.CONTEXTMENU&&e.originalEvent.preventDefault(),this.freehand_=this.mode_!=="Point"&&this.freehandCondition_(e);let t=e.type===w.POINTERMOVE,i=!0;return!this.freehand_&&this.lastDragTime_&&e.type===w.POINTERDRAG&&(Date.now()-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=e.pixel,this.shouldHandle_=!this.freehand_,t=!0):this.lastDragTime_=void 0,this.shouldHandle_&&this.downTimeout_!==void 0&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0)),this.freehand_&&e.type===w.POINTERDRAG&&this.sketchFeature_!==null?(this.addToDrawing_(e.coordinate),i=!1):this.freehand_&&e.type===w.POINTERDOWN?i=!1:t&&this.getPointerCount()<2?(i=e.type===w.POINTERMOVE,i&&this.freehand_?(this.handlePointerMove_(e),this.shouldHandle_&&e.originalEvent.preventDefault()):(e.originalEvent.pointerType==="mouse"||e.type===w.POINTERDRAG&&this.downTimeout_===void 0)&&this.handlePointerMove_(e)):e.type===w.DBLCLICK&&(i=!1),super.handleEvent(e)&&i}handleDownEvent(e){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=e.pixel,this.finishCoordinate_||this.startDrawing_(e.coordinate),!0):this.condition_(e)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout(()=>{this.handlePointerMove_(new Me(w.POINTERMOVE,e.map,e.originalEvent,!1,e.frameState))},this.dragVertexDelay_),this.downPx_=e.pixel,!0):(this.lastDragTime_=void 0,!1)}deactivateTrace_(){this.traceState_={active:!1}}toggleTraceState_(e){if(!this.traceSource_||!this.traceCondition_(e))return;if(this.traceState_.active){this.deactivateTrace_();return}const t=this.getMap(),i=t.getCoordinateFromPixel([e.pixel[0]-this.snapTolerance_,e.pixel[1]+this.snapTolerance_]),s=t.getCoordinateFromPixel([e.pixel[0]+this.snapTolerance_,e.pixel[1]-this.snapTolerance_]),r=Ie([i,s]),n=this.traceSource_.getFeaturesInExtent(r);if(n.length===0)return;const o=Ye(e.coordinate,n);o.length&&(this.traceState_={active:!0,startPx:e.pixel.slice(),targets:o,targetIndex:-1})}addOrRemoveTracedCoordinates_(e,t){const i=e.startIndex<=e.endIndex,s=e.startIndex<=t;i===s?i&&t>e.endIndex||!i&&te.endIndex)&&this.removeTracedCoordinates_(t,e.endIndex):(this.removeTracedCoordinates_(e.startIndex,e.endIndex),this.addTracedCoordinates_(e,e.startIndex,t))}removeTracedCoordinates_(e,t){if(e===t)return;let i=0;if(e0&&this.removeLastPoints_(i)}addTracedCoordinates_(e,t,i){if(t===i)return;const s=[];if(t=n;--o)s.push(v(e.coordinates,o))}s.length&&this.appendCoordinates(s)}updateTrace_(e){const t=this.traceState_;if(!t.active||t.targetIndex===-1&&se(t.startPx,e.pixel)this.squaredClickTolerance_:n<=this.squaredClickTolerance_,!this.shouldHandle_)return}if(!this.finishCoordinate_){this.createOrUpdateSketchPoint_(e.coordinate.slice());return}this.updateTrace_(e),this.modifyDrawing_(e.coordinate)}atFinish_(e,t){let i=!1;if(this.sketchFeature_){let s=!1,r=[this.finishCoordinate_];const n=this.mode_;if(n==="Point")i=!0;else if(n==="Circle")i=this.sketchCoords_.length===2;else if(n==="LineString")s=!t&&this.sketchCoords_.length>this.minPoints_;else if(n==="Polygon"){const o=this.sketchCoords_;s=o[0].length>this.minPoints_,r=[o[0][0],o[0][o[0].length-2]],t?r=[o[0][0]]:r=[o[0][0],o[0][o[0].length-2]]}if(s){const o=this.getMap();for(let h=0,l=r.length;h=this.maxPoints_&&(this.freehand_?r.pop():s=!0),r.push(e.slice()),this.geometryFunction_(r,t,i)):n==="Polygon"&&(r=this.sketchCoords_[0],r.length>=this.maxPoints_&&(this.freehand_?r.pop():s=!0),r.push(e.slice()),s&&(this.finishCoordinate_=r[0]),this.geometryFunction_(this.sketchCoords_,t,i)),this.createOrUpdateSketchPoint_(e.slice()),this.updateSketchFeatures_(),s?this.finishDrawing():this.sketchFeature_}removeLastPoints_(e){if(!this.sketchFeature_)return;const t=this.sketchFeature_.getGeometry(),i=this.getMap().getView().getProjection(),s=this.mode_;for(let r=0;r=2){this.finishCoordinate_=n[n.length-2].slice();const o=this.finishCoordinate_.slice();n[n.length-1]=o,this.createOrUpdateSketchPoint_(o)}this.geometryFunction_(n,t,i),t.getType()==="Polygon"&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(t)}else if(s==="Polygon"){n=this.sketchCoords_[0],n.splice(-2,1);const o=this.sketchLine_.getGeometry();if(n.length>=2){const h=n[n.length-2].slice();n[n.length-1]=h,this.createOrUpdateSketchPoint_(h)}o.setCoordinates(n),this.geometryFunction_(this.sketchCoords_,t,i)}if(n.length===1){this.abortDrawing();break}}this.updateSketchFeatures_()}removeLastPoint(){this.removeLastPoints_(1)}finishDrawing(){const e=this.abortDrawing_();if(!e)return null;let t=this.sketchCoords_;const i=e.getGeometry(),s=this.getMap().getView().getProjection();return this.mode_==="LineString"?(t.pop(),this.geometryFunction_(t,i,s)):this.mode_==="Polygon"&&(t[0].pop(),this.geometryFunction_(t,i,s),t=i.getCoordinates()),this.type_==="MultiPoint"?e.setGeometry(new We([t])):this.type_==="MultiLineString"?e.setGeometry(new oe([t])):this.type_==="MultiPolygon"&&e.setGeometry(new ae([t])),this.dispatchEvent(new R(F.DRAWEND,e)),this.features_&&this.features_.push(e),this.source_&&this.source_.addFeature(e),e}abortDrawing_(){this.finishCoordinate_=null;const e=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),this.deactivateTrace_(),e}abortDrawing(){const e=this.abortDrawing_();e&&this.dispatchEvent(new R(F.DRAWABORT,e))}appendCoordinates(e){const t=this.mode_,i=!this.sketchFeature_;i&&this.startDrawing_(e[0]);let s;if(t==="LineString"||t==="Circle")s=this.sketchCoords_;else if(t==="Polygon")s=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[];else return;i&&s.shift(),s.pop();for(let n=0;n=h){u=_,f=m,g=T;break}else if(f>=o)break;_=u,m=f,T=g,++d}const k=this.scaleBar_?this.createScaleBar(f,u,c):u.toFixed(g<0?-g:0)+" "+c;this.renderedHTML_!=k&&(this.innerElement_.innerHTML=k,this.renderedHTML_=k),this.renderedWidth_!=f&&(this.innerElement_.style.width=f+"px",this.renderedWidth_=f),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}createScaleBar(e,t,i){const s=this.getScaleForResolution(),r=s<1?Math.round(1/s).toLocaleString()+" : 1":"1 : "+Math.round(s).toLocaleString(),n=this.scaleBarSteps_,o=e/n,h=[this.createMarker("absolute")];for(let c=0;c
`+this.createMarker("relative")+(c%2===0||n===2?this.createStepText(c,e,!1,t,i):"")+"")}return h.push(this.createStepText(n,e,!0,t,i)),(this.scaleBarText_?`
`+r+"
":"")+h.join("")}createMarker(e){return`
`}createStepText(e,t,i,s,r){const o=(e===0?0:Math.round(s/this.scaleBarSteps_*e*100)/100)+(e===0?"":" "+r),h=e===0?-3:t/this.scaleBarSteps_*-1,l=e===0?0:t/this.scaleBarSteps_*2;return`
`+o+"
"}getScaleForResolution(){const e=te(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,"m"),t=this.dpi_||b,i=1e3/25.4;return e*i*t}render(e){const t=e.frameState;t?this.viewState_=t.viewState:this.viewState_=null,this.updateElement_()}}const tt=.8,ce="printing-hide";function it(a,e){return a.toDataURL("image/png",e??tt)}function st(a,e){const t=document.createElement("div");t.classList.add("printing-overlay",ce),a.appendChild(t);const i=document.createElement("div");return i.classList.add("printing-overlay-status"),i.textContent=e,t.appendChild(i),{destroy(){t.remove()}}}class ft{defaultOverlayText;constructor(e){this.defaultOverlayText=e.intl.formatMessage({id:"printingMap"})}async printMap(e,t){return await new nt(e,{blockUserInteraction:!0,overlayText:this.defaultOverlayText,viewPadding:"auto",...t}).printMap()}}class nt{olMap;blockUserInteraction=!1;overlayText;viewPadding;running=!1;drawInformation=[];scaleLine=void 0;overlay=void 0;constructor(e,t){this.olMap=e,this.blockUserInteraction=t.blockUserInteraction,this.overlayText=t.overlayText,this.viewPadding=t.viewPadding}async printMap(){if(this.running)throw new Error("Printing already running.");try{await this.beginExport();let e=await this.printToCanvas(this.olMap.getViewport());if(!e)throw new Error("Canvas export failed");return this.viewPadding==="auto"&&(e=this.removePadding(e,this.getViewPadding())),new rt(e)}finally{this.reset()}}async beginExport(){this.running=!0;const e=this.olMap.getInteractions().getArray().filter(t=>t.getActive()&&t instanceof Ke);if(this.drawInformation=[],e?.forEach(t=>{const i=t,s=i.getOverlay().getStyle();i.getOverlay().setStyle(null),this.drawInformation?.push({draw:i,style:s})}),this.blockUserInteraction){const t=this.olMap?.getTargetElement();t&&(this.overlay=st(t,this.overlayText))}await this.addScaleLine()}async addScaleLine(){const t=(this.scaleLine=new et({className:"printing-scale-bar ol-scale-bar",bar:!0,text:!0,minWidth:125})).element;if(!t)throw new Error("Scale line does not have an element");let i=50,s=8;if(this.viewPadding==="auto"){const{bottom:h,left:l}=this.getViewPadding();i=Math.max(h+8,i),s+=l}t.style.setProperty("--printing-scale-bar-bottom",`${i}px`),t.style.setProperty("--printing-scale-bar-left",`${s}px`);const r=fe(),n=setTimeout(()=>{r.reject(new Error("Scale line did not render"))},3e3),o=this.scaleLine.render;this.scaleLine.render=(...h)=>{o.apply(this.scaleLine,h),r.resolve()},this.olMap?.addControl(this.scaleLine);try{await r.promise,await new Promise(h=>{requestAnimationFrame(h)})}finally{clearTimeout(n)}}async printToCanvas(e){const t={useCORS:!0,ignoreElements:function(r){if(r.classList&&typeof r.classList=="object"){const n=r.classList;return n.contains("map-anchors")||n.contains(ce)}return!1}},i=(await ge(async()=>{const{default:r}=await import("./BfxBtG_Oxhhm.js");return{default:r}},[],import.meta.url)).default;return await i(e,t)}reset(){this.scaleLine&&(this.olMap?.removeControl(this.scaleLine),this.scaleLine=void 0),this.overlay&&(this.overlay.destroy(),this.overlay=void 0),this.running=!1,this.drawInformation?.length&&this.drawInformation.forEach(e=>{e.draw.getOverlay().setStyle(e.style)})}removePadding(e,t){const i=window.devicePixelRatio||1,s={top:t.top*i,right:t.right*i,bottom:t.bottom*i,left:t.left*i};if(s.left===0&&s.right===0&&s.top===0&&s.bottom===0)return e;const{width:r,height:n}=e,o=document.createElement("canvas");o.width=r-s.left-s.right,o.height=n-s.top-s.bottom;const h=o.getContext("2d");if(!h)throw new Error("Failed to get a canvas context");return h.drawImage(e,s.left,s.top,o.width,o.height,0,0,o.width,o.height),o}getViewPadding(){const t=this.olMap.getView().padding??[0,0,0,0];return{top:t[0]??0,right:t[1]??0,bottom:t[2]??0,left:t[3]??0}}}class rt{canvas;constructor(e){this.canvas=e}getCanvas(){return this.canvas}getPNGDataURL(e){return it(this.canvas,e)}}export{Ke as D,$e as I,ut as N,ft as P,et as S,it as a,st as c}; diff --git a/openlayers-base-packages/pr-previews/pr-371/assets/TnHTIdi4bAVU.js b/openlayers-base-packages/pr-previews/pr-371/assets/TnHTIdi4bAVU.js deleted file mode 100644 index aafe09a..0000000 --- a/openlayers-base-packages/pr-previews/pr-371/assets/TnHTIdi4bAVU.js +++ /dev/null @@ -1 +0,0 @@ -import{b3 as je,ak as w,bY as g,aD as ot,bZ as nt,ap as we,as as st,ar as at,b_ as it,b$ as lt,c0 as ct,c1 as ut,ag as dt,c2 as L,c3 as xe,c4 as pt,b2 as Ce,b9 as Oe,u as mt,B as J,k as ee,i as ft,g as he,h as be}from"./CncSlnPsjr9P.js";import{G as yt,a as gt,b as ht,M as bt}from"./JZ5RcWTlF_6Y.js";import{L as Pt}from"./DsXJQLY20iHp.js";import{y as vt,z as Fe,h as T,j as s,f as M,q as A,r as p,D as jt,G as wt,H as Z,J as k,K as v,o as xt,p as Ct,L as Ot,M as Ft,C as St,N as Mt,O as Lt,l as Se,B as oe,F as Me}from"./Bh0CuZ3gy5tC.js";import{u as z,B as Nt}from"./BTEHqhSAUrUR.js";import{F as Gt,f as Le}from"./CL_VRsbiqLzM.js";import{S as Ne}from"./CjjyePfBQlZ7.js";import{T as te,L as kt}from"./Tz2xttM4F6S2.js";import{u as Tt,a as At,b as _t,l as Rt,M as Bt}from"./DUys4rac0YQP.js";import{C as Et}from"./2d5-QpxJNHTD.js";import{a as Dt,b as It,M as Ht}from"./BeFcF3Ti4kY-.js";function Vt(t){return"current"in t}var Ge=()=>typeof window<"u";function Jt(){var t;const e=navigator.userAgentData;return(t=e?.platform)!=null?t:navigator.platform}var zt=t=>Ge()&&t.test(navigator.vendor),Ut=t=>Ge()&&t.test(Jt()),$t=()=>Ut(/mac|iphone|ipad|ipod/i),Kt=()=>$t()&&zt(/apple/i);function qt(t){const{ref:e,elements:r,enabled:o}=t,n=()=>{var a,i;return(i=(a=e.current)==null?void 0:a.ownerDocument)!=null?i:document};vt(n,"pointerdown",a=>{if(!Kt()||!o)return;const i=a.target,d=(r??[e]).some(l=>{const m=Vt(l)?l.current:l;return m?.contains(i)||m===i});n().activeElement!==i&&d&&(a.preventDefault(),i.focus())})}var[Wt,O]=Fe({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[Yt,_]=Fe({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),ke=T(function(e,r){const{getHeaderProps:o}=O(),n=_();return s.jsx(M.header,{...o(e,r),className:A("chakra-popover__header",e.className),__css:n.header})});ke.displayName="PopoverHeader";function Te(t){const e=p.Children.only(t.children),{getTriggerProps:r}=O();return p.cloneElement(e,r(e.props,e.ref))}Te.displayName="PopoverTrigger";var S={click:"click",hover:"hover"};function Zt(t={}){const{closeOnBlur:e=!0,closeOnEsc:r=!0,initialFocusRef:o,id:n,returnFocusOnClose:a=!0,autoFocus:i=!0,arrowSize:u,arrowShadowColor:d,trigger:l=S.click,openDelay:m=200,closeDelay:P=200,isLazy:x,lazyBehavior:U="unmount",computePositionOnMount:$,...K}=t,{isOpen:f,onClose:h,onOpen:N,onToggle:le}=jt(t),q=p.useRef(null),R=p.useRef(null),F=p.useRef(null),G=p.useRef(!1),ce=p.useRef(!1);f&&(ce.current=!0);const[ue,Je]=p.useState(!1),[de,ze]=p.useState(!1),Ue=p.useId(),$e=n??Ue,[pe,B,E,D]=["popover-trigger","popover-content","popover-header","popover-body"].map(c=>`${c}-${$e}`),{referenceRef:I,getArrowProps:Ke,getPopperProps:me,getArrowInnerProps:qe,forceUpdate:We}=wt({...K,enabled:f||!!$}),fe=Tt({isOpen:f,ref:F});qt({enabled:f,ref:R}),At(F,{focusRef:R,visible:f,shouldFocus:a&&l===S.click}),_t(F,{focusRef:o,visible:f,shouldFocus:i&&l===S.click});const ye=Rt({wasSelected:ce.current,enabled:x,mode:U,isSelected:fe.present}),Ye=p.useCallback((c={},b=null)=>{const y={...c,style:{...c.style,transformOrigin:Z.transformOrigin.varRef,[Z.arrowSize.var]:u?`${u}px`:void 0,[Z.arrowShadowColor.var]:d},ref:k(F,b),children:ye?c.children:null,id:B,tabIndex:-1,role:"dialog",onKeyDown:v(c.onKeyDown,j=>{r&&j.key==="Escape"&&h()}),onBlur:v(c.onBlur,j=>{const H=Pe(j),Y=Q(F.current,H),rt=Q(R.current,H);f&&e&&(!Y&&!rt)&&h()}),"aria-labelledby":ue?E:void 0,"aria-describedby":de?D:void 0};return l===S.hover&&(y.role="tooltip",y.onMouseEnter=v(c.onMouseEnter,()=>{G.current=!0}),y.onMouseLeave=v(c.onMouseLeave,j=>{j.nativeEvent.relatedTarget!==null&&(G.current=!1,setTimeout(()=>h(),P))})),y},[ye,B,ue,E,de,D,l,r,h,f,e,P,d,u]),Ze=p.useCallback((c={},b=null)=>me({...c,style:{visibility:f?"visible":"hidden",...c.style}},b),[f,me]),Qe=p.useCallback((c,b=null)=>({...c,ref:k(b,q,I)}),[q,I]),C=p.useRef(),W=p.useRef(),ge=p.useCallback(c=>{q.current==null&&I(c)},[I]),Xe=p.useCallback((c={},b=null)=>{const y={...c,ref:k(R,b,ge),id:pe,"aria-haspopup":"dialog","aria-expanded":f,"aria-controls":B};return l===S.click&&(y.onClick=v(c.onClick,le)),l===S.hover&&(y.onFocus=v(c.onFocus,()=>{C.current===void 0&&N()}),y.onBlur=v(c.onBlur,j=>{const H=Pe(j),Y=!Q(F.current,H);f&&e&&Y&&h()}),y.onKeyDown=v(c.onKeyDown,j=>{j.key==="Escape"&&h()}),y.onMouseEnter=v(c.onMouseEnter,()=>{G.current=!0,C.current=window.setTimeout(()=>N(),m)}),y.onMouseLeave=v(c.onMouseLeave,()=>{G.current=!1,C.current&&(clearTimeout(C.current),C.current=void 0),W.current=window.setTimeout(()=>{G.current===!1&&h()},P)})),y},[pe,f,B,l,ge,le,N,e,h,m,P]);p.useEffect(()=>()=>{C.current&&clearTimeout(C.current),W.current&&clearTimeout(W.current)},[]);const et=p.useCallback((c={},b=null)=>({...c,id:E,ref:k(b,y=>{Je(!!y)})}),[E]),tt=p.useCallback((c={},b=null)=>({...c,id:D,ref:k(b,y=>{ze(!!y)})}),[D]);return{forceUpdate:We,isOpen:f,onAnimationComplete:fe.onComplete,onClose:h,getAnchorProps:Qe,getArrowProps:Ke,getArrowInnerProps:qe,getPopoverPositionerProps:Ze,getPopoverProps:Ye,getTriggerProps:Xe,getHeaderProps:et,getBodyProps:tt}}function Q(t,e){return t===e||t?.contains(e)}function Pe(t){var e;const r=t.currentTarget.ownerDocument.activeElement;return(e=t.relatedTarget)!=null?e:r}function Ae(t){const e=xt("Popover",t),{children:r,...o}=Ct(t),n=Ot(),a=Zt({...o,direction:n.direction});return s.jsx(Wt,{value:a,children:s.jsx(Yt,{value:e,children:Ft(r,{isOpen:a.isOpen,onClose:a.onClose,forceUpdate:a.forceUpdate})})})}Ae.displayName="Popover";var X=(t,e)=>e?`${t}.${e}, ${e}`:void 0;function _e(t){var e;const{bg:r,bgColor:o,backgroundColor:n,shadow:a,boxShadow:i,shadowColor:u}=t,{getArrowProps:d,getArrowInnerProps:l}=O(),m=_(),P=(e=r??o)!=null?e:n,x=a??i;return s.jsx(M.div,{...d(),className:"chakra-popover__arrow-positioner",children:s.jsx(M.div,{className:A("chakra-popover__arrow",t.className),...l(t),__css:{"--popper-arrow-shadow-color":X("colors",u),"--popper-arrow-bg":X("colors",P),"--popper-arrow-shadow":X("shadows",x),...m.arrow}})})}_e.displayName="PopoverArrow";var Re=T(function(e,r){const{getBodyProps:o}=O(),n=_();return s.jsx(M.div,{...o(e,r),className:A("chakra-popover__body",e.className),__css:n.body})});Re.displayName="PopoverBody";var Be=T(function(e,r){const{onClose:o}=O(),n=_();return s.jsx(St,{size:"sm",onClick:o,className:A("chakra-popover__close-btn",e.className),__css:n.closeButton,ref:r,...e})});Be.displayName="PopoverCloseButton";function Qt(t){if(t)return{enter:{...t.enter,visibility:"visible"},exit:{...t.exit,transitionEnd:{visibility:"hidden"}}}}var Xt={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},er=M(Mt.section),Ee=T(function(e,r){const{variants:o=Xt,...n}=e,{isOpen:a}=O();return s.jsx(er,{ref:r,variants:Qt(o),initial:!1,animate:a?"enter":"exit",...n})});Ee.displayName="PopoverTransition";var De=T(function(e,r){const{rootProps:o,motionProps:n,...a}=e,{getPopoverProps:i,getPopoverPositionerProps:u,onAnimationComplete:d}=O(),l=_(),m={position:"relative",display:"flex",flexDirection:"column",...l.content};return s.jsx(M.div,{...u(o),__css:l.popper,className:"chakra-popover__popper",children:s.jsx(Ee,{...n,...i(a,r),onAnimationComplete:Lt(d,a.onAnimationComplete),className:A("chakra-popover__content",e.className),__css:m})})});De.displayName="PopoverContent";function tr(t){return"parentLayer"in t}function Jr(t){return"olLayer"in t}class rr{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.featureClass=je,this.supportedMediaTypes=null}getReadOptions(e,r){if(r){let o=r.dataProjection?w(r.dataProjection):this.readProjection(e);r.extent&&o&&o.getUnits()==="tile-pixels"&&(o=w(o),o.setWorldExtent(r.extent)),r={dataProjection:o,featureProjection:r.featureProjection}}return this.adaptOptions(r)}adaptOptions(e){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection,featureClass:this.featureClass},e)}getType(){return g()}readFeature(e,r){return g()}readFeatures(e,r){return g()}readGeometry(e,r){return g()}readProjection(e){return g()}writeFeature(e,r){return g()}writeFeatures(e,r){return g()}writeGeometry(e,r){return g()}}function ne(t,e,r){const o=r?w(r.featureProjection):null,n=r?w(r.dataProjection):null;let a=t;if(o&&n&&!ot(o,n)){e&&(a=t.clone());const i=e?o:n,u=e?n:o;i.getUnits()==="tile-pixels"?a.transform(i,u):a.applyTransform(nt(i,u))}if(e&&r&&r.decimals!==void 0){const i=Math.pow(10,r.decimals),u=function(d){for(let l=0,m=d.length;lIe({...t,geometry:a})).flat();const o=r.type==="MultiPolygon"?"Polygon":r.type;if(o==="GeometryCollection"||o==="Circle")throw new Error("Unsupported geometry type: "+o);const n=r.layout.length;return ne(new we(o,o==="Polygon"?nr(r.flatCoordinates,r.ends,n):r.flatCoordinates,r.ends?.flat(),n,t.properties||{},t.id).enableSimplifyTransformed(),!1,e)}function se(t,e){if(!t)return null;if(Array.isArray(t)){const o=t.map(n=>se(n,e));return new yt(o)}const r=or[t.type];return ne(new r(t.flatCoordinates,t.layout,t.ends),!1,e)}class sr extends rr{constructor(){super()}getType(){return"json"}readFeature(e,r){return this.readFeatureFromObject(V(e),this.getReadOptions(e,r))}readFeatures(e,r){return this.readFeaturesFromObject(V(e),this.getReadOptions(e,r))}readFeatureFromObject(e,r){return g()}readFeaturesFromObject(e,r){return g()}readGeometry(e,r){return this.readGeometryFromObject(V(e),this.getReadOptions(e,r))}readGeometryFromObject(e,r){return g()}readProjection(e){return this.readProjectionFromObject(V(e))}readProjectionFromObject(e){return g()}writeFeature(e,r){return JSON.stringify(this.writeFeatureObject(e,r))}writeFeatureObject(e,r){return g()}writeFeatures(e,r){return JSON.stringify(this.writeFeaturesObject(e,r))}writeFeaturesObject(e,r){return g()}writeGeometry(e,r){return JSON.stringify(this.writeGeometryObject(e,r))}writeGeometryObject(e,r){return g()}}function V(t){if(typeof t=="string"){const e=JSON.parse(t);return e||null}return t!==null?t:null}class zr extends sr{constructor(e){e=e||{},super(),this.dataProjection=w(e.dataProjection?e.dataProjection:"EPSG:4326"),e.featureProjection&&(this.defaultFeatureProjection=w(e.featureProjection)),e.featureClass&&(this.featureClass=e.featureClass),this.geometryName_=e.geometryName,this.extractGeometryName_=e.extractGeometryName,this.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"]}readFeatureFromObject(e,r){let o=null;e.type==="Feature"?o=e:o={type:"Feature",geometry:e,properties:null};const n=ae(o.geometry);if(this.featureClass===we)return Ie({geometry:n,id:o.id,properties:o.properties},r);const a=new je;return this.geometryName_?a.setGeometryName(this.geometryName_):this.extractGeometryName_&&o.geometry_name&&a.setGeometryName(o.geometry_name),a.setGeometry(se(n,r)),"id"in o&&a.setId(o.id),o.properties&&a.setProperties(o.properties,!0),a}readFeaturesFromObject(e,r){const o=e;let n=null;if(o.type==="FeatureCollection"){const a=e;n=[];const i=a.features;for(let u=0,d=i.length;u{f(!1),a?.(N)};return s.jsx(Se,{label:o,placement:"auto",openDelay:500,...l,isOpen:K,onOpen:()=>f(!0),onClose:()=>f(!1),children:s.jsx(jr,{className:U,ref:r,"aria-label":o,leftIcon:n,iconSpacing:0,padding:0,isDisabled:u,isLoading:i,isActive:d,"aria-pressed":$,...x,...m,onClick:h})})}),jr=p.forwardRef(function(e,r){const{"aria-labelledby":o,"aria-describedby":n,...a}=e;return s.jsx(oe,{ref:r,...a})}),wr="@open-pioneer/toc",ie=mt.bind(void 0,wr);function xr(t){const{map:e,"aria-label":r}=t,o=ie(),n=Fr(e);return n.length?He(n,o,{"aria-label":r}):s.jsx(te,{className:"toc-missing-layers","aria-label":r,children:o.formatMessage({id:"missingLayers"})})}function He(t,e,r){const o=t.map(n=>s.jsx(Cr,{layer:n,intl:e},n.id));return s.jsx(kt,{as:"ul",className:"toc-layer-list",listStyleType:"none",role:"group",...r,children:o})}function Cr(t){const{layer:e,intl:r}=t,{title:o,description:n,isVisible:a}=z(()=>({title:e.title,description:e.description,isVisible:e.visible}),[e]),i=Sr(e),u=Ve(e)!=="error",d=r.formatMessage({id:"layerNotAvailable"});let l;return i?.length&&(l=He(i,r,{ml:4,"aria-label":r.formatMessage({id:"childgroupLabel"},{title:o})})),s.jsxs(J,{as:"li",className:Oe("toc-layer-item",`layer-${Mr(e.id)}`),children:[s.jsxs(ee,{className:"toc-layer-item-content",width:"100%",flexDirection:"row",align:"center",justifyContent:"space-between",gap:2,minHeight:10,children:[s.jsx(Et,{"aria-label":o+(u?"":" "+d),isChecked:a,isDisabled:!u,onChange:m=>e.setVisible(m.target.checked),children:o}),!u&&s.jsx(Se,{className:"toc-layer-item-content-tooltip",label:d,placement:"right",openDelay:500,children:s.jsx("span",{children:s.jsx(Gt,{className:"toc-layer-item-content-icon",color:"red","aria-label":d})})}),s.jsx(Ne,{}),n&&s.jsx(Or,{layer:e,title:o,description:n,intl:r})]}),l]})}function Or(t){const{layer:e,title:r,description:o,intl:n}=t,a=n.formatMessage({id:"descriptionLabel"}),i=Ve(e)!=="error";return s.jsxs(Ae,{placement:"bottom-start",children:[s.jsx(Te,{children:s.jsx(oe,{isDisabled:!i,className:"toc-layer-item-details-button","aria-label":a,borderRadius:"full",iconSpacing:0,padding:0,variant:"ghost",leftIcon:s.jsx(Le,{})})}),s.jsx(Me,{children:s.jsxs(De,{className:"toc-layer-item-details",overflowY:"auto",maxHeight:"400",children:[s.jsx(_e,{}),s.jsx(Be,{mt:1}),s.jsx(ke,{children:r}),s.jsx(Re,{children:o})]})})]})}function Fr(t){return z(()=>{const e=t.layers.getOperationalLayers({sortByDisplayOrder:!0})??[];return e.reverse(),e},[t])}function Sr(t){return z(()=>{if(t.layers)return t.layers.getLayers({sortByDisplayOrder:!0}).reverse();const e=t.sublayers?.getSublayers({sortByDisplayOrder:!0});if(e)return e.reverse(),e},[t])}function Ve(t){return z(()=>(tr(t)?t.parentLayer:t).loadState,[t])}function Mr(t){return t.toLowerCase().replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-")}const Lr=t=>{const e=ie(),{map:r,showHideAllLayers:o=!0}=t;return!!o&&s.jsx(J,{className:"toc-tools",children:s.jsxs(Bt,{placement:"bottom-start",children:[s.jsx(Dt,{as:oe,className:"toc-tools-button","aria-label":e.formatMessage({id:"toolsLabel"}),borderRadius:"full",iconSpacing:0,padding:3,variant:"ghost",leftIcon:s.jsx(Le,{})}),s.jsx(Me,{children:s.jsx(It,{className:"tools-menu",children:s.jsx(Ht,{"aria-label":e.formatMessage({id:"tools.hideAllLayers"}),onClick:()=>{Nr(r)},children:e.formatMessage({id:"tools.hideAllLayers"})})})})]})})};function Nr(t){const e=o=>{o?.getSublayers().forEach(n=>{n.setVisible(!1),e(n?.sublayers)})},r=o=>{o?.getLayers().forEach(n=>{n.setVisible(!1),n.layers?r(n.layers):n.sublayers&&e(n.sublayers)})};t?.layers.getOperationalLayers().forEach(o=>{o.setVisible(!1),e(o?.sublayers),r(o?.layers)})}const ve=2,$r=t=>{const e=ie(),{showTools:r=!1,toolsConfig:o,showBasemapSwitcher:n=!0,basemapSwitcherProps:a}=t,{containerProps:i}=Ce("toc",t),u=p.useId(),d=ft(t);let l;switch(d.kind){case"loading":l=null;break;case"rejected":l=s.jsx(te,{className:"toc-error",children:e.formatMessage({id:"error"})});break;case"resolved":{const m=d.map,P=n&&s.jsx(J,{className:"toc-basemap-switcher",children:s.jsx(he,{title:s.jsx(be,{id:u,size:"sm",mb:ve,children:e.formatMessage({id:"basemapsLabel"})}),children:s.jsx(Nt,{map:m,"aria-labelledby":u,...a})})}),x=s.jsx(J,{className:"toc-operational-layers",children:s.jsx(he,{title:s.jsx(be,{size:"sm",mb:2,children:s.jsxs(ee,{children:[s.jsx(te,{my:3,children:e.formatMessage({id:"operationalLayerLabel"})}),s.jsx(Ne,{}),r&&s.jsx(Lr,{map:m,...o})]})}),children:s.jsx(xr,{map:m,"aria-label":e.formatMessage({id:"operationalLayerLabel"})})})});l=s.jsxs(s.Fragment,{children:[P,x]});break}}return s.jsx(ee,{...i,direction:"column",gap:ve,children:l})};export{rr as F,zr as G,Ae as P,Ur as T,Te as a,De as b,_e as c,Re as d,$r as e,Jr as i,ne as t,O as u}; diff --git a/openlayers-base-packages/pr-previews/pr-371/assets/CbmA6rtzzDRA.js b/openlayers-base-packages/pr-previews/pr-371/assets/g3imqe_H-zjU.js similarity index 87% rename from openlayers-base-packages/pr-previews/pr-371/assets/CbmA6rtzzDRA.js rename to openlayers-base-packages/pr-previews/pr-371/assets/g3imqe_H-zjU.js index bd5027d..1c7ec46 100644 --- a/openlayers-base-packages/pr-previews/pr-371/assets/CbmA6rtzzDRA.js +++ b/openlayers-base-packages/pr-previews/pr-371/assets/g3imqe_H-zjU.js @@ -1 +1 @@ -import{h as R,r as l,j as e,B as y,a5 as B,a as _,l as S,C as T,e as N}from"./Bh0CuZ3gy5tC.js";import{t as H}from"./B99qq3IKf4kH.js";import{S as F,T as q,O as D,M as V,H as Z,u as $,k as v,B as x,i as W,g as G,h as U,l as K,m as J}from"./CncSlnPsjr9P.js";import{_ as Q}from"./CmsKOCeNyeyo.js";import{c as P}from"./D03oE8cEQPSj.js";import{S as z}from"./CjjyePfBQlZ7.js";import{g as X}from"./CL_VRsbiqLzM.js";function Y(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var ee=Y(),w=R((r,a)=>{const{icon:t,children:p,isRound:s,"aria-label":c,...i}=r,n=t||p,u=l.isValidElement(n)?l.cloneElement(n,{"aria-hidden":!0,focusable:!1}):null;return e.jsx(y,{padding:"0",borderRadius:s?"full":void 0,ref:a,"aria-label":c,...i,children:u})});w.displayName="IconButton";var oe=ee?l.useLayoutEffect:l.useEffect;function I(r,a=[]){const t=l.useRef(r);return oe(()=>{t.current=r}),l.useCallback((...p)=>{var s;return(s=t.current)==null?void 0:s.call(t,...p)},a)}function re(r,a){const t=l.useId();return l.useMemo(()=>r||[a,t].filter(Boolean).join("-"),[r,a,t])}function te(r,a){const t=r!==void 0;return[t,t&&typeof r<"u"?r:a]}function M(r={}){const{onClose:a,onOpen:t,isOpen:p,id:s}=r,c=I(t),i=I(a),[n,u]=l.useState(r.defaultIsOpen||!1),[d,b]=te(p,n),m=re(s,"disclosure"),g=l.useCallback(()=>{d||u(!1),i?.()},[d,i]),h=l.useCallback(()=>{d||u(!0),c?.()},[d,c]),f=l.useCallback(()=>{(b?g:h)()},[b,h,g]);return{isOpen:!!b,onOpen:h,onClose:g,onToggle:f,isControlled:d,getButtonProps:(o={})=>({...o,"aria-expanded":b,"aria-controls":m,onClick:B(o.onClick,f)}),getDisclosureProps:(o={})=>({...o,hidden:!b,id:m})}}const ne=P({displayName:"ArrowRightIcon",path:e.jsxs("g",{fill:"currentColor",children:[e.jsx("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),e.jsx("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})}),ae=P({displayName:"ArrowLeftIcon",path:e.jsxs("g",{fill:"currentColor",children:[e.jsx("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),e.jsx("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})}),k="main";class le{mapId=k;async getMapConfig(){return{initialView:{kind:"position",center:{x:404747,y:5757920},zoom:14},layers:[new F({title:"OSM",isBaseLayer:!0,olLayer:new q({source:new D})})]}}}const ie={"sidebar-app":{name:"sidebar-app",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:le,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{}}},ui:{references:[]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:V,provides:[{name:"map.MapRegistry",qualifier:void 0}],references:{providers:{name:"map.MapConfigProvider",qualifier:void 0,all:!0},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/theme":{name:"@open-pioneer/theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/basemap-switcher":{name:"@open-pioneer/basemap-switcher",services:{},ui:{references:[]},properties:{}},"@open-pioneer/experimental-layout-sidebar":{name:"@open-pioneer/experimental-layout-sidebar",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:Z,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}},"@open-pioneer/reactivity":{name:"@open-pioneer/reactivity",services:{},ui:{references:[]},properties:{}}},se='.layout-sidebar{z-index:99}:root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.map-container .ol-viewport .ol-attribution{bottom:var(--map-padding-bottom);right:var(--map-padding-right)}.layout-sidebar{height:100%;position:absolute;top:0}.layout-sidebar[data-theme=light]{background-color:var(--chakra-colors-whiteAlpha-700)}.layout-sidebar[data-theme=dark]{background-color:var(--chakra-colors-blackAlpha-700)}.layout-sidebar .layout-sidebar-main{transition:width .3s ease-out 0s;border-right:1px solid var(--chakra-colors-chakra-border-color)}.layout-sidebar .layout-sidebar-content{overflow:auto;transition:width .3s ease-out 0s}.layout-sidebar .layout-sidebar-content .content-section .content-header{font-size:1.5em;background-color:var(--chakra-colors-blackAlpha-500);padding:.5rem 1rem}.layout-sidebar .layout-sidebar-content .content-section .content-body{padding:1rem}',ce=["en"];function pe(r){switch(r){case"en":return Q(()=>import("./BIbDu0DJPL_e.js"),[],import.meta.url).then(a=>a.default)}throw new Error(`Unsupported locale: '${r}'`)}const de=_(se),ue=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:pe,locales:ce,packages:ie,styles:de},Symbol.toStringTag,{value:"Module"})),be="@open-pioneer/experimental-layout-sidebar",me=$.bind(void 0,be),A=60,E=180,O=300;function ge({defaultExpanded:r,expandedChanged:a,sidebarWidthChanged:t,items:p}){const s=me(),[c,{toggle:i}]=he(p),{isOpen:n,onToggle:u}=M({defaultIsOpen:r,onOpen(){a?.(!0)},onClose(){a?.(!1)}}),{isOpen:d,onToggle:b}=M(),m=c.size>0;l.useEffect(()=>{m&&!d&&b(),!m&&d&&b()},[m]),l.useEffect(()=>{if(t){let o=A;n&&(o=E),d&&(o+=O),t(o)}},[n,d]);const g=p?.map((o,L)=>{const C="white",j=c.has(o.id)?"outline":"ghost";return e.jsx("div",{children:n?e.jsx(y,{leftIcon:o.icon,variant:j,colorScheme:C,onClick:()=>i(o),children:o.label},o.id):e.jsx(S,{hasArrow:!0,label:o.label,placement:"right",children:e.jsx(w,{"aria-label":o.label,variant:j,colorScheme:C,icon:o.icon,onClick:()=>i(o)})},o.id)},L)}),h=p?.filter(o=>c.has(o.id)).map(o=>e.jsxs("div",{className:"content-section",children:[e.jsxs(v,{className:"content-header",alignItems:"center",children:[e.jsx(x,{children:o.label}),e.jsx(z,{}),e.jsx(T,{onClick:()=>i(o)})]}),e.jsx("div",{className:"content-body",children:o.content})]},o.id)),f=s.formatMessage({id:n?"toggle.collapse":"toggle.expand"});return e.jsxs(v,{className:"layout-sidebar",children:[e.jsxs(x,{className:"layout-sidebar-main",display:"flex",flexDirection:"column",width:n?`${E}px`:`${A}px`,padding:"10px",gap:"10px",children:[g,e.jsx(z,{}),e.jsx(S,{label:f,hasArrow:!0,placement:"right",children:e.jsx(w,{"aria-label":f,variant:"ghost",icon:n?e.jsx(ae,{}):e.jsx(ne,{}),onClick:u})})]}),e.jsx(x,{className:"layout-sidebar-content",width:d?`${O}px`:"0px",children:h})]})}function he(r){const[a,t]=l.useReducer((s,c)=>{switch(c.type){case"toggle":{const i=new Set(s);return i.has(c.id)?i.delete(c.id):i.add(c.id),i}case"retain":{const i=new Set(c.ids),n=new Set(s);for(const u of n)i.has(u)||n.delete(u);return n}}},void 0,()=>new Set),p=l.useCallback(s=>{t({type:"toggle",id:s.id})},[t]);return l.useEffect(()=>{t({type:"retain",ids:r?.map(s=>s.id)??[]})},[r,t]),[a,{toggle:p}]}const fe=[796987,5827477,796987,5827477];function xe(){const[r,a]=l.useState(),[t,p]=l.useState(!0),s=W(k),c=()=>{const n=s.map?.olMap;n&&n?.getView().fit(fe,{maxZoom:13})},i=[{id:"sandbox",icon:e.jsx(X,{}),label:"Sandbox",content:e.jsx(y,{onClick:c,children:"Center Berlin"})}];return e.jsx(v,{height:"100%",direction:"column",overflow:"hidden",children:e.jsx(G,{title:e.jsx(x,{textAlign:"center",py:1,px:1,children:e.jsx(U,{size:"md",children:"Sidebar sample"})}),children:e.jsxs(v,{flex:"1",direction:"column",position:"relative",children:[e.jsx(ge,{defaultExpanded:t,expandedChanged:n=>p(n),sidebarWidthChanged:n=>a({left:n}),items:i}),e.jsx(K,{mapId:k,viewPadding:r,viewPaddingChangeBehavior:"preserve-extent",children:e.jsx(J,{position:"top-left",horizontalGap:10,verticalGap:10,children:e.jsx(x,{backgroundColor:"whiteAlpha.800",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",children:"This is a sample for a sidebar component."})})})]})})})}const ve=N({component:xe,theme:H,appMetadata:ue});customElements.define("sidebar-app",ve); +import{h as R,r as l,j as e,B as y,a5 as B,a as _,l as S,C as T,e as N}from"./Bh0CuZ3gy5tC.js";import{t as H}from"./B99qq3IKf4kH.js";import{S as F,T as q,O as D,M as V,H as Z,u as $,k as v,B as x,i as W,g as G,h as U,l as K,m as J}from"./p-jlpmJ86TPh.js";import{_ as Q}from"./CmsKOCeNyeyo.js";import{c as P}from"./D03oE8cEQPSj.js";import{S as z}from"./CjjyePfBQlZ7.js";import{g as X}from"./CL_VRsbiqLzM.js";function Y(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var ee=Y(),w=R((r,a)=>{const{icon:t,children:p,isRound:s,"aria-label":c,...i}=r,n=t||p,u=l.isValidElement(n)?l.cloneElement(n,{"aria-hidden":!0,focusable:!1}):null;return e.jsx(y,{padding:"0",borderRadius:s?"full":void 0,ref:a,"aria-label":c,...i,children:u})});w.displayName="IconButton";var oe=ee?l.useLayoutEffect:l.useEffect;function I(r,a=[]){const t=l.useRef(r);return oe(()=>{t.current=r}),l.useCallback((...p)=>{var s;return(s=t.current)==null?void 0:s.call(t,...p)},a)}function re(r,a){const t=l.useId();return l.useMemo(()=>r||[a,t].filter(Boolean).join("-"),[r,a,t])}function te(r,a){const t=r!==void 0;return[t,t&&typeof r<"u"?r:a]}function M(r={}){const{onClose:a,onOpen:t,isOpen:p,id:s}=r,c=I(t),i=I(a),[n,u]=l.useState(r.defaultIsOpen||!1),[d,b]=te(p,n),m=re(s,"disclosure"),g=l.useCallback(()=>{d||u(!1),i?.()},[d,i]),h=l.useCallback(()=>{d||u(!0),c?.()},[d,c]),f=l.useCallback(()=>{(b?g:h)()},[b,h,g]);return{isOpen:!!b,onOpen:h,onClose:g,onToggle:f,isControlled:d,getButtonProps:(o={})=>({...o,"aria-expanded":b,"aria-controls":m,onClick:B(o.onClick,f)}),getDisclosureProps:(o={})=>({...o,hidden:!b,id:m})}}const ne=P({displayName:"ArrowRightIcon",path:e.jsxs("g",{fill:"currentColor",children:[e.jsx("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),e.jsx("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})}),ae=P({displayName:"ArrowLeftIcon",path:e.jsxs("g",{fill:"currentColor",children:[e.jsx("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),e.jsx("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})}),k="main";class le{mapId=k;async getMapConfig(){return{initialView:{kind:"position",center:{x:404747,y:5757920},zoom:14},layers:[new F({title:"OSM",isBaseLayer:!0,olLayer:new q({source:new D})})]}}}const ie={"sidebar-app":{name:"sidebar-app",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:le,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{}}},ui:{references:[]},properties:{}},"@open-pioneer/basemap-switcher":{name:"@open-pioneer/basemap-switcher",services:{},ui:{references:[]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:V,provides:[{name:"map.MapRegistry",qualifier:void 0}],references:{providers:{name:"map.MapConfigProvider",qualifier:void 0,all:!0},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/theme":{name:"@open-pioneer/theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/reactivity":{name:"@open-pioneer/reactivity",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:Z,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}},"@open-pioneer/experimental-layout-sidebar":{name:"@open-pioneer/experimental-layout-sidebar",services:{},ui:{references:[]},properties:{}}},se='.layout-sidebar{z-index:99}:root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.map-container .ol-viewport .ol-attribution{bottom:var(--map-padding-bottom);right:var(--map-padding-right)}.layout-sidebar{height:100%;position:absolute;top:0}.layout-sidebar[data-theme=light]{background-color:var(--chakra-colors-whiteAlpha-700)}.layout-sidebar[data-theme=dark]{background-color:var(--chakra-colors-blackAlpha-700)}.layout-sidebar .layout-sidebar-main{transition:width .3s ease-out 0s;border-right:1px solid var(--chakra-colors-chakra-border-color)}.layout-sidebar .layout-sidebar-content{overflow:auto;transition:width .3s ease-out 0s}.layout-sidebar .layout-sidebar-content .content-section .content-header{font-size:1.5em;background-color:var(--chakra-colors-blackAlpha-500);padding:.5rem 1rem}.layout-sidebar .layout-sidebar-content .content-section .content-body{padding:1rem}',ce=["en"];function pe(r){switch(r){case"en":return Q(()=>import("./BIbDu0DJPL_e.js"),[],import.meta.url).then(a=>a.default)}throw new Error(`Unsupported locale: '${r}'`)}const de=_(se),ue=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:pe,locales:ce,packages:ie,styles:de},Symbol.toStringTag,{value:"Module"})),be="@open-pioneer/experimental-layout-sidebar",me=$.bind(void 0,be),A=60,E=180,O=300;function ge({defaultExpanded:r,expandedChanged:a,sidebarWidthChanged:t,items:p}){const s=me(),[c,{toggle:i}]=he(p),{isOpen:n,onToggle:u}=M({defaultIsOpen:r,onOpen(){a?.(!0)},onClose(){a?.(!1)}}),{isOpen:d,onToggle:b}=M(),m=c.size>0;l.useEffect(()=>{m&&!d&&b(),!m&&d&&b()},[m]),l.useEffect(()=>{if(t){let o=A;n&&(o=E),d&&(o+=O),t(o)}},[n,d]);const g=p?.map((o,L)=>{const C="white",j=c.has(o.id)?"outline":"ghost";return e.jsx("div",{children:n?e.jsx(y,{leftIcon:o.icon,variant:j,colorScheme:C,onClick:()=>i(o),children:o.label},o.id):e.jsx(S,{hasArrow:!0,label:o.label,placement:"right",children:e.jsx(w,{"aria-label":o.label,variant:j,colorScheme:C,icon:o.icon,onClick:()=>i(o)})},o.id)},L)}),h=p?.filter(o=>c.has(o.id)).map(o=>e.jsxs("div",{className:"content-section",children:[e.jsxs(v,{className:"content-header",alignItems:"center",children:[e.jsx(x,{children:o.label}),e.jsx(z,{}),e.jsx(T,{onClick:()=>i(o)})]}),e.jsx("div",{className:"content-body",children:o.content})]},o.id)),f=s.formatMessage({id:n?"toggle.collapse":"toggle.expand"});return e.jsxs(v,{className:"layout-sidebar",children:[e.jsxs(x,{className:"layout-sidebar-main",display:"flex",flexDirection:"column",width:n?`${E}px`:`${A}px`,padding:"10px",gap:"10px",children:[g,e.jsx(z,{}),e.jsx(S,{label:f,hasArrow:!0,placement:"right",children:e.jsx(w,{"aria-label":f,variant:"ghost",icon:n?e.jsx(ae,{}):e.jsx(ne,{}),onClick:u})})]}),e.jsx(x,{className:"layout-sidebar-content",width:d?`${O}px`:"0px",children:h})]})}function he(r){const[a,t]=l.useReducer((s,c)=>{switch(c.type){case"toggle":{const i=new Set(s);return i.has(c.id)?i.delete(c.id):i.add(c.id),i}case"retain":{const i=new Set(c.ids),n=new Set(s);for(const u of n)i.has(u)||n.delete(u);return n}}},void 0,()=>new Set),p=l.useCallback(s=>{t({type:"toggle",id:s.id})},[t]);return l.useEffect(()=>{t({type:"retain",ids:r?.map(s=>s.id)??[]})},[r,t]),[a,{toggle:p}]}const fe=[796987,5827477,796987,5827477];function xe(){const[r,a]=l.useState(),[t,p]=l.useState(!0),s=W(k),c=()=>{const n=s.map?.olMap;n&&n?.getView().fit(fe,{maxZoom:13})},i=[{id:"sandbox",icon:e.jsx(X,{}),label:"Sandbox",content:e.jsx(y,{onClick:c,children:"Center Berlin"})}];return e.jsx(v,{height:"100%",direction:"column",overflow:"hidden",children:e.jsx(G,{title:e.jsx(x,{textAlign:"center",py:1,px:1,children:e.jsx(U,{size:"md",children:"Sidebar sample"})}),children:e.jsxs(v,{flex:"1",direction:"column",position:"relative",children:[e.jsx(ge,{defaultExpanded:t,expandedChanged:n=>p(n),sidebarWidthChanged:n=>a({left:n}),items:i}),e.jsx(K,{mapId:k,viewPadding:r,viewPaddingChangeBehavior:"preserve-extent",children:e.jsx(J,{position:"top-left",horizontalGap:10,verticalGap:10,children:e.jsx(x,{backgroundColor:"whiteAlpha.800",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",children:"This is a sample for a sidebar component."})})})]})})})}const ve=N({component:xe,theme:H,appMetadata:ue});customElements.define("sidebar-app",ve); diff --git a/openlayers-base-packages/pr-previews/pr-371/assets/CncSlnPsjr9P.js b/openlayers-base-packages/pr-previews/pr-371/assets/p-jlpmJ86TPh.js similarity index 72% rename from openlayers-base-packages/pr-previews/pr-371/assets/CncSlnPsjr9P.js rename to openlayers-base-packages/pr-previews/pr-371/assets/p-jlpmJ86TPh.js index c45a81d..f39b6dd 100644 --- a/openlayers-base-packages/pr-previews/pr-371/assets/CncSlnPsjr9P.js +++ b/openlayers-base-packages/pr-previews/pr-371/assets/p-jlpmJ86TPh.js @@ -1,20 +1,20 @@ -var u0=Object.defineProperty;var Ic=i=>{throw TypeError(i)};var d0=(i,t,e)=>t in i?u0(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var cr=(i,t,e)=>d0(i,typeof t!="symbol"?t+"":t,e),dh=(i,t,e)=>t.has(i)||Ic("Cannot "+e);var v=(i,t,e)=>(dh(i,t,"read from private field"),e?e.call(i):t.get(i)),O=(i,t,e)=>t.has(i)?Ic("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,e),W=(i,t,e,n)=>(dh(i,t,"write to private field"),n?n.call(i,e):t.set(i,e),e),B=(i,t,e)=>(dh(i,t,"access private method"),e);var Tc=(i,t,e,n)=>({set _(s){W(i,t,s,e)},get _(){return v(i,t,n)}});import{h as Bo,P as f0,p as g0,j as se,f as Or,q as _0,c as bi,v as id,i as Dr,r as _t,g as m0,U as y0,a8 as nd,E as p0,a9 as v0,aa as Ac,b as x0,d as Lc,ab as E0,w as M0}from"./Bh0CuZ3gy5tC.js";const Xa=Symbol("EventEmitterState");class sd{[Xa]=new w0;on(t,e){return this[Xa].on(t,{listener:e})}once(t,e){return this[Xa].on(t,{listener:e,once:!0})}emit(t,...e){this[Xa].emit(t,e[0])}}class w0{handlers=new Map;on(t,e){let n=this.handlers.get(t);return n||(n=new Set,this.handlers.set(t,n)),n.add(e),{destroy(){e.removed=!0,n?.delete(e),n=void 0}}}emit(t,e){const n=this.handlers.get(t);if(!n)return;const s=[...n];for(const r of s)r.removed||(r.once&&(r.removed=!0,n.delete(r)),r.listener(e))}}var rd=Bo(function(t,e){const n=f0("Heading",t),{className:s,...r}=g0(t);return se.jsx(Or.h2,{ref:e,className:_0("chakra-heading",t.className),...r,__css:n})});rd.displayName="Heading";var pl=Or("div");pl.displayName="Box";var ad=Bo(function(t,e){const{size:n,centerContent:s=!0,...r}=t,a=s?{display:"flex",alignItems:"center",justifyContent:"center"}:{};return se.jsx(pl,{ref:e,boxSize:n,__css:{...a,flexShrink:0,flexGrow:0},...r})});ad.displayName="Square";var S0=Bo(function(t,e){const{size:n,...s}=t;return se.jsx(ad,{size:n,ref:e,borderRadius:"9999px",...s})});S0.displayName="Circle";var C0=Bo(function(t,e){const{direction:n,align:s,justify:r,wrap:a,basis:o,grow:h,shrink:l,...c}=t,u={display:"flex",flexDirection:n,alignItems:s,justifyContent:r,flexWrap:a,flexBasis:o,flexGrow:h,flexShrink:l};return se.jsx(Or.div,{ref:e,__css:u,...c})});C0.displayName="Flex";var R0=Symbol.for("preact-signals");function Uo(){if(nn>1)nn--;else{for(var i,t=!1;Sr!==void 0;){var e=Sr;for(Sr=void 0,Wh++;e!==void 0;){var n=e.o;if(e.o=void 0,e.f&=-3,!(8&e.f)&&ld(e))try{e.c()}catch(s){t||(i=s,t=!0)}e=n}}if(Wh=0,nn--,t)throw i}}function b0(i){if(nn>0)return i();nn++;try{return i()}finally{Uo()}}var ft=void 0;function jo(i){var t=ft;ft=void 0;try{return i()}finally{ft=t}}var Sr=void 0,nn=0,Wh=0,go=0;function od(i){if(ft!==void 0){var t=i.n;if(t===void 0||t.t!==ft)return t={i:0,S:i,p:ft.s,n:void 0,t:ft,e:void 0,x:void 0,r:t},ft.s!==void 0&&(ft.s.n=t),ft.s=t,i.n=t,32&ft.f&&i.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=ft.s,t.n=void 0,ft.s.n=t,ft.s=t),t}}function ae(i){this.v=i,this.i=0,this.n=void 0,this.t=void 0}ae.prototype.brand=R0;ae.prototype.h=function(){return!0};ae.prototype.S=function(i){this.t!==i&&i.e===void 0&&(i.x=this.t,this.t!==void 0&&(this.t.e=i),this.t=i)};ae.prototype.U=function(i){if(this.t!==void 0){var t=i.e,e=i.x;t!==void 0&&(t.x=e,i.e=void 0),e!==void 0&&(e.e=t,i.x=void 0),i===this.t&&(this.t=e)}};ae.prototype.subscribe=function(i){var t=this;return xl(function(){var e=t.value,n=ft;ft=void 0;try{i(e)}finally{ft=n}})};ae.prototype.valueOf=function(){return this.value};ae.prototype.toString=function(){return this.value+""};ae.prototype.toJSON=function(){return this.value};ae.prototype.peek=function(){var i=ft;ft=void 0;try{return this.value}finally{ft=i}};Object.defineProperty(ae.prototype,"value",{get:function(){var i=od(this);return i!==void 0&&(i.i=this.i),this.v},set:function(i){if(i!==this.v){if(Wh>100)throw new Error("Cycle detected");this.v=i,this.i++,go++,nn++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Uo()}}}});function hd(i){return new ae(i)}function ld(i){for(var t=i.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function cd(i){for(var t=i.s;t!==void 0;t=t.n){var e=t.S.n;if(e!==void 0&&(t.r=e),t.S.n=t,t.i=-1,t.n===void 0){i.s=t;break}}}function ud(i){for(var t=i.s,e=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):e=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}i.s=e}function Hs(i){ae.call(this,void 0),this.x=i,this.s=void 0,this.g=go-1,this.f=4}(Hs.prototype=new ae).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===go))return!0;if(this.g=go,this.f|=1,this.i>0&&!ld(this))return this.f&=-2,!0;var i=ft;try{cd(this),ft=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return ft=i,ud(this),this.f&=-2,!0};Hs.prototype.S=function(i){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}ae.prototype.S.call(this,i)};Hs.prototype.U=function(i){if(this.t!==void 0&&(ae.prototype.U.call(this,i),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};Hs.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var i=this.t;i!==void 0;i=i.x)i.t.N()}};Object.defineProperty(Hs.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var i=od(this);if(this.h(),i!==void 0&&(i.i=this.i),16&this.f)throw this.v;return this.v}});function dd(i){return new Hs(i)}function fd(i){var t=i.u;if(i.u=void 0,typeof t=="function"){nn++;var e=ft;ft=void 0;try{t()}catch(n){throw i.f&=-2,i.f|=8,vl(i),n}finally{ft=e,Uo()}}}function vl(i){for(var t=i.s;t!==void 0;t=t.n)t.S.U(t);i.x=void 0,i.s=void 0,fd(i)}function I0(i){if(ft!==this)throw new Error("Out-of-order effect");ud(this),ft=i,this.f&=-2,8&this.f&&vl(this),Uo()}function Sa(i){this.x=i,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Sa.prototype.c=function(){var i=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{i()}};Sa.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,fd(this),cd(this),nn++;var i=ft;return ft=this,I0.bind(this,i)};Sa.prototype.N=function(){2&this.f||(this.f|=2,this.o=Sr,Sr=this)};Sa.prototype.d=function(){this.f|=8,1&this.f||vl(this)};function xl(i){var t=new Sa(i);try{t.c()}catch(e){throw t.d(),e}return t.d.bind(t)}function T0(i){let t;return{destroy:xl(function(){this[A0]=i.bind(void 0),t=this[L0].bind(this)}),start:t}}var A0="N",L0="S";function Zt(i,t){return new O0(i,t?.equal)}function El(i,t){return new P0(i,t?.equal)}function gd(i,t){const e=hd(!1),n=()=>{e.value=!e.peek()},s=El(()=>(e.value,jo(()=>i())),t);return s.trigger=n,s}function Ml(i){return b0(i)}function _d(i){return jo(i)}var Hn=Symbol("signal"),Cr=Symbol("equals"),md=class{[Hn];constructor(i){this[Hn]=i}get value(){return this[Hn].value}set value(i){throw new Error("Cannot update a readonly reactive object.")}trigger(){throw new Error("Cannot trigger this reactive object.")}peek(){return this[Hn].peek()}toJSON(){return this.value}toString(){return`Reactive[value=${N0(this[Hn].value)}]`}},P0=class extends md{[Cr];constructor(i,t){const e=dd(t?D0(i,t):i);super(e),this[Cr]=t}},O0=class extends md{[Cr];constructor(i,t){super(hd(i)),this[Cr]=t}get value(){return super.value}set value(i){jo(()=>this[Cr]?.(this.value,i))||(this[Hn].value=i)}};function D0(i,t){let e=!0,n;return function(){const r=i();return jo(()=>((e||!t(n,r))&&(n=r,e=!1),n))}}function N0(i){return typeof i=="string"?JSON.stringify(i):String(i)}function yd(i,t){return i===t?!0:i.length===t.length&&i.every((e,n)=>e===t[n])}function pd(i,t,e,n){const s=dd(t),r=n?.immediate??!1,a=n?.equal??F0;let o=!0,h,l;function c(){const f=l;l=void 0;try{f?.()}catch(g){throw d.destroy(),g}}const u=i(()=>{const f=s.value;_d(()=>{const g=h,_=o&&r||!o&&!a(g,f);(_||o)&&(h=f,o=!1),_&&(c(),l=e(f,g))})}),d={destroy(){try{c()}finally{u.destroy()}}};return d}function F0(i,t){return i===t}function k0(i){return{destroy:xl(i)}}function iC(i,t,e){return pd(k0,i,t,{equal:yd,...e})}function vd(i){Promise.reject(new Error("Error in effect or watch callback",{cause:i}))}var G0=class{queue=[];channel=new MessageChannel;constructor(){this.channel.port2.start()}enqueue(i){const t={fn:i,destroyed:!1};return this.queue.push(t),this.queue.length===1&&this.scheduleIteration(),{destroy(){t.destroyed||(t.destroyed=!0)}}}messageHandler=()=>this.runIteration();scheduleIteration(){const i=this.channel;i.port2.addEventListener("message",this.messageHandler),i.port1.postMessage("")}runIteration(){this.channel.port2.removeEventListener("message",this.messageHandler);const i=this.queue;this.queue=[];for(const t of i)if(!t.destroyed)try{t.fn()}catch(e){vd(e)}}};function z0(i){const t=new W0(i);return{destroy:t.destroy.bind(t)}}var W0=class{callback;cleanup;watcher;scheduledExecution;isDestroyed=!1;initialExecution=!0;isExecuting=!1;constructor(i){this.callback=i,this.watcher=T0(this.scheduleExecution),this.execute(),this.initialExecution=!1}destroy(){if(!this.isDestroyed){this.isDestroyed=!0;try{this.triggerCleanup()}finally{this.watcher?.destroy(),this.watcher=void 0,this.scheduledExecution?.destroy(),this.scheduledExecution=void 0}}}execute(){const i=this.watcher;if(!i)return;this.isExecuting=!0;const t=i.start();try{if(this.initialExecution)try{this.triggerCallback()}catch(e){throw this.destroy(),e}else try{this.triggerCallback()}catch(e){vd(e)}}finally{t(),this.isExecuting=!1}this.isDestroyed&&this.triggerCleanup()}triggerCallback(){if(!this.isDestroyed){this.triggerCleanup();const i=this.callback();typeof i=="function"&&(this.cleanup=i)}}triggerCleanup(){const i=this.cleanup;this.cleanup=void 0;try{i&&_d(i)}catch(t){throw this.destroy(),t}}scheduleExecution=()=>{if(!this.isDestroyed){if(this.isExecuting)throw new Error("Cycle detected");this.scheduledExecution||(this.scheduledExecution=j0(()=>{try{this.execute()}finally{this.scheduledExecution=void 0}}))}}};function B0(i,t,e){return pd(z0,i,t,{equal:yd,...e})}var U0=new G0;function j0(i){return U0.enqueue(i)}function xd(i){return new X0(i)}var Kt,ps,Gt,Wi,ro,Ed,Md,td,X0=(td=class{constructor(i){O(this,Gt);O(this,Kt,new Map);O(this,ps,Zt(!1));if(i)for(const[t,e]of i)v(this,Kt).set(t,Zt(e))}get size(){return B(this,Gt,Wi).call(this),v(this,Kt).size}forEach(i){B(this,Gt,Wi).call(this);const t=v(this,Kt).entries();for(const[e,n]of t)i(n.value,e)}entries(){return B(this,Gt,Wi).call(this),B(this,Gt,Ed).call(this)}keys(){return B(this,Gt,Wi).call(this),v(this,Kt).keys()}values(){return B(this,Gt,Wi).call(this),B(this,Gt,Md).call(this)}[Symbol.iterator](){return this.entries()}clear(){const i=!!v(this,Kt).size;v(this,Kt).clear(),i&&B(this,Gt,ro).call(this)}delete(i){const t=v(this,Kt).delete(i);return t&&B(this,Gt,ro).call(this),t}get(i){return B(this,Gt,Wi).call(this),v(this,Kt).get(i)?.value}has(i){return B(this,Gt,Wi).call(this),v(this,Kt).has(i)}set(i,t){const e=v(this,Kt).get(i);return e?e.value=t:(v(this,Kt).set(i,Zt(t)),B(this,Gt,ro).call(this)),this}},Kt=new WeakMap,ps=new WeakMap,Gt=new WeakSet,Wi=function(){v(this,ps).value},ro=function(){v(this,ps).value=!v(this,ps).peek()},Ed=function*(){const i=v(this,Kt).entries();for(const[t,e]of i)yield[t,e.value]},Md=function*(){const i=v(this,Kt).values();for(const t of i)yield t.value},td);function q0(i){return new Y0(i)}var Ne,ed,Y0=(ed=class{constructor(i){O(this,Ne);W(this,Ne,xd(i?V0(i):void 0))}get size(){return v(this,Ne).size}clear(){v(this,Ne).clear()}has(i){return v(this,Ne).has(i)}add(i){return v(this,Ne).set(i,void 0),this}delete(i){return v(this,Ne).delete(i)}forEach(i){v(this,Ne).forEach((t,e)=>i(e,e))}entries(){return K0(this.values())}values(){return v(this,Ne).keys()}[Symbol.iterator](){return this.values()}},Ne=new WeakMap,ed);function*V0(i){for(const t of i)yield[t,void 0]}function*K0(i){for(const t of i)yield[t,t]}function ur(i){return new $0(i)}var Et,vs,rt,pn,ao,wd,Sd,De,vn,xs,$0=(xs=class{constructor(t){O(this,rt);O(this,Et);O(this,vs,Zt(!1));W(this,Et,t?Array.from(t).map(e=>Zt(e)):[])}get length(){return B(this,rt,De).call(this),v(this,Et).length}push(...t){v(this,Et).push(...t.map(e=>Zt(e))),B(this,rt,vn).call(this)}pop(){if(v(this,Et).length===0)return;const t=v(this,Et).pop();return B(this,rt,vn).call(this),t.value}unshift(...t){v(this,Et).unshift(...t.map(e=>Zt(e))),B(this,rt,vn).call(this)}shift(){if(v(this,Et).length===0)return;const t=v(this,Et).shift();return B(this,rt,vn).call(this),t.value}splice(t,e,...n){const s=v(this,Et).splice(t,e??v(this,Et).length,...n.map(r=>Zt(r)));return(n!=null&&n.length!==0||s.length!==0)&&B(this,rt,vn).call(this),s.map(r=>r.value)}sort(t){v(this,Et).sort((e,n)=>t(e.value,n.value)),B(this,rt,vn).call(this)}getItems(){return B(this,rt,De).call(this),v(this,Et).map(t=>t.value)}at(t){return B(this,rt,De).call(this),v(this,Et).at(t)?.value}get(t){return B(this,rt,De).call(this),v(this,Et)[t]?.value}set(t,e){if(t<0||t>=v(this,Et).length)throw new Error("index out of bounds");const n=v(this,Et)[t];n.value=e}slice(...t){B(this,rt,De).call(this);const e=v(this,Et).slice(...t).map(n=>n.value);return ur(e)}concat(...t){const e=this.getItems().concat(...t.map(n=>n instanceof xs?n.getItems():n));return ur(e)}includes(t,e){return B(this,rt,pn).call(this,n=>n===t,e)!==-1}indexOf(t,e){return B(this,rt,pn).call(this,n=>n===t,e)}lastIndexOf(t){return B(this,rt,ao).call(this,e=>e===t)}find(t){const e=B(this,rt,pn).call(this,t);return this.get(e)}findLast(t){const e=B(this,rt,ao).call(this,t);return this.get(e)}findIndex(t){return B(this,rt,pn).call(this,t)}findLastIndex(t){return B(this,rt,ao).call(this,t)}some(t){return B(this,rt,pn).call(this,t)!==-1}every(t){return B(this,rt,pn).call(this,(e,n)=>!t(e,n))===-1}forEach(t){for(const[e,n]of this.entries())t(n,e)}filter(t){return ur(this.getItems().filter((e,n)=>t(e,n)))}map(t){return ur(this.getItems().map((e,n)=>t(e,n)))}flatMap(t){return ur(this.getItems().flatMap((e,n)=>t(e,n)))}reduce(t,...e){return B(this,rt,De).call(this),v(this,Et).reduce((n,s,r)=>t(n,s.value,r),...e)}reduceRight(t,...e){return B(this,rt,De).call(this),v(this,Et).reduceRight((n,s,r)=>t(n,s.value,r),...e)}keys(){return B(this,rt,De).call(this),v(this,Et).keys()}values(){return B(this,rt,De).call(this),B(this,rt,wd).call(this)}entries(){return B(this,rt,De).call(this),B(this,rt,Sd).call(this)}[Symbol.iterator](){return this.values()}},Et=new WeakMap,vs=new WeakMap,rt=new WeakSet,pn=function(t,e){for(let n=e??0,s=this.length;n0;){const n=this.get(e);if(t(n,e))return e}return-1},wd=function*(){for(const t of v(this,Et))yield t.value},Sd=function*(){for(const[t,e]of v(this,Et).entries())yield[t,e.value]},De=function(){v(this,vs).value},vn=function(){v(this,vs).value=!v(this,vs).peek()},xs);class wl{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}class si{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}function Z0(i,t,e){let n,s;e=e||xi;let r=0,a=i.length,o=!1;for(;r>1),s=+e(i[n],t),s<0?r=n+1:(a=n,o=!s);return o?r:~r}function xi(i,t){return i>t?1:i0?s-1:s}return n-1}if(e>0){for(let s=1;s0||a===0)})}function Nr(){return!0}function Ca(){return!1}function Gs(){}function Cd(i){let t=!1,e,n,s;return function(){const r=Array.prototype.slice.call(arguments);return(!t||this!==s||!ln(r,n))&&(t=!0,s=this,n=r,e=i.apply(this,arguments)),e}}function Rd(i){function t(){let e;try{e=i()}catch(n){return Promise.reject(n)}return e instanceof Promise?e:Promise.resolve(e)}return t()}function Ra(i){for(const t in i)delete i[t]}function zs(i){let t;for(t in i)return!1;return!t}class ba extends wl{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,e){if(!t||!e)return;const n=this.listeners_||(this.listeners_={}),s=n[t]||(n[t]=[]);s.includes(e)||s.push(e)}dispatchEvent(t){const e=typeof t=="string",n=e?t:t.type,s=this.listeners_&&this.listeners_[n];if(!s)return;const r=e?new si(t):t;r.target||(r.target=this.eventTarget_||this);const a=this.dispatching_||(this.dispatching_={}),o=this.pendingRemovals_||(this.pendingRemovals_={});n in a||(a[n]=0,o[n]=0),++a[n];let h;for(let l=0,c=s.length;l0:!1}removeEventListener(t,e){if(!this.listeners_)return;const n=this.listeners_[t];if(!n)return;const s=n.indexOf(e);s!==-1&&(this.pendingRemovals_&&t in this.pendingRemovals_?(n[s]=Gs,++this.pendingRemovals_[t]):(n.splice(s,1),n.length===0&&delete this.listeners_[t]))}}const Z={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"};function lt(i,t,e,n,s){if(n&&n!==i&&(e=e.bind(n)),s){const a=e;e=function(){i.removeEventListener(t,e),a.apply(this,arguments)}}const r={target:i,type:t,listener:e};return i.addEventListener(t,e),r}function _o(i,t,e,n){return lt(i,t,e,n,!0)}function Mt(i){i&&i.target&&(i.target.removeEventListener(i.type,i.listener),Ra(i))}class Ia extends ba{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(Z.CHANGE)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){const n=t.length,s=new Array(n);for(let r=0;r1?(e=s,n=r):h>0&&(e+=a*h,n+=o*h)}return us(i,t,e,n)}function us(i,t,e,n){const s=e-i,r=n-t;return s*s+r*r}function e_(i){const t=i.length;for(let n=0;nr&&(r=h,s=o)}if(r===0)return null;const a=i[s];i[s]=i[n],i[n]=a;for(let o=n+1;o=0;n--){e[n]=i[n][t]/i[n][n];for(let s=n-1;s>=0;s--)i[s][t]-=i[s][n]*e[n]}return e}function Oc(i){return i*180/Math.PI}function Ei(i){return i*Math.PI/180}function ds(i,t){const e=i%t;return e*t<0?e+t:e}function me(i,t,e){return i+e*(t-i)}function Yo(i,t){const e=Math.pow(10,t);return Math.round(i*e)/e}function Dc(i,t){return Math.round(Yo(i,t))}function ns(i,t){return Math.floor(Yo(i,t))}function Ji(i,t){return Math.ceil(Yo(i,t))}class bd extends ri{constructor(t){super(),this.on,this.once,this.un,this.background_=t.background;const e=Object.assign({},t);typeof t.properties=="object"&&(delete e.properties,Object.assign(e,t.properties)),e[yt.OPACITY]=t.opacity!==void 0?t.opacity:1,ct(typeof e[yt.OPACITY]=="number","Layer opacity must be a number"),e[yt.VISIBLE]=t.visible!==void 0?t.visible:!0,e[yt.Z_INDEX]=t.zIndex,e[yt.MAX_RESOLUTION]=t.maxResolution!==void 0?t.maxResolution:1/0,e[yt.MIN_RESOLUTION]=t.minResolution!==void 0?t.minResolution:0,e[yt.MIN_ZOOM]=t.minZoom!==void 0?t.minZoom:-1/0,e[yt.MAX_ZOOM]=t.maxZoom!==void 0?t.maxZoom:1/0,this.className_=e.className!==void 0?e.className:"ol-layer",delete e.className,this.setProperties(e),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(t){const e=this.state_||{layer:this,managed:t===void 0?!0:t},n=this.getZIndex();return e.opacity=It(Math.round(this.getOpacity()*100)/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=n===void 0&&!e.managed?1/0:n,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e}getLayersArray(t){return ht()}getLayerStatesArray(t){return ht()}getExtent(){return this.get(yt.EXTENT)}getMaxResolution(){return this.get(yt.MAX_RESOLUTION)}getMinResolution(){return this.get(yt.MIN_RESOLUTION)}getMinZoom(){return this.get(yt.MIN_ZOOM)}getMaxZoom(){return this.get(yt.MAX_ZOOM)}getOpacity(){return this.get(yt.OPACITY)}getSourceState(){return ht()}getVisible(){return this.get(yt.VISIBLE)}getZIndex(){return this.get(yt.Z_INDEX)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(yt.EXTENT,t)}setMaxResolution(t){this.set(yt.MAX_RESOLUTION,t)}setMinResolution(t){this.set(yt.MIN_RESOLUTION,t)}setMaxZoom(t){this.set(yt.MAX_ZOOM,t)}setMinZoom(t){this.set(yt.MIN_ZOOM,t)}setOpacity(t){ct(typeof t=="number","Layer opacity must be a number"),this.set(yt.OPACITY,t)}setVisible(t){this.set(yt.VISIBLE,t)}setZIndex(t){this.set(yt.Z_INDEX,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}const Te={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"},Nt={ANIMATING:0,INTERACTING:1},Oe={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},i_=42,Sl=256,Fr={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};let Cl=class{constructor(t){this.code_=t.code,this.units_=t.units,this.extent_=t.extent!==void 0?t.extent:null,this.worldExtent_=t.worldExtent!==void 0?t.worldExtent:null,this.axisOrientation_=t.axisOrientation!==void 0?t.axisOrientation:"enu",this.global_=t.global!==void 0?t.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||Fr[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(t){this.global_=t,this.canWrapX_=!!(t&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(t){this.defaultTileGrid_=t}setExtent(t){this.extent_=t,this.canWrapX_=!!(this.global_&&t)}setWorldExtent(t){this.worldExtent_=t}setGetPointResolution(t){this.getPointResolutionFunc_=t}getPointResolutionFunc(){return this.getPointResolutionFunc_}};const Ta=6378137,ss=Math.PI*Ta,n_=[-ss,-ss,ss,ss],s_=[-180,-85,180,85],qa=Ta*Math.log(Math.tan(Math.PI/2));class qn extends Cl{constructor(t){super({code:t,units:"m",extent:n_,global:!0,worldExtent:s_,getPointResolution:function(e,n){return e/Math.cosh(n[1]/Ta)}})}}const Nc=[new qn("EPSG:3857"),new qn("EPSG:102100"),new qn("EPSG:102113"),new qn("EPSG:900913"),new qn("http://www.opengis.net/def/crs/EPSG/0/3857"),new qn("http://www.opengis.net/gml/srs/epsg.xml#3857")];function r_(i,t,e){const n=i.length;e=e>1?e:2,t===void 0&&(e>2?t=i.slice():t=new Array(n));for(let s=0;sqa?r=qa:r<-qa&&(r=-qa),t[s+1]=r}return t}function a_(i,t,e){const n=i.length;e=e>1?e:2,t===void 0&&(e>2?t=i.slice():t=new Array(n));for(let s=0;ss&&(h=h|Dt.RIGHT),or&&(h=h|Dt.ABOVE),h===Dt.UNKNOWN&&(h=Dt.INTERSECTING),h}function ve(){return[1/0,1/0,-1/0,-1/0]}function Si(i,t,e,n,s){return s?(s[0]=i,s[1]=t,s[2]=e,s[3]=n,s):[i,t,e,n]}function Aa(i){return Si(1/0,1/0,-1/0,-1/0,i)}function Pd(i,t){const e=i[0],n=i[1];return Si(e,n,e,n,t)}function bl(i,t,e,n,s){const r=Aa(s);return Dd(r,i,t,e,n)}function Us(i,t){return i[0]==t[0]&&i[2]==t[2]&&i[1]==t[1]&&i[3]==t[3]}function Od(i,t){return t[0]i[2]&&(i[2]=t[2]),t[1]i[3]&&(i[3]=t[3]),i}function Rr(i,t){t[0]i[2]&&(i[2]=t[0]),t[1]i[3]&&(i[3]=t[1])}function Dd(i,t,e,n,s){for(;et[0]?n[0]=i[0]:n[0]=t[0],i[1]>t[1]?n[1]=i[1]:n[1]=t[1],i[2]=t[0]&&i[1]<=t[3]&&i[3]>=t[1]}function Bn(i){return i[2]=a&&_<=h),!n&&r&Dt.RIGHT&&!(s&Dt.RIGHT)&&(m=f-(d-h)*g,n=m>=o&&m<=l),!n&&r&Dt.BELOW&&!(s&Dt.BELOW)&&(_=d-(f-o)/g,n=_>=a&&_<=h),!n&&r&Dt.LEFT&&!(s&Dt.LEFT)&&(m=f-(d-a)*g,n=m>=o&&m<=l)}return n}function m_(i,t,e,n){if(Bn(i))return Aa(e);let s=[];s=[i[0],i[1],i[2],i[1],i[2],i[3],i[0],i[3]],t(s,s,2);const r=[],a=[];for(let o=0,h=s.length;o=e[2])){const s=nt(e),a=Math.floor((n[0]-e[0])/s)*s;i[0]-=a,i[2]-=a}return i}function kd(i,t,e){if(t.canWrapX()){const n=t.getExtent();if(!isFinite(i[0])||!isFinite(i[2]))return[[n[0],i[1],n[2],i[3]]];Fd(i,t);const s=nt(n);if(nt(i)>s&&!e)return[[n[0],i[1],n[2],i[3]]];if(i[0]n[2])return[[i[0],i[1],n[2],i[3]],[n[0],i[1],i[2]-s,i[3]]]}return[i]}function Gd(i,t){const e=(""+i).split("."),n=(""+t).split(".");for(let s=0;sa)return 1;if(a>r)return-1}return 0}function y_(i,t){return i[0]+=+t[0],i[1]+=+t[1],i}function p_(i,t){const e=i[0],n=i[1],s=t[0],r=t[1],a=s[0],o=s[1],h=r[0],l=r[1],c=h-a,u=l-o,d=c===0&&u===0?0:(c*(e-a)+u*(n-o))/(c*c+u*u||0);let f,g;return d<=0?(f=a,g=o):d>=1?(f=h,g=l):(f=a+d*c,g=o+d*u),[f,g]}function po(i,t){let e=!0;for(let n=i.length-1;n>=0;--n)if(i[n]!=t[n]){e=!1;break}return e}function Il(i,t){const e=Math.cos(t),n=Math.sin(t),s=i[0]*e-i[1]*n,r=i[1]*e+i[0]*n;return i[0]=s,i[1]=r,i}function v_(i,t){return i[0]*=t,i[1]*=t,i}function zd(i,t){const e=i[0]-t[0],n=i[1]-t[1];return e*e+n*n}function rC(i,t){return Math.sqrt(zd(i,t))}function aC(i,t){return zd(i,p_(i,t))}function Wd(i,t){if(t.canWrapX()){const e=nt(t.getExtent()),n=Bd(i,t,e);n&&(i[0]-=n*e)}return i}function Bd(i,t,e){const n=t.getExtent();let s=0;return t.canWrapX()&&(i[0]n[2])&&(e=e||nt(n),s=Math.floor((i[0]-n[0])/e)),s}const Zo=63710088e-1;function Xh(i,t,e){e=e||Zo;const n=Ei(i[1]),s=Ei(t[1]),r=(s-n)/2,a=Ei(t[0]-i[0])/2,o=Math.sin(r)*Math.sin(r)+Math.sin(a)*Math.sin(a)*Math.cos(n)*Math.cos(s);return 2*e*Math.atan2(Math.sqrt(o),Math.sqrt(1-o))}function fh(i,t){let e=0;for(let n=0,s=i.length;n=o?t[r+h]:a[h]}return e}}function C_(i,t,e,n){const s=pt(i),r=pt(t);Bs(s,r,zc(e)),Bs(r,s,zc(n))}function oC(i,t){return jd(),Ll(i,"EPSG:4326",t!==void 0?t:"EPSG:3857")}function qe(i,t){if(i===t)return!0;const e=i.getUnits()===t.getUnits();return(i.getCode()===t.getCode()||Ho(i,t)===Tl)&&e}function Ho(i,t){const e=i.getCode(),n=t.getCode();let s=Id(e,n);return s||(s=Xd),s}function Gr(i,t){const e=pt(i),n=pt(t);return Ho(e,n)}function Ll(i,t,e){return Gr(t,e)(i,void 0,i.length)}function R_(i,t,e,n){const s=Gr(t,e);return m_(i,s,void 0)}let b_=null;function I_(){return b_}function Vh(i,t){return i}function fi(i,t){return qh&&!po(i,[0,0])&&i[0]>=-180&&i[0]<=180&&i[1]>=-90&&i[1]<=90&&(qh=!1,Ud("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),i}function Pl(i,t){return i}function vi(i,t){return i}function Wc(i,t,e){return function(n){let s,r;if(i.canWrapX()){const a=i.getExtent(),o=nt(a);n=n.slice(0),r=Bd(n,i,o),r&&(n[0]=n[0]-r*o),n[0]=It(n[0],a[0],a[2]),n[1]=It(n[1],a[1],a[3]),s=e(n)}else s=e(n);return r&&t.canWrapX()&&(s[0]+=r*nt(t.getExtent())),s}}function T_(){Yh(Nc),Yh(kc),S_(kc,Nc,r_,a_)}T_();function Bc(i,t,e){return function(n,s,r,a,o){if(!n)return;if(!s&&!t)return n;const h=t?0:r[0]*s,l=t?0:r[1]*s,c=o?o[0]:0,u=o?o[1]:0;let d=i[0]+h/2+c,f=i[2]-h/2+c,g=i[1]+l/2+u,_=i[3]-l/2+u;d>f&&(d=(f+d)/2,f=d),g>_&&(g=(_+g)/2,_=g);let m=It(n[0],d,f),y=It(n[1],g,_);if(a&&e&&s){const p=30*s;m+=-p*Math.log(1+Math.max(0,d-n[0])/p)+p*Math.log(1+Math.max(0,n[0]-f)/p),y+=-p*Math.log(1+Math.max(0,g-n[1])/p)+p*Math.log(1+Math.max(0,n[1]-_)/p)}return[m,y]}}function A_(i){return i}function Ol(i,t,e,n){const s=nt(t)/e[0],r=Pt(t)/e[1];return n?Math.min(i,Math.max(s,r)):Math.min(i,Math.min(s,r))}function Dl(i,t,e){let n=Math.min(i,t);const s=50;return n*=Math.log(1+s*Math.max(0,i/t-1))/s+1,e&&(n=Math.max(n,e),n/=Math.log(1+s*Math.max(0,e/i-1))/s+1),It(n,e/2,t*2)}function L_(i,t,e,n){return t=t!==void 0?t:!0,function(s,r,a,o){if(s!==void 0){const h=i[0],l=i[i.length-1],c=e?Ol(h,e,a,n):h;if(o)return t?Dl(s,c,l):It(s,l,c);const u=Math.min(c,s),d=Math.floor(Xo(i,u,r));return i[d]>c&&dMath.round(e*Xc[n])/Xc[n]).join(", ")+")"}function sn(i,t,e,n,s,r){r=r||[];let a=0;for(let o=t;o{if(!n)return this.getSimplifiedGeometry(e);const s=this.clone();return s.applyTransform(n),s.getSimplifiedGeometry(e)})}simplifyTransformed(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)}clone(){return ht()}closestPointXY(t,e,n,s){return ht()}containsXY(t,e){const n=this.getClosestPoint([t,e]);return n[0]===t&&n[1]===e}getClosestPoint(t,e){return e=e||[NaN,NaN],this.closestPointXY(t[0],t[1],e,1/0),e}intersectsCoordinate(t){return this.containsXY(t[0],t[1])}computeExtent(t){return ht()}getExtent(t){if(this.extentRevision_!=this.getRevision()){const e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&Aa(e),this.extentRevision_=this.getRevision()}return g_(this.extent_,t)}rotate(t,e){ht()}scale(t,e,n){ht()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return ht()}getType(){return ht()}applyTransform(t){ht()}intersectsExtent(t){return ht()}translate(t,e){ht()}transform(t,e){const n=pt(t),s=n.getUnits()=="tile-pixels"?function(r,a,o){const h=n.getExtent(),l=n.getWorldExtent(),c=Pt(l)/Pt(h);return ei(qc,l[0],l[3],c,-c,0,0,0),sn(r,0,r.length,o,qc,a),Gr(n,e)(r,a,o)}:Gr(n,e);return this.applyTransform(s),this}}class kl extends U_{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(t){return bl(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinates(){return ht()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length1)u=e;else if(d>0){for(let f=0;fs&&(s=l),r=o,a=h}return s}function Jd(i,t,e,n,s){for(let r=0,a=e.length;r0;){const u=l.pop(),d=l.pop();let f=0;const g=i[d],_=i[d+1],m=i[u],y=i[u+1];for(let p=d+n;pf&&(c=p,f=E)}f>s&&(h[(c-t)/n]=1,d+n0&&_>f)&&(g<0&&m0&&m>g)){l=u,c=d;continue}r[a++]=l,r[a++]=c,o=l,h=c,l=u,c=d}return r[a++]=l,r[a++]=c,a}function zl(i,t,e,n,s,r,a,o){for(let h=0,l=e.length;hr&&(l-o)*(r-h)-(s-o)*(c-h)>0&&a++:c<=r&&(l-o)*(r-h)-(s-o)*(c-h)<0&&a--,o=l,h=c}return a!==0}function Wl(i,t,e,n,s,r){if(e.length===0||!Mn(i,t,e[0],n,s,r))return!1;for(let a=1,o=e.length;ay&&(l=(c+u)/2,Wl(i,t,e,n,l,g)&&(m=l,y=p)),c=u}return isNaN(m)&&(m=s[r]),a?(a.push(m,g,y),a):[m,g,y]}function Z_(i,t,e,n,s){let r=[];for(let a=0,o=e.length;a=s[0]&&r[2]<=s[2]||r[1]>=s[1]&&r[3]<=s[3]?!0:H_(i,t,e,n,function(a,o){return __(s,a,o)}):!1}function yC(i,t,e,n,s){for(let r=0,a=e.length;r0}function lf(i,t,e,n,s){s=s!==void 0?s:!1;for(let r=0,a=e.length;r1&&typeof arguments[e-1]=="function"&&(n=arguments[e-1],--e);let s=0;for(;s0}getInteracting(){return this.hints_[Nt.INTERACTING]>0}cancelAnimations(){this.setHint(Nt.ANIMATING,-this.hints_[Nt.ANIMATING]);let t;for(let e=0,n=this.animations_.length;e=0;--n){const s=this.animations_[n];let r=!0;for(let a=0,o=s.length;a0?l/h.duration:1;c>=1?(h.complete=!0,c=1):r=!1;const u=h.easing(c);if(h.sourceCenter){const d=h.sourceCenter[0],f=h.sourceCenter[1],g=h.targetCenter[0],_=h.targetCenter[1];this.nextCenter_=h.targetCenter;const m=d+u*(g-d),y=f+u*(_-f);this.targetCenter_=[m,y]}if(h.sourceResolution&&h.targetResolution){const d=u===1?h.targetResolution:h.sourceResolution+u*(h.targetResolution-h.sourceResolution);if(h.anchor){const f=this.getViewportSize_(this.getRotation()),g=this.constraints_.resolution(d,0,f,!0);this.targetCenter_=this.calculateCenterZoom(g,h.anchor)}this.nextResolution_=h.targetResolution,this.targetResolution_=d,this.applyTargetState_(!0)}if(h.sourceRotation!==void 0&&h.targetRotation!==void 0){const d=u===1?ds(h.targetRotation+Math.PI,2*Math.PI)-Math.PI:h.sourceRotation+u*(h.targetRotation-h.sourceRotation);if(h.anchor){const f=this.constraints_.rotation(d,!0);this.targetCenter_=this.calculateCenterRotate(f,h.anchor)}this.nextRotation_=h.targetRotation,this.targetRotation_=d}if(this.applyTargetState_(!0),e=!0,!h.complete)break}if(r){this.animations_[n]=null,this.setHint(Nt.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const a=s[0].callback;a&&Va(a,!0)}}this.animations_=this.animations_.filter(Boolean),e&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,e){let n;const s=this.getCenterInternal();return s!==void 0&&(n=[s[0]-e[0],s[1]-e[1]],Il(n,t-this.getRotation()),y_(n,e)),n}calculateCenterZoom(t,e){let n;const s=this.getCenterInternal(),r=this.getResolution();if(s!==void 0&&r!==void 0){const a=e[0]-t*(e[0]-s[0])/r,o=e[1]-t*(e[1]-s[1])/r;n=[a,o]}return n}getViewportSize_(t){const e=this.viewportSize_;if(t){const n=e[0],s=e[1];return[Math.abs(n*Math.cos(t))+Math.abs(s*Math.sin(t)),Math.abs(n*Math.sin(t))+Math.abs(s*Math.cos(t))]}return e}setViewportSize(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const t=this.getCenterInternal();return t&&Vh(t,this.getProjection())}getCenterInternal(){return this.get(Oe.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(t){return t!==void 0?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()}calculateExtent(t){const e=this.calculateExtentInternal(t);return Pl(e,this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();const e=this.getCenterInternal();ct(e,"The view center is not defined");const n=this.getResolution();ct(n!==void 0,"The view resolution is not defined");const s=this.getRotation();return ct(s!==void 0,"The view rotation is not defined"),kr(e,n,s,t)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))}setConstrainResolution(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))}getProjection(){return this.projection_}getResolution(){return this.get(Oe.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal(vi(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const n=nt(t)/e[0],s=Pt(t)/e[1];return Math.max(n,s)}getResolutionForValueFunction(t){t=t||2;const e=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,s=Math.log(e/n)/Math.log(t);return function(r){return e/Math.pow(t,r*s)}}getRotation(){return this.get(Oe.ROTATION)}getValueForResolutionFunction(t){const e=Math.log(t||2),n=this.getConstrainedResolution(this.maxResolution_),s=this.minResolution_,r=Math.log(n/s)/e;return function(a){return Math.log(n/a)/e/r}}getViewportSizeMinusPadding_(t){let e=this.getViewportSize_(t);const n=this.padding_;return n&&(e=[e[0]-n[1]-n[3],e[1]-n[0]-n[2]]),e}getState(){const t=this.getProjection(),e=this.getResolution(),n=this.getRotation();let s=this.getCenterInternal();const r=this.padding_;if(r){const a=this.getViewportSizeMinusPadding_();s=_h(s,this.getViewportSize_(),[a[0]/2+r[3],a[1]/2+r[0]],e,n)}return{center:s.slice(0),projection:t!==void 0?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:n,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let t;const e=this.getResolution();return e!==void 0&&(t=this.getZoomForResolution(e)),t}getZoomForResolution(t){let e=this.minZoom_||0,n,s;if(this.resolutions_){const r=Xo(this.resolutions_,t,1);e=r,n=this.resolutions_[r],r==this.resolutions_.length-1?s=2:s=n/this.resolutions_[r+1]}else n=this.maxResolution_,s=this.zoomFactor_;return e+Math.log(n/t)/Math.log(s)}getResolutionForZoom(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;const e=It(Math.floor(t),0,this.resolutions_.length-2),n=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(n,It(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let n;if(ct(Array.isArray(t)||typeof t.getSimplifiedGeometry=="function","Invalid extent or geometry provided as `geometry`"),Array.isArray(t)){ct(!Bn(t),"Cannot fit empty extent provided as `geometry`");const s=vi(t,this.getProjection());n=$c(s)}else if(t.getType()==="Circle"){const s=vi(t.getExtent(),this.getProjection());n=$c(s),n.rotate(this.getRotation(),Ae(s))}else n=t;this.fitInternal(n,e)}rotatedExtentForGeometry(t){const e=this.getRotation(),n=Math.cos(e),s=Math.sin(-e),r=t.getFlatCoordinates(),a=t.getStride();let o=1/0,h=1/0,l=-1/0,c=-1/0;for(let u=0,d=r.length;u{this.dispatchEvent("sourceready")},0))),this.changed()}getFeatures(t){return this.renderer_?this.renderer_.getFeatures(t):Promise.resolve([])}getData(t){return!this.renderer_||!this.rendered?null:this.renderer_.getData(t)}isVisible(t){let e;const n=this.getMapInternal();!t&&n&&(t=n.getView()),t instanceof Ie?e={viewState:t.getState(),extent:t.calculateExtent()}:e=t,!e.layerStatesArray&&n&&(e.layerStatesArray=n.getLayerGroup().getLayerStatesArray());let s;e.layerStatesArray?s=e.layerStatesArray.find(a=>a.layer===this):s=this.getLayerState();const r=this.getExtent();return Xl(s,e.viewState)&&(!r||ne(r,e.extent))}getAttributions(t){if(!this.isVisible(t))return[];let e;const n=this.getSource();if(n&&(e=n.getAttributions()),!e)return[];const s=t instanceof Ie?t.getViewStateAndExtent():t;let r=e(s);return Array.isArray(r)||(r=[r]),r}render(t,e){const n=this.getRenderer();return n.prepareFrame(t)?(this.rendered=!0,n.renderFrame(t,e)):null}unrender(){this.rendered=!1}getDeclutter(){}renderDeclutter(t,e){}renderDeferred(t){const e=this.getRenderer();e&&e.renderDeferred(t)}setMapInternal(t){t||this.unrender(),this.set(yt.MAP,t)}getMapInternal(){return this.get(yt.MAP)}setMap(t){this.mapPrecomposeKey_&&(Mt(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(Mt(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=lt(t,Te.PRECOMPOSE,function(e){const s=e.frameState.layerStatesArray,r=this.getLayerState(!1);ct(!s.some(function(a){return a.layer===r.layer}),"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."),s.push(r)},this),this.mapRenderKey_=lt(this,Z.CHANGE,t.render,t),this.changed())}setSource(t){this.set(yt.SOURCE,t)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}disposeInternal(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),super.disposeInternal()}}function Xl(i,t){if(!i.visible)return!1;const e=t.resolution;if(e=i.maxResolution)return!1;const n=t.zoom;return n>i.minZoom&&n<=i.maxZoom}var Wt=[];for(var mh=0;mh<256;++mh)Wt.push((mh+256).toString(16).slice(1));function sm(i,t=0){return(Wt[i[t+0]]+Wt[i[t+1]]+Wt[i[t+2]]+Wt[i[t+3]]+"-"+Wt[i[t+4]]+Wt[i[t+5]]+"-"+Wt[i[t+6]]+Wt[i[t+7]]+"-"+Wt[i[t+8]]+Wt[i[t+9]]+"-"+Wt[i[t+10]]+Wt[i[t+11]]+Wt[i[t+12]]+Wt[i[t+13]]+Wt[i[t+14]]+Wt[i[t+15]]).toLowerCase()}var Ka,rm=new Uint8Array(16);function am(){if(!Ka&&(Ka=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ka))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ka(rm)}var om=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const Zc={randomUUID:om};function hm(i,t,e){if(Zc.randomUUID&&!t&&!i)return Zc.randomUUID();i=i||{};var n=i.random||(i.rng||am)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,sm(n)}const lm=bi("map:AbstractLayerModel");var Es,Xi,ta,Ms,ws,Ss,ea,Cs;class cf extends sd{constructor(e){super();O(this,Es);O(this,Xi);O(this,ta);O(this,Ms);O(this,ws);O(this,Ss,xd());O(this,ea);O(this,Cs,!1);W(this,ta,e.id??hm()),W(this,ea,El(()=>Object.fromEntries(v(this,Ss).entries()))),W(this,Ms,Zt(e.title)),W(this,ws,Zt(e.description??"")),e.attributes&&this.updateAttributes(e.attributes)}get __destroyed(){return v(this,Cs)}get map(){const e=v(this,Es);if(!e)throw new Error(`Layer '${this.id}' has not been attached to a map yet.`);return e}get id(){return v(this,ta)}get title(){return v(this,Ms).value}get description(){return v(this,ws).value}get attributes(){return v(this,ea).value}get parent(){return v(this,Xi)}destroy(){if(!v(this,Cs)){W(this,Cs,!0),this.sublayers?.destroy(),this.layers?.destroy(),this.__detachFromGroup();try{this.emit("destroy")}catch(e){lm.warn("Unexpected error from event listener during layer destruction:",e)}}}__attachToMap(e){if(v(this,Es))throw new Error(`Layer '${this.id}' has already been attached to the map '${this.map.id}'`);W(this,Es,e)}__attachToGroup(e){if(v(this,Xi))throw new Error(`Layer '${this.id}' has already been attached to the group layer '${v(this,Xi).id}'`);W(this,Xi,e)}__detachFromGroup(){W(this,Xi,void 0)}setTitle(e){v(this,Ms).value=e}setDescription(e){v(this,ws).value=e}updateAttributes(e){const n=Reflect.ownKeys(e);Ml(()=>{for(const s of n)v(this,Ss).set(s,e[s])})}deleteAttribute(e){v(this,Ss).delete(e)}}Es=new WeakMap,Xi=new WeakMap,ta=new WeakMap,Ms=new WeakMap,ws=new WeakMap,Ss=new WeakMap,ea=new WeakMap,Cs=new WeakMap;const oo=bi("map:AbstractLayer");var je,ia,na,Rs,bn,In,bs;class Xs extends cf{constructor(e){super(e);O(this,je);O(this,ia);O(this,na);O(this,Rs);O(this,bn);O(this,In);O(this,bs);W(this,je,e.olLayer),W(this,ia,e.isBaseLayer??!1),W(this,na,e.healthCheck),W(this,Rs,gd(()=>v(this,je).getVisible())),W(this,In,v(this,je).on("change:visible",v(this,Rs).trigger)),W(this,bn,Zt(Zh($h(v(this,je))))),this.__setVisible(e.visible??!0)}get visible(){return v(this,Rs).value}get olLayer(){return v(this,je)}get isBaseLayer(){return v(this,ia)}get loadState(){return v(this,bn).value}destroy(){this.__destroyed||(W(this,bs,id(v(this,bs))),v(this,In)&&Nn(v(this,In)),W(this,In,void 0),this.olLayer.dispose(),super.destroy())}__attach(e){super.__attachToMap(e);const{initial:n,resource:s}=cm(this,v(this,na),r=>{v(this,bn).value=r});W(this,bs,s),v(this,bn).value=n}setVisible(e){if(this.isBaseLayer){oo.warn(`Cannot change visibility of base layer '${this.id}': use activateBaseLayer() on the map's LayerCollection instead.`);return}this.__setVisible(e)}__setVisible(e){v(this,je).getVisible()!==e&&v(this,je).setVisible(e)}}je=new WeakMap,ia=new WeakMap,na=new WeakMap,Rs=new WeakMap,bn=new WeakMap,In=new WeakMap,bs=new WeakMap;function cm(i,t,e){const n=i.olLayer;if(!(n instanceof Un))return{initial:"loaded",resource:{destroy(){}}};let s=$h(n);const r=Zh(s);let a=r,o="loading";r!=="error"&&um(i,t).then(u=>{o=u,h()});const h=()=>{const u=Zh(s),d=o==="error"?"error":u;a!==d&&(a=d,e(a))};let l;l=s?.on("change",()=>{h()});const c=n.on("change:source",()=>{l&&Nn(l),l=void 0,s=$h(n),l=s?.on("change",()=>{h()}),h()});return{initial:a,resource:{destroy(){l&&Nn(l),Nn(c)}}}}async function um(i,t){if(t==null)return"loaded";let e;if(typeof t=="function")e=t;else if(typeof t=="string")e=async()=>{const s=await i.map.__sharedDependencies.httpService.fetch(t);return s.ok?"loaded":(oo.warn(`Health check failed for layer '${i.id}' (http status ${s.status})`),"error")};else return oo.error(`Unexpected object for 'healthCheck' parameter of layer '${i.id}'`,t),"error";try{return await e(i)}catch(n){return oo.warn(`Health check failed for layer '${i.id}'`,n),"error"}}function $h(i){if(i instanceof Un)return i?.getSource()??void 0}function Zh(i){switch(i?.getState()){case void 0:return"loaded";case"undefined":return"not-loaded";case"loading":return"loading";case"ready":return"loaded";case"error":return"error"}}class dm extends Xs{get type(){return"simple"}get legend(){}get layers(){}get sublayers(){}}const MC=dm;function ql(i,t){return uf(i,t,[]).join("")}function uf(i,t,e){if(i.nodeType==Node.CDATA_SECTION_NODE||i.nodeType==Node.TEXT_NODE)e.push(i.nodeValue);else{let n;for(n=i.firstChild;n;n=n.nextSibling)uf(n,t,e)}return e}function fm(i){return"documentElement"in i}function gm(i){return new DOMParser().parseFromString(i,"application/xml")}function Wr(i,t){return function(e,n){const s=i.call(this,e,n);s!==void 0&&n[n.length-1].push(s)}}function vt(i,t,e){return function(n,s){const r=i.call(this,n,s);if(r!==void 0){const a=s[s.length-1],o=n.localName;let h;o in a?h=a[o]:(h=[],a[o]=h),h.push(r)}}}function b(i,t,e){return function(n,s){const r=i.call(this,n,s);if(r!==void 0){const a=s[s.length-1],o=n.localName;a[o]=r}}}function K(i,t,e){e=e!==void 0?e:{};let n,s;for(n=0,s=i.length;n{const a=this.loadedTileCallback.bind(this,n,s);return t.forEachLoadedTile(e,s,r,a)}}forEachFeatureAtCoordinate(t,e,n,s,r){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){const e=t.target;(e.getState()===U.LOADED||e.getState()===U.ERROR)&&this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return e!=U.LOADED&&e!=U.ERROR&&t.addEventListener(Z.CHANGE,this.boundHandleImageChange_),e==U.IDLE&&(t.load(),e=t.getState()),e==U.LOADED}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&t.getSourceState()==="ready"&&t.changed()}renderDeferred(t){}disposeInternal(){delete this.layer_,super.disposeInternal()}}class mf extends si{constructor(t,e,n,s){super(t),this.inversePixelTransform=e,this.frameState=n,this.context=s}}const an=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",Qm=an.includes("firefox"),ty=an.includes("safari")&&!an.includes("chrom");ty&&(an.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(an));const ey=an.includes("webkit")&&!an.includes("edge"),yf=an.includes("macintosh"),pf=typeof devicePixelRatio<"u"?devicePixelRatio:1,vf=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,Vl=typeof Image<"u"&&Image.prototype.decode,iy=typeof createImageBitmap=="function",xf=function(){let i=!1;try{const t=Object.defineProperty({},"passive",{get:function(){i=!0}});window.addEventListener("_",null,t),window.removeEventListener("_",null,t)}catch{}return i}();function jt(i,t,e,n){let s;return e&&e.length?s=e.shift():vf?s=new OffscreenCanvas(i||300,t||300):s=document.createElement("canvas"),i&&(s.width=i),t&&(s.height=t),s.getContext("2d",n)}let ph;function Eo(){return ph||(ph=jt(1,1)),ph}function Jo(i){const t=i.canvas;t.width=1,t.height=1,i.clearRect(0,0,1,1)}function wC(i){let t=i.offsetWidth;const e=getComputedStyle(i);return t+=parseInt(e.marginLeft,10)+parseInt(e.marginRight,10),t}function SC(i){let t=i.offsetHeight;const e=getComputedStyle(i);return t+=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10),t}function Hc(i,t){const e=t.parentNode;e&&e.replaceChild(i,t)}function Hh(i){return i&&i.parentNode?i.parentNode.removeChild(i):null}function ny(i){for(;i.lastChild;)i.removeChild(i.lastChild)}function sy(i,t){const e=i.childNodes;for(let n=0;;++n){const s=e[n],r=t[n];if(!s&&!r)break;if(s!==r){if(!s){i.appendChild(r);continue}if(!r){i.removeChild(s),--n;continue}i.insertBefore(r,s)}}}class Ef{constructor(){this.instructions_=[],this.zIndex=0,this.offset_=0,this.context_=new Proxy(Eo(),{get:(t,e)=>{if(typeof Eo()[e]=="function")return this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(e),this.pushMethodArgs_},set:(t,e,n)=>(this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(e,n),!0)})}pushMethodArgs_=(...t)=>(this.instructions_[this.zIndex+this.offset_].push(t),this);pushFunction(t){this.instructions_[this.zIndex+this.offset_].push(t)}getContext(){return this.context_}draw(t){this.instructions_.forEach(e=>{for(let n=0,s=e.length;n.0031308?1.055*Math.pow(r,1/2.4)-.055:r=r*12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a=a*12.92,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o=o*12.92,r=Math.min(Math.max(0,r),1),a=Math.min(Math.max(0,a),1),o=Math.min(Math.max(0,o),1),[r*255,a*255,o*255]};Br.xyz=function(i,t){var e=i[0]/255,n=i[1]/255,s=i[2]/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,s=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92;var r=e*.41239079926595+n*.35758433938387+s*.18048078840183,a=e*.21263900587151+n*.71516867876775+s*.072192315360733,o=e*.019330818715591+n*.11919477979462+s*.95053215224966;return t=t||Ut.whitepoint[2].E,[r*t[0],a*t[1],o*t[2]]};const Kl={name:"luv",min:[0,-134,-140],max:[100,224,122],channel:["lightness","u","v"],alias:["LUV","cieluv","cie1976"],xyz:function(i,t,e){var n,s,r,a,o,h,l,c,u,d,f,g,_;if(r=i[0],a=i[1],o=i[2],r===0)return[0,0,0];var m=.0011070564598794539;return t=t||"D65",e=e||2,u=Ut.whitepoint[e][t][0],d=Ut.whitepoint[e][t][1],f=Ut.whitepoint[e][t][2],g=4*u/(u+15*d+3*f),_=9*d/(u+15*d+3*f),n=a/(13*r)+g||0,s=o/(13*r)+_||0,l=r>8?d*Math.pow((r+16)/116,3):d*r*m,h=l*9*n/(4*s)||0,c=l*(12-3*n-20*s)/(4*s)||0,[h,l,c]}};Ut.luv=function(i,t,e){var n,s,r,a,o,h,l,c,u,d,f,g,_,m=.008856451679035631,y=903.2962962962961;t=t||"D65",e=e||2,u=Ut.whitepoint[e][t][0],d=Ut.whitepoint[e][t][1],f=Ut.whitepoint[e][t][2],g=4*u/(u+15*d+3*f),_=9*d/(u+15*d+3*f),h=i[0],l=i[1],c=i[2],n=4*h/(h+15*l+3*c)||0,s=9*l/(h+15*l+3*c)||0;var p=l/d;return r=p<=m?y*p:116*Math.pow(p,1/3)-16,a=13*r*(n-g),o=13*r*(s-_),[r,a,o]};var Mf={name:"lchuv",channel:["lightness","chroma","hue"],alias:["LCHuv","cielchuv"],min:[0,0,0],max:[100,100,360],luv:function(i){var t=i[0],e=i[1],n=i[2],s,r,a;return a=n/360*2*Math.PI,s=e*Math.cos(a),r=e*Math.sin(a),[t,s,r]},xyz:function(i){return Kl.xyz(Mf.luv(i))}};Kl.lchuv=function(i){var t=i[0],e=i[1],n=i[2],s=Math.sqrt(e*e+n*n),r=Math.atan2(n,e),a=r*360/2/Math.PI;return a<0&&(a+=360),[t,s,a]};Ut.lchuv=function(i){return Kl.lchuv(Ut.luv(i))};const Jc={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};var Qc={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function ry(i){var t,e=[],n=1,s;if(typeof i=="number")return{space:"rgb",values:[i>>>16,(i&65280)>>>8,i&255],alpha:1};if(typeof i=="number")return{space:"rgb",values:[i>>>16,(i&65280)>>>8,i&255],alpha:1};if(i=String(i).toLowerCase(),Jc[i])e=Jc[i].slice(),s="rgb";else if(i==="transparent")n=0,s="rgb",e=[0,0,0];else if(i[0]==="#"){var r=i.slice(1),a=r.length,o=a<=4;n=1,o?(e=[parseInt(r[0]+r[0],16),parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16)],a===4&&(n=parseInt(r[3]+r[3],16)/255)):(e=[parseInt(r[0]+r[1],16),parseInt(r[2]+r[3],16),parseInt(r[4]+r[5],16)],a===8&&(n=parseInt(r[6]+r[7],16)/255)),e[0]||(e[0]=0),e[1]||(e[1]=0),e[2]||(e[2]=0),s="rgb"}else if(t=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(i)){var h=t[1];s=h.replace(/a$/,"");var l=s==="cmyk"?4:s==="gray"?1:3;e=t[2].trim().split(/\s*[,\/]\s*|\s+/),s==="color"&&(s=e.shift()),e=e.map(function(c,u){if(c[c.length-1]==="%")return c=parseFloat(c)/100,u===3?c:s==="rgb"?c*255:s[0]==="h"||s[0]==="l"&&!u?c*100:s==="lab"?c*125:s==="lch"?u<2?c*150:c*360:s[0]==="o"&&!u?c:s==="oklab"?c*.4:s==="oklch"?u<2?c*.4:c*360:c;if(s[u]==="h"||u===2&&s[s.length-1]==="h"){if(Qc[c]!==void 0)return Qc[c];if(c.endsWith("deg"))return parseFloat(c);if(c.endsWith("turn"))return parseFloat(c)*360;if(c.endsWith("grad"))return parseFloat(c)*360/400;if(c.endsWith("rad"))return parseFloat(c)*180/Math.PI}return c==="none"?0:parseFloat(c)}),n=e.length>l?e.pop():1}else/[0-9](?:\s|\/|,)/.test(i)&&(e=i.match(/([0-9]+)/g).map(function(c){return parseFloat(c)}),s=i.match(/([a-z])/ig)?.join("")?.toLowerCase()||"rgb");return{space:s,values:e,alpha:n}}const vh={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(i){var t=i[0]/360,e=i[1]/100,n=i[2]/100,s,r,a,o,h,l=0;if(e===0)return h=n*255,[h,h,h];for(r=n<.5?n*(1+e):n+e-n*e,s=2*n-r,o=[0,0,0];l<3;)a=t+1/3*-(l-1),a<0?a++:a>1&&a--,h=6*a<1?s+(r-s)*6*a:2*a<1?r:3*a<2?s+(r-s)*(2/3-a)*6:s,o[l++]=h*255;return o}};Br.hsl=function(i){var t=i[0]/255,e=i[1]/255,n=i[2]/255,s=Math.min(t,e,n),r=Math.max(t,e,n),a=r-s,o,h,l;return r===s?o=0:t===r?o=(e-n)/a:e===r?o=2+(n-t)/a:n===r&&(o=4+(t-e)/a),o=Math.min(o*60,360),o<0&&(o+=360),l=(s+r)/2,r===s?h=0:l<=.5?h=a/(r+s):h=a/(2-r-s),[o,h*100,l*100]};function ay(i){Array.isArray(i)&&i.raw&&(i=String.raw(...arguments)),i instanceof Number&&(i=+i);var t,e=ry(i);if(!e.space)return[];const n=e.space[0]==="h"?vh.min:Br.min,s=e.space[0]==="h"?vh.max:Br.max;return t=Array(3),t[0]=Math.min(Math.max(e.values[0],n[0]),s[0]),t[1]=Math.min(Math.max(e.values[1],n[1]),s[1]),t[2]=Math.min(Math.max(e.values[2],n[2]),s[2]),e.space[0]==="h"&&(t=vh.rgb(t)),t.push(Math.min(Math.max(e.alpha,0),1)),t}function oy(i){return typeof i=="string"?i:Zl(i)}const hy=1024,dr={};let xh=0;function ly(i){if(i.length===4)return i;const t=i.slice();return t[3]=1,t}function tu(i){const t=Ut.lchuv(Br.xyz(i));return t[3]=i[3],t}function cy(i){const t=Ut.rgb(Mf.xyz(i));return t[3]=i[3],t}function $l(i){if(dr.hasOwnProperty(i))return dr[i];if(xh>=hy){let e=0;for(const n in dr)e++&3||(delete dr[n],--xh)}const t=ay(i);if(t.length!==4)throw new Error('Failed to parse "'+i+'" as color');for(const e of t)if(isNaN(e))throw new Error('Failed to parse "'+i+'" as color');return wf(t),dr[i]=t,++xh,t}function Ur(i){return Array.isArray(i)?i:$l(i)}function wf(i){return i[0]=It(i[0]+.5|0,0,255),i[1]=It(i[1]+.5|0,0,255),i[2]=It(i[2]+.5|0,0,255),i[3]=It(i[3],0,1),i}function Zl(i){let t=i[0];t!=(t|0)&&(t=t+.5|0);let e=i[1];e!=(e|0)&&(e=e+.5|0);let n=i[2];n!=(n|0)&&(n=n+.5|0);const s=i[3]===void 0?1:Math.round(i[3]*1e3)/1e3;return"rgba("+t+","+e+","+n+","+s+")"}function uy(i){try{return $l(i),!0}catch{return!1}}const eu=[];let Jn=null;function dy(){Jn=jt(1,1,void 0,{willReadFrequently:!0})}class Hl extends Jm{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=Ge(),this.pixelTransform=Ge(),this.inversePixelTransform=Ge(),this.context=null,this.deferredContext_=null,this.containerReused=!1,this.pixelContext_=null,this.frameState=null}getImageData(t,e,n){Jn||dy(),Jn.clearRect(0,0,1,1);let s;try{Jn.drawImage(t,e,n,1,1,0,0,1,1),s=Jn.getImageData(0,0,1,1).data}catch{return Jn=null,null}return s}getBackground(t){let n=this.getLayer().getBackground();return typeof n=="function"&&(n=n(t.viewState.resolution)),n||void 0}useContainer(t,e,n){const s=this.getLayer().getClassName();let r,a;if(t&&t.className===s&&(!n||t&&t.style.backgroundColor&&ln(Ur(t.style.backgroundColor),Ur(n)))){const o=t.firstElementChild;o instanceof HTMLCanvasElement&&(a=o.getContext("2d"))}if(a&&a.canvas.style.transform===e?(this.container=t,this.context=a,this.containerReused=!0):this.containerReused?(this.container=null,this.context=null,this.containerReused=!1):this.container&&(this.container.style.backgroundColor=null),!this.container){r=document.createElement("div"),r.className=s;let o=r.style;o.position="absolute",o.width="100%",o.height="100%",a=jt();const h=a.canvas;r.appendChild(h),o=h.style,o.position="absolute",o.left="0",o.transformOrigin="top left",this.container=r,this.context=a}!this.containerReused&&n&&!this.container.style.backgroundColor&&(this.container.style.backgroundColor=n)}clipUnrotated(t,e,n){const s=Wn(n),r=$o(n),a=Ko(n),o=Vo(n);Ft(e.coordinateToPixelTransform,s),Ft(e.coordinateToPixelTransform,r),Ft(e.coordinateToPixelTransform,a),Ft(e.coordinateToPixelTransform,o);const h=this.inversePixelTransform;Ft(h,s),Ft(h,r),Ft(h,a),Ft(h,o),t.save(),t.beginPath(),t.moveTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(a[0]),Math.round(a[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.clip()}prepareContainer(t,e){const n=t.extent,s=t.viewState.resolution,r=t.viewState.rotation,a=t.pixelRatio,o=Math.round(nt(n)/s*a),h=Math.round(Pt(n)/s*a);ei(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/a,1/a,r,-o/2,-h/2),$d(this.inversePixelTransform,this.pixelTransform);const l=z_(this.pixelTransform);if(this.useContainer(e,l,this.getBackground(t)),!this.containerReused){const c=this.context.canvas;c.width!=o||c.height!=h?(c.width=o,c.height=h):this.context.clearRect(0,0,o,h),l!==c.style.transform&&(c.style.transform=l)}}dispatchRenderEvent_(t,e,n){const s=this.getLayer();if(s.hasListener(t)){const r=new mf(t,this.inversePixelTransform,n,e);s.dispatchEvent(r)}}preRender(t,e){this.frameState=e,!e.declutter&&this.dispatchRenderEvent_(Te.PRERENDER,t,e)}postRender(t,e){e.declutter||this.dispatchRenderEvent_(Te.POSTRENDER,t,e)}renderDeferredInternal(t){}getRenderContext(t){return t.declutter&&!this.deferredContext_&&(this.deferredContext_=new Ef),t.declutter?this.deferredContext_.getContext():this.context}renderDeferred(t){t.declutter&&(this.dispatchRenderEvent_(Te.PRERENDER,this.context,t),t.declutter&&this.deferredContext_&&(this.deferredContext_.draw(this.context),this.deferredContext_.clear()),this.renderDeferredInternal(t),this.dispatchRenderEvent_(Te.POSTRENDER,this.context,t))}getRenderTransform(t,e,n,s,r,a,o){const h=r/2,l=a/2,c=s/e,u=-c,d=-t[0]+o,f=-t[1];return ei(this.tempTransform,h,l,c,u,-n,d,f)}disposeInternal(){delete this.frameState,super.disposeInternal()}}class fy extends Hl{constructor(t){super(t),this.image_=null}getImage(){return this.image_?this.image_.getImage():null}prepareFrame(t){const e=t.layerStatesArray[t.layerIndex],n=t.pixelRatio,s=t.viewState,r=s.resolution,a=this.getLayer().getSource(),o=t.viewHints;let h=t.extent;if(e.extent!==void 0&&(h=Fn(h,vi(e.extent,s.projection))),!o[Nt.ANIMATING]&&!o[Nt.INTERACTING]&&!Bn(h))if(a){const l=s.projection,c=a.getImage(h,r,n,l);c&&(this.loadImage(c)?this.image_=c:c.getState()===U.EMPTY&&(this.image_=null))}else this.image_=null;return!!this.image_}getData(t){const e=this.frameState;if(!e)return null;const n=this.getLayer(),s=Ft(e.pixelToCoordinateTransform,t.slice()),r=n.getExtent();if(r&&!kn(r,s))return null;const a=this.image_.getExtent(),o=this.image_.getImage(),h=nt(a),l=Math.floor(o.width*((s[0]-a[0])/h));if(l<0||l>=o.width)return null;const c=Pt(a),u=Math.floor(o.height*((a[3]-s[1])/c));return u<0||u>=o.height?null:this.getImageData(o,l,u)}renderFrame(t,e){const n=this.image_,s=n.getExtent(),r=n.getResolution(),[a,o]=Array.isArray(r)?r:[r,r],h=n.getPixelRatio(),l=t.layerStatesArray[t.layerIndex],c=t.pixelRatio,u=t.viewState,d=u.center,f=u.resolution,g=c*a/(f*h),_=c*o/(f*h);this.prepareContainer(t,e);const m=this.context.canvas.width,y=this.context.canvas.height,p=this.getRenderContext(t);let x=!1,M=!0;if(l.extent){const I=vi(l.extent,u.projection);M=ne(I,t.extent),x=M&&!Ve(I,t.extent),x&&this.clipUnrotated(p,t,I)}const E=n.getImage(),w=ei(this.tempTransform,m/2,y/2,g,_,0,h*(s[0]-d[0])/a,h*(d[1]-s[3])/o);this.renderedResolution=o*c/h;const C=E.width*w[0],S=E.height*w[3];if(this.getLayer().getSource().getInterpolate()||(p.imageSmoothingEnabled=!1),this.preRender(p,t),M&&C>=.5&&S>=.5){const I=w[4],z=w[5],F=l.opacity;F!==1&&(p.save(),p.globalAlpha=F),p.drawImage(E,0,0,+E.width,+E.height,I,z,C,S),F!==1&&p.restore()}return this.postRender(this.context,t),x&&p.restore(),p.imageSmoothingEnabled=!0,this.container}}class gy extends Hm{constructor(t){super(t)}createRenderer(){return new fy(this)}getData(t){return super.getData(t)}}class Sf extends ba{constructor(t,e,n,s){super(),this.extent=t,this.pixelRatio_=n,this.resolution=e,this.state=typeof s=="function"?U.IDLE:s,this.image_=null,this.loader=typeof s=="function"?s:null}changed(){this.dispatchEvent(Z.CHANGE)}getExtent(){return this.extent}getImage(){return this.image_}getPixelRatio(){return this.pixelRatio_}getResolution(){return this.resolution}getState(){return this.state}load(){if(this.state==U.IDLE&&this.loader){this.state=U.LOADING,this.changed();const t=this.getResolution(),e=Array.isArray(t)?t[0]:t;Rd(()=>this.loader(this.getExtent(),e,this.getPixelRatio())).then(n=>{"image"in n&&(this.image_=n.image),"extent"in n&&(this.extent=n.extent),"resolution"in n&&(this.resolution=n.resolution),"pixelRatio"in n&&(this.pixelRatio_=n.pixelRatio),(n instanceof HTMLImageElement||n instanceof ImageBitmap||n instanceof HTMLCanvasElement||n instanceof HTMLVideoElement)&&(this.image_=n),this.state=U.LOADED}).catch(n=>{this.state=U.ERROR,console.error(n)}).finally(()=>this.changed())}}setImage(t){this.image_=t}setResolution(t){this.resolution=t}}function _y(i,t,e){const n=i;let s=!0,r=!1,a=!1;const o=[_o(n,Z.LOAD,function(){a=!0,r||t()})];return n.src&&Vl?(r=!0,n.decode().then(function(){s&&t()}).catch(function(h){s&&(a?t():e())})):o.push(_o(n,Z.ERROR,e)),function(){s=!1,o.forEach(Mt)}}function my(i,t){return new Promise((e,n)=>{function s(){a(),e(i)}function r(){a(),n(new Error("Image load error"))}function a(){i.removeEventListener("load",s),i.removeEventListener("error",r)}i.addEventListener("load",s),i.addEventListener("error",r)})}function Cf(i,t){return t&&(i.src=t),i.src&&Vl?new Promise((e,n)=>i.decode().then(()=>e(i)).catch(s=>i.complete&&i.width?e(i):n(s))):my(i)}function Rf(i,t){return t&&(i.src=t),i.src&&Vl&&iy?i.decode().then(()=>createImageBitmap(i)).catch(e=>{if(i.complete&&i.width)return i;throw e}):Cf(i)}const bf=.5,yy=10,iu=.25;class If{constructor(t,e,n,s,r,a){this.sourceProj_=t,this.targetProj_=e;let o={};const h=Gr(this.targetProj_,this.sourceProj_);this.transformInv_=function(p){const x=p[0]+"/"+p[1];return o[x]||(o[x]=h(p)),o[x]},this.maxSourceExtent_=s,this.errorThresholdSquared_=r*r,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!s&&!!this.sourceProj_.getExtent()&&nt(s)>=nt(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?nt(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?nt(this.targetProj_.getExtent()):null;const l=Wn(n),c=$o(n),u=Ko(n),d=Vo(n),f=this.transformInv_(l),g=this.transformInv_(c),_=this.transformInv_(u),m=this.transformInv_(d),y=yy+(a?Math.max(0,Math.ceil(Math.log2(yo(n)/(a*a*256*256)))):0);if(this.addQuad_(l,c,u,d,f,g,_,m,y),this.wrapsXInSource_){let p=1/0;this.triangles_.forEach(function(x,M,E){p=Math.min(p,x.source[0][0],x.source[1][0],x.source[2][0])}),this.triangles_.forEach(x=>{if(Math.max(x.source[0][0],x.source[1][0],x.source[2][0])-p>this.sourceWorldWidth_/2){const M=[[x.source[0][0],x.source[0][1]],[x.source[1][0],x.source[1][1]],[x.source[2][0],x.source[2][1]]];M[0][0]-p>this.sourceWorldWidth_/2&&(M[0][0]-=this.sourceWorldWidth_),M[1][0]-p>this.sourceWorldWidth_/2&&(M[1][0]-=this.sourceWorldWidth_),M[2][0]-p>this.sourceWorldWidth_/2&&(M[2][0]-=this.sourceWorldWidth_);const E=Math.min(M[0][0],M[1][0],M[2][0]);Math.max(M[0][0],M[1][0],M[2][0])-E.5&&u<1;let g=!1;if(l>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const m=mo([t,e,n,s]);g=nt(m)/this.targetWorldWidth_>iu||g}!f&&this.sourceProj_.isGlobal()&&u&&(g=u>iu||g)}if(!g&&this.maxSourceExtent_&&isFinite(c[0])&&isFinite(c[1])&&isFinite(c[2])&&isFinite(c[3])&&!ne(c,this.maxSourceExtent_))return;let _=0;if(!g&&(!isFinite(r[0])||!isFinite(r[1])||!isFinite(a[0])||!isFinite(a[1])||!isFinite(o[0])||!isFinite(o[1])||!isFinite(h[0])||!isFinite(h[1]))){if(l>0)g=!0;else if(_=(!isFinite(r[0])||!isFinite(r[1])?8:0)+(!isFinite(a[0])||!isFinite(a[1])?4:0)+(!isFinite(o[0])||!isFinite(o[1])?2:0)+(!isFinite(h[0])||!isFinite(h[1])?1:0),_!=1&&_!=2&&_!=4&&_!=8)return}if(l>0){if(!g){const m=[(t[0]+n[0])/2,(t[1]+n[1])/2],y=this.transformInv_(m);let p;f?p=(ds(r[0],d)+ds(o[0],d))/2-ds(y[0],d):p=(r[0]+o[0])/2-y[0];const x=(r[1]+o[1])/2-y[1];g=p*p+x*x>this.errorThresholdSquared_}if(g){if(Math.abs(t[0]-n[0])<=Math.abs(t[1]-n[1])){const m=[(e[0]+n[0])/2,(e[1]+n[1])/2],y=this.transformInv_(m),p=[(s[0]+t[0])/2,(s[1]+t[1])/2],x=this.transformInv_(p);this.addQuad_(t,e,m,p,r,a,y,x,l-1),this.addQuad_(p,m,n,s,x,y,o,h,l-1)}else{const m=[(t[0]+e[0])/2,(t[1]+e[1])/2],y=this.transformInv_(m),p=[(n[0]+s[0])/2,(n[1]+s[1])/2],x=this.transformInv_(p);this.addQuad_(t,m,p,s,r,y,x,h,l-1),this.addQuad_(m,e,n,p,y,a,o,x,l-1)}return}}if(f){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}_&11||this.addTriangle_(t,n,s,r,o,h),_&14||this.addTriangle_(t,n,e,r,o,a),_&&(_&13||this.addTriangle_(e,s,t,a,h,r),_&7||this.addTriangle_(e,s,n,a,h,o))}calculateSourceExtent(){const t=ve();return this.triangles_.forEach(function(e,n,s){const r=e.source;Rr(t,r[0]),Rr(t,r[1]),Rr(t,r[2])}),t}getTriangles(){return this.triangles_}}let Eh;const _s=[];function nu(i,t,e,n,s){i.beginPath(),i.moveTo(0,0),i.lineTo(t,e),i.lineTo(n,s),i.closePath(),i.save(),i.clip(),i.fillRect(0,0,Math.max(t,n)+1,Math.max(e,s)),i.restore()}function Mh(i,t){return Math.abs(i[t*4]-210)>2||Math.abs(i[t*4+3]-.75*255)>2}function py(){if(Eh===void 0){const i=jt(6,6,_s);i.globalCompositeOperation="lighter",i.fillStyle="rgba(210, 0, 0, 0.75)",nu(i,4,5,4,0),nu(i,4,5,0,5);const t=i.getImageData(0,0,3,3).data;Eh=Mh(t,0)||Mh(t,4)||Mh(t,8),Jo(i),_s.push(i.canvas)}return Eh}function Mo(i,t,e,n){const s=Ll(e,t,i);let r=Gc(t,n,e);const a=t.getMetersPerUnit();a!==void 0&&(r*=a);const o=i.getMetersPerUnit();o!==void 0&&(r/=o);const h=i.getExtent();if(!h||kn(h,s)){const l=Gc(i,r,s)/r;isFinite(l)&&l>0&&(r/=l)}return r}function vy(i,t,e,n){const s=Ae(e);let r=Mo(i,t,s,n);return(!isFinite(r)||r<=0)&&Nd(e,function(a){return r=Mo(i,t,a,n),isFinite(r)&&r>0}),r}function Tf(i,t,e,n,s,r,a,o,h,l,c,u,d,f){const g=jt(Math.round(e*i),Math.round(e*t),_s);if(u||(g.imageSmoothingEnabled=!1),h.length===0)return g.canvas;g.scale(e,e);function _(E){return Math.round(E*e)/e}g.globalCompositeOperation="lighter";const m=ve();h.forEach(function(E,w,C){Od(m,E.extent)});let y;const p=e/n,x=(u?1:1+Math.pow(2,-24))/p;if(!d||h.length!==1||l!==0){if(y=jt(Math.round(nt(m)*p),Math.round(Pt(m)*p),_s),u||(y.imageSmoothingEnabled=!1),s&&f){const E=(s[0]-m[0])*p,w=-(s[3]-m[3])*p,C=nt(s)*p,S=Pt(s)*p;y.rect(E,w,C,S),y.clip()}h.forEach(function(E,w,C){if(E.image.width>0&&E.image.height>0){if(E.clipExtent){y.save();const A=(E.clipExtent[0]-m[0])*p,G=-(E.clipExtent[3]-m[3])*p,X=nt(E.clipExtent)*p,V=Pt(E.clipExtent)*p;y.rect(u?A:Math.round(A),u?G:Math.round(G),u?X:Math.round(A+X)-Math.round(A),u?V:Math.round(G+V)-Math.round(G)),y.clip()}const S=(E.extent[0]-m[0])*p,I=-(E.extent[3]-m[3])*p,z=nt(E.extent)*p,F=Pt(E.extent)*p;y.drawImage(E.image,l,l,E.image.width-2*l,E.image.height-2*l,u?S:Math.round(S),u?I:Math.round(I),u?z:Math.round(S+z)-Math.round(S),u?F:Math.round(I+F)-Math.round(I)),E.clipExtent&&y.restore()}})}const M=Wn(a);return o.getTriangles().forEach(function(E,w,C){const S=E.source,I=E.target;let z=S[0][0],F=S[0][1],A=S[1][0],G=S[1][1],X=S[2][0],V=S[2][1];const L=_((I[0][0]-M[0])/r),it=_(-(I[0][1]-M[1])/r),Q=_((I[1][0]-M[0])/r),wt=_(-(I[1][1]-M[1])/r),et=_((I[2][0]-M[0])/r),at=_(-(I[2][1]-M[1])/r),st=z,xt=F;z=0,F=0,A-=st,G-=xt,X-=st,V-=xt;const P=[[A,G,0,0,Q-L],[X,V,0,0,et-L],[0,0,A,G,wt-it],[0,0,X,V,at-it]],Jt=e_(P);if(!Jt)return;if(g.save(),g.beginPath(),py()||!u){g.moveTo(Q,wt);const Lt=4,Le=L-Q,un=it-wt;for(let Qt=0;Qtthis.getImageInternal(a,o,h,r),this.getInterpolate()),this.reprojectedRevision_=this.getRevision(),this.reprojectedImage_}getImageInternal(t,e,n,s){if(this.loader){const r=Af(t,e,n,1),a=this.findNearestResolution(e);if(this.image&&(this.static_||this.wantedProjection_===s&&(this.wantedExtent_&&Ve(this.wantedExtent_,r)||Ve(this.image.getExtent(),r))&&(this.wantedResolution_&&Jh(this.wantedResolution_)===a||Jh(this.image.getResolution())===a)))return this.image;this.wantedProjection_=s,this.wantedExtent_=r,this.wantedResolution_=a,this.image=new Sf(r,a,n,this.loader),this.image.addEventListener(Z.CHANGE,this.handleImageChange.bind(this))}return this.image}handleImageChange(t){const e=t.target;let n;switch(e.getState()){case U.LOADING:this.loading=!0,n=wh.IMAGELOADSTART;break;case U.LOADED:this.loading=!1,n=wh.IMAGELOADEND;break;case U.ERROR:this.loading=!1,n=wh.IMAGELOADERROR;break;default:return}this.hasListener(n)&&this.dispatchEvent(new Ey(n,e))}}function wy(i,t){i.getImage().src=t}function Af(i,t,e,n){const s=t/e,r=Ae(i),a=Ji(nt(i)/s,Qi),o=Ji(Pt(i)/s,Qi),h=Ji((n-1)*a/2,Qi),l=a+2*h,c=Ji((n-1)*o/2,Qi),u=o+2*c;return kr(r,s,0,[l,u])}function wo(i,t){const e=[];Object.keys(t).forEach(function(s){t[s]!==null&&t[s]!==void 0&&e.push(s+"="+encodeURIComponent(t[s]))});const n=e.join("&");return i=i.replace(/[?&]$/,""),i+=i.includes("?")?"&":"?",i+n}const Lf="1.3.0",ru=[101,101];function Pf(i,t,e,n,s){s.WIDTH=e[0],s.HEIGHT=e[1];const r=n.getAxisOrientation();let a;const o=Gd(s.VERSION,"1.3")>=0;return s[o?"CRS":"SRS"]=n.getCode(),o&&r.substr(0,2)=="ne"?a=[t[1],t[0],t[3],t[2]]:a=t,s.BBOX=a.join(","),wo(i,s)}function Sy(i,t,e,n,s,r,a){r=Object.assign({REQUEST:"GetMap"},r);const o=t/e,h=[Dc(nt(i)/o,Qi),Dc(Pt(i)/o,Qi)];if(e!=1)switch(a){case"geoserver":const c=90*e+.5|0;"FORMAT_OPTIONS"in r?r.FORMAT_OPTIONS+=";dpi:"+c:r.FORMAT_OPTIONS="dpi:"+c;break;case"mapserver":r.MAP_RESOLUTION=90*e;break;case"carmentaserver":case"qgis":r.DPI=90*e;break;default:throw new Error("Unknown `serverType` configured")}return Pf(s,i,h,n,r)}function Of(i,t){return Object.assign({REQUEST:t,SERVICE:"WMS",VERSION:Lf,FORMAT:"image/png",STYLES:"",TRANSPARENT:!0},i)}function Cy(i){const t=i.hidpi===void 0?!0:i.hidpi,e=pt(i.projection||"EPSG:3857"),n=i.ratio||1.5,s=i.load||Rf;return(r,a,o)=>{r=Af(r,a,o,n),o!=1&&(!t||i.serverType===void 0)&&(o=1);const h=Sy(r,a,o,e,i.url,Of(i.params,"GetMap"),i.serverType),l=new Image;return i.crossOrigin!==null&&(l.crossOrigin=i.crossOrigin),s(l,h).then(c=>({image:c,extent:r,pixelRatio:o}))}}function Ry(i,t,e){if(i.url===void 0)return;const n=pt(i.projection||"EPSG:3857"),s=kr(t,e,0,ru),r={QUERY_LAYERS:i.params.LAYERS,INFO_FORMAT:"application/json"};Object.assign(r,Of(i.params,"GetFeatureInfo"),i.params);const a=ns((t[0]-s[0])/e,Qi),o=ns((s[3]-t[1])/e,Qi),h=Gd(r.VERSION,"1.3")>=0;return r[h?"I":"X"]=a,r[h?"J":"Y"]=o,Pf(i.url,s,ru,n,r)}function by(i,t){if(i.url===void 0)return;const e={SERVICE:"WMS",VERSION:Lf,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(i.params===void 0||i.params.LAYER===void 0){const n=i.params.LAYERS;if(!(!Array.isArray(n)||n.length===1))return;e.LAYER=n}if(t!==void 0){const n=pt(i.projection||"EPSG:3857").getMetersPerUnit()||1,s=28e-5;e.SCALE=t*n/s}return Object.assign(e,i.params),wo(i.url,e)}class Iy extends My{constructor(t){t=t||{},super({attributions:t.attributions,interpolate:t.interpolate,projection:t.projection,resolutions:t.resolutions}),this.crossOrigin_=t.crossOrigin!==void 0?t.crossOrigin:null,this.url_=t.url,this.imageLoadFunction_=t.imageLoadFunction!==void 0?t.imageLoadFunction:wy,this.params_=Object.assign({},t.params),this.serverType_=t.serverType,this.hidpi_=t.hidpi!==void 0?t.hidpi:!0,this.renderedRevision_=0,this.ratio_=t.ratio!==void 0?t.ratio:1.5,this.loaderProjection_=null}getFeatureInfoUrl(t,e,n,s){const r=pt(n),a=this.getProjection();a&&a!==r&&(e=Mo(a,r,t,e),t=Ll(t,r,a));const o={url:this.url_,params:{...this.params_,...s},projection:a||r};return Ry(o,t,e)}getLegendUrl(t,e){return by({url:this.url_,params:{...this.params_,...e}},t)}getParams(){return this.params_}getImageInternal(t,e,n,s){return this.url_===void 0?null:((!this.loader||this.loaderProjection_!==s)&&(this.loaderProjection_=s,this.loader=Cy({crossOrigin:this.crossOrigin_,params:this.params_,projection:s,serverType:this.serverType_,hidpi:this.hidpi_,url:this.url_,ratio:this.ratio_,load:(r,a)=>(this.image.setImage(r),this.imageLoadFunction_(this.image,a),Rf(r))})),super.getImageInternal(t,e,n,s))}getImageLoadFunction(){return this.imageLoadFunction_}getUrl(){return this.url_}setImageLoadFunction(t){this.imageLoadFunction_=t,this.changed()}setUrl(t){t!=this.url_&&(this.url_=t,this.loader=null,this.changed())}updateParams(t){Object.assign(this.params_,t),this.changed()}changed(){this.image=null,super.changed()}}async function Df(i,t,e){const n=await t.fetch(i,{signal:e});if(!n.ok)throw new Error("Request failed: "+n.status);return await n.text()}var qi;class Nf{constructor(t){O(this,qi);W(this,qi,t)}destroy(){for(const t of v(this,qi))t.destroy();W(this,qi,[])}getSublayers(t){return v(this,qi).slice()}__getRawSublayers(){return v(this,qi)}}qi=new WeakMap;const ho=bi("map:WMSLayer");var Is,Tn,Ts,As,sa,ra,aa,Ls,ni,Ff,kf,Gf,zf;class CC extends Xs{constructor(e){const n=new gy;super({...e,olLayer:n});O(this,ni);O(this,Is);O(this,Tn);O(this,Ts);O(this,As);O(this,sa);O(this,ra,new AbortController);O(this,aa);O(this,Ls);const s=new Iy({...e.sourceOptions,url:e.url,params:{...e.sourceOptions?.params},imageLoadFunction:(r,a)=>B(this,ni,zf).call(this,r,a).catch(o=>{ho.error(`Failed to load tile at '${a}'`,o)})});W(this,Is,e.url),W(this,As,s),W(this,Ts,n),W(this,Tn,new Nf(Wf(e.sublayers))),W(this,aa,El(()=>B(this,ni,kf).call(this),{equal(r,a){return r.length===a.length&&r.every((o,h)=>o===a[h])}})),W(this,Ls,B0(()=>[v(this,aa).value],([r])=>{B(this,ni,Ff).call(this,r)},{immediate:!0}))}destroy(){v(this,ra).abort(),W(this,Ls,id(v(this,Ls))),super.destroy()}get type(){return"wms"}get legend(){}get url(){return v(this,Is)}get layers(){}get sublayers(){return v(this,Tn)}get capabilities(){return v(this,sa)}__attach(e){super.__attach(e);for(const s of v(this,Tn).getSublayers())s.__attach(e,this,this);const n=(s,r)=>{for(const a of s){const o=a.sublayers.getSublayers();o.length?n(o,r):a.name&&r.push(a)}};B(this,ni,Gf).call(this).then(s=>{Ml(()=>{const a=new vm().read(s);W(this,sa,a);const o=[];n(v(this,Tn).getSublayers(),o);for(const h of o){const l=Ay(a,h.name);h.__setLegend(l)}})}).catch(s=>{if(Dr(s)){ho.debug(`Layer ${this.id} has been destroyed before fetching capabilities`);return}ho.error(`Failed to fetch WMS capabilities for layer ${this.id}`,s)})}}Is=new WeakMap,Tn=new WeakMap,Ts=new WeakMap,As=new WeakMap,sa=new WeakMap,ra=new WeakMap,aa=new WeakMap,Ls=new WeakMap,ni=new WeakSet,Ff=function(e){v(this,As).updateParams({LAYERS:e});const n=e.length===0?null:v(this,As);v(this,Ts).getSource()!==n&&v(this,Ts).setSource(n)},kf=function(){const e=[],n=s=>{if(!s.visible)return;const r=s.sublayers.__getRawSublayers();if(r.length)for(const a of r)n(a);else s.name&&e.push(s.name)};for(const s of this.sublayers.__getRawSublayers())n(s);return e},Gf=async function(){const e=this.map.__sharedDependencies.httpService,n=`${v(this,Is)}?LANGUAGE=ger&SERVICE=WMS&REQUEST=GetCapabilities`;return Df(n,e,v(this,ra).signal)},zf=async function(e,n){const s=this.map.__sharedDependencies.httpService,r=e.getImage(),a=await s.fetch(n);if(!a.ok)throw new Error(`Request failed with status ${a.status}.`);const o=await a.blob(),h=URL.createObjectURL(o),l=()=>{URL.revokeObjectURL(h),r.removeEventListener("load",l),r.removeEventListener("error",l)};r.addEventListener("load",l),r.addEventListener("error",l),r.src=h};var An,Ln,oa,ha,la,Ps;class Ty extends cf{constructor(e){super(e);O(this,An);O(this,Ln);O(this,oa);O(this,ha,Zt());O(this,la);O(this,Ps);W(this,oa,e.name),W(this,Ps,Zt(e.visible??!0)),W(this,la,new Nf(Wf(e.sublayers)))}get type(){return"wms-sublayer"}get name(){return v(this,oa)}get layers(){}get sublayers(){return v(this,la)}get parent(){const e=v(this,An);if(!e)throw new Error(`WMS sublayer ${this.id} has not been attached to its parent yet.`);return e}get parentLayer(){const e=v(this,Ln);if(!e)throw new Error(`WMS sublayer ${this.id} has not been attached to its parent yet.`);return e}get legend(){return v(this,ha).value}get visible(){return v(this,Ps).value}__attach(e,n,s){if(super.__attachToMap(e),v(this,An))throw new Error(`WMS sublayer '${this.id}' has already been attached to parent '${v(this,An).id}'`);if(W(this,An,s),v(this,Ln))throw new Error(`WMS sublayer '${this.id}' has already been attached to parent layer '${v(this,Ln).id}'`);W(this,Ln,n);for(const r of this.sublayers.__getRawSublayers())r.__attach(e,n,this)}__setLegend(e){v(this,ha).value=e}setVisible(e){v(this,Ps).value=e}}An=new WeakMap,Ln=new WeakMap,oa=new WeakMap,ha=new WeakMap,la=new WeakMap,Ps=new WeakMap;function Wf(i=[]){const t=[];try{for(const e of i)t.push(new Ty(e));return t}catch(e){for(;t.length;)t.pop()?.destroy();throw new Error("Failed to construct sublayers.",{cause:e})}}function Ay(i,t){const n=i?.Capability?.Layer;let s;const r=a=>{for(const o of a)if(o?.Name===t){const l=o.Style;if(!l||!l.length){ho.debug("No style in WMS layer capabilities - giving up.");return}s=l[0].LegendURL?.[0]?.OnlineResource}else o.Layer&&r(o.Layer)};return n&&r(n.Layer),s}const q={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4},ge=[null,"http://www.opengis.net/ows/1.1"],Ly=K(ge,{ServiceIdentification:b(ip),ServiceProvider:b(sp),OperationsMetadata:b(tp)});class Py extends Yl{constructor(){super()}readFromNode(t){const e=J({},Ly,t,[]);return e||null}}const Oy=K(ge,{DeliveryPoint:b(k),City:b(k),AdministrativeArea:b(k),PostalCode:b(k),Country:b(k),ElectronicMailAddress:b(k)}),Dy=K(ge,{Value:vt(rp)}),Ny=K(ge,{AllowedValues:b(Vy)}),Fy=K(ge,{Phone:b(ep),Address:b(Yy)}),ky=K(ge,{HTTP:b(Jy)}),Gy=K(ge,{Get:vt(Hy),Post:void 0}),zy=K(ge,{DCP:b(Zy)}),Wy=K(ge,{Operation:Qy}),By=K(ge,{Voice:b(k),Facsimile:b(k)}),Uy=K(ge,{Constraint:vt(Ky)}),jy=K(ge,{IndividualName:b(k),PositionName:b(k),ContactInfo:b($y)}),Xy=K(ge,{Abstract:b(k),AccessConstraints:b(k),Fees:b(k),Title:b(k),ServiceTypeVersion:b(k),ServiceType:b(k)}),qy=K(ge,{ProviderName:b(k),ProviderSite:b(Qs),ServiceContact:b(np)});function Yy(i,t){return J({},Oy,i,t)}function Vy(i,t){return J({},Dy,i,t)}function Ky(i,t){const e=i.getAttribute("name");if(e)return J({name:e},Ny,i,t)}function $y(i,t){return J({},Fy,i,t)}function Zy(i,t){return J({},ky,i,t)}function Hy(i,t){const e=Qs(i);if(e)return J({href:e},Uy,i,t)}function Jy(i,t){return J({},Gy,i,t)}function Qy(i,t){const e=i.getAttribute("name"),n=J({},zy,i,t);if(!n)return;const s=t[t.length-1];s[e]=n}function tp(i,t){return J({},Wy,i,t)}function ep(i,t){return J({},By,i,t)}function ip(i,t){return J({},Xy,i,t)}function np(i,t){return J({},jy,i,t)}function sp(i,t){return J({},qy,i,t)}function rp(i,t){return k(i)}const ai=[null,"http://www.opengis.net/wmts/1.0"],tr=[null,"http://www.opengis.net/ows/1.1"],ap=K(ai,{Contents:b(yp)});class op extends Yl{constructor(){super(),this.owsParser_=new Py}readFromNode(t){let e=t.getAttribute("version");e&&(e=e.trim());let n=this.owsParser_.readFromNode(t);return n?(n.version=e,n=J(n,ap,t,[]),n||null):null}}const hp=K(ai,{Layer:vt(pp),TileMatrixSet:vt(vp)}),lp=K(ai,{Style:vt(xp),Format:vt(k),TileMatrixSetLink:vt(Ep),Dimension:vt(Mp),ResourceURL:vt(wp)},K(tr,{Title:b(k),Abstract:b(k),WGS84BoundingBox:b(Uf),BoundingBox:vt(Sp),Identifier:b(k)})),cp=K(ai,{LegendURL:vt(Cp)},K(tr,{Title:b(k),Identifier:b(k)})),up=K(ai,{TileMatrixSet:b(k),TileMatrixSetLimits:b(bp)}),dp=K(ai,{TileMatrixLimits:Wr(Ip)}),fp=K(ai,{TileMatrix:b(k),MinTileRow:b(ke),MaxTileRow:b(ke),MinTileCol:b(ke),MaxTileCol:b(ke)}),gp=K(ai,{Default:b(k),Value:vt(k)},K(tr,{Identifier:b(k)})),Bf=K(tr,{LowerCorner:Wr(Qh),UpperCorner:Wr(Qh)}),_p=K(ai,{WellKnownScaleSet:b(k),TileMatrix:vt(Rp)},K(tr,{SupportedCRS:b(k),Identifier:b(k),BoundingBox:b(Uf)})),mp=K(ai,{TopLeftCorner:b(Qh),ScaleDenominator:b(wn),TileWidth:b(ke),TileHeight:b(ke),MatrixWidth:b(ke),MatrixHeight:b(ke)},K(tr,{Identifier:b(k)}));function yp(i,t){return J({},hp,i,t)}function pp(i,t){return J({},lp,i,t)}function vp(i,t){return J({},_p,i,t)}function xp(i,t){const e=J({},cp,i,t);if(!e)return;const n=i.getAttribute("isDefault")==="true";return e.isDefault=n,e}function Ep(i,t){return J({},up,i,t)}function Mp(i,t){return J({},gp,i,t)}function wp(i,t){const e=i.getAttribute("format"),n=i.getAttribute("template"),s=i.getAttribute("resourceType"),r={};return e&&(r.format=e),n&&(r.template=n),s&&(r.resourceType=s),r}function Uf(i,t){const e=J([],Bf,i,t);if(e.length==2)return mo(e)}function Sp(i,t){const e=i.getAttribute("crs"),n=J([],Bf,i,t);if(n.length==2)return{extent:mo(n),crs:e}}function Cp(i,t){const e={};return e.format=i.getAttribute("format"),e.href=Qs(i),e}function Qh(i,t){const e=k(i).split(/\s+/);if(!e||e.length!=2)return;const n=+e[0],s=+e[1];if(!(isNaN(n)||isNaN(s)))return[n,s]}function Rp(i,t){return J({},mp,i,t)}function bp(i,t){return J([],dp,i,t)}function Ip(i,t){return J({},fp,i,t)}const $a={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};class Tp extends Un{constructor(t){t=t||{};const e=Object.assign({},t);delete e.preload,delete e.useInterimTilesOnError,super(e),this.on,this.once,this.un,this.setPreload(t.preload!==void 0?t.preload:0),this.setUseInterimTilesOnError(t.useInterimTilesOnError!==void 0?t.useInterimTilesOnError:!0)}getPreload(){return this.get($a.PRELOAD)}setPreload(t){this.set($a.PRELOAD,t)}getUseInterimTilesOnError(){return this.get($a.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(t){this.set($a.USE_INTERIM_TILES_ON_ERROR,t)}getData(t){return super.getData(t)}}class jf extends ba{constructor(t,e,n){super(),n=n||{},this.tileCoord=t,this.state=e,this.interimTile=null,this.key="",this.transition_=n.transition===void 0?250:n.transition,this.transitionStarts_={},this.interpolate=!!n.interpolate}changed(){this.dispatchEvent(Z.CHANGE)}release(){this.state===q.ERROR&&this.setState(q.EMPTY)}getKey(){return this.key+"/"+this.tileCoord}getInterimTile(){let t=this.interimTile;if(!t)return this;do{if(t.getState()==q.LOADED)return this.transition_=0,t;t=t.interimTile}while(t);return this}refreshInterimChain(){let t=this.interimTile;if(!t)return;let e=this;do{if(t.getState()==q.LOADED){t.interimTile=null;break}t.getState()==q.LOADING?e=t:t.getState()==q.IDLE?e.interimTile=t.interimTile:e=t,t=e.interimTile}while(t)}getTileCoord(){return this.tileCoord}getState(){return this.state}setState(t){if(this.state!==q.ERROR&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()}load(){ht()}getAlpha(t,e){if(!this.transition_)return 1;let n=this.transitionStarts_[t];if(!n)n=e,this.transitionStarts_[t]=n;else if(n===-1)return 1;const s=e-n+1e3/60;return s>=this.transition_?1:Yd(s/this.transition_)}inTransition(t){return this.transition_?this.transitionStarts_[t]!==-1:!1}endTransition(t){this.transition_&&(this.transitionStarts_[t]=-1)}}class Ql extends jf{constructor(t,e,n,s,r,a){super(t,e,a),this.crossOrigin_=s,this.src_=n,this.key=n,this.image_=new Image,s!==null&&(this.image_.crossOrigin=s),this.unlisten_=null,this.tileLoadFunction_=r}getImage(){return this.image_}setImage(t){this.image_=t,this.state=q.LOADED,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=q.ERROR,this.unlistenImage_(),this.image_=Ap(),this.changed()}handleImageLoad_(){const t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=q.LOADED:this.state=q.EMPTY,this.unlistenImage_(),this.changed()}load(){this.state==q.ERROR&&(this.state=q.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==q.IDLE&&(this.state=q.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=_y(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function Ap(){const i=jt(1,1);return i.fillStyle="rgba(0,0,0,0)",i.fillRect(0,0,1,1),i.canvas}class tl extends jf{constructor(t,e,n,s,r,a,o,h,l,c,u,d){super(r,q.IDLE,d),this.renderEdges_=u!==void 0?u:!1,this.pixelRatio_=o,this.gutter_=h,this.canvas_=null,this.sourceTileGrid_=e,this.targetTileGrid_=s,this.wrappedTileCoord_=a||r,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0,this.clipExtent_=t.canWrapX()?t.getExtent():void 0;const f=s.getTileCoordExtent(this.wrappedTileCoord_),g=this.targetTileGrid_.getExtent();let _=this.sourceTileGrid_.getExtent();const m=g?Fn(f,g):f;if(yo(m)===0){this.state=q.EMPTY;return}const y=t.getExtent();y&&(_?_=Fn(_,y):_=y);const p=s.getResolution(this.wrappedTileCoord_[0]),x=vy(t,n,m,p);if(!isFinite(x)||x<=0){this.state=q.EMPTY;return}const M=c!==void 0?c:bf;if(this.triangulation_=new If(t,n,m,_,x*M,p),this.triangulation_.getTriangles().length===0){this.state=q.EMPTY;return}this.sourceZ_=e.getZForResolution(x);let E=this.triangulation_.calculateSourceExtent();if(_&&(t.canWrapX()?(E[1]=It(E[1],_[1],_[3]),E[3]=It(E[3],_[1],_[3])):E=Fn(E,_)),!yo(E))this.state=q.EMPTY;else{let w=0,C=0;t.canWrapX()&&(w=nt(y),C=Math.floor((E[0]-y[0])/w)),kd(E.slice(),t,!0).forEach(I=>{const z=e.getTileRangeForExtentAndZ(I,this.sourceZ_);for(let F=z.minX;F<=z.maxX;F++)for(let A=z.minY;A<=z.maxY;A++){const G=l(this.sourceZ_,F,A,o);if(G){const X=C*w;this.sourceTiles_.push({tile:G,offset:X})}}++C}),this.sourceTiles_.length===0&&(this.state=q.EMPTY)}}getImage(){return this.canvas_}reproject_(){const t=[];if(this.sourceTiles_.forEach(e=>{const n=e.tile;if(n&&n.getState()==q.LOADED){const s=this.sourceTileGrid_.getTileCoordExtent(n.tileCoord);s[0]+=e.offset,s[2]+=e.offset;const r=this.clipExtent_?.slice();r&&(r[0]+=e.offset,r[2]+=e.offset),t.push({extent:s,clipExtent:r,image:n.getImage()})}}),this.sourceTiles_.length=0,t.length===0)this.state=q.ERROR;else{const e=this.wrappedTileCoord_[0],n=this.targetTileGrid_.getTileSize(e),s=typeof n=="number"?n:n[0],r=typeof n=="number"?n:n[1],a=this.targetTileGrid_.getResolution(e),o=this.sourceTileGrid_.getResolution(this.sourceZ_),h=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=Tf(s,r,this.pixelRatio_,o,this.sourceTileGrid_.getExtent(),a,h,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=q.LOADED}this.changed()}load(){if(this.state==q.IDLE){this.state=q.LOADING,this.changed();let t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(({tile:e})=>{const n=e.getState();if(n==q.IDLE||n==q.LOADING){t++;const s=lt(e,Z.CHANGE,function(r){const a=e.getState();(a==q.LOADED||a==q.ERROR||a==q.EMPTY)&&(Mt(s),t--,t===0&&(this.unlistenSources_(),this.reproject_()))},this);this.sourcesListenerKeys_.push(s)}}),t===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function({tile:e},n,s){e.getState()==q.IDLE&&e.load()})}}unlistenSources_(){this.sourcesListenerKeys_.forEach(Mt),this.sourcesListenerKeys_=null}release(){this.canvas_&&(Jo(this.canvas_.getContext("2d")),_s.push(this.canvas_),this.canvas_=null),super.release()}}class tc{constructor(t,e,n,s){this.minX=t,this.maxX=e,this.minY=n,this.maxY=s}contains(t){return this.containsXY(t[1],t[2])}containsTileRange(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY}containsXY(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY}equals(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY}extend(t){t.minXthis.maxX&&(this.maxX=t.maxX),t.minYthis.maxY&&(this.maxY=t.maxY)}getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY}}function Yn(i,t,e,n,s){return s!==void 0?(s.minX=i,s.maxX=t,s.minY=e,s.maxY=n,s):new tc(i,t,e,n)}function au(i){return i[0]>0&&i[1]>0}function Lp(i,t,e){return e===void 0&&(e=[0,0]),e[0]=i[0]*t+.5|0,e[1]=i[1]*t+.5|0,e}function pe(i,t){return Array.isArray(i)?i:(t===void 0?t=[i,i]:(t[0]=i,t[1]=i),t)}class Pp extends Hl{constructor(t){super(t),this.extentChanged=!0,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.newTiles_=!1,this.tmpExtent=ve(),this.tmpTileRange_=new tc(0,0,0,0)}isDrawableTile(t){const e=this.getLayer(),n=t.getState(),s=e.getUseInterimTilesOnError();return n==q.LOADED||n==q.EMPTY||n==q.ERROR&&!s}getTile(t,e,n,s){const r=s.pixelRatio,a=s.viewState.projection,o=this.getLayer();let l=o.getSource().getTile(t,e,n,r,a);return l.getState()==q.ERROR&&o.getUseInterimTilesOnError()&&o.getPreload()>0&&(this.newTiles_=!0),this.isDrawableTile(l)||(l=l.getInterimTile()),l}getData(t){const e=this.frameState;if(!e)return null;const n=this.getLayer(),s=Ft(e.pixelToCoordinateTransform,t.slice()),r=n.getExtent();if(r&&!kn(r,s))return null;const a=e.pixelRatio,o=e.viewState.projection,h=e.viewState,l=n.getRenderSource(),c=l.getTileGridForProjection(h.projection),u=l.getTilePixelRatio(e.pixelRatio);for(let d=c.getZForResolution(h.resolution);d>=c.getMinZoom();--d){const f=c.getTileCoordForCoordAndZ(s,d),g=l.getTile(d,f[1],f[2],a,o);if(!(g instanceof Ql||g instanceof tl)||g instanceof tl&&g.getState()===q.EMPTY)return null;if(g.getState()!==q.LOADED)continue;const _=c.getOrigin(d),m=pe(c.getTileSize(d)),y=c.getResolution(d),p=Math.floor(u*((s[0]-_[0])/y-f[1]*m[0])),x=Math.floor(u*((_[1]-s[1])/y-f[2]*m[1])),M=Math.round(u*l.getGutterForProjection(h.projection));return this.getImageData(g.getImage(),p+M,x+M)}return null}loadedTileCallback(t,e,n){return this.isDrawableTile(n)?super.loadedTileCallback(t,e,n):!1}prepareFrame(t){return!!this.getLayer().getSource()}renderFrame(t,e){const n=t.layerStatesArray[t.layerIndex],s=t.viewState,r=s.projection,a=s.resolution,o=s.center,h=s.rotation,l=t.pixelRatio,c=this.getLayer(),u=c.getSource(),d=u.getRevision(),f=u.getTileGridForProjection(r),g=f.getZForResolution(a,u.zDirection),_=f.getResolution(g);let m=t.extent;const y=t.viewState.resolution,p=u.getTilePixelRatio(l);this.prepareContainer(t,e);const x=this.context.canvas.width,M=this.context.canvas.height,E=n.extent&&vi(n.extent);E&&(m=Fn(m,vi(n.extent)));const w=_*x/2/p,C=_*M/2/p,S=[o[0]-w,o[1]-C,o[0]+w,o[1]+C],I=f.getTileRangeForExtentAndZ(m,g),z={};z[g]={};const F=this.createLoadedTileFinder(u,r,z),A=this.tmpExtent,G=this.tmpTileRange_;this.newTiles_=!1;const X=h?jh(s.center,y,h,t.size):void 0;for(let at=I.minX;at<=I.maxX;++at)for(let st=I.minY;st<=I.maxY;++st){if(h&&!f.tileCoordIntersectsViewport([g,at,st],X))continue;const xt=this.getTile(g,at,st,t);if(this.isDrawableTile(xt)){const qt=mt(this);if(xt.getState()==q.LOADED){z[g][xt.tileCoord.toString()]=xt;let Lt=xt.inTransition(qt);Lt&&n.opacity!==1&&(xt.endTransition(qt),Lt=!1),!this.newTiles_&&(Lt||!this.renderedTiles.includes(xt))&&(this.newTiles_=!0)}if(xt.getAlpha(qt,t.time)===1)continue}const P=f.getTileCoordChildTileRange(xt.tileCoord,G,A);let Jt=!1;P&&(Jt=F(g+1,P)),Jt||f.forEachTileCoordParentTileRange(xt.tileCoord,F,G,A)}const V=_/a*l/p,L=this.getRenderContext(t);ei(this.tempTransform,x/2,M/2,V,V,0,-x/2,-M/2),E&&this.clipUnrotated(L,t,E),u.getInterpolate()||(L.imageSmoothingEnabled=!1),this.preRender(L,t),this.renderedTiles.length=0;let it=Object.keys(z).map(Number);it.sort(xi);let Q,wt,et;n.opacity===1&&(!this.containerReused||u.getOpaque(t.viewState.projection))?it=it.reverse():(Q=[],wt=[]);for(let at=it.length-1;at>=0;--at){const st=it[at],xt=u.getTilePixelSize(st,l,r),Jt=f.getResolution(st)/_,qt=xt[0]*Jt*V,Lt=xt[1]*Jt*V,Le=f.getTileCoordForCoordAndZ(Wn(S),st),un=f.getTileCoordExtent(Le),Qt=Ft(this.tempTransform,[p*(un[0]-S[0])/_,p*(S[3]-un[3])/_]),Ua=p*u.getGutterForProjection(r),sr=z[st];for(const oh in sr){const Ai=sr[oh],rr=Ai.tileCoord,Li=Le[1]-rr[1],ar=Math.round(Qt[0]-(Li-1)*qt),ja=Le[2]-rr[2],hh=Math.round(Qt[1]-(ja-1)*Lt),Pe=Math.round(Qt[0]-Li*qt),xe=Math.round(Qt[1]-ja*Lt),oi=ar-Pe,dn=hh-xe,fn=g===st,Pi=fn&&Ai.getAlpha(mt(this),t.time)!==1;let gn=!1;if(!Pi)if(Q){et=[Pe,xe,Pe+oi,xe,Pe+oi,xe+dn,Pe,xe+dn];for(let Oi=0,Xn=Q.length;Oi0&&this.getCount()>this.highWaterMark}expireCache(t){for(;this.canExpireCache();)this.pop()}clear(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}containsKey(t){return this.entries_.hasOwnProperty(t)}forEach(t){let e=this.oldest_;for(;e;)t(e.value_,e.key_,this),e=e.newer}get(t,e){const n=this.entries_[t];return ct(n!==void 0,"Tried to get a value for a key that does not exist in the cache"),n===this.newest_||(n===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(n.newer.older=n.older,n.older.newer=n.newer),n.newer=null,n.older=this.newest_,this.newest_.newer=n,this.newest_=n),n.value_}remove(t){const e=this.entries_[t];return ct(e!==void 0,"Tried to get a value for a key that does not exist in the cache"),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_}getCount(){return this.count_}getKeys(){const t=new Array(this.count_);let e=0,n;for(n=this.newest_;n;n=n.older)t[e++]=n.key_;return t}getValues(){const t=new Array(this.count_);let e=0,n;for(n=this.newest_;n;n=n.older)t[e++]=n.value_;return t}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(t){return this.entries_[t]?.value_}pop(){const t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_}replace(t,e){this.get(t),this.entries_[t].value_=e}set(t,e){ct(!(t in this.entries_),"Tried to set a value for a key that is used already");const n={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=n:this.oldest_=n,this.newest_=n,this.entries_[t]=n,++this.count_}setSize(t){this.highWaterMark=t}}function ou(i,t,e,n){return n!==void 0?(n[0]=i,n[1]=t,n[2]=e,n):[i,t,e]}function La(i,t,e){return i+"/"+t+"/"+e}function qf(i){return La(i[0],i[1],i[2])}function RC(i){const[t,e,n]=i.substring(i.lastIndexOf("/")+1,i.length).split(",").map(Number);return La(t,e,n)}function Dp(i){return i.split("/").map(Number)}function Np(i){return(i[1]<e||e>t.getMaxZoom())return!1;const r=t.getFullTileRange(e);return r?r.containsXY(n,s):!0}class Yf extends Op{clear(){for(;this.getCount()>0;)this.pop().release();super.clear()}expireCache(t){for(;this.canExpireCache()&&!(this.peekLast().getKey()in t);)this.pop().release()}pruneExceptNewestZ(){if(this.getCount()===0)return;const t=this.peekFirstKey(),n=Dp(t)[0];this.forEach(s=>{s.tileCoord[0]!==n&&(this.remove(qf(s.tileCoord)),s.release())})}}const Sh={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"},Vn=[0,0,0],Di=5;class ec{constructor(t){this.minZoom=t.minZoom!==void 0?t.minZoom:0,this.resolutions_=t.resolutions,ct(J0(this.resolutions_,(s,r)=>r-s),"`resolutions` must be sorted in descending order");let e;if(!t.origins){for(let s=0,r=this.resolutions_.length-1;s{const a=new tc(Math.min(0,s[0]),Math.max(s[0]-1,-1),Math.min(0,s[1]),Math.max(s[1]-1,-1));if(n){const o=this.getTileRangeForExtentAndZ(n,r);a.minX=Math.max(o.minX,a.minX),a.maxX=Math.min(o.maxX,a.maxX),a.minY=Math.max(o.minY,a.minY),a.maxY=Math.min(o.maxY,a.maxY)}return a}):n&&this.calculateTileRanges_(n)}forEachTileCoord(t,e,n){const s=this.getTileRangeForExtentAndZ(t,e);for(let r=s.minX,a=s.maxX;r<=a;++r)for(let o=s.minY,h=s.maxY;o<=h;++o)n([e,r,o])}forEachTileCoordParentTileRange(t,e,n,s){let r,a,o,h=null,l=t[0]-1;for(this.zoomFactor_===2?(a=t[1],o=t[2]):h=this.getTileCoordExtent(t,s);l>=this.minZoom;){if(a!==void 0&&o!==void 0?(a=Math.floor(a/2),o=Math.floor(o/2),r=Yn(a,a,o,o,n)):r=this.getTileRangeForExtentAndZ(h,l,n),e(l,r))return!0;--l}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(t){return this.origin_?this.origin_:this.origins_[t]}getResolution(t){return this.resolutions_[t]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(t,e,n){if(t[0]this.maxZoom||e0?M=e.find(function(E){return x[c]==E[l]?!0:x[c].includes(":")?!1:i[c]+":"+x[c]===E[l]}):M=!0,M){s.push(x[c]);const E=x[u]*28e-5/y,w=x[f],C=x[g];p?r.push([x[d][1],x[d][0]]):r.push(x[d]),n.push(E),a.push(w==C?w:[w,C]),o.push([x.MatrixWidth,x.MatrixHeight])}}),new kp({extent:t,origins:r,resolutions:n,matrixIds:s,tileSizes:a,sizes:o})}function Vf(i){let t=i.getDefaultTileGrid();return t||(t=Up(i),i.setDefaultTileGrid(t)),t}function zp(i,t,e){const n=t[0],s=i.getTileCoordCenter(t),r=ic(e);if(!kn(r,s)){const a=nt(r),o=Math.ceil((r[0]-s[0])/a);return s[0]+=a*o,i.getTileCoordForCoordAndZ(s,n)}return t}function Wp(i,t,e,n){n=n!==void 0?n:"top-left";const s=Kf(i,t,e);return new ec({extent:i,origin:f_(i,n),resolutions:s,tileSize:e})}function Bp(i){const t=i||{},e=t.extent||pt("EPSG:3857").getExtent(),n={extent:e,minZoom:t.minZoom,tileSize:t.tileSize,resolutions:Kf(e,t.maxZoom,t.tileSize,t.maxResolution)};return new ec(n)}function Kf(i,t,e,n){t=t!==void 0?t:i_,e=pe(e!==void 0?e:Sl);const s=Pt(i),r=nt(i);n=n>0?n:Math.max(r/e[0],s/e[1]);const a=t+1,o=new Array(a);for(let h=0;hn.highWaterMark&&(n.highWaterMark=t)}useTile(t,e,n,s){}}class Xp extends si{constructor(t,e){super(t),this.tile=e}}function qp(i,t){const e=/\{z\}/g,n=/\{x\}/g,s=/\{y\}/g,r=/\{-y\}/g;return function(a,o,h){if(a)return i.replace(e,a[0].toString()).replace(n,a[1].toString()).replace(s,a[2].toString()).replace(r,function(){const l=a[0],c=t.getFullTileRange(l);if(!c)throw new Error("The {-y} placeholder requires a tile grid with extent");return(c.getHeight()-a[2]-1).toString()})}}function Yp(i,t){const e=i.length,n=new Array(e);for(let s=0;sthis.getTileInternal(m,y,p,x,a),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.tileOptions);return _.key=u,l?(_.interimTile=l,_.refreshInterimChain(),o.replace(c,_)):o.set(c,_),_}getTileInternal(t,e,n,s,r){let a=null;const o=La(t,e,n),h=this.getKey();if(!this.tileCache.containsKey(o))a=this.createTile_(t,e,n,s,r,h),this.tileCache.set(o,a);else if(a=this.tileCache.get(o),a.key!=h){const l=a;a=this.createTile_(t,e,n,s,r,h),l.getState()==q.IDLE?a.interimTile=l.interimTile:a.interimTile=l,a.refreshInterimChain(),this.tileCache.replace(o,a)}return a}setRenderReprojectionEdges(t){if(this.renderReprojectionEdges_!=t){this.renderReprojectionEdges_=t;for(const e in this.tileCacheForProjection)this.tileCacheForProjection[e].clear();this.changed()}}setTileGridForProjection(t,e){const n=pt(t);if(n){const s=mt(n);s in this.tileGridForProjection||(this.tileGridForProjection[s]=e)}}clear(){super.clear();for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear()}}function Vp(i,t){i.getImage().src=t}class Kp extends Zf{constructor(t){const e=t.requestEncoding!==void 0?t.requestEncoding:"KVP",n=t.tileGrid;let s=t.urls;s===void 0&&t.url!==void 0&&(s=$f(t.url)),super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileClass:t.tileClass,tileGrid:n,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,urls:s,wrapX:t.wrapX!==void 0?t.wrapX:!1,transition:t.transition,zDirection:t.zDirection}),this.version_=t.version!==void 0?t.version:"1.0.0",this.format_=t.format!==void 0?t.format:"image/jpeg",this.dimensions_=t.dimensions!==void 0?t.dimensions:{},this.layer_=t.layer,this.matrixSet_=t.matrixSet,this.style_=t.style,this.requestEncoding_=e,this.setKey(this.getKeyForDimensions_()),s&&s.length>0&&(this.tileUrlFunction=el(s.map(this.createFromWMTSTemplate.bind(this))))}setUrls(t){this.urls=t;const e=t.join(` -`);this.setTileUrlFunction(el(t.map(this.createFromWMTSTemplate.bind(this))),e)}getDimensions(){return this.dimensions_}getFormat(){return this.format_}getLayer(){return this.layer_}getMatrixSet(){return this.matrixSet_}getRequestEncoding(){return this.requestEncoding_}getStyle(){return this.style_}getVersion(){return this.version_}getKeyForDimensions_(){const t=this.urls?this.urls.slice(0):[];for(const e in this.dimensions_)t.push(e+"-"+this.dimensions_[e]);return t.join("/")}updateDimensions(t){Object.assign(this.dimensions_,t),this.setKey(this.getKeyForDimensions_())}createFromWMTSTemplate(t){const e=this.requestEncoding_,n={layer:this.layer_,style:this.style_,tilematrixset:this.matrixSet_};e=="KVP"&&Object.assign(n,{Service:"WMTS",Request:"GetTile",Version:this.version_,Format:this.format_}),t=e=="KVP"?wo(t,n):t.replace(/\{(\w+?)\}/g,function(a,o){return o.toLowerCase()in n?n[o.toLowerCase()]:a});const s=this.tileGrid,r=this.dimensions_;return function(a,o,h){if(!a)return;const l={TileMatrix:s.getMatrixId(a[0]),TileCol:a[1],TileRow:a[2]};Object.assign(l,r);let c=t;return e=="KVP"?c=wo(c,l):c=c.replace(/\{(\w+?)\}/g,function(u,d){return l[d]}),c}}}function $p(i,t){const n=i.Contents.Layer?.find(function(A){return A.Identifier==t.layer});if(!n)return null;const s=i.Contents.TileMatrixSet;let r;n.TileMatrixSetLink.length>1?"projection"in t?r=n.TileMatrixSetLink.findIndex(function(A){const X=s.find(function(it){return it.Identifier==A.TileMatrixSet}).SupportedCRS,V=pt(X),L=pt(t.projection);return V&&L?qe(V,L):X==t.projection}):r=n.TileMatrixSetLink.findIndex(function(A){return A.TileMatrixSet==t.matrixSet}):r=0,r<0&&(r=0);const a=n.TileMatrixSetLink[r].TileMatrixSet,o=n.TileMatrixSetLink[r].TileMatrixSetLimits;let h=n.Format[0];"format"in t&&(h=t.format),r=n.Style.findIndex(function(A){return"style"in t?A.Title==t.style:A.isDefault}),r<0&&(r=0);const l=n.Style[r].Identifier,c={};"Dimension"in n&&n.Dimension.forEach(function(A,G,X){const V=A.Identifier;let L=A.Default;L===void 0&&(L=A.Value[0]),c[V]=L});const d=i.Contents.TileMatrixSet.find(function(A){return A.Identifier==a});let f;const g=d.SupportedCRS;if(g&&(f=pt(g)),"projection"in t){const A=pt(t.projection);A&&(!f||qe(A,f))&&(f=A)}let _=!1;const m=f.getAxisOrientation().substr(0,2)=="ne";let y=d.TileMatrix[0],p={MinTileCol:0,MinTileRow:0,MaxTileCol:y.MatrixWidth-1,MaxTileRow:y.MatrixHeight-1};if(o){p=o[o.length-1];const A=d.TileMatrix.find(G=>G.Identifier===p.TileMatrix||d.Identifier+":"+G.Identifier===p.TileMatrix);A&&(y=A)}const x=y.ScaleDenominator*28e-5/f.getMetersPerUnit(),M=m?[y.TopLeftCorner[1],y.TopLeftCorner[0]]:y.TopLeftCorner,E=y.TileWidth*x,w=y.TileHeight*x;let C=d.BoundingBox;C&&m&&(C=[C[1],C[0],C[3],C[2]]);let S=[M[0]+E*p.MinTileCol,M[1]-w*(1+p.MaxTileRow),M[0]+E*(1+p.MaxTileCol),M[1]-w*p.MinTileRow];if(C!==void 0&&!Ve(C,S)){const A=n.WGS84BoundingBox,G=pt("EPSG:4326").getExtent();if(S=C,A)_=A[0]===G[0]&&A[2]===G[2];else{const X=R_(C,d.SupportedCRS,"EPSG:4326");_=X[0]-1e-10<=G[0]&&X[2]+1e-10>=G[2]}}const I=Gp(d,S,o),z=[];let F=t.requestEncoding;if(F=F!==void 0?F:"","OperationsMetadata"in i&&"GetTile"in i.OperationsMetadata){const A=i.OperationsMetadata.GetTile.DCP.HTTP.Get;for(let G=0,X=A.length;G0;)this.pop()}extend(t){for(let e=0,n=t.length;ethis.getLength())throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new Za(he.ADD,e,t))}pop(){return this.removeAt(this.getLength()-1)}push(t){this.unique_&&this.assertUnique_(t);const e=this.getLength();return this.insertAt(e,t),this.getLength()}remove(t){const e=this.array_;for(let n=0,s=e.length;n=this.getLength())return;const e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new Za(he.REMOVE,e,t)),e}setAt(t,e){const n=this.getLength();if(t>=n){this.insertAt(t,e);return}if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);const s=this.array_[t];this.array_[t]=e,this.dispatchEvent(new Za(he.REMOVE,s,t)),this.dispatchEvent(new Za(he.ADD,e,t))}updateLength_(){this.set(hu.LENGTH,this.array_.length)}assertUnique_(t,e){for(let n=0,s=this.array_.length;nthis.maxCacheSize_}expire(){if(this.canExpireCache()){let t=0;for(const e in this.cache_){const n=this.cache_[e];!(t++&3)&&!n.hasListener()&&(delete this.cache_[e],delete this.patternCache_[e],--this.cacheSize_)}}}get(t,e,n){const s=Ch(t,e,n);return s in this.cache_?this.cache_[s]:null}getPattern(t,e,n){const s=Ch(t,e,n);return s in this.patternCache_?this.patternCache_[s]:null}set(t,e,n,s,r){const a=Ch(t,e,n),o=a in this.cache_;this.cache_[a]=s,r&&(s.getImageState()===U.IDLE&&s.load(),s.getImageState()===U.LOADING?s.ready().then(()=>{this.patternCache_[a]=Eo().createPattern(s.getImage(1),"repeat")}):this.patternCache_[a]=Eo().createPattern(s.getImage(1),"repeat")),o||++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}}function Ch(i,t,e){const n=e?Ur(e):"null";return t+":"+i+":"+n}const $e=new Hp;let fr=null;class Jp extends ba{constructor(t,e,n,s,r){super(),this.hitDetectionImage_=null,this.image_=t,this.crossOrigin_=n,this.canvas_={},this.color_=r,this.imageState_=s===void 0?U.IDLE:s,this.size_=t&&t.width&&t.height?[t.width,t.height]:null,this.src_=e,this.tainted_,this.ready_=null}initializeImage_(){this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(this.tainted_===void 0&&this.imageState_===U.LOADED){fr||(fr=jt(1,1,void 0,{willReadFrequently:!0})),fr.drawImage(this.image_,0,0);try{fr.getImageData(0,0,1,1),this.tainted_=!1}catch{fr=null,this.tainted_=!0}}return this.tainted_===!0}dispatchChangeEvent_(){this.dispatchEvent(Z.CHANGE)}handleImageError_(){this.imageState_=U.ERROR,this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=U.LOADED,this.size_=[this.image_.width,this.image_.height],this.dispatchChangeEvent_()}getImage(t){return this.image_||this.initializeImage_(),this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_}getPixelRatio(t){return this.replaceColor_(t),this.canvas_[t]?t:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const t=this.size_[0],e=this.size_[1],n=jt(t,e);n.fillRect(0,0,t,e),this.hitDetectionImage_=n.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===U.IDLE){this.image_||this.initializeImage_(),this.imageState_=U.LOADING;try{this.src_!==void 0&&(this.image_.src=this.src_)}catch{this.handleImageError_()}this.image_ instanceof HTMLImageElement&&Cf(this.image_,this.src_).then(t=>{this.image_=t,this.handleImageLoad_()}).catch(this.handleImageError_.bind(this))}}replaceColor_(t){if(!this.color_||this.canvas_[t]||this.imageState_!==U.LOADED)return;const e=this.image_,n=document.createElement("canvas");n.width=Math.ceil(e.width*t),n.height=Math.ceil(e.height*t);const s=n.getContext("2d");s.scale(t,t),s.drawImage(e,0,0),s.globalCompositeOperation="multiply",s.fillStyle=oy(this.color_),s.fillRect(0,0,n.width/t,n.height/t),s.globalCompositeOperation="destination-in",s.drawImage(e,0,0),this.canvas_[t]=n}ready(){return this.ready_||(this.ready_=new Promise(t=>{this.imageState_===U.LOADED||this.imageState_===U.ERROR?t():this.addEventListener(Z.CHANGE,function e(){(this.imageState_===U.LOADED||this.imageState_===U.ERROR)&&(this.removeEventListener(Z.CHANGE,e),t())})})),this.ready_}}function rc(i,t,e,n,s,r){let a=t===void 0?void 0:$e.get(t,e,s);return a||(a=new Jp(i,i&&"src"in i?i.src||void 0:t,e,n,s),$e.set(t,e,s,a,r)),r&&a&&!$e.getPattern(t,e,s)&&$e.set(t,e,s,a,r),a}class Ri{constructor(t){t=t||{},this.patternImage_=null,this.color_=null,t.color!==void 0&&this.setColor(t.color)}clone(){const t=this.getColor();return new Ri({color:Array.isArray(t)?t.slice():t||void 0})}getColor(){return this.color_}setColor(t){if(t!==null&&typeof t=="object"&&"src"in t){const e=rc(null,t.src,"anonymous",void 0,t.offset?null:t.color?t.color:null,!(t.offset&&t.size));e.ready().then(()=>{this.patternImage_=null}),e.getImageState()===U.IDLE&&e.load(),e.getImageState()===U.LOADING&&(this.patternImage_=e)}this.color_=t}loading(){return!!this.patternImage_}ready(){return this.patternImage_?this.patternImage_.ready():Promise.resolve()}}function lu(i,t,e,n,s,r,a){let o,h;const l=(e-t)/n;if(l===1)o=t;else if(l===2)o=t,h=s;else if(l!==0){let c=i[t],u=i[t+1],d=0;const f=[0];for(let m=t+n;m1?a:2,r=r||new Array(a);for(let c=0;c>1;s{throw TypeError(i)};var d0=(i,t,e)=>t in i?u0(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var cr=(i,t,e)=>d0(i,typeof t!="symbol"?t+"":t,e),dh=(i,t,e)=>t.has(i)||Ic("Cannot "+e);var v=(i,t,e)=>(dh(i,t,"read from private field"),e?e.call(i):t.get(i)),O=(i,t,e)=>t.has(i)?Ic("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,e),W=(i,t,e,n)=>(dh(i,t,"write to private field"),n?n.call(i,e):t.set(i,e),e),B=(i,t,e)=>(dh(i,t,"access private method"),e);var Tc=(i,t,e,n)=>({set _(s){W(i,t,s,e)},get _(){return v(i,t,n)}});import{h as Bo,P as f0,p as g0,j as se,f as Or,q as _0,c as bi,v as id,i as Dr,r as _t,g as m0,U as y0,a8 as nd,E as p0,a9 as v0,aa as Ac,b as x0,d as Lc,ab as E0,w as M0}from"./Bh0CuZ3gy5tC.js";const Xa=Symbol("EventEmitterState");class sd{[Xa]=new w0;on(t,e){return this[Xa].on(t,{listener:e})}once(t,e){return this[Xa].on(t,{listener:e,once:!0})}emit(t,...e){this[Xa].emit(t,e[0])}}class w0{handlers=new Map;on(t,e){let n=this.handlers.get(t);return n||(n=new Set,this.handlers.set(t,n)),n.add(e),{destroy(){e.removed=!0,n?.delete(e),n=void 0}}}emit(t,e){const n=this.handlers.get(t);if(!n)return;const s=[...n];for(const r of s)r.removed||(r.once&&(r.removed=!0,n.delete(r)),r.listener(e))}}var rd=Bo(function(t,e){const n=f0("Heading",t),{className:s,...r}=g0(t);return se.jsx(Or.h2,{ref:e,className:_0("chakra-heading",t.className),...r,__css:n})});rd.displayName="Heading";var pl=Or("div");pl.displayName="Box";var ad=Bo(function(t,e){const{size:n,centerContent:s=!0,...r}=t,a=s?{display:"flex",alignItems:"center",justifyContent:"center"}:{};return se.jsx(pl,{ref:e,boxSize:n,__css:{...a,flexShrink:0,flexGrow:0},...r})});ad.displayName="Square";var S0=Bo(function(t,e){const{size:n,...s}=t;return se.jsx(ad,{size:n,ref:e,borderRadius:"9999px",...s})});S0.displayName="Circle";var C0=Bo(function(t,e){const{direction:n,align:s,justify:r,wrap:a,basis:o,grow:h,shrink:l,...c}=t,u={display:"flex",flexDirection:n,alignItems:s,justifyContent:r,flexWrap:a,flexBasis:o,flexGrow:h,flexShrink:l};return se.jsx(Or.div,{ref:e,__css:u,...c})});C0.displayName="Flex";var R0=Symbol.for("preact-signals");function Uo(){if(nn>1)nn--;else{for(var i,t=!1;Sr!==void 0;){var e=Sr;for(Sr=void 0,Wh++;e!==void 0;){var n=e.o;if(e.o=void 0,e.f&=-3,!(8&e.f)&&ld(e))try{e.c()}catch(s){t||(i=s,t=!0)}e=n}}if(Wh=0,nn--,t)throw i}}function b0(i){if(nn>0)return i();nn++;try{return i()}finally{Uo()}}var ft=void 0;function jo(i){var t=ft;ft=void 0;try{return i()}finally{ft=t}}var Sr=void 0,nn=0,Wh=0,go=0;function od(i){if(ft!==void 0){var t=i.n;if(t===void 0||t.t!==ft)return t={i:0,S:i,p:ft.s,n:void 0,t:ft,e:void 0,x:void 0,r:t},ft.s!==void 0&&(ft.s.n=t),ft.s=t,i.n=t,32&ft.f&&i.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=ft.s,t.n=void 0,ft.s.n=t,ft.s=t),t}}function ae(i){this.v=i,this.i=0,this.n=void 0,this.t=void 0}ae.prototype.brand=R0;ae.prototype.h=function(){return!0};ae.prototype.S=function(i){this.t!==i&&i.e===void 0&&(i.x=this.t,this.t!==void 0&&(this.t.e=i),this.t=i)};ae.prototype.U=function(i){if(this.t!==void 0){var t=i.e,e=i.x;t!==void 0&&(t.x=e,i.e=void 0),e!==void 0&&(e.e=t,i.x=void 0),i===this.t&&(this.t=e)}};ae.prototype.subscribe=function(i){var t=this;return xl(function(){var e=t.value,n=ft;ft=void 0;try{i(e)}finally{ft=n}})};ae.prototype.valueOf=function(){return this.value};ae.prototype.toString=function(){return this.value+""};ae.prototype.toJSON=function(){return this.value};ae.prototype.peek=function(){var i=ft;ft=void 0;try{return this.value}finally{ft=i}};Object.defineProperty(ae.prototype,"value",{get:function(){var i=od(this);return i!==void 0&&(i.i=this.i),this.v},set:function(i){if(i!==this.v){if(Wh>100)throw new Error("Cycle detected");this.v=i,this.i++,go++,nn++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Uo()}}}});function hd(i){return new ae(i)}function ld(i){for(var t=i.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function cd(i){for(var t=i.s;t!==void 0;t=t.n){var e=t.S.n;if(e!==void 0&&(t.r=e),t.S.n=t,t.i=-1,t.n===void 0){i.s=t;break}}}function ud(i){for(var t=i.s,e=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):e=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}i.s=e}function Hs(i){ae.call(this,void 0),this.x=i,this.s=void 0,this.g=go-1,this.f=4}(Hs.prototype=new ae).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===go))return!0;if(this.g=go,this.f|=1,this.i>0&&!ld(this))return this.f&=-2,!0;var i=ft;try{cd(this),ft=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return ft=i,ud(this),this.f&=-2,!0};Hs.prototype.S=function(i){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}ae.prototype.S.call(this,i)};Hs.prototype.U=function(i){if(this.t!==void 0&&(ae.prototype.U.call(this,i),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};Hs.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var i=this.t;i!==void 0;i=i.x)i.t.N()}};Object.defineProperty(Hs.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var i=od(this);if(this.h(),i!==void 0&&(i.i=this.i),16&this.f)throw this.v;return this.v}});function dd(i){return new Hs(i)}function fd(i){var t=i.u;if(i.u=void 0,typeof t=="function"){nn++;var e=ft;ft=void 0;try{t()}catch(n){throw i.f&=-2,i.f|=8,vl(i),n}finally{ft=e,Uo()}}}function vl(i){for(var t=i.s;t!==void 0;t=t.n)t.S.U(t);i.x=void 0,i.s=void 0,fd(i)}function I0(i){if(ft!==this)throw new Error("Out-of-order effect");ud(this),ft=i,this.f&=-2,8&this.f&&vl(this),Uo()}function Sa(i){this.x=i,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Sa.prototype.c=function(){var i=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{i()}};Sa.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,fd(this),cd(this),nn++;var i=ft;return ft=this,I0.bind(this,i)};Sa.prototype.N=function(){2&this.f||(this.f|=2,this.o=Sr,Sr=this)};Sa.prototype.d=function(){this.f|=8,1&this.f||vl(this)};function xl(i){var t=new Sa(i);try{t.c()}catch(e){throw t.d(),e}return t.d.bind(t)}function T0(i){let t;return{destroy:xl(function(){this[A0]=i.bind(void 0),t=this[L0].bind(this)}),start:t}}var A0="N",L0="S";function Zt(i,t){return new O0(i,t?.equal)}function El(i,t){return new P0(i,t?.equal)}function gd(i,t){const e=hd(!1),n=()=>{e.value=!e.peek()},s=El(()=>(e.value,jo(()=>i())),t);return s.trigger=n,s}function Ml(i){return b0(i)}function _d(i){return jo(i)}var Hn=Symbol("signal"),Cr=Symbol("equals"),md=class{[Hn];constructor(i){this[Hn]=i}get value(){return this[Hn].value}set value(i){throw new Error("Cannot update a readonly reactive object.")}trigger(){throw new Error("Cannot trigger this reactive object.")}peek(){return this[Hn].peek()}toJSON(){return this.value}toString(){return`Reactive[value=${N0(this[Hn].value)}]`}},P0=class extends md{[Cr];constructor(i,t){const e=dd(t?D0(i,t):i);super(e),this[Cr]=t}},O0=class extends md{[Cr];constructor(i,t){super(hd(i)),this[Cr]=t}get value(){return super.value}set value(i){jo(()=>this[Cr]?.(this.value,i))||(this[Hn].value=i)}};function D0(i,t){let e=!0,n;return function(){const r=i();return jo(()=>((e||!t(n,r))&&(n=r,e=!1),n))}}function N0(i){return typeof i=="string"?JSON.stringify(i):String(i)}function yd(i,t){return i===t?!0:i.length===t.length&&i.every((e,n)=>e===t[n])}function pd(i,t,e,n){const s=dd(t),r=n?.immediate??!1,a=n?.equal??F0;let o=!0,h,l;function c(){const f=l;l=void 0;try{f?.()}catch(g){throw d.destroy(),g}}const u=i(()=>{const f=s.value;_d(()=>{const g=h,_=o&&r||!o&&!a(g,f);(_||o)&&(h=f,o=!1),_&&(c(),l=e(f,g))})}),d={destroy(){try{c()}finally{u.destroy()}}};return d}function F0(i,t){return i===t}function k0(i){return{destroy:xl(i)}}function iC(i,t,e){return pd(k0,i,t,{equal:yd,...e})}function vd(i){Promise.reject(new Error("Error in effect or watch callback",{cause:i}))}var G0=class{queue=[];channel=new MessageChannel;constructor(){this.channel.port2.start()}enqueue(i){const t={fn:i,destroyed:!1};return this.queue.push(t),this.queue.length===1&&this.scheduleIteration(),{destroy(){t.destroyed||(t.destroyed=!0)}}}messageHandler=()=>this.runIteration();scheduleIteration(){const i=this.channel;i.port2.addEventListener("message",this.messageHandler),i.port1.postMessage("")}runIteration(){this.channel.port2.removeEventListener("message",this.messageHandler);const i=this.queue;this.queue=[];for(const t of i)if(!t.destroyed)try{t.fn()}catch(e){vd(e)}}};function z0(i){const t=new W0(i);return{destroy:t.destroy.bind(t)}}var W0=class{callback;cleanup;watcher;scheduledExecution;isDestroyed=!1;initialExecution=!0;isExecuting=!1;constructor(i){this.callback=i,this.watcher=T0(this.scheduleExecution),this.execute(),this.initialExecution=!1}destroy(){if(!this.isDestroyed){this.isDestroyed=!0;try{this.triggerCleanup()}finally{this.watcher?.destroy(),this.watcher=void 0,this.scheduledExecution?.destroy(),this.scheduledExecution=void 0}}}execute(){const i=this.watcher;if(!i)return;this.isExecuting=!0;const t=i.start();try{if(this.initialExecution)try{this.triggerCallback()}catch(e){throw this.destroy(),e}else try{this.triggerCallback()}catch(e){vd(e)}}finally{t(),this.isExecuting=!1}this.isDestroyed&&this.triggerCleanup()}triggerCallback(){if(!this.isDestroyed){this.triggerCleanup();const i=this.callback();typeof i=="function"&&(this.cleanup=i)}}triggerCleanup(){const i=this.cleanup;this.cleanup=void 0;try{i&&_d(i)}catch(t){throw this.destroy(),t}}scheduleExecution=()=>{if(!this.isDestroyed){if(this.isExecuting)throw new Error("Cycle detected");this.scheduledExecution||(this.scheduledExecution=j0(()=>{try{this.execute()}finally{this.scheduledExecution=void 0}}))}}};function B0(i,t,e){return pd(z0,i,t,{equal:yd,...e})}var U0=new G0;function j0(i){return U0.enqueue(i)}function xd(i){return new X0(i)}var $t,ps,Gt,Wi,ro,Ed,Md,td,X0=(td=class{constructor(i){O(this,Gt);O(this,$t,new Map);O(this,ps,Zt(!1));if(i)for(const[t,e]of i)v(this,$t).set(t,Zt(e))}get size(){return B(this,Gt,Wi).call(this),v(this,$t).size}forEach(i){B(this,Gt,Wi).call(this);const t=v(this,$t).entries();for(const[e,n]of t)i(n.value,e)}entries(){return B(this,Gt,Wi).call(this),B(this,Gt,Ed).call(this)}keys(){return B(this,Gt,Wi).call(this),v(this,$t).keys()}values(){return B(this,Gt,Wi).call(this),B(this,Gt,Md).call(this)}[Symbol.iterator](){return this.entries()}clear(){const i=!!v(this,$t).size;v(this,$t).clear(),i&&B(this,Gt,ro).call(this)}delete(i){const t=v(this,$t).delete(i);return t&&B(this,Gt,ro).call(this),t}get(i){return B(this,Gt,Wi).call(this),v(this,$t).get(i)?.value}has(i){return B(this,Gt,Wi).call(this),v(this,$t).has(i)}set(i,t){const e=v(this,$t).get(i);return e?e.value=t:(v(this,$t).set(i,Zt(t)),B(this,Gt,ro).call(this)),this}},$t=new WeakMap,ps=new WeakMap,Gt=new WeakSet,Wi=function(){v(this,ps).value},ro=function(){v(this,ps).value=!v(this,ps).peek()},Ed=function*(){const i=v(this,$t).entries();for(const[t,e]of i)yield[t,e.value]},Md=function*(){const i=v(this,$t).values();for(const t of i)yield t.value},td);function q0(i){return new Y0(i)}var Ne,ed,Y0=(ed=class{constructor(i){O(this,Ne);W(this,Ne,xd(i?V0(i):void 0))}get size(){return v(this,Ne).size}clear(){v(this,Ne).clear()}has(i){return v(this,Ne).has(i)}add(i){return v(this,Ne).set(i,void 0),this}delete(i){return v(this,Ne).delete(i)}forEach(i){v(this,Ne).forEach((t,e)=>i(e,e))}entries(){return $0(this.values())}values(){return v(this,Ne).keys()}[Symbol.iterator](){return this.values()}},Ne=new WeakMap,ed);function*V0(i){for(const t of i)yield[t,void 0]}function*$0(i){for(const t of i)yield[t,t]}function ur(i){return new K0(i)}var Et,vs,rt,pn,ao,wd,Sd,De,vn,xs,K0=(xs=class{constructor(t){O(this,rt);O(this,Et);O(this,vs,Zt(!1));W(this,Et,t?Array.from(t).map(e=>Zt(e)):[])}get length(){return B(this,rt,De).call(this),v(this,Et).length}push(...t){v(this,Et).push(...t.map(e=>Zt(e))),B(this,rt,vn).call(this)}pop(){if(v(this,Et).length===0)return;const t=v(this,Et).pop();return B(this,rt,vn).call(this),t.value}unshift(...t){v(this,Et).unshift(...t.map(e=>Zt(e))),B(this,rt,vn).call(this)}shift(){if(v(this,Et).length===0)return;const t=v(this,Et).shift();return B(this,rt,vn).call(this),t.value}splice(t,e,...n){const s=v(this,Et).splice(t,e??v(this,Et).length,...n.map(r=>Zt(r)));return(n!=null&&n.length!==0||s.length!==0)&&B(this,rt,vn).call(this),s.map(r=>r.value)}sort(t){v(this,Et).sort((e,n)=>t(e.value,n.value)),B(this,rt,vn).call(this)}getItems(){return B(this,rt,De).call(this),v(this,Et).map(t=>t.value)}at(t){return B(this,rt,De).call(this),v(this,Et).at(t)?.value}get(t){return B(this,rt,De).call(this),v(this,Et)[t]?.value}set(t,e){if(t<0||t>=v(this,Et).length)throw new Error("index out of bounds");const n=v(this,Et)[t];n.value=e}slice(...t){B(this,rt,De).call(this);const e=v(this,Et).slice(...t).map(n=>n.value);return ur(e)}concat(...t){const e=this.getItems().concat(...t.map(n=>n instanceof xs?n.getItems():n));return ur(e)}includes(t,e){return B(this,rt,pn).call(this,n=>n===t,e)!==-1}indexOf(t,e){return B(this,rt,pn).call(this,n=>n===t,e)}lastIndexOf(t){return B(this,rt,ao).call(this,e=>e===t)}find(t){const e=B(this,rt,pn).call(this,t);return this.get(e)}findLast(t){const e=B(this,rt,ao).call(this,t);return this.get(e)}findIndex(t){return B(this,rt,pn).call(this,t)}findLastIndex(t){return B(this,rt,ao).call(this,t)}some(t){return B(this,rt,pn).call(this,t)!==-1}every(t){return B(this,rt,pn).call(this,(e,n)=>!t(e,n))===-1}forEach(t){for(const[e,n]of this.entries())t(n,e)}filter(t){return ur(this.getItems().filter((e,n)=>t(e,n)))}map(t){return ur(this.getItems().map((e,n)=>t(e,n)))}flatMap(t){return ur(this.getItems().flatMap((e,n)=>t(e,n)))}reduce(t,...e){return B(this,rt,De).call(this),v(this,Et).reduce((n,s,r)=>t(n,s.value,r),...e)}reduceRight(t,...e){return B(this,rt,De).call(this),v(this,Et).reduceRight((n,s,r)=>t(n,s.value,r),...e)}keys(){return B(this,rt,De).call(this),v(this,Et).keys()}values(){return B(this,rt,De).call(this),B(this,rt,wd).call(this)}entries(){return B(this,rt,De).call(this),B(this,rt,Sd).call(this)}[Symbol.iterator](){return this.values()}},Et=new WeakMap,vs=new WeakMap,rt=new WeakSet,pn=function(t,e){for(let n=e??0,s=this.length;n0;){const n=this.get(e);if(t(n,e))return e}return-1},wd=function*(){for(const t of v(this,Et))yield t.value},Sd=function*(){for(const[t,e]of v(this,Et).entries())yield[t,e.value]},De=function(){v(this,vs).value},vn=function(){v(this,vs).value=!v(this,vs).peek()},xs);class wl{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}class si{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}function Z0(i,t,e){let n,s;e=e||xi;let r=0,a=i.length,o=!1;for(;r>1),s=+e(i[n],t),s<0?r=n+1:(a=n,o=!s);return o?r:~r}function xi(i,t){return i>t?1:i0?s-1:s}return n-1}if(e>0){for(let s=1;s0||a===0)})}function Nr(){return!0}function Ca(){return!1}function Gs(){}function Cd(i){let t=!1,e,n,s;return function(){const r=Array.prototype.slice.call(arguments);return(!t||this!==s||!ln(r,n))&&(t=!0,s=this,n=r,e=i.apply(this,arguments)),e}}function Rd(i){function t(){let e;try{e=i()}catch(n){return Promise.reject(n)}return e instanceof Promise?e:Promise.resolve(e)}return t()}function Ra(i){for(const t in i)delete i[t]}function zs(i){let t;for(t in i)return!1;return!t}class ba extends wl{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,e){if(!t||!e)return;const n=this.listeners_||(this.listeners_={}),s=n[t]||(n[t]=[]);s.includes(e)||s.push(e)}dispatchEvent(t){const e=typeof t=="string",n=e?t:t.type,s=this.listeners_&&this.listeners_[n];if(!s)return;const r=e?new si(t):t;r.target||(r.target=this.eventTarget_||this);const a=this.dispatching_||(this.dispatching_={}),o=this.pendingRemovals_||(this.pendingRemovals_={});n in a||(a[n]=0,o[n]=0),++a[n];let h;for(let l=0,c=s.length;l0:!1}removeEventListener(t,e){if(!this.listeners_)return;const n=this.listeners_[t];if(!n)return;const s=n.indexOf(e);s!==-1&&(this.pendingRemovals_&&t in this.pendingRemovals_?(n[s]=Gs,++this.pendingRemovals_[t]):(n.splice(s,1),n.length===0&&delete this.listeners_[t]))}}const Z={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"};function lt(i,t,e,n,s){if(n&&n!==i&&(e=e.bind(n)),s){const a=e;e=function(){i.removeEventListener(t,e),a.apply(this,arguments)}}const r={target:i,type:t,listener:e};return i.addEventListener(t,e),r}function _o(i,t,e,n){return lt(i,t,e,n,!0)}function Mt(i){i&&i.target&&(i.target.removeEventListener(i.type,i.listener),Ra(i))}class Ia extends ba{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(Z.CHANGE)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){const n=t.length,s=new Array(n);for(let r=0;r1?(e=s,n=r):h>0&&(e+=a*h,n+=o*h)}return us(i,t,e,n)}function us(i,t,e,n){const s=e-i,r=n-t;return s*s+r*r}function e_(i){const t=i.length;for(let n=0;nr&&(r=h,s=o)}if(r===0)return null;const a=i[s];i[s]=i[n],i[n]=a;for(let o=n+1;o=0;n--){e[n]=i[n][t]/i[n][n];for(let s=n-1;s>=0;s--)i[s][t]-=i[s][n]*e[n]}return e}function Oc(i){return i*180/Math.PI}function Ei(i){return i*Math.PI/180}function ds(i,t){const e=i%t;return e*t<0?e+t:e}function me(i,t,e){return i+e*(t-i)}function Yo(i,t){const e=Math.pow(10,t);return Math.round(i*e)/e}function Dc(i,t){return Math.round(Yo(i,t))}function ns(i,t){return Math.floor(Yo(i,t))}function Ji(i,t){return Math.ceil(Yo(i,t))}class bd extends ri{constructor(t){super(),this.on,this.once,this.un,this.background_=t.background;const e=Object.assign({},t);typeof t.properties=="object"&&(delete e.properties,Object.assign(e,t.properties)),e[yt.OPACITY]=t.opacity!==void 0?t.opacity:1,ct(typeof e[yt.OPACITY]=="number","Layer opacity must be a number"),e[yt.VISIBLE]=t.visible!==void 0?t.visible:!0,e[yt.Z_INDEX]=t.zIndex,e[yt.MAX_RESOLUTION]=t.maxResolution!==void 0?t.maxResolution:1/0,e[yt.MIN_RESOLUTION]=t.minResolution!==void 0?t.minResolution:0,e[yt.MIN_ZOOM]=t.minZoom!==void 0?t.minZoom:-1/0,e[yt.MAX_ZOOM]=t.maxZoom!==void 0?t.maxZoom:1/0,this.className_=e.className!==void 0?e.className:"ol-layer",delete e.className,this.setProperties(e),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(t){const e=this.state_||{layer:this,managed:t===void 0?!0:t},n=this.getZIndex();return e.opacity=It(Math.round(this.getOpacity()*100)/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=n===void 0&&!e.managed?1/0:n,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e}getLayersArray(t){return ht()}getLayerStatesArray(t){return ht()}getExtent(){return this.get(yt.EXTENT)}getMaxResolution(){return this.get(yt.MAX_RESOLUTION)}getMinResolution(){return this.get(yt.MIN_RESOLUTION)}getMinZoom(){return this.get(yt.MIN_ZOOM)}getMaxZoom(){return this.get(yt.MAX_ZOOM)}getOpacity(){return this.get(yt.OPACITY)}getSourceState(){return ht()}getVisible(){return this.get(yt.VISIBLE)}getZIndex(){return this.get(yt.Z_INDEX)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(yt.EXTENT,t)}setMaxResolution(t){this.set(yt.MAX_RESOLUTION,t)}setMinResolution(t){this.set(yt.MIN_RESOLUTION,t)}setMaxZoom(t){this.set(yt.MAX_ZOOM,t)}setMinZoom(t){this.set(yt.MIN_ZOOM,t)}setOpacity(t){ct(typeof t=="number","Layer opacity must be a number"),this.set(yt.OPACITY,t)}setVisible(t){this.set(yt.VISIBLE,t)}setZIndex(t){this.set(yt.Z_INDEX,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}const Te={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"},Nt={ANIMATING:0,INTERACTING:1},Oe={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},i_=42,Sl=256,Fr={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};let Cl=class{constructor(t){this.code_=t.code,this.units_=t.units,this.extent_=t.extent!==void 0?t.extent:null,this.worldExtent_=t.worldExtent!==void 0?t.worldExtent:null,this.axisOrientation_=t.axisOrientation!==void 0?t.axisOrientation:"enu",this.global_=t.global!==void 0?t.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||Fr[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(t){this.global_=t,this.canWrapX_=!!(t&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(t){this.defaultTileGrid_=t}setExtent(t){this.extent_=t,this.canWrapX_=!!(this.global_&&t)}setWorldExtent(t){this.worldExtent_=t}setGetPointResolution(t){this.getPointResolutionFunc_=t}getPointResolutionFunc(){return this.getPointResolutionFunc_}};const Ta=6378137,ss=Math.PI*Ta,n_=[-ss,-ss,ss,ss],s_=[-180,-85,180,85],qa=Ta*Math.log(Math.tan(Math.PI/2));class qn extends Cl{constructor(t){super({code:t,units:"m",extent:n_,global:!0,worldExtent:s_,getPointResolution:function(e,n){return e/Math.cosh(n[1]/Ta)}})}}const Nc=[new qn("EPSG:3857"),new qn("EPSG:102100"),new qn("EPSG:102113"),new qn("EPSG:900913"),new qn("http://www.opengis.net/def/crs/EPSG/0/3857"),new qn("http://www.opengis.net/gml/srs/epsg.xml#3857")];function r_(i,t,e){const n=i.length;e=e>1?e:2,t===void 0&&(e>2?t=i.slice():t=new Array(n));for(let s=0;sqa?r=qa:r<-qa&&(r=-qa),t[s+1]=r}return t}function a_(i,t,e){const n=i.length;e=e>1?e:2,t===void 0&&(e>2?t=i.slice():t=new Array(n));for(let s=0;ss&&(h=h|Dt.RIGHT),or&&(h=h|Dt.ABOVE),h===Dt.UNKNOWN&&(h=Dt.INTERSECTING),h}function ve(){return[1/0,1/0,-1/0,-1/0]}function Si(i,t,e,n,s){return s?(s[0]=i,s[1]=t,s[2]=e,s[3]=n,s):[i,t,e,n]}function Aa(i){return Si(1/0,1/0,-1/0,-1/0,i)}function Pd(i,t){const e=i[0],n=i[1];return Si(e,n,e,n,t)}function bl(i,t,e,n,s){const r=Aa(s);return Dd(r,i,t,e,n)}function Us(i,t){return i[0]==t[0]&&i[2]==t[2]&&i[1]==t[1]&&i[3]==t[3]}function Od(i,t){return t[0]i[2]&&(i[2]=t[2]),t[1]i[3]&&(i[3]=t[3]),i}function Rr(i,t){t[0]i[2]&&(i[2]=t[0]),t[1]i[3]&&(i[3]=t[1])}function Dd(i,t,e,n,s){for(;et[0]?n[0]=i[0]:n[0]=t[0],i[1]>t[1]?n[1]=i[1]:n[1]=t[1],i[2]=t[0]&&i[1]<=t[3]&&i[3]>=t[1]}function Bn(i){return i[2]=a&&_<=h),!n&&r&Dt.RIGHT&&!(s&Dt.RIGHT)&&(m=f-(d-h)*g,n=m>=o&&m<=l),!n&&r&Dt.BELOW&&!(s&Dt.BELOW)&&(_=d-(f-o)/g,n=_>=a&&_<=h),!n&&r&Dt.LEFT&&!(s&Dt.LEFT)&&(m=f-(d-a)*g,n=m>=o&&m<=l)}return n}function m_(i,t,e,n){if(Bn(i))return Aa(e);let s=[];s=[i[0],i[1],i[2],i[1],i[2],i[3],i[0],i[3]],t(s,s,2);const r=[],a=[];for(let o=0,h=s.length;o=e[2])){const s=nt(e),a=Math.floor((n[0]-e[0])/s)*s;i[0]-=a,i[2]-=a}return i}function kd(i,t,e){if(t.canWrapX()){const n=t.getExtent();if(!isFinite(i[0])||!isFinite(i[2]))return[[n[0],i[1],n[2],i[3]]];Fd(i,t);const s=nt(n);if(nt(i)>s&&!e)return[[n[0],i[1],n[2],i[3]]];if(i[0]n[2])return[[i[0],i[1],n[2],i[3]],[n[0],i[1],i[2]-s,i[3]]]}return[i]}function Gd(i,t){const e=(""+i).split("."),n=(""+t).split(".");for(let s=0;sa)return 1;if(a>r)return-1}return 0}function y_(i,t){return i[0]+=+t[0],i[1]+=+t[1],i}function p_(i,t){const e=i[0],n=i[1],s=t[0],r=t[1],a=s[0],o=s[1],h=r[0],l=r[1],c=h-a,u=l-o,d=c===0&&u===0?0:(c*(e-a)+u*(n-o))/(c*c+u*u||0);let f,g;return d<=0?(f=a,g=o):d>=1?(f=h,g=l):(f=a+d*c,g=o+d*u),[f,g]}function po(i,t){let e=!0;for(let n=i.length-1;n>=0;--n)if(i[n]!=t[n]){e=!1;break}return e}function Il(i,t){const e=Math.cos(t),n=Math.sin(t),s=i[0]*e-i[1]*n,r=i[1]*e+i[0]*n;return i[0]=s,i[1]=r,i}function v_(i,t){return i[0]*=t,i[1]*=t,i}function zd(i,t){const e=i[0]-t[0],n=i[1]-t[1];return e*e+n*n}function rC(i,t){return Math.sqrt(zd(i,t))}function aC(i,t){return zd(i,p_(i,t))}function Wd(i,t){if(t.canWrapX()){const e=nt(t.getExtent()),n=Bd(i,t,e);n&&(i[0]-=n*e)}return i}function Bd(i,t,e){const n=t.getExtent();let s=0;return t.canWrapX()&&(i[0]n[2])&&(e=e||nt(n),s=Math.floor((i[0]-n[0])/e)),s}const Zo=63710088e-1;function Xh(i,t,e){e=e||Zo;const n=Ei(i[1]),s=Ei(t[1]),r=(s-n)/2,a=Ei(t[0]-i[0])/2,o=Math.sin(r)*Math.sin(r)+Math.sin(a)*Math.sin(a)*Math.cos(n)*Math.cos(s);return 2*e*Math.atan2(Math.sqrt(o),Math.sqrt(1-o))}function fh(i,t){let e=0;for(let n=0,s=i.length;n=o?t[r+h]:a[h]}return e}}function C_(i,t,e,n){const s=pt(i),r=pt(t);Bs(s,r,zc(e)),Bs(r,s,zc(n))}function oC(i,t){return jd(),Ll(i,"EPSG:4326",t!==void 0?t:"EPSG:3857")}function qe(i,t){if(i===t)return!0;const e=i.getUnits()===t.getUnits();return(i.getCode()===t.getCode()||Ho(i,t)===Tl)&&e}function Ho(i,t){const e=i.getCode(),n=t.getCode();let s=Id(e,n);return s||(s=Xd),s}function Gr(i,t){const e=pt(i),n=pt(t);return Ho(e,n)}function Ll(i,t,e){return Gr(t,e)(i,void 0,i.length)}function R_(i,t,e,n){const s=Gr(t,e);return m_(i,s,void 0)}let b_=null;function I_(){return b_}function Vh(i,t){return i}function fi(i,t){return qh&&!po(i,[0,0])&&i[0]>=-180&&i[0]<=180&&i[1]>=-90&&i[1]<=90&&(qh=!1,Ud("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),i}function Pl(i,t){return i}function vi(i,t){return i}function Wc(i,t,e){return function(n){let s,r;if(i.canWrapX()){const a=i.getExtent(),o=nt(a);n=n.slice(0),r=Bd(n,i,o),r&&(n[0]=n[0]-r*o),n[0]=It(n[0],a[0],a[2]),n[1]=It(n[1],a[1],a[3]),s=e(n)}else s=e(n);return r&&t.canWrapX()&&(s[0]+=r*nt(t.getExtent())),s}}function T_(){Yh(Nc),Yh(kc),S_(kc,Nc,r_,a_)}T_();function Bc(i,t,e){return function(n,s,r,a,o){if(!n)return;if(!s&&!t)return n;const h=t?0:r[0]*s,l=t?0:r[1]*s,c=o?o[0]:0,u=o?o[1]:0;let d=i[0]+h/2+c,f=i[2]-h/2+c,g=i[1]+l/2+u,_=i[3]-l/2+u;d>f&&(d=(f+d)/2,f=d),g>_&&(g=(_+g)/2,_=g);let m=It(n[0],d,f),y=It(n[1],g,_);if(a&&e&&s){const p=30*s;m+=-p*Math.log(1+Math.max(0,d-n[0])/p)+p*Math.log(1+Math.max(0,n[0]-f)/p),y+=-p*Math.log(1+Math.max(0,g-n[1])/p)+p*Math.log(1+Math.max(0,n[1]-_)/p)}return[m,y]}}function A_(i){return i}function Ol(i,t,e,n){const s=nt(t)/e[0],r=Pt(t)/e[1];return n?Math.min(i,Math.max(s,r)):Math.min(i,Math.min(s,r))}function Dl(i,t,e){let n=Math.min(i,t);const s=50;return n*=Math.log(1+s*Math.max(0,i/t-1))/s+1,e&&(n=Math.max(n,e),n/=Math.log(1+s*Math.max(0,e/i-1))/s+1),It(n,e/2,t*2)}function L_(i,t,e,n){return t=t!==void 0?t:!0,function(s,r,a,o){if(s!==void 0){const h=i[0],l=i[i.length-1],c=e?Ol(h,e,a,n):h;if(o)return t?Dl(s,c,l):It(s,l,c);const u=Math.min(c,s),d=Math.floor(Xo(i,u,r));return i[d]>c&&dMath.round(e*Xc[n])/Xc[n]).join(", ")+")"}function sn(i,t,e,n,s,r){r=r||[];let a=0;for(let o=t;o{if(!n)return this.getSimplifiedGeometry(e);const s=this.clone();return s.applyTransform(n),s.getSimplifiedGeometry(e)})}simplifyTransformed(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)}clone(){return ht()}closestPointXY(t,e,n,s){return ht()}containsXY(t,e){const n=this.getClosestPoint([t,e]);return n[0]===t&&n[1]===e}getClosestPoint(t,e){return e=e||[NaN,NaN],this.closestPointXY(t[0],t[1],e,1/0),e}intersectsCoordinate(t){return this.containsXY(t[0],t[1])}computeExtent(t){return ht()}getExtent(t){if(this.extentRevision_!=this.getRevision()){const e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&Aa(e),this.extentRevision_=this.getRevision()}return g_(this.extent_,t)}rotate(t,e){ht()}scale(t,e,n){ht()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return ht()}getType(){return ht()}applyTransform(t){ht()}intersectsExtent(t){return ht()}translate(t,e){ht()}transform(t,e){const n=pt(t),s=n.getUnits()=="tile-pixels"?function(r,a,o){const h=n.getExtent(),l=n.getWorldExtent(),c=Pt(l)/Pt(h);return ei(qc,l[0],l[3],c,-c,0,0,0),sn(r,0,r.length,o,qc,a),Gr(n,e)(r,a,o)}:Gr(n,e);return this.applyTransform(s),this}}class kl extends U_{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(t){return bl(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinates(){return ht()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length1)u=e;else if(d>0){for(let f=0;fs&&(s=l),r=o,a=h}return s}function Jd(i,t,e,n,s){for(let r=0,a=e.length;r0;){const u=l.pop(),d=l.pop();let f=0;const g=i[d],_=i[d+1],m=i[u],y=i[u+1];for(let p=d+n;pf&&(c=p,f=E)}f>s&&(h[(c-t)/n]=1,d+n0&&_>f)&&(g<0&&m0&&m>g)){l=u,c=d;continue}r[a++]=l,r[a++]=c,o=l,h=c,l=u,c=d}return r[a++]=l,r[a++]=c,a}function zl(i,t,e,n,s,r,a,o){for(let h=0,l=e.length;hr&&(l-o)*(r-h)-(s-o)*(c-h)>0&&a++:c<=r&&(l-o)*(r-h)-(s-o)*(c-h)<0&&a--,o=l,h=c}return a!==0}function Wl(i,t,e,n,s,r){if(e.length===0||!Mn(i,t,e[0],n,s,r))return!1;for(let a=1,o=e.length;ay&&(l=(c+u)/2,Wl(i,t,e,n,l,g)&&(m=l,y=p)),c=u}return isNaN(m)&&(m=s[r]),a?(a.push(m,g,y),a):[m,g,y]}function Z_(i,t,e,n,s){let r=[];for(let a=0,o=e.length;a=s[0]&&r[2]<=s[2]||r[1]>=s[1]&&r[3]<=s[3]?!0:H_(i,t,e,n,function(a,o){return __(s,a,o)}):!1}function yC(i,t,e,n,s){for(let r=0,a=e.length;r0}function lf(i,t,e,n,s){s=s!==void 0?s:!1;for(let r=0,a=e.length;r1&&typeof arguments[e-1]=="function"&&(n=arguments[e-1],--e);let s=0;for(;s0}getInteracting(){return this.hints_[Nt.INTERACTING]>0}cancelAnimations(){this.setHint(Nt.ANIMATING,-this.hints_[Nt.ANIMATING]);let t;for(let e=0,n=this.animations_.length;e=0;--n){const s=this.animations_[n];let r=!0;for(let a=0,o=s.length;a0?l/h.duration:1;c>=1?(h.complete=!0,c=1):r=!1;const u=h.easing(c);if(h.sourceCenter){const d=h.sourceCenter[0],f=h.sourceCenter[1],g=h.targetCenter[0],_=h.targetCenter[1];this.nextCenter_=h.targetCenter;const m=d+u*(g-d),y=f+u*(_-f);this.targetCenter_=[m,y]}if(h.sourceResolution&&h.targetResolution){const d=u===1?h.targetResolution:h.sourceResolution+u*(h.targetResolution-h.sourceResolution);if(h.anchor){const f=this.getViewportSize_(this.getRotation()),g=this.constraints_.resolution(d,0,f,!0);this.targetCenter_=this.calculateCenterZoom(g,h.anchor)}this.nextResolution_=h.targetResolution,this.targetResolution_=d,this.applyTargetState_(!0)}if(h.sourceRotation!==void 0&&h.targetRotation!==void 0){const d=u===1?ds(h.targetRotation+Math.PI,2*Math.PI)-Math.PI:h.sourceRotation+u*(h.targetRotation-h.sourceRotation);if(h.anchor){const f=this.constraints_.rotation(d,!0);this.targetCenter_=this.calculateCenterRotate(f,h.anchor)}this.nextRotation_=h.targetRotation,this.targetRotation_=d}if(this.applyTargetState_(!0),e=!0,!h.complete)break}if(r){this.animations_[n]=null,this.setHint(Nt.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const a=s[0].callback;a&&Va(a,!0)}}this.animations_=this.animations_.filter(Boolean),e&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,e){let n;const s=this.getCenterInternal();return s!==void 0&&(n=[s[0]-e[0],s[1]-e[1]],Il(n,t-this.getRotation()),y_(n,e)),n}calculateCenterZoom(t,e){let n;const s=this.getCenterInternal(),r=this.getResolution();if(s!==void 0&&r!==void 0){const a=e[0]-t*(e[0]-s[0])/r,o=e[1]-t*(e[1]-s[1])/r;n=[a,o]}return n}getViewportSize_(t){const e=this.viewportSize_;if(t){const n=e[0],s=e[1];return[Math.abs(n*Math.cos(t))+Math.abs(s*Math.sin(t)),Math.abs(n*Math.sin(t))+Math.abs(s*Math.cos(t))]}return e}setViewportSize(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const t=this.getCenterInternal();return t&&Vh(t,this.getProjection())}getCenterInternal(){return this.get(Oe.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(t){return t!==void 0?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()}calculateExtent(t){const e=this.calculateExtentInternal(t);return Pl(e,this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();const e=this.getCenterInternal();ct(e,"The view center is not defined");const n=this.getResolution();ct(n!==void 0,"The view resolution is not defined");const s=this.getRotation();return ct(s!==void 0,"The view rotation is not defined"),kr(e,n,s,t)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))}setConstrainResolution(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))}getProjection(){return this.projection_}getResolution(){return this.get(Oe.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal(vi(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const n=nt(t)/e[0],s=Pt(t)/e[1];return Math.max(n,s)}getResolutionForValueFunction(t){t=t||2;const e=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,s=Math.log(e/n)/Math.log(t);return function(r){return e/Math.pow(t,r*s)}}getRotation(){return this.get(Oe.ROTATION)}getValueForResolutionFunction(t){const e=Math.log(t||2),n=this.getConstrainedResolution(this.maxResolution_),s=this.minResolution_,r=Math.log(n/s)/e;return function(a){return Math.log(n/a)/e/r}}getViewportSizeMinusPadding_(t){let e=this.getViewportSize_(t);const n=this.padding_;return n&&(e=[e[0]-n[1]-n[3],e[1]-n[0]-n[2]]),e}getState(){const t=this.getProjection(),e=this.getResolution(),n=this.getRotation();let s=this.getCenterInternal();const r=this.padding_;if(r){const a=this.getViewportSizeMinusPadding_();s=_h(s,this.getViewportSize_(),[a[0]/2+r[3],a[1]/2+r[0]],e,n)}return{center:s.slice(0),projection:t!==void 0?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:n,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let t;const e=this.getResolution();return e!==void 0&&(t=this.getZoomForResolution(e)),t}getZoomForResolution(t){let e=this.minZoom_||0,n,s;if(this.resolutions_){const r=Xo(this.resolutions_,t,1);e=r,n=this.resolutions_[r],r==this.resolutions_.length-1?s=2:s=n/this.resolutions_[r+1]}else n=this.maxResolution_,s=this.zoomFactor_;return e+Math.log(n/t)/Math.log(s)}getResolutionForZoom(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;const e=It(Math.floor(t),0,this.resolutions_.length-2),n=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(n,It(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let n;if(ct(Array.isArray(t)||typeof t.getSimplifiedGeometry=="function","Invalid extent or geometry provided as `geometry`"),Array.isArray(t)){ct(!Bn(t),"Cannot fit empty extent provided as `geometry`");const s=vi(t,this.getProjection());n=Kc(s)}else if(t.getType()==="Circle"){const s=vi(t.getExtent(),this.getProjection());n=Kc(s),n.rotate(this.getRotation(),Ae(s))}else n=t;this.fitInternal(n,e)}rotatedExtentForGeometry(t){const e=this.getRotation(),n=Math.cos(e),s=Math.sin(-e),r=t.getFlatCoordinates(),a=t.getStride();let o=1/0,h=1/0,l=-1/0,c=-1/0;for(let u=0,d=r.length;u{this.dispatchEvent("sourceready")},0))),this.changed()}getFeatures(t){return this.renderer_?this.renderer_.getFeatures(t):Promise.resolve([])}getData(t){return!this.renderer_||!this.rendered?null:this.renderer_.getData(t)}isVisible(t){let e;const n=this.getMapInternal();!t&&n&&(t=n.getView()),t instanceof Ie?e={viewState:t.getState(),extent:t.calculateExtent()}:e=t,!e.layerStatesArray&&n&&(e.layerStatesArray=n.getLayerGroup().getLayerStatesArray());let s;e.layerStatesArray?s=e.layerStatesArray.find(a=>a.layer===this):s=this.getLayerState();const r=this.getExtent();return Xl(s,e.viewState)&&(!r||ne(r,e.extent))}getAttributions(t){if(!this.isVisible(t))return[];let e;const n=this.getSource();if(n&&(e=n.getAttributions()),!e)return[];const s=t instanceof Ie?t.getViewStateAndExtent():t;let r=e(s);return Array.isArray(r)||(r=[r]),r}render(t,e){const n=this.getRenderer();return n.prepareFrame(t)?(this.rendered=!0,n.renderFrame(t,e)):null}unrender(){this.rendered=!1}getDeclutter(){}renderDeclutter(t,e){}renderDeferred(t){const e=this.getRenderer();e&&e.renderDeferred(t)}setMapInternal(t){t||this.unrender(),this.set(yt.MAP,t)}getMapInternal(){return this.get(yt.MAP)}setMap(t){this.mapPrecomposeKey_&&(Mt(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(Mt(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=lt(t,Te.PRECOMPOSE,function(e){const s=e.frameState.layerStatesArray,r=this.getLayerState(!1);ct(!s.some(function(a){return a.layer===r.layer}),"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."),s.push(r)},this),this.mapRenderKey_=lt(this,Z.CHANGE,t.render,t),this.changed())}setSource(t){this.set(yt.SOURCE,t)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}disposeInternal(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),super.disposeInternal()}}function Xl(i,t){if(!i.visible)return!1;const e=t.resolution;if(e=i.maxResolution)return!1;const n=t.zoom;return n>i.minZoom&&n<=i.maxZoom}var Wt=[];for(var mh=0;mh<256;++mh)Wt.push((mh+256).toString(16).slice(1));function sm(i,t=0){return(Wt[i[t+0]]+Wt[i[t+1]]+Wt[i[t+2]]+Wt[i[t+3]]+"-"+Wt[i[t+4]]+Wt[i[t+5]]+"-"+Wt[i[t+6]]+Wt[i[t+7]]+"-"+Wt[i[t+8]]+Wt[i[t+9]]+"-"+Wt[i[t+10]]+Wt[i[t+11]]+Wt[i[t+12]]+Wt[i[t+13]]+Wt[i[t+14]]+Wt[i[t+15]]).toLowerCase()}var $a,rm=new Uint8Array(16);function am(){if(!$a&&($a=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!$a))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return $a(rm)}var om=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const Zc={randomUUID:om};function hm(i,t,e){if(Zc.randomUUID&&!t&&!i)return Zc.randomUUID();i=i||{};var n=i.random||(i.rng||am)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,sm(n)}const lm=bi("map:AbstractLayerModel");var Es,Xi,ta,Ms,ws,Ss,ea,Cs;class cf extends sd{constructor(e){super();O(this,Es);O(this,Xi);O(this,ta);O(this,Ms);O(this,ws);O(this,Ss,xd());O(this,ea);O(this,Cs,!1);W(this,ta,e.id??hm()),W(this,ea,El(()=>Object.fromEntries(v(this,Ss).entries()))),W(this,Ms,Zt(e.title)),W(this,ws,Zt(e.description??"")),e.attributes&&this.updateAttributes(e.attributes)}get __destroyed(){return v(this,Cs)}get map(){const e=v(this,Es);if(!e)throw new Error(`Layer '${this.id}' has not been attached to a map yet.`);return e}get id(){return v(this,ta)}get title(){return v(this,Ms).value}get description(){return v(this,ws).value}get attributes(){return v(this,ea).value}get parent(){return v(this,Xi)}get children(){return this.layers??this.sublayers??void 0}destroy(){if(!v(this,Cs)){W(this,Cs,!0),this.sublayers?.destroy(),this.layers?.destroy();try{this.emit("destroy")}catch(e){lm.warn("Unexpected error from event listener during layer destruction:",e)}}}__attachToMap(e){if(v(this,Es))throw new Error(`Layer '${this.id}' has already been attached to the map '${this.map.id}'`);W(this,Es,e)}__attachToGroup(e){if(v(this,Xi))throw new Error(`Layer '${this.id}' has already been attached to the group layer '${v(this,Xi).id}'`);W(this,Xi,e)}__detachFromGroup(){W(this,Xi,void 0)}setTitle(e){v(this,Ms).value=e}setDescription(e){v(this,ws).value=e}updateAttributes(e){const n=Reflect.ownKeys(e);Ml(()=>{for(const s of n)v(this,Ss).set(s,e[s])})}deleteAttribute(e){v(this,Ss).delete(e)}}Es=new WeakMap,Xi=new WeakMap,ta=new WeakMap,Ms=new WeakMap,ws=new WeakMap,Ss=new WeakMap,ea=new WeakMap,Cs=new WeakMap;const oo=bi("map:AbstractLayer");var je,ia,na,Rs,bn,In,bs;class Xs extends cf{constructor(e){super(e);O(this,je);O(this,ia);O(this,na);O(this,Rs);O(this,bn);O(this,In);O(this,bs);W(this,je,e.olLayer),W(this,ia,e.isBaseLayer??!1),W(this,na,e.healthCheck),W(this,Rs,gd(()=>v(this,je).getVisible())),W(this,In,v(this,je).on("change:visible",v(this,Rs).trigger)),W(this,bn,Zt(Zh(Kh(v(this,je))))),this.__setVisible(e.visible??!0)}get visible(){return v(this,Rs).value}get olLayer(){return v(this,je)}get isBaseLayer(){return v(this,ia)}get loadState(){return v(this,bn).value}destroy(){this.__destroyed||(W(this,bs,id(v(this,bs))),v(this,In)&&Nn(v(this,In)),W(this,In,void 0),this.olLayer.dispose(),super.destroy())}__attachToMap(e){super.__attachToMap(e);const{initial:n,resource:s}=cm(this,v(this,na),r=>{v(this,bn).value=r});W(this,bs,s),v(this,bn).value=n}setVisible(e){if(this.isBaseLayer){oo.warn(`Cannot change visibility of base layer '${this.id}': use activateBaseLayer() on the map's LayerCollection instead.`);return}this.__setVisible(e)}__setVisible(e){v(this,je).getVisible()!==e&&v(this,je).setVisible(e)}}je=new WeakMap,ia=new WeakMap,na=new WeakMap,Rs=new WeakMap,bn=new WeakMap,In=new WeakMap,bs=new WeakMap;function cm(i,t,e){const n=i.olLayer;if(!(n instanceof Un))return{initial:"loaded",resource:{destroy(){}}};let s=Kh(n);const r=Zh(s);let a=r,o="loading";r!=="error"&&um(i,t).then(u=>{o=u,h()});const h=()=>{const u=Zh(s),d=o==="error"?"error":u;a!==d&&(a=d,e(a))};let l;l=s?.on("change",()=>{h()});const c=n.on("change:source",()=>{l&&Nn(l),l=void 0,s=Kh(n),l=s?.on("change",()=>{h()}),h()});return{initial:a,resource:{destroy(){l&&Nn(l),Nn(c)}}}}async function um(i,t){if(t==null)return"loaded";let e;if(typeof t=="function")e=t;else if(typeof t=="string")e=async()=>{const s=await i.map.__sharedDependencies.httpService.fetch(t);return s.ok?"loaded":(oo.warn(`Health check failed for layer '${i.id}' (http status ${s.status})`),"error")};else return oo.error(`Unexpected object for 'healthCheck' parameter of layer '${i.id}'`,t),"error";try{return await e(i)}catch(n){return oo.warn(`Health check failed for layer '${i.id}'`,n),"error"}}function Kh(i){if(i instanceof Un)return i?.getSource()??void 0}function Zh(i){switch(i?.getState()){case void 0:return"loaded";case"undefined":return"not-loaded";case"loading":return"loading";case"ready":return"loaded";case"error":return"error"}}class dm extends Xs{get type(){return"simple"}get legend(){}get layers(){}get sublayers(){}}const MC=dm;function ql(i,t){return uf(i,t,[]).join("")}function uf(i,t,e){if(i.nodeType==Node.CDATA_SECTION_NODE||i.nodeType==Node.TEXT_NODE)e.push(i.nodeValue);else{let n;for(n=i.firstChild;n;n=n.nextSibling)uf(n,t,e)}return e}function fm(i){return"documentElement"in i}function gm(i){return new DOMParser().parseFromString(i,"application/xml")}function Wr(i,t){return function(e,n){const s=i.call(this,e,n);s!==void 0&&n[n.length-1].push(s)}}function vt(i,t,e){return function(n,s){const r=i.call(this,n,s);if(r!==void 0){const a=s[s.length-1],o=n.localName;let h;o in a?h=a[o]:(h=[],a[o]=h),h.push(r)}}}function b(i,t,e){return function(n,s){const r=i.call(this,n,s);if(r!==void 0){const a=s[s.length-1],o=n.localName;a[o]=r}}}function $(i,t,e){e=e!==void 0?e:{};let n,s;for(n=0,s=i.length;n{const a=this.loadedTileCallback.bind(this,n,s);return t.forEachLoadedTile(e,s,r,a)}}forEachFeatureAtCoordinate(t,e,n,s,r){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){const e=t.target;(e.getState()===U.LOADED||e.getState()===U.ERROR)&&this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return e!=U.LOADED&&e!=U.ERROR&&t.addEventListener(Z.CHANGE,this.boundHandleImageChange_),e==U.IDLE&&(t.load(),e=t.getState()),e==U.LOADED}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&t.getSourceState()==="ready"&&t.changed()}renderDeferred(t){}disposeInternal(){delete this.layer_,super.disposeInternal()}}class mf extends si{constructor(t,e,n,s){super(t),this.inversePixelTransform=e,this.frameState=n,this.context=s}}const an=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",Qm=an.includes("firefox"),ty=an.includes("safari")&&!an.includes("chrom");ty&&(an.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(an));const ey=an.includes("webkit")&&!an.includes("edge"),yf=an.includes("macintosh"),pf=typeof devicePixelRatio<"u"?devicePixelRatio:1,vf=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,Vl=typeof Image<"u"&&Image.prototype.decode,iy=typeof createImageBitmap=="function",xf=function(){let i=!1;try{const t=Object.defineProperty({},"passive",{get:function(){i=!0}});window.addEventListener("_",null,t),window.removeEventListener("_",null,t)}catch{}return i}();function jt(i,t,e,n){let s;return e&&e.length?s=e.shift():vf?s=new OffscreenCanvas(i||300,t||300):s=document.createElement("canvas"),i&&(s.width=i),t&&(s.height=t),s.getContext("2d",n)}let ph;function Eo(){return ph||(ph=jt(1,1)),ph}function Jo(i){const t=i.canvas;t.width=1,t.height=1,i.clearRect(0,0,1,1)}function wC(i){let t=i.offsetWidth;const e=getComputedStyle(i);return t+=parseInt(e.marginLeft,10)+parseInt(e.marginRight,10),t}function SC(i){let t=i.offsetHeight;const e=getComputedStyle(i);return t+=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10),t}function Hc(i,t){const e=t.parentNode;e&&e.replaceChild(i,t)}function Hh(i){return i&&i.parentNode?i.parentNode.removeChild(i):null}function ny(i){for(;i.lastChild;)i.removeChild(i.lastChild)}function sy(i,t){const e=i.childNodes;for(let n=0;;++n){const s=e[n],r=t[n];if(!s&&!r)break;if(s!==r){if(!s){i.appendChild(r);continue}if(!r){i.removeChild(s),--n;continue}i.insertBefore(r,s)}}}class Ef{constructor(){this.instructions_=[],this.zIndex=0,this.offset_=0,this.context_=new Proxy(Eo(),{get:(t,e)=>{if(typeof Eo()[e]=="function")return this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(e),this.pushMethodArgs_},set:(t,e,n)=>(this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(e,n),!0)})}pushMethodArgs_=(...t)=>(this.instructions_[this.zIndex+this.offset_].push(t),this);pushFunction(t){this.instructions_[this.zIndex+this.offset_].push(t)}getContext(){return this.context_}draw(t){this.instructions_.forEach(e=>{for(let n=0,s=e.length;n.0031308?1.055*Math.pow(r,1/2.4)-.055:r=r*12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a=a*12.92,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o=o*12.92,r=Math.min(Math.max(0,r),1),a=Math.min(Math.max(0,a),1),o=Math.min(Math.max(0,o),1),[r*255,a*255,o*255]};Br.xyz=function(i,t){var e=i[0]/255,n=i[1]/255,s=i[2]/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,s=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92;var r=e*.41239079926595+n*.35758433938387+s*.18048078840183,a=e*.21263900587151+n*.71516867876775+s*.072192315360733,o=e*.019330818715591+n*.11919477979462+s*.95053215224966;return t=t||Ut.whitepoint[2].E,[r*t[0],a*t[1],o*t[2]]};const $l={name:"luv",min:[0,-134,-140],max:[100,224,122],channel:["lightness","u","v"],alias:["LUV","cieluv","cie1976"],xyz:function(i,t,e){var n,s,r,a,o,h,l,c,u,d,f,g,_;if(r=i[0],a=i[1],o=i[2],r===0)return[0,0,0];var m=.0011070564598794539;return t=t||"D65",e=e||2,u=Ut.whitepoint[e][t][0],d=Ut.whitepoint[e][t][1],f=Ut.whitepoint[e][t][2],g=4*u/(u+15*d+3*f),_=9*d/(u+15*d+3*f),n=a/(13*r)+g||0,s=o/(13*r)+_||0,l=r>8?d*Math.pow((r+16)/116,3):d*r*m,h=l*9*n/(4*s)||0,c=l*(12-3*n-20*s)/(4*s)||0,[h,l,c]}};Ut.luv=function(i,t,e){var n,s,r,a,o,h,l,c,u,d,f,g,_,m=.008856451679035631,y=903.2962962962961;t=t||"D65",e=e||2,u=Ut.whitepoint[e][t][0],d=Ut.whitepoint[e][t][1],f=Ut.whitepoint[e][t][2],g=4*u/(u+15*d+3*f),_=9*d/(u+15*d+3*f),h=i[0],l=i[1],c=i[2],n=4*h/(h+15*l+3*c)||0,s=9*l/(h+15*l+3*c)||0;var p=l/d;return r=p<=m?y*p:116*Math.pow(p,1/3)-16,a=13*r*(n-g),o=13*r*(s-_),[r,a,o]};var Mf={name:"lchuv",channel:["lightness","chroma","hue"],alias:["LCHuv","cielchuv"],min:[0,0,0],max:[100,100,360],luv:function(i){var t=i[0],e=i[1],n=i[2],s,r,a;return a=n/360*2*Math.PI,s=e*Math.cos(a),r=e*Math.sin(a),[t,s,r]},xyz:function(i){return $l.xyz(Mf.luv(i))}};$l.lchuv=function(i){var t=i[0],e=i[1],n=i[2],s=Math.sqrt(e*e+n*n),r=Math.atan2(n,e),a=r*360/2/Math.PI;return a<0&&(a+=360),[t,s,a]};Ut.lchuv=function(i){return $l.lchuv(Ut.luv(i))};const Jc={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};var Qc={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function ry(i){var t,e=[],n=1,s;if(typeof i=="number")return{space:"rgb",values:[i>>>16,(i&65280)>>>8,i&255],alpha:1};if(typeof i=="number")return{space:"rgb",values:[i>>>16,(i&65280)>>>8,i&255],alpha:1};if(i=String(i).toLowerCase(),Jc[i])e=Jc[i].slice(),s="rgb";else if(i==="transparent")n=0,s="rgb",e=[0,0,0];else if(i[0]==="#"){var r=i.slice(1),a=r.length,o=a<=4;n=1,o?(e=[parseInt(r[0]+r[0],16),parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16)],a===4&&(n=parseInt(r[3]+r[3],16)/255)):(e=[parseInt(r[0]+r[1],16),parseInt(r[2]+r[3],16),parseInt(r[4]+r[5],16)],a===8&&(n=parseInt(r[6]+r[7],16)/255)),e[0]||(e[0]=0),e[1]||(e[1]=0),e[2]||(e[2]=0),s="rgb"}else if(t=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(i)){var h=t[1];s=h.replace(/a$/,"");var l=s==="cmyk"?4:s==="gray"?1:3;e=t[2].trim().split(/\s*[,\/]\s*|\s+/),s==="color"&&(s=e.shift()),e=e.map(function(c,u){if(c[c.length-1]==="%")return c=parseFloat(c)/100,u===3?c:s==="rgb"?c*255:s[0]==="h"||s[0]==="l"&&!u?c*100:s==="lab"?c*125:s==="lch"?u<2?c*150:c*360:s[0]==="o"&&!u?c:s==="oklab"?c*.4:s==="oklch"?u<2?c*.4:c*360:c;if(s[u]==="h"||u===2&&s[s.length-1]==="h"){if(Qc[c]!==void 0)return Qc[c];if(c.endsWith("deg"))return parseFloat(c);if(c.endsWith("turn"))return parseFloat(c)*360;if(c.endsWith("grad"))return parseFloat(c)*360/400;if(c.endsWith("rad"))return parseFloat(c)*180/Math.PI}return c==="none"?0:parseFloat(c)}),n=e.length>l?e.pop():1}else/[0-9](?:\s|\/|,)/.test(i)&&(e=i.match(/([0-9]+)/g).map(function(c){return parseFloat(c)}),s=i.match(/([a-z])/ig)?.join("")?.toLowerCase()||"rgb");return{space:s,values:e,alpha:n}}const vh={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(i){var t=i[0]/360,e=i[1]/100,n=i[2]/100,s,r,a,o,h,l=0;if(e===0)return h=n*255,[h,h,h];for(r=n<.5?n*(1+e):n+e-n*e,s=2*n-r,o=[0,0,0];l<3;)a=t+1/3*-(l-1),a<0?a++:a>1&&a--,h=6*a<1?s+(r-s)*6*a:2*a<1?r:3*a<2?s+(r-s)*(2/3-a)*6:s,o[l++]=h*255;return o}};Br.hsl=function(i){var t=i[0]/255,e=i[1]/255,n=i[2]/255,s=Math.min(t,e,n),r=Math.max(t,e,n),a=r-s,o,h,l;return r===s?o=0:t===r?o=(e-n)/a:e===r?o=2+(n-t)/a:n===r&&(o=4+(t-e)/a),o=Math.min(o*60,360),o<0&&(o+=360),l=(s+r)/2,r===s?h=0:l<=.5?h=a/(r+s):h=a/(2-r-s),[o,h*100,l*100]};function ay(i){Array.isArray(i)&&i.raw&&(i=String.raw(...arguments)),i instanceof Number&&(i=+i);var t,e=ry(i);if(!e.space)return[];const n=e.space[0]==="h"?vh.min:Br.min,s=e.space[0]==="h"?vh.max:Br.max;return t=Array(3),t[0]=Math.min(Math.max(e.values[0],n[0]),s[0]),t[1]=Math.min(Math.max(e.values[1],n[1]),s[1]),t[2]=Math.min(Math.max(e.values[2],n[2]),s[2]),e.space[0]==="h"&&(t=vh.rgb(t)),t.push(Math.min(Math.max(e.alpha,0),1)),t}function oy(i){return typeof i=="string"?i:Zl(i)}const hy=1024,dr={};let xh=0;function ly(i){if(i.length===4)return i;const t=i.slice();return t[3]=1,t}function tu(i){const t=Ut.lchuv(Br.xyz(i));return t[3]=i[3],t}function cy(i){const t=Ut.rgb(Mf.xyz(i));return t[3]=i[3],t}function Kl(i){if(dr.hasOwnProperty(i))return dr[i];if(xh>=hy){let e=0;for(const n in dr)e++&3||(delete dr[n],--xh)}const t=ay(i);if(t.length!==4)throw new Error('Failed to parse "'+i+'" as color');for(const e of t)if(isNaN(e))throw new Error('Failed to parse "'+i+'" as color');return wf(t),dr[i]=t,++xh,t}function Ur(i){return Array.isArray(i)?i:Kl(i)}function wf(i){return i[0]=It(i[0]+.5|0,0,255),i[1]=It(i[1]+.5|0,0,255),i[2]=It(i[2]+.5|0,0,255),i[3]=It(i[3],0,1),i}function Zl(i){let t=i[0];t!=(t|0)&&(t=t+.5|0);let e=i[1];e!=(e|0)&&(e=e+.5|0);let n=i[2];n!=(n|0)&&(n=n+.5|0);const s=i[3]===void 0?1:Math.round(i[3]*1e3)/1e3;return"rgba("+t+","+e+","+n+","+s+")"}function uy(i){try{return Kl(i),!0}catch{return!1}}const eu=[];let Jn=null;function dy(){Jn=jt(1,1,void 0,{willReadFrequently:!0})}class Hl extends Jm{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=Ge(),this.pixelTransform=Ge(),this.inversePixelTransform=Ge(),this.context=null,this.deferredContext_=null,this.containerReused=!1,this.pixelContext_=null,this.frameState=null}getImageData(t,e,n){Jn||dy(),Jn.clearRect(0,0,1,1);let s;try{Jn.drawImage(t,e,n,1,1,0,0,1,1),s=Jn.getImageData(0,0,1,1).data}catch{return Jn=null,null}return s}getBackground(t){let n=this.getLayer().getBackground();return typeof n=="function"&&(n=n(t.viewState.resolution)),n||void 0}useContainer(t,e,n){const s=this.getLayer().getClassName();let r,a;if(t&&t.className===s&&(!n||t&&t.style.backgroundColor&&ln(Ur(t.style.backgroundColor),Ur(n)))){const o=t.firstElementChild;o instanceof HTMLCanvasElement&&(a=o.getContext("2d"))}if(a&&a.canvas.style.transform===e?(this.container=t,this.context=a,this.containerReused=!0):this.containerReused?(this.container=null,this.context=null,this.containerReused=!1):this.container&&(this.container.style.backgroundColor=null),!this.container){r=document.createElement("div"),r.className=s;let o=r.style;o.position="absolute",o.width="100%",o.height="100%",a=jt();const h=a.canvas;r.appendChild(h),o=h.style,o.position="absolute",o.left="0",o.transformOrigin="top left",this.container=r,this.context=a}!this.containerReused&&n&&!this.container.style.backgroundColor&&(this.container.style.backgroundColor=n)}clipUnrotated(t,e,n){const s=Wn(n),r=Ko(n),a=$o(n),o=Vo(n);Ft(e.coordinateToPixelTransform,s),Ft(e.coordinateToPixelTransform,r),Ft(e.coordinateToPixelTransform,a),Ft(e.coordinateToPixelTransform,o);const h=this.inversePixelTransform;Ft(h,s),Ft(h,r),Ft(h,a),Ft(h,o),t.save(),t.beginPath(),t.moveTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(a[0]),Math.round(a[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.clip()}prepareContainer(t,e){const n=t.extent,s=t.viewState.resolution,r=t.viewState.rotation,a=t.pixelRatio,o=Math.round(nt(n)/s*a),h=Math.round(Pt(n)/s*a);ei(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/a,1/a,r,-o/2,-h/2),Kd(this.inversePixelTransform,this.pixelTransform);const l=z_(this.pixelTransform);if(this.useContainer(e,l,this.getBackground(t)),!this.containerReused){const c=this.context.canvas;c.width!=o||c.height!=h?(c.width=o,c.height=h):this.context.clearRect(0,0,o,h),l!==c.style.transform&&(c.style.transform=l)}}dispatchRenderEvent_(t,e,n){const s=this.getLayer();if(s.hasListener(t)){const r=new mf(t,this.inversePixelTransform,n,e);s.dispatchEvent(r)}}preRender(t,e){this.frameState=e,!e.declutter&&this.dispatchRenderEvent_(Te.PRERENDER,t,e)}postRender(t,e){e.declutter||this.dispatchRenderEvent_(Te.POSTRENDER,t,e)}renderDeferredInternal(t){}getRenderContext(t){return t.declutter&&!this.deferredContext_&&(this.deferredContext_=new Ef),t.declutter?this.deferredContext_.getContext():this.context}renderDeferred(t){t.declutter&&(this.dispatchRenderEvent_(Te.PRERENDER,this.context,t),t.declutter&&this.deferredContext_&&(this.deferredContext_.draw(this.context),this.deferredContext_.clear()),this.renderDeferredInternal(t),this.dispatchRenderEvent_(Te.POSTRENDER,this.context,t))}getRenderTransform(t,e,n,s,r,a,o){const h=r/2,l=a/2,c=s/e,u=-c,d=-t[0]+o,f=-t[1];return ei(this.tempTransform,h,l,c,u,-n,d,f)}disposeInternal(){delete this.frameState,super.disposeInternal()}}class fy extends Hl{constructor(t){super(t),this.image_=null}getImage(){return this.image_?this.image_.getImage():null}prepareFrame(t){const e=t.layerStatesArray[t.layerIndex],n=t.pixelRatio,s=t.viewState,r=s.resolution,a=this.getLayer().getSource(),o=t.viewHints;let h=t.extent;if(e.extent!==void 0&&(h=Fn(h,vi(e.extent,s.projection))),!o[Nt.ANIMATING]&&!o[Nt.INTERACTING]&&!Bn(h))if(a){const l=s.projection,c=a.getImage(h,r,n,l);c&&(this.loadImage(c)?this.image_=c:c.getState()===U.EMPTY&&(this.image_=null))}else this.image_=null;return!!this.image_}getData(t){const e=this.frameState;if(!e)return null;const n=this.getLayer(),s=Ft(e.pixelToCoordinateTransform,t.slice()),r=n.getExtent();if(r&&!kn(r,s))return null;const a=this.image_.getExtent(),o=this.image_.getImage(),h=nt(a),l=Math.floor(o.width*((s[0]-a[0])/h));if(l<0||l>=o.width)return null;const c=Pt(a),u=Math.floor(o.height*((a[3]-s[1])/c));return u<0||u>=o.height?null:this.getImageData(o,l,u)}renderFrame(t,e){const n=this.image_,s=n.getExtent(),r=n.getResolution(),[a,o]=Array.isArray(r)?r:[r,r],h=n.getPixelRatio(),l=t.layerStatesArray[t.layerIndex],c=t.pixelRatio,u=t.viewState,d=u.center,f=u.resolution,g=c*a/(f*h),_=c*o/(f*h);this.prepareContainer(t,e);const m=this.context.canvas.width,y=this.context.canvas.height,p=this.getRenderContext(t);let x=!1,M=!0;if(l.extent){const I=vi(l.extent,u.projection);M=ne(I,t.extent),x=M&&!Ve(I,t.extent),x&&this.clipUnrotated(p,t,I)}const E=n.getImage(),w=ei(this.tempTransform,m/2,y/2,g,_,0,h*(s[0]-d[0])/a,h*(d[1]-s[3])/o);this.renderedResolution=o*c/h;const C=E.width*w[0],S=E.height*w[3];if(this.getLayer().getSource().getInterpolate()||(p.imageSmoothingEnabled=!1),this.preRender(p,t),M&&C>=.5&&S>=.5){const I=w[4],z=w[5],F=l.opacity;F!==1&&(p.save(),p.globalAlpha=F),p.drawImage(E,0,0,+E.width,+E.height,I,z,C,S),F!==1&&p.restore()}return this.postRender(this.context,t),x&&p.restore(),p.imageSmoothingEnabled=!0,this.container}}class gy extends Hm{constructor(t){super(t)}createRenderer(){return new fy(this)}getData(t){return super.getData(t)}}class Sf extends ba{constructor(t,e,n,s){super(),this.extent=t,this.pixelRatio_=n,this.resolution=e,this.state=typeof s=="function"?U.IDLE:s,this.image_=null,this.loader=typeof s=="function"?s:null}changed(){this.dispatchEvent(Z.CHANGE)}getExtent(){return this.extent}getImage(){return this.image_}getPixelRatio(){return this.pixelRatio_}getResolution(){return this.resolution}getState(){return this.state}load(){if(this.state==U.IDLE&&this.loader){this.state=U.LOADING,this.changed();const t=this.getResolution(),e=Array.isArray(t)?t[0]:t;Rd(()=>this.loader(this.getExtent(),e,this.getPixelRatio())).then(n=>{"image"in n&&(this.image_=n.image),"extent"in n&&(this.extent=n.extent),"resolution"in n&&(this.resolution=n.resolution),"pixelRatio"in n&&(this.pixelRatio_=n.pixelRatio),(n instanceof HTMLImageElement||n instanceof ImageBitmap||n instanceof HTMLCanvasElement||n instanceof HTMLVideoElement)&&(this.image_=n),this.state=U.LOADED}).catch(n=>{this.state=U.ERROR,console.error(n)}).finally(()=>this.changed())}}setImage(t){this.image_=t}setResolution(t){this.resolution=t}}function _y(i,t,e){const n=i;let s=!0,r=!1,a=!1;const o=[_o(n,Z.LOAD,function(){a=!0,r||t()})];return n.src&&Vl?(r=!0,n.decode().then(function(){s&&t()}).catch(function(h){s&&(a?t():e())})):o.push(_o(n,Z.ERROR,e)),function(){s=!1,o.forEach(Mt)}}function my(i,t){return new Promise((e,n)=>{function s(){a(),e(i)}function r(){a(),n(new Error("Image load error"))}function a(){i.removeEventListener("load",s),i.removeEventListener("error",r)}i.addEventListener("load",s),i.addEventListener("error",r)})}function Cf(i,t){return t&&(i.src=t),i.src&&Vl?new Promise((e,n)=>i.decode().then(()=>e(i)).catch(s=>i.complete&&i.width?e(i):n(s))):my(i)}function Rf(i,t){return t&&(i.src=t),i.src&&Vl&&iy?i.decode().then(()=>createImageBitmap(i)).catch(e=>{if(i.complete&&i.width)return i;throw e}):Cf(i)}const bf=.5,yy=10,iu=.25;class If{constructor(t,e,n,s,r,a){this.sourceProj_=t,this.targetProj_=e;let o={};const h=Gr(this.targetProj_,this.sourceProj_);this.transformInv_=function(p){const x=p[0]+"/"+p[1];return o[x]||(o[x]=h(p)),o[x]},this.maxSourceExtent_=s,this.errorThresholdSquared_=r*r,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!s&&!!this.sourceProj_.getExtent()&&nt(s)>=nt(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?nt(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?nt(this.targetProj_.getExtent()):null;const l=Wn(n),c=Ko(n),u=$o(n),d=Vo(n),f=this.transformInv_(l),g=this.transformInv_(c),_=this.transformInv_(u),m=this.transformInv_(d),y=yy+(a?Math.max(0,Math.ceil(Math.log2(yo(n)/(a*a*256*256)))):0);if(this.addQuad_(l,c,u,d,f,g,_,m,y),this.wrapsXInSource_){let p=1/0;this.triangles_.forEach(function(x,M,E){p=Math.min(p,x.source[0][0],x.source[1][0],x.source[2][0])}),this.triangles_.forEach(x=>{if(Math.max(x.source[0][0],x.source[1][0],x.source[2][0])-p>this.sourceWorldWidth_/2){const M=[[x.source[0][0],x.source[0][1]],[x.source[1][0],x.source[1][1]],[x.source[2][0],x.source[2][1]]];M[0][0]-p>this.sourceWorldWidth_/2&&(M[0][0]-=this.sourceWorldWidth_),M[1][0]-p>this.sourceWorldWidth_/2&&(M[1][0]-=this.sourceWorldWidth_),M[2][0]-p>this.sourceWorldWidth_/2&&(M[2][0]-=this.sourceWorldWidth_);const E=Math.min(M[0][0],M[1][0],M[2][0]);Math.max(M[0][0],M[1][0],M[2][0])-E.5&&u<1;let g=!1;if(l>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const m=mo([t,e,n,s]);g=nt(m)/this.targetWorldWidth_>iu||g}!f&&this.sourceProj_.isGlobal()&&u&&(g=u>iu||g)}if(!g&&this.maxSourceExtent_&&isFinite(c[0])&&isFinite(c[1])&&isFinite(c[2])&&isFinite(c[3])&&!ne(c,this.maxSourceExtent_))return;let _=0;if(!g&&(!isFinite(r[0])||!isFinite(r[1])||!isFinite(a[0])||!isFinite(a[1])||!isFinite(o[0])||!isFinite(o[1])||!isFinite(h[0])||!isFinite(h[1]))){if(l>0)g=!0;else if(_=(!isFinite(r[0])||!isFinite(r[1])?8:0)+(!isFinite(a[0])||!isFinite(a[1])?4:0)+(!isFinite(o[0])||!isFinite(o[1])?2:0)+(!isFinite(h[0])||!isFinite(h[1])?1:0),_!=1&&_!=2&&_!=4&&_!=8)return}if(l>0){if(!g){const m=[(t[0]+n[0])/2,(t[1]+n[1])/2],y=this.transformInv_(m);let p;f?p=(ds(r[0],d)+ds(o[0],d))/2-ds(y[0],d):p=(r[0]+o[0])/2-y[0];const x=(r[1]+o[1])/2-y[1];g=p*p+x*x>this.errorThresholdSquared_}if(g){if(Math.abs(t[0]-n[0])<=Math.abs(t[1]-n[1])){const m=[(e[0]+n[0])/2,(e[1]+n[1])/2],y=this.transformInv_(m),p=[(s[0]+t[0])/2,(s[1]+t[1])/2],x=this.transformInv_(p);this.addQuad_(t,e,m,p,r,a,y,x,l-1),this.addQuad_(p,m,n,s,x,y,o,h,l-1)}else{const m=[(t[0]+e[0])/2,(t[1]+e[1])/2],y=this.transformInv_(m),p=[(n[0]+s[0])/2,(n[1]+s[1])/2],x=this.transformInv_(p);this.addQuad_(t,m,p,s,r,y,x,h,l-1),this.addQuad_(m,e,n,p,y,a,o,x,l-1)}return}}if(f){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}_&11||this.addTriangle_(t,n,s,r,o,h),_&14||this.addTriangle_(t,n,e,r,o,a),_&&(_&13||this.addTriangle_(e,s,t,a,h,r),_&7||this.addTriangle_(e,s,n,a,h,o))}calculateSourceExtent(){const t=ve();return this.triangles_.forEach(function(e,n,s){const r=e.source;Rr(t,r[0]),Rr(t,r[1]),Rr(t,r[2])}),t}getTriangles(){return this.triangles_}}let Eh;const _s=[];function nu(i,t,e,n,s){i.beginPath(),i.moveTo(0,0),i.lineTo(t,e),i.lineTo(n,s),i.closePath(),i.save(),i.clip(),i.fillRect(0,0,Math.max(t,n)+1,Math.max(e,s)),i.restore()}function Mh(i,t){return Math.abs(i[t*4]-210)>2||Math.abs(i[t*4+3]-.75*255)>2}function py(){if(Eh===void 0){const i=jt(6,6,_s);i.globalCompositeOperation="lighter",i.fillStyle="rgba(210, 0, 0, 0.75)",nu(i,4,5,4,0),nu(i,4,5,0,5);const t=i.getImageData(0,0,3,3).data;Eh=Mh(t,0)||Mh(t,4)||Mh(t,8),Jo(i),_s.push(i.canvas)}return Eh}function Mo(i,t,e,n){const s=Ll(e,t,i);let r=Gc(t,n,e);const a=t.getMetersPerUnit();a!==void 0&&(r*=a);const o=i.getMetersPerUnit();o!==void 0&&(r/=o);const h=i.getExtent();if(!h||kn(h,s)){const l=Gc(i,r,s)/r;isFinite(l)&&l>0&&(r/=l)}return r}function vy(i,t,e,n){const s=Ae(e);let r=Mo(i,t,s,n);return(!isFinite(r)||r<=0)&&Nd(e,function(a){return r=Mo(i,t,a,n),isFinite(r)&&r>0}),r}function Tf(i,t,e,n,s,r,a,o,h,l,c,u,d,f){const g=jt(Math.round(e*i),Math.round(e*t),_s);if(u||(g.imageSmoothingEnabled=!1),h.length===0)return g.canvas;g.scale(e,e);function _(E){return Math.round(E*e)/e}g.globalCompositeOperation="lighter";const m=ve();h.forEach(function(E,w,C){Od(m,E.extent)});let y;const p=e/n,x=(u?1:1+Math.pow(2,-24))/p;if(!d||h.length!==1||l!==0){if(y=jt(Math.round(nt(m)*p),Math.round(Pt(m)*p),_s),u||(y.imageSmoothingEnabled=!1),s&&f){const E=(s[0]-m[0])*p,w=-(s[3]-m[3])*p,C=nt(s)*p,S=Pt(s)*p;y.rect(E,w,C,S),y.clip()}h.forEach(function(E,w,C){if(E.image.width>0&&E.image.height>0){if(E.clipExtent){y.save();const A=(E.clipExtent[0]-m[0])*p,G=-(E.clipExtent[3]-m[3])*p,X=nt(E.clipExtent)*p,V=Pt(E.clipExtent)*p;y.rect(u?A:Math.round(A),u?G:Math.round(G),u?X:Math.round(A+X)-Math.round(A),u?V:Math.round(G+V)-Math.round(G)),y.clip()}const S=(E.extent[0]-m[0])*p,I=-(E.extent[3]-m[3])*p,z=nt(E.extent)*p,F=Pt(E.extent)*p;y.drawImage(E.image,l,l,E.image.width-2*l,E.image.height-2*l,u?S:Math.round(S),u?I:Math.round(I),u?z:Math.round(S+z)-Math.round(S),u?F:Math.round(I+F)-Math.round(I)),E.clipExtent&&y.restore()}})}const M=Wn(a);return o.getTriangles().forEach(function(E,w,C){const S=E.source,I=E.target;let z=S[0][0],F=S[0][1],A=S[1][0],G=S[1][1],X=S[2][0],V=S[2][1];const L=_((I[0][0]-M[0])/r),it=_(-(I[0][1]-M[1])/r),Q=_((I[1][0]-M[0])/r),wt=_(-(I[1][1]-M[1])/r),et=_((I[2][0]-M[0])/r),at=_(-(I[2][1]-M[1])/r),st=z,xt=F;z=0,F=0,A-=st,G-=xt,X-=st,V-=xt;const P=[[A,G,0,0,Q-L],[X,V,0,0,et-L],[0,0,A,G,wt-it],[0,0,X,V,at-it]],Jt=e_(P);if(!Jt)return;if(g.save(),g.beginPath(),py()||!u){g.moveTo(Q,wt);const Lt=4,Le=L-Q,un=it-wt;for(let Qt=0;Qtthis.getImageInternal(a,o,h,r),this.getInterpolate()),this.reprojectedRevision_=this.getRevision(),this.reprojectedImage_}getImageInternal(t,e,n,s){if(this.loader){const r=Af(t,e,n,1),a=this.findNearestResolution(e);if(this.image&&(this.static_||this.wantedProjection_===s&&(this.wantedExtent_&&Ve(this.wantedExtent_,r)||Ve(this.image.getExtent(),r))&&(this.wantedResolution_&&Jh(this.wantedResolution_)===a||Jh(this.image.getResolution())===a)))return this.image;this.wantedProjection_=s,this.wantedExtent_=r,this.wantedResolution_=a,this.image=new Sf(r,a,n,this.loader),this.image.addEventListener(Z.CHANGE,this.handleImageChange.bind(this))}return this.image}handleImageChange(t){const e=t.target;let n;switch(e.getState()){case U.LOADING:this.loading=!0,n=wh.IMAGELOADSTART;break;case U.LOADED:this.loading=!1,n=wh.IMAGELOADEND;break;case U.ERROR:this.loading=!1,n=wh.IMAGELOADERROR;break;default:return}this.hasListener(n)&&this.dispatchEvent(new Ey(n,e))}}function wy(i,t){i.getImage().src=t}function Af(i,t,e,n){const s=t/e,r=Ae(i),a=Ji(nt(i)/s,Qi),o=Ji(Pt(i)/s,Qi),h=Ji((n-1)*a/2,Qi),l=a+2*h,c=Ji((n-1)*o/2,Qi),u=o+2*c;return kr(r,s,0,[l,u])}function wo(i,t){const e=[];Object.keys(t).forEach(function(s){t[s]!==null&&t[s]!==void 0&&e.push(s+"="+encodeURIComponent(t[s]))});const n=e.join("&");return i=i.replace(/[?&]$/,""),i+=i.includes("?")?"&":"?",i+n}const Lf="1.3.0",ru=[101,101];function Pf(i,t,e,n,s){s.WIDTH=e[0],s.HEIGHT=e[1];const r=n.getAxisOrientation();let a;const o=Gd(s.VERSION,"1.3")>=0;return s[o?"CRS":"SRS"]=n.getCode(),o&&r.substr(0,2)=="ne"?a=[t[1],t[0],t[3],t[2]]:a=t,s.BBOX=a.join(","),wo(i,s)}function Sy(i,t,e,n,s,r,a){r=Object.assign({REQUEST:"GetMap"},r);const o=t/e,h=[Dc(nt(i)/o,Qi),Dc(Pt(i)/o,Qi)];if(e!=1)switch(a){case"geoserver":const c=90*e+.5|0;"FORMAT_OPTIONS"in r?r.FORMAT_OPTIONS+=";dpi:"+c:r.FORMAT_OPTIONS="dpi:"+c;break;case"mapserver":r.MAP_RESOLUTION=90*e;break;case"carmentaserver":case"qgis":r.DPI=90*e;break;default:throw new Error("Unknown `serverType` configured")}return Pf(s,i,h,n,r)}function Of(i,t){return Object.assign({REQUEST:t,SERVICE:"WMS",VERSION:Lf,FORMAT:"image/png",STYLES:"",TRANSPARENT:!0},i)}function Cy(i){const t=i.hidpi===void 0?!0:i.hidpi,e=pt(i.projection||"EPSG:3857"),n=i.ratio||1.5,s=i.load||Rf;return(r,a,o)=>{r=Af(r,a,o,n),o!=1&&(!t||i.serverType===void 0)&&(o=1);const h=Sy(r,a,o,e,i.url,Of(i.params,"GetMap"),i.serverType),l=new Image;return i.crossOrigin!==null&&(l.crossOrigin=i.crossOrigin),s(l,h).then(c=>({image:c,extent:r,pixelRatio:o}))}}function Ry(i,t,e){if(i.url===void 0)return;const n=pt(i.projection||"EPSG:3857"),s=kr(t,e,0,ru),r={QUERY_LAYERS:i.params.LAYERS,INFO_FORMAT:"application/json"};Object.assign(r,Of(i.params,"GetFeatureInfo"),i.params);const a=ns((t[0]-s[0])/e,Qi),o=ns((s[3]-t[1])/e,Qi),h=Gd(r.VERSION,"1.3")>=0;return r[h?"I":"X"]=a,r[h?"J":"Y"]=o,Pf(i.url,s,ru,n,r)}function by(i,t){if(i.url===void 0)return;const e={SERVICE:"WMS",VERSION:Lf,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(i.params===void 0||i.params.LAYER===void 0){const n=i.params.LAYERS;if(!(!Array.isArray(n)||n.length===1))return;e.LAYER=n}if(t!==void 0){const n=pt(i.projection||"EPSG:3857").getMetersPerUnit()||1,s=28e-5;e.SCALE=t*n/s}return Object.assign(e,i.params),wo(i.url,e)}class Iy extends My{constructor(t){t=t||{},super({attributions:t.attributions,interpolate:t.interpolate,projection:t.projection,resolutions:t.resolutions}),this.crossOrigin_=t.crossOrigin!==void 0?t.crossOrigin:null,this.url_=t.url,this.imageLoadFunction_=t.imageLoadFunction!==void 0?t.imageLoadFunction:wy,this.params_=Object.assign({},t.params),this.serverType_=t.serverType,this.hidpi_=t.hidpi!==void 0?t.hidpi:!0,this.renderedRevision_=0,this.ratio_=t.ratio!==void 0?t.ratio:1.5,this.loaderProjection_=null}getFeatureInfoUrl(t,e,n,s){const r=pt(n),a=this.getProjection();a&&a!==r&&(e=Mo(a,r,t,e),t=Ll(t,r,a));const o={url:this.url_,params:{...this.params_,...s},projection:a||r};return Ry(o,t,e)}getLegendUrl(t,e){return by({url:this.url_,params:{...this.params_,...e}},t)}getParams(){return this.params_}getImageInternal(t,e,n,s){return this.url_===void 0?null:((!this.loader||this.loaderProjection_!==s)&&(this.loaderProjection_=s,this.loader=Cy({crossOrigin:this.crossOrigin_,params:this.params_,projection:s,serverType:this.serverType_,hidpi:this.hidpi_,url:this.url_,ratio:this.ratio_,load:(r,a)=>(this.image.setImage(r),this.imageLoadFunction_(this.image,a),Rf(r))})),super.getImageInternal(t,e,n,s))}getImageLoadFunction(){return this.imageLoadFunction_}getUrl(){return this.url_}setImageLoadFunction(t){this.imageLoadFunction_=t,this.changed()}setUrl(t){t!=this.url_&&(this.url_=t,this.loader=null,this.changed())}updateParams(t){Object.assign(this.params_,t),this.changed()}changed(){this.image=null,super.changed()}}async function Df(i,t,e){const n=await t.fetch(i,{signal:e});if(!n.ok)throw new Error("Request failed: "+n.status);return await n.text()}var qi;class Nf{constructor(t){O(this,qi);W(this,qi,t)}destroy(){for(const t of v(this,qi))t.destroy();W(this,qi,[])}getItems(t){return this.getSublayers(t)}getSublayers(t){return v(this,qi).slice()}__getRawSublayers(){return v(this,qi)}}qi=new WeakMap;const ho=bi("map:WMSLayer");var Is,Tn,Ts,As,sa,ra,aa,Ls,ni,Ff,kf,Gf,zf;class CC extends Xs{constructor(e){const n=new gy;super({...e,olLayer:n});O(this,ni);O(this,Is);O(this,Tn);O(this,Ts);O(this,As);O(this,sa);O(this,ra,new AbortController);O(this,aa);O(this,Ls);const s=new Iy({...e.sourceOptions,url:e.url,params:{...e.sourceOptions?.params},imageLoadFunction:(r,a)=>B(this,ni,zf).call(this,r,a).catch(o=>{ho.error(`Failed to load tile at '${a}'`,o)})});W(this,Is,e.url),W(this,As,s),W(this,Ts,n),W(this,Tn,new Nf(Wf(e.sublayers))),W(this,aa,El(()=>B(this,ni,kf).call(this),{equal(r,a){return r.length===a.length&&r.every((o,h)=>o===a[h])}})),W(this,Ls,B0(()=>[v(this,aa).value],([r])=>{B(this,ni,Ff).call(this,r)},{immediate:!0}))}destroy(){v(this,ra).abort(),W(this,Ls,id(v(this,Ls))),super.destroy()}get type(){return"wms"}get legend(){}get url(){return v(this,Is)}get layers(){}get sublayers(){return v(this,Tn)}get capabilities(){return v(this,sa)}__attachToMap(e){super.__attachToMap(e);for(const s of v(this,Tn).getSublayers())s.__attach(e,this,this);const n=(s,r)=>{for(const a of s){const o=a.sublayers.getSublayers();o.length?n(o,r):a.name&&r.push(a)}};B(this,ni,Gf).call(this).then(s=>{Ml(()=>{const a=new vm().read(s);W(this,sa,a);const o=[];n(v(this,Tn).getSublayers(),o);for(const h of o){const l=Ay(a,h.name);h.__setLegend(l)}})}).catch(s=>{if(Dr(s)){ho.debug(`Layer ${this.id} has been destroyed before fetching capabilities`);return}ho.error(`Failed to fetch WMS capabilities for layer ${this.id}`,s)})}}Is=new WeakMap,Tn=new WeakMap,Ts=new WeakMap,As=new WeakMap,sa=new WeakMap,ra=new WeakMap,aa=new WeakMap,Ls=new WeakMap,ni=new WeakSet,Ff=function(e){v(this,As).updateParams({LAYERS:e});const n=e.length===0?null:v(this,As);v(this,Ts).getSource()!==n&&v(this,Ts).setSource(n)},kf=function(){const e=[],n=s=>{if(!s.visible)return;const r=s.sublayers.__getRawSublayers();if(r.length)for(const a of r)n(a);else s.name&&e.push(s.name)};for(const s of this.sublayers.__getRawSublayers())n(s);return e},Gf=async function(){const e=this.map.__sharedDependencies.httpService,n=`${v(this,Is)}?LANGUAGE=ger&SERVICE=WMS&REQUEST=GetCapabilities`;return Df(n,e,v(this,ra).signal)},zf=async function(e,n){const s=this.map.__sharedDependencies.httpService,r=e.getImage(),a=await s.fetch(n);if(!a.ok)throw new Error(`Request failed with status ${a.status}.`);const o=await a.blob(),h=URL.createObjectURL(o),l=()=>{URL.revokeObjectURL(h),r.removeEventListener("load",l),r.removeEventListener("error",l)};r.addEventListener("load",l),r.addEventListener("error",l),r.src=h};var An,Ln,oa,ha,la,Ps;class Ty extends cf{constructor(e){super(e);O(this,An);O(this,Ln);O(this,oa);O(this,ha,Zt());O(this,la);O(this,Ps);W(this,oa,e.name),W(this,Ps,Zt(e.visible??!0)),W(this,la,new Nf(Wf(e.sublayers)))}get type(){return"wms-sublayer"}get name(){return v(this,oa)}get layers(){}get sublayers(){return v(this,la)}get parent(){const e=v(this,An);if(!e)throw new Error(`WMS sublayer ${this.id} has not been attached to its parent yet.`);return e}get parentLayer(){const e=v(this,Ln);if(!e)throw new Error(`WMS sublayer ${this.id} has not been attached to its parent yet.`);return e}get legend(){return v(this,ha).value}get visible(){return v(this,Ps).value}__attach(e,n,s){if(super.__attachToMap(e),v(this,An))throw new Error(`WMS sublayer '${this.id}' has already been attached to parent '${v(this,An).id}'`);if(W(this,An,s),v(this,Ln))throw new Error(`WMS sublayer '${this.id}' has already been attached to parent layer '${v(this,Ln).id}'`);W(this,Ln,n);for(const r of this.sublayers.__getRawSublayers())r.__attach(e,n,this)}__setLegend(e){v(this,ha).value=e}setVisible(e){v(this,Ps).value=e}}An=new WeakMap,Ln=new WeakMap,oa=new WeakMap,ha=new WeakMap,la=new WeakMap,Ps=new WeakMap;function Wf(i=[]){const t=[];try{for(const e of i)t.push(new Ty(e));return t}catch(e){for(;t.length;)t.pop()?.destroy();throw new Error("Failed to construct sublayers.",{cause:e})}}function Ay(i,t){const n=i?.Capability?.Layer;let s;const r=a=>{for(const o of a)if(o?.Name===t){const l=o.Style;if(!l||!l.length){ho.debug("No style in WMS layer capabilities - giving up.");return}s=l[0].LegendURL?.[0]?.OnlineResource}else o.Layer&&r(o.Layer)};return n&&r(n.Layer),s}const q={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4},ge=[null,"http://www.opengis.net/ows/1.1"],Ly=$(ge,{ServiceIdentification:b(ip),ServiceProvider:b(sp),OperationsMetadata:b(tp)});class Py extends Yl{constructor(){super()}readFromNode(t){const e=J({},Ly,t,[]);return e||null}}const Oy=$(ge,{DeliveryPoint:b(k),City:b(k),AdministrativeArea:b(k),PostalCode:b(k),Country:b(k),ElectronicMailAddress:b(k)}),Dy=$(ge,{Value:vt(rp)}),Ny=$(ge,{AllowedValues:b(Vy)}),Fy=$(ge,{Phone:b(ep),Address:b(Yy)}),ky=$(ge,{HTTP:b(Jy)}),Gy=$(ge,{Get:vt(Hy),Post:void 0}),zy=$(ge,{DCP:b(Zy)}),Wy=$(ge,{Operation:Qy}),By=$(ge,{Voice:b(k),Facsimile:b(k)}),Uy=$(ge,{Constraint:vt($y)}),jy=$(ge,{IndividualName:b(k),PositionName:b(k),ContactInfo:b(Ky)}),Xy=$(ge,{Abstract:b(k),AccessConstraints:b(k),Fees:b(k),Title:b(k),ServiceTypeVersion:b(k),ServiceType:b(k)}),qy=$(ge,{ProviderName:b(k),ProviderSite:b(Qs),ServiceContact:b(np)});function Yy(i,t){return J({},Oy,i,t)}function Vy(i,t){return J({},Dy,i,t)}function $y(i,t){const e=i.getAttribute("name");if(e)return J({name:e},Ny,i,t)}function Ky(i,t){return J({},Fy,i,t)}function Zy(i,t){return J({},ky,i,t)}function Hy(i,t){const e=Qs(i);if(e)return J({href:e},Uy,i,t)}function Jy(i,t){return J({},Gy,i,t)}function Qy(i,t){const e=i.getAttribute("name"),n=J({},zy,i,t);if(!n)return;const s=t[t.length-1];s[e]=n}function tp(i,t){return J({},Wy,i,t)}function ep(i,t){return J({},By,i,t)}function ip(i,t){return J({},Xy,i,t)}function np(i,t){return J({},jy,i,t)}function sp(i,t){return J({},qy,i,t)}function rp(i,t){return k(i)}const ai=[null,"http://www.opengis.net/wmts/1.0"],tr=[null,"http://www.opengis.net/ows/1.1"],ap=$(ai,{Contents:b(yp)});class op extends Yl{constructor(){super(),this.owsParser_=new Py}readFromNode(t){let e=t.getAttribute("version");e&&(e=e.trim());let n=this.owsParser_.readFromNode(t);return n?(n.version=e,n=J(n,ap,t,[]),n||null):null}}const hp=$(ai,{Layer:vt(pp),TileMatrixSet:vt(vp)}),lp=$(ai,{Style:vt(xp),Format:vt(k),TileMatrixSetLink:vt(Ep),Dimension:vt(Mp),ResourceURL:vt(wp)},$(tr,{Title:b(k),Abstract:b(k),WGS84BoundingBox:b(Uf),BoundingBox:vt(Sp),Identifier:b(k)})),cp=$(ai,{LegendURL:vt(Cp)},$(tr,{Title:b(k),Identifier:b(k)})),up=$(ai,{TileMatrixSet:b(k),TileMatrixSetLimits:b(bp)}),dp=$(ai,{TileMatrixLimits:Wr(Ip)}),fp=$(ai,{TileMatrix:b(k),MinTileRow:b(ke),MaxTileRow:b(ke),MinTileCol:b(ke),MaxTileCol:b(ke)}),gp=$(ai,{Default:b(k),Value:vt(k)},$(tr,{Identifier:b(k)})),Bf=$(tr,{LowerCorner:Wr(Qh),UpperCorner:Wr(Qh)}),_p=$(ai,{WellKnownScaleSet:b(k),TileMatrix:vt(Rp)},$(tr,{SupportedCRS:b(k),Identifier:b(k),BoundingBox:b(Uf)})),mp=$(ai,{TopLeftCorner:b(Qh),ScaleDenominator:b(wn),TileWidth:b(ke),TileHeight:b(ke),MatrixWidth:b(ke),MatrixHeight:b(ke)},$(tr,{Identifier:b(k)}));function yp(i,t){return J({},hp,i,t)}function pp(i,t){return J({},lp,i,t)}function vp(i,t){return J({},_p,i,t)}function xp(i,t){const e=J({},cp,i,t);if(!e)return;const n=i.getAttribute("isDefault")==="true";return e.isDefault=n,e}function Ep(i,t){return J({},up,i,t)}function Mp(i,t){return J({},gp,i,t)}function wp(i,t){const e=i.getAttribute("format"),n=i.getAttribute("template"),s=i.getAttribute("resourceType"),r={};return e&&(r.format=e),n&&(r.template=n),s&&(r.resourceType=s),r}function Uf(i,t){const e=J([],Bf,i,t);if(e.length==2)return mo(e)}function Sp(i,t){const e=i.getAttribute("crs"),n=J([],Bf,i,t);if(n.length==2)return{extent:mo(n),crs:e}}function Cp(i,t){const e={};return e.format=i.getAttribute("format"),e.href=Qs(i),e}function Qh(i,t){const e=k(i).split(/\s+/);if(!e||e.length!=2)return;const n=+e[0],s=+e[1];if(!(isNaN(n)||isNaN(s)))return[n,s]}function Rp(i,t){return J({},mp,i,t)}function bp(i,t){return J([],dp,i,t)}function Ip(i,t){return J({},fp,i,t)}const Ka={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};class Tp extends Un{constructor(t){t=t||{};const e=Object.assign({},t);delete e.preload,delete e.useInterimTilesOnError,super(e),this.on,this.once,this.un,this.setPreload(t.preload!==void 0?t.preload:0),this.setUseInterimTilesOnError(t.useInterimTilesOnError!==void 0?t.useInterimTilesOnError:!0)}getPreload(){return this.get(Ka.PRELOAD)}setPreload(t){this.set(Ka.PRELOAD,t)}getUseInterimTilesOnError(){return this.get(Ka.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(t){this.set(Ka.USE_INTERIM_TILES_ON_ERROR,t)}getData(t){return super.getData(t)}}class jf extends ba{constructor(t,e,n){super(),n=n||{},this.tileCoord=t,this.state=e,this.interimTile=null,this.key="",this.transition_=n.transition===void 0?250:n.transition,this.transitionStarts_={},this.interpolate=!!n.interpolate}changed(){this.dispatchEvent(Z.CHANGE)}release(){this.state===q.ERROR&&this.setState(q.EMPTY)}getKey(){return this.key+"/"+this.tileCoord}getInterimTile(){let t=this.interimTile;if(!t)return this;do{if(t.getState()==q.LOADED)return this.transition_=0,t;t=t.interimTile}while(t);return this}refreshInterimChain(){let t=this.interimTile;if(!t)return;let e=this;do{if(t.getState()==q.LOADED){t.interimTile=null;break}t.getState()==q.LOADING?e=t:t.getState()==q.IDLE?e.interimTile=t.interimTile:e=t,t=e.interimTile}while(t)}getTileCoord(){return this.tileCoord}getState(){return this.state}setState(t){if(this.state!==q.ERROR&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()}load(){ht()}getAlpha(t,e){if(!this.transition_)return 1;let n=this.transitionStarts_[t];if(!n)n=e,this.transitionStarts_[t]=n;else if(n===-1)return 1;const s=e-n+1e3/60;return s>=this.transition_?1:Yd(s/this.transition_)}inTransition(t){return this.transition_?this.transitionStarts_[t]!==-1:!1}endTransition(t){this.transition_&&(this.transitionStarts_[t]=-1)}}class Ql extends jf{constructor(t,e,n,s,r,a){super(t,e,a),this.crossOrigin_=s,this.src_=n,this.key=n,this.image_=new Image,s!==null&&(this.image_.crossOrigin=s),this.unlisten_=null,this.tileLoadFunction_=r}getImage(){return this.image_}setImage(t){this.image_=t,this.state=q.LOADED,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=q.ERROR,this.unlistenImage_(),this.image_=Ap(),this.changed()}handleImageLoad_(){const t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=q.LOADED:this.state=q.EMPTY,this.unlistenImage_(),this.changed()}load(){this.state==q.ERROR&&(this.state=q.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==q.IDLE&&(this.state=q.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=_y(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function Ap(){const i=jt(1,1);return i.fillStyle="rgba(0,0,0,0)",i.fillRect(0,0,1,1),i.canvas}class tl extends jf{constructor(t,e,n,s,r,a,o,h,l,c,u,d){super(r,q.IDLE,d),this.renderEdges_=u!==void 0?u:!1,this.pixelRatio_=o,this.gutter_=h,this.canvas_=null,this.sourceTileGrid_=e,this.targetTileGrid_=s,this.wrappedTileCoord_=a||r,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0,this.clipExtent_=t.canWrapX()?t.getExtent():void 0;const f=s.getTileCoordExtent(this.wrappedTileCoord_),g=this.targetTileGrid_.getExtent();let _=this.sourceTileGrid_.getExtent();const m=g?Fn(f,g):f;if(yo(m)===0){this.state=q.EMPTY;return}const y=t.getExtent();y&&(_?_=Fn(_,y):_=y);const p=s.getResolution(this.wrappedTileCoord_[0]),x=vy(t,n,m,p);if(!isFinite(x)||x<=0){this.state=q.EMPTY;return}const M=c!==void 0?c:bf;if(this.triangulation_=new If(t,n,m,_,x*M,p),this.triangulation_.getTriangles().length===0){this.state=q.EMPTY;return}this.sourceZ_=e.getZForResolution(x);let E=this.triangulation_.calculateSourceExtent();if(_&&(t.canWrapX()?(E[1]=It(E[1],_[1],_[3]),E[3]=It(E[3],_[1],_[3])):E=Fn(E,_)),!yo(E))this.state=q.EMPTY;else{let w=0,C=0;t.canWrapX()&&(w=nt(y),C=Math.floor((E[0]-y[0])/w)),kd(E.slice(),t,!0).forEach(I=>{const z=e.getTileRangeForExtentAndZ(I,this.sourceZ_);for(let F=z.minX;F<=z.maxX;F++)for(let A=z.minY;A<=z.maxY;A++){const G=l(this.sourceZ_,F,A,o);if(G){const X=C*w;this.sourceTiles_.push({tile:G,offset:X})}}++C}),this.sourceTiles_.length===0&&(this.state=q.EMPTY)}}getImage(){return this.canvas_}reproject_(){const t=[];if(this.sourceTiles_.forEach(e=>{const n=e.tile;if(n&&n.getState()==q.LOADED){const s=this.sourceTileGrid_.getTileCoordExtent(n.tileCoord);s[0]+=e.offset,s[2]+=e.offset;const r=this.clipExtent_?.slice();r&&(r[0]+=e.offset,r[2]+=e.offset),t.push({extent:s,clipExtent:r,image:n.getImage()})}}),this.sourceTiles_.length=0,t.length===0)this.state=q.ERROR;else{const e=this.wrappedTileCoord_[0],n=this.targetTileGrid_.getTileSize(e),s=typeof n=="number"?n:n[0],r=typeof n=="number"?n:n[1],a=this.targetTileGrid_.getResolution(e),o=this.sourceTileGrid_.getResolution(this.sourceZ_),h=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=Tf(s,r,this.pixelRatio_,o,this.sourceTileGrid_.getExtent(),a,h,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=q.LOADED}this.changed()}load(){if(this.state==q.IDLE){this.state=q.LOADING,this.changed();let t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(({tile:e})=>{const n=e.getState();if(n==q.IDLE||n==q.LOADING){t++;const s=lt(e,Z.CHANGE,function(r){const a=e.getState();(a==q.LOADED||a==q.ERROR||a==q.EMPTY)&&(Mt(s),t--,t===0&&(this.unlistenSources_(),this.reproject_()))},this);this.sourcesListenerKeys_.push(s)}}),t===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function({tile:e},n,s){e.getState()==q.IDLE&&e.load()})}}unlistenSources_(){this.sourcesListenerKeys_.forEach(Mt),this.sourcesListenerKeys_=null}release(){this.canvas_&&(Jo(this.canvas_.getContext("2d")),_s.push(this.canvas_),this.canvas_=null),super.release()}}class tc{constructor(t,e,n,s){this.minX=t,this.maxX=e,this.minY=n,this.maxY=s}contains(t){return this.containsXY(t[1],t[2])}containsTileRange(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY}containsXY(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY}equals(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY}extend(t){t.minXthis.maxX&&(this.maxX=t.maxX),t.minYthis.maxY&&(this.maxY=t.maxY)}getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY}}function Yn(i,t,e,n,s){return s!==void 0?(s.minX=i,s.maxX=t,s.minY=e,s.maxY=n,s):new tc(i,t,e,n)}function au(i){return i[0]>0&&i[1]>0}function Lp(i,t,e){return e===void 0&&(e=[0,0]),e[0]=i[0]*t+.5|0,e[1]=i[1]*t+.5|0,e}function pe(i,t){return Array.isArray(i)?i:(t===void 0?t=[i,i]:(t[0]=i,t[1]=i),t)}class Pp extends Hl{constructor(t){super(t),this.extentChanged=!0,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.newTiles_=!1,this.tmpExtent=ve(),this.tmpTileRange_=new tc(0,0,0,0)}isDrawableTile(t){const e=this.getLayer(),n=t.getState(),s=e.getUseInterimTilesOnError();return n==q.LOADED||n==q.EMPTY||n==q.ERROR&&!s}getTile(t,e,n,s){const r=s.pixelRatio,a=s.viewState.projection,o=this.getLayer();let l=o.getSource().getTile(t,e,n,r,a);return l.getState()==q.ERROR&&o.getUseInterimTilesOnError()&&o.getPreload()>0&&(this.newTiles_=!0),this.isDrawableTile(l)||(l=l.getInterimTile()),l}getData(t){const e=this.frameState;if(!e)return null;const n=this.getLayer(),s=Ft(e.pixelToCoordinateTransform,t.slice()),r=n.getExtent();if(r&&!kn(r,s))return null;const a=e.pixelRatio,o=e.viewState.projection,h=e.viewState,l=n.getRenderSource(),c=l.getTileGridForProjection(h.projection),u=l.getTilePixelRatio(e.pixelRatio);for(let d=c.getZForResolution(h.resolution);d>=c.getMinZoom();--d){const f=c.getTileCoordForCoordAndZ(s,d),g=l.getTile(d,f[1],f[2],a,o);if(!(g instanceof Ql||g instanceof tl)||g instanceof tl&&g.getState()===q.EMPTY)return null;if(g.getState()!==q.LOADED)continue;const _=c.getOrigin(d),m=pe(c.getTileSize(d)),y=c.getResolution(d),p=Math.floor(u*((s[0]-_[0])/y-f[1]*m[0])),x=Math.floor(u*((_[1]-s[1])/y-f[2]*m[1])),M=Math.round(u*l.getGutterForProjection(h.projection));return this.getImageData(g.getImage(),p+M,x+M)}return null}loadedTileCallback(t,e,n){return this.isDrawableTile(n)?super.loadedTileCallback(t,e,n):!1}prepareFrame(t){return!!this.getLayer().getSource()}renderFrame(t,e){const n=t.layerStatesArray[t.layerIndex],s=t.viewState,r=s.projection,a=s.resolution,o=s.center,h=s.rotation,l=t.pixelRatio,c=this.getLayer(),u=c.getSource(),d=u.getRevision(),f=u.getTileGridForProjection(r),g=f.getZForResolution(a,u.zDirection),_=f.getResolution(g);let m=t.extent;const y=t.viewState.resolution,p=u.getTilePixelRatio(l);this.prepareContainer(t,e);const x=this.context.canvas.width,M=this.context.canvas.height,E=n.extent&&vi(n.extent);E&&(m=Fn(m,vi(n.extent)));const w=_*x/2/p,C=_*M/2/p,S=[o[0]-w,o[1]-C,o[0]+w,o[1]+C],I=f.getTileRangeForExtentAndZ(m,g),z={};z[g]={};const F=this.createLoadedTileFinder(u,r,z),A=this.tmpExtent,G=this.tmpTileRange_;this.newTiles_=!1;const X=h?jh(s.center,y,h,t.size):void 0;for(let at=I.minX;at<=I.maxX;++at)for(let st=I.minY;st<=I.maxY;++st){if(h&&!f.tileCoordIntersectsViewport([g,at,st],X))continue;const xt=this.getTile(g,at,st,t);if(this.isDrawableTile(xt)){const qt=mt(this);if(xt.getState()==q.LOADED){z[g][xt.tileCoord.toString()]=xt;let Lt=xt.inTransition(qt);Lt&&n.opacity!==1&&(xt.endTransition(qt),Lt=!1),!this.newTiles_&&(Lt||!this.renderedTiles.includes(xt))&&(this.newTiles_=!0)}if(xt.getAlpha(qt,t.time)===1)continue}const P=f.getTileCoordChildTileRange(xt.tileCoord,G,A);let Jt=!1;P&&(Jt=F(g+1,P)),Jt||f.forEachTileCoordParentTileRange(xt.tileCoord,F,G,A)}const V=_/a*l/p,L=this.getRenderContext(t);ei(this.tempTransform,x/2,M/2,V,V,0,-x/2,-M/2),E&&this.clipUnrotated(L,t,E),u.getInterpolate()||(L.imageSmoothingEnabled=!1),this.preRender(L,t),this.renderedTiles.length=0;let it=Object.keys(z).map(Number);it.sort(xi);let Q,wt,et;n.opacity===1&&(!this.containerReused||u.getOpaque(t.viewState.projection))?it=it.reverse():(Q=[],wt=[]);for(let at=it.length-1;at>=0;--at){const st=it[at],xt=u.getTilePixelSize(st,l,r),Jt=f.getResolution(st)/_,qt=xt[0]*Jt*V,Lt=xt[1]*Jt*V,Le=f.getTileCoordForCoordAndZ(Wn(S),st),un=f.getTileCoordExtent(Le),Qt=Ft(this.tempTransform,[p*(un[0]-S[0])/_,p*(S[3]-un[3])/_]),Ua=p*u.getGutterForProjection(r),sr=z[st];for(const oh in sr){const Ai=sr[oh],rr=Ai.tileCoord,Li=Le[1]-rr[1],ar=Math.round(Qt[0]-(Li-1)*qt),ja=Le[2]-rr[2],hh=Math.round(Qt[1]-(ja-1)*Lt),Pe=Math.round(Qt[0]-Li*qt),xe=Math.round(Qt[1]-ja*Lt),oi=ar-Pe,dn=hh-xe,fn=g===st,Pi=fn&&Ai.getAlpha(mt(this),t.time)!==1;let gn=!1;if(!Pi)if(Q){et=[Pe,xe,Pe+oi,xe,Pe+oi,xe+dn,Pe,xe+dn];for(let Oi=0,Xn=Q.length;Oi0&&this.getCount()>this.highWaterMark}expireCache(t){for(;this.canExpireCache();)this.pop()}clear(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}containsKey(t){return this.entries_.hasOwnProperty(t)}forEach(t){let e=this.oldest_;for(;e;)t(e.value_,e.key_,this),e=e.newer}get(t,e){const n=this.entries_[t];return ct(n!==void 0,"Tried to get a value for a key that does not exist in the cache"),n===this.newest_||(n===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(n.newer.older=n.older,n.older.newer=n.newer),n.newer=null,n.older=this.newest_,this.newest_.newer=n,this.newest_=n),n.value_}remove(t){const e=this.entries_[t];return ct(e!==void 0,"Tried to get a value for a key that does not exist in the cache"),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_}getCount(){return this.count_}getKeys(){const t=new Array(this.count_);let e=0,n;for(n=this.newest_;n;n=n.older)t[e++]=n.key_;return t}getValues(){const t=new Array(this.count_);let e=0,n;for(n=this.newest_;n;n=n.older)t[e++]=n.value_;return t}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(t){return this.entries_[t]?.value_}pop(){const t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_}replace(t,e){this.get(t),this.entries_[t].value_=e}set(t,e){ct(!(t in this.entries_),"Tried to set a value for a key that is used already");const n={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=n:this.oldest_=n,this.newest_=n,this.entries_[t]=n,++this.count_}setSize(t){this.highWaterMark=t}}function ou(i,t,e,n){return n!==void 0?(n[0]=i,n[1]=t,n[2]=e,n):[i,t,e]}function La(i,t,e){return i+"/"+t+"/"+e}function qf(i){return La(i[0],i[1],i[2])}function RC(i){const[t,e,n]=i.substring(i.lastIndexOf("/")+1,i.length).split(",").map(Number);return La(t,e,n)}function Dp(i){return i.split("/").map(Number)}function Np(i){return(i[1]<e||e>t.getMaxZoom())return!1;const r=t.getFullTileRange(e);return r?r.containsXY(n,s):!0}class Yf extends Op{clear(){for(;this.getCount()>0;)this.pop().release();super.clear()}expireCache(t){for(;this.canExpireCache()&&!(this.peekLast().getKey()in t);)this.pop().release()}pruneExceptNewestZ(){if(this.getCount()===0)return;const t=this.peekFirstKey(),n=Dp(t)[0];this.forEach(s=>{s.tileCoord[0]!==n&&(this.remove(qf(s.tileCoord)),s.release())})}}const Sh={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"},Vn=[0,0,0],Di=5;class ec{constructor(t){this.minZoom=t.minZoom!==void 0?t.minZoom:0,this.resolutions_=t.resolutions,ct(J0(this.resolutions_,(s,r)=>r-s),"`resolutions` must be sorted in descending order");let e;if(!t.origins){for(let s=0,r=this.resolutions_.length-1;s{const a=new tc(Math.min(0,s[0]),Math.max(s[0]-1,-1),Math.min(0,s[1]),Math.max(s[1]-1,-1));if(n){const o=this.getTileRangeForExtentAndZ(n,r);a.minX=Math.max(o.minX,a.minX),a.maxX=Math.min(o.maxX,a.maxX),a.minY=Math.max(o.minY,a.minY),a.maxY=Math.min(o.maxY,a.maxY)}return a}):n&&this.calculateTileRanges_(n)}forEachTileCoord(t,e,n){const s=this.getTileRangeForExtentAndZ(t,e);for(let r=s.minX,a=s.maxX;r<=a;++r)for(let o=s.minY,h=s.maxY;o<=h;++o)n([e,r,o])}forEachTileCoordParentTileRange(t,e,n,s){let r,a,o,h=null,l=t[0]-1;for(this.zoomFactor_===2?(a=t[1],o=t[2]):h=this.getTileCoordExtent(t,s);l>=this.minZoom;){if(a!==void 0&&o!==void 0?(a=Math.floor(a/2),o=Math.floor(o/2),r=Yn(a,a,o,o,n)):r=this.getTileRangeForExtentAndZ(h,l,n),e(l,r))return!0;--l}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(t){return this.origin_?this.origin_:this.origins_[t]}getResolution(t){return this.resolutions_[t]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(t,e,n){if(t[0]this.maxZoom||e0?M=e.find(function(E){return x[c]==E[l]?!0:x[c].includes(":")?!1:i[c]+":"+x[c]===E[l]}):M=!0,M){s.push(x[c]);const E=x[u]*28e-5/y,w=x[f],C=x[g];p?r.push([x[d][1],x[d][0]]):r.push(x[d]),n.push(E),a.push(w==C?w:[w,C]),o.push([x.MatrixWidth,x.MatrixHeight])}}),new kp({extent:t,origins:r,resolutions:n,matrixIds:s,tileSizes:a,sizes:o})}function Vf(i){let t=i.getDefaultTileGrid();return t||(t=Up(i),i.setDefaultTileGrid(t)),t}function zp(i,t,e){const n=t[0],s=i.getTileCoordCenter(t),r=ic(e);if(!kn(r,s)){const a=nt(r),o=Math.ceil((r[0]-s[0])/a);return s[0]+=a*o,i.getTileCoordForCoordAndZ(s,n)}return t}function Wp(i,t,e,n){n=n!==void 0?n:"top-left";const s=$f(i,t,e);return new ec({extent:i,origin:f_(i,n),resolutions:s,tileSize:e})}function Bp(i){const t=i||{},e=t.extent||pt("EPSG:3857").getExtent(),n={extent:e,minZoom:t.minZoom,tileSize:t.tileSize,resolutions:$f(e,t.maxZoom,t.tileSize,t.maxResolution)};return new ec(n)}function $f(i,t,e,n){t=t!==void 0?t:i_,e=pe(e!==void 0?e:Sl);const s=Pt(i),r=nt(i);n=n>0?n:Math.max(r/e[0],s/e[1]);const a=t+1,o=new Array(a);for(let h=0;hn.highWaterMark&&(n.highWaterMark=t)}useTile(t,e,n,s){}}class Xp extends si{constructor(t,e){super(t),this.tile=e}}function qp(i,t){const e=/\{z\}/g,n=/\{x\}/g,s=/\{y\}/g,r=/\{-y\}/g;return function(a,o,h){if(a)return i.replace(e,a[0].toString()).replace(n,a[1].toString()).replace(s,a[2].toString()).replace(r,function(){const l=a[0],c=t.getFullTileRange(l);if(!c)throw new Error("The {-y} placeholder requires a tile grid with extent");return(c.getHeight()-a[2]-1).toString()})}}function Yp(i,t){const e=i.length,n=new Array(e);for(let s=0;sthis.getTileInternal(m,y,p,x,a),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.tileOptions);return _.key=u,l?(_.interimTile=l,_.refreshInterimChain(),o.replace(c,_)):o.set(c,_),_}getTileInternal(t,e,n,s,r){let a=null;const o=La(t,e,n),h=this.getKey();if(!this.tileCache.containsKey(o))a=this.createTile_(t,e,n,s,r,h),this.tileCache.set(o,a);else if(a=this.tileCache.get(o),a.key!=h){const l=a;a=this.createTile_(t,e,n,s,r,h),l.getState()==q.IDLE?a.interimTile=l.interimTile:a.interimTile=l,a.refreshInterimChain(),this.tileCache.replace(o,a)}return a}setRenderReprojectionEdges(t){if(this.renderReprojectionEdges_!=t){this.renderReprojectionEdges_=t;for(const e in this.tileCacheForProjection)this.tileCacheForProjection[e].clear();this.changed()}}setTileGridForProjection(t,e){const n=pt(t);if(n){const s=mt(n);s in this.tileGridForProjection||(this.tileGridForProjection[s]=e)}}clear(){super.clear();for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear()}}function Vp(i,t){i.getImage().src=t}class $p extends Zf{constructor(t){const e=t.requestEncoding!==void 0?t.requestEncoding:"KVP",n=t.tileGrid;let s=t.urls;s===void 0&&t.url!==void 0&&(s=Kf(t.url)),super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileClass:t.tileClass,tileGrid:n,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,urls:s,wrapX:t.wrapX!==void 0?t.wrapX:!1,transition:t.transition,zDirection:t.zDirection}),this.version_=t.version!==void 0?t.version:"1.0.0",this.format_=t.format!==void 0?t.format:"image/jpeg",this.dimensions_=t.dimensions!==void 0?t.dimensions:{},this.layer_=t.layer,this.matrixSet_=t.matrixSet,this.style_=t.style,this.requestEncoding_=e,this.setKey(this.getKeyForDimensions_()),s&&s.length>0&&(this.tileUrlFunction=el(s.map(this.createFromWMTSTemplate.bind(this))))}setUrls(t){this.urls=t;const e=t.join(` +`);this.setTileUrlFunction(el(t.map(this.createFromWMTSTemplate.bind(this))),e)}getDimensions(){return this.dimensions_}getFormat(){return this.format_}getLayer(){return this.layer_}getMatrixSet(){return this.matrixSet_}getRequestEncoding(){return this.requestEncoding_}getStyle(){return this.style_}getVersion(){return this.version_}getKeyForDimensions_(){const t=this.urls?this.urls.slice(0):[];for(const e in this.dimensions_)t.push(e+"-"+this.dimensions_[e]);return t.join("/")}updateDimensions(t){Object.assign(this.dimensions_,t),this.setKey(this.getKeyForDimensions_())}createFromWMTSTemplate(t){const e=this.requestEncoding_,n={layer:this.layer_,style:this.style_,tilematrixset:this.matrixSet_};e=="KVP"&&Object.assign(n,{Service:"WMTS",Request:"GetTile",Version:this.version_,Format:this.format_}),t=e=="KVP"?wo(t,n):t.replace(/\{(\w+?)\}/g,function(a,o){return o.toLowerCase()in n?n[o.toLowerCase()]:a});const s=this.tileGrid,r=this.dimensions_;return function(a,o,h){if(!a)return;const l={TileMatrix:s.getMatrixId(a[0]),TileCol:a[1],TileRow:a[2]};Object.assign(l,r);let c=t;return e=="KVP"?c=wo(c,l):c=c.replace(/\{(\w+?)\}/g,function(u,d){return l[d]}),c}}}function Kp(i,t){const n=i.Contents.Layer?.find(function(A){return A.Identifier==t.layer});if(!n)return null;const s=i.Contents.TileMatrixSet;let r;n.TileMatrixSetLink.length>1?"projection"in t?r=n.TileMatrixSetLink.findIndex(function(A){const X=s.find(function(it){return it.Identifier==A.TileMatrixSet}).SupportedCRS,V=pt(X),L=pt(t.projection);return V&&L?qe(V,L):X==t.projection}):r=n.TileMatrixSetLink.findIndex(function(A){return A.TileMatrixSet==t.matrixSet}):r=0,r<0&&(r=0);const a=n.TileMatrixSetLink[r].TileMatrixSet,o=n.TileMatrixSetLink[r].TileMatrixSetLimits;let h=n.Format[0];"format"in t&&(h=t.format),r=n.Style.findIndex(function(A){return"style"in t?A.Title==t.style:A.isDefault}),r<0&&(r=0);const l=n.Style[r].Identifier,c={};"Dimension"in n&&n.Dimension.forEach(function(A,G,X){const V=A.Identifier;let L=A.Default;L===void 0&&(L=A.Value[0]),c[V]=L});const d=i.Contents.TileMatrixSet.find(function(A){return A.Identifier==a});let f;const g=d.SupportedCRS;if(g&&(f=pt(g)),"projection"in t){const A=pt(t.projection);A&&(!f||qe(A,f))&&(f=A)}let _=!1;const m=f.getAxisOrientation().substr(0,2)=="ne";let y=d.TileMatrix[0],p={MinTileCol:0,MinTileRow:0,MaxTileCol:y.MatrixWidth-1,MaxTileRow:y.MatrixHeight-1};if(o){p=o[o.length-1];const A=d.TileMatrix.find(G=>G.Identifier===p.TileMatrix||d.Identifier+":"+G.Identifier===p.TileMatrix);A&&(y=A)}const x=y.ScaleDenominator*28e-5/f.getMetersPerUnit(),M=m?[y.TopLeftCorner[1],y.TopLeftCorner[0]]:y.TopLeftCorner,E=y.TileWidth*x,w=y.TileHeight*x;let C=d.BoundingBox;C&&m&&(C=[C[1],C[0],C[3],C[2]]);let S=[M[0]+E*p.MinTileCol,M[1]-w*(1+p.MaxTileRow),M[0]+E*(1+p.MaxTileCol),M[1]-w*p.MinTileRow];if(C!==void 0&&!Ve(C,S)){const A=n.WGS84BoundingBox,G=pt("EPSG:4326").getExtent();if(S=C,A)_=A[0]===G[0]&&A[2]===G[2];else{const X=R_(C,d.SupportedCRS,"EPSG:4326");_=X[0]-1e-10<=G[0]&&X[2]+1e-10>=G[2]}}const I=Gp(d,S,o),z=[];let F=t.requestEncoding;if(F=F!==void 0?F:"","OperationsMetadata"in i&&"GetTile"in i.OperationsMetadata){const A=i.OperationsMetadata.GetTile.DCP.HTTP.Get;for(let G=0,X=A.length;G0;)this.pop()}extend(t){for(let e=0,n=t.length;ethis.getLength())throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new Za(he.ADD,e,t))}pop(){return this.removeAt(this.getLength()-1)}push(t){this.unique_&&this.assertUnique_(t);const e=this.getLength();return this.insertAt(e,t),this.getLength()}remove(t){const e=this.array_;for(let n=0,s=e.length;n=this.getLength())return;const e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new Za(he.REMOVE,e,t)),e}setAt(t,e){const n=this.getLength();if(t>=n){this.insertAt(t,e);return}if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);const s=this.array_[t];this.array_[t]=e,this.dispatchEvent(new Za(he.REMOVE,s,t)),this.dispatchEvent(new Za(he.ADD,e,t))}updateLength_(){this.set(hu.LENGTH,this.array_.length)}assertUnique_(t,e){for(let n=0,s=this.array_.length;nthis.maxCacheSize_}expire(){if(this.canExpireCache()){let t=0;for(const e in this.cache_){const n=this.cache_[e];!(t++&3)&&!n.hasListener()&&(delete this.cache_[e],delete this.patternCache_[e],--this.cacheSize_)}}}get(t,e,n){const s=Ch(t,e,n);return s in this.cache_?this.cache_[s]:null}getPattern(t,e,n){const s=Ch(t,e,n);return s in this.patternCache_?this.patternCache_[s]:null}set(t,e,n,s,r){const a=Ch(t,e,n),o=a in this.cache_;this.cache_[a]=s,r&&(s.getImageState()===U.IDLE&&s.load(),s.getImageState()===U.LOADING?s.ready().then(()=>{this.patternCache_[a]=Eo().createPattern(s.getImage(1),"repeat")}):this.patternCache_[a]=Eo().createPattern(s.getImage(1),"repeat")),o||++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}}function Ch(i,t,e){const n=e?Ur(e):"null";return t+":"+i+":"+n}const Ke=new Hp;let fr=null;class Jp extends ba{constructor(t,e,n,s,r){super(),this.hitDetectionImage_=null,this.image_=t,this.crossOrigin_=n,this.canvas_={},this.color_=r,this.imageState_=s===void 0?U.IDLE:s,this.size_=t&&t.width&&t.height?[t.width,t.height]:null,this.src_=e,this.tainted_,this.ready_=null}initializeImage_(){this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(this.tainted_===void 0&&this.imageState_===U.LOADED){fr||(fr=jt(1,1,void 0,{willReadFrequently:!0})),fr.drawImage(this.image_,0,0);try{fr.getImageData(0,0,1,1),this.tainted_=!1}catch{fr=null,this.tainted_=!0}}return this.tainted_===!0}dispatchChangeEvent_(){this.dispatchEvent(Z.CHANGE)}handleImageError_(){this.imageState_=U.ERROR,this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=U.LOADED,this.size_=[this.image_.width,this.image_.height],this.dispatchChangeEvent_()}getImage(t){return this.image_||this.initializeImage_(),this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_}getPixelRatio(t){return this.replaceColor_(t),this.canvas_[t]?t:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const t=this.size_[0],e=this.size_[1],n=jt(t,e);n.fillRect(0,0,t,e),this.hitDetectionImage_=n.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===U.IDLE){this.image_||this.initializeImage_(),this.imageState_=U.LOADING;try{this.src_!==void 0&&(this.image_.src=this.src_)}catch{this.handleImageError_()}this.image_ instanceof HTMLImageElement&&Cf(this.image_,this.src_).then(t=>{this.image_=t,this.handleImageLoad_()}).catch(this.handleImageError_.bind(this))}}replaceColor_(t){if(!this.color_||this.canvas_[t]||this.imageState_!==U.LOADED)return;const e=this.image_,n=document.createElement("canvas");n.width=Math.ceil(e.width*t),n.height=Math.ceil(e.height*t);const s=n.getContext("2d");s.scale(t,t),s.drawImage(e,0,0),s.globalCompositeOperation="multiply",s.fillStyle=oy(this.color_),s.fillRect(0,0,n.width/t,n.height/t),s.globalCompositeOperation="destination-in",s.drawImage(e,0,0),this.canvas_[t]=n}ready(){return this.ready_||(this.ready_=new Promise(t=>{this.imageState_===U.LOADED||this.imageState_===U.ERROR?t():this.addEventListener(Z.CHANGE,function e(){(this.imageState_===U.LOADED||this.imageState_===U.ERROR)&&(this.removeEventListener(Z.CHANGE,e),t())})})),this.ready_}}function rc(i,t,e,n,s,r){let a=t===void 0?void 0:Ke.get(t,e,s);return a||(a=new Jp(i,i&&"src"in i?i.src||void 0:t,e,n,s),Ke.set(t,e,s,a,r)),r&&a&&!Ke.getPattern(t,e,s)&&Ke.set(t,e,s,a,r),a}class Ri{constructor(t){t=t||{},this.patternImage_=null,this.color_=null,t.color!==void 0&&this.setColor(t.color)}clone(){const t=this.getColor();return new Ri({color:Array.isArray(t)?t.slice():t||void 0})}getColor(){return this.color_}setColor(t){if(t!==null&&typeof t=="object"&&"src"in t){const e=rc(null,t.src,"anonymous",void 0,t.offset?null:t.color?t.color:null,!(t.offset&&t.size));e.ready().then(()=>{this.patternImage_=null}),e.getImageState()===U.IDLE&&e.load(),e.getImageState()===U.LOADING&&(this.patternImage_=e)}this.color_=t}loading(){return!!this.patternImage_}ready(){return this.patternImage_?this.patternImage_.ready():Promise.resolve()}}function lu(i,t,e,n,s,r,a){let o,h;const l=(e-t)/n;if(l===1)o=t;else if(l===2)o=t,h=s;else if(l!==0){let c=i[t],u=i[t+1],d=0;const f=[0];for(let m=t+n;m1?a:2,r=r||new Array(a);for(let c=0;c>1;sMath.max(s,Co(i,r)),0);return e[t]=n,n}function s1(i,t){const e=[],n=[],s=[];let r=0,a=0,o=0,h=0;for(let l=0,c=t.length;l<=c;l+=2){const u=t[l];if(u===` -`||l===c){r=Math.max(r,a),s.push(a),a=0,o+=h,h=0;continue}const d=t[l+1]||i.font,f=Co(d,u);e.push(f),a+=f;const g=n1(d);n.push(g),h=Math.max(h,g)}return{width:r,height:o,widths:e,heights:n,lineWidths:s}}function r1(i,t,e,n,s,r,a,o,h,l,c){i.save(),e!==1&&(i.globalAlpha===void 0?i.globalAlpha=u=>u.globalAlpha*=e:i.globalAlpha*=e),t&&i.transform.apply(i,t),n.contextInstructions?(i.translate(h,l),i.scale(c[0],c[1]),a1(n,i)):c[0]<0||c[1]<0?(i.translate(h,l),i.scale(c[0],c[1]),i.drawImage(n,s,r,a,o,0,0,a,o)):i.drawImage(n,s,r,a,o,h,l,a*c[0],o*c[1]),i.restore()}function a1(i,t){const e=i.contextInstructions;for(let n=0,s=e.length;nthis.imageState_=U.LOADED),this.render()}clone(){const t=this.getScale(),e=new eh({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}getAnchor(){const t=this.size_,e=this.getDisplacement(),n=this.getScaleArray();return[t[0]/2-e[0]/n[0],t[1]/2+e[1]/n[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(t){this.fill_=t,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.createHitDetectionCanvas_(this.renderOptions_)),this.hitDetectionCanvas_}getImage(t){let e=this.canvases_[t];if(!e){const n=this.renderOptions_,s=jt(n.size*t,n.size*t);this.draw_(n,s,t),e=s.canvas,this.canvases_[t]=e}return e}getPixelRatio(t){return t}getImageSize(){return this.size_}getImageState(){return this.imageState_}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius_}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t,this.render()}listenImageChange(t){}load(){}unlistenImageChange(t){}calculateLineJoinSize_(t,e,n){if(e===0||this.points_===1/0||t!=="bevel"&&t!=="miter")return e;let s=this.radius_,r=this.radius2_===void 0?s:this.radius2_;if(se;){if(n-e>600){var r=n-e+1,a=t-e+1,o=Math.log(r),h=.5*Math.exp(2*o/3),l=.5*Math.sqrt(o*h*(r-h)/r)*(a-r/2<0?-1:1),c=Math.max(e,Math.floor(t-a*h/r+l)),u=Math.min(n,Math.floor(t+(r-a)*h/r+l));ig(i,t,c,u,s)}var d=i[t],f=e,g=n;for(gr(i,e,t),s(i[n],d)>0&&gr(i,e,n);f0;)g--}s(i[e],d)===0?gr(i,e,g):(g++,gr(i,g,n)),g<=t&&(e=g+1),t<=g&&(n=g-1)}}function gr(i,t,e){var n=i[t];i[t]=i[e],i[e]=n}function l1(i,t){return it?1:0}let ng=class{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(t){let e=this.data;const n=[];if(!Qa(t,e))return n;const s=this.toBBox,r=[];for(;e;){for(let a=0;a=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)}_split(t,e){const n=t[e],s=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,s);const a=this._chooseSplitIndex(n,r,s),o=ts(n.children.splice(a,n.children.length-a));o.height=n.height,o.leaf=n.leaf,Kn(n,this.toBBox),Kn(o,this.toBBox),e?t[e-1].children.push(o):this._splitRoot(n,o)}_splitRoot(t,e){this.data=ts([t,e]),this.data.height=t.height+1,this.data.leaf=!1,Kn(this.data,this.toBBox)}_chooseSplitIndex(t,e,n){let s,r=1/0,a=1/0;for(let o=e;o<=n-e;o++){const h=pr(t,0,o,this.toBBox),l=pr(t,o,n,this.toBBox),c=g1(h,l),u=bh(h)+bh(l);c=e;l--){const c=t.children[l];vr(o,t.leaf?r(c):c),h+=Ja(o)}return h}_adjustParentBBoxes(t,e,n){for(let s=n;s>=0;s--)vr(e[s],t)}_condense(t){for(let e=t.length-1,n;e>=0;e--)t[e].children.length===0?e>0?(n=t[e-1].children,n.splice(n.indexOf(t[e]),1)):this.clear():Kn(t[e],this.toBBox)}};function c1(i,t,e){if(!e)return t.indexOf(i);for(let n=0;n=i.minX&&t.maxY>=i.minY}function ts(i){return{children:i,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function _u(i,t,e,n,s){const r=[t,e];for(;r.length;){if(e=r.pop(),t=r.pop(),e-t<=n)continue;const a=t+Math.ceil((e-t)/n/2)*n;h1(i,a,t,e,s),r.push(t,a,a,e)}}function mu(i,t,e,n){return e!==void 0&&n!==void 0?[e/i,n/t]:e!==void 0?e/i:n!==void 0?n/t:1}class Vs extends Qo{constructor(t){t=t||{};const e=t.opacity!==void 0?t.opacity:1,n=t.rotation!==void 0?t.rotation:0,s=t.scale!==void 0?t.scale:1,r=t.rotateWithView!==void 0?t.rotateWithView:!1;super({opacity:e,rotation:n,scale:s,displacement:t.displacement!==void 0?t.displacement:[0,0],rotateWithView:r,declutterMode:t.declutterMode}),this.anchor_=t.anchor!==void 0?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=t.anchorOrigin!==void 0?t.anchorOrigin:"top-left",this.anchorXUnits_=t.anchorXUnits!==void 0?t.anchorXUnits:"fraction",this.anchorYUnits_=t.anchorYUnits!==void 0?t.anchorYUnits:"fraction",this.crossOrigin_=t.crossOrigin!==void 0?t.crossOrigin:null;const a=t.img!==void 0?t.img:null;let o=t.src;ct(!(o!==void 0&&a),"`image` and `src` cannot be provided at the same time"),(o===void 0||o.length===0)&&a&&(o=a.src||mt(a)),ct(o!==void 0&&o.length>0,"A defined and non-empty `src` or `image` must be provided"),ct(!((t.width!==void 0||t.height!==void 0)&&t.scale!==void 0),"`width` or `height` cannot be provided together with `scale`");let h;if(t.src!==void 0?h=U.IDLE:a!==void 0&&("complete"in a?a.complete?h=a.src?U.LOADED:U.IDLE:h=U.LOADING:h=U.LOADED),this.color_=t.color!==void 0?Ur(t.color):null,this.iconImage_=rc(a,o,this.crossOrigin_,h,this.color_),this.offset_=t.offset!==void 0?t.offset:[0,0],this.offsetOrigin_=t.offsetOrigin!==void 0?t.offsetOrigin:"top-left",this.origin_=null,this.size_=t.size!==void 0?t.size:null,t.width!==void 0||t.height!==void 0){let l,c;if(t.size)[l,c]=t.size;else{const u=this.getImage(1);if(u.width&&u.height)l=u.width,c=u.height;else if(u instanceof HTMLImageElement){this.initialOptions_=t;const d=()=>{if(this.unlistenImageChange(d),!this.initialOptions_)return;const f=this.iconImage_.getSize();this.setScale(mu(f[0],f[1],t.width,t.height))};this.listenImageChange(d);return}}l!==void 0&&this.setScale(mu(l,c,t.width,t.height))}}clone(){let t,e,n;return this.initialOptions_?(e=this.initialOptions_.width,n=this.initialOptions_.height):(t=this.getScale(),t=Array.isArray(t)?t.slice():t),new Vs({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:t,width:e,height:n,size:this.size_!==null?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let t=this.normalizedAnchor_;if(!t){t=this.anchor_;const s=this.getSize();if(this.anchorXUnits_=="fraction"||this.anchorYUnits_=="fraction"){if(!s)return null;t=this.anchor_.slice(),this.anchorXUnits_=="fraction"&&(t[0]*=s[0]),this.anchorYUnits_=="fraction"&&(t[1]*=s[1])}if(this.anchorOrigin_!="top-left"){if(!s)return null;t===this.anchor_&&(t=this.anchor_.slice()),(this.anchorOrigin_=="top-right"||this.anchorOrigin_=="bottom-right")&&(t[0]=-t[0]+s[0]),(this.anchorOrigin_=="bottom-left"||this.anchorOrigin_=="bottom-right")&&(t[1]=-t[1]+s[1])}this.normalizedAnchor_=t}const e=this.getDisplacement(),n=this.getScaleArray();return[t[0]-e[0]/n[0],t[1]+e[1]/n[1]]}setAnchor(t){this.anchor_=t,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(t){return this.iconImage_.getImage(t)}getPixelRatio(t){return this.iconImage_.getPixelRatio(t)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let t=this.offset_;if(this.offsetOrigin_!="top-left"){const e=this.getSize(),n=this.iconImage_.getSize();if(!e||!n)return null;t=t.slice(),(this.offsetOrigin_=="top-right"||this.offsetOrigin_=="bottom-right")&&(t[0]=n[0]-e[0]-t[0]),(this.offsetOrigin_=="bottom-left"||this.offsetOrigin_=="bottom-right")&&(t[1]=n[1]-e[1]-t[1])}return this.origin_=t,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const t=this.getScaleArray();if(this.size_)return this.size_[0]*t[0];if(this.iconImage_.getImageState()==U.LOADED)return this.iconImage_.getSize()[0]*t[0]}getHeight(){const t=this.getScaleArray();if(this.size_)return this.size_[1]*t[1];if(this.iconImage_.getImageState()==U.LOADED)return this.iconImage_.getSize()[1]*t[1]}setScale(t){delete this.initialOptions_,super.setScale(t)}listenImageChange(t){this.iconImage_.addEventListener(Z.CHANGE,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(Z.CHANGE,t)}ready(){return this.iconImage_.ready()}}let jn=0;const er=0,bt=1<",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",Multiply:"*",Divide:"/",Add:"+",Subtract:"-",Clamp:"clamp",Mod:"%",Pow:"^",Abs:"abs",Floor:"floor",Ceil:"ceil",Round:"round",Sin:"sin",Cos:"cos",Atan:"atan",Sqrt:"sqrt",Match:"match",Between:"between",Interpolate:"interpolate",Coalesce:"coalesce",Case:"case",In:"in",Number:"number",String:"string",Array:"array",Color:"color",Id:"id",Band:"band",Palette:"palette",ToString:"to-string"},v1={[R.Get]:$(([i,t])=>t!==void 0?p1(t.value):Yt,tt(1,2),x1),[R.Var]:$(([i])=>i.type,tt(1,1),E1),[R.Id]:$(j|ye,_r,M1),[R.Concat]:$(ye,tt(2,1/0),ot(Yt)),[R.GeometryType]:$(ye,_r,w1),[R.Resolution]:$(j,_r),[R.Zoom]:$(j,_r),[R.Time]:$(j,_r),[R.Any]:$(bt,tt(2,1/0),ot(bt)),[R.All]:$(bt,tt(2,1/0),ot(bt)),[R.Not]:$(bt,tt(1,1),ot(bt)),[R.Equal]:$(bt,tt(2,2),ot(Yt),Ni),[R.NotEqual]:$(bt,tt(2,2),ot(Yt),Ni),[R.GreaterThan]:$(bt,tt(2,2),ot(Yt),Ni),[R.GreaterThanOrEqualTo]:$(bt,tt(2,2),ot(Yt),Ni),[R.LessThan]:$(bt,tt(2,2),ot(Yt),Ni),[R.LessThanOrEqualTo]:$(bt,tt(2,2),ot(Yt),Ni),[R.Multiply]:$(i=>{let t=j|kt;for(let e=0;e{let t=Yt;for(let e=1;e{let t=Yt;for(let e=2;e{let t=kt|j;for(let e=3;e{let t=Yt;for(let e=1;ei.length===2?Je|br:i.length===3||i.length===4?Je|kt:Je,tt(1,1/0),ot(j)),[R.Color]:$(kt,tt(1,4),ot(j)),[R.Band]:$(j,tt(1,3),ot(j)),[R.Palette]:$(kt,tt(2,2),T1),[R.ToString]:$(ye,tt(1,1),ot(bt|j|ye|kt))};function x1(i,t){const e=gt(i[1],t);if(!(e instanceof tn))throw new Error("Expected a literal argument for get operation");if(typeof e.value!="string")throw new Error("Expected a string argument for get operation");if(t.properties.add(e.value),i.length===3){const n=gt(i[2],t);return[e,n]}return[e]}function E1(i,t,e,n){const s=i[1];if(typeof s!="string")throw new Error("Expected a string argument for var operation");if(t.variables.add(s),!("variables"in t.style)||t.style.variables[s]===void 0)return[new tn(Yt,s)];const r=t.style.variables[s],a=gt(r,t);if(a.value=s,n&&!Qe(n,a.type))throw new Error(`The variable ${s} has type ${Ht(a.type)} but the following type was expected: ${Ht(n)}`);return[a]}function M1(i,t){t.featureId=!0}function w1(i,t){t.geometryType=!0}function _r(i,t){const e=i[0];if(i.length!==1)throw new Error(`Expected no arguments for ${e} operation`);return[]}function tt(i,t){return function(e,n){const s=e[0],r=e.length-1;if(i===t){if(r!==i){const a=i===1?"":"s";throw new Error(`Expected ${i} argument${a} for ${s}, got ${r}`)}}else if(rt){const a=t===1/0?`${i} or more`:`${i} to ${t}`;throw new Error(`Expected ${a} arguments for ${s}, got ${r}`)}}}function ot(i){return function(t,e){const n=t[0],s=t.length-1,r=new Array(s);for(let a=0;an.featureId;case R.GeometryType:return n=>n.geometryType;case R.Concat:{const n=i.args.map(s=>We(s));return s=>"".concat(...n.map(r=>r(s).toString()))}case R.Resolution:return n=>n.resolution;case R.Any:case R.All:case R.Between:case R.In:case R.Not:return D1(i);case R.Equal:case R.NotEqual:case R.LessThan:case R.LessThanOrEqualTo:case R.GreaterThan:case R.GreaterThanOrEqualTo:return O1(i);case R.Multiply:case R.Divide:case R.Add:case R.Subtract:case R.Clamp:case R.Mod:case R.Pow:case R.Abs:case R.Floor:case R.Ceil:case R.Round:case R.Sin:case R.Cos:case R.Atan:case R.Sqrt:return N1(i);case R.Case:return F1(i);case R.Match:return k1(i);case R.Interpolate:return G1(i);case R.ToString:return z1(i);default:throw new Error(`Unsupported operator ${e}`)}}function L1(i,t){const e=i.operator,n=i.args.length,s=new Array(n);for(let r=0;r{for(let a=0;a{for(let a=0;as.properties[n];case R.Var:return s=>s.variables[n];default:throw new Error(`Unsupported accessor operator ${i.operator}`)}}function O1(i,t){const e=i.operator,n=We(i.args[0]),s=We(i.args[1]);switch(e){case R.Equal:return r=>n(r)===s(r);case R.NotEqual:return r=>n(r)!==s(r);case R.LessThan:return r=>n(r)n(r)<=s(r);case R.GreaterThan:return r=>n(r)>s(r);case R.GreaterThanOrEqualTo:return r=>n(r)>=s(r);default:throw new Error(`Unsupported comparison operator ${e}`)}}function D1(i,t){const e=i.operator,n=i.args.length,s=new Array(n);for(let r=0;r{for(let a=0;a{for(let a=0;a{const a=s[0](r),o=s[1](r),h=s[2](r);return a>=o&&a<=h};case R.In:return r=>{const a=s[0](r);for(let o=1;o!s[0](r);default:throw new Error(`Unsupported logical operator ${e}`)}}function N1(i,t){const e=i.operator,n=i.args.length,s=new Array(n);for(let r=0;r{let a=1;for(let o=0;os[0](r)/s[1](r);case R.Add:return r=>{let a=0;for(let o=0;os[0](r)-s[1](r);case R.Clamp:return r=>{const a=s[0](r),o=s[1](r);if(ah?h:a};case R.Mod:return r=>s[0](r)%s[1](r);case R.Pow:return r=>Math.pow(s[0](r),s[1](r));case R.Abs:return r=>Math.abs(s[0](r));case R.Floor:return r=>Math.floor(s[0](r));case R.Ceil:return r=>Math.ceil(s[0](r));case R.Round:return r=>Math.round(s[0](r));case R.Sin:return r=>Math.sin(s[0](r));case R.Cos:return r=>Math.cos(s[0](r));case R.Atan:return n===2?r=>Math.atan2(s[0](r),s[1](r)):r=>Math.atan(s[0](r));case R.Sqrt:return r=>Math.sqrt(s[0](r));default:throw new Error(`Unsupported numeric operator ${e}`)}}function F1(i,t){const e=i.args.length,n=new Array(e);for(let s=0;s{for(let r=0;r{const r=n[0](s);for(let a=1;a{const r=n[0](s),a=n[1](s);let o,h;for(let l=2;l=a)return l===2?u:d?W1(r,a,o,h,c,u):xr(r,a,o,h,c,u);o=c,h=u}return h}}function z1(i,t){const e=i.operator,n=i.args.length,s=new Array(n);for(let r=0;r{const a=s[0](r);return i.args[0].type===kt?Zl(a):a.toString()};default:throw new Error(`Unsupported convert operator ${e}`)}}function xr(i,t,e,n,s,r){const a=s-e;if(a===0)return n;const o=t-e,h=i===1?o/a:(Math.pow(i,o)-1)/(Math.pow(i,a)-1);return n+h*(r-n)}function W1(i,t,e,n,s,r){if(s-e===0)return n;const o=tu(n),h=tu(r);let l=h[2]-o[2];l>180?l-=360:l<-180&&(l+=360);const c=[xr(i,t,e,o[0],s,h[0]),xr(i,t,e,o[1],s,h[1]),o[2]+xr(i,t,e,0,s,l),xr(i,t,e,n[3],s,r[3])];return wf(cy(c))}function B1(i){return!0}function U1(i){const t=rg(),e=j1(i,t),n=og();return function(s,r){if(n.properties=s.getPropertiesInternal(),n.resolution=r,t.featureId){const a=s.getId();a!==void 0?n.featureId=a:n.featureId=null}return t.geometryType&&(n.geometryType=ag(s.getGeometry())),e(n)}}function pu(i){const t=rg(),e=i.length,n=new Array(e);for(let a=0;a4)throw new Error(`Expected a color with 3 or 4 values for ${t}`);return e}function ug(i,t){const e=Oa(i,t);if(e.length!==2)throw new Error(`Expected an array of two numbers for ${t}`);return e}function tv(i,t){return typeof i=="number"?i:ug(i,t)}const Mu={RENDER_ORDER:"renderOrder"};class dg extends Un{constructor(t){t=t||{};const e=Object.assign({},t);delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,super(e),this.declutter_=t.declutter?String(t.declutter):void 0,this.renderBuffer_=t.renderBuffer!==void 0?t.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(t.style),this.updateWhileAnimating_=t.updateWhileAnimating!==void 0?t.updateWhileAnimating:!1,this.updateWhileInteracting_=t.updateWhileInteracting!==void 0?t.updateWhileInteracting:!1}getDeclutter(){return this.declutter_}getFeatures(t){return super.getFeatures(t)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(Mu.RENDER_ORDER)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(t,e){const n=this.getDeclutter();n in t.declutter||(t.declutter[n]=new ng(9)),this.getRenderer().renderDeclutter(t,e)}setRenderOrder(t){this.set(Mu.RENDER_ORDER,t)}setStyle(t){this.style_=t===void 0?eg:t;const e=ev(t);this.styleFunction_=t===null?void 0:tg(e),this.changed()}}function ev(i){if(i===void 0)return eg;if(!i)return null;if(typeof i=="function"||i instanceof Tt)return i;if(!Array.isArray(i))return pu([i]);if(i.length===0)return[];const t=i.length,e=i[0];if(e instanceof Tt){const s=new Array(t);for(let r=0;rh&&(this.instructions.push([Y.CUSTOM,h,c,t,n,rs,r]),this.hitDetectionInstructions.push([Y.CUSTOM,h,c,t,s||n,rs,r]));break;case"Point":l=t.getFlatCoordinates(),this.coordinates.push(l[0],l[1]),c=this.coordinates.length,this.instructions.push([Y.CUSTOM,h,c,t,n,void 0,r]),this.hitDetectionInstructions.push([Y.CUSTOM,h,c,t,s||n,void 0,r]);break}this.endGeometry(e)}beginGeometry(t,e,n){this.beginGeometryInstruction1_=[Y.BEGIN_GEOMETRY,e,0,t,n],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[Y.BEGIN_GEOMETRY,e,0,t,n],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const t=this.hitDetectionInstructions;t.reverse();let e;const n=t.length;let s,r,a=-1;for(e=0;ethis.maxLineWidth&&(this.maxLineWidth=n.lineWidth,this.bufferedMaxExtent_=null)}else n.strokeStyle=void 0,n.lineCap=void 0,n.lineDash=null,n.lineDashOffset=void 0,n.lineJoin=void 0,n.lineWidth=void 0,n.miterLimit=void 0}createFill(t){const e=t.fillStyle,n=[Y.SET_FILL_STYLE,e];return typeof e!="string"&&n.push(t.fillPatternScale),n}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[Y.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]}updateFillStyle(t,e){const n=t.fillStyle;(typeof n!="string"||t.currentFillStyle!=n)&&(n!==void 0&&this.instructions.push(e.call(this,t)),t.currentFillStyle=n)}updateStrokeStyle(t,e){const n=t.strokeStyle,s=t.lineCap,r=t.lineDash,a=t.lineDashOffset,o=t.lineJoin,h=t.lineWidth,l=t.miterLimit;(t.currentStrokeStyle!=n||t.currentLineCap!=s||r!=t.currentLineDash&&!ln(t.currentLineDash,r)||t.currentLineDashOffset!=a||t.currentLineJoin!=o||t.currentLineWidth!=h||t.currentMiterLimit!=l)&&(n!==void 0&&e.call(this,t),t.currentStrokeStyle=n,t.currentLineCap=s,t.currentLineDash=r,t.currentLineDashOffset=a,t.currentLineJoin=o,t.currentLineWidth=h,t.currentMiterLimit=l)}endGeometry(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const e=[Y.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=Td(this.maxExtent),this.maxLineWidth>0)){const t=this.resolution*(this.maxLineWidth+1)/2;Rl(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}class iv extends Da{constructor(t,e,n,s){super(t,e,n,s),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(t,e,n){if(!this.image_||this.maxExtent&&!kn(this.maxExtent,t.getFlatCoordinates()))return;this.beginGeometry(t,e,n);const s=t.getFlatCoordinates(),r=t.getStride(),a=this.coordinates.length,o=this.appendFlatPointCoordinates(s,r);this.instructions.push([Y.DRAW_IMAGE,a,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([Y.DRAW_IMAGE,a,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}drawMultiPoint(t,e,n){if(!this.image_)return;this.beginGeometry(t,e,n);const s=t.getFlatCoordinates(),r=[];for(let h=0,l=s.length;h=i){const g=(i-o+f)/f,_=me(l,u,g),m=me(c,d,g);h.push(_,m),r.push(h),h=[_,m],o==i&&(a+=s),o=0}else if(o0&&r.push(h),r}function rv(i,t,e,n,s){let r=e,a=e,o=0,h=0,l=e,c,u,d,f,g,_,m,y,p,x;for(u=e;ui&&(h>o&&(o=h,r=l,a=u),h=0,l=u-s)),d=f,m=p,y=x),g=M,_=E}return h+=f,h>o?[l,u]:[r,a]}const Io={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class av extends Da{constructor(t,e,n,s){super(t,e,n,s),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.fillStates[le]={fillStyle:le},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterMode_=void 0,this.declutterImageWithText_=void 0}finish(){const t=super.finish();return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t}drawText(t,e,n){const s=this.textFillState_,r=this.textStrokeState_,a=this.textState_;if(this.text_===""||!a||!s&&!r)return;const o=this.coordinates;let h=o.length;const l=t.getType();let c=null,u=t.getStride();if(a.placement==="line"&&(l=="LineString"||l=="MultiLineString"||l=="Polygon"||l=="MultiPolygon")){if(!ne(this.maxExtent,t.getExtent()))return;let d;if(c=t.getFlatCoordinates(),l=="LineString")d=[c.length];else if(l=="MultiLineString")d=t.getEnds();else if(l=="Polygon")d=t.getEnds().slice(0,1);else if(l=="MultiPolygon"){const m=t.getEndss();d=[];for(let y=0,p=m.length;y{const E=o[(p+M)*2]===c[M*u]&&o[(p+M)*2+1]===c[M*u+1];return E||--p,E})}this.saveTextStates_(),(a.backgroundFill||a.backgroundStroke)&&(this.setFillStrokeStyle(a.backgroundFill,a.backgroundStroke),a.backgroundFill&&this.updateFillStyle(this.state,this.createFill),a.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e,n);let g=a.padding;if(g!=Sn&&(a.scale[0]<0||a.scale[1]<0)){let p=a.padding[0],x=a.padding[1],M=a.padding[2],E=a.padding[3];a.scale[0]<0&&(x=-x,E=-E),a.scale[1]<0&&(p=-p,M=-M),g=[p,x,M,E]}const _=this.pixelRatio;this.instructions.push([Y.DRAW_IMAGE,h,f,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterMode_,this.declutterImageWithText_,g==Sn?Sn:g.map(function(p){return p*_}),!!a.backgroundFill,!!a.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,d]);const m=1/_,y=this.state.fillStyle;a.backgroundFill&&(this.state.fillStyle=le,this.hitDetectionInstructions.push(this.createFill(this.state))),this.hitDetectionInstructions.push([Y.DRAW_IMAGE,h,f,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[m,m],NaN,this.declutterMode_,this.declutterImageWithText_,g,!!a.backgroundFill,!!a.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?le:this.fillKey_,this.textOffsetX_,this.textOffsetY_,d]),a.backgroundFill&&(this.state.fillStyle=y,this.hitDetectionInstructions.push(this.createFill(this.state))),this.endGeometry(e)}}saveTextStates_(){const t=this.textStrokeState_,e=this.textState_,n=this.textFillState_,s=this.strokeKey_;t&&(s in this.strokeStates||(this.strokeStates[s]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));const r=this.textKey_;r in this.textStates||(this.textStates[r]={font:e.font,textAlign:e.textAlign||qr,justify:e.justify,textBaseline:e.textBaseline||So,scale:e.scale});const a=this.fillKey_;n&&(a in this.fillStates||(this.fillStates[a]={fillStyle:n.fillStyle}))}drawChars_(t,e){const n=this.textStrokeState_,s=this.textState_,r=this.strokeKey_,a=this.textKey_,o=this.fillKey_;this.saveTextStates_();const h=this.pixelRatio,l=Io[s.textBaseline],c=this.textOffsetY_*h,u=this.text_,d=n?n.lineWidth*Math.abs(s.scale[0])/2:0;this.instructions.push([Y.DRAW_CHARS,t,e,l,s.overflow,o,s.maxAngle,h,c,r,d*h,u,a,1,this.declutterMode_]),this.hitDetectionInstructions.push([Y.DRAW_CHARS,t,e,l,s.overflow,o&&le,s.maxAngle,h,c,r,d*h,u,a,1/h,this.declutterMode_])}setTextStyle(t,e){let n,s,r;if(!t)this.text_="";else{const a=t.getFill();a?(s=this.textFillState_,s||(s={},this.textFillState_=s),s.fillStyle=Ze(a.getColor()||le)):(s=null,this.textFillState_=s);const o=t.getStroke();if(!o)r=null,this.textStrokeState_=r;else{r=this.textStrokeState_,r||(r={},this.textStrokeState_=r);const g=o.getLineDash(),_=o.getLineDashOffset(),m=o.getWidth(),y=o.getMiterLimit();r.lineCap=o.getLineCap()||qs,r.lineDash=g?g.slice():Mi,r.lineDashOffset=_===void 0?wi:_,r.lineJoin=o.getLineJoin()||Ys,r.lineWidth=m===void 0?Yr:m,r.miterLimit=y===void 0?jr:y,r.strokeStyle=Ze(o.getColor()||Xr)}n=this.textState_;const h=t.getFont()||Jf;i1(h);const l=t.getScaleArray();n.overflow=t.getOverflow(),n.font=h,n.maxAngle=t.getMaxAngle(),n.placement=t.getPlacement(),n.textAlign=t.getTextAlign(),n.repeat=t.getRepeat(),n.justify=t.getJustify(),n.textBaseline=t.getTextBaseline()||So,n.backgroundFill=t.getBackgroundFill(),n.backgroundStroke=t.getBackgroundStroke(),n.padding=t.getPadding()||Sn,n.scale=l===void 0?[1,1]:l;const c=t.getOffsetX(),u=t.getOffsetY(),d=t.getRotateWithView(),f=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=c===void 0?0:c,this.textOffsetY_=u===void 0?0:u,this.textRotateWithView_=d===void 0?!1:d,this.textRotation_=f===void 0?0:f,this.strokeKey_=r?(typeof r.strokeStyle=="string"?r.strokeStyle:mt(r.strokeStyle))+r.lineCap+r.lineDashOffset+"|"+r.lineWidth+r.lineJoin+r.miterLimit+"["+r.lineDash.join()+"]":"",this.textKey_=n.font+n.scale+(n.textAlign||"?")+(n.repeat||"?")+(n.justify||"?")+(n.textBaseline||"?"),this.fillKey_=s&&s.fillStyle?typeof s.fillStyle=="string"?s.fillStyle:"|"+mt(s.fillStyle):""}this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}}const ov={Circle:Su,Default:Da,Image:iv,LineString:nv,Polygon:Su,Text:av};class hv{constructor(t,e,n,s){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=s,this.resolution_=n,this.buildersByZIndex_={}}finish(){const t={};for(const e in this.buildersByZIndex_){t[e]=t[e]||{};const n=this.buildersByZIndex_[e];for(const s in n){const r=n[s].finish();t[e][s]=r}}return t}getBuilder(t,e){const n=t!==void 0?t.toString():"0";let s=this.buildersByZIndex_[n];s===void 0&&(s={},this.buildersByZIndex_[n]=s);let r=s[e];if(r===void 0){const a=ov[e];r=new a(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),s[e]=r}return r}}function lv(i,t,e,n,s,r,a,o,h,l,c,u){let d=i[t],f=i[t+1],g=0,_=0,m=0,y=0;function p(){g=d,_=f,t+=n,d=i[t],f=i[t+1],y+=m,m=Math.sqrt((d-g)*(d-g)+(f-_)*(f-_))}do p();while(tL[2]}else F=M>I;const A=Math.PI,G=[],X=w+n===t;t=w,m=0,y=C,d=i[t],f=i[t+1];let V;if(X){p(),V=Math.atan2(f-_,d-g),F&&(V+=V>0?-A:A);const L=(I+M)/2,it=(z+E)/2;return G[0]=[L,it,(S-r)/2,V,s],G}s=s.replace(/\n/g," ");for(let L=0,it=s.length;L0?-A:A),V!==void 0){let P=Q-V;if(P+=P>A?-2*A:P<-A?2*A:0,Math.abs(P)>a)return null}V=Q;const wt=L;let et=0;for(;L0&&i.push(` +`||l===c){r=Math.max(r,a),s.push(a),a=0,o+=h,h=0;continue}const d=t[l+1]||i.font,f=Co(d,u);e.push(f),a+=f;const g=n1(d);n.push(g),h=Math.max(h,g)}return{width:r,height:o,widths:e,heights:n,lineWidths:s}}function r1(i,t,e,n,s,r,a,o,h,l,c){i.save(),e!==1&&(i.globalAlpha===void 0?i.globalAlpha=u=>u.globalAlpha*=e:i.globalAlpha*=e),t&&i.transform.apply(i,t),n.contextInstructions?(i.translate(h,l),i.scale(c[0],c[1]),a1(n,i)):c[0]<0||c[1]<0?(i.translate(h,l),i.scale(c[0],c[1]),i.drawImage(n,s,r,a,o,0,0,a,o)):i.drawImage(n,s,r,a,o,h,l,a*c[0],o*c[1]),i.restore()}function a1(i,t){const e=i.contextInstructions;for(let n=0,s=e.length;nthis.imageState_=U.LOADED),this.render()}clone(){const t=this.getScale(),e=new eh({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}getAnchor(){const t=this.size_,e=this.getDisplacement(),n=this.getScaleArray();return[t[0]/2-e[0]/n[0],t[1]/2+e[1]/n[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(t){this.fill_=t,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.createHitDetectionCanvas_(this.renderOptions_)),this.hitDetectionCanvas_}getImage(t){let e=this.canvases_[t];if(!e){const n=this.renderOptions_,s=jt(n.size*t,n.size*t);this.draw_(n,s,t),e=s.canvas,this.canvases_[t]=e}return e}getPixelRatio(t){return t}getImageSize(){return this.size_}getImageState(){return this.imageState_}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius_}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t,this.render()}listenImageChange(t){}load(){}unlistenImageChange(t){}calculateLineJoinSize_(t,e,n){if(e===0||this.points_===1/0||t!=="bevel"&&t!=="miter")return e;let s=this.radius_,r=this.radius2_===void 0?s:this.radius2_;if(se;){if(n-e>600){var r=n-e+1,a=t-e+1,o=Math.log(r),h=.5*Math.exp(2*o/3),l=.5*Math.sqrt(o*h*(r-h)/r)*(a-r/2<0?-1:1),c=Math.max(e,Math.floor(t-a*h/r+l)),u=Math.min(n,Math.floor(t+(r-a)*h/r+l));ig(i,t,c,u,s)}var d=i[t],f=e,g=n;for(gr(i,e,t),s(i[n],d)>0&&gr(i,e,n);f0;)g--}s(i[e],d)===0?gr(i,e,g):(g++,gr(i,g,n)),g<=t&&(e=g+1),t<=g&&(n=g-1)}}function gr(i,t,e){var n=i[t];i[t]=i[e],i[e]=n}function l1(i,t){return it?1:0}let ng=class{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(t){let e=this.data;const n=[];if(!Qa(t,e))return n;const s=this.toBBox,r=[];for(;e;){for(let a=0;a=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)}_split(t,e){const n=t[e],s=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,s);const a=this._chooseSplitIndex(n,r,s),o=ts(n.children.splice(a,n.children.length-a));o.height=n.height,o.leaf=n.leaf,$n(n,this.toBBox),$n(o,this.toBBox),e?t[e-1].children.push(o):this._splitRoot(n,o)}_splitRoot(t,e){this.data=ts([t,e]),this.data.height=t.height+1,this.data.leaf=!1,$n(this.data,this.toBBox)}_chooseSplitIndex(t,e,n){let s,r=1/0,a=1/0;for(let o=e;o<=n-e;o++){const h=pr(t,0,o,this.toBBox),l=pr(t,o,n,this.toBBox),c=g1(h,l),u=bh(h)+bh(l);c=e;l--){const c=t.children[l];vr(o,t.leaf?r(c):c),h+=Ja(o)}return h}_adjustParentBBoxes(t,e,n){for(let s=n;s>=0;s--)vr(e[s],t)}_condense(t){for(let e=t.length-1,n;e>=0;e--)t[e].children.length===0?e>0?(n=t[e-1].children,n.splice(n.indexOf(t[e]),1)):this.clear():$n(t[e],this.toBBox)}};function c1(i,t,e){if(!e)return t.indexOf(i);for(let n=0;n=i.minX&&t.maxY>=i.minY}function ts(i){return{children:i,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function _u(i,t,e,n,s){const r=[t,e];for(;r.length;){if(e=r.pop(),t=r.pop(),e-t<=n)continue;const a=t+Math.ceil((e-t)/n/2)*n;h1(i,a,t,e,s),r.push(t,a,a,e)}}function mu(i,t,e,n){return e!==void 0&&n!==void 0?[e/i,n/t]:e!==void 0?e/i:n!==void 0?n/t:1}class Vs extends Qo{constructor(t){t=t||{};const e=t.opacity!==void 0?t.opacity:1,n=t.rotation!==void 0?t.rotation:0,s=t.scale!==void 0?t.scale:1,r=t.rotateWithView!==void 0?t.rotateWithView:!1;super({opacity:e,rotation:n,scale:s,displacement:t.displacement!==void 0?t.displacement:[0,0],rotateWithView:r,declutterMode:t.declutterMode}),this.anchor_=t.anchor!==void 0?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=t.anchorOrigin!==void 0?t.anchorOrigin:"top-left",this.anchorXUnits_=t.anchorXUnits!==void 0?t.anchorXUnits:"fraction",this.anchorYUnits_=t.anchorYUnits!==void 0?t.anchorYUnits:"fraction",this.crossOrigin_=t.crossOrigin!==void 0?t.crossOrigin:null;const a=t.img!==void 0?t.img:null;let o=t.src;ct(!(o!==void 0&&a),"`image` and `src` cannot be provided at the same time"),(o===void 0||o.length===0)&&a&&(o=a.src||mt(a)),ct(o!==void 0&&o.length>0,"A defined and non-empty `src` or `image` must be provided"),ct(!((t.width!==void 0||t.height!==void 0)&&t.scale!==void 0),"`width` or `height` cannot be provided together with `scale`");let h;if(t.src!==void 0?h=U.IDLE:a!==void 0&&("complete"in a?a.complete?h=a.src?U.LOADED:U.IDLE:h=U.LOADING:h=U.LOADED),this.color_=t.color!==void 0?Ur(t.color):null,this.iconImage_=rc(a,o,this.crossOrigin_,h,this.color_),this.offset_=t.offset!==void 0?t.offset:[0,0],this.offsetOrigin_=t.offsetOrigin!==void 0?t.offsetOrigin:"top-left",this.origin_=null,this.size_=t.size!==void 0?t.size:null,t.width!==void 0||t.height!==void 0){let l,c;if(t.size)[l,c]=t.size;else{const u=this.getImage(1);if(u.width&&u.height)l=u.width,c=u.height;else if(u instanceof HTMLImageElement){this.initialOptions_=t;const d=()=>{if(this.unlistenImageChange(d),!this.initialOptions_)return;const f=this.iconImage_.getSize();this.setScale(mu(f[0],f[1],t.width,t.height))};this.listenImageChange(d);return}}l!==void 0&&this.setScale(mu(l,c,t.width,t.height))}}clone(){let t,e,n;return this.initialOptions_?(e=this.initialOptions_.width,n=this.initialOptions_.height):(t=this.getScale(),t=Array.isArray(t)?t.slice():t),new Vs({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:t,width:e,height:n,size:this.size_!==null?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let t=this.normalizedAnchor_;if(!t){t=this.anchor_;const s=this.getSize();if(this.anchorXUnits_=="fraction"||this.anchorYUnits_=="fraction"){if(!s)return null;t=this.anchor_.slice(),this.anchorXUnits_=="fraction"&&(t[0]*=s[0]),this.anchorYUnits_=="fraction"&&(t[1]*=s[1])}if(this.anchorOrigin_!="top-left"){if(!s)return null;t===this.anchor_&&(t=this.anchor_.slice()),(this.anchorOrigin_=="top-right"||this.anchorOrigin_=="bottom-right")&&(t[0]=-t[0]+s[0]),(this.anchorOrigin_=="bottom-left"||this.anchorOrigin_=="bottom-right")&&(t[1]=-t[1]+s[1])}this.normalizedAnchor_=t}const e=this.getDisplacement(),n=this.getScaleArray();return[t[0]-e[0]/n[0],t[1]+e[1]/n[1]]}setAnchor(t){this.anchor_=t,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(t){return this.iconImage_.getImage(t)}getPixelRatio(t){return this.iconImage_.getPixelRatio(t)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let t=this.offset_;if(this.offsetOrigin_!="top-left"){const e=this.getSize(),n=this.iconImage_.getSize();if(!e||!n)return null;t=t.slice(),(this.offsetOrigin_=="top-right"||this.offsetOrigin_=="bottom-right")&&(t[0]=n[0]-e[0]-t[0]),(this.offsetOrigin_=="bottom-left"||this.offsetOrigin_=="bottom-right")&&(t[1]=n[1]-e[1]-t[1])}return this.origin_=t,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const t=this.getScaleArray();if(this.size_)return this.size_[0]*t[0];if(this.iconImage_.getImageState()==U.LOADED)return this.iconImage_.getSize()[0]*t[0]}getHeight(){const t=this.getScaleArray();if(this.size_)return this.size_[1]*t[1];if(this.iconImage_.getImageState()==U.LOADED)return this.iconImage_.getSize()[1]*t[1]}setScale(t){delete this.initialOptions_,super.setScale(t)}listenImageChange(t){this.iconImage_.addEventListener(Z.CHANGE,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(Z.CHANGE,t)}ready(){return this.iconImage_.ready()}}let jn=0;const er=0,bt=1<",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",Multiply:"*",Divide:"/",Add:"+",Subtract:"-",Clamp:"clamp",Mod:"%",Pow:"^",Abs:"abs",Floor:"floor",Ceil:"ceil",Round:"round",Sin:"sin",Cos:"cos",Atan:"atan",Sqrt:"sqrt",Match:"match",Between:"between",Interpolate:"interpolate",Coalesce:"coalesce",Case:"case",In:"in",Number:"number",String:"string",Array:"array",Color:"color",Id:"id",Band:"band",Palette:"palette",ToString:"to-string"},v1={[R.Get]:K(([i,t])=>t!==void 0?p1(t.value):Yt,tt(1,2),x1),[R.Var]:K(([i])=>i.type,tt(1,1),E1),[R.Id]:K(j|ye,_r,M1),[R.Concat]:K(ye,tt(2,1/0),ot(Yt)),[R.GeometryType]:K(ye,_r,w1),[R.Resolution]:K(j,_r),[R.Zoom]:K(j,_r),[R.Time]:K(j,_r),[R.Any]:K(bt,tt(2,1/0),ot(bt)),[R.All]:K(bt,tt(2,1/0),ot(bt)),[R.Not]:K(bt,tt(1,1),ot(bt)),[R.Equal]:K(bt,tt(2,2),ot(Yt),Ni),[R.NotEqual]:K(bt,tt(2,2),ot(Yt),Ni),[R.GreaterThan]:K(bt,tt(2,2),ot(Yt),Ni),[R.GreaterThanOrEqualTo]:K(bt,tt(2,2),ot(Yt),Ni),[R.LessThan]:K(bt,tt(2,2),ot(Yt),Ni),[R.LessThanOrEqualTo]:K(bt,tt(2,2),ot(Yt),Ni),[R.Multiply]:K(i=>{let t=j|kt;for(let e=0;e{let t=Yt;for(let e=1;e{let t=Yt;for(let e=2;e{let t=kt|j;for(let e=3;e{let t=Yt;for(let e=1;ei.length===2?Je|br:i.length===3||i.length===4?Je|kt:Je,tt(1,1/0),ot(j)),[R.Color]:K(kt,tt(1,4),ot(j)),[R.Band]:K(j,tt(1,3),ot(j)),[R.Palette]:K(kt,tt(2,2),T1),[R.ToString]:K(ye,tt(1,1),ot(bt|j|ye|kt))};function x1(i,t){const e=gt(i[1],t);if(!(e instanceof tn))throw new Error("Expected a literal argument for get operation");if(typeof e.value!="string")throw new Error("Expected a string argument for get operation");if(t.properties.add(e.value),i.length===3){const n=gt(i[2],t);return[e,n]}return[e]}function E1(i,t,e,n){const s=i[1];if(typeof s!="string")throw new Error("Expected a string argument for var operation");if(t.variables.add(s),!("variables"in t.style)||t.style.variables[s]===void 0)return[new tn(Yt,s)];const r=t.style.variables[s],a=gt(r,t);if(a.value=s,n&&!Qe(n,a.type))throw new Error(`The variable ${s} has type ${Ht(a.type)} but the following type was expected: ${Ht(n)}`);return[a]}function M1(i,t){t.featureId=!0}function w1(i,t){t.geometryType=!0}function _r(i,t){const e=i[0];if(i.length!==1)throw new Error(`Expected no arguments for ${e} operation`);return[]}function tt(i,t){return function(e,n){const s=e[0],r=e.length-1;if(i===t){if(r!==i){const a=i===1?"":"s";throw new Error(`Expected ${i} argument${a} for ${s}, got ${r}`)}}else if(rt){const a=t===1/0?`${i} or more`:`${i} to ${t}`;throw new Error(`Expected ${a} arguments for ${s}, got ${r}`)}}}function ot(i){return function(t,e){const n=t[0],s=t.length-1,r=new Array(s);for(let a=0;an.featureId;case R.GeometryType:return n=>n.geometryType;case R.Concat:{const n=i.args.map(s=>We(s));return s=>"".concat(...n.map(r=>r(s).toString()))}case R.Resolution:return n=>n.resolution;case R.Any:case R.All:case R.Between:case R.In:case R.Not:return D1(i);case R.Equal:case R.NotEqual:case R.LessThan:case R.LessThanOrEqualTo:case R.GreaterThan:case R.GreaterThanOrEqualTo:return O1(i);case R.Multiply:case R.Divide:case R.Add:case R.Subtract:case R.Clamp:case R.Mod:case R.Pow:case R.Abs:case R.Floor:case R.Ceil:case R.Round:case R.Sin:case R.Cos:case R.Atan:case R.Sqrt:return N1(i);case R.Case:return F1(i);case R.Match:return k1(i);case R.Interpolate:return G1(i);case R.ToString:return z1(i);default:throw new Error(`Unsupported operator ${e}`)}}function L1(i,t){const e=i.operator,n=i.args.length,s=new Array(n);for(let r=0;r{for(let a=0;a{for(let a=0;as.properties[n];case R.Var:return s=>s.variables[n];default:throw new Error(`Unsupported accessor operator ${i.operator}`)}}function O1(i,t){const e=i.operator,n=We(i.args[0]),s=We(i.args[1]);switch(e){case R.Equal:return r=>n(r)===s(r);case R.NotEqual:return r=>n(r)!==s(r);case R.LessThan:return r=>n(r)n(r)<=s(r);case R.GreaterThan:return r=>n(r)>s(r);case R.GreaterThanOrEqualTo:return r=>n(r)>=s(r);default:throw new Error(`Unsupported comparison operator ${e}`)}}function D1(i,t){const e=i.operator,n=i.args.length,s=new Array(n);for(let r=0;r{for(let a=0;a{for(let a=0;a{const a=s[0](r),o=s[1](r),h=s[2](r);return a>=o&&a<=h};case R.In:return r=>{const a=s[0](r);for(let o=1;o!s[0](r);default:throw new Error(`Unsupported logical operator ${e}`)}}function N1(i,t){const e=i.operator,n=i.args.length,s=new Array(n);for(let r=0;r{let a=1;for(let o=0;os[0](r)/s[1](r);case R.Add:return r=>{let a=0;for(let o=0;os[0](r)-s[1](r);case R.Clamp:return r=>{const a=s[0](r),o=s[1](r);if(ah?h:a};case R.Mod:return r=>s[0](r)%s[1](r);case R.Pow:return r=>Math.pow(s[0](r),s[1](r));case R.Abs:return r=>Math.abs(s[0](r));case R.Floor:return r=>Math.floor(s[0](r));case R.Ceil:return r=>Math.ceil(s[0](r));case R.Round:return r=>Math.round(s[0](r));case R.Sin:return r=>Math.sin(s[0](r));case R.Cos:return r=>Math.cos(s[0](r));case R.Atan:return n===2?r=>Math.atan2(s[0](r),s[1](r)):r=>Math.atan(s[0](r));case R.Sqrt:return r=>Math.sqrt(s[0](r));default:throw new Error(`Unsupported numeric operator ${e}`)}}function F1(i,t){const e=i.args.length,n=new Array(e);for(let s=0;s{for(let r=0;r{const r=n[0](s);for(let a=1;a{const r=n[0](s),a=n[1](s);let o,h;for(let l=2;l=a)return l===2?u:d?W1(r,a,o,h,c,u):xr(r,a,o,h,c,u);o=c,h=u}return h}}function z1(i,t){const e=i.operator,n=i.args.length,s=new Array(n);for(let r=0;r{const a=s[0](r);return i.args[0].type===kt?Zl(a):a.toString()};default:throw new Error(`Unsupported convert operator ${e}`)}}function xr(i,t,e,n,s,r){const a=s-e;if(a===0)return n;const o=t-e,h=i===1?o/a:(Math.pow(i,o)-1)/(Math.pow(i,a)-1);return n+h*(r-n)}function W1(i,t,e,n,s,r){if(s-e===0)return n;const o=tu(n),h=tu(r);let l=h[2]-o[2];l>180?l-=360:l<-180&&(l+=360);const c=[xr(i,t,e,o[0],s,h[0]),xr(i,t,e,o[1],s,h[1]),o[2]+xr(i,t,e,0,s,l),xr(i,t,e,n[3],s,r[3])];return wf(cy(c))}function B1(i){return!0}function U1(i){const t=rg(),e=j1(i,t),n=og();return function(s,r){if(n.properties=s.getPropertiesInternal(),n.resolution=r,t.featureId){const a=s.getId();a!==void 0?n.featureId=a:n.featureId=null}return t.geometryType&&(n.geometryType=ag(s.getGeometry())),e(n)}}function pu(i){const t=rg(),e=i.length,n=new Array(e);for(let a=0;a4)throw new Error(`Expected a color with 3 or 4 values for ${t}`);return e}function ug(i,t){const e=Oa(i,t);if(e.length!==2)throw new Error(`Expected an array of two numbers for ${t}`);return e}function tv(i,t){return typeof i=="number"?i:ug(i,t)}const Mu={RENDER_ORDER:"renderOrder"};class dg extends Un{constructor(t){t=t||{};const e=Object.assign({},t);delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,super(e),this.declutter_=t.declutter?String(t.declutter):void 0,this.renderBuffer_=t.renderBuffer!==void 0?t.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(t.style),this.updateWhileAnimating_=t.updateWhileAnimating!==void 0?t.updateWhileAnimating:!1,this.updateWhileInteracting_=t.updateWhileInteracting!==void 0?t.updateWhileInteracting:!1}getDeclutter(){return this.declutter_}getFeatures(t){return super.getFeatures(t)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(Mu.RENDER_ORDER)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(t,e){const n=this.getDeclutter();n in t.declutter||(t.declutter[n]=new ng(9)),this.getRenderer().renderDeclutter(t,e)}setRenderOrder(t){this.set(Mu.RENDER_ORDER,t)}setStyle(t){this.style_=t===void 0?eg:t;const e=ev(t);this.styleFunction_=t===null?void 0:tg(e),this.changed()}}function ev(i){if(i===void 0)return eg;if(!i)return null;if(typeof i=="function"||i instanceof Tt)return i;if(!Array.isArray(i))return pu([i]);if(i.length===0)return[];const t=i.length,e=i[0];if(e instanceof Tt){const s=new Array(t);for(let r=0;rh&&(this.instructions.push([Y.CUSTOM,h,c,t,n,rs,r]),this.hitDetectionInstructions.push([Y.CUSTOM,h,c,t,s||n,rs,r]));break;case"Point":l=t.getFlatCoordinates(),this.coordinates.push(l[0],l[1]),c=this.coordinates.length,this.instructions.push([Y.CUSTOM,h,c,t,n,void 0,r]),this.hitDetectionInstructions.push([Y.CUSTOM,h,c,t,s||n,void 0,r]);break}this.endGeometry(e)}beginGeometry(t,e,n){this.beginGeometryInstruction1_=[Y.BEGIN_GEOMETRY,e,0,t,n],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[Y.BEGIN_GEOMETRY,e,0,t,n],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const t=this.hitDetectionInstructions;t.reverse();let e;const n=t.length;let s,r,a=-1;for(e=0;ethis.maxLineWidth&&(this.maxLineWidth=n.lineWidth,this.bufferedMaxExtent_=null)}else n.strokeStyle=void 0,n.lineCap=void 0,n.lineDash=null,n.lineDashOffset=void 0,n.lineJoin=void 0,n.lineWidth=void 0,n.miterLimit=void 0}createFill(t){const e=t.fillStyle,n=[Y.SET_FILL_STYLE,e];return typeof e!="string"&&n.push(t.fillPatternScale),n}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[Y.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]}updateFillStyle(t,e){const n=t.fillStyle;(typeof n!="string"||t.currentFillStyle!=n)&&(n!==void 0&&this.instructions.push(e.call(this,t)),t.currentFillStyle=n)}updateStrokeStyle(t,e){const n=t.strokeStyle,s=t.lineCap,r=t.lineDash,a=t.lineDashOffset,o=t.lineJoin,h=t.lineWidth,l=t.miterLimit;(t.currentStrokeStyle!=n||t.currentLineCap!=s||r!=t.currentLineDash&&!ln(t.currentLineDash,r)||t.currentLineDashOffset!=a||t.currentLineJoin!=o||t.currentLineWidth!=h||t.currentMiterLimit!=l)&&(n!==void 0&&e.call(this,t),t.currentStrokeStyle=n,t.currentLineCap=s,t.currentLineDash=r,t.currentLineDashOffset=a,t.currentLineJoin=o,t.currentLineWidth=h,t.currentMiterLimit=l)}endGeometry(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const e=[Y.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=Td(this.maxExtent),this.maxLineWidth>0)){const t=this.resolution*(this.maxLineWidth+1)/2;Rl(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}class iv extends Da{constructor(t,e,n,s){super(t,e,n,s),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(t,e,n){if(!this.image_||this.maxExtent&&!kn(this.maxExtent,t.getFlatCoordinates()))return;this.beginGeometry(t,e,n);const s=t.getFlatCoordinates(),r=t.getStride(),a=this.coordinates.length,o=this.appendFlatPointCoordinates(s,r);this.instructions.push([Y.DRAW_IMAGE,a,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([Y.DRAW_IMAGE,a,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}drawMultiPoint(t,e,n){if(!this.image_)return;this.beginGeometry(t,e,n);const s=t.getFlatCoordinates(),r=[];for(let h=0,l=s.length;h=i){const g=(i-o+f)/f,_=me(l,u,g),m=me(c,d,g);h.push(_,m),r.push(h),h=[_,m],o==i&&(a+=s),o=0}else if(o0&&r.push(h),r}function rv(i,t,e,n,s){let r=e,a=e,o=0,h=0,l=e,c,u,d,f,g,_,m,y,p,x;for(u=e;ui&&(h>o&&(o=h,r=l,a=u),h=0,l=u-s)),d=f,m=p,y=x),g=M,_=E}return h+=f,h>o?[l,u]:[r,a]}const Io={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class av extends Da{constructor(t,e,n,s){super(t,e,n,s),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.fillStates[le]={fillStyle:le},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterMode_=void 0,this.declutterImageWithText_=void 0}finish(){const t=super.finish();return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t}drawText(t,e,n){const s=this.textFillState_,r=this.textStrokeState_,a=this.textState_;if(this.text_===""||!a||!s&&!r)return;const o=this.coordinates;let h=o.length;const l=t.getType();let c=null,u=t.getStride();if(a.placement==="line"&&(l=="LineString"||l=="MultiLineString"||l=="Polygon"||l=="MultiPolygon")){if(!ne(this.maxExtent,t.getExtent()))return;let d;if(c=t.getFlatCoordinates(),l=="LineString")d=[c.length];else if(l=="MultiLineString")d=t.getEnds();else if(l=="Polygon")d=t.getEnds().slice(0,1);else if(l=="MultiPolygon"){const m=t.getEndss();d=[];for(let y=0,p=m.length;y{const E=o[(p+M)*2]===c[M*u]&&o[(p+M)*2+1]===c[M*u+1];return E||--p,E})}this.saveTextStates_(),(a.backgroundFill||a.backgroundStroke)&&(this.setFillStrokeStyle(a.backgroundFill,a.backgroundStroke),a.backgroundFill&&this.updateFillStyle(this.state,this.createFill),a.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e,n);let g=a.padding;if(g!=Sn&&(a.scale[0]<0||a.scale[1]<0)){let p=a.padding[0],x=a.padding[1],M=a.padding[2],E=a.padding[3];a.scale[0]<0&&(x=-x,E=-E),a.scale[1]<0&&(p=-p,M=-M),g=[p,x,M,E]}const _=this.pixelRatio;this.instructions.push([Y.DRAW_IMAGE,h,f,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterMode_,this.declutterImageWithText_,g==Sn?Sn:g.map(function(p){return p*_}),!!a.backgroundFill,!!a.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,d]);const m=1/_,y=this.state.fillStyle;a.backgroundFill&&(this.state.fillStyle=le,this.hitDetectionInstructions.push(this.createFill(this.state))),this.hitDetectionInstructions.push([Y.DRAW_IMAGE,h,f,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[m,m],NaN,this.declutterMode_,this.declutterImageWithText_,g,!!a.backgroundFill,!!a.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?le:this.fillKey_,this.textOffsetX_,this.textOffsetY_,d]),a.backgroundFill&&(this.state.fillStyle=y,this.hitDetectionInstructions.push(this.createFill(this.state))),this.endGeometry(e)}}saveTextStates_(){const t=this.textStrokeState_,e=this.textState_,n=this.textFillState_,s=this.strokeKey_;t&&(s in this.strokeStates||(this.strokeStates[s]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));const r=this.textKey_;r in this.textStates||(this.textStates[r]={font:e.font,textAlign:e.textAlign||qr,justify:e.justify,textBaseline:e.textBaseline||So,scale:e.scale});const a=this.fillKey_;n&&(a in this.fillStates||(this.fillStates[a]={fillStyle:n.fillStyle}))}drawChars_(t,e){const n=this.textStrokeState_,s=this.textState_,r=this.strokeKey_,a=this.textKey_,o=this.fillKey_;this.saveTextStates_();const h=this.pixelRatio,l=Io[s.textBaseline],c=this.textOffsetY_*h,u=this.text_,d=n?n.lineWidth*Math.abs(s.scale[0])/2:0;this.instructions.push([Y.DRAW_CHARS,t,e,l,s.overflow,o,s.maxAngle,h,c,r,d*h,u,a,1,this.declutterMode_]),this.hitDetectionInstructions.push([Y.DRAW_CHARS,t,e,l,s.overflow,o&&le,s.maxAngle,h,c,r,d*h,u,a,1/h,this.declutterMode_])}setTextStyle(t,e){let n,s,r;if(!t)this.text_="";else{const a=t.getFill();a?(s=this.textFillState_,s||(s={},this.textFillState_=s),s.fillStyle=Ze(a.getColor()||le)):(s=null,this.textFillState_=s);const o=t.getStroke();if(!o)r=null,this.textStrokeState_=r;else{r=this.textStrokeState_,r||(r={},this.textStrokeState_=r);const g=o.getLineDash(),_=o.getLineDashOffset(),m=o.getWidth(),y=o.getMiterLimit();r.lineCap=o.getLineCap()||qs,r.lineDash=g?g.slice():Mi,r.lineDashOffset=_===void 0?wi:_,r.lineJoin=o.getLineJoin()||Ys,r.lineWidth=m===void 0?Yr:m,r.miterLimit=y===void 0?jr:y,r.strokeStyle=Ze(o.getColor()||Xr)}n=this.textState_;const h=t.getFont()||Jf;i1(h);const l=t.getScaleArray();n.overflow=t.getOverflow(),n.font=h,n.maxAngle=t.getMaxAngle(),n.placement=t.getPlacement(),n.textAlign=t.getTextAlign(),n.repeat=t.getRepeat(),n.justify=t.getJustify(),n.textBaseline=t.getTextBaseline()||So,n.backgroundFill=t.getBackgroundFill(),n.backgroundStroke=t.getBackgroundStroke(),n.padding=t.getPadding()||Sn,n.scale=l===void 0?[1,1]:l;const c=t.getOffsetX(),u=t.getOffsetY(),d=t.getRotateWithView(),f=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=c===void 0?0:c,this.textOffsetY_=u===void 0?0:u,this.textRotateWithView_=d===void 0?!1:d,this.textRotation_=f===void 0?0:f,this.strokeKey_=r?(typeof r.strokeStyle=="string"?r.strokeStyle:mt(r.strokeStyle))+r.lineCap+r.lineDashOffset+"|"+r.lineWidth+r.lineJoin+r.miterLimit+"["+r.lineDash.join()+"]":"",this.textKey_=n.font+n.scale+(n.textAlign||"?")+(n.repeat||"?")+(n.justify||"?")+(n.textBaseline||"?"),this.fillKey_=s&&s.fillStyle?typeof s.fillStyle=="string"?s.fillStyle:"|"+mt(s.fillStyle):""}this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}}const ov={Circle:Su,Default:Da,Image:iv,LineString:nv,Polygon:Su,Text:av};class hv{constructor(t,e,n,s){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=s,this.resolution_=n,this.buildersByZIndex_={}}finish(){const t={};for(const e in this.buildersByZIndex_){t[e]=t[e]||{};const n=this.buildersByZIndex_[e];for(const s in n){const r=n[s].finish();t[e][s]=r}}return t}getBuilder(t,e){const n=t!==void 0?t.toString():"0";let s=this.buildersByZIndex_[n];s===void 0&&(s={},this.buildersByZIndex_[n]=s);let r=s[e];if(r===void 0){const a=ov[e];r=new a(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),s[e]=r}return r}}function lv(i,t,e,n,s,r,a,o,h,l,c,u){let d=i[t],f=i[t+1],g=0,_=0,m=0,y=0;function p(){g=d,_=f,t+=n,d=i[t],f=i[t+1],y+=m,m=Math.sqrt((d-g)*(d-g)+(f-_)*(f-_))}do p();while(tL[2]}else F=M>I;const A=Math.PI,G=[],X=w+n===t;t=w,m=0,y=C,d=i[t],f=i[t+1];let V;if(X){p(),V=Math.atan2(f-_,d-g),F&&(V+=V>0?-A:A);const L=(I+M)/2,it=(z+E)/2;return G[0]=[L,it,(S-r)/2,V,s],G}s=s.replace(/\n/g," ");for(let L=0,it=s.length;L0?-A:A),V!==void 0){let P=Q-V;if(P+=P>A?-2*A:P<-A?2*A:0,Math.abs(P)>a)return null}V=Q;const wt=L;let et=0;for(;L0&&i.push(` `,""),i.push(t,""),i}class uv{constructor(t,e,n,s,r){this.overlaps=n,this.pixelRatio=e,this.resolution=t,this.alignAndScaleFill_,this.instructions=s.instructions,this.coordinates=s.coordinates,this.coordinateCache_={},this.renderedTransform_=Ge(),this.hitDetectionInstructions=s.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=s.fillStates||{},this.strokeStates=s.strokeStates||{},this.textStates=s.textStates||{},this.widths_={},this.labels_={},this.zIndexContext_=r?new Ef:null}getZIndexContext(){return this.zIndexContext_}createLabel(t,e,n,s){const r=t+e+n+s;if(this.labels_[r])return this.labels_[r];const a=s?this.strokeStates[s]:null,o=n?this.fillStates[n]:null,h=this.textStates[e],l=this.pixelRatio,c=[h.scale[0]*l,h.scale[1]*l],u=Array.isArray(t),d=h.justify?Io[h.justify]:Th(Array.isArray(t)?t[0]:t,h.textAlign||qr),f=s&&a.lineWidth?a.lineWidth:0,g=u?t:t.split(` `).reduce(cv,[]),{width:_,height:m,widths:y,heights:p,lineWidths:x}=s1(h,g),M=_+f,E=[],w=(M+2)*c[0],C=(m+f)*c[1],S={width:w<0?Math.floor(w):Math.ceil(w),height:C<0?Math.floor(C):Math.ceil(C),contextInstructions:E};(c[0]!=1||c[1]!=1)&&E.push("scale",c),s&&(E.push("strokeStyle",a.strokeStyle),E.push("lineWidth",f),E.push("lineCap",a.lineCap),E.push("lineJoin",a.lineJoin),E.push("miterLimit",a.miterLimit),E.push("setLineDash",[a.lineDash]),E.push("lineDashOffset",a.lineDashOffset)),n&&E.push("fillStyle",o.fillStyle),E.push("textBaseline","middle"),E.push("textAlign","center");const I=.5-d;let z=d*M+I*f;const F=[],A=[];let G=0,X=0,V=0,L=0,it;for(let Q=0,wt=g.length;Qt?t-l:r,M=a+c>e?e-c:a,E=g[3]+x*d[0]+g[1],w=g[0]+M*d[1]+g[2],C=y-g[3],S=p-g[0];(_||u!==0)&&(Fi[0]=C,ki[0]=C,Fi[1]=S,ui[1]=S,ui[0]=C+E,di[0]=ui[0],di[1]=S+w,ki[1]=di[1]);let I;return u!==0?(I=ei(Ge(),n,s,1,1,u,-n,-s),Ft(I,Fi),Ft(I,ui),Ft(I,di),Ft(I,ki),Si(Math.min(Fi[0],ui[0],di[0],ki[0]),Math.min(Fi[1],ui[1],di[1],ki[1]),Math.max(Fi[0],ui[0],di[0],ki[0]),Math.max(Fi[1],ui[1],di[1],ki[1]),$n)):Si(Math.min(C,C+E),Math.min(S,S+w),Math.max(C,C+E),Math.max(S,S+w),$n),f&&(y=Math.round(y),p=Math.round(p)),{drawImageX:y,drawImageY:p,drawImageW:x,drawImageH:M,originX:l,originY:c,declutterBox:{minX:$n[0],minY:$n[1],maxX:$n[2],maxY:$n[3],value:m},canvasTransform:I,scale:d}}replayImageOrLabel_(t,e,n,s,r,a,o){const h=!!(a||o),l=s.declutterBox,c=o?o[2]*s.scale[0]/2:0;return l.minX-c<=e[0]&&l.maxX+c>=0&&l.minY-c<=e[1]&&l.maxY+c>=0&&(h&&this.replayTextBackground_(t,Fi,ui,di,ki,a,o),r1(t,s.canvasTransform,r,n,s.originX,s.originY,s.drawImageW,s.drawImageH,s.drawImageX,s.drawImageY,s.scale)),!0}fill_(t){const e=this.alignAndScaleFill_;if(e){const n=Ft(this.renderedTransform_,[0,0]),s=512*this.pixelRatio;t.save(),t.translate(n[0]%s,n[1]%s),e!==1&&t.scale(e,e),t.rotate(this.viewRotation_)}t.fill(),e&&t.restore()}setStrokeStyle_(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.lineDashOffset=e[7],t.setLineDash(e[6])}drawLabelWithPointPlacement_(t,e,n,s){const r=this.textStates[e],a=this.createLabel(t,e,s,n),o=this.strokeStates[n],h=this.pixelRatio,l=Th(Array.isArray(t)?t[0]:t,r.textAlign||qr),c=Io[r.textBaseline||So],u=o&&o.lineWidth?o.lineWidth:0,d=a.width/h-2*r.scale[0],f=l*d+2*(.5-l)*u,g=c*a.height/h+2*(.5-c)*u;return{label:a,anchorX:f,anchorY:g}}execute_(t,e,n,s,r,a,o,h){const l=this.zIndexContext_;let c;this.pixelCoordinates_&&ln(n,this.renderedTransform_)?c=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),c=sn(this.coordinates,0,this.coordinates.length,2,n,this.pixelCoordinates_),k_(this.renderedTransform_,n));let u=0;const d=s.length;let f=0,g,_,m,y,p,x,M,E,w,C,S,I,z,F=0,A=0,G=null,X=null;const V=this.coordinateCache_,L=this.viewRotation_,it=Math.round(Math.atan2(-n[1],n[0])*1e12)/1e12,Q={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:L},wt=this.instructions!=s||this.overlaps?0:200;let et,at,st,xt;for(;uwt&&(this.fill_(t),F=0),A>wt&&(t.stroke(),A=0),!F&&!A&&(t.beginPath(),p=NaN,x=NaN),++u;break;case Y.CIRCLE:f=P[1];const qt=c[f],Lt=c[f+1],Le=c[f+2],un=c[f+3],Qt=Le-qt,Ua=un-Lt,sr=Math.sqrt(Qt*Qt+Ua*Ua);t.moveTo(qt+sr,Lt),t.arc(qt,Lt,sr,0,2*Math.PI,!0),++u;break;case Y.CLOSE_PATH:t.closePath(),++u;break;case Y.CUSTOM:f=P[1],g=P[2];const oh=P[3],Ai=P[4],rr=P[5];Q.geometry=oh,Q.feature=et,u in V||(V[u]=[]);const Li=V[u];rr?rr(c,f,g,2,Li):(Li[0]=c[f],Li[1]=c[f+1],Li.length=2),l&&(l.zIndex=P[6]),Ai(Li,Q),++u;break;case Y.DRAW_IMAGE:f=P[1],g=P[2],w=P[3],_=P[4],m=P[5];let ar=P[6];const ja=P[7],hh=P[8],Pe=P[9],xe=P[10];let oi=P[11];const dn=P[12];let fn=P[13];y=P[14]||"declutter";const Pi=P[15];if(!w&&P.length>=20){C=P[19],S=P[20],I=P[21],z=P[22];const Ee=this.drawLabelWithPointPlacement_(C,S,I,z);w=Ee.label,P[3]=w;const _n=P[23];_=(Ee.anchorX-_n)*this.pixelRatio,P[4]=_;const Me=P[24];m=(Ee.anchorY-Me)*this.pixelRatio,P[5]=m,ar=w.height,P[6]=ar,fn=w.width,P[13]=fn}let gn;P.length>25&&(gn=P[25]);let Oi,Xn,zt;P.length>17?(Oi=P[16],Xn=P[17],zt=P[18]):(Oi=Sn,Xn=!1,zt=!1),xe&&it?oi+=L:!xe&&!it&&(oi-=L);let o0=0;for(;f!gg.includes(i));class fv{constructor(t,e,n,s,r,a,o){this.maxExtent_=t,this.overlaps_=s,this.pixelRatio_=n,this.resolution_=e,this.renderBuffer_=a,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=Ge(),this.renderedContext_=null,this.deferredZIndexContexts_={},this.createExecutors_(r,o)}clip(t,e){const n=this.getClipCoords(e);t.beginPath(),t.moveTo(n[0],n[1]),t.lineTo(n[2],n[3]),t.lineTo(n[4],n[5]),t.lineTo(n[6],n[7]),t.clip()}createExecutors_(t,e){for(const n in t){let s=this.executorsByZIndex_[n];s===void 0&&(s={},this.executorsByZIndex_[n]=s);const r=t[n];for(const a in r){const o=r[a];s[a]=new uv(this.resolution_,this.pixelRatio_,this.overlaps_,o,e)}}}hasExecutors(t){for(const e in this.executorsByZIndex_){const n=this.executorsByZIndex_[e];for(let s=0,r=t.length;s0){if(!a||C==="none"||f!=="Image"&&f!=="Text"||a.includes(E)){const F=(d[I]-3)/4,A=s-F%o,G=s-(F/o|0),X=r(E,w,A*A+G*G);if(X)return X}c.clearRect(0,0,o,o);break}}const _=Object.keys(this.executorsByZIndex_).map(Number);_.sort(xi);let m,y,p,x,M;for(m=_.length-1;m>=0;--m){const E=_[m].toString();for(p=this.executorsByZIndex_[E],y=as.length-1;y>=0;--y)if(f=as[y],x=p[f],x!==void 0&&(M=x.executeHitDetection(c,h,n,g,u),M))return M}}getClipCoords(t){const e=this.maxExtent_;if(!e)return null;const n=e[0],s=e[1],r=e[2],a=e[3],o=[n,s,n,a,r,a,r,s];return sn(o,0,8,2,t,o),o}isEmpty(){return zs(this.executorsByZIndex_)}execute(t,e,n,s,r,a,o){const h=Object.keys(this.executorsByZIndex_).map(Number);h.sort(xi),a=a||as;const l=as.length;let c,u,d,f,g;for(o&&h.reverse(),c=0,u=h.length;cy.execute(E,e,n,s,r,o)),M&&x.restore(),p){p.offset();const E=h[c]*l+d;this.deferredZIndexContexts_[E]||(this.deferredZIndexContexts_[E]=[]),this.deferredZIndexContexts_[E].push(p)}}}}this.renderedContext_=t}getDeferredZIndexContexts(){return this.deferredZIndexContexts_}getRenderedContext(){return this.renderedContext_}renderDeferred(){const t=this.deferredZIndexContexts_,e=Object.keys(t).map(Number).sort(xi);for(let n=0,s=e.length;n{r.draw(this.renderedContext_),r.clear()}),t[e[n]].length=0}}const Ah={};function gv(i){if(Ah[i]!==void 0)return Ah[i];const t=i*2+1,e=i*i,n=new Array(e+1);for(let r=0;r<=i;++r)for(let a=0;a<=i;++a){const o=r*r+a*a;if(o>e)break;let h=n[o];h||(h=[],n[o]=h),h.push(((i+r)*t+(i+a))*4+3),r>0&&h.push(((i-r)*t+(i+a))*4+3),a>0&&(h.push(((i+r)*t+(i-a))*4+3),r>0&&h.push(((i-r)*t+(i-a))*4+3))}const s=[];for(let r=0,a=n.length;ru*this.pixelRatio_),lineDashOffset:(a||wi)*this.pixelRatio_,lineJoin:o!==void 0?o:Ys,lineWidth:(h!==void 0?h:Yr)*this.pixelRatio_,miterLimit:l!==void 0?l:jr,strokeStyle:Ze(n||Xr)}}}setImageStyle(t){let e;if(!t||!(e=t.getSize())){this.image_=null;return}const n=t.getPixelRatio(this.pixelRatio_),s=t.getAnchor(),r=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=s[0]*n,this.imageAnchorY_=s[1]*n,this.imageHeight_=e[1]*n,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=r[0],this.imageOriginY_=r[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation();const a=t.getScaleArray();this.imageScale_=[a[0]*this.pixelRatio_/n,a[1]*this.pixelRatio_/n],this.imageWidth_=e[0]*n}setTextStyle(t){if(!t)this.text_="";else{const e=t.getFill();if(!e)this.textFillState_=null;else{const f=e.getColor();this.textFillState_={fillStyle:Ze(f||le)}}const n=t.getStroke();if(!n)this.textStrokeState_=null;else{const f=n.getColor(),g=n.getLineCap(),_=n.getLineDash(),m=n.getLineDashOffset(),y=n.getLineJoin(),p=n.getWidth(),x=n.getMiterLimit();this.textStrokeState_={lineCap:g!==void 0?g:qs,lineDash:_||Mi,lineDashOffset:m||wi,lineJoin:y!==void 0?y:Ys,lineWidth:p!==void 0?p:Yr,miterLimit:x!==void 0?x:jr,strokeStyle:Ze(f||Xr)}}const s=t.getFont(),r=t.getOffsetX(),a=t.getOffsetY(),o=t.getRotateWithView(),h=t.getRotation(),l=t.getScaleArray(),c=t.getText(),u=t.getTextAlign(),d=t.getTextBaseline();this.textState_={font:s!==void 0?s:Jf,textAlign:u!==void 0?u:qr,textBaseline:d!==void 0?d:So},this.text_=c!==void 0?Array.isArray(c)?c.reduce((f,g,_)=>f+=_%2?" ":g,""):c:"",this.textOffsetX_=r!==void 0?this.pixelRatio_*r:0,this.textOffsetY_=a!==void 0?this.pixelRatio_*a:0,this.textRotateWithView_=o!==void 0?o:!1,this.textRotation_=h!==void 0?h:0,this.textScale_=[this.pixelRatio_*l[0],this.pixelRatio_*l[1]]}}}const Ye=.5;function mv(i,t,e,n,s,r,a,o,h){const l=h?Pl(s):s,c=i[0]*Ye,u=i[1]*Ye,d=jt(c,u);d.imageSmoothingEnabled=!1;const f=d.canvas,g=new _v(d,Ye,s,null,a,o,h?Ho(I_(),h):null),_=e.length,m=Math.floor((256*256*256-1)/_),y={};for(let x=1;x<=_;++x){const M=e[x-1],E=M.getStyleFunction()||n;if(!E)continue;let w=E(M,r);if(!w)continue;Array.isArray(w)||(w=[w]);const S=(x*m).toString(16).padStart(7,"#00000");for(let I=0,z=w.length;I0;return u&&Promise.all(h).then(()=>s(null)),Ev(i,t,e,n,r,a,o),u}function Ev(i,t,e,n,s,r,a){const o=e.getGeometryFunction()(t);if(!o)return;const h=o.simplifyTransformed(n,s);if(e.getRenderer())yg(i,h,e,t,a);else{const c=_g[h.getType()];c(i,h,e,t,a,r)}}function yg(i,t,e,n,s){if(t.getType()=="GeometryCollection"){const a=t.getGeometries();for(let o=0,h=a.length;o{if(this.frameState&&!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const n=this.frameState.size.slice(),s=this.renderedCenter_,r=this.renderedResolution_,a=this.renderedRotation_,o=this.renderedProjection_,h=this.wrappedRenderedExtent_,l=this.getLayer(),c=[],u=n[0]*Ye,d=n[1]*Ye;c.push(this.getRenderTransform(s,r,a,Ye,u,d,0).slice());const f=l.getSource(),g=o.getExtent();if(f.getWrapX()&&o.canWrapX()&&!Ve(g,h)){let _=h[0];const m=nt(g);let y=0,p;for(;_g[2];)++y,p=m*y,c.push(this.getRenderTransform(s,r,a,Ye,u,d,p).slice()),_-=m}this.hitDetectionImageData_=mv(n,c,this.renderedFeatures_,l.getStyleFunction(),h,r,a,bu(r,this.renderedPixelRatio_),null)}e(yv(t,this.renderedFeatures_,this.hitDetectionImageData_))})}forEachFeatureAtCoordinate(t,e,n,s,r){if(!this.replayGroup_)return;const a=e.viewState.resolution,o=e.viewState.rotation,h=this.getLayer(),l={},c=function(g,_,m){const y=mt(g),p=l[y];if(p){if(p!==!0&&mu=g.forEachFeatureAtCoordinate(t,a,o,n,c,f&&e.declutter[f]?e.declutter[f].all().map(_=>_.value):null)),u}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}prepareFrame(t){const e=this.getLayer(),n=e.getSource();if(!n)return!1;const s=t.viewHints[Nt.ANIMATING],r=t.viewHints[Nt.INTERACTING],a=e.getUpdateWhileAnimating(),o=e.getUpdateWhileInteracting();if(this.ready&&!a&&s||!o&&r)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const h=t.extent,l=t.viewState,c=l.projection,u=l.resolution,d=t.pixelRatio,f=e.getRevision(),g=e.getRenderBuffer();let _=e.getRenderOrder();_===void 0&&(_=vv);const m=l.center.slice(),y=Rl(h,g*u),p=y.slice(),x=[y.slice()],M=c.getExtent();if(n.getWrapX()&&c.canWrapX()&&!Ve(M,t.extent)){const X=nt(M),V=Math.max(nt(y)/2,X);y[0]=M[0]-V,y[2]=M[2]+V,Wd(m,c);const L=Fd(x[0],c);L[0]M[0]&&L[2]>M[2]&&x.push([L[0]-X,L[1],L[2]-X,L[3]])}if(this.ready&&this.renderedResolution_==u&&this.renderedRevision_==f&&this.renderedRenderOrder_==_&&this.renderedFrameDeclutter_===!!t.declutter&&Ve(this.wrappedRenderedExtent_,y))return ln(this.renderedExtent_,p)||(this.hitDetectionImageData_=null,this.renderedExtent_=p),this.renderedCenter_=m,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const E=new hv(mg(u,d),y,u,d);let w;for(let X=0,V=x.length;X{let L;const it=X.getStyleFunction()||e.getStyleFunction();if(it&&(L=it(X,u)),L){const Q=this.renderFeature(X,C,L,E,w,this.getLayer().getDeclutter(),V);S=S&&!Q}},z=Pl(y),F=n.getFeaturesInExtent(z);_&&F.sort(_);for(let X=0,V=F.length;X{if(t===this.squaredTolerance_)return this.simplifiedGeometry_;this.simplifiedGeometry_=this.clone(),e&&this.simplifiedGeometry_.applyTransform(e);const n=this.simplifiedGeometry_.getFlatCoordinates();let s;switch(this.type_){case"LineString":n.length=Gl(n,0,this.simplifiedGeometry_.flatCoordinates_.length,this.simplifiedGeometry_.stride_,t,n,0),s=[n.length];break;case"MultiLineString":s=[],n.length=Y_(n,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,t,n,0,s);break;case"Polygon":s=[],n.length=zl(n,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,Math.sqrt(t),n,0,s);break}return s&&(this.simplifiedGeometry_=new be(this.type_,n,s,2,this.properties_,this.id_)),this.squaredTolerance_=t,this.simplifiedGeometry_}),this}}be.prototype.getFlatCoordinates=be.prototype.getOrientedFlatCoordinates;const Se={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};function Pv(i,t){return[[-1/0,-1/0,1/0,1/0]]}function LC(i,t){return[i]}let Ov=!1;function Dv(i,t,e,n,s,r,a){const o=new XMLHttpRequest;o.open("GET",typeof i=="function"?i(e,n,s):i,!0),t.getType()=="arraybuffer"&&(o.responseType="arraybuffer"),o.withCredentials=Ov,o.onload=function(h){if(!o.status||o.status>=200&&o.status<300){const l=t.getType();try{let c;l=="text"||l=="json"?c=o.responseText:l=="xml"?c=o.responseXML||o.responseText:l=="arraybuffer"&&(c=o.response),c?r(t.readFeatures(c,{extent:e,featureProjection:s}),t.readProjection(c)):a()}catch{a()}}else a()},o.onerror=a,o.send()}function Lu(i,t){return function(e,n,s,r,a){const o=this;Dv(i,t,e,n,s,function(h,l){o.addFeatures(h),r!==void 0&&r(h)},a||Gs)}}class Gi extends si{constructor(t,e,n){super(t),this.feature=e,this.features=n}}class Nv extends Jl{constructor(t){t=t||{},super({attributions:t.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:t.wrapX!==void 0?t.wrapX:!0}),this.on,this.once,this.un,this.loader_=Gs,this.format_=t.format,this.overlaps_=t.overlaps===void 0?!0:t.overlaps,this.url_=t.url,t.loader!==void 0?this.loader_=t.loader:this.url_!==void 0&&(ct(this.format_,"`format` must be set when `url` is set"),this.loader_=Lu(this.url_,this.format_)),this.strategy_=t.strategy!==void 0?t.strategy:Pv;const e=t.useSpatialIndex!==void 0?t.useSpatialIndex:!0;this.featuresRtree_=e?new Tu:null,this.loadedExtentsRtree_=new Tu,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null;let n,s;Array.isArray(t.features)?s=t.features:t.features&&(n=t.features,s=n.getArray()),!e&&n===void 0&&(n=new Ke(s)),s!==void 0&&this.addFeaturesInternal(s),n!==void 0&&this.bindFeaturesCollection_(n)}addFeature(t){this.addFeatureInternal(t),this.changed()}addFeatureInternal(t){const e=mt(t);if(!this.addToIndex_(e,t)){this.featuresCollection_&&this.featuresCollection_.remove(t);return}this.setupChangeEvents_(e,t);const n=t.getGeometry();if(n){const s=n.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(s,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new Gi(Se.ADDFEATURE,t))}setupChangeEvents_(t,e){e instanceof be||(this.featureChangeKeys_[t]=[lt(e,Z.CHANGE,this.handleFeatureChange_,this),lt(e,Ws.PROPERTYCHANGE,this.handleFeatureChange_,this)])}addToIndex_(t,e){let n=!0;if(e.getId()!==void 0){const s=String(e.getId());if(!(s in this.idIndex_))this.idIndex_[s]=e;else if(e instanceof be){const r=this.idIndex_[s];r instanceof be?Array.isArray(r)?r.push(e):this.idIndex_[s]=[r,e]:n=!1}else n=!1}return n&&(ct(!(t in this.uidIndex_),"The passed `feature` was already added to the source"),this.uidIndex_[t]=e),n}addFeatures(t){this.addFeaturesInternal(t),this.changed()}addFeaturesInternal(t){const e=[],n=[],s=[];for(let r=0,a=t.length;r{e||(e=!0,this.addFeature(n.element),e=!1)}),t.addEventListener(he.REMOVE,n=>{e||(e=!0,this.removeFeature(n.element),e=!1)}),this.featuresCollection_=t}clear(t){if(t){for(const n in this.featureChangeKeys_)this.featureChangeKeys_[n].forEach(Mt);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const n=s=>{this.removeFeatureInternal(s)};this.featuresRtree_.forEach(n);for(const s in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[s])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const e=new Gi(Se.CLEAR);this.dispatchEvent(e),this.changed()}forEachFeature(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureAtCoordinateDirect(t,e){const n=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(n,function(s){const r=s.getGeometry();if(r instanceof be||r.intersectsCoordinate(t))return e(s)})}forEachFeatureInExtent(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureIntersectingExtent(t,e){return this.forEachFeatureInExtent(t,function(n){const s=n.getGeometry();if(s instanceof be||s.intersectsExtent(t)){const r=e(n);if(r)return r}})}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),zs(this.nullGeometryFeatures_)||qo(t,Object.values(this.nullGeometryFeatures_))),t}getFeaturesAtCoordinate(t){const e=[];return this.forEachFeatureAtCoordinateDirect(t,function(n){e.push(n)}),e}getFeaturesInExtent(t,e){if(this.featuresRtree_){if(!(e&&e.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(t);const s=kd(t,e);return[].concat(...s.map(r=>this.featuresRtree_.getInExtent(r)))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(t,e){const n=t[0],s=t[1];let r=null;const a=[NaN,NaN];let o=1/0;const h=[-1/0,-1/0,1/0,1/0];return e=e||Nr,this.featuresRtree_.forEachInExtent(h,function(l){if(e(l)){const c=l.getGeometry(),u=o;if(o=c instanceof be?0:c.closestPointXY(n,s,a,o),o{--this.loadingExtentsCount_,this.dispatchEvent(new Gi(Se.FEATURESLOADEND,void 0,c))},()=>{--this.loadingExtentsCount_,this.dispatchEvent(new Gi(Se.FEATURESLOADERROR))}),s.insert(h,{extent:h.slice()}))}this.loading=this.loader_.length<4?!1:this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(t){const e=this.loadedExtentsRtree_;let n;e.forEachInExtent(t,function(s){if(Us(s.extent,t))return n=s,!0}),n&&e.remove(n)}removeFeatures(t){const e=[];for(let n=0,s=t.length;n0&&this.changed()}removeFeature(t){if(!t)return;this.removeFeatureInternal(t)&&this.changed()}removeFeatureInternal(t){const e=mt(t);if(!(e in this.uidIndex_))return;e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.featureChangeKeys_[e]?.forEach(Mt),delete this.featureChangeKeys_[e];const s=t.getId();if(s!==void 0){const r=s.toString(),a=this.idIndex_[r];a===t?delete this.idIndex_[r]:Array.isArray(a)&&(a.splice(a.indexOf(t),1),a.length===1&&(this.idIndex_[r]=a[0]))}return delete this.uidIndex_[e],this.hasListener(Se.REMOVEFEATURE)&&this.dispatchEvent(new Gi(Se.REMOVEFEATURE,t)),t}removeFromIdIndex_(t){let e=!1;for(const n in this.idIndex_){const s=this.idIndex_[n];if(t instanceof be&&Array.isArray(s)&&s.includes(t))s.splice(s.indexOf(t),1);else if(this.idIndex_[n]===t){delete this.idIndex_[n],e=!0;break}}return e}setLoader(t){this.loader_=t}setUrl(t){ct(this.format_,"`format` must be set when `url` is set"),this.url_=t,this.setLoader(Lu(t,this.format_))}}class Fv{constructor(t,e,n){this.decay_=t,this.minVelocity_=e,this.delay_=n,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(t,e){this.points_.push(t,e,Date.now())}end(){if(this.points_.length<6)return!1;const t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]0&&this.points_[n+2]>t;)n-=3;const s=this.points_[e+2]-this.points_[n+2];if(s<1e3/60)return!1;const r=this.points_[e]-this.points_[n],a=this.points_[e+1]-this.points_[n+1];return this.angle_=Math.atan2(a,r),this.initialVelocity_=Math.sqrt(r*r+a*a)/s,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}}class kv extends wl{constructor(t){super(),this.map_=t}dispatchRenderEvent(t,e){ht()}calculateMatrices2D(t){const e=t.viewState,n=t.coordinateToPixelTransform,s=t.pixelToCoordinateTransform;ei(n,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),$d(s,n)}forEachFeatureAtCoordinate(t,e,n,s,r,a,o,h){let l;const c=e.viewState;function u(M,E,w,C){return r.call(a,E,M?w:null,C)}const d=c.projection,f=Wd(t.slice(),d),g=[[0,0]];if(d.canWrapX()&&s){const M=d.getExtent(),E=nt(M);g.push([-E,0],[E,0])}const _=e.layerStatesArray,m=_.length,y=[],p=[];for(let M=0;M=0;--E){const w=_[E],C=w.layer;if(C.hasRenderer()&&Xl(w,c)&&o.call(h,C)){const S=C.getRenderer(),I=C.getSource();if(S&&I){const z=I.getWrapX()?f:t,F=u.bind(null,w.managed);p[0]=z[0]+g[M][0],p[1]=z[1]+g[M][1],l=S.forEachFeatureAtCoordinate(p,e,n,F,y)}if(l)return l}}if(y.length===0)return;const x=1/y.length;return y.forEach((M,E)=>M.distanceSq+=E*x),y.sort((M,E)=>M.distanceSq-E.distanceSq),y.some(M=>l=M.callback(M.feature,M.layer,M.geometry)),l}hasFeatureAtCoordinate(t,e,n,s,r,a){return this.forEachFeatureAtCoordinate(t,e,n,s,Nr,this,r,a)!==void 0}getMap(){return this.map_}renderFrame(t){ht()}scheduleExpireIconCache(t){$e.canExpireCache()&&t.postRenderFunctions.push(Gv)}}function Gv(i,t){$e.expire()}class zv extends kv{constructor(t){super(t),this.fontChangeListenerKey_=lt(gi,Ws.PROPERTYCHANGE,t.redrawText.bind(t)),this.element_=document.createElement("div");const e=this.element_.style;e.position="absolute",e.width="100%",e.height="100%",e.zIndex="0",this.element_.className=th+" ol-layers";const n=t.getViewport();n.insertBefore(this.element_,n.firstChild||null),this.children_=[],this.renderedVisible_=!0}dispatchRenderEvent(t,e){const n=this.getMap();if(n.hasListener(t)){const s=new mf(t,void 0,e);n.dispatchEvent(s)}}disposeInternal(){Mt(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),super.disposeInternal()}renderFrame(t){if(!t){this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1);return}this.calculateMatrices2D(t),this.dispatchRenderEvent(Te.PRECOMPOSE,t);const e=t.layerStatesArray.sort(function(o,h){return o.zIndex-h.zIndex});e.some(o=>o.layer instanceof dg&&o.layer.getDeclutter())&&(t.declutter={});const s=t.viewState;this.children_.length=0;const r=[];let a=null;for(let o=0,h=e.length;o=0;--n){const s=e[n],r=s.layer;r.getDeclutter()&&r.renderDeclutter(t,s)}e.forEach(n=>n.layer.renderDeferred(t))}}}class ji extends si{constructor(t,e){super(t),this.layer=e}}const Lh={LAYERS:"layers"};class ir extends bd{constructor(t){t=t||{};const e=Object.assign({},t);delete e.layers;let n=t.layers;super(e),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(Lh.LAYERS,this.handleLayersChanged_),n?Array.isArray(n)?n=new Ke(n.slice(),{unique:!0}):ct(typeof n.getArray=="function","Expected `layers` to be an array or a `Collection`"):n=new Ke(void 0,{unique:!0}),this.setLayers(n)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(Mt),this.layersListenerKeys_.length=0;const t=this.getLayers();this.layersListenerKeys_.push(lt(t,he.ADD,this.handleLayersAdd_,this),lt(t,he.REMOVE,this.handleLayersRemove_,this));for(const n in this.listenerKeys_)this.listenerKeys_[n].forEach(Mt);Ra(this.listenerKeys_);const e=t.getArray();for(let n=0,s=e.length;n{this.clickTimeoutId_=void 0;const n=new Bi(St.SINGLECLICK,this.map_,t);this.dispatchEvent(n)},250)}updateActivePointers_(t){const e=t,n=e.pointerId;if(e.type==St.POINTERUP||e.type==St.POINTERCANCEL){delete this.trackedTouches_[n];for(const s in this.trackedTouches_)if(this.trackedTouches_[s].target!==e.target){delete this.trackedTouches_[s];break}}else(e.type==St.POINTERDOWN||e.type==St.POINTERMOVE)&&(this.trackedTouches_[n]=e);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(t){this.updateActivePointers_(t);const e=new Bi(St.POINTERUP,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(e),this.emulateClicks_&&!e.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),this.activePointers_.length===0&&(this.dragListenerKeys_.forEach(Mt),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(t){return t.button===0}handlePointerDown_(t){this.emulateClicks_=this.activePointers_.length===0,this.updateActivePointers_(t);const e=new Bi(St.POINTERDOWN,this.map_,t,void 0,void 0,this.activePointers_);if(this.dispatchEvent(e),this.down_=new PointerEvent(t.type,t),Object.defineProperty(this.down_,"target",{writable:!1,value:t.target}),this.dragListenerKeys_.length===0){const n=this.map_.getOwnerDocument();this.dragListenerKeys_.push(lt(n,St.POINTERMOVE,this.handlePointerMove_,this),lt(n,St.POINTERUP,this.handlePointerUp_,this),lt(this.element_,St.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==n&&this.dragListenerKeys_.push(lt(this.element_.getRootNode(),St.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(t){if(this.isMoving_(t)){this.updateActivePointers_(t),this.dragging_=!0;const e=new Bi(St.POINTERDRAG,this.map_,t,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(e)}}relayMoveEvent_(t){this.originalPointerMoveEvent_=t;const e=!!(this.down_&&this.isMoving_(t));this.dispatchEvent(new Bi(St.POINTERMOVE,this.map_,t,e))}handleTouchMove_(t){const e=this.originalPointerMoveEvent_;(!e||e.defaultPrevented)&&(typeof t.cancelable!="boolean"||t.cancelable===!0)&&t.preventDefault()}isMoving_(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&(Mt(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(Z.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(Mt(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(Mt),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}}const Ui={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},Vt={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},To=1/0;class Bv{constructor(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,Ra(this.queuedElements_)}dequeue(){const t=this.elements_,e=this.priorities_,n=t[0];t.length==1?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));const s=this.keyFunction_(n);return delete this.queuedElements_[s],n}enqueue(t){ct(!(this.keyFunction_(t)in this.queuedElements_),"Tried to enqueue an `element` that was already added to the queue");const e=this.priorityFunction_(t);return e!=To?(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0):!1}getCount(){return this.elements_.length}getLeftChildIndex_(t){return t*2+1}getRightChildIndex_(t){return t*2+2}getParentIndex_(t){return t-1>>1}heapify_(){let t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)}isEmpty(){return this.elements_.length===0}isKeyQueued(t){return t in this.queuedElements_}isQueued(t){return this.isKeyQueued(this.keyFunction_(t))}siftUp_(t){const e=this.elements_,n=this.priorities_,s=e.length,r=e[t],a=n[t],o=t;for(;t>1;){const h=this.getLeftChildIndex_(t),l=this.getRightChildIndex_(t),c=lt;){const o=this.getParentIndex_(e);if(s[o]>a)n[e]=n[o],s[e]=s[o],e=o;else break}n[e]=r,s[e]=a}reprioritize(){const t=this.priorityFunction_,e=this.elements_,n=this.priorities_;let s=0;const r=e.length;let a,o,h;for(o=0;o0;)r=this.dequeue()[0],a=r.getKey(),s=r.getState(),s===q.IDLE&&!(a in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[a]=!0,++this.tilesLoading_,++n,r.load())}}function jv(i,t,e,n,s){if(!i||!(e in i.wantedTiles)||!i.wantedTiles[e][t.getKey()])return To;const r=i.viewState.center,a=n[0]-r[0],o=n[1]-r[1];return 65536*Math.log(s)+Math.sqrt(a*a+o*o)/s}class lc extends ri{constructor(t){super();const e=t.element;e&&!t.target&&!e.style.pointerEvents&&(e.style.pointerEvents="auto"),this.element=e||null,this.target_=null,this.map_=null,this.listenerKeys=[],t.render&&(this.render=t.render),t.target&&this.setTarget(t.target)}disposeInternal(){Hh(this.element),super.disposeInternal()}getMap(){return this.map_}setMap(t){this.map_&&Hh(this.element);for(let e=0,n=this.listenerKeys.length;es.getAttributions(t)))),n=!this.getMap().getAllLayers().some(s=>s.getSource()&&s.getSource().getAttributionsCollapsible()===!1);return this.overrideCollapsible_||this.setCollapsible(n),e}async updateElement_(t){if(!t){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}const e=await Promise.all(this.collectSourceAttributions_(t).map(s=>Rd(()=>s))),n=e.length>0;if(this.renderedVisible_!=n&&(this.element.style.display=n?"":"none",this.renderedVisible_=n),!ln(e,this.renderedAttributions_)){ny(this.ulElement_);for(let s=0,r=e.length;s0&&n%(2*Math.PI)!==0?e.animate({rotation:0,duration:this.duration_,easing:Js}):e.setRotation(0))}render(t){const e=t.frameState;if(!e)return;const n=e.viewState.rotation;if(n!=this.rotation_){const s="rotate("+n+"rad)";if(this.autoHide_){const r=this.element.classList.contains(Ha);!r&&n===0?this.element.classList.add(Ha):r&&n!==0&&this.element.classList.remove(Ha)}this.label_.style.transform=s}this.rotation_=n}}class qv extends lc{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target});const e=t.className!==void 0?t.className:"ol-zoom",n=t.delta!==void 0?t.delta:1,s=t.zoomInClassName!==void 0?t.zoomInClassName:e+"-in",r=t.zoomOutClassName!==void 0?t.zoomOutClassName:e+"-out",a=t.zoomInLabel!==void 0?t.zoomInLabel:"+",o=t.zoomOutLabel!==void 0?t.zoomOutLabel:"–",h=t.zoomInTipLabel!==void 0?t.zoomInTipLabel:"Zoom in",l=t.zoomOutTipLabel!==void 0?t.zoomOutTipLabel:"Zoom out",c=document.createElement("button");c.className=s,c.setAttribute("type","button"),c.title=h,c.appendChild(typeof a=="string"?document.createTextNode(a):a),c.addEventListener(Z.CLICK,this.handleClick_.bind(this,n),!1);const u=document.createElement("button");u.className=r,u.setAttribute("type","button"),u.title=l,u.appendChild(typeof o=="string"?document.createTextNode(o):o),u.addEventListener(Z.CLICK,this.handleClick_.bind(this,-n),!1);const d=e+" "+th+" "+ac,f=this.element;f.className=d,f.appendChild(c),f.appendChild(u),this.duration_=t.duration!==void 0?t.duration:250}handleClick_(t,e){e.preventDefault(),this.zoomByDelta_(t)}zoomByDelta_(t){const n=this.getMap().getView();if(!n)return;const s=n.getZoom();if(s!==void 0){const r=n.getConstrainedZoom(s+t);this.duration_>0?(n.getAnimating()&&n.cancelAnimations(),n.animate({zoom:r,duration:this.duration_,easing:Js})):n.setZoom(r)}}}function Yv(i){i=i||{};const t=new Ke;return(i.zoom!==void 0?i.zoom:!0)&&t.push(new qv(i.zoomOptions)),(i.rotate!==void 0?i.rotate:!0)&&t.push(new Xv(i.rotateOptions)),(i.attribution!==void 0?i.attribution:!0)&&t.push(new pg(i.attributionOptions)),t}const Pu={ACTIVE:"active"};class Na extends ri{constructor(t){super(),this.on,this.once,this.un,t&&t.handleEvent&&(this.handleEvent=t.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(Pu.ACTIVE)}getMap(){return this.map_}handleEvent(t){return!0}setActive(t){this.set(Pu.ACTIVE,t)}setMap(t){this.map_=t}}function Vv(i,t,e){const n=i.getCenterInternal();if(n){const s=[n[0]+t[0],n[1]+t[1]];i.animateInternal({duration:e!==void 0?e:250,easing:F_,center:i.getConstrainedCenter(s)})}}function cc(i,t,e,n){const s=i.getZoom();if(s===void 0)return;const r=i.getConstrainedZoom(s+t),a=i.getResolutionForZoom(r);i.getAnimating()&&i.cancelAnimations(),i.animate({resolution:a,anchor:e,duration:n!==void 0?n:250,easing:Js})}class Kv extends Na{constructor(t){super(),t=t||{},this.delta_=t.delta?t.delta:1,this.duration_=t.duration!==void 0?t.duration:250}handleEvent(t){let e=!1;if(t.type==St.DBLCLICK){const n=t.originalEvent,s=t.map,r=t.coordinate,a=n.shiftKey?-this.delta_:this.delta_,o=s.getView();cc(o,a,r,this.duration_),n.preventDefault(),e=!0}return!e}}class Fa extends Na{constructor(t){t=t||{},super(t),t.handleDownEvent&&(this.handleDownEvent=t.handleDownEvent),t.handleDragEvent&&(this.handleDragEvent=t.handleDragEvent),t.handleMoveEvent&&(this.handleMoveEvent=t.handleMoveEvent),t.handleUpEvent&&(this.handleUpEvent=t.handleUpEvent),t.stopDown&&(this.stopDown=t.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(t){return!1}handleDragEvent(t){}handleEvent(t){if(!t.originalEvent)return!0;let e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==St.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==St.POINTERUP){const n=this.handleUpEvent(t);this.handlingDownUpSequence=n&&this.targetPointers.length>0}}else if(t.type==St.POINTERDOWN){const n=this.handleDownEvent(t);this.handlingDownUpSequence=n,e=this.stopDown(n)}else t.type==St.POINTERMOVE&&this.handleMoveEvent(t);return!e}handleMoveEvent(t){}handleUpEvent(t){return!1}stopDown(t){return t}updateTrackedPointers_(t){t.activePointers&&(this.targetPointers=t.activePointers)}}function uc(i){const t=i.length;let e=0,n=0;for(let s=0;s0&&this.condition_(t)){const n=t.map.getView();return this.lastCentroid=null,n.getAnimating()&&n.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1}}class ix extends Fa{constructor(t){t=t||{},super({stopDown:Ca}),this.condition_=t.condition?t.condition:$v,this.lastAngle_=void 0,this.duration_=t.duration!==void 0?t.duration:250}handleDragEvent(t){if(!Ph(t))return;const e=t.map,n=e.getView();if(n.getConstraints().rotation===Nl)return;const s=e.getSize(),r=t.pixel,a=Math.atan2(s[1]/2-r[1],r[0]-s[0]/2);if(this.lastAngle_!==void 0){const o=a-this.lastAngle_;n.adjustRotationInternal(-o)}this.lastAngle_=a}handleUpEvent(t){return Ph(t)?(t.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(t){return Ph(t)&&xg(t)&&this.condition_(t)?(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0):!1}}class nx extends wl{constructor(t){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+t,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const t=this.startPixel_,e=this.endPixel_,n="px",s=this.element_.style;s.left=Math.min(t[0],e[0])+n,s.top=Math.min(t[1],e[1])+n,s.width=Math.abs(e[0]-t[0])+n,s.height=Math.abs(e[1]-t[1])+n}setMap(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const e=this.element_.style;e.left="inherit",e.top="inherit",e.width="inherit",e.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){if(!this.map_)return;const t=this.startPixel_,e=this.endPixel_,s=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);s[4]=s[0].slice(),this.geometry_?this.geometry_.setCoordinates([s]):this.geometry_=new js([s])}getGeometry(){return this.geometry_}}const mr={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"};class eo extends si{constructor(t,e,n){super(t),this.coordinate=e,this.mapBrowserEvent=n}}class sx extends Fa{constructor(t){super(),this.on,this.once,this.un,t=t||{},this.box_=new nx(t.className||"ol-dragbox"),this.minArea_=t.minArea!==void 0?t.minArea:64,t.onBoxEnd&&(this.onBoxEnd=t.onBoxEnd),this.startPixel_=null,this.condition_=t.condition?t.condition:xg,this.boxEndCondition_=t.boxEndCondition?t.boxEndCondition:this.defaultBoxEndCondition}defaultBoxEndCondition(t,e,n){const s=n[0]-e[0],r=n[1]-e[1];return s*s+r*r>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(t){this.startPixel_&&(this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new eo(mr.BOXDRAG,t.coordinate,t)))}handleUpEvent(t){if(!this.startPixel_)return!1;this.box_.setMap(null);const e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new eo(e?mr.BOXEND:mr.BOXCANCEL,t.coordinate,t)),!1}handleDownEvent(t){return this.condition_(t)?(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new eo(mr.BOXSTART,t.coordinate,t)),!0):!1}onBoxEnd(t){}setActive(t){t||(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new eo(mr.BOXCANCEL,this.startPixel_,null)),this.startPixel_=null)),super.setActive(t)}}class wg extends sx{constructor(t){t=t||{};const e=t.condition?t.condition:Qv;super({condition:e,className:t.className||"ol-dragzoom",minArea:t.minArea}),this.duration_=t.duration!==void 0?t.duration:200,this.out_=t.out!==void 0?t.out:!1}onBoxEnd(t){const n=this.getMap().getView();let s=this.getGeometry();if(this.out_){const r=n.rotatedExtentForGeometry(s),a=n.getResolutionForExtentInternal(r),o=n.getResolution()/a;s=s.clone(),s.scale(o*o)}n.fitInternal(s,{duration:this.duration_,easing:Js})}}const yn={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown"};class rx extends Na{constructor(t){super(),t=t||{},this.defaultCondition_=function(e){return Eg(e)&&Mg(e)},this.condition_=t.condition!==void 0?t.condition:this.defaultCondition_,this.duration_=t.duration!==void 0?t.duration:100,this.pixelDelta_=t.pixelDelta!==void 0?t.pixelDelta:128}handleEvent(t){let e=!1;if(t.type==Z.KEYDOWN){const n=t.originalEvent,s=n.key;if(this.condition_(t)&&(s==yn.DOWN||s==yn.LEFT||s==yn.RIGHT||s==yn.UP)){const a=t.map.getView(),o=a.getResolution()*this.pixelDelta_;let h=0,l=0;s==yn.DOWN?l=-o:s==yn.LEFT?h=-o:s==yn.RIGHT?h=o:l=o;const c=[h,l];Il(c,a.getRotation()),Vv(a,c,this.duration_),n.preventDefault(),e=!0}}return!e}}class ax extends Na{constructor(t){super(),t=t||{},this.condition_=t.condition?t.condition:function(e){return!Jv(e)&&Mg(e)},this.delta_=t.delta?t.delta:1,this.duration_=t.duration!==void 0?t.duration:100}handleEvent(t){let e=!1;if(t.type==Z.KEYDOWN||t.type==Z.KEYPRESS){const n=t.originalEvent,s=n.key;if(this.condition_(t)&&(s==="+"||s==="-")){const r=t.map,a=s==="+"?this.delta_:-this.delta_,o=r.getView();cc(o,a,void 0,this.duration_),n.preventDefault(),e=!0}}return!e}}class ox extends Na{constructor(t){t=t||{},super(t),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=t.maxDelta!==void 0?t.maxDelta:1,this.duration_=t.duration!==void 0?t.duration:250,this.timeout_=t.timeout!==void 0?t.timeout:80,this.useAnchor_=t.useAnchor!==void 0?t.useAnchor:!0,this.constrainResolution_=t.constrainResolution!==void 0?t.constrainResolution:!1;const e=t.condition?t.condition:Hv;this.condition_=t.onFocusOnly?ol(vg,e):e,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.deltaPerZoom_=300}endInteraction_(){this.trackpadTimeoutId_=void 0;const t=this.getMap();if(!t)return;t.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)}handleEvent(t){if(!this.condition_(t)||t.type!==Z.WHEEL)return!0;const n=t.map,s=t.originalEvent;s.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate);let r;if(t.type==Z.WHEEL&&(r=s.deltaY,Qm&&s.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(r/=pf),s.deltaMode===WheelEvent.DOM_DELTA_LINE&&(r*=40)),r===0)return!1;this.lastDelta_=r;const a=Date.now();this.startTime_===void 0&&(this.startTime_=a),(!this.mode_||a-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(r)<4?"trackpad":"wheel");const o=n.getView();if(this.mode_==="trackpad"&&!(o.getConstrainResolution()||this.constrainResolution_))return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(o.getAnimating()&&o.cancelAnimations(),o.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),o.adjustZoom(-r/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=a,!1;this.totalDelta_+=r;const h=Math.max(this.timeout_-(a-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,n),h),!1}handleWheelZoom_(t){const e=t.getView();e.getAnimating()&&e.cancelAnimations();let n=-It(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(n=n?n>0?1:-1:0),cc(e,n,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(t){this.useAnchor_=t,t||(this.lastAnchor_=null)}}class hx extends Fa{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=Ca),super(e),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=t.threshold!==void 0?t.threshold:.3,this.duration_=t.duration!==void 0?t.duration:250}handleDragEvent(t){let e=0;const n=this.targetPointers[0],s=this.targetPointers[1],r=Math.atan2(s.clientY-n.clientY,s.clientX-n.clientX);if(this.lastAngle_!==void 0){const h=r-this.lastAngle_;this.rotationDelta_+=h,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=h}this.lastAngle_=r;const a=t.map,o=a.getView();o.getConstraints().rotation!==Nl&&(this.anchor_=a.getCoordinateFromPixelInternal(a.getEventPixel(uc(this.targetPointers))),this.rotating_&&(a.render(),o.adjustRotationInternal(e,this.anchor_)))}handleUpEvent(t){return this.targetPointers.length<2?(t.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}}class lx extends Fa{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=Ca),super(e),this.anchor_=null,this.duration_=t.duration!==void 0?t.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(t){let e=1;const n=this.targetPointers[0],s=this.targetPointers[1],r=n.clientX-s.clientX,a=n.clientY-s.clientY,o=Math.sqrt(r*r+a*a);this.lastDistance_!==void 0&&(e=this.lastDistance_/o),this.lastDistance_=o;const h=t.map,l=h.getView();e!=1&&(this.lastScaleDelta_=e),this.anchor_=h.getCoordinateFromPixelInternal(h.getEventPixel(uc(this.targetPointers))),h.render(),l.adjustResolutionInternal(e,this.anchor_)}handleUpEvent(t){if(this.targetPointers.length<2){const n=t.map.getView(),s=this.lastScaleDelta_>1?1:-1;return n.endInteraction(this.duration_,s),!1}return!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}}function Sg(i){i=i||{};const t=new Ke,e=new Fv(-.005,.05,100);return(i.altShiftDragRotate!==void 0?i.altShiftDragRotate:!0)&&t.push(new ix),(i.doubleClickZoom!==void 0?i.doubleClickZoom:!0)&&t.push(new Kv({delta:i.zoomDelta,duration:i.zoomDuration})),(i.dragPan!==void 0?i.dragPan:!0)&&t.push(new ex({onFocusOnly:i.onFocusOnly,kinetic:e})),(i.pinchRotate!==void 0?i.pinchRotate:!0)&&t.push(new hx),(i.pinchZoom!==void 0?i.pinchZoom:!0)&&t.push(new lx({duration:i.zoomDuration})),(i.keyboard!==void 0?i.keyboard:!0)&&(t.push(new rx),t.push(new ax({delta:i.zoomDelta,duration:i.zoomDuration}))),(i.mouseWheelZoom!==void 0?i.mouseWheelZoom:!0)&&t.push(new ox({onFocusOnly:i.onFocusOnly,duration:i.zoomDuration})),(i.shiftDragZoom!==void 0?i.shiftDragZoom:!0)&&t.push(new wg({duration:i.zoomDuration})),t}function Cg(i){if(i instanceof Un){i.setMapInternal(null);return}i instanceof ir&&i.getLayers().forEach(Cg)}function Rg(i,t){if(i instanceof Un){i.setMapInternal(t);return}if(i instanceof ir){const e=i.getLayers().getArray();for(let n=0,s=e.length;nthis.updateSize()),this.controls=e.controls||Yv(),this.interactions=e.interactions||Sg({onFocusOnly:!0}),this.overlays_=e.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new Uv(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(Vt.LAYERGROUP,this.handleLayerGroupChanged_),this.addChangeListener(Vt.VIEW,this.handleViewChanged_),this.addChangeListener(Vt.SIZE,this.handleSizeChanged_),this.addChangeListener(Vt.TARGET,this.handleTargetChanged_),this.setProperties(e.values);const n=this;t.view&&!(t.view instanceof Ie)&&t.view.then(function(s){n.setView(new Ie(s))}),this.controls.addEventListener(he.ADD,s=>{s.element.setMap(this)}),this.controls.addEventListener(he.REMOVE,s=>{s.element.setMap(null)}),this.interactions.addEventListener(he.ADD,s=>{s.element.setMap(this)}),this.interactions.addEventListener(he.REMOVE,s=>{s.element.setMap(null)}),this.overlays_.addEventListener(he.ADD,s=>{this.addOverlayInternal_(s.element)}),this.overlays_.addEventListener(he.REMOVE,s=>{const r=s.element.getId();r!==void 0&&delete this.overlayIdIndex_[r.toString()],s.element.setMap(null)}),this.controls.forEach(s=>{s.setMap(this)}),this.interactions.forEach(s=>{s.setMap(this)}),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(t){this.getControls().push(t)}addInteraction(t){this.getInteractions().push(t)}addLayer(t){this.getLayerGroup().getLayers().push(t)}handleLayerAdd_(t){Rg(t.layer,this)}addOverlay(t){this.getOverlays().push(t)}addOverlayInternal_(t){const e=t.getId();e!==void 0&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.resizeObserver_.disconnect(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(t,e,n){if(!this.frameState_||!this.renderer_)return;const s=this.getCoordinateFromPixelInternal(t);n=n!==void 0?n:{};const r=n.hitTolerance!==void 0?n.hitTolerance:0,a=n.layerFilter!==void 0?n.layerFilter:Nr,o=n.checkWrapped!==!1;return this.renderer_.forEachFeatureAtCoordinate(s,this.frameState_,r,o,e,null,a,null)}getFeaturesAtPixel(t,e){const n=[];return this.forEachFeatureAtPixel(t,function(s){n.push(s)},e),n}getAllLayers(){const t=[];function e(n){n.forEach(function(s){s instanceof ir?e(s.getLayers()):t.push(s)})}return e(this.getLayers()),t}hasFeatureAtPixel(t,e){if(!this.frameState_||!this.renderer_)return!1;const n=this.getCoordinateFromPixelInternal(t);e=e!==void 0?e:{};const s=e.layerFilter!==void 0?e.layerFilter:Nr,r=e.hitTolerance!==void 0?e.hitTolerance:0,a=e.checkWrapped!==!1;return this.renderer_.hasFeatureAtCoordinate(n,this.frameState_,r,a,s,null)}getEventCoordinate(t){return this.getCoordinateFromPixel(this.getEventPixel(t))}getEventCoordinateInternal(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))}getEventPixel(t){const n=this.viewport_.getBoundingClientRect(),s=this.getSize(),r=n.width/s[0],a=n.height/s[1],o="changedTouches"in t?t.changedTouches[0]:t;return[(o.clientX-n.left)/r,(o.clientY-n.top)/a]}getTarget(){return this.get(Vt.TARGET)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(t){return Vh(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())}getCoordinateFromPixelInternal(t){const e=this.frameState_;return e?Ft(e.pixelToCoordinateTransform,t.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(t){const e=this.overlayIdIndex_[t.toString()];return e!==void 0?e:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(Vt.LAYERGROUP)}setLayers(t){const e=this.getLayerGroup();if(t instanceof Ke){e.setLayers(t);return}const n=e.getLayers();n.clear(),n.extend(t)}getLayers(){return this.getLayerGroup().getLayers()}getLoadingOrNotReady(){const t=this.getLayerGroup().getLayerStatesArray();for(let e=0,n=t.length;e=0;r--){const a=s[r];if(a.getMap()!==this||!a.getActive()||!this.getTargetElement())continue;if(!a.handleEvent(t)||t.propagationStopped)break}}}handlePostRender(){const t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){let s=this.maxTilesLoading_,r=s;if(t){const a=t.viewHints;if(a[Nt.ANIMATING]||a[Nt.INTERACTING]){const o=Date.now()-t.time>8;s=o?0:8,r=o?0:2}}e.getTilesLoading(){this.postRenderTimeoutHandle_=void 0,this.handlePostRender()},0))}setLayerGroup(t){const e=this.getLayerGroup();e&&this.handleLayerRemove_(new ji("removelayer",e)),this.set(Vt.LAYERGROUP,t)}setSize(t){this.set(Vt.SIZE,t)}setTarget(t){this.set(Vt.TARGET,t)}setView(t){if(!t||t instanceof Ie){this.set(Vt.VIEW,t);return}this.set(Vt.VIEW,new Ie);const e=this;t.then(function(n){e.setView(new Ie(n))})}updateSize(){const t=this.getTargetElement();let e;if(t){const s=getComputedStyle(t),r=t.offsetWidth-parseFloat(s.borderLeftWidth)-parseFloat(s.paddingLeft)-parseFloat(s.paddingRight)-parseFloat(s.borderRightWidth),a=t.offsetHeight-parseFloat(s.borderTopWidth)-parseFloat(s.paddingTop)-parseFloat(s.paddingBottom)-parseFloat(s.borderBottomWidth);!isNaN(r)&&!isNaN(a)&&(e=[r,a],!au(e)&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&Ud("No map visible because the map container's width or height are 0."))}const n=this.getSize();e&&(!n||!ln(e,n))&&(this.setSize(e),this.updateViewportSize_(e))}updateViewportSize_(t){const e=this.getView();e&&e.setViewportSize(t)}};function ux(i){let t=null;i.keyboardEventTarget!==void 0&&(t=typeof i.keyboardEventTarget=="string"?document.getElementById(i.keyboardEventTarget):i.keyboardEventTarget);const e={},n=i.layers&&typeof i.layers.getLayers=="function"?i.layers:new ir({layers:i.layers});e[Vt.LAYERGROUP]=n,e[Vt.TARGET]=i.target,e[Vt.VIEW]=i.view instanceof Ie?i.view:new Ie;let s;i.controls!==void 0&&(Array.isArray(i.controls)?s=new Ke(i.controls.slice()):(ct(typeof i.controls.getArray=="function","Expected `controls` to be an array or an `ol/Collection.js`"),s=i.controls));let r;i.interactions!==void 0&&(Array.isArray(i.interactions)?r=new Ke(i.interactions.slice()):(ct(typeof i.interactions.getArray=="function","Expected `interactions` to be an array or an `ol/Collection.js`"),r=i.interactions));let a;return i.overlays!==void 0?Array.isArray(i.overlays)?a=new Ke(i.overlays.slice()):(ct(typeof i.overlays.getArray=="function","Expected `overlays` to be an array or an `ol/Collection.js`"),a=i.overlays):a=new Ke,{controls:s,interactions:r,keyboardEventTarget:t,overlays:a,values:e}}const Rn=bi("map:WMTSLayer");var Os,Ds,Ns,ca,ua,da,fa,ga,Zs,bg,Ig;class FC extends Xs{constructor(e){const n=new Xf;super({...e,olLayer:n});O(this,Zs);O(this,Os);O(this,Ds);O(this,Ns);O(this,ca);O(this,ua);O(this,da);O(this,fa,Zt());O(this,ga,new AbortController);W(this,Os,e.url),W(this,Ds,e.name),W(this,ca,n),W(this,Ns,e.matrixSet),W(this,da,e.sourceOptions)}get type(){return"wmts"}destroy(){v(this,ga).abort(),super.destroy()}get legend(){return v(this,fa).value}get sublayers(){}get layers(){}__attach(e){super.__attach(e),B(this,Zs,bg).call(this).then(n=>{const r=new op().read(n),a=$p(r,{layer:v(this,Ds),matrixSet:v(this,Ns)});if(!a)throw new Error("Layer was not found in capabilities");const o=new Kp({...a,...v(this,da),tileLoadFunction:(c,u)=>{B(this,Zs,Ig).call(this,c,u)}});W(this,ua,o),v(this,ca).setSource(v(this,ua));const h=o.getStyle(),l=fx(r,this.name,h);v(this,fa).value=l}).catch(n=>{if(Dr(n)){Rn.error(`Layer ${this.name} has been destroyed before fetching the data`);return}Rn.error(`Failed fetching WMTS capabilities for Layer ${this.name}`,n)})}get url(){return v(this,Os)}get name(){return v(this,Ds)}get matrixSet(){return v(this,Ns)}}Os=new WeakMap,Ds=new WeakMap,Ns=new WeakMap,ca=new WeakMap,ua=new WeakMap,da=new WeakMap,fa=new WeakMap,ga=new WeakMap,Zs=new WeakSet,bg=async function(){const e=this.map.__sharedDependencies.httpService;return Df(v(this,Os),e,v(this,ga).signal)},Ig=async function(e,n){const s=this.map.__sharedDependencies.httpService;try{if(!(e instanceof Ql))throw new Error("Only 'ImageTile' is supported for now.");const r=e.getImage();if(!dx(r))throw new Error("Only tags are supported as tiles for now.");const a=await s.fetch(n);if(!a.ok)throw new Error(`Tile request failed with status ${a.status}.`);const o=await a.blob(),h=URL.createObjectURL(o),l=()=>{URL.revokeObjectURL(h),r.removeEventListener("load",l),r.removeEventListener("error",l)};r.addEventListener("load",l),r.addEventListener("error",l),r.src=h}catch(r){e.setState(q.ERROR),Dr(r)||Rn.error("Failed to load tile",r)}};function dx(i){return i.tagName==="IMG"}function fx(i,t,e){const s=i?.Contents?.Layer;let r=s?.find(l=>l?.Identifier===t);if(!r&&(Rn.debug("Failed to find the active layer in WMTS layer capabilities."),r=s?.[0],!r)){Rn.debug("No layer in WMTS capabilities - giving up.");return}const a=r.Style;let o=a?.find(l=>l?.Identifier===e);if(!o&&(Rn.debug("Failed to find active style in WMTS layer."),o=a?.[0],!o)){Rn.debug("No style in WMTS layer capabilities - giving up.");return}return o.LegendURL?.[0]?.href}function gx(i){const t=Object.keys(i.defs),e=t.length;let n,s;for(n=0;n=this.text.length)return;i=this.text[this.place++]}switch(this.state){case Hr:return this.neutral(i);case Tg:return this.keyword(i);case Ao:return this.quoted(i);case Lg:return this.afterquote(i);case Ag:return this.number(i);case dc:return}};Ti.prototype.afterquote=function(i){if(i==='"'){this.word+='"',this.state=Ao;return}if(rh.test(i)){this.word=this.word.trim(),this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in afterquote yet, index '+this.place)};Ti.prototype.afterItem=function(i){if(i===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=Hr;return}if(i==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=Hr,this.currentObject=this.stack.pop(),this.currentObject||(this.state=dc);return}};Ti.prototype.number=function(i){if(Pg.test(i)){this.word+=i;return}if(rh.test(i)){this.word=parseFloat(this.word),this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in number yet, index '+this.place)};Ti.prototype.quoted=function(i){if(i==='"'){this.state=Lg;return}this.word+=i};Ti.prototype.keyword=function(i){if(Sx.test(i)){this.word+=i;return}if(i==="["){var t=[];t.push(this.word),this.level++,this.root===null?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,this.state=Hr;return}if(rh.test(i)){this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in keyword yet, index '+this.place)};Ti.prototype.neutral=function(i){if(wx.test(i)){this.word=i,this.state=Tg;return}if(i==='"'){this.word="",this.state=Ao;return}if(Pg.test(i)){this.word=i,this.state=Ag;return}if(rh.test(i)){this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in neutral yet, index '+this.place)};Ti.prototype.output=function(){for(;this.place0?90:-90),i.lat_ts=i.lat1):!i.lat_ts&&i.lat0&&i.projName==="Polar_Stereographic"&&(i.lat_ts=i.lat0,i.lat0=Ue(i.lat0>0?90:-90))}function Og(i){var t=Cx(i),e=t.shift(),n=t.shift();t.unshift(["name",n]),t.unshift(["type",e]);var s={};return os(t,s),Ix(s),s}function ee(i){var t=this;if(arguments.length===2){var e=arguments[1];typeof e=="string"?e.charAt(0)==="+"?ee[i]=ll(arguments[1]):ee[i]=Og(arguments[1]):ee[i]=e}else if(arguments.length===1){if(Array.isArray(i))return i.map(function(n){Array.isArray(n)?ee.apply(t,n):ee(n)});if(typeof i=="string"){if(i in ee)return ee[i]}else"EPSG"in i?ee["EPSG:"+i.EPSG]=i:"ESRI"in i?ee["ESRI:"+i.ESRI]=i:"IAU2000"in i?ee["IAU2000:"+i.IAU2000]=i:console.log(i);return}}_x(ee);function Tx(i){return typeof i=="string"}function Ax(i){return i in ee}var Lx=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function Px(i){return Lx.some(function(t){return i.indexOf(t)>-1})}var Ox=["3857","900913","3785","102113"];function Dx(i){var t=on(i,"authority");if(t){var e=on(t,"epsg");return e&&Ox.indexOf(e)>-1}}function Nx(i){var t=on(i,"extension");if(t)return on(t,"proj4")}function Fx(i){return i[0]==="+"}function kx(i){if(Tx(i)){if(Ax(i))return ee[i];if(Px(i)){var t=Og(i);if(Dx(t))return ee["EPSG:3857"];var e=Nx(t);return e?ll(e):t}if(Fx(i))return ll(i)}else return i}function ku(i,t){i=i||{};var e,n;if(!t)return i;for(n in t)e=t[n],e!==void 0&&(i[n]=e);return i}function ii(i,t,e){var n=i*t;return e/Math.sqrt(1-n*n)}function ka(i){return i<0?-1:1}function N(i){return Math.abs(i)<=At?i:i-ka(i)*Zr}function ze(i,t,e){var n=i*e,s=.5*i;return n=Math.pow((1-n)/(1+n),s),Math.tan(.5*(T-t))/n}function Jr(i,t){for(var e=.5*i,n,s,r=T-2*Math.atan(t),a=0;a<=15;a++)if(n=i*Math.sin(r),s=T-2*Math.atan(t*Math.pow((1-n)/(1+n),e))-r,r+=s,Math.abs(s)<=1e-10)return r;return-9999}function Gx(){var i=this.b/this.a;this.es=1-i*i,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=ii(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function zx(i){var t=i.x,e=i.y;if(e*He>90&&e*He<-90&&t*He>180&&t*He<-180)return null;var n,s;if(Math.abs(Math.abs(e)-T)<=D)return null;if(this.sphere)n=this.x0+this.a*this.k0*N(t-this.long0),s=this.y0+this.a*this.k0*Math.log(Math.tan(ut+.5*e));else{var r=Math.sin(e),a=ze(this.e,e,r);n=this.x0+this.a*this.k0*N(t-this.long0),s=this.y0-this.a*this.k0*Math.log(a)}return i.x=n,i.y=s,i}function Wx(i){var t=i.x-this.x0,e=i.y-this.y0,n,s;if(this.sphere)s=T-2*Math.atan(Math.exp(-e/(this.a*this.k0)));else{var r=Math.exp(-e/(this.a*this.k0));if(s=Jr(this.e,r),s===-9999)return null}return n=N(this.long0+t/(this.a*this.k0)),i.x=n,i.y=s,i}var Bx=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"];const Ux={init:Gx,forward:zx,inverse:Wx,names:Bx};function jx(){}function Gu(i){return i}var Xx=["longlat","identity"];const qx={init:jx,forward:Gu,inverse:Gu,names:Xx};var Yx=[Ux,qx],lo={},Lo=[];function Dg(i,t){var e=Lo.length;return i.names?(Lo[e]=i,i.names.forEach(function(n){lo[n.toLowerCase()]=e}),this):(console.log(t),!0)}function Vx(i){if(!i)return!1;var t=i.toLowerCase();if(typeof lo[t]<"u"&&Lo[lo[t]])return Lo[lo[t]]}function Kx(){Yx.forEach(Dg)}const $x={start:Kx,add:Dg,get:Vx};var H={};H.MERIT={a:6378137,rf:298.257,ellipseName:"MERIT 1983"};H.SGS85={a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"};H.GRS80={a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"};H.IAU76={a:6378140,rf:298.257,ellipseName:"IAU 1976"};H.airy={a:6377563396e-3,b:635625691e-2,ellipseName:"Airy 1830"};H.APL4={a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"};H.NWL9D={a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"};H.mod_airy={a:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"};H.andrae={a:637710443e-2,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"};H.aust_SA={a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"};H.GRS67={a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"};H.bessel={a:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"};H.bess_nam={a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"};H.clrk66={a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"};H.clrk80={a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."};H.clrk80ign={a:63782492e-1,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"};H.clrk58={a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"};H.CPM={a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"};H.delmbr={a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"};H.engelis={a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"};H.evrst30={a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"};H.evrst48={a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"};H.evrst56={a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"};H.evrst69={a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"};H.evrstSS={a:6377298556e-3,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"};H.fschr60={a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"};H.fschr60m={a:6378155,rf:298.3,ellipseName:"Fischer 1960"};H.fschr68={a:6378150,rf:298.3,ellipseName:"Fischer 1968"};H.helmert={a:6378200,rf:298.3,ellipseName:"Helmert 1906"};H.hough={a:6378270,rf:297,ellipseName:"Hough"};H.intl={a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"};H.kaula={a:6378163,rf:298.24,ellipseName:"Kaula 1961"};H.lerch={a:6378139,rf:298.257,ellipseName:"Lerch 1979"};H.mprts={a:6397300,rf:191,ellipseName:"Maupertius 1738"};H.new_intl={a:63781575e-1,b:63567722e-1,ellipseName:"New International 1967"};H.plessis={a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"};H.krass={a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"};H.SEasia={a:6378155,b:63567733205e-4,ellipseName:"Southeast Asia"};H.walbeck={a:6376896,b:63558348467e-4,ellipseName:"Walbeck"};H.WGS60={a:6378165,rf:298.3,ellipseName:"WGS 60"};H.WGS66={a:6378145,rf:298.25,ellipseName:"WGS 66"};H.WGS7={a:6378135,rf:298.26,ellipseName:"WGS 72"};var Zx=H.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};H.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};function Hx(i,t,e,n){var s=i*i,r=t*t,a=(s-r)/s,o=0;n?(i*=1-a*(px+a*(vx+a*xx)),s=i*i,a=0):o=Math.sqrt(a);var h=(s-r)/r;return{es:a,e:o,ep2:h}}function Jx(i,t,e,n,s){if(!i){var r=on(H,n);r||(r=Zx),i=r.a,t=r.b,e=r.rf}return e&&!t&&(t=(1-1/e)*i),(e===0||Math.abs(i-t)3&&(o.datum_params[3]!==0||o.datum_params[4]!==0||o.datum_params[5]!==0||o.datum_params[6]!==0)&&(o.datum_type=zn,o.datum_params[3]*=Ir,o.datum_params[4]*=Ir,o.datum_params[5]*=Ir,o.datum_params[6]=o.datum_params[6]/1e6+1)),a&&(o.datum_type=ms,o.grids=a),o.a=e,o.b=n,o.es=s,o.ep2=r,o}var Ng={};function tE(i,t){var e=new DataView(t),n=nE(e),s=sE(e,n),r=rE(e,s,n),a={header:s,subgrids:r};return Ng[i]=a,a}function eE(i){if(i===void 0)return null;var t=i.split(",");return t.map(iE)}function iE(i){if(i.length===0)return null;var t=i[0]==="@";return t&&(i=i.slice(1)),i==="null"?{name:"null",mandatory:!t,grid:null,isNull:!0}:{name:i,mandatory:!t,grid:Ng[i]||null,isNull:!1}}function hs(i){return i/3600*Math.PI/180}function nE(i){var t=i.getInt32(8,!1);return t===11?!1:(t=i.getInt32(8,!0),t!==11&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function sE(i,t){return{nFields:i.getInt32(8,t),nSubgridFields:i.getInt32(24,t),nSubgrids:i.getInt32(40,t),shiftType:cl(i,56,64).trim(),fromSemiMajorAxis:i.getFloat64(120,t),fromSemiMinorAxis:i.getFloat64(136,t),toSemiMajorAxis:i.getFloat64(152,t),toSemiMinorAxis:i.getFloat64(168,t)}}function cl(i,t,e){return String.fromCharCode.apply(null,new Uint8Array(i.buffer.slice(t,e)))}function rE(i,t,e){for(var n=176,s=[],r=0;r5e-11?!1:i.datum_type===Gn?i.datum_params[0]===t.datum_params[0]&&i.datum_params[1]===t.datum_params[1]&&i.datum_params[2]===t.datum_params[2]:i.datum_type===zn?i.datum_params[0]===t.datum_params[0]&&i.datum_params[1]===t.datum_params[1]&&i.datum_params[2]===t.datum_params[2]&&i.datum_params[3]===t.datum_params[3]&&i.datum_params[4]===t.datum_params[4]&&i.datum_params[5]===t.datum_params[5]&&i.datum_params[6]===t.datum_params[6]:!0}function Fg(i,t,e){var n=i.x,s=i.y,r=i.z?i.z:0,a,o,h,l;if(s<-T&&s>-1.001*T)s=-T;else if(s>T&&s<1.001*T)s=T;else{if(s<-T)return{x:-1/0,y:-1/0,z:i.z};if(s>T)return{x:1/0,y:1/0,z:i.z}}return n>Math.PI&&(n-=2*Math.PI),o=Math.sin(s),l=Math.cos(s),h=o*o,a=e/Math.sqrt(1-t*h),{x:(a+r)*l*Math.cos(n),y:(a+r)*l*Math.sin(n),z:(a*(1-t)+r)*o}}function kg(i,t,e,n){var s=1e-12,r=s*s,a=30,o,h,l,c,u,d,f,g,_,m,y,p,x,M=i.x,E=i.y,w=i.z?i.z:0,C,S,I;if(o=Math.sqrt(M*M+E*E),h=Math.sqrt(M*M+E*E+w*w),o/er&&xn.y||f>n.x||mo&&Math.abs(h.y)>o);if(a<0)return console.log("Inverse grid shift iterator failed to converge."),n;n.x=N(r.x+e.ll[0]),n.y=r.y+e.ll[1]}else isNaN(r.x)||(n.x=i.x+r.x,n.y=i.y+r.y);return n}function Wu(i,t){var e={x:i.x/t.del[0],y:i.y/t.del[1]},n={x:Math.floor(e.x),y:Math.floor(e.y)},s={x:e.x-1*n.x,y:e.y-1*n.y},r={x:Number.NaN,y:Number.NaN},a;if(n.x<0||n.x>=t.lim[0]||n.y<0||n.y>=t.lim[1])return r;a=n.y*t.lim[0]+n.x;var o={x:t.cvs[a][0],y:t.cvs[a][1]};a++;var h={x:t.cvs[a][0],y:t.cvs[a][1]};a+=t.lim[0];var l={x:t.cvs[a][0],y:t.cvs[a][1]};a--;var c={x:t.cvs[a][0],y:t.cvs[a][1]},u=s.x*s.y,d=s.x*(1-s.y),f=(1-s.x)*(1-s.y),g=(1-s.x)*s.y;return r.x=f*o.x+d*h.x+g*c.x+u*l.x,r.y=f*o.y+d*h.y+g*c.y+u*l.y,r}function Bu(i,t,e){var n=e.x,s=e.y,r=e.z||0,a,o,h,l={};for(h=0;h<3;h++)if(!(t&&h===2&&e.z===void 0))switch(h===0?(a=n,"ew".indexOf(i.axis[h])!==-1?o="x":o="y"):h===1?(a=s,"ns".indexOf(i.axis[h])!==-1?o="y":o="x"):(a=r,o="z"),i.axis[h]){case"e":l[o]=a;break;case"w":l[o]=-a;break;case"n":l[o]=a;break;case"s":l[o]=-a;break;case"u":e[o]!==void 0&&(l.z=a);break;case"d":e[o]!==void 0&&(l.z=-a);break;default:return null}return l}function Gg(i){var t={x:i[0],y:i[1]};return i.length>2&&(t.z=i[2]),i.length>3&&(t.m=i[3]),t}function gE(i){Uu(i.x),Uu(i.y)}function Uu(i){if(typeof Number.isFinite=="function"){if(Number.isFinite(i))return;throw new TypeError("coordinates must be finite numbers")}if(typeof i!="number"||i!==i||!isFinite(i))throw new TypeError("coordinates must be finite numbers")}function _E(i,t){return(i.datum.datum_type===Gn||i.datum.datum_type===zn||i.datum.datum_type===ms)&&t.datumCode!=="WGS84"||(t.datum.datum_type===Gn||t.datum.datum_type===zn||t.datum.datum_type===ms)&&i.datumCode!=="WGS84"}function Po(i,t,e,n){var s;Array.isArray(e)?e=Gg(e):e={x:e.x,y:e.y,z:e.z,m:e.m};var r=e.z!==void 0;if(gE(e),i.datum&&t.datum&&_E(i,t)&&(s=new ti("WGS84"),e=Po(i,s,e,n),i=s),n&&i.axis!=="enu"&&(e=Bu(i,!1,e)),i.projName==="longlat")e={x:e.x*Bt,y:e.y*Bt,z:e.z||0};else if(i.to_meter&&(e={x:e.x*i.to_meter,y:e.y*i.to_meter,z:e.z||0}),e=i.inverse(e),!e)return;if(i.from_greenwich&&(e.x+=i.from_greenwich),e=dE(i.datum,t.datum,e),!!e)return t.from_greenwich&&(e={x:e.x-t.from_greenwich,y:e.y,z:e.z||0}),t.projName==="longlat"?e={x:e.x*He,y:e.y*He,z:e.z||0}:(e=t.forward(e),t.to_meter&&(e={x:e.x/t.to_meter,y:e.y/t.to_meter,z:e.z||0})),n&&t.axis!=="enu"?Bu(t,!0,e):(e&&!r&&delete e.z,e)}var ju=ti("WGS84");function Oh(i,t,e,n){var s,r,a;return Array.isArray(e)?(s=Po(i,t,e,n)||{x:NaN,y:NaN},e.length>2?typeof i.name<"u"&&i.name==="geocent"||typeof t.name<"u"&&t.name==="geocent"?typeof s.z=="number"?[s.x,s.y,s.z].concat(e.slice(3)):[s.x,s.y,e[2]].concat(e.slice(3)):[s.x,s.y].concat(e.slice(2)):[s.x,s.y]):(r=Po(i,t,e,n),a=Object.keys(e),a.length===2||a.forEach(function(o){if(typeof i.name<"u"&&i.name==="geocent"||typeof t.name<"u"&&t.name==="geocent"){if(o==="x"||o==="y"||o==="z")return}else if(o==="x"||o==="y")return;r[o]=e[o]}),r)}function Xu(i){return i instanceof ti?i:i.oProj?i.oProj:ti(i)}function fe(i,t,e){i=Xu(i);var n=!1,s;return typeof t>"u"?(t=i,i=ju,n=!0):(typeof t.x<"u"||Array.isArray(t))&&(e=t,t=i,i=ju,n=!0),t=Xu(t),e?Oh(i,t,e):(s={forward:function(r,a){return Oh(i,t,r,a)},inverse:function(r,a){return Oh(t,i,r,a)}},n&&(s.oProj=t),s)}var qu=6,zg="AJSAJS",Wg="AFAFAF",ls=65,oe=73,Ce=79,Er=86,Mr=90;const mE={forward:Bg,inverse:yE,toPoint:Ug};function Bg(i,t){return t=t||5,xE(pE({lat:i[1],lon:i[0]}),t)}function yE(i){var t=fc(Xg(i.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat,t.lon,t.lat]:[t.left,t.bottom,t.right,t.top]}function Ug(i){var t=fc(Xg(i.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function Dh(i){return i*(Math.PI/180)}function Yu(i){return 180*(i/Math.PI)}function pE(i){var t=i.lat,e=i.lon,n=6378137,s=.00669438,r=.9996,a,o,h,l,c,u,d,f=Dh(t),g=Dh(e),_,m;m=Math.floor((e+180)/6)+1,e===180&&(m=60),t>=56&&t<64&&e>=3&&e<12&&(m=32),t>=72&&t<84&&(e>=0&&e<9?m=31:e>=9&&e<21?m=33:e>=21&&e<33?m=35:e>=33&&e<42&&(m=37)),a=(m-1)*6-180+3,_=Dh(a),o=s/(1-s),h=n/Math.sqrt(1-s*Math.sin(f)*Math.sin(f)),l=Math.tan(f)*Math.tan(f),c=o*Math.cos(f)*Math.cos(f),u=Math.cos(f)*(g-_),d=n*((1-s/4-3*s*s/64-5*s*s*s/256)*f-(3*s/8+3*s*s/32+45*s*s*s/1024)*Math.sin(2*f)+(15*s*s/256+45*s*s*s/1024)*Math.sin(4*f)-35*s*s*s/3072*Math.sin(6*f));var y=r*h*(u+(1-l+c)*u*u*u/6+(5-18*l+l*l+72*c-58*o)*u*u*u*u*u/120)+5e5,p=r*(d+h*Math.tan(f)*(u*u/2+(5-l+9*c+4*c*c)*u*u*u*u/24+(61-58*l+l*l+600*c-330*o)*u*u*u*u*u*u/720));return t<0&&(p+=1e7),{northing:Math.round(p),easting:Math.round(y),zoneNumber:m,zoneLetter:vE(t)}}function fc(i){var t=i.northing,e=i.easting,n=i.zoneLetter,s=i.zoneNumber;if(s<0||s>60)return null;var r=.9996,a=6378137,o=.00669438,h,l=(1-Math.sqrt(1-o))/(1+Math.sqrt(1-o)),c,u,d,f,g,_,m,y,p,x=e-5e5,M=t;n<"N"&&(M-=1e7),m=(s-1)*6-180+3,h=o/(1-o),_=M/r,y=_/(a*(1-o/4-3*o*o/64-5*o*o*o/256)),p=y+(3*l/2-27*l*l*l/32)*Math.sin(2*y)+(21*l*l/16-55*l*l*l*l/32)*Math.sin(4*y)+151*l*l*l/96*Math.sin(6*y),c=a/Math.sqrt(1-o*Math.sin(p)*Math.sin(p)),u=Math.tan(p)*Math.tan(p),d=h*Math.cos(p)*Math.cos(p),f=a*(1-o)/Math.pow(1-o*Math.sin(p)*Math.sin(p),1.5),g=x/(c*r);var E=p-c*Math.tan(p)/f*(g*g/2-(5+3*u+10*d-4*d*d-9*h)*g*g*g*g/24+(61+90*u+298*d+45*u*u-252*h-3*d*d)*g*g*g*g*g*g/720);E=Yu(E);var w=(g-(1+2*u+d)*g*g*g/6+(5-2*d+28*u-3*d*d+8*h+24*u*u)*g*g*g*g*g/120)/Math.cos(p);w=m+Yu(w);var C;if(i.accuracy){var S=fc({northing:i.northing+i.accuracy,easting:i.easting+i.accuracy,zoneLetter:i.zoneLetter,zoneNumber:i.zoneNumber});C={top:S.lat,right:S.lon,bottom:E,left:w}}else C={lat:E,lon:w};return C}function vE(i){var t="Z";return 84>=i&&i>=72?t="X":72>i&&i>=64?t="W":64>i&&i>=56?t="V":56>i&&i>=48?t="U":48>i&&i>=40?t="T":40>i&&i>=32?t="S":32>i&&i>=24?t="R":24>i&&i>=16?t="Q":16>i&&i>=8?t="P":8>i&&i>=0?t="N":0>i&&i>=-8?t="M":-8>i&&i>=-16?t="L":-16>i&&i>=-24?t="K":-24>i&&i>=-32?t="J":-32>i&&i>=-40?t="H":-40>i&&i>=-48?t="G":-48>i&&i>=-56?t="F":-56>i&&i>=-64?t="E":-64>i&&i>=-72?t="D":-72>i&&i>=-80&&(t="C"),t}function xE(i,t){var e="00000"+i.easting,n="00000"+i.northing;return i.zoneNumber+i.zoneLetter+EE(i.easting,i.northing,i.zoneNumber)+e.substr(e.length-5,t)+n.substr(n.length-5,t)}function EE(i,t,e){var n=jg(e),s=Math.floor(i/1e5),r=Math.floor(t/1e5)%20;return ME(s,r,n)}function jg(i){var t=i%qu;return t===0&&(t=qu),t}function ME(i,t,e){var n=e-1,s=zg.charCodeAt(n),r=Wg.charCodeAt(n),a=s+i-1,o=r+t,h=!1;a>Mr&&(a=a-Mr+ls-1,h=!0),(a===oe||soe||(a>oe||sCe||(a>Ce||sMr&&(a=a-Mr+ls-1),o>Er?(o=o-Er+ls-1,h=!0):h=!1,(o===oe||roe||(o>oe||rCe||(o>Ce||rEr&&(o=o-Er+ls-1);var l=String.fromCharCode(a)+String.fromCharCode(o);return l}function Xg(i){if(i&&i.length===0)throw"MGRSPoint coverting from nothing";for(var t=i.length,e=null,n="",s,r=0;!/[A-Z]/.test(s=i.charAt(r));){if(r>=2)throw"MGRSPoint bad conversion from: "+i;n+=s,r++}var a=parseInt(n,10);if(r===0||r+3>t)throw"MGRSPoint bad conversion from: "+i;var o=i.charAt(r++);if(o<="A"||o==="B"||o==="Y"||o>="Z"||o==="I"||o==="O")throw"MGRSPoint zone letter "+o+" not handled: "+i;e=i.substring(r,r+=2);for(var h=jg(a),l=wE(e.charAt(0),h),c=SE(e.charAt(1),h);ct?t-l:r,M=a+c>e?e-c:a,E=g[3]+x*d[0]+g[1],w=g[0]+M*d[1]+g[2],C=y-g[3],S=p-g[0];(_||u!==0)&&(Fi[0]=C,ki[0]=C,Fi[1]=S,ui[1]=S,ui[0]=C+E,di[0]=ui[0],di[1]=S+w,ki[1]=di[1]);let I;return u!==0?(I=ei(Ge(),n,s,1,1,u,-n,-s),Ft(I,Fi),Ft(I,ui),Ft(I,di),Ft(I,ki),Si(Math.min(Fi[0],ui[0],di[0],ki[0]),Math.min(Fi[1],ui[1],di[1],ki[1]),Math.max(Fi[0],ui[0],di[0],ki[0]),Math.max(Fi[1],ui[1],di[1],ki[1]),Kn)):Si(Math.min(C,C+E),Math.min(S,S+w),Math.max(C,C+E),Math.max(S,S+w),Kn),f&&(y=Math.round(y),p=Math.round(p)),{drawImageX:y,drawImageY:p,drawImageW:x,drawImageH:M,originX:l,originY:c,declutterBox:{minX:Kn[0],minY:Kn[1],maxX:Kn[2],maxY:Kn[3],value:m},canvasTransform:I,scale:d}}replayImageOrLabel_(t,e,n,s,r,a,o){const h=!!(a||o),l=s.declutterBox,c=o?o[2]*s.scale[0]/2:0;return l.minX-c<=e[0]&&l.maxX+c>=0&&l.minY-c<=e[1]&&l.maxY+c>=0&&(h&&this.replayTextBackground_(t,Fi,ui,di,ki,a,o),r1(t,s.canvasTransform,r,n,s.originX,s.originY,s.drawImageW,s.drawImageH,s.drawImageX,s.drawImageY,s.scale)),!0}fill_(t){const e=this.alignAndScaleFill_;if(e){const n=Ft(this.renderedTransform_,[0,0]),s=512*this.pixelRatio;t.save(),t.translate(n[0]%s,n[1]%s),e!==1&&t.scale(e,e),t.rotate(this.viewRotation_)}t.fill(),e&&t.restore()}setStrokeStyle_(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.lineDashOffset=e[7],t.setLineDash(e[6])}drawLabelWithPointPlacement_(t,e,n,s){const r=this.textStates[e],a=this.createLabel(t,e,s,n),o=this.strokeStates[n],h=this.pixelRatio,l=Th(Array.isArray(t)?t[0]:t,r.textAlign||qr),c=Io[r.textBaseline||So],u=o&&o.lineWidth?o.lineWidth:0,d=a.width/h-2*r.scale[0],f=l*d+2*(.5-l)*u,g=c*a.height/h+2*(.5-c)*u;return{label:a,anchorX:f,anchorY:g}}execute_(t,e,n,s,r,a,o,h){const l=this.zIndexContext_;let c;this.pixelCoordinates_&&ln(n,this.renderedTransform_)?c=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),c=sn(this.coordinates,0,this.coordinates.length,2,n,this.pixelCoordinates_),k_(this.renderedTransform_,n));let u=0;const d=s.length;let f=0,g,_,m,y,p,x,M,E,w,C,S,I,z,F=0,A=0,G=null,X=null;const V=this.coordinateCache_,L=this.viewRotation_,it=Math.round(Math.atan2(-n[1],n[0])*1e12)/1e12,Q={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:L},wt=this.instructions!=s||this.overlaps?0:200;let et,at,st,xt;for(;uwt&&(this.fill_(t),F=0),A>wt&&(t.stroke(),A=0),!F&&!A&&(t.beginPath(),p=NaN,x=NaN),++u;break;case Y.CIRCLE:f=P[1];const qt=c[f],Lt=c[f+1],Le=c[f+2],un=c[f+3],Qt=Le-qt,Ua=un-Lt,sr=Math.sqrt(Qt*Qt+Ua*Ua);t.moveTo(qt+sr,Lt),t.arc(qt,Lt,sr,0,2*Math.PI,!0),++u;break;case Y.CLOSE_PATH:t.closePath(),++u;break;case Y.CUSTOM:f=P[1],g=P[2];const oh=P[3],Ai=P[4],rr=P[5];Q.geometry=oh,Q.feature=et,u in V||(V[u]=[]);const Li=V[u];rr?rr(c,f,g,2,Li):(Li[0]=c[f],Li[1]=c[f+1],Li.length=2),l&&(l.zIndex=P[6]),Ai(Li,Q),++u;break;case Y.DRAW_IMAGE:f=P[1],g=P[2],w=P[3],_=P[4],m=P[5];let ar=P[6];const ja=P[7],hh=P[8],Pe=P[9],xe=P[10];let oi=P[11];const dn=P[12];let fn=P[13];y=P[14]||"declutter";const Pi=P[15];if(!w&&P.length>=20){C=P[19],S=P[20],I=P[21],z=P[22];const Ee=this.drawLabelWithPointPlacement_(C,S,I,z);w=Ee.label,P[3]=w;const _n=P[23];_=(Ee.anchorX-_n)*this.pixelRatio,P[4]=_;const Me=P[24];m=(Ee.anchorY-Me)*this.pixelRatio,P[5]=m,ar=w.height,P[6]=ar,fn=w.width,P[13]=fn}let gn;P.length>25&&(gn=P[25]);let Oi,Xn,zt;P.length>17?(Oi=P[16],Xn=P[17],zt=P[18]):(Oi=Sn,Xn=!1,zt=!1),xe&&it?oi+=L:!xe&&!it&&(oi-=L);let o0=0;for(;f!gg.includes(i));class fv{constructor(t,e,n,s,r,a,o){this.maxExtent_=t,this.overlaps_=s,this.pixelRatio_=n,this.resolution_=e,this.renderBuffer_=a,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=Ge(),this.renderedContext_=null,this.deferredZIndexContexts_={},this.createExecutors_(r,o)}clip(t,e){const n=this.getClipCoords(e);t.beginPath(),t.moveTo(n[0],n[1]),t.lineTo(n[2],n[3]),t.lineTo(n[4],n[5]),t.lineTo(n[6],n[7]),t.clip()}createExecutors_(t,e){for(const n in t){let s=this.executorsByZIndex_[n];s===void 0&&(s={},this.executorsByZIndex_[n]=s);const r=t[n];for(const a in r){const o=r[a];s[a]=new uv(this.resolution_,this.pixelRatio_,this.overlaps_,o,e)}}}hasExecutors(t){for(const e in this.executorsByZIndex_){const n=this.executorsByZIndex_[e];for(let s=0,r=t.length;s0){if(!a||C==="none"||f!=="Image"&&f!=="Text"||a.includes(E)){const F=(d[I]-3)/4,A=s-F%o,G=s-(F/o|0),X=r(E,w,A*A+G*G);if(X)return X}c.clearRect(0,0,o,o);break}}const _=Object.keys(this.executorsByZIndex_).map(Number);_.sort(xi);let m,y,p,x,M;for(m=_.length-1;m>=0;--m){const E=_[m].toString();for(p=this.executorsByZIndex_[E],y=as.length-1;y>=0;--y)if(f=as[y],x=p[f],x!==void 0&&(M=x.executeHitDetection(c,h,n,g,u),M))return M}}getClipCoords(t){const e=this.maxExtent_;if(!e)return null;const n=e[0],s=e[1],r=e[2],a=e[3],o=[n,s,n,a,r,a,r,s];return sn(o,0,8,2,t,o),o}isEmpty(){return zs(this.executorsByZIndex_)}execute(t,e,n,s,r,a,o){const h=Object.keys(this.executorsByZIndex_).map(Number);h.sort(xi),a=a||as;const l=as.length;let c,u,d,f,g;for(o&&h.reverse(),c=0,u=h.length;cy.execute(E,e,n,s,r,o)),M&&x.restore(),p){p.offset();const E=h[c]*l+d;this.deferredZIndexContexts_[E]||(this.deferredZIndexContexts_[E]=[]),this.deferredZIndexContexts_[E].push(p)}}}}this.renderedContext_=t}getDeferredZIndexContexts(){return this.deferredZIndexContexts_}getRenderedContext(){return this.renderedContext_}renderDeferred(){const t=this.deferredZIndexContexts_,e=Object.keys(t).map(Number).sort(xi);for(let n=0,s=e.length;n{r.draw(this.renderedContext_),r.clear()}),t[e[n]].length=0}}const Ah={};function gv(i){if(Ah[i]!==void 0)return Ah[i];const t=i*2+1,e=i*i,n=new Array(e+1);for(let r=0;r<=i;++r)for(let a=0;a<=i;++a){const o=r*r+a*a;if(o>e)break;let h=n[o];h||(h=[],n[o]=h),h.push(((i+r)*t+(i+a))*4+3),r>0&&h.push(((i-r)*t+(i+a))*4+3),a>0&&(h.push(((i+r)*t+(i-a))*4+3),r>0&&h.push(((i-r)*t+(i-a))*4+3))}const s=[];for(let r=0,a=n.length;ru*this.pixelRatio_),lineDashOffset:(a||wi)*this.pixelRatio_,lineJoin:o!==void 0?o:Ys,lineWidth:(h!==void 0?h:Yr)*this.pixelRatio_,miterLimit:l!==void 0?l:jr,strokeStyle:Ze(n||Xr)}}}setImageStyle(t){let e;if(!t||!(e=t.getSize())){this.image_=null;return}const n=t.getPixelRatio(this.pixelRatio_),s=t.getAnchor(),r=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=s[0]*n,this.imageAnchorY_=s[1]*n,this.imageHeight_=e[1]*n,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=r[0],this.imageOriginY_=r[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation();const a=t.getScaleArray();this.imageScale_=[a[0]*this.pixelRatio_/n,a[1]*this.pixelRatio_/n],this.imageWidth_=e[0]*n}setTextStyle(t){if(!t)this.text_="";else{const e=t.getFill();if(!e)this.textFillState_=null;else{const f=e.getColor();this.textFillState_={fillStyle:Ze(f||le)}}const n=t.getStroke();if(!n)this.textStrokeState_=null;else{const f=n.getColor(),g=n.getLineCap(),_=n.getLineDash(),m=n.getLineDashOffset(),y=n.getLineJoin(),p=n.getWidth(),x=n.getMiterLimit();this.textStrokeState_={lineCap:g!==void 0?g:qs,lineDash:_||Mi,lineDashOffset:m||wi,lineJoin:y!==void 0?y:Ys,lineWidth:p!==void 0?p:Yr,miterLimit:x!==void 0?x:jr,strokeStyle:Ze(f||Xr)}}const s=t.getFont(),r=t.getOffsetX(),a=t.getOffsetY(),o=t.getRotateWithView(),h=t.getRotation(),l=t.getScaleArray(),c=t.getText(),u=t.getTextAlign(),d=t.getTextBaseline();this.textState_={font:s!==void 0?s:Jf,textAlign:u!==void 0?u:qr,textBaseline:d!==void 0?d:So},this.text_=c!==void 0?Array.isArray(c)?c.reduce((f,g,_)=>f+=_%2?" ":g,""):c:"",this.textOffsetX_=r!==void 0?this.pixelRatio_*r:0,this.textOffsetY_=a!==void 0?this.pixelRatio_*a:0,this.textRotateWithView_=o!==void 0?o:!1,this.textRotation_=h!==void 0?h:0,this.textScale_=[this.pixelRatio_*l[0],this.pixelRatio_*l[1]]}}}const Ye=.5;function mv(i,t,e,n,s,r,a,o,h){const l=h?Pl(s):s,c=i[0]*Ye,u=i[1]*Ye,d=jt(c,u);d.imageSmoothingEnabled=!1;const f=d.canvas,g=new _v(d,Ye,s,null,a,o,h?Ho(I_(),h):null),_=e.length,m=Math.floor((256*256*256-1)/_),y={};for(let x=1;x<=_;++x){const M=e[x-1],E=M.getStyleFunction()||n;if(!E)continue;let w=E(M,r);if(!w)continue;Array.isArray(w)||(w=[w]);const S=(x*m).toString(16).padStart(7,"#00000");for(let I=0,z=w.length;I0;return u&&Promise.all(h).then(()=>s(null)),Ev(i,t,e,n,r,a,o),u}function Ev(i,t,e,n,s,r,a){const o=e.getGeometryFunction()(t);if(!o)return;const h=o.simplifyTransformed(n,s);if(e.getRenderer())yg(i,h,e,t,a);else{const c=_g[h.getType()];c(i,h,e,t,a,r)}}function yg(i,t,e,n,s){if(t.getType()=="GeometryCollection"){const a=t.getGeometries();for(let o=0,h=a.length;o{if(this.frameState&&!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const n=this.frameState.size.slice(),s=this.renderedCenter_,r=this.renderedResolution_,a=this.renderedRotation_,o=this.renderedProjection_,h=this.wrappedRenderedExtent_,l=this.getLayer(),c=[],u=n[0]*Ye,d=n[1]*Ye;c.push(this.getRenderTransform(s,r,a,Ye,u,d,0).slice());const f=l.getSource(),g=o.getExtent();if(f.getWrapX()&&o.canWrapX()&&!Ve(g,h)){let _=h[0];const m=nt(g);let y=0,p;for(;_g[2];)++y,p=m*y,c.push(this.getRenderTransform(s,r,a,Ye,u,d,p).slice()),_-=m}this.hitDetectionImageData_=mv(n,c,this.renderedFeatures_,l.getStyleFunction(),h,r,a,bu(r,this.renderedPixelRatio_),null)}e(yv(t,this.renderedFeatures_,this.hitDetectionImageData_))})}forEachFeatureAtCoordinate(t,e,n,s,r){if(!this.replayGroup_)return;const a=e.viewState.resolution,o=e.viewState.rotation,h=this.getLayer(),l={},c=function(g,_,m){const y=mt(g),p=l[y];if(p){if(p!==!0&&mu=g.forEachFeatureAtCoordinate(t,a,o,n,c,f&&e.declutter[f]?e.declutter[f].all().map(_=>_.value):null)),u}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}prepareFrame(t){const e=this.getLayer(),n=e.getSource();if(!n)return!1;const s=t.viewHints[Nt.ANIMATING],r=t.viewHints[Nt.INTERACTING],a=e.getUpdateWhileAnimating(),o=e.getUpdateWhileInteracting();if(this.ready&&!a&&s||!o&&r)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const h=t.extent,l=t.viewState,c=l.projection,u=l.resolution,d=t.pixelRatio,f=e.getRevision(),g=e.getRenderBuffer();let _=e.getRenderOrder();_===void 0&&(_=vv);const m=l.center.slice(),y=Rl(h,g*u),p=y.slice(),x=[y.slice()],M=c.getExtent();if(n.getWrapX()&&c.canWrapX()&&!Ve(M,t.extent)){const X=nt(M),V=Math.max(nt(y)/2,X);y[0]=M[0]-V,y[2]=M[2]+V,Wd(m,c);const L=Fd(x[0],c);L[0]M[0]&&L[2]>M[2]&&x.push([L[0]-X,L[1],L[2]-X,L[3]])}if(this.ready&&this.renderedResolution_==u&&this.renderedRevision_==f&&this.renderedRenderOrder_==_&&this.renderedFrameDeclutter_===!!t.declutter&&Ve(this.wrappedRenderedExtent_,y))return ln(this.renderedExtent_,p)||(this.hitDetectionImageData_=null,this.renderedExtent_=p),this.renderedCenter_=m,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const E=new hv(mg(u,d),y,u,d);let w;for(let X=0,V=x.length;X{let L;const it=X.getStyleFunction()||e.getStyleFunction();if(it&&(L=it(X,u)),L){const Q=this.renderFeature(X,C,L,E,w,this.getLayer().getDeclutter(),V);S=S&&!Q}},z=Pl(y),F=n.getFeaturesInExtent(z);_&&F.sort(_);for(let X=0,V=F.length;X{if(t===this.squaredTolerance_)return this.simplifiedGeometry_;this.simplifiedGeometry_=this.clone(),e&&this.simplifiedGeometry_.applyTransform(e);const n=this.simplifiedGeometry_.getFlatCoordinates();let s;switch(this.type_){case"LineString":n.length=Gl(n,0,this.simplifiedGeometry_.flatCoordinates_.length,this.simplifiedGeometry_.stride_,t,n,0),s=[n.length];break;case"MultiLineString":s=[],n.length=Y_(n,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,t,n,0,s);break;case"Polygon":s=[],n.length=zl(n,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,Math.sqrt(t),n,0,s);break}return s&&(this.simplifiedGeometry_=new be(this.type_,n,s,2,this.properties_,this.id_)),this.squaredTolerance_=t,this.simplifiedGeometry_}),this}}be.prototype.getFlatCoordinates=be.prototype.getOrientedFlatCoordinates;const Se={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};function Pv(i,t){return[[-1/0,-1/0,1/0,1/0]]}function LC(i,t){return[i]}let Ov=!1;function Dv(i,t,e,n,s,r,a){const o=new XMLHttpRequest;o.open("GET",typeof i=="function"?i(e,n,s):i,!0),t.getType()=="arraybuffer"&&(o.responseType="arraybuffer"),o.withCredentials=Ov,o.onload=function(h){if(!o.status||o.status>=200&&o.status<300){const l=t.getType();try{let c;l=="text"||l=="json"?c=o.responseText:l=="xml"?c=o.responseXML||o.responseText:l=="arraybuffer"&&(c=o.response),c?r(t.readFeatures(c,{extent:e,featureProjection:s}),t.readProjection(c)):a()}catch{a()}}else a()},o.onerror=a,o.send()}function Lu(i,t){return function(e,n,s,r,a){const o=this;Dv(i,t,e,n,s,function(h,l){o.addFeatures(h),r!==void 0&&r(h)},a||Gs)}}class Gi extends si{constructor(t,e,n){super(t),this.feature=e,this.features=n}}class Nv extends Jl{constructor(t){t=t||{},super({attributions:t.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:t.wrapX!==void 0?t.wrapX:!0}),this.on,this.once,this.un,this.loader_=Gs,this.format_=t.format,this.overlaps_=t.overlaps===void 0?!0:t.overlaps,this.url_=t.url,t.loader!==void 0?this.loader_=t.loader:this.url_!==void 0&&(ct(this.format_,"`format` must be set when `url` is set"),this.loader_=Lu(this.url_,this.format_)),this.strategy_=t.strategy!==void 0?t.strategy:Pv;const e=t.useSpatialIndex!==void 0?t.useSpatialIndex:!0;this.featuresRtree_=e?new Tu:null,this.loadedExtentsRtree_=new Tu,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null;let n,s;Array.isArray(t.features)?s=t.features:t.features&&(n=t.features,s=n.getArray()),!e&&n===void 0&&(n=new $e(s)),s!==void 0&&this.addFeaturesInternal(s),n!==void 0&&this.bindFeaturesCollection_(n)}addFeature(t){this.addFeatureInternal(t),this.changed()}addFeatureInternal(t){const e=mt(t);if(!this.addToIndex_(e,t)){this.featuresCollection_&&this.featuresCollection_.remove(t);return}this.setupChangeEvents_(e,t);const n=t.getGeometry();if(n){const s=n.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(s,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new Gi(Se.ADDFEATURE,t))}setupChangeEvents_(t,e){e instanceof be||(this.featureChangeKeys_[t]=[lt(e,Z.CHANGE,this.handleFeatureChange_,this),lt(e,Ws.PROPERTYCHANGE,this.handleFeatureChange_,this)])}addToIndex_(t,e){let n=!0;if(e.getId()!==void 0){const s=String(e.getId());if(!(s in this.idIndex_))this.idIndex_[s]=e;else if(e instanceof be){const r=this.idIndex_[s];r instanceof be?Array.isArray(r)?r.push(e):this.idIndex_[s]=[r,e]:n=!1}else n=!1}return n&&(ct(!(t in this.uidIndex_),"The passed `feature` was already added to the source"),this.uidIndex_[t]=e),n}addFeatures(t){this.addFeaturesInternal(t),this.changed()}addFeaturesInternal(t){const e=[],n=[],s=[];for(let r=0,a=t.length;r{e||(e=!0,this.addFeature(n.element),e=!1)}),t.addEventListener(he.REMOVE,n=>{e||(e=!0,this.removeFeature(n.element),e=!1)}),this.featuresCollection_=t}clear(t){if(t){for(const n in this.featureChangeKeys_)this.featureChangeKeys_[n].forEach(Mt);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const n=s=>{this.removeFeatureInternal(s)};this.featuresRtree_.forEach(n);for(const s in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[s])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const e=new Gi(Se.CLEAR);this.dispatchEvent(e),this.changed()}forEachFeature(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureAtCoordinateDirect(t,e){const n=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(n,function(s){const r=s.getGeometry();if(r instanceof be||r.intersectsCoordinate(t))return e(s)})}forEachFeatureInExtent(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureIntersectingExtent(t,e){return this.forEachFeatureInExtent(t,function(n){const s=n.getGeometry();if(s instanceof be||s.intersectsExtent(t)){const r=e(n);if(r)return r}})}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),zs(this.nullGeometryFeatures_)||qo(t,Object.values(this.nullGeometryFeatures_))),t}getFeaturesAtCoordinate(t){const e=[];return this.forEachFeatureAtCoordinateDirect(t,function(n){e.push(n)}),e}getFeaturesInExtent(t,e){if(this.featuresRtree_){if(!(e&&e.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(t);const s=kd(t,e);return[].concat(...s.map(r=>this.featuresRtree_.getInExtent(r)))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(t,e){const n=t[0],s=t[1];let r=null;const a=[NaN,NaN];let o=1/0;const h=[-1/0,-1/0,1/0,1/0];return e=e||Nr,this.featuresRtree_.forEachInExtent(h,function(l){if(e(l)){const c=l.getGeometry(),u=o;if(o=c instanceof be?0:c.closestPointXY(n,s,a,o),o{--this.loadingExtentsCount_,this.dispatchEvent(new Gi(Se.FEATURESLOADEND,void 0,c))},()=>{--this.loadingExtentsCount_,this.dispatchEvent(new Gi(Se.FEATURESLOADERROR))}),s.insert(h,{extent:h.slice()}))}this.loading=this.loader_.length<4?!1:this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(t){const e=this.loadedExtentsRtree_;let n;e.forEachInExtent(t,function(s){if(Us(s.extent,t))return n=s,!0}),n&&e.remove(n)}removeFeatures(t){const e=[];for(let n=0,s=t.length;n0&&this.changed()}removeFeature(t){if(!t)return;this.removeFeatureInternal(t)&&this.changed()}removeFeatureInternal(t){const e=mt(t);if(!(e in this.uidIndex_))return;e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.featureChangeKeys_[e]?.forEach(Mt),delete this.featureChangeKeys_[e];const s=t.getId();if(s!==void 0){const r=s.toString(),a=this.idIndex_[r];a===t?delete this.idIndex_[r]:Array.isArray(a)&&(a.splice(a.indexOf(t),1),a.length===1&&(this.idIndex_[r]=a[0]))}return delete this.uidIndex_[e],this.hasListener(Se.REMOVEFEATURE)&&this.dispatchEvent(new Gi(Se.REMOVEFEATURE,t)),t}removeFromIdIndex_(t){let e=!1;for(const n in this.idIndex_){const s=this.idIndex_[n];if(t instanceof be&&Array.isArray(s)&&s.includes(t))s.splice(s.indexOf(t),1);else if(this.idIndex_[n]===t){delete this.idIndex_[n],e=!0;break}}return e}setLoader(t){this.loader_=t}setUrl(t){ct(this.format_,"`format` must be set when `url` is set"),this.url_=t,this.setLoader(Lu(t,this.format_))}}class Fv{constructor(t,e,n){this.decay_=t,this.minVelocity_=e,this.delay_=n,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(t,e){this.points_.push(t,e,Date.now())}end(){if(this.points_.length<6)return!1;const t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]0&&this.points_[n+2]>t;)n-=3;const s=this.points_[e+2]-this.points_[n+2];if(s<1e3/60)return!1;const r=this.points_[e]-this.points_[n],a=this.points_[e+1]-this.points_[n+1];return this.angle_=Math.atan2(a,r),this.initialVelocity_=Math.sqrt(r*r+a*a)/s,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}}class kv extends wl{constructor(t){super(),this.map_=t}dispatchRenderEvent(t,e){ht()}calculateMatrices2D(t){const e=t.viewState,n=t.coordinateToPixelTransform,s=t.pixelToCoordinateTransform;ei(n,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),Kd(s,n)}forEachFeatureAtCoordinate(t,e,n,s,r,a,o,h){let l;const c=e.viewState;function u(M,E,w,C){return r.call(a,E,M?w:null,C)}const d=c.projection,f=Wd(t.slice(),d),g=[[0,0]];if(d.canWrapX()&&s){const M=d.getExtent(),E=nt(M);g.push([-E,0],[E,0])}const _=e.layerStatesArray,m=_.length,y=[],p=[];for(let M=0;M=0;--E){const w=_[E],C=w.layer;if(C.hasRenderer()&&Xl(w,c)&&o.call(h,C)){const S=C.getRenderer(),I=C.getSource();if(S&&I){const z=I.getWrapX()?f:t,F=u.bind(null,w.managed);p[0]=z[0]+g[M][0],p[1]=z[1]+g[M][1],l=S.forEachFeatureAtCoordinate(p,e,n,F,y)}if(l)return l}}if(y.length===0)return;const x=1/y.length;return y.forEach((M,E)=>M.distanceSq+=E*x),y.sort((M,E)=>M.distanceSq-E.distanceSq),y.some(M=>l=M.callback(M.feature,M.layer,M.geometry)),l}hasFeatureAtCoordinate(t,e,n,s,r,a){return this.forEachFeatureAtCoordinate(t,e,n,s,Nr,this,r,a)!==void 0}getMap(){return this.map_}renderFrame(t){ht()}scheduleExpireIconCache(t){Ke.canExpireCache()&&t.postRenderFunctions.push(Gv)}}function Gv(i,t){Ke.expire()}class zv extends kv{constructor(t){super(t),this.fontChangeListenerKey_=lt(gi,Ws.PROPERTYCHANGE,t.redrawText.bind(t)),this.element_=document.createElement("div");const e=this.element_.style;e.position="absolute",e.width="100%",e.height="100%",e.zIndex="0",this.element_.className=th+" ol-layers";const n=t.getViewport();n.insertBefore(this.element_,n.firstChild||null),this.children_=[],this.renderedVisible_=!0}dispatchRenderEvent(t,e){const n=this.getMap();if(n.hasListener(t)){const s=new mf(t,void 0,e);n.dispatchEvent(s)}}disposeInternal(){Mt(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),super.disposeInternal()}renderFrame(t){if(!t){this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1);return}this.calculateMatrices2D(t),this.dispatchRenderEvent(Te.PRECOMPOSE,t);const e=t.layerStatesArray.sort(function(o,h){return o.zIndex-h.zIndex});e.some(o=>o.layer instanceof dg&&o.layer.getDeclutter())&&(t.declutter={});const s=t.viewState;this.children_.length=0;const r=[];let a=null;for(let o=0,h=e.length;o=0;--n){const s=e[n],r=s.layer;r.getDeclutter()&&r.renderDeclutter(t,s)}e.forEach(n=>n.layer.renderDeferred(t))}}}class ji extends si{constructor(t,e){super(t),this.layer=e}}const Lh={LAYERS:"layers"};class ir extends bd{constructor(t){t=t||{};const e=Object.assign({},t);delete e.layers;let n=t.layers;super(e),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(Lh.LAYERS,this.handleLayersChanged_),n?Array.isArray(n)?n=new $e(n.slice(),{unique:!0}):ct(typeof n.getArray=="function","Expected `layers` to be an array or a `Collection`"):n=new $e(void 0,{unique:!0}),this.setLayers(n)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(Mt),this.layersListenerKeys_.length=0;const t=this.getLayers();this.layersListenerKeys_.push(lt(t,he.ADD,this.handleLayersAdd_,this),lt(t,he.REMOVE,this.handleLayersRemove_,this));for(const n in this.listenerKeys_)this.listenerKeys_[n].forEach(Mt);Ra(this.listenerKeys_);const e=t.getArray();for(let n=0,s=e.length;n{this.clickTimeoutId_=void 0;const n=new Bi(St.SINGLECLICK,this.map_,t);this.dispatchEvent(n)},250)}updateActivePointers_(t){const e=t,n=e.pointerId;if(e.type==St.POINTERUP||e.type==St.POINTERCANCEL){delete this.trackedTouches_[n];for(const s in this.trackedTouches_)if(this.trackedTouches_[s].target!==e.target){delete this.trackedTouches_[s];break}}else(e.type==St.POINTERDOWN||e.type==St.POINTERMOVE)&&(this.trackedTouches_[n]=e);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(t){this.updateActivePointers_(t);const e=new Bi(St.POINTERUP,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(e),this.emulateClicks_&&!e.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),this.activePointers_.length===0&&(this.dragListenerKeys_.forEach(Mt),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(t){return t.button===0}handlePointerDown_(t){this.emulateClicks_=this.activePointers_.length===0,this.updateActivePointers_(t);const e=new Bi(St.POINTERDOWN,this.map_,t,void 0,void 0,this.activePointers_);if(this.dispatchEvent(e),this.down_=new PointerEvent(t.type,t),Object.defineProperty(this.down_,"target",{writable:!1,value:t.target}),this.dragListenerKeys_.length===0){const n=this.map_.getOwnerDocument();this.dragListenerKeys_.push(lt(n,St.POINTERMOVE,this.handlePointerMove_,this),lt(n,St.POINTERUP,this.handlePointerUp_,this),lt(this.element_,St.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==n&&this.dragListenerKeys_.push(lt(this.element_.getRootNode(),St.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(t){if(this.isMoving_(t)){this.updateActivePointers_(t),this.dragging_=!0;const e=new Bi(St.POINTERDRAG,this.map_,t,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(e)}}relayMoveEvent_(t){this.originalPointerMoveEvent_=t;const e=!!(this.down_&&this.isMoving_(t));this.dispatchEvent(new Bi(St.POINTERMOVE,this.map_,t,e))}handleTouchMove_(t){const e=this.originalPointerMoveEvent_;(!e||e.defaultPrevented)&&(typeof t.cancelable!="boolean"||t.cancelable===!0)&&t.preventDefault()}isMoving_(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&(Mt(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(Z.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(Mt(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(Mt),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}}const Ui={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},Vt={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},To=1/0;class Bv{constructor(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,Ra(this.queuedElements_)}dequeue(){const t=this.elements_,e=this.priorities_,n=t[0];t.length==1?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));const s=this.keyFunction_(n);return delete this.queuedElements_[s],n}enqueue(t){ct(!(this.keyFunction_(t)in this.queuedElements_),"Tried to enqueue an `element` that was already added to the queue");const e=this.priorityFunction_(t);return e!=To?(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0):!1}getCount(){return this.elements_.length}getLeftChildIndex_(t){return t*2+1}getRightChildIndex_(t){return t*2+2}getParentIndex_(t){return t-1>>1}heapify_(){let t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)}isEmpty(){return this.elements_.length===0}isKeyQueued(t){return t in this.queuedElements_}isQueued(t){return this.isKeyQueued(this.keyFunction_(t))}siftUp_(t){const e=this.elements_,n=this.priorities_,s=e.length,r=e[t],a=n[t],o=t;for(;t>1;){const h=this.getLeftChildIndex_(t),l=this.getRightChildIndex_(t),c=lt;){const o=this.getParentIndex_(e);if(s[o]>a)n[e]=n[o],s[e]=s[o],e=o;else break}n[e]=r,s[e]=a}reprioritize(){const t=this.priorityFunction_,e=this.elements_,n=this.priorities_;let s=0;const r=e.length;let a,o,h;for(o=0;o0;)r=this.dequeue()[0],a=r.getKey(),s=r.getState(),s===q.IDLE&&!(a in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[a]=!0,++this.tilesLoading_,++n,r.load())}}function jv(i,t,e,n,s){if(!i||!(e in i.wantedTiles)||!i.wantedTiles[e][t.getKey()])return To;const r=i.viewState.center,a=n[0]-r[0],o=n[1]-r[1];return 65536*Math.log(s)+Math.sqrt(a*a+o*o)/s}class lc extends ri{constructor(t){super();const e=t.element;e&&!t.target&&!e.style.pointerEvents&&(e.style.pointerEvents="auto"),this.element=e||null,this.target_=null,this.map_=null,this.listenerKeys=[],t.render&&(this.render=t.render),t.target&&this.setTarget(t.target)}disposeInternal(){Hh(this.element),super.disposeInternal()}getMap(){return this.map_}setMap(t){this.map_&&Hh(this.element);for(let e=0,n=this.listenerKeys.length;es.getAttributions(t)))),n=!this.getMap().getAllLayers().some(s=>s.getSource()&&s.getSource().getAttributionsCollapsible()===!1);return this.overrideCollapsible_||this.setCollapsible(n),e}async updateElement_(t){if(!t){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}const e=await Promise.all(this.collectSourceAttributions_(t).map(s=>Rd(()=>s))),n=e.length>0;if(this.renderedVisible_!=n&&(this.element.style.display=n?"":"none",this.renderedVisible_=n),!ln(e,this.renderedAttributions_)){ny(this.ulElement_);for(let s=0,r=e.length;s0&&n%(2*Math.PI)!==0?e.animate({rotation:0,duration:this.duration_,easing:Js}):e.setRotation(0))}render(t){const e=t.frameState;if(!e)return;const n=e.viewState.rotation;if(n!=this.rotation_){const s="rotate("+n+"rad)";if(this.autoHide_){const r=this.element.classList.contains(Ha);!r&&n===0?this.element.classList.add(Ha):r&&n!==0&&this.element.classList.remove(Ha)}this.label_.style.transform=s}this.rotation_=n}}class qv extends lc{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target});const e=t.className!==void 0?t.className:"ol-zoom",n=t.delta!==void 0?t.delta:1,s=t.zoomInClassName!==void 0?t.zoomInClassName:e+"-in",r=t.zoomOutClassName!==void 0?t.zoomOutClassName:e+"-out",a=t.zoomInLabel!==void 0?t.zoomInLabel:"+",o=t.zoomOutLabel!==void 0?t.zoomOutLabel:"–",h=t.zoomInTipLabel!==void 0?t.zoomInTipLabel:"Zoom in",l=t.zoomOutTipLabel!==void 0?t.zoomOutTipLabel:"Zoom out",c=document.createElement("button");c.className=s,c.setAttribute("type","button"),c.title=h,c.appendChild(typeof a=="string"?document.createTextNode(a):a),c.addEventListener(Z.CLICK,this.handleClick_.bind(this,n),!1);const u=document.createElement("button");u.className=r,u.setAttribute("type","button"),u.title=l,u.appendChild(typeof o=="string"?document.createTextNode(o):o),u.addEventListener(Z.CLICK,this.handleClick_.bind(this,-n),!1);const d=e+" "+th+" "+ac,f=this.element;f.className=d,f.appendChild(c),f.appendChild(u),this.duration_=t.duration!==void 0?t.duration:250}handleClick_(t,e){e.preventDefault(),this.zoomByDelta_(t)}zoomByDelta_(t){const n=this.getMap().getView();if(!n)return;const s=n.getZoom();if(s!==void 0){const r=n.getConstrainedZoom(s+t);this.duration_>0?(n.getAnimating()&&n.cancelAnimations(),n.animate({zoom:r,duration:this.duration_,easing:Js})):n.setZoom(r)}}}function Yv(i){i=i||{};const t=new $e;return(i.zoom!==void 0?i.zoom:!0)&&t.push(new qv(i.zoomOptions)),(i.rotate!==void 0?i.rotate:!0)&&t.push(new Xv(i.rotateOptions)),(i.attribution!==void 0?i.attribution:!0)&&t.push(new pg(i.attributionOptions)),t}const Pu={ACTIVE:"active"};class Na extends ri{constructor(t){super(),this.on,this.once,this.un,t&&t.handleEvent&&(this.handleEvent=t.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(Pu.ACTIVE)}getMap(){return this.map_}handleEvent(t){return!0}setActive(t){this.set(Pu.ACTIVE,t)}setMap(t){this.map_=t}}function Vv(i,t,e){const n=i.getCenterInternal();if(n){const s=[n[0]+t[0],n[1]+t[1]];i.animateInternal({duration:e!==void 0?e:250,easing:F_,center:i.getConstrainedCenter(s)})}}function cc(i,t,e,n){const s=i.getZoom();if(s===void 0)return;const r=i.getConstrainedZoom(s+t),a=i.getResolutionForZoom(r);i.getAnimating()&&i.cancelAnimations(),i.animate({resolution:a,anchor:e,duration:n!==void 0?n:250,easing:Js})}class $v extends Na{constructor(t){super(),t=t||{},this.delta_=t.delta?t.delta:1,this.duration_=t.duration!==void 0?t.duration:250}handleEvent(t){let e=!1;if(t.type==St.DBLCLICK){const n=t.originalEvent,s=t.map,r=t.coordinate,a=n.shiftKey?-this.delta_:this.delta_,o=s.getView();cc(o,a,r,this.duration_),n.preventDefault(),e=!0}return!e}}class Fa extends Na{constructor(t){t=t||{},super(t),t.handleDownEvent&&(this.handleDownEvent=t.handleDownEvent),t.handleDragEvent&&(this.handleDragEvent=t.handleDragEvent),t.handleMoveEvent&&(this.handleMoveEvent=t.handleMoveEvent),t.handleUpEvent&&(this.handleUpEvent=t.handleUpEvent),t.stopDown&&(this.stopDown=t.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(t){return!1}handleDragEvent(t){}handleEvent(t){if(!t.originalEvent)return!0;let e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==St.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==St.POINTERUP){const n=this.handleUpEvent(t);this.handlingDownUpSequence=n&&this.targetPointers.length>0}}else if(t.type==St.POINTERDOWN){const n=this.handleDownEvent(t);this.handlingDownUpSequence=n,e=this.stopDown(n)}else t.type==St.POINTERMOVE&&this.handleMoveEvent(t);return!e}handleMoveEvent(t){}handleUpEvent(t){return!1}stopDown(t){return t}updateTrackedPointers_(t){t.activePointers&&(this.targetPointers=t.activePointers)}}function uc(i){const t=i.length;let e=0,n=0;for(let s=0;s0&&this.condition_(t)){const n=t.map.getView();return this.lastCentroid=null,n.getAnimating()&&n.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1}}class ix extends Fa{constructor(t){t=t||{},super({stopDown:Ca}),this.condition_=t.condition?t.condition:Kv,this.lastAngle_=void 0,this.duration_=t.duration!==void 0?t.duration:250}handleDragEvent(t){if(!Ph(t))return;const e=t.map,n=e.getView();if(n.getConstraints().rotation===Nl)return;const s=e.getSize(),r=t.pixel,a=Math.atan2(s[1]/2-r[1],r[0]-s[0]/2);if(this.lastAngle_!==void 0){const o=a-this.lastAngle_;n.adjustRotationInternal(-o)}this.lastAngle_=a}handleUpEvent(t){return Ph(t)?(t.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(t){return Ph(t)&&xg(t)&&this.condition_(t)?(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0):!1}}class nx extends wl{constructor(t){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+t,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const t=this.startPixel_,e=this.endPixel_,n="px",s=this.element_.style;s.left=Math.min(t[0],e[0])+n,s.top=Math.min(t[1],e[1])+n,s.width=Math.abs(e[0]-t[0])+n,s.height=Math.abs(e[1]-t[1])+n}setMap(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const e=this.element_.style;e.left="inherit",e.top="inherit",e.width="inherit",e.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){if(!this.map_)return;const t=this.startPixel_,e=this.endPixel_,s=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);s[4]=s[0].slice(),this.geometry_?this.geometry_.setCoordinates([s]):this.geometry_=new js([s])}getGeometry(){return this.geometry_}}const mr={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"};class eo extends si{constructor(t,e,n){super(t),this.coordinate=e,this.mapBrowserEvent=n}}class sx extends Fa{constructor(t){super(),this.on,this.once,this.un,t=t||{},this.box_=new nx(t.className||"ol-dragbox"),this.minArea_=t.minArea!==void 0?t.minArea:64,t.onBoxEnd&&(this.onBoxEnd=t.onBoxEnd),this.startPixel_=null,this.condition_=t.condition?t.condition:xg,this.boxEndCondition_=t.boxEndCondition?t.boxEndCondition:this.defaultBoxEndCondition}defaultBoxEndCondition(t,e,n){const s=n[0]-e[0],r=n[1]-e[1];return s*s+r*r>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(t){this.startPixel_&&(this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new eo(mr.BOXDRAG,t.coordinate,t)))}handleUpEvent(t){if(!this.startPixel_)return!1;this.box_.setMap(null);const e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new eo(e?mr.BOXEND:mr.BOXCANCEL,t.coordinate,t)),!1}handleDownEvent(t){return this.condition_(t)?(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new eo(mr.BOXSTART,t.coordinate,t)),!0):!1}onBoxEnd(t){}setActive(t){t||(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new eo(mr.BOXCANCEL,this.startPixel_,null)),this.startPixel_=null)),super.setActive(t)}}class wg extends sx{constructor(t){t=t||{};const e=t.condition?t.condition:Qv;super({condition:e,className:t.className||"ol-dragzoom",minArea:t.minArea}),this.duration_=t.duration!==void 0?t.duration:200,this.out_=t.out!==void 0?t.out:!1}onBoxEnd(t){const n=this.getMap().getView();let s=this.getGeometry();if(this.out_){const r=n.rotatedExtentForGeometry(s),a=n.getResolutionForExtentInternal(r),o=n.getResolution()/a;s=s.clone(),s.scale(o*o)}n.fitInternal(s,{duration:this.duration_,easing:Js})}}const yn={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown"};class rx extends Na{constructor(t){super(),t=t||{},this.defaultCondition_=function(e){return Eg(e)&&Mg(e)},this.condition_=t.condition!==void 0?t.condition:this.defaultCondition_,this.duration_=t.duration!==void 0?t.duration:100,this.pixelDelta_=t.pixelDelta!==void 0?t.pixelDelta:128}handleEvent(t){let e=!1;if(t.type==Z.KEYDOWN){const n=t.originalEvent,s=n.key;if(this.condition_(t)&&(s==yn.DOWN||s==yn.LEFT||s==yn.RIGHT||s==yn.UP)){const a=t.map.getView(),o=a.getResolution()*this.pixelDelta_;let h=0,l=0;s==yn.DOWN?l=-o:s==yn.LEFT?h=-o:s==yn.RIGHT?h=o:l=o;const c=[h,l];Il(c,a.getRotation()),Vv(a,c,this.duration_),n.preventDefault(),e=!0}}return!e}}class ax extends Na{constructor(t){super(),t=t||{},this.condition_=t.condition?t.condition:function(e){return!Jv(e)&&Mg(e)},this.delta_=t.delta?t.delta:1,this.duration_=t.duration!==void 0?t.duration:100}handleEvent(t){let e=!1;if(t.type==Z.KEYDOWN||t.type==Z.KEYPRESS){const n=t.originalEvent,s=n.key;if(this.condition_(t)&&(s==="+"||s==="-")){const r=t.map,a=s==="+"?this.delta_:-this.delta_,o=r.getView();cc(o,a,void 0,this.duration_),n.preventDefault(),e=!0}}return!e}}class ox extends Na{constructor(t){t=t||{},super(t),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=t.maxDelta!==void 0?t.maxDelta:1,this.duration_=t.duration!==void 0?t.duration:250,this.timeout_=t.timeout!==void 0?t.timeout:80,this.useAnchor_=t.useAnchor!==void 0?t.useAnchor:!0,this.constrainResolution_=t.constrainResolution!==void 0?t.constrainResolution:!1;const e=t.condition?t.condition:Hv;this.condition_=t.onFocusOnly?ol(vg,e):e,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.deltaPerZoom_=300}endInteraction_(){this.trackpadTimeoutId_=void 0;const t=this.getMap();if(!t)return;t.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)}handleEvent(t){if(!this.condition_(t)||t.type!==Z.WHEEL)return!0;const n=t.map,s=t.originalEvent;s.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate);let r;if(t.type==Z.WHEEL&&(r=s.deltaY,Qm&&s.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(r/=pf),s.deltaMode===WheelEvent.DOM_DELTA_LINE&&(r*=40)),r===0)return!1;this.lastDelta_=r;const a=Date.now();this.startTime_===void 0&&(this.startTime_=a),(!this.mode_||a-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(r)<4?"trackpad":"wheel");const o=n.getView();if(this.mode_==="trackpad"&&!(o.getConstrainResolution()||this.constrainResolution_))return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(o.getAnimating()&&o.cancelAnimations(),o.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),o.adjustZoom(-r/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=a,!1;this.totalDelta_+=r;const h=Math.max(this.timeout_-(a-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,n),h),!1}handleWheelZoom_(t){const e=t.getView();e.getAnimating()&&e.cancelAnimations();let n=-It(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(n=n?n>0?1:-1:0),cc(e,n,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(t){this.useAnchor_=t,t||(this.lastAnchor_=null)}}class hx extends Fa{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=Ca),super(e),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=t.threshold!==void 0?t.threshold:.3,this.duration_=t.duration!==void 0?t.duration:250}handleDragEvent(t){let e=0;const n=this.targetPointers[0],s=this.targetPointers[1],r=Math.atan2(s.clientY-n.clientY,s.clientX-n.clientX);if(this.lastAngle_!==void 0){const h=r-this.lastAngle_;this.rotationDelta_+=h,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=h}this.lastAngle_=r;const a=t.map,o=a.getView();o.getConstraints().rotation!==Nl&&(this.anchor_=a.getCoordinateFromPixelInternal(a.getEventPixel(uc(this.targetPointers))),this.rotating_&&(a.render(),o.adjustRotationInternal(e,this.anchor_)))}handleUpEvent(t){return this.targetPointers.length<2?(t.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}}class lx extends Fa{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=Ca),super(e),this.anchor_=null,this.duration_=t.duration!==void 0?t.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(t){let e=1;const n=this.targetPointers[0],s=this.targetPointers[1],r=n.clientX-s.clientX,a=n.clientY-s.clientY,o=Math.sqrt(r*r+a*a);this.lastDistance_!==void 0&&(e=this.lastDistance_/o),this.lastDistance_=o;const h=t.map,l=h.getView();e!=1&&(this.lastScaleDelta_=e),this.anchor_=h.getCoordinateFromPixelInternal(h.getEventPixel(uc(this.targetPointers))),h.render(),l.adjustResolutionInternal(e,this.anchor_)}handleUpEvent(t){if(this.targetPointers.length<2){const n=t.map.getView(),s=this.lastScaleDelta_>1?1:-1;return n.endInteraction(this.duration_,s),!1}return!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}}function Sg(i){i=i||{};const t=new $e,e=new Fv(-.005,.05,100);return(i.altShiftDragRotate!==void 0?i.altShiftDragRotate:!0)&&t.push(new ix),(i.doubleClickZoom!==void 0?i.doubleClickZoom:!0)&&t.push(new $v({delta:i.zoomDelta,duration:i.zoomDuration})),(i.dragPan!==void 0?i.dragPan:!0)&&t.push(new ex({onFocusOnly:i.onFocusOnly,kinetic:e})),(i.pinchRotate!==void 0?i.pinchRotate:!0)&&t.push(new hx),(i.pinchZoom!==void 0?i.pinchZoom:!0)&&t.push(new lx({duration:i.zoomDuration})),(i.keyboard!==void 0?i.keyboard:!0)&&(t.push(new rx),t.push(new ax({delta:i.zoomDelta,duration:i.zoomDuration}))),(i.mouseWheelZoom!==void 0?i.mouseWheelZoom:!0)&&t.push(new ox({onFocusOnly:i.onFocusOnly,duration:i.zoomDuration})),(i.shiftDragZoom!==void 0?i.shiftDragZoom:!0)&&t.push(new wg({duration:i.zoomDuration})),t}function Cg(i){if(i instanceof Un){i.setMapInternal(null);return}i instanceof ir&&i.getLayers().forEach(Cg)}function Rg(i,t){if(i instanceof Un){i.setMapInternal(t);return}if(i instanceof ir){const e=i.getLayers().getArray();for(let n=0,s=e.length;nthis.updateSize()),this.controls=e.controls||Yv(),this.interactions=e.interactions||Sg({onFocusOnly:!0}),this.overlays_=e.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new Uv(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(Vt.LAYERGROUP,this.handleLayerGroupChanged_),this.addChangeListener(Vt.VIEW,this.handleViewChanged_),this.addChangeListener(Vt.SIZE,this.handleSizeChanged_),this.addChangeListener(Vt.TARGET,this.handleTargetChanged_),this.setProperties(e.values);const n=this;t.view&&!(t.view instanceof Ie)&&t.view.then(function(s){n.setView(new Ie(s))}),this.controls.addEventListener(he.ADD,s=>{s.element.setMap(this)}),this.controls.addEventListener(he.REMOVE,s=>{s.element.setMap(null)}),this.interactions.addEventListener(he.ADD,s=>{s.element.setMap(this)}),this.interactions.addEventListener(he.REMOVE,s=>{s.element.setMap(null)}),this.overlays_.addEventListener(he.ADD,s=>{this.addOverlayInternal_(s.element)}),this.overlays_.addEventListener(he.REMOVE,s=>{const r=s.element.getId();r!==void 0&&delete this.overlayIdIndex_[r.toString()],s.element.setMap(null)}),this.controls.forEach(s=>{s.setMap(this)}),this.interactions.forEach(s=>{s.setMap(this)}),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(t){this.getControls().push(t)}addInteraction(t){this.getInteractions().push(t)}addLayer(t){this.getLayerGroup().getLayers().push(t)}handleLayerAdd_(t){Rg(t.layer,this)}addOverlay(t){this.getOverlays().push(t)}addOverlayInternal_(t){const e=t.getId();e!==void 0&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.resizeObserver_.disconnect(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(t,e,n){if(!this.frameState_||!this.renderer_)return;const s=this.getCoordinateFromPixelInternal(t);n=n!==void 0?n:{};const r=n.hitTolerance!==void 0?n.hitTolerance:0,a=n.layerFilter!==void 0?n.layerFilter:Nr,o=n.checkWrapped!==!1;return this.renderer_.forEachFeatureAtCoordinate(s,this.frameState_,r,o,e,null,a,null)}getFeaturesAtPixel(t,e){const n=[];return this.forEachFeatureAtPixel(t,function(s){n.push(s)},e),n}getAllLayers(){const t=[];function e(n){n.forEach(function(s){s instanceof ir?e(s.getLayers()):t.push(s)})}return e(this.getLayers()),t}hasFeatureAtPixel(t,e){if(!this.frameState_||!this.renderer_)return!1;const n=this.getCoordinateFromPixelInternal(t);e=e!==void 0?e:{};const s=e.layerFilter!==void 0?e.layerFilter:Nr,r=e.hitTolerance!==void 0?e.hitTolerance:0,a=e.checkWrapped!==!1;return this.renderer_.hasFeatureAtCoordinate(n,this.frameState_,r,a,s,null)}getEventCoordinate(t){return this.getCoordinateFromPixel(this.getEventPixel(t))}getEventCoordinateInternal(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))}getEventPixel(t){const n=this.viewport_.getBoundingClientRect(),s=this.getSize(),r=n.width/s[0],a=n.height/s[1],o="changedTouches"in t?t.changedTouches[0]:t;return[(o.clientX-n.left)/r,(o.clientY-n.top)/a]}getTarget(){return this.get(Vt.TARGET)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(t){return Vh(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())}getCoordinateFromPixelInternal(t){const e=this.frameState_;return e?Ft(e.pixelToCoordinateTransform,t.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(t){const e=this.overlayIdIndex_[t.toString()];return e!==void 0?e:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(Vt.LAYERGROUP)}setLayers(t){const e=this.getLayerGroup();if(t instanceof $e){e.setLayers(t);return}const n=e.getLayers();n.clear(),n.extend(t)}getLayers(){return this.getLayerGroup().getLayers()}getLoadingOrNotReady(){const t=this.getLayerGroup().getLayerStatesArray();for(let e=0,n=t.length;e=0;r--){const a=s[r];if(a.getMap()!==this||!a.getActive()||!this.getTargetElement())continue;if(!a.handleEvent(t)||t.propagationStopped)break}}}handlePostRender(){const t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){let s=this.maxTilesLoading_,r=s;if(t){const a=t.viewHints;if(a[Nt.ANIMATING]||a[Nt.INTERACTING]){const o=Date.now()-t.time>8;s=o?0:8,r=o?0:2}}e.getTilesLoading(){this.postRenderTimeoutHandle_=void 0,this.handlePostRender()},0))}setLayerGroup(t){const e=this.getLayerGroup();e&&this.handleLayerRemove_(new ji("removelayer",e)),this.set(Vt.LAYERGROUP,t)}setSize(t){this.set(Vt.SIZE,t)}setTarget(t){this.set(Vt.TARGET,t)}setView(t){if(!t||t instanceof Ie){this.set(Vt.VIEW,t);return}this.set(Vt.VIEW,new Ie);const e=this;t.then(function(n){e.setView(new Ie(n))})}updateSize(){const t=this.getTargetElement();let e;if(t){const s=getComputedStyle(t),r=t.offsetWidth-parseFloat(s.borderLeftWidth)-parseFloat(s.paddingLeft)-parseFloat(s.paddingRight)-parseFloat(s.borderRightWidth),a=t.offsetHeight-parseFloat(s.borderTopWidth)-parseFloat(s.paddingTop)-parseFloat(s.paddingBottom)-parseFloat(s.borderBottomWidth);!isNaN(r)&&!isNaN(a)&&(e=[r,a],!au(e)&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&Ud("No map visible because the map container's width or height are 0."))}const n=this.getSize();e&&(!n||!ln(e,n))&&(this.setSize(e),this.updateViewportSize_(e))}updateViewportSize_(t){const e=this.getView();e&&e.setViewportSize(t)}};function ux(i){let t=null;i.keyboardEventTarget!==void 0&&(t=typeof i.keyboardEventTarget=="string"?document.getElementById(i.keyboardEventTarget):i.keyboardEventTarget);const e={},n=i.layers&&typeof i.layers.getLayers=="function"?i.layers:new ir({layers:i.layers});e[Vt.LAYERGROUP]=n,e[Vt.TARGET]=i.target,e[Vt.VIEW]=i.view instanceof Ie?i.view:new Ie;let s;i.controls!==void 0&&(Array.isArray(i.controls)?s=new $e(i.controls.slice()):(ct(typeof i.controls.getArray=="function","Expected `controls` to be an array or an `ol/Collection.js`"),s=i.controls));let r;i.interactions!==void 0&&(Array.isArray(i.interactions)?r=new $e(i.interactions.slice()):(ct(typeof i.interactions.getArray=="function","Expected `interactions` to be an array or an `ol/Collection.js`"),r=i.interactions));let a;return i.overlays!==void 0?Array.isArray(i.overlays)?a=new $e(i.overlays.slice()):(ct(typeof i.overlays.getArray=="function","Expected `overlays` to be an array or an `ol/Collection.js`"),a=i.overlays):a=new $e,{controls:s,interactions:r,keyboardEventTarget:t,overlays:a,values:e}}const Rn=bi("map:WMTSLayer");var Os,Ds,Ns,ca,ua,da,fa,ga,Zs,bg,Ig;class FC extends Xs{constructor(e){const n=new Xf;super({...e,olLayer:n});O(this,Zs);O(this,Os);O(this,Ds);O(this,Ns);O(this,ca);O(this,ua);O(this,da);O(this,fa,Zt());O(this,ga,new AbortController);W(this,Os,e.url),W(this,Ds,e.name),W(this,ca,n),W(this,Ns,e.matrixSet),W(this,da,e.sourceOptions)}get type(){return"wmts"}destroy(){v(this,ga).abort(),super.destroy()}get legend(){return v(this,fa).value}get sublayers(){}get layers(){}__attachToMap(e){super.__attachToMap(e),B(this,Zs,bg).call(this).then(n=>{const r=new op().read(n),a=Kp(r,{layer:v(this,Ds),matrixSet:v(this,Ns)});if(!a)throw new Error("Layer was not found in capabilities");const o=new $p({...a,...v(this,da),tileLoadFunction:(c,u)=>{B(this,Zs,Ig).call(this,c,u)}});W(this,ua,o),v(this,ca).setSource(v(this,ua));const h=o.getStyle(),l=fx(r,this.name,h);v(this,fa).value=l}).catch(n=>{if(Dr(n)){Rn.error(`Layer ${this.name} has been destroyed before fetching the data`);return}Rn.error(`Failed fetching WMTS capabilities for Layer ${this.name}`,n)})}get url(){return v(this,Os)}get name(){return v(this,Ds)}get matrixSet(){return v(this,Ns)}}Os=new WeakMap,Ds=new WeakMap,Ns=new WeakMap,ca=new WeakMap,ua=new WeakMap,da=new WeakMap,fa=new WeakMap,ga=new WeakMap,Zs=new WeakSet,bg=async function(){const e=this.map.__sharedDependencies.httpService;return Df(v(this,Os),e,v(this,ga).signal)},Ig=async function(e,n){const s=this.map.__sharedDependencies.httpService;try{if(!(e instanceof Ql))throw new Error("Only 'ImageTile' is supported for now.");const r=e.getImage();if(!dx(r))throw new Error("Only tags are supported as tiles for now.");const a=await s.fetch(n);if(!a.ok)throw new Error(`Tile request failed with status ${a.status}.`);const o=await a.blob(),h=URL.createObjectURL(o),l=()=>{URL.revokeObjectURL(h),r.removeEventListener("load",l),r.removeEventListener("error",l)};r.addEventListener("load",l),r.addEventListener("error",l),r.src=h}catch(r){e.setState(q.ERROR),Dr(r)||Rn.error("Failed to load tile",r)}};function dx(i){return i.tagName==="IMG"}function fx(i,t,e){const s=i?.Contents?.Layer;let r=s?.find(l=>l?.Identifier===t);if(!r&&(Rn.debug("Failed to find the active layer in WMTS layer capabilities."),r=s?.[0],!r)){Rn.debug("No layer in WMTS capabilities - giving up.");return}const a=r.Style;let o=a?.find(l=>l?.Identifier===e);if(!o&&(Rn.debug("Failed to find active style in WMTS layer."),o=a?.[0],!o)){Rn.debug("No style in WMTS layer capabilities - giving up.");return}return o.LegendURL?.[0]?.href}function gx(i){const t=Object.keys(i.defs),e=t.length;let n,s;for(n=0;n=this.text.length)return;i=this.text[this.place++]}switch(this.state){case Hr:return this.neutral(i);case Tg:return this.keyword(i);case Ao:return this.quoted(i);case Lg:return this.afterquote(i);case Ag:return this.number(i);case dc:return}};Ti.prototype.afterquote=function(i){if(i==='"'){this.word+='"',this.state=Ao;return}if(rh.test(i)){this.word=this.word.trim(),this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in afterquote yet, index '+this.place)};Ti.prototype.afterItem=function(i){if(i===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=Hr;return}if(i==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=Hr,this.currentObject=this.stack.pop(),this.currentObject||(this.state=dc);return}};Ti.prototype.number=function(i){if(Pg.test(i)){this.word+=i;return}if(rh.test(i)){this.word=parseFloat(this.word),this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in number yet, index '+this.place)};Ti.prototype.quoted=function(i){if(i==='"'){this.state=Lg;return}this.word+=i};Ti.prototype.keyword=function(i){if(Sx.test(i)){this.word+=i;return}if(i==="["){var t=[];t.push(this.word),this.level++,this.root===null?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,this.state=Hr;return}if(rh.test(i)){this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in keyword yet, index '+this.place)};Ti.prototype.neutral=function(i){if(wx.test(i)){this.word=i,this.state=Tg;return}if(i==='"'){this.word="",this.state=Ao;return}if(Pg.test(i)){this.word=i,this.state=Ag;return}if(rh.test(i)){this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in neutral yet, index '+this.place)};Ti.prototype.output=function(){for(;this.place0?90:-90),i.lat_ts=i.lat1):!i.lat_ts&&i.lat0&&i.projName==="Polar_Stereographic"&&(i.lat_ts=i.lat0,i.lat0=Ue(i.lat0>0?90:-90))}function Og(i){var t=Cx(i),e=t.shift(),n=t.shift();t.unshift(["name",n]),t.unshift(["type",e]);var s={};return os(t,s),Ix(s),s}function ee(i){var t=this;if(arguments.length===2){var e=arguments[1];typeof e=="string"?e.charAt(0)==="+"?ee[i]=ll(arguments[1]):ee[i]=Og(arguments[1]):ee[i]=e}else if(arguments.length===1){if(Array.isArray(i))return i.map(function(n){Array.isArray(n)?ee.apply(t,n):ee(n)});if(typeof i=="string"){if(i in ee)return ee[i]}else"EPSG"in i?ee["EPSG:"+i.EPSG]=i:"ESRI"in i?ee["ESRI:"+i.ESRI]=i:"IAU2000"in i?ee["IAU2000:"+i.IAU2000]=i:console.log(i);return}}_x(ee);function Tx(i){return typeof i=="string"}function Ax(i){return i in ee}var Lx=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function Px(i){return Lx.some(function(t){return i.indexOf(t)>-1})}var Ox=["3857","900913","3785","102113"];function Dx(i){var t=on(i,"authority");if(t){var e=on(t,"epsg");return e&&Ox.indexOf(e)>-1}}function Nx(i){var t=on(i,"extension");if(t)return on(t,"proj4")}function Fx(i){return i[0]==="+"}function kx(i){if(Tx(i)){if(Ax(i))return ee[i];if(Px(i)){var t=Og(i);if(Dx(t))return ee["EPSG:3857"];var e=Nx(t);return e?ll(e):t}if(Fx(i))return ll(i)}else return i}function ku(i,t){i=i||{};var e,n;if(!t)return i;for(n in t)e=t[n],e!==void 0&&(i[n]=e);return i}function ii(i,t,e){var n=i*t;return e/Math.sqrt(1-n*n)}function ka(i){return i<0?-1:1}function N(i){return Math.abs(i)<=At?i:i-ka(i)*Zr}function ze(i,t,e){var n=i*e,s=.5*i;return n=Math.pow((1-n)/(1+n),s),Math.tan(.5*(T-t))/n}function Jr(i,t){for(var e=.5*i,n,s,r=T-2*Math.atan(t),a=0;a<=15;a++)if(n=i*Math.sin(r),s=T-2*Math.atan(t*Math.pow((1-n)/(1+n),e))-r,r+=s,Math.abs(s)<=1e-10)return r;return-9999}function Gx(){var i=this.b/this.a;this.es=1-i*i,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=ii(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function zx(i){var t=i.x,e=i.y;if(e*He>90&&e*He<-90&&t*He>180&&t*He<-180)return null;var n,s;if(Math.abs(Math.abs(e)-T)<=D)return null;if(this.sphere)n=this.x0+this.a*this.k0*N(t-this.long0),s=this.y0+this.a*this.k0*Math.log(Math.tan(ut+.5*e));else{var r=Math.sin(e),a=ze(this.e,e,r);n=this.x0+this.a*this.k0*N(t-this.long0),s=this.y0-this.a*this.k0*Math.log(a)}return i.x=n,i.y=s,i}function Wx(i){var t=i.x-this.x0,e=i.y-this.y0,n,s;if(this.sphere)s=T-2*Math.atan(Math.exp(-e/(this.a*this.k0)));else{var r=Math.exp(-e/(this.a*this.k0));if(s=Jr(this.e,r),s===-9999)return null}return n=N(this.long0+t/(this.a*this.k0)),i.x=n,i.y=s,i}var Bx=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"];const Ux={init:Gx,forward:zx,inverse:Wx,names:Bx};function jx(){}function Gu(i){return i}var Xx=["longlat","identity"];const qx={init:jx,forward:Gu,inverse:Gu,names:Xx};var Yx=[Ux,qx],lo={},Lo=[];function Dg(i,t){var e=Lo.length;return i.names?(Lo[e]=i,i.names.forEach(function(n){lo[n.toLowerCase()]=e}),this):(console.log(t),!0)}function Vx(i){if(!i)return!1;var t=i.toLowerCase();if(typeof lo[t]<"u"&&Lo[lo[t]])return Lo[lo[t]]}function $x(){Yx.forEach(Dg)}const Kx={start:$x,add:Dg,get:Vx};var H={};H.MERIT={a:6378137,rf:298.257,ellipseName:"MERIT 1983"};H.SGS85={a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"};H.GRS80={a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"};H.IAU76={a:6378140,rf:298.257,ellipseName:"IAU 1976"};H.airy={a:6377563396e-3,b:635625691e-2,ellipseName:"Airy 1830"};H.APL4={a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"};H.NWL9D={a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"};H.mod_airy={a:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"};H.andrae={a:637710443e-2,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"};H.aust_SA={a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"};H.GRS67={a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"};H.bessel={a:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"};H.bess_nam={a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"};H.clrk66={a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"};H.clrk80={a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."};H.clrk80ign={a:63782492e-1,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"};H.clrk58={a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"};H.CPM={a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"};H.delmbr={a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"};H.engelis={a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"};H.evrst30={a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"};H.evrst48={a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"};H.evrst56={a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"};H.evrst69={a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"};H.evrstSS={a:6377298556e-3,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"};H.fschr60={a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"};H.fschr60m={a:6378155,rf:298.3,ellipseName:"Fischer 1960"};H.fschr68={a:6378150,rf:298.3,ellipseName:"Fischer 1968"};H.helmert={a:6378200,rf:298.3,ellipseName:"Helmert 1906"};H.hough={a:6378270,rf:297,ellipseName:"Hough"};H.intl={a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"};H.kaula={a:6378163,rf:298.24,ellipseName:"Kaula 1961"};H.lerch={a:6378139,rf:298.257,ellipseName:"Lerch 1979"};H.mprts={a:6397300,rf:191,ellipseName:"Maupertius 1738"};H.new_intl={a:63781575e-1,b:63567722e-1,ellipseName:"New International 1967"};H.plessis={a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"};H.krass={a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"};H.SEasia={a:6378155,b:63567733205e-4,ellipseName:"Southeast Asia"};H.walbeck={a:6376896,b:63558348467e-4,ellipseName:"Walbeck"};H.WGS60={a:6378165,rf:298.3,ellipseName:"WGS 60"};H.WGS66={a:6378145,rf:298.25,ellipseName:"WGS 66"};H.WGS7={a:6378135,rf:298.26,ellipseName:"WGS 72"};var Zx=H.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};H.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};function Hx(i,t,e,n){var s=i*i,r=t*t,a=(s-r)/s,o=0;n?(i*=1-a*(px+a*(vx+a*xx)),s=i*i,a=0):o=Math.sqrt(a);var h=(s-r)/r;return{es:a,e:o,ep2:h}}function Jx(i,t,e,n,s){if(!i){var r=on(H,n);r||(r=Zx),i=r.a,t=r.b,e=r.rf}return e&&!t&&(t=(1-1/e)*i),(e===0||Math.abs(i-t)3&&(o.datum_params[3]!==0||o.datum_params[4]!==0||o.datum_params[5]!==0||o.datum_params[6]!==0)&&(o.datum_type=zn,o.datum_params[3]*=Ir,o.datum_params[4]*=Ir,o.datum_params[5]*=Ir,o.datum_params[6]=o.datum_params[6]/1e6+1)),a&&(o.datum_type=ms,o.grids=a),o.a=e,o.b=n,o.es=s,o.ep2=r,o}var Ng={};function tE(i,t){var e=new DataView(t),n=nE(e),s=sE(e,n),r=rE(e,s,n),a={header:s,subgrids:r};return Ng[i]=a,a}function eE(i){if(i===void 0)return null;var t=i.split(",");return t.map(iE)}function iE(i){if(i.length===0)return null;var t=i[0]==="@";return t&&(i=i.slice(1)),i==="null"?{name:"null",mandatory:!t,grid:null,isNull:!0}:{name:i,mandatory:!t,grid:Ng[i]||null,isNull:!1}}function hs(i){return i/3600*Math.PI/180}function nE(i){var t=i.getInt32(8,!1);return t===11?!1:(t=i.getInt32(8,!0),t!==11&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function sE(i,t){return{nFields:i.getInt32(8,t),nSubgridFields:i.getInt32(24,t),nSubgrids:i.getInt32(40,t),shiftType:cl(i,56,64).trim(),fromSemiMajorAxis:i.getFloat64(120,t),fromSemiMinorAxis:i.getFloat64(136,t),toSemiMajorAxis:i.getFloat64(152,t),toSemiMinorAxis:i.getFloat64(168,t)}}function cl(i,t,e){return String.fromCharCode.apply(null,new Uint8Array(i.buffer.slice(t,e)))}function rE(i,t,e){for(var n=176,s=[],r=0;r5e-11?!1:i.datum_type===Gn?i.datum_params[0]===t.datum_params[0]&&i.datum_params[1]===t.datum_params[1]&&i.datum_params[2]===t.datum_params[2]:i.datum_type===zn?i.datum_params[0]===t.datum_params[0]&&i.datum_params[1]===t.datum_params[1]&&i.datum_params[2]===t.datum_params[2]&&i.datum_params[3]===t.datum_params[3]&&i.datum_params[4]===t.datum_params[4]&&i.datum_params[5]===t.datum_params[5]&&i.datum_params[6]===t.datum_params[6]:!0}function Fg(i,t,e){var n=i.x,s=i.y,r=i.z?i.z:0,a,o,h,l;if(s<-T&&s>-1.001*T)s=-T;else if(s>T&&s<1.001*T)s=T;else{if(s<-T)return{x:-1/0,y:-1/0,z:i.z};if(s>T)return{x:1/0,y:1/0,z:i.z}}return n>Math.PI&&(n-=2*Math.PI),o=Math.sin(s),l=Math.cos(s),h=o*o,a=e/Math.sqrt(1-t*h),{x:(a+r)*l*Math.cos(n),y:(a+r)*l*Math.sin(n),z:(a*(1-t)+r)*o}}function kg(i,t,e,n){var s=1e-12,r=s*s,a=30,o,h,l,c,u,d,f,g,_,m,y,p,x,M=i.x,E=i.y,w=i.z?i.z:0,C,S,I;if(o=Math.sqrt(M*M+E*E),h=Math.sqrt(M*M+E*E+w*w),o/er&&xn.y||f>n.x||mo&&Math.abs(h.y)>o);if(a<0)return console.log("Inverse grid shift iterator failed to converge."),n;n.x=N(r.x+e.ll[0]),n.y=r.y+e.ll[1]}else isNaN(r.x)||(n.x=i.x+r.x,n.y=i.y+r.y);return n}function Wu(i,t){var e={x:i.x/t.del[0],y:i.y/t.del[1]},n={x:Math.floor(e.x),y:Math.floor(e.y)},s={x:e.x-1*n.x,y:e.y-1*n.y},r={x:Number.NaN,y:Number.NaN},a;if(n.x<0||n.x>=t.lim[0]||n.y<0||n.y>=t.lim[1])return r;a=n.y*t.lim[0]+n.x;var o={x:t.cvs[a][0],y:t.cvs[a][1]};a++;var h={x:t.cvs[a][0],y:t.cvs[a][1]};a+=t.lim[0];var l={x:t.cvs[a][0],y:t.cvs[a][1]};a--;var c={x:t.cvs[a][0],y:t.cvs[a][1]},u=s.x*s.y,d=s.x*(1-s.y),f=(1-s.x)*(1-s.y),g=(1-s.x)*s.y;return r.x=f*o.x+d*h.x+g*c.x+u*l.x,r.y=f*o.y+d*h.y+g*c.y+u*l.y,r}function Bu(i,t,e){var n=e.x,s=e.y,r=e.z||0,a,o,h,l={};for(h=0;h<3;h++)if(!(t&&h===2&&e.z===void 0))switch(h===0?(a=n,"ew".indexOf(i.axis[h])!==-1?o="x":o="y"):h===1?(a=s,"ns".indexOf(i.axis[h])!==-1?o="y":o="x"):(a=r,o="z"),i.axis[h]){case"e":l[o]=a;break;case"w":l[o]=-a;break;case"n":l[o]=a;break;case"s":l[o]=-a;break;case"u":e[o]!==void 0&&(l.z=a);break;case"d":e[o]!==void 0&&(l.z=-a);break;default:return null}return l}function Gg(i){var t={x:i[0],y:i[1]};return i.length>2&&(t.z=i[2]),i.length>3&&(t.m=i[3]),t}function gE(i){Uu(i.x),Uu(i.y)}function Uu(i){if(typeof Number.isFinite=="function"){if(Number.isFinite(i))return;throw new TypeError("coordinates must be finite numbers")}if(typeof i!="number"||i!==i||!isFinite(i))throw new TypeError("coordinates must be finite numbers")}function _E(i,t){return(i.datum.datum_type===Gn||i.datum.datum_type===zn||i.datum.datum_type===ms)&&t.datumCode!=="WGS84"||(t.datum.datum_type===Gn||t.datum.datum_type===zn||t.datum.datum_type===ms)&&i.datumCode!=="WGS84"}function Po(i,t,e,n){var s;Array.isArray(e)?e=Gg(e):e={x:e.x,y:e.y,z:e.z,m:e.m};var r=e.z!==void 0;if(gE(e),i.datum&&t.datum&&_E(i,t)&&(s=new ti("WGS84"),e=Po(i,s,e,n),i=s),n&&i.axis!=="enu"&&(e=Bu(i,!1,e)),i.projName==="longlat")e={x:e.x*Bt,y:e.y*Bt,z:e.z||0};else if(i.to_meter&&(e={x:e.x*i.to_meter,y:e.y*i.to_meter,z:e.z||0}),e=i.inverse(e),!e)return;if(i.from_greenwich&&(e.x+=i.from_greenwich),e=dE(i.datum,t.datum,e),!!e)return t.from_greenwich&&(e={x:e.x-t.from_greenwich,y:e.y,z:e.z||0}),t.projName==="longlat"?e={x:e.x*He,y:e.y*He,z:e.z||0}:(e=t.forward(e),t.to_meter&&(e={x:e.x/t.to_meter,y:e.y/t.to_meter,z:e.z||0})),n&&t.axis!=="enu"?Bu(t,!0,e):(e&&!r&&delete e.z,e)}var ju=ti("WGS84");function Oh(i,t,e,n){var s,r,a;return Array.isArray(e)?(s=Po(i,t,e,n)||{x:NaN,y:NaN},e.length>2?typeof i.name<"u"&&i.name==="geocent"||typeof t.name<"u"&&t.name==="geocent"?typeof s.z=="number"?[s.x,s.y,s.z].concat(e.slice(3)):[s.x,s.y,e[2]].concat(e.slice(3)):[s.x,s.y].concat(e.slice(2)):[s.x,s.y]):(r=Po(i,t,e,n),a=Object.keys(e),a.length===2||a.forEach(function(o){if(typeof i.name<"u"&&i.name==="geocent"||typeof t.name<"u"&&t.name==="geocent"){if(o==="x"||o==="y"||o==="z")return}else if(o==="x"||o==="y")return;r[o]=e[o]}),r)}function Xu(i){return i instanceof ti?i:i.oProj?i.oProj:ti(i)}function fe(i,t,e){i=Xu(i);var n=!1,s;return typeof t>"u"?(t=i,i=ju,n=!0):(typeof t.x<"u"||Array.isArray(t))&&(e=t,t=i,i=ju,n=!0),t=Xu(t),e?Oh(i,t,e):(s={forward:function(r,a){return Oh(i,t,r,a)},inverse:function(r,a){return Oh(t,i,r,a)}},n&&(s.oProj=t),s)}var qu=6,zg="AJSAJS",Wg="AFAFAF",ls=65,oe=73,Ce=79,Er=86,Mr=90;const mE={forward:Bg,inverse:yE,toPoint:Ug};function Bg(i,t){return t=t||5,xE(pE({lat:i[1],lon:i[0]}),t)}function yE(i){var t=fc(Xg(i.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat,t.lon,t.lat]:[t.left,t.bottom,t.right,t.top]}function Ug(i){var t=fc(Xg(i.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function Dh(i){return i*(Math.PI/180)}function Yu(i){return 180*(i/Math.PI)}function pE(i){var t=i.lat,e=i.lon,n=6378137,s=.00669438,r=.9996,a,o,h,l,c,u,d,f=Dh(t),g=Dh(e),_,m;m=Math.floor((e+180)/6)+1,e===180&&(m=60),t>=56&&t<64&&e>=3&&e<12&&(m=32),t>=72&&t<84&&(e>=0&&e<9?m=31:e>=9&&e<21?m=33:e>=21&&e<33?m=35:e>=33&&e<42&&(m=37)),a=(m-1)*6-180+3,_=Dh(a),o=s/(1-s),h=n/Math.sqrt(1-s*Math.sin(f)*Math.sin(f)),l=Math.tan(f)*Math.tan(f),c=o*Math.cos(f)*Math.cos(f),u=Math.cos(f)*(g-_),d=n*((1-s/4-3*s*s/64-5*s*s*s/256)*f-(3*s/8+3*s*s/32+45*s*s*s/1024)*Math.sin(2*f)+(15*s*s/256+45*s*s*s/1024)*Math.sin(4*f)-35*s*s*s/3072*Math.sin(6*f));var y=r*h*(u+(1-l+c)*u*u*u/6+(5-18*l+l*l+72*c-58*o)*u*u*u*u*u/120)+5e5,p=r*(d+h*Math.tan(f)*(u*u/2+(5-l+9*c+4*c*c)*u*u*u*u/24+(61-58*l+l*l+600*c-330*o)*u*u*u*u*u*u/720));return t<0&&(p+=1e7),{northing:Math.round(p),easting:Math.round(y),zoneNumber:m,zoneLetter:vE(t)}}function fc(i){var t=i.northing,e=i.easting,n=i.zoneLetter,s=i.zoneNumber;if(s<0||s>60)return null;var r=.9996,a=6378137,o=.00669438,h,l=(1-Math.sqrt(1-o))/(1+Math.sqrt(1-o)),c,u,d,f,g,_,m,y,p,x=e-5e5,M=t;n<"N"&&(M-=1e7),m=(s-1)*6-180+3,h=o/(1-o),_=M/r,y=_/(a*(1-o/4-3*o*o/64-5*o*o*o/256)),p=y+(3*l/2-27*l*l*l/32)*Math.sin(2*y)+(21*l*l/16-55*l*l*l*l/32)*Math.sin(4*y)+151*l*l*l/96*Math.sin(6*y),c=a/Math.sqrt(1-o*Math.sin(p)*Math.sin(p)),u=Math.tan(p)*Math.tan(p),d=h*Math.cos(p)*Math.cos(p),f=a*(1-o)/Math.pow(1-o*Math.sin(p)*Math.sin(p),1.5),g=x/(c*r);var E=p-c*Math.tan(p)/f*(g*g/2-(5+3*u+10*d-4*d*d-9*h)*g*g*g*g/24+(61+90*u+298*d+45*u*u-252*h-3*d*d)*g*g*g*g*g*g/720);E=Yu(E);var w=(g-(1+2*u+d)*g*g*g/6+(5-2*d+28*u-3*d*d+8*h+24*u*u)*g*g*g*g*g/120)/Math.cos(p);w=m+Yu(w);var C;if(i.accuracy){var S=fc({northing:i.northing+i.accuracy,easting:i.easting+i.accuracy,zoneLetter:i.zoneLetter,zoneNumber:i.zoneNumber});C={top:S.lat,right:S.lon,bottom:E,left:w}}else C={lat:E,lon:w};return C}function vE(i){var t="Z";return 84>=i&&i>=72?t="X":72>i&&i>=64?t="W":64>i&&i>=56?t="V":56>i&&i>=48?t="U":48>i&&i>=40?t="T":40>i&&i>=32?t="S":32>i&&i>=24?t="R":24>i&&i>=16?t="Q":16>i&&i>=8?t="P":8>i&&i>=0?t="N":0>i&&i>=-8?t="M":-8>i&&i>=-16?t="L":-16>i&&i>=-24?t="K":-24>i&&i>=-32?t="J":-32>i&&i>=-40?t="H":-40>i&&i>=-48?t="G":-48>i&&i>=-56?t="F":-56>i&&i>=-64?t="E":-64>i&&i>=-72?t="D":-72>i&&i>=-80&&(t="C"),t}function xE(i,t){var e="00000"+i.easting,n="00000"+i.northing;return i.zoneNumber+i.zoneLetter+EE(i.easting,i.northing,i.zoneNumber)+e.substr(e.length-5,t)+n.substr(n.length-5,t)}function EE(i,t,e){var n=jg(e),s=Math.floor(i/1e5),r=Math.floor(t/1e5)%20;return ME(s,r,n)}function jg(i){var t=i%qu;return t===0&&(t=qu),t}function ME(i,t,e){var n=e-1,s=zg.charCodeAt(n),r=Wg.charCodeAt(n),a=s+i-1,o=r+t,h=!1;a>Mr&&(a=a-Mr+ls-1,h=!0),(a===oe||soe||(a>oe||sCe||(a>Ce||sMr&&(a=a-Mr+ls-1),o>Er?(o=o-Er+ls-1,h=!0):h=!1,(o===oe||roe||(o>oe||rCe||(o>Ce||rEr&&(o=o-Er+ls-1);var l=String.fromCharCode(a)+String.fromCharCode(o);return l}function Xg(i){if(i&&i.length===0)throw"MGRSPoint coverting from nothing";for(var t=i.length,e=null,n="",s,r=0;!/[A-Z]/.test(s=i.charAt(r));){if(r>=2)throw"MGRSPoint bad conversion from: "+i;n+=s,r++}var a=parseInt(n,10);if(r===0||r+3>t)throw"MGRSPoint bad conversion from: "+i;var o=i.charAt(r++);if(o<="A"||o==="B"||o==="Y"||o>="Z"||o==="I"||o==="O")throw"MGRSPoint zone letter "+o+" not handled: "+i;e=i.substring(r,r+=2);for(var h=jg(a),l=wE(e.charAt(0),h),c=SE(e.charAt(1),h);c0&&(_=1e5/Math.pow(10,d),m=i.substring(r,r+d),f=parseFloat(m)*_,y=i.substring(r+d),g=parseFloat(y)*_),p=f+l,x=g+c,{easting:p,northing:x,zoneLetter:o,zoneNumber:a,accuracy:_}}function wE(i,t){for(var e=zg.charCodeAt(t-1),n=1e5,s=!1;e!==i.charCodeAt(0);){if(e++,e===oe&&e++,e===Ce&&e++,e>Mr){if(s)throw"Bad character: "+i;e=ls,s=!0}n+=1e5}return n}function SE(i,t){if(i>"V")throw"MGRSPoint given invalid Northing "+i;for(var e=Wg.charCodeAt(t-1),n=0,s=!1;e!==i.charCodeAt(0);){if(e++,e===oe&&e++,e===Ce&&e++,e>Er){if(s)throw"Bad character: "+i;e=ls,s=!0}n+=1e5}return n}function CE(i){var t;switch(i){case"C":t=11e5;break;case"D":t=2e6;break;case"E":t=28e5;break;case"F":t=37e5;break;case"G":t=46e5;break;case"H":t=55e5;break;case"J":t=64e5;break;case"K":t=73e5;break;case"L":t=82e5;break;case"M":t=91e5;break;case"N":t=0;break;case"P":t=8e5;break;case"Q":t=17e5;break;case"R":t=26e5;break;case"S":t=35e5;break;case"T":t=44e5;break;case"U":t=53e5;break;case"V":t=62e5;break;case"W":t=7e6;break;case"X":t=79e5;break;default:t=-1}if(t>=0)return t;throw"Invalid zone letter: "+i}function Ks(i,t,e){if(!(this instanceof Ks))return new Ks(i,t,e);if(Array.isArray(i))this.x=i[0],this.y=i[1],this.z=i[2]||0;else if(typeof i=="object")this.x=i.x,this.y=i.y,this.z=i.z||0;else if(typeof i=="string"&&typeof t>"u"){var n=i.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=i,this.y=t,this.z=e||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Ks.fromMGRS=function(i){return new Ks(Ug(i))};Ks.prototype.toMGRS=function(i){return Bg([this.x,this.y],i)};var RE=1,bE=.25,Vu=.046875,Ku=.01953125,$u=.01068115234375,IE=.75,TE=.46875,AE=.013020833333333334,LE=.007120768229166667,PE=.3645833333333333,OE=.005696614583333333,DE=.3076171875;function gc(i){var t=[];t[0]=RE-i*(bE+i*(Vu+i*(Ku+i*$u))),t[1]=i*(IE-i*(Vu+i*(Ku+i*$u)));var e=i*i;return t[2]=e*(TE-i*(AE+i*LE)),e*=i,t[3]=e*(PE-i*OE),t[4]=e*i*DE,t}function nr(i,t,e,n){return e*=t,t*=t,n[0]*i-e*(n[1]+t*(n[2]+t*(n[3]+t*n[4])))}var NE=20;function _c(i,t,e){for(var n=1/(1-t),s=i,r=NE;r;--r){var a=Math.sin(s),o=1-t*a*a;if(o=(nr(s,a,Math.cos(s),e)-i)*(o*Math.sqrt(o))*n,s-=o,Math.abs(o)D?Math.tan(e):0,_=Math.pow(g,2),m=Math.pow(_,2);s=1-this.es*Math.pow(o,2),c=c/Math.sqrt(s);var y=nr(e,o,h,this.en);r=this.a*(this.k0*c*(1+u/6*(1-_+d+u/20*(5-18*_+m+14*d-58*_*d+u/42*(61+179*m-m*_-479*_)))))+this.x0,a=this.a*(this.k0*(y-this.ml0+o*n*c/2*(1+u/12*(5-_+9*d+4*f+u/30*(61+m-58*_+270*d-330*_*d+u/56*(1385+543*m-m*_-3111*_))))))+this.y0}else{var l=h*Math.sin(n);if(Math.abs(Math.abs(l)-1)=1){if(l-1>D)return 93;a=0}else a=Math.acos(a);e<0&&(a=-a),a=this.a*this.k0*(a-this.lat0)+this.y0}return i.x=r,i.y=a,i}function GE(i){var t,e,n,s,r=(i.x-this.x0)*(1/this.a),a=(i.y-this.y0)*(1/this.a);if(this.es)if(t=this.ml0+a/this.k0,e=_c(t,this.es,this.en),Math.abs(e)D?Math.tan(e):0,g=this.ep2*Math.pow(d,2),_=Math.pow(g,2),m=Math.pow(f,2),y=Math.pow(m,2);t=1-this.es*Math.pow(u,2);var p=r*Math.sqrt(t)/this.k0,x=Math.pow(p,2);t=t*f,n=e-t*x/(1-this.es)*.5*(1-x/12*(5+3*m-9*g*m+g-4*_-x/30*(61+90*m-252*g*m+45*y+46*g-x/56*(1385+3633*m+4095*y+1574*y*m)))),s=N(this.long0+p*(1-x/6*(1+2*m+g-x/20*(5+28*m+24*y+8*g*m+6*g-x/42*(61+662*m+1320*y+720*y*m))))/d)}else n=T*ka(a),s=0;else{var o=Math.exp(r/this.k0),h=.5*(o-1/o),l=this.lat0+a/this.k0,c=Math.cos(l);t=Math.sqrt((1-Math.pow(c,2))/(1+Math.pow(h,2))),n=Math.asin(t),a<0&&(n=-n),h===0&&c===0?s=0:s=N(Math.atan2(h,c)+this.long0)}return i.x=s,i.y=n,i}var zE=["Fast_Transverse_Mercator","Fast Transverse Mercator"];const co={init:FE,forward:kE,inverse:GE,names:zE};function qg(i){var t=Math.exp(i);return t=(t-1/t)/2,t}function ue(i,t){i=Math.abs(i),t=Math.abs(t);var e=Math.max(i,t),n=Math.min(i,t)/(e||1);return e*Math.sqrt(1+Math.pow(n,2))}function WE(i){var t=1+i,e=t-1;return e===0?i:i*Math.log(t)/e}function BE(i){var t=Math.abs(i);return t=WE(t*(1+t/(ue(1,t)+1))),i<0?-t:t}function mc(i,t){for(var e=2*Math.cos(2*t),n=i.length-1,s=i[n],r=0,a;--n>=0;)a=-r+e*s+i[n],r=s,s=a;return t+a*Math.sin(2*t)}function UE(i,t){for(var e=2*Math.cos(t),n=i.length-1,s=i[n],r=0,a;--n>=0;)a=-r+e*s+i[n],r=s,s=a;return Math.sin(t)*a}function jE(i){var t=Math.exp(i);return t=(t+1/t)/2,t}function Yg(i,t,e){for(var n=Math.sin(t),s=Math.cos(t),r=qg(e),a=jE(e),o=2*s*a,h=-2*n*r,l=i.length-1,c=i[l],u=0,d=0,f=0,g,_;--l>=0;)g=d,_=u,d=c,u=f,c=-g+o*d-h*u+i[l],f=-_+h*d+o*u;return o=n*a,h=s*r,[o*c-h*f,o*f+h*c]}function XE(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(co.init.apply(this),this.forward=co.forward,this.inverse=co.inverse),this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var i=this.es/(1+Math.sqrt(1-this.es)),t=i/(2-i),e=t;this.cgb[0]=t*(2+t*(-2/3+t*(-2+t*(116/45+t*(26/45+t*(-2854/675)))))),this.cbg[0]=t*(-2+t*(2/3+t*(4/3+t*(-82/45+t*(32/45+t*(4642/4725)))))),e=e*t,this.cgb[1]=e*(7/3+t*(-8/5+t*(-227/45+t*(2704/315+t*(2323/945))))),this.cbg[1]=e*(5/3+t*(-16/15+t*(-13/9+t*(904/315+t*(-1522/945))))),e=e*t,this.cgb[2]=e*(56/15+t*(-136/35+t*(-1262/105+t*(73814/2835)))),this.cbg[2]=e*(-26/15+t*(34/21+t*(8/5+t*(-12686/2835)))),e=e*t,this.cgb[3]=e*(4279/630+t*(-332/35+t*(-399572/14175))),this.cbg[3]=e*(1237/630+t*(-12/5+t*(-24832/14175))),e=e*t,this.cgb[4]=e*(4174/315+t*(-144838/6237)),this.cbg[4]=e*(-734/315+t*(109598/31185)),e=e*t,this.cgb[5]=e*(601676/22275),this.cbg[5]=e*(444337/155925),e=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+e*(1/4+e*(1/64+e/256))),this.utg[0]=t*(-.5+t*(2/3+t*(-37/96+t*(1/360+t*(81/512+t*(-96199/604800)))))),this.gtu[0]=t*(.5+t*(-2/3+t*(5/16+t*(41/180+t*(-127/288+t*(7891/37800)))))),this.utg[1]=e*(-1/48+t*(-1/15+t*(437/1440+t*(-46/105+t*(1118711/3870720))))),this.gtu[1]=e*(13/48+t*(-3/5+t*(557/1440+t*(281/630+t*(-1983433/1935360))))),e=e*t,this.utg[2]=e*(-17/480+t*(37/840+t*(209/4480+t*(-5569/90720)))),this.gtu[2]=e*(61/240+t*(-103/140+t*(15061/26880+t*(167603/181440)))),e=e*t,this.utg[3]=e*(-4397/161280+t*(11/504+t*(830251/7257600))),this.gtu[3]=e*(49561/161280+t*(-179/168+t*(6601661/7257600))),e=e*t,this.utg[4]=e*(-4583/161280+t*(108847/3991680)),this.gtu[4]=e*(34729/80640+t*(-3418889/1995840)),e=e*t,this.utg[5]=e*(-20648693/638668800),this.gtu[5]=e*(212378941/319334400);var n=mc(this.cbg,this.lat0);this.Zb=-this.Qn*(n+UE(this.gtu,2*n))}function qE(i){var t=N(i.x-this.long0),e=i.y;e=mc(this.cbg,e);var n=Math.sin(e),s=Math.cos(e),r=Math.sin(t),a=Math.cos(t);e=Math.atan2(n,a*s),t=Math.atan2(r*s,ue(n,s*a)),t=BE(Math.tan(t));var o=Yg(this.gtu,2*e,2*t);e=e+o[0],t=t+o[1];var h,l;return Math.abs(t)<=2.623395162778?(h=this.a*(this.Qn*t)+this.x0,l=this.a*(this.Qn*e+this.Zb)+this.y0):(h=1/0,l=1/0),i.x=h,i.y=l,i}function YE(i){var t=(i.x-this.x0)*(1/this.a),e=(i.y-this.y0)*(1/this.a);e=(e-this.Zb)/this.Qn,t=t/this.Qn;var n,s;if(Math.abs(t)<=2.623395162778){var r=Yg(this.utg,2*e,2*t);e=e+r[0],t=t+r[1],t=Math.atan(qg(t));var a=Math.sin(e),o=Math.cos(e),h=Math.sin(t),l=Math.cos(t);e=Math.atan2(a*l,ue(h,l*o)),t=Math.atan2(h,l*o),n=N(t+this.long0),s=mc(this.cgb,e)}else n=1/0,s=1/0;return i.x=n,i.y=s,i}var VE=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"];const uo={init:XE,forward:qE,inverse:YE,names:VE};function KE(i,t){if(i===void 0){if(i=Math.floor((N(t)+Math.PI)*30/Math.PI)+1,i<0)return 0;if(i>60)return 60}return i}var $E="etmerc";function ZE(){var i=KE(this.zone,this.long0);if(i===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(i)-183)*Bt,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,uo.init.apply(this),this.forward=uo.forward,this.inverse=uo.inverse}var HE=["Universal Transverse Mercator System","utm"];const JE={init:ZE,names:HE,dependsOn:$E};function yc(i,t){return Math.pow((1-i)/(1+i),t)}var QE=20;function tM(){var i=Math.sin(this.lat0),t=Math.cos(this.lat0);t*=t,this.rc=Math.sqrt(1-this.es)/(1-this.es*i*i),this.C=Math.sqrt(1+this.es*t*t/(1-this.es)),this.phic0=Math.asin(i/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+ut)/(Math.pow(Math.tan(.5*this.lat0+ut),this.C)*yc(this.e*i,this.ratexp))}function eM(i){var t=i.x,e=i.y;return i.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*e+ut),this.C)*yc(this.e*Math.sin(e),this.ratexp))-T,i.x=this.C*t,i}function iM(i){for(var t=1e-14,e=i.x/this.C,n=i.y,s=Math.pow(Math.tan(.5*n+ut)/this.K,1/this.C),r=QE;r>0&&(n=2*Math.atan(s*yc(this.e*Math.sin(i.y),-.5*this.e))-T,!(Math.abs(n-i.y)0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=D&&Math.abs(Math.cos(this.lat_ts))>D&&(this.k0=.5*this.cons*ii(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/ze(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=ii(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-T,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function uM(i){var t=i.x,e=i.y,n=Math.sin(e),s=Math.cos(e),r,a,o,h,l,c,u=N(t-this.long0);return Math.abs(Math.abs(t-this.long0)-Math.PI)<=D&&Math.abs(e+this.lat0)<=D?(i.x=NaN,i.y=NaN,i):this.sphere?(r=2*this.k0/(1+this.sinlat0*n+this.coslat0*s*Math.cos(u)),i.x=this.a*r*s*Math.sin(u)+this.x0,i.y=this.a*r*(this.coslat0*n-this.sinlat0*s*Math.cos(u))+this.y0,i):(a=2*Math.atan(this.ssfn_(e,n,this.e))-T,h=Math.cos(a),o=Math.sin(a),Math.abs(this.coslat0)<=D?(l=ze(this.e,e*this.con,this.con*n),c=2*this.a*this.k0*l/this.cons,i.x=this.x0+c*Math.sin(t-this.long0),i.y=this.y0-this.con*c*Math.cos(t-this.long0),i):(Math.abs(this.sinlat0)0?t=N(this.long0+Math.atan2(i.x,-1*i.y)):t=N(this.long0+Math.atan2(i.x,i.y)):t=N(this.long0+Math.atan2(i.x*Math.sin(o),a*this.coslat0*Math.cos(o)-i.y*this.sinlat0*Math.sin(o))),i.x=t,i.y=e,i)}else if(Math.abs(this.coslat0)<=D){if(a<=D)return e=this.lat0,t=this.long0,i.x=t,i.y=e,i;i.x*=this.con,i.y*=this.con,n=a*this.cons/(2*this.a*this.k0),e=this.con*Jr(this.e,n),t=this.con*N(this.con*this.long0+Math.atan2(i.x,-1*i.y))}else s=2*Math.atan(a*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,a<=D?r=this.X0:(r=Math.asin(Math.cos(s)*this.sinX0+i.y*Math.sin(s)*this.cosX0/a),t=N(this.long0+Math.atan2(i.x*Math.sin(s),a*this.cosX0*Math.cos(s)-i.y*this.sinX0*Math.sin(s)))),e=-1*Jr(this.e,Math.tan(.5*(T+r)));return i.x=t,i.y=e,i}var fM=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)","Polar_Stereographic"];const gM={init:cM,forward:uM,inverse:dM,names:fM,ssfn_:lM};function _M(){var i=this.lat0;this.lambda0=this.long0;var t=Math.sin(i),e=this.a,n=this.rf,s=1/n,r=2*s-Math.pow(s,2),a=this.e=Math.sqrt(r);this.R=this.k0*e*Math.sqrt(1-r)/(1-r*Math.pow(t,2)),this.alpha=Math.sqrt(1+r/(1-r)*Math.pow(Math.cos(i),4)),this.b0=Math.asin(t/this.alpha);var o=Math.log(Math.tan(Math.PI/4+this.b0/2)),h=Math.log(Math.tan(Math.PI/4+i/2)),l=Math.log((1+a*t)/(1-a*t));this.K=o-this.alpha*h+this.alpha*a/2*l}function mM(i){var t=Math.log(Math.tan(Math.PI/4-i.y/2)),e=this.e/2*Math.log((1+this.e*Math.sin(i.y))/(1-this.e*Math.sin(i.y))),n=-this.alpha*(t+e)+this.K,s=2*(Math.atan(Math.exp(n))-Math.PI/4),r=this.alpha*(i.x-this.lambda0),a=Math.atan(Math.sin(r)/(Math.sin(this.b0)*Math.tan(s)+Math.cos(this.b0)*Math.cos(r))),o=Math.asin(Math.cos(this.b0)*Math.sin(s)-Math.sin(this.b0)*Math.cos(s)*Math.cos(r));return i.y=this.R/2*Math.log((1+Math.sin(o))/(1-Math.sin(o)))+this.y0,i.x=this.R*a+this.x0,i}function yM(i){for(var t=i.x-this.x0,e=i.y-this.y0,n=t/this.R,s=2*(Math.atan(Math.exp(e/this.R))-Math.PI/4),r=Math.asin(Math.cos(this.b0)*Math.sin(s)+Math.sin(this.b0)*Math.cos(s)*Math.cos(n)),a=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(s))),o=this.lambda0+a/this.alpha,h=0,l=r,c=-1e3,u=0;Math.abs(l-c)>1e-7;){if(++u>20)return;h=1/this.alpha*(Math.log(Math.tan(Math.PI/4+r/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(l))/2)),c=l,l=2*Math.atan(Math.exp(h))-Math.PI/2}return i.x=o,i.y=l,i}var pM=["somerc"];const vM={init:_M,forward:mM,inverse:yM,names:pM};var is=1e-7;function xM(i){var t=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],e=typeof i.PROJECTION=="object"?Object.keys(i.PROJECTION)[0]:i.PROJECTION;return"no_uoff"in i||"no_off"in i||t.indexOf(e)!==-1}function EM(){var i,t,e,n,s,r,a,o,h,l,c=0,u,d=0,f=0,g=0,_=0,m=0,y=0;this.no_off=xM(this),this.no_rot="no_rot"in this;var p=!1;"alpha"in this&&(p=!0);var x=!1;if("rectified_grid_angle"in this&&(x=!0),p&&(y=this.alpha),x&&(c=this.rectified_grid_angle*Bt),p||x)d=this.longc;else if(f=this.long1,_=this.lat1,g=this.long2,m=this.lat2,Math.abs(_-m)<=is||(i=Math.abs(_))<=is||Math.abs(i-T)<=is||Math.abs(Math.abs(this.lat0)-T)<=is||Math.abs(Math.abs(m)-T)<=is)throw new Error;var M=1-this.es;t=Math.sqrt(M),Math.abs(this.lat0)>D?(o=Math.sin(this.lat0),e=Math.cos(this.lat0),i=1-this.es*o*o,this.B=e*e,this.B=Math.sqrt(1+this.es*this.B*this.B/M),this.A=this.B*this.k0*t/i,n=this.B*t/(e*Math.sqrt(i)),s=n*n-1,s<=0?s=0:(s=Math.sqrt(s),this.lat0<0&&(s=-s)),this.E=s+=n,this.E*=Math.pow(ze(this.e,this.lat0,o),this.B)):(this.B=1/t,this.A=this.k0,this.E=n=s=1),p||x?(p?(u=Math.asin(Math.sin(y)/n),x||(c=y)):(u=c,y=Math.asin(n*Math.sin(u))),this.lam0=d-Math.asin(.5*(s-1/s)*Math.tan(u))/this.B):(r=Math.pow(ze(this.e,_,Math.sin(_)),this.B),a=Math.pow(ze(this.e,m,Math.sin(m)),this.B),s=this.E/r,h=(a-r)/(a+r),l=this.E*this.E,l=(l-a*r)/(l+a*r),i=f-g,i<-Math.pi?g-=Zr:i>Math.pi&&(g+=Zr),this.lam0=N(.5*(f+g)-Math.atan(l*Math.tan(.5*this.B*(f-g))/h)/this.B),u=Math.atan(2*Math.sin(this.B*N(f-this.lam0))/(s-1/s)),c=y=Math.asin(n*Math.sin(u))),this.singam=Math.sin(u),this.cosgam=Math.cos(u),this.sinrot=Math.sin(c),this.cosrot=Math.cos(c),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.A*this.B,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(n*n-1)/Math.cos(y))),this.lat0<0&&(this.u_0=-this.u_0)),s=.5*u,this.v_pole_n=this.ArB*Math.log(Math.tan(ut-s)),this.v_pole_s=this.ArB*Math.log(Math.tan(ut+s))}function MM(i){var t={},e,n,s,r,a,o,h,l;if(i.x=i.x-this.lam0,Math.abs(Math.abs(i.y)-T)>D){if(a=this.E/Math.pow(ze(this.e,i.y,Math.sin(i.y)),this.B),o=1/a,e=.5*(a-o),n=.5*(a+o),r=Math.sin(this.B*i.x),s=(e*this.singam-r*this.cosgam)/n,Math.abs(Math.abs(s)-1)0?this.v_pole_n:this.v_pole_s,h=this.ArB*i.y;return this.no_rot?(t.x=h,t.y=l):(h-=this.u_0,t.x=l*this.cosrot+h*this.sinrot,t.y=h*this.cosrot-l*this.sinrot),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t}function wM(i){var t,e,n,s,r,a,o,h={};if(i.x=(i.x-this.x0)*(1/this.a),i.y=(i.y-this.y0)*(1/this.a),this.no_rot?(e=i.y,t=i.x):(e=i.x*this.cosrot-i.y*this.sinrot,t=i.y*this.cosrot+i.x*this.sinrot+this.u_0),n=Math.exp(-this.BrA*e),s=.5*(n-1/n),r=.5*(n+1/n),a=Math.sin(this.BrA*t),o=(a*this.cosgam+s*this.singam)/r,Math.abs(Math.abs(o)-1)D?this.ns=Math.log(n/o)/Math.log(s/h):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=n/(this.ns*Math.pow(s,this.ns)),this.rh=this.a*this.f0*Math.pow(l,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function bM(i){var t=i.x,e=i.y;Math.abs(2*Math.abs(e)-Math.PI)<=D&&(e=ka(e)*(T-2*D));var n=Math.abs(Math.abs(e)-T),s,r;if(n>D)s=ze(this.e,e,Math.sin(e)),r=this.a*this.f0*Math.pow(s,this.ns);else{if(n=e*this.ns,n<=0)return null;r=0}var a=this.ns*N(t-this.long0);return i.x=this.k0*(r*Math.sin(a))+this.x0,i.y=this.k0*(this.rh-r*Math.cos(a))+this.y0,i}function IM(i){var t,e,n,s,r,a=(i.x-this.x0)/this.k0,o=this.rh-(i.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(a*a+o*o),e=1):(t=-Math.sqrt(a*a+o*o),e=-1);var h=0;if(t!==0&&(h=Math.atan2(e*a,e*o)),t!==0||this.ns>0){if(e=1/this.ns,n=Math.pow(t/(this.a*this.f0),e),s=Jr(this.e,n),s===-9999)return null}else s=-T;return r=N(h/this.ns+this.long0),i.x=r,i.y=s,i}var TM=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"];const AM={init:RM,forward:bM,inverse:IM,names:TM};function LM(){this.a=6377397155e-3,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.7417649320975901-.308341501185665),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function PM(i){var t,e,n,s,r,a,o,h=i.x,l=i.y,c=N(h-this.long0);return t=Math.pow((1+this.e*Math.sin(l))/(1-this.e*Math.sin(l)),this.alfa*this.e/2),e=2*(Math.atan(this.k*Math.pow(Math.tan(l/2+this.s45),this.alfa)/t)-this.s45),n=-c*this.alfa,s=Math.asin(Math.cos(this.ad)*Math.sin(e)+Math.sin(this.ad)*Math.cos(e)*Math.cos(n)),r=Math.asin(Math.cos(e)*Math.sin(n)/Math.cos(s)),a=this.n*r,o=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(s/2+this.s45),this.n),i.y=o*Math.cos(a)/1,i.x=o*Math.sin(a)/1,this.czech||(i.y*=-1,i.x*=-1),i}function OM(i){var t,e,n,s,r,a,o,h,l=i.x;i.x=i.y,i.y=l,this.czech||(i.y*=-1,i.x*=-1),a=Math.sqrt(i.x*i.x+i.y*i.y),r=Math.atan2(i.y,i.x),s=r/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/a,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(s)),e=Math.asin(Math.cos(n)*Math.sin(s)/Math.cos(t)),i.x=this.long0-e/this.alfa,o=t,h=0;var c=0;do i.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(t/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(o))/(1-this.e*Math.sin(o)),this.e/2))-this.s45),Math.abs(o-i.y)<1e-10&&(h=1),o=i.y,c+=1;while(h===0&&c<15);return c>=15?null:i}var DM=["Krovak","krovak"];const NM={init:LM,forward:PM,inverse:OM,names:DM};function re(i,t,e,n,s){return i*s-t*Math.sin(2*s)+e*Math.sin(4*s)-n*Math.sin(6*s)}function Ga(i){return 1-.25*i*(1+i/16*(3+1.25*i))}function za(i){return .375*i*(1+.25*i*(1+.46875*i))}function Wa(i){return .05859375*i*i*(1+.75*i)}function Ba(i){return i*i*i*(35/3072)}function $s(i,t,e){var n=t*e;return i/Math.sqrt(1-n*n)}function cn(i){return Math.abs(i)1e-7?(e=i*t,(1-i*i)*(t/(1-e*e)-.5/i*Math.log((1-e)/(1+e)))):2*t}var BM=1,UM=2,jM=3,XM=4;function qM(){var i=Math.abs(this.lat0);if(Math.abs(i-T)0){var t;switch(this.qp=rn(this.e,1),this.mmf=.5/(1-this.es),this.apa=t2(this.es),this.mode){case this.N_POLE:this.dd=1;break;case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=rn(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd;break}}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function YM(i){var t,e,n,s,r,a,o,h,l,c,u=i.x,d=i.y;if(u=N(u-this.long0),this.sphere){if(r=Math.sin(d),c=Math.cos(d),n=Math.cos(u),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(e=this.mode===this.EQUIT?1+c*n:1+this.sinph0*r+this.cosph0*c*n,e<=D)return null;e=Math.sqrt(2/e),t=e*c*Math.sin(u),e*=this.mode===this.EQUIT?r:this.cosph0*r-this.sinph0*c*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(d+this.lat0)=0?(t=(l=Math.sqrt(a))*s,e=n*(this.mode===this.S_POLE?l:-l)):t=e=0;break}}return i.x=this.a*t+this.x0,i.y=this.a*e+this.y0,i}function VM(i){i.x-=this.x0,i.y-=this.y0;var t=i.x/this.a,e=i.y/this.a,n,s,r,a,o,h,l;if(this.sphere){var c=0,u,d=0;if(u=Math.sqrt(t*t+e*e),s=u*.5,s>1)return null;switch(s=2*Math.asin(s),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(d=Math.sin(s),c=Math.cos(s)),this.mode){case this.EQUIT:s=Math.abs(u)<=D?0:Math.asin(e*d/u),t*=d,e=c*u;break;case this.OBLIQ:s=Math.abs(u)<=D?this.lat0:Math.asin(c*this.sinph0+e*d*this.cosph0/u),t*=d*this.cosph0,e=(c-Math.sin(s)*this.sinph0)*u;break;case this.N_POLE:e=-e,s=T-s;break;case this.S_POLE:s-=T;break}n=e===0&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(t,e)}else{if(l=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(t/=this.dd,e*=this.dd,h=Math.sqrt(t*t+e*e),h1&&(i=i>1?1:-1),Math.asin(i)}function s2(){Math.abs(this.lat1+this.lat2)D?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function r2(i){var t=i.x,e=i.y;this.sin_phi=Math.sin(e),this.cos_phi=Math.cos(e);var n=rn(this.e3,this.sin_phi),s=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,r=this.ns0*N(t-this.long0),a=s*Math.sin(r)+this.x0,o=this.rh-s*Math.cos(r)+this.y0;return i.x=a,i.y=o,i}function a2(i){var t,e,n,s,r,a;return i.x-=this.x0,i.y=this.rh-i.y+this.y0,this.ns0>=0?(t=Math.sqrt(i.x*i.x+i.y*i.y),n=1):(t=-Math.sqrt(i.x*i.x+i.y*i.y),n=-1),s=0,t!==0&&(s=Math.atan2(n*i.x,n*i.y)),n=t*this.ns0/this.a,this.sphere?a=Math.asin((this.c-n*n)/(2*this.ns0)):(e=(this.c-n*n)/this.ns0,a=this.phi1z(this.e3,e)),r=N(s/this.ns0+this.long0),i.x=r,i.y=a,i}function o2(i,t){var e,n,s,r,a,o=hn(.5*t);if(i0||Math.abs(a)<=D?(o=this.x0+this.a*r*e*Math.sin(n)/a,h=this.y0+this.a*r*(this.cos_p14*t-this.sin_p14*e*s)/a):(o=this.x0+this.infinity_dist*e*Math.sin(n),h=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*e*s)),i.x=o,i.y=h,i}function d2(i){var t,e,n,s,r,a;return i.x=(i.x-this.x0)/this.a,i.y=(i.y-this.y0)/this.a,i.x/=this.k0,i.y/=this.k0,(t=Math.sqrt(i.x*i.x+i.y*i.y))?(s=Math.atan2(t,this.rc),e=Math.sin(s),n=Math.cos(s),a=hn(n*this.sin_p14+i.y*e*this.cos_p14/t),r=Math.atan2(i.x*e,t*this.cos_p14*n-i.y*this.sin_p14*e),r=N(this.long0+r)):(a=this.phic0,r=0),i.x=r,i.y=a,i}var f2=["gnom"];const g2={init:c2,forward:u2,inverse:d2,names:f2};function _2(i,t){var e=1-(1-i*i)/(2*i)*Math.log((1-i)/(1+i));if(Math.abs(Math.abs(t)-e)<1e-6)return t<0?-1*T:T;for(var n=Math.asin(.5*t),s,r,a,o,h=0;h<30;h++)if(r=Math.sin(n),a=Math.cos(n),o=i*r,s=Math.pow(1-o*o,2)/(2*a)*(t/(1-i*i)-r/(1-o*o)+.5/i*Math.log((1-o)/(1+o))),n+=s,Math.abs(s)<=1e-10)return n;return NaN}function m2(){this.sphere||(this.k0=ii(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function y2(i){var t=i.x,e=i.y,n,s,r=N(t-this.long0);if(this.sphere)n=this.x0+this.a*r*Math.cos(this.lat_ts),s=this.y0+this.a*Math.sin(e)/Math.cos(this.lat_ts);else{var a=rn(this.e,Math.sin(e));n=this.x0+this.a*this.k0*r,s=this.y0+this.a*a*.5/this.k0}return i.x=n,i.y=s,i}function p2(i){i.x-=this.x0,i.y-=this.y0;var t,e;return this.sphere?(t=N(this.long0+i.x/this.a/Math.cos(this.lat_ts)),e=Math.asin(i.y/this.a*Math.cos(this.lat_ts))):(e=_2(this.e,2*i.y*this.k0/this.a),t=N(this.long0+i.x/(this.a*this.k0))),i.x=t,i.y=e,i}var v2=["cea"];const x2={init:m2,forward:y2,inverse:p2,names:v2};function E2(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function M2(i){var t=i.x,e=i.y,n=N(t-this.long0),s=cn(e-this.lat0);return i.x=this.x0+this.a*n*this.rc,i.y=this.y0+this.a*s,i}function w2(i){var t=i.x,e=i.y;return i.x=N(this.long0+(t-this.x0)/(this.a*this.rc)),i.y=cn(this.lat0+(e-this.y0)/this.a),i}var S2=["Equirectangular","Equidistant_Cylindrical","eqc"];const C2={init:E2,forward:M2,inverse:w2,names:S2};var Zu=20;function R2(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Ga(this.es),this.e1=za(this.es),this.e2=Wa(this.es),this.e3=Ba(this.es),this.ml0=this.a*re(this.e0,this.e1,this.e2,this.e3,this.lat0)}function b2(i){var t=i.x,e=i.y,n,s,r,a=N(t-this.long0);if(r=a*Math.sin(e),this.sphere)Math.abs(e)<=D?(n=this.a*a,s=-1*this.a*this.lat0):(n=this.a*Math.sin(r)/Math.tan(e),s=this.a*(cn(e-this.lat0)+(1-Math.cos(r))/Math.tan(e)));else if(Math.abs(e)<=D)n=this.a*a,s=-1*this.ml0;else{var o=$s(this.a,this.e,Math.sin(e))/Math.tan(e);n=o*Math.sin(r),s=this.a*re(this.e0,this.e1,this.e2,this.e3,e)-this.ml0+o*(1-Math.cos(r))}return i.x=n+this.x0,i.y=s+this.y0,i}function I2(i){var t,e,n,s,r,a,o,h,l;if(n=i.x-this.x0,s=i.y-this.y0,this.sphere)if(Math.abs(s+this.a*this.lat0)<=D)t=N(n/this.a+this.long0),e=0;else{a=this.lat0+s/this.a,o=n*n/this.a/this.a+a*a,h=a;var c;for(r=Zu;r;--r)if(c=Math.tan(h),l=-1*(a*(h*c+1)-h-.5*(h*h+o)*c)/((h-a)/c-1),h+=l,Math.abs(l)<=D){e=h;break}t=N(this.long0+Math.asin(n*Math.tan(h)/this.a)/Math.sin(e))}else if(Math.abs(s+this.ml0)<=D)e=0,t=N(this.long0+n/this.a);else{a=(this.ml0+s)/this.a,o=n*n/this.a/this.a+a*a,h=a;var u,d,f,g,_;for(r=Zu;r;--r)if(_=this.e*Math.sin(h),u=Math.sqrt(1-_*_)*Math.tan(h),d=this.a*re(this.e0,this.e1,this.e2,this.e3,h),f=this.e0-2*this.e1*Math.cos(2*h)+4*this.e2*Math.cos(4*h)-6*this.e3*Math.cos(6*h),g=d/this.a,l=(a*(u*g+1)-g-.5*u*(g*g+o))/(this.es*Math.sin(2*h)*(g*g+o-2*a*g)/(4*u)+(a-g)*(u*f-2/Math.sin(2*h))-f),h-=l,Math.abs(l)<=D){e=h;break}u=Math.sqrt(1-this.es*Math.pow(Math.sin(e),2))*Math.tan(e),t=N(this.long0+Math.asin(n*u/this.a)/Math.sin(e))}return i.x=t,i.y=e,i}var T2=["Polyconic","poly"];const A2={init:R2,forward:b2,inverse:I2,names:T2};function L2(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function P2(i){var t,e=i.x,n=i.y,s=n-this.lat0,r=e-this.long0,a=s/Ir*1e-5,o=r,h=1,l=0;for(t=1;t<=10;t++)h=h*a,l=l+this.A[t]*h;var c=l,u=o,d=1,f=0,g,_,m=0,y=0;for(t=1;t<=6;t++)g=d*c-f*u,_=f*c+d*u,d=g,f=_,m=m+this.B_re[t]*d-this.B_im[t]*f,y=y+this.B_im[t]*d+this.B_re[t]*f;return i.x=y*this.a+this.x0,i.y=m*this.a+this.y0,i}function O2(i){var t,e=i.x,n=i.y,s=e-this.x0,r=n-this.y0,a=r/this.a,o=s/this.a,h=1,l=0,c,u,d=0,f=0;for(t=1;t<=6;t++)c=h*a-l*o,u=l*a+h*o,h=c,l=u,d=d+this.C_re[t]*h-this.C_im[t]*l,f=f+this.C_im[t]*h+this.C_re[t]*l;for(var g=0;g.999999999999&&(e=.999999999999),t=Math.asin(e);var n=N(this.long0+i.x/(.900316316158*this.a*Math.cos(t)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),e=(2*t+Math.sin(2*t))/Math.PI,Math.abs(e)>1&&(e=1);var s=Math.asin(e);return i.x=n,i.y=s,i}var Z2=["Mollweide","moll"];const H2={init:V2,forward:K2,inverse:$2,names:Z2};function J2(){Math.abs(this.lat1+this.lat2)=0?(e=Math.sqrt(i.x*i.x+i.y*i.y),t=1):(e=-Math.sqrt(i.x*i.x+i.y*i.y),t=-1);var r=0;if(e!==0&&(r=Math.atan2(t*i.x,t*i.y)),this.sphere)return s=N(this.long0+r/this.ns),n=cn(this.g-e/this.a),i.x=s,i.y=n,i;var a=this.g-e/this.a;return n=Oo(a,this.e0,this.e1,this.e2,this.e3),s=N(this.long0+r/this.ns),i.x=s,i.y=n,i}var ew=["Equidistant_Conic","eqdc"];const iw={init:J2,forward:Q2,inverse:tw,names:ew};function nw(){this.R=this.a}function sw(i){var t=i.x,e=i.y,n=N(t-this.long0),s,r;Math.abs(e)<=D&&(s=this.x0+this.R*n,r=this.y0);var a=hn(2*Math.abs(e/Math.PI));(Math.abs(n)<=D||Math.abs(Math.abs(e)-T)<=D)&&(s=this.x0,e>=0?r=this.y0+Math.PI*this.R*Math.tan(.5*a):r=this.y0+Math.PI*this.R*-Math.tan(.5*a));var o=.5*Math.abs(Math.PI/n-n/Math.PI),h=o*o,l=Math.sin(a),c=Math.cos(a),u=c/(l+c-1),d=u*u,f=u*(2/l-1),g=f*f,_=Math.PI*this.R*(o*(u-g)+Math.sqrt(h*(u-g)*(u-g)-(g+h)*(d-g)))/(g+h);n<0&&(_=-_),s=this.x0+_;var m=h+u;return _=Math.PI*this.R*(f*m-o*Math.sqrt((g+h)*(h+1)-m*m))/(g+h),e>=0?r=this.y0+_:r=this.y0-_,i.x=s,i.y=r,i}function rw(i){var t,e,n,s,r,a,o,h,l,c,u,d,f;return i.x-=this.x0,i.y-=this.y0,u=Math.PI*this.R,n=i.x/u,s=i.y/u,r=n*n+s*s,a=-Math.abs(s)*(1+r),o=a-2*s*s+n*n,h=-2*a+1+2*s*s+r*r,f=s*s/h+(2*o*o*o/h/h/h-9*a*o/h/h)/27,l=(a-o*o/3/h)/h,c=2*Math.sqrt(-l/3),u=3*f/l/c,Math.abs(u)>1&&(u>=0?u=1:u=-1),d=Math.acos(u)/3,i.y>=0?e=(-c*Math.cos(d+Math.PI/3)-o/3/h)*Math.PI:e=-(-c*Math.cos(d+Math.PI/3)-o/3/h)*Math.PI,Math.abs(n)2*T*this.a?void 0:(e=t/this.a,n=Math.sin(e),s=Math.cos(e),r=this.long0,Math.abs(t)<=D?a=this.lat0:(a=hn(s*this.sin_p12+i.y*n*this.cos_p12/t),o=Math.abs(this.lat0)-T,Math.abs(o)<=D?this.lat0>=0?r=N(this.long0+Math.atan2(i.x,-i.y)):r=N(this.long0-Math.atan2(-i.x,i.y)):r=N(this.long0+Math.atan2(i.x*n,t*this.cos_p12*s-i.y*this.sin_p12*n))),i.x=r,i.y=a,i)):(h=Ga(this.es),l=za(this.es),c=Wa(this.es),u=Ba(this.es),Math.abs(this.sin_p12-1)<=D?(d=this.a*re(h,l,c,u,T),t=Math.sqrt(i.x*i.x+i.y*i.y),f=d-t,a=Oo(f/this.a,h,l,c,u),r=N(this.long0+Math.atan2(i.x,-1*i.y)),i.x=r,i.y=a,i):Math.abs(this.sin_p12+1)<=D?(d=this.a*re(h,l,c,u,T),t=Math.sqrt(i.x*i.x+i.y*i.y),f=t-d,a=Oo(f/this.a,h,l,c,u),r=N(this.long0+Math.atan2(i.x,i.y)),i.x=r,i.y=a,i):(t=Math.sqrt(i.x*i.x+i.y*i.y),m=Math.atan2(i.x,i.y),g=$s(this.a,this.e,this.sin_p12),y=Math.cos(m),p=this.e*this.cos_p12*y,x=-p*p/(1-this.es),M=3*this.es*(1-x)*this.sin_p12*this.cos_p12*y/(1-this.es),E=t/g,w=E-x*(1+x)*Math.pow(E,3)/6-M*(1+3*x)*Math.pow(E,4)/24,C=1-x*w*w/2-E*w*w*w/6,_=Math.asin(this.sin_p12*Math.cos(w)+this.cos_p12*Math.sin(w)*y),r=N(this.long0+Math.asin(Math.sin(m)*Math.sin(w)/Math.cos(_))),S=Math.sin(_),a=Math.atan2((S-this.es*C*this.sin_p12)*Math.tan(_),S*(1-this.es)),i.x=r,i.y=a,i))}var uw=["Azimuthal_Equidistant","aeqd"];const dw={init:hw,forward:lw,inverse:cw,names:uw};function fw(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function gw(i){var t,e,n,s,r,a,o,h,l=i.x,c=i.y;return n=N(l-this.long0),t=Math.sin(c),e=Math.cos(c),s=Math.cos(n),a=this.sin_p14*t+this.cos_p14*e*s,r=1,(a>0||Math.abs(a)<=D)&&(o=this.a*r*e*Math.sin(n),h=this.y0+this.a*r*(this.cos_p14*t-this.sin_p14*e*s)),i.x=o,i.y=h,i}function _w(i){var t,e,n,s,r,a,o;return i.x-=this.x0,i.y-=this.y0,t=Math.sqrt(i.x*i.x+i.y*i.y),e=hn(t/this.a),n=Math.sin(e),s=Math.cos(e),a=this.long0,Math.abs(t)<=D?(o=this.lat0,i.x=a,i.y=o,i):(o=hn(s*this.sin_p14+i.y*n*this.cos_p14/t),r=Math.abs(this.lat0)-T,Math.abs(r)<=D?(this.lat0>=0?a=N(this.long0+Math.atan2(i.x,-i.y)):a=N(this.long0-Math.atan2(-i.x,i.y)),i.x=a,i.y=o,i):(a=N(this.long0+Math.atan2(i.x*n,t*this.cos_p14*s-i.y*this.sin_p14*n)),i.x=a,i.y=o,i))}var mw=["ortho"];const yw={init:fw,forward:gw,inverse:_w,names:mw};var Ct={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},dt={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function pw(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=T-ut/2?this.face=Ct.TOP:this.lat0<=-(T-ut/2)?this.face=Ct.BOTTOM:Math.abs(this.long0)<=ut?this.face=Ct.FRONT:Math.abs(this.long0)<=T+ut?this.face=this.long0>0?Ct.RIGHT:Ct.LEFT:this.face=Ct.BACK,this.es!==0&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function vw(i){var t={x:0,y:0},e,n,s,r,a,o,h={value:0};if(i.x-=this.long0,this.es!==0?e=Math.atan(this.one_minus_f_squared*Math.tan(i.y)):e=i.y,n=i.x,this.face===Ct.TOP)r=T-e,n>=ut&&n<=T+ut?(h.value=dt.AREA_0,s=n-T):n>T+ut||n<=-(T+ut)?(h.value=dt.AREA_1,s=n>0?n-At:n+At):n>-(T+ut)&&n<=-ut?(h.value=dt.AREA_2,s=n+T):(h.value=dt.AREA_3,s=n);else if(this.face===Ct.BOTTOM)r=T+e,n>=ut&&n<=T+ut?(h.value=dt.AREA_0,s=-n+T):n=-ut?(h.value=dt.AREA_1,s=-n):n<-ut&&n>=-(T+ut)?(h.value=dt.AREA_2,s=-n-T):(h.value=dt.AREA_3,s=n>0?-n+At:-n-At);else{var l,c,u,d,f,g,_;this.face===Ct.RIGHT?n=ys(n,+T):this.face===Ct.BACK?n=ys(n,+At):this.face===Ct.LEFT&&(n=ys(n,-T)),d=Math.sin(e),f=Math.cos(e),g=Math.sin(n),_=Math.cos(n),l=f*_,c=f*g,u=d,this.face===Ct.FRONT?(r=Math.acos(l),s=no(r,u,c,h)):this.face===Ct.RIGHT?(r=Math.acos(c),s=no(r,u,-l,h)):this.face===Ct.BACK?(r=Math.acos(-l),s=no(r,u,-c,h)):this.face===Ct.LEFT?(r=Math.acos(-c),s=no(r,u,l,h)):(r=s=0,h.value=dt.AREA_0)}return o=Math.atan(12/At*(s+Math.acos(Math.sin(s)*Math.cos(ut))-T)),a=Math.sqrt((1-Math.cos(r))/(Math.cos(o)*Math.cos(o))/(1-Math.cos(Math.atan(1/Math.cos(s))))),h.value===dt.AREA_1?o+=T:h.value===dt.AREA_2?o+=At:h.value===dt.AREA_3&&(o+=1.5*At),t.x=a*Math.cos(o),t.y=a*Math.sin(o),t.x=t.x*this.a+this.x0,t.y=t.y*this.a+this.y0,i.x=t.x,i.y=t.y,i}function xw(i){var t={lam:0,phi:0},e,n,s,r,a,o,h,l,c,u={value:0};if(i.x=(i.x-this.x0)/this.a,i.y=(i.y-this.y0)/this.a,n=Math.atan(Math.sqrt(i.x*i.x+i.y*i.y)),e=Math.atan2(i.y,i.x),i.x>=0&&i.x>=Math.abs(i.y)?u.value=dt.AREA_0:i.y>=0&&i.y>=Math.abs(i.x)?(u.value=dt.AREA_1,e-=T):i.x<0&&-i.x>=Math.abs(i.y)?(u.value=dt.AREA_2,e=e<0?e+At:e-At):(u.value=dt.AREA_3,e+=T),c=At/12*Math.tan(e),a=Math.sin(c)/(Math.cos(c)-1/Math.sqrt(2)),o=Math.atan(a),s=Math.cos(e),r=Math.tan(n),h=1-s*s*r*r*(1-Math.cos(Math.atan(1/Math.cos(o)))),h<-1?h=-1:h>1&&(h=1),this.face===Ct.TOP)l=Math.acos(h),t.phi=T-l,u.value===dt.AREA_0?t.lam=o+T:u.value===dt.AREA_1?t.lam=o<0?o+At:o-At:u.value===dt.AREA_2?t.lam=o-T:t.lam=o;else if(this.face===Ct.BOTTOM)l=Math.acos(h),t.phi=l-T,u.value===dt.AREA_0?t.lam=-o+T:u.value===dt.AREA_1?t.lam=-o:u.value===dt.AREA_2?t.lam=-o-T:t.lam=o<0?-o-At:-o+At;else{var d,f,g;d=h,c=d*d,c>=1?g=0:g=Math.sqrt(1-c)*Math.sin(o),c+=g*g,c>=1?f=0:f=Math.sqrt(1-c),u.value===dt.AREA_1?(c=f,f=-g,g=c):u.value===dt.AREA_2?(f=-f,g=-g):u.value===dt.AREA_3&&(c=f,f=g,g=-c),this.face===Ct.RIGHT?(c=d,d=-f,f=c):this.face===Ct.BACK?(d=-d,f=-f):this.face===Ct.LEFT&&(c=d,d=f,f=-c),t.phi=Math.acos(-g)-T,t.lam=Math.atan2(f,d),this.face===Ct.RIGHT?t.lam=ys(t.lam,-T):this.face===Ct.BACK?t.lam=ys(t.lam,-At):this.face===Ct.LEFT&&(t.lam=ys(t.lam,+T))}if(this.es!==0){var _,m,y;_=t.phi<0?1:0,m=Math.tan(t.phi),y=this.b/Math.sqrt(m*m+this.one_minus_f_squared),t.phi=Math.atan(Math.sqrt(this.a*this.a-y*y)/(this.one_minus_f*y)),_&&(t.phi=-t.phi)}return t.lam+=this.long0,i.x=t.lam,i.y=t.phi,i}function no(i,t,e,n){var s;return iut&&s<=T+ut?(n.value=dt.AREA_1,s-=T):s>T+ut||s<=-(T+ut)?(n.value=dt.AREA_2,s=s>=0?s-At:s+At):(n.value=dt.AREA_3,s+=T)),s}function ys(i,t){var e=i+t;return e<-At?e+=Zr:e>+At&&(e-=Zr),e}var Ew=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"];const Mw={init:pw,forward:vw,inverse:xw,names:Ew};var ul=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-986701e-12],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,18736e-12],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,934959e-12],[.7986,-.00755338,-500009e-10,935324e-12],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],wr=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-126793e-14,422642e-15],[.124,.0124,507171e-14,-160604e-14],[.186,.0123999,-190189e-13,600152e-14],[.248,.0124002,710039e-13,-224e-10],[.31,.0123992,-264997e-12,835986e-13],[.372,.0124029,988983e-12,-311994e-12],[.434,.0123893,-369093e-11,-435621e-12],[.4958,.0123198,-102252e-10,-345523e-12],[.5571,.0121916,-154081e-10,-582288e-12],[.6176,.0119938,-241424e-10,-525327e-12],[.6769,.011713,-320223e-10,-516405e-12],[.7346,.0113541,-397684e-10,-609052e-12],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-140374e-14],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Vg=.8487,Kg=1.3523,$g=He/5,ww=1/$g,cs=18,Do=function(i,t){return i[0]+t*(i[1]+t*(i[2]+t*i[3]))},Sw=function(i,t){return i[1]+t*(2*i[2]+t*3*i[3])};function Cw(i,t,e,n){for(var s=t;n;--n){var r=i(s);if(s-=r,Math.abs(r)=cs&&(n=cs-1),e=He*(e-ww*n);var s={x:Do(ul[n],e)*t,y:Do(wr[n],e)};return i.y<0&&(s.y=-s.y),s.x=s.x*this.a*Vg+this.x0,s.y=s.y*this.a*Kg+this.y0,s}function Iw(i){var t={x:(i.x-this.x0)/(this.a*Vg),y:Math.abs(i.y-this.y0)/(this.a*Kg)};if(t.y>=1)t.x/=ul[cs][0],t.y=i.y<0?-T:T;else{var e=Math.floor(t.y*cs);for(e<0?e=0:e>=cs&&(e=cs-1);;)if(wr[e][0]>t.y)--e;else if(wr[e+1][0]<=t.y)++e;else break;var n=wr[e],s=5*(t.y-n[0])/(wr[e+1][0]-n[0]);s=Cw(function(r){return(Do(n,r)-t.y)/Sw(n,r)},s,D,100),t.x/=Do(ul[e],s),t.y=(5*e+s)*Bt,i.y<0&&(t.y=-t.y)}return t.x=N(t.x+this.long0),t}var Tw=["Robinson","robin"];const Aw={init:Rw,forward:bw,inverse:Iw,names:Tw};function Lw(){this.name="geocent"}function Pw(i){var t=Fg(i,this.es,this.a);return t}function Ow(i){var t=kg(i,this.es,this.a,this.b);return t}var Dw=["Geocentric","geocentric","geocent","Geocent"];const Nw={init:Lw,forward:Pw,inverse:Ow,names:Dw};var $t={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},yr={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};function Fw(){if(Object.keys(yr).forEach((function(e){if(typeof this[e]>"u")this[e]=yr[e].def;else{if(yr[e].num&&isNaN(this[e]))throw new Error("Invalid parameter value, must be numeric "+e+" = "+this[e]);yr[e].num&&(this[e]=parseFloat(this[e]))}yr[e].degrees&&(this[e]=this[e]*Bt)}).bind(this)),Math.abs(Math.abs(this.lat0)-T)1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var i=this.tilt,t=this.azi;this.cg=Math.cos(t),this.sg=Math.sin(t),this.cw=Math.cos(i),this.sw=Math.sin(i)}function kw(i){i.x-=this.long0;var t=Math.sin(i.y),e=Math.cos(i.y),n=Math.cos(i.x),s,r;switch(this.mode){case $t.OBLIQ:r=this.sinph0*t+this.cosph0*e*n;break;case $t.EQUIT:r=e*n;break;case $t.S_POLE:r=-t;break;case $t.N_POLE:r=t;break}switch(r=this.pn1/(this.p-r),s=r*e*Math.sin(i.x),this.mode){case $t.OBLIQ:r*=this.cosph0*t-this.sinph0*e*n;break;case $t.EQUIT:r*=t;break;case $t.N_POLE:r*=-(e*n);break;case $t.S_POLE:r*=e*n;break}var a,o;return a=r*this.cg+s*this.sg,o=1/(a*this.sw*this.h1+this.cw),s=(s*this.cg-r*this.sg)*this.cw*o,r=a*o,i.x=s*this.a,i.y=r*this.a,i}function Gw(i){i.x/=this.a,i.y/=this.a;var t={x:i.x,y:i.y},e,n,s;s=1/(this.pn1-i.y*this.sw),e=this.pn1*i.x*s,n=this.pn1*i.y*this.cw*s,i.x=e*this.cg+n*this.sg,i.y=n*this.cg-e*this.sg;var r=ue(i.x,i.y);if(Math.abs(r)1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,this.es!==0){var i=1-this.es,t=1/i;this.radius_p=Math.sqrt(i),this.radius_p2=i,this.radius_p_inv2=t,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")}function Uw(i){var t=i.x,e=i.y,n,s,r,a;if(t=t-this.long0,this.shape==="ellipse"){e=Math.atan(this.radius_p2*Math.tan(e));var o=this.radius_p/ue(this.radius_p*Math.cos(e),Math.sin(e));if(s=o*Math.cos(t)*Math.cos(e),r=o*Math.sin(t)*Math.cos(e),a=o*Math.sin(e),(this.radius_g-s)*s-r*r-a*a*this.radius_p_inv2<0)return i.x=Number.NaN,i.y=Number.NaN,i;n=this.radius_g-s,this.flip_axis?(i.x=this.radius_g_1*Math.atan(r/ue(a,n)),i.y=this.radius_g_1*Math.atan(a/n)):(i.x=this.radius_g_1*Math.atan(r/n),i.y=this.radius_g_1*Math.atan(a/ue(r,n)))}else this.shape==="sphere"&&(n=Math.cos(e),s=Math.cos(t)*n,r=Math.sin(t)*n,a=Math.sin(e),n=this.radius_g-s,this.flip_axis?(i.x=this.radius_g_1*Math.atan(r/ue(a,n)),i.y=this.radius_g_1*Math.atan(a/n)):(i.x=this.radius_g_1*Math.atan(r/n),i.y=this.radius_g_1*Math.atan(a/ue(r,n))));return i.x=i.x*this.a,i.y=i.y*this.a,i}function jw(i){var t=-1,e=0,n=0,s,r,a,o;if(i.x=i.x/this.a,i.y=i.y/this.a,this.shape==="ellipse"){this.flip_axis?(n=Math.tan(i.y/this.radius_g_1),e=Math.tan(i.x/this.radius_g_1)*ue(1,n)):(e=Math.tan(i.x/this.radius_g_1),n=Math.tan(i.y/this.radius_g_1)*ue(1,e));var h=n/this.radius_p;if(s=e*e+h*h+t*t,r=2*this.radius_g*t,a=r*r-4*s*this.C,a<0)return i.x=Number.NaN,i.y=Number.NaN,i;o=(-r-Math.sqrt(a))/(2*s),t=this.radius_g+o*t,e*=o,n*=o,i.x=Math.atan2(e,t),i.y=Math.atan(n*Math.cos(i.x)/t),i.y=Math.atan(this.radius_p_inv2*Math.tan(i.y))}else if(this.shape==="sphere"){if(this.flip_axis?(n=Math.tan(i.y/this.radius_g_1),e=Math.tan(i.x/this.radius_g_1)*Math.sqrt(1+n*n)):(e=Math.tan(i.x/this.radius_g_1),n=Math.tan(i.y/this.radius_g_1)*Math.sqrt(1+e*e)),s=e*e+n*n+t*t,r=2*this.radius_g*t,a=r*r-4*s*this.C,a<0)return i.x=Number.NaN,i.y=Number.NaN,i;o=(-r-Math.sqrt(a))/(2*s),t=this.radius_g+o*t,e*=o,n*=o,i.x=Math.atan2(e,t),i.y=Math.atan(n*Math.cos(i.x)/t)}return i.x=i.x+this.long0,i}var Xw=["Geostationary Satellite View","Geostationary_Satellite","geos"];const qw={init:Bw,forward:Uw,inverse:jw,names:Xw};var Tr=1.340264,Ar=-.081106,Lr=893e-6,Pr=.003796,No=Math.sqrt(3)/2;function Yw(){this.es=0,this.long0=this.long0!==void 0?this.long0:0}function Vw(i){var t=N(i.x-this.long0),e=i.y,n=Math.asin(No*Math.sin(e)),s=n*n,r=s*s*s;return i.x=t*Math.cos(n)/(No*(Tr+3*Ar*s+r*(7*Lr+9*Pr*s))),i.y=n*(Tr+Ar*s+r*(Lr+Pr*s)),i.x=this.a*i.x+this.x0,i.y=this.a*i.y+this.y0,i}function Kw(i){i.x=(i.x-this.x0)/this.a,i.y=(i.y-this.y0)/this.a;var t=1e-9,e=12,n=i.y,s,r,a,o,h,l;for(l=0;l=T?this.cphi1=0:this.cphi1=1/Math.tan(this.phi1),this.inverse=eS,this.forward=tS)}function Jw(i){var t=N(i.x-(this.long0||0)),e=i.y,n,s,r;return n=this.am1+this.m1-nr(e,s=Math.sin(e),r=Math.cos(e),this.en),s=r*t/(n*Math.sqrt(1-this.es*s*s)),i.x=n*Math.sin(s),i.y=this.am1-n*Math.cos(s),i.x=this.a*i.x+(this.x0||0),i.y=this.a*i.y+(this.y0||0),i}function Qw(i){i.x=(i.x-(this.x0||0))/this.a,i.y=(i.y-(this.y0||0))/this.a;var t,e,n,s;if(e=ue(i.x,i.y=this.am1-i.y),s=_c(this.am1+this.m1-e,this.es,this.en),(t=Math.abs(s))Qr?(i.x=s*Math.sin(n=t*Math.cos(e)/s),i.y=this.cphi1-s*Math.cos(n)):i.x=i.y=0,i.x=this.a*i.x+(this.x0||0),i.y=this.a*i.y+(this.y0||0),i}function eS(i){i.x=(i.x-(this.x0||0))/this.a,i.y=(i.y-(this.y0||0))/this.a;var t,e,n=ue(i.x,i.y=this.cphi1-i.y);if(e=this.cphi1+this.phi1-n,Math.abs(e)>T)throw new Error;return Math.abs(Math.abs(e)-T)<=Qr?t=0:t=n*Math.atan2(i.x,i.y)/Math.cos(e),i.x=N(t+(this.long0||0)),i.y=cn(e),i}var iS=["bonne","Bonne (Werner lat_1=90)"];const nS={init:Hw,names:iS};function sS(i){i.Proj.projections.add(co),i.Proj.projections.add(uo),i.Proj.projections.add(JE),i.Proj.projections.add(hM),i.Proj.projections.add(gM),i.Proj.projections.add(vM),i.Proj.projections.add(CM),i.Proj.projections.add(AM),i.Proj.projections.add(NM),i.Proj.projections.add(WM),i.Proj.projections.add(n2),i.Proj.projections.add(l2),i.Proj.projections.add(g2),i.Proj.projections.add(x2),i.Proj.projections.add(C2),i.Proj.projections.add(A2),i.Proj.projections.add(N2),i.Proj.projections.add(W2),i.Proj.projections.add(Y2),i.Proj.projections.add(H2),i.Proj.projections.add(iw),i.Proj.projections.add(ow),i.Proj.projections.add(dw),i.Proj.projections.add(yw),i.Proj.projections.add(Mw),i.Proj.projections.add(Aw),i.Proj.projections.add(Nw),i.Proj.projections.add(Ww),i.Proj.projections.add(qw),i.Proj.projections.add(Zw),i.Proj.projections.add(nS)}fe.defaultDatum="WGS84";fe.Proj=ti;fe.WGS84=new fe.Proj("WGS84");fe.Point=Ks;fe.toPoint=Gg;fe.defs=ee;fe.nadgrid=tE;fe.transform=Po;fe.mgrs=mE;fe.version="__VERSION__";sS(fe);function rS(i){for(const[t,e]of Object.entries(i))fe.defs(t,e);gx(fe)}const aS=1,Fo=_t.createContext(aS);Fo.displayName="LevelContext";function kC(i){const{title:t,sectionHeadingProps:e,children:n}=i,s=_t.useContext(Fo),r=typeof t=="string"?se.jsx(oS,{...e,children:t}):t;return se.jsxs(se.Fragment,{children:[r,se.jsx(Fo.Provider,{value:s+1,children:n})]})}const oS=_t.forwardRef(function(t,e){const{children:n,...s}=t,r=hS(),a=lS(r);return se.jsx(rd,{as:a,ref:e,...s,children:n})});function hS(){const i=_t.useContext(Fo);return Math.min(i,6)}function lS(i){return`h${i}`}var Zg={exports:{}};/*! +northing meters`+i;var d=u/2,f=0,g=0,_,m,y,p,x;return d>0&&(_=1e5/Math.pow(10,d),m=i.substring(r,r+d),f=parseFloat(m)*_,y=i.substring(r+d),g=parseFloat(y)*_),p=f+l,x=g+c,{easting:p,northing:x,zoneLetter:o,zoneNumber:a,accuracy:_}}function wE(i,t){for(var e=zg.charCodeAt(t-1),n=1e5,s=!1;e!==i.charCodeAt(0);){if(e++,e===oe&&e++,e===Ce&&e++,e>Mr){if(s)throw"Bad character: "+i;e=ls,s=!0}n+=1e5}return n}function SE(i,t){if(i>"V")throw"MGRSPoint given invalid Northing "+i;for(var e=Wg.charCodeAt(t-1),n=0,s=!1;e!==i.charCodeAt(0);){if(e++,e===oe&&e++,e===Ce&&e++,e>Er){if(s)throw"Bad character: "+i;e=ls,s=!0}n+=1e5}return n}function CE(i){var t;switch(i){case"C":t=11e5;break;case"D":t=2e6;break;case"E":t=28e5;break;case"F":t=37e5;break;case"G":t=46e5;break;case"H":t=55e5;break;case"J":t=64e5;break;case"K":t=73e5;break;case"L":t=82e5;break;case"M":t=91e5;break;case"N":t=0;break;case"P":t=8e5;break;case"Q":t=17e5;break;case"R":t=26e5;break;case"S":t=35e5;break;case"T":t=44e5;break;case"U":t=53e5;break;case"V":t=62e5;break;case"W":t=7e6;break;case"X":t=79e5;break;default:t=-1}if(t>=0)return t;throw"Invalid zone letter: "+i}function $s(i,t,e){if(!(this instanceof $s))return new $s(i,t,e);if(Array.isArray(i))this.x=i[0],this.y=i[1],this.z=i[2]||0;else if(typeof i=="object")this.x=i.x,this.y=i.y,this.z=i.z||0;else if(typeof i=="string"&&typeof t>"u"){var n=i.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=i,this.y=t,this.z=e||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}$s.fromMGRS=function(i){return new $s(Ug(i))};$s.prototype.toMGRS=function(i){return Bg([this.x,this.y],i)};var RE=1,bE=.25,Vu=.046875,$u=.01953125,Ku=.01068115234375,IE=.75,TE=.46875,AE=.013020833333333334,LE=.007120768229166667,PE=.3645833333333333,OE=.005696614583333333,DE=.3076171875;function gc(i){var t=[];t[0]=RE-i*(bE+i*(Vu+i*($u+i*Ku))),t[1]=i*(IE-i*(Vu+i*($u+i*Ku)));var e=i*i;return t[2]=e*(TE-i*(AE+i*LE)),e*=i,t[3]=e*(PE-i*OE),t[4]=e*i*DE,t}function nr(i,t,e,n){return e*=t,t*=t,n[0]*i-e*(n[1]+t*(n[2]+t*(n[3]+t*n[4])))}var NE=20;function _c(i,t,e){for(var n=1/(1-t),s=i,r=NE;r;--r){var a=Math.sin(s),o=1-t*a*a;if(o=(nr(s,a,Math.cos(s),e)-i)*(o*Math.sqrt(o))*n,s-=o,Math.abs(o)D?Math.tan(e):0,_=Math.pow(g,2),m=Math.pow(_,2);s=1-this.es*Math.pow(o,2),c=c/Math.sqrt(s);var y=nr(e,o,h,this.en);r=this.a*(this.k0*c*(1+u/6*(1-_+d+u/20*(5-18*_+m+14*d-58*_*d+u/42*(61+179*m-m*_-479*_)))))+this.x0,a=this.a*(this.k0*(y-this.ml0+o*n*c/2*(1+u/12*(5-_+9*d+4*f+u/30*(61+m-58*_+270*d-330*_*d+u/56*(1385+543*m-m*_-3111*_))))))+this.y0}else{var l=h*Math.sin(n);if(Math.abs(Math.abs(l)-1)=1){if(l-1>D)return 93;a=0}else a=Math.acos(a);e<0&&(a=-a),a=this.a*this.k0*(a-this.lat0)+this.y0}return i.x=r,i.y=a,i}function GE(i){var t,e,n,s,r=(i.x-this.x0)*(1/this.a),a=(i.y-this.y0)*(1/this.a);if(this.es)if(t=this.ml0+a/this.k0,e=_c(t,this.es,this.en),Math.abs(e)D?Math.tan(e):0,g=this.ep2*Math.pow(d,2),_=Math.pow(g,2),m=Math.pow(f,2),y=Math.pow(m,2);t=1-this.es*Math.pow(u,2);var p=r*Math.sqrt(t)/this.k0,x=Math.pow(p,2);t=t*f,n=e-t*x/(1-this.es)*.5*(1-x/12*(5+3*m-9*g*m+g-4*_-x/30*(61+90*m-252*g*m+45*y+46*g-x/56*(1385+3633*m+4095*y+1574*y*m)))),s=N(this.long0+p*(1-x/6*(1+2*m+g-x/20*(5+28*m+24*y+8*g*m+6*g-x/42*(61+662*m+1320*y+720*y*m))))/d)}else n=T*ka(a),s=0;else{var o=Math.exp(r/this.k0),h=.5*(o-1/o),l=this.lat0+a/this.k0,c=Math.cos(l);t=Math.sqrt((1-Math.pow(c,2))/(1+Math.pow(h,2))),n=Math.asin(t),a<0&&(n=-n),h===0&&c===0?s=0:s=N(Math.atan2(h,c)+this.long0)}return i.x=s,i.y=n,i}var zE=["Fast_Transverse_Mercator","Fast Transverse Mercator"];const co={init:FE,forward:kE,inverse:GE,names:zE};function qg(i){var t=Math.exp(i);return t=(t-1/t)/2,t}function ue(i,t){i=Math.abs(i),t=Math.abs(t);var e=Math.max(i,t),n=Math.min(i,t)/(e||1);return e*Math.sqrt(1+Math.pow(n,2))}function WE(i){var t=1+i,e=t-1;return e===0?i:i*Math.log(t)/e}function BE(i){var t=Math.abs(i);return t=WE(t*(1+t/(ue(1,t)+1))),i<0?-t:t}function mc(i,t){for(var e=2*Math.cos(2*t),n=i.length-1,s=i[n],r=0,a;--n>=0;)a=-r+e*s+i[n],r=s,s=a;return t+a*Math.sin(2*t)}function UE(i,t){for(var e=2*Math.cos(t),n=i.length-1,s=i[n],r=0,a;--n>=0;)a=-r+e*s+i[n],r=s,s=a;return Math.sin(t)*a}function jE(i){var t=Math.exp(i);return t=(t+1/t)/2,t}function Yg(i,t,e){for(var n=Math.sin(t),s=Math.cos(t),r=qg(e),a=jE(e),o=2*s*a,h=-2*n*r,l=i.length-1,c=i[l],u=0,d=0,f=0,g,_;--l>=0;)g=d,_=u,d=c,u=f,c=-g+o*d-h*u+i[l],f=-_+h*d+o*u;return o=n*a,h=s*r,[o*c-h*f,o*f+h*c]}function XE(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(co.init.apply(this),this.forward=co.forward,this.inverse=co.inverse),this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var i=this.es/(1+Math.sqrt(1-this.es)),t=i/(2-i),e=t;this.cgb[0]=t*(2+t*(-2/3+t*(-2+t*(116/45+t*(26/45+t*(-2854/675)))))),this.cbg[0]=t*(-2+t*(2/3+t*(4/3+t*(-82/45+t*(32/45+t*(4642/4725)))))),e=e*t,this.cgb[1]=e*(7/3+t*(-8/5+t*(-227/45+t*(2704/315+t*(2323/945))))),this.cbg[1]=e*(5/3+t*(-16/15+t*(-13/9+t*(904/315+t*(-1522/945))))),e=e*t,this.cgb[2]=e*(56/15+t*(-136/35+t*(-1262/105+t*(73814/2835)))),this.cbg[2]=e*(-26/15+t*(34/21+t*(8/5+t*(-12686/2835)))),e=e*t,this.cgb[3]=e*(4279/630+t*(-332/35+t*(-399572/14175))),this.cbg[3]=e*(1237/630+t*(-12/5+t*(-24832/14175))),e=e*t,this.cgb[4]=e*(4174/315+t*(-144838/6237)),this.cbg[4]=e*(-734/315+t*(109598/31185)),e=e*t,this.cgb[5]=e*(601676/22275),this.cbg[5]=e*(444337/155925),e=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+e*(1/4+e*(1/64+e/256))),this.utg[0]=t*(-.5+t*(2/3+t*(-37/96+t*(1/360+t*(81/512+t*(-96199/604800)))))),this.gtu[0]=t*(.5+t*(-2/3+t*(5/16+t*(41/180+t*(-127/288+t*(7891/37800)))))),this.utg[1]=e*(-1/48+t*(-1/15+t*(437/1440+t*(-46/105+t*(1118711/3870720))))),this.gtu[1]=e*(13/48+t*(-3/5+t*(557/1440+t*(281/630+t*(-1983433/1935360))))),e=e*t,this.utg[2]=e*(-17/480+t*(37/840+t*(209/4480+t*(-5569/90720)))),this.gtu[2]=e*(61/240+t*(-103/140+t*(15061/26880+t*(167603/181440)))),e=e*t,this.utg[3]=e*(-4397/161280+t*(11/504+t*(830251/7257600))),this.gtu[3]=e*(49561/161280+t*(-179/168+t*(6601661/7257600))),e=e*t,this.utg[4]=e*(-4583/161280+t*(108847/3991680)),this.gtu[4]=e*(34729/80640+t*(-3418889/1995840)),e=e*t,this.utg[5]=e*(-20648693/638668800),this.gtu[5]=e*(212378941/319334400);var n=mc(this.cbg,this.lat0);this.Zb=-this.Qn*(n+UE(this.gtu,2*n))}function qE(i){var t=N(i.x-this.long0),e=i.y;e=mc(this.cbg,e);var n=Math.sin(e),s=Math.cos(e),r=Math.sin(t),a=Math.cos(t);e=Math.atan2(n,a*s),t=Math.atan2(r*s,ue(n,s*a)),t=BE(Math.tan(t));var o=Yg(this.gtu,2*e,2*t);e=e+o[0],t=t+o[1];var h,l;return Math.abs(t)<=2.623395162778?(h=this.a*(this.Qn*t)+this.x0,l=this.a*(this.Qn*e+this.Zb)+this.y0):(h=1/0,l=1/0),i.x=h,i.y=l,i}function YE(i){var t=(i.x-this.x0)*(1/this.a),e=(i.y-this.y0)*(1/this.a);e=(e-this.Zb)/this.Qn,t=t/this.Qn;var n,s;if(Math.abs(t)<=2.623395162778){var r=Yg(this.utg,2*e,2*t);e=e+r[0],t=t+r[1],t=Math.atan(qg(t));var a=Math.sin(e),o=Math.cos(e),h=Math.sin(t),l=Math.cos(t);e=Math.atan2(a*l,ue(h,l*o)),t=Math.atan2(h,l*o),n=N(t+this.long0),s=mc(this.cgb,e)}else n=1/0,s=1/0;return i.x=n,i.y=s,i}var VE=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"];const uo={init:XE,forward:qE,inverse:YE,names:VE};function $E(i,t){if(i===void 0){if(i=Math.floor((N(t)+Math.PI)*30/Math.PI)+1,i<0)return 0;if(i>60)return 60}return i}var KE="etmerc";function ZE(){var i=$E(this.zone,this.long0);if(i===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(i)-183)*Bt,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,uo.init.apply(this),this.forward=uo.forward,this.inverse=uo.inverse}var HE=["Universal Transverse Mercator System","utm"];const JE={init:ZE,names:HE,dependsOn:KE};function yc(i,t){return Math.pow((1-i)/(1+i),t)}var QE=20;function tM(){var i=Math.sin(this.lat0),t=Math.cos(this.lat0);t*=t,this.rc=Math.sqrt(1-this.es)/(1-this.es*i*i),this.C=Math.sqrt(1+this.es*t*t/(1-this.es)),this.phic0=Math.asin(i/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+ut)/(Math.pow(Math.tan(.5*this.lat0+ut),this.C)*yc(this.e*i,this.ratexp))}function eM(i){var t=i.x,e=i.y;return i.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*e+ut),this.C)*yc(this.e*Math.sin(e),this.ratexp))-T,i.x=this.C*t,i}function iM(i){for(var t=1e-14,e=i.x/this.C,n=i.y,s=Math.pow(Math.tan(.5*n+ut)/this.K,1/this.C),r=QE;r>0&&(n=2*Math.atan(s*yc(this.e*Math.sin(i.y),-.5*this.e))-T,!(Math.abs(n-i.y)0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=D&&Math.abs(Math.cos(this.lat_ts))>D&&(this.k0=.5*this.cons*ii(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/ze(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=ii(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-T,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function uM(i){var t=i.x,e=i.y,n=Math.sin(e),s=Math.cos(e),r,a,o,h,l,c,u=N(t-this.long0);return Math.abs(Math.abs(t-this.long0)-Math.PI)<=D&&Math.abs(e+this.lat0)<=D?(i.x=NaN,i.y=NaN,i):this.sphere?(r=2*this.k0/(1+this.sinlat0*n+this.coslat0*s*Math.cos(u)),i.x=this.a*r*s*Math.sin(u)+this.x0,i.y=this.a*r*(this.coslat0*n-this.sinlat0*s*Math.cos(u))+this.y0,i):(a=2*Math.atan(this.ssfn_(e,n,this.e))-T,h=Math.cos(a),o=Math.sin(a),Math.abs(this.coslat0)<=D?(l=ze(this.e,e*this.con,this.con*n),c=2*this.a*this.k0*l/this.cons,i.x=this.x0+c*Math.sin(t-this.long0),i.y=this.y0-this.con*c*Math.cos(t-this.long0),i):(Math.abs(this.sinlat0)0?t=N(this.long0+Math.atan2(i.x,-1*i.y)):t=N(this.long0+Math.atan2(i.x,i.y)):t=N(this.long0+Math.atan2(i.x*Math.sin(o),a*this.coslat0*Math.cos(o)-i.y*this.sinlat0*Math.sin(o))),i.x=t,i.y=e,i)}else if(Math.abs(this.coslat0)<=D){if(a<=D)return e=this.lat0,t=this.long0,i.x=t,i.y=e,i;i.x*=this.con,i.y*=this.con,n=a*this.cons/(2*this.a*this.k0),e=this.con*Jr(this.e,n),t=this.con*N(this.con*this.long0+Math.atan2(i.x,-1*i.y))}else s=2*Math.atan(a*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,a<=D?r=this.X0:(r=Math.asin(Math.cos(s)*this.sinX0+i.y*Math.sin(s)*this.cosX0/a),t=N(this.long0+Math.atan2(i.x*Math.sin(s),a*this.cosX0*Math.cos(s)-i.y*this.sinX0*Math.sin(s)))),e=-1*Jr(this.e,Math.tan(.5*(T+r)));return i.x=t,i.y=e,i}var fM=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)","Polar_Stereographic"];const gM={init:cM,forward:uM,inverse:dM,names:fM,ssfn_:lM};function _M(){var i=this.lat0;this.lambda0=this.long0;var t=Math.sin(i),e=this.a,n=this.rf,s=1/n,r=2*s-Math.pow(s,2),a=this.e=Math.sqrt(r);this.R=this.k0*e*Math.sqrt(1-r)/(1-r*Math.pow(t,2)),this.alpha=Math.sqrt(1+r/(1-r)*Math.pow(Math.cos(i),4)),this.b0=Math.asin(t/this.alpha);var o=Math.log(Math.tan(Math.PI/4+this.b0/2)),h=Math.log(Math.tan(Math.PI/4+i/2)),l=Math.log((1+a*t)/(1-a*t));this.K=o-this.alpha*h+this.alpha*a/2*l}function mM(i){var t=Math.log(Math.tan(Math.PI/4-i.y/2)),e=this.e/2*Math.log((1+this.e*Math.sin(i.y))/(1-this.e*Math.sin(i.y))),n=-this.alpha*(t+e)+this.K,s=2*(Math.atan(Math.exp(n))-Math.PI/4),r=this.alpha*(i.x-this.lambda0),a=Math.atan(Math.sin(r)/(Math.sin(this.b0)*Math.tan(s)+Math.cos(this.b0)*Math.cos(r))),o=Math.asin(Math.cos(this.b0)*Math.sin(s)-Math.sin(this.b0)*Math.cos(s)*Math.cos(r));return i.y=this.R/2*Math.log((1+Math.sin(o))/(1-Math.sin(o)))+this.y0,i.x=this.R*a+this.x0,i}function yM(i){for(var t=i.x-this.x0,e=i.y-this.y0,n=t/this.R,s=2*(Math.atan(Math.exp(e/this.R))-Math.PI/4),r=Math.asin(Math.cos(this.b0)*Math.sin(s)+Math.sin(this.b0)*Math.cos(s)*Math.cos(n)),a=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(s))),o=this.lambda0+a/this.alpha,h=0,l=r,c=-1e3,u=0;Math.abs(l-c)>1e-7;){if(++u>20)return;h=1/this.alpha*(Math.log(Math.tan(Math.PI/4+r/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(l))/2)),c=l,l=2*Math.atan(Math.exp(h))-Math.PI/2}return i.x=o,i.y=l,i}var pM=["somerc"];const vM={init:_M,forward:mM,inverse:yM,names:pM};var is=1e-7;function xM(i){var t=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],e=typeof i.PROJECTION=="object"?Object.keys(i.PROJECTION)[0]:i.PROJECTION;return"no_uoff"in i||"no_off"in i||t.indexOf(e)!==-1}function EM(){var i,t,e,n,s,r,a,o,h,l,c=0,u,d=0,f=0,g=0,_=0,m=0,y=0;this.no_off=xM(this),this.no_rot="no_rot"in this;var p=!1;"alpha"in this&&(p=!0);var x=!1;if("rectified_grid_angle"in this&&(x=!0),p&&(y=this.alpha),x&&(c=this.rectified_grid_angle*Bt),p||x)d=this.longc;else if(f=this.long1,_=this.lat1,g=this.long2,m=this.lat2,Math.abs(_-m)<=is||(i=Math.abs(_))<=is||Math.abs(i-T)<=is||Math.abs(Math.abs(this.lat0)-T)<=is||Math.abs(Math.abs(m)-T)<=is)throw new Error;var M=1-this.es;t=Math.sqrt(M),Math.abs(this.lat0)>D?(o=Math.sin(this.lat0),e=Math.cos(this.lat0),i=1-this.es*o*o,this.B=e*e,this.B=Math.sqrt(1+this.es*this.B*this.B/M),this.A=this.B*this.k0*t/i,n=this.B*t/(e*Math.sqrt(i)),s=n*n-1,s<=0?s=0:(s=Math.sqrt(s),this.lat0<0&&(s=-s)),this.E=s+=n,this.E*=Math.pow(ze(this.e,this.lat0,o),this.B)):(this.B=1/t,this.A=this.k0,this.E=n=s=1),p||x?(p?(u=Math.asin(Math.sin(y)/n),x||(c=y)):(u=c,y=Math.asin(n*Math.sin(u))),this.lam0=d-Math.asin(.5*(s-1/s)*Math.tan(u))/this.B):(r=Math.pow(ze(this.e,_,Math.sin(_)),this.B),a=Math.pow(ze(this.e,m,Math.sin(m)),this.B),s=this.E/r,h=(a-r)/(a+r),l=this.E*this.E,l=(l-a*r)/(l+a*r),i=f-g,i<-Math.pi?g-=Zr:i>Math.pi&&(g+=Zr),this.lam0=N(.5*(f+g)-Math.atan(l*Math.tan(.5*this.B*(f-g))/h)/this.B),u=Math.atan(2*Math.sin(this.B*N(f-this.lam0))/(s-1/s)),c=y=Math.asin(n*Math.sin(u))),this.singam=Math.sin(u),this.cosgam=Math.cos(u),this.sinrot=Math.sin(c),this.cosrot=Math.cos(c),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.A*this.B,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(n*n-1)/Math.cos(y))),this.lat0<0&&(this.u_0=-this.u_0)),s=.5*u,this.v_pole_n=this.ArB*Math.log(Math.tan(ut-s)),this.v_pole_s=this.ArB*Math.log(Math.tan(ut+s))}function MM(i){var t={},e,n,s,r,a,o,h,l;if(i.x=i.x-this.lam0,Math.abs(Math.abs(i.y)-T)>D){if(a=this.E/Math.pow(ze(this.e,i.y,Math.sin(i.y)),this.B),o=1/a,e=.5*(a-o),n=.5*(a+o),r=Math.sin(this.B*i.x),s=(e*this.singam-r*this.cosgam)/n,Math.abs(Math.abs(s)-1)0?this.v_pole_n:this.v_pole_s,h=this.ArB*i.y;return this.no_rot?(t.x=h,t.y=l):(h-=this.u_0,t.x=l*this.cosrot+h*this.sinrot,t.y=h*this.cosrot-l*this.sinrot),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t}function wM(i){var t,e,n,s,r,a,o,h={};if(i.x=(i.x-this.x0)*(1/this.a),i.y=(i.y-this.y0)*(1/this.a),this.no_rot?(e=i.y,t=i.x):(e=i.x*this.cosrot-i.y*this.sinrot,t=i.y*this.cosrot+i.x*this.sinrot+this.u_0),n=Math.exp(-this.BrA*e),s=.5*(n-1/n),r=.5*(n+1/n),a=Math.sin(this.BrA*t),o=(a*this.cosgam+s*this.singam)/r,Math.abs(Math.abs(o)-1)D?this.ns=Math.log(n/o)/Math.log(s/h):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=n/(this.ns*Math.pow(s,this.ns)),this.rh=this.a*this.f0*Math.pow(l,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function bM(i){var t=i.x,e=i.y;Math.abs(2*Math.abs(e)-Math.PI)<=D&&(e=ka(e)*(T-2*D));var n=Math.abs(Math.abs(e)-T),s,r;if(n>D)s=ze(this.e,e,Math.sin(e)),r=this.a*this.f0*Math.pow(s,this.ns);else{if(n=e*this.ns,n<=0)return null;r=0}var a=this.ns*N(t-this.long0);return i.x=this.k0*(r*Math.sin(a))+this.x0,i.y=this.k0*(this.rh-r*Math.cos(a))+this.y0,i}function IM(i){var t,e,n,s,r,a=(i.x-this.x0)/this.k0,o=this.rh-(i.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(a*a+o*o),e=1):(t=-Math.sqrt(a*a+o*o),e=-1);var h=0;if(t!==0&&(h=Math.atan2(e*a,e*o)),t!==0||this.ns>0){if(e=1/this.ns,n=Math.pow(t/(this.a*this.f0),e),s=Jr(this.e,n),s===-9999)return null}else s=-T;return r=N(h/this.ns+this.long0),i.x=r,i.y=s,i}var TM=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"];const AM={init:RM,forward:bM,inverse:IM,names:TM};function LM(){this.a=6377397155e-3,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.7417649320975901-.308341501185665),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function PM(i){var t,e,n,s,r,a,o,h=i.x,l=i.y,c=N(h-this.long0);return t=Math.pow((1+this.e*Math.sin(l))/(1-this.e*Math.sin(l)),this.alfa*this.e/2),e=2*(Math.atan(this.k*Math.pow(Math.tan(l/2+this.s45),this.alfa)/t)-this.s45),n=-c*this.alfa,s=Math.asin(Math.cos(this.ad)*Math.sin(e)+Math.sin(this.ad)*Math.cos(e)*Math.cos(n)),r=Math.asin(Math.cos(e)*Math.sin(n)/Math.cos(s)),a=this.n*r,o=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(s/2+this.s45),this.n),i.y=o*Math.cos(a)/1,i.x=o*Math.sin(a)/1,this.czech||(i.y*=-1,i.x*=-1),i}function OM(i){var t,e,n,s,r,a,o,h,l=i.x;i.x=i.y,i.y=l,this.czech||(i.y*=-1,i.x*=-1),a=Math.sqrt(i.x*i.x+i.y*i.y),r=Math.atan2(i.y,i.x),s=r/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/a,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(s)),e=Math.asin(Math.cos(n)*Math.sin(s)/Math.cos(t)),i.x=this.long0-e/this.alfa,o=t,h=0;var c=0;do i.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(t/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(o))/(1-this.e*Math.sin(o)),this.e/2))-this.s45),Math.abs(o-i.y)<1e-10&&(h=1),o=i.y,c+=1;while(h===0&&c<15);return c>=15?null:i}var DM=["Krovak","krovak"];const NM={init:LM,forward:PM,inverse:OM,names:DM};function re(i,t,e,n,s){return i*s-t*Math.sin(2*s)+e*Math.sin(4*s)-n*Math.sin(6*s)}function Ga(i){return 1-.25*i*(1+i/16*(3+1.25*i))}function za(i){return .375*i*(1+.25*i*(1+.46875*i))}function Wa(i){return .05859375*i*i*(1+.75*i)}function Ba(i){return i*i*i*(35/3072)}function Ks(i,t,e){var n=t*e;return i/Math.sqrt(1-n*n)}function cn(i){return Math.abs(i)1e-7?(e=i*t,(1-i*i)*(t/(1-e*e)-.5/i*Math.log((1-e)/(1+e)))):2*t}var BM=1,UM=2,jM=3,XM=4;function qM(){var i=Math.abs(this.lat0);if(Math.abs(i-T)0){var t;switch(this.qp=rn(this.e,1),this.mmf=.5/(1-this.es),this.apa=t2(this.es),this.mode){case this.N_POLE:this.dd=1;break;case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=rn(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd;break}}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function YM(i){var t,e,n,s,r,a,o,h,l,c,u=i.x,d=i.y;if(u=N(u-this.long0),this.sphere){if(r=Math.sin(d),c=Math.cos(d),n=Math.cos(u),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(e=this.mode===this.EQUIT?1+c*n:1+this.sinph0*r+this.cosph0*c*n,e<=D)return null;e=Math.sqrt(2/e),t=e*c*Math.sin(u),e*=this.mode===this.EQUIT?r:this.cosph0*r-this.sinph0*c*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(d+this.lat0)=0?(t=(l=Math.sqrt(a))*s,e=n*(this.mode===this.S_POLE?l:-l)):t=e=0;break}}return i.x=this.a*t+this.x0,i.y=this.a*e+this.y0,i}function VM(i){i.x-=this.x0,i.y-=this.y0;var t=i.x/this.a,e=i.y/this.a,n,s,r,a,o,h,l;if(this.sphere){var c=0,u,d=0;if(u=Math.sqrt(t*t+e*e),s=u*.5,s>1)return null;switch(s=2*Math.asin(s),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(d=Math.sin(s),c=Math.cos(s)),this.mode){case this.EQUIT:s=Math.abs(u)<=D?0:Math.asin(e*d/u),t*=d,e=c*u;break;case this.OBLIQ:s=Math.abs(u)<=D?this.lat0:Math.asin(c*this.sinph0+e*d*this.cosph0/u),t*=d*this.cosph0,e=(c-Math.sin(s)*this.sinph0)*u;break;case this.N_POLE:e=-e,s=T-s;break;case this.S_POLE:s-=T;break}n=e===0&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(t,e)}else{if(l=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(t/=this.dd,e*=this.dd,h=Math.sqrt(t*t+e*e),h1&&(i=i>1?1:-1),Math.asin(i)}function s2(){Math.abs(this.lat1+this.lat2)D?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function r2(i){var t=i.x,e=i.y;this.sin_phi=Math.sin(e),this.cos_phi=Math.cos(e);var n=rn(this.e3,this.sin_phi),s=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,r=this.ns0*N(t-this.long0),a=s*Math.sin(r)+this.x0,o=this.rh-s*Math.cos(r)+this.y0;return i.x=a,i.y=o,i}function a2(i){var t,e,n,s,r,a;return i.x-=this.x0,i.y=this.rh-i.y+this.y0,this.ns0>=0?(t=Math.sqrt(i.x*i.x+i.y*i.y),n=1):(t=-Math.sqrt(i.x*i.x+i.y*i.y),n=-1),s=0,t!==0&&(s=Math.atan2(n*i.x,n*i.y)),n=t*this.ns0/this.a,this.sphere?a=Math.asin((this.c-n*n)/(2*this.ns0)):(e=(this.c-n*n)/this.ns0,a=this.phi1z(this.e3,e)),r=N(s/this.ns0+this.long0),i.x=r,i.y=a,i}function o2(i,t){var e,n,s,r,a,o=hn(.5*t);if(i0||Math.abs(a)<=D?(o=this.x0+this.a*r*e*Math.sin(n)/a,h=this.y0+this.a*r*(this.cos_p14*t-this.sin_p14*e*s)/a):(o=this.x0+this.infinity_dist*e*Math.sin(n),h=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*e*s)),i.x=o,i.y=h,i}function d2(i){var t,e,n,s,r,a;return i.x=(i.x-this.x0)/this.a,i.y=(i.y-this.y0)/this.a,i.x/=this.k0,i.y/=this.k0,(t=Math.sqrt(i.x*i.x+i.y*i.y))?(s=Math.atan2(t,this.rc),e=Math.sin(s),n=Math.cos(s),a=hn(n*this.sin_p14+i.y*e*this.cos_p14/t),r=Math.atan2(i.x*e,t*this.cos_p14*n-i.y*this.sin_p14*e),r=N(this.long0+r)):(a=this.phic0,r=0),i.x=r,i.y=a,i}var f2=["gnom"];const g2={init:c2,forward:u2,inverse:d2,names:f2};function _2(i,t){var e=1-(1-i*i)/(2*i)*Math.log((1-i)/(1+i));if(Math.abs(Math.abs(t)-e)<1e-6)return t<0?-1*T:T;for(var n=Math.asin(.5*t),s,r,a,o,h=0;h<30;h++)if(r=Math.sin(n),a=Math.cos(n),o=i*r,s=Math.pow(1-o*o,2)/(2*a)*(t/(1-i*i)-r/(1-o*o)+.5/i*Math.log((1-o)/(1+o))),n+=s,Math.abs(s)<=1e-10)return n;return NaN}function m2(){this.sphere||(this.k0=ii(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function y2(i){var t=i.x,e=i.y,n,s,r=N(t-this.long0);if(this.sphere)n=this.x0+this.a*r*Math.cos(this.lat_ts),s=this.y0+this.a*Math.sin(e)/Math.cos(this.lat_ts);else{var a=rn(this.e,Math.sin(e));n=this.x0+this.a*this.k0*r,s=this.y0+this.a*a*.5/this.k0}return i.x=n,i.y=s,i}function p2(i){i.x-=this.x0,i.y-=this.y0;var t,e;return this.sphere?(t=N(this.long0+i.x/this.a/Math.cos(this.lat_ts)),e=Math.asin(i.y/this.a*Math.cos(this.lat_ts))):(e=_2(this.e,2*i.y*this.k0/this.a),t=N(this.long0+i.x/(this.a*this.k0))),i.x=t,i.y=e,i}var v2=["cea"];const x2={init:m2,forward:y2,inverse:p2,names:v2};function E2(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function M2(i){var t=i.x,e=i.y,n=N(t-this.long0),s=cn(e-this.lat0);return i.x=this.x0+this.a*n*this.rc,i.y=this.y0+this.a*s,i}function w2(i){var t=i.x,e=i.y;return i.x=N(this.long0+(t-this.x0)/(this.a*this.rc)),i.y=cn(this.lat0+(e-this.y0)/this.a),i}var S2=["Equirectangular","Equidistant_Cylindrical","eqc"];const C2={init:E2,forward:M2,inverse:w2,names:S2};var Zu=20;function R2(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Ga(this.es),this.e1=za(this.es),this.e2=Wa(this.es),this.e3=Ba(this.es),this.ml0=this.a*re(this.e0,this.e1,this.e2,this.e3,this.lat0)}function b2(i){var t=i.x,e=i.y,n,s,r,a=N(t-this.long0);if(r=a*Math.sin(e),this.sphere)Math.abs(e)<=D?(n=this.a*a,s=-1*this.a*this.lat0):(n=this.a*Math.sin(r)/Math.tan(e),s=this.a*(cn(e-this.lat0)+(1-Math.cos(r))/Math.tan(e)));else if(Math.abs(e)<=D)n=this.a*a,s=-1*this.ml0;else{var o=Ks(this.a,this.e,Math.sin(e))/Math.tan(e);n=o*Math.sin(r),s=this.a*re(this.e0,this.e1,this.e2,this.e3,e)-this.ml0+o*(1-Math.cos(r))}return i.x=n+this.x0,i.y=s+this.y0,i}function I2(i){var t,e,n,s,r,a,o,h,l;if(n=i.x-this.x0,s=i.y-this.y0,this.sphere)if(Math.abs(s+this.a*this.lat0)<=D)t=N(n/this.a+this.long0),e=0;else{a=this.lat0+s/this.a,o=n*n/this.a/this.a+a*a,h=a;var c;for(r=Zu;r;--r)if(c=Math.tan(h),l=-1*(a*(h*c+1)-h-.5*(h*h+o)*c)/((h-a)/c-1),h+=l,Math.abs(l)<=D){e=h;break}t=N(this.long0+Math.asin(n*Math.tan(h)/this.a)/Math.sin(e))}else if(Math.abs(s+this.ml0)<=D)e=0,t=N(this.long0+n/this.a);else{a=(this.ml0+s)/this.a,o=n*n/this.a/this.a+a*a,h=a;var u,d,f,g,_;for(r=Zu;r;--r)if(_=this.e*Math.sin(h),u=Math.sqrt(1-_*_)*Math.tan(h),d=this.a*re(this.e0,this.e1,this.e2,this.e3,h),f=this.e0-2*this.e1*Math.cos(2*h)+4*this.e2*Math.cos(4*h)-6*this.e3*Math.cos(6*h),g=d/this.a,l=(a*(u*g+1)-g-.5*u*(g*g+o))/(this.es*Math.sin(2*h)*(g*g+o-2*a*g)/(4*u)+(a-g)*(u*f-2/Math.sin(2*h))-f),h-=l,Math.abs(l)<=D){e=h;break}u=Math.sqrt(1-this.es*Math.pow(Math.sin(e),2))*Math.tan(e),t=N(this.long0+Math.asin(n*u/this.a)/Math.sin(e))}return i.x=t,i.y=e,i}var T2=["Polyconic","poly"];const A2={init:R2,forward:b2,inverse:I2,names:T2};function L2(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function P2(i){var t,e=i.x,n=i.y,s=n-this.lat0,r=e-this.long0,a=s/Ir*1e-5,o=r,h=1,l=0;for(t=1;t<=10;t++)h=h*a,l=l+this.A[t]*h;var c=l,u=o,d=1,f=0,g,_,m=0,y=0;for(t=1;t<=6;t++)g=d*c-f*u,_=f*c+d*u,d=g,f=_,m=m+this.B_re[t]*d-this.B_im[t]*f,y=y+this.B_im[t]*d+this.B_re[t]*f;return i.x=y*this.a+this.x0,i.y=m*this.a+this.y0,i}function O2(i){var t,e=i.x,n=i.y,s=e-this.x0,r=n-this.y0,a=r/this.a,o=s/this.a,h=1,l=0,c,u,d=0,f=0;for(t=1;t<=6;t++)c=h*a-l*o,u=l*a+h*o,h=c,l=u,d=d+this.C_re[t]*h-this.C_im[t]*l,f=f+this.C_im[t]*h+this.C_re[t]*l;for(var g=0;g.999999999999&&(e=.999999999999),t=Math.asin(e);var n=N(this.long0+i.x/(.900316316158*this.a*Math.cos(t)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),e=(2*t+Math.sin(2*t))/Math.PI,Math.abs(e)>1&&(e=1);var s=Math.asin(e);return i.x=n,i.y=s,i}var Z2=["Mollweide","moll"];const H2={init:V2,forward:$2,inverse:K2,names:Z2};function J2(){Math.abs(this.lat1+this.lat2)=0?(e=Math.sqrt(i.x*i.x+i.y*i.y),t=1):(e=-Math.sqrt(i.x*i.x+i.y*i.y),t=-1);var r=0;if(e!==0&&(r=Math.atan2(t*i.x,t*i.y)),this.sphere)return s=N(this.long0+r/this.ns),n=cn(this.g-e/this.a),i.x=s,i.y=n,i;var a=this.g-e/this.a;return n=Oo(a,this.e0,this.e1,this.e2,this.e3),s=N(this.long0+r/this.ns),i.x=s,i.y=n,i}var ew=["Equidistant_Conic","eqdc"];const iw={init:J2,forward:Q2,inverse:tw,names:ew};function nw(){this.R=this.a}function sw(i){var t=i.x,e=i.y,n=N(t-this.long0),s,r;Math.abs(e)<=D&&(s=this.x0+this.R*n,r=this.y0);var a=hn(2*Math.abs(e/Math.PI));(Math.abs(n)<=D||Math.abs(Math.abs(e)-T)<=D)&&(s=this.x0,e>=0?r=this.y0+Math.PI*this.R*Math.tan(.5*a):r=this.y0+Math.PI*this.R*-Math.tan(.5*a));var o=.5*Math.abs(Math.PI/n-n/Math.PI),h=o*o,l=Math.sin(a),c=Math.cos(a),u=c/(l+c-1),d=u*u,f=u*(2/l-1),g=f*f,_=Math.PI*this.R*(o*(u-g)+Math.sqrt(h*(u-g)*(u-g)-(g+h)*(d-g)))/(g+h);n<0&&(_=-_),s=this.x0+_;var m=h+u;return _=Math.PI*this.R*(f*m-o*Math.sqrt((g+h)*(h+1)-m*m))/(g+h),e>=0?r=this.y0+_:r=this.y0-_,i.x=s,i.y=r,i}function rw(i){var t,e,n,s,r,a,o,h,l,c,u,d,f;return i.x-=this.x0,i.y-=this.y0,u=Math.PI*this.R,n=i.x/u,s=i.y/u,r=n*n+s*s,a=-Math.abs(s)*(1+r),o=a-2*s*s+n*n,h=-2*a+1+2*s*s+r*r,f=s*s/h+(2*o*o*o/h/h/h-9*a*o/h/h)/27,l=(a-o*o/3/h)/h,c=2*Math.sqrt(-l/3),u=3*f/l/c,Math.abs(u)>1&&(u>=0?u=1:u=-1),d=Math.acos(u)/3,i.y>=0?e=(-c*Math.cos(d+Math.PI/3)-o/3/h)*Math.PI:e=-(-c*Math.cos(d+Math.PI/3)-o/3/h)*Math.PI,Math.abs(n)2*T*this.a?void 0:(e=t/this.a,n=Math.sin(e),s=Math.cos(e),r=this.long0,Math.abs(t)<=D?a=this.lat0:(a=hn(s*this.sin_p12+i.y*n*this.cos_p12/t),o=Math.abs(this.lat0)-T,Math.abs(o)<=D?this.lat0>=0?r=N(this.long0+Math.atan2(i.x,-i.y)):r=N(this.long0-Math.atan2(-i.x,i.y)):r=N(this.long0+Math.atan2(i.x*n,t*this.cos_p12*s-i.y*this.sin_p12*n))),i.x=r,i.y=a,i)):(h=Ga(this.es),l=za(this.es),c=Wa(this.es),u=Ba(this.es),Math.abs(this.sin_p12-1)<=D?(d=this.a*re(h,l,c,u,T),t=Math.sqrt(i.x*i.x+i.y*i.y),f=d-t,a=Oo(f/this.a,h,l,c,u),r=N(this.long0+Math.atan2(i.x,-1*i.y)),i.x=r,i.y=a,i):Math.abs(this.sin_p12+1)<=D?(d=this.a*re(h,l,c,u,T),t=Math.sqrt(i.x*i.x+i.y*i.y),f=t-d,a=Oo(f/this.a,h,l,c,u),r=N(this.long0+Math.atan2(i.x,i.y)),i.x=r,i.y=a,i):(t=Math.sqrt(i.x*i.x+i.y*i.y),m=Math.atan2(i.x,i.y),g=Ks(this.a,this.e,this.sin_p12),y=Math.cos(m),p=this.e*this.cos_p12*y,x=-p*p/(1-this.es),M=3*this.es*(1-x)*this.sin_p12*this.cos_p12*y/(1-this.es),E=t/g,w=E-x*(1+x)*Math.pow(E,3)/6-M*(1+3*x)*Math.pow(E,4)/24,C=1-x*w*w/2-E*w*w*w/6,_=Math.asin(this.sin_p12*Math.cos(w)+this.cos_p12*Math.sin(w)*y),r=N(this.long0+Math.asin(Math.sin(m)*Math.sin(w)/Math.cos(_))),S=Math.sin(_),a=Math.atan2((S-this.es*C*this.sin_p12)*Math.tan(_),S*(1-this.es)),i.x=r,i.y=a,i))}var uw=["Azimuthal_Equidistant","aeqd"];const dw={init:hw,forward:lw,inverse:cw,names:uw};function fw(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function gw(i){var t,e,n,s,r,a,o,h,l=i.x,c=i.y;return n=N(l-this.long0),t=Math.sin(c),e=Math.cos(c),s=Math.cos(n),a=this.sin_p14*t+this.cos_p14*e*s,r=1,(a>0||Math.abs(a)<=D)&&(o=this.a*r*e*Math.sin(n),h=this.y0+this.a*r*(this.cos_p14*t-this.sin_p14*e*s)),i.x=o,i.y=h,i}function _w(i){var t,e,n,s,r,a,o;return i.x-=this.x0,i.y-=this.y0,t=Math.sqrt(i.x*i.x+i.y*i.y),e=hn(t/this.a),n=Math.sin(e),s=Math.cos(e),a=this.long0,Math.abs(t)<=D?(o=this.lat0,i.x=a,i.y=o,i):(o=hn(s*this.sin_p14+i.y*n*this.cos_p14/t),r=Math.abs(this.lat0)-T,Math.abs(r)<=D?(this.lat0>=0?a=N(this.long0+Math.atan2(i.x,-i.y)):a=N(this.long0-Math.atan2(-i.x,i.y)),i.x=a,i.y=o,i):(a=N(this.long0+Math.atan2(i.x*n,t*this.cos_p14*s-i.y*this.sin_p14*n)),i.x=a,i.y=o,i))}var mw=["ortho"];const yw={init:fw,forward:gw,inverse:_w,names:mw};var Ct={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},dt={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function pw(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=T-ut/2?this.face=Ct.TOP:this.lat0<=-(T-ut/2)?this.face=Ct.BOTTOM:Math.abs(this.long0)<=ut?this.face=Ct.FRONT:Math.abs(this.long0)<=T+ut?this.face=this.long0>0?Ct.RIGHT:Ct.LEFT:this.face=Ct.BACK,this.es!==0&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function vw(i){var t={x:0,y:0},e,n,s,r,a,o,h={value:0};if(i.x-=this.long0,this.es!==0?e=Math.atan(this.one_minus_f_squared*Math.tan(i.y)):e=i.y,n=i.x,this.face===Ct.TOP)r=T-e,n>=ut&&n<=T+ut?(h.value=dt.AREA_0,s=n-T):n>T+ut||n<=-(T+ut)?(h.value=dt.AREA_1,s=n>0?n-At:n+At):n>-(T+ut)&&n<=-ut?(h.value=dt.AREA_2,s=n+T):(h.value=dt.AREA_3,s=n);else if(this.face===Ct.BOTTOM)r=T+e,n>=ut&&n<=T+ut?(h.value=dt.AREA_0,s=-n+T):n=-ut?(h.value=dt.AREA_1,s=-n):n<-ut&&n>=-(T+ut)?(h.value=dt.AREA_2,s=-n-T):(h.value=dt.AREA_3,s=n>0?-n+At:-n-At);else{var l,c,u,d,f,g,_;this.face===Ct.RIGHT?n=ys(n,+T):this.face===Ct.BACK?n=ys(n,+At):this.face===Ct.LEFT&&(n=ys(n,-T)),d=Math.sin(e),f=Math.cos(e),g=Math.sin(n),_=Math.cos(n),l=f*_,c=f*g,u=d,this.face===Ct.FRONT?(r=Math.acos(l),s=no(r,u,c,h)):this.face===Ct.RIGHT?(r=Math.acos(c),s=no(r,u,-l,h)):this.face===Ct.BACK?(r=Math.acos(-l),s=no(r,u,-c,h)):this.face===Ct.LEFT?(r=Math.acos(-c),s=no(r,u,l,h)):(r=s=0,h.value=dt.AREA_0)}return o=Math.atan(12/At*(s+Math.acos(Math.sin(s)*Math.cos(ut))-T)),a=Math.sqrt((1-Math.cos(r))/(Math.cos(o)*Math.cos(o))/(1-Math.cos(Math.atan(1/Math.cos(s))))),h.value===dt.AREA_1?o+=T:h.value===dt.AREA_2?o+=At:h.value===dt.AREA_3&&(o+=1.5*At),t.x=a*Math.cos(o),t.y=a*Math.sin(o),t.x=t.x*this.a+this.x0,t.y=t.y*this.a+this.y0,i.x=t.x,i.y=t.y,i}function xw(i){var t={lam:0,phi:0},e,n,s,r,a,o,h,l,c,u={value:0};if(i.x=(i.x-this.x0)/this.a,i.y=(i.y-this.y0)/this.a,n=Math.atan(Math.sqrt(i.x*i.x+i.y*i.y)),e=Math.atan2(i.y,i.x),i.x>=0&&i.x>=Math.abs(i.y)?u.value=dt.AREA_0:i.y>=0&&i.y>=Math.abs(i.x)?(u.value=dt.AREA_1,e-=T):i.x<0&&-i.x>=Math.abs(i.y)?(u.value=dt.AREA_2,e=e<0?e+At:e-At):(u.value=dt.AREA_3,e+=T),c=At/12*Math.tan(e),a=Math.sin(c)/(Math.cos(c)-1/Math.sqrt(2)),o=Math.atan(a),s=Math.cos(e),r=Math.tan(n),h=1-s*s*r*r*(1-Math.cos(Math.atan(1/Math.cos(o)))),h<-1?h=-1:h>1&&(h=1),this.face===Ct.TOP)l=Math.acos(h),t.phi=T-l,u.value===dt.AREA_0?t.lam=o+T:u.value===dt.AREA_1?t.lam=o<0?o+At:o-At:u.value===dt.AREA_2?t.lam=o-T:t.lam=o;else if(this.face===Ct.BOTTOM)l=Math.acos(h),t.phi=l-T,u.value===dt.AREA_0?t.lam=-o+T:u.value===dt.AREA_1?t.lam=-o:u.value===dt.AREA_2?t.lam=-o-T:t.lam=o<0?-o-At:-o+At;else{var d,f,g;d=h,c=d*d,c>=1?g=0:g=Math.sqrt(1-c)*Math.sin(o),c+=g*g,c>=1?f=0:f=Math.sqrt(1-c),u.value===dt.AREA_1?(c=f,f=-g,g=c):u.value===dt.AREA_2?(f=-f,g=-g):u.value===dt.AREA_3&&(c=f,f=g,g=-c),this.face===Ct.RIGHT?(c=d,d=-f,f=c):this.face===Ct.BACK?(d=-d,f=-f):this.face===Ct.LEFT&&(c=d,d=f,f=-c),t.phi=Math.acos(-g)-T,t.lam=Math.atan2(f,d),this.face===Ct.RIGHT?t.lam=ys(t.lam,-T):this.face===Ct.BACK?t.lam=ys(t.lam,-At):this.face===Ct.LEFT&&(t.lam=ys(t.lam,+T))}if(this.es!==0){var _,m,y;_=t.phi<0?1:0,m=Math.tan(t.phi),y=this.b/Math.sqrt(m*m+this.one_minus_f_squared),t.phi=Math.atan(Math.sqrt(this.a*this.a-y*y)/(this.one_minus_f*y)),_&&(t.phi=-t.phi)}return t.lam+=this.long0,i.x=t.lam,i.y=t.phi,i}function no(i,t,e,n){var s;return iut&&s<=T+ut?(n.value=dt.AREA_1,s-=T):s>T+ut||s<=-(T+ut)?(n.value=dt.AREA_2,s=s>=0?s-At:s+At):(n.value=dt.AREA_3,s+=T)),s}function ys(i,t){var e=i+t;return e<-At?e+=Zr:e>+At&&(e-=Zr),e}var Ew=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"];const Mw={init:pw,forward:vw,inverse:xw,names:Ew};var ul=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-986701e-12],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,18736e-12],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,934959e-12],[.7986,-.00755338,-500009e-10,935324e-12],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],wr=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-126793e-14,422642e-15],[.124,.0124,507171e-14,-160604e-14],[.186,.0123999,-190189e-13,600152e-14],[.248,.0124002,710039e-13,-224e-10],[.31,.0123992,-264997e-12,835986e-13],[.372,.0124029,988983e-12,-311994e-12],[.434,.0123893,-369093e-11,-435621e-12],[.4958,.0123198,-102252e-10,-345523e-12],[.5571,.0121916,-154081e-10,-582288e-12],[.6176,.0119938,-241424e-10,-525327e-12],[.6769,.011713,-320223e-10,-516405e-12],[.7346,.0113541,-397684e-10,-609052e-12],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-140374e-14],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Vg=.8487,$g=1.3523,Kg=He/5,ww=1/Kg,cs=18,Do=function(i,t){return i[0]+t*(i[1]+t*(i[2]+t*i[3]))},Sw=function(i,t){return i[1]+t*(2*i[2]+t*3*i[3])};function Cw(i,t,e,n){for(var s=t;n;--n){var r=i(s);if(s-=r,Math.abs(r)=cs&&(n=cs-1),e=He*(e-ww*n);var s={x:Do(ul[n],e)*t,y:Do(wr[n],e)};return i.y<0&&(s.y=-s.y),s.x=s.x*this.a*Vg+this.x0,s.y=s.y*this.a*$g+this.y0,s}function Iw(i){var t={x:(i.x-this.x0)/(this.a*Vg),y:Math.abs(i.y-this.y0)/(this.a*$g)};if(t.y>=1)t.x/=ul[cs][0],t.y=i.y<0?-T:T;else{var e=Math.floor(t.y*cs);for(e<0?e=0:e>=cs&&(e=cs-1);;)if(wr[e][0]>t.y)--e;else if(wr[e+1][0]<=t.y)++e;else break;var n=wr[e],s=5*(t.y-n[0])/(wr[e+1][0]-n[0]);s=Cw(function(r){return(Do(n,r)-t.y)/Sw(n,r)},s,D,100),t.x/=Do(ul[e],s),t.y=(5*e+s)*Bt,i.y<0&&(t.y=-t.y)}return t.x=N(t.x+this.long0),t}var Tw=["Robinson","robin"];const Aw={init:Rw,forward:bw,inverse:Iw,names:Tw};function Lw(){this.name="geocent"}function Pw(i){var t=Fg(i,this.es,this.a);return t}function Ow(i){var t=kg(i,this.es,this.a,this.b);return t}var Dw=["Geocentric","geocentric","geocent","Geocent"];const Nw={init:Lw,forward:Pw,inverse:Ow,names:Dw};var Kt={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},yr={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};function Fw(){if(Object.keys(yr).forEach((function(e){if(typeof this[e]>"u")this[e]=yr[e].def;else{if(yr[e].num&&isNaN(this[e]))throw new Error("Invalid parameter value, must be numeric "+e+" = "+this[e]);yr[e].num&&(this[e]=parseFloat(this[e]))}yr[e].degrees&&(this[e]=this[e]*Bt)}).bind(this)),Math.abs(Math.abs(this.lat0)-T)1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var i=this.tilt,t=this.azi;this.cg=Math.cos(t),this.sg=Math.sin(t),this.cw=Math.cos(i),this.sw=Math.sin(i)}function kw(i){i.x-=this.long0;var t=Math.sin(i.y),e=Math.cos(i.y),n=Math.cos(i.x),s,r;switch(this.mode){case Kt.OBLIQ:r=this.sinph0*t+this.cosph0*e*n;break;case Kt.EQUIT:r=e*n;break;case Kt.S_POLE:r=-t;break;case Kt.N_POLE:r=t;break}switch(r=this.pn1/(this.p-r),s=r*e*Math.sin(i.x),this.mode){case Kt.OBLIQ:r*=this.cosph0*t-this.sinph0*e*n;break;case Kt.EQUIT:r*=t;break;case Kt.N_POLE:r*=-(e*n);break;case Kt.S_POLE:r*=e*n;break}var a,o;return a=r*this.cg+s*this.sg,o=1/(a*this.sw*this.h1+this.cw),s=(s*this.cg-r*this.sg)*this.cw*o,r=a*o,i.x=s*this.a,i.y=r*this.a,i}function Gw(i){i.x/=this.a,i.y/=this.a;var t={x:i.x,y:i.y},e,n,s;s=1/(this.pn1-i.y*this.sw),e=this.pn1*i.x*s,n=this.pn1*i.y*this.cw*s,i.x=e*this.cg+n*this.sg,i.y=n*this.cg-e*this.sg;var r=ue(i.x,i.y);if(Math.abs(r)1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,this.es!==0){var i=1-this.es,t=1/i;this.radius_p=Math.sqrt(i),this.radius_p2=i,this.radius_p_inv2=t,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")}function Uw(i){var t=i.x,e=i.y,n,s,r,a;if(t=t-this.long0,this.shape==="ellipse"){e=Math.atan(this.radius_p2*Math.tan(e));var o=this.radius_p/ue(this.radius_p*Math.cos(e),Math.sin(e));if(s=o*Math.cos(t)*Math.cos(e),r=o*Math.sin(t)*Math.cos(e),a=o*Math.sin(e),(this.radius_g-s)*s-r*r-a*a*this.radius_p_inv2<0)return i.x=Number.NaN,i.y=Number.NaN,i;n=this.radius_g-s,this.flip_axis?(i.x=this.radius_g_1*Math.atan(r/ue(a,n)),i.y=this.radius_g_1*Math.atan(a/n)):(i.x=this.radius_g_1*Math.atan(r/n),i.y=this.radius_g_1*Math.atan(a/ue(r,n)))}else this.shape==="sphere"&&(n=Math.cos(e),s=Math.cos(t)*n,r=Math.sin(t)*n,a=Math.sin(e),n=this.radius_g-s,this.flip_axis?(i.x=this.radius_g_1*Math.atan(r/ue(a,n)),i.y=this.radius_g_1*Math.atan(a/n)):(i.x=this.radius_g_1*Math.atan(r/n),i.y=this.radius_g_1*Math.atan(a/ue(r,n))));return i.x=i.x*this.a,i.y=i.y*this.a,i}function jw(i){var t=-1,e=0,n=0,s,r,a,o;if(i.x=i.x/this.a,i.y=i.y/this.a,this.shape==="ellipse"){this.flip_axis?(n=Math.tan(i.y/this.radius_g_1),e=Math.tan(i.x/this.radius_g_1)*ue(1,n)):(e=Math.tan(i.x/this.radius_g_1),n=Math.tan(i.y/this.radius_g_1)*ue(1,e));var h=n/this.radius_p;if(s=e*e+h*h+t*t,r=2*this.radius_g*t,a=r*r-4*s*this.C,a<0)return i.x=Number.NaN,i.y=Number.NaN,i;o=(-r-Math.sqrt(a))/(2*s),t=this.radius_g+o*t,e*=o,n*=o,i.x=Math.atan2(e,t),i.y=Math.atan(n*Math.cos(i.x)/t),i.y=Math.atan(this.radius_p_inv2*Math.tan(i.y))}else if(this.shape==="sphere"){if(this.flip_axis?(n=Math.tan(i.y/this.radius_g_1),e=Math.tan(i.x/this.radius_g_1)*Math.sqrt(1+n*n)):(e=Math.tan(i.x/this.radius_g_1),n=Math.tan(i.y/this.radius_g_1)*Math.sqrt(1+e*e)),s=e*e+n*n+t*t,r=2*this.radius_g*t,a=r*r-4*s*this.C,a<0)return i.x=Number.NaN,i.y=Number.NaN,i;o=(-r-Math.sqrt(a))/(2*s),t=this.radius_g+o*t,e*=o,n*=o,i.x=Math.atan2(e,t),i.y=Math.atan(n*Math.cos(i.x)/t)}return i.x=i.x+this.long0,i}var Xw=["Geostationary Satellite View","Geostationary_Satellite","geos"];const qw={init:Bw,forward:Uw,inverse:jw,names:Xw};var Tr=1.340264,Ar=-.081106,Lr=893e-6,Pr=.003796,No=Math.sqrt(3)/2;function Yw(){this.es=0,this.long0=this.long0!==void 0?this.long0:0}function Vw(i){var t=N(i.x-this.long0),e=i.y,n=Math.asin(No*Math.sin(e)),s=n*n,r=s*s*s;return i.x=t*Math.cos(n)/(No*(Tr+3*Ar*s+r*(7*Lr+9*Pr*s))),i.y=n*(Tr+Ar*s+r*(Lr+Pr*s)),i.x=this.a*i.x+this.x0,i.y=this.a*i.y+this.y0,i}function $w(i){i.x=(i.x-this.x0)/this.a,i.y=(i.y-this.y0)/this.a;var t=1e-9,e=12,n=i.y,s,r,a,o,h,l;for(l=0;l=T?this.cphi1=0:this.cphi1=1/Math.tan(this.phi1),this.inverse=eS,this.forward=tS)}function Jw(i){var t=N(i.x-(this.long0||0)),e=i.y,n,s,r;return n=this.am1+this.m1-nr(e,s=Math.sin(e),r=Math.cos(e),this.en),s=r*t/(n*Math.sqrt(1-this.es*s*s)),i.x=n*Math.sin(s),i.y=this.am1-n*Math.cos(s),i.x=this.a*i.x+(this.x0||0),i.y=this.a*i.y+(this.y0||0),i}function Qw(i){i.x=(i.x-(this.x0||0))/this.a,i.y=(i.y-(this.y0||0))/this.a;var t,e,n,s;if(e=ue(i.x,i.y=this.am1-i.y),s=_c(this.am1+this.m1-e,this.es,this.en),(t=Math.abs(s))Qr?(i.x=s*Math.sin(n=t*Math.cos(e)/s),i.y=this.cphi1-s*Math.cos(n)):i.x=i.y=0,i.x=this.a*i.x+(this.x0||0),i.y=this.a*i.y+(this.y0||0),i}function eS(i){i.x=(i.x-(this.x0||0))/this.a,i.y=(i.y-(this.y0||0))/this.a;var t,e,n=ue(i.x,i.y=this.cphi1-i.y);if(e=this.cphi1+this.phi1-n,Math.abs(e)>T)throw new Error;return Math.abs(Math.abs(e)-T)<=Qr?t=0:t=n*Math.atan2(i.x,i.y)/Math.cos(e),i.x=N(t+(this.long0||0)),i.y=cn(e),i}var iS=["bonne","Bonne (Werner lat_1=90)"];const nS={init:Hw,names:iS};function sS(i){i.Proj.projections.add(co),i.Proj.projections.add(uo),i.Proj.projections.add(JE),i.Proj.projections.add(hM),i.Proj.projections.add(gM),i.Proj.projections.add(vM),i.Proj.projections.add(CM),i.Proj.projections.add(AM),i.Proj.projections.add(NM),i.Proj.projections.add(WM),i.Proj.projections.add(n2),i.Proj.projections.add(l2),i.Proj.projections.add(g2),i.Proj.projections.add(x2),i.Proj.projections.add(C2),i.Proj.projections.add(A2),i.Proj.projections.add(N2),i.Proj.projections.add(W2),i.Proj.projections.add(Y2),i.Proj.projections.add(H2),i.Proj.projections.add(iw),i.Proj.projections.add(ow),i.Proj.projections.add(dw),i.Proj.projections.add(yw),i.Proj.projections.add(Mw),i.Proj.projections.add(Aw),i.Proj.projections.add(Nw),i.Proj.projections.add(Ww),i.Proj.projections.add(qw),i.Proj.projections.add(Zw),i.Proj.projections.add(nS)}fe.defaultDatum="WGS84";fe.Proj=ti;fe.WGS84=new fe.Proj("WGS84");fe.Point=$s;fe.toPoint=Gg;fe.defs=ee;fe.nadgrid=tE;fe.transform=Po;fe.mgrs=mE;fe.version="__VERSION__";sS(fe);function rS(i){for(const[t,e]of Object.entries(i))fe.defs(t,e);gx(fe)}const aS=1,Fo=_t.createContext(aS);Fo.displayName="LevelContext";function kC(i){const{title:t,sectionHeadingProps:e,children:n}=i,s=_t.useContext(Fo),r=typeof t=="string"?se.jsx(oS,{...e,children:t}):t;return se.jsxs(se.Fragment,{children:[r,se.jsx(Fo.Provider,{value:s+1,children:n})]})}const oS=_t.forwardRef(function(t,e){const{children:n,...s}=t,r=hS(),a=lS(r);return se.jsx(rd,{as:a,ref:e,...s,children:n})});function hS(){const i=_t.useContext(Fo);return Math.min(i,6)}function lS(i){return`h${i}`}var Zg={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames -*/(function(i){(function(){var t={}.hasOwnProperty;function e(){for(var r="",a=0;a`(${u} + ${d}px)`,c={};switch(i){case"top-left":c.left=l(dl.ref,r),c.top=l(gl.ref,o);break;case"top-right":c.right=l(fl.ref,r),c.top=l(gl.ref,o);break;case"bottom-left":c.left=l(dl.ref,r),c.bottom=l(_l.ref,o+h.gap);break;case"bottom-right":c.right=l(fl.ref,r),c.bottom=l(_l.ref,o+h.gap);break}for(const[u,d]of Object.entries(c))n[u]=`calc(${d})`;return n.maxH=`calc((100%) - ${so(c.top,"0px")} - ${so(c.bottom,h.gap+"px")} - ${o}px - ${h.space}px)`,n.maxW=`calc((100%) - ${so(c.left,"0px")} - ${so(c.right,"0px")} - ${r}px)`,n}function so(i,t){return i??t}const vc=_t.createContext(void 0);vc.displayName="MapContainerContext";const fS=vc.Provider;function gS(){const i=_t.useContext(vc);if(!i)throw new Error("Map container context is not available. The component must be a child of the component.");return i}const _S="top-right";function GC(i){const{position:t=_S,children:e,horizontalGap:n,verticalGap:s}=i,{containerProps:r}=Hg("map-anchor",i),{mapAnchorsHost:a}=gS();return y0.createPortal(se.jsx(pl,{...r,...dS(t,n,s),children:e}),a)}function mS(i){return{gap:i===void 0?30:0,space:10}}function yS(i,t,e){const n=_t.useContext(nd);return _t.useMemo(()=>Jg("useService",n).getService(i,t,e??{}),[n,i,t,e])}function zC(i){const t=_t.useContext(nd);return Jg("useIntl",t).getIntl(i)}function Jg(i,t){if(!t)throw new p0(v0.INTERNAL,`"Failed to access package context from '${i}': react integration was not set up properly.`);return t}const pS="@open-pioneer/map",vS=yS.bind(void 0,pS);function xS(){var i=_t.useRef(!1),t=_t.useCallback(function(){return i.current},[]);return _t.useEffect(function(){return i.current=!0,function(){i.current=!1}},[]),t}function ES(i,t,e){t===void 0&&(t=[]),e===void 0&&(e={loading:!1});var n=_t.useRef(0),s=xS(),r=_t.useState(e),a=r[0],o=r[1],h=_t.useCallback(function(){for(var l=[],c=0;ct.isBaseLayer)}getActiveBaseLayer(){return v(this,Fe).value}activateBaseLayer(t){let e;if(t!=null){if(e=v(this,Re).get(t),!(e instanceof Xs))return zi.warn(`Cannot activate base layer '${t}: layer has an invalid type.'`),!1;if(!e)return zi.warn(`Cannot activate base layer '${t}': layer is unknown.`),!1;if(!e.isBaseLayer)return zi.warn(`Cannot activate base layer '${t}': layer is not a base layer.`),!1}return B(this,de,fo).call(this,e),!0}getOperationalLayers(t){return this.getAllLayers(t).filter(e=>!e.isBaseLayer)}getAllLayers(t){const e=Array.from(v(this,Yi).values());return t?.sortByDisplayOrder&&bS(e),e}getLayerById(t){return v(this,Re).get(t)}removeLayerById(t){const e=v(this,Re).get(t);if(!e){zi.isDebug()&&zi.debug(`Cannot remove layer '${t}': layer is unknown.`);return}B(this,de,t0).call(this,e)}getLayerByRawInstance(t){return v(this,Vi)?.get(t)}}Pn=new WeakMap,Yi=new WeakMap,Re=new WeakMap,Vi=new WeakMap,Fe=new WeakMap,ko=new WeakMap,de=new WeakSet,Qg=function(t){B(this,de,e0).call(this,t);const e=t.olLayer;t.isBaseLayer?(e.setZIndex(wS),!v(this,Fe).value&&t.visible?B(this,de,fo).call(this,t):t.__setVisible(!1)):(e.setZIndex(Tc(this,ko)._++),t.__setVisible(t.visible)),v(this,Yi).add(t),v(this,Pn).olMap.addLayer(e)},t0=function(t){if(!v(this,Yi).has(t)){zi.warn(`Cannot remove layer '${t.id}': only top level layers can be removed at this time.`);return}if(!(t instanceof Xs))throw new Error("Internal error: expected top level layer to be an instance of AbstractLayer.");if(v(this,Pn).olMap.removeLayer(t.olLayer),v(this,Yi).delete(t),B(this,de,i0).call(this,t),v(this,Fe).value===t){const e=this.getBaseLayers()[0];e&&Hu(e),B(this,de,fo).call(this,e)}t.destroy()},fo=function(t){if(v(this,Fe).value!==t){if(zi.isDebug()){const e=n=>n?`'${n.id}'`:void 0;zi.debug(`Switching active base layer from ${e(v(this,Fe).value)} to ${e(t)}`)}Ml(()=>{v(this,Fe).value?.__setVisible(!1),v(this,Fe).value=t,t?.__setVisible(!0)})}},e0=function(t){const e=[],n=s=>{const r=s.id,a="olLayer"in s?s.olLayer:void 0;if(v(this,Re).has(r))throw new Error(`Layer id '${r}' is not unique. Either assign a unique id yourself or skip configuring 'id' for an automatically generated id.`);if(a&&v(this,Vi).has(a))throw new Error("OlLayer has already been used in this or another layer.");v(this,Re).set(r,s),a&&v(this,Vi).set(a,s),e.push([r,a]);for(const o of s.layers?.__getRawLayers()??[])n(o);for(const o of s.sublayers?.__getRawSublayers()??[])n(o)};try{n(t)}catch(s){for(const[r,a]of e)v(this,Re).delete(r),a&&v(this,Vi).delete(a);throw s}},i0=function(t){const e=n=>{"olLayer"in n&&v(this,Vi).delete(n.olLayer),v(this,Re).delete(n.id);for(const s of n.layers?.__getRawLayers()??[])e(s);for(const s of n.sublayers?.__getRawSublayers()??[])e(s)};e(t)};function bS(i){i.sort((t,e)=>{const n=t.olLayer.getZIndex()??1,s=e.olLayer.getZIndex()??1;return n!==s?n-s:0})}function Hu(i){if(!(i instanceof Xs))throw new Error("Layer is not a valid layer instance. Use one of the classes provided by the map package instead.")}const Ju="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAuCAYAAABXuSs3AAAAAXNSR0IArs4c6QAABFlJREFUaEPtmG2IFVUYx//PXNcllVpo75zx1uLuuQu29sVYyMJeEEwKkqAyKiwCK7+GBUtJ1IfQpZC+9gKCRUUkJWREVBQUSgpGIJT7Mtfdbuuc2WsFpS117zwxl1UutjvznJkxEJxv987/+T+/eeacZ845hEv0okuUG5fBO9/cRKXSR1Hkxf+x4wSDMzM/F/1mC6l4rVz2mGgriO4GcPtCkAx8BeaDBLyjw9DkfZBc4IFSy88SjYD5aQDLhDBniPnlJUuXvtJXr/8ljPmPLDP4RLk86DjO5wD6MyUnGisx37XKGD9LfCbwCddd7xB9AuCqLEk7Yn7nKNpcnZ391tbHGvzkypVDURQdBbDcNtki+j+51RquNhpjNn5W4Ccqld6uZvN7EF1rk0SgrZW6u4dXTU//JtC2JVbgvue9BeZHpOY2OgL2DhizTRojBp9SSreAcQCO1NxS14yiaGhwdnZCEicG9z1vD5h3SEyZ+VMQtccsEa0G852SOAJGB4x5VqiVyABfqUkAOkX9I5gf0mH4Q6euVi6vZcd5F8BQWrw2Zo2ESFTxcc+7vsR8PMXwTFQqDS32eR933WqJKH6gxG7kALrfmFoavAi8ptSDDLyXYvaSNub5JM2kUqMEjCRpmPm+ahh+WAi4r9QTAN5INCPaooNgfwr4w/FaJUlDRI8NBMG+YsBd90kQvZ5YKWBj1ZgvkzS+624C0WcpPtuqxuwtBtzz7gfzB4lmzM/oMNyTpKl53ggzjyZpHOZ7+8Pwo0LAa0rdxMDhvB3Bd92fELfHhMtxnOH+U6eOFQIem/hKcZoZgJ3amF0L6Wqu+wITvZjiMaeNuUKQR/7J95WKV3Dr00wZOEBEu2lubmzJihXOP83mIJifA3BPWiyAL7Qxdwh0cvBJ191BRIljWJIwZZ5s12GY3L3mDUR9PNZO9/ZWmqXSL7nhEgy6urqu7qvXf5XkEIPPj/N4x7NRYmytYd6vw3CLNM4O3PMeAPP7UnMrHfMmHYZxYUSXFTgDTk2pEwAGRe5y0RFtzDq53HIjERsL1y02DPHSd8NAEHxtE2RV8XPGvucdA/MNNokStAe1MZttvTKBn3TdmyOiQ7bJFtJzq7XadqMc+2QCb3cYz9sH5kdzwu/SxuzM4pEZfEIp1wHi7VnWs5UpbUy2w6Q8FW9PVNfdzkSvZakYLNvfhTkyV7xjon4D5lus4Ine1kGQa5jlBo+PlJ1WK96PXimCZ67/HUVrrms0/hDpFxHlBo99J5VK3ZKdz0+0TgfBkTzQubrKhYl9pQ4Ilq6pG2rpAxVS8fZE7enpibq7jxNwzSLJD08Zc9sGoCmFS9IVBj7f228E83cLJGx0NZtr+06fLmxZXCh4G16pxwG82QnPUXRrljPw/63i5xJNKvUqAU/Fv5l5azUME89Ssgydwit+vr8r9TEDh6rG7M4ClhZz0cBnKpVllZmZs2kAWe9fNPCsQNK4y+DSShWl+xdy+nM+UkBLWAAAAABJRU5ErkJggg==",IS=17,TS=20,AS={top:50,right:20,bottom:10,left:20};var _a,ml;class LS{constructor(t){O(this,_a);cr(this,"olMap");cr(this,"olLayer");cr(this,"olSource");cr(this,"activeHighlights");this.olMap=t,this.olSource=new Nv({features:void 0}),this.olLayer=new Av({className:"highlight-layer",source:this.olSource,style:function(e,n){return DS(e,n)}}),this.activeHighlights=new Set,this.olLayer.setZIndex(CS),this.olMap.addLayer(this.olLayer)}getLayer(){return this.olLayer}destroy(){this.clearHighlight()}addHighlight(t,e){const n=B(this,_a,ml).call(this,t);if(n.length===0)return{get isActive(){return!1},destroy(){}};const s=n.map(h=>{const l=h.getType(),c=new sc({type:l,geometry:h});return c.setStyle(NS(l,e?.highlightStyle)),c}),r=this.olSource,a=this.activeHighlights,o={get isActive(){return a.has(o)},destroy(){if(this.isActive){for(const h of s)r.removeFeature(h);a.delete(o)}}};return r.addFeatures(s),this.activeHighlights.add(o),o}zoomToHighlight(t,e){const n=B(this,_a,ml).call(this,t);if(n.length===0)return;let s=ve();for(const f of n)s=Od(s,f.getExtent());const r=Ae(s),o=yo(s)===0?e?.pointZoom??IS:e?.maxZoom??TS;PS(this.olMap,r);const{top:h=0,right:l=0,bottom:c=0,left:u=0}=e?.viewPadding??AS,d=[h,l,c,u];OS(this.olMap,s,o,d)}addHighlightAndZoom(t,e){const n=this.addHighlight(t,e);return this.zoomToHighlight(t,e),n}clearHighlight(){for(const t of this.activeHighlights)t.destroy()}}_a=new WeakSet,ml=function(t){const e=[];return t.forEach(n=>{"getType"in n&&e.push(n),"geometry"in n&&n.geometry&&e.push(n.geometry)}),e};function PS(i,t){t&&t.length&&i.getView().setCenter(t)}function OS(i,t,e,n){t?i.getView().fit(t,{maxZoom:e,padding:n}):e&&i.getView().setZoom(e)}function DS(i,t){const e=i.get("type");return tg(yl(e))(i,t)}function NS(i,t){if(t&&i in t){const n=t[i];return n||yl(i)}else return yl(i)}function yl(i){return i in Nh?Nh[i]:Nh.Polygon}const Nh={Point:new Tt({image:new Vs({anchor:[.5,1],src:Ju})}),MultiPoint:new Tt({image:new Vs({anchor:[.5,1],src:Ju})}),LineString:[new Tt({stroke:new ie({color:"#fff",width:5})}),new Tt({stroke:new ie({color:"#00ffff",width:3})})],MultiLineString:[new Tt({stroke:new ie({color:"#fff",width:5})}),new Tt({stroke:new ie({color:"#00ffff",width:3})})],Polygon:[new Tt({stroke:new ie({color:"#fff",width:5})}),new Tt({stroke:new ie({color:"#00ffff",width:3}),fill:new Ri({color:"rgba(224,255,255,0.35)"})})],MultiPolygon:[new Tt({stroke:new ie({color:"#fff",width:5})}),new Tt({stroke:new ie({color:"#00ffff",width:3}),fill:new Ri({color:"rgba(224,255,255,0.35)"})})]},Zn=bi("map:MapModel");var ma,Xe,ya,yi,pa,Fs,ks,Ki,On,va,$i,pi,Go,s0;class n0 extends sd{constructor(e){super();O(this,Go);O(this,ma);O(this,Xe);O(this,ya,new RS(this));O(this,yi);O(this,pa);O(this,Fs,!1);O(this,ks);O(this,Ki,Zt());O(this,On);O(this,va,new AbortController);O(this,$i);O(this,pi);W(this,ma,e.id),W(this,Xe,e.olMap),v(this,Ki).value=e.initialExtent,W(this,pa,{httpService:e.httpService}),W(this,yi,new LS(v(this,Xe))),W(this,$i,"waiting"),B(this,Go,s0).call(this).then(()=>{W(this,$i,"ready"),v(this,pi)?.resolve(),W(this,pi,void 0)},n=>{Dr(n)||Zn.error("Failed to initialize map",n),W(this,$i,"error"),v(this,pi)?.reject(new Error("Failed to initialize map.")),W(this,pi,void 0)}),W(this,ks,gd(()=>v(this,Xe).getTargetElement()??void 0)),W(this,On,v(this,Xe).on("change:target",v(this,ks).trigger))}destroy(){if(!v(this,Fs)){W(this,Fs,!0);try{this.emit("destroy")}catch(e){Zn.warn("Unexpected error from event listener during map model destruction:",e)}v(this,On)&&Nn(v(this,On)),W(this,On,void 0),v(this,va).abort(),v(this,pi)?.reject(new Error("Map model was destroyed.")),v(this,ya).destroy(),v(this,yi).destroy(),v(this,Xe).dispose()}}get id(){return v(this,ma)}get olMap(){return v(this,Xe)}get layers(){return v(this,ya)}get container(){return v(this,ks).value}get initialExtent(){return v(this,Ki).value}get __sharedDependencies(){return v(this,pa)}highlight(e,n){return v(this,yi).addHighlight(e,n)}zoom(e,n){v(this,yi).zoomToHighlight(e,n)}highlightAndZoom(e,n){return v(this,yi).addHighlightAndZoom(e,n??{})}removeHighlights(){v(this,yi).clearHighlight()}whenDisplayed(){return v(this,Fs)?Promise.reject(new Error("Map model was destroyed.")):v(this,$i)==="error"?Promise.reject(new Error("Failed to initialize map.")):v(this,$i)==="ready"?Promise.resolve():(v(this,pi)??W(this,pi,x0())).promise}}ma=new WeakMap,Xe=new WeakMap,ya=new WeakMap,yi=new WeakMap,pa=new WeakMap,Fs=new WeakMap,ks=new WeakMap,Ki=new WeakMap,On=new WeakMap,va=new WeakMap,$i=new WeakMap,pi=new WeakMap,Go=new WeakSet,s0=async function(){try{await FS(this.olMap,v(this,va).signal)}catch(e){throw Dr(e)?e:new Error("Failed to wait for the map to be displayed.",{cause:e})}try{const n=v(this,Xe).getView();if(v(this,Ki).value){const s=v(this,Ki).value,r=[s.xMin,s.yMin,s.xMax,s.yMax],a=Ae(r),o=n.getResolutionForExtent(r);Zn.debug("Applying initial extent",s),Zn.debug(" Computed center:",a),Zn.debug(" Computed resolution:",o),n.setCenter(a),n.setResolution(o)}else{const s=n.calculateExtent(),[r=0,a=0,o=0,h=0]=s,l={xMin:r,yMin:a,xMax:o,yMax:h};Zn.debug("Detected initial extent",l),v(this,Ki).value=l}}catch(e){throw new Error("Failed to apply the initial extent.",{cause:e})}};function FS(i,t){return new Promise((n,s)=>{let r;function a(){const l=i.getSize()??[],[c=0,u=0]=l;l&&c>0&&u>0&&h()}function o(){h(Lc())}function h(l){r&&(Nn(r),r=void 0),t.removeEventListener("abort",o),l?s(l):n(kS(25))}if(t.aborted){h(Lc());return}t.addEventListener("abort",o),r=i.on("change:size",a)})}function kS(i){return new Promise(t=>setTimeout(t,i))}const xc=_t.createContext(void 0);xc.displayName="DefaultMapContext";function WC(i){const{mapId:t,map:e,children:n}=i,s=_t.useMemo(()=>({mapId:t,map:e}),[t,e]);if(t!=null&&e!=null)throw new Error("Cannot specify both 'mapId' and 'map' in DefaultMapProvider at the same time.");if(t==null&&e==null)throw new Error("Either 'mapId' or 'map' must be specified in DefaultMapProvider.");return se.jsx(xc.Provider,{value:s,children:n})}function GS(){return _t.useContext(xc)}function zS(i){const t=WS(i),e=vS("map.MapRegistry"),n=MS(async()=>typeof t=="string"?await e.expectMapModel(t):Promise.resolve(t),[e,t]);return _t.useMemo(()=>n.loading?{kind:"loading"}:n.error?{kind:"rejected",error:n.error}:{kind:"resolved",map:n.value},[n])}function WS(i){if(typeof i=="object"&&i.mapId!=null&&i.map!=null)throw new Error("Cannot specify both 'mapId' and 'map' in useMapModel at the same time.");if(i instanceof n0)throw new Error("Map model instances cannot be passed directly to 'useMapModel' (see TypeScript signature).");const t=_t.useMemo(()=>i==null?{}:typeof i=="string"?{mapId:i}:{mapId:i.mapId,map:i.map},[...typeof i=="string"||i==null?[i]:[i.mapId,i.map]]),e=GS(),n=Qu(t)??Qu(e);if(n==null)throw new Error("No map specified. You must either specify the map (or its id) via a DefaultMapProvider parent or configure it explicitly.");return n}function Qu(i){return i?.map??i?.mapId}const En=bi("map:MapContainer");function BC(i){const{viewPadding:t,viewPaddingChangeBehavior:e,children:n,role:s,"aria-label":r,"aria-labelledby":a}=i,{containerProps:o}=Hg("map-container",i),h=_t.useRef(null),l=_t.useRef(null),c=zS(i),u=c.map,[d,f]=_t.useState(!1);_t.useEffect(()=>{if(c.kind!=="loading"){if(c.kind==="rejected"){En.error("Cannot display the map. Caused by ",c.error);return}if(!u){En.error("No configuration available for the configured map.");return}if(h.current){const _=US(u,h.current);return()=>_?.destroy()}}},[c,u]),_t.useEffect(()=>{f(!0)},[]);const g=_t.useMemo(()=>({height:"100%",position:"relative",[gl.definition]:t?.top!=null?t.top+"px":"0px",[_l.definition]:t?.bottom!=null?t.bottom+"px":"0px",[dl.definition]:t?.left!=null?t.left+"px":"0px",[fl.definition]:t?.right!=null?t.right+"px":"0px"}),[t]);return se.jsxs(Or.div,{...o,role:s,"aria-label":r,"aria-labelledby":a,ref:h,style:g,tabIndex:0,children:[d&&u&&se.jsx(BS,{olMap:u.olMap,mapAnchorsHost:l.current,viewPadding:t,viewPaddingChangeBehavior:e,children:n}),se.jsx(Or.div,{ref:l,className:"map-anchors"})]})}function BS(i){const{olMap:t,mapAnchorsHost:e,viewPadding:n,viewPaddingChangeBehavior:s="preserve-center",children:r}=i,a=_t.useMemo(()=>({left:n?.left??0,right:n?.right??0,top:n?.top??0,bottom:n?.bottom??0}),[n]);_t.useEffect(()=>{const h=t?.getView();if(!t||!h)return;const l=h.getCenter(),c=XS(h.padding),u=jS(t,c);switch(h.padding=qS(a),s){case"preserve-center":h.animate({center:l,duration:300});break;case"preserve-extent":{u&&h.animate({center:l,resolution:h.getResolutionForExtent(u),duration:300});break}}},[a,t,s]);const o=_t.useMemo(()=>({mapAnchorsHost:e}),[e]);return se.jsx(fS,{value:o,children:r})}function US(i,t){const e=i.id,n=i.olMap;if(n.getTarget()){En.error("Failed to display the map: the map already has a target. There may be more than one .");return}En.isDebug()&&En.debug(`Setting target of map '${e}':`,t),n.setTarget(t);let s=!1;return{destroy(){s||(En.isDebug()&&En.debug(`Removing target of map '${e}':`,t),n.setTarget(void 0),s=!0)}}}function jS(i,t){const e=i.getSize();if(!e||e.length<2)return;const[n,s]=e,r=i.getCoordinateFromPixel([t.left,t.bottom]),a=i.getCoordinateFromPixel([Math.max(0,n-t.right),Math.max(0,s-t.top)]);if(!r||!a)return;const[o,h]=r,[l,c]=a;return[o,h,l,c]}function XS(i){return{top:i?.[0]??0,right:i?.[1]??0,bottom:i?.[2]??0,left:i?.[3]??0}}function qS(i){const{top:t,right:e,bottom:n,left:s}=i;return[t,e,n,s]}class YS extends Zf{constructor(t){t=t||{};const e=t.projection!==void 0?t.projection:"EPSG:3857",n=t.tileGrid!==void 0?t.tileGrid:Bp({extent:ic(e),maxResolution:t.maxResolution,maxZoom:t.maxZoom,minZoom:t.minZoom,tileSize:t.tileSize});super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,opaque:t.opaque,projection:e,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:n,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX!==void 0?t.wrapX:!0,transition:t.transition,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.gutter_=t.gutter!==void 0?t.gutter:0}getGutter(){return this.gutter_}}const VS='©
OpenStreetMap contributors.';class KS extends YS{constructor(t){t=t||{};let e;t.attributions!==void 0?e=t.attributions:e=[VS];const n=t.crossOrigin!==void 0?t.crossOrigin:"anonymous",s=t.url!==void 0?t.url:"https://tile.openstreetmap.org/{z}/{x}/{y}.png";super({attributions:e,attributionsCollapsible:!1,cacheSize:t.cacheSize,crossOrigin:n,interpolate:t.interpolate,maxZoom:t.maxZoom!==void 0?t.maxZoom:19,opaque:t.opaque!==void 0?t.opaque:!0,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileLoadFunction:t.tileLoadFunction,transition:t.transition,url:s,wrapX:t.wrapX,zDirection:t.zDirection})}}var xa,zo,r0;class UC{constructor(t){O(this,zo);O(this,xa);W(this,xa,t.references.interceptors.map((e,n)=>[t.referencesMeta.interceptors[n].serviceId,e]))}async fetch(t,e){const n=e?.signal??void 0,s=Object.assign({},e?.context),r=ZS(e);Fh(n);let a=$S(t);{const h={target:a,signal:n??new AbortController().signal,context:s,options:r};Fh(n),await B(this,zo,r0).call(this,h),a=h.target}const o=new Request(a,{...r,signal:n});return await window.fetch(o)}}xa=new WeakMap,zo=new WeakSet,r0=async function(t){const{signal:e}=t;for(const[n,s]of v(this,xa))if(Fh(e),s.beforeRequest)try{await s.beforeRequest(t)}catch(r){throw E0(r),new Error(`Interceptor '${n}' failed with an error`,{cause:r})}};function $S(i){return typeof i=="string"?new URL(i,window.location.href):i}function ZS(i){const t=i?.method??"GET",e=new Headers(i?.headers??{}),n={...i,method:t,headers:e};for(const s in n)HS[s]&&delete n[s];return n}const HS={context:1,signal:1};function Fh(i){i?.aborted&&M0()}rS({"EPSG:25832":"+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +type=crs","EPSG:25833":"+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +type=crs"});const kh=bi("map:createMapModel");async function JS(i,t,e){return await new QS(i,t,e).createMapModel()}class QS{mapId;mapConfig;httpService;constructor(t,e,n){this.mapId=t,this.mapConfig=e,this.httpService=n}async createMapModel(){const t=this.mapId,e=this.mapConfig,{view:n,...s}=e.advanced??{},r={...s};if(r.controls||(r.controls=[new pg({collapsible:!1})]),!r.interactions){const u=d=>{const f=d.originalEvent;return(f.metaKey||f.ctrlKey)&&f.shiftKey};r.interactions=Sg({dragPan:!0,altShiftDragRotate:!1,pinchRotate:!1,mouseWheelZoom:!0}).extend([new wg({out:!0,condition:u})])}const a=await n??{};this.initializeViewOptions(a),r.view=a instanceof Ie?a:new Ie(a),!r.layers&&!e.layers&&(r.layers=[new Xf({source:new KS})]);const o=e.initialView,h=o?.kind==="extent"?o.extent:void 0;kh.debug("Constructing OpenLayers map with options",r);const l=new cx(r),c=new n0({id:t,olMap:l,initialExtent:h,httpService:this.httpService});try{if(e.layers)for(const u of e.layers)c.layers.addLayer(u);return c}catch(u){throw c.destroy(),u}}initializeViewOptions(t){const e=this.mapId,n=this.mapConfig;if(t instanceof Ie){const a=o=>{kh.warn(`The advanced configuration for map id '${e}' has provided a fully constructed view instance: ${o} cannot be applied. +*/(function(i){(function(){var t={}.hasOwnProperty;function e(){for(var r="",a=0;a`(${u} + ${d}px)`,c={};switch(i){case"top-left":c.left=l(dl.ref,r),c.top=l(gl.ref,o);break;case"top-right":c.right=l(fl.ref,r),c.top=l(gl.ref,o);break;case"bottom-left":c.left=l(dl.ref,r),c.bottom=l(_l.ref,o+h.gap);break;case"bottom-right":c.right=l(fl.ref,r),c.bottom=l(_l.ref,o+h.gap);break}for(const[u,d]of Object.entries(c))n[u]=`calc(${d})`;return n.maxH=`calc((100%) - ${so(c.top,"0px")} - ${so(c.bottom,h.gap+"px")} - ${o}px - ${h.space}px)`,n.maxW=`calc((100%) - ${so(c.left,"0px")} - ${so(c.right,"0px")} - ${r}px)`,n}function so(i,t){return i??t}const vc=_t.createContext(void 0);vc.displayName="MapContainerContext";const fS=vc.Provider;function gS(){const i=_t.useContext(vc);if(!i)throw new Error("Map container context is not available. The component must be a child of the component.");return i}const _S="top-right";function GC(i){const{position:t=_S,children:e,horizontalGap:n,verticalGap:s}=i,{containerProps:r}=Hg("map-anchor",i),{mapAnchorsHost:a}=gS();return y0.createPortal(se.jsx(pl,{...r,...dS(t,n,s),children:e}),a)}function mS(i){return{gap:i===void 0?30:0,space:10}}function yS(i,t,e){const n=_t.useContext(nd);return _t.useMemo(()=>Jg("useService",n).getService(i,t,e??{}),[n,i,t,e])}function zC(i){const t=_t.useContext(nd);return Jg("useIntl",t).getIntl(i)}function Jg(i,t){if(!t)throw new p0(v0.INTERNAL,`"Failed to access package context from '${i}': react integration was not set up properly.`);return t}const pS="@open-pioneer/map",vS=yS.bind(void 0,pS);function xS(){var i=_t.useRef(!1),t=_t.useCallback(function(){return i.current},[]);return _t.useEffect(function(){return i.current=!0,function(){i.current=!1}},[]),t}function ES(i,t,e){t===void 0&&(t=[]),e===void 0&&(e={loading:!1});var n=_t.useRef(0),s=xS(),r=_t.useState(e),a=r[0],o=r[1],h=_t.useCallback(function(){for(var l=[],c=0;ct.isBaseLayer)}getActiveBaseLayer(){return v(this,Fe).value}activateBaseLayer(t){let e;if(t!=null){if(e=v(this,Re).get(t),!(e instanceof Xs))return zi.warn(`Cannot activate base layer '${t}: layer has an invalid type.'`),!1;if(!e)return zi.warn(`Cannot activate base layer '${t}': layer is unknown.`),!1;if(!e.isBaseLayer)return zi.warn(`Cannot activate base layer '${t}': layer is not a base layer.`),!1}return B(this,de,fo).call(this,e),!0}getOperationalLayers(t){return this.getAllLayers(t).filter(e=>!e.isBaseLayer)}getAllLayers(t){const e=Array.from(v(this,Yi).values());return t?.sortByDisplayOrder&&bS(e),e}getLayerById(t){return v(this,Re).get(t)}removeLayerById(t){const e=v(this,Re).get(t);if(!e){zi.isDebug()&&zi.debug(`Cannot remove layer '${t}': layer is unknown.`);return}B(this,de,t0).call(this,e)}getLayerByRawInstance(t){return v(this,Vi)?.get(t)}}Pn=new WeakMap,Yi=new WeakMap,Re=new WeakMap,Vi=new WeakMap,Fe=new WeakMap,ko=new WeakMap,de=new WeakSet,Qg=function(t){B(this,de,e0).call(this,t);const e=t.olLayer;t.isBaseLayer?(e.setZIndex(wS),!v(this,Fe).value&&t.visible?B(this,de,fo).call(this,t):t.__setVisible(!1)):(e.setZIndex(Tc(this,ko)._++),t.__setVisible(t.visible)),v(this,Yi).add(t),v(this,Pn).olMap.addLayer(e)},t0=function(t){if(!v(this,Yi).has(t)){zi.warn(`Cannot remove layer '${t.id}': only top level layers can be removed at this time.`);return}if(!(t instanceof Xs))throw new Error("Internal error: expected top level layer to be an instance of AbstractLayer.");if(v(this,Pn).olMap.removeLayer(t.olLayer),v(this,Yi).delete(t),B(this,de,i0).call(this,t),v(this,Fe).value===t){const e=this.getBaseLayers()[0];e&&Hu(e),B(this,de,fo).call(this,e)}t.destroy()},fo=function(t){if(v(this,Fe).value!==t){if(zi.isDebug()){const e=n=>n?`'${n.id}'`:void 0;zi.debug(`Switching active base layer from ${e(v(this,Fe).value)} to ${e(t)}`)}Ml(()=>{v(this,Fe).value?.__setVisible(!1),v(this,Fe).value=t,t?.__setVisible(!0)})}},e0=function(t){const e=[],n=s=>{const r=s.id,a="olLayer"in s?s.olLayer:void 0;if(v(this,Re).has(r))throw new Error(`Layer id '${r}' is not unique. Either assign a unique id yourself or skip configuring 'id' for an automatically generated id.`);if(a&&v(this,Vi).has(a))throw new Error(`OlLayer used by layer '${r}' has already been used in map.`);v(this,Re).set(r,s),a&&v(this,Vi).set(a,s),e.push([r,a]);for(const o of s.layers?.__getRawLayers()??[])n(o);for(const o of s.sublayers?.__getRawSublayers()??[])n(o)};try{n(t)}catch(s){for(const[r,a]of e)v(this,Re).delete(r),a&&v(this,Vi).delete(a);throw s}},i0=function(t){const e=n=>{"olLayer"in n&&v(this,Vi).delete(n.olLayer),v(this,Re).delete(n.id);for(const s of n.layers?.__getRawLayers()??[])e(s);for(const s of n.sublayers?.__getRawSublayers()??[])e(s)};e(t)};function bS(i){i.sort((t,e)=>{const n=t.olLayer.getZIndex()??1,s=e.olLayer.getZIndex()??1;return n-s})}function Hu(i){if(!(i instanceof Xs))throw new Error("Layer is not a valid layer instance. Use one of the classes provided by the map package instead.")}const Ju="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAuCAYAAABXuSs3AAAAAXNSR0IArs4c6QAABFlJREFUaEPtmG2IFVUYx//PXNcllVpo75zx1uLuuQu29sVYyMJeEEwKkqAyKiwCK7+GBUtJ1IfQpZC+9gKCRUUkJWREVBQUSgpGIJT7Mtfdbuuc2WsFpS117zwxl1UutjvznJkxEJxv987/+T+/eeacZ845hEv0okuUG5fBO9/cRKXSR1Hkxf+x4wSDMzM/F/1mC6l4rVz2mGgriO4GcPtCkAx8BeaDBLyjw9DkfZBc4IFSy88SjYD5aQDLhDBniPnlJUuXvtJXr/8ljPmPLDP4RLk86DjO5wD6MyUnGisx37XKGD9LfCbwCddd7xB9AuCqLEk7Yn7nKNpcnZ391tbHGvzkypVDURQdBbDcNtki+j+51RquNhpjNn5W4Ccqld6uZvN7EF1rk0SgrZW6u4dXTU//JtC2JVbgvue9BeZHpOY2OgL2DhizTRojBp9SSreAcQCO1NxS14yiaGhwdnZCEicG9z1vD5h3SEyZ+VMQtccsEa0G852SOAJGB4x5VqiVyABfqUkAOkX9I5gf0mH4Q6euVi6vZcd5F8BQWrw2Zo2ESFTxcc+7vsR8PMXwTFQqDS32eR933WqJKH6gxG7kALrfmFoavAi8ptSDDLyXYvaSNub5JM2kUqMEjCRpmPm+ahh+WAi4r9QTAN5INCPaooNgfwr4w/FaJUlDRI8NBMG+YsBd90kQvZ5YKWBj1ZgvkzS+624C0WcpPtuqxuwtBtzz7gfzB4lmzM/oMNyTpKl53ggzjyZpHOZ7+8Pwo0LAa0rdxMDhvB3Bd92fELfHhMtxnOH+U6eOFQIem/hKcZoZgJ3amF0L6Wqu+wITvZjiMaeNuUKQR/7J95WKV3Dr00wZOEBEu2lubmzJihXOP83mIJifA3BPWiyAL7Qxdwh0cvBJ191BRIljWJIwZZ5s12GY3L3mDUR9PNZO9/ZWmqXSL7nhEgy6urqu7qvXf5XkEIPPj/N4x7NRYmytYd6vw3CLNM4O3PMeAPP7UnMrHfMmHYZxYUSXFTgDTk2pEwAGRe5y0RFtzDq53HIjERsL1y02DPHSd8NAEHxtE2RV8XPGvucdA/MNNokStAe1MZttvTKBn3TdmyOiQ7bJFtJzq7XadqMc+2QCb3cYz9sH5kdzwu/SxuzM4pEZfEIp1wHi7VnWs5UpbUy2w6Q8FW9PVNfdzkSvZakYLNvfhTkyV7xjon4D5lus4Ine1kGQa5jlBo+PlJ1WK96PXimCZ67/HUVrrms0/hDpFxHlBo99J5VK3ZKdz0+0TgfBkTzQubrKhYl9pQ4Ilq6pG2rpAxVS8fZE7enpibq7jxNwzSLJD08Zc9sGoCmFS9IVBj7f228E83cLJGx0NZtr+06fLmxZXCh4G16pxwG82QnPUXRrljPw/63i5xJNKvUqAU/Fv5l5azUME89Ssgydwit+vr8r9TEDh6rG7M4ClhZz0cBnKpVllZmZs2kAWe9fNPCsQNK4y+DSShWl+xdy+nM+UkBLWAAAAABJRU5ErkJggg==",IS=17,TS=20,AS={top:50,right:20,bottom:10,left:20};var _a,ml;class LS{constructor(t){O(this,_a);cr(this,"olMap");cr(this,"olLayer");cr(this,"olSource");cr(this,"activeHighlights");this.olMap=t,this.olSource=new Nv({features:void 0}),this.olLayer=new Av({className:"highlight-layer",source:this.olSource,style:function(e,n){return DS(e,n)}}),this.activeHighlights=new Set,this.olLayer.setZIndex(CS),this.olMap.addLayer(this.olLayer)}getLayer(){return this.olLayer}destroy(){this.clearHighlight()}addHighlight(t,e){const n=B(this,_a,ml).call(this,t);if(n.length===0)return{get isActive(){return!1},destroy(){}};const s=n.map(h=>{const l=h.getType(),c=new sc({type:l,geometry:h});return c.setStyle(NS(l,e?.highlightStyle)),c}),r=this.olSource,a=this.activeHighlights,o={get isActive(){return a.has(o)},destroy(){if(this.isActive){for(const h of s)r.removeFeature(h);a.delete(o)}}};return r.addFeatures(s),this.activeHighlights.add(o),o}zoomToHighlight(t,e){const n=B(this,_a,ml).call(this,t);if(n.length===0)return;let s=ve();for(const f of n)s=Od(s,f.getExtent());const r=Ae(s),o=yo(s)===0?e?.pointZoom??IS:e?.maxZoom??TS;PS(this.olMap,r);const{top:h=0,right:l=0,bottom:c=0,left:u=0}=e?.viewPadding??AS,d=[h,l,c,u];OS(this.olMap,s,o,d)}addHighlightAndZoom(t,e){const n=this.addHighlight(t,e);return this.zoomToHighlight(t,e),n}clearHighlight(){for(const t of this.activeHighlights)t.destroy()}}_a=new WeakSet,ml=function(t){const e=[];return t.forEach(n=>{"getType"in n&&e.push(n),"geometry"in n&&n.geometry&&e.push(n.geometry)}),e};function PS(i,t){t&&t.length&&i.getView().setCenter(t)}function OS(i,t,e,n){t?i.getView().fit(t,{maxZoom:e,padding:n}):e&&i.getView().setZoom(e)}function DS(i,t){const e=i.get("type");return tg(yl(e))(i,t)}function NS(i,t){if(t&&i in t){const n=t[i];return n||yl(i)}else return yl(i)}function yl(i){return i in Nh?Nh[i]:Nh.Polygon}const Nh={Point:new Tt({image:new Vs({anchor:[.5,1],src:Ju})}),MultiPoint:new Tt({image:new Vs({anchor:[.5,1],src:Ju})}),LineString:[new Tt({stroke:new ie({color:"#fff",width:5})}),new Tt({stroke:new ie({color:"#00ffff",width:3})})],MultiLineString:[new Tt({stroke:new ie({color:"#fff",width:5})}),new Tt({stroke:new ie({color:"#00ffff",width:3})})],Polygon:[new Tt({stroke:new ie({color:"#fff",width:5})}),new Tt({stroke:new ie({color:"#00ffff",width:3}),fill:new Ri({color:"rgba(224,255,255,0.35)"})})],MultiPolygon:[new Tt({stroke:new ie({color:"#fff",width:5})}),new Tt({stroke:new ie({color:"#00ffff",width:3}),fill:new Ri({color:"rgba(224,255,255,0.35)"})})]},Zn=bi("map:MapModel");var ma,Xe,ya,yi,pa,Fs,ks,$i,On,va,Ki,pi,Go,s0;class n0 extends sd{constructor(e){super();O(this,Go);O(this,ma);O(this,Xe);O(this,ya,new RS(this));O(this,yi);O(this,pa);O(this,Fs,!1);O(this,ks);O(this,$i,Zt());O(this,On);O(this,va,new AbortController);O(this,Ki);O(this,pi);W(this,ma,e.id),W(this,Xe,e.olMap),v(this,$i).value=e.initialExtent,W(this,pa,{httpService:e.httpService}),W(this,yi,new LS(v(this,Xe))),W(this,Ki,"waiting"),B(this,Go,s0).call(this).then(()=>{W(this,Ki,"ready"),v(this,pi)?.resolve(),W(this,pi,void 0)},n=>{Dr(n)||Zn.error("Failed to initialize map",n),W(this,Ki,"error"),v(this,pi)?.reject(new Error("Failed to initialize map.")),W(this,pi,void 0)}),W(this,ks,gd(()=>v(this,Xe).getTargetElement()??void 0)),W(this,On,v(this,Xe).on("change:target",v(this,ks).trigger))}destroy(){if(!v(this,Fs)){W(this,Fs,!0);try{this.emit("destroy")}catch(e){Zn.warn("Unexpected error from event listener during map model destruction:",e)}v(this,On)&&Nn(v(this,On)),W(this,On,void 0),v(this,va).abort(),v(this,pi)?.reject(new Error("Map model was destroyed.")),v(this,ya).destroy(),v(this,yi).destroy(),v(this,Xe).dispose()}}get id(){return v(this,ma)}get olMap(){return v(this,Xe)}get layers(){return v(this,ya)}get container(){return v(this,ks).value}get initialExtent(){return v(this,$i).value}get __sharedDependencies(){return v(this,pa)}highlight(e,n){return v(this,yi).addHighlight(e,n)}zoom(e,n){v(this,yi).zoomToHighlight(e,n)}highlightAndZoom(e,n){return v(this,yi).addHighlightAndZoom(e,n??{})}removeHighlights(){v(this,yi).clearHighlight()}whenDisplayed(){return v(this,Fs)?Promise.reject(new Error("Map model was destroyed.")):v(this,Ki)==="error"?Promise.reject(new Error("Failed to initialize map.")):v(this,Ki)==="ready"?Promise.resolve():(v(this,pi)??W(this,pi,x0())).promise}}ma=new WeakMap,Xe=new WeakMap,ya=new WeakMap,yi=new WeakMap,pa=new WeakMap,Fs=new WeakMap,ks=new WeakMap,$i=new WeakMap,On=new WeakMap,va=new WeakMap,Ki=new WeakMap,pi=new WeakMap,Go=new WeakSet,s0=async function(){try{await FS(this.olMap,v(this,va).signal)}catch(e){throw Dr(e)?e:new Error("Failed to wait for the map to be displayed.",{cause:e})}try{const n=v(this,Xe).getView();if(v(this,$i).value){const s=v(this,$i).value,r=[s.xMin,s.yMin,s.xMax,s.yMax],a=Ae(r),o=n.getResolutionForExtent(r);Zn.debug("Applying initial extent",s),Zn.debug(" Computed center:",a),Zn.debug(" Computed resolution:",o),n.setCenter(a),n.setResolution(o)}else{const s=n.calculateExtent(),[r=0,a=0,o=0,h=0]=s,l={xMin:r,yMin:a,xMax:o,yMax:h};Zn.debug("Detected initial extent",l),v(this,$i).value=l}}catch(e){throw new Error("Failed to apply the initial extent.",{cause:e})}};function FS(i,t){return new Promise((n,s)=>{let r;function a(){const l=i.getSize()??[],[c=0,u=0]=l;l&&c>0&&u>0&&h()}function o(){h(Lc())}function h(l){r&&(Nn(r),r=void 0),t.removeEventListener("abort",o),l?s(l):n(kS(25))}if(t.aborted){h(Lc());return}t.addEventListener("abort",o),r=i.on("change:size",a)})}function kS(i){return new Promise(t=>setTimeout(t,i))}const xc=_t.createContext(void 0);xc.displayName="DefaultMapContext";function WC(i){const{mapId:t,map:e,children:n}=i,s=_t.useMemo(()=>({mapId:t,map:e}),[t,e]);if(t!=null&&e!=null)throw new Error("Cannot specify both 'mapId' and 'map' in DefaultMapProvider at the same time.");if(t==null&&e==null)throw new Error("Either 'mapId' or 'map' must be specified in DefaultMapProvider.");return se.jsx(xc.Provider,{value:s,children:n})}function GS(){return _t.useContext(xc)}function zS(i){const t=WS(i),e=vS("map.MapRegistry"),n=MS(async()=>typeof t=="string"?await e.expectMapModel(t):Promise.resolve(t),[e,t]);return _t.useMemo(()=>n.loading?{kind:"loading"}:n.error?{kind:"rejected",error:n.error}:{kind:"resolved",map:n.value},[n])}function WS(i){if(typeof i=="object"&&i.mapId!=null&&i.map!=null)throw new Error("Cannot specify both 'mapId' and 'map' in useMapModel at the same time.");if(i instanceof n0)throw new Error("Map model instances cannot be passed directly to 'useMapModel' (see TypeScript signature).");const t=_t.useMemo(()=>i==null?{}:typeof i=="string"?{mapId:i}:{mapId:i.mapId,map:i.map},[...typeof i=="string"||i==null?[i]:[i.mapId,i.map]]),e=GS(),n=Qu(t)??Qu(e);if(n==null)throw new Error("No map specified. You must either specify the map (or its id) via a DefaultMapProvider parent or configure it explicitly.");return n}function Qu(i){return i?.map??i?.mapId}const En=bi("map:MapContainer");function BC(i){const{viewPadding:t,viewPaddingChangeBehavior:e,children:n,role:s,"aria-label":r,"aria-labelledby":a}=i,{containerProps:o}=Hg("map-container",i),h=_t.useRef(null),l=_t.useRef(null),c=zS(i),u=c.map,[d,f]=_t.useState(!1);_t.useEffect(()=>{if(c.kind!=="loading"){if(c.kind==="rejected"){En.error("Cannot display the map. Caused by ",c.error);return}if(!u){En.error("No configuration available for the configured map.");return}if(h.current){const _=US(u,h.current);return()=>_?.destroy()}}},[c,u]),_t.useEffect(()=>{f(!0)},[]);const g=_t.useMemo(()=>({height:"100%",position:"relative",[gl.definition]:t?.top!=null?t.top+"px":"0px",[_l.definition]:t?.bottom!=null?t.bottom+"px":"0px",[dl.definition]:t?.left!=null?t.left+"px":"0px",[fl.definition]:t?.right!=null?t.right+"px":"0px"}),[t]);return se.jsxs(Or.div,{...o,role:s,"aria-label":r,"aria-labelledby":a,ref:h,style:g,tabIndex:0,children:[d&&u&&se.jsx(BS,{olMap:u.olMap,mapAnchorsHost:l.current,viewPadding:t,viewPaddingChangeBehavior:e,children:n}),se.jsx(Or.div,{ref:l,className:"map-anchors"})]})}function BS(i){const{olMap:t,mapAnchorsHost:e,viewPadding:n,viewPaddingChangeBehavior:s="preserve-center",children:r}=i,a=_t.useMemo(()=>({left:n?.left??0,right:n?.right??0,top:n?.top??0,bottom:n?.bottom??0}),[n]);_t.useEffect(()=>{const h=t?.getView();if(!t||!h)return;const l=h.getCenter(),c=XS(h.padding),u=jS(t,c);switch(h.padding=qS(a),s){case"preserve-center":h.animate({center:l,duration:300});break;case"preserve-extent":{u&&h.animate({center:l,resolution:h.getResolutionForExtent(u),duration:300});break}}},[a,t,s]);const o=_t.useMemo(()=>({mapAnchorsHost:e}),[e]);return se.jsx(fS,{value:o,children:r})}function US(i,t){const e=i.id,n=i.olMap;if(n.getTarget()){En.error("Failed to display the map: the map already has a target. There may be more than one .");return}En.isDebug()&&En.debug(`Setting target of map '${e}':`,t),n.setTarget(t);let s=!1;return{destroy(){s||(En.isDebug()&&En.debug(`Removing target of map '${e}':`,t),n.setTarget(void 0),s=!0)}}}function jS(i,t){const e=i.getSize();if(!e||e.length<2)return;const[n,s]=e,r=i.getCoordinateFromPixel([t.left,t.bottom]),a=i.getCoordinateFromPixel([Math.max(0,n-t.right),Math.max(0,s-t.top)]);if(!r||!a)return;const[o,h]=r,[l,c]=a;return[o,h,l,c]}function XS(i){return{top:i?.[0]??0,right:i?.[1]??0,bottom:i?.[2]??0,left:i?.[3]??0}}function qS(i){const{top:t,right:e,bottom:n,left:s}=i;return[t,e,n,s]}class YS extends Zf{constructor(t){t=t||{};const e=t.projection!==void 0?t.projection:"EPSG:3857",n=t.tileGrid!==void 0?t.tileGrid:Bp({extent:ic(e),maxResolution:t.maxResolution,maxZoom:t.maxZoom,minZoom:t.minZoom,tileSize:t.tileSize});super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,opaque:t.opaque,projection:e,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:n,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX!==void 0?t.wrapX:!0,transition:t.transition,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.gutter_=t.gutter!==void 0?t.gutter:0}getGutter(){return this.gutter_}}const VS='© OpenStreetMap contributors.';class $S extends YS{constructor(t){t=t||{};let e;t.attributions!==void 0?e=t.attributions:e=[VS];const n=t.crossOrigin!==void 0?t.crossOrigin:"anonymous",s=t.url!==void 0?t.url:"https://tile.openstreetmap.org/{z}/{x}/{y}.png";super({attributions:e,attributionsCollapsible:!1,cacheSize:t.cacheSize,crossOrigin:n,interpolate:t.interpolate,maxZoom:t.maxZoom!==void 0?t.maxZoom:19,opaque:t.opaque!==void 0?t.opaque:!0,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileLoadFunction:t.tileLoadFunction,transition:t.transition,url:s,wrapX:t.wrapX,zDirection:t.zDirection})}}var xa,zo,r0;class UC{constructor(t){O(this,zo);O(this,xa);W(this,xa,t.references.interceptors.map((e,n)=>[t.referencesMeta.interceptors[n].serviceId,e]))}async fetch(t,e){const n=e?.signal??void 0,s=Object.assign({},e?.context),r=ZS(e);Fh(n);let a=KS(t);{const h={target:a,signal:n??new AbortController().signal,context:s,options:r};Fh(n),await B(this,zo,r0).call(this,h),a=h.target}const o=new Request(a,{...r,signal:n});return await window.fetch(o)}}xa=new WeakMap,zo=new WeakSet,r0=async function(t){const{signal:e}=t;for(const[n,s]of v(this,xa))if(Fh(e),s.beforeRequest)try{await s.beforeRequest(t)}catch(r){throw E0(r),new Error(`Interceptor '${n}' failed with an error`,{cause:r})}};function KS(i){return typeof i=="string"?new URL(i,window.location.href):i}function ZS(i){const t=i?.method??"GET",e=new Headers(i?.headers??{}),n={...i,method:t,headers:e};for(const s in n)HS[s]&&delete n[s];return n}const HS={context:1,signal:1};function Fh(i){i?.aborted&&M0()}rS({"EPSG:25832":"+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +type=crs","EPSG:25833":"+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +type=crs"});const kh=bi("map:createMapModel");async function JS(i,t,e){return await new QS(i,t,e).createMapModel()}class QS{mapId;mapConfig;httpService;constructor(t,e,n){this.mapId=t,this.mapConfig=e,this.httpService=n}async createMapModel(){const t=this.mapId,e=this.mapConfig,{view:n,...s}=e.advanced??{},r={...s};if(r.controls||(r.controls=[new pg({collapsible:!1})]),!r.interactions){const u=d=>{const f=d.originalEvent;return(f.metaKey||f.ctrlKey)&&f.shiftKey};r.interactions=Sg({dragPan:!0,altShiftDragRotate:!1,pinchRotate:!1,mouseWheelZoom:!0}).extend([new wg({out:!0,condition:u})])}const a=await n??{};this.initializeViewOptions(a),r.view=a instanceof Ie?a:new Ie(a),!r.layers&&!e.layers&&(r.layers=[new Xf({source:new $S})]);const o=e.initialView,h=o?.kind==="extent"?o.extent:void 0;kh.debug("Constructing OpenLayers map with options",r);const l=new cx(r),c=new n0({id:t,olMap:l,initialExtent:h,httpService:this.httpService});try{if(e.layers)for(const u of e.layers)c.layers.addLayer(u);return c}catch(u){throw c.destroy(),u}}initializeViewOptions(t){const e=this.mapId,n=this.mapConfig;if(t instanceof Ie){const a=o=>{kh.warn(`The advanced configuration for map id '${e}' has provided a fully constructed view instance: ${o} cannot be applied. Use ViewOptions instead of a View instance.`)};n.projection!=null&&a("projection"),n.initialView!=null&&a("initialView");return}const s=t.projection=this.initializeProjection(n.projection),r=n.initialView;if(r)switch(r.kind){case"position":t.zoom=r.zoom,t.center=[r.center.x,r.center.y];break;case"extent":{const a=r.extent;t.zoom=0,t.center=[a.xMin+(a.xMax-a.xMin)/2,a.yMin+(a.yMax-a.yMin)/2];break}}else this.setViewDefaults(t,s)}setViewDefaults(t,e){if(t.center==null){const n=e.getExtent();n?t.center=Ae(n):kh.warn(`Cannot set default center coordinate because the current projection has no associated extent. -Try to configure 'initialView' explicity.`)}(t.zoom==null||t.resolution==null)&&(t.zoom=0)}initializeProjection(t){if(t==null)return pt("EPSG:3857");const e=pt(t);if(!e)throw new Error(`Failed to retrieve projection for code '${t}'.`);return e}}const Gh=bi("map:MapRegistry");var Ea,Ma,Zi,Hi,wa,Dn,Wo,a0;class jC{constructor({references:t}){O(this,Wo);O(this,Ea);O(this,Ma,new Map);O(this,Zi,new Map);O(this,Hi,new Map);O(this,wa,new WeakMap);O(this,Dn,!1);W(this,Ea,t.httpService);const e=t.providers;for(const n of e)v(this,Ma).set(n.mapId,n)}destroy(){v(this,Dn)||(Gh.info("Destroy map registry and all maps"),W(this,Dn,!0),v(this,Zi).forEach(t=>{t.kind==="model"&&t.model.destroy()}),v(this,Zi).clear(),v(this,Hi).clear())}async getMapModel(t){if(v(this,Dn))throw new Error("MapRegistry has already been destroyed.");const e=v(this,Hi).get(t);if(e)return zh(await e);const n=v(this,Zi).get(t);if(n)return zh(n);const s=v(this,Ma).get(t);if(!s){Gh.debug(`Failed to find a config provider for map id '${t}'.`);return}const r=B(this,Wo,a0).call(this,t,s).catch(a=>{const h={kind:"error",error:new Error(`Failed to construct map '${t}'`,{cause:a})};return v(this,Hi).delete(t),v(this,Zi).set(t,h),h});return v(this,Hi).set(t,r),zh(await r)}async expectMapModel(t){const e=await this.getMapModel(t);if(!e)throw new Error(`No configuration available for map with id '${t}'.`);return e}getMapModelByRawInstance(t){return v(this,wa).get(t)}}Ea=new WeakMap,Ma=new WeakMap,Zi=new WeakMap,Hi=new WeakMap,wa=new WeakMap,Dn=new WeakMap,Wo=new WeakSet,a0=async function(t,e){Gh.info(`Creating map with id '${t}'`);const n=await e.getMapConfig(),s=await JS(t,n,v(this,Ea));if(v(this,Dn))throw s.destroy(),new Error("MapRegistry has been destroyed.");const r={kind:"model",model:s};return v(this,Zi).set(t,r),v(this,Hi).delete(t),v(this,wa).set(s.olMap,s),r};function zh(i){if(i.kind==="error")throw i.error;return i.model}export{Iu as $,Us as A,pl as B,Pa as C,WC as D,ne as E,Ri as F,fv as G,UC as H,mo as I,Ft as J,Ve as K,Wd as L,jC as M,Wn as N,KS as O,pe as P,Ye as Q,mv as R,MC as S,Xf as T,yv as U,Ie as V,gg as W,xi as X,Kd as Y,lC as Z,Ef as _,Av as a,_o as a$,hC as a0,cC as a1,hv as a2,bu as a3,dg as a4,ct as a5,$a as a6,nc as a7,ic as a8,Bp as a9,i1 as aA,gi as aB,ie as aC,qe as aD,LC as aE,$f as aF,Vs as aG,oc as aH,oC as aI,ri as aJ,Xd as aK,Ei as aL,EC as aM,Pt as aN,nt as aO,lc as aP,Ke as aQ,th as aR,ac as aS,uu as aT,lt as aU,Ws as aV,Vt as aW,Oe as aX,Ko as aY,sC as aZ,$c as a_,Yf as aa,Dp as ab,RC as ac,Z as ad,ec as ae,Dv as af,zs as ag,La as ah,i_ as ai,Zf as aj,pt as ak,Ho as al,m_ as am,Yp as an,Cl as ao,be as ap,Q_ as aq,js as ar,K_ as as,si as at,Rd as au,Fr as av,Un as aw,cx as ax,ir as ay,Jl as az,Nv as b,xC as b$,Ui as b0,Hc as b1,Hg as b2,sc as b3,CS as b4,Gc as b5,hm as b6,R_ as b7,Ae as b8,uS as b9,ln as bA,p_ as bB,TC as bC,aC as bD,Na as bE,OC as bF,Qv as bG,Nr as bH,Ra as bI,qo as bJ,z0 as bK,iC as bL,Ll as bM,tg as bN,E_ as bO,x_ as bP,sx as bQ,xg as bR,ex as bS,Kp as bT,kp as bU,Xs as bV,cf as bW,CC as bX,ht as bY,Gr as bZ,vC as b_,El as ba,Ml as bb,IC as bc,ny as bd,Hh as be,Mt as bf,wC as bg,SC as bh,FC as bi,Fa as bj,tx as bk,PC as bl,DC as bm,Hv as bn,Tu as bo,Se as bp,he as bq,Pd as br,St as bs,rC as bt,fi as bu,po as bv,Vh as bw,vi as bx,Pl as by,zd as bz,Tt as c,lf as c0,Kh as c1,j_ as c2,nf as c3,fC as c4,kl as c5,Si as c6,Nd as c7,q_ as c8,Zd as c9,Kc as cA,Lv as cB,Z_ as cC,gC as cD,pC as cE,Hd as cF,Qd as cG,H_ as cH,cu as cI,Qp as cJ,Gl as cK,Ul as cL,Ca as ca,Eg as cb,Pu as cc,Bi as cd,Yc as ce,Yo as cf,us as cg,It as ch,U_ as ci,Ad as cj,Aa as ck,Od as cl,Jd as cm,tf as cn,bC as co,vo as cp,lu as cq,Y_ as cr,yC as cs,rs as ct,Ld as cu,ef as cv,uC as cw,dC as cx,mC as cy,_C as cz,ur as d,xd as e,yS as f,kC as g,oS as h,zS as i,Nn as j,C0 as k,BC as l,GC as m,jf as n,mt as o,jt as p,Jo as q,Zt as r,q as s,Pp as t,zC as u,Ge as v,B0 as w,Nt as x,Fn as y,Rl as z}; +Try to configure 'initialView' explicity.`)}(t.zoom==null||t.resolution==null)&&(t.zoom=0)}initializeProjection(t){if(t==null)return pt("EPSG:3857");const e=pt(t);if(!e)throw new Error(`Failed to retrieve projection for code '${t}'.`);return e}}const Gh=bi("map:MapRegistry");var Ea,Ma,Zi,Hi,wa,Dn,Wo,a0;class jC{constructor({references:t}){O(this,Wo);O(this,Ea);O(this,Ma,new Map);O(this,Zi,new Map);O(this,Hi,new Map);O(this,wa,new WeakMap);O(this,Dn,!1);W(this,Ea,t.httpService);const e=t.providers;for(const n of e)v(this,Ma).set(n.mapId,n)}destroy(){v(this,Dn)||(Gh.info("Destroy map registry and all maps"),W(this,Dn,!0),v(this,Zi).forEach(t=>{t.kind==="model"&&t.model.destroy()}),v(this,Zi).clear(),v(this,Hi).clear())}async getMapModel(t){if(v(this,Dn))throw new Error("MapRegistry has already been destroyed.");const e=v(this,Hi).get(t);if(e)return zh(await e);const n=v(this,Zi).get(t);if(n)return zh(n);const s=v(this,Ma).get(t);if(!s){Gh.debug(`Failed to find a config provider for map id '${t}'.`);return}const r=B(this,Wo,a0).call(this,t,s).catch(a=>{const h={kind:"error",error:new Error(`Failed to construct map '${t}'`,{cause:a})};return v(this,Hi).delete(t),v(this,Zi).set(t,h),h});return v(this,Hi).set(t,r),zh(await r)}async expectMapModel(t){const e=await this.getMapModel(t);if(!e)throw new Error(`No configuration available for map with id '${t}'.`);return e}getMapModelByRawInstance(t){return v(this,wa).get(t)}}Ea=new WeakMap,Ma=new WeakMap,Zi=new WeakMap,Hi=new WeakMap,wa=new WeakMap,Dn=new WeakMap,Wo=new WeakSet,a0=async function(t,e){Gh.info(`Creating map with id '${t}'`);const n=await e.getMapConfig(),s=await JS(t,n,v(this,Ea));if(v(this,Dn))throw s.destroy(),new Error("MapRegistry has been destroyed.");const r={kind:"model",model:s};return v(this,Zi).set(t,r),v(this,Hi).delete(t),v(this,wa).set(s.olMap,s),r};function zh(i){if(i.kind==="error")throw i.error;return i.model}export{Iu as $,Us as A,pl as B,Pa as C,WC as D,ne as E,Ri as F,fv as G,UC as H,mo as I,Ft as J,Ve as K,Wd as L,jC as M,Wn as N,$S as O,pe as P,Ye as Q,mv as R,MC as S,Xf as T,yv as U,Ie as V,gg as W,xi as X,$d as Y,lC as Z,Ef as _,Av as a,_o as a$,hC as a0,cC as a1,hv as a2,bu as a3,dg as a4,ct as a5,Ka as a6,nc as a7,ic as a8,Bp as a9,i1 as aA,gi as aB,ie as aC,qe as aD,LC as aE,Kf as aF,Vs as aG,oc as aH,oC as aI,ri as aJ,Xd as aK,Ei as aL,EC as aM,Pt as aN,nt as aO,lc as aP,$e as aQ,th as aR,ac as aS,uu as aT,lt as aU,Ws as aV,Vt as aW,Oe as aX,$o as aY,sC as aZ,Kc as a_,Yf as aa,Dp as ab,RC as ac,Z as ad,ec as ae,Dv as af,zs as ag,La as ah,i_ as ai,Zf as aj,pt as ak,Ho as al,m_ as am,Yp as an,Cl as ao,be as ap,Q_ as aq,js as ar,$_ as as,si as at,Rd as au,Fr as av,Un as aw,cx as ax,ir as ay,Jl as az,Nv as b,xC as b$,Ui as b0,Hc as b1,Hg as b2,sc as b3,CS as b4,Gc as b5,hm as b6,R_ as b7,Ae as b8,uS as b9,ln as bA,p_ as bB,TC as bC,aC as bD,Na as bE,OC as bF,Qv as bG,Nr as bH,Ra as bI,qo as bJ,z0 as bK,iC as bL,Ll as bM,tg as bN,E_ as bO,x_ as bP,sx as bQ,xg as bR,ex as bS,$p as bT,kp as bU,Xs as bV,cf as bW,CC as bX,ht as bY,Gr as bZ,vC as b_,El as ba,Ml as bb,IC as bc,ny as bd,Hh as be,Mt as bf,wC as bg,SC as bh,FC as bi,Fa as bj,tx as bk,PC as bl,DC as bm,Hv as bn,Tu as bo,Se as bp,he as bq,Pd as br,St as bs,rC as bt,fi as bu,po as bv,Vh as bw,vi as bx,Pl as by,zd as bz,Tt as c,lf as c0,$h as c1,j_ as c2,nf as c3,fC as c4,kl as c5,Si as c6,Nd as c7,q_ as c8,Zd as c9,$c as cA,Lv as cB,Z_ as cC,gC as cD,pC as cE,Hd as cF,Qd as cG,H_ as cH,cu as cI,Qp as cJ,Gl as cK,Ul as cL,Ca as ca,Eg as cb,Pu as cc,Bi as cd,Yc as ce,Yo as cf,us as cg,It as ch,U_ as ci,Ad as cj,Aa as ck,Od as cl,Jd as cm,tf as cn,bC as co,vo as cp,lu as cq,Y_ as cr,yC as cs,rs as ct,Ld as cu,ef as cv,uC as cw,dC as cx,mC as cy,_C as cz,ur as d,xd as e,yS as f,kC as g,oS as h,zS as i,Nn as j,C0 as k,BC as l,GC as m,jf as n,mt as o,jt as p,Jo as q,Zt as r,q as s,Pp as t,zC as u,Ge as v,B0 as w,Nt as x,Fn as y,Rl as z}; diff --git a/openlayers-base-packages/pr-previews/pr-371/assets/BRYmAG34-9j7.js b/openlayers-base-packages/pr-previews/pr-371/assets/rsBy-C9pttN-.js similarity index 98% rename from openlayers-base-packages/pr-previews/pr-371/assets/BRYmAG34-9j7.js rename to openlayers-base-packages/pr-previews/pr-371/assets/rsBy-C9pttN-.js index 8e93533..37e4df9 100644 --- a/openlayers-base-packages/pr-previews/pr-371/assets/BRYmAG34-9j7.js +++ b/openlayers-base-packages/pr-previews/pr-371/assets/rsBy-C9pttN-.js @@ -1 +1 @@ -import{a as k,c as y,r as c,j as e,B as m,e as z}from"./Bh0CuZ3gy5tC.js";import{t as S}from"./B99qq3IKf4kH.js";import{S as j,T as I,O as C,M,H as P,f as L,i as R,k as g,g as _,B as p,h as E,l as A,m as s}from"./CncSlnPsjr9P.js";import{P as T,N as H,I as q}from"./BBt4Ba3H9gMn.js";import{_ as b}from"./CmsKOCeNyeyo.js";import{S as N,T as i,V as v,U,a as h}from"./Tz2xttM4F6S2.js";import"./JZ5RcWTlF_6Y.js";import"./DsXJQLY20iHp.js";const d="main";class O{mapId=d;async getMapConfig(){return{initialView:{kind:"position",center:{x:404747,y:5757920},zoom:14},layers:[new j({title:"OSM",isBaseLayer:!0,olLayer:new I({source:new C})})]}}}const F={"printing-api-app":{name:"printing-api-app",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:O,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{}}},ui:{references:[{name:"printing.PrintingService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:M,provides:[{name:"map.MapRegistry",qualifier:void 0}],references:{providers:{name:"map.MapConfigProvider",qualifier:void 0,all:!0},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/printing":{name:"@open-pioneer/printing",services:{PrintingServiceImpl:{name:"PrintingServiceImpl",clazz:T,provides:[{name:"printing.PrintingService",qualifier:void 0}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1},{name:"printing.PrintingService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/theme":{name:"@open-pioneer/theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:P,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/notifier":{name:"@open-pioneer/notifier",services:{NotificationServiceImpl:{name:"NotificationServiceImpl",clazz:H,provides:[{name:"notifier.NotificationService",qualifier:"notifier.NotificationService"}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}}},G=':root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.map-container .ol-viewport .ol-attribution{bottom:var(--map-padding-bottom);right:var(--map-padding-right)}.printing-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:10000;-webkit-user-select:none;user-select:none;pointer-events:all;cursor:wait;display:flex;flex-direction:row;align-items:center;justify-content:center;background-color:#b4b4b4cc}.printing-overlay-status{flex:1 1 auto;font-size:1.5em;text-align:center}.printing-scale-bar.ol-scale-bar{left:var(--printing-scale-bar-left);bottom:var(--printing-scale-bar-bottom)}',B=["en","de"];function D(o){switch(o){case"en":return b(()=>import("./-jAncdI_g-d4.js"),[],import.meta.url).then(r=>r.default);case"de":return b(()=>import("./1YhbJ59n8_2l.js"),[],import.meta.url).then(r=>r.default)}throw new Error(`Unsupported locale: '${o}'`)}const V=k(G),W=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:D,locales:B,packages:F,styles:V},Symbol.toStringTag,{value:"Module"})),K="printing-api-app",$=L.bind(void 0,K),J=y("printing");function Q(){const{map:o}=R(d),r=$("printing.PrintingService"),[t,n]=c.useState(void 0),f=async()=>{u("canvas")},x=async()=>{u("png")},u=async w=>{o&&await r.printMap(o.olMap).then(a=>{const l=a.getCanvas();w==="canvas"?(l.style.width="100%",l.style.height="100%",n(l)):n(a.getPNGDataURL(.6))},a=>{J.error(a)})};return e.jsx(g,{height:"100%",direction:"column",overflow:"hidden",children:e.jsx(_,{title:e.jsx(p,{textAlign:"center",py:1,children:e.jsx(E,{size:"md",children:"OpenLayers Base Packages - Printing API"})}),children:e.jsx(g,{flex:"1",direction:"column",position:"relative",children:e.jsxs(A,{mapId:d,children:[e.jsx(s,{position:"top-left",horizontalGap:10,verticalGap:10,children:e.jsx(p,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",children:e.jsxs(N,{pt:5,children:[e.jsx(i,{align:"center",children:"Test Controls:"}),e.jsx(m,{onClick:()=>f(),children:"Canvas"}),e.jsx(m,{onClick:()=>x(),children:"Image data URL"})]})})}),e.jsx(s,{position:"top-right",horizontalGap:10,verticalGap:10,children:e.jsxs(v,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",maxWidth:"400px",maxHeight:"300px",overflow:"auto",children:[e.jsx(i,{as:"b",children:"Description"}),e.jsx(i,{children:"This application can be used to test the printing service. The service provides the screenshot of the given map view in a form of HTMLCanvasElement or a data url."}),e.jsxs(U,{children:[e.jsxs(h,{children:["Clicking on the ","'Canvas'"," button shows the HTMLCanvasElement of the map view embedded in another HTMLElement."]}),e.jsxs(h,{children:["Clicking on the ","'Image data URL'"," button shows the data url of the map view image used as source for HTMLImageElement."]})]})]})}),e.jsx(s,{position:"top-right",horizontalGap:450,verticalGap:10,children:t&&e.jsx(v,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",className:"result-display",maxWidth:"600",maxHeight:"500",children:e.jsx(X,{input:t})})})]})})})})}function X(o){const r=typeof o.input=="string"?o.input:void 0,t=r&&e.jsxs(e.Fragment,{children:[e.jsx(i,{as:"b",children:"Image from data URL"}),e.jsx(q,{src:r})]}),n=typeof o.input!="string"?e.jsx(Y,{canvas:o.input}):void 0;return t||n}function Y(o){const r=c.useRef(null);return c.useEffect(()=>{if(!r.current)return;const t=r.current;return t.appendChild(o.canvas),()=>{t.removeChild(o.canvas)}},[o.canvas]),e.jsxs(e.Fragment,{children:[e.jsx(i,{as:"b",children:"Image from canvas"}),e.jsx(p,{ref:r})]})}const Z=new URLSearchParams(window.location.search),ee=Z.get("lang"),oe=z({component:Q,config:{locale:ee??void 0},theme:S,appMetadata:W});customElements.define("printing-api-app",oe); +import{a as k,c as y,r as c,j as e,B as m,e as z}from"./Bh0CuZ3gy5tC.js";import{t as S}from"./B99qq3IKf4kH.js";import{S as j,T as I,O as C,M,H as P,f as L,i as R,k as g,g as _,B as p,h as E,l as A,m as s}from"./p-jlpmJ86TPh.js";import{P as T,N as H,I as q}from"./Ds9MLKVSYIgg.js";import{_ as b}from"./CmsKOCeNyeyo.js";import{S as N,T as i,V as v,U,a as h}from"./Tz2xttM4F6S2.js";import"./D8rToQP6FvST.js";import"./BWsYSh9PkSaL.js";const d="main";class O{mapId=d;async getMapConfig(){return{initialView:{kind:"position",center:{x:404747,y:5757920},zoom:14},layers:[new j({title:"OSM",isBaseLayer:!0,olLayer:new I({source:new C})})]}}}const F={"printing-api-app":{name:"printing-api-app",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:O,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{}}},ui:{references:[{name:"printing.PrintingService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:M,provides:[{name:"map.MapRegistry",qualifier:void 0}],references:{providers:{name:"map.MapConfigProvider",qualifier:void 0,all:!0},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/printing":{name:"@open-pioneer/printing",services:{PrintingServiceImpl:{name:"PrintingServiceImpl",clazz:T,provides:[{name:"printing.PrintingService",qualifier:void 0}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1},{name:"printing.PrintingService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/theme":{name:"@open-pioneer/theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:P,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/notifier":{name:"@open-pioneer/notifier",services:{NotificationServiceImpl:{name:"NotificationServiceImpl",clazz:H,provides:[{name:"notifier.NotificationService",qualifier:"notifier.NotificationService"}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}}},G=':root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.map-container .ol-viewport .ol-attribution{bottom:var(--map-padding-bottom);right:var(--map-padding-right)}.printing-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:10000;-webkit-user-select:none;user-select:none;pointer-events:all;cursor:wait;display:flex;flex-direction:row;align-items:center;justify-content:center;background-color:#b4b4b4cc}.printing-overlay-status{flex:1 1 auto;font-size:1.5em;text-align:center}.printing-scale-bar.ol-scale-bar{left:var(--printing-scale-bar-left);bottom:var(--printing-scale-bar-bottom)}',B=["en","de"];function D(o){switch(o){case"en":return b(()=>import("./-jAncdI_g-d4.js"),[],import.meta.url).then(r=>r.default);case"de":return b(()=>import("./1YhbJ59n8_2l.js"),[],import.meta.url).then(r=>r.default)}throw new Error(`Unsupported locale: '${o}'`)}const V=k(G),W=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:D,locales:B,packages:F,styles:V},Symbol.toStringTag,{value:"Module"})),K="printing-api-app",$=L.bind(void 0,K),J=y("printing");function Q(){const{map:o}=R(d),r=$("printing.PrintingService"),[t,n]=c.useState(void 0),f=async()=>{u("canvas")},x=async()=>{u("png")},u=async w=>{o&&await r.printMap(o.olMap).then(a=>{const l=a.getCanvas();w==="canvas"?(l.style.width="100%",l.style.height="100%",n(l)):n(a.getPNGDataURL(.6))},a=>{J.error(a)})};return e.jsx(g,{height:"100%",direction:"column",overflow:"hidden",children:e.jsx(_,{title:e.jsx(p,{textAlign:"center",py:1,children:e.jsx(E,{size:"md",children:"OpenLayers Base Packages - Printing API"})}),children:e.jsx(g,{flex:"1",direction:"column",position:"relative",children:e.jsxs(A,{mapId:d,children:[e.jsx(s,{position:"top-left",horizontalGap:10,verticalGap:10,children:e.jsx(p,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",children:e.jsxs(N,{pt:5,children:[e.jsx(i,{align:"center",children:"Test Controls:"}),e.jsx(m,{onClick:()=>f(),children:"Canvas"}),e.jsx(m,{onClick:()=>x(),children:"Image data URL"})]})})}),e.jsx(s,{position:"top-right",horizontalGap:10,verticalGap:10,children:e.jsxs(v,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",maxWidth:"400px",maxHeight:"300px",overflow:"auto",children:[e.jsx(i,{as:"b",children:"Description"}),e.jsx(i,{children:"This application can be used to test the printing service. The service provides the screenshot of the given map view in a form of HTMLCanvasElement or a data url."}),e.jsxs(U,{children:[e.jsxs(h,{children:["Clicking on the ","'Canvas'"," button shows the HTMLCanvasElement of the map view embedded in another HTMLElement."]}),e.jsxs(h,{children:["Clicking on the ","'Image data URL'"," button shows the data url of the map view image used as source for HTMLImageElement."]})]})]})}),e.jsx(s,{position:"top-right",horizontalGap:450,verticalGap:10,children:t&&e.jsx(v,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",className:"result-display",maxWidth:"600",maxHeight:"500",children:e.jsx(X,{input:t})})})]})})})})}function X(o){const r=typeof o.input=="string"?o.input:void 0,t=r&&e.jsxs(e.Fragment,{children:[e.jsx(i,{as:"b",children:"Image from data URL"}),e.jsx(q,{src:r})]}),n=typeof o.input!="string"?e.jsx(Y,{canvas:o.input}):void 0;return t||n}function Y(o){const r=c.useRef(null);return c.useEffect(()=>{if(!r.current)return;const t=r.current;return t.appendChild(o.canvas),()=>{t.removeChild(o.canvas)}},[o.canvas]),e.jsxs(e.Fragment,{children:[e.jsx(i,{as:"b",children:"Image from canvas"}),e.jsx(p,{ref:r})]})}const Z=new URLSearchParams(window.location.search),ee=Z.get("lang"),oe=z({component:Q,config:{locale:ee??void 0},theme:S,appMetadata:W});customElements.define("printing-api-app",oe); diff --git a/openlayers-base-packages/pr-previews/pr-371/assets/QHG522PSVRAP.js b/openlayers-base-packages/pr-previews/pr-371/assets/vkgtH7KoFSDR.js similarity index 95% rename from openlayers-base-packages/pr-previews/pr-371/assets/QHG522PSVRAP.js rename to openlayers-base-packages/pr-previews/pr-371/assets/vkgtH7KoFSDR.js index 8f648cb..95f5069 100644 --- a/openlayers-base-packages/pr-previews/pr-371/assets/QHG522PSVRAP.js +++ b/openlayers-base-packages/pr-previews/pr-371/assets/vkgtH7KoFSDR.js @@ -1 +1 @@ -import{a as c,j as e,B as a,e as l}from"./Bh0CuZ3gy5tC.js";import{C as p}from"./CbOUyl8QGaaZ.js";import{C as m}from"./BCXJt8t_qqq7.js";import{H as u}from"./L25RkWOQSN8A.js";import{V as h,T as r,U as d,a as t}from"./Tz2xttM4F6S2.js";import{M as x}from"./DUys4rac0YQP.js";import{a as f,b as j,M as s}from"./BeFcF3Ti4kY-.js";import"./D03oE8cEQPSj.js";const k={"menu-fix-app":{name:"menu-fix-app",services:{},ui:{references:[]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}}},g="",M=[];function b(n){throw new Error(`Unsupported locale: '${n}'`)}const C=c(g),v=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:b,locales:M,packages:k,styles:C},Symbol.toStringTag,{value:"Module"}));function S(){return e.jsx(e.Fragment,{children:e.jsxs(m,{p:5,children:[e.jsxs(u,{children:[o({title:"Closes on select",closeOnSelect:!0}),o({title:"Does not close on select",closeOnSelect:!1})]}),e.jsxs(h,{mt:5,align:"start",spacing:2,children:[e.jsx(r,{as:"b",children:"Description"}),e.jsxs(r,{children:["This application is used to test Chakra-UI menus inside a Shadow DOM. Patches against Chakra","'","s ",e.jsx("code",{children:"Menu"})," component and"," ",e.jsx("code",{children:"useOutsideClick()"})," hooks ensure that the component behaves as expected:"]}),e.jsxs(d,{children:[e.jsx(t,{children:"Both menu buttons should behave normally when clicking them multiple times (first click on button opens menu; second click hides it again)."}),e.jsx(t,{children:"Both menus close when the user clicks outside."}),e.jsx(t,{children:"The first menu should close by itself if some menu item is clicked."}),e.jsxs(t,{children:["The second menu should ",e.jsx("em",{children:"not"})," close itself if an item is clicked."]})]})]})]})})}function o(n){const i=()=>{};return e.jsxs(x,{closeOnSelect:n.closeOnSelect??!0,onClose:i,children:[e.jsx(f,{as:a,rightIcon:e.jsx(p,{}),children:n.title}),e.jsxs(j,{children:[e.jsx(s,{children:"Download"}),e.jsx(s,{children:"Create a Copy"}),e.jsx(s,{children:"Mark as Draft"}),e.jsx(s,{children:"Delete"}),e.jsx(s,{children:"Attend a Workshop"})]})]})}const O=l({component:S,appMetadata:v});customElements.define("menu-fix-app",O); +import{a as c,j as e,B as a,e as l}from"./Bh0CuZ3gy5tC.js";import{C as p}from"./CbOUyl8QGaaZ.js";import{C as m}from"./BCXJt8t_qqq7.js";import{H as u}from"./L25RkWOQSN8A.js";import{V as h,T as r,U as d,a as t}from"./Tz2xttM4F6S2.js";import{M as x}from"./DUys4rac0YQP.js";import{a as f,b as j,M as s}from"./BeFcF3Ti4kY-.js";import"./D03oE8cEQPSj.js";const k={"menu-fix-app":{name:"menu-fix-app",services:{},ui:{references:[]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}}},g="",M=[];function b(n){throw new Error(`Unsupported locale: '${n}'`)}const C=c(g),v=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:b,locales:M,packages:k,styles:C},Symbol.toStringTag,{value:"Module"}));function S(){return e.jsx(e.Fragment,{children:e.jsxs(m,{p:5,children:[e.jsxs(u,{children:[o({title:"Closes on select",closeOnSelect:!0}),o({title:"Does not close on select",closeOnSelect:!1})]}),e.jsxs(h,{mt:5,align:"start",spacing:2,children:[e.jsx(r,{as:"b",children:"Description"}),e.jsxs(r,{children:["This application is used to test Chakra-UI menus inside a Shadow DOM. Patches against Chakra","'","s ",e.jsx("code",{children:"Menu"})," component and"," ",e.jsx("code",{children:"useOutsideClick()"})," hooks ensure that the component behaves as expected:"]}),e.jsxs(d,{children:[e.jsx(t,{children:"Both menu buttons should behave normally when clicking them multiple times (first click on button opens menu; second click hides it again)."}),e.jsx(t,{children:"Both menus close when the user clicks outside."}),e.jsx(t,{children:"The first menu should close by itself if some menu item is clicked."}),e.jsxs(t,{children:["The second menu should ",e.jsx("em",{children:"not"})," close itself if an item is clicked."]})]})]})]})})}function o(n){const i=()=>{};return e.jsxs(x,{closeOnSelect:n.closeOnSelect??!0,onClose:i,children:[e.jsx(f,{as:a,rightIcon:e.jsx(p,{}),children:n.title}),e.jsxs(j,{children:[e.jsx(s,{children:"Download"}),e.jsx(s,{children:"Create a Copy"}),e.jsx(s,{children:"Mark as Draft"}),e.jsx(s,{children:"Delete"}),e.jsx(s,{children:"Attend a Workshop"})]})]})}const O=l({component:S,appMetadata:v});customElements.define("menu-fix-app",O); diff --git a/openlayers-base-packages/pr-previews/pr-371/assets/BormsuGtFsVQ.js b/openlayers-base-packages/pr-previews/pr-371/assets/w7OhIb2wibYa.js similarity index 99% rename from openlayers-base-packages/pr-previews/pr-371/assets/BormsuGtFsVQ.js rename to openlayers-base-packages/pr-previews/pr-371/assets/w7OhIb2wibYa.js index 57124a1..78ffa8a 100644 --- a/openlayers-base-packages/pr-previews/pr-371/assets/BormsuGtFsVQ.js +++ b/openlayers-base-packages/pr-previews/pr-371/assets/w7OhIb2wibYa.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DgAO1auW02-w.js","./Bh0CuZ3gy5tC.js","./BTEHqhSAUrUR.js","./CncSlnPsjr9P.js","./Cq1ZpfgEg4XJ.js","./BO_q12Vdyug-.js","./Tz2xttM4F6S2.js","./DUys4rac0YQP.js","./CL_VRsbiqLzM.js"])))=>i.map(i=>d[i]); -import{_ as gs}from"./CmsKOCeNyeyo.js";import{_ as ve}from"./BTEHqhSAUrUR.js";import"./Bh0CuZ3gy5tC.js";import"./CncSlnPsjr9P.js";import"./Cq1ZpfgEg4XJ.js";import"./BO_q12Vdyug-.js";import"./Tz2xttM4F6S2.js";import"./DUys4rac0YQP.js";import"./CL_VRsbiqLzM.js";var tn=Uint8Array,vn=Uint16Array,Ps=Int32Array,go=new tn([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),mo=new tn([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),ms=new tn([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),xc=function(r,e){for(var n=new vn(31),a=0;a<31;++a)n[a]=e+=1<>1|(we&21845)<<1;kr=(kr&52428)>>2|(kr&13107)<<2,kr=(kr&61680)>>4|(kr&3855)<<4,bs[we]=((kr&65280)>>8|(kr&255)<<8)>>1}var tr=function(r,e,n){for(var a=r.length,c=0,o=new vn(e);c>f]=g}else for(h=new vn(a),c=0;c>15-r[c]);return h},Cr=new tn(288);for(var we=0;we<144;++we)Cr[we]=8;for(var we=144;we<256;++we)Cr[we]=9;for(var we=256;we<280;++we)Cr[we]=7;for(var we=280;we<288;++we)Cr[we]=8;var da=new tn(32);for(var we=0;we<32;++we)da[we]=5;var Fu=tr(Cr,9,0),Iu=tr(Cr,9,1),Cu=tr(da,5,0),ju=tr(da,5,1),os=function(r){for(var e=r[0],n=1;ne&&(e=r[n]);return e},qn=function(r,e,n){var a=e/8|0;return(r[a]|r[a+1]<<8)>>(e&7)&n},ss=function(r,e){var n=e/8|0;return(r[n]|r[n+1]<<8|r[n+2]<<16)>>(e&7)},ks=function(r){return(r+7)/8|0},kc=function(r,e,n){return(n==null||n>r.length)&&(n=r.length),new tn(r.subarray(e,n))},Ou=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Rn=function(r,e,n){var a=new Error(e||Ou[r]);if(a.code=r,Error.captureStackTrace&&Error.captureStackTrace(a,Rn),!n)throw a;return a},Bu=function(r,e,n,a){var c=r.length,o=0;if(!c||e.f&&!e.l)return n||new tn(0);var l=!n,h=l||e.i!=2,f=e.i;l&&(n=new tn(c*3));var g=function(Nt){var Ft=n.length;if(Nt>Ft){var _t=new tn(Math.max(Ft*2,Nt));_t.set(n),n=_t}},y=e.f||0,w=e.p||0,S=e.b||0,p=e.l,O=e.d,F=e.m,q=e.n,_=c*8;do{if(!p){y=qn(r,w,1);var B=qn(r,w+1,3);if(w+=3,B)if(B==1)p=Iu,O=ju,F=9,q=5;else if(B==2){var wt=qn(r,w,31)+257,tt=qn(r,w+10,15)+4,z=wt+qn(r,w+5,31)+1;w+=14;for(var rt=new tn(z),dt=new tn(19),P=0;P>4;if(Y<16)rt[P++]=Y;else{var it=0,lt=0;for(Y==16?(lt=3+qn(r,w,3),w+=2,it=rt[P-1]):Y==17?(lt=3+qn(r,w,7),w+=3):Y==18&&(lt=11+qn(r,w,127),w+=7);lt--;)rt[P++]=it}}var $=rt.subarray(0,wt),ht=rt.subarray(wt);F=os($),q=os(ht),p=tr($,F,1),O=tr(ht,q,1)}else Rn(1);else{var Y=ks(w)+4,ot=r[Y-4]|r[Y-3]<<8,ut=Y+ot;if(ut>c){f&&Rn(0);break}h&&g(S+ot),n.set(r.subarray(Y,ut),S),e.b=S+=ot,e.p=w=ut*8,e.f=y;continue}if(w>_){f&&Rn(0);break}}h&&g(S+131072);for(var pt=(1<>4;if(w+=it&15,w>_){f&&Rn(0);break}if(it||Rn(2),C<256)n[S++]=C;else if(C==256){N=w,p=null;break}else{var M=C-254;if(C>264){var P=C-257,T=go[P];M=qn(r,w,(1<>4;J||Rn(3),w+=J&15;var ht=ku[Q];if(Q>3){var T=mo[Q];ht+=ss(r,w)&(1<_){f&&Rn(0);break}h&&g(S+131072);var et=S+M;if(S>8},la=function(r,e,n){n<<=e&7;var a=e/8|0;r[a]|=n,r[a+1]|=n>>8,r[a+2]|=n>>16},cs=function(r,e){for(var n=[],a=0;aS&&(S=o[a].s);var p=new vn(S+1),O=ys(n[y-1],p,0);if(O>e){var a=0,F=0,q=O-e,_=1<e)F+=_-(1<>=q;F>0;){var Y=o[a].s;p[Y]=0&&F;--a){var ot=o[a].s;p[ot]==e&&(--p[ot],++F)}O=e}return{t:new tn(p),l:O}},ys=function(r,e,n){return r.s==-1?Math.max(ys(r.l,e,n+1),ys(r.r,e,n+1)):e[r.s]=n},ac=function(r){for(var e=r.length;e&&!r[--e];);for(var n=new vn(++e),a=0,c=r[0],o=1,l=function(f){n[a++]=f},h=1;h<=e;++h)if(r[h]==c&&h!=e)++o;else{if(!c&&o>2){for(;o>138;o-=138)l(32754);o>2&&(l(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(l(c),--o;o>6;o-=6)l(8304);o>2&&(l(o-3<<5|8208),o=0)}for(;o--;)l(c);o=1,c=r[h]}return{c:n.subarray(0,a),n:e}},ha=function(r,e){for(var n=0,a=0;a>8,r[c+2]=r[c]^255,r[c+3]=r[c+1]^255;for(var o=0;o4&&!dt[ms[k-1]];--k);var W=g+5<<3,D=ha(c,Cr)+ha(o,da)+l,st=ha(c,S)+ha(o,F)+l+14+3*k+ha(tt,dt)+2*tt[16]+3*tt[17]+7*tt[18];if(f>=0&&W<=D&&W<=st)return Fc(e,y,r.subarray(f,f+g));var it,lt,$,ht;if(dr(e,y,1+(st15&&(dr(e,y,C[z]>>5&127),y+=C[z]>>12)}}else it=Fu,lt=Cr,$=Cu,ht=da;for(var z=0;z255){var M=T>>18&31;la(e,y,it[M+257]),y+=lt[M+257],M>7&&(dr(e,y,T>>23&31),y+=go[M]);var J=T&31;la(e,y,$[J]),y+=ht[J],J>3&&(la(e,y,T>>5&8191),y+=mo[J])}else la(e,y,it[T]),y+=lt[T]}return la(e,y,it[256]),y+lt[256]},Mu=new Ps([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Ic=new tn(0),Eu=function(r,e,n,a,c,o){var l=o.z||r.length,h=new tn(a+l+5*(1+Math.ceil(l/7e3))+c),f=h.subarray(a,h.length-c),g=o.l,y=(o.r||0)&7;if(e){y&&(f[0]=o.r>>3);for(var w=Mu[e-1],S=w>>13,p=w&8191,O=(1<7e3||dt>24576)&&(it>423||!g)){y=oc(r,f,0,ot,ut,wt,z,dt,k,rt-k,y),dt=tt=z=0,k=rt;for(var lt=0;lt<286;++lt)ut[lt]=0;for(var lt=0;lt<30;++lt)wt[lt]=0}var $=2,ht=0,pt=p,It=D-st&32767;if(it>2&&W==Y(rt-It))for(var N=Math.min(S,it)-1,C=Math.min(32767,rt),M=Math.min(258,it);It<=C&&--pt&&D!=st;){if(r[rt+$]==r[rt+$-It]){for(var T=0;T$){if($=T,ht=It,T>N)break;for(var J=Math.min(It,T-2),Q=0,lt=0;ltQ&&(Q=At,st=et)}}}D=st,st=F[D],It+=D-st&32767}if(ht){ot[dt++]=268435456|vs[$]<<18|ic[ht];var Nt=vs[$]&31,Ft=ic[ht]&31;z+=go[Nt]+mo[Ft],++ut[257+Nt],++wt[Ft],P=rt+$,++tt}else ot[dt++]=r[rt],++ut[r[rt]]}}for(rt=Math.max(rt,P);rt=l&&(f[y/8|0]=g,_t=l),y=Fc(f,y+1,r.subarray(rt,_t))}o.i=l}return kc(h,0,a+ks(y)+c)},Cc=function(){var r=1,e=0;return{p:function(n){for(var a=r,c=e,o=n.length|0,l=0;l!=o;){for(var h=Math.min(l+2655,o);l>16),c=(c&65535)+15*(c>>16)}r=a,e=c},d:function(){return r%=65521,e%=65521,(r&255)<<24|(r&65280)<<8|(e&255)<<8|e>>8}}},qu=function(r,e,n,a,c){if(!c&&(c={l:1},e.dictionary)){var o=e.dictionary.subarray(-32768),l=new tn(o.length+r.length);l.set(o),l.set(r,o.length),r=l,c.w=o.length}return Eu(r,e.level==null?6:e.level,e.mem==null?c.l?Math.ceil(Math.max(8,Math.min(13,Math.log(r.length)))*1.5):20:12+e.mem,n,a,c)},jc=function(r,e,n){for(;n;++e)r[e]=n,n>>>=8},Du=function(r,e){var n=e.level,a=n==0?0:n<6?1:n==9?3:2;if(r[0]=120,r[1]=a<<6|(e.dictionary&&32),r[1]|=31-(r[0]<<8|r[1])%31,e.dictionary){var c=Cc();c.p(e.dictionary),jc(r,2,c.d())}},Ru=function(r,e){return((r[0]&15)!=8||r[0]>>4>7||(r[0]<<8|r[1])%31)&&Rn(6,"invalid zlib data"),(r[1]>>5&1)==+!e&&Rn(6,"invalid zlib data: "+(r[1]&32?"need":"unexpected")+" dictionary"),(r[1]>>3&4)+2};function ws(r,e){e||(e={});var n=Cc();n.p(r);var a=qu(r,e,e.dictionary?6:2,4);return Du(a,e),jc(a,a.length-4,n.d()),a}function Tu(r,e){return Bu(r.subarray(Ru(r,e),-4),{i:2},e,e)}var zu=typeof TextDecoder<"u"&&new TextDecoder,Uu=0;try{zu.decode(Ic,{stream:!0}),Uu=1}catch{}var Ht=function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this}();function us(){Ht.console&&typeof Ht.console.log=="function"&&Ht.console.log.apply(Ht.console,arguments)}var me={log:us,warn:function(r){Ht.console&&(typeof Ht.console.warn=="function"?Ht.console.warn.apply(Ht.console,arguments):us.call(null,arguments))},error:function(r){Ht.console&&(typeof Ht.console.error=="function"?Ht.console.error.apply(Ht.console,arguments):us(r))}};function ls(r,e,n){var a=new XMLHttpRequest;a.open("GET",r),a.responseType="blob",a.onload=function(){Gr(a.response,e,n)},a.onerror=function(){me.error("could not download file")},a.send()}function sc(r){var e=new XMLHttpRequest;e.open("HEAD",r,!1);try{e.send()}catch{}return e.status>=200&&e.status<=299}function io(r){try{r.dispatchEvent(new MouseEvent("click"))}catch{var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),r.dispatchEvent(e)}}var fa,Ls,Gr=Ht.saveAs||((typeof window>"u"?"undefined":ve(window))!=="object"||window!==Ht?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(r,e,n){var a=Ht.URL||Ht.webkitURL,c=document.createElement("a");e=e||r.name||"download",c.download=e,c.rel="noopener",typeof r=="string"?(c.href=r,c.origin!==location.origin?sc(c.href)?ls(r,e,n):io(c,c.target="_blank"):io(c)):(c.href=a.createObjectURL(r),setTimeout(function(){a.revokeObjectURL(c.href)},4e4),setTimeout(function(){io(c)},0))}:"msSaveOrOpenBlob"in navigator?function(r,e,n){if(e=e||r.name||"download",typeof r=="string")if(sc(r))ls(r,e,n);else{var a=document.createElement("a");a.href=r,a.target="_blank",setTimeout(function(){io(a)})}else navigator.msSaveOrOpenBlob(function(c,o){return o===void 0?o={autoBom:!1}:ve(o)!=="object"&&(me.warn("Deprecated: Expected third argument to be a object"),o={autoBom:!o}),o.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(c.type)?new Blob(["\uFEFF",c],{type:c.type}):c}(r,n),e)}:function(r,e,n,a){if((a=a||open("","_blank"))&&(a.document.title=a.document.body.innerText="downloading..."),typeof r=="string")return ls(r,e,n);var c=r.type==="application/octet-stream",o=/constructor/i.test(Ht.HTMLElement)||Ht.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||c&&o)&&(typeof FileReader>"u"?"undefined":ve(FileReader))==="object"){var h=new FileReader;h.onloadend=function(){var y=h.result;y=l?y:y.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=y:location=y,a=null},h.readAsDataURL(r)}else{var f=Ht.URL||Ht.webkitURL,g=f.createObjectURL(r);a?a.location=g:location.href=g,a=null,setTimeout(function(){f.revokeObjectURL(g)},4e4)}});/** +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DfzPiMvHeyHZ.js","./Bh0CuZ3gy5tC.js","./BEc19nv24p4W.js","./p-jlpmJ86TPh.js","./Cq1ZpfgEg4XJ.js","./BO_q12Vdyug-.js","./Tz2xttM4F6S2.js","./DUys4rac0YQP.js","./CL_VRsbiqLzM.js"])))=>i.map(i=>d[i]); +import{_ as gs}from"./CmsKOCeNyeyo.js";import{_ as ve}from"./BEc19nv24p4W.js";import"./Bh0CuZ3gy5tC.js";import"./p-jlpmJ86TPh.js";import"./Cq1ZpfgEg4XJ.js";import"./BO_q12Vdyug-.js";import"./Tz2xttM4F6S2.js";import"./DUys4rac0YQP.js";import"./CL_VRsbiqLzM.js";var tn=Uint8Array,vn=Uint16Array,Ps=Int32Array,go=new tn([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),mo=new tn([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),ms=new tn([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),xc=function(r,e){for(var n=new vn(31),a=0;a<31;++a)n[a]=e+=1<>1|(we&21845)<<1;kr=(kr&52428)>>2|(kr&13107)<<2,kr=(kr&61680)>>4|(kr&3855)<<4,bs[we]=((kr&65280)>>8|(kr&255)<<8)>>1}var tr=function(r,e,n){for(var a=r.length,c=0,o=new vn(e);c>f]=g}else for(h=new vn(a),c=0;c>15-r[c]);return h},Cr=new tn(288);for(var we=0;we<144;++we)Cr[we]=8;for(var we=144;we<256;++we)Cr[we]=9;for(var we=256;we<280;++we)Cr[we]=7;for(var we=280;we<288;++we)Cr[we]=8;var da=new tn(32);for(var we=0;we<32;++we)da[we]=5;var Fu=tr(Cr,9,0),Iu=tr(Cr,9,1),Cu=tr(da,5,0),ju=tr(da,5,1),os=function(r){for(var e=r[0],n=1;ne&&(e=r[n]);return e},qn=function(r,e,n){var a=e/8|0;return(r[a]|r[a+1]<<8)>>(e&7)&n},ss=function(r,e){var n=e/8|0;return(r[n]|r[n+1]<<8|r[n+2]<<16)>>(e&7)},ks=function(r){return(r+7)/8|0},kc=function(r,e,n){return(n==null||n>r.length)&&(n=r.length),new tn(r.subarray(e,n))},Ou=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Rn=function(r,e,n){var a=new Error(e||Ou[r]);if(a.code=r,Error.captureStackTrace&&Error.captureStackTrace(a,Rn),!n)throw a;return a},Bu=function(r,e,n,a){var c=r.length,o=0;if(!c||e.f&&!e.l)return n||new tn(0);var l=!n,h=l||e.i!=2,f=e.i;l&&(n=new tn(c*3));var g=function(Nt){var Ft=n.length;if(Nt>Ft){var _t=new tn(Math.max(Ft*2,Nt));_t.set(n),n=_t}},y=e.f||0,w=e.p||0,S=e.b||0,p=e.l,O=e.d,F=e.m,q=e.n,_=c*8;do{if(!p){y=qn(r,w,1);var B=qn(r,w+1,3);if(w+=3,B)if(B==1)p=Iu,O=ju,F=9,q=5;else if(B==2){var wt=qn(r,w,31)+257,tt=qn(r,w+10,15)+4,z=wt+qn(r,w+5,31)+1;w+=14;for(var rt=new tn(z),dt=new tn(19),P=0;P>4;if(Y<16)rt[P++]=Y;else{var it=0,lt=0;for(Y==16?(lt=3+qn(r,w,3),w+=2,it=rt[P-1]):Y==17?(lt=3+qn(r,w,7),w+=3):Y==18&&(lt=11+qn(r,w,127),w+=7);lt--;)rt[P++]=it}}var $=rt.subarray(0,wt),ht=rt.subarray(wt);F=os($),q=os(ht),p=tr($,F,1),O=tr(ht,q,1)}else Rn(1);else{var Y=ks(w)+4,ot=r[Y-4]|r[Y-3]<<8,ut=Y+ot;if(ut>c){f&&Rn(0);break}h&&g(S+ot),n.set(r.subarray(Y,ut),S),e.b=S+=ot,e.p=w=ut*8,e.f=y;continue}if(w>_){f&&Rn(0);break}}h&&g(S+131072);for(var pt=(1<>4;if(w+=it&15,w>_){f&&Rn(0);break}if(it||Rn(2),C<256)n[S++]=C;else if(C==256){N=w,p=null;break}else{var M=C-254;if(C>264){var P=C-257,T=go[P];M=qn(r,w,(1<>4;J||Rn(3),w+=J&15;var ht=ku[Q];if(Q>3){var T=mo[Q];ht+=ss(r,w)&(1<_){f&&Rn(0);break}h&&g(S+131072);var et=S+M;if(S>8},la=function(r,e,n){n<<=e&7;var a=e/8|0;r[a]|=n,r[a+1]|=n>>8,r[a+2]|=n>>16},cs=function(r,e){for(var n=[],a=0;aS&&(S=o[a].s);var p=new vn(S+1),O=ys(n[y-1],p,0);if(O>e){var a=0,F=0,q=O-e,_=1<e)F+=_-(1<>=q;F>0;){var Y=o[a].s;p[Y]=0&&F;--a){var ot=o[a].s;p[ot]==e&&(--p[ot],++F)}O=e}return{t:new tn(p),l:O}},ys=function(r,e,n){return r.s==-1?Math.max(ys(r.l,e,n+1),ys(r.r,e,n+1)):e[r.s]=n},ac=function(r){for(var e=r.length;e&&!r[--e];);for(var n=new vn(++e),a=0,c=r[0],o=1,l=function(f){n[a++]=f},h=1;h<=e;++h)if(r[h]==c&&h!=e)++o;else{if(!c&&o>2){for(;o>138;o-=138)l(32754);o>2&&(l(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(l(c),--o;o>6;o-=6)l(8304);o>2&&(l(o-3<<5|8208),o=0)}for(;o--;)l(c);o=1,c=r[h]}return{c:n.subarray(0,a),n:e}},ha=function(r,e){for(var n=0,a=0;a>8,r[c+2]=r[c]^255,r[c+3]=r[c+1]^255;for(var o=0;o4&&!dt[ms[k-1]];--k);var W=g+5<<3,D=ha(c,Cr)+ha(o,da)+l,st=ha(c,S)+ha(o,F)+l+14+3*k+ha(tt,dt)+2*tt[16]+3*tt[17]+7*tt[18];if(f>=0&&W<=D&&W<=st)return Fc(e,y,r.subarray(f,f+g));var it,lt,$,ht;if(dr(e,y,1+(st15&&(dr(e,y,C[z]>>5&127),y+=C[z]>>12)}}else it=Fu,lt=Cr,$=Cu,ht=da;for(var z=0;z255){var M=T>>18&31;la(e,y,it[M+257]),y+=lt[M+257],M>7&&(dr(e,y,T>>23&31),y+=go[M]);var J=T&31;la(e,y,$[J]),y+=ht[J],J>3&&(la(e,y,T>>5&8191),y+=mo[J])}else la(e,y,it[T]),y+=lt[T]}return la(e,y,it[256]),y+lt[256]},Mu=new Ps([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Ic=new tn(0),Eu=function(r,e,n,a,c,o){var l=o.z||r.length,h=new tn(a+l+5*(1+Math.ceil(l/7e3))+c),f=h.subarray(a,h.length-c),g=o.l,y=(o.r||0)&7;if(e){y&&(f[0]=o.r>>3);for(var w=Mu[e-1],S=w>>13,p=w&8191,O=(1<7e3||dt>24576)&&(it>423||!g)){y=oc(r,f,0,ot,ut,wt,z,dt,k,rt-k,y),dt=tt=z=0,k=rt;for(var lt=0;lt<286;++lt)ut[lt]=0;for(var lt=0;lt<30;++lt)wt[lt]=0}var $=2,ht=0,pt=p,It=D-st&32767;if(it>2&&W==Y(rt-It))for(var N=Math.min(S,it)-1,C=Math.min(32767,rt),M=Math.min(258,it);It<=C&&--pt&&D!=st;){if(r[rt+$]==r[rt+$-It]){for(var T=0;T$){if($=T,ht=It,T>N)break;for(var J=Math.min(It,T-2),Q=0,lt=0;ltQ&&(Q=At,st=et)}}}D=st,st=F[D],It+=D-st&32767}if(ht){ot[dt++]=268435456|vs[$]<<18|ic[ht];var Nt=vs[$]&31,Ft=ic[ht]&31;z+=go[Nt]+mo[Ft],++ut[257+Nt],++wt[Ft],P=rt+$,++tt}else ot[dt++]=r[rt],++ut[r[rt]]}}for(rt=Math.max(rt,P);rt=l&&(f[y/8|0]=g,_t=l),y=Fc(f,y+1,r.subarray(rt,_t))}o.i=l}return kc(h,0,a+ks(y)+c)},Cc=function(){var r=1,e=0;return{p:function(n){for(var a=r,c=e,o=n.length|0,l=0;l!=o;){for(var h=Math.min(l+2655,o);l>16),c=(c&65535)+15*(c>>16)}r=a,e=c},d:function(){return r%=65521,e%=65521,(r&255)<<24|(r&65280)<<8|(e&255)<<8|e>>8}}},qu=function(r,e,n,a,c){if(!c&&(c={l:1},e.dictionary)){var o=e.dictionary.subarray(-32768),l=new tn(o.length+r.length);l.set(o),l.set(r,o.length),r=l,c.w=o.length}return Eu(r,e.level==null?6:e.level,e.mem==null?c.l?Math.ceil(Math.max(8,Math.min(13,Math.log(r.length)))*1.5):20:12+e.mem,n,a,c)},jc=function(r,e,n){for(;n;++e)r[e]=n,n>>>=8},Du=function(r,e){var n=e.level,a=n==0?0:n<6?1:n==9?3:2;if(r[0]=120,r[1]=a<<6|(e.dictionary&&32),r[1]|=31-(r[0]<<8|r[1])%31,e.dictionary){var c=Cc();c.p(e.dictionary),jc(r,2,c.d())}},Ru=function(r,e){return((r[0]&15)!=8||r[0]>>4>7||(r[0]<<8|r[1])%31)&&Rn(6,"invalid zlib data"),(r[1]>>5&1)==+!e&&Rn(6,"invalid zlib data: "+(r[1]&32?"need":"unexpected")+" dictionary"),(r[1]>>3&4)+2};function ws(r,e){e||(e={});var n=Cc();n.p(r);var a=qu(r,e,e.dictionary?6:2,4);return Du(a,e),jc(a,a.length-4,n.d()),a}function Tu(r,e){return Bu(r.subarray(Ru(r,e),-4),{i:2},e,e)}var zu=typeof TextDecoder<"u"&&new TextDecoder,Uu=0;try{zu.decode(Ic,{stream:!0}),Uu=1}catch{}var Ht=function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this}();function us(){Ht.console&&typeof Ht.console.log=="function"&&Ht.console.log.apply(Ht.console,arguments)}var me={log:us,warn:function(r){Ht.console&&(typeof Ht.console.warn=="function"?Ht.console.warn.apply(Ht.console,arguments):us.call(null,arguments))},error:function(r){Ht.console&&(typeof Ht.console.error=="function"?Ht.console.error.apply(Ht.console,arguments):us(r))}};function ls(r,e,n){var a=new XMLHttpRequest;a.open("GET",r),a.responseType="blob",a.onload=function(){Gr(a.response,e,n)},a.onerror=function(){me.error("could not download file")},a.send()}function sc(r){var e=new XMLHttpRequest;e.open("HEAD",r,!1);try{e.send()}catch{}return e.status>=200&&e.status<=299}function io(r){try{r.dispatchEvent(new MouseEvent("click"))}catch{var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),r.dispatchEvent(e)}}var fa,Ls,Gr=Ht.saveAs||((typeof window>"u"?"undefined":ve(window))!=="object"||window!==Ht?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(r,e,n){var a=Ht.URL||Ht.webkitURL,c=document.createElement("a");e=e||r.name||"download",c.download=e,c.rel="noopener",typeof r=="string"?(c.href=r,c.origin!==location.origin?sc(c.href)?ls(r,e,n):io(c,c.target="_blank"):io(c)):(c.href=a.createObjectURL(r),setTimeout(function(){a.revokeObjectURL(c.href)},4e4),setTimeout(function(){io(c)},0))}:"msSaveOrOpenBlob"in navigator?function(r,e,n){if(e=e||r.name||"download",typeof r=="string")if(sc(r))ls(r,e,n);else{var a=document.createElement("a");a.href=r,a.target="_blank",setTimeout(function(){io(a)})}else navigator.msSaveOrOpenBlob(function(c,o){return o===void 0?o={autoBom:!1}:ve(o)!=="object"&&(me.warn("Deprecated: Expected third argument to be a object"),o={autoBom:!o}),o.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(c.type)?new Blob(["\uFEFF",c],{type:c.type}):c}(r,n),e)}:function(r,e,n,a){if((a=a||open("","_blank"))&&(a.document.title=a.document.body.innerText="downloading..."),typeof r=="string")return ls(r,e,n);var c=r.type==="application/octet-stream",o=/constructor/i.test(Ht.HTMLElement)||Ht.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||c&&o)&&(typeof FileReader>"u"?"undefined":ve(FileReader))==="object"){var h=new FileReader;h.onloadend=function(){var y=h.result;y=l?y:y.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=y:location=y,a=null},h.readAsDataURL(r)}else{var f=Ht.URL||Ht.webkitURL,g=f.createObjectURL(r);a?a.location=g:location.href=g,a=null,setTimeout(function(){f.revokeObjectURL(g)},4e4)}});/** * A class to parse color values * @author Stoyan Stefanov * {@link http://www.phpied.com/rgb-color-parser-in-javascript/} @@ -164,7 +164,7 @@ endobj\r * http://opensource.org/licenses/mit-license */function Dn(r,e){if(this.pos=0,this.buffer=r,this.datav=new DataView(r.buffer),this.is_with_alpha=!!e,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function Nc(r){function e(z){if(!z)throw Error("assert :P")}function n(z,rt,dt){for(var P=0;4>P;P++)if(z[rt+P]!=dt.charCodeAt(P))return!0;return!1}function a(z,rt,dt,P,k){for(var W=0;WW+1?[]:new rt),!(D.length>>0;t&u;)u>>>=1;return u?(t&u-1)+u:t}function dt(t,i,u,d,m){e(!(d%u));do t[i+(d-=u)]=m;while(0=m),512>=m)var b=o(512);else if((b=o(m))==null)return 0;return function(L,A,x,I,U,K){var Z,G,vt=A,at=1<Z;++Z){if(H[Z]>1<(Rt-=H[Z]))return 0;for(;0=Z;++Z,U<<=1){if(St+=Rt<<=1,0>(Rt-=H[Z]))return 0;for(;0bt&&!(0>=(gt-=H[bt]));)++bt,gt<<=1;at+=Pt=1<<(gt=bt-x),L[A+(bt=Bt&mt)].g=gt+x,L[A+bt].value=vt-A-bt}I.g=Z-x,I.value=K[G++],dt(L,vt+(Bt>>x),U,Pt,I),Bt=rt(Bt,Z)}}return St!=2*V[15]-1?0:at}(t,i,u,d,m,b)}function k(){this.value=this.g=0}function W(){this.value=this.g=0}function D(){this.G=l(5,k),this.H=o(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=l(Ve,W)}function st(t,i,u,d){e(t!=null),e(i!=null),e(2147483648>d),t.Ca=254,t.I=0,t.b=-8,t.Ka=0,t.oa=i,t.pa=u,t.Jd=i,t.Yc=u+d,t.Zc=4<=d?u+d-4+1:u,Q(t)}function it(t,i){for(var u=0;0d),t.Sb=d,t.Ra=0,t.u=0,t.h=0,4>>=8,t.Ra+=t.oa[t.pa+t.bb]<>>0,++t.bb,t.u-=8;M(t)&&(t.h=1,t.u=0)}function pt(t,i){if(e(0<=i),!t.h&&i<=pi){var u=C(t)&di[i];return t.u+=i,ht(t),u}return t.h=1,t.u=0}function It(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function N(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function C(t){return t.Ra>>>(t.u&gi-1)>>>0}function M(t){return e(t.bb<=t.Sb),t.h||t.bb==t.Sb&&t.u>gi}function T(t,i){t.u=i,t.h=M(t)}function J(t){t.u>=$i&&(e(t.u>=$i),ht(t))}function Q(t){e(t!=null&&t.oa!=null),t.pa>>0,t.b+=8):(e(t!=null&&t.oa!=null),t.pat.b&&Q(t);var d=t.b,m=u*i>>>8,b=(t.I>>>d>m)+0;for(b?(u-=m,t.I-=m+1<>>0):u=m+1,d=u,m=0;256<=d;)m+=8,d>>=8;return d=7^m+sn[d],t.b-=d,t.Ca=(u<>24&255,t[i+1]=u>>16&255,t[i+2]=u>>8&255,t[i+3]=u>>0&255}function Nt(t,i){return t[i+0]<<0|t[i+1]<<8}function Ft(t,i){return Nt(t,i)|t[i+2]<<16}function _t(t,i){return Nt(t,i)|Nt(t,i+2)<<16}function zt(t,i){var u=1<=m||0>=b?0:(u[0]=m,d[0]=b,1)}function Et(t,i){return t+(1<>>i}function Lt(t,i){return((4278255360&t)+(4278255360&i)>>>0&4278255360)+((16711935&t)+(16711935&i)>>>0&16711935)>>>0}function xt(t,i){z[i]=function(u,d,m,b,L,A,x){var I;for(I=0;I>>1)+(t&i)>>>0}function qt(t){return 0<=t&&256>t?t:0>t?0:255>1))}function Qt(t,i,u){return Math.abs(i-u)-Math.abs(t-u)}function te(t,i,u,d,m,b,L){for(d=b[L-1],u=0;u>8&255,x=16711935&(x=(x=16711935&L)+((A<<16)+A));d[m+b]=(4278255360&L)+x>>>0}}function fe(t,i){i.jd=t>>0&255,i.hd=t>>8&255,i.ud=t>>16&255}function Wt(t,i,u,d,m,b){var L;for(L=0;L>>8,I=A,U=255&(U=(U=A>>>16)+((t.jd<<24>>24)*(x<<24>>24)>>>5));I=255&(I=(I=I+((t.hd<<24>>24)*(x<<24>>24)>>>5))+((t.ud<<24>>24)*(U<<24>>24)>>>5)),m[b+L]=(4278255360&A)+(U<<16)+I}}function ee(t,i,u,d,m){z[i]=function(b,L,A,x,I,U,K,Z,G){for(x=K;x>b.b,G=b.Ea,vt=b.K[0],at=b.w;if(8>Z)for(b=(1<>=Z}else z["VP8LMapColor"+u](x,I,vt,at,U,K,L,A,G)}}function jt(t,i,u,d,m){for(u=i+u;i>16&255,d[m++]=b>>8&255,d[m++]=b>>0&255}}function Je(t,i,u,d,m){for(u=i+u;i>16&255,d[m++]=b>>8&255,d[m++]=b>>0&255,d[m++]=b>>24&255}}function oe(t,i,u,d,m){for(u=i+u;i>16&240|L>>12&15,L=L>>0&240|L>>28&15;d[m++]=b,d[m++]=L}}function _n(t,i,u,d,m){for(u=i+u;i>16&248|L>>13&7,L=L>>5&224|L>>3&31;d[m++]=b,d[m++]=L}}function pe(t,i,u,d,m){for(u=i+u;i>0&255,d[m++]=b>>8&255,d[m++]=b>>16&255}}function Le(t,i,u,d,m,b){if(b==0)for(u=i+u;i>24|b[1]>>8&65280|b[2]<<8&16711680|b[3]<<24)>>>0),m+=32;else a(d,m,t,i,u)}function Un(t,i){z[i][0]=z[t+"0"],z[i][1]=z[t+"1"],z[i][2]=z[t+"2"],z[i][3]=z[t+"3"],z[i][4]=z[t+"4"],z[i][5]=z[t+"5"],z[i][6]=z[t+"6"],z[i][7]=z[t+"7"],z[i][8]=z[t+"8"],z[i][9]=z[t+"9"],z[i][10]=z[t+"10"],z[i][11]=z[t+"11"],z[i][12]=z[t+"12"],z[i][13]=z[t+"13"],z[i][14]=z[t+"0"],z[i][15]=z[t+"0"]}function ce(t){return t==Vo||t==Go||t==Wa||t==Jo}function Or(){this.eb=[],this.size=this.A=this.fb=0}function Ae(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function Pn(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new Or,this.f.kb=new Ae,this.sd=null}function nr(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function xe(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function Jt(t){return alert("todo:WebPSamplerProcessPlane"),t.T}function ue(t,i){var u=t.T,d=i.ba.f.RGBA,m=d.eb,b=d.fb+t.ka*d.A,L=xn[i.ba.S],A=t.y,x=t.O,I=t.f,U=t.N,K=t.ea,Z=t.W,G=i.cc,vt=i.dc,at=i.Mc,H=i.Nc,V=t.ka,gt=t.ka+t.T,bt=t.U,mt=bt+1>>1;for(V==0?L(A,x,null,null,I,U,K,Z,I,U,K,Z,m,b,null,null,bt):(L(i.ec,i.fc,A,x,G,vt,at,H,I,U,K,Z,m,b-d.A,m,b,bt),++u);V+2u,m=u==za||u==Ua||u==Ha||u==Wo||u==12||ce(u);if(i.memory=null,i.Ib=null,i.Jb=null,i.Nd=null,!Ki(i.Oa,t,m?11:12))return 0;if(m&&ce(u)&&yt(),t.da)alert("todo:use_scaling");else{if(d){if(i.Ib=Jt,t.Kb){if(u=t.U+1>>1,i.memory=o(t.U+2*u),i.memory==null)return 0;i.ec=i.memory,i.fc=0,i.cc=i.ec,i.dc=i.fc+t.U,i.Mc=i.cc,i.Nc=i.dc+u,i.Ib=ue,yt()}}else alert("todo:EmitYUV");m&&(i.Jb=Br,d&&X())}if(d&&!Ts){for(t=0;256>t;++t)uu[t]=89858*(t-128)+Ga>>Va,fu[t]=-22014*(t-128)+Ga,hu[t]=-45773*(t-128),lu[t]=113618*(t-128)+Ga>>Va;for(t=aa;t>Va,du[t-aa]=dn(i,255),pu[t-aa]=dn(i+8>>4,15);Ts=1}return 1}function Hn(t){var i=t.ma,u=t.U,d=t.T;return e(!(1&t.ka)),0>=u||0>=d?0:(u=i.Ib(t,i),i.Jb!=null&&i.Jb(t,i,u),i.Dc+=u,1)}function Wn(t){t.ma.memory=null}function Tt(t,i,u,d){return pt(t,8)!=47?0:(i[0]=pt(t,14)+1,u[0]=pt(t,14)+1,d[0]=pt(t,1),pt(t,3)!=0?0:!t.h)}function kn(t,i){if(4>t)return t+1;var u=t-2>>1;return(2+(1&t)<>4)*t+(8-(15&u)))?u:1;var u}function an(t,i,u){var d=C(u),m=t[i+=255&d].g-8;return 0>>0,e(8>=u.g),t.g}function Be(t,i,u){var d=t.xc;return e((i=d==0?0:t.vc[t.md*(u>>d)+(i>>d)])>Pt.b)*St;atbt&&(ne=bt),(0,vr[se[le++]>>8&15])(Z,G+ +ae,V,gt+ae-bt,ne-ae,V,gt+ae),ae=ne}G+=bt,gt+=bt,++at&Bt||(Pt+=St)}K!=I.nc&&a(x,A-vt,x,A+(K-U-1)*vt,vt);break;case 1:for(vt=Z,H=G,bt=(Z=I.Ea)-(gt=Z&~(V=(G=1<>I.b)*at;U=m),0b.o&&(d=b.o),u=d?u=0:(m[0]+=4*b.v,b.ka=u-b.j,b.U=b.va-b.v,b.T=d-u,u=1),u){if(A=A[0],11>(u=t.ca).S){var U=u.f.RGBA,K=(d=u.S,m=b.U,b=b.T,I=U.eb,U.A),Z=b;for(U=U.fb+t.Ma*U.A;0d){var m=t.l.width,b=u.ca,L=u.tb+m*d,A=t.V,x=t.Ba+t.c*d,I=t.gc;e(t.ab==1),e(I[0].hc==3),Ma(I[0],d,i,A,x,b,L),Fn(u,d,i,b,L,m)}t.C=t.Ma=i}function Cn(t,i,u,d,m,b,L){var A=t.$/d,x=t.$%d,I=t.m,U=t.s,K=u+t.$,Z=K;m=u+d*m;var G=u+d*b,vt=280+U.ua,at=t.Pb?A:16777216,H=0=at){var Bt=K-u;e((at=t).Pb),at.wd=at.m,at.xd=Bt,0Rt.g?(T(mt,mt.u+Rt.g),Bt[St]=Rt.value,mt=0):(T(mt,mt.u+Rt.g-256),e(256<=Rt.value),mt=Rt.value),mt==0&&(bt=!0)}else mt=an(gt.G[0],gt.H[0],I);if(I.h)break;if(bt||256>mt){if(!bt)if(gt.nd)i[K]=(gt.qb|mt<<8)>>>0;else{if(J(I),bt=an(gt.G[1],gt.H[1],I),J(I),Bt=an(gt.G[2],gt.H[2],I),St=an(gt.G[3],gt.H[3],I),I.h)break;i[K]=(St<<24|bt<<16|mt<<8|Bt)>>>0}if(bt=!1,++K,++x>=d&&(x=0,++A,L!=null&&A<=b&&!(A%16)&&L(t,A),H!=null))for(;Z>>H.Mb]=mt}else if(280>mt){if(mt=kn(mt-256,I),Bt=an(gt.G[4],gt.H[4],I),J(I),Bt=Vn(d,Bt=kn(Bt,I)),I.h)break;if(K-u=d;)x-=d,++A,L!=null&&A<=b&&!(A%16)&&L(t,A);if(e(K<=m),x&V&&(gt=Be(U,x,A)),H!=null)for(;Z>>H.Mb]=mt}else{if(!(mt>>H.Mb]=mt;mt=K,e(!(bt>>>(Bt=H).Xa)),i[mt]=Bt.X[bt],bt=!0}bt||e(I.h==M(I))}if(t.Pb&&I.h&&Kb?b:A),t.a=0,t.$=K-u}return 1}return t.a=3,0}function Gn(t){e(t!=null),t.vc=null,t.yc=null,t.Ya=null;var i=t.Wa;i!=null&&(i.X=null),t.vb=null,e(t!=null)}function bn(){var t=new zo;return t==null?null:(t.a=0,t.xb=Bs,Un("Predictor","VP8LPredictors"),Un("Predictor","VP8LPredictors_C"),Un("PredictorAdd","VP8LPredictorsAdd"),Un("PredictorAdd","VP8LPredictorsAdd_C"),Ba=ie,Tr=Wt,cn=jt,en=Je,br=oe,or=_n,sr=pe,z.VP8LMapColor32b=mi,z.VP8LMapColor8b=Ea,t)}function Jn(t,i,u,d,m){var b=1,L=[t],A=[i],x=d.m,I=d.s,U=null,K=0;t:for(;;){if(u)for(;b&&pt(x,1);){var Z=L,G=A,vt=d,at=1,H=vt.m,V=vt.gc[vt.ab],gt=pt(H,2);if(vt.Oc&1<=vt.ab),gt){case 0:case 1:V.b=pt(H,3)+2,at=Jn(Et(V.Ea,V.b),Et(V.nc,V.b),0,vt,V.K),V.K=V.K[0];break;case 3:var bt,mt=pt(H,8)+1,Bt=16>Pt.b),le=o(se);if(le==null)bt=0;else{var ae=Pt.K[0],ne=Pt.w;for(le[0]=Pt.K[0][0],St=1;St<1*Rt;++St)le[St]=Lt(ae[ne+St],le[St-1]);for(;St<4*se;++St)le[St]=0;Pt.K[0]=null,Pt.K[0]=le,bt=1}}at=bt;break;case 2:break;default:e(0)}b=at}}if(L=L[0],A=A[0],b&&pt(x,1)&&!(b=1<=(K=pt(x,4))&&11>=K)){d.a=3;break t}var ge;if(ge=b)e:{var de,$t,Ee,un=d,qe=L,ln=A,he=K,gn=u,mn=un.m,ze=un.s,Ge=[null],rn=1,Sn=0,Zn=Kc[he];n:for(;;){if(gn&&pt(mn,1)){var Ue=pt(mn,3)+2,hr=Et(qe,Ue),Vr=Et(ln,Ue),Li=hr*Vr;if(!Jn(hr,Vr,0,un,Ge))break n;for(Ge=Ge[0],ze.xc=Ue,de=0;de>8&65535;Ge[de]=Ar,Ar>=rn&&(rn=Ar+1)}}if(mn.h)break n;for($t=0;5>$t;++$t){var _e=js[$t];!$t&&0=Hs),Ya=Ws;var oa=o(Sn);if(Ya==null||oa==null||Zo==null){un.a=1;break n}var Xa=Zo;for(de=Ee=0;de$t;++$t){_e=js[$t],Ni[$t]=Xa,Ai[$t]=Ee,!$t&&0eo)break r}else ts=eo;for(ca=0;caxi)Zs[ca++]=xi,xi!=0&&($s=xi);else{var xu=xi==16,ec=xi-16,Su=Gc[ec],nc=pt(Sr,Vc[ec])+Su;if(ca+nc>eo)break r;for(var _u=xu?$s:0;0=$t){var ua,ns=oa[0];for(ua=1;ua<_e;++ua)oa[ua]>ns&&(ns=oa[ua]);Gs+=ns}}if(En.nd=Ka,En.Qb=0,Ka&&(En.qb=(Ni[3][Ai[3]+0].value<<24|Ni[1][Ai[1]+0].value<<16|Ni[2][Ai[2]+0].value)>>>0,Vs==0&&256>Ni[0][Ai[0]+0].value&&(En.Qb=1,En.qb+=Ni[0][Ai[0]+0].value<<8)),En.jc=!En.Qb&&6>Gs,En.jc){var no,fr=En;for(no=0;no>=De(ro,8,Pr),_r>>=De(fr.G[1][fr.H[1]+_r],16,Pr),_r>>=De(fr.G[2][fr.H[2]+_r],0,Pr),De(fr.G[3][fr.H[3]+_r],24,Pr))}}}ze.vc=Ge,ze.Wb=rn,ze.Ya=Ya,ze.yc=Zo,ge=1;break e}ge=0}if(!(b=ge)){d.a=3;break t}if(0d+1?[]:0),!(m.lengthm)return ke(t,7,"Truncated header.");var b=u[d+0]|u[d+1]<<8|u[d+2]<<16,L=t.Od;if(L.Rb=!(1&b),L.td=b>>1&7,L.yd=b>>4&1,L.ub=b>>5,3m)return ke(t,7,"cannot parse picture header");if(!va(u,d,m))return ke(t,3,"Bad code word");A.c=16383&(u[d+4]<<8|u[d+3]),A.Td=u[d+4]>>6,A.i=16383&(u[d+6]<<8|u[d+5]),A.Ud=u[d+6]>>6,d+=7,m-=7,t.za=A.c+15>>4,t.Ub=A.i+15>>4,i.width=A.c,i.height=A.i,i.Da=0,i.j=0,i.v=0,i.va=i.width,i.o=i.height,i.da=0,i.ib=i.width,i.hb=i.height,i.U=i.width,i.T=i.height,c((b=t.Pa).jb,0,255,b.jb.length),e((b=t.Qa)!=null),b.Cb=0,b.Bb=0,b.Fb=1,c(b.Zb,0,0,b.Zb.length),c(b.Lb,0,0,b.Lb)}if(L.ub>m)return ke(t,7,"bad partition length");st(b=t.m,u,d,L.ub),d+=L.ub,m-=L.ub,L.Rb&&(A.Ld=et(b),A.Kd=et(b)),A=t.Qa;var x,I=t.Pa;if(e(b!=null),e(A!=null),A.Cb=et(b),A.Cb){if(A.Bb=et(b),et(b)){for(A.Fb=et(b),x=0;4>x;++x)A.Zb[x]=et(b)?lt(b,7):0;for(x=0;4>x;++x)A.Lb[x]=et(b)?lt(b,6):0}if(A.Bb)for(x=0;3>x;++x)I.jb[x]=et(b)?it(b,8):255}else A.Bb=0;if(b.Ka)return ke(t,3,"cannot parse segment header");if((A=t.ed).zd=et(b),A.Tb=it(b,6),A.wb=it(b,3),A.Pc=et(b),A.Pc&&et(b)){for(I=0;4>I;++I)et(b)&&(A.vd[I]=lt(b,6));for(I=0;4>I;++I)et(b)&&(A.od[I]=lt(b,6))}if(t.L=A.Tb==0?0:A.zd?1:2,b.Ka)return ke(t,3,"cannot parse filter header");var U=m;if(m=x=d,d=x+U,A=U,t.Xb=(1<A&&(K=A),st(t.Jc[+U],u,x,K),x+=K,A-=K,m+=3}st(t.Jc[+I],u,x,A),u=xK;++K){if(U.Cb){var Z=U.Zb[K];U.Fb||(Z+=u)}else{if(0>16,8>G.Eb[1]&&(G.Eb[1]=8),G.Qc[0]=Yo[dn(Z+I,117)],G.Qc[1]=Xo[dn(Z+x,127)],G.lc=Z+x}if(!L.Rb)return ke(t,4,"Not a key frame.");for(et(b),L=t.Pa,u=0;4>u;++u){for(m=0;8>m;++m)for(d=0;3>d;++d)for(A=0;11>A;++A)I=nt(b,nu[u][m][d][A])?it(b,8):tu[u][m][d][A],L.Wc[u][m].Yb[d][A]=I;for(m=0;17>m;++m)L.Xc[u][m]=L.Wc[u][ru[m]]}return t.kc=et(b),t.kc&&(t.Bd=it(b,8)),t.cb=1}function ya(t,i,u,d,m,b,L){var A=i[m].Yb[u];for(u=0;16>m;++m){if(!nt(t,A[u+0]))return m;for(;!nt(t,A[u+1]);)if(A=i[++m].Yb[0],u=0,m==16)return 16;var x=i[m+1].Yb;if(nt(t,A[u+2])){var I=t,U=0;if(nt(I,(Z=A)[(K=u)+3]))if(nt(I,Z[K+6])){for(A=0,K=2*(U=nt(I,Z[K+8]))+(Z=nt(I,Z[K+9+U])),U=0,Z=$c[K];Z[A];++A)U+=U+nt(I,Z[A]);U+=3+(8<(I=t).b&&Q(I);var K,Z=I.b,G=(K=I.Ca>>1)-(I.I>>Z)>>31;--I.b,I.Ca+=G,I.Ca|=1,I.I-=(K+1&G)<>4,t.zb=i.j-u>>4,0>t.yb&&(t.yb=0),0>t.zb&&(t.zb=0)),t.Va=i.o+15+u>>4,t.Hb=i.va+15+u>>4,t.Hb>t.za&&(t.Hb=t.za),t.Va>t.Ub&&(t.Va=t.Ub),0u;++u){var m;if(t.Qa.Cb){var b=t.Qa.Lb[u];t.Qa.Fb||(b+=d.Tb)}else b=d.Tb;for(m=0;1>=m;++m){var L=t.gd[u][m],A=b;if(d.Pc&&(A+=d.vd[0],m&&(A+=d.od[0])),0<(A=0>A?0:63>2:x>>1)>9-d.wb&&(x=9-d.wb),1>x&&(x=1),L.dd=x,L.tc=2*A+x,L.ld=40<=A?2:15<=A?1:0}else L.tc=0;L.La=m}}}u=0}else ke(t,6,"Frame setup failed"),u=t.a;if(u=u==0){if(u){t.$c=0,0t.Vb){if(t.Vb=0,t.Ec=o(L),t.Fc=0,t.Ec==null){u=ke(t,1,"no memory during frame initialization.");break t}t.Vb=L}L=t.Ec,A=t.Fc,t.Ac=L,t.Bc=A,A+=d,t.Gd=l(I,ma),t.Hd=0,t.rb=l(U+1,ga),t.sb=1,t.wa=K?l(K,ei):null,t.Y=0,t.D.Nb=0,t.D.wa=t.wa,t.D.Y=t.Y,0=u;++u)Re[255+u]=0>u?-u:u;for(u=-1020;1020>=u;++u)ur[1020+u]=-128>u?-128:127=u;++u)ra[112+u]=-16>u?-16:15=u;++u)wi[255+u]=0>u?0:255mt;++mt){var ae,ne=Rt[0+mt];for(ae=0;4>ae;++ae){ne=eu[Bt[St+ae]][ne];for(var ge=Os[nt(bt,ne[0])];0>3;for(ge=0;256>ge;ge+=16)mt[se+ge]=ln}Ee=1,un=St[0]}var he=15&bt.la,gn=15&le.la;for(ge=0;4>ge;++ge){var mn=1&gn;for(ln=$t=0;4>ln;++ln)he=he>>1|(mn=(qe=ia(Bt,un,qe=mn+(1&he),Pt.Sc,Ee,mt,se))>Ee)<<7,$t=$t<<2|(3>=4,gn=gn>>1|mn<<7,ae=(ae<<8|$t)>>>0}for(un=he,Ee=gn>>4,de=0;4>de;de+=2){for($t=0,he=bt.la>>4+de,gn=le.la>>4+de,ge=0;2>ge;++ge){for(mn=1&gn,ln=0;2>ln;++ln)qe=mn+(1&he),he=he>>1|(mn=0<(qe=ia(Bt,St[2],qe,Pt.Qc,0,mt,se)))<<3,$t=$t<<2|(3>=2,gn=gn>>1|mn<<5}ne|=$t<<4*de,un|=he<<4<=H.zb&&H.M<=H.Va,H.Aa==0)t:{if(at.M=H.M,at.uc=bt,Xi(H,at),gt=1,at=($t=H.D).Nb,bt=(ne=Ja[H.L])*H.R,Bt=ne/2*H.B,ge=16*at*H.R,ln=8*at*H.B,St=H.sa,Rt=H.ta-bt+ge,Pt=H.qa,mt=H.ra-Bt+ln,se=H.Ha,le=H.Ia-Bt+ln,gn=(he=$t.M)==0,ae=he>=H.Va-1,H.Aa==2&&Xi(H,$t),$t.uc)for(mn=(qe=H).D.M,e(qe.D.uc),$t=qe.yb;$tV.o&&(he=V.o),V.F=null,V.J=null,H.Fa!=null&&0>1),V.W+=H.B*(ne>>1),V.F!=null&&(V.J+=V.width*ne)),$t>1,V.W+=V.v>>1,V.F!=null&&(V.J+=V.v),V.ka=$t-V.j,V.U=V.va-V.v,V.T=he-$t,gt=V.put(V))}at+1!=H.Ic||ae||(a(H.sa,H.ta-bt,St,Rt+16*H.R,bt),a(H.qa,H.ra-Bt,Pt,mt+8*H.B,Bt),a(H.Ha,H.Ia-Bt,se,le+8*H.B,Bt))}if(!gt)return ke(G,6,"Output aborted.")}return 1}(t,i)),i.bc!=null&&i.bc(i),u&=1}return u?(t.cb=0,u):0}function jn(t,i,u,d,m){m=t[i+u+32*d]+(m>>3),t[i+u+32*d]=-256&m?0>m?0:255:m}function ri(t,i,u,d,m,b){jn(t,i,0,u,d+m),jn(t,i,1,u,d+b),jn(t,i,2,u,d-b),jn(t,i,3,u,d-m)}function on(t){return(20091*t>>16)+t}function Ei(t,i,u,d){var m,b=0,L=o(16);for(m=0;4>m;++m){var A=t[i+0]+t[i+8],x=t[i+0]-t[i+8],I=(35468*t[i+4]>>16)-on(t[i+12]),U=on(t[i+4])+(35468*t[i+12]>>16);L[b+0]=A+U,L[b+1]=x+I,L[b+2]=x-I,L[b+3]=A-U,b+=4,i++}for(m=b=0;4>m;++m)A=(t=L[b+0]+4)+L[b+8],x=t-L[b+8],I=(35468*L[b+4]>>16)-on(L[b+12]),jn(u,d,0,0,A+(U=on(L[b+4])+(35468*L[b+12]>>16))),jn(u,d,1,0,x+I),jn(u,d,2,0,x-I),jn(u,d,3,0,A-U),b++,d+=32}function wa(t,i,u,d){var m=t[i+0]+4,b=35468*t[i+4]>>16,L=on(t[i+4]),A=35468*t[i+1]>>16;ri(u,d,0,m+L,t=on(t[i+1]),A),ri(u,d,1,m+b,t,A),ri(u,d,2,m-b,t,A),ri(u,d,3,m-L,t,A)}function So(t,i,u,d,m){Ei(t,i,u,d),m&&Ei(t,i+16,u,d+4)}function La(t,i,u,d){cr(t,i+0,u,d,1),cr(t,i+32,u,d+128,1)}function _o(t,i,u,d){var m;for(t=t[i+0]+4,m=0;4>m;++m)for(i=0;4>i;++i)jn(u,d,i,m,t)}function Na(t,i,u,d){t[i+0]&&nn(t,i+0,u,d),t[i+16]&&nn(t,i+16,u,d+4),t[i+32]&&nn(t,i+32,u,d+128),t[i+48]&&nn(t,i+48,u,d+128+4)}function Po(t,i,u,d){var m,b=o(16);for(m=0;4>m;++m){var L=t[i+0+m]+t[i+12+m],A=t[i+4+m]+t[i+8+m],x=t[i+4+m]-t[i+8+m],I=t[i+0+m]-t[i+12+m];b[0+m]=L+A,b[8+m]=L-A,b[4+m]=I+x,b[12+m]=I-x}for(m=0;4>m;++m)L=(t=b[0+4*m]+3)+b[3+4*m],A=b[1+4*m]+b[2+4*m],x=b[1+4*m]-b[2+4*m],I=t-b[3+4*m],u[d+0]=L+A>>3,u[d+16]=I+x>>3,u[d+32]=L-A>>3,u[d+48]=I-x>>3,d+=64}function qi(t,i,u){var d,m=i-32,b=pn,L=255-t[m-1];for(d=0;du;++u)a(t,i+32*u,t,i-32,16)}function ii(t,i){var u;for(u=16;0d;++d)c(i,u+32*d,t,16)}function Aa(t,i){var u,d=16;for(u=0;16>u;++u)d+=t[i-1+32*u]+t[i+u-32];ai(d>>5,t,i)}function Ye(t,i){var u,d=8;for(u=0;16>u;++u)d+=t[i-1+32*u];ai(d>>4,t,i)}function Co(t,i){var u,d=8;for(u=0;16>u;++u)d+=t[i+u-32];ai(d>>4,t,i)}function xa(t,i){ai(128,t,i)}function Vt(t,i,u){return t+2*i+u+2>>2}function jo(t,i){var u,d=i-32;for(d=new Uint8Array([Vt(t[d-1],t[d+0],t[d+1]),Vt(t[d+0],t[d+1],t[d+2]),Vt(t[d+1],t[d+2],t[d+3]),Vt(t[d+2],t[d+3],t[d+4])]),u=0;4>u;++u)a(t,i+32*u,d,0,d.length)}function Oo(t,i){var u=t[i-1],d=t[i-1+32],m=t[i-1+64],b=t[i-1+96];At(t,i+0,16843009*Vt(t[i-1-32],u,d)),At(t,i+32,16843009*Vt(u,d,m)),At(t,i+64,16843009*Vt(d,m,b)),At(t,i+96,16843009*Vt(m,b,b))}function Yn(t,i){var u,d=4;for(u=0;4>u;++u)d+=t[i+u-32]+t[i-1+32*u];for(d>>=3,u=0;4>u;++u)c(t,i+32*u,d,4)}function Sa(t,i){var u=t[i-1+0],d=t[i-1+32],m=t[i-1+64],b=t[i-1-32],L=t[i+0-32],A=t[i+1-32],x=t[i+2-32],I=t[i+3-32];t[i+0+96]=Vt(d,m,t[i-1+96]),t[i+1+96]=t[i+0+64]=Vt(u,d,m),t[i+2+96]=t[i+1+64]=t[i+0+32]=Vt(b,u,d),t[i+3+96]=t[i+2+64]=t[i+1+32]=t[i+0+0]=Vt(L,b,u),t[i+3+64]=t[i+2+32]=t[i+1+0]=Vt(A,L,b),t[i+3+32]=t[i+2+0]=Vt(x,A,L),t[i+3+0]=Vt(I,x,A)}function _a(t,i){var u=t[i+1-32],d=t[i+2-32],m=t[i+3-32],b=t[i+4-32],L=t[i+5-32],A=t[i+6-32],x=t[i+7-32];t[i+0+0]=Vt(t[i+0-32],u,d),t[i+1+0]=t[i+0+32]=Vt(u,d,m),t[i+2+0]=t[i+1+32]=t[i+0+64]=Vt(d,m,b),t[i+3+0]=t[i+2+32]=t[i+1+64]=t[i+0+96]=Vt(m,b,L),t[i+3+32]=t[i+2+64]=t[i+1+96]=Vt(b,L,A),t[i+3+64]=t[i+2+96]=Vt(L,A,x),t[i+3+96]=Vt(A,x,x)}function oi(t,i){var u=t[i-1+0],d=t[i-1+32],m=t[i-1+64],b=t[i-1-32],L=t[i+0-32],A=t[i+1-32],x=t[i+2-32],I=t[i+3-32];t[i+0+0]=t[i+1+64]=b+L+1>>1,t[i+1+0]=t[i+2+64]=L+A+1>>1,t[i+2+0]=t[i+3+64]=A+x+1>>1,t[i+3+0]=x+I+1>>1,t[i+0+96]=Vt(m,d,u),t[i+0+64]=Vt(d,u,b),t[i+0+32]=t[i+1+96]=Vt(u,b,L),t[i+1+32]=t[i+2+96]=Vt(b,L,A),t[i+2+32]=t[i+3+96]=Vt(L,A,x),t[i+3+32]=Vt(A,x,I)}function Di(t,i){var u=t[i+0-32],d=t[i+1-32],m=t[i+2-32],b=t[i+3-32],L=t[i+4-32],A=t[i+5-32],x=t[i+6-32],I=t[i+7-32];t[i+0+0]=u+d+1>>1,t[i+1+0]=t[i+0+64]=d+m+1>>1,t[i+2+0]=t[i+1+64]=m+b+1>>1,t[i+3+0]=t[i+2+64]=b+L+1>>1,t[i+0+32]=Vt(u,d,m),t[i+1+32]=t[i+0+96]=Vt(d,m,b),t[i+2+32]=t[i+1+96]=Vt(m,b,L),t[i+3+32]=t[i+2+96]=Vt(b,L,A),t[i+3+64]=Vt(L,A,x),t[i+3+96]=Vt(A,x,I)}function Bo(t,i){var u=t[i-1+0],d=t[i-1+32],m=t[i-1+64],b=t[i-1+96];t[i+0+0]=u+d+1>>1,t[i+2+0]=t[i+0+32]=d+m+1>>1,t[i+2+32]=t[i+0+64]=m+b+1>>1,t[i+1+0]=Vt(u,d,m),t[i+3+0]=t[i+1+32]=Vt(d,m,b),t[i+3+32]=t[i+1+64]=Vt(m,b,b),t[i+3+64]=t[i+2+64]=t[i+0+96]=t[i+1+96]=t[i+2+96]=t[i+3+96]=b}function Mo(t,i){var u=t[i-1+0],d=t[i-1+32],m=t[i-1+64],b=t[i-1+96],L=t[i-1-32],A=t[i+0-32],x=t[i+1-32],I=t[i+2-32];t[i+0+0]=t[i+2+32]=u+L+1>>1,t[i+0+32]=t[i+2+64]=d+u+1>>1,t[i+0+64]=t[i+2+96]=m+d+1>>1,t[i+0+96]=b+m+1>>1,t[i+3+0]=Vt(A,x,I),t[i+2+0]=Vt(L,A,x),t[i+1+0]=t[i+3+32]=Vt(u,L,A),t[i+1+32]=t[i+3+64]=Vt(d,u,L),t[i+1+64]=t[i+3+96]=Vt(m,d,u),t[i+1+96]=Vt(b,m,d)}function Eo(t,i){var u;for(u=0;8>u;++u)a(t,i+32*u,t,i-32,8)}function Ri(t,i){var u;for(u=0;8>u;++u)c(t,i,t[i-1],8),i+=32}function Er(t,i,u){var d;for(d=0;8>d;++d)c(i,u+32*d,t,8)}function pr(t,i){var u,d=8;for(u=0;8>u;++u)d+=t[i+u-32]+t[i-1+32*u];Er(d>>4,t,i)}function qo(t,i){var u,d=4;for(u=0;8>u;++u)d+=t[i+u-32];Er(d>>3,t,i)}function qr(t,i){var u,d=4;for(u=0;8>u;++u)d+=t[i-1+32*u];Er(d>>3,t,i)}function Ti(t,i){Er(128,t,i)}function si(t,i,u){var d=t[i-u],m=t[i+0],b=3*(m-d)+Ho[1020+t[i-2*u]-t[i+u]],L=Ra[112+(b+4>>3)];t[i-u]=pn[255+d+Ra[112+(b+3>>3)]],t[i+0]=pn[255+m-L]}function Pa(t,i,u,d){var m=t[i+0],b=t[i+u];return An[255+t[i-2*u]-t[i-u]]>d||An[255+b-m]>d}function ka(t,i,u,d){return 4*An[255+t[i-u]-t[i+0]]+An[255+t[i-2*u]-t[i+u]]<=d}function Fa(t,i,u,d,m){var b=t[i-3*u],L=t[i-2*u],A=t[i-u],x=t[i+0],I=t[i+u],U=t[i+2*u],K=t[i+3*u];return 4*An[255+A-x]+An[255+L-I]>d?0:An[255+t[i-4*u]-b]<=m&&An[255+b-L]<=m&&An[255+L-A]<=m&&An[255+K-U]<=m&&An[255+U-I]<=m&&An[255+I-x]<=m}function Ia(t,i,u,d){var m=2*d+1;for(d=0;16>d;++d)ka(t,i+d,u,m)&&si(t,i+d,u)}function Xn(t,i,u,d){var m=2*d+1;for(d=0;16>d;++d)ka(t,i+d*u,1,m)&&si(t,i+d*u,1)}function ar(t,i,u,d){var m;for(m=3;0>7,V=18*gt+63>>7,gt=9*gt+63>>7;x[I-3*U]=pn[255+x[I-3*U]+gt],x[I-2*U]=pn[255+K+V],x[I-U]=pn[255+Z+H],x[I+0]=pn[255+G-H],x[I+U]=pn[255+vt-V],x[I+2*U]=pn[255+at-gt]}i+=d}}function On(t,i,u,d,m,b,L,A){for(b=2*b+1;0>3)],at=Ra[112+(at+3>>3)],H=vt+1>>1;x[I-2*U]=pn[255+x[I-2*U]+H],x[I-U]=pn[255+K+at],x[I+0]=pn[255+Z-vt],x[I+U]=pn[255+G-H]}i+=d}}function zi(t,i,u,d,m,b){gr(t,i,u,1,16,d,m,b)}function Dr(t,i,u,d,m,b){gr(t,i,1,u,16,d,m,b)}function Ro(t,i,u,d,m,b){var L;for(L=3;0I?0:255:I)&255,I=x,m[b+A]=U}}function Ji(t,i,u,d){var m=i.width,b=i.o;if(e(t!=null&&i!=null),0>u||0>=d||u+d>b)return null;if(!t.Cc){if(t.ga==null){var L;if(t.ga=new li,(L=t.ga==null)||(L=i.width*i.o,e(t.Gb.length==0),t.Gb=o(L),t.Uc=0,t.Gb==null?L=0:(t.mb=t.Gb,t.nb=t.Uc,t.rc=null,L=1),L=!L),!L){L=t.ga;var A=t.Fa,x=t.P,I=t.qc,U=t.mb,K=t.nb,Z=x+1,G=I-1,vt=L.l;if(e(A!=null&&U!=null&&i!=null),Nr[0]=null,Nr[1]=Rr,Nr[2]=Gi,Nr[3]=mr,L.ca=U,L.tb=K,L.c=i.width,L.i=i.height,e(0=I)i=0;else if(L.$a=A[x+0]>>0&3,L.Z=A[x+0]>>2&3,L.Lc=A[x+0]>>4&3,x=A[x+0]>>6&3,0>L.$a||1=L.c*L.i;L=!i}if(L)return null;t.ga.Lc!=1?t.Ga=0:d=b-u}e(t.ga!=null),e(u+d<=b);t:{if(i=(A=t.ga).c,b=A.l.o,A.$a==0){if(Z=t.rc,G=t.Vc,vt=t.Fa,x=t.P+1+u*i,I=t.mb,U=t.nb+u*i,e(x<=t.P+t.qc),A.Z!=0)for(e(Nr[A.Z]!=null),L=0;L=i)i=1;else if(A.ic||X(),A.ic){A=L.V,Z=L.Ba,G=L.c;var at=L.i,H=(vt=1,x=L.$/G,I=L.$%G,U=L.m,K=L.s,L.$),V=G*at,gt=G*i,bt=K.wc,mt=H(at=an(mt.G[0],mt.H[0],U)))A[Z+H]=at,++H,++I>=G&&(I=0,++x<=i&&!(x%16)&&In(L,x));else{if(!(280>at)){vt=0;break e}at=kn(at-256,U);var Bt,St=an(mt.G[4],mt.H[4],U);if(J(U),!(H>=(St=Vn(G,St=kn(St,U)))&&V-H>=at)){vt=0;break e}for(Bt=0;Bt=G;)I-=G,++x<=i&&!(x%16)&&In(L,x);Hi?i:x);break e}!vt||U.h&&H=b&&(t.Cc=1),d=1}if(!d)return null;if(t.Cc&&((d=t.ga)!=null&&(d.mc=null),t.ga=null,0>23,A[x+4*L+1]=A[x+4*L+1]*K>>23,A[x+4*L+2]=A[x+4*L+2]*K>>23)}i+=b}}function v(t,i,u,d,m){for(;0>4)*x>>16;t[i+2*b+0]=(240&L|L>>4)*x>>16&240|(15&L|L<<4)*x>>16>>4&15,t[i+2*b+1]=240&I|A}i+=m}}function j(t,i,u,d,m,b,L,A){var x,I,U=255;for(I=0;I>8}function X(){Nn=s,be=v,ye=j,Ie=R}function ct(t,i,u){z[t]=function(d,m,b,L,A,x,I,U,K,Z,G,vt,at,H,V,gt,bt){var mt,Bt=bt-1>>1,St=A[x+0]|I[U+0]<<16,Rt=K[Z+0]|G[vt+0]<<16;e(d!=null);var Pt=3*St+Rt+131074>>2;for(i(d[m+0],255&Pt,Pt>>16,at,H),b!=null&&(Pt=3*Rt+St+131074>>2,i(b[L+0],255&Pt,Pt>>16,V,gt)),mt=1;mt<=Bt;++mt){var se=A[x+mt]|I[U+mt]<<16,le=K[Z+mt]|G[vt+mt]<<16,ae=St+se+Rt+le+524296,ne=ae+2*(se+Rt)>>3;Pt=ne+St>>1,St=(ae=ae+2*(St+le)>>3)+se>>1,i(d[m+2*mt-1],255&Pt,Pt>>16,at,H+(2*mt-1)*u),i(d[m+2*mt-0],255&St,St>>16,at,H+(2*mt-0)*u),b!=null&&(Pt=ae+Rt>>1,St=ne+le>>1,i(b[L+2*mt-1],255&Pt,Pt>>16,V,gt+(2*mt-1)*u),i(b[L+2*mt+0],255&St,St>>16,V,gt+(2*mt+0)*u)),St=se,Rt=le}1&bt||(Pt=3*St+Rt+131074>>2,i(d[m+bt-1],255&Pt,Pt>>16,at,H+(bt-1)*u),b!=null&&(Pt=3*Rt+St+131074>>2,i(b[L+bt-1],255&Pt,Pt>>16,V,gt+(bt-1)*u)))}}function yt(){xn[Ta]=au,xn[za]=Ms,xn[Is]=ou,xn[Ua]=Es,xn[Ha]=qs,xn[Wo]=Ds,xn[Cs]=su,xn[Vo]=Ms,xn[Go]=Es,xn[Wa]=qs,xn[Jo]=Ds}function Ot(t){return t&~cu?0>t?0:255:t>>Rs}function Dt(t,i){return Ot((19077*t>>8)+(26149*i>>8)-14234)}function Zt(t,i,u){return Ot((19077*t>>8)-(6419*i>>8)-(13320*u>>8)+8708)}function Yt(t,i){return Ot((19077*t>>8)+(33050*i>>8)-17685)}function re(t,i,u,d,m){d[m+0]=Dt(t,u),d[m+1]=Zt(t,i,u),d[m+2]=Yt(t,i)}function Ne(t,i,u,d,m){d[m+0]=Yt(t,i),d[m+1]=Zt(t,i,u),d[m+2]=Dt(t,u)}function Se(t,i,u,d,m){var b=Zt(t,i,u);i=b<<3&224|Yt(t,i)>>3,d[m+0]=248&Dt(t,u)|b>>5,d[m+1]=i}function Me(t,i,u,d,m){var b=240&Yt(t,i)|15;d[m+0]=240&Dt(t,u)|Zt(t,i,u)>>4,d[m+1]=b}function Xe(t,i,u,d,m){d[m+0]=255,re(t,i,u,d,m+1)}function Te(t,i,u,d,m){Ne(t,i,u,d,m),d[m+3]=255}function Bn(t,i,u,d,m){re(t,i,u,d,m),d[m+3]=255}function dn(t,i){return 0>t?0:t>i?i:t}function Kn(t,i,u){z[t]=function(d,m,b,L,A,x,I,U,K){for(var Z=U+(-2&K)*u;U!=Z;)i(d[m+0],b[L+0],A[x+0],I,U),i(d[m+1],b[L+0],A[x+0],I,U+u),m+=2,++L,++x,U+=2*u;1&K&&i(d[m+0],b[L+0],A[x+0],I,U)}}function Oa(t,i,u){return u==0?t==0?i==0?6:5:i==0?4:0:u}function Yi(t,i,u,d,m){switch(t>>>30){case 3:cr(i,u,d,m,0);break;case 2:Fe(i,u,d,m);break;case 1:nn(i,u,d,m)}}function Xi(t,i){var u,d,m=i.M,b=i.Nb,L=t.oc,A=t.pc+40,x=t.oc,I=t.pc+584,U=t.oc,K=t.pc+600;for(u=0;16>u;++u)L[A+32*u-1]=129;for(u=0;8>u;++u)x[I+32*u-1]=129,U[K+32*u-1]=129;for(0u;++u)a(L,A+32*u-4,L,A+32*u+12,4);for(u=-1;8>u;++u)a(x,I+32*u-4,x,I+32*u+4,4),a(U,K+32*u-4,U,K+32*u+4,4)}var G=t.Gd,vt=t.Hd+d,at=Z.ad,H=Z.Hc;if(0=t.za-1?c(V,gt,G[vt].y[15],4):a(V,gt,G[vt+1].y,0,4)),u=0;4>u;u++)V[gt+128+u]=V[gt+256+u]=V[gt+384+u]=V[gt+0+u];for(u=0;16>u;++u,H<<=2)V=L,gt=A+zs[u],Mn[Z.Ob[u]](V,gt),Yi(H,at,16*+u,V,gt)}else if(V=Oa(d,m,Z.Ob[0]),Lr[V](L,A),H!=0)for(u=0;16>u;++u,H<<=2)Yi(H,at,16*+u,L,A+zs[u]);for(u=Z.Gc,V=Oa(d,m,Z.Dd),lr[V](x,I),lr[V](U,K),H=at,V=x,gt=I,255&(Z=u>>0)&&(170&Z?ta(H,256,V,gt):wn(H,256,V,gt)),Z=U,H=K,255&(u>>=8)&&(170&u?ta(at,320,Z,H):wn(at,320,Z,H)),mu;++u)a(G,vt+u*t.R,L,A+32*u,16);for(u=0;8>u;++u)a(at,Z+u*t.B,x,I+32*u,8),a(H,V+u*t.B,U,K+32*u,8)}}function hi(t,i,u,d,m,b,L,A,x){var I=[0],U=[0],K=0,Z=x!=null?x.kd:0,G=x??new Wi;if(t==null||12>u)return 7;G.data=t,G.w=i,G.ha=u,i=[i],u=[u],G.gb=[G.gb];t:{var vt=i,at=u,H=G.gb;if(e(t!=null),e(at!=null),e(H!=null),H[0]=0,12<=at[0]&&!n(t,vt[0],"RIFF")){if(n(t,vt[0]+8,"WEBP")){H=3;break t}var V=_t(t,vt[0]+4);if(12>V||4294967286at[0]-8){H=7;break t}H[0]=V,vt[0]+=12,at[0]-=12}H=0}if(H!=0)return H;for(V=0H[0])H=7;else{if(!n(gt,at[0],"VP8X")){if(_t(gt,at[0]+4)!=10){H=3;break t}if(18>H[0]){H=7;break t}var St=_t(gt,at[0]+8),Rt=1+Ft(gt,at[0]+12);if(2147483648<=Rt*(gt=1+Ft(gt,at[0]+15))){H=3;break t}Bt!=null&&(Bt[0]=St),bt!=null&&(bt[0]=Rt),mt!=null&&(mt[0]=gt),at[0]+=18,H[0]-=18,Pt[0]=1}H=0}}if(K=K[0],vt=vt[0],H!=0)return H;if(at=!!(2&vt),!V&&K)return 3;if(b!=null&&(b[0]=!!(16&vt)),L!=null&&(L[0]=at),A!=null&&(A[0]=0),L=I[0],vt=U[0],K&&at&&x==null){H=0;break}if(4>u){H=7;break}if(V&&K||!V&&!K&&!n(t,i[0],"ALPH")){u=[u],G.na=[G.na],G.P=[G.P],G.Sa=[G.Sa];t:{St=t,H=i,V=u;var Pt=G.gb;bt=G.na,mt=G.P,Bt=G.Sa,Rt=22,e(St!=null),e(V!=null),gt=H[0];var se=V[0];for(e(bt!=null),e(Bt!=null),bt[0]=null,mt[0]=null,Bt[0]=0;;){if(H[0]=gt,V[0]=se,8>se){H=7;break t}var le=_t(St,gt+4);if(4294967286Pt){H=3;break t}if(!n(St,gt,"VP8 ")||!n(St,gt,"VP8L")){H=0;break t}if(se[0]V[0])H=7;else{if(gt||Rt){if(Pt=_t(Pt,St+4),12<=bt&&Pt>bt-12){H=3;break t}if(Z&&Pt>V[0]-8){H=7;break t}mt[0]=Pt,H[0]+=8,V[0]-=8,Bt[0]=Rt}else Bt[0]=5<=V[0]&&Pt[St+0]==47&&!(Pt[St+4]>>5),mt[0]=V[0];H=0}if(u=u[0],G.Ja=G.Ja[0],G.xa=G.xa[0],i=i[0],H!=0)break;if(4294967286u){H=7;break}A=L,Z=vt,at=b,t==null||5>u?t=0:5<=u&&t[i+0]==47&&!(t[i+4]>>5)?(V=[0],Pt=[0],bt=[0],$(mt=new N,t,i,u),Tt(mt,V,Pt,bt)?(A!=null&&(A[0]=V[0]),Z!=null&&(Z[0]=Pt[0]),at!=null&&(at[0]=bt[0]),t=1):t=0):t=0}else{if(10>u){H=7;break}A=vt,t==null||10>u||!va(t,i+3,u-3)?t=0:(Z=t[i+0]|t[i+1]<<8|t[i+2]<<16,at=16383&(t[i+7]<<8|t[i+6]),t=16383&(t[i+9]<<8|t[i+8]),1&Z||3<(Z>>1&7)||!(Z>>4&1)||Z>>5>=G.Ja||!at||!t?t=0:(L&&(L[0]=at),A&&(A[0]=t),t=1))}if(!t||(L=L[0],vt=vt[0],K&&(I[0]!=L||U[0]!=vt)))return 3;x!=null&&(x[0]=G,x.offset=i-x.w,e(4294967286>i-x.w),e(x.offset==x.ha-u));break}return H==0||H==7&&K&&x==null?(b!=null&&(b[0]|=G.na!=null&&0u||(b&=-2,L&=-2),0>b||0>L||0>=A||0>=x||b+A>d||L+x>m))return 0;if(i.v=b,i.j=L,i.va=b+A,i.o=L+x,i.U=A,i.T=x,i.da=t!=null&&0t.S){var i=t.f.RGBA;i.fb+=(t.height-1)*i.A,i.A=-i.A}else i=t.f.kb,t=t.height,i.O+=(t-1)*i.fa,i.fa=-i.fa,i.N+=(t-1>>1)*i.Ab,i.Ab=-i.Ab,i.W+=(t-1>>1)*i.Db,i.Db=-i.Db,i.F!=null&&(i.J+=(t-1)*i.lb,i.lb=-i.lb);return 0}function fi(t,i,u,d){if(d==null||0>=t||0>=i)return 2;if(u!=null){if(u.Da){var m=u.cd,b=u.bd,L=-2&u.v,A=-2&u.j;if(0>L||0>A||0>=m||0>=b||L+m>t||A+b>i)return 2;t=m,i=b}if(u.da){if(!Kt(t,i,m=[u.ib],b=[u.hb]))return 2;t=m[0],i=b[0]}}d.width=t,d.height=i;t:{var x=d.width,I=d.height;if(t=d.S,0>=x||0>=I||!(t>=Ta&&13>t))t=2;else{if(0>=d.Rd&&d.sd==null){L=b=m=i=0;var U=(A=x*Us[t])*I;if(11>t||(b=(I+1)/2*(i=(x+1)/2),t==12&&(L=(m=x)*I)),(I=o(U+2*b+L))==null){t=1;break t}d.sd=I,11>t?((x=d.f.RGBA).eb=I,x.fb=0,x.A=A,x.size=U):((x=d.f.kb).y=I,x.O=0,x.fa=A,x.Fd=U,x.f=I,x.N=0+U,x.Ab=i,x.Cd=b,x.ea=I,x.W=0+U+b,x.Db=i,x.Ed=b,t==12&&(x.F=I,x.J=0+U+2*b),x.Tc=L,x.lb=m)}if(i=1,m=d.S,b=d.width,L=d.height,m>=Ta&&13>m)if(11>m)t=d.f.RGBA,i&=(A=Math.abs(t.A))*(L-1)+b<=t.size,i&=A>=b*Us[m],i&=t.eb!=null;else{t=d.f.kb,A=(b+1)/2,U=(L+1)/2,x=Math.abs(t.fa),I=Math.abs(t.Ab);var K=Math.abs(t.Db),Z=Math.abs(t.lb),G=Z*(L-1)+b;i&=x*(L-1)+b<=t.Fd,i&=I*(U-1)+A<=t.Cd,i=(i&=K*(U-1)+A<=t.Ed)&x>=b&I>=A&K>=A,i&=t.y!=null,i&=t.f!=null,i&=t.ea!=null,m==12&&(i&=Z>=b,i&=G<=t.Tc,i&=t.F!=null)}else i=0;t=i?0:2}}return t!=0||u!=null&&u.fd&&(t=Zi(d)),t}var Ve=64,di=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],pi=24,gi=32,$i=8,sn=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];xt("Predictor0","PredictorAdd0"),z.Predictor0=function(){return 4278190080},z.Predictor1=function(t){return t},z.Predictor2=function(t,i,u){return i[u+0]},z.Predictor3=function(t,i,u){return i[u+1]},z.Predictor4=function(t,i,u){return i[u-1]},z.Predictor5=function(t,i,u){return kt(kt(t,i[u+1]),i[u+0])},z.Predictor6=function(t,i,u){return kt(t,i[u-1])},z.Predictor7=function(t,i,u){return kt(t,i[u+0])},z.Predictor8=function(t,i,u){return kt(i[u-1],i[u+0])},z.Predictor9=function(t,i,u){return kt(i[u+0],i[u+1])},z.Predictor10=function(t,i,u){return kt(kt(t,i[u-1]),kt(i[u+0],i[u+1]))},z.Predictor11=function(t,i,u){var d=i[u+0];return 0>=Qt(d>>24&255,t>>24&255,(i=i[u-1])>>24&255)+Qt(d>>16&255,t>>16&255,i>>16&255)+Qt(d>>8&255,t>>8&255,i>>8&255)+Qt(255&d,255&t,255&i)?d:t},z.Predictor12=function(t,i,u){var d=i[u+0];return(qt((t>>24&255)+(d>>24&255)-((i=i[u-1])>>24&255))<<24|qt((t>>16&255)+(d>>16&255)-(i>>16&255))<<16|qt((t>>8&255)+(d>>8&255)-(i>>8&255))<<8|qt((255&t)+(255&d)-(255&i)))>>>0},z.Predictor13=function(t,i,u){var d=i[u-1];return(Gt((t=kt(t,i[u+0]))>>24&255,d>>24&255)<<24|Gt(t>>16&255,d>>16&255)<<16|Gt(t>>8&255,d>>8&255)<<8|Gt(t>>0&255,d>>0&255))>>>0};var Uo=z.PredictorAdd0;z.PredictorAdd1=te,xt("Predictor2","PredictorAdd2"),xt("Predictor3","PredictorAdd3"),xt("Predictor4","PredictorAdd4"),xt("Predictor5","PredictorAdd5"),xt("Predictor6","PredictorAdd6"),xt("Predictor7","PredictorAdd7"),xt("Predictor8","PredictorAdd8"),xt("Predictor9","PredictorAdd9"),xt("Predictor10","PredictorAdd10"),xt("Predictor11","PredictorAdd11"),xt("Predictor12","PredictorAdd12"),xt("Predictor13","PredictorAdd13");var Qi=z.PredictorAdd2;ee("ColorIndexInverseTransform","MapARGB","32b",function(t){return t>>8&255},function(t){return t}),ee("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(t){return t},function(t){return t>>8&255});var Ba,yn=z.ColorIndexInverseTransform,mi=z.MapARGB,Ma=z.VP8LColorIndexInverseTransformAlpha,Ea=z.MapAlpha,vr=z.VP8LPredictorsAdd=[];vr.length=16,(z.VP8LPredictors=[]).length=16,(z.VP8LPredictorsAdd_C=[]).length=16,(z.VP8LPredictors_C=[]).length=16;var Tr,cn,en,br,or,sr,vi,cr,Fe,ta,nn,wn,bi,qa,ea,zr,Ur,yr,Hr,yi,Wr,wr,na,Ln,Nn,be,ye,Ie,Re=o(511),ur=o(2041),ra=o(225),wi=o(767),Da=0,Ho=ur,Ra=ra,pn=wi,An=Re,Ta=0,za=1,Is=2,Ua=3,Ha=4,Wo=5,Cs=6,Vo=7,Go=8,Wa=9,Jo=10,Vc=[2,3,7],Gc=[3,3,11],js=[280,256,256,256,40],Jc=[0,1,1,1,0],Yc=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],Xc=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],Kc=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],Zc=8,Yo=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],Xo=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],ia=null,$c=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],Qc=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],Os=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],tu=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],eu=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],nu=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,255,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],ru=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],Lr=[],Mn=[],lr=[],iu=1,Bs=2,Nr=[],xn=[];ct("UpsampleRgbLinePair",re,3),ct("UpsampleBgrLinePair",Ne,3),ct("UpsampleRgbaLinePair",Bn,4),ct("UpsampleBgraLinePair",Te,4),ct("UpsampleArgbLinePair",Xe,4),ct("UpsampleRgba4444LinePair",Me,2),ct("UpsampleRgb565LinePair",Se,2);var au=z.UpsampleRgbLinePair,ou=z.UpsampleBgrLinePair,Ms=z.UpsampleRgbaLinePair,Es=z.UpsampleBgraLinePair,qs=z.UpsampleArgbLinePair,Ds=z.UpsampleRgba4444LinePair,su=z.UpsampleRgb565LinePair,Va=16,Ga=1<d.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),d.ca.f.kb.F!=null&&X()),d.Pb&&0(x=u.Md)?0:100I;++I)12>(K=m.pb[I]).lc&&(K.ia=x*gu[0>K.lc?0:K.lc]>>3),U|=K.ia;U&&(alert("todo:VP8InitRandom"),m.ia=1)}m.Ga=u.Id,100m.Ga&&(m.Ga=0)}xo(t,d)||(i=t.a)}}else i=t.a}i==0&&L.Oa!=null&&L.Oa.fd&&(i=Zi(L.ba))}L=i}b=L!=0?null:11>b?A.f.RGBA.eb:A.f.kb.y}else b=null;return b};var Us=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function g(z,rt){for(var dt="",P=0;P<4;P++)dt+=String.fromCharCode(z[rt++]);return dt}function y(z,rt){return(z[rt+0]<<0|z[rt+1]<<8|z[rt+2]<<16)>>>0}function w(z,rt){return(z[rt+0]<<0|z[rt+1]<<8|z[rt+2]<<16|z[rt+3]<<24)>>>0}new f;var S=[0],p=[0],O=[],F=new f,q=r,_=function(z,rt){var dt={},P=0,k=!1,W=0,D=0;if(dt.frames=[],!function(C,M,T,J){for(var Q=0;Q>1&1}lt!="ANMF"&&(rt+=ht)}return dt}}(q,0);_.response=q,_.rgbaoutput=!0,_.dataurl=!1;var B=_.header?_.header:null,Y=_.frames?_.frames:null;if(B){B.loop_counter=B.loop_count,S=[B.canvas_height],p=[B.canvas_width];for(var ot=0;ot>>1)&255;return _},f=function(S,p,O){var F,q,_,B,Y=[],ot=S.length;Y[0]=4;for(var ut=0;ut>>lt&255,lt+=B.bits;rt[W]=k>>>lt&255}}if(B.bits===16){z=(tt=new Uint32Array(B.decodePixels().buffer)).length,dt=new Uint8Array(z*(32/B.pixelBitlength)*B.colors),rt=new Uint8Array(z*(32/B.pixelBitlength)),P=B.colors>1,W=0,D=0;for(var ht=0;W>>0&255,P&&(dt[D++]=k>>>16&255,k=tt[W++],dt[D++]=k>>>0&255),rt[ht++]=k>>>16&255;_=8}F!==r.image_compression.NONE&&e()?(S=n(dt,B.width*B.colors,B.colors,F),wt=n(rt,B.width,1,F)):(S=dt,wt=rt,st=void 0)}if(B.colorType===3&&(q=this.color_spaces.INDEXED,ut=B.palette,B.transparency.indexed)){var pt=B.transparency.indexed,It=0;for(W=0,z=pt.length;W=0;r--){for(var a=this.bottom_up?r:this.height-1-r,c=0;c>7-h&1];this.data[l+4*h]=f.blue,this.data[l+4*h+1]=f.green,this.data[l+4*h+2]=f.red,this.data[l+4*h+3]=255}n!==0&&(this.pos+=4-n)}},Dn.prototype.bit4=function(){for(var r=Math.ceil(this.width/2),e=r%4,n=this.height-1;n>=0;n--){for(var a=this.bottom_up?n:this.height-1-n,c=0;c>4,f=15&o,g=this.palette[h];if(this.data[l]=g.blue,this.data[l+1]=g.green,this.data[l+2]=g.red,this.data[l+3]=255,2*c+1>=this.width)break;g=this.palette[f],this.data[l+4]=g.blue,this.data[l+4+1]=g.green,this.data[l+4+2]=g.red,this.data[l+4+3]=255}e!==0&&(this.pos+=4-e)}},Dn.prototype.bit8=function(){for(var r=this.width%4,e=this.height-1;e>=0;e--){for(var n=this.bottom_up?e:this.height-1-e,a=0;a=0;n--){for(var a=this.bottom_up?n:this.height-1-n,c=0;c>5&e)/e*255|0,f=(o>>10&e)/e*255|0,g=o>>15?255:0,y=a*this.width*4+4*c;this.data[y]=f,this.data[y+1]=h,this.data[y+2]=l,this.data[y+3]=g}this.pos+=r}},Dn.prototype.bit16=function(){for(var r=this.width%3,e=parseInt("11111",2),n=parseInt("111111",2),a=this.height-1;a>=0;a--){for(var c=this.bottom_up?a:this.height-1-a,o=0;o>5&n)/n*255|0,g=(l>>11)/e*255|0,y=c*this.width*4+4*o;this.data[y]=g,this.data[y+1]=f,this.data[y+2]=h,this.data[y+3]=255}this.pos+=r}},Dn.prototype.bit24=function(){for(var r=this.height-1;r>=0;r--){for(var e=this.bottom_up?r:this.height-1-r,n=0;n=0;r--)for(var e=this.bottom_up?r:this.height-1-r,n=0;na&&(c.push(r.slice(f,o)),h=0,f=o),h+=e[o],o++;return f!==o&&c.push(r.slice(f,o)),c},wc=function(r,e,n){n||(n={});var a,c,o,l,h,f,g,y=[],w=[y],S=n.textIndent||0,p=0,O=0,F=r.split(" "),q=so.apply(this,[" ",n])[0];if(f=n.lineIndent===-1?F[0].length+2:n.lineIndent||0){var _=Array(f).join(" "),B=[];F.map(function(ot){(ot=ot.split(/\s*\n/)).length>1?B=B.concat(ot.map(function(ut,wt){return(wt&&ut.length?` `:"")+ut})):B.push(ot[0])}),F=B,f=bc.apply(this,[_,n])}for(o=0,l=F.length;oe||Y){if(O>e){for(h=yc.apply(this,[a,c,e-(S+p),e]),y.push(h.shift()),y=[h.pop()];h.length;)w.push([h.shift()]);O=c.slice(a.length-(y[0]?y[0].length:0)).reduce(function(ot,ut){return ot+ut},0)}else y=[a];w.push(y),S=O+f,p=q}else y.push(a),S+=p+O,p=q}return g=f?function(ot,ut){return(ut?_:"")+ot.join(" ")}:function(ot){return ot.join(" ")},w.map(g)},_i.splitTextToSize=function(r,e,n){var a,c=(n=n||{}).fontSize||this.internal.getFontSize(),o=(function(y){if(y.widths&&y.kerning)return{widths:y.widths,kerning:y.kerning};var w=this.internal.getFont(y.fontName,y.fontStyle);return w.metadata.Unicode?{widths:w.metadata.Unicode.widths||{0:1},kerning:w.metadata.Unicode.kerning||{}}:{font:w.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,n);a=Array.isArray(r)?r:String(r).split(/\r?\n/);var l=1*this.internal.scaleFactor*e/c;o.textIndent=n.textIndent?1*n.textIndent*this.internal.scaleFactor/c:0,o.lineIndent=n.lineIndent;var h,f,g=[];for(h=0,f=a.length;himport("./DgAO1auW02-w.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]),import.meta.url)).catch(function(n){return Promise.reject(new Error("Could not load canvg: "+n))}).then(function(n){return n.default?n.default:n})}Ut.API.addSvgAsImage=function(n,a,c,o,l,h,f,g){if(isNaN(a)||isNaN(c))throw me.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(o)||isNaN(l))throw me.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var y=document.createElement("canvas");y.width=o,y.height=l;var w=y.getContext("2d");w.fillStyle="#fff",w.fillRect(0,0,y.width,y.height);var S={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},p=this;return e().then(function(O){return O.fromString(w,n,S)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(O){return O.render(S)}).then(function(){p.addImage(y.toDataURL("image/jpeg",1),a,c,o,l,f,g)})}}(),Ut.API.putTotalPages=function(r){var e,n=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(r,"g"),n=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(r,this.internal.getFont()),"g"),n=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var a=1;a<=this.internal.getNumberOfPages();a++)for(var c=0;c1){for(y=0;ye||Y){if(O>e){for(h=yc.apply(this,[a,c,e-(S+p),e]),y.push(h.shift()),y=[h.pop()];h.length;)w.push([h.shift()]);O=c.slice(a.length-(y[0]?y[0].length:0)).reduce(function(ot,ut){return ot+ut},0)}else y=[a];w.push(y),S=O+f,p=q}else y.push(a),S+=p+O,p=q}return g=f?function(ot,ut){return(ut?_:"")+ot.join(" ")}:function(ot){return ot.join(" ")},w.map(g)},_i.splitTextToSize=function(r,e,n){var a,c=(n=n||{}).fontSize||this.internal.getFontSize(),o=(function(y){if(y.widths&&y.kerning)return{widths:y.widths,kerning:y.kerning};var w=this.internal.getFont(y.fontName,y.fontStyle);return w.metadata.Unicode?{widths:w.metadata.Unicode.widths||{0:1},kerning:w.metadata.Unicode.kerning||{}}:{font:w.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,n);a=Array.isArray(r)?r:String(r).split(/\r?\n/);var l=1*this.internal.scaleFactor*e/c;o.textIndent=n.textIndent?1*n.textIndent*this.internal.scaleFactor/c:0,o.lineIndent=n.lineIndent;var h,f,g=[];for(h=0,f=a.length;himport("./DfzPiMvHeyHZ.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]),import.meta.url)).catch(function(n){return Promise.reject(new Error("Could not load canvg: "+n))}).then(function(n){return n.default?n.default:n})}Ut.API.addSvgAsImage=function(n,a,c,o,l,h,f,g){if(isNaN(a)||isNaN(c))throw me.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(o)||isNaN(l))throw me.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var y=document.createElement("canvas");y.width=o,y.height=l;var w=y.getContext("2d");w.fillStyle="#fff",w.fillRect(0,0,y.width,y.height);var S={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},p=this;return e().then(function(O){return O.fromString(w,n,S)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(O){return O.render(S)}).then(function(){p.addImage(y.toDataURL("image/jpeg",1),a,c,o,l,f,g)})}}(),Ut.API.putTotalPages=function(r){var e,n=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(r,"g"),n=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(r,this.internal.getFont()),"g"),n=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var a=1;a<=this.internal.getNumberOfPages();a++)for(var c=0;c1){for(y=0;y - + - + diff --git a/openlayers-base-packages/pr-previews/pr-371/samples/map-sample/index.html b/openlayers-base-packages/pr-previews/pr-371/samples/map-sample/index.html index 8005202..fcf331f 100644 --- a/openlayers-base-packages/pr-previews/pr-371/samples/map-sample/index.html +++ b/openlayers-base-packages/pr-previews/pr-371/samples/map-sample/index.html @@ -17,30 +17,30 @@ overflow: hidden; } - + - + - - - + + + - + - + - + - - - + + + diff --git a/openlayers-base-packages/pr-previews/pr-371/samples/ogc-api-sample/index.html b/openlayers-base-packages/pr-previews/pr-371/samples/ogc-api-sample/index.html index c7186cd..d41229e 100644 --- a/openlayers-base-packages/pr-previews/pr-371/samples/ogc-api-sample/index.html +++ b/openlayers-base-packages/pr-previews/pr-371/samples/ogc-api-sample/index.html @@ -16,23 +16,23 @@ max-height: 100%; } - + - - - + + + - + - - + + diff --git a/openlayers-base-packages/pr-previews/pr-371/samples/showcase/index.html b/openlayers-base-packages/pr-previews/pr-371/samples/showcase/index.html index 79c1c93..9823e2b 100644 --- a/openlayers-base-packages/pr-previews/pr-371/samples/showcase/index.html +++ b/openlayers-base-packages/pr-previews/pr-371/samples/showcase/index.html @@ -17,30 +17,30 @@ overflow: hidden; } - + - + - - - + + + - + - + - + - - - + + + diff --git a/openlayers-base-packages/pr-previews/pr-371/samples/test-basemap-switcher/index.html b/openlayers-base-packages/pr-previews/pr-371/samples/test-basemap-switcher/index.html index cb94352..e282a81 100644 --- a/openlayers-base-packages/pr-previews/pr-371/samples/test-basemap-switcher/index.html +++ b/openlayers-base-packages/pr-previews/pr-371/samples/test-basemap-switcher/index.html @@ -16,17 +16,17 @@ max-height: 100%; } - + - + - + diff --git a/openlayers-base-packages/pr-previews/pr-371/samples/test-highlight-and-zoom/index.html b/openlayers-base-packages/pr-previews/pr-371/samples/test-highlight-and-zoom/index.html index 69bb70b..7a3e04b 100644 --- a/openlayers-base-packages/pr-previews/pr-371/samples/test-highlight-and-zoom/index.html +++ b/openlayers-base-packages/pr-previews/pr-371/samples/test-highlight-and-zoom/index.html @@ -16,10 +16,10 @@ max-height: 100%; } - + - - + + diff --git a/openlayers-base-packages/pr-previews/pr-371/samples/test-menu-fix/index.html b/openlayers-base-packages/pr-previews/pr-371/samples/test-menu-fix/index.html index c3cd7ef..9a827bf 100644 --- a/openlayers-base-packages/pr-previews/pr-371/samples/test-menu-fix/index.html +++ b/openlayers-base-packages/pr-previews/pr-371/samples/test-menu-fix/index.html @@ -11,7 +11,7 @@ margin: 0px; } - + diff --git a/openlayers-base-packages/pr-previews/pr-371/samples/test-printing-api/index.html b/openlayers-base-packages/pr-previews/pr-371/samples/test-printing-api/index.html index 57073ea..00e8ea0 100644 --- a/openlayers-base-packages/pr-previews/pr-371/samples/test-printing-api/index.html +++ b/openlayers-base-packages/pr-previews/pr-371/samples/test-printing-api/index.html @@ -16,14 +16,14 @@ max-height: 100%; } - + - + - - - + + + diff --git a/openlayers-base-packages/pr-previews/pr-371/samples/test-result-list/index.html b/openlayers-base-packages/pr-previews/pr-371/samples/test-result-list/index.html index 3799fe9..f91dd1e 100644 --- a/openlayers-base-packages/pr-previews/pr-371/samples/test-result-list/index.html +++ b/openlayers-base-packages/pr-previews/pr-371/samples/test-result-list/index.html @@ -16,16 +16,16 @@ max-height: 100%; } - + - + - + diff --git a/openlayers-base-packages/pr-previews/pr-371/samples/test-toc/index.html b/openlayers-base-packages/pr-previews/pr-371/samples/test-toc/index.html index 03c320a..a2ba62e 100644 --- a/openlayers-base-packages/pr-previews/pr-371/samples/test-toc/index.html +++ b/openlayers-base-packages/pr-previews/pr-371/samples/test-toc/index.html @@ -17,22 +17,22 @@ overflow: hidden; } - + - + - - - + + + - + - +