UNPKG

cern-map-overlay

Version:

A web component for CERN map overlay built with Vite

840 lines 377 kB
var CERNMapOverlay=function(bt){var ao;"use strict";/**
 * @license
 * Copyright 2019 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const Zn=globalThis,bs=Zn.ShadowRoot&&(Zn.ShadyCSS===void 0||Zn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Lr=Symbol(),Cr=new WeakMap;let Jo=class{constructor(e,s,r){if(this._$cssResult$=!0,r!==Lr)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=s}get styleSheet(){let e=this.o;const s=this.t;if(bs&&e===void 0){const r=s!==void 0&&s.length===1;r&&(e=Cr.get(s)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&Cr.set(s,e))}return e}toString(){return this.cssText}};const Xo=i=>new Jo(typeof i=="string"?i:i+"",void 0,Lr),Qo=(i,e)=>{if(bs)i.adoptedStyleSheets=e.map(s=>s instanceof CSSStyleSheet?s:s.styleSheet);else for(const s of e){const r=document.createElement("style"),o=Zn.litNonce;o!==void 0&&r.setAttribute("nonce",o),r.textContent=s.cssText,i.appendChild(r)}},Tr=bs?i=>i:i=>i instanceof CSSStyleSheet?(e=>{let s="";for(const r of e.cssRules)s+=r.cssText;return Xo(s)})(i):i;/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const{is:Yo,defineProperty:th,getOwnPropertyDescriptor:eh,getOwnPropertyNames:ih,getOwnPropertySymbols:nh,getPrototypeOf:sh}=Object,Re=globalThis,Nr=Re.trustedTypes,rh=Nr?Nr.emptyScript:"",Es=Re.reactiveElementPolyfillSupport,Fi=(i,e)=>i,qn={toAttribute(i,e){switch(e){case Boolean:i=i?rh:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,e){let s=i;switch(e){case Boolean:s=i!==null;break;case Number:s=i===null?null:Number(i);break;case Object:case Array:try{s=JSON.parse(i)}catch{s=null}}return s}},Ps=(i,e)=>!Yo(i,e),Gr={attribute:!0,type:String,converter:qn,reflect:!1,useDefault:!1,hasChanged:Ps};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),Re.litPropertyMetadata??(Re.litPropertyMetadata=new WeakMap);let _i=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,s=Gr){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(e,s),!s.noAccessor){const r=Symbol(),o=this.getPropertyDescriptor(e,r,s);o!==void 0&&th(this.prototype,e,o)}}static getPropertyDescriptor(e,s,r){const{get:o,set:h}=eh(this.prototype,e)??{get(){return this[s]},set(l){this[s]=l}};return{get:o,set(l){const u=o==null?void 0:o.call(this);h==null||h.call(this,l),this.requestUpdate(e,u,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Gr}static _$Ei(){if(this.hasOwnProperty(Fi("elementProperties")))return;const e=sh(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Fi("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Fi("properties"))){const s=this.properties,r=[...ih(s),...nh(s)];for(const o of r)this.createProperty(o,s[o])}const e=this[Symbol.metadata];if(e!==null){const s=litPropertyMetadata.get(e);if(s!==void 0)for(const[r,o]of s)this.elementProperties.set(r,o)}this._$Eh=new Map;for(const[s,r]of this.elementProperties){const o=this._$Eu(s,r);o!==void 0&&this._$Eh.set(o,s)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const s=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const o of r)s.unshift(Tr(o))}else e!==void 0&&s.push(Tr(e));return s}static _$Eu(e,s){const r=s.attribute;return r===!1?void 0:typeof r=="string"?r: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(){var e;this._$ES=new Promise(s=>this.enableUpdating=s),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(s=>s(this))}addController(e){var s;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((s=e.hostConnected)==null||s.call(e))}removeController(e){var s;(s=this._$EO)==null||s.delete(e)}_$E_(){const e=new Map,s=this.constructor.elementProperties;for(const r of s.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Qo(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(s=>{var r;return(r=s.hostConnected)==null?void 0:r.call(s)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(s=>{var r;return(r=s.hostDisconnected)==null?void 0:r.call(s)})}attributeChangedCallback(e,s,r){this._$AK(e,r)}_$ET(e,s){var h;const r=this.constructor.elementProperties.get(e),o=this.constructor._$Eu(e,r);if(o!==void 0&&r.reflect===!0){const l=(((h=r.converter)==null?void 0:h.toAttribute)!==void 0?r.converter:qn).toAttribute(s,r.type);this._$Em=e,l==null?this.removeAttribute(o):this.setAttribute(o,l),this._$Em=null}}_$AK(e,s){var h,l;const r=this.constructor,o=r._$Eh.get(e);if(o!==void 0&&this._$Em!==o){const u=r.getPropertyOptions(o),f=typeof u.converter=="function"?{fromAttribute:u.converter}:((h=u.converter)==null?void 0:h.fromAttribute)!==void 0?u.converter:qn;this._$Em=o,this[o]=f.fromAttribute(s,u.type)??((l=this._$Ej)==null?void 0:l.get(o))??null,this._$Em=null}}requestUpdate(e,s,r){var o;if(e!==void 0){const h=this.constructor,l=this[e];if(r??(r=h.getPropertyOptions(e)),!((r.hasChanged??Ps)(l,s)||r.useDefault&&r.reflect&&l===((o=this._$Ej)==null?void 0:o.get(e))&&!this.hasAttribute(h._$Eu(e,r))))return;this.C(e,s,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,s,{useDefault:r,reflect:o,wrapped:h},l){r&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,l??s??this[e]),h!==!0||l!==void 0)||(this._$AL.has(e)||(this.hasUpdated||r||(s=void 0),this._$AL.set(e,s)),o===!0&&this._$Em!==e&&(this._$Eq??(this._$Eq=new Set)).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(s){Promise.reject(s)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var r;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[h,l]of this._$Ep)this[h]=l;this._$Ep=void 0}const o=this.constructor.elementProperties;if(o.size>0)for(const[h,l]of o){const{wrapped:u}=l,f=this[h];u!==!0||this._$AL.has(h)||f===void 0||this.C(h,void 0,l,f)}}let e=!1;const s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),(r=this._$EO)==null||r.forEach(o=>{var h;return(h=o.hostUpdate)==null?void 0:h.call(o)}),this.update(s)):this._$EM()}catch(o){throw e=!1,this._$EM(),o}e&&this._$AE(s)}willUpdate(e){}_$AE(e){var s;(s=this._$EO)==null||s.forEach(r=>{var o;return(o=r.hostUpdated)==null?void 0:o.call(r)}),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=this._$Eq.forEach(s=>this._$ET(s,this[s]))),this._$EM()}updated(e){}firstUpdated(e){}};_i.elementStyles=[],_i.shadowRootOptions={mode:"open"},_i[Fi("elementProperties")]=new Map,_i[Fi("finalized")]=new Map,Es==null||Es({ReactiveElement:_i}),(Re.reactiveElementVersions??(Re.reactiveElementVersions=[])).push("2.1.0");/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const Hi=globalThis,$n=Hi.trustedTypes,Ir=$n?$n.createPolicy("lit-html",{createHTML:i=>i}):void 0,Or="$lit$",ze=`lit$${Math.random().toFixed(9).slice(2)}$`,kr="?"+ze,ah=`<${kr}>`,Je=document,Wi=()=>Je.createComment(""),ji=i=>i===null||typeof i!="object"&&typeof i!="function",Ss=Array.isArray,oh=i=>Ss(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",As=`[ 	
\f\r]`,Ki=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Rr=/-->/g,zr=/>/g,Xe=RegExp(`>|${As}(?:([^\\s"'>=/]+)(${As}*=${As}*(?:[^ 	
\f\r"'\`<>=]|("|')|))|$)`,"g"),Dr=/'/g,Br=/"/g,Ur=/^(?:script|style|textarea|title)$/i,hh=i=>(e,...s)=>({_$litType$:i,strings:e,values:s}),lh=hh(1),pi=Symbol.for("lit-noChange"),Bt=Symbol.for("lit-nothing"),Zr=new WeakMap,Qe=Je.createTreeWalker(Je,129);function qr(i,e){if(!Ss(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ir!==void 0?Ir.createHTML(e):e}const ch=(i,e)=>{const s=i.length-1,r=[];let o,h=e===2?"<svg>":e===3?"<math>":"",l=Ki;for(let u=0;u<s;u++){const f=i[u];let _,v,m=-1,g=0;for(;g<f.length&&(l.lastIndex=g,v=l.exec(f),v!==null);)g=l.lastIndex,l===Ki?v[1]==="!--"?l=Rr:v[1]!==void 0?l=zr:v[2]!==void 0?(Ur.test(v[2])&&(o=RegExp("</"+v[2],"g")),l=Xe):v[3]!==void 0&&(l=Xe):l===Xe?v[0]===">"?(l=o??Ki,m=-1):v[1]===void 0?m=-2:(m=l.lastIndex-v[2].length,_=v[1],l=v[3]===void 0?Xe:v[3]==='"'?Br:Dr):l===Br||l===Dr?l=Xe:l===Rr||l===zr?l=Ki:(l=Xe,o=void 0);const M=l===Xe&&i[u+1].startsWith("/>")?" ":"";h+=l===Ki?f+ah:m>=0?(r.push(_),f.slice(0,m)+Or+f.slice(m)+ze+M):f+ze+(m===-2?u:M)}return[qr(i,h+(i[s]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]};class Vi{constructor({strings:e,_$litType$:s},r){let o;this.parts=[];let h=0,l=0;const u=e.length-1,f=this.parts,[_,v]=ch(e,s);if(this.el=Vi.createElement(_,r),Qe.currentNode=this.el.content,s===2||s===3){const m=this.el.content.firstChild;m.replaceWith(...m.childNodes)}for(;(o=Qe.nextNode())!==null&&f.length<u;){if(o.nodeType===1){if(o.hasAttributes())for(const m of o.getAttributeNames())if(m.endsWith(Or)){const g=v[l++],M=o.getAttribute(m).split(ze),E=/([.?@])?(.*)/.exec(g);f.push({type:1,index:h,name:E[2],strings:M,ctor:E[1]==="."?fh:E[1]==="?"?dh:E[1]==="@"?_h:Fn}),o.removeAttribute(m)}else m.startsWith(ze)&&(f.push({type:6,index:h}),o.removeAttribute(m));if(Ur.test(o.tagName)){const m=o.textContent.split(ze),g=m.length-1;if(g>0){o.textContent=$n?$n.emptyScript:"";for(let M=0;M<g;M++)o.append(m[M],Wi()),Qe.nextNode(),f.push({type:2,index:++h});o.append(m[g],Wi())}}}else if(o.nodeType===8)if(o.data===kr)f.push({type:2,index:h});else{let m=-1;for(;(m=o.data.indexOf(ze,m+1))!==-1;)f.push({type:7,index:h}),m+=ze.length-1}h++}}static createElement(e,s){const r=Je.createElement("template");return r.innerHTML=e,r}}function mi(i,e,s=i,r){var l,u;if(e===pi)return e;let o=r!==void 0?(l=s._$Co)==null?void 0:l[r]:s._$Cl;const h=ji(e)?void 0:e._$litDirective$;return(o==null?void 0:o.constructor)!==h&&((u=o==null?void 0:o._$AO)==null||u.call(o,!1),h===void 0?o=void 0:(o=new h(i),o._$AT(i,s,r)),r!==void 0?(s._$Co??(s._$Co=[]))[r]=o:s._$Cl=o),o!==void 0&&(e=mi(i,o._$AS(i,e.values),o,r)),e}let uh=class{constructor(e,s){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=s}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:s},parts:r}=this._$AD,o=((e==null?void 0:e.creationScope)??Je).importNode(s,!0);Qe.currentNode=o;let h=Qe.nextNode(),l=0,u=0,f=r[0];for(;f!==void 0;){if(l===f.index){let _;f.type===2?_=new Ji(h,h.nextSibling,this,e):f.type===1?_=new f.ctor(h,f.name,f.strings,this,e):f.type===6&&(_=new ph(h,this,e)),this._$AV.push(_),f=r[++u]}l!==(f==null?void 0:f.index)&&(h=Qe.nextNode(),l++)}return Qe.currentNode=Je,o}p(e){let s=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,s),s+=r.strings.length-2):r._$AI(e[s])),s++}};class Ji{get _$AU(){var e;return((e=this._$AM)==null?void 0:e._$AU)??this._$Cv}constructor(e,s,r,o){this.type=2,this._$AH=Bt,this._$AN=void 0,this._$AA=e,this._$AB=s,this._$AM=r,this.options=o,this._$Cv=(o==null?void 0:o.isConnected)??!0}get parentNode(){let e=this._$AA.parentNode;const s=this._$AM;return s!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=s.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,s=this){e=mi(this,e,s),ji(e)?e===Bt||e==null||e===""?(this._$AH!==Bt&&this._$AR(),this._$AH=Bt):e!==this._$AH&&e!==pi&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):oh(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!==Bt&&ji(this._$AH)?this._$AA.nextSibling.data=e:this.T(Je.createTextNode(e)),this._$AH=e}$(e){var h;const{values:s,_$litType$:r}=e,o=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=Vi.createElement(qr(r.h,r.h[0]),this.options)),r);if(((h=this._$AH)==null?void 0:h._$AD)===o)this._$AH.p(s);else{const l=new uh(o,this),u=l.u(this.options);l.p(s),this.T(u),this._$AH=l}}_$AC(e){let s=Zr.get(e.strings);return s===void 0&&Zr.set(e.strings,s=new Vi(e)),s}k(e){Ss(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let r,o=0;for(const h of e)o===s.length?s.push(r=new Ji(this.O(Wi()),this.O(Wi()),this,this.options)):r=s[o],r._$AI(h),o++;o<s.length&&(this._$AR(r&&r._$AB.nextSibling,o),s.length=o)}_$AR(e=this._$AA.nextSibling,s){var r;for((r=this._$AP)==null?void 0:r.call(this,!1,!0,s);e&&e!==this._$AB;){const o=e.nextSibling;e.remove(),e=o}}setConnected(e){var s;this._$AM===void 0&&(this._$Cv=e,(s=this._$AP)==null||s.call(this,e))}}class Fn{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,s,r,o,h){this.type=1,this._$AH=Bt,this._$AN=void 0,this.element=e,this.name=s,this._$AM=o,this.options=h,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=Bt}_$AI(e,s=this,r,o){const h=this.strings;let l=!1;if(h===void 0)e=mi(this,e,s,0),l=!ji(e)||e!==this._$AH&&e!==pi,l&&(this._$AH=e);else{const u=e;let f,_;for(e=h[0],f=0;f<h.length-1;f++)_=mi(this,u[r+f],s,f),_===pi&&(_=this._$AH[f]),l||(l=!ji(_)||_!==this._$AH[f]),_===Bt?e=Bt:e!==Bt&&(e+=(_??"")+h[f+1]),this._$AH[f]=_}l&&!o&&this.j(e)}j(e){e===Bt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class fh extends Fn{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Bt?void 0:e}}let dh=class extends Fn{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==Bt)}},_h=class extends Fn{constructor(e,s,r,o,h){super(e,s,r,o,h),this.type=5}_$AI(e,s=this){if((e=mi(this,e,s,0)??Bt)===pi)return;const r=this._$AH,o=e===Bt&&r!==Bt||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,h=e!==Bt&&(r===Bt||o);o&&this.element.removeEventListener(this.name,this,r),h&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var s;typeof this._$AH=="function"?this._$AH.call(((s=this.options)==null?void 0:s.host)??this.element,e):this._$AH.handleEvent(e)}};class ph{constructor(e,s,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=s,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){mi(this,e)}}const Ls=Hi.litHtmlPolyfillSupport;Ls==null||Ls(Vi,Ji),(Hi.litHtmlVersions??(Hi.litHtmlVersions=[])).push("3.3.0");const mh=(i,e,s)=>{const r=(s==null?void 0:s.renderBefore)??e;let o=r._$litPart$;if(o===void 0){const h=(s==null?void 0:s.renderBefore)??null;r._$litPart$=o=new Ji(e.insertBefore(Wi(),h),h,void 0,s??{})}return o._$AI(i),o};/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const Ye=globalThis;class Xi extends _i{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var s;const e=super.createRenderRoot();return(s=this.renderOptions).renderBefore??(s.renderBefore=e.firstChild),e}update(e){const s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=mh(s,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)==null||e.setConnected(!1)}render(){return pi}}Xi._$litElement$=!0,Xi.finalized=!0,(ao=Ye.litElementHydrateSupport)==null||ao.call(Ye,{LitElement:Xi});const Cs=Ye.litElementPolyfillSupport;Cs==null||Cs({LitElement:Xi}),(Ye.litElementVersions??(Ye.litElementVersions=[])).push("4.2.0");/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const gh=i=>(e,s)=>{s!==void 0?s.addInitializer(()=>{customElements.define(i,e)}):customElements.define(i,e)};/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const vh={attribute:!0,type:String,converter:qn,reflect:!1,hasChanged:Ps},yh=(i=vh,e,s)=>{const{kind:r,metadata:o}=s;let h=globalThis.litPropertyMetadata.get(o);if(h===void 0&&globalThis.litPropertyMetadata.set(o,h=new Map),r==="setter"&&((i=Object.create(i)).wrapped=!0),h.set(s.name,i),r==="accessor"){const{name:l}=s;return{set(u){const f=e.get.call(this);e.set.call(this,u),this.requestUpdate(l,f,i)},init(u){return u!==void 0&&this.C(l,void 0,i,u),u}}}if(r==="setter"){const{name:l}=s;return function(u){const f=this[l];e.call(this,u),this.requestUpdate(l,f,i)}}throw Error("Unsupported decorator location: "+r)};function gi(i){return(e,s)=>typeof s=="object"?yh(i,e,s):((r,o,h)=>{const l=o.hasOwnProperty(h);return o.constructor.createProperty(h,r),l?Object.getOwnPropertyDescriptor(o,h):void 0})(i,e,s)}var Mh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function wh(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Ts={exports:{}};/* @preserve
 * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
 * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
 */(function(i,e){(function(s,r){r(e)})(Mh,function(s){var r="1.9.4";function o(t){var n,a,c,d;for(a=1,c=arguments.length;a<c;a++){d=arguments[a];for(n in d)t[n]=d[n]}return t}var h=Object.create||function(){function t(){}return function(n){return t.prototype=n,new t}}();function l(t,n){var a=Array.prototype.slice;if(t.bind)return t.bind.apply(t,a.call(arguments,1));var c=a.call(arguments,2);return function(){return t.apply(n,c.length?c.concat(a.call(arguments)):arguments)}}var u=0;function f(t){return"_leaflet_id"in t||(t._leaflet_id=++u),t._leaflet_id}function _(t,n,a){var c,d,p,y;return y=function(){c=!1,d&&(p.apply(a,d),d=!1)},p=function(){c?d=arguments:(t.apply(a,arguments),setTimeout(y,n),c=!0)},p}function v(t,n,a){var c=n[1],d=n[0],p=c-d;return t===c&&a?t:((t-d)%p+p)%p+d}function m(){return!1}function g(t,n){if(n===!1)return t;var a=Math.pow(10,n===void 0?6:n);return Math.round(t*a)/a}function M(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function E(t){return M(t).split(/\s+/)}function x(t,n){Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?h(t.options):{});for(var a in n)t.options[a]=n[a];return t.options}function C(t,n,a){var c=[];for(var d in t)c.push(encodeURIComponent(a?d.toUpperCase():d)+"="+encodeURIComponent(t[d]));return(!n||n.indexOf("?")===-1?"?":"&")+c.join("&")}var D=/\{ *([\w_ -]+) *\}/g;function Z(t,n){return t.replace(D,function(a,c){var d=n[c];if(d===void 0)throw new Error("No value provided for variable "+a);return typeof d=="function"&&(d=d(n)),d})}var $=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"};function lt(t,n){for(var a=0;a<t.length;a++)if(t[a]===n)return a;return-1}var gt="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function Mt(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var zt=0;function Dt(t){var n=+new Date,a=Math.max(0,16-(n-zt));return zt=n+a,window.setTimeout(t,a)}var Kt=window.requestAnimationFrame||Mt("RequestAnimationFrame")||Dt,Qt=window.cancelAnimationFrame||Mt("CancelAnimationFrame")||Mt("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function vt(t,n,a){if(a&&Kt===Dt)t.call(n);else return Kt.call(window,l(t,n))}function St(t){t&&Qt.call(window,t)}var oe={__proto__:null,extend:o,create:h,bind:l,get lastId(){return u},stamp:f,throttle:_,wrapNum:v,falseFn:m,formatNum:g,trim:M,splitWords:E,setOptions:x,getParamString:C,template:Z,isArray:$,indexOf:lt,emptyImageUrl:gt,requestFn:Kt,cancelFn:Qt,requestAnimFrame:vt,cancelAnimFrame:St};function Ut(){}Ut.extend=function(t){var n=function(){x(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},a=n.__super__=this.prototype,c=h(a);c.constructor=n,n.prototype=c;for(var d in this)Object.prototype.hasOwnProperty.call(this,d)&&d!=="prototype"&&d!=="__super__"&&(n[d]=this[d]);return t.statics&&o(n,t.statics),t.includes&&(Ee(t.includes),o.apply(null,[c].concat(t.includes))),o(c,t),delete c.statics,delete c.includes,c.options&&(c.options=a.options?h(a.options):{},o(c.options,t.options)),c._initHooks=[],c.callInitHooks=function(){if(!this._initHooksCalled){a.callInitHooks&&a.callInitHooks.call(this),this._initHooksCalled=!0;for(var p=0,y=c._initHooks.length;p<y;p++)c._initHooks[p].call(this)}},n},Ut.include=function(t){var n=this.prototype.options;return o(this.prototype,t),t.options&&(this.prototype.options=n,this.mergeOptions(t.options)),this},Ut.mergeOptions=function(t){return o(this.prototype.options,t),this},Ut.addInitHook=function(t){var n=Array.prototype.slice.call(arguments,1),a=typeof t=="function"?t:function(){this[t].apply(this,n)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(a),this};function Ee(t){if(!(typeof L>"u"||!L||!L.Mixin)){t=$(t)?t:[t];for(var n=0;n<t.length;n++)t[n]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",new Error().stack)}}var It={on:function(t,n,a){if(typeof t=="object")for(var c in t)this._on(c,t[c],n);else{t=E(t);for(var d=0,p=t.length;d<p;d++)this._on(t[d],n,a)}return this},off:function(t,n,a){if(!arguments.length)delete this._events;else if(typeof t=="object")for(var c in t)this._off(c,t[c],n);else{t=E(t);for(var d=arguments.length===1,p=0,y=t.length;p<y;p++)d?this._off(t[p]):this._off(t[p],n,a)}return this},_on:function(t,n,a,c){if(typeof n!="function"){console.warn("wrong listener type: "+typeof n);return}if(this._listens(t,n,a)===!1){a===this&&(a=void 0);var d={fn:n,ctx:a};c&&(d.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(d)}},_off:function(t,n,a){var c,d,p;if(this._events&&(c=this._events[t],!!c)){if(arguments.length===1){if(this._firingCount)for(d=0,p=c.length;d<p;d++)c[d].fn=m;delete this._events[t];return}if(typeof n!="function"){console.warn("wrong listener type: "+typeof n);return}var y=this._listens(t,n,a);if(y!==!1){var b=c[y];this._firingCount&&(b.fn=m,this._events[t]=c=c.slice()),c.splice(y,1)}}},fire:function(t,n,a){if(!this.listens(t,a))return this;var c=o({},n,{type:t,target:this,sourceTarget:n&&n.sourceTarget||this});if(this._events){var d=this._events[t];if(d){this._firingCount=this._firingCount+1||1;for(var p=0,y=d.length;p<y;p++){var b=d[p],S=b.fn;b.once&&this.off(t,S,b.ctx),S.call(b.ctx||this,c)}this._firingCount--}}return a&&this._propagateEvent(c),this},listens:function(t,n,a,c){typeof t!="string"&&console.warn('"string" type argument expected');var d=n;typeof n!="function"&&(c=!!n,d=void 0,a=void 0);var p=this._events&&this._events[t];if(p&&p.length&&this._listens(t,d,a)!==!1)return!0;if(c){for(var y in this._eventParents)if(this._eventParents[y].listens(t,n,a,c))return!0}return!1},_listens:function(t,n,a){if(!this._events)return!1;var c=this._events[t]||[];if(!n)return!!c.length;a===this&&(a=void 0);for(var d=0,p=c.length;d<p;d++)if(c[d].fn===n&&c[d].ctx===a)return d;return!1},once:function(t,n,a){if(typeof t=="object")for(var c in t)this._on(c,t[c],n,!0);else{t=E(t);for(var d=0,p=t.length;d<p;d++)this._on(t[d],n,a,!0)}return this},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[f(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[f(t)],this},_propagateEvent:function(t){for(var n in this._eventParents)this._eventParents[n].fire(t.type,o({layer:t.target,propagatedFrom:t.target},t),!0)}};It.addEventListener=It.on,It.removeEventListener=It.clearAllEventListeners=It.off,It.addOneTimeEventListener=It.once,It.fireEvent=It.fire,It.hasEventListeners=It.listens;var he=Ut.extend(It);function P(t,n,a){this.x=a?Math.round(t):t,this.y=a?Math.round(n):n}var k=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};P.prototype={clone:function(){return new P(this.x,this.y)},add:function(t){return this.clone()._add(T(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(T(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new P(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new P(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=k(this.x),this.y=k(this.y),this},distanceTo:function(t){t=T(t);var n=t.x-this.x,a=t.y-this.y;return Math.sqrt(n*n+a*a)},equals:function(t){return t=T(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=T(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+g(this.x)+", "+g(this.y)+")"}};function T(t,n,a){return t instanceof P?t:$(t)?new P(t[0],t[1]):t==null?t:typeof t=="object"&&"x"in t&&"y"in t?new P(t.x,t.y):new P(t,n,a)}function G(t,n){if(t)for(var a=n?[t,n]:t,c=0,d=a.length;c<d;c++)this.extend(a[c])}G.prototype={extend:function(t){var n,a;if(!t)return this;if(t instanceof P||typeof t[0]=="number"||"x"in t)n=a=T(t);else if(t=A(t),n=t.min,a=t.max,!n||!a)return this;return!this.min&&!this.max?(this.min=n.clone(),this.max=a.clone()):(this.min.x=Math.min(n.x,this.min.x),this.max.x=Math.max(a.x,this.max.x),this.min.y=Math.min(n.y,this.min.y),this.max.y=Math.max(a.y,this.max.y)),this},getCenter:function(t){return T((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return T(this.min.x,this.max.y)},getTopRight:function(){return T(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var n,a;return typeof t[0]=="number"||t instanceof P?t=T(t):t=A(t),t instanceof G?(n=t.min,a=t.max):n=a=t,n.x>=this.min.x&&a.x<=this.max.x&&n.y>=this.min.y&&a.y<=this.max.y},intersects:function(t){t=A(t);var n=this.min,a=this.max,c=t.min,d=t.max,p=d.x>=n.x&&c.x<=a.x,y=d.y>=n.y&&c.y<=a.y;return p&&y},overlaps:function(t){t=A(t);var n=this.min,a=this.max,c=t.min,d=t.max,p=d.x>n.x&&c.x<a.x,y=d.y>n.y&&c.y<a.y;return p&&y},isValid:function(){return!!(this.min&&this.max)},pad:function(t){var n=this.min,a=this.max,c=Math.abs(n.x-a.x)*t,d=Math.abs(n.y-a.y)*t;return A(T(n.x-c,n.y-d),T(a.x+c,a.y+d))},equals:function(t){return t?(t=A(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight())):!1}};function A(t,n){return!t||t instanceof G?t:new G(t,n)}function N(t,n){if(t)for(var a=n?[t,n]:t,c=0,d=a.length;c<d;c++)this.extend(a[c])}N.prototype={extend:function(t){var n=this._southWest,a=this._northEast,c,d;if(t instanceof F)c=t,d=t;else if(t instanceof N){if(c=t._southWest,d=t._northEast,!c||!d)return this}else return t?this.extend(H(t)||R(t)):this;return!n&&!a?(this._southWest=new F(c.lat,c.lng),this._northEast=new F(d.lat,d.lng)):(n.lat=Math.min(c.lat,n.lat),n.lng=Math.min(c.lng,n.lng),a.lat=Math.max(d.lat,a.lat),a.lng=Math.max(d.lng,a.lng)),this},pad:function(t){var n=this._southWest,a=this._northEast,c=Math.abs(n.lat-a.lat)*t,d=Math.abs(n.lng-a.lng)*t;return new N(new F(n.lat-c,n.lng-d),new F(a.lat+c,a.lng+d))},getCenter:function(){return new F((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new F(this.getNorth(),this.getWest())},getSouthEast:function(){return new F(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){typeof t[0]=="number"||t instanceof F||"lat"in t?t=H(t):t=R(t);var n=this._southWest,a=this._northEast,c,d;return t instanceof N?(c=t.getSouthWest(),d=t.getNorthEast()):c=d=t,c.lat>=n.lat&&d.lat<=a.lat&&c.lng>=n.lng&&d.lng<=a.lng},intersects:function(t){t=R(t);var n=this._southWest,a=this._northEast,c=t.getSouthWest(),d=t.getNorthEast(),p=d.lat>=n.lat&&c.lat<=a.lat,y=d.lng>=n.lng&&c.lng<=a.lng;return p&&y},overlaps:function(t){t=R(t);var n=this._southWest,a=this._northEast,c=t.getSouthWest(),d=t.getNorthEast(),p=d.lat>n.lat&&c.lat<a.lat,y=d.lng>n.lng&&c.lng<a.lng;return p&&y},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,n){return t?(t=R(t),this._southWest.equals(t.getSouthWest(),n)&&this._northEast.equals(t.getNorthEast(),n)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function R(t,n){return t instanceof N?t:new N(t,n)}function F(t,n,a){if(isNaN(t)||isNaN(n))throw new Error("Invalid LatLng object: ("+t+", "+n+")");this.lat=+t,this.lng=+n,a!==void 0&&(this.alt=+a)}F.prototype={equals:function(t,n){if(!t)return!1;t=H(t);var a=Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng));return a<=(n===void 0?1e-9:n)},toString:function(t){return"LatLng("+g(this.lat,t)+", "+g(this.lng,t)+")"},distanceTo:function(t){return it.distance(this,H(t))},wrap:function(){return it.wrapLatLng(this)},toBounds:function(t){var n=180*t/40075017,a=n/Math.cos(Math.PI/180*this.lat);return R([this.lat-n,this.lng-a],[this.lat+n,this.lng+a])},clone:function(){return new F(this.lat,this.lng,this.alt)}};function H(t,n,a){return t instanceof F?t:$(t)&&typeof t[0]!="object"?t.length===3?new F(t[0],t[1],t[2]):t.length===2?new F(t[0],t[1]):null:t==null?t:typeof t=="object"&&"lat"in t?new F(t.lat,"lng"in t?t.lng:t.lon,t.alt):n===void 0?null:new F(t,n,a)}var K={latLngToPoint:function(t,n){var a=this.projection.project(t),c=this.scale(n);return this.transformation._transform(a,c)},pointToLatLng:function(t,n){var a=this.scale(n),c=this.transformation.untransform(t,a);return this.projection.unproject(c)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var n=this.projection.bounds,a=this.scale(t),c=this.transformation.transform(n.min,a),d=this.transformation.transform(n.max,a);return new G(c,d)},infinite:!1,wrapLatLng:function(t){var n=this.wrapLng?v(t.lng,this.wrapLng,!0):t.lng,a=this.wrapLat?v(t.lat,this.wrapLat,!0):t.lat,c=t.alt;return new F(a,n,c)},wrapLatLngBounds:function(t){var n=t.getCenter(),a=this.wrapLatLng(n),c=n.lat-a.lat,d=n.lng-a.lng;if(c===0&&d===0)return t;var p=t.getSouthWest(),y=t.getNorthEast(),b=new F(p.lat-c,p.lng-d),S=new F(y.lat-c,y.lng-d);return new N(b,S)}},it=o({},K,{wrapLng:[-180,180],R:6371e3,distance:function(t,n){var a=Math.PI/180,c=t.lat*a,d=n.lat*a,p=Math.sin((n.lat-t.lat)*a/2),y=Math.sin((n.lng-t.lng)*a/2),b=p*p+Math.cos(c)*Math.cos(d)*y*y,S=2*Math.atan2(Math.sqrt(b),Math.sqrt(1-b));return this.R*S}}),j=6378137,tt={R:j,MAX_LATITUDE:85.0511287798,project:function(t){var n=Math.PI/180,a=this.MAX_LATITUDE,c=Math.max(Math.min(a,t.lat),-a),d=Math.sin(c*n);return new P(this.R*t.lng*n,this.R*Math.log((1+d)/(1-d))/2)},unproject:function(t){var n=180/Math.PI;return new F((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*n,t.x*n/this.R)},bounds:function(){var t=j*Math.PI;return new G([-t,-t],[t,t])}()};function rt(t,n,a,c){if($(t)){this._a=t[0],this._b=t[1],this._c=t[2],this._d=t[3];return}this._a=t,this._b=n,this._c=a,this._d=c}rt.prototype={transform:function(t,n){return this._transform(t.clone(),n)},_transform:function(t,n){return n=n||1,t.x=n*(this._a*t.x+this._b),t.y=n*(this._c*t.y+this._d),t},untransform:function(t,n){return n=n||1,new P((t.x/n-this._b)/this._a,(t.y/n-this._d)/this._c)}};function z(t,n,a,c){return new rt(t,n,a,c)}var X=o({},it,{code:"EPSG:3857",projection:tt,transformation:function(){var t=.5/(Math.PI*tt.R);return z(t,.5,-t,.5)}()}),ht=o({},X,{code:"EPSG:900913"});function dt(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function yt(t,n){var a="",c,d,p,y,b,S;for(c=0,p=t.length;c<p;c++){for(b=t[c],d=0,y=b.length;d<y;d++)S=b[d],a+=(d?"L":"M")+S.x+" "+S.y;a+=n?W.svg?"z":"x":""}return a||"M0 0"}var _t=document.documentElement.style,pt="ActiveXObject"in window,Lt=pt&&!document.addEventListener,Nt="msLaunchUri"in navigator&&!("documentMode"in document),nt=se("webkit"),Q=se("android"),et=se("android 2")||se("android 3"),xt=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),Ot=Q&&se("Google")&&xt<537&&!("AudioNode"in window),le=!!window.opera,ve=!Nt&&se("chrome"),$e=se("gecko")&&!nt&&!le&&!pt,ce=!ve&&se("safari"),at=se("phantom"),$t="OTransition"in _t,Zt=navigator.platform.indexOf("Win")===0,Ft=pt&&"transition"in _t,Ht="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!et,si="MozPerspective"in _t,Li=!window.L_DISABLE_3D&&(Ft||Ht||si)&&!$t&&!at,ue=typeof orientation<"u"||se("mobile"),Te=ue&&nt,ri=ue&&Ht,Fe=!window.PointerEvent&&window.MSPointerEvent,He=!!(window.PointerEvent||Fe),We="ontouchstart"in window||!!window.TouchEvent,Ci=!window.L_NO_TOUCH&&(We||He),yn=ue&&le,je=ue&&$e,Mn=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Ti=function(){var t=!1;try{var n=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",m,n),window.removeEventListener("testPassiveEventSupport",m,n)}catch{}return t}(),wn=function(){return!!document.createElement("canvas").getContext}(),ai=!!(document.createElementNS&&dt("svg").createSVGRect),xn=!!ai&&function(){var t=document.createElement("div");return t.innerHTML="<svg/>",(t.firstChild&&t.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),ss=!ai&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var n=t.firstChild;return n.style.behavior="url(#default#VML)",n&&typeof n.adj=="object"}catch{return!1}}(),bn=navigator.platform.indexOf("Mac")===0,Ni=navigator.platform.indexOf("Linux")===0;function se(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var W={ie:pt,ielt9:Lt,edge:Nt,webkit:nt,android:Q,android23:et,androidStock:Ot,opera:le,chrome:ve,gecko:$e,safari:ce,phantom:at,opera12:$t,win:Zt,ie3d:Ft,webkit3d:Ht,gecko3d:si,any3d:Li,mobile:ue,mobileWebkit:Te,mobileWebkit3d:ri,msPointer:Fe,pointer:He,touch:Ci,touchNative:We,mobileOpera:yn,mobileGecko:je,retina:Mn,passiveEvents:Ti,canvas:wn,svg:ai,vml:ss,inlineSvg:xn,mac:bn,linux:Ni},En=W.msPointer?"MSPointerDown":"pointerdown",oi=W.msPointer?"MSPointerMove":"pointermove",Pn=W.msPointer?"MSPointerUp":"pointerup",Sn=W.msPointer?"MSPointerCancel":"pointercancel",Ne={touchstart:En,touchmove:oi,touchend:Pn,touchcancel:Sn},hi={touchstart:x0,touchmove:rs,touchend:rs,touchcancel:rs},fe={},Gi=!1;function An(t,n,a){return n==="touchstart"&&w0(),hi[n]?(a=hi[n].bind(this,a),t.addEventListener(Ne[n],a,!1),a):(console.warn("wrong event specified:",n),m)}function Ii(t,n,a){if(!Ne[n]){console.warn("wrong event specified:",n);return}t.removeEventListener(Ne[n],a,!1)}function Oi(t){fe[t.pointerId]=t}function Ln(t){fe[t.pointerId]&&(fe[t.pointerId]=t)}function ki(t){delete fe[t.pointerId]}function w0(){Gi||(document.addEventListener(En,Oi,!0),document.addEventListener(oi,Ln,!0),document.addEventListener(Pn,ki,!0),document.addEventListener(Sn,ki,!0),Gi=!0)}function rs(t,n){if(n.pointerType!==(n.MSPOINTER_TYPE_MOUSE||"mouse")){n.touches=[];for(var a in fe)n.touches.push(fe[a]);n.changedTouches=[n],t(n)}}function x0(t,n){n.MSPOINTER_TYPE_TOUCH&&n.pointerType===n.MSPOINTER_TYPE_TOUCH&&Wt(n),rs(t,n)}function b0(t){var n={},a,c;for(c in t)a=t[c],n[c]=a&&a.bind?a.bind(t):a;return t=n,n.type="dblclick",n.detail=2,n.isTrusted=!1,n._simulated=!0,n}var E0=200;function P0(t,n){t.addEventListener("dblclick",n);var a=0,c;function d(p){if(p.detail!==1){c=p.detail;return}if(!(p.pointerType==="mouse"||p.sourceCapabilities&&!p.sourceCapabilities.firesTouchEvents)){var y=uo(p);if(!(y.some(function(S){return S instanceof HTMLLabelElement&&S.attributes.for})&&!y.some(function(S){return S instanceof HTMLInputElement||S instanceof HTMLSelectElement}))){var b=Date.now();b-a<=E0?(c++,c===2&&n(b0(p))):c=1,a=b}}}return t.addEventListener("click",d),{dblclick:n,simDblclick:d}}function S0(t,n){t.removeEventListener("dblclick",n.dblclick),t.removeEventListener("click",n.simDblclick)}var nr=hs(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Cn=hs(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),oo=Cn==="webkitTransition"||Cn==="OTransition"?Cn+"End":"transitionend";function ho(t){return typeof t=="string"?document.getElementById(t):t}function Tn(t,n){var a=t.style[n]||t.currentStyle&&t.currentStyle[n];if((!a||a==="auto")&&document.defaultView){var c=document.defaultView.getComputedStyle(t,null);a=c?c[n]:null}return a==="auto"?null:a}function ct(t,n,a){var c=document.createElement(t);return c.className=n||"",a&&a.appendChild(c),c}function At(t){var n=t.parentNode;n&&n.removeChild(t)}function as(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Ri(t){var n=t.parentNode;n&&n.lastChild!==t&&n.appendChild(t)}function zi(t){var n=t.parentNode;n&&n.firstChild!==t&&n.insertBefore(t,n.firstChild)}function sr(t,n){if(t.classList!==void 0)return t.classList.contains(n);var a=os(t);return a.length>0&&new RegExp("(^|\\s)"+n+"(\\s|$)").test(a)}function Y(t,n){if(t.classList!==void 0)for(var a=E(n),c=0,d=a.length;c<d;c++)t.classList.add(a[c]);else if(!sr(t,n)){var p=os(t);rr(t,(p?p+" ":"")+n)}}function Gt(t,n){t.classList!==void 0?t.classList.remove(n):rr(t,M((" "+os(t)+" ").replace(" "+n+" "," ")))}function rr(t,n){t.className.baseVal===void 0?t.className=n:t.className.baseVal=n}function os(t){return t.correspondingElement&&(t=t.correspondingElement),t.className.baseVal===void 0?t.className:t.className.baseVal}function de(t,n){"opacity"in t.style?t.style.opacity=n:"filter"in t.style&&A0(t,n)}function A0(t,n){var a=!1,c="DXImageTransform.Microsoft.Alpha";try{a=t.filters.item(c)}catch{if(n===1)return}n=Math.round(n*100),a?(a.Enabled=n!==100,a.Opacity=n):t.style.filter+=" progid:"+c+"(opacity="+n+")"}function hs(t){for(var n=document.documentElement.style,a=0;a<t.length;a++)if(t[a]in n)return t[a];return!1}function li(t,n,a){var c=n||new P(0,0);t.style[nr]=(W.ie3d?"translate("+c.x+"px,"+c.y+"px)":"translate3d("+c.x+"px,"+c.y+"px,0)")+(a?" scale("+a+")":"")}function kt(t,n){t._leaflet_pos=n,W.any3d?li(t,n):(t.style.left=n.x+"px",t.style.top=n.y+"px")}function ci(t){return t._leaflet_pos||new P(0,0)}var Nn,Gn,ar;if("onselectstart"in document)Nn=function(){J(window,"selectstart",Wt)},Gn=function(){wt(window,"selectstart",Wt)};else{var In=hs(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Nn=function(){if(In){var t=document.documentElement.style;ar=t[In],t[In]="none"}},Gn=function(){In&&(document.documentElement.style[In]=ar,ar=void 0)}}function or(){J(window,"dragstart",Wt)}function hr(){wt(window,"dragstart",Wt)}var ls,lr;function cr(t){for(;t.tabIndex===-1;)t=t.parentNode;t.style&&(cs(),ls=t,lr=t.style.outlineStyle,t.style.outlineStyle="none",J(window,"keydown",cs))}function cs(){ls&&(ls.style.outlineStyle=lr,ls=void 0,lr=void 0,wt(window,"keydown",cs))}function lo(t){do t=t.parentNode;while((!t.offsetWidth||!t.offsetHeight)&&t!==document.body);return t}function ur(t){var n=t.getBoundingClientRect();return{x:n.width/t.offsetWidth||1,y:n.height/t.offsetHeight||1,boundingClientRect:n}}var L0={__proto__:null,TRANSFORM:nr,TRANSITION:Cn,TRANSITION_END:oo,get:ho,getStyle:Tn,create:ct,remove:At,empty:as,toFront:Ri,toBack:zi,hasClass:sr,addClass:Y,removeClass:Gt,setClass:rr,getClass:os,setOpacity:de,testProp:hs,setTransform:li,setPosition:kt,getPosition:ci,get disableTextSelection(){return Nn},get enableTextSelection(){return Gn},disableImageDrag:or,enableImageDrag:hr,preventOutline:cr,restoreOutline:cs,getSizedParentNode:lo,getScale:ur};function J(t,n,a,c){if(n&&typeof n=="object")for(var d in n)dr(t,d,n[d],a);else{n=E(n);for(var p=0,y=n.length;p<y;p++)dr(t,n[p],a,c)}return this}var Pe="_leaflet_events";function wt(t,n,a,c){if(arguments.length===1)co(t),delete t[Pe];else if(n&&typeof n=="object")for(var d in n)_r(t,d,n[d],a);else if(n=E(n),arguments.length===2)co(t,function(b){return lt(n,b)!==-1});else for(var p=0,y=n.length;p<y;p++)_r(t,n[p],a,c);return this}function co(t,n){for(var a in t[Pe]){var c=a.split(/\d/)[0];(!n||n(c))&&_r(t,c,null,null,a)}}var fr={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function dr(t,n,a,c){var d=n+f(a)+(c?"_"+f(c):"");if(t[Pe]&&t[Pe][d])return this;var p=function(b){return a.call(c||t,b||window.event)},y=p;!W.touchNative&&W.pointer&&n.indexOf("touch")===0?p=An(t,n,p):W.touch&&n==="dblclick"?p=P0(t,p):"addEventListener"in t?n==="touchstart"||n==="touchmove"||n==="wheel"||n==="mousewheel"?t.addEventListener(fr[n]||n,p,W.passiveEvents?{passive:!1}:!1):n==="mouseenter"||n==="mouseleave"?(p=function(b){b=b||window.event,mr(t,b)&&y(b)},t.addEventListener(fr[n],p,!1)):t.addEventListener(n,y,!1):t.attachEvent("on"+n,p),t[Pe]=t[Pe]||{},t[Pe][d]=p}function _r(t,n,a,c,d){d=d||n+f(a)+(c?"_"+f(c):"");var p=t[Pe]&&t[Pe][d];if(!p)return this;!W.touchNative&&W.pointer&&n.indexOf("touch")===0?Ii(t,n,p):W.touch&&n==="dblclick"?S0(t,p):"removeEventListener"in t?t.removeEventListener(fr[n]||n,p,!1):t.detachEvent("on"+n,p),t[Pe][d]=null}function ui(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function pr(t){return dr(t,"wheel",ui),this}function On(t){return J(t,"mousedown touchstart dblclick contextmenu",ui),t._leaflet_disable_click=!0,this}function Wt(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function fi(t){return Wt(t),ui(t),this}function uo(t){if(t.composedPath)return t.composedPath();for(var n=[],a=t.target;a;)n.push(a),a=a.parentNode;return n}function fo(t,n){if(!n)return new P(t.clientX,t.clientY);var a=ur(n),c=a.boundingClientRect;return new P((t.clientX-c.left)/a.x-n.clientLeft,(t.clientY-c.top)/a.y-n.clientTop)}var C0=W.linux&&W.chrome?window.devicePixelRatio:W.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function _o(t){return W.edge?t.wheelDeltaY/2:t.deltaY&&t.deltaMode===0?-t.deltaY/C0:t.deltaY&&t.deltaMode===1?-t.deltaY*20:t.deltaY&&t.deltaMode===2?-t.deltaY*60:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?-t.detail*20:t.detail?t.detail/-32765*60:0}function mr(t,n){var a=n.relatedTarget;if(!a)return!0;try{for(;a&&a!==t;)a=a.parentNode}catch{return!1}return a!==t}var T0={__proto__:null,on:J,off:wt,stopPropagation:ui,disableScrollPropagation:pr,disableClickPropagation:On,preventDefault:Wt,stop:fi,getPropagationPath:uo,getMousePosition:fo,getWheelDelta:_o,isExternalTarget:mr,addListener:J,removeListener:wt},po=he.extend({run:function(t,n,a,c){this.stop(),this._el=t,this._inProgress=!0,this._duration=a||.25,this._easeOutPower=1/Math.max(c||.5,.2),this._startPos=ci(t),this._offset=n.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=vt(this._animate,this),this._step()},_step:function(t){var n=+new Date-this._startTime,a=this._duration*1e3;n<a?this._runFrame(this._easeOut(n/a),t):(this._runFrame(1),this._complete())},_runFrame:function(t,n){var a=this._startPos.add(this._offset.multiplyBy(t));n&&a._round(),kt(this._el,a),this.fire("step")},_complete:function(){St(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),ot=he.extend({options:{crs:X,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,n){n=x(this,n),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=l(this._onResize,this),this._initEvents(),n.maxBounds&&this.setMaxBounds(n.maxBounds),n.zoom!==void 0&&(this._zoom=this._limitZoom(n.zoom)),n.center&&n.zoom!==void 0&&this.setView(H(n.center),n.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=Cn&&W.any3d&&!W.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),J(this._proxy,oo,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,n,a){if(n=n===void 0?this._zoom:this._limitZoom(n),t=this._limitCenter(H(t),n,this.options.maxBounds),a=a||{},this._stop(),this._loaded&&!a.reset&&a!==!0){a.animate!==void 0&&(a.zoom=o({animate:a.animate},a.zoom),a.pan=o({animate:a.animate,duration:a.duration},a.pan));var c=this._zoom!==n?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,n,a.zoom):this._tryAnimatedPan(t,a.pan);if(c)return clearTimeout(this._sizeTimer),this}return this._resetView(t,n,a.pan&&a.pan.noMoveStart),this},setZoom:function(t,n){return this._loaded?this.setView(this.getCenter(),t,{zoom:n}):(this._zoom=t,this)},zoomIn:function(t,n){return t=t||(W.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,n)},zoomOut:function(t,n){return t=t||(W.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,n)},setZoomAround:function(t,n,a){var c=this.getZoomScale(n),d=this.getSize().divideBy(2),p=t instanceof P?t:this.latLngToContainerPoint(t),y=p.subtract(d).multiplyBy(1-1/c),b=this.containerPointToLatLng(d.add(y));return this.setView(b,n,{zoom:a})},_getBoundsCenterZoom:function(t,n){n=n||{},t=t.getBounds?t.getBounds():R(t);var a=T(n.paddingTopLeft||n.padding||[0,0]),c=T(n.paddingBottomRight||n.padding||[0,0]),d=this.getBoundsZoom(t,!1,a.add(c));if(d=typeof n.maxZoom=="number"?Math.min(n.maxZoom,d):d,d===1/0)return{center:t.getCenter(),zoom:d};var p=c.subtract(a).divideBy(2),y=this.project(t.getSouthWest(),d),b=this.project(t.getNorthEast(),d),S=this.unproject(y.add(b).divideBy(2).add(p),d);return{center:S,zoom:d}},fitBounds:function(t,n){if(t=R(t),!t.isValid())throw new Error("Bounds are not valid.");var a=this._getBoundsCenterZoom(t,n);return this.setView(a.center,a.zoom,n)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,n){return this.setView(t,this._zoom,{pan:n})},panBy:function(t,n){if(t=T(t).round(),n=n||{},!t.x&&!t.y)return this.fire("moveend");if(n.animate!==!0&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new po,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),n.noMoveStart||this.fire("movestart"),n.animate!==!1){Y(this._mapPane,"leaflet-pan-anim");var a=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,a,n.duration||.25,n.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,n,a){if(a=a||{},a.animate===!1||!W.any3d)return this.setView(t,n,a);this._stop();var c=this.project(this.getCenter()),d=this.project(t),p=this.getSize(),y=this._zoom;t=H(t),n=n===void 0?y:n;var b=Math.max(p.x,p.y),S=b*this.getZoomScale(y,n),I=d.distanceTo(c)||1,q=1.42,V=q*q;function st(Rt){var xs=Rt?-1:1,v_=Rt?S:b,y_=S*S-b*b+xs*V*V*I*I,M_=2*v_*V*I,Ar=y_/M_,Vo=Math.sqrt(Ar*Ar+1)-Ar,w_=Vo<1e-9?-18:Math.log(Vo);return w_}function Yt(Rt){return(Math.exp(Rt)-Math.exp(-Rt))/2}function qt(Rt){return(Math.exp(Rt)+Math.exp(-Rt))/2}function pe(Rt){return Yt(Rt)/qt(Rt)}var re=st(0);function $i(Rt){return b*(qt(re)/qt(re+q*Rt))}function __(Rt){return b*(qt(re)*pe(re+q*Rt)-Yt(re))/V}function p_(Rt){return 1-Math.pow(1-Rt,1.5)}var m_=Date.now(),jo=(st(1)-re)/q,g_=a.duration?1e3*a.duration:1e3*jo*.8;function Ko(){var Rt=(Date.now()-m_)/g_,xs=p_(Rt)*jo;Rt<=1?(this._flyToFrame=vt(Ko,this),this._move(this.unproject(c.add(d.subtract(c).multiplyBy(__(xs)/I)),y),this.getScaleZoom(b/$i(xs),y),{flyTo:!0})):this._move(t,n)._moveEnd(!0)}return this._moveStart(!0,a.noMoveStart),Ko.call(this),this},flyToBounds:function(t,n){var a=this._getBoundsCenterZoom(t,n);return this.flyTo(a.center,a.zoom,n)},setMaxBounds:function(t){return t=R(t),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),t.isValid()?(this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(t){var n=this.options.minZoom;return this.options.minZoom=t,this._loaded&&n!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var n=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&n!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,n){this._enforcingBounds=!0;var a=this.getCenter(),c=this._limitCenter(a,this._zoom,R(t));return a.equals(c)||this.panTo(c,n),this._enforcingBounds=!1,this},panInside:function(t,n){n=n||{};var a=T(n.paddingTopLeft||n.padding||[0,0]),c=T(n.paddingBottomRight||n.padding||[0,0]),d=this.project(this.getCenter()),p=this.project(t),y=this.getPixelBounds(),b=A([y.min.add(a),y.max.subtract(c)]),S=b.getSize();if(!b.contains(p)){this._enforcingBounds=!0;var I=p.subtract(b.getCenter()),q=b.extend(p).getSize().subtract(S);d.x+=I.x<0?-q.x:q.x,d.y+=I.y<0?-q.y:q.y,this.panTo(this.unproject(d),n),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=o({animate:!1,pan:!0},t===!0?{animate:!0}:t);var n=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var a=this.getSize(),c=n.divideBy(2).round(),d=a.divideBy(2).round(),p=c.subtract(d);return!p.x&&!p.y?this:(t.animate&&t.pan?this.panBy(p):(t.pan&&this._rawPanBy(p),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(l(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:n,newSize:a}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=o({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var n=l(this._handleGeolocationResponse,this),a=l(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(n,a,t):navigator.geolocation.getCurrentPosition(n,a,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var n=t.code,a=t.message||(n===1?"permission denied":n===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:n,message:"Geolocation error: "+a+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var n=t.coords.latitude,a=t.coords.longitude,c=new F(n,a),d=c.toBounds(t.coords.accuracy*2),p=this._locateOptions;if(p.setView){var y=this.getBoundsZoom(d);this.setView(c,p.maxZoom?Math.min(y,p.maxZoom):y)}var b={latlng:c,bounds:d,timestamp:t.timestamp};for(var S in t.coords)typeof t.coords[S]=="number"&&(b[S]=t.coords[S]);this.fire("locationfound",b)}},addHandler:function(t,n){if(!n)return this;var a=this[t]=new n(this);return this._handlers.push(a),this.options[t]&&a.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),At(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(St(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var t;for(t in this._layers)this._layers[t].remove();for(t in this._panes)At(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,n){var a="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),c=ct("div",a,n||this._mapPane);return t&&(this._panes[t]=c),c},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),n=this.unproject(t.getBottomLeft()),a=this.unproject(t.getTopRight());return new N(n,a)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,n,a){t=R(t),a=T(a||[0,0]);var c=this.getZoom()||0,d=this.getMinZoom(),p=this.getMaxZoom(),y=t.getNorthWest(),b=t.getSouthEast(),S=this.getSize().subtract(a),I=A(this.project(b,c),this.project(y,c)).getSize(),q=W.any3d?this.options.zoomSnap:1,V=S.x/I.x,st=S.y/I.y,Yt=n?Math.max(V,st):Math.min(V,st);return c=this.getScaleZoom(Yt,c),q&&(c=Math.round(c/(q/100))*(q/100),c=n?Math.ceil(c/q)*q:Math.floor(c/q)*q),Math.max(d,Math.min(p,c))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new P(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,n){var a=this._getTopLeftPoint(t,n);return new G(a,a.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(t===void 0?this.getZoom():t)},getPane:function(t){return typeof t=="string"?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,n){var a=this.options.crs;return n=n===void 0?this._zoom:n,a.scale(t)/a.scale(n)},getScaleZoom:function(t,n){var a=this.options.crs;n=n===void 0?this._zoom:n;var c=a.zoom(t*a.scale(n));return isNaN(c)?1/0:c},project:function(t,n){return n=n===void 0?this._zoom:n,this.options.crs.latLngToPoint(H(t),n)},unproject:function(t,n){return n=n===void 0?this._zoom:n,this.options.crs.pointToLatLng(T(t),n)},layerPointToLatLng:function(t){var n=T(t).add(this.getPixelOrigin());return this.unproject(n)},latLngToLayerPoint:function(t){var n=this.project(H(t))._round();return n._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(H(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(R(t))},distance:function(t,n){return this.options.crs.distance(H(t),H(n))},containerPointToLayerPoint:function(t){return T(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return T(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var n=this.containerPointToLayerPoint(T(t));return this.layerPointToLatLng(n)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(H(t)))},mouseEventToContainerPoint:function(t){return fo(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var n=this._container=ho(t);if(n){if(n._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");J(n,"scroll",this._onScroll,this),this._containerId=f(n)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&W.any3d,Y(t,"leaflet-container"+(W.touch?" leaflet-touch":"")+(W.retina?" leaflet-retina":"")+(W.ielt9?" leaflet-oldie":"")+(W.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var n=Tn(t,"position");n!=="absolute"&&n!=="relative"&&n!=="fixed"&&n!=="sticky"&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),kt(this._mapPane,new P(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Y(t.markerPane,"leaflet-zoom-hide"),Y(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,n,a){kt(this._mapPane,new P(0,0));var c=!this._loaded;this._loaded=!0,n=this._limitZoom(n),this.fire("viewprereset");var d=this._zoom!==n;this._moveStart(d,a)._move(t,n)._moveEnd(d),this.fire("viewreset"),c&&this.fire("load")},_moveStart:function(t,n){return t&&this.fire("zoomstart"),n||this.fire("movestart"),this},_move:function(t,n,a,c){n===void 0&&(n=this._zoom);var d=this._zoom!==n;return this._zoom=n,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),c?a&&a.pinch&&this.fire("zoom",a):((d||a&&a.pinch)&&this.fire("zoom",a),this.fire("move",a)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return St(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){kt(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[f(this._container)]=this;var n=t?wt:J;n(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&n(window,"resize",this._onResize,this),W.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){St(this._resizeRequest),this._resizeRequest=vt(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,n){for(var a=[],c,d=n==="mouseout"||n==="mouseover",p=t.target||t.srcElement,y=!1;p;){if(c=this._targets[f(p)],c&&(n==="click"||n==="preclick")&&this._draggableMoved(c)){y=!0;break}if(c&&c.listens(n,!0)&&(d&&!mr(p,t)||(a.push(c),d))||p===this._container)break;p=p.parentNode}return!a.length&&!y&&!d&&this.listens(n,!0)&&(a=[this]),a},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var n=t.target||t.srcElement;if(!(!this._loaded||n._leaflet_disable_events||t.type==="click"&&this._isClickDisabled(n))){var a=t.type;a==="mousedown"&&cr(n),this._fireDOMEvent(t,a)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,n,a){if(t.type==="click"){var c=o({},t);c.type="preclick",this._fireDOMEvent(c,c.type,a)}var d=this._findEventTargets(t,n);if(a){for(var p=[],y=0;y<a.length;y++)a[y].listens(n,!0)&&p.push(a[y]);d=p.concat(d)}if(d.length){n==="contextmenu"&&Wt(t);var b=d[0],S={originalEvent:t};if(t.type!=="keypress"&&t.type!=="keydown"&&t.type!=="keyup"){var I=b.getLatLng&&(!b._radius||b._radius<=10);S.containerPoint=I?this.latLngToContainerPoint(b.getLatLng()):this.mouseEventToContainerPoint(t),S.layerPoint=this.containerPointToLayerPoint(S.containerPoint),S.latlng=I?b.getLatLng():this.layerPointToLatLng(S.layerPoint)}for(y=0;y<d.length;y++)if(d[y].fire(n,S,!0),S.originalEvent._stopped||d[y].options.bubblingMouseEvents===!1&&lt(this._mouseEvents,n)!==-1)return}},_draggableMoved:function(t){return t=t.dragging&&t.dragging.enabled()?t:this,t.dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,n=this._handlers.length;t<n;t++)this._handlers[t].disable()},whenReady:function(t,n){return this._loaded?t.call(n||this,{target:this}):this.on("load",t,n),this},_getMapPanePos:function(){return ci(this._mapPane)||new P(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,n){var a=t&&n!==void 0?this._getNewPixelOrigin(t,n):this.getPixelOrigin();return a.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,n){var a=this.getSize()._divideBy(2);return this.project(t,n)._subtract(a)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,n,a){var c=this._getNewPixelOrigin(a,n);return this.project(t,n)._subtract(c)},_latLngBoundsToNewLayerBounds:function(t,n,a){var c=this._getNewPixelOrigin(a,n);return A([this.project(t.getSouthWest(),n)._subtract(c),this.project(t.getNorthWest(),n)._subtract(c),this.project(t.getSouthEast(),n)._subtract(c),this.project(t.getNorthEast(),n)._subtract(c)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,n,a){if(!a)return t;var c=this.project(t,n),d=this.getSize().divideBy(2),p=new G(c.subtract(d),c.add(d)),y=this._getBoundsOffset(p,a,n);return Math.abs(y.x)<=1&&Math.abs(y.y)<=1?t:this.unproject(c.add(y),n)},_limitOffset:function(t,n){if(!n)return t;var a=this.getPixelBounds(),c=new G(a.min.add(t),a.max.add(t));return t.add(this._getBoundsOffset(c,n))},_getBoundsOffset:function(t,n,a){var c=A(this.project(n.getNorthEast(),a),this.project(n.getSouthWest(),a)),d=c.min.subtract(t.min),p=c.max.subtract(t.max),y=this._rebound(d.x,-p.x),b=this._rebound(d.y,-p.y);return new P(y,b)},_rebound:function(t,n){return t+n>0?Math.round(t-n)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(n))},_limitZoom:function(t){var n=this.getMinZoom(),a=this.getMaxZoom(),c=W.any3d?this.options.zoomSnap:1;return c&&(t=Math.round(t/c)*c),Math.max(n,Math.min(a,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Gt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,n){var a=this._getCenterOffset(t)._trunc();return(n&&n.animate)!==!0&&!this.getSize().contains(a)?!1:(this.panBy(a,n),!0)},_createAnimProxy:function(){var t=this._proxy=ct("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(n){var a=nr,c=this._proxy.style[a];li(this._proxy,this.project(n.center,n.zoom),this.getZoomScale(n.zoom,1)),c===this._proxy.style[a]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){At(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),n=this.getZoom();li(this._proxy,this.project(t,n),this.getZoomScale(n,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,n,a){if(this._animatingZoom)return!0;if(a=a||{},!this._zoomAnimated||a.animate===!1||this._nothingToAnimate()||Math.abs(n-this._zoom)>this.options.zoomAnimationThreshold)return!1;var c=this.getZoomScale(n),d=this._getCenterOffset(t)._divideBy(1-1/c);return a.animate!==!0&&!this.getSize().contains(d)?!1:(vt(function(){this._moveStart(!0,a.noMoveStart||!1)._animateZoom(t,n,!0)},this),!0)},_animateZoom:function(t,n,a,c){this._mapPane&&(a&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=n,Y(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:n,noUpdate:c}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(l(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Gt(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function N0(t,n){return new ot(t,n)}var ye=Ut.extend({options:{position:"topright"},initialize:function(t){x(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var n=this._map;return n&&n.removeControl(this),this.options.position=t,n&&n.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var n=this._container=this.onAdd(t),a=this.getPosition(),c=t._controlCorners[a];return Y(n,"leaflet-control"),a.indexOf("bottom")!==-1?c.insertBefore(n,c.firstChild):c.appendChild(n),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(At(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),kn=function(t){return new ye(t)};ot.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},n="leaflet-",a=this._controlContainer=ct("div",n+"control-container",this._container);function c(d,p){var y=n+d+" "+n+p;t[d+p]=ct("div",y,a)}c("top","left"),c("top","right"),c("bottom","left"),c("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)At(this._controlCorners[t]);At(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var mo=ye.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,n,a,c){return a<c?-1:c<a?1:0}},initialize:function(t,n,a){x(this,a),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var c in t)this._addLayer(t[c],c);for(c in n)this._addLayer(n[c],c,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var n=0;n<this._layers.length;n++)this._layers[n].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return ye.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,n){return this._addLayer(t,n),this._map?this._update():this},addOverlay:function(t,n){return this._addLayer(t,n,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var n=this._getLayer(f(t));return n&&this._layers.splice(this._layers.indexOf(n),1),this._map?this._update():this},expand:function(){Y(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(Y(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):Gt(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return Gt(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",n=this._container=ct("div",t),a=this.options.collapsed;n.setAttribute("aria-haspopup",!0),On(n),pr(n);var c=this._section=ct("section",t+"-list");a&&(this._map.on("click",this.collapse,this),J(n,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var d=this._layersLink=ct("a",t+"-toggle",n);d.href="#",d.title="Layers",d.setAttribute("role","button"),J(d,{keydown:function(p){p.keyCode===13&&this._expandSafely()},click:function(p){Wt(p),this._expandSafely()}},this),a||this.expand(),this._baseLayersList=ct("div",t+"-base",c),this._separator=ct("div",t+"-separator",c),this._overlaysList=ct("div",t+"-overlays",c),n.appendChild(c)},_getLayer:function(t){for(var n=0;n<this._layers.length;n++)if(this._layers[n]&&f(this._layers[n].layer)===t)return this._layers[n]},_addLayer:function(t,n,a){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:n,overlay:a}),this.options.sortLayers&&this._layers.sort(l(function(c,d){return this.options.sortFunction(c.layer,d.layer,c.name,d.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;as(this._baseLayersList),as(this._overlaysList),this._layerControlInputs=[];var t,n,a,c,d=0;for(a=0;a<this._layers.length;a++)c=this._layers[a],this._addItem(c),n=n||c.overlay,t=t||!c.overlay,d+=c.overlay?0:1;return this.options.hideSingleBase&&(t=t&&d>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=n&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var n=this._getLayer(f(t.target)),a=n.overlay?t.type==="add"?"overlayadd":"overlayremove":t.type==="add"?"baselayerchange":null;a&&this._map.fire(a,n)},_createRadioElement:function(t,n){var a='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(n?' checked="checked"':"")+"/>",c=document.createElement("div");return c.innerHTML=a,c.firstChild},_addItem:function(t){var n=document.createElement("label"),a=this._map.hasLayer(t.layer),c;t.overlay?(c=document.createElement("input"),c.type="checkbox",c.className="leaflet-control-layers-selector",c.defaultChecked=a):c=this._createRadioElement("leaflet-base-layers_"+f(this),a),this._layerControlInputs.push(c),c.layerId=f(t.layer),J(c,"click",this._onInputClick,this);var d=document.createElement("span");d.innerHTML=" "+t.name;var p=document.createElement("span");n.appendChild(p),p.appendChild(c),p.appendChild(d);var y=t.overlay?this._overlaysList:this._baseLayersList;return y.appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){if(!this._preventClick){var t=this._layerControlInputs,n,a,c=[],d=[];this._handlingClick=!0;for(var p=t.length-1;p>=0;p--)n=t[p],a=this._getLayer(n.layerId).layer,n.checked?c.push(a):n.checked||d.push(a);for(p=0;p<d.length;p++)this._map.hasLayer(d[p])&&this._map.removeLayer(d[p]);for(p=0;p<c.length;p++)this._map.hasLayer(c[p])||this._map.addLayer(c[p]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var t=this._layerControlInputs,n,a,c=this._map.getZoom(),d=t.length-1;d>=0;d--)n=t[d],a=this._getLayer(n.layerId).layer,n.disabled=a.options.minZoom!==void 0&&c<a.options.minZoom||a.options.maxZoom!==void 0&&c>a.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,J(t,"click",Wt),this.expand();var n=this;setTimeout(function(){wt(t,"click",Wt),n._preventClick=!1})}}),G0=function(t,n,a){return new mo(t,n,a)},gr=ye.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(t){var n="leaflet-control-zoom",a=ct("div",n+" leaflet-bar"),c=this.options;return this._zoomInButton=this._createButton(c.zoomInText,c.zoomInTitle,n+"-in",a,this._zoomIn),this._zoomOutButton=this._createButton(c.zoomOutText,c.zoomOutTitle,n+"-out",a,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),a},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,n,a,c,d){var p=ct("a",a,c);return p.innerHTML=t,p.href="#",p.title=n,p.setAttribute("role","button"),p.setAttribute("aria-label",n),On(p),J(p,"click",fi),J(p,"click",d,this),J(p,"click",this._refocusOnMap,this),p},_updateDisabled:function(){var t=this._map,n="leaflet-disabled";Gt(this._zoomInButton,n),Gt(this._zoomOutButton,n),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(Y(this._zoomOutButton,n),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(Y(this._zoomInButton,n),this._zoomInButton.setAttribute("aria-disabled","true"))}});ot.mergeOptions({zoomControl:!0}),ot.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new gr,this.addControl(this.zoomControl))});var I0=function(t){return new gr(t)},go=ye.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var n="leaflet-control-scale",a=ct("div",n),c=this.options;return this._addScales(c,n+"-line",a),t.on(c.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),a},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,n,a){t.metric&&(this._mScale=ct("div",n,a)),t.imperial&&(this._iScale=ct("div",n,a))},_update:function(){var t=this._map,n=t.getSize().y/2,a=t.distance(t.containerPointToLatLng([0,n]),t.containerPointToLatLng([this.options.maxWidth,n]));this._updateScales(a)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var n=this._getRoundNum(t),a=n<1e3?n+" m":n/1e3+" km";this._updateScale(this._mScale,a,n/t)},_updateImperial:function(t){var n=t*3.2808399,a,c,d;n>5280?(a=n/5280,c=this._getRoundNum(a),this._updateScale(this._iScale,c+" mi",c/a)):(d=this._getRoundNum(n),this._updateScale(this._iScale,d+" ft",d/n))},_updateScale:function(t,n,a){t.style.width=Math.round(this.options.maxWidth*a)+"px",t.innerHTML=n},_getRoundNum:function(t){var n=Math.pow(10,(Math.floor(t)+"").length-1),a=t/n;return a=a>=10?10:a>=5?5:a>=3?3:a>=2?2:1,n*a}}),O0=function(t){return new go(t)},k0='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',vr=ye.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(W.inlineSvg?k0+" ":"")+"Leaflet</a>"},initialize:function(t){x(this,t),this._attributions={}},onAdd:function(t){t.attributionControl=this,this._container=ct("div","leaflet-control-attribution"),On(this._container);for(var n in t._layers)t._layers[n].getAttribution&&this.addAttribution(t._layers[n].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var n in this._attributions)this._attributions[n]&&t.push(n);var a=[];this.options.prefix&&a.push(this.options.prefix),t.length&&a.push(t.join(", ")),this._container.innerHTML=a.join(' <span aria-hidden="true">|</span> ')}}});ot.mergeOptions({attributionControl:!0}),ot.addInitHook(function(){this.options.attributionControl&&new vr().addTo(this)});var R0=function(t){return new vr(t)};ye.Layers=mo,ye.Zoom=gr,ye.Scale=go,ye.Attribution=vr,kn.layers=G0,kn.zoom=I0,kn.scale=O0,kn.attribution=R0;var Se=Ut.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Se.addTo=function(t,n){return t.addHandler(n,this),this};var z0={Events:It},vo=W.touch?"touchstart mousedown":"mousedown",Ke=he.extend({options:{clickTolerance:3},initialize:function(t,n,a,c){x(this,c),this._element=t,this._dragStartTarget=n||t,this._preventOutline=a},enable:function(){this._enabled||(J(this._dragStartTarget,vo,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Ke._dragging===this&&this.finishDrag(!0),wt(this._dragStartTarget,vo,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!sr(this._element,"leaflet-zoom-anim"))){if(t.touches&&t.touches.length!==1){Ke._dragging===this&&this.finishDrag();return}if(!(Ke._dragging||t.shiftKey||t.which!==1&&t.button!==1&&!t.touches)&&(Ke._dragging=this,this._preventOutline&&cr(this._element),or(),Nn(),!this._moving)){this.fire("down");var n=t.touches?t.touches[0]:t,a=lo(this._element);this._startPoint=new P(n.clientX,n.clientY),this._startPos=ci(this._element),this._parentScale=ur(a);var c=t.type==="mousedown";J(document,c?"mousemove":"touchmove",this._onMove,this),J(document,c?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(t){if(this._enabled){if(t.touches&&t.touches.length>1){this._moved=!0;return}var n=t.touches&&t.touches.length===1?t.touches[0]:t,a=new P(n.clientX,n.clientY)._subtract(this._startPoint);!a.x&&!a.y||Math.abs(a.x)+Math.abs(a.y)<this.options.clickTolerance||(a.x/=this._parentScale.x,a.y/=this._parentScale.y,Wt(t),this._moved||(this.fire("dragstart"),this._moved=!0,Y(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),Y(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(a),this._moving=!0,this._lastEvent=t,this._updatePosition())}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),kt(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){Gt(document.body,"leaflet-dragging"),this._lastTarget&&(Gt(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),wt(document,"mousemove touchmove",this._onMove,this),wt(document,"mouseup touchend touchcancel",this._onUp,this),hr(),Gn();var n=this._moved&&this._moving;this._moving=!1,Ke._dragging=!1,n&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}});function yo(t,n,a){var c,d=[1,4,2,8],p,y,b,S,I,q,V,st;for(p=0,q=t.length;p<q;p++)t[p]._code=di(t[p],n);for(b=0;b<4;b++){for(V=d[b],c=[],p=0,q=t.length,y=q-1;p<q;y=p++)S=t[p],I=t[y],S._code&V?I._code&V||(st=us(I,S,V,n,a),st._code=di(st,n),c.push(st)):(I._code&V&&(st=us(I,S,V,n,a),st._code=di(st,n),c.push(st)),c.push(S));t=c}return t}function Mo(t,n){var a,c,d,p,y,b,S,I,q;if(!t||t.length===0)throw new Error("latlngs not passed");_e(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var V=H([0,0]),st=R(t),Yt=st.getNorthWest().distanceTo(st.getSouthWest())*st.getNorthEast().distanceTo(st.getNorthWest());Yt<1700&&(V=yr(t));var qt=t.length,pe=[];for(a=0;a<qt;a++){var re=H(t[a]);pe.push(n.project(H([re.lat-V.lat,re.lng-V.lng])))}for(b=S=I=0,a=0,c=qt-1;a<qt;c=a++)d=pe[a],p=pe[c],y=d.y*p.x-p.y*d.x,S+=(d.x+p.x)*y,I+=(d.y+p.y)*y,b+=y*3;b===0?q=pe[0]:q=[S/b,I/b];var $i=n.unproject(T(q));return H([$i.lat+V.lat,$i.lng+V.lng])}function yr(t){for(var n=0,a=0,c=0,d=0;d<t.length;d++){var p=H(t[d]);n+=p.lat,a+=p.lng,c++}return H([n/c,a/c])}var D0={__proto__:null,clipPolygon:yo,polygonCenter:Mo,centroid:yr};function wo(t,n){if(!n||!t.length)return t.slice();var a=n*n;return t=Z0(t,a),t=U0(t,a),t}function xo(t,n,a){return Math.sqrt(Rn(t,n,a,!0))}function B0(t,n,a){return Rn(t,n,a)}function U0(t,n){var a=t.length,c=typeof Uint8Array!=void 0+""?Uint8Array:Array,d=new c(a);d[0]=d[a-1]=1,Mr(t,d,n,0,a-1);var p,y=[];for(p=0;p<a;p++)d[p]&&y.push(t[p]);return y}function Mr(t,n,a,c,d){var p=0,y,b,S;for(b=c+1;b<=d-1;b++)S=Rn(t[b],t[c],t[d],!0),S>p&&(y=b,p=S);p>a&&(n[y]=1,Mr(t,n,a,c,y),Mr(t,n,a,y,d))}function Z0(t,n){for(var a=[t[0]],c=1,d=0,p=t.length;c<p;c++)q0(t[c],t[d])>n&&(a.push(t[c]),d=c);return d<p-1&&a.push(t[p-1]),a}var bo;function Eo(t,n,a,c,d){var p=c?bo:di(t,a),y=di(n,a),b,S,I;for(bo=y;;){if(!(p|y))return[t,n];if(p&y)return!1;b=p||y,S=us(t,n,b,a,d),I=di(S,a),b===p?(t=S,p=I):(n=S,y=I)}}function us(t,n,a,c,d){var p=n.x-t.x,y=n.y-t.y,b=c.min,S=c.max,I,q;return a&8?(I=t.x+p*(S.y-t.y)/y,q=S.y):a&4?(I=t.x+p*(b.y-t.y)/y,q=b.y):a&2?(I=S.x,q=t.y+y*(S.x-t.x)/p):a&1&&(I=b.x,q=t.y+y*(b.x-t.x)/p),new P(I,q,d)}function di(t,n){var a=0;return t.x<n.min.x?a|=1:t.x>n.max.x&&(a|=2),t.y<n.min.y?a|=4:t.y>n.max.y&&(a|=8),a}function q0(t,n){var a=n.x-t.x,c=n.y-t.y;return a*a+c*c}function Rn(t,n,a,c){var d=n.x,p=n.y,y=a.x-d,b=a.y-p,S=y*y+b*b,I;return S>0&&(I=((t.x-d)*y+(t.y-p)*b)/S,I>1?(d=a.x,p=a.y):I>0&&(d+=y*I,p+=b*I)),y=t.x-d,b=t.y-p,c?y*y+b*b:new P(d,p)}function _e(t){return!$(t[0])||typeof t[0][0]!="object"&&typeof t[0][0]<"u"}function Po(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),_e(t)}function So(t,n){var a,c,d,p,y,b,S,I;if(!t||t.length===0)throw new Error("latlngs not passed");_e(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var q=H([0,0]),V=R(t),st=V.getNorthWest().distanceTo(V.getSouthWest())*V.getNorthEast().distanceTo(V.getNorthWest());st<1700&&(q=yr(t));var Yt=t.length,qt=[];for(a=0;a<Yt;a++){var pe=H(t[a]);qt.push(n.project(H([pe.lat-q.lat,pe.lng-q.lng])))}for(a=0,c=0;a<Yt-1;a++)c+=qt[a].distanceTo(qt[a+1])/2;if(c===0)I=qt[0];else for(a=0,p=0;a<Yt-1;a++)if(y=qt[a],b=qt[a+1],d=y.distanceTo(b),p+=d,p>c){S=(p-c)/d,I=[b.x-S*(b.x-y.x),b.y-S*(b.y-y.y)];break}var re=n.unproject(T(I));return H([re.lat+q.lat,re.lng+q.lng])}var $0={__proto__:null,simplify:wo,pointToSegmentDistance:xo,closestPointOnSegment:B0,clipSegment:Eo,_getEdgeIntersection:us,_getBitCode:di,_sqClosestPointOnSegment:Rn,isFlat:_e,_flat:Po,polylineCenter:So},wr={project:function(t){return new P(t.lng,t.lat)},unproject:function(t){return new F(t.y,t.x)},bounds:new G([-180,-90],[180,90])},xr={R:6378137,R_MINOR:6356752314245179e-9,bounds:new G([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(t){var n=Math.PI/180,a=this.R,c=t.lat*n,d=this.R_MINOR/a,p=Math.sqrt(1-d*d),y=p*Math.sin(c),b=Math.tan(Math.PI/4-c/2)/Math.pow((1-y)/(1+y),p/2);return c=-a*Math.log(Math.max(b,1e-10)),new P(t.lng*n*a,c)},unproject:function(t){for(var n=180/Math.PI,a=this.R,c=this.R_MINOR/a,d=Math.sqrt(1-c*c),p=Math.exp(-t.y/a),y=Math.PI/2-2*Math.atan(p),b=0,S=.1,I;b<15&&Math.abs(S)>1e-7;b++)I=d*Math.sin(y),I=Math.pow((1-I)/(1+I),d/2),S=Math.PI/2-2*Math.atan(p*I)-y,y+=S;return new F(y*n,t.x*n/a)}},F0={__proto__:null,LonLat:wr,Mercator:xr,SphericalMercator:tt},H0=o({},it,{code:"EPSG:3395",projection:xr,transformation:function(){var t=.5/(Math.PI*xr.R);return z(t,.5,-t,.5)}()}),Ao=o({},it,{code:"EPSG:4326",projection:wr,transformation:z(1/180,1,-1/180,.5)}),W0=o({},K,{projection:wr,transformation:z(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,n){var a=n.lng-t.lng,c=n.lat-t.lat;return Math.sqrt(a*a+c*c)},infinite:!0});K.Earth=it,K.EPSG3395=H0,K.EPSG3857=X,K.EPSG900913=ht,K.EPSG4326=Ao,K.Simple=W0;var Me=he.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[f(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[f(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var n=t.target;if(n.hasLayer(this)){if(this._map=n,this._zoomAnimated=n._zoomAnimated,this.getEvents){var a=this.getEvents();n.on(a,this),this.once("remove",function(){n.off(a,this)},this)}this.onAdd(n),this.fire("add"),n.fire("layeradd",{layer:this})}}});ot.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var n=f(t);return this._layers[n]?this:(this._layers[n]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var n=f(t);return this._layers[n]?(this._loaded&&t.onRemove(this),delete this._layers[n],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return f(t)in this._layers},eachLayer:function(t,n){for(var a in this._layers)t.call(n,this._layers[a]);return this},_addLayers:function(t){t=t?$(t)?t:[t]:[];for(var n=0,a=t.length;n<a;n++)this.addLayer(t[n])},_addZoomLimit:function(t){(!isNaN(t.options.maxZoom)||!isNaN(t.options.minZoom))&&(this._zoomBoundLayers[f(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var n=f(t);this._zoomBoundLayers[n]&&(delete this._zoomBoundLayers[n],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,n=-1/0,a=this._getZoomSpan();for(var c in this._zoomBoundLayers){var d=this._zoomBoundLayers[c].options;t=d.minZoom===void 0?t:Math.min(t,d.minZoom),n=d.maxZoom===void 0?n:Math.max(n,d.maxZoom)}this._layersMaxZoom=n===-1/0?void 0:n,this._layersMinZoom=t===1/0?void 0:t,a!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Di=Me.extend({initialize:function(t,n){x(this,n),this._layers={};var a,c;if(t)for(a=0,c=t.length;a<c;a++)this.addLayer(t[a])},addLayer:function(t){var n=this.getLayerId(t);return this._layers[n]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var n=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[n]&&this._map.removeLayer(this._layers[n]),delete this._layers[n],this},hasLayer:function(t){var n=typeof t=="number"?t:this.getLayerId(t);return n in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var n=Array.prototype.slice.call(arguments,1),a,c;for(a in this._layers)c=this._layers[a],c[t]&&c[t].apply(c,n);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,n){for(var a in this._layers)t.call(n,this._layers[a]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return f(t)}}),j0=function(t,n){return new Di(t,n)},Ge=Di.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Di.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),Di.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new N;for(var n in this._layers){var a=this._layers[n];t.extend(a.getBounds?a.getBounds():a.getLatLng())}return t}}),K0=function(t,n){return new Ge(t,n)},Bi=Ut.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){x(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,n){var a=this._getIconUrl(t);if(!a){if(t==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var c=this._createImg(a,n&&n.tagName==="IMG"?n:null);return this._setIconStyles(c,t),(this.options.crossOrigin||this.options.crossOrigin==="")&&(c.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),c},_setIconStyles:function(t,n){var a=this.options,c=a[n+"Size"];typeof c=="number"&&(c=[c,c]);var d=T(c),p=T(n==="shadow"&&a.shadowAnchor||a.iconAnchor||d&&d.divideBy(2,!0));t.className="leaflet-marker-"+n+" "+(a.className||""),p&&(t.style.marginLeft=-p.x+"px",t.style.marginTop=-p.y+"px"),d&&(t.style.width=d.x+"px",t.style.height=d.y+"px")},_createImg:function(t,n){return n=n||document.createElement("img"),n.src=t,n},_getIconUrl:function(t){return W.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function V0(t){return new Bi(t)}var zn=Bi.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return typeof zn.imagePath!="string"&&(zn.imagePath=this._detectIconPath()),(this.options.imagePath||zn.imagePath)+Bi.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var n=function(a,c,d){var p=c.exec(a);return p&&p[d]};return t=n(t,/^url\((['"])?(.+)\1\)$/,2),t&&n(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=ct("div","leaflet-default-icon-path",document.body),n=Tn(t,"background-image")||Tn(t,"backgroundImage");if(document.body.removeChild(t),n=this._stripUrl(n),n)return n;var a=document.querySelector('link[href$="leaflet.css"]');return a?a.href.substring(0,a.href.length-11-1):""}}),Lo=Se.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new Ke(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),Y(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&Gt(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var n=this._marker,a=n._map,c=this._marker.options.autoPanSpeed,d=this._marker.options.autoPanPadding,p=ci(n._icon),y=a.getPixelBounds(),b=a.getPixelOrigin(),S=A(y.min._subtract(b).add(d),y.max._subtract(b).subtract(d));if(!S.contains(p)){var I=T((Math.max(S.max.x,p.x)-S.max.x)/(y.max.x-S.max.x)-(Math.min(S.min.x,p.x)-S.min.x)/(y.min.x-S.min.x),(Math.max(S.max.y,p.y)-S.max.y)/(y.max.y-S.max.y)-(Math.min(S.min.y,p.y)-S.min.y)/(y.min.y-S.min.y)).multiplyBy(c);a.panBy(I,{animate:!1}),this._draggable._newPos._add(I),this._draggable._startPos._add(I),kt(n._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=vt(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(St(this._panRequest),this._panRequest=vt(this._adjustPan.bind(this,t)))},_onDrag:function(t){var n=this._marker,a=n._shadow,c=ci(n._icon),d=n._map.layerPointToLatLng(c);a&&kt(a,c),n._latlng=d,t.latlng=d,t.oldLatLng=this._oldLatLng,n.fire("move",t).fire("drag",t)},_onDragEnd:function(t){St(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),fs=Me.extend({options:{icon:new zn,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,n){x(this,n),this._latlng=H(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var n=this._latlng;return this._latlng=H(t),this.update(),this.fire("move",{oldLatLng:n,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,n="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),a=t.icon.createIcon(this._icon),c=!1;a!==this._icon&&(this._icon&&this._removeIcon(),c=!0,t.title&&(a.title=t.title),a.tagName==="IMG"&&(a.alt=t.alt||"")),Y(a,n),t.keyboard&&(a.tabIndex="0",a.setAttribute("role","button")),this._icon=a,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&J(a,"focus",this._panOnFocus,this);var d=t.icon.createShadow(this._shadow),p=!1;d!==this._shadow&&(this._removeShadow(),p=!0),d&&(Y(d,n),d.alt=""),this._shadow=d,t.opacity<1&&this._updateOpacity(),c&&this.getPane().appendChild(this._icon),this._initInteraction(),d&&p&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&wt(this._icon,"focus",this._panOnFocus,this),At(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&At(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&kt(this._icon,t),this._shadow&&kt(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){var n=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(n)},_initInteraction:function(){if(this.options.interactive&&(Y(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Lo)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Lo(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&de(this._icon,t),this._shadow&&de(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var t=this._map;if(t){var n=this.options.icon.options,a=n.iconSize?T(n.iconSize):T(0,0),c=n.iconAnchor?T(n.iconAnchor):T(0,0);t.panInside(this._latlng,{paddingTopLeft:c,paddingBottomRight:a.subtract(c)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function J0(t,n){return new fs(t,n)}var Ve=Me.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return x(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),ds=Ve.extend({options:{fill:!0,radius:10},initialize:function(t,n){x(this,n),this._latlng=H(t),this._radius=this.options.radius},setLatLng:function(t){var n=this._latlng;return this._latlng=H(t),this.redraw(),this.fire("move",{oldLatLng:n,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var n=t&&t.radius||this._radius;return Ve.prototype.setStyle.call(this,t),this.setRadius(n),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,n=this._radiusY||t,a=this._clickTolerance(),c=[t+a,n+a];this._pxBounds=new G(this._point.subtract(c),this._point.add(c))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function X0(t,n){return new ds(t,n)}var br=ds.extend({initialize:function(t,n,a){if(typeof n=="number"&&(n=o({},a,{radius:n})),x(this,n),this._latlng=H(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new N(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:Ve.prototype.setStyle,_project:function(){var t=this._latlng.lng,n=this._latlng.lat,a=this._map,c=a.options.crs;if(c.distance===it.distance){var d=Math.PI/180,p=this._mRadius/it.R/d,y=a.project([n+p,t]),b=a.project([n-p,t]),S=y.add(b).divideBy(2),I=a.unproject(S).lat,q=Math.acos((Math.cos(p*d)-Math.sin(n*d)*Math.sin(I*d))/(Math.cos(n*d)*Math.cos(I*d)))/d;(isNaN(q)||q===0)&&(q=p/Math.cos(Math.PI/180*n)),this._point=S.subtract(a.getPixelOrigin()),this._radius=isNaN(q)?0:S.x-a.project([I,t-q]).x,this._radiusY=S.y-y.y}else{var V=c.unproject(c.project(this._latlng).subtract([this._mRadius,0]));this._point=a.latLngToLayerPoint(this._latlng),this._radius=this._point.x-a.latLngToLayerPoint(V).x}this._updateBounds()}});function Q0(t,n,a){return new br(t,n,a)}var Ie=Ve.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,n){x(this,n),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var n=1/0,a=null,c=Rn,d,p,y=0,b=this._parts.length;y<b;y++)for(var S=this._parts[y],I=1,q=S.length;I<q;I++){d=S[I-1],p=S[I];var V=c(t,d,p,!0);V<n&&(n=V,a=c(t,d,p))}return a&&(a.distance=Math.sqrt(n)),a},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return So(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(t,n){return n=n||this._defaultShape(),t=H(t),n.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new N,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return _e(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var n=[],a=_e(t),c=0,d=t.length;c<d;c++)a?(n[c]=H(t[c]),this._bounds.extend(n[c])):n[c]=this._convertLatLngs(t[c]);return n},_project:function(){var t=new G;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),n=new P(t,t);this._rawPxBounds&&(this._pxBounds=new G([this._rawPxBounds.min.subtract(n),this._rawPxBounds.max.add(n)]))},_projectLatlngs:function(t,n,a){var c=t[0]instanceof F,d=t.length,p,y;if(c){for(y=[],p=0;p<d;p++)y[p]=this._map.latLngToLayerPoint(t[p]),a.extend(y[p]);n.push(y)}else for(p=0;p<d;p++)this._projectLatlngs(t[p],n,a)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(t))){if(this.options.noClip){this._parts=this._rings;return}var n=this._parts,a,c,d,p,y,b,S;for(a=0,d=0,p=this._rings.length;a<p;a++)for(S=this._rings[a],c=0,y=S.length;c<y-1;c++)b=Eo(S[c],S[c+1],t,c,!0),b&&(n[d]=n[d]||[],n[d].push(b[0]),(b[1]!==S[c+1]||c===y-2)&&(n[d].push(b[1]),d++))}},_simplifyPoints:function(){for(var t=this._parts,n=this.options.smoothFactor,a=0,c=t.length;a<c;a++)t[a]=wo(t[a],n)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,n){var a,c,d,p,y,b,S=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(a=0,p=this._parts.length;a<p;a++)for(b=this._parts[a],c=0,y=b.length,d=y-1;c<y;d=c++)if(!(!n&&c===0)&&xo(t,b[d],b[c])<=S)return!0;return!1}});function Y0(t,n){return new Ie(t,n)}Ie._flat=Po;var Ui=Ie.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Mo(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(t){var n=Ie.prototype._convertLatLngs.call(this,t),a=n.length;return a>=2&&n[0]instanceof F&&n[0].equals(n[a-1])&&n.pop(),n},_setLatLngs:function(t){Ie.prototype._setLatLngs.call(this,t),_e(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return _e(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,n=this.options.weight,a=new P(n,n);if(t=new G(t.min.subtract(a),t.max.add(a)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(t))){if(this.options.noClip){this._parts=this._rings;return}for(var c=0,d=this._rings.length,p;c<d;c++)p=yo(this._rings[c],t,!0),p.length&&this._parts.push(p)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var n=!1,a,c,d,p,y,b,S,I;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(p=0,S=this._parts.length;p<S;p++)for(a=this._parts[p],y=0,I=a.length,b=I-1;y<I;b=y++)c=a[y],d=a[b],c.y>t.y!=d.y>t.y&&t.x<(d.x-c.x)*(t.y-c.y)/(d.y-c.y)+c.x&&(n=!n);return n||Ie.prototype._containsPoint.call(this,t,!0)}});function t_(t,n){return new Ui(t,n)}var Oe=Ge.extend({initialize:function(t,n){x(this,n),this._layers={},t&&this.addData(t)},addData:function(t){var n=$(t)?t:t.features,a,c,d;if(n){for(a=0,c=n.length;a<c;a++)d=n[a],(d.geometries||d.geometry||d.features||d.coordinates)&&this.addData(d);return this}var p=this.options;if(p.filter&&!p.filter(t))return this;var y=_s(t,p);return y?(y.feature=gs(t),y.defaultOptions=y.options,this.resetStyle(y),p.onEachFeature&&p.onEachFeature(t,y),this.addLayer(y)):this},resetStyle:function(t){return t===void 0?this.eachLayer(this.resetStyle,this):(t.options=o({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer(function(n){this._setLayerStyle(n,t)},this)},_setLayerStyle:function(t,n){t.setStyle&&(typeof n=="function"&&(n=n(t.feature)),t.setStyle(n))}});function _s(t,n){var a=t.type==="Feature"?t.geometry:t,c=a?a.coordinates:null,d=[],p=n&&n.pointToLayer,y=n&&n.coordsToLatLng||Er,b,S,I,q;if(!c&&!a)return null;switch(a.type){case"Point":return b=y(c),Co(p,t,b,n);case"MultiPoint":for(I=0,q=c.length;I<q;I++)b=y(c[I]),d.push(Co(p,t,b,n));return new Ge(d);case"LineString":case"MultiLineString":return S=ps(c,a.type==="LineString"?0:1,y),new Ie(S,n);case"Polygon":case"MultiPolygon":return S=ps(c,a.type==="Polygon"?1:2,y),new Ui(S,n);case"GeometryCollection":for(I=0,q=a.geometries.length;I<q;I++){var V=_s({geometry:a.geometries[I],type:"Feature",properties:t.properties},n);V&&d.push(V)}return new Ge(d);case"FeatureCollection":for(I=0,q=a.features.length;I<q;I++){var st=_s(a.features[I],n);st&&d.push(st)}return new Ge(d);default:throw new Error("Invalid GeoJSON object.")}}function Co(t,n,a,c){return t?t(n,a):new fs(a,c&&c.markersInheritOptions&&c)}function Er(t){return new F(t[1],t[0],t[2])}function ps(t,n,a){for(var c=[],d=0,p=t.length,y;d<p;d++)y=n?ps(t[d],n-1,a):(a||Er)(t[d]),c.push(y);return c}function Pr(t,n){return t=H(t),t.alt!==void 0?[g(t.lng,n),g(t.lat,n),g(t.alt,n)]:[g(t.lng,n),g(t.lat,n)]}function ms(t,n,a,c){for(var d=[],p=0,y=t.length;p<y;p++)d.push(n?ms(t[p],_e(t[p])?0:n-1,a,c):Pr(t[p],c));return!n&&a&&d.length>0&&d.push(d[0].slice()),d}function Zi(t,n){return t.feature?o({},t.feature,{geometry:n}):gs(n)}function gs(t){return t.type==="Feature"||t.type==="FeatureCollection"?t:{type:"Feature",properties:{},geometry:t}}var Sr={toGeoJSON:function(t){return Zi(this,{type:"Point",coordinates:Pr(this.getLatLng(),t)})}};fs.include(Sr),br.include(Sr),ds.include(Sr),Ie.include({toGeoJSON:function(t){var n=!_e(this._latlngs),a=ms(this._latlngs,n?1:0,!1,t);return Zi(this,{type:(n?"Multi":"")+"LineString",coordinates:a})}}),Ui.include({toGeoJSON:function(t){var n=!_e(this._latlngs),a=n&&!_e(this._latlngs[0]),c=ms(this._latlngs,a?2:n?1:0,!0,t);return n||(c=[c]),Zi(this,{type:(a?"Multi":"")+"Polygon",coordinates:c})}}),Di.include({toMultiPoint:function(t){var n=[];return this.eachLayer(function(a){n.push(a.toGeoJSON(t).geometry.coordinates)}),Zi(this,{type:"MultiPoint",coordinates:n})},toGeoJSON:function(t){var n=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(n==="MultiPoint")return this.toMultiPoint(t);var a=n==="GeometryCollection",c=[];return this.eachLayer(function(d){if(d.toGeoJSON){var p=d.toGeoJSON(t);if(a)c.push(p.geometry);else{var y=gs(p);y.type==="FeatureCollection"?c.push.apply(c,y.features):c.push(y)}}}),a?Zi(this,{geometries:c,type:"GeometryCollection"}):{type:"FeatureCollection",features:c}}});function To(t,n){return new Oe(t,n)}var e_=To,vs=Me.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,n,a){this._url=t,this._bounds=R(n),x(this,a)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Y(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){At(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&Ri(this._image),this},bringToBack:function(){return this._map&&zi(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=R(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t=this._url.tagName==="IMG",n=this._image=t?this._url:ct("img");if(Y(n,"leaflet-image-layer"),this._zoomAnimated&&Y(n,"leaflet-zoom-animated"),this.options.className&&Y(n,this.options.className),n.onselectstart=m,n.onmousemove=m,n.onload=l(this.fire,this,"load"),n.onerror=l(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(n.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t){this._url=n.src;return}n.src=this._url,n.alt=this.options.alt},_animateZoom:function(t){var n=this._map.getZoomScale(t.zoom),a=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;li(this._image,a,n)},_reset:function(){var t=this._image,n=new G(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),a=n.getSize();kt(t,n.min),t.style.width=a.x+"px",t.style.height=a.y+"px"},_updateOpacity:function(){de(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),i_=function(t,n,a){return new vs(t,n,a)},No=vs.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t=this._url.tagName==="VIDEO",n=this._image=t?this._url:ct("video");if(Y(n,"leaflet-image-layer"),this._zoomAnimated&&Y(n,"leaflet-zoom-animated"),this.options.className&&Y(n,this.options.className),n.onselectstart=m,n.onmousemove=m,n.onloadeddata=l(this.fire,this,"load"),t){for(var a=n.getElementsByTagName("source"),c=[],d=0;d<a.length;d++)c.push(a[d].src);this._url=a.length>0?c:[n.src];return}$(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(n.style,"objectFit")&&(n.style.objectFit="fill"),n.autoplay=!!this.options.autoplay,n.loop=!!this.options.loop,n.muted=!!this.options.muted,n.playsInline=!!this.options.playsInline;for(var p=0;p<this._url.length;p++){var y=ct("source");y.src=this._url[p],n.appendChild(y)}}});function n_(t,n,a){return new No(t,n,a)}var Go=vs.extend({_initImage:function(){var t=this._image=this._url;Y(t,"leaflet-image-layer"),this._zoomAnimated&&Y(t,"leaflet-zoom-animated"),this.options.className&&Y(t,this.options.className),t.onselectstart=m,t.onmousemove=m}});function s_(t,n,a){return new Go(t,n,a)}var Ae=Me.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,n){t&&(t instanceof F||$(t))?(this._latlng=H(t),x(this,n)):(x(this,t),this._source=n),this.options.content&&(this._content=this.options.content)},openOn:function(t){return t=arguments.length?t:this._source._map,t.hasLayer(this)||t.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&de(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&de(this._container,1),this.bringToFront(),this.options.interactive&&(Y(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(de(this._container,0),this._removeTimeout=setTimeout(l(At,void 0,this._container),200)):At(this._container),this.options.interactive&&(Gt(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=H(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&Ri(this._container),this},bringToBack:function(){return this._map&&zi(this._container),this},_prepareOpen:function(t){var n=this._source;if(!n._map)return!1;if(n instanceof Ge){n=null;var a=this._source._layers;for(var c in a)if(a[c]._map){n=a[c];break}if(!n)return!1;this._source=n}if(!t)if(n.getCenter)t=n.getCenter();else if(n.getLatLng)t=n.getLatLng();else if(n.getBounds)t=n.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,n=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof n=="string")t.innerHTML=n;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(n)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),n=T(this.options.offset),a=this._getAnchor();this._zoomAnimated?kt(this._container,t.add(a)):n=n.add(t).add(a);var c=this._containerBottom=-n.y,d=this._containerLeft=-Math.round(this._containerWidth/2)+n.x;this._container.style.bottom=c+"px",this._container.style.left=d+"px"}},_getAnchor:function(){return[0,0]}});ot.include({_initOverlay:function(t,n,a,c){var d=n;return d instanceof t||(d=new t(c).setContent(n)),a&&d.setLatLng(a),d}}),Me.include({_initOverlay:function(t,n,a,c){var d=a;return d instanceof t?(x(d,c),d._source=this):(d=n&&!c?n:new t(c,this),d.setContent(a)),d}});var ys=Ae.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return t=arguments.length?t:this._source._map,!t.hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,Ae.prototype.openOn.call(this,t)},onAdd:function(t){Ae.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Ve||this._source.on("preclick",ui))},onRemove:function(t){Ae.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Ve||this._source.off("preclick",ui))},getEvents:function(){var t=Ae.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this.close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_initLayout:function(){var t="leaflet-popup",n=this._container=ct("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),a=this._wrapper=ct("div",t+"-content-wrapper",n);if(this._contentNode=ct("div",t+"-content",a),On(n),pr(this._contentNode),J(n,"contextmenu",ui),this._tipContainer=ct("div",t+"-tip-container",n),this._tip=ct("div",t+"-tip",this._tipContainer),this.options.closeButton){var c=this._closeButton=ct("a",t+"-close-button",n);c.setAttribute("role","button"),c.setAttribute("aria-label","Close popup"),c.href="#close",c.innerHTML='<span aria-hidden="true">&#215;</span>',J(c,"click",function(d){Wt(d),this.close()},this)}},_updateLayout:function(){var t=this._contentNode,n=t.style;n.width="",n.whiteSpace="nowrap";var a=t.offsetWidth;a=Math.min(a,this.options.maxWidth),a=Math.max(a,this.options.minWidth),n.width=a+1+"px",n.whiteSpace="",n.height="";var c=t.offsetHeight,d=this.options.maxHeight,p="leaflet-popup-scrolled";d&&c>d?(n.height=d+"px",Y(t,p)):Gt(t,p),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var n=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),a=this._getAnchor();kt(this._container,n.add(a))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var t=this._map,n=parseInt(Tn(this._container,"marginBottom"),10)||0,a=this._container.offsetHeight+n,c=this._containerWidth,d=new P(this._containerLeft,-a-this._containerBottom);d._add(ci(this._container));var p=t.layerPointToContainerPoint(d),y=T(this.options.autoPanPadding),b=T(this.options.autoPanPaddingTopLeft||y),S=T(this.options.autoPanPaddingBottomRight||y),I=t.getSize(),q=0,V=0;p.x+c+S.x>I.x&&(q=p.x+c-I.x+S.x),p.x-q-b.x<0&&(q=p.x-b.x),p.y+a+S.y>I.y&&(V=p.y+a-I.y+S.y),p.y-V-b.y<0&&(V=p.y-b.y),(q||V)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([q,V]))}},_getAnchor:function(){return T(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),r_=function(t,n){return new ys(t,n)};ot.mergeOptions({closePopupOnClick:!0}),ot.include({openPopup:function(t,n,a){return this._initOverlay(ys,t,n,a).openOn(this),this},closePopup:function(t){return t=arguments.length?t:this._popup,t&&t.close(),this}}),Me.include({bindPopup:function(t,n){return this._popup=this._initOverlay(ys,this._popup,t,n),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof Ge||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(!(!this._popup||!this._map)){fi(t);var n=t.layer||t.target;if(this._popup._source===n&&!(n instanceof Ve)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng);return}this._popup._source=n,this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){t.originalEvent.keyCode===13&&this._openPopup(t)}});var Ms=Ae.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Ae.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Ae.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Ae.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip",n=t+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ct("div",n),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+f(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var n,a,c=this._map,d=this._container,p=c.latLngToContainerPoint(c.getCenter()),y=c.layerPointToContainerPoint(t),b=this.options.direction,S=d.offsetWidth,I=d.offsetHeight,q=T(this.options.offset),V=this._getAnchor();b==="top"?(n=S/2,a=I):b==="bottom"?(n=S/2,a=0):b==="center"?(n=S/2,a=I/2):b==="right"?(n=0,a=I/2):b==="left"?(n=S,a=I/2):y.x<p.x?(b="right",n=0,a=I/2):(b="left",n=S+(q.x+V.x)*2,a=I/2),t=t.subtract(T(n,a,!0)).add(q).add(V),Gt(d,"leaflet-tooltip-right"),Gt(d,"leaflet-tooltip-left"),Gt(d,"leaflet-tooltip-top"),Gt(d,"leaflet-tooltip-bottom"),Y(d,"leaflet-tooltip-"+b),kt(d,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&de(this._container,t)},_animateZoom:function(t){var n=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(n)},_getAnchor:function(){return T(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),a_=function(t,n){return new Ms(t,n)};ot.include({openTooltip:function(t,n,a){return this._initOverlay(Ms,t,n,a).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),Me.include({bindTooltip:function(t,n){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Ms,this._tooltip,t,n),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(!(!t&&this._tooltipHandlersAdded)){var n=t?"off":"on",a={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?a.add=this._openTooltip:(a.mouseover=this._openTooltip,a.mouseout=this.closeTooltip,a.click=this._openTooltip,this._map?this._addFocusListeners():a.add=this._addFocusListeners),this._tooltip.options.sticky&&(a.mousemove=this._moveTooltip),this[n](a),this._tooltipHandlersAdded=!t}},openTooltip:function(t){return this._tooltip&&(this instanceof Ge||(this._tooltip._source=this),this._tooltip._prepareOpen(t)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(t){var n=typeof t.getElement=="function"&&t.getElement();n&&(J(n,"focus",function(){this._tooltip._source=t,this.openTooltip()},this),J(n,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(t){var n=typeof t.getElement=="function"&&t.getElement();n&&n.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(t){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var n=this;this._map.once("moveend",function(){n._openOnceFlag=!1,n._openTooltip(t)});return}this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0)}},_moveTooltip:function(t){var n=t.latlng,a,c;this._tooltip.options.sticky&&t.originalEvent&&(a=this._map.mouseEventToContainerPoint(t.originalEvent),c=this._map.containerPointToLayerPoint(a),n=this._map.layerPointToLatLng(c)),this._tooltip.setLatLng(n)}});var Io=Bi.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var n=t&&t.tagName==="DIV"?t:document.createElement("div"),a=this.options;if(a.html instanceof Element?(as(n),n.appendChild(a.html)):n.innerHTML=a.html!==!1?a.html:"",a.bgPos){var c=T(a.bgPos);n.style.backgroundPosition=-c.x+"px "+-c.y+"px"}return this._setIconStyles(n,"icon"),n},createShadow:function(){return null}});function o_(t){return new Io(t)}Bi.Default=zn;var Dn=Me.extend({options:{tileSize:256,opacity:1,updateWhenIdle:W.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){x(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),At(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(Ri(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(zi(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var t=this._clampZoom(this._map.getZoom());t!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()}return this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=_(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof P?t:new P(t,t)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var n=this.getPane().children,a=-t(-1/0,1/0),c=0,d=n.length,p;c<d;c++)p=n[c].style.zIndex,n[c]!==this._container&&p&&(a=t(a,+p));isFinite(a)&&(this.options.zIndex=a+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!W.ielt9){de(this._container,this.options.opacity);var t=+new Date,n=!1,a=!1;for(var c in this._tiles){var d=this._tiles[c];if(!(!d.current||!d.loaded)){var p=Math.min(1,(t-d.loaded)/200);de(d.el,p),p<1?n=!0:(d.active?a=!0:this._onOpaqueTile(d),d.active=!0)}}a&&!this._noPrune&&this._pruneTiles(),n&&(St(this._fadeFrame),this._fadeFrame=vt(this._updateOpacity,this))}},_onOpaqueTile:m,_initContainer:function(){this._container||(this._container=ct("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,n=this.options.maxZoom;if(t!==void 0){for(var a in this._levels)a=Number(a),this._levels[a].el.children.length||a===t?(this._levels[a].el.style.zIndex=n-Math.abs(t-a),this._onUpdateLevel(a)):(At(this._levels[a].el),this._removeTilesAtZoom(a),this._onRemoveLevel(a),delete this._levels[a]);var c=this._levels[t],d=this._map;return c||(c=this._levels[t]={},c.el=ct("div","leaflet-tile-container leaflet-zoom-animated",this._container),c.el.style.zIndex=n,c.origin=d.project(d.unproject(d.getPixelOrigin()),t).round(),c.zoom=t,this._setZoomTransform(c,d.getCenter(),d.getZoom()),m(c.el.offsetWidth),this._onCreateLevel(c)),this._level=c,c}},_onUpdateLevel:m,_onRemoveLevel:m,_onCreateLevel:m,_pruneTiles:function(){if(this._map){var t,n,a=this._map.getZoom();if(a>this.options.maxZoom||a<this.options.minZoom){this._removeAllTiles();return}for(t in this._tiles)n=this._tiles[t],n.retain=n.current;for(t in this._tiles)if(n=this._tiles[t],n.current&&!n.active){var c=n.coords;this._retainParent(c.x,c.y,c.z,c.z-5)||this._retainChildren(c.x,c.y,c.z,c.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}},_removeTilesAtZoom:function(t){for(var n in this._tiles)this._tiles[n].coords.z===t&&this._removeTile(n)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)At(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,n,a,c){var d=Math.floor(t/2),p=Math.floor(n/2),y=a-1,b=new P(+d,+p);b.z=+y;var S=this._tileCoordsToKey(b),I=this._tiles[S];return I&&I.active?(I.retain=!0,!0):(I&&I.loaded&&(I.retain=!0),y>c?this._retainParent(d,p,y,c):!1)},_retainChildren:function(t,n,a,c){for(var d=2*t;d<2*t+2;d++)for(var p=2*n;p<2*n+2;p++){var y=new P(d,p);y.z=a+1;var b=this._tileCoordsToKey(y),S=this._tiles[b];if(S&&S.active){S.retain=!0;continue}else S&&S.loaded&&(S.retain=!0);a+1<c&&this._retainChildren(d,p,a+1,c)}},_resetView:function(t){var n=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),n,n)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var n=this.options;return n.minNativeZoom!==void 0&&t<n.minNativeZoom?n.minNativeZoom:n.maxNativeZoom!==void 0&&n.maxNativeZoom<t?n.maxNativeZoom:t},_setView:function(t,n,a,c){var d=Math.round(n);this.options.maxZoom!==void 0&&d>this.options.maxZoom||this.options.minZoom!==void 0&&d<this.options.minZoom?d=void 0:d=this._clampZoom(d);var p=this.options.updateWhenZooming&&d!==this._tileZoom;(!c||p)&&(this._tileZoom=d,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),d!==void 0&&this._update(t),a||this._pruneTiles(),this._noPrune=!!a),this._setZoomTransforms(t,n)},_setZoomTransforms:function(t,n){for(var a in this._levels)this._setZoomTransform(this._levels[a],t,n)},_setZoomTransform:function(t,n,a){var c=this._map.getZoomScale(a,t.zoom),d=t.origin.multiplyBy(c).subtract(this._map._getNewPixelOrigin(n,a)).round();W.any3d?li(t.el,d,c):kt(t.el,d)},_resetGrid:function(){var t=this._map,n=t.options.crs,a=this._tileSize=this.getTileSize(),c=this._tileZoom,d=this._map.getPixelWorldBounds(this._tileZoom);d&&(this._globalTileRange=this._pxBoundsToTileRange(d)),this._wrapX=n.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,n.wrapLng[0]],c).x/a.x),Math.ceil(t.project([0,n.wrapLng[1]],c).x/a.y)],this._wrapY=n.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([n.wrapLat[0],0],c).y/a.x),Math.ceil(t.project([n.wrapLat[1],0],c).y/a.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(t){var n=this._map,a=n._animatingZoom?Math.max(n._animateToZoom,n.getZoom()):n.getZoom(),c=n.getZoomScale(a,this._tileZoom),d=n.project(t,this._tileZoom).floor(),p=n.getSize().divideBy(c*2);return new G(d.subtract(p),d.add(p))},_update:function(t){var n=this._map;if(n){var a=this._clampZoom(n.getZoom());if(t===void 0&&(t=n.getCenter()),this._tileZoom!==void 0){var c=this._getTiledPixelBounds(t),d=this._pxBoundsToTileRange(c),p=d.getCenter(),y=[],b=this.options.keepBuffer,S=new G(d.getBottomLeft().subtract([b,-b]),d.getTopRight().add([b,-b]));if(!(isFinite(d.min.x)&&isFinite(d.min.y)&&isFinite(d.max.x)&&isFinite(d.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var I in this._tiles){var q=this._tiles[I].coords;(q.z!==this._tileZoom||!S.contains(new P(q.x,q.y)))&&(this._tiles[I].current=!1)}if(Math.abs(a-this._tileZoom)>1){this._setView(t,a);return}for(var V=d.min.y;V<=d.max.y;V++)for(var st=d.min.x;st<=d.max.x;st++){var Yt=new P(st,V);if(Yt.z=this._tileZoom,!!this._isValidTile(Yt)){var qt=this._tiles[this._tileCoordsToKey(Yt)];qt?qt.current=!0:y.push(Yt)}}if(y.sort(function(re,$i){return re.distanceTo(p)-$i.distanceTo(p)}),y.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var pe=document.createDocumentFragment();for(st=0;st<y.length;st++)this._addTile(y[st],pe);this._level.el.appendChild(pe)}}}},_isValidTile:function(t){var n=this._map.options.crs;if(!n.infinite){var a=this._globalTileRange;if(!n.wrapLng&&(t.x<a.min.x||t.x>a.max.x)||!n.wrapLat&&(t.y<a.min.y||t.y>a.max.y))return!1}if(!this.options.bounds)return!0;var c=this._tileCoordsToBounds(t);return R(this.options.bounds).overlaps(c)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var n=this._map,a=this.getTileSize(),c=t.scaleBy(a),d=c.add(a),p=n.unproject(c,t.z),y=n.unproject(d,t.z);return[p,y]},_tileCoordsToBounds:function(t){var n=this._tileCoordsToNwSe(t),a=new N(n[0],n[1]);return this.options.noWrap||(a=this._map.wrapLatLngBounds(a)),a},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var n=t.split(":"),a=new P(+n[0],+n[1]);return a.z=+n[2],a},_removeTile:function(t){var n=this._tiles[t];n&&(At(n.el),delete this._tiles[t],this.fire("tileunload",{tile:n.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){Y(t,"leaflet-tile");var n=this.getTileSize();t.style.width=n.x+"px",t.style.height=n.y+"px",t.onselectstart=m,t.onmousemove=m,W.ielt9&&this.options.opacity<1&&de(t,this.options.opacity)},_addTile:function(t,n){var a=this._getTilePos(t),c=this._tileCoordsToKey(t),d=this.createTile(this._wrapCoords(t),l(this._tileReady,this,t));this._initTile(d),this.createTile.length<2&&vt(l(this._tileReady,this,t,null,d)),kt(d,a),this._tiles[c]={el:d,coords:t,current:!0},n.appendChild(d),this.fire("tileloadstart",{tile:d,coords:t})},_tileReady:function(t,n,a){n&&this.fire("tileerror",{error:n,tile:a,coords:t});var c=this._tileCoordsToKey(t);a=this._tiles[c],a&&(a.loaded=+new Date,this._map._fadeAnimated?(de(a.el,0),St(this._fadeFrame),this._fadeFrame=vt(this._updateOpacity,this)):(a.active=!0,this._pruneTiles()),n||(Y(a.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:a.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),W.ielt9||!this._map._fadeAnimated?vt(this._pruneTiles,this):setTimeout(l(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var n=new P(this._wrapX?v(t.x,this._wrapX):t.x,this._wrapY?v(t.y,this._wrapY):t.y);return n.z=t.z,n},_pxBoundsToTileRange:function(t){var n=this.getTileSize();return new G(t.min.unscaleBy(n).floor(),t.max.unscaleBy(n).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function h_(t){return new Dn(t)}var qi=Dn.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,n){this._url=t,n=x(this,n),n.detectRetina&&W.retina&&n.maxZoom>0?(n.tileSize=Math.floor(n.tileSize/2),n.zoomReverse?(n.zoomOffset--,n.minZoom=Math.min(n.maxZoom,n.minZoom+1)):(n.zoomOffset++,n.maxZoom=Math.max(n.minZoom,n.maxZoom-1)),n.minZoom=Math.max(0,n.minZoom)):n.zoomReverse?n.minZoom=Math.min(n.maxZoom,n.minZoom):n.maxZoom=Math.max(n.minZoom,n.maxZoom),typeof n.subdomains=="string"&&(n.subdomains=n.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,n){return this._url===t&&n===void 0&&(n=!0),this._url=t,n||this.redraw(),this},createTile:function(t,n){var a=document.createElement("img");return J(a,"load",l(this._tileOnLoad,this,n,a)),J(a,"error",l(this._tileOnError,this,n,a)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(a.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(a.referrerPolicy=this.options.referrerPolicy),a.alt="",a.src=this.getTileUrl(t),a},getTileUrl:function(t){var n={r:W.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var a=this._globalTileRange.max.y-t.y;this.options.tms&&(n.y=a),n["-y"]=a}return Z(this._url,o(n,this.options))},_tileOnLoad:function(t,n){W.ielt9?setTimeout(l(t,this,null,n),0):t(null,n)},_tileOnError:function(t,n,a){var c=this.options.errorTileUrl;c&&n.getAttribute("src")!==c&&(n.src=c),t(a,n)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,n=this.options.maxZoom,a=this.options.zoomReverse,c=this.options.zoomOffset;return a&&(t=n-t),t+c},_getSubdomain:function(t){var n=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[n]},_abortLoading:function(){var t,n;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&(n=this._tiles[t].el,n.onload=m,n.onerror=m,!n.complete)){n.src=gt;var a=this._tiles[t].coords;At(n),delete this._tiles[t],this.fire("tileabort",{tile:n,coords:a})}},_removeTile:function(t){var n=this._tiles[t];if(n)return n.el.setAttribute("src",gt),Dn.prototype._removeTile.call(this,t)},_tileReady:function(t,n,a){if(!(!this._map||a&&a.getAttribute("src")===gt))return Dn.prototype._tileReady.call(this,t,n,a)}});function Oo(t,n){return new qi(t,n)}var ko=qi.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,n){this._url=t;var a=o({},this.defaultWmsParams);for(var c in n)c in this.options||(a[c]=n[c]);n=x(this,n);var d=n.detectRetina&&W.retina?2:1,p=this.getTileSize();a.width=p.x*d,a.height=p.y*d,this.wmsParams=a},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var n=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[n]=this._crs.code,qi.prototype.onAdd.call(this,t)},getTileUrl:function(t){var n=this._tileCoordsToNwSe(t),a=this._crs,c=A(a.project(n[0]),a.project(n[1])),d=c.min,p=c.max,y=(this._wmsVersion>=1.3&&this._crs===Ao?[d.y,d.x,p.y,p.x]:[d.x,d.y,p.x,p.y]).join(","),b=qi.prototype.getTileUrl.call(this,t);return b+C(this.wmsParams,b,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+y},setParams:function(t,n){return o(this.wmsParams,t),n||this.redraw(),this}});function l_(t,n){return new ko(t,n)}qi.WMS=ko,Oo.wms=l_;var ke=Me.extend({options:{padding:.1},initialize:function(t){x(this,t),f(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Y(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,n){var a=this._map.getZoomScale(n,this._zoom),c=this._map.getSize().multiplyBy(.5+this.options.padding),d=this._map.project(this._center,n),p=c.multiplyBy(-a).add(d).subtract(this._map._getNewPixelOrigin(t,n));W.any3d?li(this._container,p,a):kt(this._container,p)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var t in this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,n=this._map.getSize(),a=this._map.containerPointToLayerPoint(n.multiplyBy(-t)).round();this._bounds=new G(a,a.add(n.multiplyBy(1+t*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Ro=ke.extend({options:{tolerance:0},getEvents:function(){var t=ke.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){ke.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");J(t,"mousemove",this._onMouseMove,this),J(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),J(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){St(this._redrawRequest),delete this._ctx,At(this._container),wt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var t;this._redrawBounds=null;for(var n in this._layers)t=this._layers[n],t._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ke.prototype._update.call(this);var t=this._bounds,n=this._container,a=t.getSize(),c=W.retina?2:1;kt(n,t.min),n.width=c*a.x,n.height=c*a.y,n.style.width=a.x+"px",n.style.height=a.y+"px",W.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){ke.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[f(t)]=t;var n=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=n),this._drawLast=n,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var n=t._order,a=n.next,c=n.prev;a?a.prev=c:this._drawLast=c,c?c.next=a:this._drawFirst=a,delete t._order,delete this._layers[f(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if(typeof t.options.dashArray=="string"){var n=t.options.dashArray.split(/[, ]+/),a=[],c,d;for(d=0;d<n.length;d++){if(c=Number(n[d]),isNaN(c))return;a.push(c)}t.options._dashArray=a}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||vt(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var n=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new G,this._redrawBounds.extend(t._pxBounds.min.subtract([n,n])),this._redrawBounds.extend(t._pxBounds.max.add([n,n]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var n=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,n.x,n.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var t,n=this._redrawBounds;if(this._ctx.save(),n){var a=n.getSize();this._ctx.beginPath(),this._ctx.rect(n.min.x,n.min.y,a.x,a.y),this._ctx.clip()}this._drawing=!0;for(var c=this._drawFirst;c;c=c.next)t=c.layer,(!n||t._pxBounds&&t._pxBounds.intersects(n))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,n){if(this._drawing){var a,c,d,p,y=t._parts,b=y.length,S=this._ctx;if(b){for(S.beginPath(),a=0;a<b;a++){for(c=0,d=y[a].length;c<d;c++)p=y[a][c],S[c?"lineTo":"moveTo"](p.x,p.y);n&&S.closePath()}this._fillStroke(S,t)}}},_updateCircle:function(t){if(!(!this._drawing||t._empty())){var n=t._point,a=this._ctx,c=Math.max(Math.round(t._radius),1),d=(Math.max(Math.round(t._radiusY),1)||c)/c;d!==1&&(a.save(),a.scale(1,d)),a.beginPath(),a.arc(n.x,n.y/d,c,0,Math.PI*2,!1),d!==1&&a.restore(),this._fillStroke(a,t)}},_fillStroke:function(t,n){var a=n.options;a.fill&&(t.globalAlpha=a.fillOpacity,t.fillStyle=a.fillColor||a.color,t.fill(a.fillRule||"evenodd")),a.stroke&&a.weight!==0&&(t.setLineDash&&t.setLineDash(n.options&&n.options._dashArray||[]),t.globalAlpha=a.opacity,t.lineWidth=a.weight,t.strokeStyle=a.color,t.lineCap=a.lineCap,t.lineJoin=a.lineJoin,t.stroke())},_onClick:function(t){for(var n=this._map.mouseEventToLayerPoint(t),a,c,d=this._drawFirst;d;d=d.next)a=d.layer,a.options.interactive&&a._containsPoint(n)&&(!(t.type==="click"||t.type==="preclick")||!this._map._draggableMoved(a))&&(c=a);this._fireEvent(c?[c]:!1,t)},_onMouseMove:function(t){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var n=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,n)}},_handleMouseOut:function(t){var n=this._hoveredLayer;n&&(Gt(this._container,"leaflet-interactive"),this._fireEvent([n],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,n){if(!this._mouseHoverThrottled){for(var a,c,d=this._drawFirst;d;d=d.next)a=d.layer,a.options.interactive&&a._containsPoint(n)&&(c=a);c!==this._hoveredLayer&&(this._handleMouseOut(t),c&&(Y(this._container,"leaflet-interactive"),this._fireEvent([c],t,"mouseover"),this._hoveredLayer=c)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,t),this._mouseHoverThrottled=!0,setTimeout(l(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(t,n,a){this._map._fireDOMEvent(n,a||n.type,t)},_bringToFront:function(t){var n=t._order;if(n){var a=n.next,c=n.prev;if(a)a.prev=c;else return;c?c.next=a:a&&(this._drawFirst=a),n.prev=this._drawLast,this._drawLast.next=n,n.next=null,this._drawLast=n,this._requestRedraw(t)}},_bringToBack:function(t){var n=t._order;if(n){var a=n.next,c=n.prev;if(c)c.next=a;else return;a?a.prev=c:c&&(this._drawLast=c),n.prev=null,n.next=this._drawFirst,this._drawFirst.prev=n,this._drawFirst=n,this._requestRedraw(t)}}});function zo(t){return W.canvas?new Ro(t):null}var Bn=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch{}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),c_={_initContainer:function(){this._container=ct("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(ke.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var n=t._container=Bn("shape");Y(n,"leaflet-vml-shape "+(this.options.className||"")),n.coordsize="1 1",t._path=Bn("path"),n.appendChild(t._path),this._updateStyle(t),this._layers[f(t)]=t},_addPath:function(t){var n=t._container;this._container.appendChild(n),t.options.interactive&&t.addInteractiveTarget(n)},_removePath:function(t){var n=t._container;At(n),t.removeInteractiveTarget(n),delete this._layers[f(t)]},_updateStyle:function(t){var n=t._stroke,a=t._fill,c=t.options,d=t._container;d.stroked=!!c.stroke,d.filled=!!c.fill,c.stroke?(n||(n=t._stroke=Bn("stroke")),d.appendChild(n),n.weight=c.weight+"px",n.color=c.color,n.opacity=c.opacity,c.dashArray?n.dashStyle=$(c.dashArray)?c.dashArray.join(" "):c.dashArray.replace(/( *, *)/g," "):n.dashStyle="",n.endcap=c.lineCap.replace("butt","flat"),n.joinstyle=c.lineJoin):n&&(d.removeChild(n),t._stroke=null),c.fill?(a||(a=t._fill=Bn("fill")),d.appendChild(a),a.color=c.fillColor||c.color,a.opacity=c.fillOpacity):a&&(d.removeChild(a),t._fill=null)},_updateCircle:function(t){var n=t._point.round(),a=Math.round(t._radius),c=Math.round(t._radiusY||a);this._setPath(t,t._empty()?"M0 0":"AL "+n.x+","+n.y+" "+a+","+c+" 0,"+65535*360)},_setPath:function(t,n){t._path.v=n},_bringToFront:function(t){Ri(t._container)},_bringToBack:function(t){zi(t._container)}},ws=W.vml?Bn:dt,Un=ke.extend({_initContainer:function(){this._container=ws("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=ws("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){At(this._container),wt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ke.prototype._update.call(this);var t=this._bounds,n=t.getSize(),a=this._container;(!this._svgSize||!this._svgSize.equals(n))&&(this._svgSize=n,a.setAttribute("width",n.x),a.setAttribute("height",n.y)),kt(a,t.min),a.setAttribute("viewBox",[t.min.x,t.min.y,n.x,n.y].join(" ")),this.fire("update")}},_initPath:function(t){var n=t._path=ws("path");t.options.className&&Y(n,t.options.className),t.options.interactive&&Y(n,"leaflet-interactive"),this._updateStyle(t),this._layers[f(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){At(t._path),t.removeInteractiveTarget(t._path),delete this._layers[f(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var n=t._path,a=t.options;n&&(a.stroke?(n.setAttribute("stroke",a.color),n.setAttribute("stroke-opacity",a.opacity),n.setAttribute("stroke-width",a.weight),n.setAttribute("stroke-linecap",a.lineCap),n.setAttribute("stroke-linejoin",a.lineJoin),a.dashArray?n.setAttribute("stroke-dasharray",a.dashArray):n.removeAttribute("stroke-dasharray"),a.dashOffset?n.setAttribute("stroke-dashoffset",a.dashOffset):n.removeAttribute("stroke-dashoffset")):n.setAttribute("stroke","none"),a.fill?(n.setAttribute("fill",a.fillColor||a.color),n.setAttribute("fill-opacity",a.fillOpacity),n.setAttribute("fill-rule",a.fillRule||"evenodd")):n.setAttribute("fill","none"))},_updatePoly:function(t,n){this._setPath(t,yt(t._parts,n))},_updateCircle:function(t){var n=t._point,a=Math.max(Math.round(t._radius),1),c=Math.max(Math.round(t._radiusY),1)||a,d="a"+a+","+c+" 0 1,0 ",p=t._empty()?"M0 0":"M"+(n.x-a)+","+n.y+d+a*2+",0 "+d+-a*2+",0 ";this._setPath(t,p)},_setPath:function(t,n){t._path.setAttribute("d",n)},_bringToFront:function(t){Ri(t._path)},_bringToBack:function(t){zi(t._path)}});W.vml&&Un.include(c_);function Do(t){return W.svg||W.vml?new Un(t):null}ot.include({getRenderer:function(t){var n=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return n||(n=this._renderer=this._createRenderer()),this.hasLayer(n)||this.addLayer(n),n},_getPaneRenderer:function(t){if(t==="overlayPane"||t===void 0)return!1;var n=this._paneRenderers[t];return n===void 0&&(n=this._createRenderer({pane:t}),this._paneRenderers[t]=n),n},_createRenderer:function(t){return this.options.preferCanvas&&zo(t)||Do(t)}});var Bo=Ui.extend({initialize:function(t,n){Ui.prototype.initialize.call(this,this._boundsToLatLngs(t),n)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=R(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function u_(t,n){return new Bo(t,n)}Un.create=ws,Un.pointsToPath=yt,Oe.geometryToLayer=_s,Oe.coordsToLatLng=Er,Oe.coordsToLatLngs=ps,Oe.latLngToCoords=Pr,Oe.latLngsToCoords=ms,Oe.getFeature=Zi,Oe.asFeature=gs,ot.mergeOptions({boxZoom:!0});var Uo=Se.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){J(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){wt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){At(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||t.which!==1&&t.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Nn(),or(),this._startPoint=this._map.mouseEventToContainerPoint(t),J(document,{contextmenu:fi,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=ct("div","leaflet-zoom-box",this._container),Y(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var n=new G(this._point,this._startPoint),a=n.getSize();kt(this._box,n.min),this._box.style.width=a.x+"px",this._box.style.height=a.y+"px"},_finish:function(){this._moved&&(At(this._box),Gt(this._container,"leaflet-crosshair")),Gn(),hr(),wt(document,{contextmenu:fi,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if(!(t.which!==1&&t.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(l(this._resetState,this),0);var n=new N(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(n).fire("boxzoomend",{boxZoomBounds:n})}},_onKeyDown:function(t){t.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});ot.addInitHook("addHandler","boxZoom",Uo),ot.mergeOptions({doubleClickZoom:!0});var Zo=Se.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var n=this._map,a=n.getZoom(),c=n.options.zoomDelta,d=t.originalEvent.shiftKey?a-c:a+c;n.options.doubleClickZoom==="center"?n.setZoom(d):n.setZoomAround(t.containerPoint,d)}});ot.addInitHook("addHandler","doubleClickZoom",Zo),ot.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var qo=Se.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new Ke(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}Y(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Gt(this._map._container,"leaflet-grab"),Gt(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var n=R(this._map.options.maxBounds);this._offsetLimit=A(this._map.latLngToContainerPoint(n.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(n.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var n=this._lastTime=+new Date,a=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(a),this._times.push(n),this._prunePositions(n)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),n=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=n.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,n){return t-(t-n)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var t=this._draggable._newPos.subtract(this._draggable._startPos),n=this._offsetLimit;t.x<n.min.x&&(t.x=this._viscousLimit(t.x,n.min.x)),t.y<n.min.y&&(t.y=this._viscousLimit(t.y,n.min.y)),t.x>n.max.x&&(t.x=this._viscousLimit(t.x,n.max.x)),t.y>n.max.y&&(t.y=this._viscousLimit(t.y,n.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,n=Math.round(t/2),a=this._initialWorldOffset,c=this._draggable._newPos.x,d=(c-n+a)%t+n-a,p=(c+n+a)%t-n-a,y=Math.abs(d+a)<Math.abs(p+a)?d:p;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=y},_onDragEnd:function(t){var n=this._map,a=n.options,c=!a.inertia||t.noInertia||this._times.length<2;if(n.fire("dragend",t),c)n.fire("moveend");else{this._prunePositions(+new Date);var d=this._lastPos.subtract(this._positions[0]),p=(this._lastTime-this._times[0])/1e3,y=a.easeLinearity,b=d.multiplyBy(y/p),S=b.distanceTo([0,0]),I=Math.min(a.inertiaMaxSpeed,S),q=b.multiplyBy(I/S),V=I/(a.inertiaDeceleration*y),st=q.multiplyBy(-V/2).round();!st.x&&!st.y?n.fire("moveend"):(st=n._limitOffset(st,n.options.maxBounds),vt(function(){n.panBy(st,{duration:V,easeLinearity:y,noMoveStart:!0,animate:!0})}))}}});ot.addInitHook("addHandler","dragging",qo),ot.mergeOptions({keyboard:!0,keyboardPanDelta:80});var $o=Se.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),J(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),wt(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,n=document.documentElement,a=t.scrollTop||n.scrollTop,c=t.scrollLeft||n.scrollLeft;this._map._container.focus(),window.scrollTo(c,a)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var n=this._panKeys={},a=this.keyCodes,c,d;for(c=0,d=a.left.length;c<d;c++)n[a.left[c]]=[-1*t,0];for(c=0,d=a.right.length;c<d;c++)n[a.right[c]]=[t,0];for(c=0,d=a.down.length;c<d;c++)n[a.down[c]]=[0,t];for(c=0,d=a.up.length;c<d;c++)n[a.up[c]]=[0,-1*t]},_setZoomDelta:function(t){var n=this._zoomKeys={},a=this.keyCodes,c,d;for(c=0,d=a.zoomIn.length;c<d;c++)n[a.zoomIn[c]]=t;for(c=0,d=a.zoomOut.length;c<d;c++)n[a.zoomOut[c]]=-t},_addHooks:function(){J(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){wt(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var n=t.keyCode,a=this._map,c;if(n in this._panKeys){if(!a._panAnim||!a._panAnim._inProgress)if(c=this._panKeys[n],t.shiftKey&&(c=T(c).multiplyBy(3)),a.options.maxBounds&&(c=a._limitOffset(T(c),a.options.maxBounds)),a.options.worldCopyJump){var d=a.wrapLatLng(a.unproject(a.project(a.getCenter()).add(c)));a.panTo(d)}else a.panBy(c)}else if(n in this._zoomKeys)a.setZoom(a.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[n]);else if(n===27&&a._popup&&a._popup.options.closeOnEscapeKey)a.closePopup();else return;fi(t)}}});ot.addInitHook("addHandler","keyboard",$o),ot.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var Fo=Se.extend({addHooks:function(){J(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){wt(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var n=_o(t),a=this._map.options.wheelDebounceTime;this._delta+=n,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var c=Math.max(a-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(l(this._performZoom,this),c),fi(t)},_performZoom:function(){var t=this._map,n=t.getZoom(),a=this._map.options.zoomSnap||0;t._stop();var c=this._delta/(this._map.options.wheelPxPerZoomLevel*4),d=4*Math.log(2/(1+Math.exp(-Math.abs(c))))/Math.LN2,p=a?Math.ceil(d/a)*a:d,y=t._limitZoom(n+(this._delta>0?p:-p))-n;this._delta=0,this._startTime=null,y&&(t.options.scrollWheelZoom==="center"?t.setZoom(n+y):t.setZoomAround(this._lastMousePos,n+y))}});ot.addInitHook("addHandler","scrollWheelZoom",Fo);var f_=600;ot.mergeOptions({tapHold:W.touchNative&&W.safari&&W.mobile,tapTolerance:15});var Ho=Se.extend({addHooks:function(){J(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){wt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),t.touches.length===1){var n=t.touches[0];this._startPos=this._newPos=new P(n.clientX,n.clientY),this._holdTimeout=setTimeout(l(function(){this._cancel(),this._isTapValid()&&(J(document,"touchend",Wt),J(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",n))},this),f_),J(document,"touchend touchcancel contextmenu",this._cancel,this),J(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){wt(document,"touchend",Wt),wt(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),wt(document,"touchend touchcancel contextmenu",this._cancel,this),wt(document,"touchmove",this._onMove,this)},_onMove:function(t){var n=t.touches[0];this._newPos=new P(n.clientX,n.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,n){var a=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:n.screenX,screenY:n.screenY,clientX:n.clientX,clientY:n.clientY});a._simulated=!0,n.target.dispatchEvent(a)}});ot.addInitHook("addHandler","tapHold",Ho),ot.mergeOptions({touchZoom:W.touch,bounceAtZoomLimits:!0});var Wo=Se.extend({addHooks:function(){Y(this._map._container,"leaflet-touch-zoom"),J(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Gt(this._map._container,"leaflet-touch-zoom"),wt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var n=this._map;if(!(!t.touches||t.touches.length!==2||n._animatingZoom||this._zooming)){var a=n.mouseEventToContainerPoint(t.touches[0]),c=n.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=n.getSize()._divideBy(2),this._startLatLng=n.containerPointToLatLng(this._centerPoint),n.options.touchZoom!=="center"&&(this._pinchStartLatLng=n.containerPointToLatLng(a.add(c)._divideBy(2))),this._startDist=a.distanceTo(c),this._startZoom=n.getZoom(),this._moved=!1,this._zooming=!0,n._stop(),J(document,"touchmove",this._onTouchMove,this),J(document,"touchend touchcancel",this._onTouchEnd,this),Wt(t)}},_onTouchMove:function(t){if(!(!t.touches||t.touches.length!==2||!this._zooming)){var n=this._map,a=n.mouseEventToContainerPoint(t.touches[0]),c=n.mouseEventToContainerPoint(t.touches[1]),d=a.distanceTo(c)/this._startDist;if(this._zoom=n.getScaleZoom(d,this._startZoom),!n.options.bounceAtZoomLimits&&(this._zoom<n.getMinZoom()&&d<1||this._zoom>n.getMaxZoom()&&d>1)&&(this._zoom=n._limitZoom(this._zoom)),n.options.touchZoom==="center"){if(this._center=this._startLatLng,d===1)return}else{var p=a._add(c)._divideBy(2)._subtract(this._centerPoint);if(d===1&&p.x===0&&p.y===0)return;this._center=n.unproject(n.project(this._pinchStartLatLng,this._zoom).subtract(p),this._zoom)}this._moved||(n._moveStart(!0,!1),this._moved=!0),St(this._animRequest);var y=l(n._move,n,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=vt(y,this,!0),Wt(t)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,St(this._animRequest),wt(document,"touchmove",this._onTouchMove,this),wt(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});ot.addInitHook("addHandler","touchZoom",Wo),ot.BoxZoom=Uo,ot.DoubleClickZoom=Zo,ot.Drag=qo,ot.Keyboard=$o,ot.ScrollWheelZoom=Fo,ot.TapHold=Ho,ot.TouchZoom=Wo,s.Bounds=G,s.Browser=W,s.CRS=K,s.Canvas=Ro,s.Circle=br,s.CircleMarker=ds,s.Class=Ut,s.Control=ye,s.DivIcon=Io,s.DivOverlay=Ae,s.DomEvent=T0,s.DomUtil=L0,s.Draggable=Ke,s.Evented=he,s.FeatureGroup=Ge,s.GeoJSON=Oe,s.GridLayer=Dn,s.Handler=Se,s.Icon=Bi,s.ImageOverlay=vs,s.LatLng=F,s.LatLngBounds=N,s.Layer=Me,s.LayerGroup=Di,s.LineUtil=$0,s.Map=ot,s.Marker=fs,s.Mixin=z0,s.Path=Ve,s.Point=P,s.PolyUtil=D0,s.Polygon=Ui,s.Polyline=Ie,s.Popup=ys,s.PosAnimation=po,s.Projection=F0,s.Rectangle=Bo,s.Renderer=ke,s.SVG=Un,s.SVGOverlay=Go,s.TileLayer=qi,s.Tooltip=Ms,s.Transformation=rt,s.Util=oe,s.VideoOverlay=No,s.bind=l,s.bounds=A,s.canvas=zo,s.circle=Q0,s.circleMarker=X0,s.control=kn,s.divIcon=o_,s.extend=o,s.featureGroup=K0,s.geoJSON=To,s.geoJson=e_,s.gridLayer=h_,s.icon=V0,s.imageOverlay=i_,s.latLng=H,s.latLngBounds=R,s.layerGroup=j0,s.map=N0,s.marker=J0,s.point=T,s.polygon=t_,s.polyline=Y0,s.popup=r_,s.rectangle=u_,s.setOptions=x,s.stamp=f,s.svg=Do,s.svgOverlay=s_,s.tileLayer=Oo,s.tooltip=a_,s.transformation=z,s.version=r,s.videoOverlay=n_;var d_=window.L;s.noConflict=function(){return window.L=d_,this},window.L=s})})(Ts,Ts.exports);var w=Ts.exports;const Qi=wh(w);function Vt(i,e){return w.Util.extend(e,i.geocodingQueryParams)}function te(i,e){return w.Util.extend(e,i.reverseQueryParams)}let xh=0;const bh=/[&<>"'`]/g,Eh=/[&<>"'`]/,Ph={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};function Sh(i){return Ph[i]}function Ah(i){return i==null?"":i?(i=""+i,Eh.test(i)?i.replace(bh,Sh):i):i+""}function $r(i,e,s,r,o){const h="_l_geocoder_"+xh++;e[o||"callback"]=h,window[h]=w.Util.bind(s,r);const l=document.createElement("script");l.type="text/javascript",l.src=i+Fr(e),l.id=h,document.getElementsByTagName("head")[0].appendChild(l)}function Et(i,e,s){const r=new XMLHttpRequest;r.onreadystatechange=function(){if(r.readyState!==4)return;let o;if(r.status!==200&&r.status!==304)o="";else if(typeof r.response=="string")try{o=JSON.parse(r.response)}catch{o=r.response}else o=r.response;s(o)},r.open("GET",i+Fr(e),!0),r.responseType="json",r.setRequestHeader("Accept","application/json"),r.send(null)}function Lh(i,e){return i.replace(/\{ *([\w_]+) *\}/g,(s,r)=>{let o=e[r];return o===void 0?o="":typeof o=="function"&&(o=o(e)),Ah(o)})}function Fr(i,e,s){const r=[];for(const o in i){const h=encodeURIComponent(s?o.toUpperCase():o),l=i[o];if(!Array.isArray(l))r.push(h+"="+encodeURIComponent(String(l)));else for(let u=0;u<l.length;u++)r.push(h+"="+encodeURIComponent(l[u]))}return(!e||e.indexOf("?")===-1?"?":"&")+r.join("&")}class Hr{constructor(e){this.options={serviceUrl:"https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer",apiKey:""},w.Util.setOptions(this,e)}geocode(e,s,r){const o=Vt(this.options,{token:this.options.apiKey,SingleLine:e,outFields:"Addr_Type",forStorage:!1,maxLocations:10,f:"json"});Et(this.options.serviceUrl+"/findAddressCandidates",o,h=>{const l=[];if(h.candidates&&h.candidates.length)for(let u=0;u<=h.candidates.length-1;u++){const f=h.candidates[u],_=w.latLng(f.location.y,f.location.x),v=w.latLngBounds(w.latLng(f.extent.ymax,f.extent.xmax),w.latLng(f.extent.ymin,f.extent.xmin));l[u]={name:f.address,bbox:v,center:_}}s.call(r,l)})}suggest(e,s,r){return this.geocode(e,s,r)}reverse(e,s,r,o){const h=te(this.options,{location:e.lng+","+e.lat,distance:100,f:"json"});Et(this.options.serviceUrl+"/reverseGeocode",h,l=>{const u=[];if(l&&!l.error){const f=w.latLng(l.location.y,l.location.x),_=w.latLngBounds(f,f);u.push({name:l.address.Match_addr,center:f,bbox:_})}r.call(o,u)})}}function Ch(i){return new Hr(i)}class Wr{constructor(e){this.options={serviceUrl:"https://dev.virtualearth.net/REST/v1/Locations"},w.Util.setOptions(this,e)}geocode(e,s,r){const o=Vt(this.options,{query:e,key:this.options.apiKey});$r(this.options.apiKey,o,h=>{const l=[];if(h.resourceSets.length>0)for(let u=h.resourceSets[0].resources.length-1;u>=0;u--){const f=h.resourceSets[0].resources[u],_=f.bbox;l[u]={name:f.name,bbox:w.latLngBounds([_[0],_[1]],[_[2],_[3]]),center:w.latLng(f.point.coordinates)}}s.call(r,l)},this,"jsonp")}reverse(e,s,r,o){const h=te(this.options,{key:this.options.apiKey});$r(this.options.serviceUrl+e.lat+","+e.lng,h,l=>{const u=[];for(let f=l.resourceSets[0].resources.length-1;f>=0;f--){const _=l.resourceSets[0].resources[f],v=_.bbox;u[f]={name:_.name,bbox:w.latLngBounds([v[0],v[1]],[v[2],v[3]]),center:w.latLng(_.point.coordinates)}}r.call(o,u)},this,"jsonp")}}function Th(i){return new Wr(i)}class jr{constructor(e){this.options={serviceUrl:"https://maps.googleapis.com/maps/api/geocode/json"},w.Util.setOptions(this,e)}geocode(e,s,r){const o=Vt(this.options,{key:this.options.apiKey,address:e});Et(this.options.serviceUrl,o,h=>{const l=[];if(h.results&&h.results.length)for(let u=0;u<=h.results.length-1;u++){const f=h.results[u],_=w.latLng(f.geometry.location),v=w.latLngBounds(w.latLng(f.geometry.viewport.northeast),w.latLng(f.geometry.viewport.southwest));l[u]={name:f.formatted_address,bbox:v,center:_,properties:f.address_components}}s.call(r,l)})}reverse(e,s,r,o){const h=te(this.options,{key:this.options.apiKey,latlng:e.lat+","+e.lng});Et(this.options.serviceUrl,h,l=>{const u=[];if(l.results&&l.results.length)for(let f=0;f<=l.results.length-1;f++){const _=l.results[f],v=w.latLng(_.geometry.location),m=w.latLngBounds(w.latLng(_.geometry.viewport.northeast),w.latLng(_.geometry.viewport.southwest));u[f]={name:_.formatted_address,bbox:m,center:v,properties:_.address_components}}r.call(o,u)})}}function Nh(i){return new jr(i)}class Kr{constructor(e){if(this.options={serviceUrl:"https://geocoder.api.here.com/6.2/",app_id:"",app_code:"",apiKey:"",maxResults:5},w.Util.setOptions(this,e),e.apiKey)throw Error("apiKey is not supported, use app_id/app_code instead!")}geocode(e,s,r){const o=Vt(this.options,{searchtext:e,gen:9,app_id:this.options.app_id,app_code:this.options.app_code,jsonattributes:1,maxresults:this.options.maxResults});this.getJSON(this.options.serviceUrl+"geocode.json",o,s,r)}reverse(e,s,r,o){let h=e.lat+","+e.lng;this.options.reverseGeocodeProxRadius&&(h+=","+this.options.reverseGeocodeProxRadius);const l=te(this.options,{prox:h,mode:"retrieveAddresses",app_id:this.options.app_id,app_code:this.options.app_code,gen:9,jsonattributes:1,maxresults:this.options.maxResults});this.getJSON(this.options.serviceUrl+"reversegeocode.json",l,r,o)}getJSON(e,s,r,o){Et(e,s,h=>{const l=[];if(h.response.view&&h.response.view.length)for(let u=0;u<=h.response.view[0].result.length-1;u++){const f=h.response.view[0].result[u].location,_=w.latLng(f.displayPosition.latitude,f.displayPosition.longitude),v=w.latLngBounds(w.latLng(f.mapView.topLeft.latitude,f.mapView.topLeft.longitude),w.latLng(f.mapView.bottomRight.latitude,f.mapView.bottomRight.longitude));l[u]={name:f.address.label,properties:f.address,bbox:v,center:_}}r.call(o,l)})}}class Vr{constructor(e){this.options={serviceUrl:"https://geocode.search.hereapi.com/v1",apiKey:"",app_id:"",app_code:"",maxResults:10},w.Util.setOptions(this,e)}geocode(e,s,r){const o=Vt(this.options,{q:e,apiKey:this.options.apiKey,limit:this.options.maxResults});if(!o.at&&!o.in)throw Error("at / in parameters not found. Please define coordinates (at=latitude,longitude) or other (in) in your geocodingQueryParams.");this.getJSON(this.options.serviceUrl+"/discover",o,s,r)}reverse(e,s,r,o){const h=te(this.options,{at:e.lat+","+e.lng,limit:this.options.reverseGeocodeProxRadius,apiKey:this.options.apiKey});this.getJSON(this.options.serviceUrl+"/revgeocode",h,r,o)}getJSON(e,s,r,o){Et(e,s,h=>{const l=[];if(h.items&&h.items.length)for(let u=0;u<=h.items.length-1;u++){const f=h.items[u],_=w.latLng(f.position.lat,f.position.lng);let v;f.mapView?v=w.latLngBounds(w.latLng(f.mapView.south,f.mapView.west),w.latLng(f.mapView.north,f.mapView.east)):v=w.latLngBounds(w.latLng(f.position.lat,f.position.lng),w.latLng(f.position.lat,f.position.lng)),l[u]={name:f.address.label,properties:f.address,bbox:v,center:_}}r.call(o,l)})}}function Gh(i){return i.apiKey?new Vr(i):new Kr(i)}function Jr(i){let e;if(e=i.match(/^([NS])\s*(\d{1,3}(?:\.\d*)?)\W*([EW])\s*(\d{1,3}(?:\.\d*)?)$/))return w.latLng((/N/i.test(e[1])?1:-1)*+e[2],(/E/i.test(e[3])?1:-1)*+e[4]);if(e=i.match(/^(\d{1,3}(?:\.\d*)?)\s*([NS])\W*(\d{1,3}(?:\.\d*)?)\s*([EW])$/))return w.latLng((/N/i.test(e[2])?1:-1)*+e[1],(/E/i.test(e[4])?1:-1)*+e[3]);if(e=i.match(/^([NS])\s*(\d{1,3})°?\s*(\d{1,3}(?:\.\d*)?)?['′]?\W*([EW])\s*(\d{1,3})°?\s*(\d{1,3}(?:\.\d*)?)?['′]?$/))return w.latLng((/N/i.test(e[1])?1:-1)*(+e[2]+ +e[3]/60),(/E/i.test(e[4])?1:-1)*(+e[5]+ +e[6]/60));if(e=i.match(/^(\d{1,3})°?\s*(\d{1,3}(?:\.\d*)?)?['′]?\s*([NS])\W*(\d{1,3})°?\s*(\d{1,3}(?:\.\d*)?)?['′]?\s*([EW])$/))return w.latLng((/N/i.test(e[3])?1:-1)*(+e[1]+ +e[2]/60),(/E/i.test(e[6])?1:-1)*(+e[4]+ +e[5]/60));if(e=i.match(/^([NS])\s*(\d{1,3})°?\s*(\d{1,2})['′]?\s*(\d{1,3}(?:\.\d*)?)?["″]?\W*([EW])\s*(\d{1,3})°?\s*(\d{1,2})['′]?\s*(\d{1,3}(?:\.\d*)?)?["″]?$/))return w.latLng((/N/i.test(e[1])?1:-1)*(+e[2]+ +e[3]/60+ +e[4]/3600),(/E/i.test(e[5])?1:-1)*(+e[6]+ +e[7]/60+ +e[8]/3600));if(e=i.match(/^(\d{1,3})°?\s*(\d{1,2})['′]?\s*(\d{1,3}(?:\.\d*)?)?["″]\s*([NS])\W*(\d{1,3})°?\s*(\d{1,2})['′]?\s*(\d{1,3}(?:\.\d*)?)?["″]?\s*([EW])$/))return w.latLng((/N/i.test(e[4])?1:-1)*(+e[1]+ +e[2]/60+ +e[3]/3600),(/E/i.test(e[8])?1:-1)*(+e[5]+ +e[6]/60+ +e[7]/3600));if(e=i.match(/^\s*([+-]?\d+(?:\.\d*)?)\s*[\s,]\s*([+-]?\d+(?:\.\d*)?)\s*$/))return w.latLng(+e[1],+e[2])}class Xr{constructor(e){this.options={next:void 0,sizeInMeters:1e4},w.Util.setOptions(this,e)}geocode(e,s,r){const o=Jr(e);if(o){const h=[{name:e,center:o,bbox:o.toBounds(this.options.sizeInMeters)}];s.call(r,h)}else this.options.next&&this.options.next.geocode(e,s,r)}}function Ih(i){return new Xr(i)}class Qr{constructor(e){this.options={serviceUrl:"https://api.mapbox.com/geocoding/v5/mapbox.places/"},w.Util.setOptions(this,e)}_getProperties(e){const s={text:e.text,address:e.address};for(let r=0;r<(e.context||[]).length;r++){const o=e.context[r].id.split(".")[0];s[o]=e.context[r].text,e.context[r].short_code&&(s.countryShortCode=e.context[r].short_code)}return s}geocode(e,s,r){const o=Vt(this.options,{access_token:this.options.apiKey});o.proximity!==void 0&&o.proximity.lat!==void 0&&o.proximity.lng!==void 0&&(o.proximity=o.proximity.lng+","+o.proximity.lat),Et(this.options.serviceUrl+encodeURIComponent(e)+".json",o,h=>{const l=[];if(h.features&&h.features.length)for(let u=0;u<=h.features.length-1;u++){const f=h.features[u],_=w.latLng(f.center.reverse());let v;f.bbox?v=w.latLngBounds(w.latLng(f.bbox.slice(0,2).reverse()),w.latLng(f.bbox.slice(2,4).reverse())):v=w.latLngBounds(_,_),l[u]={name:f.place_name,bbox:v,center:_,properties:this._getProperties(f)}}s.call(r,l)})}suggest(e,s,r){return this.geocode(e,s,r)}reverse(e,s,r,o){const h=this.options.serviceUrl+e.lng+","+e.lat+".json",l=te(this.options,{access_token:this.options.apiKey});Et(h,l,u=>{const f=[];if(u.features&&u.features.length)for(let _=0;_<=u.features.length-1;_++){const v=u.features[_],m=w.latLng(v.center.reverse());let g;v.bbox?g=w.latLngBounds(w.latLng(v.bbox.slice(0,2).reverse()),w.latLng(v.bbox.slice(2,4).reverse())):g=w.latLngBounds(m,m),f[_]={name:v.place_name,bbox:g,center:m,properties:this._getProperties(v)}}r.call(o,f)})}}function Oh(i){return new Qr(i)}class Yr{constructor(e){this.options={serviceUrl:"https://www.mapquestapi.com/geocoding/v1"},w.Util.setOptions(this,e),this.options.apiKey=decodeURIComponent(this.options.apiKey)}_formatName(...e){return e.filter(s=>!!s).join(", ")}geocode(e,s,r){const o=Vt(this.options,{key:this.options.apiKey,location:e,limit:5,outFormat:"json"});Et(this.options.serviceUrl+"/address",o,w.Util.bind(function(h){const l=[];if(h.results&&h.results[0].locations)for(let u=h.results[0].locations.length-1;u>=0;u--){const f=h.results[0].locations[u],_=w.latLng(f.latLng);l[u]={name:this._formatName(f.street,f.adminArea4,f.adminArea3,f.adminArea1),bbox:w.latLngBounds(_,_),center:_}}s.call(r,l)},this))}reverse(e,s,r,o){const h=te(this.options,{key:this.options.apiKey,location:e.lat+","+e.lng,outputFormat:"json"});Et(this.options.serviceUrl+"/reverse",h,w.Util.bind(function(l){const u=[];if(l.results&&l.results[0].locations)for(let f=l.results[0].locations.length-1;f>=0;f--){const _=l.results[0].locations[f],v=w.latLng(_.latLng);u[f]={name:this._formatName(_.street,_.adminArea4,_.adminArea3,_.adminArea1),bbox:w.latLngBounds(v,v),center:v}}r.call(o,u)},this))}}function kh(i){return new Yr(i)}class ta{constructor(e){this.options={userId:void 0,apiKey:void 0,serviceUrl:"https://neutrinoapi.com/"},w.Util.setOptions(this,e)}geocode(e,s,r){const o=Vt(this.options,{apiKey:this.options.apiKey,userId:this.options.userId,address:e.split(/\s+/).join(".")});Et(this.options.serviceUrl+"geocode-address",o,h=>{const l=[];if(h.locations){h.geometry=h.locations[0];const u=w.latLng(h.geometry.latitude,h.geometry.longitude),f=w.latLngBounds(u,u);l[0]={name:h.geometry.address,bbox:f,center:u}}s.call(r,l)})}suggest(e,s,r){return this.geocode(e,s,r)}reverse(e,s,r,o){const h=te(this.options,{apiKey:this.options.apiKey,userId:this.options.userId,latitude:e.lat,longitude:e.lng});Et(this.options.serviceUrl+"geocode-reverse",h,l=>{const u=[];if(l.status.status==200&&l.found){const f=w.latLng(e.lat,e.lng),_=w.latLngBounds(f,f);u[0]={name:l.address,bbox:_,center:f}}r.call(o,u)})}}function Rh(i){return new ta(i)}class Ns{constructor(e){this.options={serviceUrl:"https://nominatim.openstreetmap.org/",htmlTemplate:function(s){const r=s.address;let o;const h=[];return(r.road||r.building)&&h.push("{building} {road} {house_number}"),(r.city||r.town||r.village||r.hamlet)&&(o=h.length>0?"leaflet-control-geocoder-address-detail":"",h.push('<span class="'+o+'">{postcode} {city} {town} {village} {hamlet}</span>')),(r.state||r.country)&&(o=h.length>0?"leaflet-control-geocoder-address-context":"",h.push('<span class="'+o+'">{state} {country}</span>')),Lh(h.join("<br/>"),r)}},w.Util.setOptions(this,e||{})}geocode(e,s,r){const o=Vt(this.options,{q:e,limit:5,format:"json",addressdetails:1});Et(this.options.serviceUrl+"search",o,h=>{const l=[];for(let u=h.length-1;u>=0;u--){const f=h[u].boundingbox;for(let _=0;_<4;_++)f[_]=+f[_];l[u]={icon:h[u].icon,name:h[u].display_name,html:this.options.htmlTemplate?this.options.htmlTemplate(h[u]):void 0,bbox:w.latLngBounds([f[0],f[2]],[f[1],f[3]]),center:w.latLng(h[u].lat,h[u].lon),properties:h[u]}}s.call(r,l)})}reverse(e,s,r,o){const h=te(this.options,{lat:e.lat,lon:e.lng,zoom:Math.round(Math.log(s/256)/Math.log(2)),addressdetails:1,format:"json"});Et(this.options.serviceUrl+"reverse",h,l=>{const u=[];if(l&&l.lat&&l.lon){const f=w.latLng(l.lat,l.lon),_=w.latLngBounds(f,f);u.push({name:l.display_name,html:this.options.htmlTemplate?this.options.htmlTemplate(l):void 0,center:f,bbox:_,properties:l})}r.call(o,u)})}}function zh(i){return new Ns(i)}class ea{constructor(e){w.Util.setOptions(this,e)}geocode(e,s,r){try{const o=this.options.OpenLocationCode.decode(e),h={name:e,center:w.latLng(o.latitudeCenter,o.longitudeCenter),bbox:w.latLngBounds(w.latLng(o.latitudeLo,o.longitudeLo),w.latLng(o.latitudeHi,o.longitudeHi))};s.call(r,[h])}catch(o){console.warn(o),s.call(r,[])}}reverse(e,s,r,o){try{const l={name:this.options.OpenLocationCode.encode(e.lat,e.lng,this.options.codeLength),center:w.latLng(e.lat,e.lng),bbox:w.latLngBounds(w.latLng(e.lat,e.lng),w.latLng(e.lat,e.lng))};r.call(o,[l])}catch(h){console.warn(h),r.call(o,[])}}}function Dh(i){return new ea(i)}class ia{constructor(e){this.options={serviceUrl:"https://api.opencagedata.com/geocode/v1/json"},w.Util.setOptions(this,e)}geocode(e,s,r){const o=Vt(this.options,{key:this.options.apiKey,q:e});Et(this.options.serviceUrl,o,h=>{const l=[];if(h.results&&h.results.length)for(let u=0;u<h.results.length;u++){const f=h.results[u],_=w.latLng(f.geometry);let v;f.annotations&&f.annotations.bounds?v=w.latLngBounds(w.latLng(f.annotations.bounds.northeast),w.latLng(f.annotations.bounds.southwest)):v=w.latLngBounds(_,_),l.push({name:f.formatted,bbox:v,center:_})}s.call(r,l)})}suggest(e,s,r){return this.geocode(e,s,r)}reverse(e,s,r,o){const h=te(this.options,{key:this.options.apiKey,q:[e.lat,e.lng].join(",")});Et(this.options.serviceUrl,h,l=>{const u=[];if(l.results&&l.results.length)for(let f=0;f<l.results.length;f++){const _=l.results[f],v=w.latLng(_.geometry);let m;_.annotations&&_.annotations.bounds?m=w.latLngBounds(w.latLng(_.annotations.bounds.northeast),w.latLng(_.annotations.bounds.southwest)):m=w.latLngBounds(v,v),u.push({name:_.formatted,bbox:m,center:v})}r.call(o,u)})}}function Bh(i){return new ia(i)}class Yi{constructor(e){this.options={serviceUrl:"https://api.geocode.earth/v1"},this._lastSuggest=0,w.Util.setOptions(this,e)}geocode(e,s,r){const o=Vt(this.options,{api_key:this.options.apiKey,text:e});Et(this.options.serviceUrl+"/search",o,h=>{s.call(r,this._parseResults(h,"bbox"))})}suggest(e,s,r){const o=Vt(this.options,{api_key:this.options.apiKey,text:e});Et(this.options.serviceUrl+"/autocomplete",o,h=>{h.geocoding.timestamp>this._lastSuggest&&(this._lastSuggest=h.geocoding.timestamp,s.call(r,this._parseResults(h,"bbox")))})}reverse(e,s,r,o){const h=te(this.options,{api_key:this.options.apiKey,"point.lat":e.lat,"point.lon":e.lng});Et(this.options.serviceUrl+"/reverse",h,l=>{r.call(o,this._parseResults(l,"bounds"))})}_parseResults(e,s){const r=[];return w.geoJSON(e,{pointToLayer:function(o,h){return w.circleMarker(h)},onEachFeature:function(o,h){const l={};let u,f;h.getBounds?(u=h.getBounds(),f=u.getCenter()):h.feature.bbox?(f=h.getLatLng(),u=w.latLngBounds(w.GeoJSON.coordsToLatLng(h.feature.bbox.slice(0,2)),w.GeoJSON.coordsToLatLng(h.feature.bbox.slice(2,4)))):(f=h.getLatLng(),u=w.latLngBounds(f,f)),l.name=h.feature.properties.label,l.center=f,l[s]=u,l.properties=h.feature.properties,r.push(l)}}),r}}function Gs(i){return new Yi(i)}const Uh=Yi,Zh=Gs,qh=Yi,$h=Gs;class na extends Yi{constructor(e){super(w.Util.extend({serviceUrl:"https://api.openrouteservice.org/geocode"},e))}}function Fh(i){return new na(i)}class sa{constructor(e){this.options={serviceUrl:"https://photon.komoot.io/api/",reverseUrl:"https://photon.komoot.io/reverse/",nameProperties:["name","street","suburb","hamlet","town","city","state","country"]},w.Util.setOptions(this,e)}geocode(e,s,r){const o=Vt(this.options,{q:e});Et(this.options.serviceUrl,o,w.Util.bind(function(h){s.call(r,this._decodeFeatures(h))},this))}suggest(e,s,r){return this.geocode(e,s,r)}reverse(e,s,r,o){const h=te(this.options,{lat:e.lat,lon:e.lng});Et(this.options.reverseUrl,h,w.Util.bind(function(l){r.call(o,this._decodeFeatures(l))},this))}_decodeFeatures(e){const s=[];if(e&&e.features)for(let r=0;r<e.features.length;r++){const o=e.features[r],h=o.geometry.coordinates,l=w.latLng(h[1],h[0]),u=o.properties.extent,f=u?w.latLngBounds([u[1],u[0]],[u[3],u[2]]):w.latLngBounds(l,l);s.push({name:this._decodeFeatureName(o),html:this.options.htmlTemplate?this.options.htmlTemplate(o):void 0,center:l,bbox:f,properties:o.properties})}return s}_decodeFeatureName(e){return(this.options.nameProperties||[]).map(s=>e.properties[s]).filter(s=>!!s).join(", ")}}function Hh(i){return new sa(i)}class ra{constructor(e){this.options={serviceUrl:"https://api.what3words.com/v2/"},w.Util.setOptions(this,e)}geocode(e,s,r){Et(this.options.serviceUrl+"forward",Vt(this.options,{key:this.options.apiKey,addr:e.split(/\s+/).join(".")}),o=>{const h=[];if(o.geometry){const l=w.latLng(o.geometry.lat,o.geometry.lng),u=w.latLngBounds(l,l);h[0]={name:o.words,bbox:u,center:l}}s.call(r,h)})}suggest(e,s,r){return this.geocode(e,s,r)}reverse(e,s,r,o){Et(this.options.serviceUrl+"reverse",te(this.options,{key:this.options.apiKey,coords:[e.lat,e.lng].join(",")}),h=>{const l=[];if(h.status.status==200){const u=w.latLng(h.geometry.lat,h.geometry.lng),f=w.latLngBounds(u,u);l[0]={name:h.words,bbox:f,center:u}}r.call(o,l)})}}function Wh(i){return new ra(i)}var jh={__proto__:null,geocodingParams:Vt,reverseParams:te,ArcGis:Hr,arcgis:Ch,Bing:Wr,bing:Th,Google:jr,google:Nh,HERE:Kr,HEREv2:Vr,here:Gh,parseLatLng:Jr,LatLng:Xr,latLng:Ih,Mapbox:Qr,mapbox:Oh,MapQuest:Yr,mapQuest:kh,Neutrino:ta,neutrino:Rh,Nominatim:Ns,nominatim:zh,OpenLocationCode:ea,openLocationCode:Dh,OpenCage:ia,opencage:Bh,Pelias:Yi,pelias:Gs,GeocodeEarth:Uh,geocodeEarth:Zh,Mapzen:qh,mapzen:$h,Openrouteservice:na,openrouteservice:Fh,Photon:sa,photon:Hh,What3Words:ra,what3words:Wh};class Is{constructor(...e){}}w.Util.extend(Is.prototype,w.Control.prototype),w.Util.extend(Is.prototype,w.Evented.prototype);class Hn extends Is{constructor(e){super(e),this.options={showUniqueResult:!0,showResultIcons:!1,collapsed:!0,expand:"touch",position:"topright",placeholder:"Search...",errorMessage:"Nothing found.",iconLabel:"Initiate a new search",query:"",queryMinLength:1,suggestMinLength:3,suggestTimeout:250,defaultMarkGeocode:!0},this._requestCount=0,w.Util.setOptions(this,e),this.options.geocoder||(this.options.geocoder=new Ns)}addThrobberClass(){w.DomUtil.addClass(this._container,"leaflet-control-geocoder-throbber")}removeThrobberClass(){w.DomUtil.removeClass(this._container,"leaflet-control-geocoder-throbber")}onAdd(e){const s="leaflet-control-geocoder",r=w.DomUtil.create("div",s+" leaflet-bar"),o=w.DomUtil.create("button",s+"-icon",r),h=this._form=w.DomUtil.create("div",s+"-form",r);this._map=e,this._container=r,o.innerHTML="&nbsp;",o.type="button",o.setAttribute("aria-label",this.options.iconLabel);const l=this._input=w.DomUtil.create("input","",h);return l.type="text",l.value=this.options.query,l.placeholder=this.options.placeholder,w.DomEvent.disableClickPropagation(l),this._errorElement=w.DomUtil.create("div",s+"-form-no-error",r),this._errorElement.innerHTML=this.options.errorMessage,this._alts=w.DomUtil.create("ul",s+"-alternatives leaflet-control-geocoder-alternatives-minimized",r),w.DomEvent.disableClickPropagation(this._alts),w.DomEvent.addListener(l,"keydown",this._keydown,this),this.options.geocoder.suggest&&w.DomEvent.addListener(l,"input",this._change,this),w.DomEvent.addListener(l,"blur",()=>{this.options.collapsed&&!this._preventBlurCollapse&&this._collapse(),this._preventBlurCollapse=!1}),this.options.collapsed?this.options.expand==="click"?w.DomEvent.addListener(r,"click",u=>{u.button===0&&u.detail!==2&&this._toggle()}):this.options.expand==="touch"?w.DomEvent.addListener(r,w.Browser.touch?"touchstart mousedown":"mousedown",u=>{this._toggle(),u.preventDefault(),u.stopPropagation()},this):(w.DomEvent.addListener(r,"mouseover",this._expand,this),w.DomEvent.addListener(r,"mouseout",this._collapse,this),this._map.on("movestart",this._collapse,this)):(this._expand(),w.Browser.touch?w.DomEvent.addListener(r,"touchstart",()=>this._geocode()):w.DomEvent.addListener(r,"click",()=>this._geocode())),this.options.defaultMarkGeocode&&this.on("markgeocode",this.markGeocode,this),this.on("startgeocode",this.addThrobberClass,this),this.on("finishgeocode",this.removeThrobberClass,this),this.on("startsuggest",this.addThrobberClass,this),this.on("finishsuggest",this.removeThrobberClass,this),w.DomEvent.disableClickPropagation(r),r}setQuery(e){return this._input.value=e,this}_geocodeResult(e,s){if(!s&&this.options.showUniqueResult&&e.length===1)this._geocodeResultSelected(e[0]);else if(e.length>0){this._alts.innerHTML="",this._results=e,w.DomUtil.removeClass(this._alts,"leaflet-control-geocoder-alternatives-minimized"),w.DomUtil.addClass(this._container,"leaflet-control-geocoder-options-open");for(let r=0;r<e.length;r++)this._alts.appendChild(this._createAlt(e[r],r))}else w.DomUtil.addClass(this._container,"leaflet-control-geocoder-options-error"),w.DomUtil.addClass(this._errorElement,"leaflet-control-geocoder-error")}markGeocode(e){const s=e.geocode;return this._map.fitBounds(s.bbox),this._geocodeMarker&&this._map.removeLayer(this._geocodeMarker),this._geocodeMarker=new w.Marker(s.center).bindPopup(s.html||s.name).addTo(this._map).openPopup(),this}_geocode(e){const s=this._input.value;if(!e&&s.length<this.options.queryMinLength)return;const r=++this._requestCount,o=l=>{if(r===this._requestCount){const u={input:s,results:l};this.fire(e?"finishsuggest":"finishgeocode",u),this._geocodeResult(l,e)}};this._lastGeocode=s,e||this._clearResults();const h={input:s};this.fire(e?"startsuggest":"startgeocode",h),e?this.options.geocoder.suggest(s,o):this.options.geocoder.geocode(s,o)}_geocodeResultSelected(e){const s={geocode:e};this.fire("markgeocode",s)}_toggle(){w.DomUtil.hasClass(this._container,"leaflet-control-geocoder-expanded")?this._collapse():this._expand()}_expand(){w.DomUtil.addClass(this._container,"leaflet-control-geocoder-expanded"),this._input.select(),this.fire("expand")}_collapse(){w.DomUtil.removeClass(this._container,"leaflet-control-geocoder-expanded"),w.DomUtil.addClass(this._alts,"leaflet-control-geocoder-alternatives-minimized"),w.DomUtil.removeClass(this._errorElement,"leaflet-control-geocoder-error"),w.DomUtil.removeClass(this._container,"leaflet-control-geocoder-options-open"),w.DomUtil.removeClass(this._container,"leaflet-control-geocoder-options-error"),this._input.blur(),this.fire("collapse")}_clearResults(){w.DomUtil.addClass(this._alts,"leaflet-control-geocoder-alternatives-minimized"),this._selection=null,w.DomUtil.removeClass(this._errorElement,"leaflet-control-geocoder-error"),w.DomUtil.removeClass(this._container,"leaflet-control-geocoder-options-open"),w.DomUtil.removeClass(this._container,"leaflet-control-geocoder-options-error")}_createAlt(e,s){const r=w.DomUtil.create("li",""),o=w.DomUtil.create("a","",r),h=this.options.showResultIcons&&e.icon?w.DomUtil.create("img","",o):null,l=e.html?void 0:document.createTextNode(e.name),u=f=>{this._preventBlurCollapse=!0,w.DomEvent.stop(f),this._geocodeResultSelected(e),w.DomEvent.on(r,"click touchend",()=>{this.options.collapsed?this._collapse():this._clearResults()})};return h&&(h.src=e.icon),r.setAttribute("data-result-index",String(s)),e.html?o.innerHTML=o.innerHTML+e.html:l&&o.appendChild(l),w.DomEvent.addListener(r,"mousedown touchstart",u,this),r}_keydown(e){const s=r=>{this._selection&&(w.DomUtil.removeClass(this._selection,"leaflet-control-geocoder-selected"),this._selection=this._selection[r>0?"nextSibling":"previousSibling"]),this._selection||(this._selection=this._alts[r>0?"firstChild":"lastChild"]),this._selection&&w.DomUtil.addClass(this._selection,"leaflet-control-geocoder-selected")};switch(e.keyCode){case 27:this.options.collapsed?this._collapse():this._clearResults();break;case 38:s(-1);break;case 40:s(1);break;case 13:if(this._selection){const r=parseInt(this._selection.getAttribute("data-result-index"),10);this._geocodeResultSelected(this._results[r]),this._clearResults()}else this._geocode();break;default:return}w.DomEvent.preventDefault(e)}_change(){const e=this._input.value;e!==this._lastGeocode&&(clearTimeout(this._suggestTimeout),e.length>=this.options.suggestMinLength?this._suggestTimeout=setTimeout(()=>this._geocode(!0),this.options.suggestTimeout):this._clearResults())}}function Kh(i){return new Hn(i)}/* @preserve
 * Leaflet Control Geocoder
 * https://github.com/perliedman/leaflet-control-geocoder
 *
 * Copyright (c) 2012 sa3m (https://github.com/sa3m)
 * Copyright (c) 2018 Per Liedman
 * All rights reserved.
 */w.Util.extend(Hn,jh),w.Util.extend(w.Control,{Geocoder:Hn,geocoder:Kh});const Vh=`.leaflet-control-geocoder {
  border-radius: 4px;
  background: white;
  min-width: 26px;
  min-height: 26px;
}

.leaflet-touch .leaflet-control-geocoder {
  min-width: 30px;
  min-height: 30px;
}

.leaflet-control-geocoder a,
.leaflet-control-geocoder .leaflet-control-geocoder-icon {
  border-bottom: none;
  display: inline-block;
}

.leaflet-control-geocoder .leaflet-control-geocoder-alternatives a {
  width: inherit;
  height: inherit;
  line-height: inherit;
}

.leaflet-control-geocoder a:hover,
.leaflet-control-geocoder .leaflet-control-geocoder-icon:hover {
  border-bottom: none;
  display: inline-block;
}

.leaflet-control-geocoder-form {
  display: none;
  vertical-align: middle;
}
.leaflet-control-geocoder-expanded .leaflet-control-geocoder-form {
  display: inline-block;
}
.leaflet-control-geocoder-form input {
  font-size: 120%;
  border: 0;
  background-color: transparent;
  width: 246px;
}

.leaflet-control-geocoder-icon {
  border-radius: 4px;
  width: 26px;
  height: 26px;
  border: none;
  background-color: white;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12.2 13l3.4 6.6c.6 1.1 2.5-.4 2-1.2l-4-6.2z'/%3E%3Ccircle cx='10.8' cy='8.9' r='3.9' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  cursor: pointer;
}

.leaflet-touch .leaflet-control-geocoder-icon {
  width: 30px;
  height: 30px;
}

.leaflet-control-geocoder-throbber .leaflet-control-geocoder-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' stroke='%23000' stroke-linecap='round' stroke-width='1.6' viewBox='0 0 24 24'%3E%3Cdefs/%3E%3Cg%3E%3Cpath stroke-opacity='.1' d='M14 8.4l3-5'/%3E%3Cpath stroke-opacity='.2' d='M15.6 10l5-3'/%3E%3Cpath stroke-opacity='.3' d='M16.2 12H22'/%3E%3Cpath stroke-opacity='.4' d='M15.6 14l5 3m-6.5-1.4l2.9 5'/%3E%3Cpath stroke-opacity='.5' d='M12 16.2V22m-2-6.4l-3 5'/%3E%3Cpath stroke-opacity='.6' d='M8.4 14l-5 3'/%3E%3Cpath stroke-opacity='.7' d='M7.8 12H2'/%3E%3Cpath stroke-opacity='.8' d='M8.4 10l-5-3'/%3E%3Cpath stroke-opacity='.9' d='M10 8.4l-3-5'/%3E%3Cpath d='M12 7.8V2'/%3E%3CanimateTransform attributeName='transform' calcMode='discrete' dur='1s' repeatCount='indefinite' type='rotate' values='0 12 12;30 12 12;60 12 12;90 12 12;120 12 12;150 12 12;180 12 12;210 12 12;240 12 12;270 12 12;300 12 12;330 12 12'/%3E%3C/g%3E%3C/svg%3E");
}

.leaflet-control-geocoder-form-no-error {
  display: none;
}

.leaflet-control-geocoder-form input:focus {
  outline: none;
}

.leaflet-control-geocoder-form button {
  display: none;
}
.leaflet-control-geocoder-error {
  margin-top: 8px;
  margin-left: 8px;
  display: block;
  color: #444;
}
.leaflet-control-geocoder-alternatives {
  display: block;
  width: 272px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.leaflet-control-geocoder-alternatives-minimized {
  display: none;
  height: 0;
}
.leaflet-control-geocoder-alternatives li {
  white-space: nowrap;
  display: block;
  overflow: hidden;
  padding: 5px 8px;
  text-overflow: ellipsis;
  border-bottom: 1px solid #ccc;
  cursor: pointer;
}

.leaflet-control-geocoder-alternatives li a,
.leaflet-control-geocoder-alternatives li a:hover {
  width: inherit;
  height: inherit;
  line-height: inherit;
  background: inherit;
  border-radius: inherit;
  text-align: left;
}

.leaflet-control-geocoder-alternatives li:last-child {
  border-bottom: none;
}
.leaflet-control-geocoder-alternatives li:hover,
.leaflet-control-geocoder-selected {
  background-color: #f5f5f5;
}
.leaflet-control-geocoder-address-detail {
}
.leaflet-control-geocoder-address-context {
  color: #666;
}
`,Jh=`/* required styles */\r
\r
.leaflet-pane,\r
.leaflet-tile,\r
.leaflet-marker-icon,\r
.leaflet-marker-shadow,\r
.leaflet-tile-container,\r
.leaflet-pane > svg,\r
.leaflet-pane > canvas,\r
.leaflet-zoom-box,\r
.leaflet-image-layer,\r
.leaflet-layer {\r
	position: absolute;\r
	left: 0;\r
	top: 0;\r
	}\r
.leaflet-container {\r
	overflow: hidden;\r
	}\r
.leaflet-tile,\r
.leaflet-marker-icon,\r
.leaflet-marker-shadow {\r
	-webkit-user-select: none;\r
	   -moz-user-select: none;\r
	        user-select: none;\r
	  -webkit-user-drag: none;\r
	}\r
/* Prevents IE11 from highlighting tiles in blue */\r
.leaflet-tile::selection {\r
	background: transparent;\r
}\r
/* Safari renders non-retina tile on retina better with this, but Chrome is worse */\r
.leaflet-safari .leaflet-tile {\r
	image-rendering: -webkit-optimize-contrast;\r
	}\r
/* hack that prevents hw layers "stretching" when loading new tiles */\r
.leaflet-safari .leaflet-tile-container {\r
	width: 1600px;\r
	height: 1600px;\r
	-webkit-transform-origin: 0 0;\r
	}\r
.leaflet-marker-icon,\r
.leaflet-marker-shadow {\r
	display: block;\r
	}\r
/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */\r
/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */\r
.leaflet-container .leaflet-overlay-pane svg {\r
	max-width: none !important;\r
	max-height: none !important;\r
	}\r
.leaflet-container .leaflet-marker-pane img,\r
.leaflet-container .leaflet-shadow-pane img,\r
.leaflet-container .leaflet-tile-pane img,\r
.leaflet-container img.leaflet-image-layer,\r
.leaflet-container .leaflet-tile {\r
	max-width: none !important;\r
	max-height: none !important;\r
	width: auto;\r
	padding: 0;\r
	}\r
\r
.leaflet-container img.leaflet-tile {\r
	/* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */\r
	mix-blend-mode: plus-lighter;\r
}\r
\r
.leaflet-container.leaflet-touch-zoom {\r
	-ms-touch-action: pan-x pan-y;\r
	touch-action: pan-x pan-y;\r
	}\r
.leaflet-container.leaflet-touch-drag {\r
	-ms-touch-action: pinch-zoom;\r
	/* Fallback for FF which doesn't support pinch-zoom */\r
	touch-action: none;\r
	touch-action: pinch-zoom;\r
}\r
.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {\r
	-ms-touch-action: none;\r
	touch-action: none;\r
}\r
.leaflet-container {\r
	-webkit-tap-highlight-color: transparent;\r
}\r
.leaflet-container a {\r
	-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);\r
}\r
.leaflet-tile {\r
	filter: inherit;\r
	visibility: hidden;\r
	}\r
.leaflet-tile-loaded {\r
	visibility: inherit;\r
	}\r
.leaflet-zoom-box {\r
	width: 0;\r
	height: 0;\r
	-moz-box-sizing: border-box;\r
	     box-sizing: border-box;\r
	z-index: 800;\r
	}\r
/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */\r
.leaflet-overlay-pane svg {\r
	-moz-user-select: none;\r
	}\r
\r
.leaflet-pane         { z-index: 400; }\r
\r
.leaflet-tile-pane    { z-index: 200; }\r
.leaflet-overlay-pane { z-index: 400; }\r
.leaflet-shadow-pane  { z-index: 500; }\r
.leaflet-marker-pane  { z-index: 600; }\r
.leaflet-tooltip-pane   { z-index: 650; }\r
.leaflet-popup-pane   { z-index: 700; }\r
\r
.leaflet-map-pane canvas { z-index: 100; }\r
.leaflet-map-pane svg    { z-index: 200; }\r
\r
.leaflet-vml-shape {\r
	width: 1px;\r
	height: 1px;\r
	}\r
.lvml {\r
	behavior: url(#default#VML);\r
	display: inline-block;\r
	position: absolute;\r
	}\r
\r
\r
/* control positioning */\r
\r
.leaflet-control {\r
	position: relative;\r
	z-index: 800;\r
	pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */\r
	pointer-events: auto;\r
	}\r
.leaflet-top,\r
.leaflet-bottom {\r
	position: absolute;\r
	z-index: 1000;\r
	pointer-events: none;\r
	}\r
.leaflet-top {\r
	top: 0;\r
	}\r
.leaflet-right {\r
	right: 0;\r
	}\r
.leaflet-bottom {\r
	bottom: 0;\r
	}\r
.leaflet-left {\r
	left: 0;\r
	}\r
.leaflet-control {\r
	float: left;\r
	clear: both;\r
	}\r
.leaflet-right .leaflet-control {\r
	float: right;\r
	}\r
.leaflet-top .leaflet-control {\r
	margin-top: 10px;\r
	}\r
.leaflet-bottom .leaflet-control {\r
	margin-bottom: 10px;\r
	}\r
.leaflet-left .leaflet-control {\r
	margin-left: 10px;\r
	}\r
.leaflet-right .leaflet-control {\r
	margin-right: 10px;\r
	}\r
\r
\r
/* zoom and fade animations */\r
\r
.leaflet-fade-anim .leaflet-popup {\r
	opacity: 0;\r
	-webkit-transition: opacity 0.2s linear;\r
	   -moz-transition: opacity 0.2s linear;\r
	        transition: opacity 0.2s linear;\r
	}\r
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {\r
	opacity: 1;\r
	}\r
.leaflet-zoom-animated {\r
	-webkit-transform-origin: 0 0;\r
	    -ms-transform-origin: 0 0;\r
	        transform-origin: 0 0;\r
	}\r
svg.leaflet-zoom-animated {\r
	will-change: transform;\r
}\r
\r
.leaflet-zoom-anim .leaflet-zoom-animated {\r
	-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);\r
	   -moz-transition:    -moz-transform 0.25s cubic-bezier(0,0,0.25,1);\r
	        transition:         transform 0.25s cubic-bezier(0,0,0.25,1);\r
	}\r
.leaflet-zoom-anim .leaflet-tile,\r
.leaflet-pan-anim .leaflet-tile {\r
	-webkit-transition: none;\r
	   -moz-transition: none;\r
	        transition: none;\r
	}\r
\r
.leaflet-zoom-anim .leaflet-zoom-hide {\r
	visibility: hidden;\r
	}\r
\r
\r
/* cursors */\r
\r
.leaflet-interactive {\r
	cursor: pointer;\r
	}\r
.leaflet-grab {\r
	cursor: -webkit-grab;\r
	cursor:    -moz-grab;\r
	cursor:         grab;\r
	}\r
.leaflet-crosshair,\r
.leaflet-crosshair .leaflet-interactive {\r
	cursor: crosshair;\r
	}\r
.leaflet-popup-pane,\r
.leaflet-control {\r
	cursor: auto;\r
	}\r
.leaflet-dragging .leaflet-grab,\r
.leaflet-dragging .leaflet-grab .leaflet-interactive,\r
.leaflet-dragging .leaflet-marker-draggable {\r
	cursor: move;\r
	cursor: -webkit-grabbing;\r
	cursor:    -moz-grabbing;\r
	cursor:         grabbing;\r
	}\r
\r
/* marker & overlays interactivity */\r
.leaflet-marker-icon,\r
.leaflet-marker-shadow,\r
.leaflet-image-layer,\r
.leaflet-pane > svg path,\r
.leaflet-tile-container {\r
	pointer-events: none;\r
	}\r
\r
.leaflet-marker-icon.leaflet-interactive,\r
.leaflet-image-layer.leaflet-interactive,\r
.leaflet-pane > svg path.leaflet-interactive,\r
svg.leaflet-image-layer.leaflet-interactive path {\r
	pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */\r
	pointer-events: auto;\r
	}\r
\r
/* visual tweaks */\r
\r
.leaflet-container {\r
	background: #ddd;\r
	outline-offset: 1px;\r
	}\r
.leaflet-container a {\r
	color: #0078A8;\r
	}\r
.leaflet-zoom-box {\r
	border: 2px dotted #38f;\r
	background: rgba(255,255,255,0.5);\r
	}\r
\r
\r
/* general typography */\r
.leaflet-container {\r
	font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;\r
	font-size: 12px;\r
	font-size: 0.75rem;\r
	line-height: 1.5;\r
	}\r
\r
\r
/* general toolbar styles */\r
\r
.leaflet-bar {\r
	box-shadow: 0 1px 5px rgba(0,0,0,0.65);\r
	border-radius: 4px;\r
	}\r
.leaflet-bar a {\r
	background-color: #fff;\r
	border-bottom: 1px solid #ccc;\r
	width: 26px;\r
	height: 26px;\r
	line-height: 26px;\r
	display: block;\r
	text-align: center;\r
	text-decoration: none;\r
	color: black;\r
	}\r
.leaflet-bar a,\r
.leaflet-control-layers-toggle {\r
	background-position: 50% 50%;\r
	background-repeat: no-repeat;\r
	display: block;\r
	}\r
.leaflet-bar a:hover,\r
.leaflet-bar a:focus {\r
	background-color: #f4f4f4;\r
	}\r
.leaflet-bar a:first-child {\r
	border-top-left-radius: 4px;\r
	border-top-right-radius: 4px;\r
	}\r
.leaflet-bar a:last-child {\r
	border-bottom-left-radius: 4px;\r
	border-bottom-right-radius: 4px;\r
	border-bottom: none;\r
	}\r
.leaflet-bar a.leaflet-disabled {\r
	cursor: default;\r
	background-color: #f4f4f4;\r
	color: #bbb;\r
	}\r
\r
.leaflet-touch .leaflet-bar a {\r
	width: 30px;\r
	height: 30px;\r
	line-height: 30px;\r
	}\r
.leaflet-touch .leaflet-bar a:first-child {\r
	border-top-left-radius: 2px;\r
	border-top-right-radius: 2px;\r
	}\r
.leaflet-touch .leaflet-bar a:last-child {\r
	border-bottom-left-radius: 2px;\r
	border-bottom-right-radius: 2px;\r
	}\r
\r
/* zoom control */\r
\r
.leaflet-control-zoom-in,\r
.leaflet-control-zoom-out {\r
	font: bold 18px 'Lucida Console', Monaco, monospace;\r
	text-indent: 1px;\r
	}\r
\r
.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out  {\r
	font-size: 22px;\r
	}\r
\r
\r
/* layers control */\r
\r
.leaflet-control-layers {\r
	box-shadow: 0 1px 5px rgba(0,0,0,0.4);\r
	background: #fff;\r
	border-radius: 5px;\r
	}\r
.leaflet-control-layers-toggle {\r
	background-image: url(images/layers.png);\r
	width: 36px;\r
	height: 36px;\r
	}\r
.leaflet-retina .leaflet-control-layers-toggle {\r
	background-image: url(images/layers-2x.png);\r
	background-size: 26px 26px;\r
	}\r
.leaflet-touch .leaflet-control-layers-toggle {\r
	width: 44px;\r
	height: 44px;\r
	}\r
.leaflet-control-layers .leaflet-control-layers-list,\r
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {\r
	display: none;\r
	}\r
.leaflet-control-layers-expanded .leaflet-control-layers-list {\r
	display: block;\r
	position: relative;\r
	}\r
.leaflet-control-layers-expanded {\r
	padding: 6px 10px 6px 6px;\r
	color: #333;\r
	background: #fff;\r
	}\r
.leaflet-control-layers-scrollbar {\r
	overflow-y: scroll;\r
	overflow-x: hidden;\r
	padding-right: 5px;\r
	}\r
.leaflet-control-layers-selector {\r
	margin-top: 2px;\r
	position: relative;\r
	top: 1px;\r
	}\r
.leaflet-control-layers label {\r
	display: block;\r
	font-size: 13px;\r
	font-size: 1.08333em;\r
	}\r
.leaflet-control-layers-separator {\r
	height: 0;\r
	border-top: 1px solid #ddd;\r
	margin: 5px -10px 5px -6px;\r
	}\r
\r
/* Default icon URLs */\r
.leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */\r
	background-image: url(images/marker-icon.png);\r
	}\r
\r
\r
/* attribution and scale controls */\r
\r
.leaflet-container .leaflet-control-attribution {\r
	background: #fff;\r
	background: rgba(255, 255, 255, 0.8);\r
	margin: 0;\r
	}\r
.leaflet-control-attribution,\r
.leaflet-control-scale-line {\r
	padding: 0 5px;\r
	color: #333;\r
	line-height: 1.4;\r
	}\r
.leaflet-control-attribution a {\r
	text-decoration: none;\r
	}\r
.leaflet-control-attribution a:hover,\r
.leaflet-control-attribution a:focus {\r
	text-decoration: underline;\r
	}\r
.leaflet-attribution-flag {\r
	display: inline !important;\r
	vertical-align: baseline !important;\r
	width: 1em;\r
	height: 0.6669em;\r
	}\r
.leaflet-left .leaflet-control-scale {\r
	margin-left: 5px;\r
	}\r
.leaflet-bottom .leaflet-control-scale {\r
	margin-bottom: 5px;\r
	}\r
.leaflet-control-scale-line {\r
	border: 2px solid #777;\r
	border-top: none;\r
	line-height: 1.1;\r
	padding: 2px 5px 1px;\r
	white-space: nowrap;\r
	-moz-box-sizing: border-box;\r
	     box-sizing: border-box;\r
	background: rgba(255, 255, 255, 0.8);\r
	text-shadow: 1px 1px #fff;\r
	}\r
.leaflet-control-scale-line:not(:first-child) {\r
	border-top: 2px solid #777;\r
	border-bottom: none;\r
	margin-top: -2px;\r
	}\r
.leaflet-control-scale-line:not(:first-child):not(:last-child) {\r
	border-bottom: 2px solid #777;\r
	}\r
\r
.leaflet-touch .leaflet-control-attribution,\r
.leaflet-touch .leaflet-control-layers,\r
.leaflet-touch .leaflet-bar {\r
	box-shadow: none;\r
	}\r
.leaflet-touch .leaflet-control-layers,\r
.leaflet-touch .leaflet-bar {\r
	border: 2px solid rgba(0,0,0,0.2);\r
	background-clip: padding-box;\r
	}\r
\r
\r
/* popup */\r
\r
.leaflet-popup {\r
	position: absolute;\r
	text-align: center;\r
	margin-bottom: 20px;\r
	}\r
.leaflet-popup-content-wrapper {\r
	padding: 1px;\r
	text-align: left;\r
	border-radius: 12px;\r
	}\r
.leaflet-popup-content {\r
	margin: 13px 24px 13px 20px;\r
	line-height: 1.3;\r
	font-size: 13px;\r
	font-size: 1.08333em;\r
	min-height: 1px;\r
	}\r
.leaflet-popup-content p {\r
	margin: 17px 0;\r
	margin: 1.3em 0;\r
	}\r
.leaflet-popup-tip-container {\r
	width: 40px;\r
	height: 20px;\r
	position: absolute;\r
	left: 50%;\r
	margin-top: -1px;\r
	margin-left: -20px;\r
	overflow: hidden;\r
	pointer-events: none;\r
	}\r
.leaflet-popup-tip {\r
	width: 17px;\r
	height: 17px;\r
	padding: 1px;\r
\r
	margin: -10px auto 0;\r
	pointer-events: auto;\r
\r
	-webkit-transform: rotate(45deg);\r
	   -moz-transform: rotate(45deg);\r
	    -ms-transform: rotate(45deg);\r
	        transform: rotate(45deg);\r
	}\r
.leaflet-popup-content-wrapper,\r
.leaflet-popup-tip {\r
	background: white;\r
	color: #333;\r
	box-shadow: 0 3px 14px rgba(0,0,0,0.4);\r
	}\r
.leaflet-container a.leaflet-popup-close-button {\r
	position: absolute;\r
	top: 0;\r
	right: 0;\r
	border: none;\r
	text-align: center;\r
	width: 24px;\r
	height: 24px;\r
	font: 16px/24px Tahoma, Verdana, sans-serif;\r
	color: #757575;\r
	text-decoration: none;\r
	background: transparent;\r
	}\r
.leaflet-container a.leaflet-popup-close-button:hover,\r
.leaflet-container a.leaflet-popup-close-button:focus {\r
	color: #585858;\r
	}\r
.leaflet-popup-scrolled {\r
	overflow: auto;\r
	}\r
\r
.leaflet-oldie .leaflet-popup-content-wrapper {\r
	-ms-zoom: 1;\r
	}\r
.leaflet-oldie .leaflet-popup-tip {\r
	width: 24px;\r
	margin: 0 auto;\r
\r
	-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";\r
	filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);\r
	}\r
\r
.leaflet-oldie .leaflet-control-zoom,\r
.leaflet-oldie .leaflet-control-layers,\r
.leaflet-oldie .leaflet-popup-content-wrapper,\r
.leaflet-oldie .leaflet-popup-tip {\r
	border: 1px solid #999;\r
	}\r
\r
\r
/* div icon */\r
\r
.leaflet-div-icon {\r
	background: #fff;\r
	border: 1px solid #666;\r
	}\r
\r
\r
/* Tooltip */\r
/* Base styles for the element that has a tooltip */\r
.leaflet-tooltip {\r
	position: absolute;\r
	padding: 6px;\r
	background-color: #fff;\r
	border: 1px solid #fff;\r
	border-radius: 3px;\r
	color: #222;\r
	white-space: nowrap;\r
	-webkit-user-select: none;\r
	-moz-user-select: none;\r
	-ms-user-select: none;\r
	user-select: none;\r
	pointer-events: none;\r
	box-shadow: 0 1px 3px rgba(0,0,0,0.4);\r
	}\r
.leaflet-tooltip.leaflet-interactive {\r
	cursor: pointer;\r
	pointer-events: auto;\r
	}\r
.leaflet-tooltip-top:before,\r
.leaflet-tooltip-bottom:before,\r
.leaflet-tooltip-left:before,\r
.leaflet-tooltip-right:before {\r
	position: absolute;\r
	pointer-events: none;\r
	border: 6px solid transparent;\r
	background: transparent;\r
	content: "";\r
	}\r
\r
/* Directions */\r
\r
.leaflet-tooltip-bottom {\r
	margin-top: 6px;\r
}\r
.leaflet-tooltip-top {\r
	margin-top: -6px;\r
}\r
.leaflet-tooltip-bottom:before,\r
.leaflet-tooltip-top:before {\r
	left: 50%;\r
	margin-left: -6px;\r
	}\r
.leaflet-tooltip-top:before {\r
	bottom: 0;\r
	margin-bottom: -12px;\r
	border-top-color: #fff;\r
	}\r
.leaflet-tooltip-bottom:before {\r
	top: 0;\r
	margin-top: -12px;\r
	margin-left: -6px;\r
	border-bottom-color: #fff;\r
	}\r
.leaflet-tooltip-left {\r
	margin-left: -6px;\r
}\r
.leaflet-tooltip-right {\r
	margin-left: 6px;\r
}\r
.leaflet-tooltip-left:before,\r
.leaflet-tooltip-right:before {\r
	top: 50%;\r
	margin-top: -6px;\r
	}\r
.leaflet-tooltip-left:before {\r
	right: 0;\r
	margin-right: -12px;\r
	border-left-color: #fff;\r
	}\r
.leaflet-tooltip-right:before {\r
	left: 0;\r
	margin-left: -12px;\r
	border-right-color: #fff;\r
	}\r
\r
/* Printing */\r
\r
@media print {\r
	/* Prevent printers from removing background-images of controls. */\r
	.leaflet-control {\r
		-webkit-print-color-adjust: exact;\r
		print-color-adjust: exact;\r
		}\r
	}\r
`;function Xh(i){i("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),i("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),i("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs");for(var e=1;e<=60;++e)i("EPSG:"+(32600+e),"+proj=utm +zone="+e+" +datum=WGS84 +units=m"),i("EPSG:"+(32700+e),"+proj=utm +zone="+e+" +south +datum=WGS84 +units=m");i.WGS84=i["EPSG:4326"],i["EPSG:3785"]=i["EPSG:3857"],i.GOOGLE=i["EPSG:3857"],i["EPSG:900913"]=i["EPSG:3857"],i["EPSG:102113"]=i["EPSG:3857"]}var ti=1,ei=2,vi=3,Qh=4,Os=5,aa=6378137,Yh=6356752314e-3,oa=.0066943799901413165,tn=484813681109536e-20,O=Math.PI/2,tl=.16666666666666666,el=.04722222222222222,il=.022156084656084655,B=1e-10,mt=.017453292519943295,we=57.29577951308232,ut=Math.PI/4,en=Math.PI*2,Ct=3.14159265359,ee={};ee.greenwich=0,ee.lisbon=-9.131906111111,ee.paris=2.337229166667,ee.bogota=-74.080916666667,ee.madrid=-3.687938888889,ee.rome=12.452333333333,ee.bern=7.439583333333,ee.jakarta=106.807719444444,ee.ferro=-17.666666666667,ee.brussels=4.367975,ee.stockholm=18.058277777778,ee.athens=23.7163375,ee.oslo=10.722916666667;const nl={mm:{to_meter:.001},cm:{to_meter:.01},ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937},fath:{to_meter:1.8288},kmi:{to_meter:1852},"us-ch":{to_meter:20.1168402336805},"us-mi":{to_meter:1609.34721869444},km:{to_meter:1e3},"ind-ft":{to_meter:.30479841},"ind-yd":{to_meter:.91439523},mi:{to_meter:1609.344},yd:{to_meter:.9144},ch:{to_meter:20.1168},link:{to_meter:.201168},dm:{to_meter:.1},in:{to_meter:.0254},"ind-ch":{to_meter:20.11669506},"us-in":{to_meter:.025400050800101},"us-yd":{to_meter:.914401828803658}};var ha=/[\s_\-\/\(\)]/g;function De(i,e){if(i[e])return i[e];for(var s=Object.keys(i),r=e.toLowerCase().replace(ha,""),o=-1,h,l;++o<s.length;)if(h=s[o],l=h.toLowerCase().replace(ha,""),l===r)return i[h]}function ks(i){var e={},s=i.split("+").map(function(u){return u.trim()}).filter(function(u){return u}).reduce(function(u,f){var _=f.split("=");return _.push(!0),u[_[0].toLowerCase()]=_[1],u},{}),r,o,h,l={proj:"projName",datum:"datumCode",rf:function(u){e.rf=parseFloat(u)},lat_0:function(u){e.lat0=u*mt},lat_1:function(u){e.lat1=u*mt},lat_2:function(u){e.lat2=u*mt},lat_ts:function(u){e.lat_ts=u*mt},lon_0:function(u){e.long0=u*mt},lon_1:function(u){e.long1=u*mt},lon_2:function(u){e.long2=u*mt},alpha:function(u){e.alpha=parseFloat(u)*mt},gamma:function(u){e.rectified_grid_angle=parseFloat(u)*mt},lonc:function(u){e.longc=u*mt},x_0:function(u){e.x0=parseFloat(u)},y_0:function(u){e.y0=parseFloat(u)},k_0:function(u){e.k0=parseFloat(u)},k:function(u){e.k0=parseFloat(u)},a:function(u){e.a=parseFloat(u)},b:function(u){e.b=parseFloat(u)},r:function(u){e.a=e.b=parseFloat(u)},r_a:function(){e.R_A=!0},zone:function(u){e.zone=parseInt(u,10)},south:function(){e.utmSouth=!0},towgs84:function(u){e.datum_params=u.split(",").map(function(f){return parseFloat(f)})},to_meter:function(u){e.to_meter=parseFloat(u)},units:function(u){e.units=u;var f=De(nl,u);f&&(e.to_meter=f.to_meter)},from_greenwich:function(u){e.from_greenwich=u*mt},pm:function(u){var f=De(ee,u);e.from_greenwich=(f||parseFloat(u))*mt},nadgrids:function(u){u==="@null"?e.datumCode="none":e.nadgrids=u},axis:function(u){var f="ewnsud";u.length===3&&f.indexOf(u.substr(0,1))!==-1&&f.indexOf(u.substr(1,1))!==-1&&f.indexOf(u.substr(2,1))!==-1&&(e.axis=u)},approx:function(){e.approx=!0}};for(r in s)o=s[r],r in l?(h=l[r],typeof h=="function"?h(o):e[h]=o):e[r]=o;return typeof e.datumCode=="string"&&e.datumCode!=="WGS84"&&(e.datumCode=e.datumCode.toLowerCase()),e}class la{static getId(e){const s=e.find(r=>Array.isArray(r)&&r[0]==="ID");return s&&s.length>=3?{authority:s[1],code:parseInt(s[2],10)}:null}static convertUnit(e,s="unit"){if(!e||e.length<3)return{type:s,name:"unknown",conversion_factor:null};const r=e[1],o=parseFloat(e[2])||null,h=e.find(u=>Array.isArray(u)&&u[0]==="ID"),l=h?{authority:h[1],code:parseInt(h[2],10)}:null;return{type:s,name:r,conversion_factor:o,id:l}}static convertAxis(e){const s=e[1]||"Unknown";let r;const o=s.match(/^\((.)\)$/);if(o){const _=o[1].toUpperCase();if(_==="E")r="east";else if(_==="N")r="north";else if(_==="U")r="up";else throw new Error(`Unknown axis abbreviation: ${_}`)}else r=e[2]?e[2].toLowerCase():"unknown";const h=e.find(_=>Array.isArray(_)&&_[0]==="ORDER"),l=h?parseInt(h[1],10):null,u=e.find(_=>Array.isArray(_)&&(_[0]==="LENGTHUNIT"||_[0]==="ANGLEUNIT"||_[0]==="SCALEUNIT")),f=this.convertUnit(u);return{name:s,direction:r,unit:f,order:l}}static extractAxes(e){return e.filter(s=>Array.isArray(s)&&s[0]==="AXIS").map(s=>this.convertAxis(s)).sort((s,r)=>(s.order||0)-(r.order||0))}static convert(e,s={}){switch(e[0]){case"PROJCRS":s.type="ProjectedCRS",s.name=e[1],s.base_crs=e.find(g=>Array.isArray(g)&&g[0]==="BASEGEOGCRS")?this.convert(e.find(g=>Array.isArray(g)&&g[0]==="BASEGEOGCRS")):null,s.conversion=e.find(g=>Array.isArray(g)&&g[0]==="CONVERSION")?this.convert(e.find(g=>Array.isArray(g)&&g[0]==="CONVERSION")):null;const r=e.find(g=>Array.isArray(g)&&g[0]==="CS");r&&(s.coordinate_system={type:r[1],axis:this.extractAxes(e)});const o=e.find(g=>Array.isArray(g)&&g[0]==="LENGTHUNIT");if(o){const g=this.convertUnit(o);s.coordinate_system.unit=g}s.id=this.getId(e);break;case"BASEGEOGCRS":case"GEOGCRS":s.type="GeographicCRS",s.name=e[1];const h=e.find(g=>Array.isArray(g)&&(g[0]==="DATUM"||g[0]==="ENSEMBLE"));if(h){const g=this.convert(h);h[0]==="ENSEMBLE"?s.datum_ensemble=g:s.datum=g;const M=e.find(E=>Array.isArray(E)&&E[0]==="PRIMEM");M&&M[1]!=="Greenwich"&&(g.prime_meridian={name:M[1],longitude:parseFloat(M[2])})}s.coordinate_system={type:"ellipsoidal",axis:this.extractAxes(e)},s.id=this.getId(e);break;case"DATUM":s.type="GeodeticReferenceFrame",s.name=e[1],s.ellipsoid=e.find(g=>Array.isArray(g)&&g[0]==="ELLIPSOID")?this.convert(e.find(g=>Array.isArray(g)&&g[0]==="ELLIPSOID")):null;break;case"ENSEMBLE":s.type="DatumEnsemble",s.name=e[1],s.members=e.filter(g=>Array.isArray(g)&&g[0]==="MEMBER").map(g=>({type:"DatumEnsembleMember",name:g[1],id:this.getId(g)}));const l=e.find(g=>Array.isArray(g)&&g[0]==="ENSEMBLEACCURACY");l&&(s.accuracy=parseFloat(l[1]));const u=e.find(g=>Array.isArray(g)&&g[0]==="ELLIPSOID");u&&(s.ellipsoid=this.convert(u)),s.id=this.getId(e);break;case"ELLIPSOID":s.type="Ellipsoid",s.name=e[1],s.semi_major_axis=parseFloat(e[2]),s.inverse_flattening=parseFloat(e[3]),e.find(g=>Array.isArray(g)&&g[0]==="LENGTHUNIT")&&this.convert(e.find(g=>Array.isArray(g)&&g[0]==="LENGTHUNIT"),s);break;case"CONVERSION":s.type="Conversion",s.name=e[1],s.method=e.find(g=>Array.isArray(g)&&g[0]==="METHOD")?this.convert(e.find(g=>Array.isArray(g)&&g[0]==="METHOD")):null,s.parameters=e.filter(g=>Array.isArray(g)&&g[0]==="PARAMETER").map(g=>this.convert(g));break;case"METHOD":s.type="Method",s.name=e[1],s.id=this.getId(e);break;case"PARAMETER":s.type="Parameter",s.name=e[1],s.value=parseFloat(e[2]),s.unit=this.convertUnit(e.find(g=>Array.isArray(g)&&(g[0]==="LENGTHUNIT"||g[0]==="ANGLEUNIT"||g[0]==="SCALEUNIT"))),s.id=this.getId(e);break;case"BOUNDCRS":s.type="BoundCRS";const f=e.find(g=>Array.isArray(g)&&g[0]==="SOURCECRS");if(f){const g=f.find(M=>Array.isArray(M));s.source_crs=g?this.convert(g):null}const _=e.find(g=>Array.isArray(g)&&g[0]==="TARGETCRS");if(_){const g=_.find(M=>Array.isArray(M));s.target_crs=g?this.convert(g):null}const v=e.find(g=>Array.isArray(g)&&g[0]==="ABRIDGEDTRANSFORMATION");v?s.transformation=this.convert(v):s.transformation=null;break;case"ABRIDGEDTRANSFORMATION":if(s.type="Transformation",s.name=e[1],s.method=e.find(g=>Array.isArray(g)&&g[0]==="METHOD")?this.convert(e.find(g=>Array.isArray(g)&&g[0]==="METHOD")):null,s.parameters=e.filter(g=>Array.isArray(g)&&(g[0]==="PARAMETER"||g[0]==="PARAMETERFILE")).map(g=>{if(g[0]==="PARAMETER")return this.convert(g);if(g[0]==="PARAMETERFILE")return{name:g[1],value:g[2],id:{authority:"EPSG",code:8656}}}),s.parameters.length===7){const g=s.parameters[6];g.name==="Scale difference"&&(g.value=Math.round((g.value-1)*1e12)/1e6)}s.id=this.getId(e);break;case"AXIS":s.coordinate_system||(s.coordinate_system={type:"unspecified",axis:[]}),s.coordinate_system.axis.push(this.convertAxis(e));break;case"LENGTHUNIT":const m=this.convertUnit(e,"LinearUnit");s.coordinate_system&&s.coordinate_system.axis&&s.coordinate_system.axis.forEach(g=>{g.unit||(g.unit=m)}),m.conversion_factor&&m.conversion_factor!==1&&s.semi_major_axis&&(s.semi_major_axis={value:s.semi_major_axis,unit:m});break;default:s.keyword=e[0];break}return s}}class sl extends la{static convert(e,s={}){return super.convert(e,s),s.coordinate_system&&s.coordinate_system.subtype==="Cartesian"&&delete s.coordinate_system,s.usage&&delete s.usage,s}}class rl extends la{static convert(e,s={}){super.convert(e,s);const r=e.find(h=>Array.isArray(h)&&h[0]==="CS");r&&(s.coordinate_system={subtype:r[1],axis:this.extractAxes(e)});const o=e.find(h=>Array.isArray(h)&&h[0]==="USAGE");if(o){const h=o.find(f=>Array.isArray(f)&&f[0]==="SCOPE"),l=o.find(f=>Array.isArray(f)&&f[0]==="AREA"),u=o.find(f=>Array.isArray(f)&&f[0]==="BBOX");s.usage={},h&&(s.usage.scope=h[1]),l&&(s.usage.area=l[1]),u&&(s.usage.bbox=u.slice(1))}return s}}function al(i){return i.find(e=>Array.isArray(e)&&e[0]==="USAGE")?"2019":(i.find(e=>Array.isArray(e)&&e[0]==="CS")||i[0]==="BOUNDCRS"||i[0]==="PROJCRS"||i[0]==="GEOGCRS","2015")}function ol(i){return(al(i)==="2019"?rl:sl).convert(i)}function hl(i){const e=i.toUpperCase();return e.includes("PROJCRS")||e.includes("GEOGCRS")||e.includes("BOUNDCRS")||e.includes("VERTCRS")||e.includes("LENGTHUNIT")||e.includes("ANGLEUNIT")||e.includes("SCALEUNIT")?"WKT2":(e.includes("PROJCS")||e.includes("GEOGCS")||e.includes("LOCAL_CS")||e.includes("VERT_CS")||e.includes("UNIT"),"WKT1")}var nn=1,ca=2,ua=3,Wn=4,fa=5,Rs=-1,ll=/\s/,cl=/[A-Za-z]/,ul=/[A-Za-z84_]/,jn=/[,\]]/,da=/[\d\.E\-\+]/;function Le(i){if(typeof i!="string")throw new Error("not a string");this.text=i.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=nn}Le.prototype.readCharicter=function(){var i=this.text[this.place++];if(this.state!==Wn)for(;ll.test(i);){if(this.place>=this.text.length)return;i=this.text[this.place++]}switch(this.state){case nn:return this.neutral(i);case ca:return this.keyword(i);case Wn:return this.quoted(i);case fa:return this.afterquote(i);case ua:return this.number(i);case Rs:return}},Le.prototype.afterquote=function(i){if(i==='"'){this.word+='"',this.state=Wn;return}if(jn.test(i)){this.word=this.word.trim(),this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in afterquote yet, index '+this.place)},Le.prototype.afterItem=function(i){if(i===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=nn;return}if(i==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=nn,this.currentObject=this.stack.pop(),this.currentObject||(this.state=Rs);return}},Le.prototype.number=function(i){if(da.test(i)){this.word+=i;return}if(jn.test(i)){this.word=parseFloat(this.word),this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in number yet, index '+this.place)},Le.prototype.quoted=function(i){if(i==='"'){this.state=fa;return}this.word+=i},Le.prototype.keyword=function(i){if(ul.test(i)){this.word+=i;return}if(i==="["){var e=[];e.push(this.word),this.level++,this.root===null?this.root=e:this.currentObject.push(e),this.stack.push(this.currentObject),this.currentObject=e,this.state=nn;return}if(jn.test(i)){this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in keyword yet, index '+this.place)},Le.prototype.neutral=function(i){if(cl.test(i)){this.word=i,this.state=ca;return}if(i==='"'){this.word="",this.state=Wn;return}if(da.test(i)){this.word=i,this.state=ua;return}if(jn.test(i)){this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in neutral yet, index '+this.place)},Le.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===Rs)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function fl(i){var e=new Le(i);return e.output()}function zs(i,e,s){Array.isArray(e)&&(s.unshift(e),e=null);var r=e?{}:i,o=s.reduce(function(h,l){return yi(l,h),h},r);e&&(i[e]=o)}function yi(i,e){if(!Array.isArray(i)){e[i]=!0;return}var s=i.shift();if(s==="PARAMETER"&&(s=i.shift()),i.length===1){if(Array.isArray(i[0])){e[s]={},yi(i[0],e[s]);return}e[s]=i[0];return}if(!i.length){e[s]=!0;return}if(s==="TOWGS84"){e[s]=i;return}if(s==="AXIS"){s in e||(e[s]=[]),e[s].push(i);return}Array.isArray(s)||(e[s]={});var r;switch(s){case"UNIT":case"PRIMEM":case"VERT_DATUM":e[s]={name:i[0].toLowerCase(),convert:i[1]},i.length===3&&yi(i[2],e[s]);return;case"SPHEROID":case"ELLIPSOID":e[s]={name:i[0],a:i[1],rf:i[2]},i.length===4&&yi(i[3],e[s]);return;case"EDATUM":case"ENGINEERINGDATUM":case"LOCAL_DATUM":case"DATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":i[0]=["name",i[0]],zs(e,s,i);return;case"COMPD_CS":case"COMPOUNDCRS":case"FITTED_CS":case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"ENGCRS":case"ENGINEERINGCRS":i[0]=["name",i[0]],zs(e,s,i),e[s].type=s;return;default:for(r=-1;++r<i.length;)if(!Array.isArray(i[r]))return yi(i,e[s]);return zs(e,s,i)}}var dl=.017453292519943295;function me(i){return i*dl}function _a(i){const e=(i.projName||"").toLowerCase().replace(/_/g," ");!i.long0&&i.longc&&(e==="albers conic equal area"||e==="lambert azimuthal equal area")&&(i.long0=i.longc),!i.lat_ts&&i.lat1&&(e==="stereographic south pole"||e==="polar stereographic (variant b)")?(i.lat0=me(i.lat1>0?90:-90),i.lat_ts=i.lat1,delete i.lat1):!i.lat_ts&&i.lat0&&(e==="polar stereographic"||e==="polar stereographic (variant a)")&&(i.lat_ts=i.lat0,i.lat0=me(i.lat0>0?90:-90),delete i.lat1)}function pa(i){let e={units:null,to_meter:void 0};return typeof i=="string"?(e.units=i.toLowerCase(),e.units==="metre"&&(e.units="meter"),e.units==="meter"&&(e.to_meter=1)):i&&i.name&&(e.units=i.name.toLowerCase(),e.units==="metre"&&(e.units="meter"),e.to_meter=i.conversion_factor),e}function ma(i){return typeof i=="object"?i.value*i.unit.conversion_factor:i}function ga(i,e){i.ellipsoid.radius?(e.a=i.ellipsoid.radius,e.rf=0):(e.a=ma(i.ellipsoid.semi_major_axis),i.ellipsoid.inverse_flattening!==void 0?e.rf=i.ellipsoid.inverse_flattening:i.ellipsoid.semi_major_axis!==void 0&&i.ellipsoid.semi_minor_axis!==void 0&&(e.rf=e.a/(e.a-ma(i.ellipsoid.semi_minor_axis))))}function Kn(i,e={}){return!i||typeof i!="object"?i:i.type==="BoundCRS"?(Kn(i.source_crs,e),i.transformation&&(i.transformation.method&&i.transformation.method.name==="NTv2"?e.nadgrids=i.transformation.parameters[0].value:e.datum_params=i.transformation.parameters.map(s=>s.value)),e):(Object.keys(i).forEach(s=>{const r=i[s];if(r!==null)switch(s){case"name":if(e.srsCode)break;e.name=r,e.srsCode=r;break;case"type":r==="GeographicCRS"?e.projName="longlat":r==="ProjectedCRS"&&i.conversion&&i.conversion.method&&(e.projName=i.conversion.method.name);break;case"datum":case"datum_ensemble":r.ellipsoid&&(e.ellps=r.ellipsoid.name,ga(r,e)),r.prime_meridian&&(e.from_greenwich=r.prime_meridian.longitude*Math.PI/180);break;case"ellipsoid":e.ellps=r.name,ga(r,e);break;case"prime_meridian":e.long0=(r.longitude||0)*Math.PI/180;break;case"coordinate_system":if(r.axis){if(e.axis=r.axis.map(o=>{const h=o.direction;if(h==="east")return"e";if(h==="north")return"n";if(h==="west")return"w";if(h==="south")return"s";throw new Error(`Unknown axis direction: ${h}`)}).join("")+"u",r.unit){const{units:o,to_meter:h}=pa(r.unit);e.units=o,e.to_meter=h}else if(r.axis[0]&&r.axis[0].unit){const{units:o,to_meter:h}=pa(r.axis[0].unit);e.units=o,e.to_meter=h}}break;case"id":r.authority&&r.code&&(e.title=r.authority+":"+r.code);break;case"conversion":r.method&&r.method.name&&(e.projName=r.method.name),r.parameters&&r.parameters.forEach(o=>{const h=o.name.toLowerCase().replace(/\s+/g,"_"),l=o.value;o.unit&&o.unit.conversion_factor?e[h]=l*o.unit.conversion_factor:o.unit==="degree"?e[h]=l*Math.PI/180:e[h]=l});break;case"unit":r.name&&(e.units=r.name.toLowerCase(),e.units==="metre"&&(e.units="meter")),r.conversion_factor&&(e.to_meter=r.conversion_factor);break;case"base_crs":Kn(r,e),e.datumCode=r.id?r.id.authority+"_"+r.id.code:r.name;break}}),e.latitude_of_false_origin!==void 0&&(e.lat0=e.latitude_of_false_origin),e.longitude_of_false_origin!==void 0&&(e.long0=e.longitude_of_false_origin),e.latitude_of_standard_parallel!==void 0&&(e.lat0=e.latitude_of_standard_parallel,e.lat1=e.latitude_of_standard_parallel),e.latitude_of_1st_standard_parallel!==void 0&&(e.lat1=e.latitude_of_1st_standard_parallel),e.latitude_of_2nd_standard_parallel!==void 0&&(e.lat2=e.latitude_of_2nd_standard_parallel),e.latitude_of_projection_centre!==void 0&&(e.lat0=e.latitude_of_projection_centre),e.longitude_of_projection_centre!==void 0&&(e.longc=e.longitude_of_projection_centre),e.easting_at_false_origin!==void 0&&(e.x0=e.easting_at_false_origin),e.northing_at_false_origin!==void 0&&(e.y0=e.northing_at_false_origin),e.latitude_of_natural_origin!==void 0&&(e.lat0=e.latitude_of_natural_origin),e.longitude_of_natural_origin!==void 0&&(e.long0=e.longitude_of_natural_origin),e.longitude_of_origin!==void 0&&(e.long0=e.longitude_of_origin),e.false_easting!==void 0&&(e.x0=e.false_easting),e.easting_at_projection_centre&&(e.x0=e.easting_at_projection_centre),e.false_northing!==void 0&&(e.y0=e.false_northing),e.northing_at_projection_centre&&(e.y0=e.northing_at_projection_centre),e.standard_parallel_1!==void 0&&(e.lat1=e.standard_parallel_1),e.standard_parallel_2!==void 0&&(e.lat2=e.standard_parallel_2),e.scale_factor_at_natural_origin!==void 0&&(e.k0=e.scale_factor_at_natural_origin),e.scale_factor_at_projection_centre!==void 0&&(e.k0=e.scale_factor_at_projection_centre),e.scale_factor_on_pseudo_standard_parallel!==void 0&&(e.k0=e.scale_factor_on_pseudo_standard_parallel),e.azimuth!==void 0&&(e.alpha=e.azimuth),e.azimuth_at_projection_centre!==void 0&&(e.alpha=e.azimuth_at_projection_centre),e.angle_from_rectified_to_skew_grid&&(e.rectified_grid_angle=e.angle_from_rectified_to_skew_grid),_a(e),e)}var _l=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function pl(i,e){var s=e[0],r=e[1];!(s in i)&&r in i&&(i[s]=i[r],e.length===3&&(i[s]=e[2](i[s])))}function va(i){for(var e=Object.keys(i),s=0,r=e.length;s<r;++s){var o=e[s];_l.indexOf(o)!==-1&&ml(i[o]),typeof i[o]=="object"&&va(i[o])}}function ml(i){if(i.AUTHORITY){var e=Object.keys(i.AUTHORITY)[0];e&&e in i.AUTHORITY&&(i.title=e+":"+i.AUTHORITY[e])}if(i.type==="GEOGCS"?i.projName="longlat":i.type==="LOCAL_CS"?(i.projName="identity",i.local=!0):typeof i.PROJECTION=="object"?i.projName=Object.keys(i.PROJECTION)[0]:i.projName=i.PROJECTION,i.AXIS){for(var s="",r=0,o=i.AXIS.length;r<o;++r){var h=[i.AXIS[r][0].toLowerCase(),i.AXIS[r][1].toLowerCase()];h[0].indexOf("north")!==-1||(h[0]==="y"||h[0]==="lat")&&h[1]==="north"?s+="n":h[0].indexOf("south")!==-1||(h[0]==="y"||h[0]==="lat")&&h[1]==="south"?s+="s":h[0].indexOf("east")!==-1||(h[0]==="x"||h[0]==="lon")&&h[1]==="east"?s+="e":(h[0].indexOf("west")!==-1||(h[0]==="x"||h[0]==="lon")&&h[1]==="west")&&(s+="w")}s.length===2&&(s+="u"),s.length===3&&(i.axis=s)}i.UNIT&&(i.units=i.UNIT.name.toLowerCase(),i.units==="metre"&&(i.units="meter"),i.UNIT.convert&&(i.type==="GEOGCS"?i.DATUM&&i.DATUM.SPHEROID&&(i.to_meter=i.UNIT.convert*i.DATUM.SPHEROID.a):i.to_meter=i.UNIT.convert));var l=i.GEOGCS;i.type==="GEOGCS"&&(l=i),l&&(l.DATUM?i.datumCode=l.DATUM.name.toLowerCase():i.datumCode=l.name.toLowerCase(),i.datumCode.slice(0,2)==="d_"&&(i.datumCode=i.datumCode.slice(2)),i.datumCode==="new_zealand_1949"&&(i.datumCode="nzgd49"),(i.datumCode==="wgs_1984"||i.datumCode==="world_geodetic_system_1984")&&(i.PROJECTION==="Mercator_Auxiliary_Sphere"&&(i.sphere=!0),i.datumCode="wgs84"),i.datumCode==="belge_1972"&&(i.datumCode="rnb72"),l.DATUM&&l.DATUM.SPHEROID&&(i.ellps=l.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),i.ellps.toLowerCase().slice(0,13)==="international"&&(i.ellps="intl"),i.a=l.DATUM.SPHEROID.a,i.rf=parseFloat(l.DATUM.SPHEROID.rf,10)),l.DATUM&&l.DATUM.TOWGS84&&(i.datum_params=l.DATUM.TOWGS84),~i.datumCode.indexOf("osgb_1936")&&(i.datumCode="osgb36"),~i.datumCode.indexOf("osni_1952")&&(i.datumCode="osni52"),(~i.datumCode.indexOf("tm65")||~i.datumCode.indexOf("geodetic_datum_of_1965"))&&(i.datumCode="ire65"),i.datumCode==="ch1903+"&&(i.datumCode="ch1903"),~i.datumCode.indexOf("israel")&&(i.datumCode="isr93")),i.b&&!isFinite(i.b)&&(i.b=i.a),i.rectified_grid_angle&&(i.rectified_grid_angle=me(i.rectified_grid_angle));function u(v){var m=i.to_meter||1;return v*m}var f=function(v){return pl(i,v)},_=[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",me],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",me],["x0","false_easting",u],["y0","false_northing",u],["long0","central_meridian",me],["lat0","latitude_of_origin",me],["lat0","standard_parallel_1",me],["lat1","standard_parallel_1",me],["lat2","standard_parallel_2",me],["azimuth","Azimuth"],["alpha","azimuth",me],["srsCode","name"]];_.forEach(f),_a(i)}function Ds(i){if(typeof i=="object")return Kn(i);const e=hl(i);var s=fl(i);if(e==="WKT2"){const h=ol(s);return Kn(h)}var r=s[0],o={};return yi(s,o),va(o),o[r]}function Jt(i){var e=this;if(arguments.length===2){var s=arguments[1];typeof s=="string"?s.charAt(0)==="+"?Jt[i]=ks(arguments[1]):Jt[i]=Ds(arguments[1]):Jt[i]=s}else if(arguments.length===1){if(Array.isArray(i))return i.map(function(r){Array.isArray(r)?Jt.apply(e,r):Jt(r)});if(typeof i=="string"){if(i in Jt)return Jt[i]}else"EPSG"in i?Jt["EPSG:"+i.EPSG]=i:"ESRI"in i?Jt["ESRI:"+i.ESRI]=i:"IAU2000"in i?Jt["IAU2000:"+i.IAU2000]=i:console.log(i);return}}Xh(Jt);function gl(i){return typeof i=="string"}function vl(i){return i in Jt}function yl(i){return i.indexOf("+")!==0&&i.indexOf("[")!==-1||typeof i=="object"&&!("srsCode"in i)}var Ml=["3857","900913","3785","102113"];function wl(i){var e=De(i,"authority");if(e){var s=De(e,"epsg");return s&&Ml.indexOf(s)>-1}}function xl(i){var e=De(i,"extension");if(e)return De(e,"proj4")}function bl(i){return i[0]==="+"}function El(i){if(gl(i)){if(vl(i))return Jt[i];if(yl(i)){var e=Ds(i);if(wl(e))return Jt["EPSG:3857"];var s=xl(e);return s?ks(s):e}if(bl(i))return ks(i)}else return i.projName?i:Ds(i)}function ya(i,e){i=i||{};var s,r;if(!e)return i;for(r in e)s=e[r],s!==void 0&&(i[r]=s);return i}function xe(i,e,s){var r=i*e;return s/Math.sqrt(1-r*r)}function sn(i){return i<0?-1:1}function U(i){return Math.abs(i)<=Ct?i:i-sn(i)*en}function ge(i,e,s){var r=i*s,o=.5*i;return r=Math.pow((1-r)/(1+r),o),Math.tan(.5*(O-e))/r}function rn(i,e){for(var s=.5*i,r,o,h=O-2*Math.atan(e),l=0;l<=15;l++)if(r=i*Math.sin(h),o=O-2*Math.atan(e*Math.pow((1-r)/(1+r),s))-h,h+=o,Math.abs(o)<=1e-10)return h;return-9999}function Pl(){var i=this.b/this.a;this.es=1-i*i,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=xe(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function Sl(i){var e=i.x,s=i.y;if(s*we>90&&s*we<-90&&e*we>180&&e*we<-180)return null;var r,o;if(Math.abs(Math.abs(s)-O)<=B)return null;if(this.sphere)r=this.x0+this.a*this.k0*U(e-this.long0),o=this.y0+this.a*this.k0*Math.log(Math.tan(ut+.5*s));else{var h=Math.sin(s),l=ge(this.e,s,h);r=this.x0+this.a*this.k0*U(e-this.long0),o=this.y0-this.a*this.k0*Math.log(l)}return i.x=r,i.y=o,i}function Al(i){var e=i.x-this.x0,s=i.y-this.y0,r,o;if(this.sphere)o=O-2*Math.atan(Math.exp(-s/(this.a*this.k0)));else{var h=Math.exp(-s/(this.a*this.k0));if(o=rn(this.e,h),o===-9999)return null}return r=U(this.long0+e/(this.a*this.k0)),i.x=r,i.y=o,i}var Ll=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","Mercator_Variant_A","merc"];const Cl={init:Pl,forward:Sl,inverse:Al,names:Ll};function Tl(){}function Ma(i){return i}var Nl=["longlat","identity"],Gl=[Cl,{init:Tl,forward:Ma,inverse:Ma,names:Nl}],ii={},Mi=[];function wa(i,e){var s=Mi.length;return i.names?(Mi[s]=i,i.names.forEach(function(r){ii[r.toLowerCase()]=s}),this):(console.log(e),!0)}function xa(i){return i.replace(/[-\(\)\s]+/g," ").trim().replace(/ /g,"_")}function Il(i){if(!i)return!1;var e=i.toLowerCase();if(typeof ii[e]<"u"&&Mi[ii[e]]||(e=xa(e),e in ii&&Mi[ii[e]]))return Mi[ii[e]]}function Ol(){Gl.forEach(wa)}const kl={start:Ol,add:wa,get:Il};var ba={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563396e-3,b:635625691e-2,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"},andrae:{a:637710443e-2,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"},clrk80:{a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:63782492e-1,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298556e-3,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:63781575e-1,b:63567722e-1,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:63567733205e-4,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:63558348467e-4,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"},WGS84:{a:6378137,rf:298.257223563,ellipseName:"WGS 84"},sphere:{a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"}};const Rl=ba.WGS84;function zl(i,e,s,r){var o=i*i,h=e*e,l=(o-h)/o,u=0;r?(i*=1-l*(tl+l*(el+l*il)),o=i*i,l=0):u=Math.sqrt(l);var f=(o-h)/h;return{es:l,e:u,ep2:f}}function Dl(i,e,s,r,o){if(!i){var h=De(ba,r);h||(h=Rl),i=h.a,e=h.b,s=h.rf}return s&&!e&&(e=(1-1/s)*i),(s===0||Math.abs(i-e)<B)&&(o=!0,e=i),{a:i,b:e,rf:s,sphere:o}}var Vn={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},mgi:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Militar-Geographische Institut"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Ordnance Survey of Great Britain 1936"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"},EPSG_5451:{towgs84:"6.41,-49.05,-11.28,1.5657,0.5242,6.9718,-5.7649"},IGNF_LURESG:{towgs84:"-192.986,13.673,-39.309,-0.4099,-2.9332,2.6881,0.43"},EPSG_4614:{towgs84:"-119.4248,-303.65872,-11.00061,1.164298,0.174458,1.096259,3.657065"},EPSG_4615:{towgs84:"-494.088,-312.129,279.877,-1.423,-1.013,1.59,-0.748"},ESRI_37241:{towgs84:"-76.822,257.457,-12.817,2.136,-0.033,-2.392,-0.031"},ESRI_37249:{towgs84:"-440.296,58.548,296.265,1.128,10.202,4.559,-0.438"},ESRI_37245:{towgs84:"-511.151,-181.269,139.609,1.05,2.703,1.798,3.071"},EPSG_4178:{towgs84:"24.9,-126.4,-93.2,-0.063,-0.247,-0.041,1.01"},EPSG_4622:{towgs84:"-472.29,-5.63,-304.12,0.4362,-0.8374,0.2563,1.8984"},EPSG_4625:{towgs84:"126.93,547.94,130.41,-2.7867,5.1612,-0.8584,13.8227"},EPSG_5252:{towgs84:"0.023,0.036,-0.068,0.00176,0.00912,-0.01136,0.00439"},EPSG_4314:{towgs84:"597.1,71.4,412.1,0.894,0.068,-1.563,7.58"},EPSG_4282:{towgs84:"-178.3,-316.7,-131.5,5.278,6.077,10.979,19.166"},EPSG_4231:{towgs84:"-83.11,-97.38,-117.22,0.0276,-0.2167,0.2147,0.1218"},EPSG_4274:{towgs84:"-230.994,102.591,25.199,0.633,-0.239,0.9,1.95"},EPSG_4134:{towgs84:"-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.71006"},EPSG_4254:{towgs84:"18.38,192.45,96.82,0.056,-0.142,-0.2,-0.0013"},EPSG_4159:{towgs84:"-194.513,-63.978,-25.759,-3.4027,3.756,-3.352,-0.9175"},EPSG_4687:{towgs84:"0.072,-0.507,-0.245,0.0183,-0.0003,0.007,-0.0093"},EPSG_4227:{towgs84:"-83.58,-397.54,458.78,-17.595,-2.847,4.256,3.225"},EPSG_4746:{towgs84:"599.4,72.4,419.2,-0.062,-0.022,-2.723,6.46"},EPSG_4745:{towgs84:"612.4,77,440.2,-0.054,0.057,-2.797,2.55"},EPSG_6311:{towgs84:"8.846,-4.394,-1.122,-0.00237,-0.146528,0.130428,0.783926"},EPSG_4289:{towgs84:"565.7381,50.4018,465.2904,-1.91514,1.60363,-9.09546,4.07244"},EPSG_4230:{towgs84:"-68.863,-134.888,-111.49,-0.53,-0.14,0.57,-3.4"},EPSG_4154:{towgs84:"-123.02,-158.95,-168.47"},EPSG_4156:{towgs84:"570.8,85.7,462.8,4.998,1.587,5.261,3.56"},EPSG_4299:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4179:{towgs84:"33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84"},EPSG_4313:{towgs84:"-106.8686,52.2978,-103.7239,0.3366,-0.457,1.8422,-1.2747"},EPSG_4194:{towgs84:"163.511,127.533,-159.789"},EPSG_4195:{towgs84:"105,326,-102.5"},EPSG_4196:{towgs84:"-45,417,-3.5"},EPSG_4611:{towgs84:"-162.619,-276.959,-161.764,0.067753,-2.243649,-1.158827,-1.094246"},EPSG_4633:{towgs84:"137.092,131.66,91.475,-1.9436,-11.5993,-4.3321,-7.4824"},EPSG_4641:{towgs84:"-408.809,366.856,-412.987,1.8842,-0.5308,2.1655,-121.0993"},EPSG_4643:{towgs84:"-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7002"},EPSG_4300:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4188:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4660:{towgs84:"982.6087,552.753,-540.873,32.39344,-153.25684,-96.2266,16.805"},EPSG_4662:{towgs84:"97.295,-263.247,310.882,-1.5999,0.8386,3.1409,13.3259"},EPSG_3906:{towgs84:"577.88891,165.22205,391.18289,4.9145,-0.94729,-13.05098,7.78664"},EPSG_4307:{towgs84:"-209.3622,-87.8162,404.6198,0.0046,3.4784,0.5805,-1.4547"},EPSG_6892:{towgs84:"-76.269,-16.683,68.562,-6.275,10.536,-4.286,-13.686"},EPSG_4690:{towgs84:"221.597,152.441,176.523,2.403,1.3893,0.884,11.4648"},EPSG_4691:{towgs84:"218.769,150.75,176.75,3.5231,2.0037,1.288,10.9817"},EPSG_4629:{towgs84:"72.51,345.411,79.241,-1.5862,-0.8826,-0.5495,1.3653"},EPSG_4630:{towgs84:"165.804,216.213,180.26,-0.6251,-0.4515,-0.0721,7.4111"},EPSG_4692:{towgs84:"217.109,86.452,23.711,0.0183,-0.0003,0.007,-0.0093"},EPSG_9333:{towgs84:"0,0,0,-8.393,0.749,-10.276,0"},EPSG_9059:{towgs84:"0,0,0"},EPSG_4312:{towgs84:"601.705,84.263,485.227,4.7354,1.3145,5.393,-2.3887"},EPSG_4123:{towgs84:"-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496"},EPSG_4309:{towgs84:"-124.45,183.74,44.64,-0.4384,0.5446,-0.9706,-2.1365"},ESRI_104106:{towgs84:"-283.088,-70.693,117.445,-1.157,0.059,-0.652,-4.058"},EPSG_4281:{towgs84:"-219.247,-73.802,269.529"},EPSG_4322:{towgs84:"0,0,4.5"},EPSG_4324:{towgs84:"0,0,1.9"},EPSG_4284:{towgs84:"43.822,-108.842,-119.585,1.455,-0.761,0.737,0.549"},EPSG_4277:{towgs84:"446.448,-125.157,542.06,0.15,0.247,0.842,-20.489"},EPSG_4207:{towgs84:"-282.1,-72.2,120,-1.529,0.145,-0.89,-4.46"},EPSG_4688:{towgs84:"347.175,1077.618,2623.677,33.9058,-70.6776,9.4013,186.0647"},EPSG_4689:{towgs84:"410.793,54.542,80.501,-2.5596,-2.3517,-0.6594,17.3218"},EPSG_4720:{towgs84:"0,0,4.5"},EPSG_4273:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},EPSG_4240:{towgs84:"204.64,834.74,293.8"},EPSG_4817:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},ESRI_104131:{towgs84:"426.62,142.62,460.09,4.98,4.49,-12.42,-17.1"},EPSG_4265:{towgs84:"-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68"},EPSG_4263:{towgs84:"-111.92,-87.85,114.5,1.875,0.202,0.219,0.032"},EPSG_4298:{towgs84:"-689.5937,623.84046,-65.93566,-0.02331,1.17094,-0.80054,5.88536"},EPSG_4270:{towgs84:"-253.4392,-148.452,386.5267,0.15605,0.43,-0.1013,-0.0424"},EPSG_4229:{towgs84:"-121.8,98.1,-10.7"},EPSG_4220:{towgs84:"-55.5,-348,-229.2"},EPSG_4214:{towgs84:"12.646,-155.176,-80.863"},EPSG_4232:{towgs84:"-345,3,223"},EPSG_4238:{towgs84:"-1.977,-13.06,-9.993,0.364,0.254,0.689,-1.037"},EPSG_4168:{towgs84:"-170,33,326"},EPSG_4131:{towgs84:"199,931,318.9"},EPSG_4152:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_5228:{towgs84:"572.213,85.334,461.94,4.9732,1.529,5.2484,3.5378"},EPSG_8351:{towgs84:"485.021,169.465,483.839,7.786342,4.397554,4.102655,0"},EPSG_4683:{towgs84:"-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06"},EPSG_4133:{towgs84:"0,0,0"},EPSG_7373:{towgs84:"0.819,-0.5762,-1.6446,-0.00378,-0.03317,0.00318,0.0693"},EPSG_9075:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9072:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9294:{towgs84:"1.16835,-1.42001,-2.24431,-0.00822,-0.05508,0.01818,0.23388"},EPSG_4212:{towgs84:"-267.434,173.496,181.814,-13.4704,8.7154,7.3926,14.7492"},EPSG_4191:{towgs84:"-44.183,-0.58,-38.489,2.3867,2.7072,-3.5196,-8.2703"},EPSG_4237:{towgs84:"52.684,-71.194,-13.975,-0.312,-0.1063,-0.3729,1.0191"},EPSG_4740:{towgs84:"-1.08,-0.27,-0.9"},EPSG_4124:{towgs84:"419.3836,99.3335,591.3451,0.850389,1.817277,-7.862238,-0.99496"},EPSG_5681:{towgs84:"584.9636,107.7175,413.8067,1.1155,0.2824,-3.1384,7.9922"},EPSG_4141:{towgs84:"23.772,17.49,17.859,-0.3132,-1.85274,1.67299,-5.4262"},EPSG_4204:{towgs84:"-85.645,-273.077,-79.708,2.289,-1.421,2.532,3.194"},EPSG_4319:{towgs84:"226.702,-193.337,-35.371,-2.229,-4.391,9.238,0.9798"},EPSG_4200:{towgs84:"24.82,-131.21,-82.66"},EPSG_4130:{towgs84:"0,0,0"},EPSG_4127:{towgs84:"-82.875,-57.097,-156.768,-2.158,1.524,-0.982,-0.359"},EPSG_4149:{towgs84:"674.374,15.056,405.346"},EPSG_4617:{towgs84:"-0.991,1.9072,0.5129,1.25033e-7,4.6785e-8,5.6529e-8,0"},EPSG_4663:{towgs84:"-210.502,-66.902,-48.476,2.094,-15.067,-5.817,0.485"},EPSG_4664:{towgs84:"-211.939,137.626,58.3,-0.089,0.251,0.079,0.384"},EPSG_4665:{towgs84:"-105.854,165.589,-38.312,-0.003,-0.026,0.024,-0.048"},EPSG_4666:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},EPSG_4756:{towgs84:"-192.873,-39.382,-111.202,-0.00205,-0.0005,0.00335,0.0188"},EPSG_4723:{towgs84:"-179.483,-69.379,-27.584,-7.862,8.163,6.042,-13.925"},EPSG_4726:{towgs84:"8.853,-52.644,180.304,-0.393,-2.323,2.96,-24.081"},EPSG_4267:{towgs84:"-8.0,160.0,176.0"},EPSG_5365:{towgs84:"-0.16959,0.35312,0.51846,0.03385,-0.16325,0.03446,0.03693"},EPSG_4218:{towgs84:"304.5,306.5,-318.1"},EPSG_4242:{towgs84:"-33.722,153.789,94.959,-8.581,-4.478,4.54,8.95"},EPSG_4216:{towgs84:"-292.295,248.758,429.447,4.9971,2.99,6.6906,1.0289"},ESRI_104105:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},ESRI_104129:{towgs84:"0,0,0"},EPSG_4673:{towgs84:"174.05,-25.49,112.57"},EPSG_4202:{towgs84:"-124,-60,154"},EPSG_4203:{towgs84:"-117.763,-51.51,139.061,0.292,0.443,0.277,-0.191"},EPSG_3819:{towgs84:"595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408"},EPSG_8694:{towgs84:"-93.799,-132.737,-219.073,-1.844,0.648,-6.37,-0.169"},EPSG_4145:{towgs84:"275.57,676.78,229.6"},EPSG_4283:{towgs84:"61.55,-10.87,-40.19,39.4924,32.7221,32.8979,-9.994"},EPSG_4317:{towgs84:"2.3287,-147.0425,-92.0802,-0.3092483,0.32482185,0.49729934,5.68906266"},EPSG_4272:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993"},EPSG_4248:{towgs84:"-307.7,265.3,-363.5"},EPSG_5561:{towgs84:"24,-121,-76"},EPSG_5233:{towgs84:"-0.293,766.95,87.713,0.195704,1.695068,3.473016,-0.039338"},ESRI_104130:{towgs84:"-86,-98,-119"},ESRI_104102:{towgs84:"682,-203,480"},ESRI_37207:{towgs84:"7,-10,-26"},EPSG_4675:{towgs84:"59.935,118.4,-10.871"},ESRI_104109:{towgs84:"-89.121,-348.182,260.871"},ESRI_104112:{towgs84:"-185.583,-230.096,281.361"},ESRI_104113:{towgs84:"25.1,-275.6,222.6"},IGNF_WGS72G:{towgs84:"0,12,6"},IGNF_NTFG:{towgs84:"-168,-60,320"},IGNF_EFATE57G:{towgs84:"-127,-769,472"},IGNF_PGP50G:{towgs84:"324.8,153.6,172.1"},IGNF_REUN47G:{towgs84:"94,-948,-1262"},IGNF_CSG67G:{towgs84:"-186,230,110"},IGNF_GUAD48G:{towgs84:"-467,-16,-300"},IGNF_TAHI51G:{towgs84:"162,117,154"},IGNF_TAHAAG:{towgs84:"65,342,77"},IGNF_NUKU72G:{towgs84:"84,274,65"},IGNF_PETRELS72G:{towgs84:"365,194,166"},IGNF_WALL78G:{towgs84:"253,-133,-127"},IGNF_MAYO50G:{towgs84:"-382,-59,-262"},IGNF_TANNAG:{towgs84:"-139,-967,436"},IGNF_IGN72G:{towgs84:"-13,-348,292"},IGNF_ATIGG:{towgs84:"1118,23,66"},IGNF_FANGA84G:{towgs84:"150.57,158.33,118.32"},IGNF_RUSAT84G:{towgs84:"202.13,174.6,-15.74"},IGNF_KAUE70G:{towgs84:"126.74,300.1,-75.49"},IGNF_MOP90G:{towgs84:"-10.8,-1.8,12.77"},IGNF_MHPF67G:{towgs84:"338.08,212.58,-296.17"},IGNF_TAHI79G:{towgs84:"160.61,116.05,153.69"},IGNF_ANAA92G:{towgs84:"1.5,3.84,4.81"},IGNF_MARQUI72G:{towgs84:"330.91,-13.92,58.56"},IGNF_APAT86G:{towgs84:"143.6,197.82,74.05"},IGNF_TUBU69G:{towgs84:"237.17,171.61,-77.84"},IGNF_STPM50G:{towgs84:"11.363,424.148,373.13"},EPSG_4150:{towgs84:"674.374,15.056,405.346"},EPSG_4754:{towgs84:"-208.4058,-109.8777,-2.5764"},ESRI_104101:{towgs84:"374,150,588"},EPSG_4693:{towgs84:"0,-0.15,0.68"},EPSG_6207:{towgs84:"293.17,726.18,245.36"},EPSG_4153:{towgs84:"-133.63,-157.5,-158.62"},EPSG_4132:{towgs84:"-241.54,-163.64,396.06"},EPSG_4221:{towgs84:"-154.5,150.7,100.4"},EPSG_4266:{towgs84:"-80.7,-132.5,41.1"},EPSG_4193:{towgs84:"-70.9,-151.8,-41.4"},EPSG_5340:{towgs84:"-0.41,0.46,-0.35"},EPSG_4246:{towgs84:"-294.7,-200.1,525.5"},EPSG_4318:{towgs84:"-3.2,-5.7,2.8"},EPSG_4121:{towgs84:"-199.87,74.79,246.62"},EPSG_4223:{towgs84:"-260.1,5.5,432.2"},EPSG_4158:{towgs84:"-0.465,372.095,171.736"},EPSG_4285:{towgs84:"-128.16,-282.42,21.93"},EPSG_4613:{towgs84:"-404.78,685.68,45.47"},EPSG_4607:{towgs84:"195.671,332.517,274.607"},EPSG_4475:{towgs84:"-381.788,-57.501,-256.673"},EPSG_4208:{towgs84:"-157.84,308.54,-146.6"},EPSG_4743:{towgs84:"70.995,-335.916,262.898"},EPSG_4710:{towgs84:"-323.65,551.39,-491.22"},EPSG_7881:{towgs84:"-0.077,0.079,0.086"},EPSG_4682:{towgs84:"283.729,735.942,261.143"},EPSG_4739:{towgs84:"-156,-271,-189"},EPSG_4679:{towgs84:"-80.01,253.26,291.19"},EPSG_4750:{towgs84:"-56.263,16.136,-22.856"},EPSG_4644:{towgs84:"-10.18,-350.43,291.37"},EPSG_4695:{towgs84:"-103.746,-9.614,-255.95"},EPSG_4292:{towgs84:"-355,21,72"},EPSG_4302:{towgs84:"-61.702,284.488,472.052"},EPSG_4143:{towgs84:"-124.76,53,466.79"},EPSG_4606:{towgs84:"-153,153,307"},EPSG_4699:{towgs84:"-770.1,158.4,-498.2"},EPSG_4247:{towgs84:"-273.5,110.6,-357.9"},EPSG_4160:{towgs84:"8.88,184.86,106.69"},EPSG_4161:{towgs84:"-233.43,6.65,173.64"},EPSG_9251:{towgs84:"-9.5,122.9,138.2"},EPSG_9253:{towgs84:"-78.1,101.6,133.3"},EPSG_4297:{towgs84:"-198.383,-240.517,-107.909"},EPSG_4269:{towgs84:"0,0,0"},EPSG_4301:{towgs84:"-147,506,687"},EPSG_4618:{towgs84:"-59,-11,-52"},EPSG_4612:{towgs84:"0,0,0"},EPSG_4678:{towgs84:"44.585,-131.212,-39.544"},EPSG_4250:{towgs84:"-130,29,364"},EPSG_4144:{towgs84:"214,804,268"},EPSG_4147:{towgs84:"-17.51,-108.32,-62.39"},EPSG_4259:{towgs84:"-254.1,-5.36,-100.29"},EPSG_4164:{towgs84:"-76,-138,67"},EPSG_4211:{towgs84:"-378.873,676.002,-46.255"},EPSG_4182:{towgs84:"-422.651,-172.995,84.02"},EPSG_4224:{towgs84:"-143.87,243.37,-33.52"},EPSG_4225:{towgs84:"-205.57,168.77,-4.12"},EPSG_5527:{towgs84:"-67.35,3.88,-38.22"},EPSG_4752:{towgs84:"98,390,-22"},EPSG_4310:{towgs84:"-30,190,89"},EPSG_9248:{towgs84:"-192.26,65.72,132.08"},EPSG_4680:{towgs84:"124.5,-63.5,-281"},EPSG_4701:{towgs84:"-79.9,-158,-168.9"},EPSG_4706:{towgs84:"-146.21,112.63,4.05"},EPSG_4805:{towgs84:"682,-203,480"},EPSG_4201:{towgs84:"-165,-11,206"},EPSG_4210:{towgs84:"-157,-2,-299"},EPSG_4183:{towgs84:"-104,167,-38"},EPSG_4139:{towgs84:"11,72,-101"},EPSG_4668:{towgs84:"-86,-98,-119"},EPSG_4717:{towgs84:"-2,151,181"},EPSG_4732:{towgs84:"102,52,-38"},EPSG_4280:{towgs84:"-377,681,-50"},EPSG_4209:{towgs84:"-138,-105,-289"},EPSG_4261:{towgs84:"31,146,47"},EPSG_4658:{towgs84:"-73,46,-86"},EPSG_4721:{towgs84:"265.025,384.929,-194.046"},EPSG_4222:{towgs84:"-136,-108,-292"},EPSG_4601:{towgs84:"-255,-15,71"},EPSG_4602:{towgs84:"725,685,536"},EPSG_4603:{towgs84:"72,213.7,93"},EPSG_4605:{towgs84:"9,183,236"},EPSG_4621:{towgs84:"137,248,-430"},EPSG_4657:{towgs84:"-28,199,5"},EPSG_4316:{towgs84:"103.25,-100.4,-307.19"},EPSG_4642:{towgs84:"-13,-348,292"},EPSG_4698:{towgs84:"145,-187,103"},EPSG_4192:{towgs84:"-206.1,-174.7,-87.7"},EPSG_4311:{towgs84:"-265,120,-358"},EPSG_4135:{towgs84:"58,-283,-182"},ESRI_104138:{towgs84:"198,-226,-347"},EPSG_4245:{towgs84:"-11,851,5"},EPSG_4142:{towgs84:"-125,53,467"},EPSG_4213:{towgs84:"-106,-87,188"},EPSG_4253:{towgs84:"-133,-77,-51"},EPSG_4129:{towgs84:"-132,-110,-335"},EPSG_4713:{towgs84:"-77,-128,142"},EPSG_4239:{towgs84:"217,823,299"},EPSG_4146:{towgs84:"295,736,257"},EPSG_4155:{towgs84:"-83,37,124"},EPSG_4165:{towgs84:"-173,253,27"},EPSG_4672:{towgs84:"175,-38,113"},EPSG_4236:{towgs84:"-637,-549,-203"},EPSG_4251:{towgs84:"-90,40,88"},EPSG_4271:{towgs84:"-2,374,172"},EPSG_4175:{towgs84:"-88,4,101"},EPSG_4716:{towgs84:"298,-304,-375"},EPSG_4315:{towgs84:"-23,259,-9"},EPSG_4744:{towgs84:"-242.2,-144.9,370.3"},EPSG_4244:{towgs84:"-97,787,86"},EPSG_4293:{towgs84:"616,97,-251"},EPSG_4714:{towgs84:"-127,-769,472"},EPSG_4736:{towgs84:"260,12,-147"},EPSG_6883:{towgs84:"-235,-110,393"},EPSG_6894:{towgs84:"-63,176,185"},EPSG_4205:{towgs84:"-43,-163,45"},EPSG_4256:{towgs84:"41,-220,-134"},EPSG_4262:{towgs84:"639,405,60"},EPSG_4604:{towgs84:"174,359,365"},EPSG_4169:{towgs84:"-115,118,426"},EPSG_4620:{towgs84:"-106,-129,165"},EPSG_4184:{towgs84:"-203,141,53"},EPSG_4616:{towgs84:"-289,-124,60"},EPSG_9403:{towgs84:"-307,-92,127"},EPSG_4684:{towgs84:"-133,-321,50"},EPSG_4708:{towgs84:"-491,-22,435"},EPSG_4707:{towgs84:"114,-116,-333"},EPSG_4709:{towgs84:"145,75,-272"},EPSG_4712:{towgs84:"-205,107,53"},EPSG_4711:{towgs84:"124,-234,-25"},EPSG_4718:{towgs84:"230,-199,-752"},EPSG_4719:{towgs84:"211,147,111"},EPSG_4724:{towgs84:"208,-435,-229"},EPSG_4725:{towgs84:"189,-79,-202"},EPSG_4735:{towgs84:"647,1777,-1124"},EPSG_4722:{towgs84:"-794,119,-298"},EPSG_4728:{towgs84:"-307,-92,127"},EPSG_4734:{towgs84:"-632,438,-609"},EPSG_4727:{towgs84:"912,-58,1227"},EPSG_4729:{towgs84:"185,165,42"},EPSG_4730:{towgs84:"170,42,84"},EPSG_4733:{towgs84:"276,-57,149"},ESRI_37218:{towgs84:"230,-199,-752"},ESRI_37240:{towgs84:"-7,215,225"},ESRI_37221:{towgs84:"252,-209,-751"},ESRI_4305:{towgs84:"-123,-206,219"},ESRI_104139:{towgs84:"-73,-247,227"},EPSG_4748:{towgs84:"51,391,-36"},EPSG_4219:{towgs84:"-384,664,-48"},EPSG_4255:{towgs84:"-333,-222,114"},EPSG_4257:{towgs84:"-587.8,519.75,145.76"},EPSG_4646:{towgs84:"-963,510,-359"},EPSG_6881:{towgs84:"-24,-203,268"},EPSG_6882:{towgs84:"-183,-15,273"},EPSG_4715:{towgs84:"-104,-129,239"},IGNF_RGF93GDD:{towgs84:"0,0,0"},IGNF_RGM04GDD:{towgs84:"0,0,0"},IGNF_RGSPM06GDD:{towgs84:"0,0,0"},IGNF_RGTAAF07GDD:{towgs84:"0,0,0"},IGNF_RGFG95GDD:{towgs84:"0,0,0"},IGNF_RGNCG:{towgs84:"0,0,0"},IGNF_RGPFGDD:{towgs84:"0,0,0"},IGNF_ETRS89G:{towgs84:"0,0,0"},IGNF_RGR92GDD:{towgs84:"0,0,0"},EPSG_4173:{towgs84:"0,0,0"},EPSG_4180:{towgs84:"0,0,0"},EPSG_4619:{towgs84:"0,0,0"},EPSG_4667:{towgs84:"0,0,0"},EPSG_4075:{towgs84:"0,0,0"},EPSG_6706:{towgs84:"0,0,0"},EPSG_7798:{towgs84:"0,0,0"},EPSG_4661:{towgs84:"0,0,0"},EPSG_4669:{towgs84:"0,0,0"},EPSG_8685:{towgs84:"0,0,0"},EPSG_4151:{towgs84:"0,0,0"},EPSG_9702:{towgs84:"0,0,0"},EPSG_4758:{towgs84:"0,0,0"},EPSG_4761:{towgs84:"0,0,0"},EPSG_4765:{towgs84:"0,0,0"},EPSG_8997:{towgs84:"0,0,0"},EPSG_4023:{towgs84:"0,0,0"},EPSG_4670:{towgs84:"0,0,0"},EPSG_4694:{towgs84:"0,0,0"},EPSG_4148:{towgs84:"0,0,0"},EPSG_4163:{towgs84:"0,0,0"},EPSG_4167:{towgs84:"0,0,0"},EPSG_4189:{towgs84:"0,0,0"},EPSG_4190:{towgs84:"0,0,0"},EPSG_4176:{towgs84:"0,0,0"},EPSG_4659:{towgs84:"0,0,0"},EPSG_3824:{towgs84:"0,0,0"},EPSG_3889:{towgs84:"0,0,0"},EPSG_4046:{towgs84:"0,0,0"},EPSG_4081:{towgs84:"0,0,0"},EPSG_4558:{towgs84:"0,0,0"},EPSG_4483:{towgs84:"0,0,0"},EPSG_5013:{towgs84:"0,0,0"},EPSG_5264:{towgs84:"0,0,0"},EPSG_5324:{towgs84:"0,0,0"},EPSG_5354:{towgs84:"0,0,0"},EPSG_5371:{towgs84:"0,0,0"},EPSG_5373:{towgs84:"0,0,0"},EPSG_5381:{towgs84:"0,0,0"},EPSG_5393:{towgs84:"0,0,0"},EPSG_5489:{towgs84:"0,0,0"},EPSG_5593:{towgs84:"0,0,0"},EPSG_6135:{towgs84:"0,0,0"},EPSG_6365:{towgs84:"0,0,0"},EPSG_5246:{towgs84:"0,0,0"},EPSG_7886:{towgs84:"0,0,0"},EPSG_8431:{towgs84:"0,0,0"},EPSG_8427:{towgs84:"0,0,0"},EPSG_8699:{towgs84:"0,0,0"},EPSG_8818:{towgs84:"0,0,0"},EPSG_4757:{towgs84:"0,0,0"},EPSG_9140:{towgs84:"0,0,0"},EPSG_8086:{towgs84:"0,0,0"},EPSG_4686:{towgs84:"0,0,0"},EPSG_4737:{towgs84:"0,0,0"},EPSG_4702:{towgs84:"0,0,0"},EPSG_4747:{towgs84:"0,0,0"},EPSG_4749:{towgs84:"0,0,0"},EPSG_4674:{towgs84:"0,0,0"},EPSG_4755:{towgs84:"0,0,0"},EPSG_4759:{towgs84:"0,0,0"},EPSG_4762:{towgs84:"0,0,0"},EPSG_4763:{towgs84:"0,0,0"},EPSG_4764:{towgs84:"0,0,0"},EPSG_4166:{towgs84:"0,0,0"},EPSG_4170:{towgs84:"0,0,0"},EPSG_5546:{towgs84:"0,0,0"},EPSG_7844:{towgs84:"0,0,0"},EPSG_4818:{towgs84:"589,76,480"}};for(var Bl in Vn){var Bs=Vn[Bl];Bs.datumName&&(Vn[Bs.datumName]=Bs)}function Ul(i,e,s,r,o,h,l){var u={};return i===void 0||i==="none"?u.datum_type=Os:u.datum_type=Qh,e&&(u.datum_params=e.map(parseFloat),(u.datum_params[0]!==0||u.datum_params[1]!==0||u.datum_params[2]!==0)&&(u.datum_type=ti),u.datum_params.length>3&&(u.datum_params[3]!==0||u.datum_params[4]!==0||u.datum_params[5]!==0||u.datum_params[6]!==0)&&(u.datum_type=ei,u.datum_params[3]*=tn,u.datum_params[4]*=tn,u.datum_params[5]*=tn,u.datum_params[6]=u.datum_params[6]/1e6+1)),l&&(u.datum_type=vi,u.grids=l),u.a=s,u.b=r,u.es=o,u.ep2=h,u}var Us={};function Zl(i,e,s){return e instanceof ArrayBuffer?ql(i,e,s):{ready:$l(i,e)}}function ql(i,e,s){var r=!0;s!==void 0&&s.includeErrorFields===!1&&(r=!1);var o=new DataView(e),h=Wl(o),l=jl(o,h),u=Kl(o,l,h,r),f={header:l,subgrids:u};return Us[i]=f,f}async function $l(i,e){for(var s=[],r=await e.getImageCount(),o=r-1;o>=0;o--){var h=await e.getImage(o),l=await h.readRasters(),u=l,f=[h.getWidth(),h.getHeight()],_=h.getBoundingBox().map(Ea),v=[h.fileDirectory.ModelPixelScale[0],h.fileDirectory.ModelPixelScale[1]].map(Ea),m=_[0]+(f[0]-1)*v[0],g=_[3]-(f[1]-1)*v[1],M=u[0],E=u[1],x=[];for(let Z=f[1]-1;Z>=0;Z--)for(let $=f[0]-1;$>=0;$--){var C=Z*f[0]+$;x.push([-Be(E[C]),Be(M[C])])}s.push({del:v,lim:f,ll:[-m,g],cvs:x})}var D={header:{nSubgrids:r},subgrids:s};return Us[i]=D,D}function Fl(i){if(i===void 0)return null;var e=i.split(",");return e.map(Hl)}function Hl(i){if(i.length===0)return null;var e=i[0]==="@";return e&&(i=i.slice(1)),i==="null"?{name:"null",mandatory:!e,grid:null,isNull:!0}:{name:i,mandatory:!e,grid:Us[i]||null,isNull:!1}}function Ea(i){return i*Math.PI/180}function Be(i){return i/3600*Math.PI/180}function Wl(i){var e=i.getInt32(8,!1);return e===11?!1:(e=i.getInt32(8,!0),e!==11&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function jl(i,e){return{nFields:i.getInt32(8,e),nSubgridFields:i.getInt32(24,e),nSubgrids:i.getInt32(40,e),shiftType:Zs(i,56,64).trim(),fromSemiMajorAxis:i.getFloat64(120,e),fromSemiMinorAxis:i.getFloat64(136,e),toSemiMajorAxis:i.getFloat64(152,e),toSemiMinorAxis:i.getFloat64(168,e)}}function Zs(i,e,s){return String.fromCharCode.apply(null,new Uint8Array(i.buffer.slice(e,s)))}function Kl(i,e,s,r){for(var o=176,h=[],l=0;l<e.nSubgrids;l++){var u=Jl(i,o,s),f=Xl(i,o,u,s,r),_=Math.round(1+(u.upperLongitude-u.lowerLongitude)/u.longitudeInterval),v=Math.round(1+(u.upperLatitude-u.lowerLatitude)/u.latitudeInterval);h.push({ll:[Be(u.lowerLongitude),Be(u.lowerLatitude)],del:[Be(u.longitudeInterval),Be(u.latitudeInterval)],lim:[_,v],count:u.gridNodeCount,cvs:Vl(f)});var m=16;r===!1&&(m=8),o+=176+u.gridNodeCount*m}return h}function Vl(i){return i.map(function(e){return[Be(e.longitudeShift),Be(e.latitudeShift)]})}function Jl(i,e,s){return{name:Zs(i,e+8,e+16).trim(),parent:Zs(i,e+24,e+24+8).trim(),lowerLatitude:i.getFloat64(e+72,s),upperLatitude:i.getFloat64(e+88,s),lowerLongitude:i.getFloat64(e+104,s),upperLongitude:i.getFloat64(e+120,s),latitudeInterval:i.getFloat64(e+136,s),longitudeInterval:i.getFloat64(e+152,s),gridNodeCount:i.getInt32(e+168,s)}}function Xl(i,e,s,r,o){var h=e+176,l=16;o===!1&&(l=8);for(var u=[],f=0;f<s.gridNodeCount;f++){var _={latitudeShift:i.getFloat32(h+f*l,r),longitudeShift:i.getFloat32(h+f*l+4,r)};o!==!1&&(_.latitudeAccuracy=i.getFloat32(h+f*l+8,r),_.longitudeAccuracy=i.getFloat32(h+f*l+12,r)),u.push(_)}return u}function be(i,e){if(!(this instanceof be))return new be(i);e=e||function(_){if(_)throw _};var s=El(i);if(typeof s!="object"){e("Could not parse to valid json: "+i);return}var r=be.projections.get(s.projName);if(!r){e("Could not get projection name from: "+i);return}if(s.datumCode&&s.datumCode!=="none"){var o=De(Vn,s.datumCode);o&&(s.datum_params=s.datum_params||(o.towgs84?o.towgs84.split(","):null),s.ellps=o.ellipse,s.datumName=o.datumName?o.datumName:s.datumCode)}s.k0=s.k0||1,s.axis=s.axis||"enu",s.ellps=s.ellps||"wgs84",s.lat1=s.lat1||s.lat0;var h=Dl(s.a,s.b,s.rf,s.ellps,s.sphere),l=zl(h.a,h.b,h.rf,s.R_A),u=Fl(s.nadgrids),f=s.datum||Ul(s.datumCode,s.datum_params,h.a,h.b,l.es,l.ep2,u);ya(this,s),ya(this,r),this.a=h.a,this.b=h.b,this.rf=h.rf,this.sphere=h.sphere,this.es=l.es,this.e=l.e,this.ep2=l.ep2,this.datum=f,this.init(),e(null,this)}be.projections=kl,be.projections.start();function Ql(i,e){return i.datum_type!==e.datum_type||i.a!==e.a||Math.abs(i.es-e.es)>5e-11?!1:i.datum_type===ti?i.datum_params[0]===e.datum_params[0]&&i.datum_params[1]===e.datum_params[1]&&i.datum_params[2]===e.datum_params[2]:i.datum_type===ei?i.datum_params[0]===e.datum_params[0]&&i.datum_params[1]===e.datum_params[1]&&i.datum_params[2]===e.datum_params[2]&&i.datum_params[3]===e.datum_params[3]&&i.datum_params[4]===e.datum_params[4]&&i.datum_params[5]===e.datum_params[5]&&i.datum_params[6]===e.datum_params[6]:!0}function Pa(i,e,s){var r=i.x,o=i.y,h=i.z?i.z:0,l,u,f,_;if(o<-O&&o>-1.001*O)o=-O;else if(o>O&&o<1.001*O)o=O;else{if(o<-O)return{x:-1/0,y:-1/0,z:i.z};if(o>O)return{x:1/0,y:1/0,z:i.z}}return r>Math.PI&&(r-=2*Math.PI),u=Math.sin(o),_=Math.cos(o),f=u*u,l=s/Math.sqrt(1-e*f),{x:(l+h)*_*Math.cos(r),y:(l+h)*_*Math.sin(r),z:(l*(1-e)+h)*u}}function Sa(i,e,s,r){var o=1e-12,h=o*o,l=30,u,f,_,v,m,g,M,E,x,C,D,Z,$,lt=i.x,gt=i.y,Mt=i.z?i.z:0,zt,Dt,Kt;if(u=Math.sqrt(lt*lt+gt*gt),f=Math.sqrt(lt*lt+gt*gt+Mt*Mt),u/s<o){if(zt=0,f/s<o)return Dt=O,Kt=-r,{x:i.x,y:i.y,z:i.z}}else zt=Math.atan2(gt,lt);_=Mt/f,v=u/f,m=1/Math.sqrt(1-e*(2-e)*v*v),E=v*(1-e)*m,x=_*m,$=0;do $++,M=s/Math.sqrt(1-e*x*x),Kt=u*E+Mt*x-M*(1-e*x*x),g=e*M/(M+Kt),m=1/Math.sqrt(1-g*(2-g)*v*v),C=v*(1-g)*m,D=_*m,Z=D*E-C*x,E=C,x=D;while(Z*Z>h&&$<l);return Dt=Math.atan(D/Math.abs(C)),{x:zt,y:Dt,z:Kt}}function Yl(i,e,s){if(e===ti)return{x:i.x+s[0],y:i.y+s[1],z:i.z+s[2]};if(e===ei){var r=s[0],o=s[1],h=s[2],l=s[3],u=s[4],f=s[5],_=s[6];return{x:_*(i.x-f*i.y+u*i.z)+r,y:_*(f*i.x+i.y-l*i.z)+o,z:_*(-u*i.x+l*i.y+i.z)+h}}}function tc(i,e,s){if(e===ti)return{x:i.x-s[0],y:i.y-s[1],z:i.z-s[2]};if(e===ei){var r=s[0],o=s[1],h=s[2],l=s[3],u=s[4],f=s[5],_=s[6],v=(i.x-r)/_,m=(i.y-o)/_,g=(i.z-h)/_;return{x:v+f*m-u*g,y:-f*v+m+l*g,z:u*v-l*m+g}}}function Jn(i){return i===ti||i===ei}function ec(i,e,s){if(Ql(i,e)||i.datum_type===Os||e.datum_type===Os)return s;var r=i.a,o=i.es;if(i.datum_type===vi){var h=Aa(i,!1,s);if(h!==0)return;r=aa,o=oa}var l=e.a,u=e.b,f=e.es;if(e.datum_type===vi&&(l=aa,u=Yh,f=oa),o===f&&r===l&&!Jn(i.datum_type)&&!Jn(e.datum_type))return s;if(s=Pa(s,o,r),Jn(i.datum_type)&&(s=Yl(s,i.datum_type,i.datum_params)),Jn(e.datum_type)&&(s=tc(s,e.datum_type,e.datum_params)),s=Sa(s,f,l,u),e.datum_type===vi){var _=Aa(e,!0,s);if(_!==0)return}return s}function Aa(i,e,s){if(i.grids===null||i.grids.length===0)return console.log("Grid shift grids not found"),-1;var r={x:-s.x,y:s.y},o={x:Number.NaN,y:Number.NaN},h=[];t:for(var l=0;l<i.grids.length;l++){var u=i.grids[l];if(h.push(u.name),u.isNull){o=r;break}if(u.grid===null){if(u.mandatory)return console.log("Unable to find mandatory grid '"+u.name+"'"),-1;continue}for(var f=u.grid.subgrids,_=0,v=f.length;_<v;_++){var m=f[_],g=(Math.abs(m.del[1])+Math.abs(m.del[0]))/1e4,M=m.ll[0]-g,E=m.ll[1]-g,x=m.ll[0]+(m.lim[0]-1)*m.del[0]+g,C=m.ll[1]+(m.lim[1]-1)*m.del[1]+g;if(!(E>r.y||M>r.x||C<r.y||x<r.x)&&(o=ic(r,e,m),!isNaN(o.x)))break t}}return isNaN(o.x)?(console.log("Failed to find a grid shift table for location '"+-r.x*we+" "+r.y*we+" tried: '"+h+"'"),-1):(s.x=-o.x,s.y=o.y,0)}function ic(i,e,s){var r={x:Number.NaN,y:Number.NaN};if(isNaN(i.x))return r;var o={x:i.x,y:i.y};o.x-=s.ll[0],o.y-=s.ll[1],o.x=U(o.x-Math.PI)+Math.PI;var h=La(o,s);if(e){if(isNaN(h.x))return r;h.x=o.x-h.x,h.y=o.y-h.y;var l=9,u=1e-12,f,_;do{if(_=La(h,s),isNaN(_.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge.  Using first approximation.");break}f={x:o.x-(_.x+h.x),y:o.y-(_.y+h.y)},h.x+=f.x,h.y+=f.y}while(l--&&Math.abs(f.x)>u&&Math.abs(f.y)>u);if(l<0)return console.log("Inverse grid shift iterator failed to converge."),r;r.x=U(h.x+s.ll[0]),r.y=h.y+s.ll[1]}else isNaN(h.x)||(r.x=i.x+h.x,r.y=i.y+h.y);return r}function La(i,e){var s={x:i.x/e.del[0],y:i.y/e.del[1]},r={x:Math.floor(s.x),y:Math.floor(s.y)},o={x:s.x-1*r.x,y:s.y-1*r.y},h={x:Number.NaN,y:Number.NaN},l;if(r.x<0||r.x>=e.lim[0]||r.y<0||r.y>=e.lim[1])return h;l=r.y*e.lim[0]+r.x;var u={x:e.cvs[l][0],y:e.cvs[l][1]};l++;var f={x:e.cvs[l][0],y:e.cvs[l][1]};l+=e.lim[0];var _={x:e.cvs[l][0],y:e.cvs[l][1]};l--;var v={x:e.cvs[l][0],y:e.cvs[l][1]},m=o.x*o.y,g=o.x*(1-o.y),M=(1-o.x)*(1-o.y),E=(1-o.x)*o.y;return h.x=M*u.x+g*f.x+E*v.x+m*_.x,h.y=M*u.y+g*f.y+E*v.y+m*_.y,h}function Ca(i,e,s){var r=s.x,o=s.y,h=s.z||0,l,u,f,_={};for(f=0;f<3;f++)if(!(e&&f===2&&s.z===void 0))switch(f===0?(l=r,"ew".indexOf(i.axis[f])!==-1?u="x":u="y"):f===1?(l=o,"ns".indexOf(i.axis[f])!==-1?u="y":u="x"):(l=h,u="z"),i.axis[f]){case"e":_[u]=l;break;case"w":_[u]=-l;break;case"n":_[u]=l;break;case"s":_[u]=-l;break;case"u":s[u]!==void 0&&(_.z=l);break;case"d":s[u]!==void 0&&(_.z=-l);break;default:return null}return _}function Ta(i){var e={x:i[0],y:i[1]};return i.length>2&&(e.z=i[2]),i.length>3&&(e.m=i[3]),e}function nc(i){Na(i.x),Na(i.y)}function Na(i){if(typeof Number.isFinite=="function"){if(Number.isFinite(i))return;throw new TypeError("coordinates must be finite numbers")}if(typeof i!="number"||i!==i||!isFinite(i))throw new TypeError("coordinates must be finite numbers")}function sc(i,e){return(i.datum.datum_type===ti||i.datum.datum_type===ei||i.datum.datum_type===vi)&&e.datumCode!=="WGS84"||(e.datum.datum_type===ti||e.datum.datum_type===ei||e.datum.datum_type===vi)&&i.datumCode!=="WGS84"}function Xn(i,e,s,r){var o;Array.isArray(s)?s=Ta(s):s={x:s.x,y:s.y,z:s.z,m:s.m};var h=s.z!==void 0;if(nc(s),i.datum&&e.datum&&sc(i,e)&&(o=new be("WGS84"),s=Xn(i,o,s,r),i=o),r&&i.axis!=="enu"&&(s=Ca(i,!1,s)),i.projName==="longlat")s={x:s.x*mt,y:s.y*mt,z:s.z||0};else if(i.to_meter&&(s={x:s.x*i.to_meter,y:s.y*i.to_meter,z:s.z||0}),s=i.inverse(s),!s)return;if(i.from_greenwich&&(s.x+=i.from_greenwich),s=ec(i.datum,e.datum,s),!!s)return e.from_greenwich&&(s={x:s.x-e.from_greenwich,y:s.y,z:s.z||0}),e.projName==="longlat"?s={x:s.x*we,y:s.y*we,z:s.z||0}:(s=e.forward(s),e.to_meter&&(s={x:s.x/e.to_meter,y:s.y/e.to_meter,z:s.z||0})),r&&e.axis!=="enu"?Ca(e,!0,s):(s&&!h&&delete s.z,s)}var Ga=be("WGS84");function qs(i,e,s,r){var o,h,l;return Array.isArray(s)?(o=Xn(i,e,s,r)||{x:NaN,y:NaN},s.length>2?typeof i.name<"u"&&i.name==="geocent"||typeof e.name<"u"&&e.name==="geocent"?typeof o.z=="number"?[o.x,o.y,o.z].concat(s.slice(3)):[o.x,o.y,s[2]].concat(s.slice(3)):[o.x,o.y].concat(s.slice(2)):[o.x,o.y]):(h=Xn(i,e,s,r),l=Object.keys(s),l.length===2||l.forEach(function(u){if(typeof i.name<"u"&&i.name==="geocent"||typeof e.name<"u"&&e.name==="geocent"){if(u==="x"||u==="y"||u==="z")return}else if(u==="x"||u==="y")return;h[u]=s[u]}),h)}function Ia(i){return i instanceof be?i:i.oProj?i.oProj:be(i)}function Tt(i,e,s){i=Ia(i);var r=!1,o;return typeof e>"u"?(e=i,i=Ga,r=!0):(typeof e.x<"u"||Array.isArray(e))&&(s=e,e=i,i=Ga,r=!0),e=Ia(e),s?qs(i,e,s):(o={forward:function(h,l){return qs(i,e,h,l)},inverse:function(h,l){return qs(e,i,h,l)}},r&&(o.oProj=e),o)}var Oa=6,ka="AJSAJS",Ra="AFAFAF",wi=65,ie=73,ae=79,an=86,on=90;const rc={forward:za,inverse:ac,toPoint:Da};function za(i,e){return e=e||5,lc(oc({lat:i[1],lon:i[0]}),e)}function ac(i){var e=Fs(Za(i.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat,e.lon,e.lat]:[e.left,e.bottom,e.right,e.top]}function Da(i){var e=Fs(Za(i.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat]:[(e.left+e.right)/2,(e.top+e.bottom)/2]}function $s(i){return i*(Math.PI/180)}function Ba(i){return 180*(i/Math.PI)}function oc(i){var e=i.lat,s=i.lon,r=6378137,o=.00669438,h=.9996,l,u,f,_,v,m,g,M=$s(e),E=$s(s),x,C;C=Math.floor((s+180)/6)+1,s===180&&(C=60),e>=56&&e<64&&s>=3&&s<12&&(C=32),e>=72&&e<84&&(s>=0&&s<9?C=31:s>=9&&s<21?C=33:s>=21&&s<33?C=35:s>=33&&s<42&&(C=37)),l=(C-1)*6-180+3,x=$s(l),u=o/(1-o),f=r/Math.sqrt(1-o*Math.sin(M)*Math.sin(M)),_=Math.tan(M)*Math.tan(M),v=u*Math.cos(M)*Math.cos(M),m=Math.cos(M)*(E-x),g=r*((1-o/4-3*o*o/64-5*o*o*o/256)*M-(3*o/8+3*o*o/32+45*o*o*o/1024)*Math.sin(2*M)+(15*o*o/256+45*o*o*o/1024)*Math.sin(4*M)-35*o*o*o/3072*Math.sin(6*M));var D=h*f*(m+(1-_+v)*m*m*m/6+(5-18*_+_*_+72*v-58*u)*m*m*m*m*m/120)+5e5,Z=h*(g+f*Math.tan(M)*(m*m/2+(5-_+9*v+4*v*v)*m*m*m*m/24+(61-58*_+_*_+600*v-330*u)*m*m*m*m*m*m/720));return e<0&&(Z+=1e7),{northing:Math.round(Z),easting:Math.round(D),zoneNumber:C,zoneLetter:hc(e)}}function Fs(i){var e=i.northing,s=i.easting,r=i.zoneLetter,o=i.zoneNumber;if(o<0||o>60)return null;var h=.9996,l=6378137,u=.00669438,f,_=(1-Math.sqrt(1-u))/(1+Math.sqrt(1-u)),v,m,g,M,E,x,C,D,Z,$=s-5e5,lt=e;r<"N"&&(lt-=1e7),C=(o-1)*6-180+3,f=u/(1-u),x=lt/h,D=x/(l*(1-u/4-3*u*u/64-5*u*u*u/256)),Z=D+(3*_/2-27*_*_*_/32)*Math.sin(2*D)+(21*_*_/16-55*_*_*_*_/32)*Math.sin(4*D)+151*_*_*_/96*Math.sin(6*D),v=l/Math.sqrt(1-u*Math.sin(Z)*Math.sin(Z)),m=Math.tan(Z)*Math.tan(Z),g=f*Math.cos(Z)*Math.cos(Z),M=l*(1-u)/Math.pow(1-u*Math.sin(Z)*Math.sin(Z),1.5),E=$/(v*h);var gt=Z-v*Math.tan(Z)/M*(E*E/2-(5+3*m+10*g-4*g*g-9*f)*E*E*E*E/24+(61+90*m+298*g+45*m*m-252*f-3*g*g)*E*E*E*E*E*E/720);gt=Ba(gt);var Mt=(E-(1+2*m+g)*E*E*E/6+(5-2*g+28*m-3*g*g+8*f+24*m*m)*E*E*E*E*E/120)/Math.cos(Z);Mt=C+Ba(Mt);var zt;if(i.accuracy){var Dt=Fs({northing:i.northing+i.accuracy,easting:i.easting+i.accuracy,zoneLetter:i.zoneLetter,zoneNumber:i.zoneNumber});zt={top:Dt.lat,right:Dt.lon,bottom:gt,left:Mt}}else zt={lat:gt,lon:Mt};return zt}function hc(i){var e="Z";return 84>=i&&i>=72?e="X":72>i&&i>=64?e="W":64>i&&i>=56?e="V":56>i&&i>=48?e="U":48>i&&i>=40?e="T":40>i&&i>=32?e="S":32>i&&i>=24?e="R":24>i&&i>=16?e="Q":16>i&&i>=8?e="P":8>i&&i>=0?e="N":0>i&&i>=-8?e="M":-8>i&&i>=-16?e="L":-16>i&&i>=-24?e="K":-24>i&&i>=-32?e="J":-32>i&&i>=-40?e="H":-40>i&&i>=-48?e="G":-48>i&&i>=-56?e="F":-56>i&&i>=-64?e="E":-64>i&&i>=-72?e="D":-72>i&&i>=-80&&(e="C"),e}function lc(i,e){var s="00000"+i.easting,r="00000"+i.northing;return i.zoneNumber+i.zoneLetter+cc(i.easting,i.northing,i.zoneNumber)+s.substr(s.length-5,e)+r.substr(r.length-5,e)}function cc(i,e,s){var r=Ua(s),o=Math.floor(i/1e5),h=Math.floor(e/1e5)%20;return uc(o,h,r)}function Ua(i){var e=i%Oa;return e===0&&(e=Oa),e}function uc(i,e,s){var r=s-1,o=ka.charCodeAt(r),h=Ra.charCodeAt(r),l=o+i-1,u=h+e,f=!1;l>on&&(l=l-on+wi-1,f=!0),(l===ie||o<ie&&l>ie||(l>ie||o<ie)&&f)&&l++,(l===ae||o<ae&&l>ae||(l>ae||o<ae)&&f)&&(l++,l===ie&&l++),l>on&&(l=l-on+wi-1),u>an?(u=u-an+wi-1,f=!0):f=!1,(u===ie||h<ie&&u>ie||(u>ie||h<ie)&&f)&&u++,(u===ae||h<ae&&u>ae||(u>ae||h<ae)&&f)&&(u++,u===ie&&u++),u>an&&(u=u-an+wi-1);var _=String.fromCharCode(l)+String.fromCharCode(u);return _}function Za(i){if(i&&i.length===0)throw"MGRSPoint coverting from nothing";for(var e=i.length,s=null,r="",o,h=0;!/[A-Z]/.test(o=i.charAt(h));){if(h>=2)throw"MGRSPoint bad conversion from: "+i;r+=o,h++}var l=parseInt(r,10);if(h===0||h+3>e)throw"MGRSPoint bad conversion from: "+i;var u=i.charAt(h++);if(u<="A"||u==="B"||u==="Y"||u>="Z"||u==="I"||u==="O")throw"MGRSPoint zone letter "+u+" not handled: "+i;s=i.substring(h,h+=2);for(var f=Ua(l),_=fc(s.charAt(0),f),v=dc(s.charAt(1),f);v<_c(u);)v+=2e6;var m=e-h;if(m%2!==0)throw`MGRSPoint has to have an even number 
of digits after the zone letter and two 100km letters - front 
half for easting meters, second half for 
northing meters`+i;var g=m/2,M=0,E=0,x,C,D,Z,$;return g>0&&(x=1e5/Math.pow(10,g),C=i.substring(h,h+g),M=parseFloat(C)*x,D=i.substring(h+g),E=parseFloat(D)*x),Z=M+_,$=E+v,{easting:Z,northing:$,zoneLetter:u,zoneNumber:l,accuracy:x}}function fc(i,e){for(var s=ka.charCodeAt(e-1),r=1e5,o=!1;s!==i.charCodeAt(0);){if(s++,s===ie&&s++,s===ae&&s++,s>on){if(o)throw"Bad character: "+i;s=wi,o=!0}r+=1e5}return r}function dc(i,e){if(i>"V")throw"MGRSPoint given invalid Northing "+i;for(var s=Ra.charCodeAt(e-1),r=0,o=!1;s!==i.charCodeAt(0);){if(s++,s===ie&&s++,s===ae&&s++,s>an){if(o)throw"Bad character: "+i;s=wi,o=!0}r+=1e5}return r}function _c(i){var e;switch(i){case"C":e=11e5;break;case"D":e=2e6;break;case"E":e=28e5;break;case"F":e=37e5;break;case"G":e=46e5;break;case"H":e=55e5;break;case"J":e=64e5;break;case"K":e=73e5;break;case"L":e=82e5;break;case"M":e=91e5;break;case"N":e=0;break;case"P":e=8e5;break;case"Q":e=17e5;break;case"R":e=26e5;break;case"S":e=35e5;break;case"T":e=44e5;break;case"U":e=53e5;break;case"V":e=62e5;break;case"W":e=7e6;break;case"X":e=79e5;break;default:e=-1}if(e>=0)return e;throw"Invalid zone letter: "+i}function xi(i,e,s){if(!(this instanceof xi))return new xi(i,e,s);if(Array.isArray(i))this.x=i[0],this.y=i[1],this.z=i[2]||0;else if(typeof i=="object")this.x=i.x,this.y=i.y,this.z=i.z||0;else if(typeof i=="string"&&typeof e>"u"){var r=i.split(",");this.x=parseFloat(r[0],10),this.y=parseFloat(r[1],10),this.z=parseFloat(r[2],10)||0}else this.x=i,this.y=e,this.z=s||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}xi.fromMGRS=function(i){return new xi(Da(i))},xi.prototype.toMGRS=function(i){return za([this.x,this.y],i)};var pc=1,mc=.25,qa=.046875,$a=.01953125,Fa=.01068115234375,gc=.75,vc=.46875,yc=.013020833333333334,Mc=.007120768229166667,wc=.3645833333333333,xc=.005696614583333333,bc=.3076171875;function Hs(i){var e=[];e[0]=pc-i*(mc+i*(qa+i*($a+i*Fa))),e[1]=i*(gc-i*(qa+i*($a+i*Fa)));var s=i*i;return e[2]=s*(vc-i*(yc+i*Mc)),s*=i,e[3]=s*(wc-i*xc),e[4]=s*i*bc,e}function bi(i,e,s,r){return s*=e,e*=e,r[0]*i-s*(r[1]+e*(r[2]+e*(r[3]+e*r[4])))}var Ec=20;function Ws(i,e,s){for(var r=1/(1-e),o=i,h=Ec;h;--h){var l=Math.sin(o),u=1-e*l*l;if(u=(bi(o,l,Math.cos(o),s)-i)*(u*Math.sqrt(u))*r,o-=u,Math.abs(u)<B)return o}return o}function Pc(){this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.es&&(this.en=Hs(this.es),this.ml0=bi(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function Sc(i){var e=i.x,s=i.y,r=U(e-this.long0),o,h,l,u=Math.sin(s),f=Math.cos(s);if(this.es){var v=f*r,m=Math.pow(v,2),g=this.ep2*Math.pow(f,2),M=Math.pow(g,2),E=Math.abs(f)>B?Math.tan(s):0,x=Math.pow(E,2),C=Math.pow(x,2);o=1-this.es*Math.pow(u,2),v=v/Math.sqrt(o);var D=bi(s,u,f,this.en);h=this.a*(this.k0*v*(1+m/6*(1-x+g+m/20*(5-18*x+C+14*g-58*x*g+m/42*(61+179*C-C*x-479*x)))))+this.x0,l=this.a*(this.k0*(D-this.ml0+u*r*v/2*(1+m/12*(5-x+9*g+4*M+m/30*(61+C-58*x+270*g-330*x*g+m/56*(1385+543*C-C*x-3111*x))))))+this.y0}else{var _=f*Math.sin(r);if(Math.abs(Math.abs(_)-1)<B)return 93;if(h=.5*this.a*this.k0*Math.log((1+_)/(1-_))+this.x0,l=f*Math.cos(r)/Math.sqrt(1-Math.pow(_,2)),_=Math.abs(l),_>=1){if(_-1>B)return 93;l=0}else l=Math.acos(l);s<0&&(l=-l),l=this.a*this.k0*(l-this.lat0)+this.y0}return i.x=h,i.y=l,i}function Ac(i){var e,s,r,o,h=(i.x-this.x0)*(1/this.a),l=(i.y-this.y0)*(1/this.a);if(this.es)if(e=this.ml0+l/this.k0,s=Ws(e,this.es,this.en),Math.abs(s)<O){var m=Math.sin(s),g=Math.cos(s),M=Math.abs(g)>B?Math.tan(s):0,E=this.ep2*Math.pow(g,2),x=Math.pow(E,2),C=Math.pow(M,2),D=Math.pow(C,2);e=1-this.es*Math.pow(m,2);var Z=h*Math.sqrt(e)/this.k0,$=Math.pow(Z,2);e=e*M,r=s-e*$/(1-this.es)*.5*(1-$/12*(5+3*C-9*E*C+E-4*x-$/30*(61+90*C-252*E*C+45*D+46*E-$/56*(1385+3633*C+4095*D+1574*D*C)))),o=U(this.long0+Z*(1-$/6*(1+2*C+E-$/20*(5+28*C+24*D+8*E*C+6*E-$/42*(61+662*C+1320*D+720*D*C))))/g)}else r=O*sn(l),o=0;else{var u=Math.exp(h/this.k0),f=.5*(u-1/u),_=this.lat0+l/this.k0,v=Math.cos(_);e=Math.sqrt((1-Math.pow(v,2))/(1+Math.pow(f,2))),r=Math.asin(e),l<0&&(r=-r),f===0&&v===0?o=0:o=U(Math.atan2(f,v)+this.long0)}return i.x=o,i.y=r,i}var Lc=["Fast_Transverse_Mercator","Fast Transverse Mercator"];const Qn={init:Pc,forward:Sc,inverse:Ac,names:Lc};function Ha(i){var e=Math.exp(i);return e=(e-1/e)/2,e}function ne(i,e){i=Math.abs(i),e=Math.abs(e);var s=Math.max(i,e),r=Math.min(i,e)/(s||1);return s*Math.sqrt(1+Math.pow(r,2))}function Cc(i){var e=1+i,s=e-1;return s===0?i:i*Math.log(e)/s}function Tc(i){var e=Math.abs(i);return e=Cc(e*(1+e/(ne(1,e)+1))),i<0?-e:e}function js(i,e){for(var s=2*Math.cos(2*e),r=i.length-1,o=i[r],h=0,l;--r>=0;)l=-h+s*o+i[r],h=o,o=l;return e+l*Math.sin(2*e)}function Nc(i,e){for(var s=2*Math.cos(e),r=i.length-1,o=i[r],h=0,l;--r>=0;)l=-h+s*o+i[r],h=o,o=l;return Math.sin(e)*l}function Gc(i){var e=Math.exp(i);return e=(e+1/e)/2,e}function Wa(i,e,s){for(var r=Math.sin(e),o=Math.cos(e),h=Ha(s),l=Gc(s),u=2*o*l,f=-2*r*h,_=i.length-1,v=i[_],m=0,g=0,M=0,E,x;--_>=0;)E=g,x=m,g=v,m=M,v=-E+u*g-f*m+i[_],M=-x+f*g+u*m;return u=r*l,f=o*h,[u*v-f*M,u*M+f*v]}function Ic(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(Qn.init.apply(this),this.forward=Qn.forward,this.inverse=Qn.inverse),this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var i=this.es/(1+Math.sqrt(1-this.es)),e=i/(2-i),s=e;this.cgb[0]=e*(2+e*(-.6666666666666666+e*(-2+e*(2.577777777777778+e*(.5777777777777777+e*-4.228148148148148))))),this.cbg[0]=e*(-2+e*(.6666666666666666+e*(1.3333333333333333+e*(-1.8222222222222222+e*(.7111111111111111+e*.9824338624338624))))),s=s*e,this.cgb[1]=s*(2.3333333333333335+e*(-1.6+e*(-5.044444444444444+e*(8.584126984126984+e*2.458201058201058)))),this.cbg[1]=s*(1.6666666666666667+e*(-1.0666666666666667+e*(-1.4444444444444444+e*(2.86984126984127+e*-1.6105820105820106)))),s=s*e,this.cgb[2]=s*(3.7333333333333334+e*(-3.8857142857142857+e*(-12.019047619047619+e*26.03668430335097))),this.cbg[2]=s*(-1.7333333333333334+e*(1.619047619047619+e*(1.6+e*-4.474779541446208))),s=s*e,this.cgb[3]=s*(6.792063492063492+e*(-9.485714285714286+e*-28.188500881834216)),this.cbg[3]=s*(1.9634920634920634+e*(-2.4+e*-1.7518165784832451)),s=s*e,this.cgb[4]=s*(13.250793650793652+e*-23.22238255571589),this.cbg[4]=s*(-2.3301587301587303+e*3.5144460477793813),s=s*e,this.cgb[5]=s*27.011268237934903,this.cbg[5]=s*2.8496841430174764,s=Math.pow(e,2),this.Qn=this.k0/(1+e)*(1+s*(.25+s*(.015625+s/256))),this.utg[0]=e*(-.5+e*(.6666666666666666+e*(-.3854166666666667+e*(.002777777777777778+e*(.158203125+e*-.15905919312169312))))),this.gtu[0]=e*(.5+e*(-.6666666666666666+e*(.3125+e*(.22777777777777777+e*(-.4409722222222222+e*.20875661375661375))))),this.utg[1]=s*(-.020833333333333332+e*(-.06666666666666667+e*(.3034722222222222+e*(-.4380952380952381+e*.2890188388723545)))),this.gtu[1]=s*(.2708333333333333+e*(-.6+e*(.38680555555555557+e*(.44603174603174606+e*-1.0248393063822752)))),s=s*e,this.utg[2]=s*(-.035416666666666666+e*(.04404761904761905+e*(.046651785714285715+e*-.06138668430335097))),this.gtu[2]=s*(.25416666666666665+e*(-.7357142857142858+e*(.5603050595238095+e*.9237378747795415))),s=s*e,this.utg[3]=s*(-.02726314484126984+e*(.021825396825396824+e*.11439745921516754)),this.gtu[3]=s*(.30729786706349205+e*(-1.0654761904761905+e*.9096203979276896)),s=s*e,this.utg[4]=s*(-.02841641865079365+e*.027268468414301746),this.gtu[4]=s*(.4306671626984127+e*-1.713007555715889),s=s*e,this.utg[5]=s*-.03233083094085698,this.gtu[5]=s*.6650675310896665;var r=js(this.cbg,this.lat0);this.Zb=-this.Qn*(r+Nc(this.gtu,2*r))}function Oc(i){var e=U(i.x-this.long0),s=i.y;s=js(this.cbg,s);var r=Math.sin(s),o=Math.cos(s),h=Math.sin(e),l=Math.cos(e);s=Math.atan2(r,l*o),e=Math.atan2(h*o,ne(r,o*l)),e=Tc(Math.tan(e));var u=Wa(this.gtu,2*s,2*e);s=s+u[0],e=e+u[1];var f,_;return Math.abs(e)<=2.623395162778?(f=this.a*(this.Qn*e)+this.x0,_=this.a*(this.Qn*s+this.Zb)+this.y0):(f=1/0,_=1/0),i.x=f,i.y=_,i}function kc(i){var e=(i.x-this.x0)*(1/this.a),s=(i.y-this.y0)*(1/this.a);s=(s-this.Zb)/this.Qn,e=e/this.Qn;var r,o;if(Math.abs(e)<=2.623395162778){var h=Wa(this.utg,2*s,2*e);s=s+h[0],e=e+h[1],e=Math.atan(Ha(e));var l=Math.sin(s),u=Math.cos(s),f=Math.sin(e),_=Math.cos(e);s=Math.atan2(l*_,ne(f,_*u)),e=Math.atan2(f,_*u),r=U(e+this.long0),o=js(this.cgb,s)}else r=1/0,o=1/0;return i.x=r,i.y=o,i}var Rc=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"];const Yn={init:Ic,forward:Oc,inverse:kc,names:Rc};function zc(i,e){if(i===void 0){if(i=Math.floor((U(e)+Math.PI)*30/Math.PI)+1,i<0)return 0;if(i>60)return 60}return i}var Dc="etmerc";function Bc(){var i=zc(this.zone,this.long0);if(i===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(i)-183)*mt,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,Yn.init.apply(this),this.forward=Yn.forward,this.inverse=Yn.inverse}var Uc=["Universal Transverse Mercator System","utm"];const Zc={init:Bc,names:Uc,dependsOn:Dc};function Ks(i,e){return Math.pow((1-i)/(1+i),e)}var qc=20;function $c(){var i=Math.sin(this.lat0),e=Math.cos(this.lat0);e*=e,this.rc=Math.sqrt(1-this.es)/(1-this.es*i*i),this.C=Math.sqrt(1+this.es*e*e/(1-this.es)),this.phic0=Math.asin(i/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+ut)/(Math.pow(Math.tan(.5*this.lat0+ut),this.C)*Ks(this.e*i,this.ratexp))}function Fc(i){var e=i.x,s=i.y;return i.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*s+ut),this.C)*Ks(this.e*Math.sin(s),this.ratexp))-O,i.x=this.C*e,i}function Hc(i){for(var e=1e-14,s=i.x/this.C,r=i.y,o=Math.pow(Math.tan(.5*r+ut)/this.K,1/this.C),h=qc;h>0&&(r=2*Math.atan(o*Ks(this.e*Math.sin(i.y),-.5*this.e))-O,!(Math.abs(r-i.y)<e));--h)i.y=r;return h?(i.x=s,i.y=r,i):null}var Wc=["gauss"];const Vs={init:$c,forward:Fc,inverse:Hc,names:Wc};function jc(){Vs.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))}function Kc(i){var e,s,r,o;return i.x=U(i.x-this.long0),Vs.forward.apply(this,[i]),e=Math.sin(i.y),s=Math.cos(i.y),r=Math.cos(i.x),o=this.k0*this.R2/(1+this.sinc0*e+this.cosc0*s*r),i.x=o*s*Math.sin(i.x),i.y=o*(this.cosc0*e-this.sinc0*s*r),i.x=this.a*i.x+this.x0,i.y=this.a*i.y+this.y0,i}function Vc(i){var e,s,r,o,h;if(i.x=(i.x-this.x0)/this.a,i.y=(i.y-this.y0)/this.a,i.x/=this.k0,i.y/=this.k0,h=ne(i.x,i.y)){var l=2*Math.atan2(h,this.R2);e=Math.sin(l),s=Math.cos(l),o=Math.asin(s*this.sinc0+i.y*e*this.cosc0/h),r=Math.atan2(i.x*e,h*this.cosc0*s-i.y*this.sinc0*e)}else o=this.phic0,r=0;return i.x=r,i.y=o,Vs.inverse.apply(this,[i]),i.x=U(i.x+this.long0),i}var Jc=["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"];const Xc={init:jc,forward:Kc,inverse:Vc,names:Jc};function Qc(i,e,s){return e*=s,Math.tan(.5*(O+i))*Math.pow((1-e)/(1+e),.5*s)}function Yc(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=B&&(this.k0=.5*(1+sn(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=B&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=B&&Math.abs(Math.cos(this.lat_ts))>B&&(this.k0=.5*this.cons*xe(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/ge(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=xe(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-O,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function tu(i){var e=i.x,s=i.y,r=Math.sin(s),o=Math.cos(s),h,l,u,f,_,v,m=U(e-this.long0);return Math.abs(Math.abs(e-this.long0)-Math.PI)<=B&&Math.abs(s+this.lat0)<=B?(i.x=NaN,i.y=NaN,i):this.sphere?(h=2*this.k0/(1+this.sinlat0*r+this.coslat0*o*Math.cos(m)),i.x=this.a*h*o*Math.sin(m)+this.x0,i.y=this.a*h*(this.coslat0*r-this.sinlat0*o*Math.cos(m))+this.y0,i):(l=2*Math.atan(this.ssfn_(s,r,this.e))-O,f=Math.cos(l),u=Math.sin(l),Math.abs(this.coslat0)<=B?(_=ge(this.e,s*this.con,this.con*r),v=2*this.a*this.k0*_/this.cons,i.x=this.x0+v*Math.sin(e-this.long0),i.y=this.y0-this.con*v*Math.cos(e-this.long0),i):(Math.abs(this.sinlat0)<B?(h=2*this.a*this.k0/(1+f*Math.cos(m)),i.y=h*u):(h=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*u+this.cosX0*f*Math.cos(m))),i.y=h*(this.cosX0*u-this.sinX0*f*Math.cos(m))+this.y0),i.x=h*f*Math.sin(m)+this.x0,i))}function eu(i){i.x-=this.x0,i.y-=this.y0;var e,s,r,o,h,l=Math.sqrt(i.x*i.x+i.y*i.y);if(this.sphere){var u=2*Math.atan(l/(2*this.a*this.k0));return e=this.long0,s=this.lat0,l<=B?(i.x=e,i.y=s,i):(s=Math.asin(Math.cos(u)*this.sinlat0+i.y*Math.sin(u)*this.coslat0/l),Math.abs(this.coslat0)<B?this.lat0>0?e=U(this.long0+Math.atan2(i.x,-1*i.y)):e=U(this.long0+Math.atan2(i.x,i.y)):e=U(this.long0+Math.atan2(i.x*Math.sin(u),l*this.coslat0*Math.cos(u)-i.y*this.sinlat0*Math.sin(u))),i.x=e,i.y=s,i)}else if(Math.abs(this.coslat0)<=B){if(l<=B)return s=this.lat0,e=this.long0,i.x=e,i.y=s,i;i.x*=this.con,i.y*=this.con,r=l*this.cons/(2*this.a*this.k0),s=this.con*rn(this.e,r),e=this.con*U(this.con*this.long0+Math.atan2(i.x,-1*i.y))}else o=2*Math.atan(l*this.cosX0/(2*this.a*this.k0*this.ms1)),e=this.long0,l<=B?h=this.X0:(h=Math.asin(Math.cos(o)*this.sinX0+i.y*Math.sin(o)*this.cosX0/l),e=U(this.long0+Math.atan2(i.x*Math.sin(o),l*this.cosX0*Math.cos(o)-i.y*this.sinX0*Math.sin(o)))),s=-1*rn(this.e,Math.tan(.5*(O+h)));return i.x=e,i.y=s,i}var iu=["stere","Stereographic_South_Pole","Polar_Stereographic_variant_A","Polar_Stereographic_variant_B","Polar_Stereographic"];const nu={init:Yc,forward:tu,inverse:eu,names:iu,ssfn_:Qc};function su(){var i=this.lat0;this.lambda0=this.long0;var e=Math.sin(i),s=this.a,r=this.rf,o=1/r,h=2*o-Math.pow(o,2),l=this.e=Math.sqrt(h);this.R=this.k0*s*Math.sqrt(1-h)/(1-h*Math.pow(e,2)),this.alpha=Math.sqrt(1+h/(1-h)*Math.pow(Math.cos(i),4)),this.b0=Math.asin(e/this.alpha);var u=Math.log(Math.tan(Math.PI/4+this.b0/2)),f=Math.log(Math.tan(Math.PI/4+i/2)),_=Math.log((1+l*e)/(1-l*e));this.K=u-this.alpha*f+this.alpha*l/2*_}function ru(i){var e=Math.log(Math.tan(Math.PI/4-i.y/2)),s=this.e/2*Math.log((1+this.e*Math.sin(i.y))/(1-this.e*Math.sin(i.y))),r=-this.alpha*(e+s)+this.K,o=2*(Math.atan(Math.exp(r))-Math.PI/4),h=this.alpha*(i.x-this.lambda0),l=Math.atan(Math.sin(h)/(Math.sin(this.b0)*Math.tan(o)+Math.cos(this.b0)*Math.cos(h))),u=Math.asin(Math.cos(this.b0)*Math.sin(o)-Math.sin(this.b0)*Math.cos(o)*Math.cos(h));return i.y=this.R/2*Math.log((1+Math.sin(u))/(1-Math.sin(u)))+this.y0,i.x=this.R*l+this.x0,i}function au(i){for(var e=i.x-this.x0,s=i.y-this.y0,r=e/this.R,o=2*(Math.atan(Math.exp(s/this.R))-Math.PI/4),h=Math.asin(Math.cos(this.b0)*Math.sin(o)+Math.sin(this.b0)*Math.cos(o)*Math.cos(r)),l=Math.atan(Math.sin(r)/(Math.cos(this.b0)*Math.cos(r)-Math.sin(this.b0)*Math.tan(o))),u=this.lambda0+l/this.alpha,f=0,_=h,v=-1e3,m=0;Math.abs(_-v)>1e-7;){if(++m>20)return;f=1/this.alpha*(Math.log(Math.tan(Math.PI/4+h/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(_))/2)),v=_,_=2*Math.atan(Math.exp(f))-Math.PI/2}return i.x=u,i.y=_,i}var ou=["somerc"];const hu={init:su,forward:ru,inverse:au,names:ou};var Ei=1e-7;function lu(i){var e=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],s=typeof i.projName=="object"?Object.keys(i.projName)[0]:i.projName;return"no_uoff"in i||"no_off"in i||e.indexOf(s)!==-1||e.indexOf(xa(s))!==-1}function cu(){var i,e,s,r,o,h,l,u,f,_,v=0,m,g=0,M=0,E=0,x=0,C=0,D=0;this.no_off=lu(this),this.no_rot="no_rot"in this;var Z=!1;"alpha"in this&&(Z=!0);var $=!1;if("rectified_grid_angle"in this&&($=!0),Z&&(D=this.alpha),$&&(v=this.rectified_grid_angle),Z||$)g=this.longc;else if(M=this.long1,x=this.lat1,E=this.long2,C=this.lat2,Math.abs(x-C)<=Ei||(i=Math.abs(x))<=Ei||Math.abs(i-O)<=Ei||Math.abs(Math.abs(this.lat0)-O)<=Ei||Math.abs(Math.abs(C)-O)<=Ei)throw new Error;var lt=1-this.es;e=Math.sqrt(lt),Math.abs(this.lat0)>B?(u=Math.sin(this.lat0),s=Math.cos(this.lat0),i=1-this.es*u*u,this.B=s*s,this.B=Math.sqrt(1+this.es*this.B*this.B/lt),this.A=this.B*this.k0*e/i,r=this.B*e/(s*Math.sqrt(i)),o=r*r-1,o<=0?o=0:(o=Math.sqrt(o),this.lat0<0&&(o=-o)),this.E=o+=r,this.E*=Math.pow(ge(this.e,this.lat0,u),this.B)):(this.B=1/e,this.A=this.k0,this.E=r=o=1),Z||$?(Z?(m=Math.asin(Math.sin(D)/r),$||(v=D)):(m=v,D=Math.asin(r*Math.sin(m))),this.lam0=g-Math.asin(.5*(o-1/o)*Math.tan(m))/this.B):(h=Math.pow(ge(this.e,x,Math.sin(x)),this.B),l=Math.pow(ge(this.e,C,Math.sin(C)),this.B),o=this.E/h,f=(l-h)/(l+h),_=this.E*this.E,_=(_-l*h)/(_+l*h),i=M-E,i<-Math.pi?E-=en:i>Math.pi&&(E+=en),this.lam0=U(.5*(M+E)-Math.atan(_*Math.tan(.5*this.B*(M-E))/f)/this.B),m=Math.atan(2*Math.sin(this.B*U(M-this.lam0))/(o-1/o)),v=D=Math.asin(r*Math.sin(m))),this.singam=Math.sin(m),this.cosgam=Math.cos(m),this.sinrot=Math.sin(v),this.cosrot=Math.cos(v),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(r*r-1)/Math.cos(D))),this.lat0<0&&(this.u_0=-this.u_0)),o=.5*m,this.v_pole_n=this.ArB*Math.log(Math.tan(ut-o)),this.v_pole_s=this.ArB*Math.log(Math.tan(ut+o))}function uu(i){var e={},s,r,o,h,l,u,f,_;if(i.x=i.x-this.lam0,Math.abs(Math.abs(i.y)-O)>B){if(l=this.E/Math.pow(ge(this.e,i.y,Math.sin(i.y)),this.B),u=1/l,s=.5*(l-u),r=.5*(l+u),h=Math.sin(this.B*i.x),o=(s*this.singam-h*this.cosgam)/r,Math.abs(Math.abs(o)-1)<B)throw new Error;_=.5*this.ArB*Math.log((1-o)/(1+o)),u=Math.cos(this.B*i.x),Math.abs(u)<Ei?f=this.A*i.x:f=this.ArB*Math.atan2(s*this.cosgam+h*this.singam,u)}else _=i.y>0?this.v_pole_n:this.v_pole_s,f=this.ArB*i.y;return this.no_rot?(e.x=f,e.y=_):(f-=this.u_0,e.x=_*this.cosrot+f*this.sinrot,e.y=f*this.cosrot-_*this.sinrot),e.x=this.a*e.x+this.x0,e.y=this.a*e.y+this.y0,e}function fu(i){var e,s,r,o,h,l,u,f={};if(i.x=(i.x-this.x0)*(1/this.a),i.y=(i.y-this.y0)*(1/this.a),this.no_rot?(s=i.y,e=i.x):(s=i.x*this.cosrot-i.y*this.sinrot,e=i.y*this.cosrot+i.x*this.sinrot+this.u_0),r=Math.exp(-this.BrA*s),o=.5*(r-1/r),h=.5*(r+1/r),l=Math.sin(this.BrA*e),u=(l*this.cosgam+o*this.singam)/h,Math.abs(Math.abs(u)-1)<B)f.x=0,f.y=u<0?-O:O;else{if(f.y=this.E/Math.sqrt((1+u)/(1-u)),f.y=rn(this.e,Math.pow(f.y,1/this.B)),f.y===1/0)throw new Error;f.x=-this.rB*Math.atan2(o*this.cosgam-l*this.singam,Math.cos(this.BrA*e))}return f.x+=this.lam0,f}var du=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Variant_B","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"];const _u={init:cu,forward:uu,inverse:fu,names:du};function pu(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<B)){var i=this.b/this.a;this.e=Math.sqrt(1-i*i);var e=Math.sin(this.lat1),s=Math.cos(this.lat1),r=xe(this.e,e,s),o=ge(this.e,this.lat1,e),h=Math.sin(this.lat2),l=Math.cos(this.lat2),u=xe(this.e,h,l),f=ge(this.e,this.lat2,h),_=Math.abs(Math.abs(this.lat0)-O)<B?0:ge(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>B?this.ns=Math.log(r/u)/Math.log(o/f):this.ns=e,isNaN(this.ns)&&(this.ns=e),this.f0=r/(this.ns*Math.pow(o,this.ns)),this.rh=this.a*this.f0*Math.pow(_,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function mu(i){var e=i.x,s=i.y;Math.abs(2*Math.abs(s)-Math.PI)<=B&&(s=sn(s)*(O-2*B));var r=Math.abs(Math.abs(s)-O),o,h;if(r>B)o=ge(this.e,s,Math.sin(s)),h=this.a*this.f0*Math.pow(o,this.ns);else{if(r=s*this.ns,r<=0)return null;h=0}var l=this.ns*U(e-this.long0);return i.x=this.k0*(h*Math.sin(l))+this.x0,i.y=this.k0*(this.rh-h*Math.cos(l))+this.y0,i}function gu(i){var e,s,r,o,h,l=(i.x-this.x0)/this.k0,u=this.rh-(i.y-this.y0)/this.k0;this.ns>0?(e=Math.sqrt(l*l+u*u),s=1):(e=-Math.sqrt(l*l+u*u),s=-1);var f=0;if(e!==0&&(f=Math.atan2(s*l,s*u)),e!==0||this.ns>0){if(s=1/this.ns,r=Math.pow(e/(this.a*this.f0),s),o=rn(this.e,r),o===-9999)return null}else o=-O;return h=U(f/this.ns+this.long0),i.x=h,i.y=o,i}var vu=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"];const yu={init:pu,forward:mu,inverse:gu,names:vu};function Mu(){this.a=6377397155e-3,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function wu(i){var e,s,r,o,h,l,u,f=i.x,_=i.y,v=U(f-this.long0);return e=Math.pow((1+this.e*Math.sin(_))/(1-this.e*Math.sin(_)),this.alfa*this.e/2),s=2*(Math.atan(this.k*Math.pow(Math.tan(_/2+this.s45),this.alfa)/e)-this.s45),r=-v*this.alfa,o=Math.asin(Math.cos(this.ad)*Math.sin(s)+Math.sin(this.ad)*Math.cos(s)*Math.cos(r)),h=Math.asin(Math.cos(s)*Math.sin(r)/Math.cos(o)),l=this.n*h,u=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(o/2+this.s45),this.n),i.y=u*Math.cos(l)/1,i.x=u*Math.sin(l)/1,this.czech||(i.y*=-1,i.x*=-1),i}function xu(i){var e,s,r,o,h,l,u,f,_=i.x;i.x=i.y,i.y=_,this.czech||(i.y*=-1,i.x*=-1),l=Math.sqrt(i.x*i.x+i.y*i.y),h=Math.atan2(i.y,i.x),o=h/Math.sin(this.s0),r=2*(Math.atan(Math.pow(this.ro0/l,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),e=Math.asin(Math.cos(this.ad)*Math.sin(r)-Math.sin(this.ad)*Math.cos(r)*Math.cos(o)),s=Math.asin(Math.cos(r)*Math.sin(o)/Math.cos(e)),i.x=this.long0-s/this.alfa,u=e,f=0;var v=0;do i.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(e/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(u))/(1-this.e*Math.sin(u)),this.e/2))-this.s45),Math.abs(u-i.y)<1e-10&&(f=1),u=i.y,v+=1;while(f===0&&v<15);return v>=15?null:i}var bu=["Krovak","krovak"];const Eu={init:Mu,forward:wu,inverse:xu,names:bu};function Xt(i,e,s,r,o){return i*o-e*Math.sin(2*o)+s*Math.sin(4*o)-r*Math.sin(6*o)}function hn(i){return 1-.25*i*(1+i/16*(3+1.25*i))}function ln(i){return .375*i*(1+.25*i*(1+.46875*i))}function cn(i){return .05859375*i*i*(1+.75*i)}function un(i){return i*i*i*.011393229166666666}function Js(i,e,s){var r=e*s;return i/Math.sqrt(1-r*r)}function Ue(i){return Math.abs(i)<O?i:i-sn(i)*Math.PI}function ts(i,e,s,r,o){var h,l;h=i/e;for(var u=0;u<15;u++)if(l=(i-(e*h-s*Math.sin(2*h)+r*Math.sin(4*h)-o*Math.sin(6*h)))/(e-2*s*Math.cos(2*h)+4*r*Math.cos(4*h)-6*o*Math.cos(6*h)),h+=l,Math.abs(l)<=1e-10)return h;return NaN}function Pu(){this.sphere||(this.e0=hn(this.es),this.e1=ln(this.es),this.e2=cn(this.es),this.e3=un(this.es),this.ml0=this.a*Xt(this.e0,this.e1,this.e2,this.e3,this.lat0))}function Su(i){var e,s,r=i.x,o=i.y;if(r=U(r-this.long0),this.sphere)e=this.a*Math.asin(Math.cos(o)*Math.sin(r)),s=this.a*(Math.atan2(Math.tan(o),Math.cos(r))-this.lat0);else{var h=Math.sin(o),l=Math.cos(o),u=Js(this.a,this.e,h),f=Math.tan(o)*Math.tan(o),_=r*Math.cos(o),v=_*_,m=this.es*l*l/(1-this.es),g=this.a*Xt(this.e0,this.e1,this.e2,this.e3,o);e=u*_*(1-v*f*(.16666666666666666-(8-f+8*m)*v/120)),s=g-this.ml0+u*h/l*v*(.5+(5-f+6*m)*v/24)}return i.x=e+this.x0,i.y=s+this.y0,i}function Au(i){i.x-=this.x0,i.y-=this.y0;var e=i.x/this.a,s=i.y/this.a,r,o;if(this.sphere){var h=s+this.lat0;r=Math.asin(Math.sin(h)*Math.cos(e)),o=Math.atan2(Math.tan(e),Math.cos(h))}else{var l=this.ml0/this.a+s,u=ts(l,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(u)-O)<=B)return i.x=this.long0,i.y=O,s<0&&(i.y*=-1),i;var f=Js(this.a,this.e,Math.sin(u)),_=f*f*f/this.a/this.a*(1-this.es),v=Math.pow(Math.tan(u),2),m=e*this.a/f,g=m*m;r=u-f*Math.tan(u)/_*m*m*(.5-(1+3*v)*m*m/24),o=m*(1-g*(v/3+(1+3*v)*v*g/15))/Math.cos(u)}return i.x=U(o+this.long0),i.y=Ue(r),i}var Lu=["Cassini","Cassini_Soldner","cass"];const Cu={init:Pu,forward:Su,inverse:Au,names:Lu};function Ze(i,e){var s;return i>1e-7?(s=i*e,(1-i*i)*(e/(1-s*s)-.5/i*Math.log((1-s)/(1+s)))):2*e}var Tu=1,Nu=2,Gu=3,Iu=4;function Ou(){var i=Math.abs(this.lat0);if(Math.abs(i-O)<B?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(i)<B?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0){var e;switch(this.qp=Ze(this.e,1),this.mmf=.5/(1-this.es),this.apa=$u(this.es),this.mode){case this.N_POLE:this.dd=1;break;case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),e=Math.sin(this.lat0),this.sinb1=Ze(this.e,e)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*e*e)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd;break}}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function ku(i){var e,s,r,o,h,l,u,f,_,v,m=i.x,g=i.y;if(m=U(m-this.long0),this.sphere){if(h=Math.sin(g),v=Math.cos(g),r=Math.cos(m),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(s=this.mode===this.EQUIT?1+v*r:1+this.sinph0*h+this.cosph0*v*r,s<=B)return null;s=Math.sqrt(2/s),e=s*v*Math.sin(m),s*=this.mode===this.EQUIT?h:this.cosph0*h-this.sinph0*v*r}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(r=-r),Math.abs(g+this.lat0)<B)return null;s=ut-g*.5,s=2*(this.mode===this.S_POLE?Math.cos(s):Math.sin(s)),e=s*Math.sin(m),s*=r}}else{switch(u=0,f=0,_=0,r=Math.cos(m),o=Math.sin(m),h=Math.sin(g),l=Ze(this.e,h),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(u=l/this.qp,f=Math.sqrt(1-u*u)),this.mode){case this.OBLIQ:_=1+this.sinb1*u+this.cosb1*f*r;break;case this.EQUIT:_=1+f*r;break;case this.N_POLE:_=O+g,l=this.qp-l;break;case this.S_POLE:_=g-O,l=this.qp+l;break}if(Math.abs(_)<B)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:_=Math.sqrt(2/_),this.mode===this.OBLIQ?s=this.ymf*_*(this.cosb1*u-this.sinb1*f*r):s=(_=Math.sqrt(2/(1+f*r)))*u*this.ymf,e=this.xmf*_*f*o;break;case this.N_POLE:case this.S_POLE:l>=0?(e=(_=Math.sqrt(l))*o,s=r*(this.mode===this.S_POLE?_:-_)):e=s=0;break}}return i.x=this.a*e+this.x0,i.y=this.a*s+this.y0,i}function Ru(i){i.x-=this.x0,i.y-=this.y0;var e=i.x/this.a,s=i.y/this.a,r,o,h,l,u,f,_;if(this.sphere){var v=0,m,g=0;if(m=Math.sqrt(e*e+s*s),o=m*.5,o>1)return null;switch(o=2*Math.asin(o),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(g=Math.sin(o),v=Math.cos(o)),this.mode){case this.EQUIT:o=Math.abs(m)<=B?0:Math.asin(s*g/m),e*=g,s=v*m;break;case this.OBLIQ:o=Math.abs(m)<=B?this.lat0:Math.asin(v*this.sinph0+s*g*this.cosph0/m),e*=g*this.cosph0,s=(v-Math.sin(o)*this.sinph0)*m;break;case this.N_POLE:s=-s,o=O-o;break;case this.S_POLE:o-=O;break}r=s===0&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(e,s)}else{if(_=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(e/=this.dd,s*=this.dd,f=Math.sqrt(e*e+s*s),f<B)return i.x=this.long0,i.y=this.lat0,i;l=2*Math.asin(.5*f/this.rq),h=Math.cos(l),e*=l=Math.sin(l),this.mode===this.OBLIQ?(_=h*this.sinb1+s*l*this.cosb1/f,u=this.qp*_,s=f*this.cosb1*h-s*this.sinb1*l):(_=s*l/f,u=this.qp*_,s=f*h)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(s=-s),u=e*e+s*s,!u)return i.x=this.long0,i.y=this.lat0,i;_=1-u/this.qp,this.mode===this.S_POLE&&(_=-_)}r=Math.atan2(e,s),o=Fu(Math.asin(_),this.apa)}return i.x=U(this.long0+r),i.y=o,i}var zu=.3333333333333333,Du=.17222222222222222,Bu=.10257936507936508,Uu=.06388888888888888,Zu=.0664021164021164,qu=.016415012942191543;function $u(i){var e,s=[];return s[0]=i*zu,e=i*i,s[0]+=e*Du,s[1]=e*Uu,e*=i,s[0]+=e*Bu,s[1]+=e*Zu,s[2]=e*qu,s}function Fu(i,e){var s=i+i;return i+e[0]*Math.sin(s)+e[1]*Math.sin(s+s)+e[2]*Math.sin(s+s+s)}var Hu=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"];const Wu={init:Ou,forward:ku,inverse:Ru,names:Hu,S_POLE:Tu,N_POLE:Nu,EQUIT:Gu,OBLIQ:Iu};function qe(i){return Math.abs(i)>1&&(i=i>1?1:-1),Math.asin(i)}function ju(){Math.abs(this.lat1+this.lat2)<B||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=xe(this.e3,this.sin_po,this.cos_po),this.qs1=Ze(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=xe(this.e3,this.sin_po,this.cos_po),this.qs2=Ze(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=Ze(this.e3,this.sin_po),Math.abs(this.lat1-this.lat2)>B?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function Ku(i){var e=i.x,s=i.y;this.sin_phi=Math.sin(s),this.cos_phi=Math.cos(s);var r=Ze(this.e3,this.sin_phi),o=this.a*Math.sqrt(this.c-this.ns0*r)/this.ns0,h=this.ns0*U(e-this.long0),l=o*Math.sin(h)+this.x0,u=this.rh-o*Math.cos(h)+this.y0;return i.x=l,i.y=u,i}function Vu(i){var e,s,r,o,h,l;return i.x-=this.x0,i.y=this.rh-i.y+this.y0,this.ns0>=0?(e=Math.sqrt(i.x*i.x+i.y*i.y),r=1):(e=-Math.sqrt(i.x*i.x+i.y*i.y),r=-1),o=0,e!==0&&(o=Math.atan2(r*i.x,r*i.y)),r=e*this.ns0/this.a,this.sphere?l=Math.asin((this.c-r*r)/(2*this.ns0)):(s=(this.c-r*r)/this.ns0,l=this.phi1z(this.e3,s)),h=U(o/this.ns0+this.long0),i.x=h,i.y=l,i}function Ju(i,e){var s,r,o,h,l,u=qe(.5*e);if(i<B)return u;for(var f=i*i,_=1;_<=25;_++)if(s=Math.sin(u),r=Math.cos(u),o=i*s,h=1-o*o,l=.5*h*h/r*(e/(1-f)-s/h+.5/i*Math.log((1-o)/(1+o))),u=u+l,Math.abs(l)<=1e-7)return u;return null}var Xu=["Albers_Conic_Equal_Area","Albers_Equal_Area","Albers","aea"];const Qu={init:ju,forward:Ku,inverse:Vu,names:Xu,phi1z:Ju};function Yu(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function tf(i){var e,s,r,o,h,l,u,f,_=i.x,v=i.y;return r=U(_-this.long0),e=Math.sin(v),s=Math.cos(v),o=Math.cos(r),l=this.sin_p14*e+this.cos_p14*s*o,h=1,l>0||Math.abs(l)<=B?(u=this.x0+this.a*h*s*Math.sin(r)/l,f=this.y0+this.a*h*(this.cos_p14*e-this.sin_p14*s*o)/l):(u=this.x0+this.infinity_dist*s*Math.sin(r),f=this.y0+this.infinity_dist*(this.cos_p14*e-this.sin_p14*s*o)),i.x=u,i.y=f,i}function ef(i){var e,s,r,o,h,l;return i.x=(i.x-this.x0)/this.a,i.y=(i.y-this.y0)/this.a,i.x/=this.k0,i.y/=this.k0,(e=Math.sqrt(i.x*i.x+i.y*i.y))?(o=Math.atan2(e,this.rc),s=Math.sin(o),r=Math.cos(o),l=qe(r*this.sin_p14+i.y*s*this.cos_p14/e),h=Math.atan2(i.x*s,e*this.cos_p14*r-i.y*this.sin_p14*s),h=U(this.long0+h)):(l=this.phic0,h=0),i.x=h,i.y=l,i}var nf=["gnom"];const sf={init:Yu,forward:tf,inverse:ef,names:nf};function rf(i,e){var s=1-(1-i*i)/(2*i)*Math.log((1-i)/(1+i));if(Math.abs(Math.abs(e)-s)<1e-6)return e<0?-1*O:O;for(var r=Math.asin(.5*e),o,h,l,u,f=0;f<30;f++)if(h=Math.sin(r),l=Math.cos(r),u=i*h,o=Math.pow(1-u*u,2)/(2*l)*(e/(1-i*i)-h/(1-u*u)+.5/i*Math.log((1-u)/(1+u))),r+=o,Math.abs(o)<=1e-10)return r;return NaN}function af(){this.sphere||(this.k0=xe(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function of(i){var e=i.x,s=i.y,r,o,h=U(e-this.long0);if(this.sphere)r=this.x0+this.a*h*Math.cos(this.lat_ts),o=this.y0+this.a*Math.sin(s)/Math.cos(this.lat_ts);else{var l=Ze(this.e,Math.sin(s));r=this.x0+this.a*this.k0*h,o=this.y0+this.a*l*.5/this.k0}return i.x=r,i.y=o,i}function hf(i){i.x-=this.x0,i.y-=this.y0;var e,s;return this.sphere?(e=U(this.long0+i.x/this.a/Math.cos(this.lat_ts)),s=Math.asin(i.y/this.a*Math.cos(this.lat_ts))):(s=rf(this.e,2*i.y*this.k0/this.a),e=U(this.long0+i.x/(this.a*this.k0))),i.x=e,i.y=s,i}var lf=["cea"];const cf={init:af,forward:of,inverse:hf,names:lf};function uf(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function ff(i){var e=i.x,s=i.y,r=U(e-this.long0),o=Ue(s-this.lat0);return i.x=this.x0+this.a*r*this.rc,i.y=this.y0+this.a*o,i}function df(i){var e=i.x,s=i.y;return i.x=U(this.long0+(e-this.x0)/(this.a*this.rc)),i.y=Ue(this.lat0+(s-this.y0)/this.a),i}var _f=["Equirectangular","Equidistant_Cylindrical","Equidistant_Cylindrical_Spherical","eqc"];const pf={init:uf,forward:ff,inverse:df,names:_f};var ja=20;function mf(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=hn(this.es),this.e1=ln(this.es),this.e2=cn(this.es),this.e3=un(this.es),this.ml0=this.a*Xt(this.e0,this.e1,this.e2,this.e3,this.lat0)}function gf(i){var e=i.x,s=i.y,r,o,h,l=U(e-this.long0);if(h=l*Math.sin(s),this.sphere)Math.abs(s)<=B?(r=this.a*l,o=-1*this.a*this.lat0):(r=this.a*Math.sin(h)/Math.tan(s),o=this.a*(Ue(s-this.lat0)+(1-Math.cos(h))/Math.tan(s)));else if(Math.abs(s)<=B)r=this.a*l,o=-1*this.ml0;else{var u=Js(this.a,this.e,Math.sin(s))/Math.tan(s);r=u*Math.sin(h),o=this.a*Xt(this.e0,this.e1,this.e2,this.e3,s)-this.ml0+u*(1-Math.cos(h))}return i.x=r+this.x0,i.y=o+this.y0,i}function vf(i){var e,s,r,o,h,l,u,f,_;if(r=i.x-this.x0,o=i.y-this.y0,this.sphere)if(Math.abs(o+this.a*this.lat0)<=B)e=U(r/this.a+this.long0),s=0;else{l=this.lat0+o/this.a,u=r*r/this.a/this.a+l*l,f=l;var v;for(h=ja;h;--h)if(v=Math.tan(f),_=-1*(l*(f*v+1)-f-.5*(f*f+u)*v)/((f-l)/v-1),f+=_,Math.abs(_)<=B){s=f;break}e=U(this.long0+Math.asin(r*Math.tan(f)/this.a)/Math.sin(s))}else if(Math.abs(o+this.ml0)<=B)s=0,e=U(this.long0+r/this.a);else{l=(this.ml0+o)/this.a,u=r*r/this.a/this.a+l*l,f=l;var m,g,M,E,x;for(h=ja;h;--h)if(x=this.e*Math.sin(f),m=Math.sqrt(1-x*x)*Math.tan(f),g=this.a*Xt(this.e0,this.e1,this.e2,this.e3,f),M=this.e0-2*this.e1*Math.cos(2*f)+4*this.e2*Math.cos(4*f)-6*this.e3*Math.cos(6*f),E=g/this.a,_=(l*(m*E+1)-E-.5*m*(E*E+u))/(this.es*Math.sin(2*f)*(E*E+u-2*l*E)/(4*m)+(l-E)*(m*M-2/Math.sin(2*f))-M),f-=_,Math.abs(_)<=B){s=f;break}m=Math.sqrt(1-this.es*Math.pow(Math.sin(s),2))*Math.tan(s),e=U(this.long0+Math.asin(r*m/this.a)/Math.sin(s))}return i.x=e,i.y=s,i}var yf=["Polyconic","American_Polyconic","poly"];const Mf={init:mf,forward:gf,inverse:vf,names:yf};function wf(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function xf(i){var e,s=i.x,r=i.y,o=r-this.lat0,h=s-this.long0,l=o/tn*1e-5,u=h,f=1,_=0;for(e=1;e<=10;e++)f=f*l,_=_+this.A[e]*f;var v=_,m=u,g=1,M=0,E,x,C=0,D=0;for(e=1;e<=6;e++)E=g*v-M*m,x=M*v+g*m,g=E,M=x,C=C+this.B_re[e]*g-this.B_im[e]*M,D=D+this.B_im[e]*g+this.B_re[e]*M;return i.x=D*this.a+this.x0,i.y=C*this.a+this.y0,i}function bf(i){var e,s=i.x,r=i.y,o=s-this.x0,h=r-this.y0,l=h/this.a,u=o/this.a,f=1,_=0,v,m,g=0,M=0;for(e=1;e<=6;e++)v=f*l-_*u,m=_*l+f*u,f=v,_=m,g=g+this.C_re[e]*f-this.C_im[e]*_,M=M+this.C_im[e]*f+this.C_re[e]*_;for(var E=0;E<this.iterations;E++){var x=g,C=M,D,Z,$=l,lt=u;for(e=2;e<=6;e++)D=x*g-C*M,Z=C*g+x*M,x=D,C=Z,$=$+(e-1)*(this.B_re[e]*x-this.B_im[e]*C),lt=lt+(e-1)*(this.B_im[e]*x+this.B_re[e]*C);x=1,C=0;var gt=this.B_re[1],Mt=this.B_im[1];for(e=2;e<=6;e++)D=x*g-C*M,Z=C*g+x*M,x=D,C=Z,gt=gt+e*(this.B_re[e]*x-this.B_im[e]*C),Mt=Mt+e*(this.B_im[e]*x+this.B_re[e]*C);var zt=gt*gt+Mt*Mt;g=($*gt+lt*Mt)/zt,M=(lt*gt-$*Mt)/zt}var Dt=g,Kt=M,Qt=1,vt=0;for(e=1;e<=9;e++)Qt=Qt*Dt,vt=vt+this.D[e]*Qt;var St=this.lat0+vt*tn*1e5,oe=this.long0+Kt;return i.x=oe,i.y=St,i}var Ef=["New_Zealand_Map_Grid","nzmg"];const Pf={init:wf,forward:xf,inverse:bf,names:Ef};function Sf(){}function Af(i){var e=i.x,s=i.y,r=U(e-this.long0),o=this.x0+this.a*r,h=this.y0+this.a*Math.log(Math.tan(Math.PI/4+s/2.5))*1.25;return i.x=o,i.y=h,i}function Lf(i){i.x-=this.x0,i.y-=this.y0;var e=U(this.long0+i.x/this.a),s=2.5*(Math.atan(Math.exp(.8*i.y/this.a))-Math.PI/4);return i.x=e,i.y=s,i}var Cf=["Miller_Cylindrical","mill"];const Tf={init:Sf,forward:Af,inverse:Lf,names:Cf};var Nf=20;function Gf(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=Hs(this.es)}function If(i){var e,s,r=i.x,o=i.y;if(r=U(r-this.long0),this.sphere){if(!this.m)o=this.n!==1?Math.asin(this.n*Math.sin(o)):o;else for(var h=this.n*Math.sin(o),l=Nf;l;--l){var u=(this.m*o+Math.sin(o)-h)/(this.m+Math.cos(o));if(o-=u,Math.abs(u)<B)break}e=this.a*this.C_x*r*(this.m+Math.cos(o)),s=this.a*this.C_y*o}else{var f=Math.sin(o),_=Math.cos(o);s=this.a*bi(o,f,_,this.en),e=this.a*r*_/Math.sqrt(1-this.es*f*f)}return i.x=e,i.y=s,i}function Of(i){var e,s,r,o;return i.x-=this.x0,r=i.x/this.a,i.y-=this.y0,e=i.y/this.a,this.sphere?(e/=this.C_y,r=r/(this.C_x*(this.m+Math.cos(e))),this.m?e=qe((this.m*e+Math.sin(e))/this.n):this.n!==1&&(e=qe(Math.sin(e)/this.n)),r=U(r+this.long0),e=Ue(e)):(e=Ws(i.y/this.a,this.es,this.en),o=Math.abs(e),o<O?(o=Math.sin(e),s=this.long0+i.x*Math.sqrt(1-this.es*o*o)/(this.a*Math.cos(e)),r=U(s)):o-B<O&&(r=this.long0)),i.x=r,i.y=e,i}var kf=["Sinusoidal","sinu"];const Rf={init:Gf,forward:If,inverse:Of,names:kf};function zf(){}function Df(i){for(var e=i.x,s=i.y,r=U(e-this.long0),o=s,h=Math.PI*Math.sin(s);;){var l=-(o+Math.sin(o)-h)/(1+Math.cos(o));if(o+=l,Math.abs(l)<B)break}o/=2,Math.PI/2-Math.abs(s)<B&&(r=0);var u=.900316316158*this.a*r*Math.cos(o)+this.x0,f=1.4142135623731*this.a*Math.sin(o)+this.y0;return i.x=u,i.y=f,i}function Bf(i){var e,s;i.x-=this.x0,i.y-=this.y0,s=i.y/(1.4142135623731*this.a),Math.abs(s)>.999999999999&&(s=.999999999999),e=Math.asin(s);var r=U(this.long0+i.x/(.900316316158*this.a*Math.cos(e)));r<-Math.PI&&(r=-Math.PI),r>Math.PI&&(r=Math.PI),s=(2*e+Math.sin(2*e))/Math.PI,Math.abs(s)>1&&(s=1);var o=Math.asin(s);return i.x=r,i.y=o,i}var Uf=["Mollweide","moll"];const Zf={init:zf,forward:Df,inverse:Bf,names:Uf};function qf(){Math.abs(this.lat1+this.lat2)<B||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=hn(this.es),this.e1=ln(this.es),this.e2=cn(this.es),this.e3=un(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=xe(this.e,this.sinphi,this.cosphi),this.ml1=Xt(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<B?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=xe(this.e,this.sinphi,this.cosphi),this.ml2=Xt(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=Xt(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function $f(i){var e=i.x,s=i.y,r;if(this.sphere)r=this.a*(this.g-s);else{var o=Xt(this.e0,this.e1,this.e2,this.e3,s);r=this.a*(this.g-o)}var h=this.ns*U(e-this.long0),l=this.x0+r*Math.sin(h),u=this.y0+this.rh-r*Math.cos(h);return i.x=l,i.y=u,i}function Ff(i){i.x-=this.x0,i.y=this.rh-i.y+this.y0;var e,s,r,o;this.ns>=0?(s=Math.sqrt(i.x*i.x+i.y*i.y),e=1):(s=-Math.sqrt(i.x*i.x+i.y*i.y),e=-1);var h=0;if(s!==0&&(h=Math.atan2(e*i.x,e*i.y)),this.sphere)return o=U(this.long0+h/this.ns),r=Ue(this.g-s/this.a),i.x=o,i.y=r,i;var l=this.g-s/this.a;return r=ts(l,this.e0,this.e1,this.e2,this.e3),o=U(this.long0+h/this.ns),i.x=o,i.y=r,i}var Hf=["Equidistant_Conic","eqdc"];const Wf={init:qf,forward:$f,inverse:Ff,names:Hf};function jf(){this.R=this.a}function Kf(i){var e=i.x,s=i.y,r=U(e-this.long0),o,h;Math.abs(s)<=B&&(o=this.x0+this.R*r,h=this.y0);var l=qe(2*Math.abs(s/Math.PI));(Math.abs(r)<=B||Math.abs(Math.abs(s)-O)<=B)&&(o=this.x0,s>=0?h=this.y0+Math.PI*this.R*Math.tan(.5*l):h=this.y0+Math.PI*this.R*-Math.tan(.5*l));var u=.5*Math.abs(Math.PI/r-r/Math.PI),f=u*u,_=Math.sin(l),v=Math.cos(l),m=v/(_+v-1),g=m*m,M=m*(2/_-1),E=M*M,x=Math.PI*this.R*(u*(m-E)+Math.sqrt(f*(m-E)*(m-E)-(E+f)*(g-E)))/(E+f);r<0&&(x=-x),o=this.x0+x;var C=f+m;return x=Math.PI*this.R*(M*C-u*Math.sqrt((E+f)*(f+1)-C*C))/(E+f),s>=0?h=this.y0+x:h=this.y0-x,i.x=o,i.y=h,i}function Vf(i){var e,s,r,o,h,l,u,f,_,v,m,g,M;return i.x-=this.x0,i.y-=this.y0,m=Math.PI*this.R,r=i.x/m,o=i.y/m,h=r*r+o*o,l=-Math.abs(o)*(1+h),u=l-2*o*o+r*r,f=-2*l+1+2*o*o+h*h,M=o*o/f+(2*u*u*u/f/f/f-9*l*u/f/f)/27,_=(l-u*u/3/f)/f,v=2*Math.sqrt(-_/3),m=3*M/_/v,Math.abs(m)>1&&(m>=0?m=1:m=-1),g=Math.acos(m)/3,i.y>=0?s=(-v*Math.cos(g+Math.PI/3)-u/3/f)*Math.PI:s=-(-v*Math.cos(g+Math.PI/3)-u/3/f)*Math.PI,Math.abs(r)<B?e=this.long0:e=U(this.long0+Math.PI*(h-1+Math.sqrt(1+2*(r*r-o*o)+h*h))/2/r),i.x=e,i.y=s,i}var Jf=["Van_der_Grinten_I","VanDerGrinten","Van_der_Grinten","vandg"];const Xf={init:jf,forward:Kf,inverse:Vf,names:Jf};var Ka={exports:{}};(function(i){(function(e){var s={};s.Constants={},s.Math={},s.Accumulator={},function(r){r.WGS84={a:6378137,f:.0033528106647474805},r.version={major:2,minor:1,patch:1},r.version_string="2.1.1"}(s.Constants),function(r){r.digits=53,r.epsilon=Math.pow(.5,r.digits-1),r.degree=Math.PI/180,r.sq=function(o){return o*o},r.hypot=function(o,h){return Math.sqrt(o*o+h*h)},r.cbrt=Math.cbrt||function(o){var h=Math.pow(Math.abs(o),.3333333333333333);return o>0?h:o<0?-h:o},r.log1p=Math.log1p||function(o){var h=1+o,l=h-1;return l===0?o:o*Math.log(h)/l},r.atanh=Math.atanh||function(o){var h=Math.abs(o);return h=r.log1p(2*h/(1-h))/2,o>0?h:o<0?-h:o},r.copysign=function(o,h){return Math.abs(o)*(h<0||h===0&&1/h<0?-1:1)},r.sum=function(o,h){var l=o+h,u=l-h,f=l-u,_;return u-=o,f-=h,_=l&&0-(u+f),{s:l,t:_}},r.polyval=function(o,h,l,u){for(var f=o<0?0:h[l++];--o>=0;)f=f*u+h[l++];return f},r.AngRound=function(o){var h=.0625,l=Math.abs(o);return l=l<h?h-(h-l):l,r.copysign(l,o)},r.remainder=function(o,h){return o%=h,o<-h/2?o+h:o<h/2?o:o-h},r.AngNormalize=function(o){var h=r.remainder(o,360);return Math.abs(h)===180?r.copysign(180,o):h},r.LatFix=function(o){return Math.abs(o)>90?NaN:o},r.AngDiff=function(o,h){var l=r.sum(r.remainder(-o,360),r.remainder(h,360)),u,f;return l=r.sum(r.remainder(l.s,360),l.t),u=l.s,f=l.t,(u===0||Math.abs(u)===180)&&(u=r.copysign(u,f===0?h-o:-f)),{d:u,e:f}},r.sincosd=function(o){var h,l,u,f,_,v,m;switch(h=o%360,u=Math.round(h/90),h-=90*u,l=h*this.degree,f=Math.sin(l),_=Math.cos(l),Math.abs(h)===45?(_=Math.sqrt(.5),f=r.copysign(_,l)):Math.abs(h)===30&&(_=Math.sqrt(.75),f=r.copysign(.5,l)),u&3){case 0:v=f,m=_;break;case 1:v=_,m=-f;break;case 2:v=-f,m=-_;break;default:v=-_,m=f;break}return m+=0,v===0&&(v=r.copysign(v,o)),{s:v,c:m}},r.sincosde=function(o,h){var l,u,f,_,v,m,g;switch(l=o%360,f=Math.round(l/90),l=r.AngRound(l-90*f+h),u=l*this.degree,_=Math.sin(u),v=Math.cos(u),Math.abs(l)===45?(v=Math.sqrt(.5),_=r.copysign(v,u)):Math.abs(l)===30&&(v=Math.sqrt(.75),_=r.copysign(.5,u)),f&3){case 0:m=_,g=v;break;case 1:m=v,g=-_;break;case 2:m=-_,g=-v;break;default:m=-v,g=_;break}return g+=0,m===0&&(m=r.copysign(m,o+h)),{s:m,c:g}},r.atan2d=function(o,h){var l=0,u;switch(Math.abs(o)>Math.abs(h)&&([o,h]=[h,o],l=2),r.copysign(1,h)<0&&(h=-h,++l),u=Math.atan2(o,h)/this.degree,l){case 1:u=r.copysign(180,o)-u;break;case 2:u=90-u;break;case 3:u=-90+u;break}return u}}(s.Math),function(r,o){r.Accumulator=function(h){this.Set(h)},r.Accumulator.prototype.Set=function(h){h||(h=0),h.constructor===r.Accumulator?(this._s=h._s,this._t=h._t):(this._s=h,this._t=0)},r.Accumulator.prototype.Add=function(h){var l=o.sum(h,this._t),u=o.sum(l.s,this._s);l=l.t,this._s=u.s,this._t=u.t,this._s===0?this._s=l:this._t+=l},r.Accumulator.prototype.Sum=function(h){var l;return h?(l=new r.Accumulator(this),l.Add(h),l._s):this._s},r.Accumulator.prototype.Negate=function(){this._s*=-1,this._t*=-1},r.Accumulator.prototype.Remainder=function(h){this._s=o.remainder(this._s,h),this.Add(0)}}(s.Accumulator,s.Math),s.Geodesic={},s.GeodesicLine={},s.PolygonArea={},function(r,o,h,l,u){var f=6,_=f,v=f,m=f,g=m,M,E,x=20,C=x+l.digits+10,D=l.epsilon,Z=200*D,$=Math.sqrt(D),lt=D,gt=1e3*$,Mt=0,zt=31,Dt=32640,Kt,Qt,vt,St,oe,Ut,Ee,It,he;r.tiny_=Math.sqrt(Number.MIN_VALUE/Number.EPSILON),r.nC1_=f,r.nC1p_=f,r.nC2_=f,r.nC3_=f,r.nC4_=f,M=r.nC3_*(r.nC3_-1)/2,E=r.nC4_*(r.nC4_+1)/2,r.CAP_C1=1,r.CAP_C1p=2,r.CAP_C2=4,r.CAP_C3=8,r.CAP_C4=16,r.NONE=0,r.ARC=64,r.LATITUDE=128|Mt,r.LONGITUDE=256|r.CAP_C3,r.AZIMUTH=512|Mt,r.DISTANCE=1024|r.CAP_C1,r.STANDARD=r.LATITUDE|r.LONGITUDE|r.AZIMUTH|r.DISTANCE,r.DISTANCE_IN=2048|r.CAP_C1|r.CAP_C1p,r.REDUCEDLENGTH=4096|r.CAP_C1|r.CAP_C2,r.GEODESICSCALE=8192|r.CAP_C1|r.CAP_C2,r.AREA=16384|r.CAP_C4,r.ALL=Dt|zt,r.LONG_UNROLL=32768,r.OUT_MASK=Dt|r.LONG_UNROLL,r.SinCosSeries=function(P,k,T,G){var A=G.length,N=A-(P?1:0),R=2*(T-k)*(T+k),F=N&1?G[--A]:0,H=0;for(N=Math.floor(N/2);N--;)H=R*F-H+G[--A],F=R*H-F+G[--A];return P?2*k*T*F:T*(F-H)},Kt=function(P,k){var T,G=l.sq(P),A=l.sq(k),N=(G+A-1)/6,R,F,H,K,it,j,tt,rt,z,X,ht;return A===0&&N<=0?T=0:(R=G*A/4,F=l.sq(N),H=N*F,K=R*(R+2*H),it=N,K>=0?(j=R+H,j+=j<0?-Math.sqrt(K):Math.sqrt(K),tt=l.cbrt(j),it+=tt+(tt!==0?F/tt:0)):(rt=Math.atan2(Math.sqrt(-K),-(R+H)),it+=2*N*Math.cos(rt/3)),z=Math.sqrt(l.sq(it)+A),X=it<0?A/(z-it):it+z,ht=(X-A)/(2*z),T=X/(Math.sqrt(X+l.sq(ht))+ht)),T},Qt=[1,4,64,0,256],r.A1m1f=function(P){var k=Math.floor(_/2),T=l.polyval(k,Qt,0,l.sq(P))/Qt[k+1];return(T+P)/(1-P)},vt=[-1,6,-16,32,-9,64,-128,2048,9,-16,768,3,-5,512,-7,1280,-7,2048],r.C1f=function(P,k){var T=l.sq(P),G=P,A=0,N,R;for(N=1;N<=r.nC1_;++N)R=Math.floor((r.nC1_-N)/2),k[N]=G*l.polyval(R,vt,A,T)/vt[A+R+1],A+=R+2,G*=P},St=[205,-432,768,1536,4005,-4736,3840,12288,-225,116,384,-7173,2695,7680,3467,7680,38081,61440],r.C1pf=function(P,k){var T=l.sq(P),G=P,A=0,N,R;for(N=1;N<=r.nC1p_;++N)R=Math.floor((r.nC1p_-N)/2),k[N]=G*l.polyval(R,St,A,T)/St[A+R+1],A+=R+2,G*=P},oe=[-11,-28,-192,0,256],r.A2m1f=function(P){var k=Math.floor(v/2),T=l.polyval(k,oe,0,l.sq(P))/oe[k+1];return(T-P)/(1+P)},Ut=[1,2,16,32,35,64,384,2048,15,80,768,7,35,512,63,1280,77,2048],r.C2f=function(P,k){var T=l.sq(P),G=P,A=0,N,R;for(N=1;N<=r.nC2_;++N)R=Math.floor((r.nC2_-N)/2),k[N]=G*l.polyval(R,Ut,A,T)/Ut[A+R+1],A+=R+2,G*=P},r.Geodesic=function(P,k){if(this.a=P,this.f=k,this._f1=1-this.f,this._e2=this.f*(2-this.f),this._ep2=this._e2/l.sq(this._f1),this._n=this.f/(2-this.f),this._b=this.a*this._f1,this._c2=(l.sq(this.a)+l.sq(this._b)*(this._e2===0?1:(this._e2>0?l.atanh(Math.sqrt(this._e2)):Math.atan(Math.sqrt(-this._e2)))/Math.sqrt(Math.abs(this._e2))))/2,this._etol2=.1*$/Math.sqrt(Math.max(.001,Math.abs(this.f))*Math.min(1,1-this.f/2)/2),!(isFinite(this.a)&&this.a>0))throw new Error("Equatorial radius is not positive");if(!(isFinite(this._b)&&this._b>0))throw new Error("Polar semi-axis is not positive");this._A3x=new Array(g),this._C3x=new Array(M),this._C4x=new Array(E),this.A3coeff(),this.C3coeff(),this.C4coeff()},Ee=[-3,128,-2,-3,64,-1,-3,-1,16,3,-1,-2,8,1,-1,2,1,1],r.Geodesic.prototype.A3coeff=function(){var P=0,k=0,T,G;for(T=m-1;T>=0;--T)G=Math.min(m-T-1,T),this._A3x[k++]=l.polyval(G,Ee,P,this._n)/Ee[P+G+1],P+=G+2},It=[3,128,2,5,128,-1,3,3,64,-1,0,1,8,-1,1,4,5,256,1,3,128,-3,-2,3,64,1,-3,2,32,7,512,-10,9,384,5,-9,5,192,7,512,-14,7,512,21,2560],r.Geodesic.prototype.C3coeff=function(){var P=0,k=0,T,G,A;for(T=1;T<r.nC3_;++T)for(G=r.nC3_-1;G>=T;--G)A=Math.min(r.nC3_-G-1,G),this._C3x[k++]=l.polyval(A,It,P,this._n)/It[P+A+1],P+=A+2},he=[97,15015,1088,156,45045,-224,-4784,1573,45045,-10656,14144,-4576,-858,45045,64,624,-4576,6864,-3003,15015,100,208,572,3432,-12012,30030,45045,1,9009,-2944,468,135135,5792,1040,-1287,135135,5952,-11648,9152,-2574,135135,-64,-624,4576,-6864,3003,135135,8,10725,1856,-936,225225,-8448,4992,-1144,225225,-1440,4160,-4576,1716,225225,-136,63063,1024,-208,105105,3584,-3328,1144,315315,-128,135135,-2560,832,405405,128,99099],r.Geodesic.prototype.C4coeff=function(){var P=0,k=0,T,G,A;for(T=0;T<r.nC4_;++T)for(G=r.nC4_-1;G>=T;--G)A=r.nC4_-G-1,this._C4x[k++]=l.polyval(A,he,P,this._n)/he[P+A+1],P+=A+2},r.Geodesic.prototype.A3f=function(P){return l.polyval(g-1,this._A3x,0,P)},r.Geodesic.prototype.C3f=function(P,k){var T=1,G=0,A,N;for(A=1;A<r.nC3_;++A)N=r.nC3_-A-1,T*=P,k[A]=T*l.polyval(N,this._C3x,G,P),G+=N+1},r.Geodesic.prototype.C4f=function(P,k){var T=1,G=0,A,N;for(A=0;A<r.nC4_;++A)N=r.nC4_-A-1,k[A]=T*l.polyval(N,this._C4x,G,P),G+=N+1,T*=P},r.Geodesic.prototype.Lengths=function(P,k,T,G,A,N,R,F,H,K,it,j,tt){it&=r.OUT_MASK;var rt={},z=0,X=0,ht=0,dt=0,yt,_t,pt,Lt,Nt;if(it&(r.DISTANCE|r.REDUCEDLENGTH|r.GEODESICSCALE)&&(ht=r.A1m1f(P),r.C1f(P,j),it&(r.REDUCEDLENGTH|r.GEODESICSCALE)&&(dt=r.A2m1f(P),r.C2f(P,tt),z=ht-dt,dt=1+dt),ht=1+ht),it&r.DISTANCE)yt=r.SinCosSeries(!0,N,R,j)-r.SinCosSeries(!0,T,G,j),rt.s12b=ht*(k+yt),it&(r.REDUCEDLENGTH|r.GEODESICSCALE)&&(_t=r.SinCosSeries(!0,N,R,tt)-r.SinCosSeries(!0,T,G,tt),X=z*k+(ht*yt-dt*_t));else if(it&(r.REDUCEDLENGTH|r.GEODESICSCALE)){for(pt=1;pt<=r.nC2_;++pt)tt[pt]=ht*j[pt]-dt*tt[pt];X=z*k+(r.SinCosSeries(!0,N,R,tt)-r.SinCosSeries(!0,T,G,tt))}return it&r.REDUCEDLENGTH&&(rt.m0=z,rt.m12b=F*(G*N)-A*(T*R)-G*R*X),it&r.GEODESICSCALE&&(Lt=G*R+T*N,Nt=this._ep2*(H-K)*(H+K)/(A+F),rt.M12=Lt+(Nt*N-R*X)*T/A,rt.M21=Lt-(Nt*T-G*X)*N/F),rt},r.Geodesic.prototype.InverseStart=function(P,k,T,G,A,N,R,F,H,K,it){var j={},tt=G*k-A*P,rt=A*k+G*P,z,X,ht,dt,yt,_t,pt,Lt,Nt,nt,Q,et,xt,Ot,le,ve,$e,ce,at,$t,Zt,Ft,Ht;return j.sig12=-1,z=G*k,z+=A*P,X=rt>=0&&tt<.5&&A*R<.5,X?(dt=l.sq(P+G),dt/=dt+l.sq(k+A),j.dnm=Math.sqrt(1+this._ep2*dt),ht=R/(this._f1*j.dnm),yt=Math.sin(ht),_t=Math.cos(ht)):(yt=F,_t=H),j.salp1=A*yt,j.calp1=_t>=0?tt+A*P*l.sq(yt)/(1+_t):z-A*P*l.sq(yt)/(1-_t),Lt=l.hypot(j.salp1,j.calp1),Nt=P*G+k*A*_t,X&&Lt<this._etol2?(j.salp2=k*yt,j.calp2=tt-k*G*(_t>=0?l.sq(yt)/(1+_t):1-_t),pt=l.hypot(j.salp2,j.calp2),j.salp2/=pt,j.calp2/=pt,j.sig12=Math.atan2(Lt,Nt)):Math.abs(this._n)>.1||Nt>=0||Lt>=6*Math.abs(this._n)*Math.PI*l.sq(k)||(Ht=Math.atan2(-F,-H),this.f>=0?(Ot=l.sq(P)*this._ep2,le=Ot/(2*(1+Math.sqrt(1+Ot))+Ot),et=this.f*k*this.A3f(le)*Math.PI,xt=et*k,nt=Ht/et,Q=z/xt):(ve=A*k-G*P,$e=Math.atan2(z,ve),$t=this.Lengths(this._n,Math.PI+$e,P,-k,T,G,A,N,k,A,r.REDUCEDLENGTH,K,it),ce=$t.m12b,at=$t.m0,nt=-1+ce/(k*A*at*Math.PI),xt=nt<-.01?z/nt:-this.f*l.sq(k)*Math.PI,et=xt/k,Q=R/et),Q>-Z&&nt>-1-gt?this.f>=0?(j.salp1=Math.min(1,-nt),j.calp1=-Math.sqrt(1-l.sq(j.salp1))):(j.calp1=Math.max(nt>-Z?0:-1,nt),j.salp1=Math.sqrt(1-l.sq(j.calp1))):(Zt=Kt(nt,Q),Ft=et*(this.f>=0?-nt*Zt/(1+Zt):-Q*(1+Zt)/Zt),yt=Math.sin(Ft),_t=-Math.cos(Ft),j.salp1=A*yt,j.calp1=z-A*P*l.sq(yt)/(1-_t))),j.salp1<=0?(j.salp1=1,j.calp1=0):(pt=l.hypot(j.salp1,j.calp1),j.salp1/=pt,j.calp1/=pt),j},r.Geodesic.prototype.Lambda12=function(P,k,T,G,A,N,R,F,H,K,it,j,tt,rt){var z={},X,ht,dt,yt,_t,pt,Lt,Nt,nt,Q,et,xt,Ot;return P===0&&F===0&&(F=-r.tiny_),ht=R*k,dt=l.hypot(F,R*P),z.ssig1=P,yt=ht*P,z.csig1=_t=F*k,X=l.hypot(z.ssig1,z.csig1),z.ssig1/=X,z.csig1/=X,z.salp2=A!==k?ht/A:R,z.calp2=A!==k||Math.abs(G)!==-P?Math.sqrt(l.sq(F*k)+(k<-P?(A-k)*(k+A):(P-G)*(P+G)))/A:Math.abs(F),z.ssig2=G,pt=ht*G,z.csig2=Lt=z.calp2*A,X=l.hypot(z.ssig2,z.csig2),z.ssig2/=X,z.csig2/=X,z.sig12=Math.atan2(Math.max(0,z.csig1*z.ssig2-z.ssig1*z.csig2),z.csig1*z.csig2+z.ssig1*z.ssig2),Nt=Math.max(0,_t*pt-yt*Lt),nt=_t*Lt+yt*pt,et=Math.atan2(Nt*K-nt*H,nt*K+Nt*H),xt=l.sq(dt)*this._ep2,z.eps=xt/(2*(1+Math.sqrt(1+xt))+xt),this.C3f(z.eps,rt),Q=r.SinCosSeries(!0,z.ssig2,z.csig2,rt)-r.SinCosSeries(!0,z.ssig1,z.csig1,rt),z.domg12=-this.f*this.A3f(z.eps)*ht*(z.sig12+Q),z.lam12=et+z.domg12,it&&(z.calp2===0?z.dlam12=-2*this._f1*T/P:(Ot=this.Lengths(z.eps,z.sig12,z.ssig1,z.csig1,T,z.ssig2,z.csig2,N,k,A,r.REDUCEDLENGTH,j,tt),z.dlam12=Ot.m12b,z.dlam12*=this._f1/(z.calp2*A))),z},r.Geodesic.prototype.Inverse=function(P,k,T,G,A){var N,R;return A||(A=r.STANDARD),A===r.LONG_UNROLL&&(A|=r.STANDARD),A&=r.OUT_MASK,N=this.InverseInt(P,k,T,G,A),R=N.vals,A&r.AZIMUTH&&(R.azi1=l.atan2d(N.salp1,N.calp1),R.azi2=l.atan2d(N.salp2,N.calp2)),R},r.Geodesic.prototype.InverseInt=function(P,k,T,G,A){var N={},R,F,H,K,it,j,tt,rt,z,X,ht,dt,yt,_t,pt,Lt,Nt,nt,Q,et,xt,Ot,le,ve,$e,ce,at,$t,Zt,Ft,Ht,si,Li,ue,Te,ri,Fe,He,We,Ci,yn,je,Mn,Ti,wn,ai,xn,ss,bn,Ni,se,W,En,oi,Pn,Sn,Ne,hi,fe,Gi,An,Ii,Oi,Ln,ki;if(N.lat1=P=l.LatFix(P),N.lat2=T=l.LatFix(T),P=l.AngRound(P),T=l.AngRound(T),R=l.AngDiff(k,G),F=R.e,R=R.d,A&r.LONG_UNROLL?(N.lon1=k,N.lon2=k+R+F):(N.lon1=l.AngNormalize(k),N.lon2=l.AngNormalize(G)),H=l.copysign(1,R),R*=H,F*=H,pt=R*l.degree,K=l.sincosde(R,F),Lt=K.s,Nt=K.c,F=180-R-F,it=Math.abs(P)<Math.abs(T)||isNaN(T)?-1:1,it<0&&(H*=-1,[T,P]=[P,T]),j=l.copysign(1,-P),P*=j,T*=j,K=l.sincosd(P),tt=this._f1*K.s,rt=K.c,K=l.hypot(tt,rt),tt/=K,rt/=K,rt=Math.max(r.tiny_,rt),K=l.sincosd(T),z=this._f1*K.s,X=K.c,K=l.hypot(z,X),z/=K,X/=K,X=Math.max(r.tiny_,X),rt<-tt?X===rt&&(z=l.copysign(tt,z)):Math.abs(z)===-tt&&(X=rt),yt=Math.sqrt(1+this._ep2*l.sq(tt)),_t=Math.sqrt(1+this._ep2*l.sq(z)),le=new Array(r.nC1_+1),ve=new Array(r.nC2_+1),$e=new Array(r.nC3_),ce=P===-90||Lt===0,ce&&(Q=Nt,et=Lt,xt=1,Ot=0,$t=tt,Zt=Q*rt,Ft=z,Ht=xt*X,nt=Math.atan2(Math.max(0,Zt*Ft-$t*Ht),Zt*Ht+$t*Ft),at=this.Lengths(this._n,nt,$t,Zt,yt,Ft,Ht,_t,rt,X,A|r.DISTANCE|r.REDUCEDLENGTH,le,ve),ht=at.s12b,dt=at.m12b,A&r.GEODESICSCALE&&(N.M12=at.M12,N.M21=at.M21),nt<1||dt>=0?((nt<3*r.tiny_||nt<D&&(ht<0||dt<0))&&(nt=dt=ht=0),dt*=this._b,ht*=this._b,N.a12=nt/l.degree):ce=!1),Ne=2,!ce&&tt===0&&(this.f<=0||F>=this.f*180))Q=xt=0,et=Ot=1,ht=this.a*pt,nt=Li=pt/this._f1,dt=this._b*Math.sin(nt),A&r.GEODESICSCALE&&(N.M12=N.M21=Math.cos(nt)),N.a12=R/this._f1;else if(!ce)if(at=this.InverseStart(tt,rt,yt,z,X,_t,pt,Lt,Nt,le,ve),nt=at.sig12,et=at.salp1,Q=at.calp1,nt>=0)Ot=at.salp2,xt=at.calp2,ue=at.dnm,ht=nt*this._b*ue,dt=l.sq(ue)*this._b*Math.sin(nt/ue),A&r.GEODESICSCALE&&(N.M12=N.M21=Math.cos(nt/ue)),N.a12=nt/l.degree,Li=pt/(this._f1*ue);else{for(Te=0,ri=r.tiny_,Fe=1,He=r.tiny_,We=-1,Ci=!1,yn=!1;at=this.Lambda12(tt,rt,yt,z,X,_t,et,Q,Lt,Nt,Te<x,le,ve,$e),je=at.lam12,Ot=at.salp2,xt=at.calp2,nt=at.sig12,$t=at.ssig1,Zt=at.csig1,Ft=at.ssig2,Ht=at.csig2,si=at.eps,fe=at.domg12,Mn=at.dlam12,!(yn||!(Math.abs(je)>=(Ci?8:1)*D)||Te==C);++Te){if(je>0&&(Te<x||Q/et>We/He)?(He=et,We=Q):je<0&&(Te<x||Q/et<Fe/ri)&&(ri=et,Fe=Q),Te<x&&Mn>0&&(Ti=-je/Mn,Math.abs(Ti)<Math.PI&&(wn=Math.sin(Ti),ai=Math.cos(Ti),xn=et*ai+Q*wn,xn>0))){Q=Q*ai-et*wn,et=xn,K=l.hypot(et,Q),et/=K,Q/=K,Ci=Math.abs(je)<=16*D;continue}et=(ri+He)/2,Q=(Fe+We)/2,K=l.hypot(et,Q),et/=K,Q/=K,Ci=!1,yn=Math.abs(ri-et)+(Fe-Q)<lt||Math.abs(et-He)+(Q-We)<lt}ss=A|(A&(r.REDUCEDLENGTH|r.GEODESICSCALE)?r.DISTANCE:r.NONE),at=this.Lengths(si,nt,$t,Zt,yt,Ft,Ht,_t,rt,X,ss,le,ve),ht=at.s12b,dt=at.m12b,A&r.GEODESICSCALE&&(N.M12=at.M12,N.M21=at.M21),dt*=this._b,ht*=this._b,N.a12=nt/l.degree,A&r.AREA&&(Ln=Math.sin(fe),ki=Math.cos(fe),Ne=Lt*ki-Nt*Ln,hi=Nt*ki+Lt*Ln)}return A&r.DISTANCE&&(N.s12=0+ht),A&r.REDUCEDLENGTH&&(N.m12=0+dt),A&r.AREA&&(bn=et*rt,Ni=l.hypot(Q,et*tt),Ni!==0&&bn!==0?($t=tt,Zt=Q*rt,Ft=z,Ht=xt*X,W=l.sq(Ni)*this._ep2,si=W/(2*(1+Math.sqrt(1+W))+W),En=l.sq(this.a)*Ni*bn*this._e2,K=l.hypot($t,Zt),$t/=K,Zt/=K,K=l.hypot(Ft,Ht),Ft/=K,Ht/=K,oi=new Array(r.nC4_),this.C4f(si,oi),Pn=r.SinCosSeries(!1,$t,Zt,oi),Sn=r.SinCosSeries(!1,Ft,Ht,oi),N.S12=En*(Sn-Pn)):N.S12=0,!ce&&Ne==2&&(Ne=Math.sin(Li),hi=Math.cos(Li)),!ce&&hi>-.7071&&z-tt<1.75?(fe=1+hi,Gi=1+rt,An=1+X,se=2*Math.atan2(Ne*(tt*An+z*Gi),fe*(tt*z+Gi*An))):(Ii=Ot*Q-xt*et,Oi=xt*Q+Ot*et,Ii===0&&Oi<0&&(Ii=r.tiny_*Q,Oi=-1),se=Math.atan2(Ii,Oi)),N.S12+=this._c2*se,N.S12*=it*H*j,N.S12+=0),it<0&&([Ot,et]=[et,Ot],[xt,Q]=[Q,xt],A&r.GEODESICSCALE&&([N.M21,N.M12]=[N.M12,N.M21])),et*=it*H,Q*=it*j,Ot*=it*H,xt*=it*j,{vals:N,salp1:et,calp1:Q,salp2:Ot,calp2:xt}},r.Geodesic.prototype.GenDirect=function(P,k,T,G,A,N){var R;return N?N===r.LONG_UNROLL&&(N|=r.STANDARD):N=r.STANDARD,G||(N|=r.DISTANCE_IN),R=new o.GeodesicLine(this,P,k,T,N),R.GenPosition(G,A,N)},r.Geodesic.prototype.Direct=function(P,k,T,G,A){return this.GenDirect(P,k,T,!1,G,A)},r.Geodesic.prototype.ArcDirect=function(P,k,T,G,A){return this.GenDirect(P,k,T,!0,G,A)},r.Geodesic.prototype.Line=function(P,k,T,G){return new o.GeodesicLine(this,P,k,T,G)},r.Geodesic.prototype.DirectLine=function(P,k,T,G,A){return this.GenDirectLine(P,k,T,!1,G,A)},r.Geodesic.prototype.ArcDirectLine=function(P,k,T,G,A){return this.GenDirectLine(P,k,T,!0,G,A)},r.Geodesic.prototype.GenDirectLine=function(P,k,T,G,A,N){var R;return N||(N=r.STANDARD|r.DISTANCE_IN),G||(N|=r.DISTANCE_IN),R=new o.GeodesicLine(this,P,k,T,N),R.GenSetDistance(G,A),R},r.Geodesic.prototype.InverseLine=function(P,k,T,G,A){var N,R,F;return A||(A=r.STANDARD|r.DISTANCE_IN),N=this.InverseInt(P,k,T,G,r.ARC),F=l.atan2d(N.salp1,N.calp1),A&(r.OUT_MASK&r.DISTANCE_IN)&&(A|=r.DISTANCE),R=new o.GeodesicLine(this,P,k,F,A,N.salp1,N.calp1),R.SetArc(N.vals.a12),R},r.Geodesic.prototype.Polygon=function(P){return new h.PolygonArea(this,P)},r.WGS84=new r.Geodesic(u.WGS84.a,u.WGS84.f)}(s.Geodesic,s.GeodesicLine,s.PolygonArea,s.Math,s.Constants),function(r,o,h){o.GeodesicLine=function(l,u,f,_,v,m,g){var M,E,x,C,D,Z;v||(v=r.STANDARD|r.DISTANCE_IN),this.a=l.a,this.f=l.f,this._b=l._b,this._c2=l._c2,this._f1=l._f1,this.caps=v|r.LATITUDE|r.AZIMUTH|r.LONG_UNROLL,this.lat1=h.LatFix(u),this.lon1=f,typeof m>"u"||typeof g>"u"?(this.azi1=h.AngNormalize(_),M=h.sincosd(h.AngRound(this.azi1)),this.salp1=M.s,this.calp1=M.c):(this.azi1=_,this.salp1=m,this.calp1=g),M=h.sincosd(h.AngRound(this.lat1)),x=this._f1*M.s,E=M.c,M=h.hypot(x,E),x/=M,E/=M,E=Math.max(r.tiny_,E),this._dn1=Math.sqrt(1+l._ep2*h.sq(x)),this._salp0=this.salp1*E,this._calp0=h.hypot(this.calp1,this.salp1*x),this._ssig1=x,this._somg1=this._salp0*x,this._csig1=this._comg1=x!==0||this.calp1!==0?E*this.calp1:1,M=h.hypot(this._ssig1,this._csig1),this._ssig1/=M,this._csig1/=M,this._k2=h.sq(this._calp0)*l._ep2,C=this._k2/(2*(1+Math.sqrt(1+this._k2))+this._k2),this.caps&r.CAP_C1&&(this._A1m1=r.A1m1f(C),this._C1a=new Array(r.nC1_+1),r.C1f(C,this._C1a),this._B11=r.SinCosSeries(!0,this._ssig1,this._csig1,this._C1a),D=Math.sin(this._B11),Z=Math.cos(this._B11),this._stau1=this._ssig1*Z+this._csig1*D,this._ctau1=this._csig1*Z-this._ssig1*D),this.caps&r.CAP_C1p&&(this._C1pa=new Array(r.nC1p_+1),r.C1pf(C,this._C1pa)),this.caps&r.CAP_C2&&(this._A2m1=r.A2m1f(C),this._C2a=new Array(r.nC2_+1),r.C2f(C,this._C2a),this._B21=r.SinCosSeries(!0,this._ssig1,this._csig1,this._C2a)),this.caps&r.CAP_C3&&(this._C3a=new Array(r.nC3_),l.C3f(C,this._C3a),this._A3c=-this.f*this._salp0*l.A3f(C),this._B31=r.SinCosSeries(!0,this._ssig1,this._csig1,this._C3a)),this.caps&r.CAP_C4&&(this._C4a=new Array(r.nC4_),l.C4f(C,this._C4a),this._A4=h.sq(this.a)*this._calp0*this._salp0*l._e2,this._B41=r.SinCosSeries(!1,this._ssig1,this._csig1,this._C4a)),this.a13=this.s13=NaN},o.GeodesicLine.prototype.GenPosition=function(l,u,f){var _={},v,m,g,M,E,x,C,D,Z,$,lt,gt,Mt,zt,Dt,Kt,Qt,vt,St,oe,Ut,Ee,It,he,P,k,T,G,A;return f?f===r.LONG_UNROLL&&(f|=r.STANDARD):f=r.STANDARD,f&=this.caps&r.OUT_MASK,_.lat1=this.lat1,_.azi1=this.azi1,_.lon1=f&r.LONG_UNROLL?this.lon1:h.AngNormalize(this.lon1),l?_.a12=u:_.s12=u,l||this.caps&r.DISTANCE_IN&r.OUT_MASK?(M=0,E=0,l?(v=u*h.degree,k=h.sincosd(u),m=k.s,g=k.c):(D=u/(this._b*(1+this._A1m1)),Z=Math.sin(D),$=Math.cos(D),M=-r.SinCosSeries(!0,this._stau1*$+this._ctau1*Z,this._ctau1*$-this._stau1*Z,this._C1pa),v=D-(M-this._B11),m=Math.sin(v),g=Math.cos(v),Math.abs(this.f)>.01&&(x=this._ssig1*g+this._csig1*m,C=this._csig1*g-this._ssig1*m,M=r.SinCosSeries(!0,x,C,this._C1a),lt=(1+this._A1m1)*(v+(M-this._B11))-u/this._b,v=v-lt/Math.sqrt(1+this._k2*h.sq(x)),m=Math.sin(v),g=Math.cos(v))),x=this._ssig1*g+this._csig1*m,C=this._csig1*g-this._ssig1*m,Ee=Math.sqrt(1+this._k2*h.sq(x)),f&(r.DISTANCE|r.REDUCEDLENGTH|r.GEODESICSCALE)&&((l||Math.abs(this.f)>.01)&&(M=r.SinCosSeries(!0,x,C,this._C1a)),E=(1+this._A1m1)*(M-this._B11)),Kt=this._calp0*x,Qt=h.hypot(this._salp0,this._calp0*C),Qt===0&&(Qt=C=r.tiny_),oe=this._salp0,Ut=this._calp0*C,l&&f&r.DISTANCE&&(_.s12=this._b*((1+this._A1m1)*v+E)),f&r.LONGITUDE&&(vt=this._salp0*x,St=C,Dt=h.copysign(1,this._salp0),gt=f&r.LONG_UNROLL?Dt*(v-(Math.atan2(x,C)-Math.atan2(this._ssig1,this._csig1))+(Math.atan2(Dt*vt,St)-Math.atan2(Dt*this._somg1,this._comg1))):Math.atan2(vt*this._comg1-St*this._somg1,St*this._comg1+vt*this._somg1),Mt=gt+this._A3c*(v+(r.SinCosSeries(!0,x,C,this._C3a)-this._B31)),zt=Mt/h.degree,_.lon2=f&r.LONG_UNROLL?this.lon1+zt:h.AngNormalize(h.AngNormalize(this.lon1)+h.AngNormalize(zt))),f&r.LATITUDE&&(_.lat2=h.atan2d(Kt,this._f1*Qt)),f&r.AZIMUTH&&(_.azi2=h.atan2d(oe,Ut)),f&(r.REDUCEDLENGTH|r.GEODESICSCALE)&&(It=r.SinCosSeries(!0,x,C,this._C2a),he=(1+this._A2m1)*(It-this._B21),P=(this._A1m1-this._A2m1)*v+(E-he),f&r.REDUCEDLENGTH&&(_.m12=this._b*(Ee*(this._csig1*x)-this._dn1*(this._ssig1*C)-this._csig1*C*P)),f&r.GEODESICSCALE&&(k=this._k2*(x-this._ssig1)*(x+this._ssig1)/(this._dn1+Ee),_.M12=g+(k*x-C*P)*this._ssig1/this._dn1,_.M21=g-(k*this._ssig1-this._csig1*P)*x/Ee)),f&r.AREA&&(T=r.SinCosSeries(!1,x,C,this._C4a),this._calp0===0||this._salp0===0?(G=oe*this.calp1-Ut*this.salp1,A=Ut*this.calp1+oe*this.salp1):(G=this._calp0*this._salp0*(g<=0?this._csig1*(1-g)+m*this._ssig1:m*(this._csig1*m/(1+g)+this._ssig1)),A=h.sq(this._salp0)+h.sq(this._calp0)*this._csig1*C),_.S12=this._c2*Math.atan2(G,A)+this._A4*(T-this._B41)),l||(_.a12=v/h.degree),_):(_.a12=NaN,_)},o.GeodesicLine.prototype.Position=function(l,u){return this.GenPosition(!1,l,u)},o.GeodesicLine.prototype.ArcPosition=function(l,u){return this.GenPosition(!0,l,u)},o.GeodesicLine.prototype.GenSetDistance=function(l,u){l?this.SetArc(u):this.SetDistance(u)},o.GeodesicLine.prototype.SetDistance=function(l){var u;this.s13=l,u=this.GenPosition(!1,this.s13,r.ARC),this.a13=0+u.a12},o.GeodesicLine.prototype.SetArc=function(l){var u;this.a13=l,u=this.GenPosition(!0,this.a13,r.DISTANCE),this.s13=0+u.s12}}(s.Geodesic,s.GeodesicLine,s.Math),function(r,o,h,l){var u,f,_,v;u=function(m,g){var M=h.AngDiff(m,g).d;return m=h.AngNormalize(m),g=h.AngNormalize(g),M>0&&(m<0&&g>=0||m>0&&g===0)?1:M<0&&m>=0&&g<0?-1:0},f=function(m,g){return m=m%720,g=g%720,(0<=g&&g<360||g<-360?0:1)-(0<=m&&m<360||m<-360?0:1)},_=function(m,g,M,E,x){return m.Remainder(g),M&1&&m.Add((m.Sum()<0?1:-1)*g/2),E||m.Negate(),x?m.Sum()>g/2?m.Add(-g):m.Sum()<=-g/2&&m.Add(+g):m.Sum()>=g?m.Add(-g):m.Sum()<0&&m.Add(+g),0+m.Sum()},v=function(m,g,M,E,x){return m=h.remainder(m,g),M&1&&(m+=(m<0?1:-1)*g/2),E||(m*=-1),x?m>g/2?m-=g:m<=-g/2&&(m+=g):m>=g?m-=g:m<0&&(m+=g),0+m},r.PolygonArea=function(m,g){this._geod=m,this.a=this._geod.a,this.f=this._geod.f,this._area0=4*Math.PI*m._c2,this.polyline=g||!1,this._mask=o.LATITUDE|o.LONGITUDE|o.DISTANCE|(this.polyline?o.NONE:o.AREA|o.LONG_UNROLL),this.polyline||(this._areasum=new l.Accumulator(0)),this._perimetersum=new l.Accumulator(0),this.Clear()},r.PolygonArea.prototype.Clear=function(){this.num=0,this._crossings=0,this.polyline||this._areasum.Set(0),this._perimetersum.Set(0),this._lat0=this._lon0=this.lat=this.lon=NaN},r.PolygonArea.prototype.AddPoint=function(m,g){var M;this.num===0?(this._lat0=this.lat=m,this._lon0=this.lon=g):(M=this._geod.Inverse(this.lat,this.lon,m,g,this._mask),this._perimetersum.Add(M.s12),this.polyline||(this._areasum.Add(M.S12),this._crossings+=u(this.lon,g)),this.lat=m,this.lon=g),++this.num},r.PolygonArea.prototype.AddEdge=function(m,g){var M;this.num&&(M=this._geod.Direct(this.lat,this.lon,m,g,this._mask),this._perimetersum.Add(g),this.polyline||(this._areasum.Add(M.S12),this._crossings+=f(this.lon,M.lon2)),this.lat=M.lat2,this.lon=M.lon2),++this.num},r.PolygonArea.prototype.Compute=function(m,g){var M={number:this.num},E,x;return this.num<2?(M.perimeter=0,this.polyline||(M.area=0),M):this.polyline?(M.perimeter=this._perimetersum.Sum(),M):(E=this._geod.Inverse(this.lat,this.lon,this._lat0,this._lon0,this._mask),M.perimeter=this._perimetersum.Sum(E.s12),x=new l.Accumulator(this._areasum),x.Add(E.S12),M.area=_(x,this._area0,this._crossings+u(this.lon,this._lon0),m,g),M)},r.PolygonArea.prototype.TestPoint=function(m,g,M,E){var x={number:this.num+1},C,D,Z,$;if(this.num===0)return x.perimeter=0,this.polyline||(x.area=0),x;for(x.perimeter=this._perimetersum.Sum(),D=this.polyline?0:this._areasum.Sum(),Z=this._crossings,$=0;$<(this.polyline?1:2);++$)C=this._geod.Inverse($===0?this.lat:m,$===0?this.lon:g,$!==0?this._lat0:m,$!==0?this._lon0:g,this._mask),x.perimeter+=C.s12,this.polyline||(D+=C.S12,Z+=u($===0?this.lon:g,$!==0?this._lon0:g));return this.polyline||(x.area=v(D,this._area0,Z,M,E)),x},r.PolygonArea.prototype.TestEdge=function(m,g,M,E){var x={number:this.num?this.num+1:0},C,D,Z;return this.num===0||(x.perimeter=this._perimetersum.Sum()+g,this.polyline)||(D=this._areasum.Sum(),Z=this._crossings,C=this._geod.Direct(this.lat,this.lon,m,g,this._mask),D+=C.S12,Z+=f(this.lon,C.lon2),Z+=u(C.lon2,this._lon0),C=this._geod.Inverse(C.lat2,C.lon2,this._lat0,this._lon0,this._mask),x.perimeter+=C.s12,D+=C.S12,x.area=v(D,this._area0,Z,M,E)),x}}(s.PolygonArea,s.Geodesic,s.Math,s.Accumulator),e(s)})(function(e){i.exports?i.exports=e:window.geodesic=e})})(Ka);var Qf=Ka.exports;function Yf(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0),this.g=new Qf.Geodesic.Geodesic(this.a,this.es/(1+Math.sqrt(1-this.es)))}function td(i){var e=i.x,s=i.y,r=Math.sin(i.y),o=Math.cos(i.y),h=U(e-this.long0),l,u,f,_,v,m,g,M,E,x,C,D,Z,$,lt;return this.sphere?Math.abs(this.sin_p12-1)<=B?(i.x=this.x0+this.a*(O-s)*Math.sin(h),i.y=this.y0-this.a*(O-s)*Math.cos(h),i):Math.abs(this.sin_p12+1)<=B?(i.x=this.x0+this.a*(O+s)*Math.sin(h),i.y=this.y0+this.a*(O+s)*Math.cos(h),i):(E=this.sin_p12*r+this.cos_p12*o*Math.cos(h),g=Math.acos(E),M=g?g/Math.sin(g):1,i.x=this.x0+this.a*M*o*Math.sin(h),i.y=this.y0+this.a*M*(this.cos_p12*r-this.sin_p12*o*Math.cos(h)),i):(l=hn(this.es),u=ln(this.es),f=cn(this.es),_=un(this.es),Math.abs(this.sin_p12-1)<=B?(v=this.a*Xt(l,u,f,_,O),m=this.a*Xt(l,u,f,_,s),i.x=this.x0+(v-m)*Math.sin(h),i.y=this.y0-(v-m)*Math.cos(h),i):Math.abs(this.sin_p12+1)<=B?(v=this.a*Xt(l,u,f,_,O),m=this.a*Xt(l,u,f,_,s),i.x=this.x0+(v+m)*Math.sin(h),i.y=this.y0+(v+m)*Math.cos(h),i):Math.abs(e)<B&&Math.abs(s-this.lat0)<B?(i.x=i.y=0,i):(x=this.lat0/mt,C=this.long0/mt,D=s/mt,Z=e/mt,$=this.g.Inverse(x,C,D,Z,this.g.AZIMUTH),lt=$.azi1*mt,i.x=$.s12*Math.sin(lt),i.y=$.s12*Math.cos(lt),i))}function ed(i){i.x-=this.x0,i.y-=this.y0;var e,s,r,o,h,l,u,f,_,v,m,g,M,E,x,C,D,Z;return this.sphere?(e=Math.sqrt(i.x*i.x+i.y*i.y),e>2*O*this.a?void 0:(s=e/this.a,r=Math.sin(s),o=Math.cos(s),h=this.long0,Math.abs(e)<=B?l=this.lat0:(l=qe(o*this.sin_p12+i.y*r*this.cos_p12/e),u=Math.abs(this.lat0)-O,Math.abs(u)<=B?this.lat0>=0?h=U(this.long0+Math.atan2(i.x,-i.y)):h=U(this.long0-Math.atan2(-i.x,i.y)):h=U(this.long0+Math.atan2(i.x*r,e*this.cos_p12*o-i.y*this.sin_p12*r))),i.x=h,i.y=l,i)):(f=hn(this.es),_=ln(this.es),v=cn(this.es),m=un(this.es),Math.abs(this.sin_p12-1)<=B?(g=this.a*Xt(f,_,v,m,O),e=Math.sqrt(i.x*i.x+i.y*i.y),M=g-e,l=ts(M/this.a,f,_,v,m),h=U(this.long0+Math.atan2(i.x,-1*i.y)),i.x=h,i.y=l,i):Math.abs(this.sin_p12+1)<=B?(g=this.a*Xt(f,_,v,m,O),e=Math.sqrt(i.x*i.x+i.y*i.y),M=e-g,l=ts(M/this.a,f,_,v,m),h=U(this.long0+Math.atan2(i.x,i.y)),i.x=h,i.y=l,i):(E=this.lat0/mt,x=this.long0/mt,C=Math.atan2(i.x,i.y)/mt,D=Math.sqrt(i.x*i.x+i.y*i.y),Z=this.g.Direct(E,x,C,D,this.g.STANDARD),i.x=Z.lon2*mt,i.y=Z.lat2*mt,i))}var id=["Azimuthal_Equidistant","aeqd"];const nd={init:Yf,forward:td,inverse:ed,names:id};function sd(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function rd(i){var e,s,r,o,h,l,u,f,_=i.x,v=i.y;return r=U(_-this.long0),e=Math.sin(v),s=Math.cos(v),o=Math.cos(r),l=this.sin_p14*e+this.cos_p14*s*o,h=1,(l>0||Math.abs(l)<=B)&&(u=this.a*h*s*Math.sin(r),f=this.y0+this.a*h*(this.cos_p14*e-this.sin_p14*s*o)),i.x=u,i.y=f,i}function ad(i){var e,s,r,o,h,l,u;return i.x-=this.x0,i.y-=this.y0,e=Math.sqrt(i.x*i.x+i.y*i.y),s=qe(e/this.a),r=Math.sin(s),o=Math.cos(s),l=this.long0,Math.abs(e)<=B?(u=this.lat0,i.x=l,i.y=u,i):(u=qe(o*this.sin_p14+i.y*r*this.cos_p14/e),h=Math.abs(this.lat0)-O,Math.abs(h)<=B?(this.lat0>=0?l=U(this.long0+Math.atan2(i.x,-i.y)):l=U(this.long0-Math.atan2(-i.x,i.y)),i.x=l,i.y=u,i):(l=U(this.long0+Math.atan2(i.x*r,e*this.cos_p14*o-i.y*this.sin_p14*r)),i.x=l,i.y=u,i))}var od=["ortho"];const hd={init:sd,forward:rd,inverse:ad,names:od};var Pt={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},ft={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function ld(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=O-ut/2?this.face=Pt.TOP:this.lat0<=-(O-ut/2)?this.face=Pt.BOTTOM:Math.abs(this.long0)<=ut?this.face=Pt.FRONT:Math.abs(this.long0)<=O+ut?this.face=this.long0>0?Pt.RIGHT:Pt.LEFT:this.face=Pt.BACK,this.es!==0&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function cd(i){var e={x:0,y:0},s,r,o,h,l,u,f={value:0};if(i.x-=this.long0,this.es!==0?s=Math.atan(this.one_minus_f_squared*Math.tan(i.y)):s=i.y,r=i.x,this.face===Pt.TOP)h=O-s,r>=ut&&r<=O+ut?(f.value=ft.AREA_0,o=r-O):r>O+ut||r<=-(O+ut)?(f.value=ft.AREA_1,o=r>0?r-Ct:r+Ct):r>-(O+ut)&&r<=-ut?(f.value=ft.AREA_2,o=r+O):(f.value=ft.AREA_3,o=r);else if(this.face===Pt.BOTTOM)h=O+s,r>=ut&&r<=O+ut?(f.value=ft.AREA_0,o=-r+O):r<ut&&r>=-ut?(f.value=ft.AREA_1,o=-r):r<-ut&&r>=-(O+ut)?(f.value=ft.AREA_2,o=-r-O):(f.value=ft.AREA_3,o=r>0?-r+Ct:-r-Ct);else{var _,v,m,g,M,E,x;this.face===Pt.RIGHT?r=Pi(r,+O):this.face===Pt.BACK?r=Pi(r,+Ct):this.face===Pt.LEFT&&(r=Pi(r,-O)),g=Math.sin(s),M=Math.cos(s),E=Math.sin(r),x=Math.cos(r),_=M*x,v=M*E,m=g,this.face===Pt.FRONT?(h=Math.acos(_),o=es(h,m,v,f)):this.face===Pt.RIGHT?(h=Math.acos(v),o=es(h,m,-_,f)):this.face===Pt.BACK?(h=Math.acos(-_),o=es(h,m,-v,f)):this.face===Pt.LEFT?(h=Math.acos(-v),o=es(h,m,_,f)):(h=o=0,f.value=ft.AREA_0)}return u=Math.atan(12/Ct*(o+Math.acos(Math.sin(o)*Math.cos(ut))-O)),l=Math.sqrt((1-Math.cos(h))/(Math.cos(u)*Math.cos(u))/(1-Math.cos(Math.atan(1/Math.cos(o))))),f.value===ft.AREA_1?u+=O:f.value===ft.AREA_2?u+=Ct:f.value===ft.AREA_3&&(u+=1.5*Ct),e.x=l*Math.cos(u),e.y=l*Math.sin(u),e.x=e.x*this.a+this.x0,e.y=e.y*this.a+this.y0,i.x=e.x,i.y=e.y,i}function ud(i){var e={lam:0,phi:0},s,r,o,h,l,u,f,_,v,m={value:0};if(i.x=(i.x-this.x0)/this.a,i.y=(i.y-this.y0)/this.a,r=Math.atan(Math.sqrt(i.x*i.x+i.y*i.y)),s=Math.atan2(i.y,i.x),i.x>=0&&i.x>=Math.abs(i.y)?m.value=ft.AREA_0:i.y>=0&&i.y>=Math.abs(i.x)?(m.value=ft.AREA_1,s-=O):i.x<0&&-i.x>=Math.abs(i.y)?(m.value=ft.AREA_2,s=s<0?s+Ct:s-Ct):(m.value=ft.AREA_3,s+=O),v=Ct/12*Math.tan(s),l=Math.sin(v)/(Math.cos(v)-1/Math.sqrt(2)),u=Math.atan(l),o=Math.cos(s),h=Math.tan(r),f=1-o*o*h*h*(1-Math.cos(Math.atan(1/Math.cos(u)))),f<-1?f=-1:f>1&&(f=1),this.face===Pt.TOP)_=Math.acos(f),e.phi=O-_,m.value===ft.AREA_0?e.lam=u+O:m.value===ft.AREA_1?e.lam=u<0?u+Ct:u-Ct:m.value===ft.AREA_2?e.lam=u-O:e.lam=u;else if(this.face===Pt.BOTTOM)_=Math.acos(f),e.phi=_-O,m.value===ft.AREA_0?e.lam=-u+O:m.value===ft.AREA_1?e.lam=-u:m.value===ft.AREA_2?e.lam=-u-O:e.lam=u<0?-u-Ct:-u+Ct;else{var g,M,E;g=f,v=g*g,v>=1?E=0:E=Math.sqrt(1-v)*Math.sin(u),v+=E*E,v>=1?M=0:M=Math.sqrt(1-v),m.value===ft.AREA_1?(v=M,M=-E,E=v):m.value===ft.AREA_2?(M=-M,E=-E):m.value===ft.AREA_3&&(v=M,M=E,E=-v),this.face===Pt.RIGHT?(v=g,g=-M,M=v):this.face===Pt.BACK?(g=-g,M=-M):this.face===Pt.LEFT&&(v=g,g=M,M=-v),e.phi=Math.acos(-E)-O,e.lam=Math.atan2(M,g),this.face===Pt.RIGHT?e.lam=Pi(e.lam,-O):this.face===Pt.BACK?e.lam=Pi(e.lam,-Ct):this.face===Pt.LEFT&&(e.lam=Pi(e.lam,+O))}if(this.es!==0){var x,C,D;x=e.phi<0?1:0,C=Math.tan(e.phi),D=this.b/Math.sqrt(C*C+this.one_minus_f_squared),e.phi=Math.atan(Math.sqrt(this.a*this.a-D*D)/(this.one_minus_f*D)),x&&(e.phi=-e.phi)}return e.lam+=this.long0,i.x=e.lam,i.y=e.phi,i}function es(i,e,s,r){var o;return i<B?(r.value=ft.AREA_0,o=0):(o=Math.atan2(e,s),Math.abs(o)<=ut?r.value=ft.AREA_0:o>ut&&o<=O+ut?(r.value=ft.AREA_1,o-=O):o>O+ut||o<=-(O+ut)?(r.value=ft.AREA_2,o=o>=0?o-Ct:o+Ct):(r.value=ft.AREA_3,o+=O)),o}function Pi(i,e){var s=i+e;return s<-Ct?s+=en:s>+Ct&&(s-=en),s}var fd=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"];const dd={init:ld,forward:cd,inverse:ud,names:fd};var Xs=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-986701e-12],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,18736e-12],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,934959e-12],[.7986,-.00755338,-500009e-10,935324e-12],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],fn=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-126793e-14,422642e-15],[.124,.0124,507171e-14,-160604e-14],[.186,.0123999,-190189e-13,600152e-14],[.248,.0124002,710039e-13,-224e-10],[.31,.0123992,-264997e-12,835986e-13],[.372,.0124029,988983e-12,-311994e-12],[.434,.0123893,-369093e-11,-435621e-12],[.4958,.0123198,-102252e-10,-345523e-12],[.5571,.0121916,-154081e-10,-582288e-12],[.6176,.0119938,-241424e-10,-525327e-12],[.6769,.011713,-320223e-10,-516405e-12],[.7346,.0113541,-397684e-10,-609052e-12],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-140374e-14],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Va=.8487,Ja=1.3523,Xa=we/5,_d=1/Xa,Si=18,is=function(i,e){return i[0]+e*(i[1]+e*(i[2]+e*i[3]))},pd=function(i,e){return i[1]+e*(2*i[2]+e*3*i[3])};function md(i,e,s,r){for(var o=e;r;--r){var h=i(o);if(o-=h,Math.abs(h)<s)break}return o}function gd(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function vd(i){var e=U(i.x-this.long0),s=Math.abs(i.y),r=Math.floor(s*Xa);r<0?r=0:r>=Si&&(r=Si-1),s=we*(s-_d*r);var o={x:is(Xs[r],s)*e,y:is(fn[r],s)};return i.y<0&&(o.y=-o.y),o.x=o.x*this.a*Va+this.x0,o.y=o.y*this.a*Ja+this.y0,o}function yd(i){var e={x:(i.x-this.x0)/(this.a*Va),y:Math.abs(i.y-this.y0)/(this.a*Ja)};if(e.y>=1)e.x/=Xs[Si][0],e.y=i.y<0?-O:O;else{var s=Math.floor(e.y*Si);for(s<0?s=0:s>=Si&&(s=Si-1);;)if(fn[s][0]>e.y)--s;else if(fn[s+1][0]<=e.y)++s;else break;var r=fn[s],o=5*(e.y-r[0])/(fn[s+1][0]-r[0]);o=md(function(h){return(is(r,h)-e.y)/pd(r,h)},o,B,100),e.x/=is(Xs[s],o),e.y=(5*s+o)*mt,i.y<0&&(e.y=-e.y)}return e.x=U(e.x+this.long0),e}var Md=["Robinson","robin"];const wd={init:gd,forward:vd,inverse:yd,names:Md};function xd(){this.name="geocent"}function bd(i){var e=Pa(i,this.es,this.a);return e}function Ed(i){var e=Sa(i,this.es,this.a,this.b);return e}var Pd=["Geocentric","geocentric","geocent","Geocent"];const Sd={init:xd,forward:bd,inverse:Ed,names:Pd};var jt={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},dn={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};function Ad(){if(Object.keys(dn).forEach((function(s){if(typeof this[s]>"u")this[s]=dn[s].def;else{if(dn[s].num&&isNaN(this[s]))throw new Error("Invalid parameter value, must be numeric "+s+" = "+this[s]);dn[s].num&&(this[s]=parseFloat(this[s]))}dn[s].degrees&&(this[s]=this[s]*mt)}).bind(this)),Math.abs(Math.abs(this.lat0)-O)<B?this.mode=this.lat0<0?jt.S_POLE:jt.N_POLE:Math.abs(this.lat0)<B?this.mode=jt.EQUIT:(this.mode=jt.OBLIQ,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var i=this.tilt,e=this.azi;this.cg=Math.cos(e),this.sg=Math.sin(e),this.cw=Math.cos(i),this.sw=Math.sin(i)}function Ld(i){i.x-=this.long0;var e=Math.sin(i.y),s=Math.cos(i.y),r=Math.cos(i.x),o,h;switch(this.mode){case jt.OBLIQ:h=this.sinph0*e+this.cosph0*s*r;break;case jt.EQUIT:h=s*r;break;case jt.S_POLE:h=-e;break;case jt.N_POLE:h=e;break}switch(h=this.pn1/(this.p-h),o=h*s*Math.sin(i.x),this.mode){case jt.OBLIQ:h*=this.cosph0*e-this.sinph0*s*r;break;case jt.EQUIT:h*=e;break;case jt.N_POLE:h*=-(s*r);break;case jt.S_POLE:h*=s*r;break}var l,u;return l=h*this.cg+o*this.sg,u=1/(l*this.sw*this.h1+this.cw),o=(o*this.cg-h*this.sg)*this.cw*u,h=l*u,i.x=o*this.a,i.y=h*this.a,i}function Cd(i){i.x/=this.a,i.y/=this.a;var e={x:i.x,y:i.y},s,r,o;o=1/(this.pn1-i.y*this.sw),s=this.pn1*i.x*o,r=this.pn1*i.y*this.cw*o,i.x=s*this.cg+r*this.sg,i.y=r*this.cg-s*this.sg;var h=ne(i.x,i.y);if(Math.abs(h)<B)e.x=0,e.y=i.y;else{var l,u;switch(u=1-h*h*this.pfact,u=(this.p-Math.sqrt(u))/(this.pn1/h+h/this.pn1),l=Math.sqrt(1-u*u),this.mode){case jt.OBLIQ:e.y=Math.asin(l*this.sinph0+i.y*u*this.cosph0/h),i.y=(l-this.sinph0*Math.sin(e.y))*h,i.x*=u*this.cosph0;break;case jt.EQUIT:e.y=Math.asin(i.y*u/h),i.y=l*h,i.x*=u;break;case jt.N_POLE:e.y=Math.asin(l),i.y=-i.y;break;case jt.S_POLE:e.y=-Math.asin(l);break}e.x=Math.atan2(i.x,i.y)}return i.x=e.x+this.long0,i.y=e.y,i}var Td=["Tilted_Perspective","tpers"];const Nd={init:Ad,forward:Ld,inverse:Cd,names:Td};function Gd(){if(this.flip_axis=this.sweep==="x"?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,this.es!==0){var i=1-this.es,e=1/i;this.radius_p=Math.sqrt(i),this.radius_p2=i,this.radius_p_inv2=e,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")}function Id(i){var e=i.x,s=i.y,r,o,h,l;if(e=e-this.long0,this.shape==="ellipse"){s=Math.atan(this.radius_p2*Math.tan(s));var u=this.radius_p/ne(this.radius_p*Math.cos(s),Math.sin(s));if(o=u*Math.cos(e)*Math.cos(s),h=u*Math.sin(e)*Math.cos(s),l=u*Math.sin(s),(this.radius_g-o)*o-h*h-l*l*this.radius_p_inv2<0)return i.x=Number.NaN,i.y=Number.NaN,i;r=this.radius_g-o,this.flip_axis?(i.x=this.radius_g_1*Math.atan(h/ne(l,r)),i.y=this.radius_g_1*Math.atan(l/r)):(i.x=this.radius_g_1*Math.atan(h/r),i.y=this.radius_g_1*Math.atan(l/ne(h,r)))}else this.shape==="sphere"&&(r=Math.cos(s),o=Math.cos(e)*r,h=Math.sin(e)*r,l=Math.sin(s),r=this.radius_g-o,this.flip_axis?(i.x=this.radius_g_1*Math.atan(h/ne(l,r)),i.y=this.radius_g_1*Math.atan(l/r)):(i.x=this.radius_g_1*Math.atan(h/r),i.y=this.radius_g_1*Math.atan(l/ne(h,r))));return i.x=i.x*this.a,i.y=i.y*this.a,i}function Od(i){var e=-1,s=0,r=0,o,h,l,u;if(i.x=i.x/this.a,i.y=i.y/this.a,this.shape==="ellipse"){this.flip_axis?(r=Math.tan(i.y/this.radius_g_1),s=Math.tan(i.x/this.radius_g_1)*ne(1,r)):(s=Math.tan(i.x/this.radius_g_1),r=Math.tan(i.y/this.radius_g_1)*ne(1,s));var f=r/this.radius_p;if(o=s*s+f*f+e*e,h=2*this.radius_g*e,l=h*h-4*o*this.C,l<0)return i.x=Number.NaN,i.y=Number.NaN,i;u=(-h-Math.sqrt(l))/(2*o),e=this.radius_g+u*e,s*=u,r*=u,i.x=Math.atan2(s,e),i.y=Math.atan(r*Math.cos(i.x)/e),i.y=Math.atan(this.radius_p_inv2*Math.tan(i.y))}else if(this.shape==="sphere"){if(this.flip_axis?(r=Math.tan(i.y/this.radius_g_1),s=Math.tan(i.x/this.radius_g_1)*Math.sqrt(1+r*r)):(s=Math.tan(i.x/this.radius_g_1),r=Math.tan(i.y/this.radius_g_1)*Math.sqrt(1+s*s)),o=s*s+r*r+e*e,h=2*this.radius_g*e,l=h*h-4*o*this.C,l<0)return i.x=Number.NaN,i.y=Number.NaN,i;u=(-h-Math.sqrt(l))/(2*o),e=this.radius_g+u*e,s*=u,r*=u,i.x=Math.atan2(s,e),i.y=Math.atan(r*Math.cos(i.x)/e)}return i.x=i.x+this.long0,i}var kd=["Geostationary Satellite View","Geostationary_Satellite","geos"];const Rd={init:Gd,forward:Id,inverse:Od,names:kd};var _n=1.340264,pn=-.081106,mn=893e-6,gn=.003796,ns=Math.sqrt(3)/2;function zd(){this.es=0,this.long0=this.long0!==void 0?this.long0:0}function Dd(i){var e=U(i.x-this.long0),s=i.y,r=Math.asin(ns*Math.sin(s)),o=r*r,h=o*o*o;return i.x=e*Math.cos(r)/(ns*(_n+3*pn*o+h*(7*mn+9*gn*o))),i.y=r*(_n+pn*o+h*(mn+gn*o)),i.x=this.a*i.x+this.x0,i.y=this.a*i.y+this.y0,i}function Bd(i){i.x=(i.x-this.x0)/this.a,i.y=(i.y-this.y0)/this.a;var e=1e-9,s=12,r=i.y,o,h,l,u,f,_;for(_=0;_<s&&(o=r*r,h=o*o*o,l=r*(_n+pn*o+h*(mn+gn*o))-i.y,u=_n+3*pn*o+h*(7*mn+9*gn*o),r-=f=l/u,!(Math.abs(f)<e));++_);return o=r*r,h=o*o*o,i.x=ns*i.x*(_n+3*pn*o+h*(7*mn+9*gn*o))/Math.cos(r),i.y=Math.asin(Math.sin(r)/ns),i.x=U(i.x+this.long0),i}var Ud=["eqearth","Equal Earth","Equal_Earth"];const Zd={init:zd,forward:Dd,inverse:Bd,names:Ud};var vn=1e-10;function qd(){var i;if(this.phi1=this.lat1,Math.abs(this.phi1)<vn)throw new Error;this.es?(this.en=Hs(this.es),this.m1=bi(this.phi1,this.am1=Math.sin(this.phi1),i=Math.cos(this.phi1),this.en),this.am1=i/(Math.sqrt(1-this.es*this.am1*this.am1)*this.am1),this.inverse=Fd,this.forward=$d):(Math.abs(this.phi1)+vn>=O?this.cphi1=0:this.cphi1=1/Math.tan(this.phi1),this.inverse=Wd,this.forward=Hd)}function $d(i){var e=U(i.x-(this.long0||0)),s=i.y,r,o,h;return r=this.am1+this.m1-bi(s,o=Math.sin(s),h=Math.cos(s),this.en),o=h*e/(r*Math.sqrt(1-this.es*o*o)),i.x=r*Math.sin(o),i.y=this.am1-r*Math.cos(o),i.x=this.a*i.x+(this.x0||0),i.y=this.a*i.y+(this.y0||0),i}function Fd(i){i.x=(i.x-(this.x0||0))/this.a,i.y=(i.y-(this.y0||0))/this.a;var e,s,r,o;if(s=ne(i.x,i.y=this.am1-i.y),o=Ws(this.am1+this.m1-s,this.es,this.en),(e=Math.abs(o))<O)e=Math.sin(o),r=s*Math.atan2(i.x,i.y)*Math.sqrt(1-this.es*e*e)/Math.cos(o);else if(Math.abs(e-O)<=vn)r=0;else throw new Error;return i.x=U(r+(this.long0||0)),i.y=Ue(o),i}function Hd(i){var e=U(i.x-(this.long0||0)),s=i.y,r,o;return o=this.cphi1+this.phi1-s,Math.abs(o)>vn?(i.x=o*Math.sin(r=e*Math.cos(s)/o),i.y=this.cphi1-o*Math.cos(r)):i.x=i.y=0,i.x=this.a*i.x+(this.x0||0),i.y=this.a*i.y+(this.y0||0),i}function Wd(i){i.x=(i.x-(this.x0||0))/this.a,i.y=(i.y-(this.y0||0))/this.a;var e,s,r=ne(i.x,i.y=this.cphi1-i.y);if(s=this.cphi1+this.phi1-r,Math.abs(s)>O)throw new Error;return Math.abs(Math.abs(s)-O)<=vn?e=0:e=r*Math.atan2(i.x,i.y)/Math.cos(s),i.x=U(e+(this.long0||0)),i.y=Ue(s),i}var jd=["bonne","Bonne (Werner lat_1=90)"];const Kd={init:qd,names:jd};function Vd(i){i.Proj.projections.add(Qn),i.Proj.projections.add(Yn),i.Proj.projections.add(Zc),i.Proj.projections.add(Xc),i.Proj.projections.add(nu),i.Proj.projections.add(hu),i.Proj.projections.add(_u),i.Proj.projections.add(yu),i.Proj.projections.add(Eu),i.Proj.projections.add(Cu),i.Proj.projections.add(Wu),i.Proj.projections.add(Qu),i.Proj.projections.add(sf),i.Proj.projections.add(cf),i.Proj.projections.add(pf),i.Proj.projections.add(Mf),i.Proj.projections.add(Pf),i.Proj.projections.add(Tf),i.Proj.projections.add(Rf),i.Proj.projections.add(Zf),i.Proj.projections.add(Wf),i.Proj.projections.add(Xf),i.Proj.projections.add(nd),i.Proj.projections.add(hd),i.Proj.projections.add(dd),i.Proj.projections.add(wd),i.Proj.projections.add(Sd),i.Proj.projections.add(Nd),i.Proj.projections.add(Rd),i.Proj.projections.add(Zd),i.Proj.projections.add(Kd)}Tt.defaultDatum="WGS84",Tt.Proj=be,Tt.WGS84=new Tt.Proj("WGS84"),Tt.Point=xi,Tt.toPoint=Ta,Tt.defs=Jt,Tt.nadgrid=Zl,Tt.transform=Xn,Tt.mgrs=rc,Tt.version="__VERSION__",Vd(Tt);const Ce="EPSG:4326",Qs=(i,e)=>{const s=Math.floor((e+180)/6)+1;return`EPSG:32${i>=0?"6":"7"}${s.toString().padStart(2,"0")}`},Ys=i=>i.toLowerCase().replace(/ /g,"-").replace(/[^a-z0-9-]/g,""),Jd=(i,e)=>{const[s,r]=Array.isArray(i)?i:[i.lat,i.lng],[o,h]=Array.isArray(e)?e:[e.lat,e.lng],l=Qs(s,r),[u,f]=Tt(Ce,l,[h,o]),[_,v]=Tt(Ce,l,[r,s]),m=_-u,g=v-f;return{xDiff:m,yDiff:g,targetUTM:l}},tr=(i,e,s)=>{const{xDiff:r,yDiff:o,targetUTM:h}=Jd(i,e);return s.map(l=>{const[u,f]=Array.isArray(l.position)?l.position:[l.position.lat,l.position.lng],[_,v]=Tt(Ce,h,[f,u]),m=_+r,g=v+o,[M,E]=Tt(h,Ce,[m,g]);return{...l,position:[E,M]}})};class Ai{constructor(e,s,r,o,h,l){this.name=e,this.center=w.latLng(s),this.radius=r,this.pointsOfInterest=o,this.color=h,this.circleOptions={radius:this.radius,fill:!1,color:this.color,className:`accelerator accelerator-circle ${Ys(this.name)}`,...l}}getName(){return this.name}getReferencePoint(){return this.center}getTranslatedPath(e){return new w.Circle(e,this.circleOptions)}getTranslatedPointsOfInterest(e){return tr(e,this.center,this.pointsOfInterest)}}class er{constructor(e,s,r,o,h,l){this.name=e,this.midpoint=w.latLng(s),this.length=r,this.direction=o,this.pointsOfInterest=h,this.color=l}getName(){return this.name}getReferencePoint(){return this.midpoint}getTranslatedPath(e){const s=this.direction*Math.PI/180,r=this.length/2,[o,h]=Array.isArray(e)?e:[e.lat,e.lng],l=Qs(o,h),[u,f]=Tt(Ce,l,[h,o]),_=u-r*Math.sin(s),v=f-r*Math.cos(s),m=u+r*Math.sin(s),g=f+r*Math.cos(s),[M,E]=Tt(l,Ce,[_,v]),[x,C]=Tt(l,Ce,[m,g]);return new w.Polyline([[E,M],[C,x]],{color:this.color,className:`accelerator accelerator-linear ${Ys(this.name)}`})}getTranslatedPointsOfInterest(e){return tr(e,this.midpoint,this.pointsOfInterest)}}const Xd=4300,Qd=[{name:"ATLAS",position:[46.23497502511518,6.0536309870679235]},{name:"Point 2",position:[46.251544268663615,6.021434048433471]},{name:"Point 3",position:[46.277518302316,6.012012123858463]},{name:"Point 4",position:[46.30445011831323,6.037082600001055]},{name:"CMS",position:[46.31026650910126,6.078887140749957]},{name:"Point 6",position:[46.29351162288481,6.111756560082773]},{name:"Point 7",position:[46.266418692548335,6.115151115340182]},{name:"Point 8",position:[46.2417904558472,6.097942093891781]}],Yd=new w.LatLng(46.2725593743487,6.065987083678201),Qa=new Ai("Large Hadron Collider",Yd,Xd,Qd,"#00BFFF"),t0=1100,e0=new w.LatLng(46.2447,6.056),Ya=new Ai("Super Proton Synchrotron",e0,t0,[],"#FFA500"),i0=100,n0=new w.LatLng(46.232129436307034,6.048649235698542),to=new Ai("Proton Synchrotron",n0,i0,[],"#228B22"),s0=25,r0=new w.LatLng(46.232875,6.04718),eo=new Ai("PS Booster",r0,s0,[],"#C71585"),a0=14500,o0=new w.LatLng(46.12280614864221,6.131499400104788),io=new Ai("Future Circular Collider",o0,a0,[],"#DC143C"),h0=new w.LatLng(46.23121030223552,6.046594519834996),l0=78,c0=-12,no=new er("LINAC4",h0,l0,c0,[],"#FF0000"),u0=new w.LatLng(46.23163551273157,6.046979545777202),f0=10,d0=20,so=new er("LINAC3",u0,f0,d0,[],"#C71585");class _0{constructor(e,s,r,o,h,l,u){this.name=e,this.center=w.latLng(s),this.width=r,this.height=o,this.rotation=h,this.pointsOfInterest=l,this.color=u}getName(){return this.name}getReferencePoint(){return this.center}createRoundedRectangle(e,s,r,o=6){const h=[],l=[{cx:e-r,cy:-s+r,start:-Math.PI/2,end:0},{cx:e-r,cy:s-r,start:0,end:Math.PI/2},{cx:-e+r,cy:s-r,start:Math.PI/2,end:Math.PI},{cx:-e+r,cy:-s+r,start:Math.PI,end:1.5*Math.PI}];for(const{cx:u,cy:f,start:_,end:v}of l)for(let m=0;m<=o;m++){const g=m/o,M=_+(v-_)*g,E=u+r*Math.cos(M),x=f+r*Math.sin(M);h.push([E,x])}return h}getTranslatedPath(e){const[s,r]=Array.isArray(e)?e:[e.lat,e.lng],o=Qs(s,r),[h,l]=Tt(Ce,o,[r,s]),u=this.width/2,f=this.height/2,_=this.createRoundedRectangle(u,f,3),v=Math.cos(this.rotation*Math.PI/180),m=Math.sin(this.rotation*Math.PI/180),g=_.map(([M,E])=>{const x=M*v-E*m,C=M*m+E*v,D=h+x,Z=l+C,[$,lt]=Tt(o,Ce,[D,Z]);return[lt,$]});return new w.Polygon(g,{color:this.color,fill:!1,className:`accelerator accelerator-rounded-rectangle ${Ys(this.name)}`})}getTranslatedPointsOfInterest(e){return tr(e,this.center,this.pointsOfInterest)}}const ro=new _0("LEIR",[46.231557004669,6.047967826365111],20,20,54,[],"#ff6b6b"),ir={LHC:Qa,SPS:Ya,PS:to,PSB:eo,FCC:io,LINAC4:no,LINAC3:so,LEIR:ro},p0="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=",m0="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==",g0="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC";var v0=Object.defineProperty,y0=Object.getOwnPropertyDescriptor,ni=(i,e,s,r)=>{for(var o=r>1?void 0:r?y0(e,s):e,h=i.length-1,l;h>=0;h--)(l=i[h])&&(o=(r?l(e,s,o):l(o))||o);return r&&o&&v0(e,s,o),o};delete Qi.Icon.Default.prototype._getIconUrl,Qi.Icon.Default.mergeOptions({iconRetinaUrl:m0,iconUrl:p0,shadowUrl:g0});const M0=`
cern-map-overlay {
  display: block;
  height: var(--cern-map-height, 400px);
  width: 100%;
}

cern-map-overlay>div {
  display: block;
  height: 100%;
  width: 100%;
}
`;return bt.CERNMapOverlay=class extends Xi{constructor(){super(...arguments),this._mapId=`map-${Math.random().toString(36).substring(2,9)}`,this.map=null,this.geocoder=null,this.DEFAULT_LAT=46.23497502511518,this.DEFAULT_LNG=6.0536309870679235,this.lat=null,this.lng=null,this.zoom=null,this.geocoderEnabled=!1,this.followLocation=!1,this.showAccelerators="",this.onGeocode=e=>{this.dispatchEvent(new CustomEvent("markgeocode",{detail:e,bubbles:!0,composed:!0}))}}createRenderRoot(){return this}addStylesToDocument(e,s){if(document.getElementById(s))return;const r=document.createElement("style");r.id=s,r.textContent=e,document.head.appendChild(r)}firstUpdated(){this.addStylesToDocument(M0,"cern-map-overlay-styles");const e=this.querySelector(`#${this._mapId}`);if(!e)throw new Error("Map element not found");this.map=Qi.map(e),Qi.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:"&copy; OpenStreetMap contributors"}).addTo(this.map),this.addStylesToDocument(Jh,"leaflet-styles"),this.addStylesToDocument(Vh,"geocoder-styles"),this.loadAcceleratorsFromProperty(),(this.lat===null||this.lng===null||this.zoom===null)&&(this.map.setView([this.DEFAULT_LAT,this.DEFAULT_LNG],12),this.fitBounds()),this.map.on("moveend",this.onMoveEnd.bind(this))}getLayers(){var s;const e=[];return(s=this.map)==null||s.eachLayer(r=>{"accelerator"in r&&e.push(r)}),e}fitBounds(){if(!this.map)return;const e=this.getLayers();if(!e.length)return;let s=1/0,r=-1/0,o=1/0,h=-1/0;e.forEach(l=>{const u=l.getBounds();u&&(s=Math.min(s,u.getSouth()),r=Math.max(r,u.getNorth()),o=Math.min(o,u.getWest()),h=Math.max(h,u.getEast()))}),this.map.fitBounds([[s,o],[r,h]])}updated(e){this.map&&(this.syncMapView(e),this.syncGeocoder(e),this.syncAccelerators(e),this.syncFollowLocation(e))}syncMapView(e){(e.has("lat")||e.has("lng"))&&this.lat!==null&&this.lng!==null&&this.map.setView([this.lat,this.lng],this.zoom??12),e.has("zoom")&&this.zoom!==null&&this.map.setZoom(this.zoom)}syncGeocoder(e){e.has("geocoderEnabled")&&(this.geocoderEnabled?(this.geocoder=new Hn,this.geocoder.addTo(this.map),this.geocoder.on("markgeocode",this.onGeocode)):this.geocoder&&(this.geocoder.remove(),this.geocoder=null))}syncAccelerators(e){e.has("showAccelerators")&&this.loadAcceleratorsFromProperty()}syncFollowLocation(e){e.has("followLocation")&&this.updateMap()}onMoveEnd(){var r,o;const e=(r=this.map)==null?void 0:r.getCenter(),s=(o=this.map)==null?void 0:o.getZoom();e&&(this.lat=e.lat,this.lng=e.lng),s!==void 0&&(this.zoom=s),this.followLocation&&this.updateMap()}loadAcceleratorsFromProperty(){const e=[];this.getLayers().forEach(s=>{var r;(r=s.name)!=null&&r.startsWith("__auto_")&&e.push(s.name)}),e.forEach(s=>this.removeAcceleratorLayer(s)),this.showAccelerators.trim()&&this.showAccelerators.split(",").map(r=>r.trim().toUpperCase()).filter(r=>r.length>0).forEach(r=>{const o=ir[r];o?this.addAcceleratorLayer(o,`__auto_${r}`):console.warn(`Unknown accelerator: ${r}. Available accelerators: ${Object.keys(ir).join(", ")}`)})}addAccelerator(e,s){typeof e=="string"&&s?this.addAcceleratorLayer(s,e):typeof e=="object"&&this.addAcceleratorLayer(e),this.updateMap()}removeAccelerator(e){if(typeof e=="string")this.removeAcceleratorLayer(e);else{const s=this.getLayers().find(r=>r.accelerator===e);s&&this.removeAcceleratorLayer(s.name)}this.updateMap()}getRefPointKey(e){return e instanceof w.LatLng?`${e.lat},${e.lng}`:`${e.lat},${e.lng}`}addAcceleratorLayer(e,s){if(!this.map)throw new Error("Map not initialized");const r=this.followLocation?new w.LatLng(this.lat??this.DEFAULT_LAT,this.lng??this.DEFAULT_LNG):e.getReferencePoint(),o=this.getRefPointKey(r),h=e.getTranslatedPath(r);return h.name=s??e.getName(),h.accelerator=e,h.cernLocationRefKey=o,h.addTo(this.map),h}removeAcceleratorLayer(e){if(!this.map)throw new Error("Map not initialized");const s=this.getLayers().find(r=>r.name===e);return s&&this.map.removeLayer(s),s}updateMap(){this.getLayers().forEach(s=>{const r=s.name,o=s.accelerator,h=this.followLocation?new w.LatLng(this.lat??0,this.lng??0):o.getReferencePoint(),l=this.getRefPointKey(h);s.cernLocationRefKey!==l&&(this.removeAcceleratorLayer(r),this.addAcceleratorLayer(o,r))})}render(){return lh`<div id="${this._mapId}"></div>`}},ni([gi({type:Number})],bt.CERNMapOverlay.prototype,"lat",2),ni([gi({type:Number})],bt.CERNMapOverlay.prototype,"lng",2),ni([gi({type:Number})],bt.CERNMapOverlay.prototype,"zoom",2),ni([gi({type:Boolean,attribute:"geocoder-enabled"})],bt.CERNMapOverlay.prototype,"geocoderEnabled",2),ni([gi({type:Boolean,attribute:"follow-location"})],bt.CERNMapOverlay.prototype,"followLocation",2),ni([gi({type:String,attribute:"show-accelerators"})],bt.CERNMapOverlay.prototype,"showAccelerators",2),bt.CERNMapOverlay=ni([gh("cern-map-overlay")],bt.CERNMapOverlay),bt.CircularCollider=Ai,bt.FCC=io,bt.L=Qi,bt.LEIR=ro,bt.LHC=Qa,bt.LINAC3=so,bt.LINAC4=no,bt.LinearAccelerator=er,bt.PS=to,bt.PSB=eo,bt.SPS=Ya,bt.cernMap=ir,Object.defineProperty(bt,Symbol.toStringTag,{value:"Module"}),bt}({});