PageSourceSearch

https://cineville.nl/_next/static/chunks/814-46b0fe13ab7c0689.js

js cineville.nl collected 2026-10-02 02:31:53 UTC 61,485 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[814],{1392:(e,t,a)=>{a.d(t,{pH:()=>D,zD:()=>U,Ay:()=>S});var n=a(55729);let i=n.createContext(null);function r(e,t){if(e===t)return!0;if(!e||!t)return!1;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let a=0;a<e.length;a++)if(!r(e[a],t[a]))return!1;return!0}if(Array.isArray(t))return!1;if("object"==typeof e&&"object"==typeof t){let a=Object.keys(e),n=Object.keys(t);if(a.length!==n.length)return!1;for(let n of a)if(!t.hasOwnProperty(n)||!r(e[n],t[n]))return!1;return!0}return!1}function o(e){return{longitude:e.center.lng,latitude:e.center.lat,zoom:e.zoom,pitch:e.pitch,bearing:e.bearing,padding:e.padding}}function s(e,t){let a=t.viewState||t,n={};return"longitude"in a&&"latitude"in a&&(a.longitude!==e.center.lng||a.latitude!==e.center.lat)&&(n.center=new e.center.constructor(a.longitude,a.latitude)),"zoom"in a&&a.zoom!==e.zoom&&(n.zoom=a.zoom),"bearing"in a&&a.bearing!==e.bearing&&(n.bearing=a.bearing),"pitch"in a&&a.pitch!==e.pitch&&(n.pitch=a.pitch),a.padding&&e.padding&&!r(a.padding,e.padding)&&(n.padding=a.padding),n}let l=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function d(e){if(!e)return null;if("string"==typeof e||("toJS"in e&&(e=e.toJS()),!e.layers))return e;let t={};for(let a of e.layers)t[a.id]=a;let a=e.layers.map(e=>{let a=null;"interactive"in e&&(a=Object.assign({},e),delete a.interactive);let n=t[e.ref];if(n)for(let t of(a=a||Object.assign({},e),delete a.ref,l))t in n&&(a[t]=n[t]);return a||e});return{...e,layers:a}}let c={version:8,sources:{},layers:[]},p={minZoom:0,maxZoom:22,minPitch:0,maxPitch:85,maxBounds:[-180,-85.051129,180,85.051129],projection:"mercator",renderWorldCopies:!0},u={mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",click:"onClick",dblclick:"onDblClick",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mouseout:"onMouseOut",contextmenu:"onContextMenu",touchstart:"onTouchStart",touchend:"onTouchEnd",touchmove:"onTouchMove",touchcancel:"onTouchCancel"},m={movestart:"onMoveStart",move:"onMove",moveend:"onMoveEnd",dragstart:"onDragStart",drag:"onDrag",dragend:"onDragEnd",zoomstart:"onZoomStart",zoom:"onZoom",zoomend:"onZoomEnd",rotatestart:"onRotateStart",rotate:"onRotate",rotateend:"onRotateEnd",pitchstart:"onPitchStart",pitch:"onPitch",pitchend:"onPitchEnd"},g={wheel:"onWheel",boxzoomstart:"onBoxZoomStart",boxzoomend:"onBoxZoomEnd",boxzoomcancel:"onBoxZoomCancel",resize:"onResize",load:"onLoad",render:"onRender",idle:"onIdle",remove:"onRemove",data:"onData",styledata:"onStyleData",sourcedata:"onSourceData",error:"onError"},h=["minZoom","maxZoom","minPitch","maxPitch","maxBounds","projection","renderWorldCopies"],f=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate","touchPitch"];class y{constructor(e,t,a){this._map=null,this._internalUpdate=!1,this._hoveredFeatures=null,this._propsedCameraUpdate=null,this._styleComponents={},this._onEvent=e=>{let t=this.props[g[e.type]];t?t(e):"error"===e.type&&console.error(e.error)},this._onCameraEvent=e=>{if(this._internalUpdate)return;e.viewState=this._propsedCameraUpdate||o(this._map.transform);let t=this.props[m[e.type]];t&&t(e)},this._onCameraUpdate=e=>this._internalUpdate?e:(this._propsedCameraUpdate=o(e),s(e,this.props)),this._onPointerEvent=e=>{("mousemove"===e.type||"mouseout"===e.type)&&this._updateHover(e);let t=this.props[u[e.type]];t&&(this.props.interactiveLayerIds&&"mouseover"!==e.type&&"mouseout"!==e.type&&(e.features=this._hoveredFeatures||this._queryRenderedFeatures(e.point)),t(e),delete e.features)},this._MapClass=e,this.props=t,this._initialize(a)}get map(){return this._map}setProps(e){let t=this.props;this.props=e;let a=this._updateSettings(e,t),n=this._updateSize(e),i=this._updateViewState(e);this._updateStyle(e,t),this._updateStyleComponents(e),this._updateHandlers(e,t),(a||n||i&&!this._map.isMoving())&&this.redraw()}static reuse(e,t){let a=y.savedMaps.pop();if(!a)return null;let n=a.map,i=n.getContainer();for(t.className=i.className;i.childNodes.length>0;)t.appendChild(i.childNodes[0]);n._container=t;let r=n._resizeObserver;r&&(r.disconnect(),r.observe(t)),a.setProps({...e,styleDiffing:!1}),n.resize();let{initialViewState:o}=e;return o&&(o.bounds?n.fitBounds(o.bounds,{...o.fitBoundsOptions,duration:0}):a._updateViewState(o)),n.isStyleLoaded()?n.fire("load"):n.once("style.load",()=>n.fire("load")),n._update(),a}_initialize(e){let{props:t}=this,{mapStyle:a=c}=t,n={...t,...t.initialViewState,container:e,style:d(a)},i=n.initialViewState||n.viewState||n;if(Object.assign(n,{center:[i.longitude||0,i.latitude||0],zoom:i.zoom||0,pitch:i.pitch||0,bearing:i.bearing||0}),t.gl){let e=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=()=>(HTMLCanvasElement.prototype.getContext=e,t.gl)}let r=new this._MapClass(n);for(let e in i.padding&&r.setPadding(i.padding),t.cursor&&(r.getCanvas().style.cursor=t.cursor),r.transformCameraUpdate=this._onCameraUpdate,r.on("style.load",()=>{this._styleComponents={light:r.getLight(),sky:r.getSky(),projection:r.getProjection?.(),terrain:r.getTerrain()},this._updateStyleComponents(this.props)}),r.on("sourcedata",()=>{this._updateStyleComponents(this.props)}),u)r.on(e,this._onPointerEvent);for(let e in m)r.on(e,this._onCameraEvent);for(let e in g)r.on(e,this._onEvent);this._map=r}recycle(){let e=this.map.getContainer().querySelector("[mapboxgl-children]");e?.remove(),y.savedMaps.push(this)}destroy(){this._map.remove()}redraw(){let e=this._map;e.style&&(e._frame&&(e._frame.cancel(),e._frame=null),e._render())}_updateSize(e){let{viewState:t}=e;if(t){let e=this._map;if(t.width!==e.transform.width||t.height!==e.transform.height)return e.resize(),!0}return!1}_updateViewState(e){let t=this._map,a=t.transform;if(!t.isMoving()){let n=s(a,e);if(Object.keys(n).length>0)return this._internalUpdate=!0,t.jumpTo(n),this._internalUpdate=!1,!0}return!1}_updateSettings(e,t){let a=this._map,n=!1;for(let i of h)if((i in e||i in t)&&!r(e[i],t[i])){n=!0;let t=i in e?e[i]:p[i],r=a[`set${i[0].toUpperCase()}${i.slice(1)}`];r?.call(a,t)}return n}_updateStyle(e,t){if(e.cursor!==t.cursor&&(this._map.getCanvas().style.cursor=e.cursor||""),e.mapStyle!==t.mapStyle){let{mapStyle:t=c,styleDiffing:a=!0}=e,n={diff:a};"localIdeographFontFamily"in e&&(n.localIdeographFontFamily=e.localIdeographFontFamily),this._map.setStyle(d(t),n)}}_updateStyleComponents({light:e,projection:t,sky:a,terrain:n}){let i=this._map,o=this._styleComponents;i.style?._loaded&&(e&&!r(e,o.light)&&(o.light=e,i.setLight(e)),t&&!r(t,o.projection)&&t!==o.projection?.type&&(o.projection="string"==typeof t?{type:t}:t,i.setProjection?.(o.projection)),a&&!r(a,o.sky)&&(o.sky=a,i.setSky(a)),void 0!==n&&!r(n,o.terrain)&&(!n||i.getSource(n.source))&&(o.terrain=n,i.setTerrain(n)))}_updateHandlers(e,t){let a=this._map;for(let n of f){let i=e[n]??!0;r(i,t[n]??!0)||(i?a[n].enable(i):a[n].disable())}}_queryRenderedFeatures(e){let t=this._map,{interactiveLayerIds:a=[]}=this.props;try{return t.queryRenderedFeatures(e,{layers:a.filter(t.getLayer.bind(t))})}catch{return[]}}_updateHover(e){let{props:t}=this;if(t.interactiveLayerIds&&(t.onMouseMove||t.onMouseEnter||t.onMouseLeave)){let t=e.type,a=this._hoveredFeatures?.length>0,n=this._queryRenderedFeatures(e.point),i=n.length>0;!i&&a&&(e.type="mouseleave",this._onPointerEvent(e)),this._hoveredFeatures=n,i&&!a&&
1(e.type="mouseenter",this._onPointerEvent(e)),e.type=t}else this._hoveredFeatures=null}}y.savedMaps=[];let v=["setMaxBounds","setMinZoom","setMaxZoom","setMinPitch","setMaxPitch","setRenderWorldCopies","setProjection","setStyle","addSource","removeSource","addLayer","removeLayer","setLayerZoomRange","setFilter","setPaintProperty","setLayoutProperty","setLight","setTerrain","setFog","remove"],A="u">typeof document?n.useLayoutEffect:n.useEffect,L=n.createContext(null),S=n.forwardRef(function(e,t){let r=(0,n.useContext)(i),[o,s]=(0,n.useState)(null),l=(0,n.useRef)(),{current:d}=(0,n.useRef)({mapLib:null,map:null});(0,n.useEffect)(()=>{let t,n=e.mapLib,i=!0;return Promise.resolve(n||Promise.resolve().then(a.t.bind(a,94777,19))).then(a=>{if(!i)return;if(!a)throw Error("Invalid mapLib");let n="Map"in a?a:a.default;if(!n.Map)throw Error("Invalid mapLib");!function(e,t){let{RTLTextPlugin:a,maxParallelImageRequests:n,workerCount:i,workerUrl:r}=t;if(a&&e.getRTLTextPluginStatus&&"unavailable"===e.getRTLTextPluginStatus()){let{pluginUrl:t,lazy:n=!0}="string"==typeof a?{pluginUrl:a}:a;e.setRTLTextPlugin(t,e=>{e&&console.error(e)},n)}void 0!==n&&e.setMaxParallelImageRequests(n),void 0!==i&&e.setWorkerCount(i),void 0!==r&&e.setWorkerUrl(r)}(n,e),e.reuseMaps&&(t=y.reuse(e,l.current)),t||(t=new y(n.Map,e,l.current)),d.map=function(e){if(!e)return null;let t=e.map,a={getMap:()=>t};for(let e of function(e){let t=new Set,a=e;for(;a;){for(let n of Object.getOwnPropertyNames(a))"_"!==n[0]&&"function"==typeof e[n]&&"fire"!==n&&"setEventedParent"!==n&&t.add(n);a=Object.getPrototypeOf(a)}return Array.from(t)}(t))e in a||v.includes(e)||(a[e]=t[e].bind(t));return a}(t),d.mapLib=n,s(t),r?.onMapMount(d.map,e.id)}).catch(t=>{let{onError:a}=e;a?a({type:"error",target:null,originalEvent:null,error:t}):console.error(t)}),()=>{i=!1,t&&(r?.onMapUnmount(e.id),e.reuseMaps?t.recycle():t.destroy())}},[]),A(()=>{o&&o.setProps(e)}),(0,n.useImperativeHandle)(t,()=>d.map,[o]);let c=(0,n.useMemo)(()=>({position:"relative",width:"100%",height:"100%",...e.style}),[e.style]);return n.createElement("div",{id:e.id,ref:l,style:c},o&&n.createElement(L.Provider,{value:d},n.createElement("div",{"mapboxgl-children":"",style:{height:"100%"}},e.children)))});var E=a(98477);let T=/box|flex|grid|column|lineHeight|fontWeight|opacity|order|tabSize|zIndex/;function R(e,t){if(!e||!t)return;let a=e.style;for(let e in t){let n=t[e];Number.isFinite(n)&&!T.test(e)?a[e]=`${n}px`:a[e]=n}}function I(e,t){if(e===t)return null;let a=M(e),n=M(t),i=[];for(let e of n)a.has(e)||i.push(e);for(let e of a)n.has(e)||i.push(e);return 0===i.length?null:i}function M(e){return new Set(e?e.trim().split(/\s+/):[])}let D=(0,n.memo)((0,n.forwardRef)((e,t)=>{var a;let i,r,o,s,{map:l,mapLib:d}=(0,n.useContext)(L),c=(0,n.useRef)({props:e}),p=(0,n.useMemo)(()=>{let t=!1;n.Children.forEach(e.children,e=>{e&&(t=!0)});let a={...e,element:t?document.createElement("div"):void 0},i=new d.Marker(a);return i.setLngLat([e.longitude,e.latitude]),i.getElement().addEventListener("click",e=>{c.current.props.onClick?.({type:"click",target:i,originalEvent:e})}),i.on("dragstart",e=>{e.lngLat=p.getLngLat(),c.current.props.onDragStart?.(e)}),i.on("drag",e=>{e.lngLat=p.getLngLat(),c.current.props.onDrag?.(e)}),i.on("dragend",e=>{e.lngLat=p.getLngLat(),c.current.props.onDragEnd?.(e)}),i},[]);(0,n.useEffect)(()=>(p.addTo(l.getMap()),()=>{p.remove()}),[]);let{longitude:u,latitude:m,offset:g,style:h,draggable:f=!1,popup:y=null,rotation:v=0,rotationAlignment:A="auto",pitchAlignment:S="auto"}=e;(0,n.useEffect)(()=>{R(p.getElement(),h)},[h]),(0,n.useImperativeHandle)(t,()=>p,[]);let T=c.current.props;(p.getLngLat().lng!==u||p.getLngLat().lat!==m)&&p.setLngLat([u,m]),g&&(a=p.getOffset(),i=Array.isArray(a)?a[0]:a?a.x:0,r=Array.isArray(a)?a[1]:a?a.y:0,o=Array.isArray(g)?g[0]:g?g.x:0,s=Array.isArray(g)?g[1]:g?g.y:0,i!==o||r!==s)&&p.setOffset(g),p.isDraggable()!==f&&p.setDraggable(f),p.getRotation()!==v&&p.setRotation(v),p.getRotationAlignment()!==A&&p.setRotationAlignment(A),p.getPitchAlignment()!==S&&p.setPitchAlignment(S),p.getPopup()!==y&&p.setPopup(y);let M=I(T.className,e.className);if(M)for(let e of M)p.toggleClassName(e);return c.current.props=e,(0,E.createPortal)(e.children,p.getElement())}
1)),U=(0,n.memo)((0,n.forwardRef)((e,t)=>{let{map:a,mapLib:i}=(0,n.useContext)(L),o=(0,n.useMemo)(()=>document.createElement("div"),[]),s=(0,n.useRef)({props:e}),l=(0,n.useMemo)(()=>{let t={...e},a=new i.Popup(t);return a.setLngLat([e.longitude,e.latitude]),a.once("open",e=>{s.current.props.onOpen?.(e)}),a},[]);if((0,n.useEffect)(()=>{let e=e=>{s.current.props.onClose?.(e)};return l.on("close",e),l.setDOMContent(o).addTo(a.getMap()),()=>{l.off("close",e),l.isOpen()&&l.remove()}},[]),(0,n.useEffect)(()=>{R(l.getElement(),e.style)},[e.style]),(0,n.useImperativeHandle)(t,()=>l,[]),l.isOpen()){let t=s.current.props;(l.getLngLat().lng!==e.longitude||l.getLngLat().lat!==e.latitude)&&l.setLngLat([e.longitude,e.latitude]),e.offset&&!r(t.offset,e.offset)&&l.setOffset(e.offset),(t.anchor!==e.anchor||t.maxWidth!==e.maxWidth)&&(l.options.anchor=e.anchor,l.setMaxWidth(e.maxWidth));let a=I(t.className,e.className);if(a)for(let e of a)l.toggleClassName(e);s.current.props=e}return(0,E.createPortal)(e.children,o)}));function b(e,t,a,i){let r=(0,n.useContext)(L),o=(0,n.useMemo)(()=>e(r),[]);return(0,n.useEffect)(()=>{let e="function"==typeof t&&"function"==typeof a?t:null,n="function"==typeof a?a:"function"==typeof t?t:null,{map:s}=r;return!s.hasControl(o)&&(s.addControl(o,(i||a||t)?.position),e&&e(r)),()=>{n&&n(r),s.hasControl(o)&&s.removeControl(o)}},[]),o}(0,n.memo)(function(e){let t=b(({mapLib:t})=>new t.AttributionControl(e),{position:e.position});return(0,n.useEffect)(()=>{R(t._container,e.style)},[e.style]),null}),(0,n.memo)(function(e){let t=b(({mapLib:t})=>new t.FullscreenControl({container:e.containerId&&document.getElementById(e.containerId)}),{position:e.position});return(0,n.useEffect)(()=>{R(t._controlContainer,e.style)},[e.style]),null}),(0,n.memo)((0,n.forwardRef)(function(e,t){let a=(0,n.useRef)({props:e}),i=b(({mapLib:t})=>{let n=new t.GeolocateControl(e),i=n._setupUI;return n._setupUI=()=>{n._container.hasChildNodes()||i()},n.on("geolocate",e=>{a.current.props.onGeolocate?.(e)}),n.on("error",e=>{a.current.props.onError?.(e)}),n.on("outofmaxbounds",e=>{a.current.props.onOutOfMaxBounds?.(e)}),n.on("trackuserlocationstart",e=>{a.current.props.onTrackUserLocationStart?.(e)}),n.on("trackuserlocationend",e=>{a.current.props.onTrackUserLocationEnd?.(e)}),n},{position:e.position});return a.current.props=e,(0,n.useImperativeHandle)(t,()=>i,[]),(0,n.useEffect)(()=>{R(i._container,e.style)},[e.style]),null})),(0,n.memo)(function(e){let t=b(({mapLib:t})=>new t.NavigationControl(e),{position:e.position});return(0,n.useEffect)(()=>{R(t._container,e.style)},[e.style]),null}),(0,n.memo)(function(e){let t=b(({mapLib:t})=>new t.ScaleControl(e),{position:e.position}),a=(0,n.useRef)(e),i=a.current;a.current=e;let{style:r}=e;return void 0!==e.maxWidth&&e.maxWidth!==i.maxWidth&&(t.options.maxWidth=e.maxWidth),void 0!==e.unit&&e.unit!==i.unit&&t.setUnit(e.unit),(0,n.useEffect)(()=>{R(t._container,r)},[r]),null}),(0,n.memo)(function(e){let t=b(({mapLib:t})=>new t.TerrainControl(e),{position:e.position});return(0,n.useEffect)(()=>{R(t._container,e.style)},[e.style]),null}),(0,n.memo)(function(e){let t=b(({mapLib:t})=>new t.LogoControl(e),{position:e.position});return(0,n.useEffect)(()=>{R(t._container,e.style)},[e.style]),null})},17418:(e,t,a)=>{a.d(t,{A:()=>r});let n=new Uint8Array(16),i=[];for(let e=0;e<256;++e)i.push((e+256).toString(16).slice(1));let r=function(e,t,a){return t||e||!crypto.randomUUID?function(e,t,a){let r=(e=e||{}).random??e.rng?.()??crypto.getRandomValues(n);if(r.length<16)throw Error("Random bytes length must be >= 16");if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){if((a=a||0)<0||a+16>t.length)throw RangeError(`UUID byte range ${a}:${a+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[a+e]=r[e];return t}return function(e,t=0){return(i[e[t+0]]+i[e[t+1]]+i[e[t+2]]+i[e[t+3]]+"-"+i[e[t+4]]+i[e[t+5]]+"-"+i[e[t+6]]+i[e[t+7]]+"-"+i[e[t+8]]+i[e[t+9]]+"-"+i[e[t+10]]+i[e[t+11]]+i[e[t+12]]+i[e[t+13]]+i[e[t+14]]+i[e[t+15]]).toLowerCase()}(r)}(e,t,a):crypto.randomUUID()}},28179:(e,t,a)=>{a.d(t,{A:()=>i});var n=a(55729);
1let i=function(e,t){var a=(0,n.useState)(null),i=a[0],r=a[1];return(0,n.useEffect)(function(){if(e.current&&"function"==typeof IntersectionObserver){var a=new IntersectionObserver(function(e){r(e[0])},t);return a.observe(e.current),function(){r(null),a.disconnect()}}return function(){}},[e.current,t.threshold,t.root,t.rootMargin]),i}},44876:(e,t,a)=>{a.d(t,{A:()=>i});var n=a(55729);function i(e,t,a){void 0===t&&(t=0),void 0===a&&(a=[]);var i,r,o,s,l,d,c,p=(void 0===(i=t)&&(i=0),r=(0,n.useRef)(!1),o=(0,n.useRef)(),s=(0,n.useRef)(e),l=(0,n.useCallback)(function(){return r.current},[]),d=(0,n.useCallback)(function(){r.current=!1,o.current&&clearTimeout(o.current),o.current=setTimeout(function(){r.current=!0,s.current()},i)},[i]),c=(0,n.useCallback)(function(){r.current=null,o.current&&clearTimeout(o.current)},[]),(0,n.useEffect)(function(){s.current=e},[e]),(0,n.useEffect)(function(){return d(),c},[i]),[l,c,d]),u=p[0],m=p[1],g=p[2];return(0,n.useEffect)(g,a),[u,m]}},52445:(e,t,a)=>{let n;a.d(t,{o4:()=>N});let i="3.9.3",r="function"==typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0}):void 0,o="function"==typeof TextEncoder?new TextEncoder:void 0,s=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),l=(n={},s.forEach((e,t)=>n[e]=t),n),d=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,c=String.fromCharCode.bind(String),p="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),u=e=>e.replace(/=/g,"").replace(/[+\/]/g,e=>"+"==e?"-":"_"),m=e=>{let t,a,n,i,r="",o=e.length%3;for(let o=0;o<e.length;){if((a=e.charCodeAt(o++))>255||(n=e.charCodeAt(o++))>255||(i=e.charCodeAt(o++))>255)throw TypeError("invalid character found");r+=s[(t=a<<16|n<<8|i)>>18&63]+s[t>>12&63]+s[t>>6&63]+s[63&t]}return o?r.slice(0,o-3)+"===".substring(o):r},g="function"==typeof btoa?e=>btoa(e):m,h="function"==typeof Uint8Array.prototype.toBase64?e=>e.toBase64():e=>{let t=[];for(let a=0,n=e.length;a<n;a+=4096)t.push(c.apply(null,e.subarray(a,a+4096)));return g(t.join(""))},f=(e,t=!1)=>t?u(h(e)):h(e),y=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?c(192|t>>>6)+c(128|63&t):c(224|t>>>12&15)+c(128|t>>>6&63)+c(128|63&t)}var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return c(240|t>>>18&7)+c(128|t>>>12&63)+c(128|t>>>6&63)+c(128|63&t)},v=/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\x00-\x7F]/g,A=e=>e.replace(v,y),L=o?e=>h(o.encode(e)):e=>g(A(e)),S=(e,t=!1)=>t?u(L(e)):L(e),E=e=>S(e,!0),T=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,R=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return c((t>>>10)+55296)+c((1023&t)+56320);case 3:return c((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return c((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},I=e=>e.replace(T,R),M=e=>{let t,a,n;if(e=e.replace(/\s+/g,""),!d.test(e))throw TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let i=[];for(let r=0;r<e.length;)t=l[e.charAt(r++)]<<18|l[e.charAt(r++)]<<12|(a=l[e.charAt(r++)])<<6|(n=l[e.charAt(r++)]),64===a?i.push(c(t>>16&255)):64===n?i.push(c(t>>16&255,t>>8&255)):i.push(c(t>>16&255,t>>8&255,255&t));return i.join("")},D="function"==typeof atob?e=>atob(e.replace(/[^A-Za-z0-9\+\/]/g,"")):M,U="function"==typeof Uint8Array.fromBase64?e=>Uint8Array.fromBase64(e):e=>p(D(e).split("").map(e=>e.charCodeAt(0))),b=e=>U(w(e)),k=r?e=>r.decode(U(e)):e=>I(D(e)),w=e=>e.replace(/[-_]/g,e=>"-"==e?"+":"/").replace(/[^A-Za-z0-9\+\/]/g,""),C=e=>k(w(e)),P=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),_=function(){let e=(e,t)=>Object.defineProperty(String.prototype,e,P(t));e("fromBase64",function(){return C(this)}),e("toBase64",function(e){return S(this,e)}),e("toBase64URI",function(){return S(this,!0)}),e("toBase64URL",function(){return S(this,!0)}),e("toUint8Array",function(){return b(this)})},x=function(){let e=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,P(t));e("toBase64",function(e){return f(this,e)}),e("toBase64URI",function(){return f(this,!0)}),e("toBase64URL",function(){return f(this,!0)})},N={version:i,VERSION:i,atob:D,atobPolyfill:M,btoa:g,btoaPolyfill:m,fromBase64:C,toBase64:S,encode:S,encodeURI:E,encodeURL:E,utob:A,btou:I,decode:C,isValid:e=>{if("string"!=typeof e)return!1;let t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},fromUint8Array:f,toUint8Array:b,extendString:_,extendUint8Array:x,extendBuiltins:()=>{_(),x()}}},57633:(e,t,a)=>{a.d(t,{TM:()=>o,Gj:()=>_,Hu:()=>k,rF:()=>w,_7:()=>f,Io:()=>m,iV:()=>ee,QB:()=>ea,Hy:()=>W,$W:()=>r,G8:()=>M,p:()=>U,ET:()=>ec,ub:()=>b,G0:()=>E,Re:()=>R,IS:()=>c,jO:()=>et,m_:()=>l,p3:()=>d,qy:()=>s,Lq:()=>X,h5:()=>p,N0:()=>C,Dy:()=>Q,Lr:()=>x,gZ:()=>V,oP:()=>P,EA:()=>u});
1class n extends Map{#e=0;#t=new Map;#a=new Map;#n;#i;#r;constructor(e={}){if(super(),!(e.maxSize&&e.maxSize>0))throw TypeError("`maxSize` must be a number greater than 0");if("number"==typeof e.maxAge&&0===e.maxAge)throw TypeError("`maxAge` must be a number greater than 0");this.#n=e.maxSize,this.#i=e.maxAge||1/0,this.#r=e.onEviction}get __oldCache(){return this.#a}#o(e){if("function"==typeof this.#r)for(let[t,a]of e)this.#r(t,a.value)}#s(e,t){return!!("number"==typeof t.expiry&&t.expiry<=Date.now())&&("function"==typeof this.#r&&this.#r(e,t.value),this.delete(e))}#l(e,t){if(!1===this.#s(e,t))return t.value}#d(e,t){return t.expiry?this.#l(e,t):t.value}#c(e,t){let a=t.get(e);return this.#d(e,a)}#p(e,t){this.#t.set(e,t),this.#e++,this.#e>=this.#n&&(this.#e=0,this.#o(this.#a),this.#a=this.#t,this.#t=new Map)}#u(e,t){this.#a.delete(e),this.#p(e,t)}*#m(){for(let e of this.#a){let[t,a]=e;this.#t.has(t)||!1===this.#s(t,a)&&(yield e)}for(let e of this.#t){let[t,a]=e;!1===this.#s(t,a)&&(yield e)}}get(e){if(this.#t.has(e)){let t=this.#t.get(e);return this.#d(e,t)}if(this.#a.has(e)){let t=this.#a.get(e);if(!1===this.#s(e,t))return this.#u(e,t),t.value}}set(e,t,{maxAge:a=this.#i}={}){let n="number"==typeof a&&a!==1/0?Date.now()+a:void 0;return this.#t.has(e)?this.#t.set(e,{value:t,expiry:n}):this.#p(e,{value:t,expiry:n}),this}has(e){return this.#t.has(e)?!this.#s(e,this.#t.get(e)):!!this.#a.has(e)&&!this.#s(e,this.#a.get(e))}peek(e){return this.#t.has(e)?this.#c(e,this.#t):this.#a.has(e)?this.#c(e,this.#a):void 0}expiresIn(e){let t=this.#t.get(e)??this.#a.get(e);if(t)return t.expiry?t.expiry-Date.now():1/0}delete(e){let t=this.#t.delete(e);return t&&this.#e--,this.#a.delete(e)||t}clear(){this.#t.clear(),this.#a.clear(),this.#e=0}resize(e){if(!(e&&e>0))throw TypeError("`maxSize` must be a number greater than 0");let t=[...this.#m()],a=t.length-e;a<0?(this.#t=new Map(t),this.#a=new Map,this.#e=t.length):(a>0&&this.#o(t.slice(0,a)),this.#a=new Map(t.slice(a)),this.#t=new Map,this.#e=0),this.#n=e}evict(e=1){let t=Number(e);if(!t||t<=0)return;let a=[...this.#m()],n=Math.trunc(Math.min(t,Math.max(a.length-1,0)));n<=0||(this.#o(a.slice(0,n)),this.#a=new Map(a.slice(n)),this.#t=new Map,this.#e=0)}*keys(){for(let[e]of this)yield e}*values(){for(let[,e]of this)yield e}*[Symbol.iterator](){for(let e of this.#t){let[t,a]=e;!1===this.#s(t,a)&&(yield[t,a.value])}for(let e of this.#a){let[t,a]=e;this.#t.has(t)||!1===this.#s(t,a)&&(yield[t,a.value])}}*entriesDescending(){let e=[...this.#t];for(let t=e.length-1;t>=0;--t){let[a,n]=e[t];!1===this.#s(a,n)&&(yield[a,n.value])}e=[...this.#a];for(let t=e.length-1;t>=0;--t){let[a,n]=e[t];this.#t.has(a)||!1===this.#s(a,n)&&(yield[a,n.value])}}*entriesAscending(){for(let[e,t]of this.#m())yield[e,t.value]}get size(){if(!this.#e)return this.#a.size;let e=0;for(let t of this.#a.keys())!this.#t.has(t)&&e++;return Math.min(this.#e+e,this.#n)}get maxSize(){return this.#n}get maxAge(){return this.#i}entries(){return this.entriesAscending()}forEach(e,t=this){for(let[a,n]of this.entriesAscending())e.call(t,n,a,this)}get[Symbol.toStringTag](){return"QuickLRU"}toString(){return`QuickLRU(${this.size}/${this.maxSize})`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}}class i{constructor(){this._apiKey="",this._fetch="u">typeof self?fetch.bind(self):"u">typeof global&&global.fetch?global.fetch:null,this.tileCacheSize=200}set apiKey(e){this._apiKey=e}get apiKey(){return this._apiKey}set fetch(e){this._fetch=e}get fetch(){return this._fetch}}let r=new i,o={AUTO:{code:null,flag:"auto",name:"Auto",latin:!1,isMode:!0,geocoding:!0},LATIN:{code:"latin",flag:"name:latin",name:"Latin",latin:!0,isMode:!1,geocoding:!1},NON_LATIN:{code:"nonlatin",flag:"name:nonlatin",name:"Non Latin",latin:!1,isMode:!1,geocoding:!1},LOCAL:{code:null,flag:"name",name:"Local",latin:!0,isMode:!1,geocoding:!1},ALBANIAN:{code:"sq",flag:"name:sq",name:"Albanian",latin:!0,isMode:!1,geocoding:!0},AMHARIC:{code:"am",flag:"name:am",name:"Amharic",latin:!1,isMode:!1,geocoding:!0},ARABIC:{code:"ar",flag:"name:ar",name:"Arabic",latin:!1,isMode:!1,geocoding:!0},ARMENIAN:{code:"hy",flag:"name:hy",name:"Armenian",latin:!1,isMode:!1,geocoding:!0},AZERBAIJANI:{code:"az",flag:"name:az",name:"Azerbaijani",latin:!0,isMode:!1,geocoding:!0},BASQUE:{code:"eu",flag:"name:eu",name:"Basque",latin:!0,isMode:!1,geocoding:!0},BELARUSIAN:{code:"be",flag:"name:be",name:"Belarusian",latin:!1,isMode:!1,geocoding:!0},BENGALI:{code:"bn",flag:"name:bn",name:"Bengali",latin:!0,isMode:!1,geocoding:!0},BOSNIAN:{code:"bs",flag:"name:bs",name:"Bosnian",latin:!0,isMode:!1,geocoding:!0},BRETON:{code:"br",flag:"name:br",name:"Breton",latin:!0,isMode:!1,geocoding:!0},BULGARIAN:{code:"bg",flag:"bg",name:"Bulgarian",latin:!1,isMode:!1,geocoding:!0},CATALAN:{code:"ca",flag:"name:ca",name:"Catalan",latin:!0,isMode:!1,geocoding:!0},CHINESE:{code:"zh",flag:"name:zh",name:"Chinese",latin:!1,isMode:!1,geocoding:!0},TRADITIONAL_CHINESE:{code:"zh-Hant",flag:"name:zh-Hant",name:"Chinese (traditional)",latin:!1,isMode:!1,geocoding:!1},SIMPLIFIED_CHINESE:{code:"zh-Hans",flag:"name:zh-Hans",name:"Chinese (simplified)",latin:!1,isMode:!1,geocoding:!1},CORSICAN:{code:"co",flag:"name:co",name:"Corsican",latin:!0,isMode:!1,geocoding:!0},CROATIAN:{code:"hr",flag:"name:hr",name:"Croatian",latin:!0,isMode:!1,geocoding:!0},CZECH:{code:"cs",flag:"name:cs",name:"Czech",latin:!0,isMode:!1,geocoding:!0},DANISH:{code:"da",flag:"name:da",name:"Danish",latin:!0,isMode:!1,geocoding:!0},DUTCH:{code:"nl",flag:"name:nl",name:"Dutch",latin:!0,isMode:!1,geocoding:!0},GERMAN:{code:"de",flag:"name:de",name:"German",latin:!0,isMode:!1,geocoding:!0},GREEK:{code:"el",flag:"name:el",name:"Greek",latin:!1,isMode:!1,geocoding:!0},ENGLISH:{code:"en",flag:"name:en",name:"English",latin:!0,isMode:!1,geocoding:!0},ESPERANTO:{code:"eo",flag:"name:eo",name:"Esperanto",latin:!0,isMode:!1,geocoding:!0}
1,ESTONIAN:{code:"et",flag:"name:et",name:"Estonian",latin:!0,isMode:!1,geocoding:!0},FINNISH:{code:"fi",flag:"name:fi",name:"Finnish",latin:!0,isMode:!1,geocoding:!0},FRENCH:{code:"fr",flag:"name:fr",name:"French",latin:!0,isMode:!1,geocoding:!0},FRISIAN:{code:"fy",flag:"name:fy",name:"Frisian (West)",latin:!0,isMode:!1,geocoding:!0},GEORGIAN:{code:"ka",flag:"name:ka",name:"Georgian",latin:!1,isMode:!1,geocoding:!0},HEBREW:{code:"he",flag:"name:he",name:"Hebrew",latin:!1,isMode:!1,geocoding:!0},HINDI:{code:"hi",flag:"name:hi",name:"Hindi",latin:!1,isMode:!1,geocoding:!0},HUNGARIAN:{code:"hu",flag:"name:hu",name:"Hungarian",latin:!0,isMode:!1,geocoding:!0},ICELANDIC:{code:"is",flag:"name:is",name:"Icelandic",latin:!0,isMode:!1,geocoding:!0},INDONESIAN:{code:"id",flag:"name:id",name:"Indonesian",latin:!0,isMode:!1,geocoding:!0},IRISH:{code:"ga",flag:"name:ga",name:"Irish",latin:!0,isMode:!1,geocoding:!0},ITALIAN:{code:"it",flag:"name:it",name:"Italian",latin:!0,isMode:!1,geocoding:!0},JAPANESE:{code:"ja",flag:"name:ja",name:"Japanese",latin:!1,isMode:!1,geocoding:!0},JAPANESE_HIRAGANA:{code:"ja-Hira",flag:"name:ja-Hira",name:"Japanese Hiragana form",latin:!1,isMode:!1,geocoding:!1},JAPANESE_2018:{code:"ja-Latn",flag:"name:ja-Latn",name:"Japanese (Latin 2018)",latin:!0,isMode:!1,geocoding:!1},JAPANESE_KANA:{code:"ja_kana",flag:"name:ja_kana",name:"Japanese (Kana)",latin:!1,isMode:!1,geocoding:!1},JAPANESE_LATIN:{code:"ja_rm",flag:"name:ja_rm",name:"Japanese (Latin script)",latin:!0,isMode:!1,geocoding:!1},KANNADA:{code:"kn",flag:"name:kn",name:"Kannada",latin:!0,isMode:!1,geocoding:!0},KAZAKH:{code:"kk",flag:"name:kk",name:"Kazakh",latin:!1,isMode:!1,geocoding:!0},KOREAN:{code:"ko",flag:"name:ko",name:"Korean",latin:!1,isMode:!1,geocoding:!0},KOREAN_LATIN:{code:"ko-Latn",flag:"name:ko-Latn",name:"Korean (Latin script)",latin:!0,isMode:!1,geocoding:!1},KURDISH:{code:"ku",flag:"name:ku",name:"Kurdish",latin:!0,isMode:!1,geocoding:!0},CLASSICAL_LATIN:{code:"la",flag:"name:la",name:"Latin",latin:!0,isMode:!1,geocoding:!0},LATVIAN:{code:"lv",flag:"name:lv",name:"Latvian",latin:!0,isMode:!1,geocoding:!0},LITHUANIAN:{code:"lt",flag:"name:lt",name:"Lithuanian",latin:!0,isMode:!1,geocoding:!0},LUXEMBOURGISH:{code:"lb",flag:"name:lb",name:"Luxembourgish",latin:!0,isMode:!1,geocoding:!0},MACEDONIAN:{code:"mk",flag:"name:mk",name:"Macedonian",latin:!1,isMode:!1,geocoding:!0},MALAYALAM:{code:"ml",flag:"name:ml",name:"Malayalam",latin:!1,isMode:!1,geocoding:!0},MALTESE:{code:"mt",flag:"name:mt",name:"Maltese",latin:!0,isMode:!1,geocoding:!0},NORWEGIAN:{code:"no",flag:"name:no",name:"Norwegian",latin:!0,isMode:!1,geocoding:!0},OCCITAN:{code:"oc",flag:"name:oc",name:"Occitan",latin:!0,isMode:!1,geocoding:!0},PERSIAN:{code:"fa",flag:"name:fa",name:"Persian",latin:!1,isMode:!1,geocoding:!0},POLISH:{code:"pl",flag:"name:pl",name:"Polish",latin:!0,isMode:!1,geocoding:!0},PORTUGUESE:{code:"pt",flag:"name:pt",name:"Portuguese",latin:!0,isMode:!1,geocoding:!0},PUNJABI:{code:"pa",flag:"name:pa",name:"Punjabi",latin:!1,isMode:!1,geocoding:!0},WESTERN_PUNJABI:{code:"pnb",flag:"name:pnb",name:"Western Punjabi",latin:!1,isMode:!1,geocoding:!1},ROMANIAN:{code:"ro",flag:"name:ro",name:"Romanian",latin:!0,isMode:!1,geocoding:!0},ROMANSH:{code:"rm",flag:"name:rm",name:"Romansh",latin:!0,isMode:!1,geocoding:!0},RUSSIAN:{code:"ru",flag:"name:ru",name:"Russian",latin:!1,isMode:!1,geocoding:!0},SERBIAN_CYRILLIC:{code:"sr",flag:"name:sr",name:"Serbian (Cyrillic script)",latin:!1,isMode:!1,geocoding:!0},SERBIAN_LATIN:{code:"sr-Latn",flag:"name:sr-Latn",name:"Serbian (Latin script)",latin:!0,isMode:!1,geocoding:!1},SCOTTISH_GAELIC:{code:"gd",flag:"name:gd",name:"Scottish Gaelic",latin:!0,isMode:!1,geocoding:!0},SLOVAK:{code:"sk",flag:"name:sk",name:"Slovak",latin:!0,isMode:!1,geocoding:!0},SLOVENE:{code:"sl",flag:"name:sl",name:"Slovene",latin:!0,isMode:!1,geocoding:!0},SPANISH:{code:"es",flag:"name:es",name:"Spanish",latin:!0,isMode:!1,geocoding:!0},SWEDISH:{code:"sv",flag:"name:sv",name:"Swedish",latin:!0,isMode:!1,geocoding:!0},TAMIL:{code:"ta",flag:"name:ta",name:"Tamil",latin:!1,isMode:!1,geocoding:!0},TELUGU:{code:"te",flag:"name:te",name:"Telugu",latin:!1,isMode:!1,geocoding:!0},THAI:{code:"th",flag:"name:th",name:"Thai",latin:!1,isMode:!1,geocoding:!0},TURKISH:{code:"tr",flag:"name:tr",name:"Turkish",latin:!0,isMode:!1,geocoding:!0},UKRAINIAN:{code:"uk",flag:"name:uk",name:"Ukrainian",latin:!1,isMode:!1,geocoding:!0},VIETNAMESE:{code:"vi",flag:"name:vi",name:"Vietnamese (Latin script)",latin:!0,isMode:!1,geocoding:!0},WELSH:{code:"cy",flag:"name:cy",name:"Welsh",latin:!0,isMode:!1,geocoding:!0}};function s(e,t=o){return e in t?t[e]:null}function l(e,t=o){for(let a of Object.values(t))if(a.code===e)return a;return null}function d(e,t=o){for(let a of Object.values(t))if(a.flag===e)return a;return null}function c(){return"u"<typeof navigator?l(Intl.DateTimeFormat().resolvedOptions().locale.split("-")[0])??o.ENGLISH:Array.from(new Set(navigator.languages.map(e=>e.split("-")[0]))).map(e=>l(e)).filter(e=>e)[0]??o.ENGLISH}function p(e){return null!==e&&"object"==typeof e&&"code"in e&&"flag"in e&&"name"in e&&"latin"in e&&"isMode"in e&&"geocoding"in e&&("string"==typeof e.code||null===e.code)&&"string"==typeof e.flag&&"string"==typeof e.name&&"boolean"==typeof e.latin&&"boolean"==typeof e.isMode&&"boolean"==typeof e.geocoding}function u(e,t=o){return p(e)?d(e.flag,t):"string"!=typeof e?null:s(e,t)||l(e,t)||d(e,t)||null}function m(e,t,a=o){let n=u(e,a),i=u(t,a);return null!==n&&null!==i&&n.flag===i.flag}async function g(e,t={}){if(null===r.fetch)throw Error("The fetch function was not found. If on NodeJS < 18 please specify the fetch function with config.fetch");if(""===new URL(e).searchParams.get("key").trim())throw Error("The MapTiler Cloud API key is missing. Set it in `config.apiKey` or get one for free at https://maptiler.com");return r.fetch(e,t)}let h={maptilerApiURL:"https://api.maptiler.com/",mapStyle:"streets-v2"};Object.freeze(h);
1class f extends Error{constructor(e,t=""){super(`Call to enpoint ${e.url} failed with the status code ${e.status}. ${t}`),this.res=e}}let y={400:"Query too long / Invalid parameters",403:"Key is missing, invalid or restricted"};function v(e,t){let{adjustSearchParams:a,apiKey:n}=t;"function"==typeof a&&a(e),e.set("key",n??r.apiKey)}function A(e,t){let{language:a}=t;if(void 0===a)return;let n=Array.from(new Set((Array.isArray(a)?a:[a]).map(e=>{var t;let a;return a=(t=e)===o.AUTO.flag?c():"string"==typeof t?l(t):p(t)?t.flag===o.AUTO.flag?c():d(t.flag):null,a?.geocoding?a.code:null}).filter(e=>e))).join(",");e.set("language",n)}function L(e,t){let{limit:a,types:n,excludeTypes:i}=t;void 0!==a&&e.set("limit",String(a)),void 0!==n&&e.set("types",n.join(",")),void 0!==i&&e.set("excludeTypes",String(i))}function S(e,t){let{bbox:a,proximity:n,country:i,fuzzyMatch:r,autocomplete:o}=t;void 0!==a&&e.set("bbox",a.join(",")),void 0!==n&&e.set("proximity","ip"===n?n:n.join(",")),void 0!==i&&e.set("country",i.join(",")),void 0!==r&&e.set("fuzzyMatch",r?"true":"false"),void 0!==o&&e.set("autocomplete",o?"true":"false")}let E={forward:async function(e,t={}){if("string"!=typeof e||0===e.trim().length)throw Error("The query must be a non-empty string");let a=new URL(`geocoding/${encodeURIComponent(e)}.json`,h.maptilerApiURL);v(a.searchParams,t),A(a.searchParams,t),L(a.searchParams,t),S(a.searchParams,t);let n=await g(a.toString());if(!n.ok)throw new f(n,y[n.status]??"");return await n.json()},reverse:async function(e,t={}){if(!Array.isArray(e)||e.length<2)throw Error("The position must be an array of form [lng, lat].");let a=new URL(`geocoding/${e[0]},${e[1]}.json`,h.maptilerApiURL);v(a.searchParams,t),A(a.searchParams,t),L(a.searchParams,t);let n=await g(a.toString());if(!n.ok)throw new f(n,y[n.status]??"");return await n.json()},byId:async function(e,t={}){let a=new URL(`geocoding/${e}.json`,h.maptilerApiURL);v(a.searchParams,t),A(a.searchParams,t);let n=await g(a.toString());if(!n.ok)throw new f(n,y[n.status]??"");return await n.json()},batch:async function(e,t={}){if(!e.length)return[];let a=e.map(e=>encodeURIComponent(e)).join(";"),n=new URL(`geocoding/${a}.json`,h.maptilerApiURL);v(n.searchParams,t),A(n.searchParams,t),L(n.searchParams,t),S(n.searchParams,t);let i=await g(n.toString());if(!i.ok)throw new f(i,y[i.status]??"");let r=await i.json();return 1===e.length?[r]:r}},T={403:"Key is missing, invalid or restricted"},R={info:async function(e={}){let t=new URL("geolocation/ip.json",h.maptilerApiURL);t.searchParams.set("key",e.apiKey??r.apiKey),"elevation"in e&&t.searchParams.set("elevation",e.elevation?"true":"false");let a=t.toString(),n=await g(a);if(!n.ok)throw new f(n,n.status in T?T[n.status]:"");return await n.json()}},I={403:"Key is missing, invalid or restricted"},M={search:async function(e,t={}){if("string"!=typeof e||0===e.trim().length)throw Error("The query must be a non-empty string");let a=new URL(`coordinates/search/${e}.json`,h.maptilerApiURL);a.searchParams.set("key",t.apiKey??r.apiKey),"limit"in t&&a.searchParams.set("limit",t.limit.toString()),"transformations"in t&&a.searchParams.set("transformations",t.transformations.toString()),"exports"in t&&a.searchParams.set("exports",t.exports.toString());let n=a.toString(),i=await g(n);if(!i.ok)throw new f(i,i.status in I?I[i.status]:"");return await i.json()},transform:async function(e,t={}){let a=(Array.isArray(e[0])?e:[e]).map(e=>`${e[0]},${e[1]}`).join(";"),n=new URL(`coordinates/transform/${a}.json`,h.maptilerApiURL);n.searchParams.set("key",t.apiKey??r.apiKey),"sourceCrs"in t&&n.searchParams.set("s_srs",t.sourceCrs.toString()),"targetCrs"in t&&n.searchParams.set("t_srs",t.targetCrs.toString()),"operations"in t&&n.searchParams.set("ops",(Array.isArray(t.operations)?t.operations:[t.operations]).join("|"));let i=n.toString(),o=await g(i);if(!o.ok)throw new f(o,o.status in I?I[o.status]:"");return await o.json()}},D={403:"Key is missing, invalid or restricted"},U={get:async function(e,t={}){if("string"!=typeof e||0===e.trim().length)throw Error("The data ID must be a non-empty string");let a=new URL(`data/${encodeURIComponent(e)}/features.json`,h.maptilerApiURL);a.searchParams.set("key",t.apiKey??r.apiKey);let n=a.toString(),i=await g(n);if(!i.ok)throw new f(i,i.status in D?D[i.status]:"");return await i.json()}};function b(e){let t,a=e.trim();return a.startsWith("http://")||a.startsWith("https://")?a:null!==(t=/^maptiler:\/\/(.*)/.exec(a))?`https://api.maptiler.com/maps/${t[1]}/style.json`:`https://api.maptiler.com/maps/${a}/style.json`}class k{constructor(e,t,a,n,i,r,o=!1,s){this.name=e,this.variantType=t,this.id=a,this.referenceStyle=n,this.description=i,this.imageURL=r,this.deprecated=o,this.deprecationMessage=s}getName(){return this.name}getFullName(){return`${this.referenceStyle.getName()} ${this.name}`}getType(){return this.variantType}getId(){return this.id}getDescription(){return this.description}getReferenceStyle(){return this.referenceStyle}hasVariant(e){return this.referenceStyle.hasVariant(e)}getVariant(e){let t=this.referenceStyle.getVariant(e);return this.warnIfDeprecated(t),t}getVariants(){return this.referenceStyle.getVariants().filter(e=>e!==this).map(e=>(this.warnIfDeprecated(e),e))}getImageURL(){return this.imageURL}getExpandedStyleURL(){return b(this.getId())}
1warnIfDeprecated(e=this){if(!e.deprecated)return e;if(e.deprecationMessage)console.warn(e.deprecationMessage);else{let t=e.getFullName();console.warn(`Style "${t}" is deprecated and will be removed in a future version.`)}return e}}class w{constructor(e,t){this.name=e,this.id=t,this.variants={},this.orderedVariants=[]}getName(){return this.name}getId(){return this.id}addVariant(e){this.variants[e.getType()]=e,this.orderedVariants.push(e)}hasVariant(e){return e in this.variants}getVariant(e){return e in this.variants?this.variants[e]:this.orderedVariants[0]}getVariants(){return Object.values(this.variants)}getDefaultVariant(){return this.orderedVariants[0].warnIfDeprecated()}}let C=[{referenceStyleID:"STREETS_V2",name:"Streets",description:"",variants:[{id:"streets-v2",name:"Default",variantType:"DEFAULT",description:"",imageURL:"",deprecated:!0,deprecationMessage:'"streets-v2" is deprecated, use "streets-v4" instead'},{id:"streets-v2-dark",name:"Dark",variantType:"DARK",description:"",imageURL:"",deprecated:!0,deprecationMessage:'"streets-v2-dark" is deprecated, use "streets-v4-dark" instead'},{id:"streets-v2-light",name:"Light",variantType:"LIGHT",description:"",imageURL:"",deprecated:!0,deprecationMessage:'"streets-v2-light" is deprecated, use "streets-v4-light" instead'},{id:"streets-v2-night",name:"Night",variantType:"NIGHT",description:"",imageURL:"",deprecated:!0,deprecationMessage:'"streets-v2-night" is deprecated, use "streets-v4-night" instead'},{id:"streets-v2-pastel",name:"Pastel",variantType:"PASTEL",description:"",imageURL:"",deprecated:!0,deprecationMessage:'"streets-v2-pastel" is deprecated, use "streets-v4-pastel" instead'}]},{referenceStyleID:"STREETS_V4",name:"Streets",description:"",variants:[{id:"streets-v4",name:"Default",variantType:"DEFAULT",description:"",imageURL:""},{id:"streets-v4-dark",name:"Dark",variantType:"DARK",description:"",imageURL:""},{id:"streets-v4-pastel",name:"Pastel",variantType:"PASTEL",description:"",imageURL:""}]},{referenceStyleID:"BASE_V4",name:"Base",description:"",variants:[{id:"base-v4",name:"Default",variantType:"DEFAULT",description:"",imageURL:""},{id:"base-v4-dark",name:"Dark",variantType:"DARK",description:"",imageURL:""},{id:"base-v4-light",name:"Light",variantType:"LIGHT",description:"",imageURL:""},{id:"base-v4-ai",name:"AI",variantType:"AI",description:"",imageURL:""}]},{referenceStyleID:"OUTDOOR_V2",name:"Outdoor",description:"",variants:[{id:"outdoor-v2",name:"Default",variantType:"DEFAULT",description:"",imageURL:"",deprecated:!0,deprecationMessage:'"outdoor-v2" is deprecated, use "outdoor-v4" instead'},{id:"outdoor-v2-dark",name:"Dark",variantType:"DARK",description:"",imageURL:"",deprecated:!0,deprecationMessage:'"outdoor-v2-dark" is deprecated, use "outdoor-v4-dark" instead'}]},{referenceStyleID:"WINTER_V2",name:"Winter",description:"",variants:[{id:"winter-v2",name:"Default",variantType:"DEFAULT",description:"",imageURL:""},{id:"winter-v2-dark",name:"Dark",variantType:"DARK",description:"",imageURL:""}]},{referenceStyleID:"WINTER_V4",name:"Winter",description:"",variants:[{id:"winter-v4",name:"Default",variantType:"DEFAULT",description:"",imageURL:""},{id:"winter-v4-dark",name:"Dark",variantType:"DARK",description:"",imageURL:""}]},{referenceStyleID:"SATELLITE_V2",name:"Satellite",description:"",variants:[{id:"satellite",name:"Default",variantType:"DEFAULT",description:"",imageURL:"",deprecated:!0,deprecationMessage:'"satellite" is deprecated, use "satellite-v4" instead'}]},{referenceStyleID:"HYBRID_V2",name:"Hybrid",description:"",variants:[{id:"hybrid",name:"Default",variantType:"DEFAULT",description:"",imageURL:""}]},{referenceStyleID:"HYBRID_V4",name:"Hybrid",description:"",variants:[{id:"hybrid-v4",name:"Default",variantType:"DEFAULT",imageURL:""},{id:"hybrid-v4-dark",name:"Dark",variantType:"DARK",imageURL:""}]},{referenceStyleID:"BASIC_V2",name:"Basic",description:"",variants:[{id:"basic-v2",name:"Default",variantType:"DEFAULT",description:"",imageURL:"",deprecated:!0,deprecationMessage:'"basic-v2" is deprecated, use "base-v4" instead'}
1,{id:"basic-v2-dark",name:"Dark",variantType:"DARK",description:"",imageURL:"",deprecationMessage:'"basic-v2" is deprecated, use "base-v4" instead'},{id:"basic-v2-light",name:"Light",variantType:"LIGHT",description:"",imageURL:"",deprecated:!0,deprecationMessage:'"basic-v2" is deprecated, use "base-v4" instead'}]},{referenceStyleID:"BRIGHT",name:"Bright",description:"",variants:[{id:"bright-v2",name:"Default",variantType:"DEFAULT",description:"",imageURL:""},{id:"bright-v2-dark",name:"Dark",variantType:"DARK",description:"",imageURL:""},{id:"bright-v2-light",name:"Light",variantType:"LIGHT",description:"",imageURL:""},{id:"bright-v2-pastel",name:"Pastel",variantType:"PASTEL",description:"",imageURL:""}]},{referenceStyleID:"OPENSTREETMAP_V2",name:"OpenStreetMap",description:"",variants:[{id:"openstreetmap",name:"Default",variantType:"DEFAULT",description:"",imageURL:""},{id:"openstreetmap-dark",name:"Dark",variantType:"DARK",description:"",imageURL:""}]},{referenceStyleID:"TOPO_V2",name:"Topo",description:"",variants:[{id:"topo-v2",name:"Default",variantType:"DEFAULT",description:"",imageURL:"",deprecated:!0,deprecationMessage:'"topo-v2" is deprecated, use "topo-v4" instead'},{id:"topo-v2-dark",name:"Dark",variantType:"DARK",description:"",imageURL:"",deprecated:!0,deprecationMessage:'"topo-v2-dark" is deprecated, use "topo-v4-dark" instead'},{id:"topo-v2-shiny",name:"Shiny",variantType:"SHINY",description:"",imageURL:"",deprecated:!0},{id:"topo-v2-pastel",name:"Pastel",variantType:"PASTEL",description:"",imageURL:"",deprecated:!0,deprecationMessage:'"topo-v2-pastel" is deprecated, use "topo-v4-pastel" instead'},{id:"topo-v2-topographique",name:"Topographique",variantType:"TOPOGRAPHIQUE",description:"",imageURL:"",deprecated:!0,deprecationMessage:'"topo-v2-topographique" is deprecated, use "topo-v4-topographique" instead'}]},{referenceStyleID:"VOYAGER_V2",name:"Voyager",description:"",variants:[{id:"voyager-v2",name:"Default",deprecated:!0,variantType:"DEFAULT",description:"",imageURL:""},{id:"voyager-v2-darkmatter",name:"Darkmatter",deprecated:!0,variantType:"DARK",description:"",imageURL:""},{id:"voyager-v2-positron",name:"Positron",deprecated:!0,variantType:"LIGHT",description:"",imageURL:""},{id:"voyager-v2-vintage",name:"Vintage",deprecated:!0,variantType:"VINTAGE",description:"",imageURL:""}]},{referenceStyleID:"TONER_V2",name:"Toner",description:"",deprecated:!0,deprecationMessage:'"toner-v2" is deprecated, and will be no longer be a default style in the future',variants:[{id:"toner-v2",name:"Default",variantType:"DEFAULT",description:"",imageURL:"",deprecated:!0,deprecationMessage:'"toner-v2" is deprecated, and may be removed in future versions.'},{id:"toner-v2-background",name:"Background",variantType:"BACKGROUND",deprecated:!0,description:"",imageURL:"",deprecationMessage:'"toner-v2-background" is deprecated, and may be removed in future versions.'},{id:"toner-v2-lite",name:"Lite",variantType:"LITE",description:"",imageURL:"",deprecated:!0,deprecationMessage:'"toner-v2-lite" is deprecated, and may be removed in future versions.'},{id:"toner-v2-lines",name:"Lines",variantType:"LINES",description:"",imageURL:"",deprecated:!0,deprecationMessage:'"toner-v2-lines" is deprecated, and may be removed in future versions.'}]},{referenceStyleID:"DATAVIZ_V2",name:"Dataviz",description:"",variants:[{id:"dataviz",name:"Default",variantType:"DEFAULT",description:"",imageURL:"",deprecated:!0,deprecationMessage:'"dataviz" is deprecated, use "dataviz-v4" instead'},{id:"dataviz-dark",name:"Dark",variantType:"DARK",description:"",imageURL:"",deprecated:!0,deprecationMessage:'"dataviz-dark" is deprecated, use "dataviz-v4-dark" instead'},{id:"dataviz-light",name:"Light",variantType:"LIGHT",description:"",imageURL:"",deprecated:!0,deprecationMessage:'"dataviz-light" is deprecated, use "dataviz-v4-light" instead'}]},{referenceStyleID:"BACKDROP_V2",name:"Backdrop",description:"",variants:[{id:"backdrop",name:"Default",variantType:"DEFAULT",description:"",imageURL:"",deprecated:!0,deprecationMessage:'"backdrop" is deprecated, use "backdrop-v4" instead'}
1,{id:"backdrop-dark",name:"Dark",variantType:"DARK",description:"",imageURL:"",deprecated:!0,deprecationMessage:'"backdrop-dark" is deprecated, use "backdrop-v4-dark" instead'},{id:"backdrop-light",name:"Light",variantType:"LIGHT",description:"",imageURL:"",deprecated:!0,deprecationMessage:'"backdrop-light" is deprecated, use "backdrop-v4-light" instead'}]},{referenceStyleID:"OCEAN_V2",name:"Ocean",description:"",variants:[{id:"ocean",name:"Default",variantType:"DEFAULT",description:"",imageURL:"",deprecated:!0,deprecationMessage:'"ocean" is deprecated, use "ocean-v4" instead'}]},{referenceStyleID:"AQUARELLE_V2",name:"Aquarelle",description:"Watercolor map for creative use",variants:[{id:"aquarelle",name:"Default",variantType:"DEFAULT",description:"",imageURL:"",deprecated:!0,deprecationMessage:'"aquarelle" is deprecated, use "aquarelle-v4" instead'},{id:"aquarelle-dark",name:"Dark",variantType:"DARK",description:"",imageURL:"",deprecated:!0,deprecationMessage:'"aquarelle-dark" is deprecated, use "aquarelle-v4-dark" instead'},{id:"aquarelle-vivid",name:"Vivid",variantType:"VIVID",description:"",imageURL:"",deprecated:!0,deprecationMessage:'"aquarelle-vivid" is deprecated, use "aquarelle-v4-vivid" instead'}]},{referenceStyleID:"LANDSCAPE_V2",name:"Landscape",description:"Terrain map for data overlays and visualisations",variants:[{id:"landscape",name:"Default",variantType:"DEFAULT",description:"",imageURL:"",deprecated:!0,deprecationMessage:'"landscape" is deprecated, use "landscape-v4" instead'},{id:"landscape-dark",name:"Dark",variantType:"DARK",description:"",imageURL:"",deprecated:!0,deprecationMessage:'"landscape-dark" is deprecated, use "landscape-v4-dark" instead'},{id:"landscape-vivid",name:"Vivid",variantType:"VIVID",description:"",imageURL:"",deprecated:!0,deprecationMessage:'"landscape-vivid" is deprecated, use "landscape-v4-vivid" instead'}]},{referenceStyleID:"LANDSCAPE_V4",name:"Landscape",description:"Terrain map for data overlays and visualisations",variants:[{id:"landscape-v4",name:"Default",variantType:"DEFAULT",description:"",imageURL:""},{id:"landscape-v4-dark",name:"Dark",variantType:"DARK",description:"",imageURL:""},{id:"landscape-v4-vivid",name:"Vivid",variantType:"VIVID",description:"",imageURL:""}]},{referenceStyleID:"SATELLITE_V4",name:"Satellite",description:"",variants:[{id:"satellite-v4",name:"Default",variantType:"DEFAULT",description:"",imageURL:""},{id:"satellite-v4-dark",name:"Dark",variantType:"DARK",description:"",imageURL:""}]},{referenceStyleID:"DATAVIZ_V4",name:"Dataviz",description:"",variants:[{id:"dataviz-v4",name:"Default",variantType:"DEFAULT",description:"",imageURL:""},{id:"dataviz-v4-dark",name:"Dark",variantType:"DARK",description:"",imageURL:""},{id:"dataviz-v4-light",name:"Light",variantType:"LIGHT",description:"",imageURL:""}]},{referenceStyleID:"OUTDOOR_V4",name:"Outdoor",description:"",variants:[{id:"outdoor-v4",name:"Default",variantType:"DEFAULT",description:"",imageURL:""},{id:"outdoor-v4-dark",name:"Dark",variantType:"DARK",description:"",imageURL:""}]},{referenceStyleID:"BACKDROP_V4",name:"Backdrop",description:"",variants:[{id:"backdrop-v4",name:"Default",variantType:"DEFAULT",description:"",imageURL:""},{id:"backdrop-v4-dark",name:"Dark",variantType:"DARK",description:"",imageURL:""},{id:"backdrop-v4-light",name:"Light",variantType:"LIGHT",description:"",imageURL:""}]},{referenceStyleID:"AQUARELLE_V4",name:"Aquarelle",description:"Watercolor map for creative use",variants:[{id:"aquarelle-v4",name:"Default",variantType:"DEFAULT",description:"",imageURL:""},{id:"aquarelle-v4-dark",name:"Dark",variantType:"DARK",description:"",imageURL:""},{id:"aquarelle-v4-vivid",name:"Vivid",variantType:"VIVID",description:"",imageURL:""}]},{referenceStyleID:"OCEAN_V4",name:"Ocean",description:"",variants:[{id:"ocean-v4",name:"Default",variantType:"DEFAULT",description:"",imageURL:""},{id:"ocean-v4-dark",name:"Dark",variantType:"DARK",description:"",imageURL:""}]},{referenceStyleID:"TOPO_V4",name:"Topo",description:"",variants:[{id:"topo-v4",name:"Default",variantType:"DEFAULT",description:"",imageURL:""}
1,{id:"topo-v4-dark",name:"Dark",variantType:"DARK",description:"",imageURL:""},{id:"topo-v4-pastel",name:"Pastel",variantType:"PASTEL",description:"",imageURL:""},{id:"topo-v4-topographique",name:"Topographique",variantType:"TOPOGRAPHIQUE",description:"",imageURL:""}]}];function P(e){return e?"string"==typeof e||e instanceof String?e.trim().toLowerCase():e instanceof k?e.getId():e instanceof w?e.getDefaultVariant().getId():void 0:_[C[0].referenceStyleID].getDefaultVariant().getId()}Object.entries({STREETS:"STREETS_V4",BASIC:"BASIC_V2",BASE:"BASE_V4",LANDSCAPE:"LANDSCAPE_V4",AQUARELLE:"AQUARELLE_V4",SATELLITE:"SATELLITE_V4",WINTER:"WINTER_V4",HYBRID:"HYBRID_V4",OCEAN:"OCEAN_V4",OUTDOOR:"OUTDOOR_V4",TONER:"TONER_V2",TOPO:"TOPO_V4",OPENSTREETMAP:"OPENSTREETMAP_V2",DATAVIZ:"DATAVIZ_V4",BACKDROP:"BACKDROP_V4",VOYAGER:"VOYAGER_V2"}).forEach(([e,t])=>{C.find(t=>t.referenceStyleID===e)&&console.warn(`Default reference style ${e} already exists, it will be overwritten...`);let a=C.find(e=>e.referenceStyleID===t);if(!a)throw Error(`Versioned map style not found for reference style: ${t}`);let n={...a,referenceStyleID:e};C.push(n)});let _=function(){let e={};for(let t=0;t<C.length;t+=1){let a=C[t],n=function(e){return new Proxy(e,{get:(t,a,n)=>t.hasVariant(a)?t.getVariant(a):a.toString().toUpperCase()===a?e.getDefaultVariant():Reflect.get(t,a,n)})}(new w(a.name,a.referenceStyleID));for(let e=0;e<a.variants.length;e+=1){let t=a.variants[e],i=new k(t.name,t.variantType,t.id,n,t.description,t.imageURL,t.deprecated);n.addVariant(i)}e[a.referenceStyleID]=n}return e}(),x={extractLineStrings:function(e){let t=[];function a(e){("LineString"===e.type||"MultiLineString"===e.type)&&t.push(e)}function n(e){e.geometry&&a(e.geometry)}return"Feature"===e.type?n(e):"FeatureCollection"===e.type?!function e(t){for(let a of t.features)"Feature"===a.type?n(a):"FeatureCollection"===a.type&&e(a)}(e):a(e),t},simplify:function(e,t){var a;let n,i;return e.length<=2?e:(a=void 0!==t?t*t:1,n=e.length-1,i=[e[0]],!function e(t,a,n,i,r){let o=i,s;for(let e=a+1;e<n;e++){let i=function(e,t,a){let n=t[0],i=t[1],r=a[0]-n,o=a[1]-i;if(0!==r||0!==o){let t=((e[0]-n)*r+(e[1]-i)*o)/(r*r+o*o);t>1?(n=a[0],i=a[1]):t>0&&(n+=r*t,i+=o*t)}return(r=e[0]-n)*r+(o=e[1]-i)*o}(t[e],t[a],t[n]);i>o&&(s=e,o=i)}o>i&&(s-a>1&&e(t,a,s,i,r),r.push(t[s]),n-s>1&&e(t,s,n,i,r))}(e,0,n,a,i),i.push(e[n]),i)}};function N(e,t=!0){let a=`${e[0]},${e[1]}`;return 3===e.length&&t&&(a+=`,${e[2]}`),a}function O(e,t=3e3){let a=e.map(e=>e.join(",")).join("|"),n=5e-6;for(;a.length>t;)a=x.simplify(e,n).map(e=>`${e[0]},${e[1]}`).join("|"),n+=1e-5;return a}let V={centered:function(e,t,a={}){let n=P(a.style),i=a.hiDPI?"@2x":"",o=a.format??"png",s=~~(a.width??1024),l=~~(a.height??1024);a.hiDPI&&(s=~~(s/2),l=~~(l/2));let d=new URL(`maps/${encodeURIComponent(n)}/static/${e[0]},${e[1]},${t}/${s}x${l}${i}.${o}`,h.maptilerApiURL);if("attribution"in a&&d.searchParams.set("attribution",a.attribution.toString()),"markers"in a){let e="",t="markerIcon"in a;t&&(e+=`icon:${a.markerIcon}|`),t&&"markerAnchor"in a&&(e+=`anchor:${a.markerAnchor}|`),t&&a.hiDPI&&(e+="scale:2|"),e+=(Array.isArray(a.markers[0])?a.markers:[a.markers]).map(e=>N(e,!t)).join("|"),d.searchParams.set("markers",e)}if("path"in a){let e="";if(e+=`fill:${a.pathFillColor??"none"}|`,"pathStrokeColor"in a&&(e+=`stroke:${a.pathStrokeColor}|`),"pathWidth"in a){let t=a.pathWidth/(a.hiDPI?2:1);e+=`width:${t.toString()}|`}e+=O(a.path),d.searchParams.set("path",e)}return d.searchParams.set("key",a.apiKey??r.apiKey),d.toString()},bounded:function(e,t={}){let a=P(t.style),n=t.hiDPI?"@2x":"",i=t.format??"png",o=~~(t.width??1024),s=~~(t.height??1024);t.hiDPI&&(o=~~(o/2),s=~~(s/2));let l=new URL(`maps/${encodeURIComponent(a)}/static/${e[0]},${e[1]},${e[2]},${e[3]}/${o}x${s}${n}.${i}`,h.maptilerApiURL);if("attribution"in t&&l.searchParams.set("attribution",t.attribution.toString()),"padding"in t&&l.searchParams.set("padding",t.padding.toString()),"markers"in t){let e="",a="markerIcon"in t;a&&(e+=`icon:${t.markerIcon}|`),a&&"markerAnchor"in t&&(e+=`anchor:${t.markerAnchor}|`),a&&t.hiDPI&&(e+="scale:2|"),e+=(Array.isArray(t.markers[0])?t.markers:[t.markers]).map(e=>N(e,!a)).join("|"),l.searchParams.set("markers",e)}if("path"in t){let e="";if(e+=`fill:${t.pathFillColor??"none"}|`,"pathStrokeColor"in t&&(e+=`stroke:${t.pathStrokeColor}|`),"pathWidth"in t){let a=t.pathWidth/(t.hiDPI?2:1);e+=`width:${a.toString()}|`}e+=O(t.path),l.searchParams.set("path",e)}return l.searchParams.set("key",t.apiKey??r.apiKey),l.toString()},automatic:function(e={}){if(!("markers"in e)&&!("path"in e))throw Error("Automatic static maps require markers and/or path to be created.");let t=P(e.style),a=e.hiDPI?"@2x":"",n=e.format??"png",i=~~(e.width??1024),o=~~(e.height??1024);e.hiDPI&&(i=~~(i/2),o=~~(o/2));let s=new URL(`maps/${encodeURIComponent(t)}/static/auto/${i}x${o}${a}.${n}`,h.maptilerApiURL);if("attribution"in e&&s.searchParams.set("attribution",e.attribution.toString()),"padding"in e&&s.searchParams.set("padding",e.padding.toString()),"markers"in e){let t="",a="markerIcon"in e;a&&(t+=`icon:${e.markerIcon}|`),a&&"markerAnchor"in e&&(t+=`anchor:${e.markerAnchor}|`),a&&e.hiDPI&&(t+="scale:2|"),t+=(Array.isArray(e.markers[0])?e.markers:[e.markers]).map(e=>N(e,!a)).join("|"),s.searchParams.set("markers",t)}if("path"in e){let t="";if(t+=`fill:${e.pathFillColor??"none"}|`,"pathStrokeColor"in e&&(t+=`stroke:${e.pathStrokeColor}|`),"pathWidth"in e){let a=e.pathWidth/(e.hiDPI?2:1);t+=`width:${a.toString()}|`}t+=O(e.path),s.searchParams.set("path",t)}return s.searchParams.set("key",e.apiKey??r.apiKey),s.toString()}},z=2*Math.PI*6371008.8;function j(e){return(180+e)/360}function $(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+(e=Math.max(Math.min(e,85.0511287),-85.0511287))*Math.PI/360)))/360}function F(e){let t=G(e);return[j(t[0]),$(t[1])]}function B(e){return 360*e-180}function K(e){return 360/Math.PI*Math.atan(Math.exp((180-360*e)*Math.PI/180)
1)-90}function H(e,t){let a=Math.PI/180,n=e[1]*a,i=t[1]*a;return 6371008.8*Math.acos(Math.min(Math.sin(n)*Math.sin(i)+Math.cos(n)*Math.cos(i)*Math.cos((t[0]-e[0])*a),1))}function G(e){let t=e[0],a=e[1],n=((t+180)%360+360)%360-180;return[-180===n?180:n,a]}function W(e){return z*Math.cos(e*Math.PI/180)}function q(e,t,a=!0){let n=2**t,i=[e[0]*n,e[1]*n];return a?[~~i[0],~~i[1]]:i}function Z(e){return e*Math.PI/180}function J(e){return 180*e/Math.PI}let Q={EARTH_RADIUS:6371008.8,EARTH_CIRCUMFERENCE:z,longitudeToMercatorX:j,latitudeToMercatorY:$,wgs84ToMercator:F,mercatorXToLongitude:B,mercatorYToLatitude:K,mercatorToWgs84:function(e){return[B(e[0]),K(e[1])]},haversineDistanceWgs84:H,wrapWgs84:G,circumferenceAtLatitude:W,mercatorToTileIndex:q,wgs84ToTileIndex:function(e,t,a=!0){return q(F(e),t,a)},toRadians:Z,toDegrees:J,haversineIntermediateWgs84:function(e,t,a){let n=H(e,t),i=Z(e[0]),r=Z(e[1]),o=Z(t[0]),s=Z(t[1]),l=n/6371008.8,d=Math.sin((1-a)*l)/Math.sin(l),c=Math.sin(a*l)/Math.sin(l),p=d*Math.cos(r)*Math.cos(i)+c*Math.cos(s)*Math.cos(o),u=d*Math.cos(r)*Math.sin(i)+c*Math.cos(s)*Math.sin(o),m=Math.atan2(d*Math.sin(r)+c*Math.sin(s),Math.sqrt(p*p+u*u));return[J(Math.atan2(u,p)),J(m)]},haversineCumulatedDistanceWgs84:function(e){let t=Array(e.length);t[0]=0;let a=t.length;for(let n=1;n<a;n++)t[n]=H(e[n-1],e[n])+t[n-1];return t}},Y=null;function X(){return Y||(Y=new n({maxSize:r.tileCacheSize})),Y}async function ee(e){let t=new Blob([e]),a=await createImageBitmap(t),n=document.createElement("canvas"),i=n.getContext("2d");n.width=a.width,n.height=a.height,i.drawImage(a,0,0);let r=i.getImageData(0,0,n.width,n.height);return{pixels:r.data,width:n.width,height:n.height,components:r.data.length/(n.width*n.height)}}function et(){if(r.bufferToPixelData)return r.bufferToPixelData;if("u">typeof window)return ee;throw Error("An image file buffer to pixel data parser is necessary. Specify it in `config.bufferToPixelData`")}function ea(){return!!r.bufferToPixelData||"u">typeof window}let en=null,ei={403:"Key is missing, invalid or restricted"};async function er(e,t){e.length>1e3&&console.warn("Computing elevation for complex geometries is discouraged - simplify the geometry before proceeding");let a=Array.from({length:Math.ceil(e.length/50)},()=>null).map((a,n)=>{let i=50*n,r=e.slice(i,i+50).map(e=>e.join(",")).join(";"),o=new URL(`elevation/${r}.json`,h.maptilerApiURL);return o.searchParams.set("key",t),g(o.toString())}),n=await Promise.allSettled(a);return(await Promise.all(n.map(async e=>{if("rejected"===e.status)throw Error(`Some segments could not be fetched, error: ${e.reason}`);if(!e.value.ok)throw Error(`Some segments could not be fetched, response: ${e.value.status} ${await e.value.text()}, url: ${e.value.url}`);return e.value.json()}))).flat()}async function eo(e,t,a){if(!en){let e=new URL("tiles/terrain-rgb-v2/tiles.json",h.maptilerApiURL);e.searchParams.set("key",t);let a=e.toString(),n=await g(a);if(n.ok)en=await n.json();else throw new f(n,ei[n.status]??"")}let n=et(),i=en.tiles[0],r=X(),o=en.maxzoom,s=~~(a??o);(s>o||s<0)&&(s=o);let l=e.map(e=>Q.wgs84ToTileIndex(e,s,!1)),d=l.map(e=>[~~e[0],~~e[1]]).map(e=>`terrain_${s.toString()}_${e[0].toString()}_${e[1].toString()}`),c=Array.from(new Set(d.filter(e=>!r.has(e)))).map(e=>e.split("_").slice(1)),p=c.map(e=>i.replace("{x}",e[1].toString()).replace("{y}",e[2].toString()).replace("{z}",e[0].toString())).map(e=>g(e)),u=(await Promise.allSettled(p)).map(e=>"fulfilled"===e.status?e.value:null).filter(e=>e),m=u.filter(e=>!e.ok);if(u.length!==p.length)throw Error("Some tiles could not be fetched.");if(m.length)throw new f(m[0],ei[m[0].status]??"");let y=await Promise.all(u.map(e=>e.arrayBuffer()));if(!y.every(e=>e.byteLength>0))throw Error("Some tiles are not available.");return(await Promise.all(y.map(e=>n(e)))).forEach((e,t)=>{let a=c[t],n=`terrain_${a[0].toString()}_${a[1].toString()}_${a[2].toString()}`;r.set(n,e)}),e.map((e,t)=>{let a=d[t],n=l[t],i=r.get(a),o=Math.min(Math.round(i.width*(n[0]%1)),i.width-1),s=(Math.min(Math.round(i.height*(n[1]%1)),i.height-1)*i.width+o)*i.components,c=-1e4+(256*i.pixels[s]*256+256*i.pixels[s+1]+i.pixels[s+2])*.1;return[e[0],e[1],~~(1e3*c)/1e3]}
1)}async function es(e,t={}){if(0===e.length)return[];let a=t.apiKey??r.apiKey,n="client"===t.computeOn?await eo(e,a,t.zoom):await er(e,a);if(t.smoothingKernelSize){let e=2*~~(t.smoothingKernelSize/2)+1,a=n.map(e=>e[2]),i=~~(e/2);for(let t=i;t<a.length-i;t+=1){let r=0;for(let n=0;n<e;n+=1)r+=a[t-i+n];r/=e,n[t][2]=r}}return n}async function el(e,t={}){if("LineString"!==e.type)throw Error("The provided object is not a GeoJSON LineString");t.computeOn??(t.computeOn=ea()?"client":"server");let a=structuredClone(e),n=await es(a.coordinates,t);return a.coordinates=n,a}async function ed(e,t={}){if("MultiLineString"!==e.type)throw Error("The provided object is not a GeoJSON MultiLineString");t.computeOn??(t.computeOn=ea()?"client":"server");let a=structuredClone(e),n=a.coordinates.map(e=>e.length),i=a.coordinates.flat(),r=await es(i,t),o=[],s=0;for(let e of n)o.push(r.slice(s,s+e)),s+=e;return a.coordinates=o,a}let ec={at:async function(e,t={}){return(await es([e],t))[0]},batch:es,fromLineString:el,fromMultiLineString:ed}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.