@maptiler/geocoding-control 3.0.0-rc.4 → 3.0.0-rc.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +307 -307
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +25 -25
- package/dist/index.umd.js.map +1 -1
- package/dist/leaflet.public.js +314 -313
- package/dist/leaflet.public.js.map +1 -1
- package/dist/leaflet.public.umd.js +28 -28
- package/dist/leaflet.public.umd.js.map +1 -1
- package/dist/maplibregl.js +296 -295
- package/dist/maplibregl.js.map +1 -1
- package/dist/maplibregl.umd.js +26 -26
- package/dist/maplibregl.umd.js.map +1 -1
- package/dist/maptilersdk.js +310 -309
- package/dist/maptilersdk.js.map +1 -1
- package/dist/maptilersdk.umd.js +29 -29
- package/dist/maptilersdk.umd.js.map +1 -1
- package/dist/openlayers.public.js +343 -341
- package/dist/openlayers.public.js.map +1 -1
- package/dist/openlayers.public.umd.js +41 -41
- package/dist/openlayers.public.umd.js.map +1 -1
- package/dist/src/controls/leaflet-events.d.ts +55 -26
- package/dist/src/controls/leaflet-options.d.ts +11 -1
- package/dist/src/controls/maplibregl-events.d.ts +54 -25
- package/dist/src/controls/maplibregl-options.d.ts +12 -2
- package/dist/src/controls/maptilersdk-control.d.ts +11 -1
- package/dist/src/controls/maptilersdk-events.d.ts +72 -2
- package/dist/src/controls/openlayers-control.d.ts +4 -4
- package/dist/src/controls/openlayers-events.d.ts +55 -25
- package/dist/src/controls/openlayers-options.d.ts +11 -1
- package/dist/src/geocoder/geocoder-events.d.ts +41 -27
- package/dist/src/geocoder/geocoder-options.d.ts +1 -3
- package/dist/src/leaflet.public.d.ts +1 -1
- package/dist/src/maplibregl.d.ts +1 -1
- package/dist/src/maptilersdk.d.ts +1 -1
- package/dist/src/openlayers.public.d.ts +1 -1
- package/dist/src/types.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(d,U){typeof exports=="object"&&typeof module<"u"?U(exports):typeof define=="function"&&define.amd?define(["exports"],U):(d=typeof globalThis<"u"?globalThis:d||self,U(d.maptilerGeocoder={}))})(this,(function(d){"use strict";/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const U=globalThis,_e=U.ShadowRoot&&(U.ShadyCSS===void 0||U.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Le=Symbol(),Ve=new WeakMap;let qe=class{constructor(e,t,s){if(this._$cssResult$=!0,s!==Le)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(_e&&e===void 0){const s=t!==void 0&&t.length===1;s&&(e=Ve.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&Ve.set(t,e))}return e}toString(){return this.cssText}};const we=i=>new qe(typeof i=="string"?i:i+"",void 0,Le),D=(i,...e)=>{const t=i.length===1?i[0]:e.reduce(((s,r,o)=>s+(
|
|
5
|
+
*/const U=globalThis,_e=U.ShadowRoot&&(U.ShadyCSS===void 0||U.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Le=Symbol(),Ve=new WeakMap;let qe=class{constructor(e,t,s){if(this._$cssResult$=!0,s!==Le)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(_e&&e===void 0){const s=t!==void 0&&t.length===1;s&&(e=Ve.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&Ve.set(t,e))}return e}toString(){return this.cssText}};const we=i=>new qe(typeof i=="string"?i:i+"",void 0,Le),D=(i,...e)=>{const t=i.length===1?i[0]:e.reduce(((s,r,o)=>s+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal undefined, but take care to ensure page security.")})(r)+i[o+1]),i[0]);return new qe(t,i,Le)},Gt=(i,e)=>{if(_e)i.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const t of e){const s=document.createElement("style"),r=U.litNonce;r!==void 0&&s.setAttribute("nonce",r),s.textContent=t.cssText,i.appendChild(s)}},Ze=_e?i=>i:i=>i instanceof CSSStyleSheet?(e=>{let t="";for(const s of e.cssRules)t+=s.cssText;return we(t)})(i):i;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const{is:Ut,defineProperty:Pt,getOwnPropertyDescriptor:Wt,getOwnPropertyNames:Dt,getOwnPropertySymbols:Ft,getPrototypeOf:Rt}=Object,
|
|
9
|
+
*/const{is:Ut,defineProperty:Pt,getOwnPropertyDescriptor:Wt,getOwnPropertyNames:Dt,getOwnPropertySymbols:Ft,getPrototypeOf:Rt}=Object,de=globalThis,Ke=de.trustedTypes,Ht=Ke?Ke.emptyScript:"",Bt=de.reactiveElementPolyfillSupport,X=(i,e)=>i,ce={toAttribute(i,e){switch(e){case Boolean:i=i?Ht:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,e){let t=i;switch(e){case Boolean:t=i!==null;break;case Number:t=i===null?null:Number(i);break;case Object:case Array:try{t=JSON.parse(i)}catch{t=null}}return t}},Se=(i,e)=>!Ut(i,e),Qe={attribute:!0,type:String,converter:ce,reflect:!1,useDefault:!1,hasChanged:Se};Symbol.metadata??=Symbol("metadata"),de.litPropertyMetadata??=new WeakMap;let V=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Qe){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const s=Symbol(),r=this.getPropertyDescriptor(e,s,t);r!==void 0&&Pt(this.prototype,e,r)}}static getPropertyDescriptor(e,t,s){const{get:r,set:o}=Wt(this.prototype,e)??{get(){return this[t]},set(a){this[t]=a}};return{get:r,set(a){const n=r?.call(this);o?.call(this,a),this.requestUpdate(e,n,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Qe}static _$Ei(){if(this.hasOwnProperty(X("elementProperties")))return;const e=Rt(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(X("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(X("properties"))){const t=this.properties,s=[...Dt(t),...Ft(t)];for(const r of s)this.createProperty(r,t[r])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[s,r]of t)this.elementProperties.set(s,r)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const r=this._$Eu(t,s);r!==void 0&&this._$Eh.set(r,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const s=new Set(e.flat(1/0).reverse());for(const r of s)t.unshift(Ze(r))}else e!==void 0&&t.push(Ze(e));return t}static _$Eu(e,t){const s=t.attribute;return s===!1?void 0:typeof s=="string"?s:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const s of t.keys())this.hasOwnProperty(s)&&(e.set(s,this[s]),delete this[s]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Gt(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,s){this._$AK(e,s)}_$ET(e,t){const s=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,s);if(r!==void 0&&s.reflect===!0){const o=(s.converter?.toAttribute!==void 0?s.converter:ce).toAttribute(t,s.type);this._$Em=e,o==null?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}_$AK(e,t){const s=this.constructor,r=s._$Eh.get(e);if(r!==void 0&&this._$Em!==r){const o=s.getPropertyOptions(r),a=typeof o.converter=="function"?{fromAttribute:o.converter}:o.converter?.fromAttribute!==void 0?o.converter:ce;this._$Em=r;const n=a.fromAttribute(t,o.type);this[r]=n??this._$Ej?.get(r)??n,this._$Em=null}}requestUpdate(e,t,s){if(e!==void 0){const r=this.constructor,o=this[e];if(s??=r.getPropertyOptions(e),!((s.hasChanged??Se)(o,t)||s.useDefault&&s.reflect&&o===this._$Ej?.get(e)&&!this.hasAttribute(r._$Eu(e,s))))return;this.C(e,t,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:s,reflect:r,wrapped:o},a){s&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,a??t??this[e]),o!==!0||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||s||(t=void 0),this._$AL.set(e,t)),r===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[r,o]of this._$Ep)this[r]=o;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[r,o]of s){const{wrapped:a}=o,n=this[r];a!==!0||this._$AL.has(r)||n===void 0||this.C(r,void 0,o,n)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((s=>s.hostUpdate?.())),this.update(t)):this._$EM()}catch(s){throw e=!1,this._$EM(),s}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(e){}firstUpdated(e){}};V.elementStyles=[],V.shadowRootOptions={mode:"open"},V[X("elementProperties")]=new Map,V[X("finalized")]=new Map,Bt?.({ReactiveElement:V}),(de.reactiveElementVersions??=[]).push("2.1.1");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
13
|
*/const Me=globalThis,he=Me.trustedTypes,Je=he?he.createPolicy("lit-html",{createHTML:i=>i}):void 0,Xe="$lit$",P=`lit$${Math.random().toFixed(9).slice(2)}$`,Ye="?"+P,jt=`<${Ye}>`,F=document,Y=()=>F.createComment(""),ee=i=>i===null||typeof i!="object"&&typeof i!="function",Ae=Array.isArray,zt=i=>Ae(i)||typeof i?.[Symbol.iterator]=="function",xe=`[
|
|
14
14
|
\f\r]`,te=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,et=/-->/g,tt=/>/g,R=RegExp(`>|${xe}(?:([^\\s"'>=/]+)(${xe}*=${xe}*(?:[^
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),it=/'/g,st=/"/g,rt=/^(?:script|style|textarea|title)$/i,ot=i=>(e,...t)=>({_$litType$:i,strings:e,undefined:t}),S=ot(1),ue=ot(2),
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),it=/'/g,st=/"/g,rt=/^(?:script|style|textarea|title)$/i,ot=i=>(e,...t)=>({_$litType$:i,strings:e,undefined:t}),S=ot(1),ue=ot(2),G=Symbol.for("lit-noChange"),w=Symbol.for("lit-nothing"),at=new WeakMap,H=F.createTreeWalker(F,129);function nt(i,e){if(!Ae(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return Je!==void 0?Je.createHTML(e):e}const Vt=(i,e)=>{const t=i.length-1,s=[];let r,o=e===2?"<svg>":e===3?"<math>":"",a=te;for(let n=0;n<t;n++){const l=i[n];let v,g,c=-1,b=0;for(;b<l.length&&(a.lastIndex=b,g=a.exec(l),g!==null);)b=a.lastIndex,a===te?g[1]==="!--"?a=et:g[1]!==void 0?a=tt:g[2]!==void 0?(rt.test(g[2])&&(r=RegExp("</"+g[2],"g")),a=R):g[3]!==void 0&&(a=R):a===R?g[0]===">"?(a=r??te,c=-1):g[1]===void 0?c=-2:(c=a.lastIndex-g[2].length,v=g[1],a=g[3]===void 0?R:g[3]==='"'?st:it):a===st||a===it?a=R:a===et||a===tt?a=te:(a=R,r=void 0);const p=a===R&&i[n+1].startsWith("/>")?" ":"";o+=a===te?l+jt:c>=0?(s.push(v),l.slice(0,c)+Xe+l.slice(c)+P+p):l+P+(c===-2?n:p)}return[nt(i,o+(i[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),s]};class ie{constructor({strings:e,_$litType$:t},s){let r;this.parts=[];let o=0,a=0;const n=e.length-1,l=this.parts,[v,g]=Vt(e,t);if(this.el=ie.createElement(v,s),H.currentNode=this.el.content,t===2||t===3){const c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(r=H.nextNode())!==null&&l.length<n;){if(r.nodeType===1){if(r.hasAttributes())for(const c of r.getAttributeNames())if(c.endsWith(Xe)){const b=g[a++],p=r.getAttribute(c).split(P),y=/([.?@])?(.*)/.exec(b);l.push({type:1,index:o,name:y[2],strings:p,ctor:y[1]==="."?Zt:y[1]==="?"?Kt:y[1]==="@"?Qt:pe}),r.removeAttribute(c)}else c.startsWith(P)&&(l.push({type:6,index:o}),r.removeAttribute(c));if(rt.test(r.tagName)){const c=r.textContent.split(P),b=c.length-1;if(b>0){r.textContent=he?he.emptyScript:"";for(let p=0;p<b;p++)r.append(c[p],Y()),H.nextNode(),l.push({type:2,index:++o});r.append(c[b],Y())}}}else if(r.nodeType===8)if(r.data===Ye)l.push({type:2,index:o});else{let c=-1;for(;(c=r.data.indexOf(P,c+1))!==-1;)l.push({type:7,index:o}),c+=P.length-1}o++}}static createElement(e,t){const s=F.createElement("template");return s.innerHTML=e,s}}function q(i,e,t=i,s){if(e===G)return e;let r=s!==void 0?t._$Co?.[s]:t._$Cl;const o=ee(e)?void 0:e._$litDirective$;return r?.constructor!==o&&(r?._$AO?.(!1),o===void 0?r=void 0:(r=new o(i),r._$AT(i,t,s)),s!==void 0?(t._$Co??=[])[s]=r:t._$Cl=r),r!==void 0&&(e=q(i,r._$AS(i,e.undefined),r,s)),e}let qt=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:s}=this._$AD,r=(e?.creationScope??F).importNode(t,!0);H.currentNode=r;let o=H.nextNode(),a=0,n=0,l=s[0];for(;l!==void 0;){if(a===l.index){let v;l.type===2?v=new Z(o,o.nextSibling,this,e):l.type===1?v=new l.ctor(o,l.name,l.strings,this,e):l.type===6&&(v=new Jt(o,this,e)),this._$AV.push(v),l=s[++n]}a!==l?.index&&(o=H.nextNode(),a++)}return H.currentNode=F,r}p(e){let t=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(e,s,t),t+=s.strings.length-2):s._$AI(e[t])),t++}};class Z{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,s,r){this.type=2,this._$AH=w,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=s,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=q(this,e,t),ee(e)?e===w||e==null||e===""?(this._$AH!==w&&this._$AR(),this._$AH=w):e!==this._$AH&&e!==G&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):zt(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==w&&ee(this._$AH)?this._$AA.nextSibling.data=e:this.T(F.createTextNode(e)),this._$AH=e}$(e){const{undefined:t,_$litType$:s}=e,r=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=ie.createElement(nt(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===r)this._$AH.p(t);else{const o=new qt(r,this),a=o.u(this.options);o.p(t),this.T(a),this._$AH=o}}_$AC(e){let t=at.get(e.strings);return t===void 0&&at.set(e.strings,t=new ie(e)),t}k(e){Ae(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let s,r=0;for(const o of e)r===t.length?t.push(s=new Z(this.O(Y()),this.O(Y()),this,this.options)):s=t[r],s._$AI(o),r++;r<t.length&&(this._$AR(s&&s._$AB.nextSibling,r),t.length=r)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){const s=e.nextSibling;e.remove(),e=s}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}}class pe{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,s,r,o){this.type=1,this._$AH=w,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=o,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=w}_$AI(e,t=this,s,r){const o=this.strings;let a=!1;if(o===void 0)e=q(this,e,t,0),a=!ee(e)||e!==this._$AH&&e!==G,a&&(this._$AH=e);else{const n=e;let l,v;for(e=o[0],l=0;l<o.length-1;l++)v=q(this,n[s+l],t,l),v===G&&(v=this._$AH[l]),a||=!ee(v)||v!==this._$AH[l],v===w?e=w:e!==w&&(e+=(v??"")+o[l+1]),this._$AH[l]=v}a&&!r&&this.j(e)}j(e){e===w?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Zt extends pe{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===w?void 0:e}}class Kt extends pe{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==w)}}class Qt extends pe{constructor(e,t,s,r,o){super(e,t,s,r,o),this.type=5}_$AI(e,t=this){if((e=q(this,e,t,0)??w)===G)return;const s=this._$AH,r=e===w&&s!==w||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,o=e!==w&&(s===w||r);r&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class Jt{constructor(e,t,s){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(e){q(this,e)}}const Xt={I:Z},Yt=Me.litHtmlPolyfillSupport;Yt?.(ie,Z),(Me.litHtmlVersions??=[]).push("3.3.1");const ei=(i,e,t)=>{const s=t?.renderBefore??e;let r=s._$litPart$;if(r===void 0){const o=t?.renderBefore??null;s._$litPart$=r=new Z(e.insertBefore(Y(),o),o,void 0,t??{})}return r._$AI(i),r};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/const Ce=globalThis;let
|
|
19
|
+
*/const Ce=globalThis;let k=class extends V{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=ei(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return G}};k._$litElement$=!0,k.finalized=!0,Ce.litElementHydrateSupport?.({LitElement:k});const ti=Ce.litElementPolyfillSupport;ti?.({LitElement:k}),(Ce.litElementVersions??=[]).push("4.2.1");/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2017 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/const ii={attribute:!0,type:String,converter:
|
|
27
|
+
*/const ii={attribute:!0,type:String,converter:ce,reflect:!1,hasChanged:Se},si=(i=ii,e,t)=>{const{kind:s,metadata:r}=t;let o=globalThis.litPropertyMetadata.get(r);if(o===void 0&&globalThis.litPropertyMetadata.set(r,o=new Map),s==="setter"&&((i=Object.create(i)).wrapped=!0),o.set(t.name,i),s==="accessor"){const{name:a}=t;return{set(n){const l=e.get.call(this);e.set.call(this,n),this.requestUpdate(a,l,i)},init(n){return n!==void 0&&this.C(a,void 0,i,n),n}}}if(s==="setter"){const{name:a}=t;return function(n){const l=this[a];e.call(this,n),this.requestUpdate(a,l,i)}}throw Error("Unsupported decorator location: "+s)};function m(i){return(e,t)=>typeof t=="object"?si(i,e,t):((s,r,o)=>{const a=r.hasOwnProperty(o);return r.constructor.createProperty(o,s),a?Object.getOwnPropertyDescriptor(r,o):void 0})(i,e,t)}/**
|
|
28
28
|
* @license
|
|
29
29
|
* Copyright 2017 Google LLC
|
|
30
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -36,36 +36,36 @@
|
|
|
36
36
|
* @license
|
|
37
37
|
* Copyright 2017 Google LLC
|
|
38
38
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
39
|
-
*/function oi(i,e){return(t,s,r)=>{const o=
|
|
39
|
+
*/function oi(i,e){return(t,s,r)=>{const o=a=>a.renderRoot?.querySelector(i)??null;return ri(t,s,{get(){return o(this)}})}}var ai=Object.getOwnPropertyDescriptor,ni=(i,e,t,s)=>{for(var r=s>1?void 0:s?ai(e,t):e,o=i.length-1,a;o>=0;o--)(a=i[o])&&(r=a(r)||r);return r};d.MaptilerGeocodeClearIconElement=class extends k{render(){return ue`
|
|
40
40
|
<svg viewBox="0 0 14 14" width="13" height="13">
|
|
41
41
|
<path
|
|
42
42
|
d="M13.12.706a.982.982 0 0 0-1.391 0L6.907 5.517 2.087.696a.982.982 0 1 0-1.391 1.39l4.821 4.821L.696 11.73a.982.982 0 1 0 1.39 1.39l4.821-4.821 4.822 4.821a.982.982 0 1 0 1.39-1.39L8.298 6.908l4.821-4.822a.988.988 0 0 0 0-1.38Z"
|
|
43
43
|
/>
|
|
44
44
|
</svg>
|
|
45
|
-
`}},
|
|
45
|
+
`}},d.MaptilerGeocodeClearIconElement.styles=D`
|
|
46
46
|
svg {
|
|
47
47
|
display: block;
|
|
48
48
|
fill: var(--color-icon-button);
|
|
49
49
|
}
|
|
50
|
-
`,
|
|
50
|
+
`,d.MaptilerGeocodeClearIconElement=ni([B("maptiler-geocode-clear-icon")],d.MaptilerGeocodeClearIconElement);var li=Object.getOwnPropertyDescriptor,di=(i,e,t,s)=>{for(var r=s>1?void 0:s?li(e,t):e,o=i.length-1,a;o>=0;o--)(a=i[o])&&(r=a(r)||r);return r};d.MaptilerGeocodeFailIconElement=class extends k{render(){return ue`
|
|
51
51
|
<svg viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
52
52
|
<path
|
|
53
53
|
d="M15 0C6.705 0 0 6.705 0 15C0 23.295 6.705 30 15 30C23.295 30 30 23.295 30 15C30 6.705 23.295 0 15 0ZM22.5 20.385L20.385 22.5L15 17.115L9.615 22.5L7.5 20.385L12.885 15L7.5 9.615L9.615 7.5L15 12.885L20.385 7.5L22.5 9.615L17.115 15L22.5 20.385Z"
|
|
54
54
|
/>
|
|
55
55
|
</svg>
|
|
56
|
-
`}},
|
|
56
|
+
`}},d.MaptilerGeocodeFailIconElement.styles=D`
|
|
57
57
|
svg {
|
|
58
58
|
display: block;
|
|
59
59
|
fill: #e15042;
|
|
60
60
|
}
|
|
61
|
-
`,
|
|
61
|
+
`,d.MaptilerGeocodeFailIconElement=di([B("maptiler-geocode-fail-icon")],d.MaptilerGeocodeFailIconElement);var ci=Object.getOwnPropertyDescriptor,hi=(i,e,t,s)=>{for(var r=s>1?void 0:s?ci(e,t):e,o=i.length-1,a;o>=0;o--)(a=i[o])&&(r=a(r)||r);return r};d.MaptilerGeocodeLoadingIconElement=class extends k{render(){return S`
|
|
62
62
|
<div>
|
|
63
63
|
<svg viewBox="0 0 18 18" width="24" height="24" class="loading-icon">
|
|
64
64
|
<path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z" />
|
|
65
65
|
<path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z" />
|
|
66
66
|
</svg>
|
|
67
67
|
</div>
|
|
68
|
-
`}},
|
|
68
|
+
`}},d.MaptilerGeocodeLoadingIconElement.styles=D`
|
|
69
69
|
div {
|
|
70
70
|
position: absolute;
|
|
71
71
|
left: 50%;
|
|
@@ -91,18 +91,18 @@
|
|
|
91
91
|
transform: rotate(360deg);
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
-
`,
|
|
94
|
+
`,d.MaptilerGeocodeLoadingIconElement=hi([B("maptiler-geocode-loading-icon")],d.MaptilerGeocodeLoadingIconElement);var ui=Object.getOwnPropertyDescriptor,pi=(i,e,t,s)=>{for(var r=s>1?void 0:s?ui(e,t):e,o=i.length-1,a;o>=0;o--)(a=i[o])&&(r=a(r)||r);return r};d.MaptilerGeocodeReverseGeocodingIconElement=class extends k{render(){return ue`
|
|
95
95
|
<svg viewBox="0 0 60.006 21.412" width="14" height="20">
|
|
96
96
|
<path
|
|
97
97
|
d="M30.003-26.765C13.46-26.765 0-14.158 0 1.337c0 23.286 24.535 42.952 28.39 46.04.24.192.402.316.471.376.323.282.732.424 1.142.424.41 0 .82-.142 1.142-.424.068-.06.231-.183.471-.376 3.856-3.09 28.39-22.754 28.39-46.04 0-15.495-13.46-28.102-30.003-28.102Zm1.757 12.469c4.38 0 7.858 1.052 10.431 3.158 2.595 2.105 3.89 4.913 3.89 8.422 0 2.34-.53 4.362-1.593 6.063-1.063 1.702-3.086 3.616-6.063 5.742-2.042 1.51-3.337 2.659-3.89 3.446-.532.787-.8 1.82-.8 3.096v1.914h-8.449V15.18c0-2.041.434-3.815 1.306-5.325.872-1.51 2.467-3.118 4.785-4.82 2.233-1.594 3.7-2.89 4.402-3.889a5.582 5.582 0 0 0 1.087-3.35c0-1.382-.51-2.435-1.531-3.158-1.02-.723-2.45-1.087-4.28-1.087-3.19 0-6.826 1.047-10.91 3.131l-3.472-6.986c4.742-2.659 9.77-3.992 15.087-3.992Zm-1.88 37.324c1.765 0 3.124.472 4.08 1.408.98.936 1.47 2.276 1.47 4.02 0 1.68-.49 3.007-1.47 3.985-.977.957-2.336 1.435-4.08 1.435-1.787 0-3.171-.465-4.15-1.4-.978-.958-1.47-2.298-1.47-4.02 0-1.787.48-3.14 1.436-4.054.957-.915 2.355-1.374 4.184-1.374Z"
|
|
98
98
|
/>
|
|
99
99
|
</svg>
|
|
100
|
-
`}},
|
|
100
|
+
`}},d.MaptilerGeocodeReverseGeocodingIconElement.styles=D`
|
|
101
101
|
svg {
|
|
102
102
|
display: block;
|
|
103
103
|
fill: var(--color-icon-button);
|
|
104
104
|
}
|
|
105
|
-
`,
|
|
105
|
+
`,d.MaptilerGeocodeReverseGeocodingIconElement=pi([B("maptiler-geocode-reverse-geocoding-icon")],d.MaptilerGeocodeReverseGeocodingIconElement);var mi=Object.getOwnPropertyDescriptor,fi=(i,e,t,s)=>{for(var r=s>1?void 0:s?mi(e,t):e,o=i.length-1,a;o>=0;o--)(a=i[o])&&(r=a(r)||r);return r};d.MaptilerGeocodeSearchIconElement=class extends k{render(){return ue`
|
|
106
106
|
<svg
|
|
107
107
|
xmlns="http://www.w3.org/2000/svg"
|
|
108
108
|
width="13"
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
<circle cx="4.789" cy="4.787" r="3.85" />
|
|
113
113
|
<path d="M12.063 12.063 7.635 7.635" />
|
|
114
114
|
</svg>
|
|
115
|
-
`}},
|
|
115
|
+
`}},d.MaptilerGeocodeSearchIconElement.styles=D`
|
|
116
116
|
circle {
|
|
117
117
|
stroke-width: 1.875;
|
|
118
118
|
fill: none;
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
display: block;
|
|
128
128
|
stroke: var(--color-icon-button);
|
|
129
129
|
}
|
|
130
|
-
`,c.MaptilerGeocodeSearchIconElement=fi([B("maptiler-geocode-search-icon")],c.MaptilerGeocodeSearchIconElement);const gi=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(EAST|WEST|[EW])?$/i,lt=/^([+-]?[0-8]?[0-9])\s+([0-5]?[0-9]\.\d{3,})[\s,]{1,}([+-]?[0-1]?[0-9]?[0-9])\s+([0-5]?[0-9]\.\d{3,})$/,ct=/^(NORTH|SOUTH|[NS])?[\s]*([+-]?[0-8]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(NORTH|SOUTH|[NS])?[\s]*[,/;]?[\s]*(EAST|WEST|[EW])?[\s]*([+-]?[0-1]?[0-9]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(EAST|WEST|[EW])?$/i,dt=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(EAST|WEST|[EW])?$/i,ht=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)\s*(EAST|WEST|[EW])?$/i,ut=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|’’|´´|["″”\.])?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|´´|’’|["″”\.])?\s*(EAST|WEST|[EW])?$/i;function vi(i){if(!["DMS","DM","DD"].includes(i))throw new Error("invalid format specified");if(this.decimalCoordinates&&this.decimalCoordinates.trim()){const e=this.decimalCoordinates.split(",").map(g=>Number(g.trim())),t=Number(e[0]),s=Number(e[1]),r=Math.abs(t),o=Math.abs(s),n=t>0?"N":"S",a=s>0?"E":"W";let l;i=="DD"&&(l=`${r}° ${n}, ${o}° ${a}`);const p=Math.floor(r),b=Math.floor(o),d=(r-p)*60,v=(o-b)*60;if(i=="DM"){let g=pt(d,3).toFixed(3).padStart(6,"0"),y=pt(v,3).toFixed(3).padStart(6,"0");g.endsWith(".000")&&y.endsWith(".000")&&(g=g.replace(/\.000$/,""),y=y.replace(/\.000$/,"")),l=`${p}° ${g}' ${n}, ${b}° ${y}' ${a}`}if(i=="DMS"){const g=Math.floor(d),y=Math.floor(v);let L=((d-g)*60).toFixed(1).padStart(4,"0"),E=((v-y)*60).toFixed(1).padStart(4,"0");const x=g.toString().padStart(2,"0"),G=y.toString().padStart(2,"0");L.endsWith(".0")&&E.endsWith(".0")&&(L=L.replace(/\.0$/,""),E=E.replace(/\.0$/,"")),l=`${p}° ${x}' ${L}" ${n}, ${b}° ${G}' ${E}" ${a}`}return l}else throw new Error("no decimal coordinates to convert")}function pt(i,e){const t=Math.pow(10,e);return Math.round((i+Number.EPSILON)*t)/t}function Ie(i,e){e||(e=5),i=i.replace(/\s+/g," ").trim();let t=null,s=null,r="",o="",n=null,a=[],l=!1;if(gi.test(i))throw new Error("invalid coordinate value");if(lt.test(i))if(a=lt.exec(i),l=se(a),l)t=Math.abs(a[1])+a[2]/60,Number(a[1])<0&&(t*=-1),s=Math.abs(a[3])+a[4]/60,Number(a[3])<0&&(s*=-1),n="DM";else throw new Error("invalid coordinate format");else if(ct.test(i))if(a=ct.exec(i),l=se(a),l){if(t=a[2],s=a[6],t.includes(",")&&(t=t.replace(",",".")),s.includes(",")&&(s=s.replace(",",".")),n="DD",Number(Math.round(t))==Number(t))throw new Error("integer only coordinate provided");if(Number(Math.round(s))==Number(s))throw new Error("integer only coordinate provided");a[1]?(r=a[1],o=a[5]):a[4]&&(r=a[4],o=a[8])}else throw new Error("invalid decimal coordinate format");else if(dt.test(i))if(a=dt.exec(i),l=se(a),l)t=Math.abs(parseInt(a[2])),a[4]&&(t+=a[4]/60,n="DM"),a[6]&&(t+=a[6].replace(",",".")/3600,n="DMS"),parseInt(a[2])<0&&(t=-1*t),s=Math.abs(parseInt(a[9])),a[11]&&(s+=a[11]/60),a[13]&&(s+=a[13].replace(",",".")/3600),parseInt(a[9])<0&&(s=-1*s),a[1]?(r=a[1],o=a[8]):a[7]&&(r=a[7],o=a[14]);else throw new Error("invalid DMS coordinates format");else if(ht.test(i))if(a=ht.exec(i),l=se(a),l)t=Math.abs(parseInt(a[2])),a[4]&&(t+=a[4]/60,n="DM"),a[6]&&(t+=a[6]/3600,n="DMS"),parseInt(a[2])<0&&(t=-1*t),s=Math.abs(parseInt(a[10])),a[12]&&(s+=a[12]/60),a[14]&&(s+=a[14]/3600),parseInt(a[10])<0&&(s=-1*s),a[1]?(r=a[1],o=a[9]):a[8]&&(r=a[8],o=a[16]);else throw new Error("invalid DMS coordinates format");else if(ut.test(i)){if(a=ut.exec(i),l=se(a),a.filter(p=>p).length<=5)throw new Error("invalid coordinates format");if(l)t=Math.abs(parseInt(a[2])),a[4]&&(t+=a[4].replace(",",".")/60,n="DM"),a[6]&&(t+=a[6].replace(",",".")/3600,n="DMS"),parseInt(a[2])<0&&(t=-1*t),s=Math.abs(parseInt(a[10])),a[12]&&(s+=a[12].replace(",",".")/60),a[14]&&(s+=a[14].replace(",",".")/3600),parseInt(a[10])<0&&(s=-1*s),a[1]?(r=a[1],o=a[9]):a[8]&&(r=a[8],o=a[16]);else throw new Error("invalid coordinates format")}if(l){if(Math.abs(s)>=180)throw new Error("invalid longitude value");if(Math.abs(t)>=90)throw new Error("invalid latitude value");if(r&&!o||!r&&o)throw new Error("invalid coordinates value");if(r&&r==o)throw new Error("invalid coordinates format");t.toString().includes(",")&&(t=t.replace(",",".")),s.toString().includes(",")&&(s=s.replace(",","."));let p=/S|SOUTH/i;p.test(r)&&t>0&&(t=-1*t),p=/W|WEST/i,p.test(o)&&s>0&&(s=-1*s);const b=a[0].trim();let d,v;const g=/[,/;\u0020]/g,y=b.match(g);if(y==null){const x=Math.floor(i.length/2);d=b.substring(0,x).trim(),v=b.substring(x).trim()}else{let x;y.length%2==1?x=Math.floor(y.length/2):x=y.length/2-1;let G=0;if(x==0)G=b.indexOf(y[0]),d=b.substring(0,G).trim(),v=b.substring(G+1).trim();else{let ze=0,Ot=0;for(;ze<=x;)G=b.indexOf(y[ze],Ot),Ot=G+1,ze++;d=b.substring(0,G).trim(),v=b.substring(G+1).trim()}}const L=d.split(".");if(L.length==2&&L[1]==0&&L[1].length!=2)throw new Error("invalid coordinates format");const E=v.split(".");if(E.length==2&&E[1]==0&&E[1].length!=2)throw new Error("invalid coordinates format");if(/^\d+$/.test(d)||/^\d+$/.test(v))throw new Error("degree only coordinate/s provided");return t=Number(Number(t).toFixed(e)),s=Number(Number(s).toFixed(e)),Object.freeze({verbatimCoordinates:b,verbatimLatitude:d,verbatimLongitude:v,decimalLatitude:t,decimalLongitude:s,decimalCoordinates:`${t},${s}`,originalFormat:n,closeEnough:bi,toCoordinateFormat:vi})}else throw new Error("coordinates pattern match failed")}function se(i){if(!isNaN(i[0]))return!1;const e=[...i];if(e.shift(),e.length%2>0)return!1;const t=/^[-+]?\d+([\.,]\d+)?$/,s=/[eastsouthnorthwest]+/i,r=e.length/2;for(let o=0;o<r;o++){const n=e[o],a=e[o+r],l=t.test(n)&&t.test(a),p=s.test(n)&&s.test(a),b=n==a;if(!(n==null&&a==null)){if(n==null||a==null)return!1;if(l||p||b)continue;return!1}}return!0}function mt(i,e){const t=Math.abs(i-e);return Number(t.toFixed(6))<=1e-5}function bi(i){if(!i)throw new Error("coords must be provided");if(i.includes(",")){const e=i.split(",");if(Number(e[0])==NaN||Number(e[1])==NaN)throw new Error("coords are not valid decimals");return mt(this.decimalLatitude,Number(e[0]))&&mt(this.decimalLongitude,e[1])}else throw new Error("coords being tested must be separated by a comma")}const yi=Object.freeze({DMS:"DMS",DM:"DM",DD:"DD"});Ie.to=yi;const $i=[{verbatimCoordinates:"40.123, -74.123",verbatimLatitude:"40.123",verbatimLongitude:"-74.123"},{verbatimCoordinates:"40.123° N 74.123° W",verbatimLatitude:"40.123° N",verbatimLongitude:"74.123° W"},{verbatimCoordinates:"40.123° N 74.123° W",verbatimLatitude:"40.123° N",verbatimLongitude:"74.123° W"},{verbatimCoordinates:'40° 7´ 22.8" N 74° 7´ 22.8" W',verbatimLatitude:'40° 7´ 22.8" N',verbatimLongitude:'74° 7´ 22.8" W'},{verbatimCoordinates:"40° 7.38’ , -74° 7.38’",verbatimLatitude:"40° 7.38’",verbatimLongitude:"-74° 7.38’"},{verbatimCoordinates:"N40°7’22.8’’, W74°7’22.8’’",verbatimLatitude:"N40°7’22.8’’",verbatimLongitude:"W74°7’22.8’’"},{verbatimCoordinates:'40°7’22.8"N, 74°7’22.8"W',verbatimLatitude:'40°7’22.8"N',verbatimLongitude:'74°7’22.8"W'},{verbatimCoordinates:`40°7'22.8"N, 74°7'22.8"W`,verbatimLatitude:`40°7'22.8"N`,verbatimLongitude:`74°7'22.8"W`},{verbatimCoordinates:"40 7 22.8, -74 7 22.8",verbatimLatitude:"40 7 22.8",verbatimLongitude:"-74 7 22.8"},{verbatimCoordinates:"40.123 -74.123",verbatimLatitude:"40.123",verbatimLongitude:"-74.123"},{verbatimCoordinates:"40.123°,-74.123°",verbatimLatitude:"40.123°",verbatimLongitude:"-74.123°"},{verbatimCoordinates:"40.123N74.123W",verbatimLatitude:"40.123N",verbatimLongitude:"74.123W"},{verbatimCoordinates:"4007.38N7407.38W",verbatimLatitude:"4007.38N",verbatimLongitude:"7407.38W"},{verbatimCoordinates:'40°7’22.8"N, 74°7’22.8"W',verbatimLatitude:'40°7’22.8"N',verbatimLongitude:'74°7’22.8"W'},{verbatimCoordinates:"400722.8N740722.8W",verbatimLatitude:"400722.8N",verbatimLongitude:"740722.8W"},{verbatimCoordinates:"N 40 7.38 W 74 7.38",verbatimLatitude:"N 40 7.38",verbatimLongitude:"W 74 7.38"},{verbatimCoordinates:"40:7:22.8N 74:7:22.8W",verbatimLatitude:"40:7:22.8N",verbatimLongitude:"74:7:22.8W"},{verbatimCoordinates:"40:7:23N,74:7:23W",verbatimLatitude:"40:7:23N",verbatimLongitude:"74:7:23W",decimalLatitude:40.1230555555,decimalLongitude:-74.1230555555},{verbatimCoordinates:'40°7’23"N 74°7’23"W',verbatimLatitude:'40°7’23"N',verbatimLongitude:'74°7’23"W',decimalLatitude:40.1230555555,decimalLongitude:-74.12305555555555},{verbatimCoordinates:'40°7’23"S 74°7’23"E',verbatimLatitude:'40°7’23"S',verbatimLongitude:'74°7’23"E',decimalLatitude:-40.1230555555,decimalLongitude:74.12305555555555},{verbatimCoordinates:'40°7’23" -74°7’23"',verbatimLatitude:'40°7’23"',verbatimLongitude:'-74°7’23"',decimalLatitude:40.1230555555,decimalLongitude:-74.123055555},{verbatimCoordinates:'40d 7’ 23" N 74d 7’ 23" W',verbatimLatitude:'40d 7’ 23" N',verbatimLongitude:'74d 7’ 23" W',decimalLatitude:40.1230555555,decimalLongitude:-74.123055555},{verbatimCoordinates:"40.123N 74.123W",verbatimLatitude:"40.123N",verbatimLongitude:"74.123W"},{verbatimCoordinates:"40° 7.38, -74° 7.38",verbatimLatitude:"40° 7.38",verbatimLongitude:"-74° 7.38"},{verbatimCoordinates:"40° 7.38, -74° 7.38",verbatimLatitude:"40° 7.38",verbatimLongitude:"-74° 7.38"},{verbatimCoordinates:"40 7 22.8; -74 7 22.8",verbatimLatitude:"40 7 22.8",verbatimLongitude:"-74 7 22.8"}],Ei={decimalLatitude:40.123,decimalLongitude:-74.123},_i=[{verbatimCoordinates:`50°4'17.698"south, 14°24'2.826"east`,verbatimLatitude:`50°4'17.698"south`,verbatimLongitude:`14°24'2.826"east`,decimalLatitude:-50.07158277777778,decimalLongitude:14.400785},{verbatimCoordinates:"50d4m17.698S 14d24m2.826E",verbatimLatitude:"50d4m17.698S",verbatimLongitude:"14d24m2.826E",decimalLatitude:-50.07158277777778,decimalLongitude:14.400785},{verbatimCoordinates:"40:26:46N,79:56:55W",verbatimLatitude:"40:26:46N",verbatimLongitude:"79:56:55W",decimalLatitude:40.44611111111111,decimalLongitude:-79.9486111111111},{verbatimCoordinates:"40:26:46.302N 79:56:55.903W",verbatimLatitude:"40:26:46.302N",verbatimLongitude:"79:56:55.903W",decimalLatitude:40.446195,decimalLongitude:-79.94886194444445},{verbatimCoordinates:"40°26′47″N 79°58′36″W",verbatimLatitude:"40°26′47″N",verbatimLongitude:"79°58′36″W",decimalLatitude:40.44638888888889,decimalLongitude:-79.97666666666667},{verbatimCoordinates:"40d 26′ 47″ N 79d 58′ 36″ W",verbatimLatitude:"40d 26′ 47″ N",verbatimLongitude:"79d 58′ 36″ W",decimalLatitude:40.44638888888889,decimalLongitude:-79.97666666666667},{verbatimCoordinates:"40.446195N 79.948862W",verbatimLatitude:"40.446195N",verbatimLongitude:"79.948862W",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40,446195° 79,948862°",verbatimLatitude:"40,446195°",verbatimLongitude:"79,948862°",decimalLatitude:40.446195,decimalLongitude:79.948862},{verbatimCoordinates:"40° 26.7717, -79° 56.93172",verbatimLatitude:"40° 26.7717",verbatimLongitude:"-79° 56.93172",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40.446195, -79.948862",verbatimLatitude:"40.446195",verbatimLongitude:"-79.948862",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40.123256; -74.123256",verbatimLatitude:"40.123256",verbatimLongitude:"-74.123256",decimalLatitude:40.123256,decimalLongitude:-74.123256},{verbatimCoordinates:"18°24S 22°45E",verbatimLatitude:"18°24S",verbatimLongitude:"22°45E",decimalLatitude:-18.4,decimalLongitude:22.75}],Li=[{verbatimCoordinates:"10.432342S 10.6345345E",verbatimLatitude:"10.432342S",verbatimLongitude:"10.6345345E",decimalLatitude:-10.432342,decimalLongitude:10.6345345},{verbatimCoordinates:"10.00S 10.00E",verbatimLatitude:"10.00S",verbatimLongitude:"10.00E",decimalLatitude:-10,decimalLongitude:10},{verbatimCoordinates:"00.00S 01.00E",verbatimLatitude:"00.00S",verbatimLongitude:"01.00E",decimalLatitude:0,decimalLongitude:1},{verbatimCoordinates:"18.24S 22.45E",verbatimLatitude:"18.24S",verbatimLongitude:"22.45E",decimalLatitude:-18.4,decimalLongitude:22.75},{verbatimCoordinates:"27deg 15min 45.2sec S 18deg 32min 53.7sec E",verbatimLatitude:"27deg 15min 45.2sec S",verbatimLongitude:"18deg 32min 53.7sec E",decimalLatitude:-27.262555555555554,decimalLongitude:18.54825},{verbatimCoordinates:"-23.3245° S / 28.2344° E",verbatimLatitude:"-23.3245° S",verbatimLongitude:"28.2344° E",decimalLatitude:-23.3245,decimalLongitude:28.2344},{verbatimCoordinates:"40° 26.7717 -79° 56.93172",verbatimLatitude:"40° 26.7717",verbatimLongitude:"-79° 56.93172",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"27.15.45S 18.32.53E",verbatimLatitude:"27.15.45S",verbatimLongitude:"18.32.53E",decimalLatitude:-27.2625,decimalLongitude:18.548055},{verbatimCoordinates:"-27.15.45 18.32.53",verbatimLatitude:"-27.15.45",verbatimLongitude:"18.32.53",decimalLatitude:-27.2625,decimalLongitude:18.548055},{verbatimCoordinates:"27.15.45.2S 18.32.53.4E",verbatimLatitude:"27.15.45.2S",verbatimLongitude:"18.32.53.4E",decimalLatitude:-27.262556,decimalLongitude:18.548167},{verbatimCoordinates:"27.15.45,2S 18.32.53,4E",verbatimLatitude:"27.15.45,2S",verbatimLongitude:"18.32.53,4E",decimalLatitude:-27.262556,decimalLongitude:18.548167},{verbatimCoordinates:"S23.43563 ° E22.45634 °",verbatimLatitude:"S23.43563 °",verbatimLongitude:"E22.45634 °",decimalLatitude:-23.43563,decimalLongitude:22.45634},{verbatimCoordinates:"27,71372° S 23,07771° E",verbatimLatitude:"27,71372° S",verbatimLongitude:"23,07771° E",decimalLatitude:-27.71372,decimalLongitude:23.07771},{verbatimCoordinates:"27.45.34 S 23.23.23 E",verbatimLatitude:"27.45.34 S",verbatimLongitude:"23.23.23 E",decimalLatitude:-27.759444,decimalLongitude:23.38972222},{verbatimCoordinates:"S 27.45.34 E 23.23.23",verbatimLatitude:"S 27.45.34",verbatimLongitude:"E 23.23.23",decimalLatitude:-27.759444,decimalLongitude:23.38972222},{verbatimCoordinates:"53 16.3863,4 52.8171",verbatimLatitude:"53 16.3863",verbatimLongitude:"4 52.8171",decimalLatitude:53.273105,decimalLongitude:4.88029},{verbatimCoordinates:"50 8.2914,-5 2.4447",verbatimLatitude:"50 8.2914",verbatimLongitude:"-5 2.4447",decimalLatitude:50.13819,decimalLongitude:-5.040745},{verbatimCoordinates:"N 48° 30,6410', E 18° 57,4583'",verbatimLatitude:"N 48° 30,6410'",verbatimLongitude:"E 18° 57,4583'",decimalLatitude:48.51068,decimalLongitude:18.95764},{verbatimCoordinates:"1.23456, 18.33453",verbatimLatitude:"1.23456",verbatimLongitude:"18.33453",decimalLatitude:1.23456,decimalLongitude:18.33453}];function wi(){const i=[];return $i.forEach(e=>{e.decimalLatitude?i.push(e):i.push({...e,...Ei})}),[...i,..._i,...Li]}const Si=wi();Ie.formats=Si.map(i=>i.verbatimCoordinates);const Mi=Ie;/**
|
|
130
|
+
`,d.MaptilerGeocodeSearchIconElement=fi([B("maptiler-geocode-search-icon")],d.MaptilerGeocodeSearchIconElement);const gi=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(EAST|WEST|[EW])?$/i,lt=/^([+-]?[0-8]?[0-9])\s+([0-5]?[0-9]\.\d{3,})[\s,]{1,}([+-]?[0-1]?[0-9]?[0-9])\s+([0-5]?[0-9]\.\d{3,})$/,dt=/^(NORTH|SOUTH|[NS])?[\s]*([+-]?[0-8]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(NORTH|SOUTH|[NS])?[\s]*[,/;]?[\s]*(EAST|WEST|[EW])?[\s]*([+-]?[0-1]?[0-9]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(EAST|WEST|[EW])?$/i,ct=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(EAST|WEST|[EW])?$/i,ht=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)\s*(EAST|WEST|[EW])?$/i,ut=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|’’|´´|["″”\.])?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|´´|’’|["″”\.])?\s*(EAST|WEST|[EW])?$/i;function vi(i){if(!["DMS","DM","DD"].includes(i))throw new Error("invalid format specified");if(this.decimalCoordinates&&this.decimalCoordinates.trim()){const e=this.decimalCoordinates.split(",").map(p=>Number(p.trim())),t=Number(e[0]),s=Number(e[1]),r=Math.abs(t),o=Math.abs(s),a=t>0?"N":"S",n=s>0?"E":"W";let l;i=="DD"&&(l=`${r}° ${a}, ${o}° ${n}`);const v=Math.floor(r),g=Math.floor(o),c=(r-v)*60,b=(o-g)*60;if(i=="DM"){let p=pt(c,3).toFixed(3).padStart(6,"0"),y=pt(b,3).toFixed(3).padStart(6,"0");p.endsWith(".000")&&y.endsWith(".000")&&(p=p.replace(/\.000$/,""),y=y.replace(/\.000$/,"")),l=`${v}° ${p}' ${a}, ${g}° ${y}' ${n}`}if(i=="DMS"){const p=Math.floor(c),y=Math.floor(b);let L=((c-p)*60).toFixed(1).padStart(4,"0"),A=((b-y)*60).toFixed(1).padStart(4,"0");const E=p.toString().padStart(2,"0"),N=y.toString().padStart(2,"0");L.endsWith(".0")&&A.endsWith(".0")&&(L=L.replace(/\.0$/,""),A=A.replace(/\.0$/,"")),l=`${v}° ${E}' ${L}" ${a}, ${g}° ${N}' ${A}" ${n}`}return l}else throw new Error("no decimal coordinates to convert")}function pt(i,e){const t=Math.pow(10,e);return Math.round((i+Number.EPSILON)*t)/t}function Ie(i,e){e||(e=5),i=i.replace(/\s+/g," ").trim();let t=null,s=null,r="",o="",a=null,n=[],l=!1;if(gi.test(i))throw new Error("invalid coordinate value");if(lt.test(i))if(n=lt.exec(i),l=se(n),l)t=Math.abs(n[1])+n[2]/60,Number(n[1])<0&&(t*=-1),s=Math.abs(n[3])+n[4]/60,Number(n[3])<0&&(s*=-1),a="DM";else throw new Error("invalid coordinate format");else if(dt.test(i))if(n=dt.exec(i),l=se(n),l){if(t=n[2],s=n[6],t.includes(",")&&(t=t.replace(",",".")),s.includes(",")&&(s=s.replace(",",".")),a="DD",Number(Math.round(t))==Number(t))throw new Error("integer only coordinate provided");if(Number(Math.round(s))==Number(s))throw new Error("integer only coordinate provided");n[1]?(r=n[1],o=n[5]):n[4]&&(r=n[4],o=n[8])}else throw new Error("invalid decimal coordinate format");else if(ct.test(i))if(n=ct.exec(i),l=se(n),l)t=Math.abs(parseInt(n[2])),n[4]&&(t+=n[4]/60,a="DM"),n[6]&&(t+=n[6].replace(",",".")/3600,a="DMS"),parseInt(n[2])<0&&(t=-1*t),s=Math.abs(parseInt(n[9])),n[11]&&(s+=n[11]/60),n[13]&&(s+=n[13].replace(",",".")/3600),parseInt(n[9])<0&&(s=-1*s),n[1]?(r=n[1],o=n[8]):n[7]&&(r=n[7],o=n[14]);else throw new Error("invalid DMS coordinates format");else if(ht.test(i))if(n=ht.exec(i),l=se(n),l)t=Math.abs(parseInt(n[2])),n[4]&&(t+=n[4]/60,a="DM"),n[6]&&(t+=n[6]/3600,a="DMS"),parseInt(n[2])<0&&(t=-1*t),s=Math.abs(parseInt(n[10])),n[12]&&(s+=n[12]/60),n[14]&&(s+=n[14]/3600),parseInt(n[10])<0&&(s=-1*s),n[1]?(r=n[1],o=n[9]):n[8]&&(r=n[8],o=n[16]);else throw new Error("invalid DMS coordinates format");else if(ut.test(i)){if(n=ut.exec(i),l=se(n),n.filter(v=>v).length<=5)throw new Error("invalid coordinates format");if(l)t=Math.abs(parseInt(n[2])),n[4]&&(t+=n[4].replace(",",".")/60,a="DM"),n[6]&&(t+=n[6].replace(",",".")/3600,a="DMS"),parseInt(n[2])<0&&(t=-1*t),s=Math.abs(parseInt(n[10])),n[12]&&(s+=n[12].replace(",",".")/60),n[14]&&(s+=n[14].replace(",",".")/3600),parseInt(n[10])<0&&(s=-1*s),n[1]?(r=n[1],o=n[9]):n[8]&&(r=n[8],o=n[16]);else throw new Error("invalid coordinates format")}if(l){if(Math.abs(s)>=180)throw new Error("invalid longitude value");if(Math.abs(t)>=90)throw new Error("invalid latitude value");if(r&&!o||!r&&o)throw new Error("invalid coordinates value");if(r&&r==o)throw new Error("invalid coordinates format");t.toString().includes(",")&&(t=t.replace(",",".")),s.toString().includes(",")&&(s=s.replace(",","."));let v=/S|SOUTH/i;v.test(r)&&t>0&&(t=-1*t),v=/W|WEST/i,v.test(o)&&s>0&&(s=-1*s);const g=n[0].trim();let c,b;const p=/[,/;\u0020]/g,y=g.match(p);if(y==null){const E=Math.floor(i.length/2);c=g.substring(0,E).trim(),b=g.substring(E).trim()}else{let E;y.length%2==1?E=Math.floor(y.length/2):E=y.length/2-1;let N=0;if(E==0)N=g.indexOf(y[0]),c=g.substring(0,N).trim(),b=g.substring(N+1).trim();else{let ze=0,Ot=0;for(;ze<=E;)N=g.indexOf(y[ze],Ot),Ot=N+1,ze++;c=g.substring(0,N).trim(),b=g.substring(N+1).trim()}}const L=c.split(".");if(L.length==2&&L[1]==0&&L[1].length!=2)throw new Error("invalid coordinates format");const A=b.split(".");if(A.length==2&&A[1]==0&&A[1].length!=2)throw new Error("invalid coordinates format");if(/^\d+$/.test(c)||/^\d+$/.test(b))throw new Error("degree only coordinate/s provided");return t=Number(Number(t).toFixed(e)),s=Number(Number(s).toFixed(e)),Object.freeze({verbatimCoordinates:g,verbatimLatitude:c,verbatimLongitude:b,decimalLatitude:t,decimalLongitude:s,decimalCoordinates:`${t},${s}`,originalFormat:a,closeEnough:bi,toCoordinateFormat:vi})}else throw new Error("coordinates pattern match failed")}function se(i){if(!isNaN(i[0]))return!1;const e=[...i];if(e.shift(),e.length%2>0)return!1;const t=/^[-+]?\d+([\.,]\d+)?$/,s=/[eastsouthnorthwest]+/i,r=e.length/2;for(let o=0;o<r;o++){const a=e[o],n=e[o+r],l=t.test(a)&&t.test(n),v=s.test(a)&&s.test(n),g=a==n;if(!(a==null&&n==null)){if(a==null||n==null)return!1;if(l||v||g)continue;return!1}}return!0}function mt(i,e){const t=Math.abs(i-e);return Number(t.toFixed(6))<=1e-5}function bi(i){if(!i)throw new Error("coords must be provided");if(i.includes(",")){const e=i.split(",");if(Number(e[0])==NaN||Number(e[1])==NaN)throw new Error("coords are not valid decimals");return mt(this.decimalLatitude,Number(e[0]))&&mt(this.decimalLongitude,e[1])}else throw new Error("coords being tested must be separated by a comma")}const yi=Object.freeze({DMS:"DMS",DM:"DM",DD:"DD"});Ie.to=yi;const $i=[{verbatimCoordinates:"40.123, -74.123",verbatimLatitude:"40.123",verbatimLongitude:"-74.123"},{verbatimCoordinates:"40.123° N 74.123° W",verbatimLatitude:"40.123° N",verbatimLongitude:"74.123° W"},{verbatimCoordinates:"40.123° N 74.123° W",verbatimLatitude:"40.123° N",verbatimLongitude:"74.123° W"},{verbatimCoordinates:'40° 7´ 22.8" N 74° 7´ 22.8" W',verbatimLatitude:'40° 7´ 22.8" N',verbatimLongitude:'74° 7´ 22.8" W'},{verbatimCoordinates:"40° 7.38’ , -74° 7.38’",verbatimLatitude:"40° 7.38’",verbatimLongitude:"-74° 7.38’"},{verbatimCoordinates:"N40°7’22.8’’, W74°7’22.8’’",verbatimLatitude:"N40°7’22.8’’",verbatimLongitude:"W74°7’22.8’’"},{verbatimCoordinates:'40°7’22.8"N, 74°7’22.8"W',verbatimLatitude:'40°7’22.8"N',verbatimLongitude:'74°7’22.8"W'},{verbatimCoordinates:`40°7'22.8"N, 74°7'22.8"W`,verbatimLatitude:`40°7'22.8"N`,verbatimLongitude:`74°7'22.8"W`},{verbatimCoordinates:"40 7 22.8, -74 7 22.8",verbatimLatitude:"40 7 22.8",verbatimLongitude:"-74 7 22.8"},{verbatimCoordinates:"40.123 -74.123",verbatimLatitude:"40.123",verbatimLongitude:"-74.123"},{verbatimCoordinates:"40.123°,-74.123°",verbatimLatitude:"40.123°",verbatimLongitude:"-74.123°"},{verbatimCoordinates:"40.123N74.123W",verbatimLatitude:"40.123N",verbatimLongitude:"74.123W"},{verbatimCoordinates:"4007.38N7407.38W",verbatimLatitude:"4007.38N",verbatimLongitude:"7407.38W"},{verbatimCoordinates:'40°7’22.8"N, 74°7’22.8"W',verbatimLatitude:'40°7’22.8"N',verbatimLongitude:'74°7’22.8"W'},{verbatimCoordinates:"400722.8N740722.8W",verbatimLatitude:"400722.8N",verbatimLongitude:"740722.8W"},{verbatimCoordinates:"N 40 7.38 W 74 7.38",verbatimLatitude:"N 40 7.38",verbatimLongitude:"W 74 7.38"},{verbatimCoordinates:"40:7:22.8N 74:7:22.8W",verbatimLatitude:"40:7:22.8N",verbatimLongitude:"74:7:22.8W"},{verbatimCoordinates:"40:7:23N,74:7:23W",verbatimLatitude:"40:7:23N",verbatimLongitude:"74:7:23W",decimalLatitude:40.1230555555,decimalLongitude:-74.1230555555},{verbatimCoordinates:'40°7’23"N 74°7’23"W',verbatimLatitude:'40°7’23"N',verbatimLongitude:'74°7’23"W',decimalLatitude:40.1230555555,decimalLongitude:-74.12305555555555},{verbatimCoordinates:'40°7’23"S 74°7’23"E',verbatimLatitude:'40°7’23"S',verbatimLongitude:'74°7’23"E',decimalLatitude:-40.1230555555,decimalLongitude:74.12305555555555},{verbatimCoordinates:'40°7’23" -74°7’23"',verbatimLatitude:'40°7’23"',verbatimLongitude:'-74°7’23"',decimalLatitude:40.1230555555,decimalLongitude:-74.123055555},{verbatimCoordinates:'40d 7’ 23" N 74d 7’ 23" W',verbatimLatitude:'40d 7’ 23" N',verbatimLongitude:'74d 7’ 23" W',decimalLatitude:40.1230555555,decimalLongitude:-74.123055555},{verbatimCoordinates:"40.123N 74.123W",verbatimLatitude:"40.123N",verbatimLongitude:"74.123W"},{verbatimCoordinates:"40° 7.38, -74° 7.38",verbatimLatitude:"40° 7.38",verbatimLongitude:"-74° 7.38"},{verbatimCoordinates:"40° 7.38, -74° 7.38",verbatimLatitude:"40° 7.38",verbatimLongitude:"-74° 7.38"},{verbatimCoordinates:"40 7 22.8; -74 7 22.8",verbatimLatitude:"40 7 22.8",verbatimLongitude:"-74 7 22.8"}],Ei={decimalLatitude:40.123,decimalLongitude:-74.123},_i=[{verbatimCoordinates:`50°4'17.698"south, 14°24'2.826"east`,verbatimLatitude:`50°4'17.698"south`,verbatimLongitude:`14°24'2.826"east`,decimalLatitude:-50.07158277777778,decimalLongitude:14.400785},{verbatimCoordinates:"50d4m17.698S 14d24m2.826E",verbatimLatitude:"50d4m17.698S",verbatimLongitude:"14d24m2.826E",decimalLatitude:-50.07158277777778,decimalLongitude:14.400785},{verbatimCoordinates:"40:26:46N,79:56:55W",verbatimLatitude:"40:26:46N",verbatimLongitude:"79:56:55W",decimalLatitude:40.44611111111111,decimalLongitude:-79.9486111111111},{verbatimCoordinates:"40:26:46.302N 79:56:55.903W",verbatimLatitude:"40:26:46.302N",verbatimLongitude:"79:56:55.903W",decimalLatitude:40.446195,decimalLongitude:-79.94886194444445},{verbatimCoordinates:"40°26′47″N 79°58′36″W",verbatimLatitude:"40°26′47″N",verbatimLongitude:"79°58′36″W",decimalLatitude:40.44638888888889,decimalLongitude:-79.97666666666667},{verbatimCoordinates:"40d 26′ 47″ N 79d 58′ 36″ W",verbatimLatitude:"40d 26′ 47″ N",verbatimLongitude:"79d 58′ 36″ W",decimalLatitude:40.44638888888889,decimalLongitude:-79.97666666666667},{verbatimCoordinates:"40.446195N 79.948862W",verbatimLatitude:"40.446195N",verbatimLongitude:"79.948862W",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40,446195° 79,948862°",verbatimLatitude:"40,446195°",verbatimLongitude:"79,948862°",decimalLatitude:40.446195,decimalLongitude:79.948862},{verbatimCoordinates:"40° 26.7717, -79° 56.93172",verbatimLatitude:"40° 26.7717",verbatimLongitude:"-79° 56.93172",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40.446195, -79.948862",verbatimLatitude:"40.446195",verbatimLongitude:"-79.948862",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40.123256; -74.123256",verbatimLatitude:"40.123256",verbatimLongitude:"-74.123256",decimalLatitude:40.123256,decimalLongitude:-74.123256},{verbatimCoordinates:"18°24S 22°45E",verbatimLatitude:"18°24S",verbatimLongitude:"22°45E",decimalLatitude:-18.4,decimalLongitude:22.75}],Li=[{verbatimCoordinates:"10.432342S 10.6345345E",verbatimLatitude:"10.432342S",verbatimLongitude:"10.6345345E",decimalLatitude:-10.432342,decimalLongitude:10.6345345},{verbatimCoordinates:"10.00S 10.00E",verbatimLatitude:"10.00S",verbatimLongitude:"10.00E",decimalLatitude:-10,decimalLongitude:10},{verbatimCoordinates:"00.00S 01.00E",verbatimLatitude:"00.00S",verbatimLongitude:"01.00E",decimalLatitude:0,decimalLongitude:1},{verbatimCoordinates:"18.24S 22.45E",verbatimLatitude:"18.24S",verbatimLongitude:"22.45E",decimalLatitude:-18.4,decimalLongitude:22.75},{verbatimCoordinates:"27deg 15min 45.2sec S 18deg 32min 53.7sec E",verbatimLatitude:"27deg 15min 45.2sec S",verbatimLongitude:"18deg 32min 53.7sec E",decimalLatitude:-27.262555555555554,decimalLongitude:18.54825},{verbatimCoordinates:"-23.3245° S / 28.2344° E",verbatimLatitude:"-23.3245° S",verbatimLongitude:"28.2344° E",decimalLatitude:-23.3245,decimalLongitude:28.2344},{verbatimCoordinates:"40° 26.7717 -79° 56.93172",verbatimLatitude:"40° 26.7717",verbatimLongitude:"-79° 56.93172",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"27.15.45S 18.32.53E",verbatimLatitude:"27.15.45S",verbatimLongitude:"18.32.53E",decimalLatitude:-27.2625,decimalLongitude:18.548055},{verbatimCoordinates:"-27.15.45 18.32.53",verbatimLatitude:"-27.15.45",verbatimLongitude:"18.32.53",decimalLatitude:-27.2625,decimalLongitude:18.548055},{verbatimCoordinates:"27.15.45.2S 18.32.53.4E",verbatimLatitude:"27.15.45.2S",verbatimLongitude:"18.32.53.4E",decimalLatitude:-27.262556,decimalLongitude:18.548167},{verbatimCoordinates:"27.15.45,2S 18.32.53,4E",verbatimLatitude:"27.15.45,2S",verbatimLongitude:"18.32.53,4E",decimalLatitude:-27.262556,decimalLongitude:18.548167},{verbatimCoordinates:"S23.43563 ° E22.45634 °",verbatimLatitude:"S23.43563 °",verbatimLongitude:"E22.45634 °",decimalLatitude:-23.43563,decimalLongitude:22.45634},{verbatimCoordinates:"27,71372° S 23,07771° E",verbatimLatitude:"27,71372° S",verbatimLongitude:"23,07771° E",decimalLatitude:-27.71372,decimalLongitude:23.07771},{verbatimCoordinates:"27.45.34 S 23.23.23 E",verbatimLatitude:"27.45.34 S",verbatimLongitude:"23.23.23 E",decimalLatitude:-27.759444,decimalLongitude:23.38972222},{verbatimCoordinates:"S 27.45.34 E 23.23.23",verbatimLatitude:"S 27.45.34",verbatimLongitude:"E 23.23.23",decimalLatitude:-27.759444,decimalLongitude:23.38972222},{verbatimCoordinates:"53 16.3863,4 52.8171",verbatimLatitude:"53 16.3863",verbatimLongitude:"4 52.8171",decimalLatitude:53.273105,decimalLongitude:4.88029},{verbatimCoordinates:"50 8.2914,-5 2.4447",verbatimLatitude:"50 8.2914",verbatimLongitude:"-5 2.4447",decimalLatitude:50.13819,decimalLongitude:-5.040745},{verbatimCoordinates:"N 48° 30,6410', E 18° 57,4583'",verbatimLatitude:"N 48° 30,6410'",verbatimLongitude:"E 18° 57,4583'",decimalLatitude:48.51068,decimalLongitude:18.95764},{verbatimCoordinates:"1.23456, 18.33453",verbatimLatitude:"1.23456",verbatimLongitude:"18.33453",decimalLatitude:1.23456,decimalLongitude:18.33453}];function wi(){const i=[];return $i.forEach(e=>{e.decimalLatitude?i.push(e):i.push({...e,...Ei})}),[...i,..._i,...Li]}const Si=wi();Ie.formats=Si.map(i=>i.verbatimCoordinates);const Mi=Ie;/**
|
|
131
131
|
* @license
|
|
132
132
|
* Copyright 2017 Google LLC
|
|
133
133
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -135,19 +135,19 @@
|
|
|
135
135
|
* @license
|
|
136
136
|
* Copyright 2018 Google LLC
|
|
137
137
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
138
|
-
*/const me=Ne(class extends ke{constructor(i){if(super(i),i.type!==Te.ATTRIBUTE||i.name!=="class"||i.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(i){return" "+Object.keys(i).filter((e=>i[e])).join(" ")+" "}update(i,[e]){if(this.st===void 0){this.st=new Set,i.strings!==void 0&&(this.nt=new Set(i.strings.join(" ").split(/\s/).filter((s=>s!==""))));for(const s in e)e[s]&&!this.nt?.has(s)&&this.st.add(s);return this.render(e)}const t=i.element.classList;for(const s of this.st)s in e||(t.remove(s),this.st.delete(s));for(const s in e){const r=!!e[s];r===this.st.has(s)||this.nt?.has(s)||(r?(t.add(s),this.st.add(s)):(t.remove(s),this.st.delete(s)))}return
|
|
138
|
+
*/const me=Ne(class extends ke{constructor(i){if(super(i),i.type!==Te.ATTRIBUTE||i.name!=="class"||i.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(i){return" "+Object.keys(i).filter((e=>i[e])).join(" ")+" "}update(i,[e]){if(this.st===void 0){this.st=new Set,i.strings!==void 0&&(this.nt=new Set(i.strings.join(" ").split(/\s/).filter((s=>s!==""))));for(const s in e)e[s]&&!this.nt?.has(s)&&this.st.add(s);return this.render(e)}const t=i.element.classList;for(const s of this.st)s in e||(t.remove(s),this.st.delete(s));for(const s in e){const r=!!e[s];r===this.st.has(s)||this.nt?.has(s)||(r?(t.add(s),this.st.add(s)):(t.remove(s),this.st.delete(s)))}return G}});/**
|
|
139
139
|
* @license
|
|
140
140
|
* Copyright 2020 Google LLC
|
|
141
141
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
142
|
-
*/const{I:Ai}=Xt,ft=()=>document.createComment(""),re=(i,e,t)=>{const s=i._$AA.parentNode,r=e===void 0?i._$AB:e._$AA;if(t===void 0){const o=s.insertBefore(ft(),r),
|
|
142
|
+
*/const{I:Ai}=Xt,ft=()=>document.createComment(""),re=(i,e,t)=>{const s=i._$AA.parentNode,r=e===void 0?i._$AB:e._$AA;if(t===void 0){const o=s.insertBefore(ft(),r),a=s.insertBefore(ft(),r);t=new Ai(o,a,i,i.options)}else{const o=t._$AB.nextSibling,a=t._$AM,n=a!==i;if(n){let l;t._$AQ?.(i),t._$AM=i,t._$AP!==void 0&&(l=i._$AU)!==a._$AU&&t._$AP(l)}if(o!==r||n){let l=t._$AA;for(;l!==o;){const v=l.nextSibling;s.insertBefore(l,r),l=v}}}return t},j=(i,e,t=i)=>(i._$AI(e,t),i),xi={},Ci=(i,e=xi)=>i._$AH=e,Ii=i=>i._$AH,Oe=i=>{i._$AR(),i._$AA.remove()};/**
|
|
143
143
|
* @license
|
|
144
144
|
* Copyright 2017 Google LLC
|
|
145
145
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
146
|
-
*/const gt=(i,e,t)=>{const s=new Map;for(let r=e;r<=t;r++)s.set(i[r],r);return s},Ti=Ne(class extends ke{constructor(i){if(super(i),i.type!==Te.CHILD)throw Error("repeat() can only be used in text expressions")}dt(i,e,t){let s;t===void 0?t=e:e!==void 0&&(s=e);const r=[],o=[];let
|
|
146
|
+
*/const gt=(i,e,t)=>{const s=new Map;for(let r=e;r<=t;r++)s.set(i[r],r);return s},Ti=Ne(class extends ke{constructor(i){if(super(i),i.type!==Te.CHILD)throw Error("repeat() can only be used in text expressions")}dt(i,e,t){let s;t===void 0?t=e:e!==void 0&&(s=e);const r=[],o=[];let a=0;for(const n of i)r[a]=s?s(n,a):a,o[a]=t(n,a),a++;return{undefined:o,keys:r}}render(i,e,t){return this.dt(i,e,t).undefined}update(i,[e,t,s]){const r=Ii(i),{undefined:o,keys:a}=this.dt(e,t,s);if(!Array.isArray(r))return this.ut=a,o;const n=this.ut??=[],l=[];let v,g,c=0,b=r.length-1,p=0,y=o.length-1;for(;c<=b&&p<=y;)if(r[c]===null)c++;else if(r[b]===null)b--;else if(n[c]===a[p])l[p]=j(r[c],o[p]),c++,p++;else if(n[b]===a[y])l[y]=j(r[b],o[y]),b--,y--;else if(n[c]===a[y])l[y]=j(r[c],o[y]),re(i,l[y+1],r[c]),c++,y--;else if(n[b]===a[p])l[p]=j(r[b],o[p]),re(i,r[c],r[b]),b--,p++;else if(v===void 0&&(v=gt(a,p,y),g=gt(n,c,b)),v.has(n[c]))if(v.has(n[b])){const L=g.get(a[p]),A=L!==void 0?r[L]:null;if(A===null){const E=re(i,r[c]);j(E,o[p]),l[p]=E}else l[p]=j(A,o[p]),re(i,r[c],A),r[L]=null;p++}else Oe(r[b]),b--;else Oe(r[c]),c++;for(;p<=y;){const L=re(i,l[y+1]);j(L,o[p]),l[p++]=L}for(;c<=b;){const L=r[c++];L!==null&&Oe(L)}return this.ut=a,Ci(i,l),G}});function Ni(i,e,t){const s=e[1],r=e[0],o=s-r;return i===s&&t?i:((i-r)%o+o)%o+r}let oe;async function ki(i,e,t){for(const s of e??[])if(!(i&&(s.minZoom!=null&&s.minZoom>i[0]||s.maxZoom!=null&&s.maxZoom<i[0]))){if(s.type==="fixed")return s.coordinates.join(",");if(s.type==="client-geolocation")if(oe&&s.cachedLocationExpiry&&oe.time+s.cachedLocationExpiry>Date.now()){if(oe.coords)return oe.coords}else{let r;try{return r=await new Promise((o,a)=>{t.signal.addEventListener("abort",()=>{a(Error("aborted"))}),navigator.geolocation.getCurrentPosition(n=>{o([n.coords.longitude,n.coords.latitude].map(l=>l.toFixed(6)).join(","))},n=>{a(n)},s)}),r}catch{}finally{s.cachedLocationExpiry&&(oe={time:Date.now(),coords:r})}if(t.signal.aborted)return}if(s.type==="server-geolocation")return"ip";if(i&&s.type==="map-center")return i[1].toFixed(6)+","+i[2].toFixed(6)}}/**
|
|
147
147
|
* @license
|
|
148
148
|
* Copyright 2018 Google LLC
|
|
149
149
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
150
|
-
*/const vt="important",Oi=" !"+vt,Gi=Ne(class extends ke{constructor(i){if(super(i),i.type!==Te.ATTRIBUTE||i.name!=="style"||i.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(i){return Object.keys(i).reduce(((e,t)=>{const s=i[t];return s==null?e:e+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(i,[e]){const{style:t}=i.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(const s of this.ft)e[s]==null&&(this.ft.delete(s),s.includes("-")?t.removeProperty(s):t[s]=null);for(const s in e){const r=e[s];if(r!=null){this.ft.add(s);const o=typeof r=="string"&&r.endsWith(Oi);s.includes("-")||o?t.setProperty(s,o?r.slice(0,-11):r,o?vt:""):t[s]=r}}return
|
|
150
|
+
*/const vt="important",Oi=" !"+vt,Gi=Ne(class extends ke{constructor(i){if(super(i),i.type!==Te.ATTRIBUTE||i.name!=="style"||i.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(i){return Object.keys(i).reduce(((e,t)=>{const s=i[t];return s==null?e:e+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(i,[e]){const{style:t}=i.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(const s of this.ft)e[s]==null&&(this.ft.delete(s),s.includes("-")?t.removeProperty(s):t[s]=null);for(const s in e){const r=e[s];if(r!=null){this.ft.add(s);const o=typeof r=="string"&&r.endsWith(Oi);s.includes("-")||o?t.setProperty(s,o?r.slice(0,-11):r,o?vt:""):t[s]=r}}return G}}),Ui=".sprite-icon{align-self:center;justify-self:center;opacity:.75;background-repeat:no-repeat}li{text-align:left;cursor:default;display:grid;grid-template-columns:40px 1fr;color:var(--color-text);padding:8px 0;font-size:14px;line-height:18px;min-width:fit-content;outline:0}li:first-child{padding-top:10px}li:last-child{padding-bottom:10px}li.picked{background-color:#e7edff}li.picked .secondary{color:#96a4c7;padding-left:4px}li.picked .line2{color:#96a4c7}li.selected{background-color:#f3f6ff;animation:backAndForth 5s linear infinite}li.selected .primary{color:#2b8bfb}li.selected .secondary{color:#a2adc7;padding-left:4px}li.selected .line2{color:#a2adc7}li>img{align-self:center;justify-self:center;opacity:.75}.texts{padding:0 17px 0 0}.texts>*{white-space:nowrap;display:block;min-width:fit-content}.primary{font-weight:600}.secondary{color:#aeb6c7;padding-left:4px}.line2{color:#aeb6c7}@keyframes backAndForth{0%{transform:translate(0)}10%{transform:translate(0)}45%{transform:translate(calc(-100% + 270px))}55%{transform:translate(calc(-100% + 270px))}90%{transform:translate(0)}to{transform:translate(0)}}";var Pi=Object.defineProperty,Wi=Object.getOwnPropertyDescriptor,bt=i=>{throw TypeError(i)},O=(i,e,t,s)=>{for(var r=s>1?void 0:s?Wi(e,t):e,o=i.length-1,a;o>=0;o--)(a=i[o])&&(r=(s?a(e,t,r):a(r))||r);return s&&r&&Pi(e,t,r),r},yt=(i,e,t)=>e.has(i)||bt("Cannot "+t),_=(i,e,t)=>(yt(i,e,"read from private field"),t?t.call(i):e.get(i)),Di=(i,e,t)=>e.has(i)?bt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),K=(i,e,t)=>(yt(i,e,"access private method"),t),$,fe,ae,M,$t,Et,Ge,Ue;const _t=typeof devicePixelRatio>"u"||devicePixelRatio>1.25,Lt=_t?"@2x":"",Q=_t?2:1;let z,wt,T=class extends k{constructor(){super(...arguments),Di(this,$),this.itemStyle="default",this.showPlaceType="if-needed",this.missingIconsCache=new Set,this.iconsBaseUrl="",this.index=0}willUpdate(i){i.has("feature")&&_(this,$,fe)&&(this.index=_(this,$,fe).length,K(this,$,Ge).call(this))}render(){return S`
|
|
151
151
|
<li
|
|
152
152
|
tabindex="-1"
|
|
153
153
|
role="option"
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
</li>
|
|
177
177
|
`}};$=new WeakSet,fe=function(){return this.feature?.properties?.categories},ae=function(){return this.feature?.place_type[0]==="reverse"},M=function(){return this.feature?.properties?.categories?.join(", ")??this.feature?.place_type_name?.[0]??this.feature?.place_type[0]},$t=function(){wt??=fetch(`${this.iconsBaseUrl}sprite${Lt}.json`).then(i=>i.json()).then(i=>{z=i}).catch(()=>{z=null})},Et=function(){this.imageUrl&&this.missingIconsCache.add(this.imageUrl),K(this,$,Ge).call(this)},Ge=function(){z!==void 0?K(this,$,Ue).call(this):(K(this,$,$t).call(this),wt?.then(()=>{K(this,$,Ue).call(this)}))},Ue=function(){do{if(this.index--,this.category=_(this,$,fe)?.[this.index],this.spriteIcon=this.category?z?.icons[this.category]:void 0,this.spriteIcon)break;this.imageUrl=this.category?this.iconsBaseUrl+this.category.replace(/ /g,"_")+".svg":void 0}while(this.index>-1&&(!this.imageUrl||this.missingIconsCache.has(this.imageUrl)))},T.styles=D`
|
|
178
178
|
${we(Ui)}
|
|
179
|
-
`,
|
|
179
|
+
`,O([m({type:Object})],T.prototype,"feature",2),O([m({type:String})],T.prototype,"itemStyle",2),O([m({type:String})],T.prototype,"showPlaceType",2),O([m({attribute:!1})],T.prototype,"missingIconsCache",2),O([m({type:String})],T.prototype,"iconsBaseUrl",2),O([C()],T.prototype,"category",2),O([C()],T.prototype,"imageUrl",2),O([C()],T.prototype,"spriteIcon",2),O([C()],T.prototype,"index",2),T=O([B("maptiler-geocoder-feature-item")],T);const Fi="form{font-family:Open Sans,Ubuntu,Helvetica Neue,Arial,Helvetica,sans-serif;position:relative;background-color:#fff;z-index:10;border-radius:4px;margin:0;transition:max-width .25s;box-shadow:0 2px 5px #33335926;--color-text: #444952;--color-icon-button: #444952;pointer-events:all}form,form *,form *:after,form *:before{box-sizing:border-box}form.can-collapse{max-width:29px}form.can-collapse input::placeholder{transition:opacity .25s;opacity:0}form{width:270px;max-width:270px}form:focus-within,form:hover{width:270px;max-width:270px}form input::placeholder,form:focus-within input::placeholder,form:hover input::placeholder{opacity:1}input{font:inherit;font-size:14px;flex-grow:1;min-height:29px;background-color:transparent;color:#444952;white-space:nowrap;overflow:hidden;border:0;margin:0;padding:0}input:focus{color:#444952;outline:0;outline:none;box-shadow:none}ul,div.error,div.no-results{background-color:#fff;border-radius:4px;left:0;list-style:none;margin:0;padding:0;position:absolute;width:100%;top:calc(100% + 6px);overflow:hidden}ul{font-size:14px;line-height:16px;box-shadow:0 5px 10px #33335926}div.error,div.no-results{font:inherit;line-height:18px;font-size:12px;display:flex;gap:16px}div.error{padding:16px;font-weight:600;color:#e25041;background-color:#fbeae8}div.error div{flex-grow:1}div.error maptiler-geocode-fail-icon{flex-shrink:0;width:20px;height:20px}div.error button{flex-shrink:0}div.error button maptiler-geocode-clear-icon{--color-icon-button: #e25041}div.error button:hover maptiler-geocode-clear-icon,div.error button:active maptiler-geocode-clear-icon{--color-icon-button: inherit}div.no-results{padding:14px 24px 14px 16px;font-weight:400;color:#6b7c93;box-shadow:0 5px 10px #33335926}div.no-results maptiler-geocode-fail-icon{margin-top:4px;flex-shrink:0;width:20px;height:20px}ul.options.open-on-top{top:auto;bottom:calc(100% + 6px)}button{padding:0;margin:0;border:0;background-color:transparent;height:auto;width:auto}button:hover{background-color:transparent}button:hover,button:active{--color-icon-button: #2b8bfb}.input-group{display:flex;align-items:stretch;gap:7px;padding-inline:8px;border-radius:4px;overflow:hidden}.input-group:focus-within{outline:#2b8bfb solid 2px}.search-button{flex-shrink:0}.clear-button-container{display:flex;display:none;position:relative;align-items:stretch}.clear-button-container.displayable{display:flex;flex-shrink:0}:host(.maptiler-geocoder):not(:empty){box-shadow:none}:host(.maptiler-geocoder) .input-group{border:white solid 2px}:host(.maptiler-geocoder) .input-group:focus-within{border:#2b8bfb solid 2px;outline:0;outline:none}:host(.maptiler-geocoder) form.can-collapse{max-width:33px}:host(.maptiler-geocoder) form,:host(.maptiler-geocoder) form:focus-within,:host(.maptiler-geocoder) form:hover{width:270px;max-width:270px}:host(.leaflet-geocoder) .input-group{border:white solid 1px}:host(.leaflet-geocoder) form.can-collapse{max-width:30px}";var Ri=Object.defineProperty,Hi=Object.getOwnPropertyDescriptor,St=i=>{throw TypeError(i)},u=(i,e,t,s)=>{for(var r=s>1?void 0:s?Hi(e,t):e,o=i.length-1,a;o>=0;o--)(a=i[o])&&(r=(s?a(e,t,r):a(r))||r);return s&&r&&Ri(e,t,r),r},Pe=(i,e,t)=>e.has(i)||St("Cannot "+t),I=(i,e,t)=>(Pe(i,e,"read from private field"),t?t.call(i):e.get(i)),J=(i,e,t)=>e.has(i)?St("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),ge=(i,e,t,s)=>(Pe(i,e,"write to private field"),e.set(i,t),t),f=(i,e,t)=>(Pe(i,e,"access private method"),t),ve,be,ne,We,le,h,ye,Mt,At,De,x,Fe,$e,Re,He,W,Be,Ee,xt,je,Ct,It,Tt,Nt,kt;d.MaptilerGeocoderElement=class extends k{constructor(){super(...arguments),J(this,h),this.clearListOnPick=!1,this.clearOnBlur=!1,this.collapsed=!1,this.excludeTypes=!1,this.exhaustiveReverseGeocoding=!1,this.fetchFullGeometryOnPick=!1,this.keepListOpen=!1,this.openListOnTop=!1,this.reverseActive=!1,this.searchValue="",this.selectedItemIndex=-1,this.cachedFeatures=[],this.lastSearchUrl="",this.focused=!1,this.focusedDelayed=!1,J(this,ve,!1),J(this,be,!1),J(this,ne),J(this,We,new Set),J(this,le)}firstUpdated(){ge(this,ve,!0)}setOptions(e){const t={...e};for(const s of Object.keys(t))Bi.includes(s)||delete t[s];Object.assign(this,t)}setQuery(e){f(this,h,He).call(this,e,{external:!0}),f(this,h,Re).call(this)}submitQuery(e){f(this,h,Be).call(this,e)}clearList(){f(this,h,W).call(this),this.picked=void 0,this.selectedItemIndex=-1}focus(e){this.input.focus(e)}blur(){this.input.blur()}addEventListener(e,t,s){super.addEventListener(e,t,s)}removeEventListener(e,t,s){super.removeEventListener(e,t,s)}handleMapChange(e){ge(this,le,e)}handleMapClick(e){this.reverseActive&&f(this,h,xt).call(this,e)}willUpdate(e){e.has("error")&&this.error&&console.error("[MapTilerGeocodingControl] Error:",this.error),e.has("enableReverse")&&(this.reverseActive=this.enableReverse==="always"),["picked"].some(t=>e.has(t))&&this.picked&&(this.clearListOnPick&&f(this,h,W).call(this),this.selectedItemIndex=-1),["searchValue","minLength"].some(t=>e.has(t))&&I(this,h,De)&&(f(this,h,W).call(this),this.error=void 0),["focused"].some(t=>e.has(t))&&setTimeout(()=>{this.focusedDelayed=this.focused,this.clearOnBlur&&!this.focused&&(this.searchValue="")},100),["selectFirst","listFeatures","selectedItemIndex","picked"].some(t=>e.has(t))&&this.selectFirst!==!1&&this.listFeatures?.length&&this.selectedItemIndex==-1&&!this.picked&&(this.selectedItemIndex=0),["listFeatures","selectedItemIndex"].some(t=>e.has(t))&&f(this,h,x).call(this,"select",{feature:I(this,h,ye)}),["picked"].some(t=>e.has(t))&&this.picked&&this.picked.id!==e.get("picked")?.id&&(this.fetchFullGeometryOnPick&&!this.picked.address&&this.picked.geometry.type==="Point"&&this.picked.place_type[0]!=="reverse"?f(this,h,Ee).call(this,this.picked.id,{byId:!0}):Promise.resolve()).then(()=>{f(this,h,x).call(this,"pick",{feature:this.picked})},t=>{t&&typeof t=="object"&&"name"in t&&t.name==="AbortError"||(this.error=t,f(this,h,x).call(this,"pick",{feature:this.picked}))}),["listFeatures","focusedDelayed"].some(t=>e.has(t))&&(I(this,h,Mt)?(f(this,h,x).call(this,"featuresshow"),ge(this,be,!0)):I(this,be)&&f(this,h,x).call(this,"featureshide")),["reverseActive"].some(t=>e.has(t))&&f(this,h,x).call(this,"reversetoggle",{reverse:this.reverseActive})}render(){return S`
|
|
180
180
|
<form @submit=${f(this,h,Fe)} class=${me({"can-collapse":this.collapsed&&this.searchValue===""})}>
|
|
181
181
|
<div class="input-group">
|
|
182
182
|
<button
|
|
@@ -249,7 +249,7 @@
|
|
|
249
249
|
@mouseenter=${()=>{f(this,h,Tt).call(this,t)}}
|
|
250
250
|
@select=${()=>{f(this,h,It).call(this,e)}}
|
|
251
251
|
.missingIconsCache=${I(this,We)}
|
|
252
|
-
.iconsBaseUrl=${this.iconsBaseUrl??"https://cdn.maptiler.com/maptiler-geocoding-control/v3.0.0-rc.
|
|
252
|
+
.iconsBaseUrl=${this.iconsBaseUrl??"https://cdn.maptiler.com/maptiler-geocoding-control/v3.0.0-rc.6/icons/"}
|
|
253
253
|
>
|
|
254
254
|
${e.place_name}
|
|
255
255
|
</maptiler-geocoder-feature-item>
|
|
@@ -257,7 +257,7 @@
|
|
|
257
257
|
</ul>
|
|
258
258
|
`}
|
|
259
259
|
</form>
|
|
260
|
-
`}},ve=new WeakMap,be=new WeakMap,ne=new WeakMap,We=new WeakMap,le=new WeakMap,h=new WeakSet,ye=function(){return this.listFeatures?.[this.selectedItemIndex]},Mt=function(){return!!this.listFeatures?.length&&(this.focusedDelayed||this.keepListOpen)},At=function(){return this.abortController!==void 0},De=function(){return this.searchValue.length<(this.minLength??2)},
|
|
260
|
+
`}},ve=new WeakMap,be=new WeakMap,ne=new WeakMap,We=new WeakMap,le=new WeakMap,h=new WeakSet,ye=function(){return this.listFeatures?.[this.selectedItemIndex]},Mt=function(){return!!this.listFeatures?.length&&(this.focusedDelayed||this.keepListOpen)},At=function(){return this.abortController!==void 0},De=function(){return this.searchValue.length<(this.minLength??2)},x=function(i,...[e]){I(this,ve)&&this.dispatchEvent(new CustomEvent(i,{bubbles:!0,composed:!0,detail:e}))},Fe=function(i){i?.preventDefault(),this.focused=!1,clearTimeout(I(this,ne)),this.selectedItemIndex>-1&&this.listFeatures?(this.picked=this.listFeatures[this.selectedItemIndex],this.searchValue=this.picked.place_type[0]==="reverse"?this.picked.place_name:this.picked.place_name.replace(/,.*/,""),this.error=void 0,this.selectedItemIndex=-1):this.searchValue&&f(this,h,Ee).call(this,this.searchValue,{exact:!0,external:i===void 0}).then(()=>{this.picked=void 0}).catch(e=>this.error=e)},$e=function(i){try{return Mi(i,6)}catch{return!1}},Re=function(){setTimeout(()=>{this.input.focus(),this.focused=!0,this.input.select()})},He=function(i,{external:e=!1}={}){if(this.searchValue=i,f(this,h,x).call(this,"querychange",{query:this.searchValue,reverseCoords:f(this,h,$e).call(this,i)}),this.error=void 0,this.picked=void 0,this.showResultsWhileTyping!==!1){if(clearTimeout(I(this,ne)),I(this,h,De))return;const t=this.searchValue;ge(this,ne,window.setTimeout(()=>{f(this,h,Ee).call(this,t,{external:e}).catch(s=>this.error=s)},this.debounceSearch??200))}else f(this,h,W).call(this)},W=function(){this.listFeatures!==void 0&&(this.listFeatures=void 0,f(this,h,x).call(this,"featuresclear"))},Be=function(i){this.searchValue=i,f(this,h,x).call(this,"querychange",{query:this.searchValue,reverseCoords:f(this,h,$e).call(this,i)}),this.selectedItemIndex=-1,f(this,h,Fe).call(this)},Ee=async function(i,{byId:e=!1,exact:t=!1,external:s=!1}={}){this.error=void 0,this.abortController?.abort();const r=new AbortController;this.abortController=r;try{const o=this.apiUrl??"https://api.maptiler.com/geocoding",a=f(this,h,$e).call(this,i),n=new URL(o+"/"+encodeURIComponent(a?`${a.decimalLongitude},${a.decimalLatitude}`:i)+".json"),l=n.searchParams;this.language!==void 0&&l.set("language",Array.isArray(this.language)?this.language.join(","):this.language??"");const[v]=I(this,le)??[void 0];let g=(!a||this.reverseGeocodingTypes===void 0?this.types:this.reverseGeocodingTypes)?.map(E=>typeof E=="string"?E:v===void 0||(E[0]??0)<=v&&v<(E[1]??1/0)?E[2]:void 0).filter(E=>E!==void 0);g&&(g=[...new Set(g)],l.set("types",g.join(",")));const c=!a||this.reverseGeocodingExcludeTypes===void 0?this.excludeTypes:this.reverseGeocodingExcludeTypes;if(c&&l.set("excludeTypes",String(c)),this.bbox&&l.set("bbox",this.bbox.map(E=>E.toFixed(6)).join(",")),this.country&&l.set("country",Array.isArray(this.country)?this.country.join(","):this.country),this.worldview&&l.set("worldview",this.worldview),!e&&!a){const E=this.proximity??[{type:"server-geolocation"}],N=await ki(I(this,le),E,r);N&&l.set("proximity",N),(t||this.showResultsWhileTyping===!1)&&l.set("autocomplete","false"),l.set("fuzzyMatch",String(this.fuzzyMatch!==!1))}const b=this.limit??5,p=this.reverseGeocodingLimit??b;p>1&&g?.length!==1&&console.warn("[MapTilerGeocodingControl] Warning: For reverse geocoding when limit > 1 then types must contain single value."),a?(p===1||this.exhaustiveReverseGeocoding||g?.length===1)&&l.set("limit",String(p)):l.set("limit",String(b)),this.apiKey&&l.set("key",this.apiKey),this.adjustUrl?.(n);const y=n.searchParams.get("types")===""&&n.searchParams.get("excludeTypes")!=="true",L=n.toString();if(L===this.lastSearchUrl){e?(this.clearListOnPick&&f(this,h,W).call(this),this.picked=this.cachedFeatures[0]):(this.listFeatures=this.cachedFeatures,f(this,h,x).call(this,"featureslisted",{features:this.listFeatures,external:s}),this.listFeatures[this.selectedItemIndex]?.id!==I(this,h,ye)?.id&&(this.selectedItemIndex=-1));return}f(this,h,x).call(this,"request",{urlObj:n}),this.lastSearchUrl=L;let A;if(y)A={type:"FeatureCollection",features:[]};else{const E=await fetch(L,{signal:r.signal,...this.fetchParameters});if(!E.ok)throw new Error(await E.text());A=await E.json()}f(this,h,x).call(this,"response",{url:L,featureCollection:A}),e?(this.clearListOnPick&&f(this,h,W).call(this),this.picked=A.features[0],this.cachedFeatures=[this.picked]):(this.listFeatures=A.features.filter(this.filter??(()=>!0)),a&&this.listFeatures.unshift({type:"Feature",properties:{},id:`reverse_${a.decimalLongitude}_${a.decimalLatitude}`,text:`${a.decimalLatitude}, ${a.decimalLongitude}`,place_name:a.toCoordinateFormat("DMS"),place_type:["reverse"],place_type_name:["reverse"],center:[a.decimalLongitude,a.decimalLatitude],bbox:[a.decimalLongitude,a.decimalLatitude,a.decimalLongitude,a.decimalLatitude],geometry:{type:"Point",coordinates:[a.decimalLongitude,a.decimalLatitude]}}),f(this,h,x).call(this,"featureslisted",{features:this.listFeatures,external:s}),this.cachedFeatures=this.listFeatures,this.listFeatures[this.selectedItemIndex]?.id!==I(this,h,ye)?.id&&(this.selectedItemIndex=-1),a&&this.input.focus())}catch(o){if(o&&typeof o=="object"&&"name"in o&&o.name==="AbortError")return;throw o}finally{r===this.abortController&&(this.abortController=void 0)}},xt=function(i){this.reverseActive=this.enableReverse==="always",f(this,h,W).call(this),this.picked=void 0,f(this,h,Be).call(this,`${i[1].toFixed(6)}, ${Ni(i[0],[-180,180],!0).toFixed(6)}`),f(this,h,Re).call(this)},je=function(i){if(!this.listFeatures)return;const e=i.key==="ArrowDown"?1:i.key==="ArrowUp"?-1:0;e&&(this.input.focus(),this.focused=!0,i.preventDefault(),this.picked&&this.selectedItemIndex===-1&&(this.selectedItemIndex=this.listFeatures.findIndex(t=>t.id===this.picked?.id)),this.selectedItemIndex===(this.picked||this.selectFirst!==!1?0:-1)&&e===-1&&(this.selectedItemIndex=this.listFeatures.length),this.selectedItemIndex+=e,this.selectedItemIndex>=this.listFeatures.length&&(this.selectedItemIndex=-1),this.selectedItemIndex<0&&(this.picked||this.selectFirst!==!1)&&(this.selectedItemIndex=0))},Ct=function(i){f(this,h,He).call(this,i.target.value)},It=function(i){(!this.picked||this.picked.id!==i.id)&&(this.picked=i,this.searchValue=i.place_name)},Tt=function(i){this.selectedItemIndex=i},Nt=function(){(!this.selectFirst||this.picked)&&(this.selectedItemIndex=-1)},kt=function(){this.searchValue="",f(this,h,x).call(this,"queryclear"),this.picked=void 0,this.input.focus()},d.MaptilerGeocoderElement.styles=D`
|
|
261
261
|
${we(Fi)}
|
|
262
|
-
`,u([m({attribute:!1})],
|
|
262
|
+
`,u([m({attribute:!1})],d.MaptilerGeocoderElement.prototype,"adjustUrl",2),u([m({type:String})],d.MaptilerGeocoderElement.prototype,"apiKey",2),u([m({type:String})],d.MaptilerGeocoderElement.prototype,"apiUrl",2),u([m({type:Array})],d.MaptilerGeocoderElement.prototype,"bbox",2),u([m({type:String})],d.MaptilerGeocoderElement.prototype,"clearButtonTitle",2),u([m({type:Boolean})],d.MaptilerGeocoderElement.prototype,"clearListOnPick",2),u([m({type:Boolean})],d.MaptilerGeocoderElement.prototype,"clearOnBlur",2),u([m({type:Boolean})],d.MaptilerGeocoderElement.prototype,"collapsed",2),u([m({attribute:!1})],d.MaptilerGeocoderElement.prototype,"country",2),u([m({type:Number})],d.MaptilerGeocoderElement.prototype,"debounceSearch",2),u([m({type:String})],d.MaptilerGeocoderElement.prototype,"enableReverse",2),u([m({type:String})],d.MaptilerGeocoderElement.prototype,"errorMessage",2),u([m({type:Boolean})],d.MaptilerGeocoderElement.prototype,"excludeTypes",2),u([m({type:Boolean})],d.MaptilerGeocoderElement.prototype,"exhaustiveReverseGeocoding",2),u([m({type:Boolean})],d.MaptilerGeocoderElement.prototype,"fetchFullGeometryOnPick",2),u([m({type:Object})],d.MaptilerGeocoderElement.prototype,"fetchParameters",2),u([m({attribute:!1})],d.MaptilerGeocoderElement.prototype,"filter",2),u([m({type:Object})],d.MaptilerGeocoderElement.prototype,"fuzzyMatch",2),u([m({type:String})],d.MaptilerGeocoderElement.prototype,"iconsBaseUrl",2),u([m({type:Boolean})],d.MaptilerGeocoderElement.prototype,"keepListOpen",2),u([m({attribute:!1})],d.MaptilerGeocoderElement.prototype,"language",2),u([m({type:Number})],d.MaptilerGeocoderElement.prototype,"limit",2),u([m({type:Number})],d.MaptilerGeocoderElement.prototype,"minLength",2),u([m({type:String})],d.MaptilerGeocoderElement.prototype,"noResultsMessage",2),u([m({type:Boolean})],d.MaptilerGeocoderElement.prototype,"openListOnTop",2),u([m({type:String})],d.MaptilerGeocoderElement.prototype,"placeholder",2),u([m({type:Array})],d.MaptilerGeocoderElement.prototype,"proximity",2),u([m({type:Boolean})],d.MaptilerGeocoderElement.prototype,"reverseActive",2),u([m({type:String})],d.MaptilerGeocoderElement.prototype,"reverseButtonTitle",2),u([m({type:Object})],d.MaptilerGeocoderElement.prototype,"reverseGeocodingExcludeTypes",2),u([m({type:Number})],d.MaptilerGeocoderElement.prototype,"reverseGeocodingLimit",2),u([m({type:Array})],d.MaptilerGeocoderElement.prototype,"reverseGeocodingTypes",2),u([m({type:Object})],d.MaptilerGeocoderElement.prototype,"selectFirst",2),u([m({type:String})],d.MaptilerGeocoderElement.prototype,"showPlaceType",2),u([m({type:Object})],d.MaptilerGeocoderElement.prototype,"showResultsWhileTyping",2),u([m({type:Array})],d.MaptilerGeocoderElement.prototype,"types",2),u([m({type:String})],d.MaptilerGeocoderElement.prototype,"worldview",2),u([oi("input")],d.MaptilerGeocoderElement.prototype,"input",2),u([C()],d.MaptilerGeocoderElement.prototype,"searchValue",2),u([C()],d.MaptilerGeocoderElement.prototype,"listFeatures",2),u([C()],d.MaptilerGeocoderElement.prototype,"selectedItemIndex",2),u([C()],d.MaptilerGeocoderElement.prototype,"picked",2),u([C()],d.MaptilerGeocoderElement.prototype,"cachedFeatures",2),u([C()],d.MaptilerGeocoderElement.prototype,"lastSearchUrl",2),u([C()],d.MaptilerGeocoderElement.prototype,"error",2),u([C()],d.MaptilerGeocoderElement.prototype,"abortController",2),u([C()],d.MaptilerGeocoderElement.prototype,"focused",2),u([C()],d.MaptilerGeocoderElement.prototype,"focusedDelayed",2),d.MaptilerGeocoderElement=u([B("maptiler-geocoder")],d.MaptilerGeocoderElement);const Bi=["adjustUrl","apiKey","apiUrl","bbox","clearButtonTitle","clearListOnPick","clearOnBlur","collapsed","country","debounceSearch","enableReverse","errorMessage","excludeTypes","reverseGeocodingExcludeTypes","exhaustiveReverseGeocoding","fetchParameters","fetchFullGeometryOnPick","filter","fuzzyMatch","iconsBaseUrl","keepListOpen","language","limit","reverseGeocodingLimit","minLength","noResultsMessage","openListOnTop","placeholder","proximity","reverseActive","reverseButtonTitle","selectFirst","showPlaceType","showResultsWhileTyping","types","reverseGeocodingTypes","worldview"];Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})}));
|
|
263
263
|
//# sourceMappingURL=index.umd.js.map
|