-!function(){"use strict";function t(){}function e(t,e){for(const n in e)t[n]=e[n];return t}function n(t){return t()}function i(){return Object.create(null)}function o(t){t.forEach(n)}function s(t){return"function"==typeof t}function r(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}let a,l;function c(t,e){return a||(a=document.createElement("a")),a.href=e,t===a.href}function h(e,...n){if(null==e)return t;const i=e.subscribe(...n);return i.unsubscribe?()=>i.unsubscribe():i}function u(t){let e;return h(t,(t=>e=t))(),e}function d(t,e,n){t.$$.on_destroy.push(h(e,n))}function p(t,e,n,i){if(t){const o=m(t,e,n,i);return t[0](o)}}function m(t,n,i,o){return t[1]&&o?e(i.ctx.slice(),t[1](o(n))):i.ctx}function f(t,e,n,i){if(t[2]&&i){const o=t[2](i(n));if(void 0===e.dirty)return o;if("object"==typeof o){const t=[],n=Math.max(e.dirty.length,o.length);for(let i=0;i<n;i+=1)t[i]=e.dirty[i]|o[i];return t}return e.dirty|o}return e.dirty}function _(t,e,n,i,o,s){if(o){const r=m(e,n,i,s);t.p(r,o)}}function g(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let t=0;t<n;t++)e[t]=-1;return e}return-1}function v(t,e){t.appendChild(e)}function y(t,e,n){t.insertBefore(e,n||null)}function b(t){t.parentNode.removeChild(t)}function w(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function x(t){return document.createElement(t)}function $(t){return document.createTextNode(t)}function T(){return $(" ")}function P(){return $("")}function M(t,e,n,i){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}function k(t){return function(e){return e.preventDefault(),t.call(this,e)}}function C(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function E(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function A(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function O(t,e){t.value=null==e?"":e}function S(t,e){for(let n=0;n<t.options.length;n+=1){const i=t.options[n];if(i.__value===e)return void(i.selected=!0)}t.selectedIndex=-1}function z(t,e,n){t.classList[n?"add":"remove"](e)}class I{constructor(t=!1){this.is_svg=!1,this.is_svg=t,this.e=this.n=null}c(t){this.h(t)}m(t,e,n=null){var i;this.e||(this.is_svg?this.e=(i=e.nodeName,document.createElementNS("http://www.w3.org/2000/svg",i)):this.e=x(e.nodeName),this.t=e,this.c(t)),this.i(n)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.childNodes)}i(t){for(let e=0;e<this.n.length;e+=1)y(this.t,this.n[e],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(b)}}function D(t){l=t}function B(t){(function(){if(!l)throw new Error("Function called outside component initialization");return l})().$$.on_mount.push(t)}const N=[],Z=[],j=[],R=[],H=Promise.resolve();let F=!1;function W(t){j.push(t)}function q(t){R.push(t)}const U=new Set;let V=0;function G(){const t=l;do{for(;V<N.length;){const t=N[V];V++,D(t),K(t.$$)}for(D(null),N.length=0,V=0;Z.length;)Z.pop()();for(let t=0;t<j.length;t+=1){const e=j[t];U.has(e)||(U.add(e),e())}j.length=0}while(N.length);for(;R.length;)R.pop()();F=!1,U.clear(),D(t)}function K(t){if(null!==t.fragment){t.update(),o(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(W)}}const Y=new Set;let X;function J(){X={r:0,c:[],p:X}}function Q(){X.r||o(X.c),X=X.p}function tt(t,e){t&&t.i&&(Y.delete(t),t.i(e))}function et(t,e,n,i){if(t&&t.o){if(Y.has(t))return;Y.add(t),X.c.push((()=>{Y.delete(t),i&&(n&&t.d(1),i())})),t.o(e)}else i&&i()}function nt(t,e,n){const i=t.$$.props[e];void 0!==i&&(t.$$.bound[i]=n,n(t.$$.ctx[i]))}function it(t){t&&t.c()}function ot(t,e,i,r){const{fragment:a,on_mount:l,on_destroy:c,after_update:h}=t.$$;a&&a.m(e,i),r||W((()=>{const e=l.map(n).filter(s);c?c.push(...e):o(e),t.$$.on_mount=[]})),h.forEach(W)}function st(t,e){const n=t.$$;null!==n.fragment&&(o(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function rt(t,e){-1===t.$$.dirty[0]&&(N.push(t),F||(F=!0,H.then(G)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function at(e,n,s,r,a,c,h,u=[-1]){const d=l;D(e);const p=e.$$={fragment:null,ctx:null,props:c,update:t,not_equal:a,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(d?d.$$.context:[])),callbacks:i(),dirty:u,skip_bound:!1,root:n.target||d.$$.root};h&&h(p.root);let m=!1;if(p.ctx=s?s(e,n.props||{},((t,n,...i)=>{const o=i.length?i[0]:n;return p.ctx&&a(p.ctx[t],p.ctx[t]=o)&&(!p.skip_bound&&p.bound[t]&&p.bound[t](o),m&&rt(e,t)),n})):[],p.update(),m=!0,o(p.before_update),p.fragment=!!r&&r(p.ctx),n.target){if(n.hydrate){const t=function(t){return Array.from(t.childNodes)}(n.target);p.fragment&&p.fragment.l(t),t.forEach(b)}else p.fragment&&p.fragment.c();n.intro&&tt(e.$$.fragment),ot(e,n.target,n.anchor,n.customElement),G()}D(d)}class lt{$destroy(){st(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function ct(t){var e=t.default;if("function"==typeof e){var n=function(){return e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach((function(e){var i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,i.get?i:{enumerable:!0,get:function(){return t[e]}})})),n}(function(){const t=1e6,e=1e3,n="transitionend",i=t=>null==t?`${t}`:Object.prototype.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase(),o=e=>{do{e+=Math.floor(Math.random()*t)}while(document.getElementById(e));return e},s=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let n=t.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),e=n&&"#"!==n?n.trim():null}return e},r=t=>{const e=s(t);return e&&document.querySelector(e)?e:null},a=t=>{const e=s(t);return e?document.querySelector(e):null},l=t=>{if(!t)return 0;let{transitionDuration:n,transitionDelay:i}=window.getComputedStyle(t);const o=Number.parseFloat(n),s=Number.parseFloat(i);return o||s?(n=n.split(",")[0],i=i.split(",")[0],(Number.parseFloat(n)+Number.parseFloat(i))*e):0},c=t=>{t.dispatchEvent(new Event(n))},h=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),u=t=>h(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(t):null,d=t=>{if(!h(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),n=t.closest("details:not([open])");if(!n)return e;if(n!==t){const e=t.closest("summary");if(e&&e.parentNode!==n)return!1;if(null===e)return!1}return e},p=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),m=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?m(t.parentNode):null},f=()=>{},_=t=>{t.offsetHeight},g=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,v=[],y=t=>{"loading"===document.readyState?(v.length||document.addEventListener("DOMContentLoaded",(()=>{for(const t of v)t()})),v.push(t)):t()},b=()=>"rtl"===document.documentElement.dir,w=t=>{y((()=>{const e=g();if(e){const n=t.NAME,i=e.fn[n];e.fn[n]=t.jQueryInterface,e.fn[n].Constructor=t,e.fn[n].noConflict=()=>(e.fn[n]=i,t.jQueryInterface)}}))},x=t=>{"function"==typeof t&&t()},$=(t,e,i=!0)=>{if(!i)return void x(t);const o=5,s=l(e)+o;let r=!1;const a=({target:i})=>{i===e&&(r=!0,e.removeEventListener(n,a),x(t))};e.addEventListener(n,a),setTimeout((()=>{r||c(e)}),s)},L=(t,e,n,i)=>{const o=t.length;let s=t.indexOf(e);return-1===s?!n&&i?t[o-1]:t[0]:(s+=n?1:-1,i&&(s=(s+o)%o),t[Math.max(0,Math.min(s,o-1))])},T=/[^.]*(?=\..*)\.|.*/,P=/\..*/,M=/::\d+$/,k={};let C=1;const E={mouseenter:"mouseover",mouseleave:"mouseout"},A=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function O(t,e){return e&&`${e}::${C++}`||t.uidEvent||C++}function S(t){const e=O(t);return t.uidEvent=e,k[e]=k[e]||{},k[e]}function z(t,e){return function n(i){return F(i,{delegateTarget:t}),n.oneOff&&H.off(t,i.type,e),e.apply(t,[i])}}function I(t,e,n){return function i(o){const s=t.querySelectorAll(e);for(let{target:r}=o;r&&r!==this;r=r.parentNode)for(const a of s)if(a===r)return F(o,{delegateTarget:r}),i.oneOff&&H.off(t,o.type,e,n),n.apply(r,[o])}}function D(t,e,n=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===n))}function B(t,e,n){const i="string"==typeof e,o=i?n:e||n;let s=R(t);return A.has(s)||(s=t),[i,o,s]}function N(t,e,n,i,o){if("string"!=typeof e||!t)return;let[s,r,a]=B(e,n,i);if(e in E){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r=t(r)}const l=S(t),c=l[a]||(l[a]={}),h=D(c,r,s?n:null);if(h)return void(h.oneOff=h.oneOff&&o);const u=O(r,e.replace(T,"")),d=s?I(t,n,r):z(t,r);d.delegationSelector=s?n:null,d.callable=r,d.oneOff=o,d.uidEvent=u,c[u]=d,t.addEventListener(a,d,s)}function Z(t,e,n,i,o){const s=D(e[n],i,o);s&&(t.removeEventListener(n,s,Boolean(o)),delete e[n][s.uidEvent])}function j(t,e,n,i){const o=e[n]||{};for(const s of Object.keys(o))if(s.includes(i)){const i=o[s];Z(t,e,n,i.callable,i.delegationSelector)}}function R(t){return t=t.replace(P,""),E[t]||t}const H={on(t,e,n,i){N(t,e,n,i,!1)},one(t,e,n,i){N(t,e,n,i,!0)},off(t,e,n,i){if("string"!=typeof e||!t)return;const[o,s,r]=B(e,n,i),a=r!==e,l=S(t),c=l[r]||{},h=e.startsWith(".");if(void 0===s){if(h)for(const n of Object.keys(l))j(t,l,n,e.slice(1));for(const n of Object.keys(c)){const i=n.replace(M,"");if(!a||e.includes(i)){const e=c[n];Z(t,l,r,e.callable,e.delegationSelector)}}}else{if(!Object.keys(c).length)return;Z(t,l,r,s,o?n:null)}},trigger(t,e,n){if("string"!=typeof e||!t)return null;const i=g();let o=null,s=!0,r=!0,a=!1;e!==R(e)&&i&&(o=i.Event(e,n),i(t).trigger(o),s=!o.isPropagationStopped(),r=!o.isImmediatePropagationStopped(),a=o.isDefaultPrevented());let l=new Event(e,{bubbles:s,cancelable:!0});return l=F(l,n),a&&l.preventDefault(),r&&t.dispatchEvent(l),l.defaultPrevented&&o&&o.preventDefault(),l}};function F(t,e){for(const[n,i]of Object.entries(e||{}))try{t[n]=i}catch(e){Object.defineProperty(t,n,{configurable:!0,get:()=>i})}return t}const W=new Map,q={set(t,e,n){W.has(t)||W.set(t,new Map);const i=W.get(t);i.has(e)||0===i.size?i.set(e,n):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(i.keys())[0]}.`)},get:(t,e)=>W.has(t)&&W.get(t).get(e)||null,remove(t,e){if(!W.has(t))return;const n=W.get(t);n.delete(e),0===n.size&&W.delete(t)}};function U(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function V(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const G={setDataAttribute(t,e,n){t.setAttribute(`data-bs-${V(e)}`,n)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${V(e)}`)},getDataAttributes(t){if(!t)return{};const e={},n=Object.keys(t.dataset).filter((t=>t.startsWith("bs")&&!t.startsWith("bsConfig")));for(const i of n){let n=i.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1,n.length),e[n]=U(t.dataset[i])}return e},getDataAttribute:(t,e)=>U(t.getAttribute(`data-bs-${V(e)}`))};class K{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const n=h(e)?G.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof n?n:{},...h(e)?G.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const n of Object.keys(e)){const o=e[n],s=t[n],r=h(s)?"element":i(s);if(!new RegExp(o).test(r))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${r}" but expected type "${o}".`)}}}const Y="5.2.1";class X extends K{constructor(t,e){super(),(t=u(t))&&(this._element=t,this._config=this._getConfig(e),q.set(this._element,this.constructor.DATA_KEY,this))}dispose(){q.remove(this._element,this.constructor.DATA_KEY),H.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,n=!0){$(t,e,n)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return q.get(u(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return Y}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const J=(t,e="hide")=>{const n=`click.dismiss${t.EVENT_KEY}`,i=t.NAME;H.on(document,n,`[data-bs-dismiss="${i}"]`,(function(n){if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),p(this))return;const o=a(this)||this.closest(`.${i}`);t.getOrCreateInstance(o)[e]()}))},Q="alert",tt=".bs.alert",et=`close${tt}`,nt=`closed${tt}`,it="fade",ot="show";class st extends X{static get NAME(){return Q}close(){if(H.trigger(this._element,et).defaultPrevented)return;this._element.classList.remove(ot);const t=this._element.classList.contains(it);this._queueCallback((()=>this._destroyElement()),this._element,t)}_destroyElement(){this._element.remove(),H.trigger(this._element,nt),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=st.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}J(st,"close"),w(st);const rt="button",at="active",lt='[data-bs-toggle="button"]',ct="click.bs.button.data-api";class ht extends X{static get NAME(){return rt}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(at))}static jQueryInterface(t){return this.each((function(){const e=ht.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}H.on(document,ct,lt,(t=>{t.preventDefault();const e=t.target.closest(lt);ht.getOrCreateInstance(e).toggle()})),w(ht);const ut={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const n=[];let i=t.parentNode.closest(e);for(;i;)n.push(i),i=i.parentNode.closest(e);return n},prev(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return[n];n=n.previousElementSibling}return[]},next(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return[n];n=n.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(",");return this.find(e,t).filter((t=>!p(t)&&d(t)))}},dt="swipe",pt=".bs.swipe",mt=`touchstart${pt}`,ft=`touchmove${pt}`,_t=`touchend${pt}`,gt=`pointerdown${pt}`,vt=`pointerup${pt}`,yt="touch",bt="pen",wt="pointer-event",xt=40,$t={endCallback:null,leftCallback:null,rightCallback:null},Lt={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Tt extends K{constructor(t,e){super(),this._element=t,t&&Tt.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return $t}static get DefaultType(){return Lt}static get NAME(){return dt}dispose(){H.off(this._element,pt)}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),x(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=xt)return;const e=t/this._deltaX;this._deltaX=0,e&&x(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(H.on(this._element,gt,(t=>this._start(t))),H.on(this._element,vt,(t=>this._end(t))),this._element.classList.add(wt)):(H.on(this._element,mt,(t=>this._start(t))),H.on(this._element,ft,(t=>this._move(t))),H.on(this._element,_t,(t=>this._end(t))))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&(t.pointerType===bt||t.pointerType===yt)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const Pt="carousel",Mt=".bs.carousel",kt=".data-api",Ct=500,Et="next",At="prev",Ot="left",St="right",zt=`slide${Mt}`,It=`slid${Mt}`,Dt=`keydown${Mt}`,Bt=`mouseenter${Mt}`,Nt=`mouseleave${Mt}`,Zt=`dragstart${Mt}`,jt=`load${Mt}${kt}`,Rt=`click${Mt}${kt}`,Ht="carousel",Ft="active",Wt="slide",qt="carousel-item-end",Ut="carousel-item-start",Vt="carousel-item-next",Gt="carousel-item-prev",Kt=".active",Yt=".carousel-item",Xt=Kt+Yt,Jt=".carousel-item img",Qt=".carousel-indicators",te="[data-bs-slide], [data-bs-slide-to]",ee='[data-bs-ride="carousel"]',ne={ArrowLeft:St,ArrowRight:Ot},ie={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},oe={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class se extends X{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=ut.findOne(Qt,this._element),this._addEventListeners(),this._config.ride===Ht&&this.cycle()}static get Default(){return ie}static get DefaultType(){return oe}static get NAME(){return Pt}next(){this._slide(Et)}nextWhenVisible(){!document.hidden&&d(this._element)&&this.next()}prev(){this._slide(At)}pause(){this._isSliding&&c(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?H.one(this._element,It,(()=>this.cycle())):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void H.one(this._element,It,(()=>this.to(t)));const n=this._getItemIndex(this._getActive());if(n===t)return;const i=t>n?Et:At;this._slide(i,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&H.on(this._element,Dt,(t=>this._keydown(t))),"hover"===this._config.pause&&(H.on(this._element,Bt,(()=>this.pause())),H.on(this._element,Nt,(()=>this._maybeEnableCycle()))),this._config.touch&&Tt.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of ut.find(Jt,this._element))H.on(t,Zt,(t=>t.preventDefault()));const t={leftCallback:()=>this._slide(this._directionToOrder(Ot)),rightCallback:()=>this._slide(this._directionToOrder(St)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),Ct+this._config.interval))}};this._swipeHelper=new Tt(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=ne[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=ut.findOne(Kt,this._indicatorsElement);e.classList.remove(Ft),e.removeAttribute("aria-current");const n=ut.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);n&&(n.classList.add(Ft),n.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const n=this._getActive(),i=t===Et,o=e||L(this._getItems(),n,i,this._config.wrap);if(o===n)return;const s=this._getItemIndex(o),r=e=>H.trigger(this._element,e,{relatedTarget:o,direction:this._orderToDirection(t),from:this._getItemIndex(n),to:s});if(r(zt).defaultPrevented)return;if(!n||!o)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(s),this._activeElement=o;const l=i?Ut:qt,c=i?Vt:Gt;o.classList.add(c),_(o),n.classList.add(l),o.classList.add(l);const h=()=>{o.classList.remove(l,c),o.classList.add(Ft),n.classList.remove(Ft,c,l),this._isSliding=!1,r(It)};this._queueCallback(h,n,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains(Wt)}_getActive(){return ut.findOne(Xt,this._element)}_getItems(){return ut.find(Yt,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return b()?t===Ot?At:Et:t===Ot?Et:At}_orderToDirection(t){return b()?t===At?Ot:St:t===At?St:Ot}static jQueryInterface(t){return this.each((function(){const e=se.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}else e.to(t)}))}}H.on(document,Rt,te,(function(t){const e=a(this);if(!e||!e.classList.contains(Ht))return;t.preventDefault();const n=se.getOrCreateInstance(e),i=this.getAttribute("data-bs-slide-to");return i?(n.to(i),void n._maybeEnableCycle()):"next"===G.getDataAttribute(this,"slide")?(n.next(),void n._maybeEnableCycle()):(n.prev(),void n._maybeEnableCycle())})),H.on(window,jt,(()=>{const t=ut.find(ee);for(const e of t)se.getOrCreateInstance(e)})),w(se);const re="collapse",ae=".bs.collapse",le=`show${ae}`,ce=`shown${ae}`,he=`hide${ae}`,ue=`hidden${ae}`,de=`click${ae}.data-api`,pe="show",me="collapse",fe="collapsing",_e="collapsed",ge=`:scope .${me} .${me}`,ve="collapse-horizontal",ye="width",be="height",we=".collapse.show, .collapse.collapsing",xe='[data-bs-toggle="collapse"]',$e={parent:null,toggle:!0},Le={parent:"(null|element)",toggle:"boolean"};class Te extends X{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const n=ut.find(xe);for(const t of n){const e=r(t),n=ut.find(e).filter((t=>t===this._element));null!==e&&n.length&&this._triggerArray.push(t)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return $e}static get DefaultType(){return Le}static get NAME(){return re}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(we).filter((t=>t!==this._element)).map((t=>Te.getOrCreateInstance(t,{toggle:!1})))),t.length&&t[0]._isTransitioning)return;if(H.trigger(this._element,le).defaultPrevented)return;for(const e of t)e.hide();const e=this._getDimension();this._element.classList.remove(me),this._element.classList.add(fe),this._element.style[e]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const n=()=>{this._isTransitioning=!1,this._element.classList.remove(fe),this._element.classList.add(me,pe),this._element.style[e]="",H.trigger(this._element,ce)},i=`scroll${e[0].toUpperCase()+e.slice(1)}`;this._queueCallback(n,this._element,!0),this._element.style[e]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(H.trigger(this._element,he).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,_(this._element),this._element.classList.add(fe),this._element.classList.remove(me,pe);for(const t of this._triggerArray){const e=a(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0;const e=()=>{this._isTransitioning=!1,this._element.classList.remove(fe),this._element.classList.add(me),H.trigger(this._element,ue)};this._element.style[t]="",this._queueCallback(e,this._element,!0)}_isShown(t=this._element){return t.classList.contains(pe)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=u(t.parent),t}_getDimension(){return this._element.classList.contains(ve)?ye:be}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(xe);for(const e of t){const t=a(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=ut.find(ge,this._config.parent);return ut.find(t,this._config.parent).filter((t=>!e.includes(t)))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const n of t)n.classList.toggle(_e,!e),n.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each((function(){const n=Te.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===n[t])throw new TypeError(`No method named "${t}"`);n[t]()}}))}}H.on(document,de,xe,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();const e=r(this),n=ut.find(e);for(const t of n)Te.getOrCreateInstance(t,{toggle:!1}).toggle()})),w(Te);var Pe="top",Me="bottom",ke="right",Ce="left",Ee="auto",Ae=[Pe,Me,ke,Ce],Oe="start",Se="end",ze="clippingParents",Ie="viewport",De="popper",Be="reference",Ne=Ae.reduce((function(t,e){return t.concat([e+"-"+Oe,e+"-"+Se])}),[]),Ze=[].concat(Ae,[Ee]).reduce((function(t,e){return t.concat([e,e+"-"+Oe,e+"-"+Se])}),[]),je="beforeRead",Re="read",He="afterRead",Fe="beforeMain",We="main",qe="afterMain",Ue="beforeWrite",Ve="write",Ge="afterWrite",Ke=[je,Re,He,Fe,We,qe,Ue,Ve,Ge];function Ye(t){return t?(t.nodeName||"").toLowerCase():null}function Xe(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Je(t){return t instanceof Xe(t).Element||t instanceof Element}function Qe(t){return t instanceof Xe(t).HTMLElement||t instanceof HTMLElement}function tn(t){return"undefined"!=typeof ShadowRoot&&(t instanceof Xe(t).ShadowRoot||t instanceof ShadowRoot)}function en(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var n=e.styles[t]||{},i=e.attributes[t]||{},o=e.elements[t];Qe(o)&&Ye(o)&&(Object.assign(o.style,n),Object.keys(i).forEach((function(t){var e=i[t];!1===e?o.removeAttribute(t):o.setAttribute(t,!0===e?"":e)})))}))}function nn(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach((function(t){var i=e.elements[t],o=e.attributes[t]||{},s=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce((function(t,e){return t[e]="",t}),{});Qe(i)&&Ye(i)&&(Object.assign(i.style,s),Object.keys(o).forEach((function(t){i.removeAttribute(t)})))}))}}const on={name:"applyStyles",enabled:!0,phase:"write",fn:en,effect:nn,requires:["computeStyles"]};function sn(t){return t.split("-")[0]}var rn=Math.max,an=Math.min,ln=Math.round;function cn(){var t=navigator.userAgentData;return null!=t&&t.brands?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function hn(){return!/^((?!chrome|android).)*safari/i.test(cn())}function un(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var i=t.getBoundingClientRect(),o=1,s=1;e&&Qe(t)&&(o=t.offsetWidth>0&&ln(i.width)/t.offsetWidth||1,s=t.offsetHeight>0&&ln(i.height)/t.offsetHeight||1);var r=(Je(t)?Xe(t):window).visualViewport,a=!hn()&&n,l=(i.left+(a&&r?r.offsetLeft:0))/o,c=(i.top+(a&&r?r.offsetTop:0))/s,h=i.width/o,u=i.height/s;return{width:h,height:u,top:c,right:l+h,bottom:c+u,left:l,x:l,y:c}}function dn(t){var e=un(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}function pn(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&tn(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function mn(t){return Xe(t).getComputedStyle(t)}function fn(t){return["table","td","th"].indexOf(Ye(t))>=0}function _n(t){return((Je(t)?t.ownerDocument:t.document)||window.document).documentElement}function gn(t){return"html"===Ye(t)?t:t.assignedSlot||t.parentNode||(tn(t)?t.host:null)||_n(t)}function vn(t){return Qe(t)&&"fixed"!==mn(t).position?t.offsetParent:null}function yn(t){var e=/firefox/i.test(cn());if(/Trident/i.test(cn())&&Qe(t)&&"fixed"===mn(t).position)return null;var n=gn(t);for(tn(n)&&(n=n.host);Qe(n)&&["html","body"].indexOf(Ye(n))<0;){var i=mn(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||e&&"filter"===i.willChange||e&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}function bn(t){for(var e=Xe(t),n=vn(t);n&&fn(n)&&"static"===mn(n).position;)n=vn(n);return n&&("html"===Ye(n)||"body"===Ye(n)&&"static"===mn(n).position)?e:n||yn(t)||e}function wn(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function xn(t,e,n){return rn(t,an(e,n))}function $n(t,e,n){var i=xn(t,e,n);return i>n?n:i}function Ln(){return{top:0,right:0,bottom:0,left:0}}function Tn(t){return Object.assign({},Ln(),t)}function Pn(t,e){return e.reduce((function(e,n){return e[n]=t,e}),{})}var Mn=function(t,e){return Tn("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:Pn(t,Ae))};function kn(t){var e,n=t.state,i=t.name,o=t.options,s=n.elements.arrow,r=n.modifiersData.popperOffsets,a=sn(n.placement),l=wn(a),c=[Ce,ke].indexOf(a)>=0?"height":"width";if(s&&r){var h=Mn(o.padding,n),u=dn(s),d="y"===l?Pe:Ce,p="y"===l?Me:ke,m=n.rects.reference[c]+n.rects.reference[l]-r[l]-n.rects.popper[c],f=r[l]-n.rects.reference[l],_=bn(s),g=_?"y"===l?_.clientHeight||0:_.clientWidth||0:0,v=m/2-f/2,y=h[d],b=g-u[c]-h[p],w=g/2-u[c]/2+v,x=xn(y,w,b),$=l;n.modifiersData[i]=((e={})[$]=x,e.centerOffset=x-w,e)}}function Cn(t){var e=t.state,n=t.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=e.elements.popper.querySelector(i)))&&pn(e.elements.popper,i)&&(e.elements.arrow=i)}const En={name:"arrow",enabled:!0,phase:"main",fn:kn,effect:Cn,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function An(t){return t.split("-")[1]}var On={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Sn(t){var e=t.x,n=t.y,i=window.devicePixelRatio||1;return{x:ln(e*i)/i||0,y:ln(n*i)/i||0}}function zn(t){var e,n=t.popper,i=t.popperRect,o=t.placement,s=t.variation,r=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,h=t.roundOffsets,u=t.isFixed,d=r.x,p=void 0===d?0:d,m=r.y,f=void 0===m?0:m,_="function"==typeof h?h({x:p,y:f}):{x:p,y:f};p=_.x,f=_.y;var g=r.hasOwnProperty("x"),v=r.hasOwnProperty("y"),y=Ce,b=Pe,w=window;if(c){var x=bn(n),$="clientHeight",L="clientWidth";x===Xe(n)&&"static"!==mn(x=_n(n)).position&&"absolute"===a&&($="scrollHeight",L="scrollWidth"),(o===Pe||(o===Ce||o===ke)&&s===Se)&&(b=Me,f-=(u&&x===w&&w.visualViewport?w.visualViewport.height:x[$])-i.height,f*=l?1:-1),o!==Ce&&(o!==Pe&&o!==Me||s!==Se)||(y=ke,p-=(u&&x===w&&w.visualViewport?w.visualViewport.width:x[L])-i.width,p*=l?1:-1)}var T,P=Object.assign({position:a},c&&On),M=!0===h?Sn({x:p,y:f}):{x:p,y:f};return p=M.x,f=M.y,l?Object.assign({},P,((T={})[b]=v?"0":"",T[y]=g?"0":"",T.transform=(w.devicePixelRatio||1)<=1?"translate("+p+"px, "+f+"px)":"translate3d("+p+"px, "+f+"px, 0)",T)):Object.assign({},P,((e={})[b]=v?f+"px":"",e[y]=g?p+"px":"",e.transform="",e))}function In(t){var e=t.state,n=t.options,i=n.gpuAcceleration,o=void 0===i||i,s=n.adaptive,r=void 0===s||s,a=n.roundOffsets,l=void 0===a||a,c={placement:sn(e.placement),variation:An(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,zn(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,zn(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const Dn={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:In,data:{}};var Bn={passive:!0};function Nn(t){var e=t.state,n=t.instance,i=t.options,o=i.scroll,s=void 0===o||o,r=i.resize,a=void 0===r||r,l=Xe(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return s&&c.forEach((function(t){t.addEventListener("scroll",n.update,Bn)})),a&&l.addEventListener("resize",n.update,Bn),function(){s&&c.forEach((function(t){t.removeEventListener("scroll",n.update,Bn)})),a&&l.removeEventListener("resize",n.update,Bn)}}const Zn={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Nn,data:{}};var jn={left:"right",right:"left",bottom:"top",top:"bottom"};function Rn(t){return t.replace(/left|right|bottom|top/g,(function(t){return jn[t]}))}var Hn={start:"end",end:"start"};function Fn(t){return t.replace(/start|end/g,(function(t){return Hn[t]}))}function Wn(t){var e=Xe(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function qn(t){return un(_n(t)).left+Wn(t).scrollLeft}function Un(t,e){var n=Xe(t),i=_n(t),o=n.visualViewport,s=i.clientWidth,r=i.clientHeight,a=0,l=0;if(o){s=o.width,r=o.height;var c=hn();(c||!c&&"fixed"===e)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:r,x:a+qn(t),y:l}}function Vn(t){var e,n=_n(t),i=Wn(t),o=null==(e=t.ownerDocument)?void 0:e.body,s=rn(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),r=rn(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-i.scrollLeft+qn(t),l=-i.scrollTop;return"rtl"===mn(o||n).direction&&(a+=rn(n.clientWidth,o?o.clientWidth:0)-s),{width:s,height:r,x:a,y:l}}function Gn(t){var e=mn(t),n=e.overflow,i=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+i)}function Kn(t){return["html","body","#document"].indexOf(Ye(t))>=0?t.ownerDocument.body:Qe(t)&&Gn(t)?t:Kn(gn(t))}function Yn(t,e){var n;void 0===e&&(e=[]);var i=Kn(t),o=i===(null==(n=t.ownerDocument)?void 0:n.body),s=Xe(i),r=o?[s].concat(s.visualViewport||[],Gn(i)?i:[]):i,a=e.concat(r);return o?a:a.concat(Yn(gn(r)))}function Xn(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Jn(t,e){var n=un(t,!1,"fixed"===e);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function Qn(t,e,n){return e===Ie?Xn(Un(t,n)):Je(e)?Jn(e,n):Xn(Vn(_n(t)))}function ti(t){var e=Yn(gn(t)),n=["absolute","fixed"].indexOf(mn(t).position)>=0&&Qe(t)?bn(t):t;return Je(n)?e.filter((function(t){return Je(t)&&pn(t,n)&&"body"!==Ye(t)})):[]}function ei(t,e,n,i){var o="clippingParents"===e?ti(t):[].concat(e),s=[].concat(o,[n]),r=s[0],a=s.reduce((function(e,n){var o=Qn(t,n,i);return e.top=rn(o.top,e.top),e.right=an(o.right,e.right),e.bottom=an(o.bottom,e.bottom),e.left=rn(o.left,e.left),e}),Qn(t,r,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function ni(t){var e,n=t.reference,i=t.element,o=t.placement,s=o?sn(o):null,r=o?An(o):null,a=n.x+n.width/2-i.width/2,l=n.y+n.height/2-i.height/2;switch(s){case Pe:e={x:a,y:n.y-i.height};break;case Me:e={x:a,y:n.y+n.height};break;case ke:e={x:n.x+n.width,y:l};break;case Ce:e={x:n.x-i.width,y:l};break;default:e={x:n.x,y:n.y}}var c=s?wn(s):null;if(null!=c){var h="y"===c?"height":"width";switch(r){case Oe:e[c]=e[c]-(n[h]/2-i[h]/2);break;case Se:e[c]=e[c]+(n[h]/2-i[h]/2)}}return e}function ii(t,e){void 0===e&&(e={});var n=e,i=n.placement,o=void 0===i?t.placement:i,s=n.strategy,r=void 0===s?t.strategy:s,a=n.boundary,l=void 0===a?ze:a,c=n.rootBoundary,h=void 0===c?Ie:c,u=n.elementContext,d=void 0===u?De:u,p=n.altBoundary,m=void 0!==p&&p,f=n.padding,_=void 0===f?0:f,g=Tn("number"!=typeof _?_:Pn(_,Ae)),v=d===De?Be:De,y=t.rects.popper,b=t.elements[m?v:d],w=ei(Je(b)?b:b.contextElement||_n(t.elements.popper),l,h,r),x=un(t.elements.reference),$=ni({reference:x,element:y,strategy:"absolute",placement:o}),L=Xn(Object.assign({},y,$)),T=d===De?L:x,P={top:w.top-T.top+g.top,bottom:T.bottom-w.bottom+g.bottom,left:w.left-T.left+g.left,right:T.right-w.right+g.right},M=t.modifiersData.offset;if(d===De&&M){var k=M[o];Object.keys(P).forEach((function(t){var e=[ke,Me].indexOf(t)>=0?1:-1,n=[Pe,Me].indexOf(t)>=0?"y":"x";P[t]+=k[n]*e}))}return P}function oi(t,e){void 0===e&&(e={});var n=e,i=n.placement,o=n.boundary,s=n.rootBoundary,r=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?Ze:l,h=An(i),u=h?a?Ne:Ne.filter((function(t){return An(t)===h})):Ae,d=u.filter((function(t){return c.indexOf(t)>=0}));0===d.length&&(d=u);var p=d.reduce((function(e,n){return e[n]=ii(t,{placement:n,boundary:o,rootBoundary:s,padding:r})[sn(n)],e}),{});return Object.keys(p).sort((function(t,e){return p[t]-p[e]}))}function si(t){if(sn(t)===Ee)return[];var e=Rn(t);return[Fn(t),e,Fn(e)]}function ri(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var o=n.mainAxis,s=void 0===o||o,r=n.altAxis,a=void 0===r||r,l=n.fallbackPlacements,c=n.padding,h=n.boundary,u=n.rootBoundary,d=n.altBoundary,p=n.flipVariations,m=void 0===p||p,f=n.allowedAutoPlacements,_=e.options.placement,g=sn(_),v=l||(g!==_&&m?si(_):[Rn(_)]),y=[_].concat(v).reduce((function(t,n){return t.concat(sn(n)===Ee?oi(e,{placement:n,boundary:h,rootBoundary:u,padding:c,flipVariations:m,allowedAutoPlacements:f}):n)}),[]),b=e.rects.reference,w=e.rects.popper,x=new Map,$=!0,L=y[0],T=0;T<y.length;T++){var P=y[T],M=sn(P),k=An(P)===Oe,C=[Pe,Me].indexOf(M)>=0,E=C?"width":"height",A=ii(e,{placement:P,boundary:h,rootBoundary:u,altBoundary:d,padding:c}),O=C?k?ke:Ce:k?Me:Pe;b[E]>w[E]&&(O=Rn(O));var S=Rn(O),z=[];if(s&&z.push(A[M]<=0),a&&z.push(A[O]<=0,A[S]<=0),z.every((function(t){return t}))){L=P,$=!1;break}x.set(P,z)}if($)for(var I=function(t){var e=y.find((function(e){var n=x.get(e);if(n)return n.slice(0,t).every((function(t){return t}))}));if(e)return L=e,"break"},D=m?3:1;D>0&&"break"!==I(D);D--);e.placement!==L&&(e.modifiersData[i]._skip=!0,e.placement=L,e.reset=!0)}}const ai={name:"flip",enabled:!0,phase:"main",fn:ri,requiresIfExists:["offset"],data:{_skip:!1}};function li(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function ci(t){return[Pe,ke,Me,Ce].some((function(e){return t[e]>=0}))}function hi(t){var e=t.state,n=t.name,i=e.rects.reference,o=e.rects.popper,s=e.modifiersData.preventOverflow,r=ii(e,{elementContext:"reference"}),a=ii(e,{altBoundary:!0}),l=li(r,i),c=li(a,o,s),h=ci(l),u=ci(c);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":u})}const ui={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:hi};function di(t,e,n){var i=sn(t),o=[Ce,Pe].indexOf(i)>=0?-1:1,s="function"==typeof n?n(Object.assign({},e,{placement:t})):n,r=s[0],a=s[1];return r=r||0,a=(a||0)*o,[Ce,ke].indexOf(i)>=0?{x:a,y:r}:{x:r,y:a}}function pi(t){var e=t.state,n=t.options,i=t.name,o=n.offset,s=void 0===o?[0,0]:o,r=Ze.reduce((function(t,n){return t[n]=di(n,e.rects,s),t}),{}),a=r[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[i]=r}const mi={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:pi};function fi(t){var e=t.state,n=t.name;e.modifiersData[n]=ni({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const _i={name:"popperOffsets",enabled:!0,phase:"read",fn:fi,data:{}};function gi(t){return"x"===t?"y":"x"}function vi(t){var e=t.state,n=t.options,i=t.name,o=n.mainAxis,s=void 0===o||o,r=n.altAxis,a=void 0!==r&&r,l=n.boundary,c=n.rootBoundary,h=n.altBoundary,u=n.padding,d=n.tether,p=void 0===d||d,m=n.tetherOffset,f=void 0===m?0:m,_=ii(e,{boundary:l,rootBoundary:c,padding:u,altBoundary:h}),g=sn(e.placement),v=An(e.placement),y=!v,b=wn(g),w=gi(b),x=e.modifiersData.popperOffsets,$=e.rects.reference,L=e.rects.popper,T="function"==typeof f?f(Object.assign({},e.rects,{placement:e.placement})):f,P="number"==typeof T?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),M=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,k={x:0,y:0};if(x){if(s){var C,E="y"===b?Pe:Ce,A="y"===b?Me:ke,O="y"===b?"height":"width",S=x[b],z=S+_[E],I=S-_[A],D=p?-L[O]/2:0,B=v===Oe?$[O]:L[O],N=v===Oe?-L[O]:-$[O],Z=e.elements.arrow,j=p&&Z?dn(Z):{width:0,height:0},R=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Ln(),H=R[E],F=R[A],W=xn(0,$[O],j[O]),q=y?$[O]/2-D-W-H-P.mainAxis:B-W-H-P.mainAxis,U=y?-$[O]/2+D+W+F+P.mainAxis:N+W+F+P.mainAxis,V=e.elements.arrow&&bn(e.elements.arrow),G=V?"y"===b?V.clientTop||0:V.clientLeft||0:0,K=null!=(C=null==M?void 0:M[b])?C:0,Y=S+U-K,X=xn(p?an(z,S+q-K-G):z,S,p?rn(I,Y):I);x[b]=X,k[b]=X-S}if(a){var J,Q="x"===b?Pe:Ce,tt="x"===b?Me:ke,et=x[w],nt="y"===w?"height":"width",it=et+_[Q],ot=et-_[tt],st=-1!==[Pe,Ce].indexOf(g),rt=null!=(J=null==M?void 0:M[w])?J:0,at=st?it:et-$[nt]-L[nt]-rt+P.altAxis,lt=st?et+$[nt]+L[nt]-rt-P.altAxis:ot,ct=p&&st?$n(at,et,lt):xn(p?at:it,et,p?lt:ot);x[w]=ct,k[w]=ct-et}e.modifiersData[i]=k}}const yi={name:"preventOverflow",enabled:!0,phase:"main",fn:vi,requiresIfExists:["offset"]};function bi(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function wi(t){return t!==Xe(t)&&Qe(t)?bi(t):Wn(t)}function xi(t){var e=t.getBoundingClientRect(),n=ln(e.width)/t.offsetWidth||1,i=ln(e.height)/t.offsetHeight||1;return 1!==n||1!==i}function $i(t,e,n){void 0===n&&(n=!1);var i=Qe(e),o=Qe(e)&&xi(e),s=_n(e),r=un(t,o,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!n)&&(("body"!==Ye(e)||Gn(s))&&(a=wi(e)),Qe(e)?((l=un(e,!0)).x+=e.clientLeft,l.y+=e.clientTop):s&&(l.x=qn(s))),{x:r.left+a.scrollLeft-l.x,y:r.top+a.scrollTop-l.y,width:r.width,height:r.height}}function Li(t){var e=new Map,n=new Set,i=[];function o(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!n.has(t)){var i=e.get(t);i&&o(i)}})),i.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){n.has(t.name)||o(t)})),i}function Ti(t){var e=Li(t);return Ke.reduce((function(t,n){return t.concat(e.filter((function(t){return t.phase===n})))}),[])}function Pi(t){var e;return function(){return e||(e=new Promise((function(n){Promise.resolve().then((function(){e=void 0,n(t())}))}))),e}}function Mi(t){var e=t.reduce((function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign({},n,e,{options:Object.assign({},n.options,e.options),data:Object.assign({},n.data,e.data)}):e,t}),{});return Object.keys(e).map((function(t){return e[t]}))}var ki={placement:"bottom",modifiers:[],strategy:"absolute"};function Ci(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function Ei(t){void 0===t&&(t={});var e=t,n=e.defaultModifiers,i=void 0===n?[]:n,o=e.defaultOptions,s=void 0===o?ki:o;return function(t,e,n){void 0===n&&(n=s);var o={placement:"bottom",orderedModifiers:[],options:Object.assign({},ki,s),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},r=[],a=!1,l={state:o,setOptions:function(n){var r="function"==typeof n?n(o.options):n;h(),o.options=Object.assign({},s,o.options,r),o.scrollParents={reference:Je(t)?Yn(t):t.contextElement?Yn(t.contextElement):[],popper:Yn(e)};var a=Ti(Mi([].concat(i,o.options.modifiers)));return o.orderedModifiers=a.filter((function(t){return t.enabled})),c(),l.update()},forceUpdate:function(){if(!a){var t=o.elements,e=t.reference,n=t.popper;if(Ci(e,n)){o.rects={reference:$i(e,bn(n),"fixed"===o.options.strategy),popper:dn(n)},o.reset=!1,o.placement=o.options.placement,o.orderedModifiers.forEach((function(t){return o.modifiersData[t.name]=Object.assign({},t.data)}));for(var i=0;i<o.orderedModifiers.length;i++)if(!0!==o.reset){var s=o.orderedModifiers[i],r=s.fn,c=s.options,h=void 0===c?{}:c,u=s.name;"function"==typeof r&&(o=r({state:o,options:h,name:u,instance:l})||o)}else o.reset=!1,i=-1}}},update:Pi((function(){return new Promise((function(t){l.forceUpdate(),t(o)}))})),destroy:function(){h(),a=!0}};if(!Ci(t,e))return l;function c(){o.orderedModifiers.forEach((function(t){var e=t.name,n=t.options,i=void 0===n?{}:n,s=t.effect;if("function"==typeof s){var a=s({state:o,name:e,instance:l,options:i}),c=function(){};r.push(a||c)}}))}function h(){r.forEach((function(t){return t()})),r=[]}return l.setOptions(n).then((function(t){!a&&n.onFirstUpdate&&n.onFirstUpdate(t)})),l}}var Ai=Ei(),Oi=Ei({defaultModifiers:[Zn,_i,Dn,on]}),Si=Ei({defaultModifiers:[Zn,_i,Dn,on,mi,ai,yi,En,ui]});const zi=Object.freeze(Object.defineProperty({__proto__:null,popperGenerator:Ei,detectOverflow:ii,createPopperBase:Ai,createPopper:Si,createPopperLite:Oi,top:Pe,bottom:Me,right:ke,left:Ce,auto:Ee,basePlacements:Ae,start:Oe,end:Se,clippingParents:ze,viewport:Ie,popper:De,reference:Be,variationPlacements:Ne,placements:Ze,beforeRead:je,read:Re,afterRead:He,beforeMain:Fe,main:We,afterMain:qe,beforeWrite:Ue,write:Ve,afterWrite:Ge,modifierPhases:Ke,applyStyles:on,arrow:En,computeStyles:Dn,eventListeners:Zn,flip:ai,hide:ui,offset:mi,popperOffsets:_i,preventOverflow:yi},Symbol.toStringTag,{value:"Module"})),Ii="dropdown",Di=".bs.dropdown",Bi=".data-api",Ni="Escape",Zi="Tab",ji="ArrowUp",Ri="ArrowDown",Hi=2,Fi=`hide${Di}`,Wi=`hidden${Di}`,qi=`show${Di}`,Ui=`shown${Di}`,Vi=`click${Di}${Bi}`,Gi=`keydown${Di}${Bi}`,Ki=`keyup${Di}${Bi}`,Yi="show",Xi="dropup",Ji="dropend",Qi="dropstart",to="dropup-center",eo="dropdown-center",no='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',io=`${no}.${Yi}`,oo=".dropdown-menu",so=".navbar",ro=".navbar-nav",ao=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",lo=b()?"top-end":"top-start",co=b()?"top-start":"top-end",ho=b()?"bottom-end":"bottom-start",uo=b()?"bottom-start":"bottom-end",po=b()?"left-start":"right-start",mo=b()?"right-start":"left-start",fo="top",_o="bottom",go={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},vo={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class yo extends X{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=ut.next(this._element,oo)[0]||ut.prev(this._element,oo)[0],this._inNavbar=this._detectNavbar()}static get Default(){return go}static get DefaultType(){return vo}static get NAME(){return Ii}toggle(){return this._isShown()?this.hide():this.show()}show(){if(p(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!H.trigger(this._element,qi,t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(ro))for(const t of[].concat(...document.body.children))H.on(t,"mouseover",f);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Yi),this._element.classList.add(Yi),H.trigger(this._element,Ui,t)}}hide(){if(p(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!H.trigger(this._element,Fi,t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))H.off(t,"mouseover",f);this._popper&&this._popper.destroy(),this._menu.classList.remove(Yi),this._element.classList.remove(Yi),this._element.setAttribute("aria-expanded","false"),G.removeDataAttribute(this._menu,"popper"),H.trigger(this._element,Wi,t)}}_getConfig(t){if("object"==typeof(t=super._getConfig(t)).reference&&!h(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${Ii.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(void 0===zi)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let t=this._element;"parent"===this._config.reference?t=this._parent:h(this._config.reference)?t=u(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const e=this._getPopperConfig();this._popper=Si(t,this._menu,e)}_isShown(){return this._menu.classList.contains(Yi)}_getPlacement(){const t=this._parent;if(t.classList.contains(Ji))return po;if(t.classList.contains(Qi))return mo;if(t.classList.contains(to))return fo;if(t.classList.contains(eo))return _o;const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains(Xi)?e?co:lo:e?uo:ho}_detectNavbar(){return null!==this._element.closest(so)}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(G.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,..."function"==typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig}}_selectMenuItem({key:t,target:e}){const n=ut.find(ao,this._menu).filter((t=>d(t)));n.length&&L(n,e,t===Ri,!n.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=yo.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(t.button===Hi||"keyup"===t.type&&t.key!==Zi)return;const e=ut.find(io);for(const n of e){const e=yo.getInstance(n);if(!e||!1===e._config.autoClose)continue;const i=t.composedPath(),o=i.includes(e._menu);if(i.includes(e._element)||"inside"===e._config.autoClose&&!o||"outside"===e._config.autoClose&&o)continue;if(e._menu.contains(t.target)&&("keyup"===t.type&&t.key===Zi||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const s={relatedTarget:e._element};"click"===t.type&&(s.clickEvent=t),e._completeHide(s)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),n=t.key===Ni,i=[ji,Ri].includes(t.key);if(!i&&!n)return;if(e&&!n)return;t.preventDefault();const o=this.matches(no)?this:ut.prev(this,no)[0]||ut.next(this,no)[0],s=yo.getOrCreateInstance(o);if(i)return t.stopPropagation(),s.show(),void s._selectMenuItem(t);s._isShown()&&(t.stopPropagation(),s.hide(),o.focus())}}H.on(document,Gi,no,yo.dataApiKeydownHandler),H.on(document,Gi,oo,yo.dataApiKeydownHandler),H.on(document,Vi,yo.clearMenus),H.on(document,Ki,yo.clearMenus),H.on(document,Vi,no,(function(t){t.preventDefault(),yo.getOrCreateInstance(this).toggle()})),w(yo);const bo=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",wo=".sticky-top",xo="padding-right",$o="margin-right";class Lo{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,xo,(e=>e+t)),this._setElementAttributes(bo,xo,(e=>e+t)),this._setElementAttributes(wo,$o,(e=>e-t))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,xo),this._resetElementAttributes(bo,xo),this._resetElementAttributes(wo,$o)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,n){const i=this.getWidth(),o=t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+i)return;this._saveInitialAttribute(t,e);const o=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${n(Number.parseFloat(o))}px`)};this._applyManipulationCallback(t,o)}_saveInitialAttribute(t,e){const n=t.style.getPropertyValue(e);n&&G.setDataAttribute(t,e,n)}_resetElementAttributes(t,e){const n=t=>{const n=G.getDataAttribute(t,e);null!==n?(G.removeDataAttribute(t,e),t.style.setProperty(e,n)):t.style.removeProperty(e)};this._applyManipulationCallback(t,n)}_applyManipulationCallback(t,e){if(h(t))e(t);else for(const n of ut.find(t,this._element))e(n)}}const To="backdrop",Po="fade",Mo="show",ko=`mousedown.bs.${To}`,Co={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Eo={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Ao extends K{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return Co}static get DefaultType(){return Eo}static get NAME(){return To}show(t){if(!this._config.isVisible)return void x(t);this._append();const e=this._getElement();this._config.isAnimated&&_(e),e.classList.add(Mo),this._emulateAnimation((()=>{x(t)}))}hide(t){this._config.isVisible?(this._getElement().classList.remove(Mo),this._emulateAnimation((()=>{this.dispose(),x(t)}))):x(t)}dispose(){this._isAppended&&(H.off(this._element,ko),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add(Po),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=u(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),H.on(t,ko,(()=>{x(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(t){$(t,this._getElement(),this._config.isAnimated)}}const Oo="focustrap",So=".bs.focustrap",zo=`focusin${So}`,Io=`keydown.tab${So}`,Do="Tab",Bo="forward",No="backward",Zo={autofocus:!0,trapElement:null},jo={autofocus:"boolean",trapElement:"element"};class Ro extends K{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Zo}static get DefaultType(){return jo}static get NAME(){return Oo}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),H.off(document,So),H.on(document,zo,(t=>this._handleFocusin(t))),H.on(document,Io,(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,H.off(document,So))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const n=ut.focusableChildren(e);0===n.length?e.focus():this._lastTabNavDirection===No?n[n.length-1].focus():n[0].focus()}_handleKeydown(t){t.key===Do&&(this._lastTabNavDirection=t.shiftKey?No:Bo)}}const Ho="modal",Fo=".bs.modal",Wo="Escape",qo=`hide${Fo}`,Uo=`hidePrevented${Fo}`,Vo=`hidden${Fo}`,Go=`show${Fo}`,Ko=`shown${Fo}`,Yo=`resize${Fo}`,Xo=`click.dismiss${Fo}`,Jo=`mousedown.dismiss${Fo}`,Qo=`keydown.dismiss${Fo}`,ts=`click${Fo}.data-api`,es="modal-open",ns="fade",is="show",os="modal-static",ss=".modal.show",rs=".modal-dialog",as=".modal-body",ls='[data-bs-toggle="modal"]',cs={backdrop:!0,focus:!0,keyboard:!0},hs={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class us extends X{constructor(t,e){super(t,e),this._dialog=ut.findOne(rs,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new Lo,this._addEventListeners()}static get Default(){return cs}static get DefaultType(){return hs}static get NAME(){return Ho}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||H.trigger(this._element,Go,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(es),this._adjustDialog(),this._backdrop.show((()=>this._showElement(t))))}hide(){this._isShown&&!this._isTransitioning&&(H.trigger(this._element,qo).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(is),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated())))}dispose(){for(const t of[window,this._dialog])H.off(t,Fo);this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Ao({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Ro({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const e=ut.findOne(as,this._dialog);e&&(e.scrollTop=0),_(this._element),this._element.classList.add(is);const n=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,H.trigger(this._element,Ko,{relatedTarget:t})};this._queueCallback(n,this._dialog,this._isAnimated())}_addEventListeners(){H.on(this._element,Qo,(t=>{if(t.key===Wo)return this._config.keyboard?(t.preventDefault(),void this.hide()):void this._triggerBackdropTransition()})),H.on(window,Yo,(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),H.on(this._element,Jo,(t=>{H.one(this._element,Xo,(e=>{this._dialog.contains(t.target)||this._dialog.contains(e.target)||("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(es),this._resetAdjustments(),this._scrollBar.reset(),H.trigger(this._element,Vo)}))}_isAnimated(){return this._element.classList.contains(ns)}_triggerBackdropTransition(){if(H.trigger(this._element,Uo).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(os)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(os),this._queueCallback((()=>{this._element.classList.remove(os),this._queueCallback((()=>{this._element.style.overflowY=e}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),n=e>0;if(n&&!t){const t=b()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!n&&t){const t=b()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const n=us.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===n[t])throw new TypeError(`No method named "${t}"`);n[t](e)}}))}}H.on(document,ts,ls,(function(t){const e=a(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),H.one(e,Go,(t=>{t.defaultPrevented||H.one(e,Vo,(()=>{d(this)&&this.focus()}))}));const n=ut.findOne(ss);n&&us.getInstance(n).hide(),us.getOrCreateInstance(e).toggle(this)})),J(us),w(us);const ds="offcanvas",ps=".bs.offcanvas",ms=".data-api",fs=`load${ps}${ms}`,_s="Escape",gs="show",vs="showing",ys="hiding",bs="offcanvas-backdrop",ws=".offcanvas.show",xs=`show${ps}`,$s=`shown${ps}`,Ls=`hide${ps}`,Ts=`hidePrevented${ps}`,Ps=`hidden${ps}`,Ms=`resize${ps}`,ks=`click${ps}${ms}`,Cs=`keydown.dismiss${ps}`,Es='[data-bs-toggle="offcanvas"]',As={backdrop:!0,keyboard:!0,scroll:!1},Os={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Ss extends X{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return As}static get DefaultType(){return Os}static get NAME(){return ds}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown)return;if(H.trigger(this._element,xs,{relatedTarget:t}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||(new Lo).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(vs);const e=()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(gs),this._element.classList.remove(vs),H.trigger(this._element,$s,{relatedTarget:t})};this._queueCallback(e,this._element,!0)}hide(){if(!this._isShown)return;if(H.trigger(this._element,Ls).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(ys),this._backdrop.hide();const t=()=>{this._element.classList.remove(gs,ys),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new Lo).reset(),H.trigger(this._element,Ps)};this._queueCallback(t,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=()=>{"static"!==this._config.backdrop?this.hide():H.trigger(this._element,Ts)},e=Boolean(this._config.backdrop);return new Ao({className:bs,isVisible:e,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:e?t:null})}_initializeFocusTrap(){return new Ro({trapElement:this._element})}_addEventListeners(){H.on(this._element,Cs,(t=>{t.key===_s&&(this._config.keyboard?this.hide():H.trigger(this._element,Ts))}))}static jQueryInterface(t){return this.each((function(){const e=Ss.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}H.on(document,ks,Es,(function(t){const e=a(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),p(this))return;H.one(e,Ps,(()=>{d(this)&&this.focus()}));const n=ut.findOne(ws);n&&n!==e&&Ss.getInstance(n).hide(),Ss.getOrCreateInstance(e).toggle(this)})),H.on(window,fs,(()=>{for(const t of ut.find(ws))Ss.getOrCreateInstance(t).show()})),H.on(window,Ms,(()=>{for(const t of ut.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&Ss.getOrCreateInstance(t).hide()})),J(Ss),w(Ss);const zs=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Is=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,Ds=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,Bs=(t,e)=>{const n=t.nodeName.toLowerCase();return e.includes(n)?!zs.has(n)||Boolean(Is.test(t.nodeValue)||Ds.test(t.nodeValue)):e.filter((t=>t instanceof RegExp)).some((t=>t.test(n)))},Ns={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]};function Zs(t,e,n){if(!t.length)return t;if(n&&"function"==typeof n)return n(t);const i=(new window.DOMParser).parseFromString(t,"text/html"),o=[].concat(...i.body.querySelectorAll("*"));for(const t of o){const n=t.nodeName.toLowerCase();if(!Object.keys(e).includes(n)){t.remove();continue}const i=[].concat(...t.attributes),o=[].concat(e["*"]||[],e[n]||[]);for(const e of i)Bs(e,o)||t.removeAttribute(e.nodeName)}return i.body.innerHTML}const js="TemplateFactory",Rs={allowList:Ns,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},Hs={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},Fs={entry:"(string|element|function|null)",selector:"(string|element)"};class Ws extends K{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return Rs}static get DefaultType(){return Hs}static get NAME(){return js}getContent(){return Object.values(this._config.content).map((t=>this._resolvePossibleFunction(t))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[e,n]of Object.entries(this._config.content))this._setContent(t,n,e);const e=t.children[0],n=this._resolvePossibleFunction(this._config.extraClass);return n&&e.classList.add(...n.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,n]of Object.entries(t))super._typeCheckConfig({selector:e,entry:n},Fs)}_setContent(t,e,n){const i=ut.findOne(n,t);i&&((e=this._resolvePossibleFunction(e))?h(e)?this._putElementInTemplate(u(e),i):this._config.html?i.innerHTML=this._maybeSanitize(e):i.textContent=e:i.remove())}_maybeSanitize(t){return this._config.sanitize?Zs(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return"function"==typeof t?t(this):t}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const qs="tooltip",Us=new Set(["sanitize","allowList","sanitizeFn"]),Vs="fade",Gs="show",Ks=".tooltip-inner",Ys=".modal",Xs="hide.bs.modal",Js="hover",Qs="focus",tr="click",er="manual",nr="hide",ir="hidden",or="show",sr="shown",rr="inserted",ar="click",lr="focusin",cr="focusout",hr="mouseenter",ur="mouseleave",dr={AUTO:"auto",TOP:"top",RIGHT:b()?"left":"right",BOTTOM:"bottom",LEFT:b()?"right":"left"},pr={allowList:Ns,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,0],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},mr={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class fr extends X{constructor(t,e){if(void 0===zi)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t,e),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners()}static get Default(){return pr}static get DefaultType(){return mr}static get NAME(){return qs}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(t){if(this._isEnabled){if(t){const e=this._initializeOnDelegatedTarget(t);return e._activeTrigger.click=!e._activeTrigger.click,void(e._isWithActiveTrigger()?e._enter():e._leave())}this._isShown()?this._leave():this._enter()}}dispose(){clearTimeout(this._timeout),H.off(this._element.closest(Ys),Xs,this._hideModalHandler),this.tip&&this.tip.remove(),this._config.originalTitle&&this._element.setAttribute("title",this._config.originalTitle),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=H.trigger(this._element,this.constructor.eventName(or)),e=(m(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!e)return;this.tip&&(this.tip.remove(),this.tip=null);const n=this._getTipElement();this._element.setAttribute("aria-describedby",n.getAttribute("id"));const{container:i}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(i.append(n),H.trigger(this._element,this.constructor.eventName(rr))),this._popper?this._popper.update():this._popper=this._createPopper(n),n.classList.add(Gs),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))H.on(t,"mouseover",f);const o=()=>{H.trigger(this._element,this.constructor.eventName(sr)),!1===this._isHovered&&this._leave(),this._isHovered=!1};this._queueCallback(o,this.tip,this._isAnimated())}hide(){if(!this._isShown())return;if(H.trigger(this._element,this.constructor.eventName(nr)).defaultPrevented)return;const t=this._getTipElement();if(t.classList.remove(Gs),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))H.off(t,"mouseover",f);this._activeTrigger[tr]=!1,this._activeTrigger[Qs]=!1,this._activeTrigger[Js]=!1,this._isHovered=null;const e=()=>{this._isWithActiveTrigger()||(this._isHovered||t.remove(),this._element.removeAttribute("aria-describedby"),H.trigger(this._element,this.constructor.eventName(ir)),this._disposePopper())};this._queueCallback(e,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(Vs,Gs),e.classList.add(`bs-${this.constructor.NAME}-auto`);const n=o(this.constructor.NAME).toString();return e.setAttribute("id",n),this._isAnimated()&&e.classList.add(Vs),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new Ws({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[Ks]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._config.originalTitle}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(Vs)}_isShown(){return this.tip&&this.tip.classList.contains(Gs)}_createPopper(t){const e="function"==typeof this._config.placement?this._config.placement.call(this,t,this._element):this._config.placement,n=dr[e.toUpperCase()];return Si(this._element,t,this._getPopperConfig(n))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return"function"==typeof t?t.call(this._element):t}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]};return{...e,..."function"==typeof this._config.popperConfig?this._config.popperConfig(e):this._config.popperConfig}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)H.on(this._element,this.constructor.eventName(ar),this._config.selector,(t=>this.toggle(t)));else if(e!==er){const t=e===Js?this.constructor.eventName(hr):this.constructor.eventName(lr),n=e===Js?this.constructor.eventName(ur):this.constructor.eventName(cr);H.on(this._element,t,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?Qs:Js]=!0,e._enter()})),H.on(this._element,n,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?Qs:Js]=e._element.contains(t.relatedTarget),e._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},H.on(this._element.closest(Ys),Xs,this._hideModalHandler),this._config.selector?this._config={...this._config,trigger:"manual",selector:""}:this._fixTitle()}_fixTitle(){const t=this._config.originalTitle;t&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=G.getDataAttributes(this._element);for(const t of Object.keys(e))Us.has(t)&&delete e[t];return t={...e,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:u(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t.originalTitle=this._element.getAttribute("title")||"","number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const e in this._config)this.constructor.Default[e]!==this._config[e]&&(t[e]=this._config[e]);return t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null)}static jQueryInterface(t){return this.each((function(){const e=fr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}w(fr);const _r="popover",gr=".popover-header",vr=".popover-body",yr={...fr.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},br={...fr.DefaultType,content:"(null|string|element|function)"};class wr extends fr{static get Default(){return yr}static get DefaultType(){return br}static get NAME(){return _r}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[gr]:this._getTitle(),[vr]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each((function(){const e=wr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}w(wr);const xr="scrollspy",$r=".bs.scrollspy",Lr=`activate${$r}`,Tr=`click${$r}`,Pr=`load${$r}.data-api`,Mr="dropdown-item",kr="active",Cr='[data-bs-spy="scroll"]',Er="[href]",Ar=".nav, .list-group",Or=".nav-link",Sr=`${Or}, .nav-item > ${Or}, .list-group-item`,zr=".dropdown",Ir=".dropdown-toggle",Dr={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Br={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Nr extends X{constructor(t,e){super(t,e),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Dr}static get DefaultType(){return Br}static get NAME(){return xr}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=u(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,"string"==typeof t.threshold&&(t.threshold=t.threshold.split(",").map((t=>Number.parseFloat(t)))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(H.off(this._config.target,Tr),H.on(this._config.target,Tr,Er,(t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const n=this._rootElement||window,i=e.offsetTop-this._element.offsetTop;if(n.scrollTo)return void n.scrollTo({top:i,behavior:"smooth"});n.scrollTop=i}})))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((t=>this._observerCallback(t)),t)}_observerCallback(t){const e=t=>this._targetLinks.get(`#${t.target.id}`),n=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop,this._process(e(t))},i=(this._rootElement||document.documentElement).scrollTop,o=i>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=i;for(const s of t){if(!s.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(s));continue}const t=s.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(o&&t){if(n(s),!i)return}else o||t||n(s)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=ut.find(Er,this._config.target);for(const e of t){if(!e.hash||p(e))continue;const t=ut.findOne(e.hash,this._element);d(t)&&(this._targetLinks.set(e.hash,e),this._observableSections.set(e.hash,t))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(kr),this._activateParents(t),H.trigger(this._element,Lr,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains(Mr))ut.findOne(Ir,t.closest(zr)).classList.add(kr);else for(const e of ut.parents(t,Ar))for(const t of ut.prev(e,Sr))t.classList.add(kr)}_clearActiveClass(t){t.classList.remove(kr);const e=ut.find(`${Er}.${kr}`,t);for(const t of e)t.classList.remove(kr)}static jQueryInterface(t){return this.each((function(){const e=Nr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}H.on(window,Pr,(()=>{for(const t of ut.find(Cr))Nr.getOrCreateInstance(t)})),w(Nr);const Zr="tab",jr=".bs.tab",Rr=`hide${jr}`,Hr=`hidden${jr}`,Fr=`show${jr}`,Wr=`shown${jr}`,qr=`click${jr}`,Ur=`keydown${jr}`,Vr=`load${jr}`,Gr="ArrowLeft",Kr="ArrowRight",Yr="ArrowUp",Xr="ArrowDown",Jr="active",Qr="fade",ta="show",ea="dropdown",na=".dropdown-toggle",ia=".dropdown-menu",oa=".dropdown-item",sa=":not(.dropdown-toggle)",ra='.list-group, .nav, [role="tablist"]',aa=".nav-item, .list-group-item",la='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',ca=`.nav-link${sa}, .list-group-item${sa}, [role="tab"]${sa}, ${la}`,ha=`.${Jr}[data-bs-toggle="tab"], .${Jr}[data-bs-toggle="pill"], .${Jr}[data-bs-toggle="list"]`;class ua extends X{constructor(t){super(t),this._parent=this._element.closest(ra),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),H.on(this._element,Ur,(t=>this._keydown(t))))}static get NAME(){return Zr}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),n=e?H.trigger(e,Rr,{relatedTarget:t}):null;H.trigger(t,Fr,{relatedTarget:e}).defaultPrevented||n&&n.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){if(!t)return;t.classList.add(Jr),this._activate(a(t));const n=()=>{"tab"===t.getAttribute("role")?(t.focus(),t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),H.trigger(t,Wr,{relatedTarget:e})):t.classList.add(ta)};this._queueCallback(n,t,t.classList.contains(Qr))}_deactivate(t,e){if(!t)return;t.classList.remove(Jr),t.blur(),this._deactivate(a(t));const n=()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),H.trigger(t,Hr,{relatedTarget:e})):t.classList.remove(ta)};this._queueCallback(n,t,t.classList.contains(Qr))}_keydown(t){if(![Gr,Kr,Yr,Xr].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=[Kr,Xr].includes(t.key),n=L(this._getChildren().filter((t=>!p(t))),t.target,e,!0);n&&ua.getOrCreateInstance(n).show()}_getChildren(){return ut.find(ca,this._parent)}_getActiveElem(){return this._getChildren().find((t=>this._elemIsActive(t)))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),n=this._getOuterElement(t);t.setAttribute("aria-selected",e),n!==t&&this._setAttributeIfNotExists(n,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=a(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`#${t.id}`))}_toggleDropDown(t,e){const n=this._getOuterElement(t);if(!n.classList.contains(ea))return;const i=(t,i)=>{const o=ut.findOne(t,n);o&&o.classList.toggle(i,e)};i(na,Jr),i(ia,ta),i(oa,Jr),n.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,n){t.hasAttribute(e)||t.setAttribute(e,n)}_elemIsActive(t){return t.classList.contains(Jr)}_getInnerElement(t){return t.matches(ca)?t:ut.findOne(ca,t)}_getOuterElement(t){return t.closest(aa)||t}static jQueryInterface(t){return this.each((function(){const e=ua.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}H.on(document,qr,la,(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),p(this)||ua.getOrCreateInstance(this).show()})),H.on(window,Vr,(()=>{for(const t of ut.find(ha))ua.getOrCreateInstance(t)})),w(ua);const da="toast",pa=".bs.toast",ma=`mouseover${pa}`,fa=`mouseout${pa}`,_a=`focusin${pa}`,ga=`focusout${pa}`,va=`hide${pa}`,ya=`hidden${pa}`,ba=`show${pa}`,wa=`shown${pa}`,xa="fade",$a="hide",La="show",Ta="showing",Pa={animation:"boolean",autohide:"boolean",delay:"number"},Ma={animation:!0,autohide:!0,delay:5e3};class ka extends X{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Ma}static get DefaultType(){return Pa}static get NAME(){return da}show(){if(H.trigger(this._element,ba).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(xa);const t=()=>{this._element.classList.remove(Ta),H.trigger(this._element,wa),this._maybeScheduleHide()};this._element.classList.remove($a),_(this._element),this._element.classList.add(La,Ta),this._queueCallback(t,this._element,this._config.animation)}hide(){if(!this.isShown())return;if(H.trigger(this._element,va).defaultPrevented)return;const t=()=>{this._element.classList.add($a),this._element.classList.remove(Ta,La),H.trigger(this._element,ya)};this._element.classList.add(Ta),this._queueCallback(t,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(La),super.dispose()}isShown(){return this._element.classList.contains(La)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const n=t.relatedTarget;this._element===n||this._element.contains(n)||this._maybeScheduleHide()}_setListeners(){H.on(this._element,ma,(t=>this._onInteraction(t,!0))),H.on(this._element,fa,(t=>this._onInteraction(t,!1))),H.on(this._element,_a,(t=>this._onInteraction(t,!0))),H.on(this._element,ga,(t=>this._onInteraction(t,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=ka.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}J(ka),w(ka)})();const ht=[];function ut(e,n=t){let i;const o=new Set;function s(t){if(r(e,t)&&(e=t,i)){const t=!ht.length;for(const t of o)t[1](),ht.push(t,e);if(t){for(let t=0;t<ht.length;t+=2)ht[t][0](ht[t+1]);ht.length=0}}}return{set:s,update:function(t){s(t(e))},subscribe:function(r,a=t){const l=[r,a];return o.add(l),1===o.size&&(i=n(s)||t),r(e),()=>{o.delete(l),0===o.size&&(i(),i=null)}}}}const dt=ut(),pt=ut(),mt=ut(),ft=ut(),_t=ut(),gt=Nominatim_Config.Reverse_Only?"reverse":"search",vt=[gt,"reverse","details","deletable","polygons","status","about"];function yt(t,e){if(void 0===t)t=window.location.pathname.replace(".html","").replace(/^.*\//,""),vt.includes(t)||(t=gt),e=new URLSearchParams(window.location.search);else{vt.includes(t)||(t=gt),void 0===e&&(e=new URLSearchParams);let n=e.toString();n&&(n="?"+n);let i=t+".html"+n;window.location.protocol.match(/^http/)?window.history.pushState([],"",i):window.location.href=i}_t.set({tab:t,params:e}),mt.set(null),ft.set(null)}function bt(e){let n;return{c(){n=x("footer"),n.innerHTML='<p class="disclaimer svelte-1f2bd8l">Addresses and postcodes are approximate</p> \n <p class="copyright svelte-1f2bd8l">© <a href="https://osm.org/copyright">OpenStreetMap</a> contributors</p>',E(n,"class","svelte-1f2bd8l")},m(t,e){y(t,n,e)},p:t,i:t,o:t,d(t){t&&b(n)}}}class wt extends lt{constructor(t){super(),at(this,t,null,bt,r,{})}}function xt(t){var e=document.getElementById("loading");e&&(e.style.display="start"===t?"block":null)}async function $t(t,e,n){var i=function(t,e){1===e.dedupe&&delete e.dedupe;return function(t,e){for(var n=Object.keys(e),i=0;i<n.length;i+=1)t[n[i]]=e[n[i]]}(e,Nominatim_Config.Nominatim_API_Endpoint_Params),Pt(t)+"?"+Object.keys(function(t){for(var e=Object.keys(t),n=0;n<e.length;n+=1){var i=t[e[n]];void 0!==i&&""!==i&&null!==i||delete t[e[n]]}return t}(e)).map((t=>encodeURIComponent(t)+"="+encodeURIComponent(e[t]))).join("&")}(t,e),o=new URLSearchParams(window.location.search);o&&o.get("httpbin_status")&&(i="https://httpbin.org/status/"+parseInt(o.get("httpbin_status"),10)),xt("start"),"status"!==t&&mt.set(null);try{await fetch(i,{headers:Nominatim_Config.Nominatim_API_Endpoint_Headers||{}}).then((async t=>{if(t.status>=200&&t.status<300||404===t.status){var e;try{e=await t.json()}catch(t){return void ft.set(`Error parsing JSON data from ${i} (${t})`)}return e}ft.set(`Error fetching data from ${i} (${t.statusText})`)})).then((t=>{t&&(t.error&&ft.set(t.error.message),n(t)),xt("finish")}))}catch(t){ft.set(`Error fetching data from ${i} (${t})`),xt("finish")}"status"!==t&&mt.set(i)}var Lt={};async function Tt(t,e){if(window.location.protocol.match(/^http/))if(Lt[t])e.innerHTML=Lt[t];else try{await fetch(t).then((t=>t.text())).then((n=>{n=n.replace("Nominatim_API_Endpoint",Pt()),e.innerHTML=n,Lt[t]=n}))}catch(n){e.innerHTML=`Error fetching content from ${t} (${n})`}else e.innerHTML=`Cannot display data from ${t} here. Browser security prevents loading content from file:// URLs.`}function Pt(t){var e=Nominatim_Config.Nominatim_API_Endpoint;return"function"==typeof e?e(t):t?e+t+".php":e}function Mt(t){document.title=[t,Nominatim_Config.Page_Title].filter((t=>t&&t.length>1)).join(" | ")}function kt(t){let e,n,i,o;const s=t[6].default,r=p(s,t,t[5],null);return{c(){e=x("a"),r&&r.c(),E(e,"href",t[1]),E(e,"class",t[0])},m(s,a){y(s,e,a),r&&r.m(e,null),n=!0,i||(o=M(e,"click",C(k(t[2]))),i=!0)},p(t,[i]){r&&r.p&&(!n||32&i)&&_(r,s,t,t[5],n?f(s,t[5],i,null):g(t[5]),null),(!n||2&i)&&E(e,"href",t[1]),(!n||1&i)&&E(e,"class",t[0])},i(t){n||(tt(r,t),n=!0)},o(t){et(r,t),n=!1},d(t){t&&b(e),r&&r.d(t),i=!1,o()}}}function Ct(t,e,n){let{$$slots:i={},$$scope:o}=e,{page:s}=e,{params_hash:r={}}=e,{extra_classes:a=""}=e,l=s+".html";return t.$$set=t=>{"page"in t&&n(3,s=t.page),"params_hash"in t&&n(4,r=t.params_hash),"extra_classes"in t&&n(0,a=t.extra_classes),"$$scope"in t&&n(5,o=t.$$scope)},t.$$.update=()=>{if(24&t.$$.dirty){let t=new URLSearchParams(r).toString();n(1,l=s+".html"+(t?"?":"")+t)}},[a,l,function(){yt(s,new URLSearchParams(r))},s,r,o,i]}class Et extends lt{constructor(t){super(),at(this,t,Ct,kt,r,{page:3,params_hash:4,extra_classes:0})}}function At(t){let e,n,i,o;const s=t[7].default,r=p(s,t,t[6],null);return{c(){e=x("a"),r&&r.c(),E(e,"href",t[2]),E(e,"class",t[0])},m(s,a){y(s,e,a),r&&r.m(e,null),n=!0,i||(o=M(e,"click",C(k(t[8]))),i=!0)},p(t,[i]){r&&r.p&&(!n||64&i)&&_(r,s,t,t[6],n?f(s,t[6],i,null):g(t[6]),null),(!n||4&i)&&E(e,"href",t[2]),(!n||1&i)&&E(e,"class",t[0])},i(t){n||(tt(r,t),n=!0)},o(t){et(r,t),n=!1},d(t){t&&b(e),r&&r.d(t),i=!1,o()}}}function Ot(t,e,n){let{$$slots:i={},$$scope:o}=e,{lat:s=null}=e,{lon:r=null}=e,{zoom:a=null}=e,{extra_classes:l=""}=e,c=new URLSearchParams,h="reverse.html";return t.$$set=t=>{"lat"in t&&n(3,s=t.lat),"lon"in t&&n(4,r=t.lon),"zoom"in t&&n(5,a=t.zoom),"extra_classes"in t&&n(0,l=t.extra_classes),"$$scope"in t&&n(6,o=t.$$scope)},t.$$.update=()=>{if(56&t.$$.dirty){let t=new URLSearchParams;s&&r&&(t.set("lat",s),t.set("lon",r),a&&t.set("zoom",a)),n(1,c=t)}if(2&t.$$.dirty){let t=c.toString();n(2,h="reverse.html"+(t?"?":"")+t)}},[l,c,h,s,r,a,o,i,()=>yt("reverse",c)]}class St extends lt{constructor(t){super(),at(this,t,Ot,At,r,{lat:3,lon:4,zoom:5,extra_classes:0})}}var zt=["second","minute","hour","day","week","month","year"];var It=["秒","分钟","小时","天","周","个月","年"];var Dt={},Bt=function(t,e){Dt[t]=e},Nt=[60,60,24,7,365/7/12,12];function Zt(t){return t instanceof Date?t:!isNaN(t)||/^\d+$/.test(t)?new Date(parseInt(t)):(t=(t||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(t))}var jt=function(t,e,n){var i=function(t,e){return(+(e?Zt(e):new Date)-+Zt(t))/1e3}(t,n&&n.relativeDate);return function(t,e){for(var n=t<0?1:0,i=t=Math.abs(t),o=0;t>=Nt[o]&&o<Nt.length;o++)t/=Nt[o];return(t=Math.floor(t))>(0==(o*=2)?9:1)&&(o+=1),e(t,o,i)[n].replace("%s",t.toString())}(i,function(t){return Dt[t]||Dt.en_US}(e))};function Rt(t){let e,n,i,o,s,r,a,l,c,h,u;return{c(){e=x("div"),n=$("Data from "),i=x("a"),o=$("API request"),s=T(),r=x("span"),a=$("("),l=x("a"),c=$("debug output"),u=$(")"),E(i,"href",t[1]),E(l,"href",h=t[1]+"&debug=1"),E(r,"id","api-request-debug"),E(e,"id","api-request")},m(t,h){y(t,e,h),v(e,n),v(e,i),v(i,o),v(e,s),v(e,r),v(r,a),v(r,l),v(l,c),v(r,u)},p(t,e){2&e&&E(i,"href",t[1]),2&e&&h!==(h=t[1]+"&debug=1")&&E(l,"href",h)},d(t){t&&b(e)}}}function Ht(t){let e,n,i,o,s=jt(new Date(t[0]))+"";return{c(){e=$("Data last updated:\n "),n=x("abbr"),i=$(s),E(n,"id","data-date"),E(n,"title",o=t[0]+" (UTC timezone)")},m(t,o){y(t,e,o),y(t,n,o),v(n,i)},p(t,e){1&e&&s!==(s=jt(new Date(t[0]))+"")&&A(i,s),1&e&&o!==(o=t[0]+" (UTC timezone)")&&E(n,"title",o)},d(t){t&&b(e),t&&b(n)}}}function Ft(t){let e;return{c(){e=$("Details")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function Wt(t){let e,n,i,o,s,r,a,l,c,h,u,d=t[1]&&Rt(t),p=t[0]&&Ht(t);return c=new Et({props:{page:"status",$$slots:{default:[Ft]},$$scope:{ctx:t}}}),{c(){e=x("div"),n=x("div"),n.innerHTML='<div class="spinner-border spinner-border-sm text-primary me-1" role="status"></div>\n Loading data from API ...',i=T(),o=x("div"),s=x("div"),d&&d.c(),r=T(),a=x("div"),p&&p.c(),l=$("\n ("),it(c.$$.fragment),h=$(")"),E(n,"id","loading"),E(n,"class","py-2 px-4 svelte-1i1228w"),E(s,"class","col-sm-6"),E(a,"class","col-sm-6 text-end"),E(o,"class","row"),E(e,"id","last-updated"),E(e,"class","container-fluid py-2 px-4 mb-3 svelte-1i1228w")},m(t,m){y(t,e,m),v(e,n),v(e,i),v(e,o),v(o,s),d&&d.m(s,null),v(o,r),v(o,a),p&&p.m(a,null),v(a,l),ot(c,a,null),v(a,h),u=!0},p(t,[e]){t[1]?d?d.p(t,e):(d=Rt(t),d.c(),d.m(s,null)):d&&(d.d(1),d=null),t[0]?p?p.p(t,e):(p=Ht(t),p.c(),p.m(a,l)):p&&(p.d(1),p=null);const n={};8&e&&(n.$$scope={dirty:e,ctx:t}),c.$set(n)},i(t){u||(tt(c.$$.fragment,t),u=!0)},o(t){et(c.$$.fragment,t),u=!1},d(t){t&&b(e),d&&d.d(),p&&p.d(),st(c)}}}function qt(t,e,n){let i,o,s=!1;return mt.subscribe((t=>{n(1,o=t),o&&(n(1,o=new URL(o,window.location.origin)),o.searchParams.delete("polygon_geojson"),n(1,o=o.toString())),s||i||(s=!0,$t("status",{format:"json"},(function(t){n(0,i=t.data_updated),s=!1})))})),[i,o]}Bt("en_US",(function(t,e){if(0===e)return["just now","right now"];var n=zt[Math.floor(e/2)];return t>1&&(n+="s"),[t+" "+n+" ago","in "+t+" "+n]})),Bt("zh_CN",(function(t,e){if(0===e)return["刚刚","片刻后"];var n=It[~~(e/2)];return[t+" "+n+"前",t+" "+n+"后"]}));class Ut extends lt{constructor(t){super(),at(this,t,qt,Wt,r,{})}}function Vt(t){let e,n,i,o,s,r;return{c(){e=x("div"),n=$(t[0]),i=T(),o=x("button"),E(o,"type","button"),E(o,"class","btn-close float-end"),E(o,"aria-label","dismiss"),E(e,"id","error"),E(e,"class","container-fluid alert-danger py-3 px-4")},m(a,l){y(a,e,l),v(e,n),v(e,i),v(e,o),s||(r=M(o,"click",t[1]),s=!0)},p(t,e){1&e&&A(n,t[0])},d(t){t&&b(e),s=!1,r()}}}function Gt(e){let n,i=e[0]&&Vt(e);return{c(){i&&i.c(),n=P()},m(t,e){i&&i.m(t,e),y(t,n,e)},p(t,[e]){t[0]?i?i.p(t,e):(i=Vt(t),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},i:t,o:t,d(t){i&&i.d(t),t&&b(n)}}}function Kt(t,e,n){let i;return ft.subscribe((t=>{n(0,i=t)})),[i,function(){ft.set(null)}]}class Yt extends lt{constructor(t){super(),at(this,t,Kt,Gt,r,{})}}function Xt(t){let e,n,i,o,s;return{c(){e=x("img"),i=T(),o=x("h1"),s=$(t[3]),E(e,"alt","logo"),E(e,"id","theme-logo"),c(e.src,n="theme/logo.png")||E(e,"src","theme/logo.png"),E(e,"class","svelte-1q88nx"),E(o,"class","svelte-1q88nx")},m(t,n){y(t,e,n),y(t,i,n),y(t,o,n),v(o,s)},p(t,e){8&e&&A(s,t[3])},d(t){t&&b(e),t&&b(i),t&&b(o)}}}function Jt(t){let e,n,i;return n=new Et({props:{page:"search",extra_classes:"nav-link "+("search"===t[4]?"active":""),$$slots:{default:[Qt]},$$scope:{ctx:t}}}),{c(){e=x("li"),it(n.$$.fragment),E(e,"class","nav-item svelte-1q88nx")},m(t,o){y(t,e,o),ot(n,e,null),i=!0},p(t,e){const i={};16&e&&(i.extra_classes="nav-link "+("search"===t[4]?"active":"")),128&e&&(i.$$scope={dirty:e,ctx:t}),n.$set(i)},i(t){i||(tt(n.$$.fragment,t),i=!0)},o(t){et(n.$$.fragment,t),i=!1},d(t){t&&b(e),st(n)}}}function Qt(t){let e;return{c(){e=$("Search")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function te(t){let e;return{c(){e=$("Reverse")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function ee(t){let e;return{c(){e=$("Search By ID")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function ne(t){let e;return{c(){e=$("About & Help")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function ie(t){let e,n,i,o,s,r,a,l,c,h,u,d,m,w,L,P,M,k,C,O,S,z,I,D,B,N,Z,j,R,H,F;s=new Et({props:{page:t[2]?"reverse":"search",$$slots:{default:[Xt]},$$scope:{ctx:t}}});let W=!t[2]&&Jt(t);m=new St({props:{lat:t[0],lon:t[1],extra_classes:"nav-link "+("reverse"===t[4]?"active":""),$$slots:{default:[te]},$$scope:{ctx:t}}}),P=new Et({props:{page:"details",extra_classes:"nav-link "+("details"===t[4]?"active":""),$$slots:{default:[ee]},$$scope:{ctx:t}}}),O=new Et({props:{page:"about",extra_classes:"nav-link "+("about"===t[4]?"active":""),$$slots:{default:[ne]},$$scope:{ctx:t}}});const q=t[6].default,U=p(q,t,t[7],null);return j=new Yt({}),H=new Ut({}),{c(){e=x("header"),n=x("nav"),i=x("div"),o=x("div"),it(s.$$.fragment),r=T(),a=x("button"),a.innerHTML='<span class="navbar-toggler-icon"></span>',l=T(),c=x("div"),h=x("ul"),W&&W.c(),u=T(),d=x("li"),it(m.$$.fragment),w=T(),L=x("li"),it(P.$$.fragment),M=T(),k=x("ul"),C=x("li"),it(O.$$.fragment),S=T(),z=x("section"),I=x("h2"),D=$(t[4]),B=T(),N=x("section"),U&&U.c(),Z=T(),it(j.$$.fragment),R=T(),it(H.$$.fragment),E(o,"class","navbar-brand svelte-1q88nx"),E(a,"class","navbar-toggler"),E(a,"type","button"),E(a,"data-bs-toggle","collapse"),E(a,"data-bs-target","#navbarSupportedContent"),E(a,"aria-controls","navbarSupportedContent"),E(a,"aria-expanded","false"),E(a,"aria-label","Toggle navigation"),E(d,"class","nav-item svelte-1q88nx"),E(L,"class","nav-item svelte-1q88nx"),E(h,"class","navbar-nav me-auto"),E(c,"class","collapse navbar-collapse"),E(c,"id","navbarSupportedContent"),E(C,"class","nav-item svelte-1q88nx"),E(k,"class","navbar-nav"),E(i,"class","container-fluid"),E(n,"class","navbar navbar-expand-sm navbar-light"),E(e,"class","container-fluid"),E(z,"class","page-title-section svelte-1q88nx"),E(N,"class","search-section svelte-1q88nx")},m(t,p){y(t,e,p),v(e,n),v(n,i),v(i,o),ot(s,o,null),v(i,r),v(i,a),v(i,l),v(i,c),v(c,h),W&&W.m(h,null),v(h,u),v(h,d),ot(m,d,null),v(h,w),v(h,L),ot(P,L,null),v(i,M),v(i,k),v(k,C),ot(O,C,null),y(t,S,p),y(t,z,p),v(z,I),v(I,D),y(t,B,p),y(t,N,p),U&&U.m(N,null),y(t,Z,p),ot(j,t,p),y(t,R,p),ot(H,t,p),F=!0},p(t,[e]){const n={};4&e&&(n.page=t[2]?"reverse":"search"),136&e&&(n.$$scope={dirty:e,ctx:t}),s.$set(n),t[2]?W&&(J(),et(W,1,1,(()=>{W=null})),Q()):W?(W.p(t,e),4&e&&tt(W,1)):(W=Jt(t),W.c(),tt(W,1),W.m(h,u));const i={};1&e&&(i.lat=t[0]),2&e&&(i.lon=t[1]),16&e&&(i.extra_classes="nav-link "+("reverse"===t[4]?"active":"")),128&e&&(i.$$scope={dirty:e,ctx:t}),m.$set(i);const o={};16&e&&(o.extra_classes="nav-link "+("details"===t[4]?"active":"")),128&e&&(o.$$scope={dirty:e,ctx:t}),P.$set(o);const r={};16&e&&(r.extra_classes="nav-link "+("about"===t[4]?"active":"")),128&e&&(r.$$scope={dirty:e,ctx:t}),O.$set(r),(!F||16&e)&&A(D,t[4]),U&&U.p&&(!F||128&e)&&_(U,q,t,t[7],F?f(q,t[7],e,null):g(t[7]),null)},i(t){F||(tt(s.$$.fragment,t),tt(W),tt(m.$$.fragment,t),tt(P.$$.fragment,t),tt(O.$$.fragment,t),tt(U,t),tt(j.$$.fragment,t),tt(H.$$.fragment,t),F=!0)},o(t){et(s.$$.fragment,t),et(W),et(m.$$.fragment,t),et(P.$$.fragment,t),et(O.$$.fragment,t),et(U,t),et(j.$$.fragment,t),et(H.$$.fragment,t),F=!1},d(t){t&&b(e),st(s),W&&W.d(),st(m),st(P),st(O),t&&b(S),t&&b(z),t&&b(B),t&&b(N),U&&U.d(t),t&&b(Z),st(j,t),t&&b(R),st(H,t)}}}function oe(t,e,n){let i,o,s,r;d(t,_t,(t=>n(5,r=t)));let a,l,{$$slots:c={},$$scope:h}=e;return dt.subscribe((t=>{t&&t.on("move",(function(){n(0,a=t.getCenter().lat),n(1,l=t.getCenter().lng)}))})),t.$$set=t=>{"$$scope"in t&&n(7,h=t.$$scope)},t.$$.update=()=>{32&t.$$.dirty&&n(4,i=r.tab)},n(3,o=Nominatim_Config.Page_Title),n(2,s=Nominatim_Config.Reverse_Only),[a,l,s,o,i,r,c,h]}class se extends lt{constructor(t){super(),at(this,t,oe,ie,r,{})}}function re(t){let e,n,i,o,s;const r=t[3].default,a=p(r,t,t[2],null);return{c(){e=x("form"),n=x("div"),a&&a.c(),E(n,"class","row g-2"),E(e,"class","form-inline"),E(e,"role","search"),E(e,"accept-charset","UTF-8"),E(e,"action","")},m(r,l){y(r,e,l),v(e,n),a&&a.m(n,null),i=!0,o||(s=M(e,"submit",k(t[0])),o=!0)},p(t,[e]){a&&a.p&&(!i||4&e)&&_(a,r,t,t[2],i?f(r,t[2],e,null):g(t[2]),null)},i(t){i||(tt(a,t),i=!0)},o(t){et(a,t),i=!1},d(t){t&&b(e),a&&a.d(t),o=!1,s()}}}function ae(t,e,n){let{$$slots:i={},$$scope:o}=e,{page:s}=e;return t.$$set=t=>{"page"in t&&n(1,s=t.page),"$$scope"in t&&n(2,o=t.$$scope)},[function(t){let e=t.target,n=!0;Array.prototype.slice.call(e.elements).forEach((function(t){(function(t){return!("hidden"===t.type&&t.value.length&&t.pattern&&!t.value.match(t.pattern))&&t.checkValidity()})(t)||(alert("Invalid input in "+t.name),n=!1)})),n&&yt(s,function(t){var e=new URLSearchParams;return Array.prototype.slice.call(t.elements).forEach((function(t){!t.name||t.disabled||["submit","button"].indexOf(t.type)>-1||["checkbox","radio"].indexOf(t.type)>-1&&!t.checked||void 0!==t.value&&""!==t.value&&("dedupe"!==t.name||1!==t.value&&"1"!==t.value)&&e.set(t.name,t.value)})),e}(e))},s,o,i]}class le extends lt{constructor(t){super(),at(this,t,ae,re,r,{page:1})}}function ce(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,$,L,P,M,k,C,A,O,S;return{c(){e=x("div"),n=x("input"),o=T(),s=x("div"),r=x("button"),r.textContent="Search",a=T(),l=x("input"),h=T(),u=x("input"),p=T(),m=x("input"),_=T(),g=x("input"),$=T(),L=x("input"),M=T(),k=x("input"),A=T(),O=x("input"),E(n,"id","q"),E(n,"name","q"),E(n,"type","text"),E(n,"class","form-control form-control-sm svelte-1u2ltgo"),E(n,"placeholder","Search"),n.value=i=t[1].q||"",E(e,"class","col-auto"),E(r,"type","submit"),E(r,"class","btn btn-primary btn-sm mx-1"),E(l,"type","hidden"),E(l,"name","viewbox"),l.value=c=t[2]||"",E(u,"type","hidden"),E(u,"name","dedupe"),u.value=d=0===t[1].dedupe?0:1,E(m,"type","hidden"),E(m,"name","bounded"),m.value=f=t[1].bounded?1:"",E(g,"type","hidden"),E(g,"name","accept-language"),g.value=w=t[1]["accept-language"]||"",E(L,"type","hidden"),E(L,"name","countrycodes"),L.value=P=t[1].countrycodes||"",E(L,"pattern","^[a-zA-Z]{2}(,[a-zA-Z]{2})*$"),E(k,"type","hidden"),E(k,"name","limit"),k.value=C=t[1].limit||"",E(O,"type","hidden"),E(O,"name","polygon_threshold"),O.value=S=t[1].polygon_threshold||"",E(s,"class","col-auto")},m(t,i){y(t,e,i),v(e,n),y(t,o,i),y(t,s,i),v(s,r),v(s,a),v(s,l),v(s,h),v(s,u),v(s,p),v(s,m),v(s,_),v(s,g),v(s,$),v(s,L),v(s,M),v(s,k),v(s,A),v(s,O)},p(t,e){2&e&&i!==(i=t[1].q||"")&&n.value!==i&&(n.value=i),4&e&&c!==(c=t[2]||"")&&(l.value=c),2&e&&d!==(d=0===t[1].dedupe?0:1)&&(u.value=d),2&e&&f!==(f=t[1].bounded?1:"")&&(m.value=f),2&e&&w!==(w=t[1]["accept-language"]||"")&&(g.value=w),2&e&&P!==(P=t[1].countrycodes||"")&&(L.value=P),2&e&&C!==(C=t[1].limit||"")&&(k.value=C),2&e&&S!==(S=t[1].polygon_threshold||"")&&(O.value=S)},d(t){t&&b(e),t&&b(o),t&&b(s)}}}function he(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,$,L,P,M,k,C,A,O,S,z,I,D,B,N,Z,j,R,H,F,W,q,U,V,G,K,Y,X,J,Q;return{c(){e=x("div"),n=x("input"),o=T(),s=x("div"),r=x("input"),l=T(),c=x("div"),h=x("input"),d=T(),p=x("div"),m=x("input"),_=T(),g=x("div"),w=x("input"),L=T(),P=x("div"),M=x("input"),C=T(),A=x("div"),O=x("button"),O.textContent="Search",S=T(),z=x("input"),D=T(),B=x("input"),Z=T(),j=x("input"),H=T(),F=x("input"),q=T(),U=x("input"),G=T(),K=x("input"),X=T(),J=x("input"),E(n,"name","street"),E(n,"type","text"),E(n,"class","form-control form-control-sm me-1"),E(n,"placeholder","House number/Street"),n.value=i=t[1].street||"",E(e,"class","col-auto"),E(r,"name","city"),E(r,"type","text"),E(r,"class","form-control form-control-sm me-1"),E(r,"placeholder","City"),r.value=a=t[1].city||"",E(s,"class","col-auto"),E(h,"id","county"),E(h,"name","county"),E(h,"type","text"),E(h,"class","form-control form-control-sm me-1"),E(h,"placeholder","County"),h.value=u=t[1].county||"",E(c,"class","col-auto"),E(m,"name","state"),E(m,"type","text"),E(m,"class","form-control form-control-sm me-1"),E(m,"placeholder","State"),m.value=f=t[1].state||"",E(p,"class","col-auto"),E(w,"name","country"),E(w,"type","text"),E(w,"class","form-control form-control-sm me-1"),E(w,"placeholder","Country"),w.value=$=t[1].country||"",E(g,"class","col-auto"),E(M,"name","postalcode"),E(M,"type","text"),E(M,"class","form-control form-control-sm me-1"),E(M,"placeholder","Postal Code"),M.value=k=t[1].postalcode||"",E(P,"class","col-auto"),E(O,"type","submit"),E(O,"class","btn btn-primary btn-sm"),E(z,"type","hidden"),E(z,"name","viewbox"),z.value=I=t[2]||"",E(B,"type","hidden"),E(B,"name","dedupe"),B.value=N=0===t[1].dedupe?0:1,E(j,"type","hidden"),E(j,"name","bounded"),j.value=R=t[1].bounded?1:"",E(F,"type","hidden"),E(F,"name","accept-language"),F.value=W=t[1]["accept-language"]||"",E(U,"type","hidden"),E(U,"name","countrycodes"),U.value=V=t[1].countrycodes||"",E(U,"pattern","^[a-zA-Z]{2}(,[a-zA-Z]{2})*$"),E(K,"type","hidden"),E(K,"name","limit"),K.value=Y=t[1].limit||"",E(J,"type","hidden"),E(J,"name","polygon_threshold"),J.value=Q=t[1].polygon_threshold||"",E(A,"class","col-auto")},m(t,i){y(t,e,i),v(e,n),y(t,o,i),y(t,s,i),v(s,r),y(t,l,i),y(t,c,i),v(c,h),y(t,d,i),y(t,p,i),v(p,m),y(t,_,i),y(t,g,i),v(g,w),y(t,L,i),y(t,P,i),v(P,M),y(t,C,i),y(t,A,i),v(A,O),v(A,S),v(A,z),v(A,D),v(A,B),v(A,Z),v(A,j),v(A,H),v(A,F),v(A,q),v(A,U),v(A,G),v(A,K),v(A,X),v(A,J)},p(t,e){2&e&&i!==(i=t[1].street||"")&&n.value!==i&&(n.value=i),2&e&&a!==(a=t[1].city||"")&&r.value!==a&&(r.value=a),2&e&&u!==(u=t[1].county||"")&&h.value!==u&&(h.value=u),2&e&&f!==(f=t[1].state||"")&&m.value!==f&&(m.value=f),2&e&&$!==($=t[1].country||"")&&w.value!==$&&(w.value=$),2&e&&k!==(k=t[1].postalcode||"")&&M.value!==k&&(M.value=k),4&e&&I!==(I=t[2]||"")&&(z.value=I),2&e&&N!==(N=0===t[1].dedupe?0:1)&&(B.value=N),2&e&&R!==(R=t[1].bounded?1:"")&&(j.value=R),2&e&&W!==(W=t[1]["accept-language"]||"")&&(F.value=W),2&e&&V!==(V=t[1].countrycodes||"")&&(U.value=V),2&e&&Y!==(Y=t[1].limit||"")&&(K.value=Y),2&e&&Q!==(Q=t[1].polygon_threshold||"")&&(J.value=Q)},d(t){t&&b(e),t&&b(o),t&&b(s),t&&b(l),t&&b(c),t&&b(d),t&&b(p),t&&b(_),t&&b(g),t&&b(L),t&&b(P),t&&b(C),t&&b(A)}}}function ue(t){let e,n,i,s,r,a,l,c,h,u,d,p,m,f,_,g,w,$,L,P,k,C,A,O,S,I,D,B,N,Z,j,R,H,F,W,q,U,V,G,K,Y,X,J,Q,nt,rt,at,lt,ct,ht,ut,dt,pt,mt,ft,_t,gt,vt,yt,bt,wt,xt,$t,Lt,Tt;return u=new le({props:{page:"search",$$slots:{default:[ce]},$$scope:{ctx:t}}}),m=new le({props:{page:"search",$$slots:{default:[he]},$$scope:{ctx:t}}}),{c(){e=x("ul"),n=x("li"),i=x("a"),i.textContent="Simple",s=T(),r=x("li"),a=x("a"),a.textContent="Structured",l=T(),c=x("div"),h=x("div"),it(u.$$.fragment),d=T(),p=x("div"),it(m.$$.fragment),f=T(),_=x("details"),g=x("summary"),g.innerHTML="<small>Advanced options</small>",w=T(),$=x("ul"),L=x("li"),P=x("div"),k=x("label"),k.textContent="apply viewbox",C=T(),A=x("input"),S=T(),I=x("li"),D=x("div"),B=x("label"),B.textContent="bounded to viewbox",N=T(),Z=x("input"),R=T(),H=x("li"),F=x("div"),W=x("label"),W.textContent="deduplicate results",q=T(),U=x("input"),G=T(),K=x("li"),Y=x("label"),Y.textContent="Maximum number of results",X=T(),J=x("input"),nt=T(),rt=x("li"),at=x("label"),at.textContent="Polygon simplification",lt=T(),ct=x("input"),ut=T(),dt=x("li"),pt=x("label"),pt.textContent="Languages",mt=T(),ft=x("input"),gt=T(),vt=x("li"),yt=x("label"),yt.textContent="Country Codes",bt=T(),wt=x("input"),E(i,"class","nav-link svelte-1u2ltgo"),E(i,"data-bs-toggle","tab"),E(i,"href","#simple"),z(i,"active",!t[0]),E(n,"class","nav-item"),E(a,"class","nav-link svelte-1u2ltgo"),E(a,"data-bs-toggle","tab"),E(a,"href","#structured"),z(a,"active",t[0]),E(r,"class","nav-item"),E(e,"class","nav nav-tabs svelte-1u2ltgo"),E(h,"class","tab-pane"),E(h,"id","simple"),E(h,"role","tabpanel"),z(h,"active",!t[0]),E(p,"class","tab-pane"),E(p,"id","structured"),E(p,"role","tabpanel"),z(p,"active",t[0]),E(c,"class","tab-content py-2"),E(k,"class","form-check-label svelte-1u2ltgo"),E(k,"for","use_viewbox"),E(A,"type","checkbox"),E(A,"class","form-check-input api-param-setting"),E(A,"id","use_viewbox"),A.checked=O=t[1].viewbox,E(P,"class","form-check form-check-inline"),E(L,"class","svelte-1u2ltgo"),E(B,"class","form-check-label svelte-1u2ltgo"),E(B,"for","option_bounded"),E(Z,"type","checkbox"),E(Z,"class","form-check-input api-param-setting"),E(Z,"id","option_bounded"),Z.checked=j=!!t[1].bounded,E(D,"class","form-check form-check-inline"),E(I,"class","svelte-1u2ltgo"),E(W,"class","form-check-label svelte-1u2ltgo"),E(W,"for","option_dedupe"),E(U,"type","checkbox"),E(U,"class","form-check-input api-param-setting"),E(U,"id","option_dedupe"),U.checked=V=0===t[1].dedupe?0:1,E(F,"class","form-check form-check-inline"),E(H,"class","svelte-1u2ltgo"),E(Y,"for","option_limit"),E(Y,"class","svelte-1u2ltgo"),E(J,"type","number"),E(J,"class","form-control form-control-sm d-inline w-auto api-param-setting"),E(J,"data-api-param","limit"),E(J,"id","option_limit"),E(J,"min","1"),E(J,"max","50"),J.value=Q=t[1].limit||"",E(K,"class","svelte-1u2ltgo"),E(at,"for","option_polygon_threshold"),E(at,"class","svelte-1u2ltgo"),E(ct,"type","number"),E(ct,"class","form-control form-control-sm d-inline w-auto api-param-setting"),E(ct,"data-api-param","polygon_threshold"),E(ct,"id","option_polygon_threshold"),E(ct,"min","0.0"),E(ct,"max","1.0"),E(ct,"step","0.001"),ct.value=ht=t[1].polygon_threshold||"",E(rt,"class","svelte-1u2ltgo"),E(pt,"for","accept_lang"),E(pt,"class","svelte-1u2ltgo"),E(ft,"type","text"),E(ft,"placeholder","e.g. en,zh-Hant"),E(ft,"class","form-control form-control-sm d-inline w-auto api-param-setting"),E(ft,"data-api-param","accept-language"),E(ft,"id","accept_lang"),E(ft,"size","15"),ft.value=_t=t[1]["accept-language"]||"",E(dt,"class","svelte-1u2ltgo"),E(yt,"for","option_ccode"),E(yt,"class","svelte-1u2ltgo"),E(wt,"type","text"),E(wt,"placeholder","e.g. de,gb"),E(wt,"class","form-control form-control-sm d-inline w-auto api-param-setting"),E(wt,"data-api-param","countrycodes"),E(wt,"id","option_ccode"),E(wt,"size","15"),wt.value=xt=t[1].countrycodes||"",E(wt,"pattern","^[a-zA-Z]{2}(,[a-zA-Z]{2})*$"),E(vt,"class","svelte-1u2ltgo"),E($,"class","svelte-1u2ltgo"),E(_,"id","searchAdvancedOptions"),E(_,"class","svelte-1u2ltgo")},m(o,b){y(o,e,b),v(e,n),v(n,i),v(e,s),v(e,r),v(r,a),y(o,l,b),y(o,c,b),v(c,h),ot(u,h,null),v(c,d),v(c,p),ot(m,p,null),y(o,f,b),y(o,_,b),v(_,g),v(_,w),v(_,$),v($,L),v(L,P),v(P,k),v(P,C),v(P,A),v($,S),v($,I),v(I,D),v(D,B),v(D,N),v(D,Z),v($,R),v($,H),v(H,F),v(F,W),v(F,q),v(F,U),v($,G),v($,K),v(K,Y),v(K,X),v(K,J),v($,nt),v($,rt),v(rt,at),v(rt,lt),v(rt,ct),v($,ut),v($,dt),v(dt,pt),v(dt,mt),v(dt,ft),v($,gt),v($,vt),v(vt,yt),v(vt,bt),v(vt,wt),$t=!0,Lt||(Tt=[M(A,"change",t[3]),M(Z,"change",de),M(U,"change",pe),M(J,"change",me),M(ct,"change",me),M(ft,"change",me),M(wt,"change",me)],Lt=!0)},p(t,[e]){(!$t||1&e)&&z(i,"active",!t[0]),(!$t||1&e)&&z(a,"active",t[0]);const n={};262&e&&(n.$$scope={dirty:e,ctx:t}),u.$set(n),(!$t||1&e)&&z(h,"active",!t[0]);const o={};262&e&&(o.$$scope={dirty:e,ctx:t}),m.$set(o),(!$t||1&e)&&z(p,"active",t[0]),(!$t||2&e&&O!==(O=t[1].viewbox))&&(A.checked=O),(!$t||2&e&&j!==(j=!!t[1].bounded))&&(Z.checked=j),(!$t||2&e&&V!==(V=0===t[1].dedupe?0:1))&&(U.checked=V),(!$t||2&e&&Q!==(Q=t[1].limit||"")&&J.value!==Q)&&(J.value=Q),(!$t||2&e&&ht!==(ht=t[1].polygon_threshold||"")&&ct.value!==ht)&&(ct.value=ht),(!$t||2&e&&_t!==(_t=t[1]["accept-language"]||"")&&ft.value!==_t)&&(ft.value=_t),(!$t||2&e&&xt!==(xt=t[1].countrycodes||"")&&wt.value!==xt)&&(wt.value=xt)},i(t){$t||(tt(u.$$.fragment,t),tt(m.$$.fragment,t),$t=!0)},o(t){et(u.$$.fragment,t),et(m.$$.fragment,t),$t=!1},d(t){t&&b(e),t&&b(l),t&&b(c),st(u),st(m),t&&b(f),t&&b(_),Lt=!1,o(Tt)}}}function de(t){document.querySelector("input[name=bounded]").value=t.target.checked?1:""}function pe(t){document.querySelector("input[name=dedupe]").value=t.target.checked?1:0}function me(t){document.querySelector("input[name="+t.target.dataset.apiParam+"]").value=t.target.value}function fe(t,e,n){let i,{bStructuredSearch:o=!1}=e,{api_request_params:s={}}=e;function r(t){let e=document.getElementById("use_viewbox");e&&e.checked?n(2,i=function(t){var e=t.getBounds(),n=e.getWest(),i=e.getEast();return i-n>=360&&(n=t.getCenter().lng-179.999,i=t.getCenter().lng+179.999),i=L.latLng(77,i).wrap().lng,[(n=L.latLng(77,n).wrap().lng).toFixed(5),e.getNorth().toFixed(5),i.toFixed(5),e.getSouth().toFixed(5)].join(",")}(t)):n(2,i="")}function a(t){let e=t.wrapLatLng(t.getCenter());e.lat.toFixed(5),e.lng.toFixed(5)}return dt.subscribe((t=>{t&&(t.on("move",(function(){r(t),a(t)})),t.on("load",(function(){r(t),a(t)})))})),t.$$set=t=>{"bStructuredSearch"in t&&n(0,o=t.bStructuredSearch),"api_request_params"in t&&n(1,s=t.api_request_params)},[o,s,i,function(){let t=u(dt);t&&r(t)}]}class _e extends lt{constructor(t){super(),at(this,t,fe,ue,r,{bStructuredSearch:0,api_request_params:1})}}
+!function(){"use strict";function t(){}function e(t,e){for(const n in e)t[n]=e[n];return t}function n(t){return t()}function i(){return Object.create(null)}function o(t){t.forEach(n)}function s(t){return"function"==typeof t}function r(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}let a,l;function c(t,e){return a||(a=document.createElement("a")),a.href=e,t===a.href}function h(e,...n){if(null==e)return t;const i=e.subscribe(...n);return i.unsubscribe?()=>i.unsubscribe():i}function u(t){let e;return h(t,(t=>e=t))(),e}function d(t,e,n){t.$$.on_destroy.push(h(e,n))}function p(t,e,n,i){if(t){const o=m(t,e,n,i);return t[0](o)}}function m(t,n,i,o){return t[1]&&o?e(i.ctx.slice(),t[1](o(n))):i.ctx}function f(t,e,n,i){if(t[2]&&i){const o=t[2](i(n));if(void 0===e.dirty)return o;if("object"==typeof o){const t=[],n=Math.max(e.dirty.length,o.length);for(let i=0;i<n;i+=1)t[i]=e.dirty[i]|o[i];return t}return e.dirty|o}return e.dirty}function _(t,e,n,i,o,s){if(o){const r=m(e,n,i,s);t.p(r,o)}}function g(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let t=0;t<n;t++)e[t]=-1;return e}return-1}function v(t,e){t.appendChild(e)}function y(t,e,n){t.insertBefore(e,n||null)}function b(t){t.parentNode&&t.parentNode.removeChild(t)}function w(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function x(t){return document.createElement(t)}function $(t){return document.createTextNode(t)}function T(){return $(" ")}function P(){return $("")}function M(t,e,n,i){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}function k(t){return function(e){return e.preventDefault(),t.call(this,e)}}function C(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function E(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function A(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function S(t,e){t.value=null==e?"":e}function O(t,e){for(let n=0;n<t.options.length;n+=1){const i=t.options[n];if(i.__value===e)return void(i.selected=!0)}t.selectedIndex=-1}function z(t,e,n){t.classList[n?"add":"remove"](e)}class I{constructor(t=!1){this.is_svg=!1,this.is_svg=t,this.e=this.n=null}c(t){this.h(t)}m(t,e,n=null){var i;this.e||(this.is_svg?this.e=(i=e.nodeName,document.createElementNS("http://www.w3.org/2000/svg",i)):this.e=x(e.nodeName),this.t=e,this.c(t)),this.i(n)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.childNodes)}i(t){for(let e=0;e<this.n.length;e+=1)y(this.t,this.n[e],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(b)}}function B(t){l=t}function D(t){(function(){if(!l)throw new Error("Function called outside component initialization");return l})().$$.on_mount.push(t)}const N=[],Z=[],j=[],R=[],H=Promise.resolve();let F=!1;function W(t){j.push(t)}function q(t){R.push(t)}const U=new Set;let V=0;function K(){const t=l;do{for(;V<N.length;){const t=N[V];V++,B(t),G(t.$$)}for(B(null),N.length=0,V=0;Z.length;)Z.pop()();for(let t=0;t<j.length;t+=1){const e=j[t];U.has(e)||(U.add(e),e())}j.length=0}while(N.length);for(;R.length;)R.pop()();F=!1,U.clear(),B(t)}function G(t){if(null!==t.fragment){t.update(),o(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(W)}}const Y=new Set;let X;function J(){X={r:0,c:[],p:X}}function Q(){X.r||o(X.c),X=X.p}function tt(t,e){t&&t.i&&(Y.delete(t),t.i(e))}function et(t,e,n,i){if(t&&t.o){if(Y.has(t))return;Y.add(t),X.c.push((()=>{Y.delete(t),i&&(n&&t.d(1),i())})),t.o(e)}else i&&i()}function nt(t,e,n,i){const o=t.$$.props[e];void 0!==o&&(t.$$.bound[o]=n,void 0===i&&n(t.$$.ctx[o]))}function it(t){t&&t.c()}function ot(t,e,i,r){const{fragment:a,after_update:l}=t.$$;a&&a.m(e,i),r||W((()=>{const e=t.$$.on_mount.map(n).filter(s);t.$$.on_destroy?t.$$.on_destroy.push(...e):o(e),t.$$.on_mount=[]})),l.forEach(W)}function st(t,e){const n=t.$$;null!==n.fragment&&(o(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function rt(t,e){-1===t.$$.dirty[0]&&(N.push(t),F||(F=!0,H.then(K)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function at(e,n,s,r,a,c,h,u=[-1]){const d=l;B(e);const p=e.$$={fragment:null,ctx:[],props:c,update:t,not_equal:a,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(d?d.$$.context:[])),callbacks:i(),dirty:u,skip_bound:!1,root:n.target||d.$$.root};h&&h(p.root);let m=!1;if(p.ctx=s?s(e,n.props||{},((t,n,...i)=>{const o=i.length?i[0]:n;return p.ctx&&a(p.ctx[t],p.ctx[t]=o)&&(!p.skip_bound&&p.bound[t]&&p.bound[t](o),m&&rt(e,t)),n})):[],p.update(),m=!0,o(p.before_update),p.fragment=!!r&&r(p.ctx),n.target){if(n.hydrate){const t=function(t){return Array.from(t.childNodes)}(n.target);p.fragment&&p.fragment.l(t),t.forEach(b)}else p.fragment&&p.fragment.c();n.intro&&tt(e.$$.fragment),ot(e,n.target,n.anchor,n.customElement),K()}B(d)}class lt{$destroy(){st(this,1),this.$destroy=t}$on(e,n){if(!s(n))return t;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(n),()=>{const t=i.indexOf(n);-1!==t&&i.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;(function(){const t=1e6,e=1e3,n="transitionend",i=t=>null==t?`${t}`:Object.prototype.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase(),o=e=>{do{e+=Math.floor(Math.random()*t)}while(document.getElementById(e));return e},s=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let n=t.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),e=n&&"#"!==n?n.trim():null}return e},r=t=>{const e=s(t);return e&&document.querySelector(e)?e:null},a=t=>{const e=s(t);return e?document.querySelector(e):null},l=t=>{if(!t)return 0;let{transitionDuration:n,transitionDelay:i}=window.getComputedStyle(t);const o=Number.parseFloat(n),s=Number.parseFloat(i);return o||s?(n=n.split(",")[0],i=i.split(",")[0],(Number.parseFloat(n)+Number.parseFloat(i))*e):0},c=t=>{t.dispatchEvent(new Event(n))},h=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),u=t=>h(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(t):null,d=t=>{if(!h(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),n=t.closest("details:not([open])");if(!n)return e;if(n!==t){const e=t.closest("summary");if(e&&e.parentNode!==n)return!1;if(null===e)return!1}return e},p=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),m=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?m(t.parentNode):null},f=()=>{},_=t=>{t.offsetHeight},g=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,v=[],y=t=>{"loading"===document.readyState?(v.length||document.addEventListener("DOMContentLoaded",(()=>{for(const t of v)t()})),v.push(t)):t()},b=()=>"rtl"===document.documentElement.dir,w=t=>{y((()=>{const e=g();if(e){const n=t.NAME,i=e.fn[n];e.fn[n]=t.jQueryInterface,e.fn[n].Constructor=t,e.fn[n].noConflict=()=>(e.fn[n]=i,t.jQueryInterface)}}))},x=t=>{"function"==typeof t&&t()},$=(t,e,i=!0)=>{if(!i)return void x(t);const o=5,s=l(e)+o;let r=!1;const a=({target:i})=>{i===e&&(r=!0,e.removeEventListener(n,a),x(t))};e.addEventListener(n,a),setTimeout((()=>{r||c(e)}),s)},L=(t,e,n,i)=>{const o=t.length;let s=t.indexOf(e);return-1===s?!n&&i?t[o-1]:t[0]:(s+=n?1:-1,i&&(s=(s+o)%o),t[Math.max(0,Math.min(s,o-1))])},T=/[^.]*(?=\..*)\.|.*/,P=/\..*/,M=/::\d+$/,k={};let C=1;const E={mouseenter:"mouseover",mouseleave:"mouseout"},A=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function S(t,e){return e&&`${e}::${C++}`||t.uidEvent||C++}function O(t){const e=S(t);return t.uidEvent=e,k[e]=k[e]||{},k[e]}function z(t,e){return function n(i){return F(i,{delegateTarget:t}),n.oneOff&&H.off(t,i.type,e),e.apply(t,[i])}}function I(t,e,n){return function i(o){const s=t.querySelectorAll(e);for(let{target:r}=o;r&&r!==this;r=r.parentNode)for(const a of s)if(a===r)return F(o,{delegateTarget:r}),i.oneOff&&H.off(t,o.type,e,n),n.apply(r,[o])}}function B(t,e,n=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===n))}function D(t,e,n){const i="string"==typeof e,o=i?n:e||n;let s=R(t);return A.has(s)||(s=t),[i,o,s]}function N(t,e,n,i,o){if("string"!=typeof e||!t)return;let[s,r,a]=D(e,n,i);if(e in E){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r=t(r)}const l=O(t),c=l[a]||(l[a]={}),h=B(c,r,s?n:null);if(h)return void(h.oneOff=h.oneOff&&o);const u=S(r,e.replace(T,"")),d=s?I(t,n,r):z(t,r);d.delegationSelector=s?n:null,d.callable=r,d.oneOff=o,d.uidEvent=u,c[u]=d,t.addEventListener(a,d,s)}function Z(t,e,n,i,o){const s=B(e[n],i,o);s&&(t.removeEventListener(n,s,Boolean(o)),delete e[n][s.uidEvent])}function j(t,e,n,i){const o=e[n]||{};for(const s of Object.keys(o))if(s.includes(i)){const i=o[s];Z(t,e,n,i.callable,i.delegationSelector)}}function R(t){return t=t.replace(P,""),E[t]||t}const H={on(t,e,n,i){N(t,e,n,i,!1)},one(t,e,n,i){N(t,e,n,i,!0)},off(t,e,n,i){if("string"!=typeof e||!t)return;const[o,s,r]=D(e,n,i),a=r!==e,l=O(t),c=l[r]||{},h=e.startsWith(".");if(void 0===s){if(h)for(const n of Object.keys(l))j(t,l,n,e.slice(1));for(const n of Object.keys(c)){const i=n.replace(M,"");if(!a||e.includes(i)){const e=c[n];Z(t,l,r,e.callable,e.delegationSelector)}}}else{if(!Object.keys(c).length)return;Z(t,l,r,s,o?n:null)}},trigger(t,e,n){if("string"!=typeof e||!t)return null;const i=g();let o=null,s=!0,r=!0,a=!1;e!==R(e)&&i&&(o=i.Event(e,n),i(t).trigger(o),s=!o.isPropagationStopped(),r=!o.isImmediatePropagationStopped(),a=o.isDefaultPrevented());let l=new Event(e,{bubbles:s,cancelable:!0});return l=F(l,n),a&&l.preventDefault(),r&&t.dispatchEvent(l),l.defaultPrevented&&o&&o.preventDefault(),l}};function F(t,e){for(const[n,i]of Object.entries(e||{}))try{t[n]=i}catch(e){Object.defineProperty(t,n,{configurable:!0,get:()=>i})}return t}const W=new Map,q={set(t,e,n){W.has(t)||W.set(t,new Map);const i=W.get(t);i.has(e)||0===i.size?i.set(e,n):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(i.keys())[0]}.`)},get:(t,e)=>W.has(t)&&W.get(t).get(e)||null,remove(t,e){if(!W.has(t))return;const n=W.get(t);n.delete(e),0===n.size&&W.delete(t)}};function U(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function V(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const K={setDataAttribute(t,e,n){t.setAttribute(`data-bs-${V(e)}`,n)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${V(e)}`)},getDataAttributes(t){if(!t)return{};const e={},n=Object.keys(t.dataset).filter((t=>t.startsWith("bs")&&!t.startsWith("bsConfig")));for(const i of n){let n=i.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1,n.length),e[n]=U(t.dataset[i])}return e},getDataAttribute:(t,e)=>U(t.getAttribute(`data-bs-${V(e)}`))};class G{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const n=h(e)?K.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof n?n:{},...h(e)?K.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const n of Object.keys(e)){const o=e[n],s=t[n],r=h(s)?"element":i(s);if(!new RegExp(o).test(r))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${r}" but expected type "${o}".`)}}}const Y="5.2.3";class X extends G{constructor(t,e){super(),(t=u(t))&&(this._element=t,this._config=this._getConfig(e),q.set(this._element,this.constructor.DATA_KEY,this))}dispose(){q.remove(this._element,this.constructor.DATA_KEY),H.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,n=!0){$(t,e,n)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return q.get(u(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return Y}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const J=(t,e="hide")=>{const n=`click.dismiss${t.EVENT_KEY}`,i=t.NAME;H.on(document,n,`[data-bs-dismiss="${i}"]`,(function(n){if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),p(this))return;const o=a(this)||this.closest(`.${i}`);t.getOrCreateInstance(o)[e]()}))},Q="alert",tt=".bs.alert",et=`close${tt}`,nt=`closed${tt}`,it="fade",ot="show";class st extends X{static get NAME(){return Q}close(){if(H.trigger(this._element,et).defaultPrevented)return;this._element.classList.remove(ot);const t=this._element.classList.contains(it);this._queueCallback((()=>this._destroyElement()),this._element,t)}_destroyElement(){this._element.remove(),H.trigger(this._element,nt),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=st.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}J(st,"close"),w(st);const rt="button",at="active",lt='[data-bs-toggle="button"]',ct="click.bs.button.data-api";class ht extends X{static get NAME(){return rt}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(at))}static jQueryInterface(t){return this.each((function(){const e=ht.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}H.on(document,ct,lt,(t=>{t.preventDefault();const e=t.target.closest(lt);ht.getOrCreateInstance(e).toggle()})),w(ht);const ut={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const n=[];let i=t.parentNode.closest(e);for(;i;)n.push(i),i=i.parentNode.closest(e);return n},prev(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return[n];n=n.previousElementSibling}return[]},next(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return[n];n=n.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(",");return this.find(e,t).filter((t=>!p(t)&&d(t)))}},dt="swipe",pt=".bs.swipe",mt=`touchstart${pt}`,ft=`touchmove${pt}`,_t=`touchend${pt}`,gt=`pointerdown${pt}`,vt=`pointerup${pt}`,yt="touch",bt="pen",wt="pointer-event",xt=40,$t={endCallback:null,leftCallback:null,rightCallback:null},Lt={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Tt extends G{constructor(t,e){super(),this._element=t,t&&Tt.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return $t}static get DefaultType(){return Lt}static get NAME(){return dt}dispose(){H.off(this._element,pt)}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),x(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=xt)return;const e=t/this._deltaX;this._deltaX=0,e&&x(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(H.on(this._element,gt,(t=>this._start(t))),H.on(this._element,vt,(t=>this._end(t))),this._element.classList.add(wt)):(H.on(this._element,mt,(t=>this._start(t))),H.on(this._element,ft,(t=>this._move(t))),H.on(this._element,_t,(t=>this._end(t))))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&(t.pointerType===bt||t.pointerType===yt)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const Pt="carousel",Mt=".bs.carousel",kt=".data-api",Ct=500,Et="next",At="prev",St="left",Ot="right",zt=`slide${Mt}`,It=`slid${Mt}`,Bt=`keydown${Mt}`,Dt=`mouseenter${Mt}`,Nt=`mouseleave${Mt}`,Zt=`dragstart${Mt}`,jt=`load${Mt}${kt}`,Rt=`click${Mt}${kt}`,Ht="carousel",Ft="active",Wt="slide",qt="carousel-item-end",Ut="carousel-item-start",Vt="carousel-item-next",Kt="carousel-item-prev",Gt=".active",Yt=".carousel-item",Xt=Gt+Yt,Jt=".carousel-item img",Qt=".carousel-indicators",te="[data-bs-slide], [data-bs-slide-to]",ee='[data-bs-ride="carousel"]',ne={ArrowLeft:Ot,ArrowRight:St},ie={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},oe={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class se extends X{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=ut.findOne(Qt,this._element),this._addEventListeners(),this._config.ride===Ht&&this.cycle()}static get Default(){return ie}static get DefaultType(){return oe}static get NAME(){return Pt}next(){this._slide(Et)}nextWhenVisible(){!document.hidden&&d(this._element)&&this.next()}prev(){this._slide(At)}pause(){this._isSliding&&c(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?H.one(this._element,It,(()=>this.cycle())):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void H.one(this._element,It,(()=>this.to(t)));const n=this._getItemIndex(this._getActive());if(n===t)return;const i=t>n?Et:At;this._slide(i,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&H.on(this._element,Bt,(t=>this._keydown(t))),"hover"===this._config.pause&&(H.on(this._element,Dt,(()=>this.pause())),H.on(this._element,Nt,(()=>this._maybeEnableCycle()))),this._config.touch&&Tt.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of ut.find(Jt,this._element))H.on(t,Zt,(t=>t.preventDefault()));const t={leftCallback:()=>this._slide(this._directionToOrder(St)),rightCallback:()=>this._slide(this._directionToOrder(Ot)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),Ct+this._config.interval))}};this._swipeHelper=new Tt(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=ne[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=ut.findOne(Gt,this._indicatorsElement);e.classList.remove(Ft),e.removeAttribute("aria-current");const n=ut.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);n&&(n.classList.add(Ft),n.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const n=this._getActive(),i=t===Et,o=e||L(this._getItems(),n,i,this._config.wrap);if(o===n)return;const s=this._getItemIndex(o),r=e=>H.trigger(this._element,e,{relatedTarget:o,direction:this._orderToDirection(t),from:this._getItemIndex(n),to:s});if(r(zt).defaultPrevented)return;if(!n||!o)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(s),this._activeElement=o;const l=i?Ut:qt,c=i?Vt:Kt;o.classList.add(c),_(o),n.classList.add(l),o.classList.add(l);const h=()=>{o.classList.remove(l,c),o.classList.add(Ft),n.classList.remove(Ft,c,l),this._isSliding=!1,r(It)};this._queueCallback(h,n,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains(Wt)}_getActive(){return ut.findOne(Xt,this._element)}_getItems(){return ut.find(Yt,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return b()?t===St?At:Et:t===St?Et:At}_orderToDirection(t){return b()?t===At?St:Ot:t===At?Ot:St}static jQueryInterface(t){return this.each((function(){const e=se.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}else e.to(t)}))}}H.on(document,Rt,te,(function(t){const e=a(this);if(!e||!e.classList.contains(Ht))return;t.preventDefault();const n=se.getOrCreateInstance(e),i=this.getAttribute("data-bs-slide-to");return i?(n.to(i),void n._maybeEnableCycle()):"next"===K.getDataAttribute(this,"slide")?(n.next(),void n._maybeEnableCycle()):(n.prev(),void n._maybeEnableCycle())})),H.on(window,jt,(()=>{const t=ut.find(ee);for(const e of t)se.getOrCreateInstance(e)})),w(se);const re="collapse",ae=".bs.collapse",le=`show${ae}`,ce=`shown${ae}`,he=`hide${ae}`,ue=`hidden${ae}`,de=`click${ae}.data-api`,pe="show",me="collapse",fe="collapsing",_e="collapsed",ge=`:scope .${me} .${me}`,ve="collapse-horizontal",ye="width",be="height",we=".collapse.show, .collapse.collapsing",xe='[data-bs-toggle="collapse"]',$e={parent:null,toggle:!0},Le={parent:"(null|element)",toggle:"boolean"};class Te extends X{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const n=ut.find(xe);for(const t of n){const e=r(t),n=ut.find(e).filter((t=>t===this._element));null!==e&&n.length&&this._triggerArray.push(t)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return $e}static get DefaultType(){return Le}static get NAME(){return re}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(we).filter((t=>t!==this._element)).map((t=>Te.getOrCreateInstance(t,{toggle:!1})))),t.length&&t[0]._isTransitioning)return;if(H.trigger(this._element,le).defaultPrevented)return;for(const e of t)e.hide();const e=this._getDimension();this._element.classList.remove(me),this._element.classList.add(fe),this._element.style[e]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const n=()=>{this._isTransitioning=!1,this._element.classList.remove(fe),this._element.classList.add(me,pe),this._element.style[e]="",H.trigger(this._element,ce)},i=`scroll${e[0].toUpperCase()+e.slice(1)}`;this._queueCallback(n,this._element,!0),this._element.style[e]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(H.trigger(this._element,he).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,_(this._element),this._element.classList.add(fe),this._element.classList.remove(me,pe);for(const t of this._triggerArray){const e=a(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0;const e=()=>{this._isTransitioning=!1,this._element.classList.remove(fe),this._element.classList.add(me),H.trigger(this._element,ue)};this._element.style[t]="",this._queueCallback(e,this._element,!0)}_isShown(t=this._element){return t.classList.contains(pe)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=u(t.parent),t}_getDimension(){return this._element.classList.contains(ve)?ye:be}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(xe);for(const e of t){const t=a(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=ut.find(ge,this._config.parent);return ut.find(t,this._config.parent).filter((t=>!e.includes(t)))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const n of t)n.classList.toggle(_e,!e),n.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each((function(){const n=Te.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===n[t])throw new TypeError(`No method named "${t}"`);n[t]()}}))}}H.on(document,de,xe,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();const e=r(this),n=ut.find(e);for(const t of n)Te.getOrCreateInstance(t,{toggle:!1}).toggle()})),w(Te);var Pe="top",Me="bottom",ke="right",Ce="left",Ee="auto",Ae=[Pe,Me,ke,Ce],Se="start",Oe="end",ze="clippingParents",Ie="viewport",Be="popper",De="reference",Ne=Ae.reduce((function(t,e){return t.concat([e+"-"+Se,e+"-"+Oe])}),[]),Ze=[].concat(Ae,[Ee]).reduce((function(t,e){return t.concat([e,e+"-"+Se,e+"-"+Oe])}),[]),je="beforeRead",Re="read",He="afterRead",Fe="beforeMain",We="main",qe="afterMain",Ue="beforeWrite",Ve="write",Ke="afterWrite",Ge=[je,Re,He,Fe,We,qe,Ue,Ve,Ke];function Ye(t){return t?(t.nodeName||"").toLowerCase():null}function Xe(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Je(t){return t instanceof Xe(t).Element||t instanceof Element}function Qe(t){return t instanceof Xe(t).HTMLElement||t instanceof HTMLElement}function tn(t){return"undefined"!=typeof ShadowRoot&&(t instanceof Xe(t).ShadowRoot||t instanceof ShadowRoot)}function en(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var n=e.styles[t]||{},i=e.attributes[t]||{},o=e.elements[t];Qe(o)&&Ye(o)&&(Object.assign(o.style,n),Object.keys(i).forEach((function(t){var e=i[t];!1===e?o.removeAttribute(t):o.setAttribute(t,!0===e?"":e)})))}))}function nn(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach((function(t){var i=e.elements[t],o=e.attributes[t]||{},s=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce((function(t,e){return t[e]="",t}),{});Qe(i)&&Ye(i)&&(Object.assign(i.style,s),Object.keys(o).forEach((function(t){i.removeAttribute(t)})))}))}}const on={name:"applyStyles",enabled:!0,phase:"write",fn:en,effect:nn,requires:["computeStyles"]};function sn(t){return t.split("-")[0]}var rn=Math.max,an=Math.min,ln=Math.round;function cn(){var t=navigator.userAgentData;return null!=t&&t.brands?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function hn(){return!/^((?!chrome|android).)*safari/i.test(cn())}function un(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var i=t.getBoundingClientRect(),o=1,s=1;e&&Qe(t)&&(o=t.offsetWidth>0&&ln(i.width)/t.offsetWidth||1,s=t.offsetHeight>0&&ln(i.height)/t.offsetHeight||1);var r=(Je(t)?Xe(t):window).visualViewport,a=!hn()&&n,l=(i.left+(a&&r?r.offsetLeft:0))/o,c=(i.top+(a&&r?r.offsetTop:0))/s,h=i.width/o,u=i.height/s;return{width:h,height:u,top:c,right:l+h,bottom:c+u,left:l,x:l,y:c}}function dn(t){var e=un(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}function pn(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&tn(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function mn(t){return Xe(t).getComputedStyle(t)}function fn(t){return["table","td","th"].indexOf(Ye(t))>=0}function _n(t){return((Je(t)?t.ownerDocument:t.document)||window.document).documentElement}function gn(t){return"html"===Ye(t)?t:t.assignedSlot||t.parentNode||(tn(t)?t.host:null)||_n(t)}function vn(t){return Qe(t)&&"fixed"!==mn(t).position?t.offsetParent:null}function yn(t){var e=/firefox/i.test(cn());if(/Trident/i.test(cn())&&Qe(t)&&"fixed"===mn(t).position)return null;var n=gn(t);for(tn(n)&&(n=n.host);Qe(n)&&["html","body"].indexOf(Ye(n))<0;){var i=mn(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||e&&"filter"===i.willChange||e&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}function bn(t){for(var e=Xe(t),n=vn(t);n&&fn(n)&&"static"===mn(n).position;)n=vn(n);return n&&("html"===Ye(n)||"body"===Ye(n)&&"static"===mn(n).position)?e:n||yn(t)||e}function wn(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function xn(t,e,n){return rn(t,an(e,n))}function $n(t,e,n){var i=xn(t,e,n);return i>n?n:i}function Ln(){return{top:0,right:0,bottom:0,left:0}}function Tn(t){return Object.assign({},Ln(),t)}function Pn(t,e){return e.reduce((function(e,n){return e[n]=t,e}),{})}var Mn=function(t,e){return Tn("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:Pn(t,Ae))};function kn(t){var e,n=t.state,i=t.name,o=t.options,s=n.elements.arrow,r=n.modifiersData.popperOffsets,a=sn(n.placement),l=wn(a),c=[Ce,ke].indexOf(a)>=0?"height":"width";if(s&&r){var h=Mn(o.padding,n),u=dn(s),d="y"===l?Pe:Ce,p="y"===l?Me:ke,m=n.rects.reference[c]+n.rects.reference[l]-r[l]-n.rects.popper[c],f=r[l]-n.rects.reference[l],_=bn(s),g=_?"y"===l?_.clientHeight||0:_.clientWidth||0:0,v=m/2-f/2,y=h[d],b=g-u[c]-h[p],w=g/2-u[c]/2+v,x=xn(y,w,b),$=l;n.modifiersData[i]=((e={})[$]=x,e.centerOffset=x-w,e)}}function Cn(t){var e=t.state,n=t.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=e.elements.popper.querySelector(i)))&&pn(e.elements.popper,i)&&(e.elements.arrow=i)}const En={name:"arrow",enabled:!0,phase:"main",fn:kn,effect:Cn,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function An(t){return t.split("-")[1]}var Sn={top:"auto",right:"auto",bottom:"auto",left:"auto"};function On(t){var e=t.x,n=t.y,i=window.devicePixelRatio||1;return{x:ln(e*i)/i||0,y:ln(n*i)/i||0}}function zn(t){var e,n=t.popper,i=t.popperRect,o=t.placement,s=t.variation,r=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,h=t.roundOffsets,u=t.isFixed,d=r.x,p=void 0===d?0:d,m=r.y,f=void 0===m?0:m,_="function"==typeof h?h({x:p,y:f}):{x:p,y:f};p=_.x,f=_.y;var g=r.hasOwnProperty("x"),v=r.hasOwnProperty("y"),y=Ce,b=Pe,w=window;if(c){var x=bn(n),$="clientHeight",L="clientWidth";x===Xe(n)&&"static"!==mn(x=_n(n)).position&&"absolute"===a&&($="scrollHeight",L="scrollWidth"),(o===Pe||(o===Ce||o===ke)&&s===Oe)&&(b=Me,f-=(u&&x===w&&w.visualViewport?w.visualViewport.height:x[$])-i.height,f*=l?1:-1),o!==Ce&&(o!==Pe&&o!==Me||s!==Oe)||(y=ke,p-=(u&&x===w&&w.visualViewport?w.visualViewport.width:x[L])-i.width,p*=l?1:-1)}var T,P=Object.assign({position:a},c&&Sn),M=!0===h?On({x:p,y:f}):{x:p,y:f};return p=M.x,f=M.y,l?Object.assign({},P,((T={})[b]=v?"0":"",T[y]=g?"0":"",T.transform=(w.devicePixelRatio||1)<=1?"translate("+p+"px, "+f+"px)":"translate3d("+p+"px, "+f+"px, 0)",T)):Object.assign({},P,((e={})[b]=v?f+"px":"",e[y]=g?p+"px":"",e.transform="",e))}function In(t){var e=t.state,n=t.options,i=n.gpuAcceleration,o=void 0===i||i,s=n.adaptive,r=void 0===s||s,a=n.roundOffsets,l=void 0===a||a,c={placement:sn(e.placement),variation:An(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,zn(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,zn(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const Bn={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:In,data:{}};var Dn={passive:!0};function Nn(t){var e=t.state,n=t.instance,i=t.options,o=i.scroll,s=void 0===o||o,r=i.resize,a=void 0===r||r,l=Xe(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return s&&c.forEach((function(t){t.addEventListener("scroll",n.update,Dn)})),a&&l.addEventListener("resize",n.update,Dn),function(){s&&c.forEach((function(t){t.removeEventListener("scroll",n.update,Dn)})),a&&l.removeEventListener("resize",n.update,Dn)}}const Zn={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Nn,data:{}};var jn={left:"right",right:"left",bottom:"top",top:"bottom"};function Rn(t){return t.replace(/left|right|bottom|top/g,(function(t){return jn[t]}))}var Hn={start:"end",end:"start"};function Fn(t){return t.replace(/start|end/g,(function(t){return Hn[t]}))}function Wn(t){var e=Xe(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function qn(t){return un(_n(t)).left+Wn(t).scrollLeft}function Un(t,e){var n=Xe(t),i=_n(t),o=n.visualViewport,s=i.clientWidth,r=i.clientHeight,a=0,l=0;if(o){s=o.width,r=o.height;var c=hn();(c||!c&&"fixed"===e)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:r,x:a+qn(t),y:l}}function Vn(t){var e,n=_n(t),i=Wn(t),o=null==(e=t.ownerDocument)?void 0:e.body,s=rn(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),r=rn(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-i.scrollLeft+qn(t),l=-i.scrollTop;return"rtl"===mn(o||n).direction&&(a+=rn(n.clientWidth,o?o.clientWidth:0)-s),{width:s,height:r,x:a,y:l}}function Kn(t){var e=mn(t),n=e.overflow,i=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+i)}function Gn(t){return["html","body","#document"].indexOf(Ye(t))>=0?t.ownerDocument.body:Qe(t)&&Kn(t)?t:Gn(gn(t))}function Yn(t,e){var n;void 0===e&&(e=[]);var i=Gn(t),o=i===(null==(n=t.ownerDocument)?void 0:n.body),s=Xe(i),r=o?[s].concat(s.visualViewport||[],Kn(i)?i:[]):i,a=e.concat(r);return o?a:a.concat(Yn(gn(r)))}function Xn(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Jn(t,e){var n=un(t,!1,"fixed"===e);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function Qn(t,e,n){return e===Ie?Xn(Un(t,n)):Je(e)?Jn(e,n):Xn(Vn(_n(t)))}function ti(t){var e=Yn(gn(t)),n=["absolute","fixed"].indexOf(mn(t).position)>=0&&Qe(t)?bn(t):t;return Je(n)?e.filter((function(t){return Je(t)&&pn(t,n)&&"body"!==Ye(t)})):[]}function ei(t,e,n,i){var o="clippingParents"===e?ti(t):[].concat(e),s=[].concat(o,[n]),r=s[0],a=s.reduce((function(e,n){var o=Qn(t,n,i);return e.top=rn(o.top,e.top),e.right=an(o.right,e.right),e.bottom=an(o.bottom,e.bottom),e.left=rn(o.left,e.left),e}),Qn(t,r,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function ni(t){var e,n=t.reference,i=t.element,o=t.placement,s=o?sn(o):null,r=o?An(o):null,a=n.x+n.width/2-i.width/2,l=n.y+n.height/2-i.height/2;switch(s){case Pe:e={x:a,y:n.y-i.height};break;case Me:e={x:a,y:n.y+n.height};break;case ke:e={x:n.x+n.width,y:l};break;case Ce:e={x:n.x-i.width,y:l};break;default:e={x:n.x,y:n.y}}var c=s?wn(s):null;if(null!=c){var h="y"===c?"height":"width";switch(r){case Se:e[c]=e[c]-(n[h]/2-i[h]/2);break;case Oe:e[c]=e[c]+(n[h]/2-i[h]/2)}}return e}function ii(t,e){void 0===e&&(e={});var n=e,i=n.placement,o=void 0===i?t.placement:i,s=n.strategy,r=void 0===s?t.strategy:s,a=n.boundary,l=void 0===a?ze:a,c=n.rootBoundary,h=void 0===c?Ie:c,u=n.elementContext,d=void 0===u?Be:u,p=n.altBoundary,m=void 0!==p&&p,f=n.padding,_=void 0===f?0:f,g=Tn("number"!=typeof _?_:Pn(_,Ae)),v=d===Be?De:Be,y=t.rects.popper,b=t.elements[m?v:d],w=ei(Je(b)?b:b.contextElement||_n(t.elements.popper),l,h,r),x=un(t.elements.reference),$=ni({reference:x,element:y,strategy:"absolute",placement:o}),L=Xn(Object.assign({},y,$)),T=d===Be?L:x,P={top:w.top-T.top+g.top,bottom:T.bottom-w.bottom+g.bottom,left:w.left-T.left+g.left,right:T.right-w.right+g.right},M=t.modifiersData.offset;if(d===Be&&M){var k=M[o];Object.keys(P).forEach((function(t){var e=[ke,Me].indexOf(t)>=0?1:-1,n=[Pe,Me].indexOf(t)>=0?"y":"x";P[t]+=k[n]*e}))}return P}function oi(t,e){void 0===e&&(e={});var n=e,i=n.placement,o=n.boundary,s=n.rootBoundary,r=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?Ze:l,h=An(i),u=h?a?Ne:Ne.filter((function(t){return An(t)===h})):Ae,d=u.filter((function(t){return c.indexOf(t)>=0}));0===d.length&&(d=u);var p=d.reduce((function(e,n){return e[n]=ii(t,{placement:n,boundary:o,rootBoundary:s,padding:r})[sn(n)],e}),{});return Object.keys(p).sort((function(t,e){return p[t]-p[e]}))}function si(t){if(sn(t)===Ee)return[];var e=Rn(t);return[Fn(t),e,Fn(e)]}function ri(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var o=n.mainAxis,s=void 0===o||o,r=n.altAxis,a=void 0===r||r,l=n.fallbackPlacements,c=n.padding,h=n.boundary,u=n.rootBoundary,d=n.altBoundary,p=n.flipVariations,m=void 0===p||p,f=n.allowedAutoPlacements,_=e.options.placement,g=sn(_),v=l||(g!==_&&m?si(_):[Rn(_)]),y=[_].concat(v).reduce((function(t,n){return t.concat(sn(n)===Ee?oi(e,{placement:n,boundary:h,rootBoundary:u,padding:c,flipVariations:m,allowedAutoPlacements:f}):n)}),[]),b=e.rects.reference,w=e.rects.popper,x=new Map,$=!0,L=y[0],T=0;T<y.length;T++){var P=y[T],M=sn(P),k=An(P)===Se,C=[Pe,Me].indexOf(M)>=0,E=C?"width":"height",A=ii(e,{placement:P,boundary:h,rootBoundary:u,altBoundary:d,padding:c}),S=C?k?ke:Ce:k?Me:Pe;b[E]>w[E]&&(S=Rn(S));var O=Rn(S),z=[];if(s&&z.push(A[M]<=0),a&&z.push(A[S]<=0,A[O]<=0),z.every((function(t){return t}))){L=P,$=!1;break}x.set(P,z)}if($)for(var I=function(t){var e=y.find((function(e){var n=x.get(e);if(n)return n.slice(0,t).every((function(t){return t}))}));if(e)return L=e,"break"},B=m?3:1;B>0&&"break"!==I(B);B--);e.placement!==L&&(e.modifiersData[i]._skip=!0,e.placement=L,e.reset=!0)}}const ai={name:"flip",enabled:!0,phase:"main",fn:ri,requiresIfExists:["offset"],data:{_skip:!1}};function li(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function ci(t){return[Pe,ke,Me,Ce].some((function(e){return t[e]>=0}))}function hi(t){var e=t.state,n=t.name,i=e.rects.reference,o=e.rects.popper,s=e.modifiersData.preventOverflow,r=ii(e,{elementContext:"reference"}),a=ii(e,{altBoundary:!0}),l=li(r,i),c=li(a,o,s),h=ci(l),u=ci(c);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":u})}const ui={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:hi};function di(t,e,n){var i=sn(t),o=[Ce,Pe].indexOf(i)>=0?-1:1,s="function"==typeof n?n(Object.assign({},e,{placement:t})):n,r=s[0],a=s[1];return r=r||0,a=(a||0)*o,[Ce,ke].indexOf(i)>=0?{x:a,y:r}:{x:r,y:a}}function pi(t){var e=t.state,n=t.options,i=t.name,o=n.offset,s=void 0===o?[0,0]:o,r=Ze.reduce((function(t,n){return t[n]=di(n,e.rects,s),t}),{}),a=r[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[i]=r}const mi={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:pi};function fi(t){var e=t.state,n=t.name;e.modifiersData[n]=ni({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const _i={name:"popperOffsets",enabled:!0,phase:"read",fn:fi,data:{}};function gi(t){return"x"===t?"y":"x"}function vi(t){var e=t.state,n=t.options,i=t.name,o=n.mainAxis,s=void 0===o||o,r=n.altAxis,a=void 0!==r&&r,l=n.boundary,c=n.rootBoundary,h=n.altBoundary,u=n.padding,d=n.tether,p=void 0===d||d,m=n.tetherOffset,f=void 0===m?0:m,_=ii(e,{boundary:l,rootBoundary:c,padding:u,altBoundary:h}),g=sn(e.placement),v=An(e.placement),y=!v,b=wn(g),w=gi(b),x=e.modifiersData.popperOffsets,$=e.rects.reference,L=e.rects.popper,T="function"==typeof f?f(Object.assign({},e.rects,{placement:e.placement})):f,P="number"==typeof T?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),M=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,k={x:0,y:0};if(x){if(s){var C,E="y"===b?Pe:Ce,A="y"===b?Me:ke,S="y"===b?"height":"width",O=x[b],z=O+_[E],I=O-_[A],B=p?-L[S]/2:0,D=v===Se?$[S]:L[S],N=v===Se?-L[S]:-$[S],Z=e.elements.arrow,j=p&&Z?dn(Z):{width:0,height:0},R=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Ln(),H=R[E],F=R[A],W=xn(0,$[S],j[S]),q=y?$[S]/2-B-W-H-P.mainAxis:D-W-H-P.mainAxis,U=y?-$[S]/2+B+W+F+P.mainAxis:N+W+F+P.mainAxis,V=e.elements.arrow&&bn(e.elements.arrow),K=V?"y"===b?V.clientTop||0:V.clientLeft||0:0,G=null!=(C=null==M?void 0:M[b])?C:0,Y=O+U-G,X=xn(p?an(z,O+q-G-K):z,O,p?rn(I,Y):I);x[b]=X,k[b]=X-O}if(a){var J,Q="x"===b?Pe:Ce,tt="x"===b?Me:ke,et=x[w],nt="y"===w?"height":"width",it=et+_[Q],ot=et-_[tt],st=-1!==[Pe,Ce].indexOf(g),rt=null!=(J=null==M?void 0:M[w])?J:0,at=st?it:et-$[nt]-L[nt]-rt+P.altAxis,lt=st?et+$[nt]+L[nt]-rt-P.altAxis:ot,ct=p&&st?$n(at,et,lt):xn(p?at:it,et,p?lt:ot);x[w]=ct,k[w]=ct-et}e.modifiersData[i]=k}}const yi={name:"preventOverflow",enabled:!0,phase:"main",fn:vi,requiresIfExists:["offset"]};function bi(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function wi(t){return t!==Xe(t)&&Qe(t)?bi(t):Wn(t)}function xi(t){var e=t.getBoundingClientRect(),n=ln(e.width)/t.offsetWidth||1,i=ln(e.height)/t.offsetHeight||1;return 1!==n||1!==i}function $i(t,e,n){void 0===n&&(n=!1);var i=Qe(e),o=Qe(e)&&xi(e),s=_n(e),r=un(t,o,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!n)&&(("body"!==Ye(e)||Kn(s))&&(a=wi(e)),Qe(e)?((l=un(e,!0)).x+=e.clientLeft,l.y+=e.clientTop):s&&(l.x=qn(s))),{x:r.left+a.scrollLeft-l.x,y:r.top+a.scrollTop-l.y,width:r.width,height:r.height}}function Li(t){var e=new Map,n=new Set,i=[];function o(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!n.has(t)){var i=e.get(t);i&&o(i)}})),i.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){n.has(t.name)||o(t)})),i}function Ti(t){var e=Li(t);return Ge.reduce((function(t,n){return t.concat(e.filter((function(t){return t.phase===n})))}),[])}function Pi(t){var e;return function(){return e||(e=new Promise((function(n){Promise.resolve().then((function(){e=void 0,n(t())}))}))),e}}function Mi(t){var e=t.reduce((function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign({},n,e,{options:Object.assign({},n.options,e.options),data:Object.assign({},n.data,e.data)}):e,t}),{});return Object.keys(e).map((function(t){return e[t]}))}var ki={placement:"bottom",modifiers:[],strategy:"absolute"};function Ci(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function Ei(t){void 0===t&&(t={});var e=t,n=e.defaultModifiers,i=void 0===n?[]:n,o=e.defaultOptions,s=void 0===o?ki:o;return function(t,e,n){void 0===n&&(n=s);var o={placement:"bottom",orderedModifiers:[],options:Object.assign({},ki,s),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},r=[],a=!1,l={state:o,setOptions:function(n){var r="function"==typeof n?n(o.options):n;h(),o.options=Object.assign({},s,o.options,r),o.scrollParents={reference:Je(t)?Yn(t):t.contextElement?Yn(t.contextElement):[],popper:Yn(e)};var a=Ti(Mi([].concat(i,o.options.modifiers)));return o.orderedModifiers=a.filter((function(t){return t.enabled})),c(),l.update()},forceUpdate:function(){if(!a){var t=o.elements,e=t.reference,n=t.popper;if(Ci(e,n)){o.rects={reference:$i(e,bn(n),"fixed"===o.options.strategy),popper:dn(n)},o.reset=!1,o.placement=o.options.placement,o.orderedModifiers.forEach((function(t){return o.modifiersData[t.name]=Object.assign({},t.data)}));for(var i=0;i<o.orderedModifiers.length;i++)if(!0!==o.reset){var s=o.orderedModifiers[i],r=s.fn,c=s.options,h=void 0===c?{}:c,u=s.name;"function"==typeof r&&(o=r({state:o,options:h,name:u,instance:l})||o)}else o.reset=!1,i=-1}}},update:Pi((function(){return new Promise((function(t){l.forceUpdate(),t(o)}))})),destroy:function(){h(),a=!0}};if(!Ci(t,e))return l;function c(){o.orderedModifiers.forEach((function(t){var e=t.name,n=t.options,i=void 0===n?{}:n,s=t.effect;if("function"==typeof s){var a=s({state:o,name:e,instance:l,options:i}),c=function(){};r.push(a||c)}}))}function h(){r.forEach((function(t){return t()})),r=[]}return l.setOptions(n).then((function(t){!a&&n.onFirstUpdate&&n.onFirstUpdate(t)})),l}}var Ai=Ei(),Si=Ei({defaultModifiers:[Zn,_i,Bn,on]}),Oi=Ei({defaultModifiers:[Zn,_i,Bn,on,mi,ai,yi,En,ui]});const zi=Object.freeze(Object.defineProperty({__proto__:null,popperGenerator:Ei,detectOverflow:ii,createPopperBase:Ai,createPopper:Oi,createPopperLite:Si,top:Pe,bottom:Me,right:ke,left:Ce,auto:Ee,basePlacements:Ae,start:Se,end:Oe,clippingParents:ze,viewport:Ie,popper:Be,reference:De,variationPlacements:Ne,placements:Ze,beforeRead:je,read:Re,afterRead:He,beforeMain:Fe,main:We,afterMain:qe,beforeWrite:Ue,write:Ve,afterWrite:Ke,modifierPhases:Ge,applyStyles:on,arrow:En,computeStyles:Bn,eventListeners:Zn,flip:ai,hide:ui,offset:mi,popperOffsets:_i,preventOverflow:yi},Symbol.toStringTag,{value:"Module"})),Ii="dropdown",Bi=".bs.dropdown",Di=".data-api",Ni="Escape",Zi="Tab",ji="ArrowUp",Ri="ArrowDown",Hi=2,Fi=`hide${Bi}`,Wi=`hidden${Bi}`,qi=`show${Bi}`,Ui=`shown${Bi}`,Vi=`click${Bi}${Di}`,Ki=`keydown${Bi}${Di}`,Gi=`keyup${Bi}${Di}`,Yi="show",Xi="dropup",Ji="dropend",Qi="dropstart",to="dropup-center",eo="dropdown-center",no='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',io=`${no}.${Yi}`,oo=".dropdown-menu",so=".navbar",ro=".navbar-nav",ao=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",lo=b()?"top-end":"top-start",co=b()?"top-start":"top-end",ho=b()?"bottom-end":"bottom-start",uo=b()?"bottom-start":"bottom-end",po=b()?"left-start":"right-start",mo=b()?"right-start":"left-start",fo="top",_o="bottom",go={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},vo={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class yo extends X{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=ut.next(this._element,oo)[0]||ut.prev(this._element,oo)[0]||ut.findOne(oo,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return go}static get DefaultType(){return vo}static get NAME(){return Ii}toggle(){return this._isShown()?this.hide():this.show()}show(){if(p(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!H.trigger(this._element,qi,t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(ro))for(const t of[].concat(...document.body.children))H.on(t,"mouseover",f);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Yi),this._element.classList.add(Yi),H.trigger(this._element,Ui,t)}}hide(){if(p(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!H.trigger(this._element,Fi,t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))H.off(t,"mouseover",f);this._popper&&this._popper.destroy(),this._menu.classList.remove(Yi),this._element.classList.remove(Yi),this._element.setAttribute("aria-expanded","false"),K.removeDataAttribute(this._menu,"popper"),H.trigger(this._element,Wi,t)}}_getConfig(t){if("object"==typeof(t=super._getConfig(t)).reference&&!h(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${Ii.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(void 0===zi)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let t=this._element;"parent"===this._config.reference?t=this._parent:h(this._config.reference)?t=u(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const e=this._getPopperConfig();this._popper=Oi(t,this._menu,e)}_isShown(){return this._menu.classList.contains(Yi)}_getPlacement(){const t=this._parent;if(t.classList.contains(Ji))return po;if(t.classList.contains(Qi))return mo;if(t.classList.contains(to))return fo;if(t.classList.contains(eo))return _o;const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains(Xi)?e?co:lo:e?uo:ho}_detectNavbar(){return null!==this._element.closest(so)}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(K.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,..."function"==typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig}}_selectMenuItem({key:t,target:e}){const n=ut.find(ao,this._menu).filter((t=>d(t)));n.length&&L(n,e,t===Ri,!n.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=yo.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(t.button===Hi||"keyup"===t.type&&t.key!==Zi)return;const e=ut.find(io);for(const n of e){const e=yo.getInstance(n);if(!e||!1===e._config.autoClose)continue;const i=t.composedPath(),o=i.includes(e._menu);if(i.includes(e._element)||"inside"===e._config.autoClose&&!o||"outside"===e._config.autoClose&&o)continue;if(e._menu.contains(t.target)&&("keyup"===t.type&&t.key===Zi||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const s={relatedTarget:e._element};"click"===t.type&&(s.clickEvent=t),e._completeHide(s)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),n=t.key===Ni,i=[ji,Ri].includes(t.key);if(!i&&!n)return;if(e&&!n)return;t.preventDefault();const o=this.matches(no)?this:ut.prev(this,no)[0]||ut.next(this,no)[0]||ut.findOne(no,t.delegateTarget.parentNode),s=yo.getOrCreateInstance(o);if(i)return t.stopPropagation(),s.show(),void s._selectMenuItem(t);s._isShown()&&(t.stopPropagation(),s.hide(),o.focus())}}H.on(document,Ki,no,yo.dataApiKeydownHandler),H.on(document,Ki,oo,yo.dataApiKeydownHandler),H.on(document,Vi,yo.clearMenus),H.on(document,Gi,yo.clearMenus),H.on(document,Vi,no,(function(t){t.preventDefault(),yo.getOrCreateInstance(this).toggle()})),w(yo);const bo=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",wo=".sticky-top",xo="padding-right",$o="margin-right";class Lo{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,xo,(e=>e+t)),this._setElementAttributes(bo,xo,(e=>e+t)),this._setElementAttributes(wo,$o,(e=>e-t))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,xo),this._resetElementAttributes(bo,xo),this._resetElementAttributes(wo,$o)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,n){const i=this.getWidth(),o=t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+i)return;this._saveInitialAttribute(t,e);const o=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${n(Number.parseFloat(o))}px`)};this._applyManipulationCallback(t,o)}_saveInitialAttribute(t,e){const n=t.style.getPropertyValue(e);n&&K.setDataAttribute(t,e,n)}_resetElementAttributes(t,e){const n=t=>{const n=K.getDataAttribute(t,e);null!==n?(K.removeDataAttribute(t,e),t.style.setProperty(e,n)):t.style.removeProperty(e)};this._applyManipulationCallback(t,n)}_applyManipulationCallback(t,e){if(h(t))e(t);else for(const n of ut.find(t,this._element))e(n)}}const To="backdrop",Po="fade",Mo="show",ko=`mousedown.bs.${To}`,Co={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Eo={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Ao extends G{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return Co}static get DefaultType(){return Eo}static get NAME(){return To}show(t){if(!this._config.isVisible)return void x(t);this._append();const e=this._getElement();this._config.isAnimated&&_(e),e.classList.add(Mo),this._emulateAnimation((()=>{x(t)}))}hide(t){this._config.isVisible?(this._getElement().classList.remove(Mo),this._emulateAnimation((()=>{this.dispose(),x(t)}))):x(t)}dispose(){this._isAppended&&(H.off(this._element,ko),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add(Po),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=u(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),H.on(t,ko,(()=>{x(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(t){$(t,this._getElement(),this._config.isAnimated)}}const So="focustrap",Oo=".bs.focustrap",zo=`focusin${Oo}`,Io=`keydown.tab${Oo}`,Bo="Tab",Do="forward",No="backward",Zo={autofocus:!0,trapElement:null},jo={autofocus:"boolean",trapElement:"element"};class Ro extends G{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Zo}static get DefaultType(){return jo}static get NAME(){return So}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),H.off(document,Oo),H.on(document,zo,(t=>this._handleFocusin(t))),H.on(document,Io,(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,H.off(document,Oo))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const n=ut.focusableChildren(e);0===n.length?e.focus():this._lastTabNavDirection===No?n[n.length-1].focus():n[0].focus()}_handleKeydown(t){t.key===Bo&&(this._lastTabNavDirection=t.shiftKey?No:Do)}}const Ho="modal",Fo=".bs.modal",Wo="Escape",qo=`hide${Fo}`,Uo=`hidePrevented${Fo}`,Vo=`hidden${Fo}`,Ko=`show${Fo}`,Go=`shown${Fo}`,Yo=`resize${Fo}`,Xo=`click.dismiss${Fo}`,Jo=`mousedown.dismiss${Fo}`,Qo=`keydown.dismiss${Fo}`,ts=`click${Fo}.data-api`,es="modal-open",ns="fade",is="show",os="modal-static",ss=".modal.show",rs=".modal-dialog",as=".modal-body",ls='[data-bs-toggle="modal"]',cs={backdrop:!0,focus:!0,keyboard:!0},hs={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class us extends X{constructor(t,e){super(t,e),this._dialog=ut.findOne(rs,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new Lo,this._addEventListeners()}static get Default(){return cs}static get DefaultType(){return hs}static get NAME(){return Ho}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||H.trigger(this._element,Ko,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(es),this._adjustDialog(),this._backdrop.show((()=>this._showElement(t))))}hide(){this._isShown&&!this._isTransitioning&&(H.trigger(this._element,qo).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(is),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated())))}dispose(){for(const t of[window,this._dialog])H.off(t,Fo);this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Ao({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Ro({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const e=ut.findOne(as,this._dialog);e&&(e.scrollTop=0),_(this._element),this._element.classList.add(is);const n=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,H.trigger(this._element,Go,{relatedTarget:t})};this._queueCallback(n,this._dialog,this._isAnimated())}_addEventListeners(){H.on(this._element,Qo,(t=>{if(t.key===Wo)return this._config.keyboard?(t.preventDefault(),void this.hide()):void this._triggerBackdropTransition()})),H.on(window,Yo,(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),H.on(this._element,Jo,(t=>{H.one(this._element,Xo,(e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(es),this._resetAdjustments(),this._scrollBar.reset(),H.trigger(this._element,Vo)}))}_isAnimated(){return this._element.classList.contains(ns)}_triggerBackdropTransition(){if(H.trigger(this._element,Uo).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(os)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(os),this._queueCallback((()=>{this._element.classList.remove(os),this._queueCallback((()=>{this._element.style.overflowY=e}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),n=e>0;if(n&&!t){const t=b()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!n&&t){const t=b()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const n=us.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===n[t])throw new TypeError(`No method named "${t}"`);n[t](e)}}))}}H.on(document,ts,ls,(function(t){const e=a(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),H.one(e,Ko,(t=>{t.defaultPrevented||H.one(e,Vo,(()=>{d(this)&&this.focus()}))}));const n=ut.findOne(ss);n&&us.getInstance(n).hide(),us.getOrCreateInstance(e).toggle(this)})),J(us),w(us);const ds="offcanvas",ps=".bs.offcanvas",ms=".data-api",fs=`load${ps}${ms}`,_s="Escape",gs="show",vs="showing",ys="hiding",bs="offcanvas-backdrop",ws=".offcanvas.show",xs=`show${ps}`,$s=`shown${ps}`,Ls=`hide${ps}`,Ts=`hidePrevented${ps}`,Ps=`hidden${ps}`,Ms=`resize${ps}`,ks=`click${ps}${ms}`,Cs=`keydown.dismiss${ps}`,Es='[data-bs-toggle="offcanvas"]',As={backdrop:!0,keyboard:!0,scroll:!1},Ss={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Os extends X{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return As}static get DefaultType(){return Ss}static get NAME(){return ds}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown)return;if(H.trigger(this._element,xs,{relatedTarget:t}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||(new Lo).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(vs);const e=()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(gs),this._element.classList.remove(vs),H.trigger(this._element,$s,{relatedTarget:t})};this._queueCallback(e,this._element,!0)}hide(){if(!this._isShown)return;if(H.trigger(this._element,Ls).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(ys),this._backdrop.hide();const t=()=>{this._element.classList.remove(gs,ys),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new Lo).reset(),H.trigger(this._element,Ps)};this._queueCallback(t,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=()=>{"static"!==this._config.backdrop?this.hide():H.trigger(this._element,Ts)},e=Boolean(this._config.backdrop);return new Ao({className:bs,isVisible:e,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:e?t:null})}_initializeFocusTrap(){return new Ro({trapElement:this._element})}_addEventListeners(){H.on(this._element,Cs,(t=>{t.key===_s&&(this._config.keyboard?this.hide():H.trigger(this._element,Ts))}))}static jQueryInterface(t){return this.each((function(){const e=Os.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}H.on(document,ks,Es,(function(t){const e=a(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),p(this))return;H.one(e,Ps,(()=>{d(this)&&this.focus()}));const n=ut.findOne(ws);n&&n!==e&&Os.getInstance(n).hide(),Os.getOrCreateInstance(e).toggle(this)})),H.on(window,fs,(()=>{for(const t of ut.find(ws))Os.getOrCreateInstance(t).show()})),H.on(window,Ms,(()=>{for(const t of ut.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&Os.getOrCreateInstance(t).hide()})),J(Os),w(Os);const zs=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Is=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,Bs=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,Ds=(t,e)=>{const n=t.nodeName.toLowerCase();return e.includes(n)?!zs.has(n)||Boolean(Is.test(t.nodeValue)||Bs.test(t.nodeValue)):e.filter((t=>t instanceof RegExp)).some((t=>t.test(n)))},Ns={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]};function Zs(t,e,n){if(!t.length)return t;if(n&&"function"==typeof n)return n(t);const i=(new window.DOMParser).parseFromString(t,"text/html"),o=[].concat(...i.body.querySelectorAll("*"));for(const t of o){const n=t.nodeName.toLowerCase();if(!Object.keys(e).includes(n)){t.remove();continue}const i=[].concat(...t.attributes),o=[].concat(e["*"]||[],e[n]||[]);for(const e of i)Ds(e,o)||t.removeAttribute(e.nodeName)}return i.body.innerHTML}const js="TemplateFactory",Rs={allowList:Ns,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},Hs={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},Fs={entry:"(string|element|function|null)",selector:"(string|element)"};class Ws extends G{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return Rs}static get DefaultType(){return Hs}static get NAME(){return js}getContent(){return Object.values(this._config.content).map((t=>this._resolvePossibleFunction(t))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[e,n]of Object.entries(this._config.content))this._setContent(t,n,e);const e=t.children[0],n=this._resolvePossibleFunction(this._config.extraClass);return n&&e.classList.add(...n.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,n]of Object.entries(t))super._typeCheckConfig({selector:e,entry:n},Fs)}_setContent(t,e,n){const i=ut.findOne(n,t);i&&((e=this._resolvePossibleFunction(e))?h(e)?this._putElementInTemplate(u(e),i):this._config.html?i.innerHTML=this._maybeSanitize(e):i.textContent=e:i.remove())}_maybeSanitize(t){return this._config.sanitize?Zs(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return"function"==typeof t?t(this):t}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const qs="tooltip",Us=new Set(["sanitize","allowList","sanitizeFn"]),Vs="fade",Ks="show",Gs=".tooltip-inner",Ys=".modal",Xs="hide.bs.modal",Js="hover",Qs="focus",tr="click",er="manual",nr="hide",ir="hidden",or="show",sr="shown",rr="inserted",ar="click",lr="focusin",cr="focusout",hr="mouseenter",ur="mouseleave",dr={AUTO:"auto",TOP:"top",RIGHT:b()?"left":"right",BOTTOM:"bottom",LEFT:b()?"right":"left"},pr={allowList:Ns,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,0],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},mr={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class fr extends X{constructor(t,e){if(void 0===zi)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t,e),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return pr}static get DefaultType(){return mr}static get NAME(){return qs}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),H.off(this._element.closest(Ys),Xs,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=H.trigger(this._element,this.constructor.eventName(or)),e=(m(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!e)return;this._disposePopper();const n=this._getTipElement();this._element.setAttribute("aria-describedby",n.getAttribute("id"));const{container:i}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(i.append(n),H.trigger(this._element,this.constructor.eventName(rr))),this._popper=this._createPopper(n),n.classList.add(Ks),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))H.on(t,"mouseover",f);const o=()=>{H.trigger(this._element,this.constructor.eventName(sr)),!1===this._isHovered&&this._leave(),this._isHovered=!1};this._queueCallback(o,this.tip,this._isAnimated())}hide(){if(!this._isShown())return;if(H.trigger(this._element,this.constructor.eventName(nr)).defaultPrevented)return;if(this._getTipElement().classList.remove(Ks),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))H.off(t,"mouseover",f);this._activeTrigger[tr]=!1,this._activeTrigger[Qs]=!1,this._activeTrigger[Js]=!1,this._isHovered=null;const t=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),H.trigger(this._element,this.constructor.eventName(ir)))};this._queueCallback(t,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(Vs,Ks),e.classList.add(`bs-${this.constructor.NAME}-auto`);const n=o(this.constructor.NAME).toString();return e.setAttribute("id",n),this._isAnimated()&&e.classList.add(Vs),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new Ws({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[Gs]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(Vs)}_isShown(){return this.tip&&this.tip.classList.contains(Ks)}_createPopper(t){const e="function"==typeof this._config.placement?this._config.placement.call(this,t,this._element):this._config.placement,n=dr[e.toUpperCase()];return Oi(this._element,t,this._getPopperConfig(n))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return"function"==typeof t?t.call(this._element):t}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]};return{...e,..."function"==typeof this._config.popperConfig?this._config.popperConfig(e):this._config.popperConfig}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)H.on(this._element,this.constructor.eventName(ar),this._config.selector,(t=>{this._initializeOnDelegatedTarget(t).toggle()}));else if(e!==er){const t=e===Js?this.constructor.eventName(hr):this.constructor.eventName(lr),n=e===Js?this.constructor.eventName(ur):this.constructor.eventName(cr);H.on(this._element,t,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?Qs:Js]=!0,e._enter()})),H.on(this._element,n,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?Qs:Js]=e._element.contains(t.relatedTarget),e._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},H.on(this._element.closest(Ys),Xs,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=K.getDataAttributes(this._element);for(const t of Object.keys(e))Us.has(t)&&delete e[t];return t={...e,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:u(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const e in this._config)this.constructor.Default[e]!==this._config[e]&&(t[e]=this._config[e]);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each((function(){const e=fr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}w(fr);const _r="popover",gr=".popover-header",vr=".popover-body",yr={...fr.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},br={...fr.DefaultType,content:"(null|string|element|function)"};class wr extends fr{static get Default(){return yr}static get DefaultType(){return br}static get NAME(){return _r}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[gr]:this._getTitle(),[vr]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each((function(){const e=wr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}w(wr);const xr="scrollspy",$r=".bs.scrollspy",Lr=`activate${$r}`,Tr=`click${$r}`,Pr=`load${$r}.data-api`,Mr="dropdown-item",kr="active",Cr='[data-bs-spy="scroll"]',Er="[href]",Ar=".nav, .list-group",Sr=".nav-link",Or=`${Sr}, .nav-item > ${Sr}, .list-group-item`,zr=".dropdown",Ir=".dropdown-toggle",Br={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Dr={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Nr extends X{constructor(t,e){super(t,e),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Br}static get DefaultType(){return Dr}static get NAME(){return xr}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=u(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,"string"==typeof t.threshold&&(t.threshold=t.threshold.split(",").map((t=>Number.parseFloat(t)))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(H.off(this._config.target,Tr),H.on(this._config.target,Tr,Er,(t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const n=this._rootElement||window,i=e.offsetTop-this._element.offsetTop;if(n.scrollTo)return void n.scrollTo({top:i,behavior:"smooth"});n.scrollTop=i}})))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((t=>this._observerCallback(t)),t)}_observerCallback(t){const e=t=>this._targetLinks.get(`#${t.target.id}`),n=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop,this._process(e(t))},i=(this._rootElement||document.documentElement).scrollTop,o=i>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=i;for(const s of t){if(!s.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(s));continue}const t=s.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(o&&t){if(n(s),!i)return}else o||t||n(s)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=ut.find(Er,this._config.target);for(const e of t){if(!e.hash||p(e))continue;const t=ut.findOne(e.hash,this._element);d(t)&&(this._targetLinks.set(e.hash,e),this._observableSections.set(e.hash,t))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(kr),this._activateParents(t),H.trigger(this._element,Lr,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains(Mr))ut.findOne(Ir,t.closest(zr)).classList.add(kr);else for(const e of ut.parents(t,Ar))for(const t of ut.prev(e,Or))t.classList.add(kr)}_clearActiveClass(t){t.classList.remove(kr);const e=ut.find(`${Er}.${kr}`,t);for(const t of e)t.classList.remove(kr)}static jQueryInterface(t){return this.each((function(){const e=Nr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}H.on(window,Pr,(()=>{for(const t of ut.find(Cr))Nr.getOrCreateInstance(t)})),w(Nr);const Zr="tab",jr=".bs.tab",Rr=`hide${jr}`,Hr=`hidden${jr}`,Fr=`show${jr}`,Wr=`shown${jr}`,qr=`click${jr}`,Ur=`keydown${jr}`,Vr=`load${jr}`,Kr="ArrowLeft",Gr="ArrowRight",Yr="ArrowUp",Xr="ArrowDown",Jr="active",Qr="fade",ta="show",ea="dropdown",na=".dropdown-toggle",ia=".dropdown-menu",oa=":not(.dropdown-toggle)",sa='.list-group, .nav, [role="tablist"]',ra=".nav-item, .list-group-item",aa='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',la=`.nav-link${oa}, .list-group-item${oa}, [role="tab"]${oa}, ${aa}`,ca=`.${Jr}[data-bs-toggle="tab"], .${Jr}[data-bs-toggle="pill"], .${Jr}[data-bs-toggle="list"]`;class ha extends X{constructor(t){super(t),this._parent=this._element.closest(sa),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),H.on(this._element,Ur,(t=>this._keydown(t))))}static get NAME(){return Zr}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),n=e?H.trigger(e,Rr,{relatedTarget:t}):null;H.trigger(t,Fr,{relatedTarget:e}).defaultPrevented||n&&n.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){if(!t)return;t.classList.add(Jr),this._activate(a(t));const n=()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),H.trigger(t,Wr,{relatedTarget:e})):t.classList.add(ta)};this._queueCallback(n,t,t.classList.contains(Qr))}_deactivate(t,e){if(!t)return;t.classList.remove(Jr),t.blur(),this._deactivate(a(t));const n=()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),H.trigger(t,Hr,{relatedTarget:e})):t.classList.remove(ta)};this._queueCallback(n,t,t.classList.contains(Qr))}_keydown(t){if(![Kr,Gr,Yr,Xr].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=[Gr,Xr].includes(t.key),n=L(this._getChildren().filter((t=>!p(t))),t.target,e,!0);n&&(n.focus({preventScroll:!0}),ha.getOrCreateInstance(n).show())}_getChildren(){return ut.find(la,this._parent)}_getActiveElem(){return this._getChildren().find((t=>this._elemIsActive(t)))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),n=this._getOuterElement(t);t.setAttribute("aria-selected",e),n!==t&&this._setAttributeIfNotExists(n,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=a(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`#${t.id}`))}_toggleDropDown(t,e){const n=this._getOuterElement(t);if(!n.classList.contains(ea))return;const i=(t,i)=>{const o=ut.findOne(t,n);o&&o.classList.toggle(i,e)};i(na,Jr),i(ia,ta),n.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,n){t.hasAttribute(e)||t.setAttribute(e,n)}_elemIsActive(t){return t.classList.contains(Jr)}_getInnerElement(t){return t.matches(la)?t:ut.findOne(la,t)}_getOuterElement(t){return t.closest(ra)||t}static jQueryInterface(t){return this.each((function(){const e=ha.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}H.on(document,qr,aa,(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),p(this)||ha.getOrCreateInstance(this).show()})),H.on(window,Vr,(()=>{for(const t of ut.find(ca))ha.getOrCreateInstance(t)})),w(ha);const ua="toast",da=".bs.toast",pa=`mouseover${da}`,ma=`mouseout${da}`,fa=`focusin${da}`,_a=`focusout${da}`,ga=`hide${da}`,va=`hidden${da}`,ya=`show${da}`,ba=`shown${da}`,wa="fade",xa="hide",$a="show",La="showing",Ta={animation:"boolean",autohide:"boolean",delay:"number"},Pa={animation:!0,autohide:!0,delay:5e3};class Ma extends X{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Pa}static get DefaultType(){return Ta}static get NAME(){return ua}show(){if(H.trigger(this._element,ya).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(wa);const t=()=>{this._element.classList.remove(La),H.trigger(this._element,ba),this._maybeScheduleHide()};this._element.classList.remove(xa),_(this._element),this._element.classList.add($a,La),this._queueCallback(t,this._element,this._config.animation)}hide(){if(!this.isShown())return;if(H.trigger(this._element,ga).defaultPrevented)return;const t=()=>{this._element.classList.add(xa),this._element.classList.remove(La,$a),H.trigger(this._element,va)};this._element.classList.add(La),this._queueCallback(t,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove($a),super.dispose()}isShown(){return this._element.classList.contains($a)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const n=t.relatedTarget;this._element===n||this._element.contains(n)||this._maybeScheduleHide()}_setListeners(){H.on(this._element,pa,(t=>this._onInteraction(t,!0))),H.on(this._element,ma,(t=>this._onInteraction(t,!1))),H.on(this._element,fa,(t=>this._onInteraction(t,!0))),H.on(this._element,_a,(t=>this._onInteraction(t,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=Ma.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}J(Ma),w(Ma)})();const ct=[];function ht(e,n=t){let i;const o=new Set;function s(t){if(r(e,t)&&(e=t,i)){const t=!ct.length;for(const t of o)t[1](),ct.push(t,e);if(t){for(let t=0;t<ct.length;t+=2)ct[t][0](ct[t+1]);ct.length=0}}}return{set:s,update:function(t){s(t(e))},subscribe:function(r,a=t){const l=[r,a];return o.add(l),1===o.size&&(i=n(s)||t),r(e),()=>{o.delete(l),0===o.size&&(i(),i=null)}}}}
/*!
* escape-html
* Copyright(c) 2012-2013 TJ Holowaychuk
* Copyright(c) 2015 Andreas Lubbe
* Copyright(c) 2015 Tiancheng "Timothy" Gu
* MIT Licensed
- */var ge=/["'&<>]/,ve=function(t){var e,n=""+t,i=ge.exec(n);if(!i)return n;var o="",s=0,r=0;for(s=i.index;s<n.length;s++){switch(n.charCodeAt(s)){case 34:e=""";break;case 38:e="&";break;case 39:e="'";break;case 60:e="<";break;case 62:e=">";break;default:continue}r!==s&&(o+=n.substring(r,s)),r=s+1,o+=e}return r!==s?o+n.substring(r,s):o};var ye=Oe,be=function(t){if(!t.osm_type)return"";var e=Oe(t.osm_type,!1);return e?'<a href="https://www.openstreetmap.org/'+e+"/"+t.osm_id+'">'+e+" "+t.osm_id+"</a>":""},we=function(t){if(t.label)return t.label;function e(t){return t&&t[0].toUpperCase()+t.slice(1)}if(t.type&&"yes"===t.type&&t.class)return e(t.class.replace(/_/g," "));if(t.type)return e(t.type.replace(/_/g," "));return""},xe=function(t){if(!t.calculated_wikipedia)return"";var e=t.calculated_wikipedia.split(":",2),n=Ae(t.calculated_wikipedia),i=Ae(e[0]),o=Ae(e[1]);return'<a href="https://'+i+".wikipedia.org/wiki/"+o+'" target="_blank">'+n+"</a>"},$e=function(t){return t.isarea?"Polygon":"Point"},Le=function(t){return"boundary"===t.category&&"administrative"===t.type},Te=function(t){return t<4?"other":t<6?"country":t<8?"region":t<10?"state":t<12?"state district":t<14?"county":t<16?"municipality":t<18?"city / town / village":t<20?"city / village district":t<22?"suburb / hamlet":t<24?"neighbourhood":t<26?"city block / square":26===t?"major street":27===t?"minory street / path":t<=30?"house / building":"other"},Pe=function(t){var e=t.class+":"+t.type;t.type&&"administrative"===t.type&&t.place_type&&(e=e+" ("+t.place_type+")");return Ae(e)},Me=function(t){return t&&t<15?t:""},ke=function(t,e){if(e){if(t<1)return"0";var n=t>=1e3?Math.round(t/1e3,1)+" km":Math.round(t,0)+" m";return'<abbr class="distance" title="'+t+' meters">~'+n+"</abbr>"}return 0===t?"0":'<abbr class="distance" title="spheric distance '+t+'">~'+Math.round(1e3*t,4)/1e3+"</abbr>"},Ce=function(t){return(" "===t[0]?"*":"")+Ae(t)},Ee=function(){return["Continent / Sea","","","Country","","State","Region","","County","","City","","Town / Village","","Suburb","","Street","","Building","","",""]};const Ae=ve;function Oe(t,e){return"N"===t?"node":"W"===t?"way":"R"===t?"relation":e&&("T"===t||"I"===t)?"way":""}function Se(t){let e,n,i,o;const s=t[6].default,r=p(s,t,t[5],null);return{c(){e=x("a"),r&&r.c(),E(e,"href",t[1]),E(e,"class",t[0])},m(s,a){y(s,e,a),r&&r.m(e,null),n=!0,i||(o=M(e,"click",C(k(t[2]))),i=!0)},p(t,[i]){r&&r.p&&(!n||32&i)&&_(r,s,t,t[5],n?f(s,t[5],i,null):g(t[5]),null),(!n||2&i)&&E(e,"href",t[1]),(!n||1&i)&&E(e,"class",t[0])},i(t){n||(tt(r,t),n=!0)},o(t){et(r,t),n=!1},d(t){t&&b(e),r&&r.d(t),i=!1,o()}}}function ze(t,e,n){let{$$slots:i={},$$scope:o}=e,{extra_classes:s=""}=e,{feature:r=null}=e,a=new URLSearchParams,l="details.html";return t.$$set=t=>{"extra_classes"in t&&n(0,s=t.extra_classes),"feature"in t&&n(3,r=t.feature),"$$scope"in t&&n(5,o=t.$$scope)},t.$$.update=()=>{if(8&t.$$.dirty){let t=new URLSearchParams;null!==r&&(r.osm_type?(1===r.osm_type.length?t.set("osmtype",r.osm_type):t.set("osmtype","node"===(e=r.osm_type)?"N":"way"===e?"W":"relation"===e?"R":""),t.set("osmid",r.osm_id),r.class?t.set("class",r.class):r.category&&t.set("class",r.category)):r.place_id&&t.set("place_id",r.place_id)),n(4,a=t)}var e;if(16&t.$$.dirty){let t=a.toString();n(1,l="details.html"+(t?"?":"")+t)}},[s,l,function(){yt("details",a)},r,a,o,i]}class Ie extends lt{constructor(t){super(),at(this,t,ze,Se,r,{extra_classes:0,feature:3})}}function De(e){let n;return{c(){n=x("div"),E(n,"id","welcome")},m(t,e){y(t,n,e)},p:t,i:t,o:t,d(t){t&&b(n)}}}function Be(t){return B((()=>{Tt("theme/welcome.html",document.getElementById("welcome"))})),[]}class Ne extends lt{constructor(t){super(),at(this,t,Be,De,r,{})}}function Ze(t){let e,n;return{c(){e=x("img"),E(e,"class","mapicon svelte-180cawe"),c(e.src,n=t[1])||E(e,"src",n),E(e,"alt",t[2])},m(t,n){y(t,e,n)},p(t,i){2&i&&!c(e.src,n=t[1])&&E(e,"src",n),4&i&&E(e,"alt",t[2])},d(t){t&&b(e)}}}function je(e){let n,i=e[0]&&Ze(e);return{c(){i&&i.c(),n=P()},m(t,e){i&&i.m(t,e),y(t,n,e)},p(t,[e]){t[0]?i?i.p(t,e):(i=Ze(t),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},i:t,o:t,d(t){i&&i.d(t),t&&b(n)}}}function Re(t,e,n){let i,o,s,{aPlace:r}=e;return t.$$set=t=>{"aPlace"in t&&n(3,r=t.aPlace)},t.$$.update=()=>{var e,a;8&t.$$.dirty&&n(0,(e=r.category,a=r.type,i={"boundary:administrative":"poi_boundary_administrative","place:city":"poi_place_city","place:town":"poi_place_town","place:village":"poi_place_village","place:hamlet":"poi_place_village","place:suburb":"poi_place_village","place:locality":"poi_place_village","place:airport":"transport_airport2","aeroway:aerodrome":"transport_airport2","railway:station":"transport_train_station2","amenity:place_of_worship":"place_of_worship_unknown3","amenity:pub":"food_pub","amenity:bar":"food_bar","amenity:university":"education_university","tourism:museum":"tourist_museum","amenity:arts_centre":"tourist_art_gallery2","tourism:zoo":"tourist_zoo","tourism:theme_park":"poi_point_of_interest","tourism:attraction":"poi_point_of_interest","leisure:golf_course":"sport_golf","historic:castle":"tourist_castle","amenity:hospital":"health_hospital","amenity:school":"education_school","amenity:theatre":"tourist_theatre","amenity:library":"amenity_library","amenity:fire_station":"amenity_firestation3","amenity:police":"amenity_police2","amenity:bank":"money_bank2","amenity:post_office":"amenity_post_office","tourism:hotel":"accommodation_hotel2","amenity:cinema":"tourist_cinema","tourism:artwork":"tourist_art_gallery2","historic:archaeological_site":"tourist_archaeological2","amenity:doctors":"health_doctors","leisure:sports_centre":"sport_leisure_centre","leisure:swimming_pool":"sport_swimming_outdoor","shop:supermarket":"shopping_supermarket","shop:convenience":"shopping_convenience","amenity:restaurant":"food_restaurant","amenity:fast_food":"food_fastfood","amenity:cafe":"food_cafe","tourism:guest_house":"accommodation_bed_and_breakfast","amenity:pharmacy":"health_pharmacy_dispensing","amenity:fuel":"transport_fuel","natural:peak":"poi_peak","natural:wood":"landuse_coniferous_and_deciduous","shop:bicycle":"shopping_bicycle","shop:clothes":"shopping_clothes","shop:hairdresser":"shopping_hairdresser","shop:doityourself":"shopping_diy","shop:estate_agent":"shopping_estateagent2","shop:car":"shopping_car","shop:garden_centre":"shopping_garden_centre","shop:car_repair":"shopping_car_repair","shop:bakery":"shopping_bakery","shop:butcher":"shopping_butcher","shop:apparel":"shopping_clothes","shop:laundry":"shopping_laundrette","shop:beverages":"shopping_alcohol","shop:alcohol":"shopping_alcohol","shop:optician":"health_opticians","shop:chemist":"health_pharmacy","shop:gallery":"tourist_art_gallery2","shop:jewelry":"shopping_jewelry","tourism:information":"amenity_information","historic:ruins":"tourist_ruin","amenity:college":"education_school","historic:monument":"tourist_monument","historic:memorial":"tourist_monument","historic:mine":"poi_mine","tourism:caravan_site":"accommodation_caravan_park","amenity:bus_station":"transport_bus_station","amenity:atm":"money_atm2","tourism:viewpoint":"tourist_view_point","tourism:guesthouse":"accommodation_bed_and_breakfast","railway:tram":"transport_tram_stop","amenity:courthouse":"amenity_court","amenity:recycling":"amenity_recycling","amenity:dentist":"health_dentist","natural:beach":"tourist_beach","railway:tram_stop":"transport_tram_stop","amenity:prison":"amenity_prison","highway:bus_stop":"transport_bus_stop2"}[e+":"+a])),8&t.$$.dirty&&n(2,o="icon for "+r.category+" "+r.type),1&t.$$.dirty&&n(1,s=Nominatim_Config.Images_Base_Url+i+".p.20.png")},[i,s,o,r]}class He extends lt{constructor(t){super(),at(this,t,Re,je,r,{aPlace:3})}}function Fe(t,e,n){const i=t.slice();return i[6]=e[n],i[8]=n,i}function We(e){let n,i;return n=new Ne({}),{c(){it(n.$$.fragment)},m(t,e){ot(n,t,e),i=!0},p:t,i(t){i||(tt(n.$$.fragment,t),i=!0)},o(t){et(n.$$.fragment,t),i=!1},d(t){st(n,t)}}}function qe(e){let n;function i(t,e){return t[0]?Ge:Ve}let o=i(e),s=o(e);return{c(){s.c(),n=P()},m(t,e){s.m(t,e),y(t,n,e)},p(t,e){o!==(o=i(t))&&(s.d(1),s=o(t),s&&(s.c(),s.m(n.parentNode,n)))},i:t,o:t,d(t){s.d(t),t&&b(n)}}}function Ue(t){let e,n,i,o=t[1],s=[];for(let e=0;e<o.length;e+=1)s[e]=Ye(Fe(t,o,e));const r=t=>et(s[t],1,1,(()=>{s[t]=null}));let a=t[3]&&!t[0]&&Xe(t);return{c(){e=x("div");for(let t=0;t<s.length;t+=1)s[t].c();n=T(),a&&a.c(),E(e,"id","searchresults")},m(t,o){y(t,e,o);for(let t=0;t<s.length;t+=1)s[t].m(e,null);v(e,n),a&&a.m(e,null),i=!0},p(t,i){if(22&i){let a;for(o=t[1],a=0;a<o.length;a+=1){const r=Fe(t,o,a);s[a]?(s[a].p(r,i),tt(s[a],1)):(s[a]=Ye(r),s[a].c(),tt(s[a],1),s[a].m(e,n))}for(J(),a=o.length;a<s.length;a+=1)r(a);Q()}t[3]&&!t[0]?a?a.p(t,i):(a=Xe(t),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},i(t){if(!i){for(let t=0;t<o.length;t+=1)tt(s[t]);i=!0}},o(t){s=s.filter(Boolean);for(let t=0;t<s.length;t+=1)et(s[t]);i=!1},d(t){t&&b(e),w(s,t),a&&a.d()}}}function Ve(t){let e;return{c(){e=x("div"),e.textContent="No search results found",E(e,"class","noresults svelte-5fm7ib")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function Ge(t){let e;return{c(){e=x("div"),e.textContent="Search for coordinates or click anywhere on the map.",E(e,"id","intro"),E(e,"class","sidebar")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function Ke(t){let e;return{c(){e=$("details")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function Ye(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,L,P=t[6].display_name+"",k=we(t[6])+"",O=t[6].lat+"",S=t[6].lon+"";return i=new He({props:{aPlace:t[6]}}),_=new Ie({props:{extra_classes:"btn btn-outline-secondary btn-sm",feature:t[6],$$slots:{default:[Ke]},$$scope:{ctx:t}}}),{c(){var g,v,y,b;e=x("div"),n=x("div"),it(i.$$.fragment),o=T(),s=x("span"),r=$(P),a=T(),l=x("span"),c=$(k),h=T(),u=x("p"),d=$(O),p=$(","),m=$(S),f=T(),it(_.$$.fragment),g=n,v="float",null===(y="right")?g.style.removeProperty(v):g.style.setProperty(v,y,b?"important":""),E(s,"class","name"),E(l,"class","type svelte-5fm7ib"),E(u,"class","coords svelte-5fm7ib"),E(e,"class","result svelte-5fm7ib"),E(e,"data-position",t[8]),z(e,"highlight",t[8]===t[2])},m(b,x){y(b,e,x),v(e,n),ot(i,n,null),v(e,o),v(e,s),v(s,r),v(e,a),v(e,l),v(l,c),v(e,h),v(e,u),v(u,d),v(u,p),v(u,m),v(e,f),ot(_,e,null),g=!0,w||(L=M(e,"click",C(t[4])),w=!0)},p(t,n){const o={};2&n&&(o.aPlace=t[6]),i.$set(o),(!g||2&n)&&P!==(P=t[6].display_name+"")&&A(r,P),(!g||2&n)&&k!==(k=we(t[6])+"")&&A(c,k),(!g||2&n)&&O!==(O=t[6].lat+"")&&A(d,O),(!g||2&n)&&S!==(S=t[6].lon+"")&&A(m,S);const s={};2&n&&(s.feature=t[6]),512&n&&(s.$$scope={dirty:n,ctx:t}),_.$set(s),(!g||4&n)&&z(e,"highlight",t[8]===t[2])},i(t){g||(tt(i.$$.fragment,t),tt(_.$$.fragment,t),g=!0)},o(t){et(i.$$.fragment,t),et(_.$$.fragment,t),g=!1},d(t){t&&b(e),st(i),st(_),w=!1,L()}}}function Xe(t){let e,n,i;return{c(){e=x("div"),n=x("a"),i=$("Search for more results"),E(n,"class","btn btn-primary"),E(n,"href",t[3]),E(e,"class","more svelte-5fm7ib")},m(t,o){y(t,e,o),v(e,n),v(n,i)},p(t,e){8&e&&E(n,"href",t[3])},d(t){t&&b(e)}}}function Je(t){let e,n,i,o;const s=[Ue,qe,We],r=[];function a(t,e){return t[1]&&t[1].length>0?0:t[1]?1:2}return e=a(t),n=r[e]=s[e](t),{c(){n.c(),i=P()},m(t,n){r[e].m(t,n),y(t,i,n),o=!0},p(t,[o]){let l=e;e=a(t),e===l?r[e].p(t,o):(J(),et(r[l],1,1,(()=>{r[l]=null})),Q(),n=r[e],n?n.p(t,o):(n=r[e]=s[e](t),n.c()),tt(n,1),n.m(i.parentNode,i))},i(t){o||(tt(n),o=!0)},o(t){et(n),o=!1},d(t){r[e].d(t),t&&b(i)}}}function Qe(t,e,n){let i,o,s,{reverse_search:r=!1}=e,{current_result:a=null}=e;return pt.subscribe((t=>{if(!t)return;n(1,i=t),n(2,o=0),n(5,a=i[0]);let e=new URLSearchParams(window.location.search),r=t;var l=[];e.has("exclude_place_ids")&&(l=e.get("exclude_place_ids").split(","));for(var c=0;c<r.length;c+=1)l.push(r[c].place_id);var h=new URLSearchParams(window.location.search);h.set("exclude_place_ids",l.join(",")),n(3,s="?"+h.toString())})),t.$$set=t=>{"reverse_search"in t&&n(0,r=t.reverse_search),"current_result"in t&&n(5,a=t.current_result)},[r,i,o,s,function(t){let e=t.target;e.className.match("result")||(e=e.parentElement);let s=Number(e.dataset.position);n(5,a=i[s]),n(2,o=s)},a]}class tn extends lt{constructor(t){super(),at(this,t,Qe,Je,r,{reverse_search:0,current_result:5})}}
+ */var ut=/["'&<>]/,dt=function(t){var e,n=""+t,i=ut.exec(n);if(!i)return n;var o="",s=0,r=0;for(s=i.index;s<n.length;s++){switch(n.charCodeAt(s)){case 34:e=""";break;case 38:e="&";break;case 39:e="'";break;case 60:e="<";break;case 62:e=">";break;default:continue}r!==s&&(o+=n.substring(r,s)),r=s+1,o+=e}return r!==s?o+n.substring(r,s):o};function pt(t,e){return"N"===t?"node":"W"===t?"way":"R"===t?"relation":e&&("T"===t||"I"===t)?"way":""}function mt(t){if(!t.osm_type)return"";var e=pt(t.osm_type,!1);return e?'<a href="https://www.openstreetmap.org/'+e+"/"+t.osm_id+'">'+e+" "+t.osm_id+"</a>":""}function ft(t){if(t.label)return t.label;function e(t){return t&&t[0].toUpperCase()+t.slice(1)}return t.type&&"yes"===t.type&&t.category?e(t.category.replace(/_/g," ")):t.type?e(t.type.replace(/_/g," ")):""}function _t(t){if(!t.calculated_wikipedia)return"";var e=t.calculated_wikipedia.split(":",2),n=dt(t.calculated_wikipedia);return'<a href="https://'+dt(e[0])+".wikipedia.org/wiki/"+dt(e[1])+'" target="_blank">'+n+"</a>"}function gt(t){return t.isarea?"Polygon":"Point"}function vt(t){return"boundary"===t.category&&"administrative"===t.type}function yt(t){return t<4?"other":t<6?"country":t<8?"region":t<10?"state":t<12?"state district":t<14?"county":t<16?"municipality":t<18?"city / town / village":t<20?"city / village district":t<22?"suburb / hamlet":t<24?"neighbourhood":t<26?"city block / square":26===t?"major street":27===t?"minory street / path":t<=30?"house / building":"other"}function bt(t){var e=t.class+":"+t.type;return t.type&&"administrative"===t.type&&t.place_type&&(e=e+" ("+t.place_type+")"),dt(e)}function wt(t){return t&&t<15?t:""}function xt(t,e){return e?t<1?"0":'<abbr class="distance" title="'+t+' meters">~'+(t>=1e3?Math.round(t/1e3,1)+" km":Math.round(t,0)+" m")+"</abbr>":0===t?"0":'<abbr class="distance" title="spheric distance '+t+'">~'+Math.round(1e3*t,4)/1e3+"</abbr>"}function $t(t){return(" "===t[0]?"*":"")+dt(t)}const Lt=ht(),Tt=ht(),Pt=ht(),Mt=ht(),kt=ht(),Ct=Nominatim_Config.Reverse_Only?"reverse":"search",Et=[Ct,"reverse","details","deletable","polygons","status","about"];function At(t,e){if(void 0===t)t=window.location.pathname.replace(".html","").replace(/^.*\//,""),Et.includes(t)||(t=Ct),e=new URLSearchParams(window.location.search);else{Et.includes(t)||(t=Ct),void 0===e&&(e=new URLSearchParams);let n=e.toString();n&&(n="?"+n);let i=t+".html"+n;window.location.protocol.match(/^http/)?window.history.pushState([],"",i):window.location.href=i}if("search"===t&&e.has("q")){const n=function(t){if(!t)return;const e=t.match(/\/(relation|way|node)\/(\d+)/)||t.match(/^([nwr])(\d+)$/i);return e?[e[1][0].toUpperCase(),Number(e[2])]:void 0}(e.get("q"));n instanceof Array&&(t="details",(e=new URLSearchParams).set("osmtype",n[0]),e.set("osmid",n[1]))}kt.set({tab:t,params:e}),Pt.set(null),Mt.set(null)}function St(e){let n;return{c(){n=x("footer"),n.innerHTML='<p class="disclaimer svelte-1f2bd8l">Addresses and postcodes are approximate</p> \n <p class="copyright svelte-1f2bd8l">© <a href="https://osm.org/copyright">OpenStreetMap</a> contributors</p>',E(n,"class","svelte-1f2bd8l")},m(t,e){y(t,n,e)},p:t,i:t,o:t,d(t){t&&b(n)}}}class Ot extends lt{constructor(t){super(),at(this,t,null,St,r,{})}}function zt(t){var e=document.getElementById("loading");e&&(e.style.display="start"===t?"block":null)}async function It(t,e,n){var i=function(t,e){1===e.dedupe&&delete e.dedupe;return function(t,e){for(var n=Object.keys(e),i=0;i<n.length;i+=1)t[n[i]]=e[n[i]]}(e,Nominatim_Config.Nominatim_API_Endpoint_Params),Nt(t)+"?"+Object.keys(function(t){for(var e=Object.keys(t),n=0;n<e.length;n+=1){var i=t[e[n]];void 0!==i&&""!==i&&null!==i||delete t[e[n]]}return t}(e)).map((t=>encodeURIComponent(t)+"="+encodeURIComponent(e[t]))).join("&")}(t,e),o=new URLSearchParams(window.location.search);o&&o.get("httpbin_status")&&(i="https://httpbin.org/status/"+parseInt(o.get("httpbin_status"),10)),zt("start"),"status"!==t&&Pt.set(null);try{await fetch(i,{headers:Nominatim_Config.Nominatim_API_Endpoint_Headers||{}}).then((async t=>{if(t.status>=200&&t.status<300||404===t.status){var e;try{e=await t.json()}catch(t){return void Mt.set(`Error parsing JSON data from ${i} (${t})`)}return e}Mt.set(`Error fetching data from ${i} (${t.statusText})`)})).then((t=>{t&&(t.error&&Mt.set(t.error.message),n(t)),zt("finish")}))}catch(t){Mt.set(`Error fetching data from ${i} (${t})`),zt("finish")}"status"!==t&&Pt.set(i)}var Bt={};async function Dt(t,e){if(window.location.protocol.match(/^http/))if(Bt[t])e.innerHTML=Bt[t];else try{await fetch(t).then((t=>t.text())).then((n=>{n=n.replace("Nominatim_API_Endpoint",Nt()),e.innerHTML=n,Bt[t]=n}))}catch(n){e.innerHTML=`Error fetching content from ${t} (${n})`}else e.innerHTML=`Cannot display data from ${t} here. Browser security prevents loading content from file:// URLs.`}function Nt(t){var e=Nominatim_Config.Nominatim_API_Endpoint;return"function"==typeof e?e(t):t?e+t+".php":e}function Zt(t){document.title=[t,Nominatim_Config.Page_Title].filter((t=>t&&t.length>1)).join(" | ")}function jt(t){let e,n,i,o;const s=t[6].default,r=p(s,t,t[5],null);return{c(){e=x("a"),r&&r.c(),E(e,"href",t[1]),E(e,"class",t[0])},m(s,a){y(s,e,a),r&&r.m(e,null),n=!0,i||(o=M(e,"click",C(k(t[2]))),i=!0)},p(t,[i]){r&&r.p&&(!n||32&i)&&_(r,s,t,t[5],n?f(s,t[5],i,null):g(t[5]),null),(!n||2&i)&&E(e,"href",t[1]),(!n||1&i)&&E(e,"class",t[0])},i(t){n||(tt(r,t),n=!0)},o(t){et(r,t),n=!1},d(t){t&&b(e),r&&r.d(t),i=!1,o()}}}function Rt(t,e,n){let{$$slots:i={},$$scope:o}=e,{page:s}=e,{params_hash:r={}}=e,{extra_classes:a=""}=e,l=s+".html";return t.$$set=t=>{"page"in t&&n(3,s=t.page),"params_hash"in t&&n(4,r=t.params_hash),"extra_classes"in t&&n(0,a=t.extra_classes),"$$scope"in t&&n(5,o=t.$$scope)},t.$$.update=()=>{if(24&t.$$.dirty){let t=new URLSearchParams(r).toString();n(1,l=s+".html"+(t?"?":"")+t)}},[a,l,function(){At(s,new URLSearchParams(r))},s,r,o,i]}class Ht extends lt{constructor(t){super(),at(this,t,Rt,jt,r,{page:3,params_hash:4,extra_classes:0})}}function Ft(t){let e,n,i,o;const s=t[7].default,r=p(s,t,t[6],null);return{c(){e=x("a"),r&&r.c(),E(e,"href",t[2]),E(e,"class",t[0])},m(s,a){y(s,e,a),r&&r.m(e,null),n=!0,i||(o=M(e,"click",C(k(t[8]))),i=!0)},p(t,[i]){r&&r.p&&(!n||64&i)&&_(r,s,t,t[6],n?f(s,t[6],i,null):g(t[6]),null),(!n||4&i)&&E(e,"href",t[2]),(!n||1&i)&&E(e,"class",t[0])},i(t){n||(tt(r,t),n=!0)},o(t){et(r,t),n=!1},d(t){t&&b(e),r&&r.d(t),i=!1,o()}}}function Wt(t,e,n){let{$$slots:i={},$$scope:o}=e,{lat:s=null}=e,{lon:r=null}=e,{zoom:a=null}=e,{extra_classes:l=""}=e,c=new URLSearchParams,h="reverse.html";return t.$$set=t=>{"lat"in t&&n(3,s=t.lat),"lon"in t&&n(4,r=t.lon),"zoom"in t&&n(5,a=t.zoom),"extra_classes"in t&&n(0,l=t.extra_classes),"$$scope"in t&&n(6,o=t.$$scope)},t.$$.update=()=>{if(56&t.$$.dirty){let t=new URLSearchParams;s&&r&&(t.set("lat",s),t.set("lon",r),a&&t.set("zoom",a)),n(1,c=t)}if(2&t.$$.dirty){let t=c.toString();n(2,h="reverse.html"+(t?"?":"")+t)}},[l,c,h,s,r,a,o,i,()=>At("reverse",c)]}class qt extends lt{constructor(t){super(),at(this,t,Wt,Ft,r,{lat:3,lon:4,zoom:5,extra_classes:0})}}var Ut=["second","minute","hour","day","week","month","year"];var Vt=["秒","分钟","小时","天","周","个月","年"];var Kt={},Gt=function(t,e){Kt[t]=e},Yt=[60,60,24,7,365/7/12,12];function Xt(t){return t instanceof Date?t:!isNaN(t)||/^\d+$/.test(t)?new Date(parseInt(t)):(t=(t||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(t))}var Jt=function(t,e,n){var i=function(t,e){return(+(e?Xt(e):new Date)-+Xt(t))/1e3}(t,n&&n.relativeDate);return function(t,e){for(var n=t<0?1:0,i=t=Math.abs(t),o=0;t>=Yt[o]&&o<Yt.length;o++)t/=Yt[o];return(t=Math.floor(t))>(0==(o*=2)?9:1)&&(o+=1),e(t,o,i)[n].replace("%s",t.toString())}(i,function(t){return Kt[t]||Kt.en_US}(e))};function Qt(t){let e,n,i,o,s,r,a,l,c,h,u;return{c(){e=x("div"),n=$("Data from "),i=x("a"),o=$("API request"),s=T(),r=x("span"),a=$("("),l=x("a"),c=$("debug output"),u=$(")"),E(i,"href",t[1]),E(l,"href",h=t[1]+"&debug=1"),E(r,"id","api-request-debug"),E(e,"id","api-request")},m(t,h){y(t,e,h),v(e,n),v(e,i),v(i,o),v(e,s),v(e,r),v(r,a),v(r,l),v(l,c),v(r,u)},p(t,e){2&e&&E(i,"href",t[1]),2&e&&h!==(h=t[1]+"&debug=1")&&E(l,"href",h)},d(t){t&&b(e)}}}function te(t){let e,n,i,o,s=Jt(new Date(t[0]))+"";return{c(){e=$("Data last updated:\n "),n=x("abbr"),i=$(s),E(n,"id","data-date"),E(n,"title",o=t[0]+" (UTC timezone)")},m(t,o){y(t,e,o),y(t,n,o),v(n,i)},p(t,e){1&e&&s!==(s=Jt(new Date(t[0]))+"")&&A(i,s),1&e&&o!==(o=t[0]+" (UTC timezone)")&&E(n,"title",o)},d(t){t&&b(e),t&&b(n)}}}function ee(t){let e;return{c(){e=$("Details")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function ne(t){let e,n,i,o,s,r,a,l,c,h,u,d=t[1]&&Qt(t),p=t[0]&&te(t);return c=new Ht({props:{page:"status",$$slots:{default:[ee]},$$scope:{ctx:t}}}),{c(){e=x("div"),n=x("div"),n.innerHTML='<div class="spinner-border spinner-border-sm text-primary me-1" role="status"></div>\n Loading data from API ...',i=T(),o=x("div"),s=x("div"),d&&d.c(),r=T(),a=x("div"),p&&p.c(),l=$("\n ("),it(c.$$.fragment),h=$(")"),E(n,"id","loading"),E(n,"class","py-2 px-4 svelte-1i1228w"),E(s,"class","col-sm-6"),E(a,"class","col-sm-6 text-end"),E(o,"class","row"),E(e,"id","last-updated"),E(e,"class","container-fluid py-2 px-4 mb-3 svelte-1i1228w")},m(t,m){y(t,e,m),v(e,n),v(e,i),v(e,o),v(o,s),d&&d.m(s,null),v(o,r),v(o,a),p&&p.m(a,null),v(a,l),ot(c,a,null),v(a,h),u=!0},p(t,[e]){t[1]?d?d.p(t,e):(d=Qt(t),d.c(),d.m(s,null)):d&&(d.d(1),d=null),t[0]?p?p.p(t,e):(p=te(t),p.c(),p.m(a,l)):p&&(p.d(1),p=null);const n={};8&e&&(n.$$scope={dirty:e,ctx:t}),c.$set(n)},i(t){u||(tt(c.$$.fragment,t),u=!0)},o(t){et(c.$$.fragment,t),u=!1},d(t){t&&b(e),d&&d.d(),p&&p.d(),st(c)}}}function ie(t,e,n){let i,o,s=!1;return Pt.subscribe((t=>{n(1,o=t),o&&(n(1,o=new URL(o,window.location.origin)),o.searchParams.delete("polygon_geojson"),n(1,o=o.toString())),s||i||(s=!0,It("status",{format:"json"},(function(t){n(0,i=t.data_updated),s=!1})))})),[i,o]}Gt("en_US",(function(t,e){if(0===e)return["just now","right now"];var n=Ut[Math.floor(e/2)];return t>1&&(n+="s"),[t+" "+n+" ago","in "+t+" "+n]})),Gt("zh_CN",(function(t,e){if(0===e)return["刚刚","片刻后"];var n=Vt[~~(e/2)];return[t+" "+n+"前",t+" "+n+"后"]}));class oe extends lt{constructor(t){super(),at(this,t,ie,ne,r,{})}}function se(t){let e,n,i,o,s,r;return{c(){e=x("div"),n=$(t[0]),i=T(),o=x("button"),E(o,"type","button"),E(o,"class","btn-close float-end"),E(o,"aria-label","dismiss"),E(e,"id","error"),E(e,"class","container-fluid alert-danger py-3 px-4")},m(a,l){y(a,e,l),v(e,n),v(e,i),v(e,o),s||(r=M(o,"click",t[1]),s=!0)},p(t,e){1&e&&A(n,t[0])},d(t){t&&b(e),s=!1,r()}}}function re(e){let n,i=e[0]&&se(e);return{c(){i&&i.c(),n=P()},m(t,e){i&&i.m(t,e),y(t,n,e)},p(t,[e]){t[0]?i?i.p(t,e):(i=se(t),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},i:t,o:t,d(t){i&&i.d(t),t&&b(n)}}}function ae(t,e,n){let i;return Mt.subscribe((t=>{n(0,i=t)})),[i,function(){Mt.set(null)}]}let le=class extends lt{constructor(t){super(),at(this,t,ae,re,r,{})}};function ce(t){let e,n,i,o,s;return{c(){e=x("img"),i=T(),o=x("h1"),s=$(t[3]),E(e,"alt","logo"),E(e,"id","theme-logo"),c(e.src,n="theme/logo.png")||E(e,"src","theme/logo.png"),E(e,"class","svelte-1q88nx"),E(o,"class","svelte-1q88nx")},m(t,n){y(t,e,n),y(t,i,n),y(t,o,n),v(o,s)},p(t,e){8&e&&A(s,t[3])},d(t){t&&b(e),t&&b(i),t&&b(o)}}}function he(t){let e,n,i;return n=new Ht({props:{page:"search",extra_classes:"nav-link "+("search"===t[4]?"active":""),$$slots:{default:[ue]},$$scope:{ctx:t}}}),{c(){e=x("li"),it(n.$$.fragment),E(e,"class","nav-item svelte-1q88nx")},m(t,o){y(t,e,o),ot(n,e,null),i=!0},p(t,e){const i={};16&e&&(i.extra_classes="nav-link "+("search"===t[4]?"active":"")),128&e&&(i.$$scope={dirty:e,ctx:t}),n.$set(i)},i(t){i||(tt(n.$$.fragment,t),i=!0)},o(t){et(n.$$.fragment,t),i=!1},d(t){t&&b(e),st(n)}}}function ue(t){let e;return{c(){e=$("Search")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function de(t){let e;return{c(){e=$("Reverse")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function pe(t){let e;return{c(){e=$("Search By ID")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function me(t){let e;return{c(){e=$("About & Help")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function fe(t){let e,n,i,o,s,r,a,l,c,h,u,d,m,w,L,P,M,k,C,S,O,z,I,B,D,N,Z,j,R,H,F;s=new Ht({props:{page:t[2]?"reverse":"search",$$slots:{default:[ce]},$$scope:{ctx:t}}});let W=!t[2]&&he(t);m=new qt({props:{lat:t[0],lon:t[1],extra_classes:"nav-link "+("reverse"===t[4]?"active":""),$$slots:{default:[de]},$$scope:{ctx:t}}}),P=new Ht({props:{page:"details",extra_classes:"nav-link "+("details"===t[4]?"active":""),$$slots:{default:[pe]},$$scope:{ctx:t}}}),S=new Ht({props:{page:"about",extra_classes:"nav-link "+("about"===t[4]?"active":""),$$slots:{default:[me]},$$scope:{ctx:t}}});const q=t[6].default,U=p(q,t,t[7],null);return j=new le({}),H=new oe({}),{c(){e=x("header"),n=x("nav"),i=x("div"),o=x("div"),it(s.$$.fragment),r=T(),a=x("button"),a.innerHTML='<span class="navbar-toggler-icon"></span>',l=T(),c=x("div"),h=x("ul"),W&&W.c(),u=T(),d=x("li"),it(m.$$.fragment),w=T(),L=x("li"),it(P.$$.fragment),M=T(),k=x("ul"),C=x("li"),it(S.$$.fragment),O=T(),z=x("section"),I=x("h2"),B=$(t[4]),D=T(),N=x("section"),U&&U.c(),Z=T(),it(j.$$.fragment),R=T(),it(H.$$.fragment),E(o,"class","navbar-brand svelte-1q88nx"),E(a,"class","navbar-toggler"),E(a,"type","button"),E(a,"data-bs-toggle","collapse"),E(a,"data-bs-target","#navbarSupportedContent"),E(a,"aria-controls","navbarSupportedContent"),E(a,"aria-expanded","false"),E(a,"aria-label","Toggle navigation"),E(d,"class","nav-item svelte-1q88nx"),E(L,"class","nav-item svelte-1q88nx"),E(h,"class","navbar-nav me-auto"),E(c,"class","collapse navbar-collapse"),E(c,"id","navbarSupportedContent"),E(C,"class","nav-item svelte-1q88nx"),E(k,"class","navbar-nav"),E(i,"class","container-fluid"),E(n,"class","navbar navbar-expand-sm navbar-light"),E(e,"class","container-fluid"),E(z,"class","page-title-section svelte-1q88nx"),E(N,"class","search-section svelte-1q88nx")},m(t,p){y(t,e,p),v(e,n),v(n,i),v(i,o),ot(s,o,null),v(i,r),v(i,a),v(i,l),v(i,c),v(c,h),W&&W.m(h,null),v(h,u),v(h,d),ot(m,d,null),v(h,w),v(h,L),ot(P,L,null),v(i,M),v(i,k),v(k,C),ot(S,C,null),y(t,O,p),y(t,z,p),v(z,I),v(I,B),y(t,D,p),y(t,N,p),U&&U.m(N,null),y(t,Z,p),ot(j,t,p),y(t,R,p),ot(H,t,p),F=!0},p(t,[e]){const n={};4&e&&(n.page=t[2]?"reverse":"search"),136&e&&(n.$$scope={dirty:e,ctx:t}),s.$set(n),t[2]?W&&(J(),et(W,1,1,(()=>{W=null})),Q()):W?(W.p(t,e),4&e&&tt(W,1)):(W=he(t),W.c(),tt(W,1),W.m(h,u));const i={};1&e&&(i.lat=t[0]),2&e&&(i.lon=t[1]),16&e&&(i.extra_classes="nav-link "+("reverse"===t[4]?"active":"")),128&e&&(i.$$scope={dirty:e,ctx:t}),m.$set(i);const o={};16&e&&(o.extra_classes="nav-link "+("details"===t[4]?"active":"")),128&e&&(o.$$scope={dirty:e,ctx:t}),P.$set(o);const r={};16&e&&(r.extra_classes="nav-link "+("about"===t[4]?"active":"")),128&e&&(r.$$scope={dirty:e,ctx:t}),S.$set(r),(!F||16&e)&&A(B,t[4]),U&&U.p&&(!F||128&e)&&_(U,q,t,t[7],F?f(q,t[7],e,null):g(t[7]),null)},i(t){F||(tt(s.$$.fragment,t),tt(W),tt(m.$$.fragment,t),tt(P.$$.fragment,t),tt(S.$$.fragment,t),tt(U,t),tt(j.$$.fragment,t),tt(H.$$.fragment,t),F=!0)},o(t){et(s.$$.fragment,t),et(W),et(m.$$.fragment,t),et(P.$$.fragment,t),et(S.$$.fragment,t),et(U,t),et(j.$$.fragment,t),et(H.$$.fragment,t),F=!1},d(t){t&&b(e),st(s),W&&W.d(),st(m),st(P),st(S),t&&b(O),t&&b(z),t&&b(D),t&&b(N),U&&U.d(t),t&&b(Z),st(j,t),t&&b(R),st(H,t)}}}function _e(t,e,n){let i,o,s,r;d(t,kt,(t=>n(5,r=t)));let a,l,{$$slots:c={},$$scope:h}=e;return Lt.subscribe((t=>{t&&t.on("move",(function(){n(0,a=t.getCenter().lat),n(1,l=t.getCenter().lng)}))})),t.$$set=t=>{"$$scope"in t&&n(7,h=t.$$scope)},t.$$.update=()=>{32&t.$$.dirty&&n(4,i=r.tab)},n(3,o=Nominatim_Config.Page_Title),n(2,s=Nominatim_Config.Reverse_Only),[a,l,s,o,i,r,c,h]}class ge extends lt{constructor(t){super(),at(this,t,_e,fe,r,{})}}function ve(t){let e,n,i,o,s;const r=t[3].default,a=p(r,t,t[2],null);return{c(){e=x("form"),n=x("div"),a&&a.c(),E(n,"class","row g-2"),E(e,"class","form-inline"),E(e,"role","search"),E(e,"accept-charset","UTF-8"),E(e,"action","")},m(r,l){y(r,e,l),v(e,n),a&&a.m(n,null),i=!0,o||(s=M(e,"submit",k(t[0])),o=!0)},p(t,[e]){a&&a.p&&(!i||4&e)&&_(a,r,t,t[2],i?f(r,t[2],e,null):g(t[2]),null)},i(t){i||(tt(a,t),i=!0)},o(t){et(a,t),i=!1},d(t){t&&b(e),a&&a.d(t),o=!1,s()}}}function ye(t,e,n){let{$$slots:i={},$$scope:o}=e,{page:s}=e;return t.$$set=t=>{"page"in t&&n(1,s=t.page),"$$scope"in t&&n(2,o=t.$$scope)},[function(t){let e=t.target,n=!0;Array.prototype.slice.call(e.elements).forEach((function(t){(function(t){return!("hidden"===t.type&&t.value.length&&t.pattern&&!t.value.match(t.pattern))&&t.checkValidity()})(t)||(alert("Invalid input in "+t.name),n=!1)})),n&&At(s,function(t){var e=new URLSearchParams;return Array.prototype.slice.call(t.elements).forEach((function(t){!t.name||t.disabled||["submit","button"].indexOf(t.type)>-1||["checkbox","radio"].indexOf(t.type)>-1&&!t.checked||void 0!==t.value&&""!==t.value&&("dedupe"!==t.name||1!==t.value&&"1"!==t.value)&&e.set(t.name,t.value)})),e}(e))},s,o,i]}class be extends lt{constructor(t){super(),at(this,t,ye,ve,r,{page:1})}}function we(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,$,L,P,M,k,C,A,S,O;return{c(){e=x("div"),n=x("input"),o=T(),s=x("div"),r=x("button"),r.textContent="Search",a=T(),l=x("input"),h=T(),u=x("input"),p=T(),m=x("input"),_=T(),g=x("input"),$=T(),L=x("input"),M=T(),k=x("input"),A=T(),S=x("input"),E(n,"id","q"),E(n,"name","q"),E(n,"type","text"),E(n,"class","form-control form-control-sm svelte-1u2ltgo"),E(n,"placeholder","Search"),n.value=i=t[1].q||"",n.autofocus=!0,E(e,"class","col-auto"),E(r,"type","submit"),E(r,"class","btn btn-primary btn-sm mx-1"),E(l,"type","hidden"),E(l,"name","viewbox"),l.value=c=t[2]||"",E(u,"type","hidden"),E(u,"name","dedupe"),u.value=d=0===t[1].dedupe?0:1,E(m,"type","hidden"),E(m,"name","bounded"),m.value=f=t[1].bounded?1:"",E(g,"type","hidden"),E(g,"name","accept-language"),g.value=w=t[1]["accept-language"]||"",E(L,"type","hidden"),E(L,"name","countrycodes"),L.value=P=t[1].countrycodes||"",E(L,"pattern","^[a-zA-Z]{2}(,[a-zA-Z]{2})*$"),E(k,"type","hidden"),E(k,"name","limit"),k.value=C=t[1].limit||"",E(S,"type","hidden"),E(S,"name","polygon_threshold"),S.value=O=t[1].polygon_threshold||"",E(s,"class","col-auto")},m(t,i){y(t,e,i),v(e,n),y(t,o,i),y(t,s,i),v(s,r),v(s,a),v(s,l),v(s,h),v(s,u),v(s,p),v(s,m),v(s,_),v(s,g),v(s,$),v(s,L),v(s,M),v(s,k),v(s,A),v(s,S),n.focus()},p(t,e){2&e&&i!==(i=t[1].q||"")&&n.value!==i&&(n.value=i),4&e&&c!==(c=t[2]||"")&&(l.value=c),2&e&&d!==(d=0===t[1].dedupe?0:1)&&(u.value=d),2&e&&f!==(f=t[1].bounded?1:"")&&(m.value=f),2&e&&w!==(w=t[1]["accept-language"]||"")&&(g.value=w),2&e&&P!==(P=t[1].countrycodes||"")&&(L.value=P),2&e&&C!==(C=t[1].limit||"")&&(k.value=C),2&e&&O!==(O=t[1].polygon_threshold||"")&&(S.value=O)},d(t){t&&b(e),t&&b(o),t&&b(s)}}}function xe(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,$,L,P,M,k,C,A,S,O,z,I,B,D,N,Z,j,R,H,F,W,q,U,V,K,G,Y,X,J,Q;return{c(){e=x("div"),n=x("input"),o=T(),s=x("div"),r=x("input"),l=T(),c=x("div"),h=x("input"),d=T(),p=x("div"),m=x("input"),_=T(),g=x("div"),w=x("input"),L=T(),P=x("div"),M=x("input"),C=T(),A=x("div"),S=x("button"),S.textContent="Search",O=T(),z=x("input"),B=T(),D=x("input"),Z=T(),j=x("input"),H=T(),F=x("input"),q=T(),U=x("input"),K=T(),G=x("input"),X=T(),J=x("input"),E(n,"name","street"),E(n,"type","text"),E(n,"class","form-control form-control-sm me-1"),E(n,"placeholder","House number/Street"),n.value=i=t[1].street||"",E(e,"class","col-auto"),E(r,"name","city"),E(r,"type","text"),E(r,"class","form-control form-control-sm me-1"),E(r,"placeholder","City"),r.value=a=t[1].city||"",E(s,"class","col-auto"),E(h,"id","county"),E(h,"name","county"),E(h,"type","text"),E(h,"class","form-control form-control-sm me-1"),E(h,"placeholder","County"),h.value=u=t[1].county||"",E(c,"class","col-auto"),E(m,"name","state"),E(m,"type","text"),E(m,"class","form-control form-control-sm me-1"),E(m,"placeholder","State"),m.value=f=t[1].state||"",E(p,"class","col-auto"),E(w,"name","country"),E(w,"type","text"),E(w,"class","form-control form-control-sm me-1"),E(w,"placeholder","Country"),w.value=$=t[1].country||"",E(g,"class","col-auto"),E(M,"name","postalcode"),E(M,"type","text"),E(M,"class","form-control form-control-sm me-1"),E(M,"placeholder","Postal Code"),M.value=k=t[1].postalcode||"",E(P,"class","col-auto"),E(S,"type","submit"),E(S,"class","btn btn-primary btn-sm"),E(z,"type","hidden"),E(z,"name","viewbox"),z.value=I=t[2]||"",E(D,"type","hidden"),E(D,"name","dedupe"),D.value=N=0===t[1].dedupe?0:1,E(j,"type","hidden"),E(j,"name","bounded"),j.value=R=t[1].bounded?1:"",E(F,"type","hidden"),E(F,"name","accept-language"),F.value=W=t[1]["accept-language"]||"",E(U,"type","hidden"),E(U,"name","countrycodes"),U.value=V=t[1].countrycodes||"",E(U,"pattern","^[a-zA-Z]{2}(,[a-zA-Z]{2})*$"),E(G,"type","hidden"),E(G,"name","limit"),G.value=Y=t[1].limit||"",E(J,"type","hidden"),E(J,"name","polygon_threshold"),J.value=Q=t[1].polygon_threshold||"",E(A,"class","col-auto")},m(t,i){y(t,e,i),v(e,n),y(t,o,i),y(t,s,i),v(s,r),y(t,l,i),y(t,c,i),v(c,h),y(t,d,i),y(t,p,i),v(p,m),y(t,_,i),y(t,g,i),v(g,w),y(t,L,i),y(t,P,i),v(P,M),y(t,C,i),y(t,A,i),v(A,S),v(A,O),v(A,z),v(A,B),v(A,D),v(A,Z),v(A,j),v(A,H),v(A,F),v(A,q),v(A,U),v(A,K),v(A,G),v(A,X),v(A,J)},p(t,e){2&e&&i!==(i=t[1].street||"")&&n.value!==i&&(n.value=i),2&e&&a!==(a=t[1].city||"")&&r.value!==a&&(r.value=a),2&e&&u!==(u=t[1].county||"")&&h.value!==u&&(h.value=u),2&e&&f!==(f=t[1].state||"")&&m.value!==f&&(m.value=f),2&e&&$!==($=t[1].country||"")&&w.value!==$&&(w.value=$),2&e&&k!==(k=t[1].postalcode||"")&&M.value!==k&&(M.value=k),4&e&&I!==(I=t[2]||"")&&(z.value=I),2&e&&N!==(N=0===t[1].dedupe?0:1)&&(D.value=N),2&e&&R!==(R=t[1].bounded?1:"")&&(j.value=R),2&e&&W!==(W=t[1]["accept-language"]||"")&&(F.value=W),2&e&&V!==(V=t[1].countrycodes||"")&&(U.value=V),2&e&&Y!==(Y=t[1].limit||"")&&(G.value=Y),2&e&&Q!==(Q=t[1].polygon_threshold||"")&&(J.value=Q)},d(t){t&&b(e),t&&b(o),t&&b(s),t&&b(l),t&&b(c),t&&b(d),t&&b(p),t&&b(_),t&&b(g),t&&b(L),t&&b(P),t&&b(C),t&&b(A)}}}function $e(t){let e,n,i,s,r,a,l,c,h,u,d,p,m,f,_,g,w,$,L,P,k,C,A,S,O,I,B,D,N,Z,j,R,H,F,W,q,U,V,K,G,Y,X,J,Q,nt,rt,at,lt,ct,ht,ut,dt,pt,mt,ft,_t,gt,vt,yt,bt,wt,xt,$t,Lt,Tt;return u=new be({props:{page:"search",$$slots:{default:[we]},$$scope:{ctx:t}}}),m=new be({props:{page:"search",$$slots:{default:[xe]},$$scope:{ctx:t}}}),{c(){e=x("ul"),n=x("li"),i=x("a"),i.textContent="Simple",s=T(),r=x("li"),a=x("a"),a.textContent="Structured",l=T(),c=x("div"),h=x("div"),it(u.$$.fragment),d=T(),p=x("div"),it(m.$$.fragment),f=T(),_=x("details"),g=x("summary"),g.innerHTML="<small>Advanced options</small>",w=T(),$=x("ul"),L=x("li"),P=x("div"),k=x("label"),k.textContent="apply viewbox",C=T(),A=x("input"),O=T(),I=x("li"),B=x("div"),D=x("label"),D.textContent="bounded to viewbox",N=T(),Z=x("input"),R=T(),H=x("li"),F=x("div"),W=x("label"),W.textContent="deduplicate results",q=T(),U=x("input"),K=T(),G=x("li"),Y=x("label"),Y.textContent="Maximum number of results",X=T(),J=x("input"),nt=T(),rt=x("li"),at=x("label"),at.textContent="Polygon simplification",lt=T(),ct=x("input"),ut=T(),dt=x("li"),pt=x("label"),pt.textContent="Languages",mt=T(),ft=x("input"),gt=T(),vt=x("li"),yt=x("label"),yt.textContent="Country Codes",bt=T(),wt=x("input"),E(i,"class","nav-link svelte-1u2ltgo"),E(i,"data-bs-toggle","tab"),E(i,"href","#simple"),z(i,"active",!t[0]),E(n,"class","nav-item"),E(a,"class","nav-link svelte-1u2ltgo"),E(a,"data-bs-toggle","tab"),E(a,"href","#structured"),z(a,"active",t[0]),E(r,"class","nav-item"),E(e,"class","nav nav-tabs svelte-1u2ltgo"),E(h,"class","tab-pane"),E(h,"id","simple"),E(h,"role","tabpanel"),z(h,"active",!t[0]),E(p,"class","tab-pane"),E(p,"id","structured"),E(p,"role","tabpanel"),z(p,"active",t[0]),E(c,"class","tab-content py-2"),E(k,"class","form-check-label svelte-1u2ltgo"),E(k,"for","use_viewbox"),E(A,"type","checkbox"),E(A,"class","form-check-input api-param-setting"),E(A,"id","use_viewbox"),A.checked=S=t[1].viewbox,E(P,"class","form-check form-check-inline"),E(L,"class","svelte-1u2ltgo"),E(D,"class","form-check-label svelte-1u2ltgo"),E(D,"for","option_bounded"),E(Z,"type","checkbox"),E(Z,"class","form-check-input api-param-setting"),E(Z,"id","option_bounded"),Z.checked=j=!!t[1].bounded,E(B,"class","form-check form-check-inline"),E(I,"class","svelte-1u2ltgo"),E(W,"class","form-check-label svelte-1u2ltgo"),E(W,"for","option_dedupe"),E(U,"type","checkbox"),E(U,"class","form-check-input api-param-setting"),E(U,"id","option_dedupe"),U.checked=V=0===t[1].dedupe?0:1,E(F,"class","form-check form-check-inline"),E(H,"class","svelte-1u2ltgo"),E(Y,"for","option_limit"),E(Y,"class","svelte-1u2ltgo"),E(J,"type","number"),E(J,"class","form-control form-control-sm d-inline w-auto api-param-setting"),E(J,"data-api-param","limit"),E(J,"id","option_limit"),E(J,"min","1"),E(J,"max","50"),J.value=Q=t[1].limit||"",E(G,"class","svelte-1u2ltgo"),E(at,"for","option_polygon_threshold"),E(at,"class","svelte-1u2ltgo"),E(ct,"type","number"),E(ct,"class","form-control form-control-sm d-inline w-auto api-param-setting"),E(ct,"data-api-param","polygon_threshold"),E(ct,"id","option_polygon_threshold"),E(ct,"min","0.0"),E(ct,"max","1.0"),E(ct,"step","0.001"),ct.value=ht=t[1].polygon_threshold||"",E(rt,"class","svelte-1u2ltgo"),E(pt,"for","accept_lang"),E(pt,"class","svelte-1u2ltgo"),E(ft,"type","text"),E(ft,"placeholder","e.g. en,zh-Hant"),E(ft,"class","form-control form-control-sm d-inline w-auto api-param-setting"),E(ft,"data-api-param","accept-language"),E(ft,"id","accept_lang"),E(ft,"size","15"),ft.value=_t=t[1]["accept-language"]||"",E(dt,"class","svelte-1u2ltgo"),E(yt,"for","option_ccode"),E(yt,"class","svelte-1u2ltgo"),E(wt,"type","text"),E(wt,"placeholder","e.g. de,gb"),E(wt,"class","form-control form-control-sm d-inline w-auto api-param-setting"),E(wt,"data-api-param","countrycodes"),E(wt,"id","option_ccode"),E(wt,"size","15"),wt.value=xt=t[1].countrycodes||"",E(wt,"pattern","^[a-zA-Z]{2}(,[a-zA-Z]{2})*$"),E(vt,"class","svelte-1u2ltgo"),E($,"class","svelte-1u2ltgo"),E(_,"id","searchAdvancedOptions"),E(_,"class","svelte-1u2ltgo")},m(o,b){y(o,e,b),v(e,n),v(n,i),v(e,s),v(e,r),v(r,a),y(o,l,b),y(o,c,b),v(c,h),ot(u,h,null),v(c,d),v(c,p),ot(m,p,null),y(o,f,b),y(o,_,b),v(_,g),v(_,w),v(_,$),v($,L),v(L,P),v(P,k),v(P,C),v(P,A),v($,O),v($,I),v(I,B),v(B,D),v(B,N),v(B,Z),v($,R),v($,H),v(H,F),v(F,W),v(F,q),v(F,U),v($,K),v($,G),v(G,Y),v(G,X),v(G,J),v($,nt),v($,rt),v(rt,at),v(rt,lt),v(rt,ct),v($,ut),v($,dt),v(dt,pt),v(dt,mt),v(dt,ft),v($,gt),v($,vt),v(vt,yt),v(vt,bt),v(vt,wt),$t=!0,Lt||(Tt=[M(A,"change",t[3]),M(Z,"change",Le),M(U,"change",Te),M(J,"change",Pe),M(ct,"change",Pe),M(ft,"change",Pe),M(wt,"change",Pe)],Lt=!0)},p(t,[e]){(!$t||1&e)&&z(i,"active",!t[0]),(!$t||1&e)&&z(a,"active",t[0]);const n={};262&e&&(n.$$scope={dirty:e,ctx:t}),u.$set(n),(!$t||1&e)&&z(h,"active",!t[0]);const o={};262&e&&(o.$$scope={dirty:e,ctx:t}),m.$set(o),(!$t||1&e)&&z(p,"active",t[0]),(!$t||2&e&&S!==(S=t[1].viewbox))&&(A.checked=S),(!$t||2&e&&j!==(j=!!t[1].bounded))&&(Z.checked=j),(!$t||2&e&&V!==(V=0===t[1].dedupe?0:1))&&(U.checked=V),(!$t||2&e&&Q!==(Q=t[1].limit||"")&&J.value!==Q)&&(J.value=Q),(!$t||2&e&&ht!==(ht=t[1].polygon_threshold||"")&&ct.value!==ht)&&(ct.value=ht),(!$t||2&e&&_t!==(_t=t[1]["accept-language"]||"")&&ft.value!==_t)&&(ft.value=_t),(!$t||2&e&&xt!==(xt=t[1].countrycodes||"")&&wt.value!==xt)&&(wt.value=xt)},i(t){$t||(tt(u.$$.fragment,t),tt(m.$$.fragment,t),$t=!0)},o(t){et(u.$$.fragment,t),et(m.$$.fragment,t),$t=!1},d(t){t&&b(e),t&&b(l),t&&b(c),st(u),st(m),t&&b(f),t&&b(_),Lt=!1,o(Tt)}}}function Le(t){document.querySelector("input[name=bounded]").value=t.target.checked?1:""}function Te(t){document.querySelector("input[name=dedupe]").value=t.target.checked?1:0}function Pe(t){document.querySelector("input[name="+t.target.dataset.apiParam+"]").value=t.target.value}function Me(t,e,n){let i,{bStructuredSearch:o=!1}=e,{api_request_params:s={}}=e;function r(t){let e=document.getElementById("use_viewbox");e&&e.checked?n(2,i=function(t){var e=t.getBounds(),n=e.getWest(),i=e.getEast();return i-n>=360&&(n=t.getCenter().lng-179.999,i=t.getCenter().lng+179.999),i=L.latLng(77,i).wrap().lng,[(n=L.latLng(77,n).wrap().lng).toFixed(5),e.getNorth().toFixed(5),i.toFixed(5),e.getSouth().toFixed(5)].join(",")}(t)):n(2,i="")}function a(t){let e=t.wrapLatLng(t.getCenter());e.lat.toFixed(5),e.lng.toFixed(5)}return Lt.subscribe((t=>{t&&(t.on("move",(function(){r(t),a(t)})),t.on("load",(function(){r(t),a(t)})))})),t.$$set=t=>{"bStructuredSearch"in t&&n(0,o=t.bStructuredSearch),"api_request_params"in t&&n(1,s=t.api_request_params)},[o,s,i,function(){let t=u(Lt);t&&r(t)}]}class ke extends lt{constructor(t){super(),at(this,t,Me,$e,r,{bStructuredSearch:0,api_request_params:1})}}function Ce(t){let e,n,i,o;const s=t[6].default,r=p(s,t,t[5],null);return{c(){e=x("a"),r&&r.c(),E(e,"href",t[1]),E(e,"class",t[0])},m(s,a){y(s,e,a),r&&r.m(e,null),n=!0,i||(o=M(e,"click",C(k(t[2]))),i=!0)},p(t,[i]){r&&r.p&&(!n||32&i)&&_(r,s,t,t[5],n?f(s,t[5],i,null):g(t[5]),null),(!n||2&i)&&E(e,"href",t[1]),(!n||1&i)&&E(e,"class",t[0])},i(t){n||(tt(r,t),n=!0)},o(t){et(r,t),n=!1},d(t){t&&b(e),r&&r.d(t),i=!1,o()}}}function Ee(t,e,n){let{$$slots:i={},$$scope:o}=e,{extra_classes:s=""}=e,{feature:r=null}=e,a=new URLSearchParams,l="details.html";return t.$$set=t=>{"extra_classes"in t&&n(0,s=t.extra_classes),"feature"in t&&n(3,r=t.feature),"$$scope"in t&&n(5,o=t.$$scope)},t.$$.update=()=>{if(8&t.$$.dirty){let t=new URLSearchParams;null!==r&&(r.osm_type?(1===r.osm_type.length?t.set("osmtype",r.osm_type):t.set("osmtype","node"===(e=r.osm_type)?"N":"way"===e?"W":"relation"===e?"R":""),t.set("osmid",r.osm_id),r.class?t.set("class",r.class):r.category&&t.set("class",r.category)):r.place_id&&t.set("place_id",r.place_id)),n(4,a=t)}var e;if(16&t.$$.dirty){let t=a.toString();n(1,l="details.html"+(t?"?":"")+t)}},[s,l,function(){At("details",a)},r,a,o,i]}class Ae extends lt{constructor(t){super(),at(this,t,Ee,Ce,r,{extra_classes:0,feature:3})}}function Se(e){let n;return{c(){n=x("div"),E(n,"id","welcome")},m(t,e){y(t,n,e)},p:t,i:t,o:t,d(t){t&&b(n)}}}function Oe(t){return D((()=>{Dt("theme/welcome.html",document.getElementById("welcome"))})),[]}class ze extends lt{constructor(t){super(),at(this,t,Oe,Se,r,{})}}function Ie(t){let e,n;return{c(){e=x("img"),E(e,"class","mapicon svelte-180cawe"),c(e.src,n=t[1])||E(e,"src",n),E(e,"alt",t[2])},m(t,n){y(t,e,n)},p(t,i){2&i&&!c(e.src,n=t[1])&&E(e,"src",n),4&i&&E(e,"alt",t[2])},d(t){t&&b(e)}}}function Be(e){let n,i=e[0]&&Ie(e);return{c(){i&&i.c(),n=P()},m(t,e){i&&i.m(t,e),y(t,n,e)},p(t,[e]){t[0]?i?i.p(t,e):(i=Ie(t),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},i:t,o:t,d(t){i&&i.d(t),t&&b(n)}}}function De(t,e,n){let i,o,s,{aPlace:r}=e;return t.$$set=t=>{"aPlace"in t&&n(3,r=t.aPlace)},t.$$.update=()=>{var e,a;8&t.$$.dirty&&n(0,(e=r.category,a=r.type,i={"boundary:administrative":"poi_boundary_administrative","place:city":"poi_place_city","place:town":"poi_place_town","place:village":"poi_place_village","place:hamlet":"poi_place_village","place:suburb":"poi_place_village","place:locality":"poi_place_village","place:airport":"transport_airport2","aeroway:aerodrome":"transport_airport2","railway:station":"transport_train_station2","amenity:place_of_worship":"place_of_worship_unknown3","amenity:pub":"food_pub","amenity:bar":"food_bar","amenity:university":"education_university","tourism:museum":"tourist_museum","amenity:arts_centre":"tourist_art_gallery2","tourism:zoo":"tourist_zoo","tourism:theme_park":"poi_point_of_interest","tourism:attraction":"poi_point_of_interest","leisure:golf_course":"sport_golf","historic:castle":"tourist_castle","amenity:hospital":"health_hospital","amenity:school":"education_school","amenity:theatre":"tourist_theatre","amenity:library":"amenity_library","amenity:fire_station":"amenity_firestation3","amenity:police":"amenity_police2","amenity:bank":"money_bank2","amenity:post_office":"amenity_post_office","tourism:hotel":"accommodation_hotel2","amenity:cinema":"tourist_cinema","tourism:artwork":"tourist_art_gallery2","historic:archaeological_site":"tourist_archaeological2","amenity:doctors":"health_doctors","leisure:sports_centre":"sport_leisure_centre","leisure:swimming_pool":"sport_swimming_outdoor","shop:supermarket":"shopping_supermarket","shop:convenience":"shopping_convenience","amenity:restaurant":"food_restaurant","amenity:fast_food":"food_fastfood","amenity:cafe":"food_cafe","tourism:guest_house":"accommodation_bed_and_breakfast","amenity:pharmacy":"health_pharmacy_dispensing","amenity:fuel":"transport_fuel","natural:peak":"poi_peak","natural:wood":"landuse_coniferous_and_deciduous","shop:bicycle":"shopping_bicycle","shop:clothes":"shopping_clothes","shop:hairdresser":"shopping_hairdresser","shop:doityourself":"shopping_diy","shop:estate_agent":"shopping_estateagent2","shop:car":"shopping_car","shop:garden_centre":"shopping_garden_centre","shop:car_repair":"shopping_car_repair","shop:bakery":"shopping_bakery","shop:butcher":"shopping_butcher","shop:apparel":"shopping_clothes","shop:laundry":"shopping_laundrette","shop:beverages":"shopping_alcohol","shop:alcohol":"shopping_alcohol","shop:optician":"health_opticians","shop:chemist":"health_pharmacy","shop:gallery":"tourist_art_gallery2","shop:jewelry":"shopping_jewelry","tourism:information":"amenity_information","historic:ruins":"tourist_ruin","amenity:college":"education_school","historic:monument":"tourist_monument","historic:memorial":"tourist_monument","historic:mine":"poi_mine","tourism:caravan_site":"accommodation_caravan_park","amenity:bus_station":"transport_bus_station","amenity:atm":"money_atm2","tourism:viewpoint":"tourist_view_point","tourism:guesthouse":"accommodation_bed_and_breakfast","railway:tram":"transport_tram_stop","amenity:courthouse":"amenity_court","amenity:recycling":"amenity_recycling","amenity:dentist":"health_dentist","natural:beach":"tourist_beach","railway:tram_stop":"transport_tram_stop","amenity:prison":"amenity_prison","highway:bus_stop":"transport_bus_stop2"}[e+":"+a])),8&t.$$.dirty&&n(2,o="icon for "+r.category+" "+r.type),1&t.$$.dirty&&n(1,s=Nominatim_Config.Images_Base_Url+i+".p.20.png")},[i,s,o,r]}class Ne extends lt{constructor(t){super(),at(this,t,De,Be,r,{aPlace:3})}}function Ze(t,e,n){const i=t.slice();return i[6]=e[n],i[8]=n,i}function je(e){let n,i;return n=new ze({}),{c(){it(n.$$.fragment)},m(t,e){ot(n,t,e),i=!0},p:t,i(t){i||(tt(n.$$.fragment,t),i=!0)},o(t){et(n.$$.fragment,t),i=!1},d(t){st(n,t)}}}function Re(e){let n;function i(t,e){return t[0]?We:Fe}let o=i(e),s=o(e);return{c(){s.c(),n=P()},m(t,e){s.m(t,e),y(t,n,e)},p(t,e){o!==(o=i(t))&&(s.d(1),s=o(t),s&&(s.c(),s.m(n.parentNode,n)))},i:t,o:t,d(t){s.d(t),t&&b(n)}}}function He(t){let e,n,i,o=t[1],s=[];for(let e=0;e<o.length;e+=1)s[e]=Ue(Ze(t,o,e));const r=t=>et(s[t],1,1,(()=>{s[t]=null}));let a=t[3]&&!t[0]&&Ve(t);return{c(){e=x("div");for(let t=0;t<s.length;t+=1)s[t].c();n=T(),a&&a.c(),E(e,"id","searchresults")},m(t,o){y(t,e,o);for(let t=0;t<s.length;t+=1)s[t].m(e,null);v(e,n),a&&a.m(e,null),i=!0},p(t,i){if(22&i){let a;for(o=t[1],a=0;a<o.length;a+=1){const r=Ze(t,o,a);s[a]?(s[a].p(r,i),tt(s[a],1)):(s[a]=Ue(r),s[a].c(),tt(s[a],1),s[a].m(e,n))}for(J(),a=o.length;a<s.length;a+=1)r(a);Q()}t[3]&&!t[0]?a?a.p(t,i):(a=Ve(t),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},i(t){if(!i){for(let t=0;t<o.length;t+=1)tt(s[t]);i=!0}},o(t){s=s.filter(Boolean);for(let t=0;t<s.length;t+=1)et(s[t]);i=!1},d(t){t&&b(e),w(s,t),a&&a.d()}}}function Fe(t){let e;return{c(){e=x("div"),e.textContent="No search results found",E(e,"class","noresults svelte-5fm7ib")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function We(t){let e;return{c(){e=x("div"),e.textContent="Search for coordinates or click anywhere on the map.",E(e,"id","intro"),E(e,"class","sidebar")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function qe(t){let e;return{c(){e=$("details")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function Ue(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,L,P=t[6].display_name+"",k=ft(t[6])+"",S=t[6].lat+"",O=t[6].lon+"";return i=new Ne({props:{aPlace:t[6]}}),_=new Ae({props:{extra_classes:"btn btn-outline-secondary btn-sm",feature:t[6],$$slots:{default:[qe]},$$scope:{ctx:t}}}),{c(){var g,v,y,b;e=x("div"),n=x("div"),it(i.$$.fragment),o=T(),s=x("span"),r=$(P),a=T(),l=x("span"),c=$(k),h=T(),u=x("p"),d=$(S),p=$(","),m=$(O),f=T(),it(_.$$.fragment),g=n,v="float",null===(y="right")?g.style.removeProperty(v):g.style.setProperty(v,y,b?"important":""),E(s,"class","name"),E(l,"class","type svelte-5fm7ib"),E(u,"class","coords svelte-5fm7ib"),E(e,"class","result svelte-5fm7ib"),E(e,"data-position",t[8]),z(e,"highlight",t[8]===t[2])},m(b,x){y(b,e,x),v(e,n),ot(i,n,null),v(e,o),v(e,s),v(s,r),v(e,a),v(e,l),v(l,c),v(e,h),v(e,u),v(u,d),v(u,p),v(u,m),v(e,f),ot(_,e,null),g=!0,w||(L=M(e,"click",C(t[4])),w=!0)},p(t,n){const o={};2&n&&(o.aPlace=t[6]),i.$set(o),(!g||2&n)&&P!==(P=t[6].display_name+"")&&A(r,P),(!g||2&n)&&k!==(k=ft(t[6])+"")&&A(c,k),(!g||2&n)&&S!==(S=t[6].lat+"")&&A(d,S),(!g||2&n)&&O!==(O=t[6].lon+"")&&A(m,O);const s={};2&n&&(s.feature=t[6]),512&n&&(s.$$scope={dirty:n,ctx:t}),_.$set(s),(!g||4&n)&&z(e,"highlight",t[8]===t[2])},i(t){g||(tt(i.$$.fragment,t),tt(_.$$.fragment,t),g=!0)},o(t){et(i.$$.fragment,t),et(_.$$.fragment,t),g=!1},d(t){t&&b(e),st(i),st(_),w=!1,L()}}}function Ve(t){let e,n,i;return{c(){e=x("div"),n=x("a"),i=$("Search for more results"),E(n,"class","btn btn-primary"),E(n,"href",t[3]),E(e,"class","more svelte-5fm7ib")},m(t,o){y(t,e,o),v(e,n),v(n,i)},p(t,e){8&e&&E(n,"href",t[3])},d(t){t&&b(e)}}}function Ke(t){let e,n,i,o;const s=[He,Re,je],r=[];function a(t,e){return t[1]&&t[1].length>0?0:t[1]?1:2}return e=a(t),n=r[e]=s[e](t),{c(){n.c(),i=P()},m(t,n){r[e].m(t,n),y(t,i,n),o=!0},p(t,[o]){let l=e;e=a(t),e===l?r[e].p(t,o):(J(),et(r[l],1,1,(()=>{r[l]=null})),Q(),n=r[e],n?n.p(t,o):(n=r[e]=s[e](t),n.c()),tt(n,1),n.m(i.parentNode,i))},i(t){o||(tt(n),o=!0)},o(t){et(n),o=!1},d(t){r[e].d(t),t&&b(i)}}}function Ge(t,e,n){let i,o,s,{reverse_search:r=!1}=e,{current_result:a=null}=e;return Tt.subscribe((t=>{if(!t)return;n(1,i=t),n(2,o=0),n(5,a=i[0]);let e=new URLSearchParams(window.location.search),r=t;var l=[];e.has("exclude_place_ids")&&(l=e.get("exclude_place_ids").split(","));for(var c=0;c<r.length;c+=1)l.push(r[c].place_id);var h=new URLSearchParams(window.location.search);h.set("exclude_place_ids",l.join(",")),n(3,s="?"+h.toString())})),t.$$set=t=>{"reverse_search"in t&&n(0,r=t.reverse_search),"current_result"in t&&n(5,a=t.current_result)},[r,i,o,s,function(t){let e=t.target;e.className.match("result")||(e=e.parentElement);let s=Number(e.dataset.position);n(5,a=i[s]),n(2,o=s)},a]}class Ye extends lt{constructor(t){super(),at(this,t,Ge,Ke,r,{reverse_search:0,current_result:5})}}var Xe={exports:{}};
/* @preserve
- * Leaflet 1.9.1, a JS library for interactive maps. https://leafletjs.com
+ * Leaflet 1.9.3, a JS library for interactive maps. https://leafletjs.com
* (c) 2010-2022 Vladimir Agafonkin, (c) 2010-2011 CloudMade
- */var en="1.9.1";function nn(t){var e,n,i,o;for(n=1,i=arguments.length;n<i;n++)for(e in o=arguments[n])t[e]=o[e];return t}var on=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function sn(t,e){var n=Array.prototype.slice;if(t.bind)return t.bind.apply(t,n.call(arguments,1));var i=n.call(arguments,2);return function(){return t.apply(e,i.length?i.concat(n.call(arguments)):arguments)}}var rn=0;function an(t){return"_leaflet_id"in t||(t._leaflet_id=++rn),t._leaflet_id}function ln(t,e,n){var i,o,s,r;return r=function(){i=!1,o&&(s.apply(n,o),o=!1)},s=function(){i?o=arguments:(t.apply(n,arguments),setTimeout(r,e),i=!0)},s}function cn(t,e,n){var i=e[1],o=e[0],s=i-o;return t===i&&n?t:((t-o)%s+s)%s+o}function hn(){return!1}function un(t,e){if(!1===e)return t;var n=Math.pow(10,void 0===e?6:e);return Math.round(t*n)/n}function dn(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function pn(t){return dn(t).split(/\s+/)}function mn(t,e){for(var n in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?on(t.options):{}),e)t.options[n]=e[n];return t.options}function fn(t,e,n){var i=[];for(var o in t)i.push(encodeURIComponent(n?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+i.join("&")}var _n=/\{ *([\w_ -]+) *\}/g;function gn(t,e){return t.replace(_n,(function(t,n){var i=e[n];if(void 0===i)throw new Error("No value provided for variable "+t);return"function"==typeof i&&(i=i(e)),i}))}var vn=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function yn(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1}var bn="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function wn(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var xn=0;function $n(t){var e=+new Date,n=Math.max(0,16-(e-xn));return xn=e+n,window.setTimeout(t,n)}var Ln=window.requestAnimationFrame||wn("RequestAnimationFrame")||$n,Tn=window.cancelAnimationFrame||wn("CancelAnimationFrame")||wn("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function Pn(t,e,n){if(!n||Ln!==$n)return Ln.call(window,sn(t,e));t.call(e)}function Mn(t){t&&Tn.call(window,t)}var kn={__proto__:null,extend:nn,create:on,bind:sn,get lastId(){return rn},stamp:an,throttle:ln,wrapNum:cn,falseFn:hn,formatNum:un,trim:dn,splitWords:pn,setOptions:mn,getParamString:fn,template:gn,isArray:vn,indexOf:yn,emptyImageUrl:bn,requestFn:Ln,cancelFn:Tn,requestAnimFrame:Pn,cancelAnimFrame:Mn};function Cn(){}Cn.extend=function(t){var e=function(){mn(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},n=e.__super__=this.prototype,i=on(n);for(var o in i.constructor=e,e.prototype=i,this)Object.prototype.hasOwnProperty.call(this,o)&&"prototype"!==o&&"__super__"!==o&&(e[o]=this[o]);return t.statics&&nn(e,t.statics),t.includes&&(!function(t){if("undefined"==typeof L||!L||!L.Mixin)return;t=vn(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===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)}(t.includes),nn.apply(null,[i].concat(t.includes))),nn(i,t),delete i.statics,delete i.includes,i.options&&(i.options=n.options?on(n.options):{},nn(i.options,t.options)),i._initHooks=[],i.callInitHooks=function(){if(!this._initHooksCalled){n.callInitHooks&&n.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=i._initHooks.length;t<e;t++)i._initHooks[t].call(this)}},e},Cn.include=function(t){var e=this.prototype.options;return nn(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this},Cn.mergeOptions=function(t){return nn(this.prototype.options,t),this},Cn.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),n="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n),this};var En={on:function(t,e,n){if("object"==typeof t)for(var i in t)this._on(i,t[i],e);else for(var o=0,s=(t=pn(t)).length;o<s;o++)this._on(t[o],e,n);return this},off:function(t,e,n){if(arguments.length)if("object"==typeof t)for(var i in t)this._off(i,t[i],e);else{t=pn(t);for(var o=1===arguments.length,s=0,r=t.length;s<r;s++)o?this._off(t[s]):this._off(t[s],e,n)}else delete this._events;return this},_on:function(t,e,n,i){if("function"==typeof e){if(!1===this._listens(t,e,n)){n===this&&(n=void 0);var o={fn:e,ctx:n};i&&(o.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(o)}}else console.warn("wrong listener type: "+typeof e)},_off:function(t,e,n){var i,o,s;if(this._events&&(i=this._events[t]))if(1!==arguments.length)if("function"==typeof e){var r=this._listens(t,e,n);if(!1!==r){var a=i[r];this._firingCount&&(a.fn=hn,this._events[t]=i=i.slice()),i.splice(r,1)}}else console.warn("wrong listener type: "+typeof e);else{if(this._firingCount)for(o=0,s=i.length;o<s;o++)i[o].fn=hn;delete this._events[t]}},fire:function(t,e,n){if(!this.listens(t,n))return this;var i=nn({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var o=this._events[t];if(o){this._firingCount=this._firingCount+1||1;for(var s=0,r=o.length;s<r;s++){var a=o[s],l=a.fn;a.once&&this.off(t,l,a.ctx),l.call(a.ctx||this,i)}this._firingCount--}}return n&&this._propagateEvent(i),this},listens:function(t,e,n,i){"string"!=typeof t&&console.warn('"string" type argument expected');var o=e;"function"!=typeof e&&(i=!!e,o=void 0,n=void 0);var s=this._events&&this._events[t];if(s&&s.length&&!1!==this._listens(t,o,n))return!0;if(i)for(var r in this._eventParents)if(this._eventParents[r].listens(t,e,n,i))return!0;return!1},_listens:function(t,e,n){if(!this._events)return!1;var i=this._events[t]||[];if(!e)return!!i.length;n===this&&(n=void 0);for(var o=0,s=i.length;o<s;o++)if(i[o].fn===e&&i[o].ctx===n)return o;return!1},once:function(t,e,n){if("object"==typeof t)for(var i in t)this._on(i,t[i],e,!0);else for(var o=0,s=(t=pn(t)).length;o<s;o++)this._on(t[o],e,n,!0);return this},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[an(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[an(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,nn({layer:t.target,propagatedFrom:t.target},t),!0)}};En.addEventListener=En.on,En.removeEventListener=En.clearAllEventListeners=En.off,En.addOneTimeEventListener=En.once,En.fireEvent=En.fire,En.hasEventListeners=En.listens;var An=Cn.extend(En);function On(t,e,n){this.x=n?Math.round(t):t,this.y=n?Math.round(e):e}var Sn=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function zn(t,e,n){return t instanceof On?t:vn(t)?new On(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new On(t.x,t.y):new On(t,e,n)}function In(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i<o;i++)this.extend(n[i])}function Dn(t,e){return!t||t instanceof In?t:new In(t,e)}function Bn(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i<o;i++)this.extend(n[i])}function Nn(t,e){return t instanceof Bn?t:new Bn(t,e)}function Zn(t,e,n){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==n&&(this.alt=+n)}function jn(t,e,n){return t instanceof Zn?t:vn(t)&&"object"!=typeof t[0]?3===t.length?new Zn(t[0],t[1],t[2]):2===t.length?new Zn(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new Zn(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new Zn(t,e,n)}On.prototype={clone:function(){return new On(this.x,this.y)},add:function(t){return this.clone()._add(zn(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(zn(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 On(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new On(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=Sn(this.x),this.y=Sn(this.y),this},distanceTo:function(t){var e=(t=zn(t)).x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},equals:function(t){return(t=zn(t)).x===this.x&&t.y===this.y},contains:function(t){return t=zn(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+un(this.x)+", "+un(this.y)+")"}},In.prototype={extend:function(t){var e,n;if(!t)return this;if(t instanceof On||"number"==typeof t[0]||"x"in t)e=n=zn(t);else if(e=(t=Dn(t)).min,n=t.max,!e||!n)return this;return this.min||this.max?(this.min.x=Math.min(e.x,this.min.x),this.max.x=Math.max(n.x,this.max.x),this.min.y=Math.min(e.y,this.min.y),this.max.y=Math.max(n.y,this.max.y)):(this.min=e.clone(),this.max=n.clone()),this},getCenter:function(t){return zn((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return zn(this.min.x,this.max.y)},getTopRight:function(){return zn(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 e,n;return(t="number"==typeof t[0]||t instanceof On?zn(t):Dn(t))instanceof In?(e=t.min,n=t.max):e=n=t,e.x>=this.min.x&&n.x<=this.max.x&&e.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=Dn(t);var e=this.min,n=this.max,i=t.min,o=t.max,s=o.x>=e.x&&i.x<=n.x,r=o.y>=e.y&&i.y<=n.y;return s&&r},overlaps:function(t){t=Dn(t);var e=this.min,n=this.max,i=t.min,o=t.max,s=o.x>e.x&&i.x<n.x,r=o.y>e.y&&i.y<n.y;return s&&r},isValid:function(){return!(!this.min||!this.max)},pad:function(t){var e=this.min,n=this.max,i=Math.abs(e.x-n.x)*t,o=Math.abs(e.y-n.y)*t;return Dn(zn(e.x-i,e.y-o),zn(n.x+i,n.y+o))},equals:function(t){return!!t&&(t=Dn(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight()))}},Bn.prototype={extend:function(t){var e,n,i=this._southWest,o=this._northEast;if(t instanceof Zn)e=t,n=t;else{if(!(t instanceof Bn))return t?this.extend(jn(t)||Nn(t)):this;if(e=t._southWest,n=t._northEast,!e||!n)return this}return i||o?(i.lat=Math.min(e.lat,i.lat),i.lng=Math.min(e.lng,i.lng),o.lat=Math.max(n.lat,o.lat),o.lng=Math.max(n.lng,o.lng)):(this._southWest=new Zn(e.lat,e.lng),this._northEast=new Zn(n.lat,n.lng)),this},pad:function(t){var e=this._southWest,n=this._northEast,i=Math.abs(e.lat-n.lat)*t,o=Math.abs(e.lng-n.lng)*t;return new Bn(new Zn(e.lat-i,e.lng-o),new Zn(n.lat+i,n.lng+o))},getCenter:function(){return new Zn((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 Zn(this.getNorth(),this.getWest())},getSouthEast:function(){return new Zn(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){t="number"==typeof t[0]||t instanceof Zn||"lat"in t?jn(t):Nn(t);var e,n,i=this._southWest,o=this._northEast;return t instanceof Bn?(e=t.getSouthWest(),n=t.getNorthEast()):e=n=t,e.lat>=i.lat&&n.lat<=o.lat&&e.lng>=i.lng&&n.lng<=o.lng},intersects:function(t){t=Nn(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=e.lat&&i.lat<=n.lat,r=o.lng>=e.lng&&i.lng<=n.lng;return s&&r},overlaps:function(t){t=Nn(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>e.lat&&i.lat<n.lat,r=o.lng>e.lng&&i.lng<n.lng;return s&&r},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=Nn(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},Zn.prototype={equals:function(t,e){return!!t&&(t=jn(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===e?1e-9:e))},toString:function(t){return"LatLng("+un(this.lat,t)+", "+un(this.lng,t)+")"},distanceTo:function(t){return Fn.distance(this,jn(t))},wrap:function(){return Fn.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,n=e/Math.cos(Math.PI/180*this.lat);return Nn([this.lat-e,this.lng-n],[this.lat+e,this.lng+n])},clone:function(){return new Zn(this.lat,this.lng,this.alt)}};var Rn,Hn={latLngToPoint:function(t,e){var n=this.projection.project(t),i=this.scale(e);return this.transformation._transform(n,i)},pointToLatLng:function(t,e){var n=this.scale(e),i=this.transformation.untransform(t,n);return this.projection.unproject(i)},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 e=this.projection.bounds,n=this.scale(t);return new In(this.transformation.transform(e.min,n),this.transformation.transform(e.max,n))},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?cn(t.lng,this.wrapLng,!0):t.lng;return new Zn(this.wrapLat?cn(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),n=this.wrapLatLng(e),i=e.lat-n.lat,o=e.lng-n.lng;if(0===i&&0===o)return t;var s=t.getSouthWest(),r=t.getNorthEast();return new Bn(new Zn(s.lat-i,s.lng-o),new Zn(r.lat-i,r.lng-o))}},Fn=nn({},Hn,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var n=Math.PI/180,i=t.lat*n,o=e.lat*n,s=Math.sin((e.lat-t.lat)*n/2),r=Math.sin((e.lng-t.lng)*n/2),a=s*s+Math.cos(i)*Math.cos(o)*r*r,l=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*l}}),Wn=6378137,qn={R:Wn,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,n=this.MAX_LATITUDE,i=Math.max(Math.min(n,t.lat),-n),o=Math.sin(i*e);return new On(this.R*t.lng*e,this.R*Math.log((1+o)/(1-o))/2)},unproject:function(t){var e=180/Math.PI;return new Zn((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(Rn=Wn*Math.PI,new In([-Rn,-Rn],[Rn,Rn]))};function Un(t,e,n,i){if(vn(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=n,this._d=i}function Vn(t,e,n,i){return new Un(t,e,n,i)}Un.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new On((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var Gn=nn({},Fn,{code:"EPSG:3857",projection:qn,transformation:function(){var t=.5/(Math.PI*qn.R);return Vn(t,.5,-t,.5)}()}),Kn=nn({},Gn,{code:"EPSG:900913"});function Yn(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Xn(t,e){var n,i,o,s,r,a,l="";for(n=0,o=t.length;n<o;n++){for(i=0,s=(r=t[n]).length;i<s;i++)l+=(i?"L":"M")+(a=r[i]).x+" "+a.y;l+=e?Ii.svg?"z":"x":""}return l||"M0 0"}var Jn,Qn=document.documentElement.style,ti="ActiveXObject"in window,ei=ti&&!document.addEventListener,ni="msLaunchUri"in navigator&&!("documentMode"in document),ii=zi("webkit"),oi=zi("android"),si=zi("android 2")||zi("android 3"),ri=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),ai=oi&&zi("Google")&&ri<537&&!("AudioNode"in window),li=!!window.opera,ci=!ni&&zi("chrome"),hi=zi("gecko")&&!ii&&!li&&!ti,ui=!ci&&zi("safari"),di=zi("phantom"),pi="OTransition"in Qn,mi=0===navigator.platform.indexOf("Win"),fi=ti&&"transition"in Qn,_i="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!si,gi="MozPerspective"in Qn,vi=!window.L_DISABLE_3D&&(fi||_i||gi)&&!pi&&!di,yi="undefined"!=typeof orientation||zi("mobile"),bi=yi&&ii,wi=yi&&_i,xi=!window.PointerEvent&&window.MSPointerEvent,$i=!(!window.PointerEvent&&!xi),Li="ontouchstart"in window||!!window.TouchEvent,Ti=!window.L_NO_TOUCH&&(Li||$i),Pi=yi&&li,Mi=yi&&hi,ki=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Ci=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",hn,e),window.removeEventListener("testPassiveEventSupport",hn,e)}catch(t){}return t}(),Ei=!!document.createElement("canvas").getContext,Ai=!(!document.createElementNS||!Yn("svg").createSVGRect),Oi=!!Ai&&((Jn=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===(Jn.firstChild&&Jn.firstChild.namespaceURI)),Si=!Ai&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}();function zi(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Ii={ie:ti,ielt9:ei,edge:ni,webkit:ii,android:oi,android23:si,androidStock:ai,opera:li,chrome:ci,gecko:hi,safari:ui,phantom:di,opera12:pi,win:mi,ie3d:fi,webkit3d:_i,gecko3d:gi,any3d:vi,mobile:yi,mobileWebkit:bi,mobileWebkit3d:wi,msPointer:xi,pointer:$i,touch:Ti,touchNative:Li,mobileOpera:Pi,mobileGecko:Mi,retina:ki,passiveEvents:Ci,canvas:Ei,svg:Ai,vml:Si,inlineSvg:Oi,mac:0===navigator.platform.indexOf("Mac"),linux:0===navigator.platform.indexOf("Linux")},Di=Ii.msPointer?"MSPointerDown":"pointerdown",Bi=Ii.msPointer?"MSPointerMove":"pointermove",Ni=Ii.msPointer?"MSPointerUp":"pointerup",Zi=Ii.msPointer?"MSPointerCancel":"pointercancel",ji={touchstart:Di,touchmove:Bi,touchend:Ni,touchcancel:Zi},Ri={touchstart:function(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&Zo(e);Gi(t,e)},touchmove:Gi,touchend:Gi,touchcancel:Gi},Hi={},Fi=!1;function Wi(t,e,n){return"touchstart"===e&&(Fi||(document.addEventListener(Di,qi,!0),document.addEventListener(Bi,Ui,!0),document.addEventListener(Ni,Vi,!0),document.addEventListener(Zi,Vi,!0),Fi=!0)),Ri[e]?(n=Ri[e].bind(this,n),t.addEventListener(ji[e],n,!1),n):(console.warn("wrong event specified:",e),L.Util.falseFn)}function qi(t){Hi[t.pointerId]=t}function Ui(t){Hi[t.pointerId]&&(Hi[t.pointerId]=t)}function Vi(t){delete Hi[t.pointerId]}function Gi(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var n in e.touches=[],Hi)e.touches.push(Hi[n]);e.changedTouches=[e],t(e)}}var Ki,Yi,Xi,Ji,Qi,to=go(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),eo=go(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),no="webkitTransition"===eo||"OTransition"===eo?eo+"End":"transitionend";function io(t){return"string"==typeof t?document.getElementById(t):t}function oo(t,e){var n=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!n||"auto"===n)&&document.defaultView){var i=document.defaultView.getComputedStyle(t,null);n=i?i[e]:null}return"auto"===n?null:n}function so(t,e,n){var i=document.createElement(t);return i.className=e||"",n&&n.appendChild(i),i}function ro(t){var e=t.parentNode;e&&e.removeChild(t)}function ao(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function lo(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function co(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function ho(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=fo(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function uo(t,e){if(void 0!==t.classList)for(var n=pn(e),i=0,o=n.length;i<o;i++)t.classList.add(n[i]);else if(!ho(t,e)){var s=fo(t);mo(t,(s?s+" ":"")+e)}}function po(t,e){void 0!==t.classList?t.classList.remove(e):mo(t,dn((" "+fo(t)+" ").replace(" "+e+" "," ")))}function mo(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function fo(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function _o(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&function(t,e){var n=!1,i="DXImageTransform.Microsoft.Alpha";try{n=t.filters.item(i)}catch(t){if(1===e)return}e=Math.round(100*e),n?(n.Enabled=100!==e,n.Opacity=e):t.style.filter+=" progid:"+i+"(opacity="+e+")"}(t,e)}function go(t){for(var e=document.documentElement.style,n=0;n<t.length;n++)if(t[n]in e)return t[n];return!1}function vo(t,e,n){var i=e||new On(0,0);t.style[to]=(Ii.ie3d?"translate("+i.x+"px,"+i.y+"px)":"translate3d("+i.x+"px,"+i.y+"px,0)")+(n?" scale("+n+")":"")}function yo(t,e){t._leaflet_pos=e,Ii.any3d?vo(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function bo(t){return t._leaflet_pos||new On(0,0)}if("onselectstart"in document)Ki=function(){Co(window,"selectstart",Zo)},Yi=function(){Ao(window,"selectstart",Zo)};else{var wo=go(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Ki=function(){if(wo){var t=document.documentElement.style;Xi=t[wo],t[wo]="none"}},Yi=function(){wo&&(document.documentElement.style[wo]=Xi,Xi=void 0)}}function xo(){Co(window,"dragstart",Zo)}function $o(){Ao(window,"dragstart",Zo)}function Lo(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(To(),Ji=t,Qi=t.style.outline,t.style.outline="none",Co(window,"keydown",To))}function To(){Ji&&(Ji.style.outline=Qi,Ji=void 0,Qi=void 0,Ao(window,"keydown",To))}function Po(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function Mo(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var ko={__proto__:null,TRANSFORM:to,TRANSITION:eo,TRANSITION_END:no,get:io,getStyle:oo,create:so,remove:ro,empty:ao,toFront:lo,toBack:co,hasClass:ho,addClass:uo,removeClass:po,setClass:mo,getClass:fo,setOpacity:_o,testProp:go,setTransform:vo,setPosition:yo,getPosition:bo,get disableTextSelection(){return Ki},get enableTextSelection(){return Yi},disableImageDrag:xo,enableImageDrag:$o,preventOutline:Lo,restoreOutline:To,getSizedParentNode:Po,getScale:Mo};function Co(t,e,n,i){if(e&&"object"==typeof e)for(var o in e)zo(t,o,e[o],n);else for(var s=0,r=(e=pn(e)).length;s<r;s++)zo(t,e[s],n,i);return this}var Eo="_leaflet_events";function Ao(t,e,n,i){if(1===arguments.length)Oo(t),delete t[Eo];else if(e&&"object"==typeof e)for(var o in e)Io(t,o,e[o],n);else if(e=pn(e),2===arguments.length)Oo(t,(function(t){return-1!==yn(e,t)}));else for(var s=0,r=e.length;s<r;s++)Io(t,e[s],n,i);return this}function Oo(t,e){for(var n in t[Eo]){var i=n.split(/\d/)[0];e&&!e(i)||Io(t,i,null,null,n)}}var So={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function zo(t,e,n,i){var o=e+an(n)+(i?"_"+an(i):"");if(t[Eo]&&t[Eo][o])return this;var s=function(e){return n.call(i||t,e||window.event)},r=s;!Ii.touchNative&&Ii.pointer&&0===e.indexOf("touch")?s=Wi(t,e,s):Ii.touch&&"dblclick"===e?s=function(t,e){t.addEventListener("dblclick",e);var n,i=0;function o(t){if(1===t.detail){if("mouse"!==t.pointerType&&(!t.sourceCapabilities||t.sourceCapabilities.firesTouchEvents)){var o=Ro(t);if(!o.some((function(t){return t instanceof HTMLLabelElement&&t.attributes.for}))||o.some((function(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement}))){var s=Date.now();s-i<=200?2==++n&&e(function(t){var e,n,i={};for(n in t)e=t[n],i[n]=e&&e.bind?e.bind(t):e;return t=i,i.type="dblclick",i.detail=2,i.isTrusted=!1,i._simulated=!0,i}(t)):n=1,i=s}}}else n=t.detail}return t.addEventListener("click",o),{dblclick:e,simDblclick:o}}(t,s):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(So[e]||e,s,!!Ii.passiveEvents&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?(s=function(e){e=e||window.event,qo(t,e)&&r(e)},t.addEventListener(So[e],s,!1)):t.addEventListener(e,r,!1):t.attachEvent("on"+e,s),t[Eo]=t[Eo]||{},t[Eo][o]=s}function Io(t,e,n,i,o){o=o||e+an(n)+(i?"_"+an(i):"");var s=t[Eo]&&t[Eo][o];if(!s)return this;!Ii.touchNative&&Ii.pointer&&0===e.indexOf("touch")?function(t,e,n){ji[e]?t.removeEventListener(ji[e],n,!1):console.warn("wrong event specified:",e)}(t,e,s):Ii.touch&&"dblclick"===e?function(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}(t,s):"removeEventListener"in t?t.removeEventListener(So[e]||e,s,!1):t.detachEvent("on"+e,s),t[Eo][o]=null}function Do(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function Bo(t){return zo(t,"wheel",Do),this}function No(t){return Co(t,"mousedown touchstart dblclick contextmenu",Do),t._leaflet_disable_click=!0,this}function Zo(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function jo(t){return Zo(t),Do(t),this}function Ro(t){if(t.composedPath)return t.composedPath();for(var e=[],n=t.target;n;)e.push(n),n=n.parentNode;return e}function Ho(t,e){if(!e)return new On(t.clientX,t.clientY);var n=Mo(e),i=n.boundingClientRect;return new On((t.clientX-i.left)/n.x-e.clientLeft,(t.clientY-i.top)/n.y-e.clientTop)}var Fo=Ii.linux&&Ii.chrome?window.devicePixelRatio:Ii.mac?3*window.devicePixelRatio:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function Wo(t){return Ii.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Fo:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function qo(t,e){var n=e.relatedTarget;if(!n)return!0;try{for(;n&&n!==t;)n=n.parentNode}catch(t){return!1}return n!==t}var Uo={__proto__:null,on:Co,off:Ao,stopPropagation:Do,disableScrollPropagation:Bo,disableClickPropagation:No,preventDefault:Zo,stop:jo,getPropagationPath:Ro,getMousePosition:Ho,getWheelDelta:Wo,isExternalTarget:qo,addListener:Co,removeListener:Ao},Vo=An.extend({run:function(t,e,n,i){this.stop(),this._el=t,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(i||.5,.2),this._startPos=bo(t),this._offset=e.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=Pn(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,n=1e3*this._duration;e<n?this._runFrame(this._easeOut(e/n),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var n=this._startPos.add(this._offset.multiplyBy(t));e&&n._round(),yo(this._el,n),this.fire("step")},_complete:function(){Mn(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),Go=An.extend({options:{crs:Gn,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,e){e=mn(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=sn(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(jn(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=eo&&Ii.any3d&&!Ii.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Co(this._proxy,no,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,n){if((e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(jn(t),e,this.options.maxBounds),n=n||{},this._stop(),this._loaded&&!n.reset&&!0!==n)&&(void 0!==n.animate&&(n.zoom=nn({animate:n.animate},n.zoom),n.pan=nn({animate:n.animate,duration:n.duration},n.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.pan)))return clearTimeout(this._sizeTimer),this;return this._resetView(t,e,n.pan&&n.pan.noMoveStart),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(Ii.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(Ii.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,n){var i=this.getZoomScale(e),o=this.getSize().divideBy(2),s=(t instanceof On?t:this.latLngToContainerPoint(t)).subtract(o).multiplyBy(1-1/i),r=this.containerPointToLatLng(o.add(s));return this.setView(r,e,{zoom:n})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():Nn(t);var n=zn(e.paddingTopLeft||e.padding||[0,0]),i=zn(e.paddingBottomRight||e.padding||[0,0]),o=this.getBoundsZoom(t,!1,n.add(i));if((o="number"==typeof e.maxZoom?Math.min(e.maxZoom,o):o)===1/0)return{center:t.getCenter(),zoom:o};var s=i.subtract(n).divideBy(2),r=this.project(t.getSouthWest(),o),a=this.project(t.getNorthEast(),o);return{center:this.unproject(r.add(a).divideBy(2).add(s),o),zoom:o}},fitBounds:function(t,e){if(!(t=Nn(t)).isValid())throw new Error("Bounds are not valid.");var n=this._getBoundsCenterZoom(t,e);return this.setView(n.center,n.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(e=e||{},!(t=zn(t).round()).x&&!t.y)return this.fire("moveend");if(!0!==e.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new Vo,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){uo(this._mapPane,"leaflet-pan-anim");var n=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,n,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,n){if(!1===(n=n||{}).animate||!Ii.any3d)return this.setView(t,e,n);this._stop();var i=this.project(this.getCenter()),o=this.project(t),s=this.getSize(),r=this._zoom;t=jn(t),e=void 0===e?r:e;var a=Math.max(s.x,s.y),l=a*this.getZoomScale(r,e),c=o.distanceTo(i)||1,h=1.42,u=2.0164;function d(t){var e=(l*l-a*a+(t?-1:1)*u*u*c*c)/(2*(t?l:a)*u*c),n=Math.sqrt(e*e+1)-e;return n<1e-9?-18:Math.log(n)}function p(t){return(Math.exp(t)-Math.exp(-t))/2}function m(t){return(Math.exp(t)+Math.exp(-t))/2}var f=d(0);function _(t){return a*(m(f)*(p(e=f+h*t)/m(e))-p(f))/u;var e}var g=Date.now(),v=(d(1)-f)/h,y=n.duration?1e3*n.duration:1e3*v*.8;return this._moveStart(!0,n.noMoveStart),function n(){var s=(Date.now()-g)/y,l=function(t){return 1-Math.pow(1-t,1.5)}(s)*v;s<=1?(this._flyToFrame=Pn(n,this),this._move(this.unproject(i.add(o.subtract(i).multiplyBy(_(l)/c)),r),this.getScaleZoom(a/function(t){return a*(m(f)/m(f+h*t))}(l),r),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}.call(this),this},flyToBounds:function(t,e){var n=this._getBoundsCenterZoom(t,e);return this.flyTo(n.center,n.zoom,e)},setMaxBounds:function(t){return t=Nn(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 e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var n=this.getCenter(),i=this._limitCenter(n,this._zoom,Nn(t));return n.equals(i)||this.panTo(i,e),this._enforcingBounds=!1,this},panInside:function(t,e){var n=zn((e=e||{}).paddingTopLeft||e.padding||[0,0]),i=zn(e.paddingBottomRight||e.padding||[0,0]),o=this.project(this.getCenter()),s=this.project(t),r=this.getPixelBounds(),a=Dn([r.min.add(n),r.max.subtract(i)]),l=a.getSize();if(!a.contains(s)){this._enforcingBounds=!0;var c=s.subtract(a.getCenter()),h=a.extend(s).getSize().subtract(l);o.x+=c.x<0?-h.x:h.x,o.y+=c.y<0?-h.y:h.y,this.panTo(this.unproject(o),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=nn({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var n=this.getSize(),i=e.divideBy(2).round(),o=n.divideBy(2).round(),s=i.subtract(o);return s.x||s.y?(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(sn(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:n})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=nn({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=sn(this._handleGeolocationResponse,this),n=sn(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,n,t):navigator.geolocation.getCurrentPosition(e,n,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 e=t.code,n=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+n+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=new Zn(t.coords.latitude,t.coords.longitude),n=e.toBounds(2*t.coords.accuracy),i=this._locateOptions;if(i.setView){var o=this.getBoundsZoom(n);this.setView(e,i.maxZoom?Math.min(o,i.maxZoom):o)}var s={latlng:e,bounds:n,timestamp:t.timestamp};for(var r in t.coords)"number"==typeof t.coords[r]&&(s[r]=t.coords[r]);this.fire("locationfound",s)}},addHandler:function(t,e){if(!e)return this;var n=this[t]=new e(this);return this._handlers.push(n),this.options[t]&&n.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(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ro(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(Mn(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)ro(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n=so("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=n),n},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();return new Bn(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,n){t=Nn(t),n=zn(n||[0,0]);var i=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),a=t.getSouthEast(),l=this.getSize().subtract(n),c=Dn(this.project(a,i),this.project(r,i)).getSize(),h=Ii.any3d?this.options.zoomSnap:1,u=l.x/c.x,d=l.y/c.y,p=e?Math.max(u,d):Math.min(u,d);return i=this.getScaleZoom(p,i),h&&(i=Math.round(i/(h/100))*(h/100),i=e?Math.ceil(i/h)*h:Math.floor(i/h)*h),Math.max(o,Math.min(s,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new On(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var n=this._getTopLeftPoint(t,e);return new In(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var n=this.options.crs;return e=void 0===e?this._zoom:e,n.scale(t)/n.scale(e)},getScaleZoom:function(t,e){var n=this.options.crs;e=void 0===e?this._zoom:e;var i=n.zoom(t*n.scale(e));return isNaN(i)?1/0:i},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(jn(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(zn(t),e)},layerPointToLatLng:function(t){var e=zn(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(jn(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(jn(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(Nn(t))},distance:function(t,e){return this.options.crs.distance(jn(t),jn(e))},containerPointToLayerPoint:function(t){return zn(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return zn(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(zn(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(jn(t)))},mouseEventToContainerPoint:function(t){return Ho(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 e=this._container=io(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");Co(e,"scroll",this._onScroll,this),this._containerId=an(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&Ii.any3d,uo(t,"leaflet-container"+(Ii.touch?" leaflet-touch":"")+(Ii.retina?" leaflet-retina":"")+(Ii.ielt9?" leaflet-oldie":"")+(Ii.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=oo(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(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),yo(this._mapPane,new On(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(uo(t.markerPane,"leaflet-zoom-hide"),uo(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,n){yo(this._mapPane,new On(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var o=this._zoom!==e;this._moveStart(o,n)._move(t,e)._moveEnd(o),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,n,i){void 0===e&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),i?n&&n.pinch&&this.fire("zoom",n):((o||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return Mn(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){yo(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[an(this._container)]=this;var e=t?Ao:Co;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),Ii.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){Mn(this._resizeRequest),this._resizeRequest=Pn((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,e){for(var n,i=[],o="mouseout"===e||"mouseover"===e,s=t.target||t.srcElement,r=!1;s;){if((n=this._targets[an(s)])&&("click"===e||"preclick"===e)&&this._draggableMoved(n)){r=!0;break}if(n&&n.listens(e,!0)){if(o&&!qo(s,t))break;if(i.push(n),o)break}if(s===this._container)break;s=s.parentNode}return i.length||r||o||!this.listens(e,!0)||(i=[this]),i},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(e))){var n=t.type;"mousedown"===n&&Lo(e),this._fireDOMEvent(t,n)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,n){if("click"===t.type){var i=nn({},t);i.type="preclick",this._fireDOMEvent(i,i.type,n)}var o=this._findEventTargets(t,e);if(n){for(var s=[],r=0;r<n.length;r++)n[r].listens(e,!0)&&s.push(n[r]);o=s.concat(o)}if(o.length){"contextmenu"===e&&Zo(t);var a=o[0],l={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var c=a.getLatLng&&(!a._radius||a._radius<=10);l.containerPoint=c?this.latLngToContainerPoint(a.getLatLng()):this.mouseEventToContainerPoint(t),l.layerPoint=this.containerPointToLayerPoint(l.containerPoint),l.latlng=c?a.getLatLng():this.layerPointToLatLng(l.layerPoint)}for(r=0;r<o.length;r++)if(o[r].fire(e,l,!0),l.originalEvent._stopped||!1===o[r].options.bubblingMouseEvents&&-1!==yn(this._mouseEvents,e))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return bo(this._mapPane)||new On(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var n=this.getSize()._divideBy(2);return this.project(t,e)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return this.project(t,e)._subtract(i)},_latLngBoundsToNewLayerBounds:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return Dn([this.project(t.getSouthWest(),e)._subtract(i),this.project(t.getNorthWest(),e)._subtract(i),this.project(t.getSouthEast(),e)._subtract(i),this.project(t.getNorthEast(),e)._subtract(i)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,n){if(!n)return t;var i=this.project(t,e),o=this.getSize().divideBy(2),s=new In(i.subtract(o),i.add(o)),r=this._getBoundsOffset(s,n,e);return r.round().equals([0,0])?t:this.unproject(i.add(r),e)},_limitOffset:function(t,e){if(!e)return t;var n=this.getPixelBounds(),i=new In(n.min.add(t),n.max.add(t));return t.add(this._getBoundsOffset(i,e))},_getBoundsOffset:function(t,e,n){var i=Dn(this.project(e.getNorthEast(),n),this.project(e.getSouthWest(),n)),o=i.min.subtract(t.min),s=i.max.subtract(t.max);return new On(this._rebound(o.x,-s.x),this._rebound(o.y,-s.y))},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),n=this.getMaxZoom(),i=Ii.any3d?this.options.zoomSnap:1;return i&&(t=Math.round(t/i)*i),Math.max(e,Math.min(n,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){po(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var n=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(n))&&(this.panBy(n,e),!0)},_createAnimProxy:function(){var t=this._proxy=so("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var e=to,n=this._proxy.style[e];vo(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),n===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ro(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();vo(this._proxy,this.project(t,e),this.getZoomScale(e,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,e,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var i=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/i);return!(!0!==n.animate&&!this.getSize().contains(o))&&(Pn((function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)}),this),!0)},_animateZoom:function(t,e,n,i){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,uo(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:i}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(sn(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&po(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 Ko(t,e){return new Go(t,e)}var Yo=Cn.extend({options:{position:"topright"},initialize:function(t){mn(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),n=this.getPosition(),i=t._controlCorners[n];return uo(e,"leaflet-control"),-1!==n.indexOf("bottom")?i.insertBefore(e,i.firstChild):i.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(ro(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()}}),Xo=function(t){return new Yo(t)};Go.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",n=this._controlContainer=so("div",e+"control-container",this._container);function i(i,o){var s=e+i+" "+e+o;t[i+o]=so("div",s,n)}i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)ro(this._controlCorners[t]);ro(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Jo=Yo.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,n,i){return n<i?-1:i<n?1:0}},initialize:function(t,e,n){for(var i in mn(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[i],i);for(i in e)this._addLayer(e[i],i,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return Yo.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,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(an(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){uo(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?(uo(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):po(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return po(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=so("div",t),n=this.options.collapsed;e.setAttribute("aria-haspopup",!0),No(e),Bo(e);var i=this._section=so("section",t+"-list");n&&(this._map.on("click",this.collapse,this),Co(e,{mouseenter:function(){Co(i,"click",Zo),this.expand(),setTimeout((function(){Ao(i,"click",Zo)}))},mouseleave:this.collapse},this));var o=this._layersLink=so("a",t+"-toggle",e);o.href="#",o.title="Layers",o.setAttribute("role","button"),Co(o,"click",Zo),Co(o,"focus",this.expand,this),n||this.expand(),this._baseLayersList=so("div",t+"-base",i),this._separator=so("div",t+"-separator",i),this._overlaysList=so("div",t+"-overlays",i),e.appendChild(i)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&an(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,n){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:n}),this.options.sortLayers&&this._layers.sort(sn((function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)}),this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;ao(this._baseLayersList),ao(this._overlaysList),this._layerControlInputs=[];var t,e,n,i,o=0;for(n=0;n<this._layers.length;n++)i=this._layers[n],this._addItem(i),e=e||i.overlay,t=t||!i.overlay,o+=i.overlay?0:1;return this.options.hideSingleBase&&(t=t&&o>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(an(t.target)),n=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;n&&this._map.fire(n,e)},_createRadioElement:function(t,e){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",i=document.createElement("div");return i.innerHTML=n,i.firstChild},_addItem:function(t){var e,n=document.createElement("label"),i=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=i):e=this._createRadioElement("leaflet-base-layers_"+an(this),i),this._layerControlInputs.push(e),e.layerId=an(t.layer),Co(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var s=document.createElement("span");return n.appendChild(s),s.appendChild(e),s.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){var t,e,n=this._layerControlInputs,i=[],o=[];this._handlingClick=!0;for(var s=n.length-1;s>=0;s--)t=n[s],e=this._getLayer(t.layerId).layer,t.checked?i.push(e):t.checked||o.push(e);for(s=0;s<o.length;s++)this._map.hasLayer(o[s])&&this._map.removeLayer(o[s]);for(s=0;s<i.length;s++)this._map.hasLayer(i[s])||this._map.addLayer(i[s]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,e,n=this._layerControlInputs,i=this._map.getZoom(),o=n.length-1;o>=0;o--)t=n[o],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&i<e.options.minZoom||void 0!==e.options.maxZoom&&i>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this}}),Qo=Yo.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">−</span>',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=so("div",e+" leaflet-bar"),i=this.options;return this._zoomInButton=this._createButton(i.zoomInText,i.zoomInTitle,e+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(i.zoomOutText,i.zoomOutTitle,e+"-out",n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n},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,e,n,i,o){var s=so("a",n,i);return s.innerHTML=t,s.href="#",s.title=e,s.setAttribute("role","button"),s.setAttribute("aria-label",e),No(s),Co(s,"click",jo),Co(s,"click",o,this),Co(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";po(this._zoomInButton,e),po(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(uo(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(uo(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});Go.mergeOptions({zoomControl:!0}),Go.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new Qo,this.addControl(this.zoomControl))}));var ts=Yo.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",n=so("div",e),i=this.options;return this._addScales(i,e+"-line",n),t.on(i.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),n},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,n){t.metric&&(this._mScale=so("div",e,n)),t.imperial&&(this._iScale=so("div",e,n))},_update:function(){var t=this._map,e=t.getSize().y/2,n=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(n)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),n=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,n,e/t)},_updateImperial:function(t){var e,n,i,o=3.2808399*t;o>5280?(e=o/5280,n=this._getRoundNum(e),this._updateScale(this._iScale,n+" mi",n/e)):(i=this._getRoundNum(o),this._updateScale(this._iScale,i+" ft",i/o))},_updateScale:function(t,e,n){t.style.width=Math.round(this.options.maxWidth*n)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),n=t/e;return e*(n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),es=Yo.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Ii.inlineSvg?'<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> ':"")+"Leaflet</a>"},initialize:function(t){mn(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=so("div","leaflet-control-attribution"),No(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].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 e in this._attributions)this._attributions[e]&&t.push(e);var n=[];this.options.prefix&&n.push(this.options.prefix),t.length&&n.push(t.join(", ")),this._container.innerHTML=n.join(' <span aria-hidden="true">|</span> ')}}});Go.mergeOptions({attributionControl:!0}),Go.addInitHook((function(){this.options.attributionControl&&(new es).addTo(this)}));Yo.Layers=Jo,Yo.Zoom=Qo,Yo.Scale=ts,Yo.Attribution=es,Xo.layers=function(t,e,n){return new Jo(t,e,n)},Xo.zoom=function(t){return new Qo(t)},Xo.scale=function(t){return new ts(t)},Xo.attribution=function(t){return new es(t)};var ns=Cn.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});ns.addTo=function(t,e){return t.addHandler(e,this),this};var is,os={Events:En},ss=Ii.touch?"touchstart mousedown":"mousedown",rs=An.extend({options:{clickTolerance:3},initialize:function(t,e,n,i){mn(this,i),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(Co(this._dragStartTarget,ss,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(rs._dragging===this&&this.finishDrag(!0),Ao(this._dragStartTarget,ss,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!ho(this._element,"leaflet-zoom-anim")))if(t.touches&&1!==t.touches.length)rs._dragging===this&&this.finishDrag();else if(!(rs._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(rs._dragging=this,this._preventOutline&&Lo(this._element),xo(),Ki(),this._moving))){this.fire("down");var e=t.touches?t.touches[0]:t,n=Po(this._element);this._startPoint=new On(e.clientX,e.clientY),this._startPos=bo(this._element),this._parentScale=Mo(n);var i="mousedown"===t.type;Co(document,i?"mousemove":"touchmove",this._onMove,this),Co(document,i?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(t){if(this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,n=new On(e.clientX,e.clientY)._subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)<this.options.clickTolerance||(n.x/=this._parentScale.x,n.y/=this._parentScale.y,Zo(t),this._moved||(this.fire("dragstart"),this._moved=!0,uo(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),uo(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,this._lastEvent=t,this._updatePosition()))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),yo(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){po(document.body,"leaflet-dragging"),this._lastTarget&&(po(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Ao(document,"mousemove touchmove",this._onMove,this),Ao(document,"mouseup touchend touchcancel",this._onUp,this),$o(),Yi(),this._moved&&this._moving&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)}),this._moving=!1,rs._dragging=!1}});function as(t,e){if(!e||!t.length)return t.slice();var n=e*e;return t=function(t,e){for(var n=[t[0]],i=1,o=0,s=t.length;i<s;i++)ps(t[i],t[o])>e&&(n.push(t[i]),o=i);o<s-1&&n.push(t[s-1]);return n}(t,n),t=function(t,e){var n=t.length,i=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(n);i[0]=i[n-1]=1,cs(t,i,e,0,n-1);var o,s=[];for(o=0;o<n;o++)i[o]&&s.push(t[o]);return s}(t,n),t}function ls(t,e,n){return Math.sqrt(ms(t,e,n,!0))}function cs(t,e,n,i,o){var s,r,a,l=0;for(r=i+1;r<=o-1;r++)(a=ms(t[r],t[i],t[o],!0))>l&&(s=r,l=a);l>n&&(e[s]=1,cs(t,e,n,i,s),cs(t,e,n,s,o))}function hs(t,e,n,i,o){var s,r,a,l=i?is:ds(t,n),c=ds(e,n);for(is=c;;){if(!(l|c))return[t,e];if(l&c)return!1;a=ds(r=us(t,e,s=l||c,n,o),n),s===l?(t=r,l=a):(e=r,c=a)}}function us(t,e,n,i,o){var s,r,a=e.x-t.x,l=e.y-t.y,c=i.min,h=i.max;return 8&n?(s=t.x+a*(h.y-t.y)/l,r=h.y):4&n?(s=t.x+a*(c.y-t.y)/l,r=c.y):2&n?(s=h.x,r=t.y+l*(h.x-t.x)/a):1&n&&(s=c.x,r=t.y+l*(c.x-t.x)/a),new On(s,r,o)}function ds(t,e){var n=0;return t.x<e.min.x?n|=1:t.x>e.max.x&&(n|=2),t.y<e.min.y?n|=4:t.y>e.max.y&&(n|=8),n}function ps(t,e){var n=e.x-t.x,i=e.y-t.y;return n*n+i*i}function ms(t,e,n,i){var o,s=e.x,r=e.y,a=n.x-s,l=n.y-r,c=a*a+l*l;return c>0&&((o=((t.x-s)*a+(t.y-r)*l)/c)>1?(s=n.x,r=n.y):o>0&&(s+=a*o,r+=l*o)),a=t.x-s,l=t.y-r,i?a*a+l*l:new On(s,r)}function fs(t){return!vn(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function _s(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),fs(t)}function gs(t,e){var n,i,o,s,r,a,l,c;if(!t||0===t.length)throw new Error("latlngs not passed");fs(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var h=[];for(var u in t)h.push(e.project(jn(t[u])));var d=h.length;for(n=0,i=0;n<d-1;n++)i+=h[n].distanceTo(h[n+1])/2;if(0===i)c=h[0];else for(n=0,s=0;n<d-1;n++)if(r=h[n],a=h[n+1],(s+=o=r.distanceTo(a))>i){l=(s-i)/o,c=[a.x-l*(a.x-r.x),a.y-l*(a.y-r.y)];break}return e.unproject(zn(c))}var vs={__proto__:null,simplify:as,pointToSegmentDistance:ls,closestPointOnSegment:function(t,e,n){return ms(t,e,n)},clipSegment:hs,_getEdgeIntersection:us,_getBitCode:ds,_sqClosestPointOnSegment:ms,isFlat:fs,_flat:_s,polylineCenter:gs};function ys(t,e,n){var i,o,s,r,a,l,c,h,u,d=[1,4,2,8];for(o=0,c=t.length;o<c;o++)t[o]._code=ds(t[o],e);for(r=0;r<4;r++){for(h=d[r],i=[],o=0,s=(c=t.length)-1;o<c;s=o++)a=t[o],l=t[s],a._code&h?l._code&h||((u=us(l,a,h,e,n))._code=ds(u,e),i.push(u)):(l._code&h&&((u=us(l,a,h,e,n))._code=ds(u,e),i.push(u)),i.push(a));t=i}return t}function bs(t,e){var n,i,o,s,r,a,l,c,h;if(!t||0===t.length)throw new Error("latlngs not passed");fs(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var u=[];for(var d in t)u.push(e.project(jn(t[d])));var p=u.length;for(a=l=c=0,n=0,i=p-1;n<p;i=n++)o=u[n],s=u[i],r=o.y*s.x-s.y*o.x,l+=(o.x+s.x)*r,c+=(o.y+s.y)*r,a+=3*r;return h=0===a?u[0]:[l/a,c/a],e.unproject(zn(h))}var ws={__proto__:null,clipPolygon:ys,polygonCenter:bs},xs={project:function(t){return new On(t.lng,t.lat)},unproject:function(t){return new Zn(t.y,t.x)},bounds:new In([-180,-90],[180,90])},$s={R:6378137,R_MINOR:6356752.314245179,bounds:new In([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,n=this.R,i=t.lat*e,o=this.R_MINOR/n,s=Math.sqrt(1-o*o),r=s*Math.sin(i),a=Math.tan(Math.PI/4-i/2)/Math.pow((1-r)/(1+r),s/2);return i=-n*Math.log(Math.max(a,1e-10)),new On(t.lng*e*n,i)},unproject:function(t){for(var e,n=180/Math.PI,i=this.R,o=this.R_MINOR/i,s=Math.sqrt(1-o*o),r=Math.exp(-t.y/i),a=Math.PI/2-2*Math.atan(r),l=0,c=.1;l<15&&Math.abs(c)>1e-7;l++)e=s*Math.sin(a),e=Math.pow((1-e)/(1+e),s/2),a+=c=Math.PI/2-2*Math.atan(r*e)-a;return new Zn(a*n,t.x*n/i)}},Ls={__proto__:null,LonLat:xs,Mercator:$s,SphericalMercator:qn},Ts=nn({},Fn,{code:"EPSG:3395",projection:$s,transformation:function(){var t=.5/(Math.PI*$s.R);return Vn(t,.5,-t,.5)}()}),Ps=nn({},Fn,{code:"EPSG:4326",projection:xs,transformation:Vn(1/180,1,-1/180,.5)}),Ms=nn({},Hn,{projection:xs,transformation:Vn(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var n=e.lng-t.lng,i=e.lat-t.lat;return Math.sqrt(n*n+i*i)},infinite:!0});Hn.Earth=Fn,Hn.EPSG3395=Ts,Hn.EPSG3857=Gn,Hn.EPSG900913=Kn,Hn.EPSG4326=Ps,Hn.Simple=Ms;var ks=An.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[an(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[an(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var n=this.getEvents();e.on(n,this),this.once("remove",(function(){e.off(n,this)}),this)}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}});Go.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=an(t);return this._layers[e]||(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=an(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return an(t)in this._layers},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},_addLayers:function(t){for(var e=0,n=(t=t?vn(t)?t:[t]:[]).length;e<n;e++)this.addLayer(t[e])},_addZoomLimit:function(t){isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[an(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=an(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,n=this._getZoomSpan();for(var i in this._zoomBoundLayers){var o=this._zoomBoundLayers[i].options;t=void 0===o.minZoom?t:Math.min(t,o.minZoom),e=void 0===o.maxZoom?e:Math.max(e,o.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Cs=ks.extend({initialize:function(t,e){var n,i;if(mn(this,e),this._layers={},t)for(n=0,i=t.length;n<i;n++)this.addLayer(t[n])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return("number"==typeof t?t:this.getLayerId(t))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,n,i=Array.prototype.slice.call(arguments,1);for(e in this._layers)(n=this._layers[e])[t]&&n[t].apply(n,i);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);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 an(t)}}),Es=function(t,e){return new Cs(t,e)},As=Cs.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Cs.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),Cs.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 Bn;for(var e in this._layers){var n=this._layers[e];t.extend(n.getBounds?n.getBounds():n.getLatLng())}return t}}),Os=function(t,e){return new As(t,e)},Ss=Cn.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){mn(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var n=this._getIconUrl(t);if(!n){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var i=this._createImg(n,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(i,t),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),i},_setIconStyles:function(t,e){var n=this.options,i=n[e+"Size"];"number"==typeof i&&(i=[i,i]);var o=zn(i),s=zn("shadow"===e&&n.shadowAnchor||n.iconAnchor||o&&o.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(n.className||""),s&&(t.style.marginLeft=-s.x+"px",t.style.marginTop=-s.y+"px"),o&&(t.style.width=o.x+"px",t.style.height=o.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return Ii.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function zs(t){return new Ss(t)}var Is=Ss.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"string"!=typeof Is.imagePath&&(Is.imagePath=this._detectIconPath()),(this.options.imagePath||Is.imagePath)+Ss.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var e=function(t,e,n){var i=e.exec(t);return i&&i[n]};return(t=e(t,/^url\((['"])?(.+)\1\)$/,2))&&e(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=so("div","leaflet-default-icon-path",document.body),e=oo(t,"background-image")||oo(t,"backgroundImage");if(document.body.removeChild(t),e=this._stripUrl(e))return e;var n=document.querySelector('link[href$="leaflet.css"]');return n?n.href.substring(0,n.href.length-"leaflet.css".length-1):""}}),Ds=ns.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new rs(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),uo(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&&po(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,n=e._map,i=this._marker.options.autoPanSpeed,o=this._marker.options.autoPanPadding,s=bo(e._icon),r=n.getPixelBounds(),a=n.getPixelOrigin(),l=Dn(r.min._subtract(a).add(o),r.max._subtract(a).subtract(o));if(!l.contains(s)){var c=zn((Math.max(l.max.x,s.x)-l.max.x)/(r.max.x-l.max.x)-(Math.min(l.min.x,s.x)-l.min.x)/(r.min.x-l.min.x),(Math.max(l.max.y,s.y)-l.max.y)/(r.max.y-l.max.y)-(Math.min(l.min.y,s.y)-l.min.y)/(r.min.y-l.min.y)).multiplyBy(i);n.panBy(c,{animate:!1}),this._draggable._newPos._add(c),this._draggable._startPos._add(c),yo(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=Pn(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&&(Mn(this._panRequest),this._panRequest=Pn(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,n=e._shadow,i=bo(e._icon),o=e._map.layerPointToLatLng(i);n&&yo(n,i),e._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){Mn(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Bs=ks.extend({options:{icon:new Is,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,e){mn(this,e),this._latlng=jn(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 e=this._latlng;return this._latlng=jn(t),this.update(),this.fire("move",{oldLatLng:e,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,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),n=t.icon.createIcon(this._icon),i=!1;n!==this._icon&&(this._icon&&this._removeIcon(),i=!0,t.title&&(n.title=t.title),"IMG"===n.tagName&&(n.alt=t.alt||"")),uo(n,e),t.keyboard&&(n.tabIndex="0",n.setAttribute("role","button")),this._icon=n,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Co(n,"focus",this._panOnFocus,this);var o=t.icon.createShadow(this._shadow),s=!1;o!==this._shadow&&(this._removeShadow(),s=!0),o&&(uo(o,e),o.alt=""),this._shadow=o,t.opacity<1&&this._updateOpacity(),i&&this.getPane().appendChild(this._icon),this._initInteraction(),o&&s&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Ao(this._icon,"focus",this._panOnFocus,this),ro(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&ro(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&yo(this._icon,t),this._shadow&&yo(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 e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(uo(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Ds)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Ds(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&&_o(this._icon,t),this._shadow&&_o(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var t=this._map;if(t){var e=this.options.icon.options,n=e.iconSize?zn(e.iconSize):zn(0,0),i=e.iconAnchor?zn(e.iconAnchor):zn(0,0);t.panInside(this._latlng,{paddingTopLeft:i,paddingBottomRight:n.subtract(i)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function Ns(t,e){return new Bs(t,e)}var Zs=ks.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 mn(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)}}),js=Zs.extend({options:{fill:!0,radius:10},initialize:function(t,e){mn(this,e),this._latlng=jn(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=jn(t),this.redraw(),this.fire("move",{oldLatLng:e,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 e=t&&t.radius||this._radius;return Zs.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,n=this._clickTolerance(),i=[t+n,e+n];this._pxBounds=new In(this._point.subtract(i),this._point.add(i))},_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 Rs(t,e){return new js(t,e)}var Hs=js.extend({initialize:function(t,e,n){if("number"==typeof e&&(e=nn({},n,{radius:e})),mn(this,e),this._latlng=jn(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 Bn(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:Zs.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,n=this._map,i=n.options.crs;if(i.distance===Fn.distance){var o=Math.PI/180,s=this._mRadius/Fn.R/o,r=n.project([e+s,t]),a=n.project([e-s,t]),l=r.add(a).divideBy(2),c=n.unproject(l).lat,h=Math.acos((Math.cos(s*o)-Math.sin(e*o)*Math.sin(c*o))/(Math.cos(e*o)*Math.cos(c*o)))/o;(isNaN(h)||0===h)&&(h=s/Math.cos(Math.PI/180*e)),this._point=l.subtract(n.getPixelOrigin()),this._radius=isNaN(h)?0:l.x-n.project([c,t-h]).x,this._radiusY=l.y-r.y}else{var u=i.unproject(i.project(this._latlng).subtract([this._mRadius,0]));this._point=n.latLngToLayerPoint(this._latlng),this._radius=this._point.x-n.latLngToLayerPoint(u).x}this._updateBounds()}});function Fs(t,e,n){return new Hs(t,e,n)}var Ws=Zs.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){mn(this,e),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 e,n,i=1/0,o=null,s=ms,r=0,a=this._parts.length;r<a;r++)for(var l=this._parts[r],c=1,h=l.length;c<h;c++){var u=s(t,e=l[c-1],n=l[c],!0);u<i&&(i=u,o=s(t,e,n))}return o&&(o.distance=Math.sqrt(i)),o},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return gs(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=jn(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new Bn,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return fs(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],n=fs(t),i=0,o=t.length;i<o;i++)n?(e[i]=jn(t[i]),this._bounds.extend(e[i])):e[i]=this._convertLatLngs(t[i]);return e},_project:function(){var t=new In;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(),e=new On(t,t);this._rawPxBounds&&(this._pxBounds=new In([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)]))},_projectLatlngs:function(t,e,n){var i,o,s=t[0]instanceof Zn,r=t.length;if(s){for(o=[],i=0;i<r;i++)o[i]=this._map.latLngToLayerPoint(t[i]),n.extend(o[i]);e.push(o)}else for(i=0;i<r;i++)this._projectLatlngs(t[i],e,n)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var e,n,i,o,s,r,a,l=this._parts;for(e=0,i=0,o=this._rings.length;e<o;e++)for(n=0,s=(a=this._rings[e]).length;n<s-1;n++)(r=hs(a[n],a[n+1],t,n,!0))&&(l[i]=l[i]||[],l[i].push(r[0]),r[1]===a[n+1]&&n!==s-2||(l[i].push(r[1]),i++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,n=0,i=t.length;n<i;n++)t[n]=as(t[n],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var n,i,o,s,r,a,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(n=0,s=this._parts.length;n<s;n++)for(i=0,o=(r=(a=this._parts[n]).length)-1;i<r;o=i++)if((e||0!==i)&&ls(t,a[o],a[i])<=l)return!0;return!1}});function qs(t,e){return new Ws(t,e)}Ws._flat=_s;var Us=Ws.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 bs(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(t){var e=Ws.prototype._convertLatLngs.call(this,t),n=e.length;return n>=2&&e[0]instanceof Zn&&e[0].equals(e[n-1])&&e.pop(),e},_setLatLngs:function(t){Ws.prototype._setLatLngs.call(this,t),fs(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return fs(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,n=new On(e,e);if(t=new In(t.min.subtract(n),t.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var i,o=0,s=this._rings.length;o<s;o++)(i=ys(this._rings[o],t,!0)).length&&this._parts.push(i)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,n,i,o,s,r,a,l,c=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(o=0,a=this._parts.length;o<a;o++)for(s=0,r=(l=(e=this._parts[o]).length)-1;s<l;r=s++)n=e[s],i=e[r],n.y>t.y!=i.y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(c=!c);return c||Ws.prototype._containsPoint.call(this,t,!0)}});function Vs(t,e){return new Us(t,e)}var Gs=As.extend({initialize:function(t,e){mn(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,i,o=vn(t)?t:t.features;if(o){for(e=0,n=o.length;e<n;e++)((i=o[e]).geometries||i.geometry||i.features||i.coordinates)&&this.addData(i);return this}var s=this.options;if(s.filter&&!s.filter(t))return this;var r=Ks(t,s);return r?(r.feature=nr(t),r.defaultOptions=r.options,this.resetStyle(r),s.onEachFeature&&s.onEachFeature(t,r),this.addLayer(r)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=nn({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer((function(e){this._setLayerStyle(e,t)}),this)},_setLayerStyle:function(t,e){t.setStyle&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))}});function Ks(t,e){var n,i,o,s,r="Feature"===t.type?t.geometry:t,a=r?r.coordinates:null,l=[],c=e&&e.pointToLayer,h=e&&e.coordsToLatLng||Xs;if(!a&&!r)return null;switch(r.type){case"Point":return Ys(c,t,n=h(a),e);case"MultiPoint":for(o=0,s=a.length;o<s;o++)n=h(a[o]),l.push(Ys(c,t,n,e));return new As(l);case"LineString":case"MultiLineString":return i=Js(a,"LineString"===r.type?0:1,h),new Ws(i,e);case"Polygon":case"MultiPolygon":return i=Js(a,"Polygon"===r.type?1:2,h),new Us(i,e);case"GeometryCollection":for(o=0,s=r.geometries.length;o<s;o++){var u=Ks({geometry:r.geometries[o],type:"Feature",properties:t.properties},e);u&&l.push(u)}return new As(l);case"FeatureCollection":for(o=0,s=r.features.length;o<s;o++){var d=Ks(r.features[o],e);d&&l.push(d)}return new As(l);default:throw new Error("Invalid GeoJSON object.")}}function Ys(t,e,n,i){return t?t(e,n):new Bs(n,i&&i.markersInheritOptions&&i)}function Xs(t){return new Zn(t[1],t[0],t[2])}function Js(t,e,n){for(var i,o=[],s=0,r=t.length;s<r;s++)i=e?Js(t[s],e-1,n):(n||Xs)(t[s]),o.push(i);return o}function Qs(t,e){return void 0!==(t=jn(t)).alt?[un(t.lng,e),un(t.lat,e),un(t.alt,e)]:[un(t.lng,e),un(t.lat,e)]}function tr(t,e,n,i){for(var o=[],s=0,r=t.length;s<r;s++)o.push(e?tr(t[s],fs(t[s])?0:e-1,n,i):Qs(t[s],i));return!e&&n&&o.push(o[0]),o}function er(t,e){return t.feature?nn({},t.feature,{geometry:e}):nr(e)}function nr(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var ir={toGeoJSON:function(t){return er(this,{type:"Point",coordinates:Qs(this.getLatLng(),t)})}};function or(t,e){return new Gs(t,e)}Bs.include(ir),Hs.include(ir),js.include(ir),Ws.include({toGeoJSON:function(t){var e=!fs(this._latlngs);return er(this,{type:(e?"Multi":"")+"LineString",coordinates:tr(this._latlngs,e?1:0,!1,t)})}}),Us.include({toGeoJSON:function(t){var e=!fs(this._latlngs),n=e&&!fs(this._latlngs[0]),i=tr(this._latlngs,n?2:e?1:0,!0,t);return e||(i=[i]),er(this,{type:(n?"Multi":"")+"Polygon",coordinates:i})}}),Cs.include({toMultiPoint:function(t){var e=[];return this.eachLayer((function(n){e.push(n.toGeoJSON(t).geometry.coordinates)})),er(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var n="GeometryCollection"===e,i=[];return this.eachLayer((function(e){if(e.toGeoJSON){var o=e.toGeoJSON(t);if(n)i.push(o.geometry);else{var s=nr(o);"FeatureCollection"===s.type?i.push.apply(i,s.features):i.push(s)}}})),n?er(this,{geometries:i,type:"GeometryCollection"}):{type:"FeatureCollection",features:i}}});var sr=or,rr=ks.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,n){this._url=t,this._bounds=Nn(e),mn(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(uo(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ro(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&&lo(this._image),this},bringToBack:function(){return this._map&&co(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=Nn(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="IMG"===this._url.tagName,e=this._image=t?this._url:so("img");uo(e,"leaflet-image-layer"),this._zoomAnimated&&uo(e,"leaflet-zoom-animated"),this.options.className&&uo(e,this.options.className),e.onselectstart=hn,e.onmousemove=hn,e.onload=sn(this.fire,this,"load"),e.onerror=sn(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;vo(this._image,n,e)},_reset:function(){var t=this._image,e=new In(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=e.getSize();yo(t,e.min),t.style.width=n.x+"px",t.style.height=n.y+"px"},_updateOpacity:function(){_o(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(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()}}),ar=function(t,e,n){return new rr(t,e,n)},lr=rr.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:so("video");if(uo(e,"leaflet-image-layer"),this._zoomAnimated&&uo(e,"leaflet-zoom-animated"),this.options.className&&uo(e,this.options.className),e.onselectstart=hn,e.onmousemove=hn,e.onloadeddata=sn(this.fire,this,"load"),t){for(var n=e.getElementsByTagName("source"),i=[],o=0;o<n.length;o++)i.push(n[o].src);this._url=n.length>0?i:[e.src]}else{vn(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(var s=0;s<this._url.length;s++){var r=so("source");r.src=this._url[s],e.appendChild(r)}}}});function cr(t,e,n){return new lr(t,e,n)}var hr=rr.extend({_initImage:function(){var t=this._image=this._url;uo(t,"leaflet-image-layer"),this._zoomAnimated&&uo(t,"leaflet-zoom-animated"),this.options.className&&uo(t,this.options.className),t.onselectstart=hn,t.onmousemove=hn}});function ur(t,e,n){return new hr(t,e,n)}var dr=ks.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,e){t&&(t instanceof L.LatLng||vn(t))?(this._latlng=jn(t),mn(this,e)):(mn(this,t),this._source=e),this.options.content&&(this._content=this.options.content)},openOn:function(t){return(t=arguments.length?t:this._source._map).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&&_o(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&_o(this._container,1),this.bringToFront(),this.options.interactive&&(uo(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(_o(this._container,0),this._removeTimeout=setTimeout(sn(ro,void 0,this._container),200)):ro(this._container),this.options.interactive&&(po(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=jn(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&&lo(this._container),this},bringToBack:function(){return this._map&&co(this._container),this},_prepareOpen:function(t){var e=this._source;if(!e._map)return!1;if(e instanceof As){e=null;var n=this._source._layers;for(var i in n)if(n[i]._map){e=n[i];break}if(!e)return!1;this._source=e}if(!t)if(e.getCenter)t=e.getCenter();else if(e.getLatLng)t=e.getLatLng();else{if(!e.getBounds)throw new Error("Unable to get source layer LatLng.");t=e.getBounds().getCenter()}return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=zn(this.options.offset),n=this._getAnchor();this._zoomAnimated?yo(this._container,t.add(n)):e=e.add(t).add(n);var i=this._containerBottom=-e.y,o=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=i+"px",this._container.style.left=o+"px"}},_getAnchor:function(){return[0,0]}});Go.include({_initOverlay:function(t,e,n,i){var o=e;return o instanceof t||(o=new t(i).setContent(e)),n&&o.setLatLng(n),o}}),ks.include({_initOverlay:function(t,e,n,i){var o=n;return o instanceof t?(mn(o,i),o._source=this):(o=e&&!i?e:new t(i,this)).setContent(n),o}});var pr=dr.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).hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,dr.prototype.openOn.call(this,t)},onAdd:function(t){dr.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Zs||this._source.on("preclick",Do))},onRemove:function(t){dr.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Zs||this._source.off("preclick",Do))},getEvents:function(){var t=dr.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?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",e=this._container=so("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=so("div",t+"-content-wrapper",e);if(this._contentNode=so("div",t+"-content",n),No(e),Bo(this._contentNode),Co(e,"contextmenu",Do),this._tipContainer=so("div",t+"-tip-container",e),this._tip=so("div",t+"-tip",this._tipContainer),this.options.closeButton){var i=this._closeButton=so("a",t+"-close-button",e);i.setAttribute("role","button"),i.setAttribute("aria-label","Close popup"),i.href="#close",i.innerHTML='<span aria-hidden="true">×</span>',Co(i,"click",(function(t){Zo(t),this.close()}),this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var n=t.offsetWidth;n=Math.min(n,this.options.maxWidth),n=Math.max(n,this.options.minWidth),e.width=n+1+"px",e.whiteSpace="",e.height="";var i=t.offsetHeight,o=this.options.maxHeight,s="leaflet-popup-scrolled";o&&i>o?(e.height=o+"px",uo(t,s)):po(t,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),n=this._getAnchor();yo(this._container,e.add(n))},_adjustPan:function(t){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var e=this._map,n=parseInt(oo(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+n,o=this._containerWidth,s=new On(this._containerLeft,-i-this._containerBottom);s._add(bo(this._container));var r=e.layerPointToContainerPoint(s),a=zn(this.options.autoPanPadding),l=zn(this.options.autoPanPaddingTopLeft||a),c=zn(this.options.autoPanPaddingBottomRight||a),h=e.getSize(),u=0,d=0;r.x+o+c.x>h.x&&(u=r.x+o-h.x+c.x),r.x-u-l.x<0&&(u=r.x-l.x),r.y+i+c.y>h.y&&(d=r.y+i-h.y+c.y),r.y-d-l.y<0&&(d=r.y-l.y),(u||d)&&e.fire("autopanstart").panBy([u,d],{animate:t&&"moveend"===t.type})}},_getAnchor:function(){return zn(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),mr=function(t,e){return new pr(t,e)};Go.mergeOptions({closePopupOnClick:!0}),Go.include({openPopup:function(t,e,n){return this._initOverlay(pr,t,e,n).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),ks.include({bindPopup:function(t,e){return this._popup=this._initOverlay(pr,this._popup,t,e),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._popup._prepareOpen(t)&&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()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(this._popup&&this._map){jo(t);var e=t.layer||t.target;this._popup._source!==e||e instanceof Zs?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var fr=dr.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){dr.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){dr.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=dr.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=so("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+an(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,n,i=this._map,o=this._container,s=i.latLngToContainerPoint(i.getCenter()),r=i.layerPointToContainerPoint(t),a=this.options.direction,l=o.offsetWidth,c=o.offsetHeight,h=zn(this.options.offset),u=this._getAnchor();"top"===a?(e=l/2,n=c):"bottom"===a?(e=l/2,n=0):"center"===a?(e=l/2,n=c/2):"right"===a?(e=0,n=c/2):"left"===a?(e=l,n=c/2):r.x<s.x?(a="right",e=0,n=c/2):(a="left",e=l+2*(h.x+u.x),n=c/2),t=t.subtract(zn(e,n,!0)).add(h).add(u),po(o,"leaflet-tooltip-right"),po(o,"leaflet-tooltip-left"),po(o,"leaflet-tooltip-top"),po(o,"leaflet-tooltip-bottom"),uo(o,"leaflet-tooltip-"+a),yo(o,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&_o(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return zn(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),_r=function(t,e){return new fr(t,e)};Go.include({openTooltip:function(t,e,n){return this._initOverlay(fr,t,e,n).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),ks.include({bindTooltip:function(t,e){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(fr,this._tooltip,t,e),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 e=t?"off":"on",n={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?n.add=this._openTooltip:(n.mouseover=this._openTooltip,n.mouseout=this.closeTooltip,n.click=this._openTooltip,this._map?this._addFocusListeners():n.add=this._addFocusListeners),this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),this[e](n),this._tooltipHandlersAdded=!t}},openTooltip:function(t){return this._tooltip&&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){Co(t.getElement(),"focus",(function(){this._tooltip._source=t,this.openTooltip()}),this),Co(t.getElement(),"blur",this.closeTooltip,this)},_setAriaDescribedByOnLayer:function(t){t.getElement().setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(t){!this._tooltip||!this._map||this._map.dragging&&this._map.dragging.moving()||(this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0))},_moveTooltip:function(t){var e,n,i=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),n=this._map.containerPointToLayerPoint(e),i=this._map.layerPointToLatLng(n)),this._tooltip.setLatLng(i)}});var gr=Ss.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),n=this.options;if(n.html instanceof Element?(ao(e),e.appendChild(n.html)):e.innerHTML=!1!==n.html?n.html:"",n.bgPos){var i=zn(n.bgPos);e.style.backgroundPosition=-i.x+"px "+-i.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});function vr(t){return new gr(t)}Ss.Default=Is;var yr=ks.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Ii.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){mn(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),ro(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(lo(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(co(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=ln(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 On?t:new On(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,n=this.getPane().children,i=-t(-1/0,1/0),o=0,s=n.length;o<s;o++)e=n[o].style.zIndex,n[o]!==this._container&&e&&(i=t(i,+e));isFinite(i)&&(this.options.zIndex=i+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Ii.ielt9){_o(this._container,this.options.opacity);var t=+new Date,e=!1,n=!1;for(var i in this._tiles){var o=this._tiles[i];if(o.current&&o.loaded){var s=Math.min(1,(t-o.loaded)/200);_o(o.el,s),s<1?e=!0:(o.active?n=!0:this._onOpaqueTile(o),o.active=!0)}}n&&!this._noPrune&&this._pruneTiles(),e&&(Mn(this._fadeFrame),this._fadeFrame=Pn(this._updateOpacity,this))}},_onOpaqueTile:hn,_initContainer:function(){this._container||(this._container=so("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,e=this.options.maxZoom;if(void 0!==t){for(var n in this._levels)n=Number(n),this._levels[n].el.children.length||n===t?(this._levels[n].el.style.zIndex=e-Math.abs(t-n),this._onUpdateLevel(n)):(ro(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var i=this._levels[t],o=this._map;return i||((i=this._levels[t]={}).el=so("div","leaflet-tile-container leaflet-zoom-animated",this._container),i.el.style.zIndex=e,i.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),i.zoom=t,this._setZoomTransform(i,o.getCenter(),o.getZoom()),i.el.offsetWidth,this._onCreateLevel(i)),this._level=i,i}},_onUpdateLevel:hn,_onRemoveLevel:hn,_onCreateLevel:hn,_pruneTiles:function(){if(this._map){var t,e,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)if((e=this._tiles[t]).current&&!e.active){var i=e.coords;this._retainParent(i.x,i.y,i.z,i.z-5)||this._retainChildren(i.x,i.y,i.z,i.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)ro(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,n,i){var o=Math.floor(t/2),s=Math.floor(e/2),r=n-1,a=new On(+o,+s);a.z=+r;var l=this._tileCoordsToKey(a),c=this._tiles[l];return c&&c.active?(c.retain=!0,!0):(c&&c.loaded&&(c.retain=!0),r>i&&this._retainParent(o,s,r,i))},_retainChildren:function(t,e,n,i){for(var o=2*t;o<2*t+2;o++)for(var s=2*e;s<2*e+2;s++){var r=new On(o,s);r.z=n+1;var a=this._tileCoordsToKey(r),l=this._tiles[a];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),n+1<i&&this._retainChildren(o,s,n+1,i))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,n,i){var o=Math.round(e);o=void 0!==this.options.maxZoom&&o>this.options.maxZoom||void 0!==this.options.minZoom&&o<this.options.minZoom?void 0:this._clampZoom(o);var s=this.options.updateWhenZooming&&o!==this._tileZoom;i&&!s||(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==o&&this._update(t),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var n in this._levels)this._setZoomTransform(this._levels[n],t,e)},_setZoomTransform:function(t,e,n){var i=this._map.getZoomScale(n,t.zoom),o=t.origin.multiplyBy(i).subtract(this._map._getNewPixelOrigin(e,n)).round();Ii.any3d?vo(t.el,o,i):yo(t.el,o)},_resetGrid:function(){var t=this._map,e=t.options.crs,n=this._tileSize=this.getTileSize(),i=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],i).x/n.x),Math.ceil(t.project([0,e.wrapLng[1]],i).x/n.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],i).y/n.x),Math.ceil(t.project([e.wrapLat[1],0],i).y/n.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,n=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),i=e.getZoomScale(n,this._tileZoom),o=e.project(t,this._tileZoom).floor(),s=e.getSize().divideBy(2*i);return new In(o.subtract(s),o.add(s))},_update:function(t){var e=this._map;if(e){var n=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var i=this._getTiledPixelBounds(t),o=this._pxBoundsToTileRange(i),s=o.getCenter(),r=[],a=this.options.keepBuffer,l=new In(o.getBottomLeft().subtract([a,-a]),o.getTopRight().add([a,-a]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var c in this._tiles){var h=this._tiles[c].coords;h.z===this._tileZoom&&l.contains(new On(h.x,h.y))||(this._tiles[c].current=!1)}if(Math.abs(n-this._tileZoom)>1)this._setView(t,n);else{for(var u=o.min.y;u<=o.max.y;u++)for(var d=o.min.x;d<=o.max.x;d++){var p=new On(d,u);if(p.z=this._tileZoom,this._isValidTile(p)){var m=this._tiles[this._tileCoordsToKey(p)];m?m.current=!0:r.push(p)}}if(r.sort((function(t,e){return t.distanceTo(s)-e.distanceTo(s)})),0!==r.length){this._loading||(this._loading=!0,this.fire("loading"));var f=document.createDocumentFragment();for(d=0;d<r.length;d++)this._addTile(r[d],f);this._level.el.appendChild(f)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var n=this._globalTileRange;if(!e.wrapLng&&(t.x<n.min.x||t.x>n.max.x)||!e.wrapLat&&(t.y<n.min.y||t.y>n.max.y))return!1}if(!this.options.bounds)return!0;var i=this._tileCoordsToBounds(t);return Nn(this.options.bounds).overlaps(i)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,n=this.getTileSize(),i=t.scaleBy(n),o=i.add(n);return[e.unproject(i,t.z),e.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),n=new Bn(e[0],e[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),n=new On(+e[0],+e[1]);return n.z=+e[2],n},_removeTile:function(t){var e=this._tiles[t];e&&(ro(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){uo(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=hn,t.onmousemove=hn,Ii.ielt9&&this.options.opacity<1&&_o(t,this.options.opacity)},_addTile:function(t,e){var n=this._getTilePos(t),i=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),sn(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&Pn(sn(this._tileReady,this,t,null,o)),yo(o,n),this._tiles[i]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,n){e&&this.fire("tileerror",{error:e,tile:n,coords:t});var i=this._tileCoordsToKey(t);(n=this._tiles[i])&&(n.loaded=+new Date,this._map._fadeAnimated?(_o(n.el,0),Mn(this._fadeFrame),this._fadeFrame=Pn(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(uo(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Ii.ielt9||!this._map._fadeAnimated?Pn(this._pruneTiles,this):setTimeout(sn(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new On(this._wrapX?cn(t.x,this._wrapX):t.x,this._wrapY?cn(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new In(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function br(t){return new yr(t)}var wr=yr.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,(e=mn(this,e)).detectRetina&&Ii.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var n=document.createElement("img");return Co(n,"load",sn(this._tileOnLoad,this,e,n)),Co(n,"error",sn(this._tileOnError,this,e,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(n.referrerPolicy=this.options.referrerPolicy),n.alt="",n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:Ii.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var n=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=n),e["-y"]=n}return gn(this._url,nn(e,this.options))},_tileOnLoad:function(t,e){Ii.ielt9?setTimeout(sn(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,n){var i=this.options.errorTileUrl;i&&e.getAttribute("src")!==i&&(e.src=i),t(n,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=hn,e.onerror=hn,!e.complete)){e.src=bn;var n=this._tiles[t].coords;ro(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:n})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",bn),yr.prototype._removeTile.call(this,t)},_tileReady:function(t,e,n){if(this._map&&(!n||n.getAttribute("src")!==bn))return yr.prototype._tileReady.call(this,t,e,n)}});function xr(t,e){return new wr(t,e)}var $r=wr.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,e){this._url=t;var n=nn({},this.defaultWmsParams);for(var i in e)i in this.options||(n[i]=e[i]);var o=(e=mn(this,e)).detectRetina&&Ii.retina?2:1,s=this.getTileSize();n.width=s.x*o,n.height=s.y*o,this.wmsParams=n},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,wr.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),n=this._crs,i=Dn(n.project(e[0]),n.project(e[1])),o=i.min,s=i.max,r=(this._wmsVersion>=1.3&&this._crs===Ps?[o.y,o.x,s.y,s.x]:[o.x,o.y,s.x,s.y]).join(","),a=wr.prototype.getTileUrl.call(this,t);return a+fn(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(t,e){return nn(this.wmsParams,t),e||this.redraw(),this}});wr.WMS=$r,xr.wms=function(t,e){return new $r(t,e)};var Lr=ks.extend({options:{padding:.1},initialize:function(t){mn(this,t),an(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&uo(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,e){var n=this._map.getZoomScale(e,this._zoom),i=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),s=i.multiplyBy(-n).add(o).subtract(this._map._getNewPixelOrigin(t,e));Ii.any3d?vo(this._container,s,n):yo(this._container,s)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),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,e=this._map.getSize(),n=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new In(n,n.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Tr=Lr.extend({options:{tolerance:0},getEvents:function(){var t=Lr.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Lr.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Co(t,"mousemove",this._onMouseMove,this),Co(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Co(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){Mn(this._redrawRequest),delete this._ctx,ro(this._container),Ao(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){Lr.prototype._update.call(this);var t=this._bounds,e=this._container,n=t.getSize(),i=Ii.retina?2:1;yo(e,t.min),e.width=i*n.x,e.height=i*n.y,e.style.width=n.x+"px",e.style.height=n.y+"px",Ii.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){Lr.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[an(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,n=e.next,i=e.prev;n?n.prev=i:this._drawLast=i,i?i.next=n:this._drawFirst=n,delete t._order,delete this._layers[an(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("string"==typeof t.options.dashArray){var e,n,i=t.options.dashArray.split(/[, ]+/),o=[];for(n=0;n<i.length;n++){if(e=Number(i[n]),isNaN(e))return;o.push(e)}t.options._dashArray=o}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||Pn(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new In,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_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 e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.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,e=this._redrawBounds;if(this._ctx.save(),e){var n=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,n.x,n.y),this._ctx.clip()}this._drawing=!0;for(var i=this._drawFirst;i;i=i.next)t=i.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var n,i,o,s,r=t._parts,a=r.length,l=this._ctx;if(a){for(l.beginPath(),n=0;n<a;n++){for(i=0,o=r[n].length;i<o;i++)s=r[n][i],l[i?"lineTo":"moveTo"](s.x,s.y);e&&l.closePath()}this._fillStroke(l,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,n=this._ctx,i=Math.max(Math.round(t._radius),1),o=(Math.max(Math.round(t._radiusY),1)||i)/i;1!==o&&(n.save(),n.scale(1,o)),n.beginPath(),n.arc(e.x,e.y/o,i,0,2*Math.PI,!1),1!==o&&n.restore(),this._fillStroke(n,t)}},_fillStroke:function(t,e){var n=e.options;n.fill&&(t.globalAlpha=n.fillOpacity,t.fillStyle=n.fillColor||n.color,t.fill(n.fillRule||"evenodd")),n.stroke&&0!==n.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=n.opacity,t.lineWidth=n.weight,t.strokeStyle=n.color,t.lineCap=n.lineCap,t.lineJoin=n.lineJoin,t.stroke())},_onClick:function(t){for(var e,n,i=this._map.mouseEventToLayerPoint(t),o=this._drawFirst;o;o=o.next)(e=o.layer).options.interactive&&e._containsPoint(i)&&("click"!==t.type&&"preclick"!==t.type||!this._map._draggableMoved(e))&&(n=e);this._fireEvent(!!n&&[n],t)},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(po(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,e){if(!this._mouseHoverThrottled){for(var n,i,o=this._drawFirst;o;o=o.next)(n=o.layer).options.interactive&&n._containsPoint(e)&&(i=n);i!==this._hoveredLayer&&(this._handleMouseOut(t),i&&(uo(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseover"),this._hoveredLayer=i)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(sn((function(){this._mouseHoverThrottled=!1}),this),32)}},_fireEvent:function(t,e,n){this._map._fireDOMEvent(e,n||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var n=e.next,i=e.prev;n&&(n.prev=i,i?i.next=n:n&&(this._drawFirst=n),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t))}},_bringToBack:function(t){var e=t._order;if(e){var n=e.next,i=e.prev;i&&(i.next=n,n?n.prev=i:i&&(this._drawLast=i),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}});function Pr(t){return Ii.canvas?new Tr(t):null}var Mr=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),kr={_initContainer:function(){this._container=so("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Lr.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Mr("shape");uo(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Mr("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[an(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;ro(e),t.removeInteractiveTarget(e),delete this._layers[an(t)]},_updateStyle:function(t){var e=t._stroke,n=t._fill,i=t.options,o=t._container;o.stroked=!!i.stroke,o.filled=!!i.fill,i.stroke?(e||(e=t._stroke=Mr("stroke")),o.appendChild(e),e.weight=i.weight+"px",e.color=i.color,e.opacity=i.opacity,i.dashArray?e.dashStyle=vn(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=i.lineCap.replace("butt","flat"),e.joinstyle=i.lineJoin):e&&(o.removeChild(e),t._stroke=null),i.fill?(n||(n=t._fill=Mr("fill")),o.appendChild(n),n.color=i.fillColor||i.color,n.opacity=i.fillOpacity):n&&(o.removeChild(n),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),n=Math.round(t._radius),i=Math.round(t._radiusY||n);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+n+","+i+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){lo(t._container)},_bringToBack:function(t){co(t._container)}},Cr=Ii.vml?Mr:Yn,Er=Lr.extend({_initContainer:function(){this._container=Cr("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Cr("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ro(this._container),Ao(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){Lr.prototype._update.call(this);var t=this._bounds,e=t.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,n.setAttribute("width",e.x),n.setAttribute("height",e.y)),yo(n,t.min),n.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=Cr("path");t.options.className&&uo(e,t.options.className),t.options.interactive&&uo(e,"leaflet-interactive"),this._updateStyle(t),this._layers[an(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ro(t._path),t.removeInteractiveTarget(t._path),delete this._layers[an(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,n=t.options;e&&(n.stroke?(e.setAttribute("stroke",n.color),e.setAttribute("stroke-opacity",n.opacity),e.setAttribute("stroke-width",n.weight),e.setAttribute("stroke-linecap",n.lineCap),e.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?e.setAttribute("stroke-dasharray",n.dashArray):e.removeAttribute("stroke-dasharray"),n.dashOffset?e.setAttribute("stroke-dashoffset",n.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),n.fill?(e.setAttribute("fill",n.fillColor||n.color),e.setAttribute("fill-opacity",n.fillOpacity),e.setAttribute("fill-rule",n.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,Xn(t._parts,e))},_updateCircle:function(t){var e=t._point,n=Math.max(Math.round(t._radius),1),i="a"+n+","+(Math.max(Math.round(t._radiusY),1)||n)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(e.x-n)+","+e.y+i+2*n+",0 "+i+2*-n+",0 ";this._setPath(t,o)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){lo(t._path)},_bringToBack:function(t){co(t._path)}});function Ar(t){return Ii.svg||Ii.vml?new Er(t):null}Ii.vml&&Er.include(kr),Go.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&Pr(t)||Ar(t)}});var Or=Us.extend({initialize:function(t,e){Us.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=Nn(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function Sr(t,e){return new Or(t,e)}Er.create=Cr,Er.pointsToPath=Xn,Gs.geometryToLayer=Ks,Gs.coordsToLatLng=Xs,Gs.coordsToLatLngs=Js,Gs.latLngToCoords=Qs,Gs.latLngsToCoords=tr,Gs.getFeature=er,Gs.asFeature=nr,Go.mergeOptions({boxZoom:!0});var zr=ns.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(){Co(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Ao(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ro(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),Ki(),xo(),this._startPoint=this._map.mouseEventToContainerPoint(t),Co(document,{contextmenu:jo,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=so("div","leaflet-zoom-box",this._container),uo(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new In(this._point,this._startPoint),n=e.getSize();yo(this._box,e.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(ro(this._box),po(this._container,"leaflet-crosshair")),Yi(),$o(),Ao(document,{contextmenu:jo,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(sn(this._resetState,this),0);var e=new Bn(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Go.addInitHook("addHandler","boxZoom",zr),Go.mergeOptions({doubleClickZoom:!0});var Ir=ns.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,n=e.getZoom(),i=e.options.zoomDelta,o=t.originalEvent.shiftKey?n-i:n+i;"center"===e.options.doubleClickZoom?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});Go.addInitHook("addHandler","doubleClickZoom",Ir),Go.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Dr=ns.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new rs(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))}uo(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){po(this._map._container,"leaflet-grab"),po(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 e=Nn(this._map.options.maxBounds);this._offsetLimit=Dn(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.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 e=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),this._times.push(e),this._prunePositions(e)}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),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),n=this._initialWorldOffset,i=this._draggable._newPos.x,o=(i-e+n)%t+e-n,s=(i+e+n)%t-e-n,r=Math.abs(o+n)<Math.abs(s+n)?o:s;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=r},_onDragEnd:function(t){var e=this._map,n=e.options,i=!n.inertia||t.noInertia||this._times.length<2;if(e.fire("dragend",t),i)e.fire("moveend");else{this._prunePositions(+new Date);var o=this._lastPos.subtract(this._positions[0]),s=(this._lastTime-this._times[0])/1e3,r=n.easeLinearity,a=o.multiplyBy(r/s),l=a.distanceTo([0,0]),c=Math.min(n.inertiaMaxSpeed,l),h=a.multiplyBy(c/l),u=c/(n.inertiaDeceleration*r),d=h.multiplyBy(-u/2).round();d.x||d.y?(d=e._limitOffset(d,e.options.maxBounds),Pn((function(){e.panBy(d,{duration:u,easeLinearity:r,noMoveStart:!0,animate:!0})}))):e.fire("moveend")}}});Go.addInitHook("addHandler","dragging",Dr),Go.mergeOptions({keyboard:!0,keyboardPanDelta:80});var Br=ns.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"),Co(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(),Ao(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,e=document.documentElement,n=t.scrollTop||e.scrollTop,i=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(i,n)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,n,i=this._panKeys={},o=this.keyCodes;for(e=0,n=o.left.length;e<n;e++)i[o.left[e]]=[-1*t,0];for(e=0,n=o.right.length;e<n;e++)i[o.right[e]]=[t,0];for(e=0,n=o.down.length;e<n;e++)i[o.down[e]]=[0,t];for(e=0,n=o.up.length;e<n;e++)i[o.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,n,i=this._zoomKeys={},o=this.keyCodes;for(e=0,n=o.zoomIn.length;e<n;e++)i[o.zoomIn[e]]=t;for(e=0,n=o.zoomOut.length;e<n;e++)i[o.zoomOut[e]]=-t},_addHooks:function(){Co(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Ao(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,n=t.keyCode,i=this._map;if(n in this._panKeys)i._panAnim&&i._panAnim._inProgress||(e=this._panKeys[n],t.shiftKey&&(e=zn(e).multiplyBy(3)),i.panBy(e),i.options.maxBounds&&i.panInsideBounds(i.options.maxBounds));else if(n in this._zoomKeys)i.setZoom(i.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[n]);else{if(27!==n||!i._popup||!i._popup.options.closeOnEscapeKey)return;i.closePopup()}jo(t)}}});Go.addInitHook("addHandler","keyboard",Br),Go.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var Nr=ns.extend({addHooks:function(){Co(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Ao(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=Wo(t),n=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var i=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(sn(this._performZoom,this),i),jo(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),n=this._map.options.zoomSnap||0;t._stop();var i=this._delta/(4*this._map.options.wheelPxPerZoomLevel),o=4*Math.log(2/(1+Math.exp(-Math.abs(i))))/Math.LN2,s=n?Math.ceil(o/n)*n:o,r=t._limitZoom(e+(this._delta>0?s:-s))-e;this._delta=0,this._startTime=null,r&&("center"===t.options.scrollWheelZoom?t.setZoom(e+r):t.setZoomAround(this._lastMousePos,e+r))}});Go.addInitHook("addHandler","scrollWheelZoom",Nr);Go.mergeOptions({tapHold:Ii.touchNative&&Ii.safari&&Ii.mobile,tapTolerance:15});var Zr=ns.extend({addHooks:function(){Co(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Ao(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),1===t.touches.length){var e=t.touches[0];this._startPos=this._newPos=new On(e.clientX,e.clientY),this._holdTimeout=setTimeout(sn((function(){this._cancel(),this._isTapValid()&&(Co(document,"touchend",Zo),Co(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))}),this),600),Co(document,"touchend touchcancel contextmenu",this._cancel,this),Co(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){Ao(document,"touchend",Zo),Ao(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),Ao(document,"touchend touchcancel contextmenu",this._cancel,this),Ao(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new On(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var n=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});n._simulated=!0,e.target.dispatchEvent(n)}});Go.addInitHook("addHandler","tapHold",Zr),Go.mergeOptions({touchZoom:Ii.touch,bounceAtZoomLimits:!0});var jr=ns.extend({addHooks:function(){uo(this._map._container,"leaflet-touch-zoom"),Co(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){po(this._map._container,"leaflet-touch-zoom"),Ao(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(n.add(i)._divideBy(2))),this._startDist=n.distanceTo(i),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),Co(document,"touchmove",this._onTouchMove,this),Co(document,"touchend touchcancel",this._onTouchEnd,this),Zo(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]),o=n.distanceTo(i)/this._startDist;if(this._zoom=e.getScaleZoom(o,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&o<1||this._zoom>e.getMaxZoom()&&o>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===o)return}else{var s=n._add(i)._divideBy(2)._subtract(this._centerPoint);if(1===o&&0===s.x&&0===s.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(s),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),Mn(this._animRequest);var r=sn(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=Pn(r,this,!0),Zo(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,Mn(this._animRequest),Ao(document,"touchmove",this._onTouchMove,this),Ao(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))):this._zooming=!1}});Go.addInitHook("addHandler","touchZoom",jr),Go.BoxZoom=zr,Go.DoubleClickZoom=Ir,Go.Drag=Dr,Go.Keyboard=Br,Go.ScrollWheelZoom=Nr,Go.TapHold=Zr,Go.TouchZoom=jr;var Rr=nn({__proto__:null,version:en,Control:Yo,control:Xo,Class:Cn,Handler:ns,extend:nn,bind:sn,stamp:an,setOptions:mn,Browser:Ii,Evented:An,Mixin:os,Util:kn,PosAnimation:Vo,Draggable:rs,DomEvent:Uo,DomUtil:ko,Point:On,point:zn,Bounds:In,bounds:Dn,Transformation:Un,transformation:Vn,LineUtil:vs,PolyUtil:ws,LatLng:Zn,latLng:jn,LatLngBounds:Bn,latLngBounds:Nn,CRS:Hn,Projection:Ls,Layer:ks,LayerGroup:Cs,layerGroup:Es,FeatureGroup:As,featureGroup:Os,ImageOverlay:rr,imageOverlay:ar,VideoOverlay:lr,videoOverlay:cr,SVGOverlay:hr,svgOverlay:ur,DivOverlay:dr,Popup:pr,popup:mr,Tooltip:fr,tooltip:_r,icon:zs,DivIcon:gr,divIcon:vr,Marker:Bs,marker:Ns,Icon:Ss,GridLayer:yr,gridLayer:br,TileLayer:wr,tileLayer:xr,Renderer:Lr,Canvas:Tr,canvas:Pr,Path:Zs,CircleMarker:js,circleMarker:Rs,Circle:Hs,circle:Fs,Polyline:Ws,polyline:qs,Polygon:Us,polygon:Vs,Rectangle:Or,rectangle:Sr,SVG:Er,svg:Ar,GeoJSON:Gs,geoJSON:or,geoJson:sr,Map:Go,map:Ko},{noConflict:Wr}),Hr=function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("Unable to locate global object.")}(),Fr=Hr.L;function Wr(){return Hr.L=Fr,Rr}Hr.L=Rr;var qr=ct(Object.freeze({__proto__:null,Bounds:In,Browser:Ii,CRS:Hn,Canvas:Tr,Circle:Hs,CircleMarker:js,Class:Cn,Control:Yo,DivIcon:gr,DivOverlay:dr,DomEvent:Uo,DomUtil:ko,Draggable:rs,Evented:An,FeatureGroup:As,GeoJSON:Gs,GridLayer:yr,Handler:ns,Icon:Ss,ImageOverlay:rr,LatLng:Zn,LatLngBounds:Bn,Layer:ks,LayerGroup:Cs,LineUtil:vs,Map:Go,Marker:Bs,Mixin:os,Path:Zs,Point:On,PolyUtil:ws,Polygon:Us,Polyline:Ws,Popup:pr,PosAnimation:Vo,Projection:Ls,Rectangle:Or,Renderer:Lr,SVG:Er,SVGOverlay:hr,TileLayer:wr,Tooltip:fr,Transformation:Un,Util:kn,VideoOverlay:lr,bind:sn,bounds:Dn,canvas:Pr,circle:Fs,circleMarker:Rs,control:Xo,default:Rr,divIcon:vr,extend:nn,featureGroup:Os,geoJSON:or,geoJson:sr,gridLayer:br,icon:zs,imageOverlay:ar,latLng:jn,latLngBounds:Nn,layerGroup:Es,map:Ko,marker:Ns,noConflict:Wr,point:zn,polygon:Vs,polyline:qs,popup:mr,rectangle:Sr,setOptions:mn,stamp:an,svg:Ar,svgOverlay:ur,tileLayer:xr,tooltip:_r,transformation:Vn,version:en,videoOverlay:cr}));function Ur(e){let n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,L,P,k,C,O,S,z,I,D,B,N;return{c(){n=x("div"),i=x("div"),o=$("map center: "),s=$(e[0]),r=T(),a=x("a"),l=$("view on osm.org"),c=T(),h=x("br"),u=$("\n map zoom: "),d=$(e[1]),p=T(),m=x("br"),f=$("\n viewbox: "),_=$(e[2]),g=T(),w=x("br"),L=$("\n last click: "),P=$(e[4]),k=T(),C=x("br"),O=$("\n mouse position: "),S=$(e[5]),z=T(),I=x("div"),D=x("a"),D.textContent="hide",E(a,"target","_blank"),E(a,"href",e[3]),E(i,"id","map-position-inner"),E(D,"href","#hide"),E(I,"id","map-position-close"),E(I,"class","svelte-1b30dq3"),E(n,"id","map-position"),E(n,"class","svelte-1b30dq3")},m(t,e){y(t,n,e),v(n,i),v(i,o),v(i,s),v(i,r),v(i,a),v(a,l),v(i,c),v(i,h),v(i,u),v(i,d),v(i,p),v(i,m),v(i,f),v(i,_),v(i,g),v(i,w),v(i,L),v(i,P),v(i,k),v(i,C),v(i,O),v(i,S),v(n,z),v(n,I),v(I,D),B||(N=M(D,"click",Vr),B=!0)},p(t,[e]){1&e&&A(s,t[0]),8&e&&E(a,"href",t[3]),2&e&&A(d,t[1]),4&e&&A(_,t[2]),16&e&&A(P,t[4]),32&e&&A(S,t[5])},i:t,o:t,d(t){t&&b(n),B=!1,N()}}}function Vr(){document.getElementById("map-position").style.display="none",document.getElementById("show-map-position").style.display="block"}function Gr(t,e,n){let i,o,s,r,a,l,c;function h(t,e){n(0,o=t.getCenter().lat.toFixed(5)+","+t.getCenter().lng.toFixed(5)),n(3,a=function(t){return"https://openstreetmap.org/#map="+t.getZoom()+"/"+t.getCenter().lat.toFixed(5)+"/"+t.getCenter().lng.toFixed(5)}(t)),n(1,s=t.getZoom()),n(2,r=function(t){var e=t.getBounds(),n=e.getWest(),i=e.getEast();return i-n>=360&&(n=t.getCenter().lng-179.999,i=t.getCenter().lng+179.999),i=L.latLng(77,i).wrap().lng,[(n=L.latLng(77,n).wrap().lng).toFixed(5),e.getNorth().toFixed(5),i.toFixed(5),e.getSouth().toFixed(5)].join(",")}(t)),n(5,c="-"),e&&n(5,c=[e.lat.toFixed(5),e.lng.toFixed(5)].join(",")),i&&n(4,l=[i.lat.toFixed(5),i.lng.toFixed(5)].join(","))}return dt.subscribe((t=>{t&&(t.on("move",(function(){h(t)})),t.on("mousemove",(function(e){h(t,e.latlng)})),t.on("click",(function(e){i=e.latlng,h(t)})),t.on("load",(function(){h(t)})))})),[o,s,r,a,l,c]}!function(t,e){!function(e,n){t.exports=e(qr),void 0!==n&&n.L&&(n.L.Control.MiniMap=e(L),n.L.control.minimap=function(t,e){return new n.L.Control.MiniMap(t,e)})}((function(t){var e=t.Control.extend({includes:t.Evented?t.Evented.prototype:t.Mixin.Events,options:{position:"bottomright",toggleDisplay:!1,zoomLevelOffset:-5,zoomLevelFixed:!1,centerFixed:!1,zoomAnimation:!1,autoToggleDisplay:!1,minimized:!1,width:150,height:150,collapsedWidth:19,collapsedHeight:19,aimingRectOptions:{color:"#ff7800",weight:1,clickable:!1},shadowRectOptions:{color:"#000000",weight:1,clickable:!1,opacity:0,fillOpacity:0},strings:{hideText:"Hide MiniMap",showText:"Show MiniMap"},mapOptions:{}},initialize:function(e,n){t.Util.setOptions(this,n),this.options.aimingRectOptions.clickable=!1,this.options.shadowRectOptions.clickable=!1,this._layer=e},onAdd:function(e){this._mainMap=e,this._container=t.DomUtil.create("div","leaflet-control-minimap"),this._container.style.width=this.options.width+"px",this._container.style.height=this.options.height+"px",t.DomEvent.disableClickPropagation(this._container),t.DomEvent.on(this._container,"mousewheel",t.DomEvent.stopPropagation);var n={attributionControl:!1,dragging:!this.options.centerFixed,zoomControl:!1,zoomAnimation:this.options.zoomAnimation,autoToggleDisplay:this.options.autoToggleDisplay,touchZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),scrollWheelZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),doubleClickZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),boxZoom:!this._isZoomLevelFixed(),crs:e.options.crs};return n=t.Util.extend(this.options.mapOptions,n),this._miniMap=new t.Map(this._container,n),this._miniMap.addLayer(this._layer),this._mainMapMoving=!1,this._miniMapMoving=!1,this._userToggledDisplay=!1,this._minimized=!1,this.options.toggleDisplay&&this._addToggleButton(),this._miniMap.whenReady(t.Util.bind((function(){this._aimingRect=t.rectangle(this._mainMap.getBounds(),this.options.aimingRectOptions).addTo(this._miniMap),this._shadowRect=t.rectangle(this._mainMap.getBounds(),this.options.shadowRectOptions).addTo(this._miniMap),this._mainMap.on("moveend",this._onMainMapMoved,this),this._mainMap.on("move",this._onMainMapMoving,this),this._miniMap.on("movestart",this._onMiniMapMoveStarted,this),this._miniMap.on("move",this._onMiniMapMoving,this),this._miniMap.on("moveend",this._onMiniMapMoved,this)}),this)),this._container},addTo:function(e){t.Control.prototype.addTo.call(this,e);var n=this.options.centerFixed||this._mainMap.getCenter();return this._miniMap.setView(n,this._decideZoom(!0)),this._setDisplay(this.options.minimized),this},onRemove:function(t){this._mainMap.off("moveend",this._onMainMapMoved,this),this._mainMap.off("move",this._onMainMapMoving,this),this._miniMap.off("moveend",this._onMiniMapMoved,this),this._miniMap.removeLayer(this._layer)},changeLayer:function(t){this._miniMap.removeLayer(this._layer),this._layer=t,this._miniMap.addLayer(this._layer)},_addToggleButton:function(){this._toggleDisplayButton=this.options.toggleDisplay?this._createButton("",this._toggleButtonInitialTitleText(),"leaflet-control-minimap-toggle-display leaflet-control-minimap-toggle-display-"+this.options.position,this._container,this._toggleDisplayButtonClicked,this):void 0,this._toggleDisplayButton.style.width=this.options.collapsedWidth+"px",this._toggleDisplayButton.style.height=this.options.collapsedHeight+"px"},_toggleButtonInitialTitleText:function(){return this.options.minimized?this.options.strings.showText:this.options.strings.hideText},_createButton:function(e,n,i,o,s,r){var a=t.DomUtil.create("a",i,o);a.innerHTML=e,a.href="#",a.title=n;var l=t.DomEvent.stopPropagation;return t.DomEvent.on(a,"click",l).on(a,"mousedown",l).on(a,"dblclick",l).on(a,"click",t.DomEvent.preventDefault).on(a,"click",s,r),a},_toggleDisplayButtonClicked:function(){this._userToggledDisplay=!0,this._minimized?this._restore():this._minimize()},_setDisplay:function(t){t!==this._minimized&&(this._minimized?this._restore():this._minimize())},_minimize:function(){this.options.toggleDisplay?(this._container.style.width=this.options.collapsedWidth+"px",this._container.style.height=this.options.collapsedHeight+"px",this._toggleDisplayButton.className+=" minimized-"+this.options.position,this._toggleDisplayButton.title=this.options.strings.showText):this._container.style.display="none",this._minimized=!0,this._onToggle()},_restore:function(){this.options.toggleDisplay?(this._container.style.width=this.options.width+"px",this._container.style.height=this.options.height+"px",this._toggleDisplayButton.className=this._toggleDisplayButton.className.replace("minimized-"+this.options.position,""),this._toggleDisplayButton.title=this.options.strings.hideText):this._container.style.display="block",this._minimized=!1,this._onToggle()},_onMainMapMoved:function(t){if(this._miniMapMoving)this._miniMapMoving=!1;else{var e=this.options.centerFixed||this._mainMap.getCenter();this._mainMapMoving=!0,this._miniMap.setView(e,this._decideZoom(!0)),this._setDisplay(this._decideMinimized())}this._aimingRect.setBounds(this._mainMap.getBounds())},_onMainMapMoving:function(t){this._aimingRect.setBounds(this._mainMap.getBounds())},_onMiniMapMoveStarted:function(t){if(!this.options.centerFixed){var e=this._aimingRect.getBounds(),n=this._miniMap.latLngToContainerPoint(e.getSouthWest()),i=this._miniMap.latLngToContainerPoint(e.getNorthEast());this._lastAimingRectPosition={sw:n,ne:i}}},_onMiniMapMoving:function(e){this.options.centerFixed||!this._mainMapMoving&&this._lastAimingRectPosition&&(this._shadowRect.setBounds(new t.LatLngBounds(this._miniMap.containerPointToLatLng(this._lastAimingRectPosition.sw),this._miniMap.containerPointToLatLng(this._lastAimingRectPosition.ne))),this._shadowRect.setStyle({opacity:1,fillOpacity:.3}))},_onMiniMapMoved:function(t){this._mainMapMoving?this._mainMapMoving=!1:(this._miniMapMoving=!0,this._mainMap.setView(this._miniMap.getCenter(),this._decideZoom(!1)),this._shadowRect.setStyle({opacity:0,fillOpacity:0}))},_isZoomLevelFixed:function(){var t=this.options.zoomLevelFixed;return this._isDefined(t)&&this._isInteger(t)},_decideZoom:function(t){if(this._isZoomLevelFixed())return t?this.options.zoomLevelFixed:this._mainMap.getZoom();if(t)return this._mainMap.getZoom()+this.options.zoomLevelOffset;var e,n=this._miniMap.getZoom()-this._mainMap.getZoom(),i=this._miniMap.getZoom()-this.options.zoomLevelOffset;return n>this.options.zoomLevelOffset&&this._mainMap.getZoom()<this._miniMap.getMinZoom()-this.options.zoomLevelOffset?this._miniMap.getZoom()>this._lastMiniMapZoom?(e=this._mainMap.getZoom()+1,this._miniMap.setZoom(this._miniMap.getZoom()-1)):e=this._mainMap.getZoom():e=i,this._lastMiniMapZoom=this._miniMap.getZoom(),e},_decideMinimized:function(){return this._userToggledDisplay?this._minimized:this.options.autoToggleDisplay?!!this._mainMap.getBounds().contains(this._miniMap.getBounds()):this._minimized},_isInteger:function(t){return"number"==typeof t},_isDefined:function(t){return void 0!==t},_onToggle:function(){t.Util.requestAnimFrame((function(){t.DomEvent.on(this._container,"transitionend",this._fireToggleEvents,this),t.Browser.any3d||t.Util.requestAnimFrame(this._fireToggleEvents,this)}),this)},_fireToggleEvents:function(){t.DomEvent.off(this._container,"transitionend",this._fireToggleEvents,this);var e={minimized:this._minimized};this.fire(this._minimized?"minimize":"restore",e),this.fire("toggle",e)}});return t.Map.mergeOptions({miniMapControl:!1}),t.Map.addInitHook((function(){this.options.miniMapControl&&(this.miniMapControl=(new e).addTo(this))})),e}),window)}({exports:{}});class Kr extends lt{constructor(t){super(),at(this,t,Gr,Ur,r,{})}}function Yr(e){let n,i,r,a,l,c,h,u;return n=new Kr({}),{c(){it(n.$$.fragment),i=T(),r=x("div"),a=T(),l=x("div"),l.textContent="show map bounds",E(r,"id","map"),E(r,"class","svelte-1vbvdrk"),E(l,"id","show-map-position"),E(l,"class","leaflet-bar btn btn-sm btn-outline-secondary svelte-1vbvdrk")},m(o,d){var p;ot(n,o,d),y(o,i,d),y(o,r,d),y(o,a,d),y(o,l,d),c=!0,h||(u=[(p=e[0].call(null,r),p&&s(p.destroy)?p.destroy:t),M(l,"click",C(Xr))],h=!0)},p:t,i(t){c||(tt(n.$$.fragment,t),c=!0)},o(t){et(n.$$.fragment,t),c=!1},d(t){st(n,t),t&&b(i),t&&b(r),t&&b(a),t&&b(l),h=!1,o(u)}}}function Xr(t){t.target.style.display="none",document.getElementById("map-position").style.display="block"}function Jr(t,e,n){let{display_minimap:i=!1}=e,{current_result:o=null}=e,{position_marker:s=null}=e,r=[];function a(t){let e=u(dt);if(!e)return;if(function(){let t=u(dt);t&&r.forEach((function(e){t.removeLayer(e)}))}(),s){let t=Rs(s,{radius:5,weight:2,fillColor:"#ff7800",color:"red",opacity:.75,zIndexOffset:100,clickable:!1});t.bindTooltip(`Search (${s[0]},${s[1]})`).openTooltip(),t.addTo(e),r.push(t)}var n=new URLSearchParams(window.location.search).get("viewbox");if(n){let t=n.split(",");Sr(Nn([t[1],t[0]],[t[3],t[2]]),{color:"#69d53e",weight:3,dashArray:"5 5",opacity:.8,fill:!1}).addTo(e)}if(!t)return;let i=t.centroid?t.centroid.coordinates[1]:t.lat,o=t.centroid?t.centroid.coordinates[0]:t.lon,a=t.geometry||t.geojson;if(i&&o){let t=Rs([i,o],{radius:10,weight:2,fillColor:"#ff7800",color:"blue",opacity:.75});s&&t.bindTooltip("Result").openTooltip(),e.addLayer(t),r.push(t)}if(a){var l=sr({type:"FeatureCollection",features:[{type:"Feature",geometry:a,properties:{}}]},{style:()=>({interactive:!1,color:"blue"})});e.addLayer(l),r.push(l),e.fitBounds(l.getBounds())}else i&&o&&s?e.fitBounds([[i,o],s],{padding:[50,50]}):i&&o&&e.setView([i,o],10)}return t.$$set=t=>{"display_minimap"in t&&n(1,i=t.display_minimap),"current_result"in t&&n(2,o=t.current_result),"position_marker"in t&&n(3,s=t.position_marker)},t.$$.update=()=>{4&t.$$.dirty&&a(o)},[function(t){let e=function(t){const e=Nominatim_Config.Map_Tile_Attribution;let n=new Ko(t,{attributionControl:!1,scrollWheelZoom:!0,touchZoom:!1,center:[Nominatim_Config.Map_Default_Lat,Nominatim_Config.Map_Default_Lon],zoom:Nominatim_Config.Map_Default_Zoom});if(e&&e.length&&Xo.attribution({prefix:'<a href="https://leafletjs.com/">Leaflet</a>'}).addTo(n),xr(Nominatim_Config.Map_Tile_URL,{attribution:e}).addTo(n),i){let t=new wr(Nominatim_Config.Map_Tile_URL,{minZoom:0,maxZoom:13,attribution:e});new Yo.MiniMap(t,{toggleDisplay:!0}).addTo(n)}const o=Yo.extend({options:{position:"topright"},onAdd:()=>document.getElementById("show-map-position")});return n.addControl(new o),n}(t);return dt.set(e),a(o),{destroy:()=>{dt.set(null),e.remove()}}},i,o,s]}class Qr extends lt{constructor(t){super(),at(this,t,Jr,Yr,r,{display_minimap:1,current_result:2,position_marker:3})}}function ta(t){let e,n;return e=new _e({props:{api_request_params:t[0],bStructuredSearch:t[2]}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.api_request_params=t[0]),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function ea(t){let e,n,i,o,s,r,a,l,c,h;function u(e){t[4](e)}e=new se({props:{$$slots:{default:[ta]},$$scope:{ctx:t}}});let d={reverse_search:!1};return void 0!==t[1]&&(d.current_result=t[1]),s=new tn({props:d}),Z.push((()=>nt(s,"current_result",u))),c=new Qr({props:{current_result:t[1],display_minimap:!0}}),{c(){it(e.$$.fragment),n=T(),i=x("div"),o=x("div"),it(s.$$.fragment),a=T(),l=x("div"),it(c.$$.fragment),E(o,"class","sidebar svelte-1d53ob0"),E(l,"id","map-wrapper"),E(l,"class","svelte-1d53ob0"),E(i,"id","content"),E(i,"class","svelte-1d53ob0")},m(t,r){ot(e,t,r),y(t,n,r),y(t,i,r),v(i,o),ot(s,o,null),v(i,a),v(i,l),ot(c,l,null),h=!0},p(t,[n]){const i={};65&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i);const o={};!r&&2&n&&(r=!0,o.current_result=t[1],q((()=>r=!1))),s.$set(o);const a={};2&n&&(a.current_result=t[1]),c.$set(a)},i(t){h||(tt(e.$$.fragment,t),tt(s.$$.fragment,t),tt(c.$$.fragment,t),h=!0)},o(t){et(e.$$.fragment,t),et(s.$$.fragment,t),et(c.$$.fragment,t),h=!1},d(t){st(e,t),t&&b(n),t&&b(i),st(s),st(c)}}}function na(t,e,n){let i,o,s;return d(t,_t,(t=>n(3,i=t))),t.$$.update=()=>{if(8&t.$$.dirty){let t=i;"search"===t.tab&&function(t){Mt(),n(0,o={q:t.get("q"),street:t.get("street"),city:t.get("city"),county:t.get("county"),state:t.get("state"),country:t.get("country"),postalcode:t.get("postalcode"),polygon_geojson:Nominatim_Config.Search_AreaPolygons?1:0,viewbox:t.get("viewbox"),bounded:t.get("bounded"),dedupe:t.has("dedupe")&&"1"!==t.get("dedupe")?0:1,"accept-language":t.get("accept-language"),countrycodes:t.get("countrycodes"),limit:t.get("limit"),polygon_threshold:t.get("polygon_threshold"),exclude_place_ids:t.get("exclude_place_ids"),format:"jsonv2"});let e=o.street||o.city||o.county||o.state||o.country||o.postalcode;o.q||e?$t("search",o,(function(t){pt.set(t),Mt("Result for "+o.q),e?(document.querySelector(".nav-tabs a[href='#structured']").click(),document.querySelector("input[name=street]").focus()):document.querySelector("input[name=q]").focus()})):pt.set(void 0)}(t.params)}},[o,s,undefined,i,function(t){s=t,n(1,s)}]}class ia extends lt{constructor(t){super(),at(this,t,na,ea,r,{})}}function oa(t,e,n){const i=t.slice();return i[8]=e[n],i[10]=n,i}function sa(e){let n,i,o,s,r=e[8]+"";return{c(){n=x("option"),i=$(e[10]),o=$(" - "),s=$(r),n.__value=e[10],n.value=n.__value},m(t,e){y(t,n,e),v(n,i),v(n,o),v(n,s)},p:t,d(t){t&&b(n)}}}function ra(t){let e,n,i,s,r,a,l,c,h,u,d,p,m,f,_,g,$,L,P,A,z,I,D=Ee(),B=[];for(let e=0;e<D.length;e+=1)B[e]=sa(oa(t,D,e));return{c(){e=x("div"),e.innerHTML='<label for="reverse-lat" class="svelte-1pqxd6v">lat</label>',n=T(),i=x("div"),s=x("input"),r=T(),a=x("div"),l=x("a"),l.textContent="<>",c=T(),h=x("div"),h.innerHTML='<label for="reverse-lon" class="svelte-1pqxd6v">lon</label>',u=T(),d=x("div"),p=x("input"),m=T(),f=x("div"),f.innerHTML='<label for="reverse-zoom" class="svelte-1pqxd6v">max zoom</label>',_=T(),g=x("div"),$=x("select"),L=x("option"),L.textContent="---";for(let t=0;t<B.length;t+=1)B[t].c();P=T(),A=x("div"),A.innerHTML='<button type="submit" class="btn btn-primary btn-sm mx-1">Search</button>',E(e,"class","col-auto"),E(s,"id","reverse-lat"),E(s,"name","lat"),E(s,"type","text"),E(s,"class","form-control form-control-sm d-inline svelte-1pqxd6v"),E(s,"placeholder","latitude"),E(s,"pattern","^-?\\d+(\\.\\d+)?$"),E(i,"class","col-auto"),E(l,"id","switch-coords"),E(l,"class","btn btn-outline-secondary btn-sm svelte-1pqxd6v"),E(l,"title","switch lat and lon"),E(a,"class","col-auto"),E(h,"class","col-auto"),E(p,"id","reverse-lon"),E(p,"name","lon"),E(p,"type","text"),E(p,"class","form-control form-control-sm svelte-1pqxd6v"),E(p,"placeholder","longitude"),E(p,"pattern","^-?\\d+(\\.\\d+)?$"),E(d,"class","col-auto"),E(f,"class","col-auto"),L.__value="",L.value=L.__value,E($,"id","reverse-zoom"),E($,"name","zoom"),E($,"class","form-select form-select-sm svelte-1pqxd6v"),void 0===t[2]&&W((()=>t[7].call($))),E(g,"class","col-auto"),E(A,"class","col-auto")},m(o,b){y(o,e,b),y(o,n,b),y(o,i,b),v(i,s),O(s,t[0]),y(o,r,b),y(o,a,b),v(a,l),y(o,c,b),y(o,h,b),y(o,u,b),y(o,d,b),v(d,p),O(p,t[1]),y(o,m,b),y(o,f,b),y(o,_,b),y(o,g,b),v(g,$),v($,L);for(let t=0;t<B.length;t+=1)B[t].m($,null);S($,t[2]),y(o,P,b),y(o,A,b),z||(I=[M(s,"input",t[4]),M(s,"change",la),M(l,"click",C(k(t[5]))),M(p,"input",t[6]),M($,"change",t[7])],z=!0)},p(t,e){if(1&e&&s.value!==t[0]&&O(s,t[0]),2&e&&p.value!==t[1]&&O(p,t[1]),0&e){let n;for(D=Ee(),n=0;n<D.length;n+=1){const i=oa(t,D,n);B[n]?B[n].p(i,e):(B[n]=sa(i),B[n].c(),B[n].m($,null))}for(;n<B.length;n+=1)B[n].d(1);B.length=D.length}4&e&&S($,t[2])},d(t){t&&b(e),t&&b(n),t&&b(i),t&&b(r),t&&b(a),t&&b(c),t&&b(h),t&&b(u),t&&b(d),t&&b(m),t&&b(f),t&&b(_),t&&b(g),w(B,t),t&&b(P),t&&b(A),z=!1,o(I)}}}function aa(t){let e,n;return e=new le({props:{page:"reverse",$$slots:{default:[ra]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,[n]){const i={};2055&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function la(t){var e=t.target.value.split(",");2===e.length&&(document.querySelector("input[name=lat]").value=L.Util.trim(e[0]),document.querySelector("input[name=lon]").value=L.Util.trim(e[1]))}function ca(t,e,n){let{lat:i=""}=e,{lon:o=""}=e,{zoom:s=""}=e;function r(t,e,n){if(null===t||null===e)return;let i=new URLSearchParams;i.set("lat",t),i.set("lon",e),i.set("zoom",n||s),yt("reverse",i)}dt.subscribe((t=>{t&&t.on("click",(t=>{let e=t.latlng.wrap();r(e.lat.toFixed(5),e.lng.toFixed(5))}))}));return t.$$set=t=>{"lat"in t&&n(0,i=t.lat),"lon"in t&&n(1,o=t.lon),"zoom"in t&&n(2,s=t.zoom)},[i,o,s,r,function(){i=this.value,n(0,i)},()=>r(o,i),function(){o=this.value,n(1,o)},function(){s=function(t){const e=t.querySelector(":checked")||t.options[0];return e&&e.__value}(this),n(2,s)}]}class ha extends lt{constructor(t){super(),at(this,t,ca,aa,r,{lat:0,lon:1,zoom:2})}}function ua(t){let n,i;const o=[t[0]];let s={};for(let t=0;t<o.length;t+=1)s=e(s,o[t]);return n=new ha({props:s}),{c(){it(n.$$.fragment)},m(t,e){ot(n,t,e),i=!0},p(t,e){const i=1&e?function(t,e){const n={},i={},o={$$scope:1};let s=t.length;for(;s--;){const r=t[s],a=e[s];if(a){for(const t in r)t in a||(i[t]=1);for(const t in a)o[t]||(n[t]=a[t],o[t]=1);t[s]=a}else for(const t in r)o[t]=1}for(const t in i)t in n||(n[t]=void 0);return n}(o,[(s=t[0],"object"==typeof s&&null!==s?s:{})]):{};var s;n.$set(i)},i(t){i||(tt(n.$$.fragment,t),i=!0)},o(t){et(n.$$.fragment,t),i=!1},d(t){st(n,t)}}}function da(t){let e,n,i,o,s,r,a,l,c,h;function u(e){t[4](e)}e=new se({props:{$$slots:{default:[ua]},$$scope:{ctx:t}}});let d={reverse_search:!0};return void 0!==t[1]&&(d.current_result=t[1]),s=new tn({props:d}),Z.push((()=>nt(s,"current_result",u))),c=new Qr({props:{current_result:t[1],position_marker:t[2],display_minimap:!0}}),{c(){it(e.$$.fragment),n=T(),i=x("div"),o=x("div"),it(s.$$.fragment),a=T(),l=x("div"),it(c.$$.fragment),E(o,"class","sidebar svelte-1d53ob0"),E(l,"id","map-wrapper"),E(l,"class","svelte-1d53ob0"),E(i,"id","content"),E(i,"class","svelte-1d53ob0")},m(t,r){ot(e,t,r),y(t,n,r),y(t,i,r),v(i,o),ot(s,o,null),v(i,a),v(i,l),ot(c,l,null),h=!0},p(t,[n]){const i={};65&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i);const o={};!r&&2&n&&(r=!0,o.current_result=t[1],q((()=>r=!1))),s.$set(o);const a={};2&n&&(a.current_result=t[1]),4&n&&(a.position_marker=t[2]),c.$set(a)},i(t){h||(tt(e.$$.fragment,t),tt(s.$$.fragment,t),tt(c.$$.fragment,t),h=!0)},o(t){et(e.$$.fragment,t),et(s.$$.fragment,t),et(c.$$.fragment,t),h=!1},d(t){st(e,t),t&&b(n),t&&b(i),st(s),st(c)}}}function pa(t,e,n){let i,o,s,r;return d(t,_t,(t=>n(3,i=t))),t.$$.update=()=>{if(8&t.$$.dirty){let t=i;"reverse"===t.tab&&(e=t.params,Mt(),n(0,o={lat:e.get("lat"),lon:e.get("lon"),zoom:e.get("zoom")>1?Number(e.get("zoom")):Number(Nominatim_Config.Reverse_Default_Search_Zoom),format:"jsonv2"}),o.lat||o.lat?$t("reverse",o,(function(t){t&&!t.error?(n(2,r=[o.lat,o.lon]),pt.set([t])):pt.set([]),Mt("Reverse result for "+o.lat+","+o.lon),document.querySelector("input[name=lat]").focus()})):pt.set(void 0))}var e},[o,s,r,i,function(t){s=t,n(1,s)}]}class ma extends lt{constructor(t){super(),at(this,t,pa,da,r,{})}}function fa(e){let n,i,o,s,r,a,l,c,h,u,d;return{c(){n=x("form"),i=x("div"),o=x("div"),s=x("input"),a=T(),l=x("div"),l.innerHTML='<button type="submit" class="btn btn-primary btn-sm">Show</button>',c=T(),h=x("small"),h.innerHTML='OSM type+id (<em class="svelte-1kvo9ki">N123</em>, <em class="svelte-1kvo9ki">n123</em>, <em class="svelte-1kvo9ki">W123</em>, <em class="svelte-1kvo9ki">w123</em>, <em class="svelte-1kvo9ki">R123</em>, <em class="svelte-1kvo9ki">r123</em>),\n Place id (<em class="svelte-1kvo9ki">1234</em>) or\n URL (<em class="svelte-1kvo9ki">https://openstreetmap.org/way/123</em>)',E(s,"type","edit"),E(s,"class","form-control form-control-sm me-1 svelte-1kvo9ki"),E(s,"pattern","^[NWRnwr]?[0-9]+$|.*openstreetmap.*"),s.value=r=""+((e[0].osmtype||"")+(e[0].osmid||"")+(e[0].place_id||"")),E(o,"class","col-auto"),E(l,"class","col-auto"),E(i,"class","row g-1"),E(n,"class","form-inline svelte-1kvo9ki"),E(n,"action","details.html"),E(h,"class","form-text text-muted svelte-1kvo9ki")},m(t,r){y(t,n,r),v(n,i),v(i,o),v(o,s),v(i,a),v(i,l),y(t,c,r),y(t,h,r),u||(d=M(n,"submit",k(e[1])),u=!0)},p(t,[e]){1&e&&r!==(r=""+((t[0].osmtype||"")+(t[0].osmid||"")+(t[0].place_id||"")))&&s.value!==r&&(s.value=r)},i:t,o:t,d(t){t&&b(n),t&&b(c),t&&b(h),u=!1,d()}}}function _a(t,e,n){let{api_request_params:i={}}=e;return t.$$set=t=>{"api_request_params"in t&&n(0,i=t.api_request_params)},[i,function(t){let e=t.target.querySelector("input[type=edit]").value.trim(),n=e.match(/^\s*([NWR])(\d+)\s*$/i)||e.match(/\/(relation|way|node)\/(\d+)\s*$/);var i=new URLSearchParams;if(n)i.set("osmtype",n[1].charAt(0).toUpperCase()),i.set("osmid",n[2]);else{if(!e.match(/^\d+$/))return void alert("invalid input");i.set("place_id",e)}yt("details",i)}]}class ga extends lt{constructor(t){super(),at(this,t,_a,fa,r,{api_request_params:0})}}function va(e){let n;return{c(){n=x("span"),n.textContent="No Name",E(n,"class","noname")},m(t,e){y(t,n,e)},p:t,d(t){t&&b(n)}}}function ya(t){let e,n=t[0].localname+"";return{c(){e=$(n)},m(t,n){y(t,e,n)},p(t,i){1&i&&n!==(n=t[0].localname+"")&&A(e,n)},d(t){t&&b(e)}}}function ba(t){let e,n;return e=new Et({props:{page:"search",params_hash:{postalcode:t[0].localname},$$slots:{default:[$a]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.params_hash={postalcode:t[0].localname}),32&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function wa(t){let e,n;return e=new Et({props:{page:"search",params_hash:{country:t[0].localname},$$slots:{default:[La]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.params_hash={country:t[0].localname}),32&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function xa(t){let e,n;return e=new Ie({props:{feature:t[0],$$slots:{default:[Ta]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.feature=t[0]),32&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function $a(t){let e;return{c(){e=$("search by name")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function La(t){let e;return{c(){e=$("search by name")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function Ta(t){let e;return{c(){e=$("details")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function Pa(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,L,P,M,k=Pe(t[0])+"",C=be(t[0])+"",O=t[0].rank_address+"",S=Me(t[0].admin_level)+"",I=ke(t[0].distance,t[1])+"";function D(t,e){return t[0].localname?ya:va}let B=D(t),N=B(t);const Z=[xa,wa,ba],j=[];function R(t,e){return 9&e&&(w=null),t[0].osm_id?0:(null==w&&(w=!(t[3]||!t[0].type.match(/^country/))),w?1:t[3]||"postcode"!==t[0].type?-1:2)}return~(L=R(t,-1))&&(P=j[L]=Z[L](t)),{c(){e=x("tr"),n=x("td"),N.c(),i=T(),o=x("td"),s=$(k),r=T(),a=x("td"),l=T(),c=x("td"),h=$(O),u=T(),d=x("td"),p=$(S),m=T(),f=x("td"),_=T(),g=x("td"),P&&P.c(),E(n,"class","name fw-bold svelte-6a43i0"),E(o,"class","svelte-6a43i0"),E(a,"class","svelte-6a43i0"),E(c,"class","svelte-6a43i0"),E(d,"class","svelte-6a43i0"),E(f,"class","svelte-6a43i0"),E(g,"class","svelte-6a43i0"),E(e,"class","svelte-6a43i0"),z(e,"notused",t[2]&&!t[4])},m(t,b){y(t,e,b),v(e,n),N.m(n,null),v(e,i),v(e,o),v(o,s),v(e,r),v(e,a),a.innerHTML=C,v(e,l),v(e,c),v(c,h),v(e,u),v(e,d),v(d,p),v(e,m),v(e,f),f.innerHTML=I,v(e,_),v(e,g),~L&&j[L].m(g,null),M=!0},p(t,[i]){B===(B=D(t))&&N?N.p(t,i):(N.d(1),N=B(t),N&&(N.c(),N.m(n,null))),(!M||1&i)&&k!==(k=Pe(t[0])+"")&&A(s,k),(!M||1&i)&&C!==(C=be(t[0])+"")&&(a.innerHTML=C),(!M||1&i)&&O!==(O=t[0].rank_address+"")&&A(h,O),(!M||1&i)&&S!==(S=Me(t[0].admin_level)+"")&&A(p,S),(!M||3&i)&&I!==(I=ke(t[0].distance,t[1])+"")&&(f.innerHTML=I);let o=L;L=R(t,i),L===o?~L&&j[L].p(t,i):(P&&(J(),et(j[o],1,1,(()=>{j[o]=null})),Q()),~L?(P=j[L],P?P.p(t,i):(P=j[L]=Z[L](t),P.c()),tt(P,1),P.m(g,null)):P=null),(!M||20&i)&&z(e,"notused",t[2]&&!t[4])},i(t){M||(tt(P),M=!0)},o(t){et(P),M=!1},d(t){t&&b(e),N.d(),~L&&j[L].d()}}}function Ma(t,e,n){let i,o,{addressLine:s}=e,{bDistanceInMeters:r}=e,{bMarkUnusedLines:a=!1}=e;return t.$$set=t=>{"addressLine"in t&&n(0,s=t.addressLine),"bDistanceInMeters"in t&&n(1,r=t.bDistanceInMeters),"bMarkUnusedLines"in t&&n(2,a=t.bMarkUnusedLines)},t.$$.update=()=>{1&t.$$.dirty&&n(4,i=s.isaddress)},n(3,o=Nominatim_Config.Reverse_Only),[s,r,a,o,i]}class ka extends lt{constructor(t){super(),at(this,t,Ma,Pa,r,{addressLine:0,bDistanceInMeters:1,bMarkUnusedLines:2})}}function Ca(e){let n,i,s,r,a,l,c,h,u,d,p,m,f;return{c(){n=$("("),i=x("a"),i.textContent="how?",s=$(")\n\n"),r=x("div"),a=x("button"),a.innerHTML='<span aria-hidden="true">×</span>',l=$("\n\n Nightly calculated from nearby places having this postcode.\n "),c=x("a"),c.textContent="Documentation",h=$(".\n You can search for those with an "),u=x("a"),d=$("Overpass Turbo query"),p=$("."),E(i,"href","#openHint"),E(a,"type","button"),E(a,"class","close svelte-yw4tm0"),E(a,"aria-label","Close"),E(c,"href","https://nominatim.org/release-docs/latest/develop/Postcodes/"),E(u,"href",e[0]),E(u,"target","_blank"),E(r,"id","postcode-hint"),E(r,"class","my-2 p-2 svelte-yw4tm0")},m(t,e){y(t,n,e),y(t,i,e),y(t,s,e),y(t,r,e),v(r,a),v(r,l),v(r,c),v(r,h),v(r,u),v(u,d),v(r,p),m||(f=[M(i,"click",C(k(Ea))),M(a,"click",C(Aa))],m=!0)},p:t,i:t,o:t,d(t){t&&b(n),t&&b(i),t&&b(s),t&&b(r),m=!1,o(f)}}}function Ea(){document.getElementById("postcode-hint").style.display="block"}function Aa(){document.getElementById("postcode-hint").style.display="none"}function Oa(t,e,n){let{postcode:i}=e,{lat:o}=e,{lon:s}=e,r=`\n // Based on the map bounds, you can zoom out and rerun the query\n\n [timeout:30]; // in seconds\n\n // we define a shortcut\n // https://wiki.openstreetmap.org/wiki/Overpass_turbo/Extended_Overpass_Turbo_Queries\n {{postcode=${i}}}\n\n (\n node["addr:postcode"="{{postcode}}"]({{bbox}});\n way["addr:postcode"="{{postcode}}"]({{bbox}});\n relation["addr:postcode"="{{postcode}}"]({{bbox}});\n\n node["postal_code"="{{postcode}}"]({{bbox}});\n way["postal_code"="{{postcode}}"]({{bbox}});\n relation["postal_code"="{{postcode}}"]({{bbox}});\n );\n\n out body;\n >;\n out skel qt;\n `.replace(/^ {4}/gm,""),a="https://overpass-turbo.eu/?Q="+encodeURIComponent(r)+"&C="+encodeURIComponent([o,s,15].join(";"))+"&R";return t.$$set=t=>{"postcode"in t&&n(1,i=t.postcode),"lat"in t&&n(2,o=t.lat),"lon"in t&&n(3,s=t.lon)},[a,i,o,s]}class Sa extends lt{constructor(t){super(),at(this,t,Oa,Ca,r,{postcode:1,lat:2,lon:3})}}function za(t){let e,n,i,o,s,r;const a=t[2].default,l=p(a,t,t[1],null);return{c(){e=x("tr"),n=x("td"),i=$(t[0]),o=T(),s=x("td"),l&&l.c(),E(n,"class","svelte-1184nr4"),E(s,"class","svelte-1184nr4")},m(t,a){y(t,e,a),v(e,n),v(n,i),v(e,o),v(e,s),l&&l.m(s,null),r=!0},p(t,[e]){(!r||1&e)&&A(i,t[0]),l&&l.p&&(!r||2&e)&&_(l,a,t,t[1],r?f(a,t[1],e,null):g(t[1]),null)},i(t){r||(tt(l,t),r=!0)},o(t){et(l,t),r=!1},d(t){t&&b(e),l&&l.d(t)}}}function Ia(t,e,n){let{$$slots:i={},$$scope:o}=e,{title:s}=e;return t.$$set=t=>{"title"in t&&n(0,s=t.title),"$$scope"in t&&n(1,o=t.$$scope)},[s,o,i]}class Da extends lt{constructor(t){super(),at(this,t,Ia,za,r,{title:0})}}function Ba(t,e,n){const i=t.slice();return i[1]=e[n],i}function Na(t){let e,n,i,o,s,r,a=t[0][t[1]]+"",l=t[1]+"";return{c(){e=x("div"),n=x("span"),i=$(a),o=$(" ("),s=$(l),r=$(")\n "),E(n,"class","name svelte-ndknvb"),E(e,"class","line")},m(t,a){y(t,e,a),v(e,n),v(n,i),v(e,o),v(e,s),v(e,r)},p(t,e){1&e&&a!==(a=t[0][t[1]]+"")&&A(i,a),1&e&&l!==(l=t[1]+"")&&A(s,l)},d(t){t&&b(e)}}}function Za(e){let n,i=Object.keys(e[0]),o=[];for(let t=0;t<i.length;t+=1)o[t]=Na(Ba(e,i,t));return{c(){for(let t=0;t<o.length;t+=1)o[t].c();n=P()},m(t,e){for(let n=0;n<o.length;n+=1)o[n].m(t,e);y(t,n,e)},p(t,[e]){if(1&e){let s;for(i=Object.keys(t[0]),s=0;s<i.length;s+=1){const r=Ba(t,i,s);o[s]?o[s].p(r,e):(o[s]=Na(r),o[s].c(),o[s].m(n.parentNode,n))}for(;s<o.length;s+=1)o[s].d(1);o.length=i.length}},i:t,o:t,d(t){w(o,t),t&&b(n)}}}function ja(t,e,n){let{items:i}=e;return t.$$set=t=>{"items"in t&&n(0,i=t.items)},[i]}class Ra extends lt{constructor(t){super(),at(this,t,ja,Za,r,{items:0})}}function Ha(t,e,n){const i=t.slice();return i[7]=e[n],i}function Fa(t,e,n){const i=t.slice();return i[10]=e[n],i}function Wa(t,e,n){const i=t.slice();return i[13]=e[n],i}function qa(t,e,n){const i=t.slice();return i[13]=e[n],i}function Ua(t,e,n){const i=t.slice();return i[18]=e[n],i}function Va(t,e,n){const i=t.slice();return i[18]=e[n],i}function Ga(t){let e,n;return e=new ga({props:{api_request_params:t[2]}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};4&n&&(i.api_request_params=t[2]),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Ka(e){let n;return{c(){n=$("No such place found.")},m(t,e){y(t,n,e)},p:t,i:t,o:t,d(t){t&&b(n)}}}function Ya(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,L,P,M,k,C,O,S,z,I,D,B,N,Z,j,R,H,F,W,q,U,V,G,K,Y,X,nt,rt,at,lt,ct,ht,ut,dt,pt,mt,ft,_t,gt,vt,yt,bt,wt,xt,$t,Lt=(t[0].localname||`${ye(t[0].osm_type)} ${t[0].osm_id}`)+"",Tt=Le(t[0]);a=new Ie({props:{feature:t[0],$$slots:{default:[Xa]},$$scope:{ctx:t}}}),h=new He({props:{aPlace:t[0]}}),_=new Da({props:{title:"Name",$$slots:{default:[tl]},$$scope:{ctx:t}}}),w=new Da({props:{title:"Type",$$slots:{default:[el]},$$scope:{ctx:t}}}),P=new Da({props:{title:"Last Updated",$$slots:{default:[nl]},$$scope:{ctx:t}}});let Pt=Tt&&il(t);C=new Da({props:{title:"Search Rank",$$slots:{default:[sl]},$$scope:{ctx:t}}}),S=new Da({props:{title:"Address Rank",$$slots:{default:[rl]},$$scope:{ctx:t}}});let Mt=t[0].calculated_importance&&al(t);D=new Da({props:{title:"Coverage",$$slots:{default:[hl]},$$scope:{ctx:t}}}),N=new Da({props:{title:"Centre Point (lat,lon)",$$slots:{default:[ul]},$$scope:{ctx:t}}}),j=new Da({props:{title:"OSM",$$slots:{default:[dl]},$$scope:{ctx:t}}}),H=new Da({props:{title:"Place Id",$$slots:{default:[pl]},$$scope:{ctx:t}}});let kt=t[0].calculated_wikipedia&&ml(t);q=new Da({props:{title:"Computed Postcode",$$slots:{default:[gl]},$$scope:{ctx:t}}}),V=new Da({props:{title:"Address Tags",$$slots:{default:[vl]},$$scope:{ctx:t}}}),K=new Da({props:{title:"Extra Tags",$$slots:{default:[yl]},$$scope:{ctx:t}}}),rt=new Qr({props:{current_result:t[0]}});let Ct=t[0].address&&bl(t),Et=t[0].linked_places&&xl(t),At=!t[4]&&Ll(t);const Ot=[Il,zl],St=[];function zt(t,e){return t[2].hierarchy?0:1}return wt=zt(t),xt=St[wt]=Ot[wt](t),{c(){e=x("div"),n=x("div"),i=x("h1"),o=$(Lt),s=T(),r=x("small"),it(a.$$.fragment),l=T(),c=x("div"),it(h.$$.fragment),u=T(),d=x("div"),p=x("div"),m=x("table"),f=x("tbody"),it(_.$$.fragment),g=T(),it(w.$$.fragment),L=T(),it(P.$$.fragment),M=T(),Pt&&Pt.c(),k=T(),it(C.$$.fragment),O=T(),it(S.$$.fragment),z=T(),Mt&&Mt.c(),I=T(),it(D.$$.fragment),B=T(),it(N.$$.fragment),Z=T(),it(j.$$.fragment),R=T(),it(H.$$.fragment),F=T(),kt&&kt.c(),W=T(),it(q.$$.fragment),U=T(),it(V.$$.fragment),G=T(),it(K.$$.fragment),Y=T(),X=x("div"),nt=x("div"),it(rt.$$.fragment),at=T(),lt=x("div"),ct=x("div"),ht=x("h2"),ht.textContent="Address",ut=T(),dt=x("table"),pt=x("thead"),pt.innerHTML="<tr><th>Local name</th> \n <th>Type</th> \n <th>OSM</th> \n <th>Address rank</th> \n <th>Admin level</th> \n <th>Distance</th> \n <th></th></tr>",mt=T(),ft=x("tbody"),Ct&&Ct.c(),_t=T(),Et&&Et.c(),gt=T(),At&&At.c(),vt=T(),yt=x("tr"),yt.innerHTML='<td colspan="7" class="svelte-193h58e"><h2 class="svelte-193h58e">Parent Of</h2></td>',bt=T(),xt.c(),E(r,"class","svelte-193h58e"),E(i,"class","svelte-193h58e"),E(n,"class","col-sm-10"),E(c,"class","col-sm-2 text-end"),E(e,"class","row"),E(m,"id","locationdetails"),E(m,"class","table table-striped table-responsive"),E(p,"class","col-md-6"),E(nt,"id","map-wrapper"),E(nt,"class","svelte-193h58e"),E(X,"class","col-md-6"),E(d,"class","row"),E(ht,"class","svelte-193h58e"),E(yt,"class","all-columns svelte-193h58e"),E(dt,"id","address"),E(dt,"class","table table-striped table-small"),E(ct,"class","col-md-12"),E(lt,"class","row")},m(t,b){y(t,e,b),v(e,n),v(n,i),v(i,o),v(i,s),v(i,r),ot(a,r,null),v(e,l),v(e,c),ot(h,c,null),y(t,u,b),y(t,d,b),v(d,p),v(p,m),v(m,f),ot(_,f,null),v(f,g),ot(w,f,null),v(f,L),ot(P,f,null),v(f,M),Pt&&Pt.m(f,null),v(f,k),ot(C,f,null),v(f,O),ot(S,f,null),v(f,z),Mt&&Mt.m(f,null),v(f,I),ot(D,f,null),v(f,B),ot(N,f,null),v(f,Z),ot(j,f,null),v(f,R),ot(H,f,null),v(f,F),kt&&kt.m(f,null),v(f,W),ot(q,f,null),v(f,U),ot(V,f,null),v(f,G),ot(K,f,null),v(d,Y),v(d,X),v(X,nt),ot(rt,nt,null),y(t,at,b),y(t,lt,b),v(lt,ct),v(ct,ht),v(ct,ut),v(ct,dt),v(dt,pt),v(dt,mt),v(dt,ft),Ct&&Ct.m(ft,null),v(ft,_t),Et&&Et.m(ft,null),v(ft,gt),At&&At.m(ft,null),v(ft,vt),v(ft,yt),v(ft,bt),St[wt].m(ft,null),$t=!0},p(t,e){(!$t||1&e)&&Lt!==(Lt=(t[0].localname||`${ye(t[0].osm_type)} ${t[0].osm_id}`)+"")&&A(o,Lt);const n={};1&e&&(n.feature=t[0]),8388608&e&&(n.$$scope={dirty:e,ctx:t}),a.$set(n);const i={};1&e&&(i.aPlace=t[0]),h.$set(i);const s={};8388609&e&&(s.$$scope={dirty:e,ctx:t}),_.$set(s);const r={};8388609&e&&(r.$$scope={dirty:e,ctx:t}),w.$set(r);const l={};8388609&e&&(l.$$scope={dirty:e,ctx:t}),P.$set(l),1&e&&(Tt=Le(t[0])),Tt?Pt?(Pt.p(t,e),1&e&&tt(Pt,1)):(Pt=il(t),Pt.c(),tt(Pt,1),Pt.m(f,k)):Pt&&(J(),et(Pt,1,1,(()=>{Pt=null})),Q());const c={};8388609&e&&(c.$$scope={dirty:e,ctx:t}),C.$set(c);const u={};8388609&e&&(u.$$scope={dirty:e,ctx:t}),S.$set(u),t[0].calculated_importance?Mt?(Mt.p(t,e),1&e&&tt(Mt,1)):(Mt=al(t),Mt.c(),tt(Mt,1),Mt.m(f,I)):Mt&&(J(),et(Mt,1,1,(()=>{Mt=null})),Q());const d={};8388609&e&&(d.$$scope={dirty:e,ctx:t}),D.$set(d);const p={};8388609&e&&(p.$$scope={dirty:e,ctx:t}),N.$set(p);const m={};8388609&e&&(m.$$scope={dirty:e,ctx:t}),j.$set(m);const g={};8388609&e&&(g.$$scope={dirty:e,ctx:t}),H.$set(g),t[0].calculated_wikipedia?kt?(kt.p(t,e),1&e&&tt(kt,1)):(kt=ml(t),kt.c(),tt(kt,1),kt.m(f,W)):kt&&(J(),et(kt,1,1,(()=>{kt=null})),Q());const v={};8388609&e&&(v.$$scope={dirty:e,ctx:t}),q.$set(v);const y={};8388609&e&&(y.$$scope={dirty:e,ctx:t}),V.$set(y);const b={};8388609&e&&(b.$$scope={dirty:e,ctx:t}),K.$set(b);const x={};1&e&&(x.current_result=t[0]),rt.$set(x),t[0].address?Ct?(Ct.p(t,e),1&e&&tt(Ct,1)):(Ct=bl(t),Ct.c(),tt(Ct,1),Ct.m(ft,_t)):Ct&&(J(),et(Ct,1,1,(()=>{Ct=null})),Q()),t[0].linked_places?Et?(Et.p(t,e),1&e&&tt(Et,1)):(Et=xl(t),Et.c(),tt(Et,1),Et.m(ft,gt)):Et&&(J(),et(Et,1,1,(()=>{Et=null})),Q()),t[4]?At&&(At.d(1),At=null):At?At.p(t,e):(At=Ll(t),At.c(),At.m(ft,vt));let $=wt;wt=zt(t),wt===$?St[wt].p(t,e):(J(),et(St[$],1,1,(()=>{St[$]=null})),Q(),xt=St[wt],xt?xt.p(t,e):(xt=St[wt]=Ot[wt](t),xt.c()),tt(xt,1),xt.m(ft,null))},i(t){$t||(tt(a.$$.fragment,t),tt(h.$$.fragment,t),tt(_.$$.fragment,t),tt(w.$$.fragment,t),tt(P.$$.fragment,t),tt(Pt),tt(C.$$.fragment,t),tt(S.$$.fragment,t),tt(Mt),tt(D.$$.fragment,t),tt(N.$$.fragment,t),tt(j.$$.fragment,t),tt(H.$$.fragment,t),tt(kt),tt(q.$$.fragment,t),tt(V.$$.fragment,t),tt(K.$$.fragment,t),tt(rt.$$.fragment,t),tt(Ct),tt(Et),tt(xt),$t=!0)},o(t){et(a.$$.fragment,t),et(h.$$.fragment,t),et(_.$$.fragment,t),et(w.$$.fragment,t),et(P.$$.fragment,t),et(Pt),et(C.$$.fragment,t),et(S.$$.fragment,t),et(Mt),et(D.$$.fragment,t),et(N.$$.fragment,t),et(j.$$.fragment,t),et(H.$$.fragment,t),et(kt),et(q.$$.fragment,t),et(V.$$.fragment,t),et(K.$$.fragment,t),et(rt.$$.fragment,t),et(Ct),et(Et),et(xt),$t=!1},d(t){t&&b(e),st(a),st(h),t&&b(u),t&&b(d),st(_),st(w),st(P),Pt&&Pt.d(),st(C),st(S),Mt&&Mt.d(),st(D),st(N),st(j),st(H),kt&&kt.d(),st(q),st(V),st(K),st(rt),t&&b(at),t&&b(lt),Ct&&Ct.d(),Et&&Et.d(),At&&At.d(),St[wt].d()}}}function Xa(t){let e;return{c(){e=$("link to this page")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function Ja(t){let e,n;return e=new Ra({props:{items:t[0].names}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.items=t[0].names),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Qa(e){let n;return{c(){n=x("span"),n.textContent="No Name",E(n,"class","noname fw-bold")},m(t,e){y(t,n,e)},p:t,i:t,o:t,d(t){t&&b(n)}}}function tl(t){let e,n,i,o,s;const r=[Qa,Ja],a=[];function l(t,n){return 1&n&&(e=null),null==e&&(e=!!Array.isArray(t[0].names)),e?0:1}return n=l(t,-1),i=a[n]=r[n](t),{c(){i.c(),o=P()},m(t,e){a[n].m(t,e),y(t,o,e),s=!0},p(t,e){let s=n;n=l(t,e),n===s?a[n].p(t,e):(J(),et(a[s],1,1,(()=>{a[s]=null})),Q(),i=a[n],i?i.p(t,e):(i=a[n]=r[n](t),i.c()),tt(i,1),i.m(o.parentNode,o))},i(t){s||(tt(i),s=!0)},o(t){et(i),s=!1},d(t){a[n].d(t),t&&b(o)}}}function el(t){let e,n,i,o=t[0].category+"",s=t[0].type+"";return{c(){e=$(o),n=$(":"),i=$(s)},m(t,o){y(t,e,o),y(t,n,o),y(t,i,o)},p(t,n){1&n&&o!==(o=t[0].category+"")&&A(e,o),1&n&&s!==(s=t[0].type+"")&&A(i,s)},d(t){t&&b(e),t&&b(n),t&&b(i)}}}function nl(t){let e,n=t[0].indexed_date+"";return{c(){e=$(n)},m(t,n){y(t,e,n)},p(t,i){1&i&&n!==(n=t[0].indexed_date+"")&&A(e,n)},d(t){t&&b(e)}}}function il(t){let e,n;return e=new Da({props:{title:"Admin Level",$$slots:{default:[ol]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};8388609&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function ol(t){let e,n=t[0].admin_level+"";return{c(){e=$(n)},m(t,n){y(t,e,n)},p(t,i){1&i&&n!==(n=t[0].admin_level+"")&&A(e,n)},d(t){t&&b(e)}}}function sl(t){let e,n=t[0].rank_search+"";return{c(){e=$(n)},m(t,n){y(t,e,n)},p(t,i){1&i&&n!==(n=t[0].rank_search+"")&&A(e,n)},d(t){t&&b(e)}}}function rl(t){let e,n,i,o,s=t[0].rank_address+"",r=Te(t[0].rank_address)+"";return{c(){e=$(s),n=$(" ("),i=$(r),o=$(")")},m(t,s){y(t,e,s),y(t,n,s),y(t,i,s),y(t,o,s)},p(t,n){1&n&&s!==(s=t[0].rank_address+"")&&A(e,s),1&n&&r!==(r=Te(t[0].rank_address)+"")&&A(i,r)},d(t){t&&b(e),t&&b(n),t&&b(i),t&&b(o)}}}function al(t){let e,n;return e=new Da({props:{title:"Importance",$$slots:{default:[cl]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};8388609&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function ll(t){let e;return{c(){e=$("(estimated)")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function cl(t){let e,n,i,o=t[0].calculated_importance+"",s=!t[0].importance&&ll();return{c(){e=$(o),n=T(),s&&s.c(),i=P()},m(t,o){y(t,e,o),y(t,n,o),s&&s.m(t,o),y(t,i,o)},p(t,n){1&n&&o!==(o=t[0].calculated_importance+"")&&A(e,o),t[0].importance?s&&(s.d(1),s=null):s||(s=ll(),s.c(),s.m(i.parentNode,i))},d(t){t&&b(e),t&&b(n),s&&s.d(t),t&&b(i)}}}function hl(t){let e,n=$e(t[0])+"";return{c(){e=$(n)},m(t,n){y(t,e,n)},p(t,i){1&i&&n!==(n=$e(t[0])+"")&&A(e,n)},d(t){t&&b(e)}}}function ul(t){let e,n,i,o=t[0].centroid.coordinates[1]+"",s=t[0].centroid.coordinates[0]+"";return{c(){e=$(o),n=$(","),i=$(s)},m(t,o){y(t,e,o),y(t,n,o),y(t,i,o)},p(t,n){1&n&&o!==(o=t[0].centroid.coordinates[1]+"")&&A(e,o),1&n&&s!==(s=t[0].centroid.coordinates[0]+"")&&A(i,s)},d(t){t&&b(e),t&&b(n),t&&b(i)}}}function dl(t){let e,n,i=be(t[0])+"";return{c(){e=new I(!1),n=P(),e.a=n},m(t,o){e.m(i,t,o),y(t,n,o)},p(t,n){1&n&&i!==(i=be(t[0])+"")&&e.p(i)},d(t){t&&b(n),t&&e.d()}}}function pl(t){let e,n,i,o,s=t[0].place_id+"";return{c(){e=$(s),n=$("\n ("),i=x("a"),i.textContent="on this server",o=$(")"),E(i,"href","https://nominatim.org/release-docs/develop/api/Output/#place_id-is-not-a-persistent-id")},m(t,s){y(t,e,s),y(t,n,s),y(t,i,s),y(t,o,s)},p(t,n){1&n&&s!==(s=t[0].place_id+"")&&A(e,s)},d(t){t&&b(e),t&&b(n),t&&b(i),t&&b(o)}}}function ml(t){let e,n;return e=new Da({props:{title:"Wikipedia Calculated",$$slots:{default:[fl]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};8388609&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function fl(t){let e,n,i=xe(t[0])+"";return{c(){e=new I(!1),n=P(),e.a=n},m(t,o){e.m(i,t,o),y(t,n,o)},p(t,n){1&n&&i!==(i=xe(t[0])+"")&&e.p(i)},d(t){t&&b(n),t&&e.d()}}}function _l(t){let e,n,i,o,s=t[0].calculated_postcode+"";return i=new Sa({props:{postcode:t[0].calculated_postcode,lat:t[0].centroid.coordinates[1],lon:t[0].centroid.coordinates[0]}}),{c(){e=$(s),n=T(),it(i.$$.fragment)},m(t,s){y(t,e,s),y(t,n,s),ot(i,t,s),o=!0},p(t,n){(!o||1&n)&&s!==(s=t[0].calculated_postcode+"")&&A(e,s);const r={};1&n&&(r.postcode=t[0].calculated_postcode),1&n&&(r.lat=t[0].centroid.coordinates[1]),1&n&&(r.lon=t[0].centroid.coordinates[0]),i.$set(r)},i(t){o||(tt(i.$$.fragment,t),o=!0)},o(t){et(i.$$.fragment,t),o=!1},d(t){t&&b(e),t&&b(n),st(i,t)}}}function gl(t){let e,n,i=t[0].calculated_postcode&&_l(t);return{c(){i&&i.c(),e=P()},m(t,o){i&&i.m(t,o),y(t,e,o),n=!0},p(t,n){t[0].calculated_postcode?i?(i.p(t,n),1&n&&tt(i,1)):(i=_l(t),i.c(),tt(i,1),i.m(e.parentNode,e)):i&&(J(),et(i,1,1,(()=>{i=null})),Q())},i(t){n||(tt(i),n=!0)},o(t){et(i),n=!1},d(t){i&&i.d(t),t&&b(e)}}}function vl(t){let e,n;return e=new Ra({props:{items:t[0].addresstags}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.items=t[0].addresstags),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function yl(t){let e,n;return e=new Ra({props:{items:t[0].extratags}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.items=t[0].extratags),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function bl(t){let e,n,i=t[0].address,o=[];for(let e=0;e<i.length;e+=1)o[e]=wl(Va(t,i,e));const s=t=>et(o[t],1,1,(()=>{o[t]=null}));return{c(){for(let t=0;t<o.length;t+=1)o[t].c();e=P()},m(t,i){for(let e=0;e<o.length;e+=1)o[e].m(t,i);y(t,e,i),n=!0},p(t,n){if(1&n){let r;for(i=t[0].address,r=0;r<i.length;r+=1){const s=Va(t,i,r);o[r]?(o[r].p(s,n),tt(o[r],1)):(o[r]=wl(s),o[r].c(),tt(o[r],1),o[r].m(e.parentNode,e))}for(J(),r=i.length;r<o.length;r+=1)s(r);Q()}},i(t){if(!n){for(let t=0;t<i.length;t+=1)tt(o[t]);n=!0}},o(t){o=o.filter(Boolean);for(let t=0;t<o.length;t+=1)et(o[t]);n=!1},d(t){w(o,t),t&&b(e)}}}function wl(t){let e,n;return e=new ka({props:{addressLine:t[18],bMarkUnusedLines:!0,bDistanceInMeters:!1}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.addressLine=t[18]),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function xl(t){let e,n,i,o,s=t[0].linked_places,r=[];for(let e=0;e<s.length;e+=1)r[e]=$l(Ua(t,s,e));const a=t=>et(r[t],1,1,(()=>{r[t]=null}));return{c(){e=x("tr"),e.innerHTML='<td colspan="7" class="svelte-193h58e"><h2 class="svelte-193h58e">Linked Places</h2></td>',n=T();for(let t=0;t<r.length;t+=1)r[t].c();i=P(),E(e,"class","all-columns svelte-193h58e")},m(t,s){y(t,e,s),y(t,n,s);for(let e=0;e<r.length;e+=1)r[e].m(t,s);y(t,i,s),o=!0},p(t,e){if(1&e){let n;for(s=t[0].linked_places,n=0;n<s.length;n+=1){const o=Ua(t,s,n);r[n]?(r[n].p(o,e),tt(r[n],1)):(r[n]=$l(o),r[n].c(),tt(r[n],1),r[n].m(i.parentNode,i))}for(J(),n=s.length;n<r.length;n+=1)a(n);Q()}},i(t){if(!o){for(let t=0;t<s.length;t+=1)tt(r[t]);o=!0}},o(t){r=r.filter(Boolean);for(let t=0;t<r.length;t+=1)et(r[t]);o=!1},d(t){t&&b(e),t&&b(n),w(r,t),t&&b(i)}}}function $l(t){let e,n;return e=new ka({props:{addressLine:t[18],bMarkUnusedLines:!0,bDistanceInMeters:!0}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.addressLine=t[18]),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Ll(t){let e,n,i;function o(t,e){return t[2].keywords?Pl:Tl}let s=o(t),r=s(t);return{c(){e=x("tr"),e.innerHTML='<td colspan="7" class="svelte-193h58e"><h2 class="svelte-193h58e">Keywords</h2></td>',n=T(),r.c(),i=P(),E(e,"class","all-columns svelte-193h58e")},m(t,o){y(t,e,o),y(t,n,o),r.m(t,o),y(t,i,o)},p(t,e){s===(s=o(t))&&r?r.p(t,e):(r.d(1),r=s(t),r&&(r.c(),r.m(i.parentNode,i)))},d(t){t&&b(e),t&&b(n),r.d(t),t&&b(i)}}}function Tl(t){let e,n,i,o,s;return{c(){e=x("tr"),n=x("td"),i=x("a"),o=$("display keywords"),E(i,"class","btn btn-outline-secondary btn-sm"),E(i,"href",s=t[1]+"&keywords=1")},m(t,s){y(t,e,s),v(e,n),v(n,i),v(i,o)},p(t,e){2&e&&s!==(s=t[1]+"&keywords=1")&&E(i,"href",s)},d(t){t&&b(e)}}}function Pl(t){let e,n;function i(t,n){var i;return 1&n&&(e=null),null==e&&(i=t[0],e=!!(i.keywords&&i.keywords.name&&i.keywords.address&&(i.keywords.name.length>0||i.keywords.address.length>0))),e?kl:Ml}let o=i(t,-1),s=o(t);return{c(){s.c(),n=P()},m(t,e){s.m(t,e),y(t,n,e)},p(t,e){o===(o=i(t,e))&&s?s.p(t,e):(s.d(1),s=o(t),s&&(s.c(),s.m(n.parentNode,n)))},d(t){s.d(t),t&&b(n)}}}function Ml(e){let n;return{c(){n=x("tr"),n.innerHTML="<td>Place has no keywords</td>"},m(t,e){y(t,n,e)},p:t,d(t){t&&b(n)}}}function kl(t){let e,n,i,o,s=t[0].keywords.name,r=[];for(let e=0;e<s.length;e+=1)r[e]=El(qa(t,s,e));let a=t[0].keywords.address&&Al(t);return{c(){e=x("tr"),e.innerHTML='<td colspan="7" class="svelte-193h58e"><h3 class="svelte-193h58e">Name Keywords</h3></td>',n=T();for(let t=0;t<r.length;t+=1)r[t].c();i=T(),a&&a.c(),o=P(),E(e,"class","all-columns svelte-193h58e")},m(t,s){y(t,e,s),y(t,n,s);for(let e=0;e<r.length;e+=1)r[e].m(t,s);y(t,i,s),a&&a.m(t,s),y(t,o,s)},p(t,e){if(1&e){let n;for(s=t[0].keywords.name,n=0;n<s.length;n+=1){const o=qa(t,s,n);r[n]?r[n].p(o,e):(r[n]=El(o),r[n].c(),r[n].m(i.parentNode,i))}for(;n<r.length;n+=1)r[n].d(1);r.length=s.length}t[0].keywords.address?a?a.p(t,e):(a=Al(t),a.c(),a.m(o.parentNode,o)):a&&(a.d(1),a=null)},d(t){t&&b(e),t&&b(n),w(r,t),t&&b(i),a&&a.d(t),t&&b(o)}}}function Cl(t){let e,n,i,o=t[13].id+"";return{c(){e=x("td"),n=$("word id: "),i=$(o)},m(t,o){y(t,e,o),v(e,n),v(e,i)},p(t,e){1&e&&o!==(o=t[13].id+"")&&A(i,o)},d(t){t&&b(e)}}}function El(t){let e,n,i,o,s=Ce(t[13].token)+"",r=t[13].id&&Cl(t);return{c(){e=x("tr"),n=x("td"),i=$(s),o=T(),r&&r.c()},m(t,s){y(t,e,s),v(e,n),v(n,i),v(e,o),r&&r.m(e,null)},p(t,n){1&n&&s!==(s=Ce(t[13].token)+"")&&A(i,s),t[13].id?r?r.p(t,n):(r=Cl(t),r.c(),r.m(e,null)):r&&(r.d(1),r=null)},d(t){t&&b(e),r&&r.d()}}}function Al(t){let e,n,i,o=t[0].keywords.address,s=[];for(let e=0;e<o.length;e+=1)s[e]=Sl(Wa(t,o,e));return{c(){e=x("tr"),e.innerHTML='<td colspan="7" class="svelte-193h58e"><h3 class="svelte-193h58e">Address Keywords</h3></td>',n=T();for(let t=0;t<s.length;t+=1)s[t].c();i=P(),E(e,"class","all-columns svelte-193h58e")},m(t,o){y(t,e,o),y(t,n,o);for(let e=0;e<s.length;e+=1)s[e].m(t,o);y(t,i,o)},p(t,e){if(1&e){let n;for(o=t[0].keywords.address,n=0;n<o.length;n+=1){const r=Wa(t,o,n);s[n]?s[n].p(r,e):(s[n]=Sl(r),s[n].c(),s[n].m(i.parentNode,i))}for(;n<s.length;n+=1)s[n].d(1);s.length=o.length}},d(t){t&&b(e),t&&b(n),w(s,t),t&&b(i)}}}function Ol(t){let e,n,i,o=t[13].id+"";return{c(){e=x("td"),n=$("word id: "),i=$(o)},m(t,o){y(t,e,o),v(e,n),v(e,i)},p(t,e){1&e&&o!==(o=t[13].id+"")&&A(i,o)},d(t){t&&b(e)}}}function Sl(t){let e,n,i,o,s,r=Ce(t[13].token)+"",a=t[13].id&&Ol(t);return{c(){e=x("tr"),n=x("td"),i=$(r),o=T(),a&&a.c(),s=T()},m(t,r){y(t,e,r),v(e,n),v(n,i),v(e,o),a&&a.m(e,null),v(e,s)},p(t,n){1&n&&r!==(r=Ce(t[13].token)+"")&&A(i,r),t[13].id?a?a.p(t,n):(a=Ol(t),a.c(),a.m(e,s)):a&&(a.d(1),a=null)},d(t){t&&b(e),a&&a.d()}}}function zl(e){let n,i,o,s,r;return{c(){n=x("tr"),i=x("td"),o=x("a"),s=$("display child places"),E(o,"class","btn btn-outline-secondary btn-sm"),E(o,"href",r=e[1]+"&hierarchy=1")},m(t,e){y(t,n,e),v(n,i),v(i,o),v(o,s)},p(t,e){2&e&&r!==(r=t[1]+"&hierarchy=1")&&E(o,"href",r)},i:t,o:t,d(t){t&&b(n)}}}function Il(t){let e,n,i,o,s;const r=[Bl,Dl],a=[];function l(t,n){return 1&n&&(e=null),null==e&&(e=!(!t[0].hierarchy||"object"!=typeof t[0].hierarchy||!Object.keys(t[0].hierarchy).length)),e?0:1}return n=l(t,-1),i=a[n]=r[n](t),{c(){i.c(),o=P()},m(t,e){a[n].m(t,e),y(t,o,e),s=!0},p(t,e){let s=n;n=l(t,e),n===s?a[n].p(t,e):(J(),et(a[s],1,1,(()=>{a[s]=null})),Q(),i=a[n],i?i.p(t,e):(i=a[n]=r[n](t),i.c()),tt(i,1),i.m(o.parentNode,o))},i(t){s||(tt(i),s=!0)},o(t){et(i),s=!1},d(t){a[n].d(t),t&&b(o)}}}function Dl(e){let n;return{c(){n=x("tr"),n.innerHTML="<td>Place is not parent of other places</td>"},m(t,e){y(t,n,e)},p:t,i:t,o:t,d(t){t&&b(n)}}}function Bl(t){let e,n,i,o=Object.keys(t[0].hierarchy)>500,s=Object.keys(t[0].hierarchy),r=[];for(let e=0;e<s.length;e+=1)r[e]=Zl(Ha(t,s,e));const a=t=>et(r[t],1,1,(()=>{r[t]=null}));let l=o&&jl();return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=T(),l&&l.c(),n=P()},m(t,o){for(let e=0;e<r.length;e+=1)r[e].m(t,o);y(t,e,o),l&&l.m(t,o),y(t,n,o),i=!0},p(t,i){if(1&i){let n;for(s=Object.keys(t[0].hierarchy),n=0;n<s.length;n+=1){const o=Ha(t,s,n);r[n]?(r[n].p(o,i),tt(r[n],1)):(r[n]=Zl(o),r[n].c(),tt(r[n],1),r[n].m(e.parentNode,e))}for(J(),n=s.length;n<r.length;n+=1)a(n);Q()}1&i&&(o=Object.keys(t[0].hierarchy)>500),o?l||(l=jl(),l.c(),l.m(n.parentNode,n)):l&&(l.d(1),l=null)},i(t){if(!i){for(let t=0;t<s.length;t+=1)tt(r[t]);i=!0}},o(t){r=r.filter(Boolean);for(let t=0;t<r.length;t+=1)et(r[t]);i=!1},d(t){w(r,t),t&&b(e),l&&l.d(t),t&&b(n)}}}function Nl(t){let e,n;return e=new ka({props:{addressLine:t[10],bDistanceInMeters:!0}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.addressLine=t[10]),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Zl(t){let e,n,i,o,s,r,a,l=t[7]+"",c=t[0].hierarchy[t[7]],h=[];for(let e=0;e<c.length;e+=1)h[e]=Nl(Fa(t,c,e));const u=t=>et(h[t],1,1,(()=>{h[t]=null}));return{c(){e=x("tr"),n=x("td"),i=x("h3"),o=$(l),s=T();for(let t=0;t<h.length;t+=1)h[t].c();r=P(),E(i,"class","svelte-193h58e"),E(n,"colspan","7"),E(n,"class","svelte-193h58e"),E(e,"class","all-columns svelte-193h58e")},m(t,l){y(t,e,l),v(e,n),v(n,i),v(i,o),y(t,s,l);for(let e=0;e<h.length;e+=1)h[e].m(t,l);y(t,r,l),a=!0},p(t,e){if((!a||1&e)&&l!==(l=t[7]+"")&&A(o,l),1&e){let n;for(c=t[0].hierarchy[t[7]],n=0;n<c.length;n+=1){const i=Fa(t,c,n);h[n]?(h[n].p(i,e),tt(h[n],1)):(h[n]=Nl(i),h[n].c(),tt(h[n],1),h[n].m(r.parentNode,r))}for(J(),n=c.length;n<h.length;n+=1)u(n);Q()}},i(t){if(!a){for(let t=0;t<c.length;t+=1)tt(h[t]);a=!0}},o(t){h=h.filter(Boolean);for(let t=0;t<h.length;t+=1)et(h[t]);a=!1},d(t){t&&b(e),t&&b(s),w(h,t),t&&b(r)}}}function jl(t){let e;return{c(){e=x("p"),e.textContent="There are more child objects which are not shown."},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function Rl(t){let e,n,i,o,s,r;e=new se({props:{$$slots:{default:[Ga]},$$scope:{ctx:t}}});const a=[Ya,Ka],l=[];function c(t,e){return t[0]?0:""!==window.location.search&&t[3]?1:-1}return~(o=c(t))&&(s=l[o]=a[o](t)),{c(){it(e.$$.fragment),n=T(),i=x("div"),s&&s.c(),E(i,"class","container")},m(t,s){ot(e,t,s),y(t,n,s),y(t,i,s),~o&&l[o].m(i,null),r=!0},p(t,[n]){const r={};8388612&n&&(r.$$scope={dirty:n,ctx:t}),e.$set(r);let h=o;o=c(t),o===h?~o&&l[o].p(t,n):(s&&(J(),et(l[h],1,1,(()=>{l[h]=null})),Q()),~o?(s=l[o],s?s.p(t,n):(s=l[o]=a[o](t),s.c()),tt(s,1),s.m(i,null)):s=null)},i(t){r||(tt(e.$$.fragment,t),tt(s),r=!0)},o(t){et(e.$$.fragment,t),et(s),r=!1},d(t){st(e,t),t&&b(n),t&&b(i),~o&&l[o].d()}}}function Hl(t,e,n){let i,o,s,r,a;d(t,_t,(t=>n(5,o=t)));let l=!1;return t.$$.update=()=>{if(32&t.$$.dirty){let t=o;"details"===t.tab&&(e=t.params,n(2,a={place_id:e.get("place_id"),osmtype:e.get("osmtype"),osmid:e.get("osmid"),class:e.get("class"),keywords:e.get("keywords"),addressdetails:1,hierarchy:"1"===e.get("hierarchy")?1:0,group_hierarchy:1,polygon_geojson:1,format:"json"}),n(3,l=!1),a.place_id||a.osmtype&&a.osmid?(a.place_id?Mt("Details for "+a.place_id):Mt("Details for "+a.osmtype+a.osmid),$t("details",a,(function(t){window.scrollTo(0,0),n(3,l=!0),n(0,s=t&&!t.error?t:void 0)}))):n(0,s=void 0),n(1,r=window.location.search))}var e},n(4,i=Nominatim_Config.Reverse_Only),[s,r,a,l,i,o]}class Fl extends lt{constructor(t){super(),at(this,t,Hl,Rl,r,{})}}function Wl(t,e,n){const i=t.slice();return i[2]=e[n],i}function ql(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,L,P,M,k,C,O,S,z,I,D,B,N=t[2].osm_type+"",Z=be(t[2])+"",j=t[2].class+"",R=t[2].type+"",H=t[2].name+"",F=(t[2].country_code||"")+"",W=t[2].errormessage+"",q=t[2].updated+"";return{c(){e=x("tr"),n=x("td"),i=$(N),o=T(),s=x("td"),r=T(),a=x("td"),l=$(j),c=T(),h=x("td"),u=$(R),d=T(),p=x("td"),m=$(H),f=T(),_=x("td"),g=$(F),w=T(),L=x("td"),P=$(W),M=T(),k=x("td"),C=$(q),O=T(),S=x("td"),z=x("a"),I=$("josm"),B=T(),E(z,"href",D="http://localhost:8111/import?url=https://www.openstreetmap.org/api/0.6/"+ye(t[2].osm_type)+"/"+t[2].osm_id+"/full"),E(z,"target","josm")},m(t,b){y(t,e,b),v(e,n),v(n,i),v(e,o),v(e,s),s.innerHTML=Z,v(e,r),v(e,a),v(a,l),v(e,c),v(e,h),v(h,u),v(e,d),v(e,p),v(p,m),v(e,f),v(e,_),v(_,g),v(e,w),v(e,L),v(L,P),v(e,M),v(e,k),v(k,C),v(e,O),v(e,S),v(S,z),v(z,I),v(e,B)},p(t,e){1&e&&N!==(N=t[2].osm_type+"")&&A(i,N),1&e&&Z!==(Z=be(t[2])+"")&&(s.innerHTML=Z),1&e&&j!==(j=t[2].class+"")&&A(l,j),1&e&&R!==(R=t[2].type+"")&&A(u,R),1&e&&H!==(H=t[2].name+"")&&A(m,H),1&e&&F!==(F=(t[2].country_code||"")+"")&&A(g,F),1&e&&W!==(W=t[2].errormessage+"")&&A(P,W),1&e&&q!==(q=t[2].updated+"")&&A(C,q),1&e&&D!==(D="http://localhost:8111/import?url=https://www.openstreetmap.org/api/0.6/"+ye(t[2].osm_type)+"/"+t[2].osm_id+"/full")&&E(z,"href",D)},d(t){t&&b(e)}}}function Ul(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,L=t[0].length+"";e=new se({});let P=t[0],M=[];for(let e=0;e<P.length;e+=1)M[e]=ql(Wl(t,P,e));return{c(){it(e.$$.fragment),n=T(),i=x("div"),o=x("div"),s=x("div"),r=x("h1"),r.textContent="Broken polygons",a=T(),l=x("p"),c=$("Total number of broken polygons: "),h=$(L),u=$("."),d=T(),p=x("table"),m=x("thead"),m.innerHTML="<th>OSM type</th> \n <th>OSM id</th> \n <th>Class</th> \n <th>Type</th> \n <th>Name</th> \n <th>Country Code</th> \n <th>Error message</th> \n <th>Updated</th> \n <th></th>",f=T(),_=x("tbody");for(let t=0;t<M.length;t+=1)M[t].c();E(p,"class","table table-striped table-hover"),E(s,"class","col-sm-12"),E(o,"class","row"),E(i,"class","container")},m(t,b){ot(e,t,b),y(t,n,b),y(t,i,b),v(i,o),v(o,s),v(s,r),v(s,a),v(s,l),v(l,c),v(l,h),v(l,u),v(s,d),v(s,p),v(p,m),v(p,f),v(p,_);for(let t=0;t<M.length;t+=1)M[t].m(_,null);g=!0},p(t,[e]){if((!g||1&e)&&L!==(L=t[0].length+"")&&A(h,L),1&e){let n;for(P=t[0],n=0;n<P.length;n+=1){const i=Wl(t,P,n);M[n]?M[n].p(i,e):(M[n]=ql(i),M[n].c(),M[n].m(_,null))}for(;n<M.length;n+=1)M[n].d(1);M.length=P.length}},i(t){g||(tt(e.$$.fragment,t),g=!0)},o(t){et(e.$$.fragment,t),g=!1},d(t){st(e,t),t&&b(n),t&&b(i),w(M,t)}}}function Vl(t,e,n){let i=[];return B((function(){$t("polygons",{format:"json"},(function(t){n(0,i=t)})),Mt("Broken polygons")})),[i]}class Gl extends lt{constructor(t){super(),at(this,t,Vl,Ul,r,{})}}function Kl(t,e,n){const i=t.slice();return i[2]=e[n],i}function Yl(t){let e,n=t[2].place_id+"";return{c(){e=$(n)},m(t,n){y(t,e,n)},p(t,i){1&i&&n!==(n=t[2].place_id+"")&&A(e,n)},d(t){t&&b(e)}}}function Xl(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,L,P,M,k,C=t[2].country_code+"",E=t[2].name+"",O=be(t[2])+"",S=t[2].osm_type+"",z=t[2].class+"",I=t[2].type+"";return i=new Ie({props:{feature:t[2],$$slots:{default:[Yl]},$$scope:{ctx:t}}}),{c(){e=x("tr"),n=x("td"),it(i.$$.fragment),o=T(),s=x("td"),r=$(C),a=T(),l=x("td"),c=$(E),h=T(),u=x("td"),d=T(),p=x("td"),m=$(S),f=T(),_=x("td"),g=$(z),w=T(),L=x("td"),P=$(I),M=T()},m(t,b){y(t,e,b),v(e,n),ot(i,n,null),v(e,o),v(e,s),v(s,r),v(e,a),v(e,l),v(l,c),v(e,h),v(e,u),u.innerHTML=O,v(e,d),v(e,p),v(p,m),v(e,f),v(e,_),v(_,g),v(e,w),v(e,L),v(L,P),v(e,M),k=!0},p(t,e){const n={};1&e&&(n.feature=t[2]),33&e&&(n.$$scope={dirty:e,ctx:t}),i.$set(n),(!k||1&e)&&C!==(C=t[2].country_code+"")&&A(r,C),(!k||1&e)&&E!==(E=t[2].name+"")&&A(c,E),(!k||1&e)&&O!==(O=be(t[2])+"")&&(u.innerHTML=O),(!k||1&e)&&S!==(S=t[2].osm_type+"")&&A(m,S),(!k||1&e)&&z!==(z=t[2].class+"")&&A(g,z),(!k||1&e)&&I!==(I=t[2].type+"")&&A(P,I)},i(t){k||(tt(i.$$.fragment,t),k=!0)},o(t){et(i.$$.fragment,t),k=!1},d(t){t&&b(e),st(i)}}}function Jl(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g=t[0].length+"";e=new se({});let L=t[0],P=[];for(let e=0;e<L.length;e+=1)P[e]=Xl(Kl(t,L,e));const M=t=>et(P[t],1,1,(()=>{P[t]=null}));return{c(){it(e.$$.fragment),n=T(),i=x("div"),o=x("div"),s=x("div"),r=x("h1"),r.textContent="Deletable",a=T(),l=x("p"),c=$(g),h=$(" objects have been deleted in OSM but are still in the Nominatim database."),u=T(),d=x("table"),p=x("thead"),p.innerHTML="<th>Place id</th> \n <th>Country Code</th> \n <th>Name</th> \n <th>OSM id</th> \n <th>OSM type</th> \n <th>Class</th> \n <th>Type</th>",m=T(),f=x("tbody");for(let t=0;t<P.length;t+=1)P[t].c();E(d,"class","table table-striped table-hover"),E(s,"class","col-sm-12"),E(o,"class","row"),E(i,"class","container")},m(t,g){ot(e,t,g),y(t,n,g),y(t,i,g),v(i,o),v(o,s),v(s,r),v(s,a),v(s,l),v(l,c),v(l,h),v(s,u),v(s,d),v(d,p),v(d,m),v(d,f);for(let t=0;t<P.length;t+=1)P[t].m(f,null);_=!0},p(t,[e]){if((!_||1&e)&&g!==(g=t[0].length+"")&&A(c,g),1&e){let n;for(L=t[0],n=0;n<L.length;n+=1){const i=Kl(t,L,n);P[n]?(P[n].p(i,e),tt(P[n],1)):(P[n]=Xl(i),P[n].c(),tt(P[n],1),P[n].m(f,null))}for(J(),n=L.length;n<P.length;n+=1)M(n);Q()}},i(t){if(!_){tt(e.$$.fragment,t);for(let t=0;t<L.length;t+=1)tt(P[t]);_=!0}},o(t){et(e.$$.fragment,t),P=P.filter(Boolean);for(let t=0;t<P.length;t+=1)et(P[t]);_=!1},d(t){st(e,t),t&&b(n),t&&b(i),w(P,t)}}}function Ql(t,e,n){let i=[];return B((function(){$t("deletable",{format:"json"},(function(t){n(0,i=t)})),Mt("Deletable objects")})),[i]}class tc extends lt{constructor(t){super(),at(this,t,Ql,Jl,r,{})}}function ec(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,L,P,M,k,C=t[1].Nominatim_API_Endpoint+"",O=t[0].software_version+"",S=t[0].database_version+"",z=t[0].data_updated+"";return e=new se({}),{c(){it(e.$$.fragment),n=T(),i=x("div"),o=x("div"),s=x("div"),r=x("h1"),r.textContent="Server status",a=T(),l=x("dl"),c=x("dt"),c.textContent="API Endpoint",h=x("dd"),u=x("a"),d=$(C),p=x("dt"),p.textContent="Software version",m=x("dd"),f=$(O),_=x("dt"),_.textContent="Database version",g=x("dd"),w=$(S),L=x("dt"),L.textContent="Data last updated",P=x("dd"),M=$(z),E(u,"href",t[1].Nominatim_API_Endpoint),E(s,"class","col-sm-12"),E(o,"class","row"),E(i,"class","container")},m(t,b){ot(e,t,b),y(t,n,b),y(t,i,b),v(i,o),v(o,s),v(s,r),v(s,a),v(s,l),v(l,c),v(l,h),v(h,u),v(u,d),v(l,p),v(l,m),v(m,f),v(l,_),v(l,g),v(g,w),v(l,L),v(l,P),v(P,M),k=!0},p(t,[e]){(!k||1&e)&&O!==(O=t[0].software_version+"")&&A(f,O),(!k||1&e)&&S!==(S=t[0].database_version+"")&&A(w,S),(!k||1&e)&&z!==(z=t[0].data_updated+"")&&A(M,z)},i(t){k||(tt(e.$$.fragment,t),k=!0)},o(t){et(e.$$.fragment,t),k=!1},d(t){st(e,t),t&&b(n),t&&b(i)}}}function nc(t,e,n){let i={},o=Nominatim_Config;return B((function(){$t("status",{format:"json"},(function(t){n(0,i=t)})),Mt("Server status")})),[i,o]}class ic extends lt{constructor(t){super(),at(this,t,nc,ec,r,{})}}function oc(e){let n,i,o,s;return n=new se({}),{c(){it(n.$$.fragment),i=T(),o=x("div"),E(o,"id","about-help"),E(o,"class","container svelte-1l5yrvt")},m(t,e){ot(n,t,e),y(t,i,e),y(t,o,e),s=!0},p:t,i(t){s||(tt(n.$$.fragment,t),s=!0)},o(t){et(n.$$.fragment,t),s=!1},d(t){st(n,t),t&&b(i),t&&b(o)}}}function sc(t){return B((()=>{Tt("theme/about-help.html",document.getElementById("about-help"))})),[]}class rc extends lt{constructor(t){super(),at(this,t,sc,oc,r,{})}}function ac(t){let e,n;return e=new rc({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function lc(t){let e,n;return e=new ic({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function cc(t){let e,n;return e=new Gl({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function hc(t){let e,n;return e=new tc({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function uc(t){let e,n;return e=new Fl({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function dc(t){let e,n;return e=new ma({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function pc(t){let e,n;return e=new ia({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function mc(t){let e,n,i,o,s,r,a;const l=[pc,dc,uc,hc,cc,lc,ac],c=[];function h(t,e){return"search"===t[0]?0:"reverse"===t[0]?1:"details"===t[0]?2:"deletable"===t[0]?3:"polygons"===t[0]?4:"status"===t[0]?5:"about"===t[0]?6:-1}return~(e=h(t))&&(n=c[e]=l[e](t)),o=new wt({}),{c(){n&&n.c(),i=T(),it(o.$$.fragment)},m(n,l){~e&&c[e].m(n,l),y(n,i,l),ot(o,n,l),s=!0,r||(a=M(window,"popstate",t[2]),r=!0)},p(t,[o]){let s=e;e=h(t),e!==s&&(n&&(J(),et(c[s],1,1,(()=>{c[s]=null})),Q()),~e?(n=c[e],n||(n=c[e]=l[e](t),n.c()),tt(n,1),n.m(i.parentNode,i)):n=null)},i(t){s||(tt(n),tt(o.$$.fragment,t),s=!0)},o(t){et(n),et(o.$$.fragment,t),s=!1},d(t){~e&&c[e].d(t),t&&b(i),st(o,t),r=!1,a()}}}function fc(t,e,n){let i,o;d(t,_t,(t=>n(1,o=t))),yt();return t.$$.update=()=>{2&t.$$.dirty&&n(0,i=o.tab)},[i,o,()=>yt()]}new class extends lt{constructor(t){super(),at(this,t,fc,mc,r,{})}}({target:document.body})}();
+ */(function(t){var e="1.9.3";function n(t){var e,n,i,o;for(n=1,i=arguments.length;n<i;n++)for(e in o=arguments[n])t[e]=o[e];return t}var i=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function o(t,e){var n=Array.prototype.slice;if(t.bind)return t.bind.apply(t,n.call(arguments,1));var i=n.call(arguments,2);return function(){return t.apply(e,i.length?i.concat(n.call(arguments)):arguments)}}var s=0;function r(t){return"_leaflet_id"in t||(t._leaflet_id=++s),t._leaflet_id}function a(t,e,n){var i,o,s,r;return r=function(){i=!1,o&&(s.apply(n,o),o=!1)},s=function(){i?o=arguments:(t.apply(n,arguments),setTimeout(r,e),i=!0)},s}function l(t,e,n){var i=e[1],o=e[0],s=i-o;return t===i&&n?t:((t-o)%s+s)%s+o}function c(){return!1}function h(t,e){if(!1===e)return t;var n=Math.pow(10,void 0===e?6:e);return Math.round(t*n)/n}function u(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function d(t){return u(t).split(/\s+/)}function p(t,e){for(var n in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?i(t.options):{}),e)t.options[n]=e[n];return t.options}function m(t,e,n){var i=[];for(var o in t)i.push(encodeURIComponent(n?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+i.join("&")}var f=/\{ *([\w_ -]+) *\}/g;function _(t,e){return t.replace(f,(function(t,n){var i=e[n];if(void 0===i)throw new Error("No value provided for variable "+t);return"function"==typeof i&&(i=i(e)),i}))}var g=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function v(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1}var y="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function b(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var w=0;function x(t){var e=+new Date,n=Math.max(0,16-(e-w));return w=e+n,window.setTimeout(t,n)}var $=window.requestAnimationFrame||b("RequestAnimationFrame")||x,T=window.cancelAnimationFrame||b("CancelAnimationFrame")||b("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function P(t,e,n){if(!n||$!==x)return $.call(window,o(t,e));t.call(e)}function M(t){t&&T.call(window,t)}var k={__proto__:null,extend:n,create:i,bind:o,get lastId(){return s},stamp:r,throttle:a,wrapNum:l,falseFn:c,formatNum:h,trim:u,splitWords:d,setOptions:p,getParamString:m,template:_,isArray:g,indexOf:v,emptyImageUrl:y,requestFn:$,cancelFn:T,requestAnimFrame:P,cancelAnimFrame:M};function C(){}function E(t){if("undefined"!=typeof L&&L&&L.Mixin){t=g(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===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)}}C.extend=function(t){var e=function(){p(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},o=e.__super__=this.prototype,s=i(o);for(var r in s.constructor=e,e.prototype=s,this)Object.prototype.hasOwnProperty.call(this,r)&&"prototype"!==r&&"__super__"!==r&&(e[r]=this[r]);return t.statics&&n(e,t.statics),t.includes&&(E(t.includes),n.apply(null,[s].concat(t.includes))),n(s,t),delete s.statics,delete s.includes,s.options&&(s.options=o.options?i(o.options):{},n(s.options,t.options)),s._initHooks=[],s.callInitHooks=function(){if(!this._initHooksCalled){o.callInitHooks&&o.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=s._initHooks.length;t<e;t++)s._initHooks[t].call(this)}},e},C.include=function(t){var e=this.prototype.options;return n(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this},C.mergeOptions=function(t){return n(this.prototype.options,t),this},C.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),n="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n),this};var A={on:function(t,e,n){if("object"==typeof t)for(var i in t)this._on(i,t[i],e);else for(var o=0,s=(t=d(t)).length;o<s;o++)this._on(t[o],e,n);return this},off:function(t,e,n){if(arguments.length)if("object"==typeof t)for(var i in t)this._off(i,t[i],e);else{t=d(t);for(var o=1===arguments.length,s=0,r=t.length;s<r;s++)o?this._off(t[s]):this._off(t[s],e,n)}else delete this._events;return this},_on:function(t,e,n,i){if("function"==typeof e){if(!1===this._listens(t,e,n)){n===this&&(n=void 0);var o={fn:e,ctx:n};i&&(o.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(o)}}else console.warn("wrong listener type: "+typeof e)},_off:function(t,e,n){var i,o,s;if(this._events&&(i=this._events[t]))if(1!==arguments.length)if("function"==typeof e){var r=this._listens(t,e,n);if(!1!==r){var a=i[r];this._firingCount&&(a.fn=c,this._events[t]=i=i.slice()),i.splice(r,1)}}else console.warn("wrong listener type: "+typeof e);else{if(this._firingCount)for(o=0,s=i.length;o<s;o++)i[o].fn=c;delete this._events[t]}},fire:function(t,e,i){if(!this.listens(t,i))return this;var o=n({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var s=this._events[t];if(s){this._firingCount=this._firingCount+1||1;for(var r=0,a=s.length;r<a;r++){var l=s[r],c=l.fn;l.once&&this.off(t,c,l.ctx),c.call(l.ctx||this,o)}this._firingCount--}}return i&&this._propagateEvent(o),this},listens:function(t,e,n,i){"string"!=typeof t&&console.warn('"string" type argument expected');var o=e;"function"!=typeof e&&(i=!!e,o=void 0,n=void 0);var s=this._events&&this._events[t];if(s&&s.length&&!1!==this._listens(t,o,n))return!0;if(i)for(var r in this._eventParents)if(this._eventParents[r].listens(t,e,n,i))return!0;return!1},_listens:function(t,e,n){if(!this._events)return!1;var i=this._events[t]||[];if(!e)return!!i.length;n===this&&(n=void 0);for(var o=0,s=i.length;o<s;o++)if(i[o].fn===e&&i[o].ctx===n)return o;return!1},once:function(t,e,n){if("object"==typeof t)for(var i in t)this._on(i,t[i],e,!0);else for(var o=0,s=(t=d(t)).length;o<s;o++)this._on(t[o],e,n,!0);return this},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[r(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[r(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,n({layer:t.target,propagatedFrom:t.target},t),!0)}};A.addEventListener=A.on,A.removeEventListener=A.clearAllEventListeners=A.off,A.addOneTimeEventListener=A.once,A.fireEvent=A.fire,A.hasEventListeners=A.listens;var S=C.extend(A);function O(t,e,n){this.x=n?Math.round(t):t,this.y=n?Math.round(e):e}var z=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function I(t,e,n){return t instanceof O?t:g(t)?new O(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new O(t.x,t.y):new O(t,e,n)}function B(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i<o;i++)this.extend(n[i])}function D(t,e){return!t||t instanceof B?t:new B(t,e)}function N(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i<o;i++)this.extend(n[i])}function Z(t,e){return t instanceof N?t:new N(t,e)}function j(t,e,n){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==n&&(this.alt=+n)}function R(t,e,n){return t instanceof j?t:g(t)&&"object"!=typeof t[0]?3===t.length?new j(t[0],t[1],t[2]):2===t.length?new j(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new j(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new j(t,e,n)}O.prototype={clone:function(){return new O(this.x,this.y)},add:function(t){return this.clone()._add(I(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(I(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 O(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new O(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=z(this.x),this.y=z(this.y),this},distanceTo:function(t){var e=(t=I(t)).x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},equals:function(t){return(t=I(t)).x===this.x&&t.y===this.y},contains:function(t){return t=I(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+h(this.x)+", "+h(this.y)+")"}},B.prototype={extend:function(t){var e,n;if(!t)return this;if(t instanceof O||"number"==typeof t[0]||"x"in t)e=n=I(t);else if(e=(t=D(t)).min,n=t.max,!e||!n)return this;return this.min||this.max?(this.min.x=Math.min(e.x,this.min.x),this.max.x=Math.max(n.x,this.max.x),this.min.y=Math.min(e.y,this.min.y),this.max.y=Math.max(n.y,this.max.y)):(this.min=e.clone(),this.max=n.clone()),this},getCenter:function(t){return I((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return I(this.min.x,this.max.y)},getTopRight:function(){return I(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 e,n;return(t="number"==typeof t[0]||t instanceof O?I(t):D(t))instanceof B?(e=t.min,n=t.max):e=n=t,e.x>=this.min.x&&n.x<=this.max.x&&e.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=D(t);var e=this.min,n=this.max,i=t.min,o=t.max,s=o.x>=e.x&&i.x<=n.x,r=o.y>=e.y&&i.y<=n.y;return s&&r},overlaps:function(t){t=D(t);var e=this.min,n=this.max,i=t.min,o=t.max,s=o.x>e.x&&i.x<n.x,r=o.y>e.y&&i.y<n.y;return s&&r},isValid:function(){return!(!this.min||!this.max)},pad:function(t){var e=this.min,n=this.max,i=Math.abs(e.x-n.x)*t,o=Math.abs(e.y-n.y)*t;return D(I(e.x-i,e.y-o),I(n.x+i,n.y+o))},equals:function(t){return!!t&&(t=D(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight()))}},N.prototype={extend:function(t){var e,n,i=this._southWest,o=this._northEast;if(t instanceof j)e=t,n=t;else{if(!(t instanceof N))return t?this.extend(R(t)||Z(t)):this;if(e=t._southWest,n=t._northEast,!e||!n)return this}return i||o?(i.lat=Math.min(e.lat,i.lat),i.lng=Math.min(e.lng,i.lng),o.lat=Math.max(n.lat,o.lat),o.lng=Math.max(n.lng,o.lng)):(this._southWest=new j(e.lat,e.lng),this._northEast=new j(n.lat,n.lng)),this},pad:function(t){var e=this._southWest,n=this._northEast,i=Math.abs(e.lat-n.lat)*t,o=Math.abs(e.lng-n.lng)*t;return new N(new j(e.lat-i,e.lng-o),new j(n.lat+i,n.lng+o))},getCenter:function(){return new j((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 j(this.getNorth(),this.getWest())},getSouthEast:function(){return new j(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){t="number"==typeof t[0]||t instanceof j||"lat"in t?R(t):Z(t);var e,n,i=this._southWest,o=this._northEast;return t instanceof N?(e=t.getSouthWest(),n=t.getNorthEast()):e=n=t,e.lat>=i.lat&&n.lat<=o.lat&&e.lng>=i.lng&&n.lng<=o.lng},intersects:function(t){t=Z(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=e.lat&&i.lat<=n.lat,r=o.lng>=e.lng&&i.lng<=n.lng;return s&&r},overlaps:function(t){t=Z(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>e.lat&&i.lat<n.lat,r=o.lng>e.lng&&i.lng<n.lng;return s&&r},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=Z(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},j.prototype={equals:function(t,e){return!!t&&(t=R(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===e?1e-9:e))},toString:function(t){return"LatLng("+h(this.lat,t)+", "+h(this.lng,t)+")"},distanceTo:function(t){return W.distance(this,R(t))},wrap:function(){return W.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,n=e/Math.cos(Math.PI/180*this.lat);return Z([this.lat-e,this.lng-n],[this.lat+e,this.lng+n])},clone:function(){return new j(this.lat,this.lng,this.alt)}};var H,F={latLngToPoint:function(t,e){var n=this.projection.project(t),i=this.scale(e);return this.transformation._transform(n,i)},pointToLatLng:function(t,e){var n=this.scale(e),i=this.transformation.untransform(t,n);return this.projection.unproject(i)},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 e=this.projection.bounds,n=this.scale(t);return new B(this.transformation.transform(e.min,n),this.transformation.transform(e.max,n))},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?l(t.lng,this.wrapLng,!0):t.lng;return new j(this.wrapLat?l(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),n=this.wrapLatLng(e),i=e.lat-n.lat,o=e.lng-n.lng;if(0===i&&0===o)return t;var s=t.getSouthWest(),r=t.getNorthEast();return new N(new j(s.lat-i,s.lng-o),new j(r.lat-i,r.lng-o))}},W=n({},F,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var n=Math.PI/180,i=t.lat*n,o=e.lat*n,s=Math.sin((e.lat-t.lat)*n/2),r=Math.sin((e.lng-t.lng)*n/2),a=s*s+Math.cos(i)*Math.cos(o)*r*r,l=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*l}}),q=6378137,U={R:q,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,n=this.MAX_LATITUDE,i=Math.max(Math.min(n,t.lat),-n),o=Math.sin(i*e);return new O(this.R*t.lng*e,this.R*Math.log((1+o)/(1-o))/2)},unproject:function(t){var e=180/Math.PI;return new j((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(H=q*Math.PI,new B([-H,-H],[H,H]))};function V(t,e,n,i){if(g(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=n,this._d=i}function K(t,e,n,i){return new V(t,e,n,i)}V.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new O((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var G=n({},W,{code:"EPSG:3857",projection:U,transformation:function(){var t=.5/(Math.PI*U.R);return K(t,.5,-t,.5)}()}),Y=n({},G,{code:"EPSG:900913"});function X(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function J(t,e){var n,i,o,s,r,a,l="";for(n=0,o=t.length;n<o;n++){for(i=0,s=(r=t[n]).length;i<s;i++)l+=(i?"L":"M")+(a=r[i]).x+" "+a.y;l+=e?Nt.svg?"z":"x":""}return l||"M0 0"}var Q,tt=document.documentElement.style,et="ActiveXObject"in window,nt=et&&!document.addEventListener,it="msLaunchUri"in navigator&&!("documentMode"in document),ot=Dt("webkit"),st=Dt("android"),rt=Dt("android 2")||Dt("android 3"),at=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),lt=st&&Dt("Google")&&at<537&&!("AudioNode"in window),ct=!!window.opera,ht=!it&&Dt("chrome"),ut=Dt("gecko")&&!ot&&!ct&&!et,dt=!ht&&Dt("safari"),pt=Dt("phantom"),mt="OTransition"in tt,ft=0===navigator.platform.indexOf("Win"),_t=et&&"transition"in tt,gt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!rt,vt="MozPerspective"in tt,yt=!window.L_DISABLE_3D&&(_t||gt||vt)&&!mt&&!pt,bt="undefined"!=typeof orientation||Dt("mobile"),wt=bt&&ot,xt=bt&>,$t=!window.PointerEvent&&window.MSPointerEvent,Lt=!(!window.PointerEvent&&!$t),Tt="ontouchstart"in window||!!window.TouchEvent,Pt=!window.L_NO_TOUCH&&(Tt||Lt),Mt=bt&&ct,kt=bt&&ut,Ct=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Et=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",c,e),window.removeEventListener("testPassiveEventSupport",c,e)}catch(t){}return t}(),At=!!document.createElement("canvas").getContext,St=!(!document.createElementNS||!X("svg").createSVGRect),Ot=!!St&&((Q=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===(Q.firstChild&&Q.firstChild.namespaceURI)),zt=!St&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}(),It=0===navigator.platform.indexOf("Mac"),Bt=0===navigator.platform.indexOf("Linux");function Dt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Nt={ie:et,ielt9:nt,edge:it,webkit:ot,android:st,android23:rt,androidStock:lt,opera:ct,chrome:ht,gecko:ut,safari:dt,phantom:pt,opera12:mt,win:ft,ie3d:_t,webkit3d:gt,gecko3d:vt,any3d:yt,mobile:bt,mobileWebkit:wt,mobileWebkit3d:xt,msPointer:$t,pointer:Lt,touch:Pt,touchNative:Tt,mobileOpera:Mt,mobileGecko:kt,retina:Ct,passiveEvents:Et,canvas:At,svg:St,vml:zt,inlineSvg:Ot,mac:It,linux:Bt},Zt=Nt.msPointer?"MSPointerDown":"pointerdown",jt=Nt.msPointer?"MSPointerMove":"pointermove",Rt=Nt.msPointer?"MSPointerUp":"pointerup",Ht=Nt.msPointer?"MSPointerCancel":"pointercancel",Ft={touchstart:Zt,touchmove:jt,touchend:Rt,touchcancel:Ht},Wt={touchstart:te,touchmove:Qt,touchend:Qt,touchcancel:Qt},qt={},Ut=!1;function Vt(t,e,n){return"touchstart"===e&&Jt(),Wt[e]?(n=Wt[e].bind(this,n),t.addEventListener(Ft[e],n,!1),n):(console.warn("wrong event specified:",e),c)}function Kt(t,e,n){Ft[e]?t.removeEventListener(Ft[e],n,!1):console.warn("wrong event specified:",e)}function Gt(t){qt[t.pointerId]=t}function Yt(t){qt[t.pointerId]&&(qt[t.pointerId]=t)}function Xt(t){delete qt[t.pointerId]}function Jt(){Ut||(document.addEventListener(Zt,Gt,!0),document.addEventListener(jt,Yt,!0),document.addEventListener(Rt,Xt,!0),document.addEventListener(Ht,Xt,!0),Ut=!0)}function Qt(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var n in e.touches=[],qt)e.touches.push(qt[n]);e.changedTouches=[e],t(e)}}function te(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&Ge(e),Qt(t,e)}function ee(t){var e,n,i={};for(n in t)e=t[n],i[n]=e&&e.bind?e.bind(t):e;return t=i,i.type="dblclick",i.detail=2,i.isTrusted=!1,i._simulated=!0,i}var ne=200;function ie(t,e){t.addEventListener("dblclick",e);var n,i=0;function o(t){if(1===t.detail){if("mouse"!==t.pointerType&&(!t.sourceCapabilities||t.sourceCapabilities.firesTouchEvents)){var o=Xe(t);if(!o.some((function(t){return t instanceof HTMLLabelElement&&t.attributes.for}))||o.some((function(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement}))){var s=Date.now();s-i<=ne?2==++n&&e(ee(t)):n=1,i=s}}}else n=t.detail}return t.addEventListener("click",o),{dblclick:e,simDblclick:o}}function oe(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}var se,re,ae,le,ce,he=Me(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ue=Me(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),de="webkitTransition"===ue||"OTransition"===ue?ue+"End":"transitionend";function pe(t){return"string"==typeof t?document.getElementById(t):t}function me(t,e){var n=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!n||"auto"===n)&&document.defaultView){var i=document.defaultView.getComputedStyle(t,null);n=i?i[e]:null}return"auto"===n?null:n}function fe(t,e,n){var i=document.createElement(t);return i.className=e||"",n&&n.appendChild(i),i}function _e(t){var e=t.parentNode;e&&e.removeChild(t)}function ge(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function ve(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function ye(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function be(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=Le(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function we(t,e){if(void 0!==t.classList)for(var n=d(e),i=0,o=n.length;i<o;i++)t.classList.add(n[i]);else if(!be(t,e)){var s=Le(t);$e(t,(s?s+" ":"")+e)}}function xe(t,e){void 0!==t.classList?t.classList.remove(e):$e(t,u((" "+Le(t)+" ").replace(" "+e+" "," ")))}function $e(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function Le(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function Te(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&Pe(t,e)}function Pe(t,e){var n=!1,i="DXImageTransform.Microsoft.Alpha";try{n=t.filters.item(i)}catch(t){if(1===e)return}e=Math.round(100*e),n?(n.Enabled=100!==e,n.Opacity=e):t.style.filter+=" progid:"+i+"(opacity="+e+")"}function Me(t){for(var e=document.documentElement.style,n=0;n<t.length;n++)if(t[n]in e)return t[n];return!1}function ke(t,e,n){var i=e||new O(0,0);t.style[he]=(Nt.ie3d?"translate("+i.x+"px,"+i.y+"px)":"translate3d("+i.x+"px,"+i.y+"px,0)")+(n?" scale("+n+")":"")}function Ce(t,e){t._leaflet_pos=e,Nt.any3d?ke(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function Ee(t){return t._leaflet_pos||new O(0,0)}if("onselectstart"in document)se=function(){Ze(window,"selectstart",Ge)},re=function(){Re(window,"selectstart",Ge)};else{var Ae=Me(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);se=function(){if(Ae){var t=document.documentElement.style;ae=t[Ae],t[Ae]="none"}},re=function(){Ae&&(document.documentElement.style[Ae]=ae,ae=void 0)}}function Se(){Ze(window,"dragstart",Ge)}function Oe(){Re(window,"dragstart",Ge)}function ze(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Ie(),le=t,ce=t.style.outline,t.style.outline="none",Ze(window,"keydown",Ie))}function Ie(){le&&(le.style.outline=ce,le=void 0,ce=void 0,Re(window,"keydown",Ie))}function Be(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function De(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Ne={__proto__:null,TRANSFORM:he,TRANSITION:ue,TRANSITION_END:de,get:pe,getStyle:me,create:fe,remove:_e,empty:ge,toFront:ve,toBack:ye,hasClass:be,addClass:we,removeClass:xe,setClass:$e,getClass:Le,setOpacity:Te,testProp:Me,setTransform:ke,setPosition:Ce,getPosition:Ee,get disableTextSelection(){return se},get enableTextSelection(){return re},disableImageDrag:Se,enableImageDrag:Oe,preventOutline:ze,restoreOutline:Ie,getSizedParentNode:Be,getScale:De};function Ze(t,e,n,i){if(e&&"object"==typeof e)for(var o in e)We(t,o,e[o],n);else for(var s=0,r=(e=d(e)).length;s<r;s++)We(t,e[s],n,i);return this}var je="_leaflet_events";function Re(t,e,n,i){if(1===arguments.length)He(t),delete t[je];else if(e&&"object"==typeof e)for(var o in e)qe(t,o,e[o],n);else if(e=d(e),2===arguments.length)He(t,(function(t){return-1!==v(e,t)}));else for(var s=0,r=e.length;s<r;s++)qe(t,e[s],n,i);return this}function He(t,e){for(var n in t[je]){var i=n.split(/\d/)[0];e&&!e(i)||qe(t,i,null,null,n)}}var Fe={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function We(t,e,n,i){var o=e+r(n)+(i?"_"+r(i):"");if(t[je]&&t[je][o])return this;var s=function(e){return n.call(i||t,e||window.event)},a=s;!Nt.touchNative&&Nt.pointer&&0===e.indexOf("touch")?s=Vt(t,e,s):Nt.touch&&"dblclick"===e?s=ie(t,s):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(Fe[e]||e,s,!!Nt.passiveEvents&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?(s=function(e){e=e||window.event,en(t,e)&&a(e)},t.addEventListener(Fe[e],s,!1)):t.addEventListener(e,a,!1):t.attachEvent("on"+e,s),t[je]=t[je]||{},t[je][o]=s}function qe(t,e,n,i,o){o=o||e+r(n)+(i?"_"+r(i):"");var s=t[je]&&t[je][o];if(!s)return this;!Nt.touchNative&&Nt.pointer&&0===e.indexOf("touch")?Kt(t,e,s):Nt.touch&&"dblclick"===e?oe(t,s):"removeEventListener"in t?t.removeEventListener(Fe[e]||e,s,!1):t.detachEvent("on"+e,s),t[je][o]=null}function Ue(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function Ve(t){return We(t,"wheel",Ue),this}function Ke(t){return Ze(t,"mousedown touchstart dblclick contextmenu",Ue),t._leaflet_disable_click=!0,this}function Ge(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Ye(t){return Ge(t),Ue(t),this}function Xe(t){if(t.composedPath)return t.composedPath();for(var e=[],n=t.target;n;)e.push(n),n=n.parentNode;return e}function Je(t,e){if(!e)return new O(t.clientX,t.clientY);var n=De(e),i=n.boundingClientRect;return new O((t.clientX-i.left)/n.x-e.clientLeft,(t.clientY-i.top)/n.y-e.clientTop)}var Qe=Nt.linux&&Nt.chrome?window.devicePixelRatio:Nt.mac?3*window.devicePixelRatio:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function tn(t){return Nt.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Qe:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function en(t,e){var n=e.relatedTarget;if(!n)return!0;try{for(;n&&n!==t;)n=n.parentNode}catch(t){return!1}return n!==t}var nn={__proto__:null,on:Ze,off:Re,stopPropagation:Ue,disableScrollPropagation:Ve,disableClickPropagation:Ke,preventDefault:Ge,stop:Ye,getPropagationPath:Xe,getMousePosition:Je,getWheelDelta:tn,isExternalTarget:en,addListener:Ze,removeListener:Re},on=S.extend({run:function(t,e,n,i){this.stop(),this._el=t,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(i||.5,.2),this._startPos=Ee(t),this._offset=e.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=P(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,n=1e3*this._duration;e<n?this._runFrame(this._easeOut(e/n),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var n=this._startPos.add(this._offset.multiplyBy(t));e&&n._round(),Ce(this._el,n),this.fire("step")},_complete:function(){M(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),sn=S.extend({options:{crs:G,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,e){e=p(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=o(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(R(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=ue&&Nt.any3d&&!Nt.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Ze(this._proxy,de,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,i){return e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(R(t),e,this.options.maxBounds),i=i||{},this._stop(),this._loaded&&!i.reset&&!0!==i&&(void 0!==i.animate&&(i.zoom=n({animate:i.animate},i.zoom),i.pan=n({animate:i.animate,duration:i.duration},i.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,i.zoom):this._tryAnimatedPan(t,i.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,e,i.pan&&i.pan.noMoveStart),this)},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(Nt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(Nt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,n){var i=this.getZoomScale(e),o=this.getSize().divideBy(2),s=(t instanceof O?t:this.latLngToContainerPoint(t)).subtract(o).multiplyBy(1-1/i),r=this.containerPointToLatLng(o.add(s));return this.setView(r,e,{zoom:n})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():Z(t);var n=I(e.paddingTopLeft||e.padding||[0,0]),i=I(e.paddingBottomRight||e.padding||[0,0]),o=this.getBoundsZoom(t,!1,n.add(i));if((o="number"==typeof e.maxZoom?Math.min(e.maxZoom,o):o)===1/0)return{center:t.getCenter(),zoom:o};var s=i.subtract(n).divideBy(2),r=this.project(t.getSouthWest(),o),a=this.project(t.getNorthEast(),o);return{center:this.unproject(r.add(a).divideBy(2).add(s),o),zoom:o}},fitBounds:function(t,e){if(!(t=Z(t)).isValid())throw new Error("Bounds are not valid.");var n=this._getBoundsCenterZoom(t,e);return this.setView(n.center,n.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(e=e||{},!(t=I(t).round()).x&&!t.y)return this.fire("moveend");if(!0!==e.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new on,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){we(this._mapPane,"leaflet-pan-anim");var n=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,n,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,n){if(!1===(n=n||{}).animate||!Nt.any3d)return this.setView(t,e,n);this._stop();var i=this.project(this.getCenter()),o=this.project(t),s=this.getSize(),r=this._zoom;t=R(t),e=void 0===e?r:e;var a=Math.max(s.x,s.y),l=a*this.getZoomScale(r,e),c=o.distanceTo(i)||1,h=1.42,u=h*h;function d(t){var e=(l*l-a*a+(t?-1:1)*u*u*c*c)/(2*(t?l:a)*u*c),n=Math.sqrt(e*e+1)-e;return n<1e-9?-18:Math.log(n)}function p(t){return(Math.exp(t)-Math.exp(-t))/2}function m(t){return(Math.exp(t)+Math.exp(-t))/2}function f(t){return p(t)/m(t)}var _=d(0);function g(t){return a*(m(_)/m(_+h*t))}function v(t){return a*(m(_)*f(_+h*t)-p(_))/u}function y(t){return 1-Math.pow(1-t,1.5)}var b=Date.now(),w=(d(1)-_)/h,x=n.duration?1e3*n.duration:1e3*w*.8;function $(){var n=(Date.now()-b)/x,s=y(n)*w;n<=1?(this._flyToFrame=P($,this),this._move(this.unproject(i.add(o.subtract(i).multiplyBy(v(s)/c)),r),this.getScaleZoom(a/g(s),r),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}return this._moveStart(!0,n.noMoveStart),$.call(this),this},flyToBounds:function(t,e){var n=this._getBoundsCenterZoom(t,e);return this.flyTo(n.center,n.zoom,e)},setMaxBounds:function(t){return t=Z(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 e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var n=this.getCenter(),i=this._limitCenter(n,this._zoom,Z(t));return n.equals(i)||this.panTo(i,e),this._enforcingBounds=!1,this},panInside:function(t,e){var n=I((e=e||{}).paddingTopLeft||e.padding||[0,0]),i=I(e.paddingBottomRight||e.padding||[0,0]),o=this.project(this.getCenter()),s=this.project(t),r=this.getPixelBounds(),a=D([r.min.add(n),r.max.subtract(i)]),l=a.getSize();if(!a.contains(s)){this._enforcingBounds=!0;var c=s.subtract(a.getCenter()),h=a.extend(s).getSize().subtract(l);o.x+=c.x<0?-h.x:h.x,o.y+=c.y<0?-h.y:h.y,this.panTo(this.unproject(o),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=n({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),s=e.divideBy(2).round(),r=i.divideBy(2).round(),a=s.subtract(r);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=n({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=o(this._handleGeolocationResponse,this),i=o(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,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 e=t.code,n=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+n+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=new j(t.coords.latitude,t.coords.longitude),n=e.toBounds(2*t.coords.accuracy),i=this._locateOptions;if(i.setView){var o=this.getBoundsZoom(n);this.setView(e,i.maxZoom?Math.min(o,i.maxZoom):o)}var s={latlng:e,bounds:n,timestamp:t.timestamp};for(var r in t.coords)"number"==typeof t.coords[r]&&(s[r]=t.coords[r]);this.fire("locationfound",s)}},addHandler:function(t,e){if(!e)return this;var n=this[t]=new e(this);return this._handlers.push(n),this.options[t]&&n.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(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),_e(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(M(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)_e(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n=fe("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=n),n},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();return new N(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,n){t=Z(t),n=I(n||[0,0]);var i=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),a=t.getSouthEast(),l=this.getSize().subtract(n),c=D(this.project(a,i),this.project(r,i)).getSize(),h=Nt.any3d?this.options.zoomSnap:1,u=l.x/c.x,d=l.y/c.y,p=e?Math.max(u,d):Math.min(u,d);return i=this.getScaleZoom(p,i),h&&(i=Math.round(i/(h/100))*(h/100),i=e?Math.ceil(i/h)*h:Math.floor(i/h)*h),Math.max(o,Math.min(s,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new O(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var n=this._getTopLeftPoint(t,e);return new B(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var n=this.options.crs;return e=void 0===e?this._zoom:e,n.scale(t)/n.scale(e)},getScaleZoom:function(t,e){var n=this.options.crs;e=void 0===e?this._zoom:e;var i=n.zoom(t*n.scale(e));return isNaN(i)?1/0:i},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(R(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(I(t),e)},layerPointToLatLng:function(t){var e=I(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(R(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(R(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(Z(t))},distance:function(t,e){return this.options.crs.distance(R(t),R(e))},containerPointToLayerPoint:function(t){return I(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return I(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(I(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(R(t)))},mouseEventToContainerPoint:function(t){return Je(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 e=this._container=pe(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");Ze(e,"scroll",this._onScroll,this),this._containerId=r(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&Nt.any3d,we(t,"leaflet-container"+(Nt.touch?" leaflet-touch":"")+(Nt.retina?" leaflet-retina":"")+(Nt.ielt9?" leaflet-oldie":"")+(Nt.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=me(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&"sticky"!==e&&(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),Ce(this._mapPane,new O(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(we(t.markerPane,"leaflet-zoom-hide"),we(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,n){Ce(this._mapPane,new O(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var o=this._zoom!==e;this._moveStart(o,n)._move(t,e)._moveEnd(o),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,n,i){void 0===e&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),i?n&&n.pinch&&this.fire("zoom",n):((o||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return M(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Ce(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[r(this._container)]=this;var e=t?Re:Ze;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),Nt.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){M(this._resizeRequest),this._resizeRequest=P((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,e){for(var n,i=[],o="mouseout"===e||"mouseover"===e,s=t.target||t.srcElement,a=!1;s;){if((n=this._targets[r(s)])&&("click"===e||"preclick"===e)&&this._draggableMoved(n)){a=!0;break}if(n&&n.listens(e,!0)){if(o&&!en(s,t))break;if(i.push(n),o)break}if(s===this._container)break;s=s.parentNode}return i.length||a||o||!this.listens(e,!0)||(i=[this]),i},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(e))){var n=t.type;"mousedown"===n&&ze(e),this._fireDOMEvent(t,n)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if("click"===t.type){var o=n({},t);o.type="preclick",this._fireDOMEvent(o,o.type,i)}var s=this._findEventTargets(t,e);if(i){for(var r=[],a=0;a<i.length;a++)i[a].listens(e,!0)&&r.push(i[a]);s=r.concat(s)}if(s.length){"contextmenu"===e&&Ge(t);var l=s[0],c={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var h=l.getLatLng&&(!l._radius||l._radius<=10);c.containerPoint=h?this.latLngToContainerPoint(l.getLatLng()):this.mouseEventToContainerPoint(t),c.layerPoint=this.containerPointToLayerPoint(c.containerPoint),c.latlng=h?l.getLatLng():this.layerPointToLatLng(c.layerPoint)}for(a=0;a<s.length;a++)if(s[a].fire(e,c,!0),c.originalEvent._stopped||!1===s[a].options.bubblingMouseEvents&&-1!==v(this._mouseEvents,e))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return Ee(this._mapPane)||new O(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var n=this.getSize()._divideBy(2);return this.project(t,e)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return this.project(t,e)._subtract(i)},_latLngBoundsToNewLayerBounds:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return D([this.project(t.getSouthWest(),e)._subtract(i),this.project(t.getNorthWest(),e)._subtract(i),this.project(t.getSouthEast(),e)._subtract(i),this.project(t.getNorthEast(),e)._subtract(i)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,n){if(!n)return t;var i=this.project(t,e),o=this.getSize().divideBy(2),s=new B(i.subtract(o),i.add(o)),r=this._getBoundsOffset(s,n,e);return Math.abs(r.x)<=1&&Math.abs(r.y)<=1?t:this.unproject(i.add(r),e)},_limitOffset:function(t,e){if(!e)return t;var n=this.getPixelBounds(),i=new B(n.min.add(t),n.max.add(t));return t.add(this._getBoundsOffset(i,e))},_getBoundsOffset:function(t,e,n){var i=D(this.project(e.getNorthEast(),n),this.project(e.getSouthWest(),n)),o=i.min.subtract(t.min),s=i.max.subtract(t.max);return new O(this._rebound(o.x,-s.x),this._rebound(o.y,-s.y))},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),n=this.getMaxZoom(),i=Nt.any3d?this.options.zoomSnap:1;return i&&(t=Math.round(t/i)*i),Math.max(e,Math.min(n,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){xe(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var n=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(n)||(this.panBy(n,e),0))},_createAnimProxy:function(){var t=this._proxy=fe("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var e=he,n=this._proxy.style[e];ke(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),n===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){_e(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();ke(this._proxy,this.project(t,e),this.getZoomScale(e,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,e,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var i=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/i);return!(!0!==n.animate&&!this.getSize().contains(o)||(P((function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)}),this),0))},_animateZoom:function(t,e,n,i){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,we(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:i}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&xe(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 rn(t,e){return new sn(t,e)}var an=C.extend({options:{position:"topright"},initialize:function(t){p(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),n=this.getPosition(),i=t._controlCorners[n];return we(e,"leaflet-control"),-1!==n.indexOf("bottom")?i.insertBefore(e,i.firstChild):i.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(_e(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()}}),ln=function(t){return new an(t)};sn.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",n=this._controlContainer=fe("div",e+"control-container",this._container);function i(i,o){var s=e+i+" "+e+o;t[i+o]=fe("div",s,n)}i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)_e(this._controlCorners[t]);_e(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var cn=an.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,n,i){return n<i?-1:i<n?1:0}},initialize:function(t,e,n){for(var i in p(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[i],i);for(i in e)this._addLayer(e[i],i,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return an.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,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(r(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){we(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?(we(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):xe(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return xe(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=fe("div",t),n=this.options.collapsed;e.setAttribute("aria-haspopup",!0),Ke(e),Ve(e);var i=this._section=fe("section",t+"-list");n&&(this._map.on("click",this.collapse,this),Ze(e,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var o=this._layersLink=fe("a",t+"-toggle",e);o.href="#",o.title="Layers",o.setAttribute("role","button"),Ze(o,{keydown:function(t){13===t.keyCode&&this._expandSafely()},click:function(t){Ge(t),this._expandSafely()}},this),n||this.expand(),this._baseLayersList=fe("div",t+"-base",i),this._separator=fe("div",t+"-separator",i),this._overlaysList=fe("div",t+"-overlays",i),e.appendChild(i)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&r(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,n){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:n}),this.options.sortLayers&&this._layers.sort(o((function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)}),this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;ge(this._baseLayersList),ge(this._overlaysList),this._layerControlInputs=[];var t,e,n,i,o=0;for(n=0;n<this._layers.length;n++)i=this._layers[n],this._addItem(i),e=e||i.overlay,t=t||!i.overlay,o+=i.overlay?0:1;return this.options.hideSingleBase&&(t=t&&o>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(r(t.target)),n=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;n&&this._map.fire(n,e)},_createRadioElement:function(t,e){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",i=document.createElement("div");return i.innerHTML=n,i.firstChild},_addItem:function(t){var e,n=document.createElement("label"),i=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=i):e=this._createRadioElement("leaflet-base-layers_"+r(this),i),this._layerControlInputs.push(e),e.layerId=r(t.layer),Ze(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var s=document.createElement("span");return n.appendChild(s),s.appendChild(e),s.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){var t,e,n=this._layerControlInputs,i=[],o=[];this._handlingClick=!0;for(var s=n.length-1;s>=0;s--)t=n[s],e=this._getLayer(t.layerId).layer,t.checked?i.push(e):t.checked||o.push(e);for(s=0;s<o.length;s++)this._map.hasLayer(o[s])&&this._map.removeLayer(o[s]);for(s=0;s<i.length;s++)this._map.hasLayer(i[s])||this._map.addLayer(i[s]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,e,n=this._layerControlInputs,i=this._map.getZoom(),o=n.length-1;o>=0;o--)t=n[o],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&i<e.options.minZoom||void 0!==e.options.maxZoom&&i>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;Ze(t,"click",Ge),this.expand(),setTimeout((function(){Re(t,"click",Ge)}))}}),hn=function(t,e,n){return new cn(t,e,n)},un=an.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">−</span>',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=fe("div",e+" leaflet-bar"),i=this.options;return this._zoomInButton=this._createButton(i.zoomInText,i.zoomInTitle,e+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(i.zoomOutText,i.zoomOutTitle,e+"-out",n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n},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,e,n,i,o){var s=fe("a",n,i);return s.innerHTML=t,s.href="#",s.title=e,s.setAttribute("role","button"),s.setAttribute("aria-label",e),Ke(s),Ze(s,"click",Ye),Ze(s,"click",o,this),Ze(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";xe(this._zoomInButton,e),xe(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(we(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(we(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});sn.mergeOptions({zoomControl:!0}),sn.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new un,this.addControl(this.zoomControl))}));var dn=function(t){return new un(t)},pn=an.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",n=fe("div",e),i=this.options;return this._addScales(i,e+"-line",n),t.on(i.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),n},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,n){t.metric&&(this._mScale=fe("div",e,n)),t.imperial&&(this._iScale=fe("div",e,n))},_update:function(){var t=this._map,e=t.getSize().y/2,n=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(n)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),n=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,n,e/t)},_updateImperial:function(t){var e,n,i,o=3.2808399*t;o>5280?(e=o/5280,n=this._getRoundNum(e),this._updateScale(this._iScale,n+" mi",n/e)):(i=this._getRoundNum(o),this._updateScale(this._iScale,i+" ft",i/o))},_updateScale:function(t,e,n){t.style.width=Math.round(this.options.maxWidth*n)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),n=t/e;return e*(n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),mn=function(t){return new pn(t)},fn='<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>',_n=an.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Nt.inlineSvg?fn+" ":"")+"Leaflet</a>"},initialize:function(t){p(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=fe("div","leaflet-control-attribution"),Ke(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].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 e in this._attributions)this._attributions[e]&&t.push(e);var n=[];this.options.prefix&&n.push(this.options.prefix),t.length&&n.push(t.join(", ")),this._container.innerHTML=n.join(' <span aria-hidden="true">|</span> ')}}});sn.mergeOptions({attributionControl:!0}),sn.addInitHook((function(){this.options.attributionControl&&(new _n).addTo(this)}));var gn=function(t){return new _n(t)};an.Layers=cn,an.Zoom=un,an.Scale=pn,an.Attribution=_n,ln.layers=hn,ln.zoom=dn,ln.scale=mn,ln.attribution=gn;var vn=C.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});vn.addTo=function(t,e){return t.addHandler(e,this),this};var yn,bn={Events:A},wn=Nt.touch?"touchstart mousedown":"mousedown",xn=S.extend({options:{clickTolerance:3},initialize:function(t,e,n,i){p(this,i),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(Ze(this._dragStartTarget,wn,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(xn._dragging===this&&this.finishDrag(!0),Re(this._dragStartTarget,wn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!be(this._element,"leaflet-zoom-anim")))if(t.touches&&1!==t.touches.length)xn._dragging===this&&this.finishDrag();else if(!(xn._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(xn._dragging=this,this._preventOutline&&ze(this._element),Se(),se(),this._moving))){this.fire("down");var e=t.touches?t.touches[0]:t,n=Be(this._element);this._startPoint=new O(e.clientX,e.clientY),this._startPos=Ee(this._element),this._parentScale=De(n);var i="mousedown"===t.type;Ze(document,i?"mousemove":"touchmove",this._onMove,this),Ze(document,i?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(t){if(this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,n=new O(e.clientX,e.clientY)._subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)<this.options.clickTolerance||(n.x/=this._parentScale.x,n.y/=this._parentScale.y,Ge(t),this._moved||(this.fire("dragstart"),this._moved=!0,we(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),we(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,this._lastEvent=t,this._updatePosition()))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),Ce(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){xe(document.body,"leaflet-dragging"),this._lastTarget&&(xe(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Re(document,"mousemove touchmove",this._onMove,this),Re(document,"mouseup touchend touchcancel",this._onUp,this),Oe(),re(),this._moved&&this._moving&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)}),this._moving=!1,xn._dragging=!1}});function $n(t,e){if(!e||!t.length)return t.slice();var n=e*e;return t=Pn(t=kn(t,n),n)}function Ln(t,e,n){return Math.sqrt(On(t,e,n,!0))}function Tn(t,e,n){return On(t,e,n)}function Pn(t,e){var n=t.length,i=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(n);i[0]=i[n-1]=1,Mn(t,i,e,0,n-1);var o,s=[];for(o=0;o<n;o++)i[o]&&s.push(t[o]);return s}function Mn(t,e,n,i,o){var s,r,a,l=0;for(r=i+1;r<=o-1;r++)(a=On(t[r],t[i],t[o],!0))>l&&(s=r,l=a);l>n&&(e[s]=1,Mn(t,e,n,i,s),Mn(t,e,n,s,o))}function kn(t,e){for(var n=[t[0]],i=1,o=0,s=t.length;i<s;i++)Sn(t[i],t[o])>e&&(n.push(t[i]),o=i);return o<s-1&&n.push(t[s-1]),n}function Cn(t,e,n,i,o){var s,r,a,l=i?yn:An(t,n),c=An(e,n);for(yn=c;;){if(!(l|c))return[t,e];if(l&c)return!1;a=An(r=En(t,e,s=l||c,n,o),n),s===l?(t=r,l=a):(e=r,c=a)}}function En(t,e,n,i,o){var s,r,a=e.x-t.x,l=e.y-t.y,c=i.min,h=i.max;return 8&n?(s=t.x+a*(h.y-t.y)/l,r=h.y):4&n?(s=t.x+a*(c.y-t.y)/l,r=c.y):2&n?(s=h.x,r=t.y+l*(h.x-t.x)/a):1&n&&(s=c.x,r=t.y+l*(c.x-t.x)/a),new O(s,r,o)}function An(t,e){var n=0;return t.x<e.min.x?n|=1:t.x>e.max.x&&(n|=2),t.y<e.min.y?n|=4:t.y>e.max.y&&(n|=8),n}function Sn(t,e){var n=e.x-t.x,i=e.y-t.y;return n*n+i*i}function On(t,e,n,i){var o,s=e.x,r=e.y,a=n.x-s,l=n.y-r,c=a*a+l*l;return c>0&&((o=((t.x-s)*a+(t.y-r)*l)/c)>1?(s=n.x,r=n.y):o>0&&(s+=a*o,r+=l*o)),a=t.x-s,l=t.y-r,i?a*a+l*l:new O(s,r)}function zn(t){return!g(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function In(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),zn(t)}function Bn(t,e){var n,i,o,s,r,a,l,c;if(!t||0===t.length)throw new Error("latlngs not passed");zn(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var h=[];for(var u in t)h.push(e.project(R(t[u])));var d=h.length;for(n=0,i=0;n<d-1;n++)i+=h[n].distanceTo(h[n+1])/2;if(0===i)c=h[0];else for(n=0,s=0;n<d-1;n++)if(r=h[n],a=h[n+1],(s+=o=r.distanceTo(a))>i){l=(s-i)/o,c=[a.x-l*(a.x-r.x),a.y-l*(a.y-r.y)];break}return e.unproject(I(c))}var Dn={__proto__:null,simplify:$n,pointToSegmentDistance:Ln,closestPointOnSegment:Tn,clipSegment:Cn,_getEdgeIntersection:En,_getBitCode:An,_sqClosestPointOnSegment:On,isFlat:zn,_flat:In,polylineCenter:Bn};function Nn(t,e,n){var i,o,s,r,a,l,c,h,u,d=[1,4,2,8];for(o=0,c=t.length;o<c;o++)t[o]._code=An(t[o],e);for(r=0;r<4;r++){for(h=d[r],i=[],o=0,s=(c=t.length)-1;o<c;s=o++)a=t[o],l=t[s],a._code&h?l._code&h||((u=En(l,a,h,e,n))._code=An(u,e),i.push(u)):(l._code&h&&((u=En(l,a,h,e,n))._code=An(u,e),i.push(u)),i.push(a));t=i}return t}function Zn(t,e){var n,i,o,s,r,a,l,c,h;if(!t||0===t.length)throw new Error("latlngs not passed");zn(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var u=[];for(var d in t)u.push(e.project(R(t[d])));var p=u.length;for(a=l=c=0,n=0,i=p-1;n<p;i=n++)o=u[n],s=u[i],r=o.y*s.x-s.y*o.x,l+=(o.x+s.x)*r,c+=(o.y+s.y)*r,a+=3*r;return h=0===a?u[0]:[l/a,c/a],e.unproject(I(h))}var jn={__proto__:null,clipPolygon:Nn,polygonCenter:Zn},Rn={project:function(t){return new O(t.lng,t.lat)},unproject:function(t){return new j(t.y,t.x)},bounds:new B([-180,-90],[180,90])},Hn={R:6378137,R_MINOR:6356752.314245179,bounds:new B([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,n=this.R,i=t.lat*e,o=this.R_MINOR/n,s=Math.sqrt(1-o*o),r=s*Math.sin(i),a=Math.tan(Math.PI/4-i/2)/Math.pow((1-r)/(1+r),s/2);return i=-n*Math.log(Math.max(a,1e-10)),new O(t.lng*e*n,i)},unproject:function(t){for(var e,n=180/Math.PI,i=this.R,o=this.R_MINOR/i,s=Math.sqrt(1-o*o),r=Math.exp(-t.y/i),a=Math.PI/2-2*Math.atan(r),l=0,c=.1;l<15&&Math.abs(c)>1e-7;l++)e=s*Math.sin(a),e=Math.pow((1-e)/(1+e),s/2),a+=c=Math.PI/2-2*Math.atan(r*e)-a;return new j(a*n,t.x*n/i)}},Fn={__proto__:null,LonLat:Rn,Mercator:Hn,SphericalMercator:U},Wn=n({},W,{code:"EPSG:3395",projection:Hn,transformation:function(){var t=.5/(Math.PI*Hn.R);return K(t,.5,-t,.5)}()}),qn=n({},W,{code:"EPSG:4326",projection:Rn,transformation:K(1/180,1,-1/180,.5)}),Un=n({},F,{projection:Rn,transformation:K(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var n=e.lng-t.lng,i=e.lat-t.lat;return Math.sqrt(n*n+i*i)},infinite:!0});F.Earth=W,F.EPSG3395=Wn,F.EPSG3857=G,F.EPSG900913=Y,F.EPSG4326=qn,F.Simple=Un;var Vn=S.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[r(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[r(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var n=this.getEvents();e.on(n,this),this.once("remove",(function(){e.off(n,this)}),this)}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}});sn.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=r(t);return this._layers[e]||(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=r(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return r(t)in this._layers},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},_addLayers:function(t){for(var e=0,n=(t=t?g(t)?t:[t]:[]).length;e<n;e++)this.addLayer(t[e])},_addZoomLimit:function(t){isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[r(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=r(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,n=this._getZoomSpan();for(var i in this._zoomBoundLayers){var o=this._zoomBoundLayers[i].options;t=void 0===o.minZoom?t:Math.min(t,o.minZoom),e=void 0===o.maxZoom?e:Math.max(e,o.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Kn=Vn.extend({initialize:function(t,e){var n,i;if(p(this,e),this._layers={},t)for(n=0,i=t.length;n<i;n++)this.addLayer(t[n])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return("number"==typeof t?t:this.getLayerId(t))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,n,i=Array.prototype.slice.call(arguments,1);for(e in this._layers)(n=this._layers[e])[t]&&n[t].apply(n,i);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);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 r(t)}}),Gn=function(t,e){return new Kn(t,e)},Yn=Kn.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Kn.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),Kn.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 e in this._layers){var n=this._layers[e];t.extend(n.getBounds?n.getBounds():n.getLatLng())}return t}}),Xn=function(t,e){return new Yn(t,e)},Jn=C.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){p(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var n=this._getIconUrl(t);if(!n){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var i=this._createImg(n,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(i,t),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),i},_setIconStyles:function(t,e){var n=this.options,i=n[e+"Size"];"number"==typeof i&&(i=[i,i]);var o=I(i),s=I("shadow"===e&&n.shadowAnchor||n.iconAnchor||o&&o.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(n.className||""),s&&(t.style.marginLeft=-s.x+"px",t.style.marginTop=-s.y+"px"),o&&(t.style.width=o.x+"px",t.style.height=o.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return Nt.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function Qn(t){return new Jn(t)}var ti=Jn.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"string"!=typeof ti.imagePath&&(ti.imagePath=this._detectIconPath()),(this.options.imagePath||ti.imagePath)+Jn.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var e=function(t,e,n){var i=e.exec(t);return i&&i[n]};return(t=e(t,/^url\((['"])?(.+)\1\)$/,2))&&e(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=fe("div","leaflet-default-icon-path",document.body),e=me(t,"background-image")||me(t,"backgroundImage");if(document.body.removeChild(t),e=this._stripUrl(e))return e;var n=document.querySelector('link[href$="leaflet.css"]');return n?n.href.substring(0,n.href.length-"leaflet.css".length-1):""}}),ei=vn.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new xn(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),we(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&&xe(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,n=e._map,i=this._marker.options.autoPanSpeed,o=this._marker.options.autoPanPadding,s=Ee(e._icon),r=n.getPixelBounds(),a=n.getPixelOrigin(),l=D(r.min._subtract(a).add(o),r.max._subtract(a).subtract(o));if(!l.contains(s)){var c=I((Math.max(l.max.x,s.x)-l.max.x)/(r.max.x-l.max.x)-(Math.min(l.min.x,s.x)-l.min.x)/(r.min.x-l.min.x),(Math.max(l.max.y,s.y)-l.max.y)/(r.max.y-l.max.y)-(Math.min(l.min.y,s.y)-l.min.y)/(r.min.y-l.min.y)).multiplyBy(i);n.panBy(c,{animate:!1}),this._draggable._newPos._add(c),this._draggable._startPos._add(c),Ce(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=P(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&&(M(this._panRequest),this._panRequest=P(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,n=e._shadow,i=Ee(e._icon),o=e._map.layerPointToLatLng(i);n&&Ce(n,i),e._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){M(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),ni=Vn.extend({options:{icon:new ti,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,e){p(this,e),this._latlng=R(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 e=this._latlng;return this._latlng=R(t),this.update(),this.fire("move",{oldLatLng:e,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,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),n=t.icon.createIcon(this._icon),i=!1;n!==this._icon&&(this._icon&&this._removeIcon(),i=!0,t.title&&(n.title=t.title),"IMG"===n.tagName&&(n.alt=t.alt||"")),we(n,e),t.keyboard&&(n.tabIndex="0",n.setAttribute("role","button")),this._icon=n,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Ze(n,"focus",this._panOnFocus,this);var o=t.icon.createShadow(this._shadow),s=!1;o!==this._shadow&&(this._removeShadow(),s=!0),o&&(we(o,e),o.alt=""),this._shadow=o,t.opacity<1&&this._updateOpacity(),i&&this.getPane().appendChild(this._icon),this._initInteraction(),o&&s&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Re(this._icon,"focus",this._panOnFocus,this),_e(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&_e(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&Ce(this._icon,t),this._shadow&&Ce(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 e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(we(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),ei)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new ei(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&&Te(this._icon,t),this._shadow&&Te(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var t=this._map;if(t){var e=this.options.icon.options,n=e.iconSize?I(e.iconSize):I(0,0),i=e.iconAnchor?I(e.iconAnchor):I(0,0);t.panInside(this._latlng,{paddingTopLeft:i,paddingBottomRight:n.subtract(i)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function ii(t,e){return new ni(t,e)}var oi=Vn.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 p(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)}}),si=oi.extend({options:{fill:!0,radius:10},initialize:function(t,e){p(this,e),this._latlng=R(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=R(t),this.redraw(),this.fire("move",{oldLatLng:e,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 e=t&&t.radius||this._radius;return oi.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,n=this._clickTolerance(),i=[t+n,e+n];this._pxBounds=new B(this._point.subtract(i),this._point.add(i))},_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 ri(t,e){return new si(t,e)}var ai=si.extend({initialize:function(t,e,i){if("number"==typeof e&&(e=n({},i,{radius:e})),p(this,e),this._latlng=R(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:oi.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,n=this._map,i=n.options.crs;if(i.distance===W.distance){var o=Math.PI/180,s=this._mRadius/W.R/o,r=n.project([e+s,t]),a=n.project([e-s,t]),l=r.add(a).divideBy(2),c=n.unproject(l).lat,h=Math.acos((Math.cos(s*o)-Math.sin(e*o)*Math.sin(c*o))/(Math.cos(e*o)*Math.cos(c*o)))/o;(isNaN(h)||0===h)&&(h=s/Math.cos(Math.PI/180*e)),this._point=l.subtract(n.getPixelOrigin()),this._radius=isNaN(h)?0:l.x-n.project([c,t-h]).x,this._radiusY=l.y-r.y}else{var u=i.unproject(i.project(this._latlng).subtract([this._mRadius,0]));this._point=n.latLngToLayerPoint(this._latlng),this._radius=this._point.x-n.latLngToLayerPoint(u).x}this._updateBounds()}});function li(t,e,n){return new ai(t,e,n)}var ci=oi.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){p(this,e),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 e,n,i=1/0,o=null,s=On,r=0,a=this._parts.length;r<a;r++)for(var l=this._parts[r],c=1,h=l.length;c<h;c++){var u=s(t,e=l[c-1],n=l[c],!0);u<i&&(i=u,o=s(t,e,n))}return o&&(o.distance=Math.sqrt(i)),o},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Bn(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=R(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new N,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return zn(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],n=zn(t),i=0,o=t.length;i<o;i++)n?(e[i]=R(t[i]),this._bounds.extend(e[i])):e[i]=this._convertLatLngs(t[i]);return e},_project:function(){var t=new B;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(),e=new O(t,t);this._rawPxBounds&&(this._pxBounds=new B([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)]))},_projectLatlngs:function(t,e,n){var i,o,s=t[0]instanceof j,r=t.length;if(s){for(o=[],i=0;i<r;i++)o[i]=this._map.latLngToLayerPoint(t[i]),n.extend(o[i]);e.push(o)}else for(i=0;i<r;i++)this._projectLatlngs(t[i],e,n)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var e,n,i,o,s,r,a,l=this._parts;for(e=0,i=0,o=this._rings.length;e<o;e++)for(n=0,s=(a=this._rings[e]).length;n<s-1;n++)(r=Cn(a[n],a[n+1],t,n,!0))&&(l[i]=l[i]||[],l[i].push(r[0]),r[1]===a[n+1]&&n!==s-2||(l[i].push(r[1]),i++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,n=0,i=t.length;n<i;n++)t[n]=$n(t[n],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var n,i,o,s,r,a,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(n=0,s=this._parts.length;n<s;n++)for(i=0,o=(r=(a=this._parts[n]).length)-1;i<r;o=i++)if((e||0!==i)&&Ln(t,a[o],a[i])<=l)return!0;return!1}});function hi(t,e){return new ci(t,e)}ci._flat=In;var ui=ci.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 Zn(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(t){var e=ci.prototype._convertLatLngs.call(this,t),n=e.length;return n>=2&&e[0]instanceof j&&e[0].equals(e[n-1])&&e.pop(),e},_setLatLngs:function(t){ci.prototype._setLatLngs.call(this,t),zn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return zn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,n=new O(e,e);if(t=new B(t.min.subtract(n),t.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var i,o=0,s=this._rings.length;o<s;o++)(i=Nn(this._rings[o],t,!0)).length&&this._parts.push(i)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,n,i,o,s,r,a,l,c=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(o=0,a=this._parts.length;o<a;o++)for(s=0,r=(l=(e=this._parts[o]).length)-1;s<l;r=s++)n=e[s],i=e[r],n.y>t.y!=i.y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(c=!c);return c||ci.prototype._containsPoint.call(this,t,!0)}});function di(t,e){return new ui(t,e)}var pi=Yn.extend({initialize:function(t,e){p(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,i,o=g(t)?t:t.features;if(o){for(e=0,n=o.length;e<n;e++)((i=o[e]).geometries||i.geometry||i.features||i.coordinates)&&this.addData(i);return this}var s=this.options;if(s.filter&&!s.filter(t))return this;var r=mi(t,s);return r?(r.feature=wi(t),r.defaultOptions=r.options,this.resetStyle(r),s.onEachFeature&&s.onEachFeature(t,r),this.addLayer(r)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=n({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer((function(e){this._setLayerStyle(e,t)}),this)},_setLayerStyle:function(t,e){t.setStyle&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))}});function mi(t,e){var n,i,o,s,r="Feature"===t.type?t.geometry:t,a=r?r.coordinates:null,l=[],c=e&&e.pointToLayer,h=e&&e.coordsToLatLng||_i;if(!a&&!r)return null;switch(r.type){case"Point":return fi(c,t,n=h(a),e);case"MultiPoint":for(o=0,s=a.length;o<s;o++)n=h(a[o]),l.push(fi(c,t,n,e));return new Yn(l);case"LineString":case"MultiLineString":return i=gi(a,"LineString"===r.type?0:1,h),new ci(i,e);case"Polygon":case"MultiPolygon":return i=gi(a,"Polygon"===r.type?1:2,h),new ui(i,e);case"GeometryCollection":for(o=0,s=r.geometries.length;o<s;o++){var u=mi({geometry:r.geometries[o],type:"Feature",properties:t.properties},e);u&&l.push(u)}return new Yn(l);case"FeatureCollection":for(o=0,s=r.features.length;o<s;o++){var d=mi(r.features[o],e);d&&l.push(d)}return new Yn(l);default:throw new Error("Invalid GeoJSON object.")}}function fi(t,e,n,i){return t?t(e,n):new ni(n,i&&i.markersInheritOptions&&i)}function _i(t){return new j(t[1],t[0],t[2])}function gi(t,e,n){for(var i,o=[],s=0,r=t.length;s<r;s++)i=e?gi(t[s],e-1,n):(n||_i)(t[s]),o.push(i);return o}function vi(t,e){return void 0!==(t=R(t)).alt?[h(t.lng,e),h(t.lat,e),h(t.alt,e)]:[h(t.lng,e),h(t.lat,e)]}function yi(t,e,n,i){for(var o=[],s=0,r=t.length;s<r;s++)o.push(e?yi(t[s],zn(t[s])?0:e-1,n,i):vi(t[s],i));return!e&&n&&o.push(o[0].slice()),o}function bi(t,e){return t.feature?n({},t.feature,{geometry:e}):wi(e)}function wi(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var xi={toGeoJSON:function(t){return bi(this,{type:"Point",coordinates:vi(this.getLatLng(),t)})}};function $i(t,e){return new pi(t,e)}ni.include(xi),ai.include(xi),si.include(xi),ci.include({toGeoJSON:function(t){var e=!zn(this._latlngs);return bi(this,{type:(e?"Multi":"")+"LineString",coordinates:yi(this._latlngs,e?1:0,!1,t)})}}),ui.include({toGeoJSON:function(t){var e=!zn(this._latlngs),n=e&&!zn(this._latlngs[0]),i=yi(this._latlngs,n?2:e?1:0,!0,t);return e||(i=[i]),bi(this,{type:(n?"Multi":"")+"Polygon",coordinates:i})}}),Kn.include({toMultiPoint:function(t){var e=[];return this.eachLayer((function(n){e.push(n.toGeoJSON(t).geometry.coordinates)})),bi(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var n="GeometryCollection"===e,i=[];return this.eachLayer((function(e){if(e.toGeoJSON){var o=e.toGeoJSON(t);if(n)i.push(o.geometry);else{var s=wi(o);"FeatureCollection"===s.type?i.push.apply(i,s.features):i.push(s)}}})),n?bi(this,{geometries:i,type:"GeometryCollection"}):{type:"FeatureCollection",features:i}}});var Li=$i,Ti=Vn.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,n){this._url=t,this._bounds=Z(e),p(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(we(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){_e(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&&ve(this._image),this},bringToBack:function(){return this._map&&ye(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=Z(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="IMG"===this._url.tagName,e=this._image=t?this._url:fe("img");we(e,"leaflet-image-layer"),this._zoomAnimated&&we(e,"leaflet-zoom-animated"),this.options.className&&we(e,this.options.className),e.onselectstart=c,e.onmousemove=c,e.onload=o(this.fire,this,"load"),e.onerror=o(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;ke(this._image,n,e)},_reset:function(){var t=this._image,e=new B(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=e.getSize();Ce(t,e.min),t.style.width=n.x+"px",t.style.height=n.y+"px"},_updateOpacity:function(){Te(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(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()}}),Pi=function(t,e,n){return new Ti(t,e,n)},Mi=Ti.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:fe("video");if(we(e,"leaflet-image-layer"),this._zoomAnimated&&we(e,"leaflet-zoom-animated"),this.options.className&&we(e,this.options.className),e.onselectstart=c,e.onmousemove=c,e.onloadeddata=o(this.fire,this,"load"),t){for(var n=e.getElementsByTagName("source"),i=[],s=0;s<n.length;s++)i.push(n[s].src);this._url=n.length>0?i:[e.src]}else{g(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(var r=0;r<this._url.length;r++){var a=fe("source");a.src=this._url[r],e.appendChild(a)}}}});function ki(t,e,n){return new Mi(t,e,n)}var Ci=Ti.extend({_initImage:function(){var t=this._image=this._url;we(t,"leaflet-image-layer"),this._zoomAnimated&&we(t,"leaflet-zoom-animated"),this.options.className&&we(t,this.options.className),t.onselectstart=c,t.onmousemove=c}});function Ei(t,e,n){return new Ci(t,e,n)}var Ai=Vn.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,e){t&&(t instanceof j||g(t))?(this._latlng=R(t),p(this,e)):(p(this,t),this._source=e),this.options.content&&(this._content=this.options.content)},openOn:function(t){return(t=arguments.length?t:this._source._map).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&&Te(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&Te(this._container,1),this.bringToFront(),this.options.interactive&&(we(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(Te(this._container,0),this._removeTimeout=setTimeout(o(_e,void 0,this._container),200)):_e(this._container),this.options.interactive&&(xe(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=R(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&&ve(this._container),this},bringToBack:function(){return this._map&&ye(this._container),this},_prepareOpen:function(t){var e=this._source;if(!e._map)return!1;if(e instanceof Yn){e=null;var n=this._source._layers;for(var i in n)if(n[i]._map){e=n[i];break}if(!e)return!1;this._source=e}if(!t)if(e.getCenter)t=e.getCenter();else if(e.getLatLng)t=e.getLatLng();else{if(!e.getBounds)throw new Error("Unable to get source layer LatLng.");t=e.getBounds().getCenter()}return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=I(this.options.offset),n=this._getAnchor();this._zoomAnimated?Ce(this._container,t.add(n)):e=e.add(t).add(n);var i=this._containerBottom=-e.y,o=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=i+"px",this._container.style.left=o+"px"}},_getAnchor:function(){return[0,0]}});sn.include({_initOverlay:function(t,e,n,i){var o=e;return o instanceof t||(o=new t(i).setContent(e)),n&&o.setLatLng(n),o}}),Vn.include({_initOverlay:function(t,e,n,i){var o=n;return o instanceof t?(p(o,i),o._source=this):(o=e&&!i?e:new t(i,this)).setContent(n),o}});var Si=Ai.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).hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,Ai.prototype.openOn.call(this,t)},onAdd:function(t){Ai.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof oi||this._source.on("preclick",Ue))},onRemove:function(t){Ai.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof oi||this._source.off("preclick",Ue))},getEvents:function(){var t=Ai.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?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",e=this._container=fe("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=fe("div",t+"-content-wrapper",e);if(this._contentNode=fe("div",t+"-content",n),Ke(e),Ve(this._contentNode),Ze(e,"contextmenu",Ue),this._tipContainer=fe("div",t+"-tip-container",e),this._tip=fe("div",t+"-tip",this._tipContainer),this.options.closeButton){var i=this._closeButton=fe("a",t+"-close-button",e);i.setAttribute("role","button"),i.setAttribute("aria-label","Close popup"),i.href="#close",i.innerHTML='<span aria-hidden="true">×</span>',Ze(i,"click",(function(t){Ge(t),this.close()}),this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var n=t.offsetWidth;n=Math.min(n,this.options.maxWidth),n=Math.max(n,this.options.minWidth),e.width=n+1+"px",e.whiteSpace="",e.height="";var i=t.offsetHeight,o=this.options.maxHeight,s="leaflet-popup-scrolled";o&&i>o?(e.height=o+"px",we(t,s)):xe(t,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),n=this._getAnchor();Ce(this._container,e.add(n))},_adjustPan:function(){if(this.options.autoPan)if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning)this._autopanning=!1;else{var t=this._map,e=parseInt(me(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,i=this._containerWidth,o=new O(this._containerLeft,-n-this._containerBottom);o._add(Ee(this._container));var s=t.layerPointToContainerPoint(o),r=I(this.options.autoPanPadding),a=I(this.options.autoPanPaddingTopLeft||r),l=I(this.options.autoPanPaddingBottomRight||r),c=t.getSize(),h=0,u=0;s.x+i+l.x>c.x&&(h=s.x+i-c.x+l.x),s.x-h-a.x<0&&(h=s.x-a.x),s.y+n+l.y>c.y&&(u=s.y+n-c.y+l.y),s.y-u-a.y<0&&(u=s.y-a.y),(h||u)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([h,u]))}},_getAnchor:function(){return I(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Oi=function(t,e){return new Si(t,e)};sn.mergeOptions({closePopupOnClick:!0}),sn.include({openPopup:function(t,e,n){return this._initOverlay(Si,t,e,n).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),Vn.include({bindPopup:function(t,e){return this._popup=this._initOverlay(Si,this._popup,t,e),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 Yn||(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()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(this._popup&&this._map){Ye(t);var e=t.layer||t.target;this._popup._source!==e||e instanceof oi?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var zi=Ai.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Ai.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){Ai.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=Ai.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=fe("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+r(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,n,i=this._map,o=this._container,s=i.latLngToContainerPoint(i.getCenter()),r=i.layerPointToContainerPoint(t),a=this.options.direction,l=o.offsetWidth,c=o.offsetHeight,h=I(this.options.offset),u=this._getAnchor();"top"===a?(e=l/2,n=c):"bottom"===a?(e=l/2,n=0):"center"===a?(e=l/2,n=c/2):"right"===a?(e=0,n=c/2):"left"===a?(e=l,n=c/2):r.x<s.x?(a="right",e=0,n=c/2):(a="left",e=l+2*(h.x+u.x),n=c/2),t=t.subtract(I(e,n,!0)).add(h).add(u),xe(o,"leaflet-tooltip-right"),xe(o,"leaflet-tooltip-left"),xe(o,"leaflet-tooltip-top"),xe(o,"leaflet-tooltip-bottom"),we(o,"leaflet-tooltip-"+a),Ce(o,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&Te(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return I(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),Ii=function(t,e){return new zi(t,e)};sn.include({openTooltip:function(t,e,n){return this._initOverlay(zi,t,e,n).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),Vn.include({bindTooltip:function(t,e){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(zi,this._tooltip,t,e),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 e=t?"off":"on",n={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?n.add=this._openTooltip:(n.mouseover=this._openTooltip,n.mouseout=this.closeTooltip,n.click=this._openTooltip,this._map?this._addFocusListeners():n.add=this._addFocusListeners),this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),this[e](n),this._tooltipHandlersAdded=!t}},openTooltip:function(t){return this._tooltip&&(this instanceof Yn||(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 e=t.getElement();e&&(Ze(e,"focus",(function(){this._tooltip._source=t,this.openTooltip()}),this),Ze(e,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(t){var e=t.getElement();e&&e.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(t){!this._tooltip||!this._map||this._map.dragging&&this._map.dragging.moving()||(this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0))},_moveTooltip:function(t){var e,n,i=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),n=this._map.containerPointToLayerPoint(e),i=this._map.layerPointToLatLng(n)),this._tooltip.setLatLng(i)}});var Bi=Jn.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),n=this.options;if(n.html instanceof Element?(ge(e),e.appendChild(n.html)):e.innerHTML=!1!==n.html?n.html:"",n.bgPos){var i=I(n.bgPos);e.style.backgroundPosition=-i.x+"px "+-i.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});function Di(t){return new Bi(t)}Jn.Default=ti;var Ni=Vn.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Nt.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){p(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),_e(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(ve(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(ye(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=a(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 O?t:new O(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,n=this.getPane().children,i=-t(-1/0,1/0),o=0,s=n.length;o<s;o++)e=n[o].style.zIndex,n[o]!==this._container&&e&&(i=t(i,+e));isFinite(i)&&(this.options.zIndex=i+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Nt.ielt9){Te(this._container,this.options.opacity);var t=+new Date,e=!1,n=!1;for(var i in this._tiles){var o=this._tiles[i];if(o.current&&o.loaded){var s=Math.min(1,(t-o.loaded)/200);Te(o.el,s),s<1?e=!0:(o.active?n=!0:this._onOpaqueTile(o),o.active=!0)}}n&&!this._noPrune&&this._pruneTiles(),e&&(M(this._fadeFrame),this._fadeFrame=P(this._updateOpacity,this))}},_onOpaqueTile:c,_initContainer:function(){this._container||(this._container=fe("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,e=this.options.maxZoom;if(void 0!==t){for(var n in this._levels)n=Number(n),this._levels[n].el.children.length||n===t?(this._levels[n].el.style.zIndex=e-Math.abs(t-n),this._onUpdateLevel(n)):(_e(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var i=this._levels[t],o=this._map;return i||((i=this._levels[t]={}).el=fe("div","leaflet-tile-container leaflet-zoom-animated",this._container),i.el.style.zIndex=e,i.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),i.zoom=t,this._setZoomTransform(i,o.getCenter(),o.getZoom()),c(i.el.offsetWidth),this._onCreateLevel(i)),this._level=i,i}},_onUpdateLevel:c,_onRemoveLevel:c,_onCreateLevel:c,_pruneTiles:function(){if(this._map){var t,e,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)if((e=this._tiles[t]).current&&!e.active){var i=e.coords;this._retainParent(i.x,i.y,i.z,i.z-5)||this._retainChildren(i.x,i.y,i.z,i.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)_e(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,n,i){var o=Math.floor(t/2),s=Math.floor(e/2),r=n-1,a=new O(+o,+s);a.z=+r;var l=this._tileCoordsToKey(a),c=this._tiles[l];return c&&c.active?(c.retain=!0,!0):(c&&c.loaded&&(c.retain=!0),r>i&&this._retainParent(o,s,r,i))},_retainChildren:function(t,e,n,i){for(var o=2*t;o<2*t+2;o++)for(var s=2*e;s<2*e+2;s++){var r=new O(o,s);r.z=n+1;var a=this._tileCoordsToKey(r),l=this._tiles[a];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),n+1<i&&this._retainChildren(o,s,n+1,i))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,n,i){var o=Math.round(e);o=void 0!==this.options.maxZoom&&o>this.options.maxZoom||void 0!==this.options.minZoom&&o<this.options.minZoom?void 0:this._clampZoom(o);var s=this.options.updateWhenZooming&&o!==this._tileZoom;i&&!s||(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==o&&this._update(t),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var n in this._levels)this._setZoomTransform(this._levels[n],t,e)},_setZoomTransform:function(t,e,n){var i=this._map.getZoomScale(n,t.zoom),o=t.origin.multiplyBy(i).subtract(this._map._getNewPixelOrigin(e,n)).round();Nt.any3d?ke(t.el,o,i):Ce(t.el,o)},_resetGrid:function(){var t=this._map,e=t.options.crs,n=this._tileSize=this.getTileSize(),i=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],i).x/n.x),Math.ceil(t.project([0,e.wrapLng[1]],i).x/n.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],i).y/n.x),Math.ceil(t.project([e.wrapLat[1],0],i).y/n.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,n=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),i=e.getZoomScale(n,this._tileZoom),o=e.project(t,this._tileZoom).floor(),s=e.getSize().divideBy(2*i);return new B(o.subtract(s),o.add(s))},_update:function(t){var e=this._map;if(e){var n=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var i=this._getTiledPixelBounds(t),o=this._pxBoundsToTileRange(i),s=o.getCenter(),r=[],a=this.options.keepBuffer,l=new B(o.getBottomLeft().subtract([a,-a]),o.getTopRight().add([a,-a]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var c in this._tiles){var h=this._tiles[c].coords;h.z===this._tileZoom&&l.contains(new O(h.x,h.y))||(this._tiles[c].current=!1)}if(Math.abs(n-this._tileZoom)>1)this._setView(t,n);else{for(var u=o.min.y;u<=o.max.y;u++)for(var d=o.min.x;d<=o.max.x;d++){var p=new O(d,u);if(p.z=this._tileZoom,this._isValidTile(p)){var m=this._tiles[this._tileCoordsToKey(p)];m?m.current=!0:r.push(p)}}if(r.sort((function(t,e){return t.distanceTo(s)-e.distanceTo(s)})),0!==r.length){this._loading||(this._loading=!0,this.fire("loading"));var f=document.createDocumentFragment();for(d=0;d<r.length;d++)this._addTile(r[d],f);this._level.el.appendChild(f)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var n=this._globalTileRange;if(!e.wrapLng&&(t.x<n.min.x||t.x>n.max.x)||!e.wrapLat&&(t.y<n.min.y||t.y>n.max.y))return!1}if(!this.options.bounds)return!0;var i=this._tileCoordsToBounds(t);return Z(this.options.bounds).overlaps(i)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,n=this.getTileSize(),i=t.scaleBy(n),o=i.add(n);return[e.unproject(i,t.z),e.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),n=new N(e[0],e[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),n=new O(+e[0],+e[1]);return n.z=+e[2],n},_removeTile:function(t){var e=this._tiles[t];e&&(_e(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){we(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=c,t.onmousemove=c,Nt.ielt9&&this.options.opacity<1&&Te(t,this.options.opacity)},_addTile:function(t,e){var n=this._getTilePos(t),i=this._tileCoordsToKey(t),s=this.createTile(this._wrapCoords(t),o(this._tileReady,this,t));this._initTile(s),this.createTile.length<2&&P(o(this._tileReady,this,t,null,s)),Ce(s,n),this._tiles[i]={el:s,coords:t,current:!0},e.appendChild(s),this.fire("tileloadstart",{tile:s,coords:t})},_tileReady:function(t,e,n){e&&this.fire("tileerror",{error:e,tile:n,coords:t});var i=this._tileCoordsToKey(t);(n=this._tiles[i])&&(n.loaded=+new Date,this._map._fadeAnimated?(Te(n.el,0),M(this._fadeFrame),this._fadeFrame=P(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(we(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Nt.ielt9||!this._map._fadeAnimated?P(this._pruneTiles,this):setTimeout(o(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new O(this._wrapX?l(t.x,this._wrapX):t.x,this._wrapY?l(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new B(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function Zi(t){return new Ni(t)}var ji=Ni.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,(e=p(this,e)).detectRetina&&Nt.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var n=document.createElement("img");return Ze(n,"load",o(this._tileOnLoad,this,e,n)),Ze(n,"error",o(this._tileOnError,this,e,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(n.referrerPolicy=this.options.referrerPolicy),n.alt="",n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:Nt.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return _(this._url,n(e,this.options))},_tileOnLoad:function(t,e){Nt.ielt9?setTimeout(o(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,n){var i=this.options.errorTileUrl;i&&e.getAttribute("src")!==i&&(e.src=i),t(n,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=c,e.onerror=c,!e.complete)){e.src=y;var n=this._tiles[t].coords;_e(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:n})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",y),Ni.prototype._removeTile.call(this,t)},_tileReady:function(t,e,n){if(this._map&&(!n||n.getAttribute("src")!==y))return Ni.prototype._tileReady.call(this,t,e,n)}});function Ri(t,e){return new ji(t,e)}var Hi=ji.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,e){this._url=t;var i=n({},this.defaultWmsParams);for(var o in e)o in this.options||(i[o]=e[o]);var s=(e=p(this,e)).detectRetina&&Nt.retina?2:1,r=this.getTileSize();i.width=r.x*s,i.height=r.y*s,this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,ji.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),n=this._crs,i=D(n.project(e[0]),n.project(e[1])),o=i.min,s=i.max,r=(this._wmsVersion>=1.3&&this._crs===qn?[o.y,o.x,s.y,s.x]:[o.x,o.y,s.x,s.y]).join(","),a=ji.prototype.getTileUrl.call(this,t);return a+m(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(t,e){return n(this.wmsParams,t),e||this.redraw(),this}});function Fi(t,e){return new Hi(t,e)}ji.WMS=Hi,Ri.wms=Fi;var Wi=Vn.extend({options:{padding:.1},initialize:function(t){p(this,t),r(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&we(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,e){var n=this._map.getZoomScale(e,this._zoom),i=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),s=i.multiplyBy(-n).add(o).subtract(this._map._getNewPixelOrigin(t,e));Nt.any3d?ke(this._container,s,n):Ce(this._container,s)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),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,e=this._map.getSize(),n=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new B(n,n.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),qi=Wi.extend({options:{tolerance:0},getEvents:function(){var t=Wi.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Wi.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Ze(t,"mousemove",this._onMouseMove,this),Ze(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ze(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){M(this._redrawRequest),delete this._ctx,_e(this._container),Re(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){Wi.prototype._update.call(this);var t=this._bounds,e=this._container,n=t.getSize(),i=Nt.retina?2:1;Ce(e,t.min),e.width=i*n.x,e.height=i*n.y,e.style.width=n.x+"px",e.style.height=n.y+"px",Nt.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){Wi.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[r(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,n=e.next,i=e.prev;n?n.prev=i:this._drawLast=i,i?i.next=n:this._drawFirst=n,delete t._order,delete this._layers[r(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("string"==typeof t.options.dashArray){var e,n,i=t.options.dashArray.split(/[, ]+/),o=[];for(n=0;n<i.length;n++){if(e=Number(i[n]),isNaN(e))return;o.push(e)}t.options._dashArray=o}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||P(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new B,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_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 e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.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,e=this._redrawBounds;if(this._ctx.save(),e){var n=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,n.x,n.y),this._ctx.clip()}this._drawing=!0;for(var i=this._drawFirst;i;i=i.next)t=i.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var n,i,o,s,r=t._parts,a=r.length,l=this._ctx;if(a){for(l.beginPath(),n=0;n<a;n++){for(i=0,o=r[n].length;i<o;i++)s=r[n][i],l[i?"lineTo":"moveTo"](s.x,s.y);e&&l.closePath()}this._fillStroke(l,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,n=this._ctx,i=Math.max(Math.round(t._radius),1),o=(Math.max(Math.round(t._radiusY),1)||i)/i;1!==o&&(n.save(),n.scale(1,o)),n.beginPath(),n.arc(e.x,e.y/o,i,0,2*Math.PI,!1),1!==o&&n.restore(),this._fillStroke(n,t)}},_fillStroke:function(t,e){var n=e.options;n.fill&&(t.globalAlpha=n.fillOpacity,t.fillStyle=n.fillColor||n.color,t.fill(n.fillRule||"evenodd")),n.stroke&&0!==n.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=n.opacity,t.lineWidth=n.weight,t.strokeStyle=n.color,t.lineCap=n.lineCap,t.lineJoin=n.lineJoin,t.stroke())},_onClick:function(t){for(var e,n,i=this._map.mouseEventToLayerPoint(t),o=this._drawFirst;o;o=o.next)(e=o.layer).options.interactive&&e._containsPoint(i)&&("click"!==t.type&&"preclick"!==t.type||!this._map._draggableMoved(e))&&(n=e);this._fireEvent(!!n&&[n],t)},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(xe(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,e){if(!this._mouseHoverThrottled){for(var n,i,s=this._drawFirst;s;s=s.next)(n=s.layer).options.interactive&&n._containsPoint(e)&&(i=n);i!==this._hoveredLayer&&(this._handleMouseOut(t),i&&(we(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseover"),this._hoveredLayer=i)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(o((function(){this._mouseHoverThrottled=!1}),this),32)}},_fireEvent:function(t,e,n){this._map._fireDOMEvent(e,n||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var n=e.next,i=e.prev;n&&(n.prev=i,i?i.next=n:n&&(this._drawFirst=n),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t))}},_bringToBack:function(t){var e=t._order;if(e){var n=e.next,i=e.prev;i&&(i.next=n,n?n.prev=i:i&&(this._drawLast=i),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}});function Ui(t){return Nt.canvas?new qi(t):null}var Vi=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Ki={_initContainer:function(){this._container=fe("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Wi.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Vi("shape");we(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Vi("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[r(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;_e(e),t.removeInteractiveTarget(e),delete this._layers[r(t)]},_updateStyle:function(t){var e=t._stroke,n=t._fill,i=t.options,o=t._container;o.stroked=!!i.stroke,o.filled=!!i.fill,i.stroke?(e||(e=t._stroke=Vi("stroke")),o.appendChild(e),e.weight=i.weight+"px",e.color=i.color,e.opacity=i.opacity,i.dashArray?e.dashStyle=g(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=i.lineCap.replace("butt","flat"),e.joinstyle=i.lineJoin):e&&(o.removeChild(e),t._stroke=null),i.fill?(n||(n=t._fill=Vi("fill")),o.appendChild(n),n.color=i.fillColor||i.color,n.opacity=i.fillOpacity):n&&(o.removeChild(n),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),n=Math.round(t._radius),i=Math.round(t._radiusY||n);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+n+","+i+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){ve(t._container)},_bringToBack:function(t){ye(t._container)}},Gi=Nt.vml?Vi:X,Yi=Wi.extend({_initContainer:function(){this._container=Gi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Gi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){_e(this._container),Re(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){Wi.prototype._update.call(this);var t=this._bounds,e=t.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,n.setAttribute("width",e.x),n.setAttribute("height",e.y)),Ce(n,t.min),n.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=Gi("path");t.options.className&&we(e,t.options.className),t.options.interactive&&we(e,"leaflet-interactive"),this._updateStyle(t),this._layers[r(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){_e(t._path),t.removeInteractiveTarget(t._path),delete this._layers[r(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,n=t.options;e&&(n.stroke?(e.setAttribute("stroke",n.color),e.setAttribute("stroke-opacity",n.opacity),e.setAttribute("stroke-width",n.weight),e.setAttribute("stroke-linecap",n.lineCap),e.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?e.setAttribute("stroke-dasharray",n.dashArray):e.removeAttribute("stroke-dasharray"),n.dashOffset?e.setAttribute("stroke-dashoffset",n.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),n.fill?(e.setAttribute("fill",n.fillColor||n.color),e.setAttribute("fill-opacity",n.fillOpacity),e.setAttribute("fill-rule",n.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,J(t._parts,e))},_updateCircle:function(t){var e=t._point,n=Math.max(Math.round(t._radius),1),i="a"+n+","+(Math.max(Math.round(t._radiusY),1)||n)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(e.x-n)+","+e.y+i+2*n+",0 "+i+2*-n+",0 ";this._setPath(t,o)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){ve(t._path)},_bringToBack:function(t){ye(t._path)}});function Xi(t){return Nt.svg||Nt.vml?new Yi(t):null}Nt.vml&&Yi.include(Ki),sn.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&Ui(t)||Xi(t)}});var Ji=ui.extend({initialize:function(t,e){ui.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=Z(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function Qi(t,e){return new Ji(t,e)}Yi.create=Gi,Yi.pointsToPath=J,pi.geometryToLayer=mi,pi.coordsToLatLng=_i,pi.coordsToLatLngs=gi,pi.latLngToCoords=vi,pi.latLngsToCoords=yi,pi.getFeature=bi,pi.asFeature=wi,sn.mergeOptions({boxZoom:!0});var to=vn.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(){Ze(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Re(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){_e(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),se(),Se(),this._startPoint=this._map.mouseEventToContainerPoint(t),Ze(document,{contextmenu:Ye,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=fe("div","leaflet-zoom-box",this._container),we(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new B(this._point,this._startPoint),n=e.getSize();Ce(this._box,e.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(_e(this._box),xe(this._container,"leaflet-crosshair")),re(),Oe(),Re(document,{contextmenu:Ye,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(o(this._resetState,this),0);var e=new N(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});sn.addInitHook("addHandler","boxZoom",to),sn.mergeOptions({doubleClickZoom:!0});var eo=vn.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,n=e.getZoom(),i=e.options.zoomDelta,o=t.originalEvent.shiftKey?n-i:n+i;"center"===e.options.doubleClickZoom?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});sn.addInitHook("addHandler","doubleClickZoom",eo),sn.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var no=vn.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new xn(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))}we(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){xe(this._map._container,"leaflet-grab"),xe(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 e=Z(this._map.options.maxBounds);this._offsetLimit=D(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.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 e=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),this._times.push(e),this._prunePositions(e)}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),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),n=this._initialWorldOffset,i=this._draggable._newPos.x,o=(i-e+n)%t+e-n,s=(i+e+n)%t-e-n,r=Math.abs(o+n)<Math.abs(s+n)?o:s;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=r},_onDragEnd:function(t){var e=this._map,n=e.options,i=!n.inertia||t.noInertia||this._times.length<2;if(e.fire("dragend",t),i)e.fire("moveend");else{this._prunePositions(+new Date);var o=this._lastPos.subtract(this._positions[0]),s=(this._lastTime-this._times[0])/1e3,r=n.easeLinearity,a=o.multiplyBy(r/s),l=a.distanceTo([0,0]),c=Math.min(n.inertiaMaxSpeed,l),h=a.multiplyBy(c/l),u=c/(n.inertiaDeceleration*r),d=h.multiplyBy(-u/2).round();d.x||d.y?(d=e._limitOffset(d,e.options.maxBounds),P((function(){e.panBy(d,{duration:u,easeLinearity:r,noMoveStart:!0,animate:!0})}))):e.fire("moveend")}}});sn.addInitHook("addHandler","dragging",no),sn.mergeOptions({keyboard:!0,keyboardPanDelta:80});var io=vn.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"),Ze(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(),Re(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,e=document.documentElement,n=t.scrollTop||e.scrollTop,i=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(i,n)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,n,i=this._panKeys={},o=this.keyCodes;for(e=0,n=o.left.length;e<n;e++)i[o.left[e]]=[-1*t,0];for(e=0,n=o.right.length;e<n;e++)i[o.right[e]]=[t,0];for(e=0,n=o.down.length;e<n;e++)i[o.down[e]]=[0,t];for(e=0,n=o.up.length;e<n;e++)i[o.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,n,i=this._zoomKeys={},o=this.keyCodes;for(e=0,n=o.zoomIn.length;e<n;e++)i[o.zoomIn[e]]=t;for(e=0,n=o.zoomOut.length;e<n;e++)i[o.zoomOut[e]]=-t},_addHooks:function(){Ze(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Re(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,n=t.keyCode,i=this._map;if(n in this._panKeys){if(!i._panAnim||!i._panAnim._inProgress)if(e=this._panKeys[n],t.shiftKey&&(e=I(e).multiplyBy(3)),i.options.maxBounds&&(e=i._limitOffset(I(e),i.options.maxBounds)),i.options.worldCopyJump){var o=i.wrapLatLng(i.unproject(i.project(i.getCenter()).add(e)));i.panTo(o)}else i.panBy(e)}else if(n in this._zoomKeys)i.setZoom(i.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[n]);else{if(27!==n||!i._popup||!i._popup.options.closeOnEscapeKey)return;i.closePopup()}Ye(t)}}});sn.addInitHook("addHandler","keyboard",io),sn.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var oo=vn.extend({addHooks:function(){Ze(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Re(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=tn(t),n=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var i=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(o(this._performZoom,this),i),Ye(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),n=this._map.options.zoomSnap||0;t._stop();var i=this._delta/(4*this._map.options.wheelPxPerZoomLevel),o=4*Math.log(2/(1+Math.exp(-Math.abs(i))))/Math.LN2,s=n?Math.ceil(o/n)*n:o,r=t._limitZoom(e+(this._delta>0?s:-s))-e;this._delta=0,this._startTime=null,r&&("center"===t.options.scrollWheelZoom?t.setZoom(e+r):t.setZoomAround(this._lastMousePos,e+r))}});sn.addInitHook("addHandler","scrollWheelZoom",oo);var so=600;sn.mergeOptions({tapHold:Nt.touchNative&&Nt.safari&&Nt.mobile,tapTolerance:15});var ro=vn.extend({addHooks:function(){Ze(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Re(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),1===t.touches.length){var e=t.touches[0];this._startPos=this._newPos=new O(e.clientX,e.clientY),this._holdTimeout=setTimeout(o((function(){this._cancel(),this._isTapValid()&&(Ze(document,"touchend",Ge),Ze(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))}),this),so),Ze(document,"touchend touchcancel contextmenu",this._cancel,this),Ze(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){Re(document,"touchend",Ge),Re(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),Re(document,"touchend touchcancel contextmenu",this._cancel,this),Re(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new O(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var n=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});n._simulated=!0,e.target.dispatchEvent(n)}});sn.addInitHook("addHandler","tapHold",ro),sn.mergeOptions({touchZoom:Nt.touch,bounceAtZoomLimits:!0});var ao=vn.extend({addHooks:function(){we(this._map._container,"leaflet-touch-zoom"),Ze(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){xe(this._map._container,"leaflet-touch-zoom"),Re(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(n.add(i)._divideBy(2))),this._startDist=n.distanceTo(i),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),Ze(document,"touchmove",this._onTouchMove,this),Ze(document,"touchend touchcancel",this._onTouchEnd,this),Ge(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]),s=n.distanceTo(i)/this._startDist;if(this._zoom=e.getScaleZoom(s,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&s<1||this._zoom>e.getMaxZoom()&&s>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===s)return}else{var r=n._add(i)._divideBy(2)._subtract(this._centerPoint);if(1===s&&0===r.x&&0===r.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(r),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),M(this._animRequest);var a=o(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=P(a,this,!0),Ge(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,M(this._animRequest),Re(document,"touchmove",this._onTouchMove,this),Re(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))):this._zooming=!1}});sn.addInitHook("addHandler","touchZoom",ao),sn.BoxZoom=to,sn.DoubleClickZoom=eo,sn.Drag=no,sn.Keyboard=io,sn.ScrollWheelZoom=oo,sn.TapHold=ro,sn.TouchZoom=ao,t.Bounds=B,t.Browser=Nt,t.CRS=F,t.Canvas=qi,t.Circle=ai,t.CircleMarker=si,t.Class=C,t.Control=an,t.DivIcon=Bi,t.DivOverlay=Ai,t.DomEvent=nn,t.DomUtil=Ne,t.Draggable=xn,t.Evented=S,t.FeatureGroup=Yn,t.GeoJSON=pi,t.GridLayer=Ni,t.Handler=vn,t.Icon=Jn,t.ImageOverlay=Ti,t.LatLng=j,t.LatLngBounds=N,t.Layer=Vn,t.LayerGroup=Kn,t.LineUtil=Dn,t.Map=sn,t.Marker=ni,t.Mixin=bn,t.Path=oi,t.Point=O,t.PolyUtil=jn,t.Polygon=ui,t.Polyline=ci,t.Popup=Si,t.PosAnimation=on,t.Projection=Fn,t.Rectangle=Ji,t.Renderer=Wi,t.SVG=Yi,t.SVGOverlay=Ci,t.TileLayer=ji,t.Tooltip=zi,t.Transformation=V,t.Util=k,t.VideoOverlay=Mi,t.bind=o,t.bounds=D,t.canvas=Ui,t.circle=li,t.circleMarker=ri,t.control=ln,t.divIcon=Di,t.extend=n,t.featureGroup=Xn,t.geoJSON=$i,t.geoJson=Li,t.gridLayer=Zi,t.icon=Qn,t.imageOverlay=Pi,t.latLng=R,t.latLngBounds=Z,t.layerGroup=Gn,t.map=rn,t.marker=ii,t.point=I,t.polygon=di,t.polyline=hi,t.popup=Oi,t.rectangle=Qi,t.setOptions=p,t.stamp=r,t.svg=Xi,t.svgOverlay=Ei,t.tileLayer=Ri,t.tooltip=Ii,t.transformation=K,t.version=e,t.videoOverlay=ki;var lo=window.L;t.noConflict=function(){return window.L=lo,this},window.L=t})(Xe.exports);function Je(e){let n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,L,P,k,C,S,O,z,I,B,D,N;return{c(){n=x("div"),i=x("div"),o=$("map center: "),s=$(e[0]),r=T(),a=x("a"),l=$("view on osm.org"),c=T(),h=x("br"),u=$("\n map zoom: "),d=$(e[1]),p=T(),m=x("br"),f=$("\n viewbox: "),_=$(e[2]),g=T(),w=x("br"),L=$("\n last click: "),P=$(e[4]),k=T(),C=x("br"),S=$("\n mouse position: "),O=$(e[5]),z=T(),I=x("div"),B=x("a"),B.textContent="hide",E(a,"target","_blank"),E(a,"rel","noreferrer"),E(a,"href",e[3]),E(i,"id","map-position-inner"),E(B,"href","#hide"),E(I,"id","map-position-close"),E(I,"class","svelte-1b30dq3"),E(n,"id","map-position"),E(n,"class","svelte-1b30dq3")},m(t,e){y(t,n,e),v(n,i),v(i,o),v(i,s),v(i,r),v(i,a),v(a,l),v(i,c),v(i,h),v(i,u),v(i,d),v(i,p),v(i,m),v(i,f),v(i,_),v(i,g),v(i,w),v(i,L),v(i,P),v(i,k),v(i,C),v(i,S),v(i,O),v(n,z),v(n,I),v(I,B),D||(N=M(B,"click",Qe),D=!0)},p(t,[e]){1&e&&A(s,t[0]),8&e&&E(a,"href",t[3]),2&e&&A(d,t[1]),4&e&&A(_,t[2]),16&e&&A(P,t[4]),32&e&&A(O,t[5])},i:t,o:t,d(t){t&&b(n),D=!1,N()}}}function Qe(){document.getElementById("map-position").style.display="none",document.getElementById("show-map-position").style.display="block"}function tn(t,e,n){let i,o,s,r,a,l,c;function h(t,e){n(0,o=t.getCenter().lat.toFixed(5)+","+t.getCenter().lng.toFixed(5)),n(3,a=function(t){return"https://openstreetmap.org/#map="+t.getZoom()+"/"+t.getCenter().lat.toFixed(5)+"/"+t.getCenter().lng.toFixed(5)}(t)),n(1,s=t.getZoom()),n(2,r=function(t){var e=t.getBounds(),n=e.getWest(),i=e.getEast();return i-n>=360&&(n=t.getCenter().lng-179.999,i=t.getCenter().lng+179.999),i=L.latLng(77,i).wrap().lng,[(n=L.latLng(77,n).wrap().lng).toFixed(5),e.getNorth().toFixed(5),i.toFixed(5),e.getSouth().toFixed(5)].join(",")}(t)),n(5,c="-"),e&&n(5,c=[e.lat.toFixed(5),e.lng.toFixed(5)].join(",")),i&&n(4,l=[i.lat.toFixed(5),i.lng.toFixed(5)].join(","))}return Lt.subscribe((t=>{t&&(t.on("move",(function(){h(t)})),t.on("mousemove",(function(e){h(t,e.latlng)})),t.on("click",(function(e){i=e.latlng,h(t)})),t.on("load",(function(){h(t)})))})),[o,s,r,a,l,c]}!function(t,e){!function(e,n){t.exports=e(Xe.exports),void 0!==n&&n.L&&(n.L.Control.MiniMap=e(L),n.L.control.minimap=function(t,e){return new n.L.Control.MiniMap(t,e)})}((function(t){var e=t.Control.extend({includes:t.Evented?t.Evented.prototype:t.Mixin.Events,options:{position:"bottomright",toggleDisplay:!1,zoomLevelOffset:-5,zoomLevelFixed:!1,centerFixed:!1,zoomAnimation:!1,autoToggleDisplay:!1,minimized:!1,width:150,height:150,collapsedWidth:19,collapsedHeight:19,aimingRectOptions:{color:"#ff7800",weight:1,clickable:!1},shadowRectOptions:{color:"#000000",weight:1,clickable:!1,opacity:0,fillOpacity:0},strings:{hideText:"Hide MiniMap",showText:"Show MiniMap"},mapOptions:{}},initialize:function(e,n){t.Util.setOptions(this,n),this.options.aimingRectOptions.clickable=!1,this.options.shadowRectOptions.clickable=!1,this._layer=e},onAdd:function(e){this._mainMap=e,this._container=t.DomUtil.create("div","leaflet-control-minimap"),this._container.style.width=this.options.width+"px",this._container.style.height=this.options.height+"px",t.DomEvent.disableClickPropagation(this._container),t.DomEvent.on(this._container,"mousewheel",t.DomEvent.stopPropagation);var n={attributionControl:!1,dragging:!this.options.centerFixed,zoomControl:!1,zoomAnimation:this.options.zoomAnimation,autoToggleDisplay:this.options.autoToggleDisplay,touchZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),scrollWheelZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),doubleClickZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),boxZoom:!this._isZoomLevelFixed(),crs:e.options.crs};return n=t.Util.extend(this.options.mapOptions,n),this._miniMap=new t.Map(this._container,n),this._miniMap.addLayer(this._layer),this._mainMapMoving=!1,this._miniMapMoving=!1,this._userToggledDisplay=!1,this._minimized=!1,this.options.toggleDisplay&&this._addToggleButton(),this._miniMap.whenReady(t.Util.bind((function(){this._aimingRect=t.rectangle(this._mainMap.getBounds(),this.options.aimingRectOptions).addTo(this._miniMap),this._shadowRect=t.rectangle(this._mainMap.getBounds(),this.options.shadowRectOptions).addTo(this._miniMap),this._mainMap.on("moveend",this._onMainMapMoved,this),this._mainMap.on("move",this._onMainMapMoving,this),this._miniMap.on("movestart",this._onMiniMapMoveStarted,this),this._miniMap.on("move",this._onMiniMapMoving,this),this._miniMap.on("moveend",this._onMiniMapMoved,this)}),this)),this._container},addTo:function(e){t.Control.prototype.addTo.call(this,e);var n=this.options.centerFixed||this._mainMap.getCenter();return this._miniMap.setView(n,this._decideZoom(!0)),this._setDisplay(this.options.minimized),this},onRemove:function(t){this._mainMap.off("moveend",this._onMainMapMoved,this),this._mainMap.off("move",this._onMainMapMoving,this),this._miniMap.off("moveend",this._onMiniMapMoved,this),this._miniMap.removeLayer(this._layer)},changeLayer:function(t){this._miniMap.removeLayer(this._layer),this._layer=t,this._miniMap.addLayer(this._layer)},_addToggleButton:function(){this._toggleDisplayButton=this.options.toggleDisplay?this._createButton("",this._toggleButtonInitialTitleText(),"leaflet-control-minimap-toggle-display leaflet-control-minimap-toggle-display-"+this.options.position,this._container,this._toggleDisplayButtonClicked,this):void 0,this._toggleDisplayButton.style.width=this.options.collapsedWidth+"px",this._toggleDisplayButton.style.height=this.options.collapsedHeight+"px"},_toggleButtonInitialTitleText:function(){return this.options.minimized?this.options.strings.showText:this.options.strings.hideText},_createButton:function(e,n,i,o,s,r){var a=t.DomUtil.create("a",i,o);a.innerHTML=e,a.href="#",a.title=n;var l=t.DomEvent.stopPropagation;return t.DomEvent.on(a,"click",l).on(a,"mousedown",l).on(a,"dblclick",l).on(a,"click",t.DomEvent.preventDefault).on(a,"click",s,r),a},_toggleDisplayButtonClicked:function(){this._userToggledDisplay=!0,this._minimized?this._restore():this._minimize()},_setDisplay:function(t){t!==this._minimized&&(this._minimized?this._restore():this._minimize())},_minimize:function(){this.options.toggleDisplay?(this._container.style.width=this.options.collapsedWidth+"px",this._container.style.height=this.options.collapsedHeight+"px",this._toggleDisplayButton.className+=" minimized-"+this.options.position,this._toggleDisplayButton.title=this.options.strings.showText):this._container.style.display="none",this._minimized=!0,this._onToggle()},_restore:function(){this.options.toggleDisplay?(this._container.style.width=this.options.width+"px",this._container.style.height=this.options.height+"px",this._toggleDisplayButton.className=this._toggleDisplayButton.className.replace("minimized-"+this.options.position,""),this._toggleDisplayButton.title=this.options.strings.hideText):this._container.style.display="block",this._minimized=!1,this._onToggle()},_onMainMapMoved:function(t){if(this._miniMapMoving)this._miniMapMoving=!1;else{var e=this.options.centerFixed||this._mainMap.getCenter();this._mainMapMoving=!0,this._miniMap.setView(e,this._decideZoom(!0)),this._setDisplay(this._decideMinimized())}this._aimingRect.setBounds(this._mainMap.getBounds())},_onMainMapMoving:function(t){this._aimingRect.setBounds(this._mainMap.getBounds())},_onMiniMapMoveStarted:function(t){if(!this.options.centerFixed){var e=this._aimingRect.getBounds(),n=this._miniMap.latLngToContainerPoint(e.getSouthWest()),i=this._miniMap.latLngToContainerPoint(e.getNorthEast());this._lastAimingRectPosition={sw:n,ne:i}}},_onMiniMapMoving:function(e){this.options.centerFixed||!this._mainMapMoving&&this._lastAimingRectPosition&&(this._shadowRect.setBounds(new t.LatLngBounds(this._miniMap.containerPointToLatLng(this._lastAimingRectPosition.sw),this._miniMap.containerPointToLatLng(this._lastAimingRectPosition.ne))),this._shadowRect.setStyle({opacity:1,fillOpacity:.3}))},_onMiniMapMoved:function(t){this._mainMapMoving?this._mainMapMoving=!1:(this._miniMapMoving=!0,this._mainMap.setView(this._miniMap.getCenter(),this._decideZoom(!1)),this._shadowRect.setStyle({opacity:0,fillOpacity:0}))},_isZoomLevelFixed:function(){var t=this.options.zoomLevelFixed;return this._isDefined(t)&&this._isInteger(t)},_decideZoom:function(t){if(this._isZoomLevelFixed())return t?this.options.zoomLevelFixed:this._mainMap.getZoom();if(t)return this._mainMap.getZoom()+this.options.zoomLevelOffset;var e,n=this._miniMap.getZoom()-this._mainMap.getZoom(),i=this._miniMap.getZoom()-this.options.zoomLevelOffset;return n>this.options.zoomLevelOffset&&this._mainMap.getZoom()<this._miniMap.getMinZoom()-this.options.zoomLevelOffset?this._miniMap.getZoom()>this._lastMiniMapZoom?(e=this._mainMap.getZoom()+1,this._miniMap.setZoom(this._miniMap.getZoom()-1)):e=this._mainMap.getZoom():e=i,this._lastMiniMapZoom=this._miniMap.getZoom(),e},_decideMinimized:function(){return this._userToggledDisplay?this._minimized:this.options.autoToggleDisplay?!!this._mainMap.getBounds().contains(this._miniMap.getBounds()):this._minimized},_isInteger:function(t){return"number"==typeof t},_isDefined:function(t){return void 0!==t},_onToggle:function(){t.Util.requestAnimFrame((function(){t.DomEvent.on(this._container,"transitionend",this._fireToggleEvents,this),t.Browser.any3d||t.Util.requestAnimFrame(this._fireToggleEvents,this)}),this)},_fireToggleEvents:function(){t.DomEvent.off(this._container,"transitionend",this._fireToggleEvents,this);var e={minimized:this._minimized};this.fire(this._minimized?"minimize":"restore",e),this.fire("toggle",e)}});return t.Map.mergeOptions({miniMapControl:!1}),t.Map.addInitHook((function(){this.options.miniMapControl&&(this.miniMapControl=(new e).addTo(this))})),e}),window)}({exports:{}});class en extends lt{constructor(t){super(),at(this,t,tn,Je,r,{})}}function nn(e){let n,i,r,a,l,c,h,u;return n=new en({}),{c(){it(n.$$.fragment),i=T(),r=x("div"),a=T(),l=x("div"),l.textContent="show map bounds",E(r,"id","map"),E(r,"class","svelte-1vbvdrk"),E(l,"id","show-map-position"),E(l,"class","leaflet-bar btn btn-sm btn-outline-secondary svelte-1vbvdrk")},m(o,d){var p;ot(n,o,d),y(o,i,d),y(o,r,d),y(o,a,d),y(o,l,d),c=!0,h||(u=[(p=e[0].call(null,r),p&&s(p.destroy)?p.destroy:t),M(l,"click",C(on))],h=!0)},p:t,i(t){c||(tt(n.$$.fragment,t),c=!0)},o(t){et(n.$$.fragment,t),c=!1},d(t){st(n,t),t&&b(i),t&&b(r),t&&b(a),t&&b(l),h=!1,o(u)}}}function on(t){t.target.style.display="none",document.getElementById("map-position").style.display="block"}function sn(t,e,n){let{display_minimap:i=!1}=e,{current_result:o=null}=e,{position_marker:s=null}=e,r=[];function a(t){let e=u(Lt);if(!e)return;if(function(){let t=u(Lt);t&&r.forEach((function(e){t.removeLayer(e)}))}(),s){let t=Xe.exports.circleMarker(s,{radius:5,weight:2,fillColor:"#ff7800",color:"red",opacity:.75,zIndexOffset:100,clickable:!1});t.bindTooltip(`Search (${s[0]},${s[1]})`).openTooltip(),t.addTo(e),r.push(t)}var n=new URLSearchParams(window.location.search).get("viewbox");if(n){let t=n.split(","),i=Xe.exports.latLngBounds([t[1],t[0]],[t[3],t[2]]);Xe.exports.rectangle(i,{color:"#69d53e",weight:3,dashArray:"5 5",opacity:.8,fill:!1}).addTo(e)}if(!t)return;let i=t.centroid?t.centroid.coordinates[1]:t.lat,o=t.centroid?t.centroid.coordinates[0]:t.lon,a=t.geometry||t.geojson;if(i&&o){let t=Xe.exports.circleMarker([i,o],{radius:10,weight:2,fillColor:"#ff7800",color:"blue",opacity:.75});s&&t.bindTooltip("Result").openTooltip(),e.addLayer(t),r.push(t)}if(a){var l=Xe.exports.geoJson({type:"FeatureCollection",features:[{type:"Feature",geometry:a,properties:{}}]},{style:()=>({interactive:!1,color:"blue"})});e.addLayer(l),r.push(l),e.fitBounds(l.getBounds())}else i&&o&&s?e.fitBounds([[i,o],s],{padding:[50,50]}):i&&o&&e.setView([i,o],10)}return t.$$set=t=>{"display_minimap"in t&&n(1,i=t.display_minimap),"current_result"in t&&n(2,o=t.current_result),"position_marker"in t&&n(3,s=t.position_marker)},t.$$.update=()=>{4&t.$$.dirty&&a(o)},[function(t){let e=function(t){const e=Nominatim_Config.Map_Tile_Attribution;let n=new Xe.exports.map(t,{attributionControl:!1,scrollWheelZoom:!0,touchZoom:!1,center:[Nominatim_Config.Map_Default_Lat,Nominatim_Config.Map_Default_Lon],zoom:Nominatim_Config.Map_Default_Zoom});if(e&&e.length&&Xe.exports.control.attribution({prefix:'<a href="https://leafletjs.com/">Leaflet</a>'}).addTo(n),Xe.exports.tileLayer(Nominatim_Config.Map_Tile_URL,{attribution:e}).addTo(n),i){let t=new Xe.exports.TileLayer(Nominatim_Config.Map_Tile_URL,{minZoom:0,maxZoom:13,attribution:e});new Xe.exports.Control.MiniMap(t,{toggleDisplay:!0}).addTo(n)}const o=Xe.exports.Control.extend({options:{position:"topright"},onAdd:()=>document.getElementById("show-map-position")});return n.addControl(new o),n}(t);return Lt.set(e),a(o),{destroy:()=>{Lt.set(null),e.remove()}}},i,o,s]}let rn=class extends lt{constructor(t){super(),at(this,t,sn,nn,r,{display_minimap:1,current_result:2,position_marker:3})}};function an(t){let e,n;return e=new ke({props:{api_request_params:t[0],bStructuredSearch:t[2]}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.api_request_params=t[0]),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function ln(t){let e,n,i,o,s,r,a,l,c,h;function u(e){t[4](e)}e=new ge({props:{$$slots:{default:[an]},$$scope:{ctx:t}}});let d={reverse_search:!1};return void 0!==t[1]&&(d.current_result=t[1]),s=new Ye({props:d}),Z.push((()=>nt(s,"current_result",u,t[1]))),c=new rn({props:{current_result:t[1],display_minimap:!0}}),{c(){it(e.$$.fragment),n=T(),i=x("div"),o=x("div"),it(s.$$.fragment),a=T(),l=x("div"),it(c.$$.fragment),E(o,"class","sidebar svelte-1d53ob0"),E(l,"id","map-wrapper"),E(l,"class","svelte-1d53ob0"),E(i,"id","content"),E(i,"class","svelte-1d53ob0")},m(t,r){ot(e,t,r),y(t,n,r),y(t,i,r),v(i,o),ot(s,o,null),v(i,a),v(i,l),ot(c,l,null),h=!0},p(t,[n]){const i={};65&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i);const o={};!r&&2&n&&(r=!0,o.current_result=t[1],q((()=>r=!1))),s.$set(o);const a={};2&n&&(a.current_result=t[1]),c.$set(a)},i(t){h||(tt(e.$$.fragment,t),tt(s.$$.fragment,t),tt(c.$$.fragment,t),h=!0)},o(t){et(e.$$.fragment,t),et(s.$$.fragment,t),et(c.$$.fragment,t),h=!1},d(t){st(e,t),t&&b(n),t&&b(i),st(s),st(c)}}}function cn(t,e,n){let i,o,s;return d(t,kt,(t=>n(3,i=t))),t.$$.update=()=>{if(8&t.$$.dirty){let t=i;"search"===t.tab&&function(t){Zt(),n(0,o={q:t.get("q"),street:t.get("street"),city:t.get("city"),county:t.get("county"),state:t.get("state"),country:t.get("country"),postalcode:t.get("postalcode"),polygon_geojson:Nominatim_Config.Search_AreaPolygons?1:0,viewbox:t.get("viewbox"),bounded:t.get("bounded"),dedupe:t.has("dedupe")&&"1"!==t.get("dedupe")?0:1,"accept-language":t.get("accept-language"),countrycodes:t.get("countrycodes"),limit:t.get("limit"),polygon_threshold:t.get("polygon_threshold"),exclude_place_ids:t.get("exclude_place_ids"),format:"jsonv2"});let e=o.street||o.city||o.county||o.state||o.country||o.postalcode;o.q||e?It("search",o,(function(t){Tt.set(t),Zt("Result for "+o.q),e?(document.querySelector(".nav-tabs a[href='#structured']").click(),document.querySelector("input[name=street]").focus()):document.querySelector("input[name=q]").focus()})):Tt.set(void 0)}(t.params)}},[o,s,undefined,i,function(t){s=t,n(1,s)}]}class hn extends lt{constructor(t){super(),at(this,t,cn,ln,r,{})}}function un(t,e,n){const i=t.slice();return i[8]=e[n],i[10]=n,i}function dn(e){let n,i,o,s,r=e[8]+"";return{c(){n=x("option"),i=$(e[10]),o=$(" - "),s=$(r),n.__value=e[10],n.value=n.__value},m(t,e){y(t,n,e),v(n,i),v(n,o),v(n,s)},p:t,d(t){t&&b(n)}}}function pn(t){let e,n,i,s,r,a,l,c,h,u,d,p,m,f,_,g,$,L,P,A,z,I,B=["Continent / Sea","","","Country","","State","Region","","County","","City","","Town / Village","","Suburb","","Street","","Building","","",""],D=[];for(let e=0;e<B.length;e+=1)D[e]=dn(un(t,B,e));return{c(){e=x("div"),e.innerHTML='<label for="reverse-lat" class="svelte-1pqxd6v">lat</label>',n=T(),i=x("div"),s=x("input"),r=T(),a=x("div"),l=x("a"),l.textContent="<>",c=T(),h=x("div"),h.innerHTML='<label for="reverse-lon" class="svelte-1pqxd6v">lon</label>',u=T(),d=x("div"),p=x("input"),m=T(),f=x("div"),f.innerHTML='<label for="reverse-zoom" class="svelte-1pqxd6v">max zoom</label>',_=T(),g=x("div"),$=x("select"),L=x("option"),L.textContent="---";for(let t=0;t<D.length;t+=1)D[t].c();P=T(),A=x("div"),A.innerHTML='<button type="submit" class="btn btn-primary btn-sm mx-1">Search</button>',E(e,"class","col-auto"),E(s,"id","reverse-lat"),E(s,"name","lat"),E(s,"type","text"),E(s,"class","form-control form-control-sm d-inline svelte-1pqxd6v"),E(s,"placeholder","latitude"),E(s,"pattern","^-?\\d+(\\.\\d+)?$"),s.autofocus=!0,E(i,"class","col-auto"),E(l,"id","switch-coords"),E(l,"class","btn btn-outline-secondary btn-sm svelte-1pqxd6v"),E(l,"title","switch lat and lon"),E(a,"class","col-auto"),E(h,"class","col-auto"),E(p,"id","reverse-lon"),E(p,"name","lon"),E(p,"type","text"),E(p,"class","form-control form-control-sm svelte-1pqxd6v"),E(p,"placeholder","longitude"),E(p,"pattern","^-?\\d+(\\.\\d+)?$"),E(d,"class","col-auto"),E(f,"class","col-auto"),L.__value="",L.value=L.__value,E($,"id","reverse-zoom"),E($,"name","zoom"),E($,"class","form-select form-select-sm svelte-1pqxd6v"),void 0===t[2]&&W((()=>t[7].call($))),E(g,"class","col-auto"),E(A,"class","col-auto")},m(o,b){y(o,e,b),y(o,n,b),y(o,i,b),v(i,s),S(s,t[0]),y(o,r,b),y(o,a,b),v(a,l),y(o,c,b),y(o,h,b),y(o,u,b),y(o,d,b),v(d,p),S(p,t[1]),y(o,m,b),y(o,f,b),y(o,_,b),y(o,g,b),v(g,$),v($,L);for(let t=0;t<D.length;t+=1)D[t].m($,null);O($,t[2]),y(o,P,b),y(o,A,b),s.focus(),z||(I=[M(s,"input",t[4]),M(s,"change",fn),M(l,"click",C(k(t[5]))),M(p,"input",t[6]),M($,"change",t[7])],z=!0)},p(t,e){if(1&e&&s.value!==t[0]&&S(s,t[0]),2&e&&p.value!==t[1]&&S(p,t[1]),0&e){let n;for(B=["Continent / Sea","","","Country","","State","Region","","County","","City","","Town / Village","","Suburb","","Street","","Building","","",""],n=0;n<B.length;n+=1){const i=un(t,B,n);D[n]?D[n].p(i,e):(D[n]=dn(i),D[n].c(),D[n].m($,null))}for(;n<D.length;n+=1)D[n].d(1);D.length=B.length}4&e&&O($,t[2])},d(t){t&&b(e),t&&b(n),t&&b(i),t&&b(r),t&&b(a),t&&b(c),t&&b(h),t&&b(u),t&&b(d),t&&b(m),t&&b(f),t&&b(_),t&&b(g),w(D,t),t&&b(P),t&&b(A),z=!1,o(I)}}}function mn(t){let e,n;return e=new be({props:{page:"reverse",$$slots:{default:[pn]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,[n]){const i={};2055&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function fn(t){var e=t.target.value.split(/,|%2C/);2===e.length&&(document.querySelector("input[name=lat]").value=L.Util.trim(e[0]),document.querySelector("input[name=lon]").value=L.Util.trim(e[1]))}function _n(t,e,n){let{lat:i=""}=e,{lon:o=""}=e,{zoom:s=""}=e;function r(t,e,n){if(null===t||null===e)return;let i=new URLSearchParams;i.set("lat",t),i.set("lon",e),i.set("zoom",n||s),At("reverse",i)}Lt.subscribe((t=>{t&&t.on("click",(t=>{let e=t.latlng.wrap();r(e.lat.toFixed(5),e.lng.toFixed(5))}))}));return t.$$set=t=>{"lat"in t&&n(0,i=t.lat),"lon"in t&&n(1,o=t.lon),"zoom"in t&&n(2,s=t.zoom)},[i,o,s,r,function(){i=this.value,n(0,i)},()=>r(o,i),function(){o=this.value,n(1,o)},function(){s=function(t){const e=t.querySelector(":checked")||t.options[0];return e&&e.__value}(this),n(2,s)}]}class gn extends lt{constructor(t){super(),at(this,t,_n,mn,r,{lat:0,lon:1,zoom:2})}}function vn(t){let n,i;const o=[t[0]];let s={};for(let t=0;t<o.length;t+=1)s=e(s,o[t]);return n=new gn({props:s}),{c(){it(n.$$.fragment)},m(t,e){ot(n,t,e),i=!0},p(t,e){const i=1&e?function(t,e){const n={},i={},o={$$scope:1};let s=t.length;for(;s--;){const r=t[s],a=e[s];if(a){for(const t in r)t in a||(i[t]=1);for(const t in a)o[t]||(n[t]=a[t],o[t]=1);t[s]=a}else for(const t in r)o[t]=1}for(const t in i)t in n||(n[t]=void 0);return n}(o,[(s=t[0],"object"==typeof s&&null!==s?s:{})]):{};var s;n.$set(i)},i(t){i||(tt(n.$$.fragment,t),i=!0)},o(t){et(n.$$.fragment,t),i=!1},d(t){st(n,t)}}}function yn(t){let e,n,i,o,s,r,a,l,c,h;function u(e){t[4](e)}e=new ge({props:{$$slots:{default:[vn]},$$scope:{ctx:t}}});let d={reverse_search:!0};return void 0!==t[1]&&(d.current_result=t[1]),s=new Ye({props:d}),Z.push((()=>nt(s,"current_result",u,t[1]))),c=new rn({props:{current_result:t[1],position_marker:t[2],display_minimap:!0}}),{c(){it(e.$$.fragment),n=T(),i=x("div"),o=x("div"),it(s.$$.fragment),a=T(),l=x("div"),it(c.$$.fragment),E(o,"class","sidebar svelte-1d53ob0"),E(l,"id","map-wrapper"),E(l,"class","svelte-1d53ob0"),E(i,"id","content"),E(i,"class","svelte-1d53ob0")},m(t,r){ot(e,t,r),y(t,n,r),y(t,i,r),v(i,o),ot(s,o,null),v(i,a),v(i,l),ot(c,l,null),h=!0},p(t,[n]){const i={};65&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i);const o={};!r&&2&n&&(r=!0,o.current_result=t[1],q((()=>r=!1))),s.$set(o);const a={};2&n&&(a.current_result=t[1]),4&n&&(a.position_marker=t[2]),c.$set(a)},i(t){h||(tt(e.$$.fragment,t),tt(s.$$.fragment,t),tt(c.$$.fragment,t),h=!0)},o(t){et(e.$$.fragment,t),et(s.$$.fragment,t),et(c.$$.fragment,t),h=!1},d(t){st(e,t),t&&b(n),t&&b(i),st(s),st(c)}}}function bn(t,e,n){let i,o,s,r;return d(t,kt,(t=>n(3,i=t))),t.$$.update=()=>{if(8&t.$$.dirty){let t=i;"reverse"===t.tab&&(e=t.params,Zt(),n(0,o={lat:e.get("lat"),lon:e.get("lon"),zoom:e.get("zoom")>1?Number(e.get("zoom")):Number(Nominatim_Config.Reverse_Default_Search_Zoom),format:"jsonv2"}),o.lat||o.lat?It("reverse",o,(function(t){t&&!t.error?(n(2,r=[o.lat,o.lon]),Tt.set([t])):Tt.set([]),Zt("Reverse result for "+o.lat+","+o.lon),document.querySelector("input[name=lat]").focus()})):Tt.set(void 0))}var e},[o,s,r,i,function(t){s=t,n(1,s)}]}class wn extends lt{constructor(t){super(),at(this,t,bn,yn,r,{})}}function xn(e){let n,i,o,s,r,a,l,c,h,u,d;return{c(){n=x("form"),i=x("div"),o=x("div"),s=x("input"),a=T(),l=x("div"),l.innerHTML='<button type="submit" class="btn btn-primary btn-sm">Show</button>',c=T(),h=x("small"),h.innerHTML='OSM type+id (<em class="svelte-1kvo9ki">N123</em>, <em class="svelte-1kvo9ki">n123</em>, <em class="svelte-1kvo9ki">W123</em>, <em class="svelte-1kvo9ki">w123</em>, <em class="svelte-1kvo9ki">R123</em>, <em class="svelte-1kvo9ki">r123</em>),\n Place id (<em class="svelte-1kvo9ki">1234</em>) or\n URL (<em class="svelte-1kvo9ki">https://openstreetmap.org/way/123</em>)',E(s,"type","edit"),E(s,"class","form-control form-control-sm me-1 svelte-1kvo9ki"),E(s,"pattern","^[NWRnwr]?[0-9]+$|.*openstreetmap.*"),s.value=r=""+((e[0].osmtype||"")+(e[0].osmid||"")+(e[0].place_id||"")),s.autofocus=!0,E(o,"class","col-auto"),E(l,"class","col-auto"),E(i,"class","row g-1"),E(n,"class","form-inline svelte-1kvo9ki"),E(n,"action","details.html"),E(h,"class","form-text text-muted svelte-1kvo9ki")},m(t,r){y(t,n,r),v(n,i),v(i,o),v(o,s),v(i,a),v(i,l),y(t,c,r),y(t,h,r),s.focus(),u||(d=M(n,"submit",k(e[1])),u=!0)},p(t,[e]){1&e&&r!==(r=""+((t[0].osmtype||"")+(t[0].osmid||"")+(t[0].place_id||"")))&&s.value!==r&&(s.value=r)},i:t,o:t,d(t){t&&b(n),t&&b(c),t&&b(h),u=!1,d()}}}function $n(t,e,n){let{api_request_params:i={}}=e;return t.$$set=t=>{"api_request_params"in t&&n(0,i=t.api_request_params)},[i,function(t){let e=t.target.querySelector("input[type=edit]").value.trim(),n=e.match(/^\s*([NWR])(\d+)\s*$/i)||e.match(/\/(relation|way|node)\/(\d+)\s*$/);var i=new URLSearchParams;if(n)i.set("osmtype",n[1].charAt(0).toUpperCase()),i.set("osmid",n[2]);else{if(!e.match(/^\d+$/))return void alert("invalid input");i.set("place_id",e)}At("details",i)}]}class Ln extends lt{constructor(t){super(),at(this,t,$n,xn,r,{api_request_params:0})}}function Tn(e){let n;return{c(){n=x("span"),n.textContent="No Name",E(n,"class","noname")},m(t,e){y(t,n,e)},p:t,d(t){t&&b(n)}}}function Pn(t){let e,n=t[0].localname+"";return{c(){e=$(n)},m(t,n){y(t,e,n)},p(t,i){1&i&&n!==(n=t[0].localname+"")&&A(e,n)},d(t){t&&b(e)}}}function Mn(t){let e,n;return e=new Ht({props:{page:"search",params_hash:{postalcode:t[0].localname},$$slots:{default:[En]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.params_hash={postalcode:t[0].localname}),32&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function kn(t){let e,n;return e=new Ht({props:{page:"search",params_hash:{country:t[0].localname},$$slots:{default:[An]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.params_hash={country:t[0].localname}),32&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Cn(t){let e,n;return e=new Ae({props:{feature:t[0],$$slots:{default:[Sn]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.feature=t[0]),32&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function En(t){let e;return{c(){e=$("search by name")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function An(t){let e;return{c(){e=$("search by name")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function Sn(t){let e;return{c(){e=$("details")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function On(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,L,P,M,k=bt(t[0])+"",C=mt(t[0])+"",S=t[0].rank_address+"",O=wt(t[0].admin_level)+"",I=xt(t[0].distance,t[1])+"";function B(t,e){return t[0].localname?Pn:Tn}let D=B(t),N=D(t);const Z=[Cn,kn,Mn],j=[];function R(t,e){return 9&e&&(w=null),t[0].osm_id?0:(null==w&&(w=!(t[3]||!t[0].type.match(/^country/))),w?1:t[3]||"postcode"!==t[0].type?-1:2)}return~(L=R(t,-1))&&(P=j[L]=Z[L](t)),{c(){e=x("tr"),n=x("td"),N.c(),i=T(),o=x("td"),s=$(k),r=T(),a=x("td"),l=T(),c=x("td"),h=$(S),u=T(),d=x("td"),p=$(O),m=T(),f=x("td"),_=T(),g=x("td"),P&&P.c(),E(n,"class","name fw-bold svelte-6a43i0"),E(o,"class","svelte-6a43i0"),E(a,"class","svelte-6a43i0"),E(c,"class","svelte-6a43i0"),E(d,"class","svelte-6a43i0"),E(f,"class","svelte-6a43i0"),E(g,"class","svelte-6a43i0"),E(e,"class","svelte-6a43i0"),z(e,"notused",t[2]&&!t[4])},m(t,b){y(t,e,b),v(e,n),N.m(n,null),v(e,i),v(e,o),v(o,s),v(e,r),v(e,a),a.innerHTML=C,v(e,l),v(e,c),v(c,h),v(e,u),v(e,d),v(d,p),v(e,m),v(e,f),f.innerHTML=I,v(e,_),v(e,g),~L&&j[L].m(g,null),M=!0},p(t,[i]){D===(D=B(t))&&N?N.p(t,i):(N.d(1),N=D(t),N&&(N.c(),N.m(n,null))),(!M||1&i)&&k!==(k=bt(t[0])+"")&&A(s,k),(!M||1&i)&&C!==(C=mt(t[0])+"")&&(a.innerHTML=C),(!M||1&i)&&S!==(S=t[0].rank_address+"")&&A(h,S),(!M||1&i)&&O!==(O=wt(t[0].admin_level)+"")&&A(p,O),(!M||3&i)&&I!==(I=xt(t[0].distance,t[1])+"")&&(f.innerHTML=I);let o=L;L=R(t,i),L===o?~L&&j[L].p(t,i):(P&&(J(),et(j[o],1,1,(()=>{j[o]=null})),Q()),~L?(P=j[L],P?P.p(t,i):(P=j[L]=Z[L](t),P.c()),tt(P,1),P.m(g,null)):P=null),(!M||20&i)&&z(e,"notused",t[2]&&!t[4])},i(t){M||(tt(P),M=!0)},o(t){et(P),M=!1},d(t){t&&b(e),N.d(),~L&&j[L].d()}}}function zn(t,e,n){let i,o,{addressLine:s}=e,{bDistanceInMeters:r}=e,{bMarkUnusedLines:a=!1}=e;return t.$$set=t=>{"addressLine"in t&&n(0,s=t.addressLine),"bDistanceInMeters"in t&&n(1,r=t.bDistanceInMeters),"bMarkUnusedLines"in t&&n(2,a=t.bMarkUnusedLines)},t.$$.update=()=>{1&t.$$.dirty&&n(4,i=s.isaddress)},n(3,o=Nominatim_Config.Reverse_Only),[s,r,a,o,i]}class In extends lt{constructor(t){super(),at(this,t,zn,On,r,{addressLine:0,bDistanceInMeters:1,bMarkUnusedLines:2})}}function Bn(e){let n,i,s,r,a,l,c,h,u,d,p,m,f;return{c(){n=$("("),i=x("a"),i.textContent="how?",s=$(")\n\n"),r=x("div"),a=x("button"),a.innerHTML='<span aria-hidden="true">×</span>',l=$("\n\n Nightly calculated from nearby places having this postcode.\n "),c=x("a"),c.textContent="Documentation",h=$(".\n You can search for those with an "),u=x("a"),d=$("Overpass Turbo query"),p=$("."),E(i,"href","#openHint"),E(a,"type","button"),E(a,"class","close svelte-yw4tm0"),E(a,"aria-label","Close"),E(c,"href","https://nominatim.org/release-docs/latest/develop/Postcodes/"),E(u,"href",e[0]),E(u,"target","_blank"),E(u,"rel","noreferrer"),E(r,"id","postcode-hint"),E(r,"class","my-2 p-2 svelte-yw4tm0")},m(t,e){y(t,n,e),y(t,i,e),y(t,s,e),y(t,r,e),v(r,a),v(r,l),v(r,c),v(r,h),v(r,u),v(u,d),v(r,p),m||(f=[M(i,"click",C(k(Dn))),M(a,"click",C(Nn))],m=!0)},p:t,i:t,o:t,d(t){t&&b(n),t&&b(i),t&&b(s),t&&b(r),m=!1,o(f)}}}function Dn(){document.getElementById("postcode-hint").style.display="block"}function Nn(){document.getElementById("postcode-hint").style.display="none"}function Zn(t,e,n){let{postcode:i}=e,{lat:o}=e,{lon:s}=e,r=`\n // Based on the map bounds, you can zoom out and rerun the query\n\n [timeout:30]; // in seconds\n\n // we define a shortcut\n // https://wiki.openstreetmap.org/wiki/Overpass_turbo/Extended_Overpass_Turbo_Queries\n {{postcode=${i}}}\n\n (\n node["addr:postcode"="{{postcode}}"]({{bbox}});\n way["addr:postcode"="{{postcode}}"]({{bbox}});\n relation["addr:postcode"="{{postcode}}"]({{bbox}});\n\n node["postal_code"="{{postcode}}"]({{bbox}});\n way["postal_code"="{{postcode}}"]({{bbox}});\n relation["postal_code"="{{postcode}}"]({{bbox}});\n );\n\n out body;\n >;\n out skel qt;\n `.replace(/^ {4}/gm,""),a="https://overpass-turbo.eu/?Q="+encodeURIComponent(r)+"&C="+encodeURIComponent([o,s,15].join(";"))+"&R";return t.$$set=t=>{"postcode"in t&&n(1,i=t.postcode),"lat"in t&&n(2,o=t.lat),"lon"in t&&n(3,s=t.lon)},[a,i,o,s]}class jn extends lt{constructor(t){super(),at(this,t,Zn,Bn,r,{postcode:1,lat:2,lon:3})}}function Rn(t){let e,n,i,o,s,r;const a=t[2].default,l=p(a,t,t[1],null);return{c(){e=x("tr"),n=x("td"),i=$(t[0]),o=T(),s=x("td"),l&&l.c(),E(n,"class","svelte-1184nr4"),E(s,"class","svelte-1184nr4")},m(t,a){y(t,e,a),v(e,n),v(n,i),v(e,o),v(e,s),l&&l.m(s,null),r=!0},p(t,[e]){(!r||1&e)&&A(i,t[0]),l&&l.p&&(!r||2&e)&&_(l,a,t,t[1],r?f(a,t[1],e,null):g(t[1]),null)},i(t){r||(tt(l,t),r=!0)},o(t){et(l,t),r=!1},d(t){t&&b(e),l&&l.d(t)}}}function Hn(t,e,n){let{$$slots:i={},$$scope:o}=e,{title:s}=e;return t.$$set=t=>{"title"in t&&n(0,s=t.title),"$$scope"in t&&n(1,o=t.$$scope)},[s,o,i]}class Fn extends lt{constructor(t){super(),at(this,t,Hn,Rn,r,{title:0})}}function Wn(t,e,n){const i=t.slice();return i[1]=e[n],i}function qn(t){let e,n,i,o,s,r,a=t[0][t[1]]+"",l=t[1]+"";return{c(){e=x("div"),n=x("span"),i=$(a),o=$(" ("),s=$(l),r=$(")\n "),E(n,"class","name svelte-ndknvb"),E(e,"class","line")},m(t,a){y(t,e,a),v(e,n),v(n,i),v(e,o),v(e,s),v(e,r)},p(t,e){1&e&&a!==(a=t[0][t[1]]+"")&&A(i,a),1&e&&l!==(l=t[1]+"")&&A(s,l)},d(t){t&&b(e)}}}function Un(e){let n,i=Object.keys(e[0]),o=[];for(let t=0;t<i.length;t+=1)o[t]=qn(Wn(e,i,t));return{c(){for(let t=0;t<o.length;t+=1)o[t].c();n=P()},m(t,e){for(let n=0;n<o.length;n+=1)o[n].m(t,e);y(t,n,e)},p(t,[e]){if(1&e){let s;for(i=Object.keys(t[0]),s=0;s<i.length;s+=1){const r=Wn(t,i,s);o[s]?o[s].p(r,e):(o[s]=qn(r),o[s].c(),o[s].m(n.parentNode,n))}for(;s<o.length;s+=1)o[s].d(1);o.length=i.length}},i:t,o:t,d(t){w(o,t),t&&b(n)}}}function Vn(t,e,n){let{items:i}=e;return t.$$set=t=>{"items"in t&&n(0,i=t.items)},[i]}class Kn extends lt{constructor(t){super(),at(this,t,Vn,Un,r,{items:0})}}function Gn(t,e,n){const i=t.slice();return i[7]=e[n],i}function Yn(t,e,n){const i=t.slice();return i[10]=e[n],i}function Xn(t,e,n){const i=t.slice();return i[13]=e[n],i}function Jn(t,e,n){const i=t.slice();return i[13]=e[n],i}function Qn(t,e,n){const i=t.slice();return i[18]=e[n],i}function ti(t,e,n){const i=t.slice();return i[18]=e[n],i}function ei(t){let e,n;return e=new Ln({props:{api_request_params:t[2]}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};4&n&&(i.api_request_params=t[2]),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function ni(e){let n;return{c(){n=$("No such place found.")},m(t,e){y(t,n,e)},p:t,i:t,o:t,d(t){t&&b(n)}}}function ii(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,L,P,M,k,C,S,O,z,I,B,D,N,Z,j,R,H,F,W,q,U,V,K,G,Y,X,nt,rt,at,lt,ct,ht,ut,dt,mt,ft,_t,gt,yt,bt,wt,xt,$t,Lt,Tt,Pt=(t[0].localname||`${pt(t[0].osm_type)} ${t[0].osm_id}`)+"",Mt=vt(t[0]);a=new Ae({props:{feature:t[0],$$slots:{default:[oi]},$$scope:{ctx:t}}}),h=new Ne({props:{aPlace:t[0]}}),_=new Fn({props:{title:"Name",$$slots:{default:[ai]},$$scope:{ctx:t}}}),w=new Fn({props:{title:"Type",$$slots:{default:[li]},$$scope:{ctx:t}}}),P=new Fn({props:{title:"Last Updated",$$slots:{default:[ci]},$$scope:{ctx:t}}});let kt=Mt&&hi(t);C=new Fn({props:{title:"Search Rank",$$slots:{default:[di]},$$scope:{ctx:t}}}),O=new Fn({props:{title:"Address Rank",$$slots:{default:[pi]},$$scope:{ctx:t}}});let Ct=t[0].calculated_importance&&mi(t);B=new Fn({props:{title:"Coverage",$$slots:{default:[gi]},$$scope:{ctx:t}}}),N=new Fn({props:{title:"Centre Point (lat,lon)",$$slots:{default:[vi]},$$scope:{ctx:t}}}),j=new Fn({props:{title:"OSM",$$slots:{default:[yi]},$$scope:{ctx:t}}}),H=new Fn({props:{title:"Place Id",$$slots:{default:[bi]},$$scope:{ctx:t}}});let Et=t[0].calculated_wikipedia&&wi(t);q=new Fn({props:{title:"Computed Postcode",$$slots:{default:[Li]},$$scope:{ctx:t}}}),V=new Fn({props:{title:"Address Tags",$$slots:{default:[Ti]},$$scope:{ctx:t}}}),G=new Fn({props:{title:"Extra Tags",$$slots:{default:[Pi]},$$scope:{ctx:t}}}),rt=new rn({props:{current_result:t[0]}});let At=t[0].address&&Mi(t),St=t[0].linked_places&&Ci(t),Ot=!t[4]&&Ai(t);const zt=[Hi,Ri],It=[];function Bt(t,e){return t[2].hierarchy?0:1}return $t=Bt(t),Lt=It[$t]=zt[$t](t),{c(){e=x("div"),n=x("div"),i=x("h1"),o=$(Pt),s=T(),r=x("small"),it(a.$$.fragment),l=T(),c=x("div"),it(h.$$.fragment),u=T(),d=x("div"),p=x("div"),m=x("table"),f=x("tbody"),it(_.$$.fragment),g=T(),it(w.$$.fragment),L=T(),it(P.$$.fragment),M=T(),kt&&kt.c(),k=T(),it(C.$$.fragment),S=T(),it(O.$$.fragment),z=T(),Ct&&Ct.c(),I=T(),it(B.$$.fragment),D=T(),it(N.$$.fragment),Z=T(),it(j.$$.fragment),R=T(),it(H.$$.fragment),F=T(),Et&&Et.c(),W=T(),it(q.$$.fragment),U=T(),it(V.$$.fragment),K=T(),it(G.$$.fragment),Y=T(),X=x("div"),nt=x("div"),it(rt.$$.fragment),at=T(),lt=x("div"),ct=x("div"),ht=x("h2"),ht.textContent="Address",ut=T(),dt=x("table"),mt=x("thead"),mt.innerHTML="<tr><th>Local name</th> \n <th>Type</th> \n <th>OSM</th> \n <th>Address rank</th> \n <th>Admin level</th> \n <th>Distance</th> \n <th></th></tr>",ft=T(),_t=x("tbody"),At&&At.c(),gt=T(),St&&St.c(),yt=T(),Ot&&Ot.c(),bt=T(),wt=x("tr"),wt.innerHTML='<td colspan="7" class="svelte-193h58e"><h2 class="svelte-193h58e">Parent Of</h2></td>',xt=T(),Lt.c(),E(r,"class","svelte-193h58e"),E(i,"class","svelte-193h58e"),E(n,"class","col-sm-10"),E(c,"class","col-sm-2 text-end"),E(e,"class","row"),E(m,"id","locationdetails"),E(m,"class","table table-striped table-responsive"),E(p,"class","col-md-6"),E(nt,"id","map-wrapper"),E(nt,"class","svelte-193h58e"),E(X,"class","col-md-6"),E(d,"class","row"),E(ht,"class","svelte-193h58e"),E(wt,"class","all-columns svelte-193h58e"),E(dt,"id","address"),E(dt,"class","table table-striped table-small"),E(ct,"class","col-md-12"),E(lt,"class","row")},m(t,b){y(t,e,b),v(e,n),v(n,i),v(i,o),v(i,s),v(i,r),ot(a,r,null),v(e,l),v(e,c),ot(h,c,null),y(t,u,b),y(t,d,b),v(d,p),v(p,m),v(m,f),ot(_,f,null),v(f,g),ot(w,f,null),v(f,L),ot(P,f,null),v(f,M),kt&&kt.m(f,null),v(f,k),ot(C,f,null),v(f,S),ot(O,f,null),v(f,z),Ct&&Ct.m(f,null),v(f,I),ot(B,f,null),v(f,D),ot(N,f,null),v(f,Z),ot(j,f,null),v(f,R),ot(H,f,null),v(f,F),Et&&Et.m(f,null),v(f,W),ot(q,f,null),v(f,U),ot(V,f,null),v(f,K),ot(G,f,null),v(d,Y),v(d,X),v(X,nt),ot(rt,nt,null),y(t,at,b),y(t,lt,b),v(lt,ct),v(ct,ht),v(ct,ut),v(ct,dt),v(dt,mt),v(dt,ft),v(dt,_t),At&&At.m(_t,null),v(_t,gt),St&&St.m(_t,null),v(_t,yt),Ot&&Ot.m(_t,null),v(_t,bt),v(_t,wt),v(_t,xt),It[$t].m(_t,null),Tt=!0},p(t,e){(!Tt||1&e)&&Pt!==(Pt=(t[0].localname||`${pt(t[0].osm_type)} ${t[0].osm_id}`)+"")&&A(o,Pt);const n={};1&e&&(n.feature=t[0]),8388608&e&&(n.$$scope={dirty:e,ctx:t}),a.$set(n);const i={};1&e&&(i.aPlace=t[0]),h.$set(i);const s={};8388609&e&&(s.$$scope={dirty:e,ctx:t}),_.$set(s);const r={};8388609&e&&(r.$$scope={dirty:e,ctx:t}),w.$set(r);const l={};8388609&e&&(l.$$scope={dirty:e,ctx:t}),P.$set(l),1&e&&(Mt=vt(t[0])),Mt?kt?(kt.p(t,e),1&e&&tt(kt,1)):(kt=hi(t),kt.c(),tt(kt,1),kt.m(f,k)):kt&&(J(),et(kt,1,1,(()=>{kt=null})),Q());const c={};8388609&e&&(c.$$scope={dirty:e,ctx:t}),C.$set(c);const u={};8388609&e&&(u.$$scope={dirty:e,ctx:t}),O.$set(u),t[0].calculated_importance?Ct?(Ct.p(t,e),1&e&&tt(Ct,1)):(Ct=mi(t),Ct.c(),tt(Ct,1),Ct.m(f,I)):Ct&&(J(),et(Ct,1,1,(()=>{Ct=null})),Q());const d={};8388609&e&&(d.$$scope={dirty:e,ctx:t}),B.$set(d);const p={};8388609&e&&(p.$$scope={dirty:e,ctx:t}),N.$set(p);const m={};8388609&e&&(m.$$scope={dirty:e,ctx:t}),j.$set(m);const g={};8388609&e&&(g.$$scope={dirty:e,ctx:t}),H.$set(g),t[0].calculated_wikipedia?Et?(Et.p(t,e),1&e&&tt(Et,1)):(Et=wi(t),Et.c(),tt(Et,1),Et.m(f,W)):Et&&(J(),et(Et,1,1,(()=>{Et=null})),Q());const v={};8388609&e&&(v.$$scope={dirty:e,ctx:t}),q.$set(v);const y={};8388609&e&&(y.$$scope={dirty:e,ctx:t}),V.$set(y);const b={};8388609&e&&(b.$$scope={dirty:e,ctx:t}),G.$set(b);const x={};1&e&&(x.current_result=t[0]),rt.$set(x),t[0].address?At?(At.p(t,e),1&e&&tt(At,1)):(At=Mi(t),At.c(),tt(At,1),At.m(_t,gt)):At&&(J(),et(At,1,1,(()=>{At=null})),Q()),t[0].linked_places?St?(St.p(t,e),1&e&&tt(St,1)):(St=Ci(t),St.c(),tt(St,1),St.m(_t,yt)):St&&(J(),et(St,1,1,(()=>{St=null})),Q()),t[4]?Ot&&(Ot.d(1),Ot=null):Ot?Ot.p(t,e):(Ot=Ai(t),Ot.c(),Ot.m(_t,bt));let $=$t;$t=Bt(t),$t===$?It[$t].p(t,e):(J(),et(It[$],1,1,(()=>{It[$]=null})),Q(),Lt=It[$t],Lt?Lt.p(t,e):(Lt=It[$t]=zt[$t](t),Lt.c()),tt(Lt,1),Lt.m(_t,null))},i(t){Tt||(tt(a.$$.fragment,t),tt(h.$$.fragment,t),tt(_.$$.fragment,t),tt(w.$$.fragment,t),tt(P.$$.fragment,t),tt(kt),tt(C.$$.fragment,t),tt(O.$$.fragment,t),tt(Ct),tt(B.$$.fragment,t),tt(N.$$.fragment,t),tt(j.$$.fragment,t),tt(H.$$.fragment,t),tt(Et),tt(q.$$.fragment,t),tt(V.$$.fragment,t),tt(G.$$.fragment,t),tt(rt.$$.fragment,t),tt(At),tt(St),tt(Lt),Tt=!0)},o(t){et(a.$$.fragment,t),et(h.$$.fragment,t),et(_.$$.fragment,t),et(w.$$.fragment,t),et(P.$$.fragment,t),et(kt),et(C.$$.fragment,t),et(O.$$.fragment,t),et(Ct),et(B.$$.fragment,t),et(N.$$.fragment,t),et(j.$$.fragment,t),et(H.$$.fragment,t),et(Et),et(q.$$.fragment,t),et(V.$$.fragment,t),et(G.$$.fragment,t),et(rt.$$.fragment,t),et(At),et(St),et(Lt),Tt=!1},d(t){t&&b(e),st(a),st(h),t&&b(u),t&&b(d),st(_),st(w),st(P),kt&&kt.d(),st(C),st(O),Ct&&Ct.d(),st(B),st(N),st(j),st(H),Et&&Et.d(),st(q),st(V),st(G),st(rt),t&&b(at),t&&b(lt),At&&At.d(),St&&St.d(),Ot&&Ot.d(),It[$t].d()}}}function oi(t){let e;return{c(){e=$("link to this page")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function si(t){let e,n;return e=new Kn({props:{items:t[0].names}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.items=t[0].names),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function ri(e){let n;return{c(){n=x("span"),n.textContent="No Name",E(n,"class","noname fw-bold")},m(t,e){y(t,n,e)},p:t,i:t,o:t,d(t){t&&b(n)}}}function ai(t){let e,n,i,o,s;const r=[ri,si],a=[];function l(t,n){return 1&n&&(e=null),null==e&&(e=!!Array.isArray(t[0].names)),e?0:1}return n=l(t,-1),i=a[n]=r[n](t),{c(){i.c(),o=P()},m(t,e){a[n].m(t,e),y(t,o,e),s=!0},p(t,e){let s=n;n=l(t,e),n===s?a[n].p(t,e):(J(),et(a[s],1,1,(()=>{a[s]=null})),Q(),i=a[n],i?i.p(t,e):(i=a[n]=r[n](t),i.c()),tt(i,1),i.m(o.parentNode,o))},i(t){s||(tt(i),s=!0)},o(t){et(i),s=!1},d(t){a[n].d(t),t&&b(o)}}}function li(t){let e,n,i,o=t[0].category+"",s=t[0].type+"";return{c(){e=$(o),n=$(":"),i=$(s)},m(t,o){y(t,e,o),y(t,n,o),y(t,i,o)},p(t,n){1&n&&o!==(o=t[0].category+"")&&A(e,o),1&n&&s!==(s=t[0].type+"")&&A(i,s)},d(t){t&&b(e),t&&b(n),t&&b(i)}}}function ci(t){let e,n=t[0].indexed_date+"";return{c(){e=$(n)},m(t,n){y(t,e,n)},p(t,i){1&i&&n!==(n=t[0].indexed_date+"")&&A(e,n)},d(t){t&&b(e)}}}function hi(t){let e,n;return e=new Fn({props:{title:"Admin Level",$$slots:{default:[ui]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};8388609&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function ui(t){let e,n=t[0].admin_level+"";return{c(){e=$(n)},m(t,n){y(t,e,n)},p(t,i){1&i&&n!==(n=t[0].admin_level+"")&&A(e,n)},d(t){t&&b(e)}}}function di(t){let e,n=t[0].rank_search+"";return{c(){e=$(n)},m(t,n){y(t,e,n)},p(t,i){1&i&&n!==(n=t[0].rank_search+"")&&A(e,n)},d(t){t&&b(e)}}}function pi(t){let e,n,i,o,s=t[0].rank_address+"",r=yt(t[0].rank_address)+"";return{c(){e=$(s),n=$(" ("),i=$(r),o=$(")")},m(t,s){y(t,e,s),y(t,n,s),y(t,i,s),y(t,o,s)},p(t,n){1&n&&s!==(s=t[0].rank_address+"")&&A(e,s),1&n&&r!==(r=yt(t[0].rank_address)+"")&&A(i,r)},d(t){t&&b(e),t&&b(n),t&&b(i),t&&b(o)}}}function mi(t){let e,n;return e=new Fn({props:{title:"Importance",$$slots:{default:[_i]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};8388609&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function fi(t){let e;return{c(){e=$("(estimated)")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function _i(t){let e,n,i,o=t[0].calculated_importance+"",s=!t[0].importance&&fi();return{c(){e=$(o),n=T(),s&&s.c(),i=P()},m(t,o){y(t,e,o),y(t,n,o),s&&s.m(t,o),y(t,i,o)},p(t,n){1&n&&o!==(o=t[0].calculated_importance+"")&&A(e,o),t[0].importance?s&&(s.d(1),s=null):s||(s=fi(),s.c(),s.m(i.parentNode,i))},d(t){t&&b(e),t&&b(n),s&&s.d(t),t&&b(i)}}}function gi(t){let e,n=gt(t[0])+"";return{c(){e=$(n)},m(t,n){y(t,e,n)},p(t,i){1&i&&n!==(n=gt(t[0])+"")&&A(e,n)},d(t){t&&b(e)}}}function vi(t){let e,n,i,o=t[0].centroid.coordinates[1]+"",s=t[0].centroid.coordinates[0]+"";return{c(){e=$(o),n=$(","),i=$(s)},m(t,o){y(t,e,o),y(t,n,o),y(t,i,o)},p(t,n){1&n&&o!==(o=t[0].centroid.coordinates[1]+"")&&A(e,o),1&n&&s!==(s=t[0].centroid.coordinates[0]+"")&&A(i,s)},d(t){t&&b(e),t&&b(n),t&&b(i)}}}function yi(t){let e,n,i=mt(t[0])+"";return{c(){e=new I(!1),n=P(),e.a=n},m(t,o){e.m(i,t,o),y(t,n,o)},p(t,n){1&n&&i!==(i=mt(t[0])+"")&&e.p(i)},d(t){t&&b(n),t&&e.d()}}}function bi(t){let e,n,i,o,s=t[0].place_id+"";return{c(){e=$(s),n=$("\n ("),i=x("a"),i.textContent="on this server",o=$(")"),E(i,"href","https://nominatim.org/release-docs/develop/api/Output/#place_id-is-not-a-persistent-id")},m(t,s){y(t,e,s),y(t,n,s),y(t,i,s),y(t,o,s)},p(t,n){1&n&&s!==(s=t[0].place_id+"")&&A(e,s)},d(t){t&&b(e),t&&b(n),t&&b(i),t&&b(o)}}}function wi(t){let e,n;return e=new Fn({props:{title:"Wikipedia Calculated",$$slots:{default:[xi]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};8388609&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function xi(t){let e,n,i=_t(t[0])+"";return{c(){e=new I(!1),n=P(),e.a=n},m(t,o){e.m(i,t,o),y(t,n,o)},p(t,n){1&n&&i!==(i=_t(t[0])+"")&&e.p(i)},d(t){t&&b(n),t&&e.d()}}}function $i(t){let e,n,i,o,s=t[0].calculated_postcode+"";return i=new jn({props:{postcode:t[0].calculated_postcode,lat:t[0].centroid.coordinates[1],lon:t[0].centroid.coordinates[0]}}),{c(){e=$(s),n=T(),it(i.$$.fragment)},m(t,s){y(t,e,s),y(t,n,s),ot(i,t,s),o=!0},p(t,n){(!o||1&n)&&s!==(s=t[0].calculated_postcode+"")&&A(e,s);const r={};1&n&&(r.postcode=t[0].calculated_postcode),1&n&&(r.lat=t[0].centroid.coordinates[1]),1&n&&(r.lon=t[0].centroid.coordinates[0]),i.$set(r)},i(t){o||(tt(i.$$.fragment,t),o=!0)},o(t){et(i.$$.fragment,t),o=!1},d(t){t&&b(e),t&&b(n),st(i,t)}}}function Li(t){let e,n,i=t[0].calculated_postcode&&$i(t);return{c(){i&&i.c(),e=P()},m(t,o){i&&i.m(t,o),y(t,e,o),n=!0},p(t,n){t[0].calculated_postcode?i?(i.p(t,n),1&n&&tt(i,1)):(i=$i(t),i.c(),tt(i,1),i.m(e.parentNode,e)):i&&(J(),et(i,1,1,(()=>{i=null})),Q())},i(t){n||(tt(i),n=!0)},o(t){et(i),n=!1},d(t){i&&i.d(t),t&&b(e)}}}function Ti(t){let e,n;return e=new Kn({props:{items:t[0].addresstags}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.items=t[0].addresstags),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Pi(t){let e,n;return e=new Kn({props:{items:t[0].extratags}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.items=t[0].extratags),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Mi(t){let e,n,i=t[0].address,o=[];for(let e=0;e<i.length;e+=1)o[e]=ki(ti(t,i,e));const s=t=>et(o[t],1,1,(()=>{o[t]=null}));return{c(){for(let t=0;t<o.length;t+=1)o[t].c();e=P()},m(t,i){for(let e=0;e<o.length;e+=1)o[e].m(t,i);y(t,e,i),n=!0},p(t,n){if(1&n){let r;for(i=t[0].address,r=0;r<i.length;r+=1){const s=ti(t,i,r);o[r]?(o[r].p(s,n),tt(o[r],1)):(o[r]=ki(s),o[r].c(),tt(o[r],1),o[r].m(e.parentNode,e))}for(J(),r=i.length;r<o.length;r+=1)s(r);Q()}},i(t){if(!n){for(let t=0;t<i.length;t+=1)tt(o[t]);n=!0}},o(t){o=o.filter(Boolean);for(let t=0;t<o.length;t+=1)et(o[t]);n=!1},d(t){w(o,t),t&&b(e)}}}function ki(t){let e,n;return e=new In({props:{addressLine:t[18],bMarkUnusedLines:!0,bDistanceInMeters:!1}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.addressLine=t[18]),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Ci(t){let e,n,i,o,s=t[0].linked_places,r=[];for(let e=0;e<s.length;e+=1)r[e]=Ei(Qn(t,s,e));const a=t=>et(r[t],1,1,(()=>{r[t]=null}));return{c(){e=x("tr"),e.innerHTML='<td colspan="7" class="svelte-193h58e"><h2 class="svelte-193h58e">Linked Places</h2></td>',n=T();for(let t=0;t<r.length;t+=1)r[t].c();i=P(),E(e,"class","all-columns svelte-193h58e")},m(t,s){y(t,e,s),y(t,n,s);for(let e=0;e<r.length;e+=1)r[e].m(t,s);y(t,i,s),o=!0},p(t,e){if(1&e){let n;for(s=t[0].linked_places,n=0;n<s.length;n+=1){const o=Qn(t,s,n);r[n]?(r[n].p(o,e),tt(r[n],1)):(r[n]=Ei(o),r[n].c(),tt(r[n],1),r[n].m(i.parentNode,i))}for(J(),n=s.length;n<r.length;n+=1)a(n);Q()}},i(t){if(!o){for(let t=0;t<s.length;t+=1)tt(r[t]);o=!0}},o(t){r=r.filter(Boolean);for(let t=0;t<r.length;t+=1)et(r[t]);o=!1},d(t){t&&b(e),t&&b(n),w(r,t),t&&b(i)}}}function Ei(t){let e,n;return e=new In({props:{addressLine:t[18],bMarkUnusedLines:!0,bDistanceInMeters:!0}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.addressLine=t[18]),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Ai(t){let e,n,i;function o(t,e){return t[2].keywords?Oi:Si}let s=o(t),r=s(t);return{c(){e=x("tr"),e.innerHTML='<td colspan="7" class="svelte-193h58e"><h2 class="svelte-193h58e">Keywords</h2></td>',n=T(),r.c(),i=P(),E(e,"class","all-columns svelte-193h58e")},m(t,o){y(t,e,o),y(t,n,o),r.m(t,o),y(t,i,o)},p(t,e){s===(s=o(t))&&r?r.p(t,e):(r.d(1),r=s(t),r&&(r.c(),r.m(i.parentNode,i)))},d(t){t&&b(e),t&&b(n),r.d(t),t&&b(i)}}}function Si(t){let e,n,i,o,s;return{c(){e=x("tr"),n=x("td"),i=x("a"),o=$("display keywords"),E(i,"class","btn btn-outline-secondary btn-sm"),E(i,"href",s=t[1]+"&keywords=1")},m(t,s){y(t,e,s),v(e,n),v(n,i),v(i,o)},p(t,e){2&e&&s!==(s=t[1]+"&keywords=1")&&E(i,"href",s)},d(t){t&&b(e)}}}function Oi(t){let e,n;function i(t,n){var i;return 1&n&&(e=null),null==e&&(i=t[0],e=!!(i.keywords&&i.keywords.name&&i.keywords.address&&(i.keywords.name.length>0||i.keywords.address.length>0))),e?Ii:zi}let o=i(t,-1),s=o(t);return{c(){s.c(),n=P()},m(t,e){s.m(t,e),y(t,n,e)},p(t,e){o===(o=i(t,e))&&s?s.p(t,e):(s.d(1),s=o(t),s&&(s.c(),s.m(n.parentNode,n)))},d(t){s.d(t),t&&b(n)}}}function zi(e){let n;return{c(){n=x("tr"),n.innerHTML="<td>Place has no keywords</td>"},m(t,e){y(t,n,e)},p:t,d(t){t&&b(n)}}}function Ii(t){let e,n,i,o,s=t[0].keywords.name,r=[];for(let e=0;e<s.length;e+=1)r[e]=Di(Jn(t,s,e));let a=t[0].keywords.address&&Ni(t);return{c(){e=x("tr"),e.innerHTML='<td colspan="7" class="svelte-193h58e"><h3 class="svelte-193h58e">Name Keywords</h3></td>',n=T();for(let t=0;t<r.length;t+=1)r[t].c();i=T(),a&&a.c(),o=P(),E(e,"class","all-columns svelte-193h58e")},m(t,s){y(t,e,s),y(t,n,s);for(let e=0;e<r.length;e+=1)r[e].m(t,s);y(t,i,s),a&&a.m(t,s),y(t,o,s)},p(t,e){if(1&e){let n;for(s=t[0].keywords.name,n=0;n<s.length;n+=1){const o=Jn(t,s,n);r[n]?r[n].p(o,e):(r[n]=Di(o),r[n].c(),r[n].m(i.parentNode,i))}for(;n<r.length;n+=1)r[n].d(1);r.length=s.length}t[0].keywords.address?a?a.p(t,e):(a=Ni(t),a.c(),a.m(o.parentNode,o)):a&&(a.d(1),a=null)},d(t){t&&b(e),t&&b(n),w(r,t),t&&b(i),a&&a.d(t),t&&b(o)}}}function Bi(t){let e,n,i,o=t[13].id+"";return{c(){e=x("td"),n=$("word id: "),i=$(o)},m(t,o){y(t,e,o),v(e,n),v(e,i)},p(t,e){1&e&&o!==(o=t[13].id+"")&&A(i,o)},d(t){t&&b(e)}}}function Di(t){let e,n,i,o,s=$t(t[13].token)+"",r=t[13].id&&Bi(t);return{c(){e=x("tr"),n=x("td"),i=$(s),o=T(),r&&r.c()},m(t,s){y(t,e,s),v(e,n),v(n,i),v(e,o),r&&r.m(e,null)},p(t,n){1&n&&s!==(s=$t(t[13].token)+"")&&A(i,s),t[13].id?r?r.p(t,n):(r=Bi(t),r.c(),r.m(e,null)):r&&(r.d(1),r=null)},d(t){t&&b(e),r&&r.d()}}}function Ni(t){let e,n,i,o=t[0].keywords.address,s=[];for(let e=0;e<o.length;e+=1)s[e]=ji(Xn(t,o,e));return{c(){e=x("tr"),e.innerHTML='<td colspan="7" class="svelte-193h58e"><h3 class="svelte-193h58e">Address Keywords</h3></td>',n=T();for(let t=0;t<s.length;t+=1)s[t].c();i=P(),E(e,"class","all-columns svelte-193h58e")},m(t,o){y(t,e,o),y(t,n,o);for(let e=0;e<s.length;e+=1)s[e].m(t,o);y(t,i,o)},p(t,e){if(1&e){let n;for(o=t[0].keywords.address,n=0;n<o.length;n+=1){const r=Xn(t,o,n);s[n]?s[n].p(r,e):(s[n]=ji(r),s[n].c(),s[n].m(i.parentNode,i))}for(;n<s.length;n+=1)s[n].d(1);s.length=o.length}},d(t){t&&b(e),t&&b(n),w(s,t),t&&b(i)}}}function Zi(t){let e,n,i,o=t[13].id+"";return{c(){e=x("td"),n=$("word id: "),i=$(o)},m(t,o){y(t,e,o),v(e,n),v(e,i)},p(t,e){1&e&&o!==(o=t[13].id+"")&&A(i,o)},d(t){t&&b(e)}}}function ji(t){let e,n,i,o,s,r=$t(t[13].token)+"",a=t[13].id&&Zi(t);return{c(){e=x("tr"),n=x("td"),i=$(r),o=T(),a&&a.c(),s=T()},m(t,r){y(t,e,r),v(e,n),v(n,i),v(e,o),a&&a.m(e,null),v(e,s)},p(t,n){1&n&&r!==(r=$t(t[13].token)+"")&&A(i,r),t[13].id?a?a.p(t,n):(a=Zi(t),a.c(),a.m(e,s)):a&&(a.d(1),a=null)},d(t){t&&b(e),a&&a.d()}}}function Ri(e){let n,i,o,s,r;return{c(){n=x("tr"),i=x("td"),o=x("a"),s=$("display child places"),E(o,"class","btn btn-outline-secondary btn-sm"),E(o,"href",r=e[1]+"&hierarchy=1")},m(t,e){y(t,n,e),v(n,i),v(i,o),v(o,s)},p(t,e){2&e&&r!==(r=t[1]+"&hierarchy=1")&&E(o,"href",r)},i:t,o:t,d(t){t&&b(n)}}}function Hi(t){let e,n,i,o,s;const r=[Wi,Fi],a=[];function l(t,n){return 1&n&&(e=null),null==e&&(e=!(!t[0].hierarchy||"object"!=typeof t[0].hierarchy||!Object.keys(t[0].hierarchy).length)),e?0:1}return n=l(t,-1),i=a[n]=r[n](t),{c(){i.c(),o=P()},m(t,e){a[n].m(t,e),y(t,o,e),s=!0},p(t,e){let s=n;n=l(t,e),n===s?a[n].p(t,e):(J(),et(a[s],1,1,(()=>{a[s]=null})),Q(),i=a[n],i?i.p(t,e):(i=a[n]=r[n](t),i.c()),tt(i,1),i.m(o.parentNode,o))},i(t){s||(tt(i),s=!0)},o(t){et(i),s=!1},d(t){a[n].d(t),t&&b(o)}}}function Fi(e){let n;return{c(){n=x("tr"),n.innerHTML="<td>Place is not parent of other places</td>"},m(t,e){y(t,n,e)},p:t,i:t,o:t,d(t){t&&b(n)}}}function Wi(t){let e,n,i,o=Object.keys(t[0].hierarchy)>500,s=Object.keys(t[0].hierarchy),r=[];for(let e=0;e<s.length;e+=1)r[e]=Ui(Gn(t,s,e));const a=t=>et(r[t],1,1,(()=>{r[t]=null}));let l=o&&Vi();return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=T(),l&&l.c(),n=P()},m(t,o){for(let e=0;e<r.length;e+=1)r[e].m(t,o);y(t,e,o),l&&l.m(t,o),y(t,n,o),i=!0},p(t,i){if(1&i){let n;for(s=Object.keys(t[0].hierarchy),n=0;n<s.length;n+=1){const o=Gn(t,s,n);r[n]?(r[n].p(o,i),tt(r[n],1)):(r[n]=Ui(o),r[n].c(),tt(r[n],1),r[n].m(e.parentNode,e))}for(J(),n=s.length;n<r.length;n+=1)a(n);Q()}1&i&&(o=Object.keys(t[0].hierarchy)>500),o?l||(l=Vi(),l.c(),l.m(n.parentNode,n)):l&&(l.d(1),l=null)},i(t){if(!i){for(let t=0;t<s.length;t+=1)tt(r[t]);i=!0}},o(t){r=r.filter(Boolean);for(let t=0;t<r.length;t+=1)et(r[t]);i=!1},d(t){w(r,t),t&&b(e),l&&l.d(t),t&&b(n)}}}function qi(t){let e,n;return e=new In({props:{addressLine:t[10],bDistanceInMeters:!0}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.addressLine=t[10]),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Ui(t){let e,n,i,o,s,r,a,l=t[7]+"",c=t[0].hierarchy[t[7]],h=[];for(let e=0;e<c.length;e+=1)h[e]=qi(Yn(t,c,e));const u=t=>et(h[t],1,1,(()=>{h[t]=null}));return{c(){e=x("tr"),n=x("td"),i=x("h3"),o=$(l),s=T();for(let t=0;t<h.length;t+=1)h[t].c();r=P(),E(i,"class","svelte-193h58e"),E(n,"colspan","7"),E(n,"class","svelte-193h58e"),E(e,"class","all-columns svelte-193h58e")},m(t,l){y(t,e,l),v(e,n),v(n,i),v(i,o),y(t,s,l);for(let e=0;e<h.length;e+=1)h[e].m(t,l);y(t,r,l),a=!0},p(t,e){if((!a||1&e)&&l!==(l=t[7]+"")&&A(o,l),1&e){let n;for(c=t[0].hierarchy[t[7]],n=0;n<c.length;n+=1){const i=Yn(t,c,n);h[n]?(h[n].p(i,e),tt(h[n],1)):(h[n]=qi(i),h[n].c(),tt(h[n],1),h[n].m(r.parentNode,r))}for(J(),n=c.length;n<h.length;n+=1)u(n);Q()}},i(t){if(!a){for(let t=0;t<c.length;t+=1)tt(h[t]);a=!0}},o(t){h=h.filter(Boolean);for(let t=0;t<h.length;t+=1)et(h[t]);a=!1},d(t){t&&b(e),t&&b(s),w(h,t),t&&b(r)}}}function Vi(t){let e;return{c(){e=x("p"),e.textContent="There are more child objects which are not shown."},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function Ki(t){let e,n,i,o,s,r;e=new ge({props:{$$slots:{default:[ei]},$$scope:{ctx:t}}});const a=[ii,ni],l=[];function c(t,e){return t[0]?0:""!==window.location.search&&t[3]?1:-1}return~(o=c(t))&&(s=l[o]=a[o](t)),{c(){it(e.$$.fragment),n=T(),i=x("div"),s&&s.c(),E(i,"class","container")},m(t,s){ot(e,t,s),y(t,n,s),y(t,i,s),~o&&l[o].m(i,null),r=!0},p(t,[n]){const r={};8388612&n&&(r.$$scope={dirty:n,ctx:t}),e.$set(r);let h=o;o=c(t),o===h?~o&&l[o].p(t,n):(s&&(J(),et(l[h],1,1,(()=>{l[h]=null})),Q()),~o?(s=l[o],s?s.p(t,n):(s=l[o]=a[o](t),s.c()),tt(s,1),s.m(i,null)):s=null)},i(t){r||(tt(e.$$.fragment,t),tt(s),r=!0)},o(t){et(e.$$.fragment,t),et(s),r=!1},d(t){st(e,t),t&&b(n),t&&b(i),~o&&l[o].d()}}}function Gi(t,e,n){let i,o,s,r,a;d(t,kt,(t=>n(5,o=t)));let l=!1;return t.$$.update=()=>{if(32&t.$$.dirty){let t=o;"details"===t.tab&&(e=t.params,n(2,a={place_id:e.get("place_id"),osmtype:e.get("osmtype"),osmid:e.get("osmid"),class:e.get("class"),keywords:e.get("keywords"),addressdetails:1,hierarchy:"1"===e.get("hierarchy")?1:0,group_hierarchy:1,polygon_geojson:1,format:"json"}),n(3,l=!1),a.place_id||a.osmtype&&a.osmid?(a.place_id?Zt("Details for "+a.place_id):Zt("Details for "+a.osmtype+a.osmid),It("details",a,(function(t){window.scrollTo(0,0),n(3,l=!0),n(0,s=t&&!t.error?t:void 0)}))):n(0,s=void 0),n(1,r=window.location.search))}var e},n(4,i=Nominatim_Config.Reverse_Only),[s,r,a,l,i,o]}class Yi extends lt{constructor(t){super(),at(this,t,Gi,Ki,r,{})}}function Xi(t,e,n){const i=t.slice();return i[2]=e[n],i}function Ji(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,L,P,M,k,C,S,O,z,I,B,D,N=t[2].osm_type+"",Z=mt(t[2])+"",j=t[2].class+"",R=t[2].type+"",H=t[2].name+"",F=(t[2].country_code||"")+"",W=t[2].errormessage+"",q=t[2].updated+"";return{c(){e=x("tr"),n=x("td"),i=$(N),o=T(),s=x("td"),r=T(),a=x("td"),l=$(j),c=T(),h=x("td"),u=$(R),d=T(),p=x("td"),m=$(H),f=T(),_=x("td"),g=$(F),w=T(),L=x("td"),P=$(W),M=T(),k=x("td"),C=$(q),S=T(),O=x("td"),z=x("a"),I=$("josm"),D=T(),E(z,"href",B="http://localhost:8111/import?url=https://www.openstreetmap.org/api/0.6/"+pt(t[2].osm_type)+"/"+t[2].osm_id+"/full"),E(z,"target","josm")},m(t,b){y(t,e,b),v(e,n),v(n,i),v(e,o),v(e,s),s.innerHTML=Z,v(e,r),v(e,a),v(a,l),v(e,c),v(e,h),v(h,u),v(e,d),v(e,p),v(p,m),v(e,f),v(e,_),v(_,g),v(e,w),v(e,L),v(L,P),v(e,M),v(e,k),v(k,C),v(e,S),v(e,O),v(O,z),v(z,I),v(e,D)},p(t,e){1&e&&N!==(N=t[2].osm_type+"")&&A(i,N),1&e&&Z!==(Z=mt(t[2])+"")&&(s.innerHTML=Z),1&e&&j!==(j=t[2].class+"")&&A(l,j),1&e&&R!==(R=t[2].type+"")&&A(u,R),1&e&&H!==(H=t[2].name+"")&&A(m,H),1&e&&F!==(F=(t[2].country_code||"")+"")&&A(g,F),1&e&&W!==(W=t[2].errormessage+"")&&A(P,W),1&e&&q!==(q=t[2].updated+"")&&A(C,q),1&e&&B!==(B="http://localhost:8111/import?url=https://www.openstreetmap.org/api/0.6/"+pt(t[2].osm_type)+"/"+t[2].osm_id+"/full")&&E(z,"href",B)},d(t){t&&b(e)}}}function Qi(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,L=t[0].length+"";e=new ge({});let P=t[0],M=[];for(let e=0;e<P.length;e+=1)M[e]=Ji(Xi(t,P,e));return{c(){it(e.$$.fragment),n=T(),i=x("div"),o=x("div"),s=x("div"),r=x("h1"),r.textContent="Broken polygons",a=T(),l=x("p"),c=$("Total number of broken polygons: "),h=$(L),u=$("."),d=T(),p=x("table"),m=x("thead"),m.innerHTML="<th>OSM type</th> \n <th>OSM id</th> \n <th>Class</th> \n <th>Type</th> \n <th>Name</th> \n <th>Country Code</th> \n <th>Error message</th> \n <th>Updated</th> \n <th></th>",f=T(),_=x("tbody");for(let t=0;t<M.length;t+=1)M[t].c();E(p,"class","table table-striped table-hover"),E(s,"class","col-sm-12"),E(o,"class","row"),E(i,"class","container")},m(t,b){ot(e,t,b),y(t,n,b),y(t,i,b),v(i,o),v(o,s),v(s,r),v(s,a),v(s,l),v(l,c),v(l,h),v(l,u),v(s,d),v(s,p),v(p,m),v(p,f),v(p,_);for(let t=0;t<M.length;t+=1)M[t].m(_,null);g=!0},p(t,[e]){if((!g||1&e)&&L!==(L=t[0].length+"")&&A(h,L),1&e){let n;for(P=t[0],n=0;n<P.length;n+=1){const i=Xi(t,P,n);M[n]?M[n].p(i,e):(M[n]=Ji(i),M[n].c(),M[n].m(_,null))}for(;n<M.length;n+=1)M[n].d(1);M.length=P.length}},i(t){g||(tt(e.$$.fragment,t),g=!0)},o(t){et(e.$$.fragment,t),g=!1},d(t){st(e,t),t&&b(n),t&&b(i),w(M,t)}}}function to(t,e,n){let i=[];return D((function(){It("polygons",{format:"json"},(function(t){n(0,i=t)})),Zt("Broken polygons")})),[i]}class eo extends lt{constructor(t){super(),at(this,t,to,Qi,r,{})}}function no(t,e,n){const i=t.slice();return i[2]=e[n],i}function io(t){let e,n=t[2].place_id+"";return{c(){e=$(n)},m(t,n){y(t,e,n)},p(t,i){1&i&&n!==(n=t[2].place_id+"")&&A(e,n)},d(t){t&&b(e)}}}function oo(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,L,P,M,k,C=t[2].country_code+"",E=t[2].name+"",S=mt(t[2])+"",O=t[2].osm_type+"",z=t[2].class+"",I=t[2].type+"";return i=new Ae({props:{feature:t[2],$$slots:{default:[io]},$$scope:{ctx:t}}}),{c(){e=x("tr"),n=x("td"),it(i.$$.fragment),o=T(),s=x("td"),r=$(C),a=T(),l=x("td"),c=$(E),h=T(),u=x("td"),d=T(),p=x("td"),m=$(O),f=T(),_=x("td"),g=$(z),w=T(),L=x("td"),P=$(I),M=T()},m(t,b){y(t,e,b),v(e,n),ot(i,n,null),v(e,o),v(e,s),v(s,r),v(e,a),v(e,l),v(l,c),v(e,h),v(e,u),u.innerHTML=S,v(e,d),v(e,p),v(p,m),v(e,f),v(e,_),v(_,g),v(e,w),v(e,L),v(L,P),v(e,M),k=!0},p(t,e){const n={};1&e&&(n.feature=t[2]),33&e&&(n.$$scope={dirty:e,ctx:t}),i.$set(n),(!k||1&e)&&C!==(C=t[2].country_code+"")&&A(r,C),(!k||1&e)&&E!==(E=t[2].name+"")&&A(c,E),(!k||1&e)&&S!==(S=mt(t[2])+"")&&(u.innerHTML=S),(!k||1&e)&&O!==(O=t[2].osm_type+"")&&A(m,O),(!k||1&e)&&z!==(z=t[2].class+"")&&A(g,z),(!k||1&e)&&I!==(I=t[2].type+"")&&A(P,I)},i(t){k||(tt(i.$$.fragment,t),k=!0)},o(t){et(i.$$.fragment,t),k=!1},d(t){t&&b(e),st(i)}}}function so(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g=t[0].length+"";e=new ge({});let L=t[0],P=[];for(let e=0;e<L.length;e+=1)P[e]=oo(no(t,L,e));const M=t=>et(P[t],1,1,(()=>{P[t]=null}));return{c(){it(e.$$.fragment),n=T(),i=x("div"),o=x("div"),s=x("div"),r=x("h1"),r.textContent="Deletable",a=T(),l=x("p"),c=$(g),h=$(" objects have been deleted in OSM but are still in the Nominatim database."),u=T(),d=x("table"),p=x("thead"),p.innerHTML="<th>Place id</th> \n <th>Country Code</th> \n <th>Name</th> \n <th>OSM id</th> \n <th>OSM type</th> \n <th>Class</th> \n <th>Type</th>",m=T(),f=x("tbody");for(let t=0;t<P.length;t+=1)P[t].c();E(d,"class","table table-striped table-hover"),E(s,"class","col-sm-12"),E(o,"class","row"),E(i,"class","container")},m(t,g){ot(e,t,g),y(t,n,g),y(t,i,g),v(i,o),v(o,s),v(s,r),v(s,a),v(s,l),v(l,c),v(l,h),v(s,u),v(s,d),v(d,p),v(d,m),v(d,f);for(let t=0;t<P.length;t+=1)P[t].m(f,null);_=!0},p(t,[e]){if((!_||1&e)&&g!==(g=t[0].length+"")&&A(c,g),1&e){let n;for(L=t[0],n=0;n<L.length;n+=1){const i=no(t,L,n);P[n]?(P[n].p(i,e),tt(P[n],1)):(P[n]=oo(i),P[n].c(),tt(P[n],1),P[n].m(f,null))}for(J(),n=L.length;n<P.length;n+=1)M(n);Q()}},i(t){if(!_){tt(e.$$.fragment,t);for(let t=0;t<L.length;t+=1)tt(P[t]);_=!0}},o(t){et(e.$$.fragment,t),P=P.filter(Boolean);for(let t=0;t<P.length;t+=1)et(P[t]);_=!1},d(t){st(e,t),t&&b(n),t&&b(i),w(P,t)}}}function ro(t,e,n){let i=[];return D((function(){It("deletable",{format:"json"},(function(t){n(0,i=t)})),Zt("Deletable objects")})),[i]}class ao extends lt{constructor(t){super(),at(this,t,ro,so,r,{})}}function lo(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,L,P,M,k,C=t[1].Nominatim_API_Endpoint+"",S=t[0].software_version+"",O=t[0].database_version+"",z=t[0].data_updated+"";return e=new ge({}),{c(){it(e.$$.fragment),n=T(),i=x("div"),o=x("div"),s=x("div"),r=x("h1"),r.textContent="Server status",a=T(),l=x("dl"),c=x("dt"),c.textContent="API Endpoint",h=x("dd"),u=x("a"),d=$(C),p=x("dt"),p.textContent="Software version",m=x("dd"),f=$(S),_=x("dt"),_.textContent="Database version",g=x("dd"),w=$(O),L=x("dt"),L.textContent="Data last updated",P=x("dd"),M=$(z),E(u,"href",t[1].Nominatim_API_Endpoint),E(s,"class","col-sm-12"),E(o,"class","row"),E(i,"class","container")},m(t,b){ot(e,t,b),y(t,n,b),y(t,i,b),v(i,o),v(o,s),v(s,r),v(s,a),v(s,l),v(l,c),v(l,h),v(h,u),v(u,d),v(l,p),v(l,m),v(m,f),v(l,_),v(l,g),v(g,w),v(l,L),v(l,P),v(P,M),k=!0},p(t,[e]){(!k||1&e)&&S!==(S=t[0].software_version+"")&&A(f,S),(!k||1&e)&&O!==(O=t[0].database_version+"")&&A(w,O),(!k||1&e)&&z!==(z=t[0].data_updated+"")&&A(M,z)},i(t){k||(tt(e.$$.fragment,t),k=!0)},o(t){et(e.$$.fragment,t),k=!1},d(t){st(e,t),t&&b(n),t&&b(i)}}}function co(t,e,n){let i={},o=Nominatim_Config;return D((function(){It("status",{format:"json"},(function(t){n(0,i=t)})),Zt("Server status")})),[i,o]}class ho extends lt{constructor(t){super(),at(this,t,co,lo,r,{})}}function uo(e){let n,i,o,s;return n=new ge({}),{c(){it(n.$$.fragment),i=T(),o=x("div"),E(o,"id","about-help"),E(o,"class","container svelte-1l5yrvt")},m(t,e){ot(n,t,e),y(t,i,e),y(t,o,e),s=!0},p:t,i(t){s||(tt(n.$$.fragment,t),s=!0)},o(t){et(n.$$.fragment,t),s=!1},d(t){st(n,t),t&&b(i),t&&b(o)}}}function po(t){return D((()=>{Dt("theme/about-help.html",document.getElementById("about-help"))})),[]}class mo extends lt{constructor(t){super(),at(this,t,po,uo,r,{})}}function fo(t){let e,n;return e=new mo({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function _o(t){let e,n;return e=new ho({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function go(t){let e,n;return e=new eo({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function vo(t){let e,n;return e=new ao({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function yo(t){let e,n;return e=new Yi({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function bo(t){let e,n;return e=new wn({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function wo(t){let e,n;return e=new hn({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function xo(t){let e,n,i,o,s,r,a;const l=[wo,bo,yo,vo,go,_o,fo],c=[];function h(t,e){return"search"===t[0]?0:"reverse"===t[0]?1:"details"===t[0]?2:"deletable"===t[0]?3:"polygons"===t[0]?4:"status"===t[0]?5:"about"===t[0]?6:-1}return~(e=h(t))&&(n=c[e]=l[e](t)),o=new Ot({}),{c(){n&&n.c(),i=T(),it(o.$$.fragment)},m(n,l){~e&&c[e].m(n,l),y(n,i,l),ot(o,n,l),s=!0,r||(a=M(window,"popstate",t[2]),r=!0)},p(t,[o]){let s=e;e=h(t),e!==s&&(n&&(J(),et(c[s],1,1,(()=>{c[s]=null})),Q()),~e?(n=c[e],n||(n=c[e]=l[e](t),n.c()),tt(n,1),n.m(i.parentNode,i)):n=null)},i(t){s||(tt(n),tt(o.$$.fragment,t),s=!0)},o(t){et(n),et(o.$$.fragment,t),s=!1},d(t){~e&&c[e].d(t),t&&b(i),st(o,t),r=!1,a()}}}function $o(t,e,n){let i,o;d(t,kt,(t=>n(1,o=t))),At();return t.$$.update=()=>{2&t.$$.dirty&&n(0,i=o.tab)},[i,o,()=>At()]}new class extends lt{constructor(t){super(),at(this,t,$o,xo,r,{})}}({target:document.body})}();
//# sourceMappingURL=bundle.js.map
-{"version":3,"file":"bundle.js","sources":["../../.yarn/cache/svelte-npm-3.50.1-9c43f6e0f1-90c9f80ed1.zip/node_modules/svelte/internal/index.mjs","../../.yarn/$$virtual/bootstrap-virtual-191b9b7a0d/0/cache/bootstrap-npm-5.2.1-615925a4f6-2ee91b6f87.zip/node_modules/bootstrap/dist/js/bootstrap.bundle.js","../../.yarn/cache/svelte-npm-3.50.1-9c43f6e0f1-90c9f80ed1.zip/node_modules/svelte/store/index.mjs","../../src/lib/stores.js","../../src/components/Footer.svelte","../../src/lib/api_utils.js","../../src/components/PageLink.svelte","../../src/components/ReverseLink.svelte","../../.yarn/cache/timeago.js-npm-4.0.2-e87d64f9a3-7c5bb9d45f.zip/node_modules/timeago.js/esm/lang/en_US.js","../../.yarn/cache/timeago.js-npm-4.0.2-e87d64f9a3-7c5bb9d45f.zip/node_modules/timeago.js/esm/lang/zh_CN.js","../../.yarn/cache/timeago.js-npm-4.0.2-e87d64f9a3-7c5bb9d45f.zip/node_modules/timeago.js/esm/register.js","../../.yarn/cache/timeago.js-npm-4.0.2-e87d64f9a3-7c5bb9d45f.zip/node_modules/timeago.js/esm/utils/date.js","../../.yarn/cache/timeago.js-npm-4.0.2-e87d64f9a3-7c5bb9d45f.zip/node_modules/timeago.js/esm/format.js","../../src/components/LastUpdated.svelte","../../.yarn/cache/timeago.js-npm-4.0.2-e87d64f9a3-7c5bb9d45f.zip/node_modules/timeago.js/esm/index.js","../../src/components/Error.svelte","../../src/components/Header.svelte","../../src/components/UrlSubmitForm.svelte","../../src/components/SearchSection.svelte","../../.yarn/cache/escape-html-npm-1.0.3-376c22ee74-900a7f2b80.zip/node_modules/escape-html/index.js","../../src/lib/helpers.js","../../src/components/DetailsLink.svelte","../../src/components/Welcome.svelte","../../src/components/MapIcon.svelte","../../src/components/ResultsList.svelte","../../.yarn/cache/leaflet-npm-1.9.1-501e2cd745-8a84fbe690.zip/node_modules/leaflet/dist/leaflet-src.esm.js","../../src/components/MapPosition.svelte","../../.yarn/cache/leaflet-minimap-npm-3.6.1-945fa818a3-ac48b72b86.zip/node_modules/leaflet-minimap/dist/Control.MiniMap.min.js","../../src/components/Map.svelte","../../src/pages/SearchPage.svelte","../../src/components/SearchSectionReverse.svelte","../../src/pages/ReversePage.svelte","../../src/components/SearchSectionDetails.svelte","../../src/components/DetailsOneRow.svelte","../../src/components/DetailsPostcodeHint.svelte","../../src/components/DetailsInfoRow.svelte","../../src/components/DetailsInfoRowList.svelte","../../src/pages/DetailsPage.svelte","../../src/pages/PolygonsPage.svelte","../../src/pages/DeletablePage.svelte","../../src/pages/StatusPage.svelte","../../src/pages/AboutPage.svelte","../../src/App.svelte","../../src/main.js"],"sourcesContent":["function noop() { }\nconst identity = x => x;\nfunction assign(tar, src) {\n // @ts-ignore\n for (const k in src)\n tar[k] = src[k];\n return tar;\n}\nfunction is_promise(value) {\n return value && typeof value === 'object' && typeof value.then === 'function';\n}\nfunction add_location(element, file, line, column, char) {\n element.__svelte_meta = {\n loc: { file, line, column, char }\n };\n}\nfunction run(fn) {\n return fn();\n}\nfunction blank_object() {\n return Object.create(null);\n}\nfunction run_all(fns) {\n fns.forEach(run);\n}\nfunction is_function(thing) {\n return typeof thing === 'function';\n}\nfunction safe_not_equal(a, b) {\n return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');\n}\nlet src_url_equal_anchor;\nfunction src_url_equal(element_src, url) {\n if (!src_url_equal_anchor) {\n src_url_equal_anchor = document.createElement('a');\n }\n src_url_equal_anchor.href = url;\n return element_src === src_url_equal_anchor.href;\n}\nfunction not_equal(a, b) {\n return a != a ? b == b : a !== b;\n}\nfunction is_empty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction validate_store(store, name) {\n if (store != null && typeof store.subscribe !== 'function') {\n throw new Error(`'${name}' is not a store with a 'subscribe' method`);\n }\n}\nfunction subscribe(store, ...callbacks) {\n if (store == null) {\n return noop;\n }\n const unsub = store.subscribe(...callbacks);\n return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\nfunction get_store_value(store) {\n let value;\n subscribe(store, _ => value = _)();\n return value;\n}\nfunction component_subscribe(component, store, callback) {\n component.$$.on_destroy.push(subscribe(store, callback));\n}\nfunction create_slot(definition, ctx, $$scope, fn) {\n if (definition) {\n const slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n return definition[0](slot_ctx);\n }\n}\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n return definition[1] && fn\n ? assign($$scope.ctx.slice(), definition[1](fn(ctx)))\n : $$scope.ctx;\n}\nfunction get_slot_changes(definition, $$scope, dirty, fn) {\n if (definition[2] && fn) {\n const lets = definition[2](fn(dirty));\n if ($$scope.dirty === undefined) {\n return lets;\n }\n if (typeof lets === 'object') {\n const merged = [];\n const len = Math.max($$scope.dirty.length, lets.length);\n for (let i = 0; i < len; i += 1) {\n merged[i] = $$scope.dirty[i] | lets[i];\n }\n return merged;\n }\n return $$scope.dirty | lets;\n }\n return $$scope.dirty;\n}\nfunction update_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn) {\n if (slot_changes) {\n const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n slot.p(slot_context, slot_changes);\n }\n}\nfunction update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n update_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn);\n}\nfunction get_all_dirty_from_scope($$scope) {\n if ($$scope.ctx.length > 32) {\n const dirty = [];\n const length = $$scope.ctx.length / 32;\n for (let i = 0; i < length; i++) {\n dirty[i] = -1;\n }\n return dirty;\n }\n return -1;\n}\nfunction exclude_internal_props(props) {\n const result = {};\n for (const k in props)\n if (k[0] !== '$')\n result[k] = props[k];\n return result;\n}\nfunction compute_rest_props(props, keys) {\n const rest = {};\n keys = new Set(keys);\n for (const k in props)\n if (!keys.has(k) && k[0] !== '$')\n rest[k] = props[k];\n return rest;\n}\nfunction compute_slots(slots) {\n const result = {};\n for (const key in slots) {\n result[key] = true;\n }\n return result;\n}\nfunction once(fn) {\n let ran = false;\n return function (...args) {\n if (ran)\n return;\n ran = true;\n fn.call(this, ...args);\n };\n}\nfunction null_to_empty(value) {\n return value == null ? '' : value;\n}\nfunction set_store_value(store, ret, value) {\n store.set(value);\n return ret;\n}\nconst has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\nfunction action_destroyer(action_result) {\n return action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\n\nconst is_client = typeof window !== 'undefined';\nlet now = is_client\n ? () => window.performance.now()\n : () => Date.now();\nlet raf = is_client ? cb => requestAnimationFrame(cb) : noop;\n// used internally for testing\nfunction set_now(fn) {\n now = fn;\n}\nfunction set_raf(fn) {\n raf = fn;\n}\n\nconst tasks = new Set();\nfunction run_tasks(now) {\n tasks.forEach(task => {\n if (!task.c(now)) {\n tasks.delete(task);\n task.f();\n }\n });\n if (tasks.size !== 0)\n raf(run_tasks);\n}\n/**\n * For testing purposes only!\n */\nfunction clear_loops() {\n tasks.clear();\n}\n/**\n * Creates a new task that runs on each raf frame\n * until it returns a falsy value or is aborted\n */\nfunction loop(callback) {\n let task;\n if (tasks.size === 0)\n raf(run_tasks);\n return {\n promise: new Promise(fulfill => {\n tasks.add(task = { c: callback, f: fulfill });\n }),\n abort() {\n tasks.delete(task);\n }\n };\n}\n\n// Track which nodes are claimed during hydration. Unclaimed nodes can then be removed from the DOM\n// at the end of hydration without touching the remaining nodes.\nlet is_hydrating = false;\nfunction start_hydrating() {\n is_hydrating = true;\n}\nfunction end_hydrating() {\n is_hydrating = false;\n}\nfunction upper_bound(low, high, key, value) {\n // Return first index of value larger than input value in the range [low, high)\n while (low < high) {\n const mid = low + ((high - low) >> 1);\n if (key(mid) <= value) {\n low = mid + 1;\n }\n else {\n high = mid;\n }\n }\n return low;\n}\nfunction init_hydrate(target) {\n if (target.hydrate_init)\n return;\n target.hydrate_init = true;\n // We know that all children have claim_order values since the unclaimed have been detached if target is not <head>\n let children = target.childNodes;\n // If target is <head>, there may be children without claim_order\n if (target.nodeName === 'HEAD') {\n const myChildren = [];\n for (let i = 0; i < children.length; i++) {\n const node = children[i];\n if (node.claim_order !== undefined) {\n myChildren.push(node);\n }\n }\n children = myChildren;\n }\n /*\n * Reorder claimed children optimally.\n * We can reorder claimed children optimally by finding the longest subsequence of\n * nodes that are already claimed in order and only moving the rest. The longest\n * subsequence subsequence of nodes that are claimed in order can be found by\n * computing the longest increasing subsequence of .claim_order values.\n *\n * This algorithm is optimal in generating the least amount of reorder operations\n * possible.\n *\n * Proof:\n * We know that, given a set of reordering operations, the nodes that do not move\n * always form an increasing subsequence, since they do not move among each other\n * meaning that they must be already ordered among each other. Thus, the maximal\n * set of nodes that do not move form a longest increasing subsequence.\n */\n // Compute longest increasing subsequence\n // m: subsequence length j => index k of smallest value that ends an increasing subsequence of length j\n const m = new Int32Array(children.length + 1);\n // Predecessor indices + 1\n const p = new Int32Array(children.length);\n m[0] = -1;\n let longest = 0;\n for (let i = 0; i < children.length; i++) {\n const current = children[i].claim_order;\n // Find the largest subsequence length such that it ends in a value less than our current value\n // upper_bound returns first greater value, so we subtract one\n // with fast path for when we are on the current longest subsequence\n const seqLen = ((longest > 0 && children[m[longest]].claim_order <= current) ? longest + 1 : upper_bound(1, longest, idx => children[m[idx]].claim_order, current)) - 1;\n p[i] = m[seqLen] + 1;\n const newLen = seqLen + 1;\n // We can guarantee that current is the smallest value. Otherwise, we would have generated a longer sequence.\n m[newLen] = i;\n longest = Math.max(newLen, longest);\n }\n // The longest increasing subsequence of nodes (initially reversed)\n const lis = [];\n // The rest of the nodes, nodes that will be moved\n const toMove = [];\n let last = children.length - 1;\n for (let cur = m[longest] + 1; cur != 0; cur = p[cur - 1]) {\n lis.push(children[cur - 1]);\n for (; last >= cur; last--) {\n toMove.push(children[last]);\n }\n last--;\n }\n for (; last >= 0; last--) {\n toMove.push(children[last]);\n }\n lis.reverse();\n // We sort the nodes being moved to guarantee that their insertion order matches the claim order\n toMove.sort((a, b) => a.claim_order - b.claim_order);\n // Finally, we move the nodes\n for (let i = 0, j = 0; i < toMove.length; i++) {\n while (j < lis.length && toMove[i].claim_order >= lis[j].claim_order) {\n j++;\n }\n const anchor = j < lis.length ? lis[j] : null;\n target.insertBefore(toMove[i], anchor);\n }\n}\nfunction append(target, node) {\n target.appendChild(node);\n}\nfunction append_styles(target, style_sheet_id, styles) {\n const append_styles_to = get_root_for_style(target);\n if (!append_styles_to.getElementById(style_sheet_id)) {\n const style = element('style');\n style.id = style_sheet_id;\n style.textContent = styles;\n append_stylesheet(append_styles_to, style);\n }\n}\nfunction get_root_for_style(node) {\n if (!node)\n return document;\n const root = node.getRootNode ? node.getRootNode() : node.ownerDocument;\n if (root && root.host) {\n return root;\n }\n return node.ownerDocument;\n}\nfunction append_empty_stylesheet(node) {\n const style_element = element('style');\n append_stylesheet(get_root_for_style(node), style_element);\n return style_element.sheet;\n}\nfunction append_stylesheet(node, style) {\n append(node.head || node, style);\n return style.sheet;\n}\nfunction append_hydration(target, node) {\n if (is_hydrating) {\n init_hydrate(target);\n if ((target.actual_end_child === undefined) || ((target.actual_end_child !== null) && (target.actual_end_child.parentNode !== target))) {\n target.actual_end_child = target.firstChild;\n }\n // Skip nodes of undefined ordering\n while ((target.actual_end_child !== null) && (target.actual_end_child.claim_order === undefined)) {\n target.actual_end_child = target.actual_end_child.nextSibling;\n }\n if (node !== target.actual_end_child) {\n // We only insert if the ordering of this node should be modified or the parent node is not target\n if (node.claim_order !== undefined || node.parentNode !== target) {\n target.insertBefore(node, target.actual_end_child);\n }\n }\n else {\n target.actual_end_child = node.nextSibling;\n }\n }\n else if (node.parentNode !== target || node.nextSibling !== null) {\n target.appendChild(node);\n }\n}\nfunction insert(target, node, anchor) {\n target.insertBefore(node, anchor || null);\n}\nfunction insert_hydration(target, node, anchor) {\n if (is_hydrating && !anchor) {\n append_hydration(target, node);\n }\n else if (node.parentNode !== target || node.nextSibling != anchor) {\n target.insertBefore(node, anchor || null);\n }\n}\nfunction detach(node) {\n node.parentNode.removeChild(node);\n}\nfunction destroy_each(iterations, detaching) {\n for (let i = 0; i < iterations.length; i += 1) {\n if (iterations[i])\n iterations[i].d(detaching);\n }\n}\nfunction element(name) {\n return document.createElement(name);\n}\nfunction element_is(name, is) {\n return document.createElement(name, { is });\n}\nfunction object_without_properties(obj, exclude) {\n const target = {};\n for (const k in obj) {\n if (has_prop(obj, k)\n // @ts-ignore\n && exclude.indexOf(k) === -1) {\n // @ts-ignore\n target[k] = obj[k];\n }\n }\n return target;\n}\nfunction svg_element(name) {\n return document.createElementNS('http://www.w3.org/2000/svg', name);\n}\nfunction text(data) {\n return document.createTextNode(data);\n}\nfunction space() {\n return text(' ');\n}\nfunction empty() {\n return text('');\n}\nfunction listen(node, event, handler, options) {\n node.addEventListener(event, handler, options);\n return () => node.removeEventListener(event, handler, options);\n}\nfunction prevent_default(fn) {\n return function (event) {\n event.preventDefault();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction stop_propagation(fn) {\n return function (event) {\n event.stopPropagation();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction self(fn) {\n return function (event) {\n // @ts-ignore\n if (event.target === this)\n fn.call(this, event);\n };\n}\nfunction trusted(fn) {\n return function (event) {\n // @ts-ignore\n if (event.isTrusted)\n fn.call(this, event);\n };\n}\nfunction attr(node, attribute, value) {\n if (value == null)\n node.removeAttribute(attribute);\n else if (node.getAttribute(attribute) !== value)\n node.setAttribute(attribute, value);\n}\nfunction set_attributes(node, attributes) {\n // @ts-ignore\n const descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n for (const key in attributes) {\n if (attributes[key] == null) {\n node.removeAttribute(key);\n }\n else if (key === 'style') {\n node.style.cssText = attributes[key];\n }\n else if (key === '__value') {\n node.value = node[key] = attributes[key];\n }\n else if (descriptors[key] && descriptors[key].set) {\n node[key] = attributes[key];\n }\n else {\n attr(node, key, attributes[key]);\n }\n }\n}\nfunction set_svg_attributes(node, attributes) {\n for (const key in attributes) {\n attr(node, key, attributes[key]);\n }\n}\nfunction set_custom_element_data(node, prop, value) {\n if (prop in node) {\n node[prop] = typeof node[prop] === 'boolean' && value === '' ? true : value;\n }\n else {\n attr(node, prop, value);\n }\n}\nfunction xlink_attr(node, attribute, value) {\n node.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\nfunction get_binding_group_value(group, __value, checked) {\n const value = new Set();\n for (let i = 0; i < group.length; i += 1) {\n if (group[i].checked)\n value.add(group[i].__value);\n }\n if (!checked) {\n value.delete(__value);\n }\n return Array.from(value);\n}\nfunction to_number(value) {\n return value === '' ? null : +value;\n}\nfunction time_ranges_to_array(ranges) {\n const array = [];\n for (let i = 0; i < ranges.length; i += 1) {\n array.push({ start: ranges.start(i), end: ranges.end(i) });\n }\n return array;\n}\nfunction children(element) {\n return Array.from(element.childNodes);\n}\nfunction init_claim_info(nodes) {\n if (nodes.claim_info === undefined) {\n nodes.claim_info = { last_index: 0, total_claimed: 0 };\n }\n}\nfunction claim_node(nodes, predicate, processNode, createNode, dontUpdateLastIndex = false) {\n // Try to find nodes in an order such that we lengthen the longest increasing subsequence\n init_claim_info(nodes);\n const resultNode = (() => {\n // We first try to find an element after the previous one\n for (let i = nodes.claim_info.last_index; i < nodes.length; i++) {\n const node = nodes[i];\n if (predicate(node)) {\n const replacement = processNode(node);\n if (replacement === undefined) {\n nodes.splice(i, 1);\n }\n else {\n nodes[i] = replacement;\n }\n if (!dontUpdateLastIndex) {\n nodes.claim_info.last_index = i;\n }\n return node;\n }\n }\n // Otherwise, we try to find one before\n // We iterate in reverse so that we don't go too far back\n for (let i = nodes.claim_info.last_index - 1; i >= 0; i--) {\n const node = nodes[i];\n if (predicate(node)) {\n const replacement = processNode(node);\n if (replacement === undefined) {\n nodes.splice(i, 1);\n }\n else {\n nodes[i] = replacement;\n }\n if (!dontUpdateLastIndex) {\n nodes.claim_info.last_index = i;\n }\n else if (replacement === undefined) {\n // Since we spliced before the last_index, we decrease it\n nodes.claim_info.last_index--;\n }\n return node;\n }\n }\n // If we can't find any matching node, we create a new one\n return createNode();\n })();\n resultNode.claim_order = nodes.claim_info.total_claimed;\n nodes.claim_info.total_claimed += 1;\n return resultNode;\n}\nfunction claim_element_base(nodes, name, attributes, create_element) {\n return claim_node(nodes, (node) => node.nodeName === name, (node) => {\n const remove = [];\n for (let j = 0; j < node.attributes.length; j++) {\n const attribute = node.attributes[j];\n if (!attributes[attribute.name]) {\n remove.push(attribute.name);\n }\n }\n remove.forEach(v => node.removeAttribute(v));\n return undefined;\n }, () => create_element(name));\n}\nfunction claim_element(nodes, name, attributes) {\n return claim_element_base(nodes, name, attributes, element);\n}\nfunction claim_svg_element(nodes, name, attributes) {\n return claim_element_base(nodes, name, attributes, svg_element);\n}\nfunction claim_text(nodes, data) {\n return claim_node(nodes, (node) => node.nodeType === 3, (node) => {\n const dataStr = '' + data;\n if (node.data.startsWith(dataStr)) {\n if (node.data.length !== dataStr.length) {\n return node.splitText(dataStr.length);\n }\n }\n else {\n node.data = dataStr;\n }\n }, () => text(data), true // Text nodes should not update last index since it is likely not worth it to eliminate an increasing subsequence of actual elements\n );\n}\nfunction claim_space(nodes) {\n return claim_text(nodes, ' ');\n}\nfunction find_comment(nodes, text, start) {\n for (let i = start; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeType === 8 /* comment node */ && node.textContent.trim() === text) {\n return i;\n }\n }\n return nodes.length;\n}\nfunction claim_html_tag(nodes, is_svg) {\n // find html opening tag\n const start_index = find_comment(nodes, 'HTML_TAG_START', 0);\n const end_index = find_comment(nodes, 'HTML_TAG_END', start_index);\n if (start_index === end_index) {\n return new HtmlTagHydration(undefined, is_svg);\n }\n init_claim_info(nodes);\n const html_tag_nodes = nodes.splice(start_index, end_index - start_index + 1);\n detach(html_tag_nodes[0]);\n detach(html_tag_nodes[html_tag_nodes.length - 1]);\n const claimed_nodes = html_tag_nodes.slice(1, html_tag_nodes.length - 1);\n for (const n of claimed_nodes) {\n n.claim_order = nodes.claim_info.total_claimed;\n nodes.claim_info.total_claimed += 1;\n }\n return new HtmlTagHydration(claimed_nodes, is_svg);\n}\nfunction set_data(text, data) {\n data = '' + data;\n if (text.wholeText !== data)\n text.data = data;\n}\nfunction set_input_value(input, value) {\n input.value = value == null ? '' : value;\n}\nfunction set_input_type(input, type) {\n try {\n input.type = type;\n }\n catch (e) {\n // do nothing\n }\n}\nfunction set_style(node, key, value, important) {\n if (value === null) {\n node.style.removeProperty(key);\n }\n else {\n node.style.setProperty(key, value, important ? 'important' : '');\n }\n}\nfunction select_option(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n if (option.__value === value) {\n option.selected = true;\n return;\n }\n }\n select.selectedIndex = -1; // no option should be selected\n}\nfunction select_options(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n option.selected = ~value.indexOf(option.__value);\n }\n}\nfunction select_value(select) {\n const selected_option = select.querySelector(':checked') || select.options[0];\n return selected_option && selected_option.__value;\n}\nfunction select_multiple_value(select) {\n return [].map.call(select.querySelectorAll(':checked'), option => option.__value);\n}\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\nlet crossorigin;\nfunction is_crossorigin() {\n if (crossorigin === undefined) {\n crossorigin = false;\n try {\n if (typeof window !== 'undefined' && window.parent) {\n void window.parent.document;\n }\n }\n catch (error) {\n crossorigin = true;\n }\n }\n return crossorigin;\n}\nfunction add_resize_listener(node, fn) {\n const computed_style = getComputedStyle(node);\n if (computed_style.position === 'static') {\n node.style.position = 'relative';\n }\n const iframe = element('iframe');\n iframe.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ' +\n 'overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;');\n iframe.setAttribute('aria-hidden', 'true');\n iframe.tabIndex = -1;\n const crossorigin = is_crossorigin();\n let unsubscribe;\n if (crossorigin) {\n iframe.src = \"data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}</script>\";\n unsubscribe = listen(window, 'message', (event) => {\n if (event.source === iframe.contentWindow)\n fn();\n });\n }\n else {\n iframe.src = 'about:blank';\n iframe.onload = () => {\n unsubscribe = listen(iframe.contentWindow, 'resize', fn);\n };\n }\n append(node, iframe);\n return () => {\n if (crossorigin) {\n unsubscribe();\n }\n else if (unsubscribe && iframe.contentWindow) {\n unsubscribe();\n }\n detach(iframe);\n };\n}\nfunction toggle_class(element, name, toggle) {\n element.classList[toggle ? 'add' : 'remove'](name);\n}\nfunction custom_event(type, detail, { bubbles = false, cancelable = false } = {}) {\n const e = document.createEvent('CustomEvent');\n e.initCustomEvent(type, bubbles, cancelable, detail);\n return e;\n}\nfunction query_selector_all(selector, parent = document.body) {\n return Array.from(parent.querySelectorAll(selector));\n}\nclass HtmlTag {\n constructor(is_svg = false) {\n this.is_svg = false;\n this.is_svg = is_svg;\n this.e = this.n = null;\n }\n c(html) {\n this.h(html);\n }\n m(html, target, anchor = null) {\n if (!this.e) {\n if (this.is_svg)\n this.e = svg_element(target.nodeName);\n else\n this.e = element(target.nodeName);\n this.t = target;\n this.c(html);\n }\n this.i(anchor);\n }\n h(html) {\n this.e.innerHTML = html;\n this.n = Array.from(this.e.childNodes);\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert(this.t, this.n[i], anchor);\n }\n }\n p(html) {\n this.d();\n this.h(html);\n this.i(this.a);\n }\n d() {\n this.n.forEach(detach);\n }\n}\nclass HtmlTagHydration extends HtmlTag {\n constructor(claimed_nodes, is_svg = false) {\n super(is_svg);\n this.e = this.n = null;\n this.l = claimed_nodes;\n }\n c(html) {\n if (this.l) {\n this.n = this.l;\n }\n else {\n super.c(html);\n }\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert_hydration(this.t, this.n[i], anchor);\n }\n }\n}\nfunction attribute_to_object(attributes) {\n const result = {};\n for (const attribute of attributes) {\n result[attribute.name] = attribute.value;\n }\n return result;\n}\nfunction get_custom_elements_slots(element) {\n const result = {};\n element.childNodes.forEach((node) => {\n result[node.slot || 'default'] = true;\n });\n return result;\n}\n\n// we need to store the information for multiple documents because a Svelte application could also contain iframes\n// https://github.com/sveltejs/svelte/issues/3624\nconst managed_styles = new Map();\nlet active = 0;\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\nfunction hash(str) {\n let hash = 5381;\n let i = str.length;\n while (i--)\n hash = ((hash << 5) - hash) ^ str.charCodeAt(i);\n return hash >>> 0;\n}\nfunction create_style_information(doc, node) {\n const info = { stylesheet: append_empty_stylesheet(node), rules: {} };\n managed_styles.set(doc, info);\n return info;\n}\nfunction create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {\n const step = 16.666 / duration;\n let keyframes = '{\\n';\n for (let p = 0; p <= 1; p += step) {\n const t = a + (b - a) * ease(p);\n keyframes += p * 100 + `%{${fn(t, 1 - t)}}\\n`;\n }\n const rule = keyframes + `100% {${fn(b, 1 - b)}}\\n}`;\n const name = `__svelte_${hash(rule)}_${uid}`;\n const doc = get_root_for_style(node);\n const { stylesheet, rules } = managed_styles.get(doc) || create_style_information(doc, node);\n if (!rules[name]) {\n rules[name] = true;\n stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);\n }\n const animation = node.style.animation || '';\n node.style.animation = `${animation ? `${animation}, ` : ''}${name} ${duration}ms linear ${delay}ms 1 both`;\n active += 1;\n return name;\n}\nfunction delete_rule(node, name) {\n const previous = (node.style.animation || '').split(', ');\n const next = previous.filter(name\n ? anim => anim.indexOf(name) < 0 // remove specific animation\n : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n );\n const deleted = previous.length - next.length;\n if (deleted) {\n node.style.animation = next.join(', ');\n active -= deleted;\n if (!active)\n clear_rules();\n }\n}\nfunction clear_rules() {\n raf(() => {\n if (active)\n return;\n managed_styles.forEach(info => {\n const { ownerNode } = info.stylesheet;\n // there is no ownerNode if it runs on jsdom.\n if (ownerNode)\n detach(ownerNode);\n });\n managed_styles.clear();\n });\n}\n\nfunction create_animation(node, from, fn, params) {\n if (!from)\n return noop;\n const to = node.getBoundingClientRect();\n if (from.left === to.left && from.right === to.right && from.top === to.top && from.bottom === to.bottom)\n return noop;\n const { delay = 0, duration = 300, easing = identity, \n // @ts-ignore todo: should this be separated from destructuring? Or start/end added to public api and documentation?\n start: start_time = now() + delay, \n // @ts-ignore todo:\n end = start_time + duration, tick = noop, css } = fn(node, { from, to }, params);\n let running = true;\n let started = false;\n let name;\n function start() {\n if (css) {\n name = create_rule(node, 0, 1, duration, delay, easing, css);\n }\n if (!delay) {\n started = true;\n }\n }\n function stop() {\n if (css)\n delete_rule(node, name);\n running = false;\n }\n loop(now => {\n if (!started && now >= start_time) {\n started = true;\n }\n if (started && now >= end) {\n tick(1, 0);\n stop();\n }\n if (!running) {\n return false;\n }\n if (started) {\n const p = now - start_time;\n const t = 0 + 1 * easing(p / duration);\n tick(t, 1 - t);\n }\n return true;\n });\n start();\n tick(0, 1);\n return stop;\n}\nfunction fix_position(node) {\n const style = getComputedStyle(node);\n if (style.position !== 'absolute' && style.position !== 'fixed') {\n const { width, height } = style;\n const a = node.getBoundingClientRect();\n node.style.position = 'absolute';\n node.style.width = width;\n node.style.height = height;\n add_transform(node, a);\n }\n}\nfunction add_transform(node, a) {\n const b = node.getBoundingClientRect();\n if (a.left !== b.left || a.top !== b.top) {\n const style = getComputedStyle(node);\n const transform = style.transform === 'none' ? '' : style.transform;\n node.style.transform = `${transform} translate(${a.left - b.left}px, ${a.top - b.top}px)`;\n }\n}\n\nlet current_component;\nfunction set_current_component(component) {\n current_component = component;\n}\nfunction get_current_component() {\n if (!current_component)\n throw new Error('Function called outside component initialization');\n return current_component;\n}\nfunction beforeUpdate(fn) {\n get_current_component().$$.before_update.push(fn);\n}\nfunction onMount(fn) {\n get_current_component().$$.on_mount.push(fn);\n}\nfunction afterUpdate(fn) {\n get_current_component().$$.after_update.push(fn);\n}\nfunction onDestroy(fn) {\n get_current_component().$$.on_destroy.push(fn);\n}\nfunction createEventDispatcher() {\n const component = get_current_component();\n return (type, detail, { cancelable = false } = {}) => {\n const callbacks = component.$$.callbacks[type];\n if (callbacks) {\n // TODO are there situations where events could be dispatched\n // in a server (non-DOM) environment?\n const event = custom_event(type, detail, { cancelable });\n callbacks.slice().forEach(fn => {\n fn.call(component, event);\n });\n return !event.defaultPrevented;\n }\n return true;\n };\n}\nfunction setContext(key, context) {\n get_current_component().$$.context.set(key, context);\n return context;\n}\nfunction getContext(key) {\n return get_current_component().$$.context.get(key);\n}\nfunction getAllContexts() {\n return get_current_component().$$.context;\n}\nfunction hasContext(key) {\n return get_current_component().$$.context.has(key);\n}\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\nfunction bubble(component, event) {\n const callbacks = component.$$.callbacks[event.type];\n if (callbacks) {\n // @ts-ignore\n callbacks.slice().forEach(fn => fn.call(this, event));\n }\n}\n\nconst dirty_components = [];\nconst intros = { enabled: false };\nconst binding_callbacks = [];\nconst render_callbacks = [];\nconst flush_callbacks = [];\nconst resolved_promise = Promise.resolve();\nlet update_scheduled = false;\nfunction schedule_update() {\n if (!update_scheduled) {\n update_scheduled = true;\n resolved_promise.then(flush);\n }\n}\nfunction tick() {\n schedule_update();\n return resolved_promise;\n}\nfunction add_render_callback(fn) {\n render_callbacks.push(fn);\n}\nfunction add_flush_callback(fn) {\n flush_callbacks.push(fn);\n}\n// flush() calls callbacks in this order:\n// 1. All beforeUpdate callbacks, in order: parents before children\n// 2. All bind:this callbacks, in reverse order: children before parents.\n// 3. All afterUpdate callbacks, in order: parents before children. EXCEPT\n// for afterUpdates called during the initial onMount, which are called in\n// reverse order: children before parents.\n// Since callbacks might update component values, which could trigger another\n// call to flush(), the following steps guard against this:\n// 1. During beforeUpdate, any updated components will be added to the\n// dirty_components array and will cause a reentrant call to flush(). Because\n// the flush index is kept outside the function, the reentrant call will pick\n// up where the earlier call left off and go through all dirty components. The\n// current_component value is saved and restored so that the reentrant call will\n// not interfere with the \"parent\" flush() call.\n// 2. bind:this callbacks cannot trigger new flush() calls.\n// 3. During afterUpdate, any updated components will NOT have their afterUpdate\n// callback called a second time; the seen_callbacks set, outside the flush()\n// function, guarantees this behavior.\nconst seen_callbacks = new Set();\nlet flushidx = 0; // Do *not* move this inside the flush() function\nfunction flush() {\n const saved_component = current_component;\n do {\n // first, call beforeUpdate functions\n // and update components\n while (flushidx < dirty_components.length) {\n const component = dirty_components[flushidx];\n flushidx++;\n set_current_component(component);\n update(component.$$);\n }\n set_current_component(null);\n dirty_components.length = 0;\n flushidx = 0;\n while (binding_callbacks.length)\n binding_callbacks.pop()();\n // then, once components are updated, call\n // afterUpdate functions. This may cause\n // subsequent updates...\n for (let i = 0; i < render_callbacks.length; i += 1) {\n const callback = render_callbacks[i];\n if (!seen_callbacks.has(callback)) {\n // ...so guard against infinite loops\n seen_callbacks.add(callback);\n callback();\n }\n }\n render_callbacks.length = 0;\n } while (dirty_components.length);\n while (flush_callbacks.length) {\n flush_callbacks.pop()();\n }\n update_scheduled = false;\n seen_callbacks.clear();\n set_current_component(saved_component);\n}\nfunction update($$) {\n if ($$.fragment !== null) {\n $$.update();\n run_all($$.before_update);\n const dirty = $$.dirty;\n $$.dirty = [-1];\n $$.fragment && $$.fragment.p($$.ctx, dirty);\n $$.after_update.forEach(add_render_callback);\n }\n}\n\nlet promise;\nfunction wait() {\n if (!promise) {\n promise = Promise.resolve();\n promise.then(() => {\n promise = null;\n });\n }\n return promise;\n}\nfunction dispatch(node, direction, kind) {\n node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\nconst outroing = new Set();\nlet outros;\nfunction group_outros() {\n outros = {\n r: 0,\n c: [],\n p: outros // parent group\n };\n}\nfunction check_outros() {\n if (!outros.r) {\n run_all(outros.c);\n }\n outros = outros.p;\n}\nfunction transition_in(block, local) {\n if (block && block.i) {\n outroing.delete(block);\n block.i(local);\n }\n}\nfunction transition_out(block, local, detach, callback) {\n if (block && block.o) {\n if (outroing.has(block))\n return;\n outroing.add(block);\n outros.c.push(() => {\n outroing.delete(block);\n if (callback) {\n if (detach)\n block.d(1);\n callback();\n }\n });\n block.o(local);\n }\n else if (callback) {\n callback();\n }\n}\nconst null_transition = { duration: 0 };\nfunction create_in_transition(node, fn, params) {\n let config = fn(node, params);\n let running = false;\n let animation_name;\n let task;\n let uid = 0;\n function cleanup() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);\n tick(0, 1);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n if (task)\n task.abort();\n running = true;\n add_render_callback(() => dispatch(node, true, 'start'));\n task = loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(1, 0);\n dispatch(node, true, 'end');\n cleanup();\n return running = false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(t, 1 - t);\n }\n }\n return running;\n });\n }\n let started = false;\n return {\n start() {\n if (started)\n return;\n started = true;\n delete_rule(node);\n if (is_function(config)) {\n config = config();\n wait().then(go);\n }\n else {\n go();\n }\n },\n invalidate() {\n started = false;\n },\n end() {\n if (running) {\n cleanup();\n running = false;\n }\n }\n };\n}\nfunction create_out_transition(node, fn, params) {\n let config = fn(node, params);\n let running = true;\n let animation_name;\n const group = outros;\n group.r += 1;\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n add_render_callback(() => dispatch(node, false, 'start'));\n loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(0, 1);\n dispatch(node, false, 'end');\n if (!--group.r) {\n // this will result in `end()` being called,\n // so we don't need to clean up here\n run_all(group.c);\n }\n return false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(1 - t, t);\n }\n }\n return running;\n });\n }\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go();\n });\n }\n else {\n go();\n }\n return {\n end(reset) {\n if (reset && config.tick) {\n config.tick(1, 0);\n }\n if (running) {\n if (animation_name)\n delete_rule(node, animation_name);\n running = false;\n }\n }\n };\n}\nfunction create_bidirectional_transition(node, fn, params, intro) {\n let config = fn(node, params);\n let t = intro ? 0 : 1;\n let running_program = null;\n let pending_program = null;\n let animation_name = null;\n function clear_animation() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function init(program, duration) {\n const d = (program.b - t);\n duration *= Math.abs(d);\n return {\n a: t,\n b: program.b,\n d,\n duration,\n start: program.start,\n end: program.start + duration,\n group: program.group\n };\n }\n function go(b) {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n const program = {\n start: now() + delay,\n b\n };\n if (!b) {\n // @ts-ignore todo: improve typings\n program.group = outros;\n outros.r += 1;\n }\n if (running_program || pending_program) {\n pending_program = program;\n }\n else {\n // if this is an intro, and there's a delay, we need to do\n // an initial tick and/or apply CSS animation immediately\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, b, duration, delay, easing, css);\n }\n if (b)\n tick(0, 1);\n running_program = init(program, duration);\n add_render_callback(() => dispatch(node, b, 'start'));\n loop(now => {\n if (pending_program && now > pending_program.start) {\n running_program = init(pending_program, duration);\n pending_program = null;\n dispatch(node, running_program.b, 'start');\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);\n }\n }\n if (running_program) {\n if (now >= running_program.end) {\n tick(t = running_program.b, 1 - t);\n dispatch(node, running_program.b, 'end');\n if (!pending_program) {\n // we're done\n if (running_program.b) {\n // intro — we can tidy up immediately\n clear_animation();\n }\n else {\n // outro — needs to be coordinated\n if (!--running_program.group.r)\n run_all(running_program.group.c);\n }\n }\n running_program = null;\n }\n else if (now >= running_program.start) {\n const p = now - running_program.start;\n t = running_program.a + running_program.d * easing(p / running_program.duration);\n tick(t, 1 - t);\n }\n }\n return !!(running_program || pending_program);\n });\n }\n }\n return {\n run(b) {\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go(b);\n });\n }\n else {\n go(b);\n }\n },\n end() {\n clear_animation();\n running_program = pending_program = null;\n }\n };\n}\n\nfunction handle_promise(promise, info) {\n const token = info.token = {};\n function update(type, index, key, value) {\n if (info.token !== token)\n return;\n info.resolved = value;\n let child_ctx = info.ctx;\n if (key !== undefined) {\n child_ctx = child_ctx.slice();\n child_ctx[key] = value;\n }\n const block = type && (info.current = type)(child_ctx);\n let needs_flush = false;\n if (info.block) {\n if (info.blocks) {\n info.blocks.forEach((block, i) => {\n if (i !== index && block) {\n group_outros();\n transition_out(block, 1, 1, () => {\n if (info.blocks[i] === block) {\n info.blocks[i] = null;\n }\n });\n check_outros();\n }\n });\n }\n else {\n info.block.d(1);\n }\n block.c();\n transition_in(block, 1);\n block.m(info.mount(), info.anchor);\n needs_flush = true;\n }\n info.block = block;\n if (info.blocks)\n info.blocks[index] = block;\n if (needs_flush) {\n flush();\n }\n }\n if (is_promise(promise)) {\n const current_component = get_current_component();\n promise.then(value => {\n set_current_component(current_component);\n update(info.then, 1, info.value, value);\n set_current_component(null);\n }, error => {\n set_current_component(current_component);\n update(info.catch, 2, info.error, error);\n set_current_component(null);\n if (!info.hasCatch) {\n throw error;\n }\n });\n // if we previously had a then/catch block, destroy it\n if (info.current !== info.pending) {\n update(info.pending, 0);\n return true;\n }\n }\n else {\n if (info.current !== info.then) {\n update(info.then, 1, info.value, promise);\n return true;\n }\n info.resolved = promise;\n }\n}\nfunction update_await_block_branch(info, ctx, dirty) {\n const child_ctx = ctx.slice();\n const { resolved } = info;\n if (info.current === info.then) {\n child_ctx[info.value] = resolved;\n }\n if (info.current === info.catch) {\n child_ctx[info.error] = resolved;\n }\n info.block.p(child_ctx, dirty);\n}\n\nconst globals = (typeof window !== 'undefined'\n ? window\n : typeof globalThis !== 'undefined'\n ? globalThis\n : global);\n\nfunction destroy_block(block, lookup) {\n block.d(1);\n lookup.delete(block.key);\n}\nfunction outro_and_destroy_block(block, lookup) {\n transition_out(block, 1, 1, () => {\n lookup.delete(block.key);\n });\n}\nfunction fix_and_destroy_block(block, lookup) {\n block.f();\n destroy_block(block, lookup);\n}\nfunction fix_and_outro_and_destroy_block(block, lookup) {\n block.f();\n outro_and_destroy_block(block, lookup);\n}\nfunction update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) {\n let o = old_blocks.length;\n let n = list.length;\n let i = o;\n const old_indexes = {};\n while (i--)\n old_indexes[old_blocks[i].key] = i;\n const new_blocks = [];\n const new_lookup = new Map();\n const deltas = new Map();\n i = n;\n while (i--) {\n const child_ctx = get_context(ctx, list, i);\n const key = get_key(child_ctx);\n let block = lookup.get(key);\n if (!block) {\n block = create_each_block(key, child_ctx);\n block.c();\n }\n else if (dynamic) {\n block.p(child_ctx, dirty);\n }\n new_lookup.set(key, new_blocks[i] = block);\n if (key in old_indexes)\n deltas.set(key, Math.abs(i - old_indexes[key]));\n }\n const will_move = new Set();\n const did_move = new Set();\n function insert(block) {\n transition_in(block, 1);\n block.m(node, next);\n lookup.set(block.key, block);\n next = block.first;\n n--;\n }\n while (o && n) {\n const new_block = new_blocks[n - 1];\n const old_block = old_blocks[o - 1];\n const new_key = new_block.key;\n const old_key = old_block.key;\n if (new_block === old_block) {\n // do nothing\n next = new_block.first;\n o--;\n n--;\n }\n else if (!new_lookup.has(old_key)) {\n // remove old block\n destroy(old_block, lookup);\n o--;\n }\n else if (!lookup.has(new_key) || will_move.has(new_key)) {\n insert(new_block);\n }\n else if (did_move.has(old_key)) {\n o--;\n }\n else if (deltas.get(new_key) > deltas.get(old_key)) {\n did_move.add(new_key);\n insert(new_block);\n }\n else {\n will_move.add(old_key);\n o--;\n }\n }\n while (o--) {\n const old_block = old_blocks[o];\n if (!new_lookup.has(old_block.key))\n destroy(old_block, lookup);\n }\n while (n)\n insert(new_blocks[n - 1]);\n return new_blocks;\n}\nfunction validate_each_keys(ctx, list, get_context, get_key) {\n const keys = new Set();\n for (let i = 0; i < list.length; i++) {\n const key = get_key(get_context(ctx, list, i));\n if (keys.has(key)) {\n throw new Error('Cannot have duplicate keys in a keyed each');\n }\n keys.add(key);\n }\n}\n\nfunction get_spread_update(levels, updates) {\n const update = {};\n const to_null_out = {};\n const accounted_for = { $$scope: 1 };\n let i = levels.length;\n while (i--) {\n const o = levels[i];\n const n = updates[i];\n if (n) {\n for (const key in o) {\n if (!(key in n))\n to_null_out[key] = 1;\n }\n for (const key in n) {\n if (!accounted_for[key]) {\n update[key] = n[key];\n accounted_for[key] = 1;\n }\n }\n levels[i] = n;\n }\n else {\n for (const key in o) {\n accounted_for[key] = 1;\n }\n }\n }\n for (const key in to_null_out) {\n if (!(key in update))\n update[key] = undefined;\n }\n return update;\n}\nfunction get_spread_object(spread_props) {\n return typeof spread_props === 'object' && spread_props !== null ? spread_props : {};\n}\n\n// source: https://html.spec.whatwg.org/multipage/indices.html\nconst boolean_attributes = new Set([\n 'allowfullscreen',\n 'allowpaymentrequest',\n 'async',\n 'autofocus',\n 'autoplay',\n 'checked',\n 'controls',\n 'default',\n 'defer',\n 'disabled',\n 'formnovalidate',\n 'hidden',\n 'ismap',\n 'loop',\n 'multiple',\n 'muted',\n 'nomodule',\n 'novalidate',\n 'open',\n 'playsinline',\n 'readonly',\n 'required',\n 'reversed',\n 'selected'\n]);\n\n/** regex of all html void element names */\nconst void_element_names = /^(?:area|base|br|col|command|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)$/;\nfunction is_void(name) {\n return void_element_names.test(name) || name.toLowerCase() === '!doctype';\n}\n\nconst invalid_attribute_name_character = /[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]/u;\n// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n// https://infra.spec.whatwg.org/#noncharacter\nfunction spread(args, attrs_to_add) {\n const attributes = Object.assign({}, ...args);\n if (attrs_to_add) {\n const classes_to_add = attrs_to_add.classes;\n const styles_to_add = attrs_to_add.styles;\n if (classes_to_add) {\n if (attributes.class == null) {\n attributes.class = classes_to_add;\n }\n else {\n attributes.class += ' ' + classes_to_add;\n }\n }\n if (styles_to_add) {\n if (attributes.style == null) {\n attributes.style = style_object_to_string(styles_to_add);\n }\n else {\n attributes.style = style_object_to_string(merge_ssr_styles(attributes.style, styles_to_add));\n }\n }\n }\n let str = '';\n Object.keys(attributes).forEach(name => {\n if (invalid_attribute_name_character.test(name))\n return;\n const value = attributes[name];\n if (value === true)\n str += ' ' + name;\n else if (boolean_attributes.has(name.toLowerCase())) {\n if (value)\n str += ' ' + name;\n }\n else if (value != null) {\n str += ` ${name}=\"${value}\"`;\n }\n });\n return str;\n}\nfunction merge_ssr_styles(style_attribute, style_directive) {\n const style_object = {};\n for (const individual_style of style_attribute.split(';')) {\n const colon_index = individual_style.indexOf(':');\n const name = individual_style.slice(0, colon_index).trim();\n const value = individual_style.slice(colon_index + 1).trim();\n if (!name)\n continue;\n style_object[name] = value;\n }\n for (const name in style_directive) {\n const value = style_directive[name];\n if (value) {\n style_object[name] = value;\n }\n else {\n delete style_object[name];\n }\n }\n return style_object;\n}\nconst ATTR_REGEX = /[&\"]/g;\nconst CONTENT_REGEX = /[&<]/g;\n/**\n * Note: this method is performance sensitive and has been optimized\n * https://github.com/sveltejs/svelte/pull/5701\n */\nfunction escape(value, is_attr = false) {\n const str = String(value);\n const pattern = is_attr ? ATTR_REGEX : CONTENT_REGEX;\n pattern.lastIndex = 0;\n let escaped = '';\n let last = 0;\n while (pattern.test(str)) {\n const i = pattern.lastIndex - 1;\n const ch = str[i];\n escaped += str.substring(last, i) + (ch === '&' ? '&' : (ch === '\"' ? '"' : '<'));\n last = i + 1;\n }\n return escaped + str.substring(last);\n}\nfunction escape_attribute_value(value) {\n // keep booleans, null, and undefined for the sake of `spread`\n const should_escape = typeof value === 'string' || (value && typeof value === 'object');\n return should_escape ? escape(value, true) : value;\n}\nfunction escape_object(obj) {\n const result = {};\n for (const key in obj) {\n result[key] = escape_attribute_value(obj[key]);\n }\n return result;\n}\nfunction each(items, fn) {\n let str = '';\n for (let i = 0; i < items.length; i += 1) {\n str += fn(items[i], i);\n }\n return str;\n}\nconst missing_component = {\n $$render: () => ''\n};\nfunction validate_component(component, name) {\n if (!component || !component.$$render) {\n if (name === 'svelte:component')\n name += ' this={...}';\n throw new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules`);\n }\n return component;\n}\nfunction debug(file, line, column, values) {\n console.log(`{@debug} ${file ? file + ' ' : ''}(${line}:${column})`); // eslint-disable-line no-console\n console.log(values); // eslint-disable-line no-console\n return '';\n}\nlet on_destroy;\nfunction create_ssr_component(fn) {\n function $$render(result, props, bindings, slots, context) {\n const parent_component = current_component;\n const $$ = {\n on_destroy,\n context: new Map(context || (parent_component ? parent_component.$$.context : [])),\n // these will be immediately discarded\n on_mount: [],\n before_update: [],\n after_update: [],\n callbacks: blank_object()\n };\n set_current_component({ $$ });\n const html = fn(result, props, bindings, slots);\n set_current_component(parent_component);\n return html;\n }\n return {\n render: (props = {}, { $$slots = {}, context = new Map() } = {}) => {\n on_destroy = [];\n const result = { title: '', head: '', css: new Set() };\n const html = $$render(result, props, {}, $$slots, context);\n run_all(on_destroy);\n return {\n html,\n css: {\n code: Array.from(result.css).map(css => css.code).join('\\n'),\n map: null // TODO\n },\n head: result.title + result.head\n };\n },\n $$render\n };\n}\nfunction add_attribute(name, value, boolean) {\n if (value == null || (boolean && !value))\n return '';\n const assignment = (boolean && value === true) ? '' : `=\"${escape(value, true)}\"`;\n return ` ${name}${assignment}`;\n}\nfunction add_classes(classes) {\n return classes ? ` class=\"${classes}\"` : '';\n}\nfunction style_object_to_string(style_object) {\n return Object.keys(style_object)\n .filter(key => style_object[key])\n .map(key => `${key}: ${style_object[key]};`)\n .join(' ');\n}\nfunction add_styles(style_object) {\n const styles = style_object_to_string(style_object);\n return styles ? ` style=\"${styles}\"` : '';\n}\n\nfunction bind(component, name, callback) {\n const index = component.$$.props[name];\n if (index !== undefined) {\n component.$$.bound[index] = callback;\n callback(component.$$.ctx[index]);\n }\n}\nfunction create_component(block) {\n block && block.c();\n}\nfunction claim_component(block, parent_nodes) {\n block && block.l(parent_nodes);\n}\nfunction mount_component(component, target, anchor, customElement) {\n const { fragment, on_mount, on_destroy, after_update } = component.$$;\n fragment && fragment.m(target, anchor);\n if (!customElement) {\n // onMount happens before the initial afterUpdate\n add_render_callback(() => {\n const new_on_destroy = on_mount.map(run).filter(is_function);\n if (on_destroy) {\n on_destroy.push(...new_on_destroy);\n }\n else {\n // Edge case - component was destroyed immediately,\n // most likely as a result of a binding initialising\n run_all(new_on_destroy);\n }\n component.$$.on_mount = [];\n });\n }\n after_update.forEach(add_render_callback);\n}\nfunction destroy_component(component, detaching) {\n const $$ = component.$$;\n if ($$.fragment !== null) {\n run_all($$.on_destroy);\n $$.fragment && $$.fragment.d(detaching);\n // TODO null out other refs, including component.$$ (but need to\n // preserve final state?)\n $$.on_destroy = $$.fragment = null;\n $$.ctx = [];\n }\n}\nfunction make_dirty(component, i) {\n if (component.$$.dirty[0] === -1) {\n dirty_components.push(component);\n schedule_update();\n component.$$.dirty.fill(0);\n }\n component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));\n}\nfunction init(component, options, instance, create_fragment, not_equal, props, append_styles, dirty = [-1]) {\n const parent_component = current_component;\n set_current_component(component);\n const $$ = component.$$ = {\n fragment: null,\n ctx: null,\n // state\n props,\n update: noop,\n not_equal,\n bound: blank_object(),\n // lifecycle\n on_mount: [],\n on_destroy: [],\n on_disconnect: [],\n before_update: [],\n after_update: [],\n context: new Map(options.context || (parent_component ? parent_component.$$.context : [])),\n // everything else\n callbacks: blank_object(),\n dirty,\n skip_bound: false,\n root: options.target || parent_component.$$.root\n };\n append_styles && append_styles($$.root);\n let ready = false;\n $$.ctx = instance\n ? instance(component, options.props || {}, (i, ret, ...rest) => {\n const value = rest.length ? rest[0] : ret;\n if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {\n if (!$$.skip_bound && $$.bound[i])\n $$.bound[i](value);\n if (ready)\n make_dirty(component, i);\n }\n return ret;\n })\n : [];\n $$.update();\n ready = true;\n run_all($$.before_update);\n // `false` as a special case of no DOM component\n $$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n if (options.target) {\n if (options.hydrate) {\n start_hydrating();\n const nodes = children(options.target);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.l(nodes);\n nodes.forEach(detach);\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.c();\n }\n if (options.intro)\n transition_in(component.$$.fragment);\n mount_component(component, options.target, options.anchor, options.customElement);\n end_hydrating();\n flush();\n }\n set_current_component(parent_component);\n}\nlet SvelteElement;\nif (typeof HTMLElement === 'function') {\n SvelteElement = class extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n }\n connectedCallback() {\n const { on_mount } = this.$$;\n this.$$.on_disconnect = on_mount.map(run).filter(is_function);\n // @ts-ignore todo: improve typings\n for (const key in this.$$.slotted) {\n // @ts-ignore todo: improve typings\n this.appendChild(this.$$.slotted[key]);\n }\n }\n attributeChangedCallback(attr, _oldValue, newValue) {\n this[attr] = newValue;\n }\n disconnectedCallback() {\n run_all(this.$$.on_disconnect);\n }\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n // TODO should this delegate to addEventListener?\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n };\n}\n/**\n * Base class for Svelte components. Used when dev=false.\n */\nclass SvelteComponent {\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n}\n\nfunction dispatch_dev(type, detail) {\n document.dispatchEvent(custom_event(type, Object.assign({ version: '3.50.1' }, detail), { bubbles: true }));\n}\nfunction append_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append(target, node);\n}\nfunction append_hydration_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append_hydration(target, node);\n}\nfunction insert_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert(target, node, anchor);\n}\nfunction insert_hydration_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert_hydration(target, node, anchor);\n}\nfunction detach_dev(node) {\n dispatch_dev('SvelteDOMRemove', { node });\n detach(node);\n}\nfunction detach_between_dev(before, after) {\n while (before.nextSibling && before.nextSibling !== after) {\n detach_dev(before.nextSibling);\n }\n}\nfunction detach_before_dev(after) {\n while (after.previousSibling) {\n detach_dev(after.previousSibling);\n }\n}\nfunction detach_after_dev(before) {\n while (before.nextSibling) {\n detach_dev(before.nextSibling);\n }\n}\nfunction listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {\n const modifiers = options === true ? ['capture'] : options ? Array.from(Object.keys(options)) : [];\n if (has_prevent_default)\n modifiers.push('preventDefault');\n if (has_stop_propagation)\n modifiers.push('stopPropagation');\n dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });\n const dispose = listen(node, event, handler, options);\n return () => {\n dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });\n dispose();\n };\n}\nfunction attr_dev(node, attribute, value) {\n attr(node, attribute, value);\n if (value == null)\n dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });\n else\n dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });\n}\nfunction prop_dev(node, property, value) {\n node[property] = value;\n dispatch_dev('SvelteDOMSetProperty', { node, property, value });\n}\nfunction dataset_dev(node, property, value) {\n node.dataset[property] = value;\n dispatch_dev('SvelteDOMSetDataset', { node, property, value });\n}\nfunction set_data_dev(text, data) {\n data = '' + data;\n if (text.wholeText === data)\n return;\n dispatch_dev('SvelteDOMSetData', { node: text, data });\n text.data = data;\n}\nfunction validate_each_argument(arg) {\n if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {\n let msg = '{#each} only iterates over array-like objects.';\n if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {\n msg += ' You can use a spread to convert this iterable into an array.';\n }\n throw new Error(msg);\n }\n}\nfunction validate_slots(name, slot, keys) {\n for (const slot_key of Object.keys(slot)) {\n if (!~keys.indexOf(slot_key)) {\n console.warn(`<${name}> received an unexpected slot \"${slot_key}\".`);\n }\n }\n}\nfunction validate_dynamic_element(tag) {\n const is_string = typeof tag === 'string';\n if (tag && !is_string) {\n throw new Error('<svelte:element> expects \"this\" attribute to be a string.');\n }\n}\nfunction validate_void_dynamic_element(tag) {\n if (tag && is_void(tag)) {\n throw new Error(`<svelte:element this=\"${tag}\"> is self-closing and cannot have content.`);\n }\n}\n/**\n * Base class for Svelte components with some minor dev-enhancements. Used when dev=true.\n */\nclass SvelteComponentDev extends SvelteComponent {\n constructor(options) {\n if (!options || (!options.target && !options.$$inline)) {\n throw new Error(\"'target' is a required option\");\n }\n super();\n }\n $destroy() {\n super.$destroy();\n this.$destroy = () => {\n console.warn('Component was already destroyed'); // eslint-disable-line no-console\n };\n }\n $capture_state() { }\n $inject_state() { }\n}\n/**\n * Base class to create strongly typed Svelte components.\n * This only exists for typing purposes and should be used in `.d.ts` files.\n *\n * ### Example:\n *\n * You have component library on npm called `component-library`, from which\n * you export a component called `MyComponent`. For Svelte+TypeScript users,\n * you want to provide typings. Therefore you create a `index.d.ts`:\n * ```ts\n * import { SvelteComponentTyped } from \"svelte\";\n * export class MyComponent extends SvelteComponentTyped<{foo: string}> {}\n * ```\n * Typing this makes it possible for IDEs like VS Code with the Svelte extension\n * to provide intellisense and to use the component like this in a Svelte file\n * with TypeScript:\n * ```svelte\n * <script lang=\"ts\">\n * \timport { MyComponent } from \"component-library\";\n * </script>\n * <MyComponent foo={'bar'} />\n * ```\n *\n * #### Why not make this part of `SvelteComponent(Dev)`?\n * Because\n * ```ts\n * class ASubclassOfSvelteComponent extends SvelteComponent<{foo: string}> {}\n * const component: typeof SvelteComponent = ASubclassOfSvelteComponent;\n * ```\n * will throw a type error, so we need to separate the more strictly typed class.\n */\nclass SvelteComponentTyped extends SvelteComponentDev {\n constructor(options) {\n super(options);\n }\n}\nfunction loop_guard(timeout) {\n const start = Date.now();\n return () => {\n if (Date.now() - start > timeout) {\n throw new Error('Infinite loop detected');\n }\n };\n}\n\nexport { HtmlTag, HtmlTagHydration, SvelteComponent, SvelteComponentDev, SvelteComponentTyped, SvelteElement, action_destroyer, add_attribute, add_classes, add_flush_callback, add_location, add_render_callback, add_resize_listener, add_styles, add_transform, afterUpdate, append, append_dev, append_empty_stylesheet, append_hydration, append_hydration_dev, append_styles, assign, attr, attr_dev, attribute_to_object, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_component, claim_element, claim_html_tag, claim_space, claim_svg_element, claim_text, clear_loops, component_subscribe, compute_rest_props, compute_slots, createEventDispatcher, create_animation, create_bidirectional_transition, create_component, create_in_transition, create_out_transition, create_slot, create_ssr_component, current_component, custom_event, dataset_dev, debug, destroy_block, destroy_component, destroy_each, detach, detach_after_dev, detach_before_dev, detach_between_dev, detach_dev, dirty_components, dispatch_dev, each, element, element_is, empty, end_hydrating, escape, escape_attribute_value, escape_object, exclude_internal_props, fix_and_destroy_block, fix_and_outro_and_destroy_block, fix_position, flush, getAllContexts, getContext, get_all_dirty_from_scope, get_binding_group_value, get_current_component, get_custom_elements_slots, get_root_for_style, get_slot_changes, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, hasContext, has_prop, identity, init, insert, insert_dev, insert_hydration, insert_hydration_dev, intros, invalid_attribute_name_character, is_client, is_crossorigin, is_empty, is_function, is_promise, is_void, listen, listen_dev, loop, loop_guard, merge_ssr_styles, missing_component, mount_component, noop, not_equal, now, null_to_empty, object_without_properties, onDestroy, onMount, once, outro_and_destroy_block, prevent_default, prop_dev, query_selector_all, raf, run, run_all, safe_not_equal, schedule_update, select_multiple_value, select_option, select_options, select_value, self, setContext, set_attributes, set_current_component, set_custom_element_data, set_data, set_data_dev, set_input_type, set_input_value, set_now, set_raf, set_store_value, set_style, set_svg_attributes, space, spread, src_url_equal, start_hydrating, stop_propagation, subscribe, svg_element, text, tick, time_ranges_to_array, to_number, toggle_class, transition_in, transition_out, trusted, update_await_block_branch, update_keyed_each, update_slot, update_slot_base, validate_component, validate_dynamic_element, validate_each_argument, validate_each_keys, validate_slots, validate_store, validate_void_dynamic_element, xlink_attr };\n","/*!\n * Bootstrap v5.2.1 (https://getbootstrap.com/)\n * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.bootstrap = factory());\n})(this, (function () { 'use strict';\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n const MAX_UID = 1000000;\n const MILLISECONDS_MULTIPLIER = 1000;\n const TRANSITION_END = 'transitionend'; // Shout-out Angus Croll (https://goo.gl/pxwQGp)\n\n const toType = object => {\n if (object === null || object === undefined) {\n return `${object}`;\n }\n\n return Object.prototype.toString.call(object).match(/\\s([a-z]+)/i)[1].toLowerCase();\n };\n /**\n * Public Util API\n */\n\n\n const getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID);\n } while (document.getElementById(prefix));\n\n return prefix;\n };\n\n const getSelector = element => {\n let selector = element.getAttribute('data-bs-target');\n\n if (!selector || selector === '#') {\n let hrefAttribute = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n\n if (!hrefAttribute || !hrefAttribute.includes('#') && !hrefAttribute.startsWith('.')) {\n return null;\n } // Just in case some CMS puts out a full URL with the anchor appended\n\n\n if (hrefAttribute.includes('#') && !hrefAttribute.startsWith('#')) {\n hrefAttribute = `#${hrefAttribute.split('#')[1]}`;\n }\n\n selector = hrefAttribute && hrefAttribute !== '#' ? hrefAttribute.trim() : null;\n }\n\n return selector;\n };\n\n const getSelectorFromElement = element => {\n const selector = getSelector(element);\n\n if (selector) {\n return document.querySelector(selector) ? selector : null;\n }\n\n return null;\n };\n\n const getElementFromSelector = element => {\n const selector = getSelector(element);\n return selector ? document.querySelector(selector) : null;\n };\n\n const getTransitionDurationFromElement = element => {\n if (!element) {\n return 0;\n } // Get transition-duration of the element\n\n\n let {\n transitionDuration,\n transitionDelay\n } = window.getComputedStyle(element);\n const floatTransitionDuration = Number.parseFloat(transitionDuration);\n const floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found\n\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0;\n } // If multiple durations are defined, take the first\n\n\n transitionDuration = transitionDuration.split(',')[0];\n transitionDelay = transitionDelay.split(',')[0];\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;\n };\n\n const triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END));\n };\n\n const isElement$1 = object => {\n if (!object || typeof object !== 'object') {\n return false;\n }\n\n if (typeof object.jquery !== 'undefined') {\n object = object[0];\n }\n\n return typeof object.nodeType !== 'undefined';\n };\n\n const getElement = object => {\n // it's a jQuery object or a node element\n if (isElement$1(object)) {\n return object.jquery ? object[0] : object;\n }\n\n if (typeof object === 'string' && object.length > 0) {\n return document.querySelector(object);\n }\n\n return null;\n };\n\n const isVisible = element => {\n if (!isElement$1(element) || element.getClientRects().length === 0) {\n return false;\n }\n\n const elementIsVisible = getComputedStyle(element).getPropertyValue('visibility') === 'visible'; // Handle `details` element as its content may falsie appear visible when it is closed\n\n const closedDetails = element.closest('details:not([open])');\n\n if (!closedDetails) {\n return elementIsVisible;\n }\n\n if (closedDetails !== element) {\n const summary = element.closest('summary');\n\n if (summary && summary.parentNode !== closedDetails) {\n return false;\n }\n\n if (summary === null) {\n return false;\n }\n }\n\n return elementIsVisible;\n };\n\n const isDisabled = element => {\n if (!element || element.nodeType !== Node.ELEMENT_NODE) {\n return true;\n }\n\n if (element.classList.contains('disabled')) {\n return true;\n }\n\n if (typeof element.disabled !== 'undefined') {\n return element.disabled;\n }\n\n return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false';\n };\n\n const findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null;\n } // Can find the shadow root otherwise it'll return the document\n\n\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode();\n return root instanceof ShadowRoot ? root : null;\n }\n\n if (element instanceof ShadowRoot) {\n return element;\n } // when we don't find a shadow root\n\n\n if (!element.parentNode) {\n return null;\n }\n\n return findShadowRoot(element.parentNode);\n };\n\n const noop = () => {};\n /**\n * Trick to restart an element's animation\n *\n * @param {HTMLElement} element\n * @return void\n *\n * @see https://www.charistheo.io/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation\n */\n\n\n const reflow = element => {\n element.offsetHeight; // eslint-disable-line no-unused-expressions\n };\n\n const getjQuery = () => {\n if (window.jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return window.jQuery;\n }\n\n return null;\n };\n\n const DOMContentLoadedCallbacks = [];\n\n const onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n // add listener on the first call when the document is in loading state\n if (!DOMContentLoadedCallbacks.length) {\n document.addEventListener('DOMContentLoaded', () => {\n for (const callback of DOMContentLoadedCallbacks) {\n callback();\n }\n });\n }\n\n DOMContentLoadedCallbacks.push(callback);\n } else {\n callback();\n }\n };\n\n const isRTL = () => document.documentElement.dir === 'rtl';\n\n const defineJQueryPlugin = plugin => {\n onDOMContentLoaded(() => {\n const $ = getjQuery();\n /* istanbul ignore if */\n\n if ($) {\n const name = plugin.NAME;\n const JQUERY_NO_CONFLICT = $.fn[name];\n $.fn[name] = plugin.jQueryInterface;\n $.fn[name].Constructor = plugin;\n\n $.fn[name].noConflict = () => {\n $.fn[name] = JQUERY_NO_CONFLICT;\n return plugin.jQueryInterface;\n };\n }\n });\n };\n\n const execute = callback => {\n if (typeof callback === 'function') {\n callback();\n }\n };\n\n const executeAfterTransition = (callback, transitionElement, waitForTransition = true) => {\n if (!waitForTransition) {\n execute(callback);\n return;\n }\n\n const durationPadding = 5;\n const emulatedDuration = getTransitionDurationFromElement(transitionElement) + durationPadding;\n let called = false;\n\n const handler = ({\n target\n }) => {\n if (target !== transitionElement) {\n return;\n }\n\n called = true;\n transitionElement.removeEventListener(TRANSITION_END, handler);\n execute(callback);\n };\n\n transitionElement.addEventListener(TRANSITION_END, handler);\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(transitionElement);\n }\n }, emulatedDuration);\n };\n /**\n * Return the previous/next element of a list.\n *\n * @param {array} list The list of elements\n * @param activeElement The active element\n * @param shouldGetNext Choose to get next or previous element\n * @param isCycleAllowed\n * @return {Element|elem} The proper element\n */\n\n\n const getNextActiveElement = (list, activeElement, shouldGetNext, isCycleAllowed) => {\n const listLength = list.length;\n let index = list.indexOf(activeElement); // if the element does not exist in the list return an element\n // depending on the direction and if cycle is allowed\n\n if (index === -1) {\n return !shouldGetNext && isCycleAllowed ? list[listLength - 1] : list[0];\n }\n\n index += shouldGetNext ? 1 : -1;\n\n if (isCycleAllowed) {\n index = (index + listLength) % listLength;\n }\n\n return list[Math.max(0, Math.min(index, listLength - 1))];\n };\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): dom/event-handler.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const namespaceRegex = /[^.]*(?=\\..*)\\.|.*/;\n const stripNameRegex = /\\..*/;\n const stripUidRegex = /::\\d+$/;\n const eventRegistry = {}; // Events storage\n\n let uidEvent = 1;\n const customEvents = {\n mouseenter: 'mouseover',\n mouseleave: 'mouseout'\n };\n const nativeEvents = new Set(['click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', 'mousewheel', 'DOMMouseScroll', 'mouseover', 'mouseout', 'mousemove', 'selectstart', 'selectend', 'keydown', 'keypress', 'keyup', 'orientationchange', 'touchstart', 'touchmove', 'touchend', 'touchcancel', 'pointerdown', 'pointermove', 'pointerup', 'pointerleave', 'pointercancel', 'gesturestart', 'gesturechange', 'gestureend', 'focus', 'blur', 'change', 'reset', 'select', 'submit', 'focusin', 'focusout', 'load', 'unload', 'beforeunload', 'resize', 'move', 'DOMContentLoaded', 'readystatechange', 'error', 'abort', 'scroll']);\n /**\n * Private methods\n */\n\n function makeEventUid(element, uid) {\n return uid && `${uid}::${uidEvent++}` || element.uidEvent || uidEvent++;\n }\n\n function getElementEvents(element) {\n const uid = makeEventUid(element);\n element.uidEvent = uid;\n eventRegistry[uid] = eventRegistry[uid] || {};\n return eventRegistry[uid];\n }\n\n function bootstrapHandler(element, fn) {\n return function handler(event) {\n hydrateObj(event, {\n delegateTarget: element\n });\n\n if (handler.oneOff) {\n EventHandler.off(element, event.type, fn);\n }\n\n return fn.apply(element, [event]);\n };\n }\n\n function bootstrapDelegationHandler(element, selector, fn) {\n return function handler(event) {\n const domElements = element.querySelectorAll(selector);\n\n for (let {\n target\n } = event; target && target !== this; target = target.parentNode) {\n for (const domElement of domElements) {\n if (domElement !== target) {\n continue;\n }\n\n hydrateObj(event, {\n delegateTarget: target\n });\n\n if (handler.oneOff) {\n EventHandler.off(element, event.type, selector, fn);\n }\n\n return fn.apply(target, [event]);\n }\n }\n };\n }\n\n function findHandler(events, callable, delegationSelector = null) {\n return Object.values(events).find(event => event.callable === callable && event.delegationSelector === delegationSelector);\n }\n\n function normalizeParameters(originalTypeEvent, handler, delegationFunction) {\n const isDelegated = typeof handler === 'string'; // todo: tooltip passes `false` instead of selector, so we need to check\n\n const callable = isDelegated ? delegationFunction : handler || delegationFunction;\n let typeEvent = getTypeEvent(originalTypeEvent);\n\n if (!nativeEvents.has(typeEvent)) {\n typeEvent = originalTypeEvent;\n }\n\n return [isDelegated, callable, typeEvent];\n }\n\n function addHandler(element, originalTypeEvent, handler, delegationFunction, oneOff) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return;\n }\n\n let [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction); // in case of mouseenter or mouseleave wrap the handler within a function that checks for its DOM position\n // this prevents the handler from being dispatched the same way as mouseover or mouseout does\n\n if (originalTypeEvent in customEvents) {\n const wrapFunction = fn => {\n return function (event) {\n if (!event.relatedTarget || event.relatedTarget !== event.delegateTarget && !event.delegateTarget.contains(event.relatedTarget)) {\n return fn.call(this, event);\n }\n };\n };\n\n callable = wrapFunction(callable);\n }\n\n const events = getElementEvents(element);\n const handlers = events[typeEvent] || (events[typeEvent] = {});\n const previousFunction = findHandler(handlers, callable, isDelegated ? handler : null);\n\n if (previousFunction) {\n previousFunction.oneOff = previousFunction.oneOff && oneOff;\n return;\n }\n\n const uid = makeEventUid(callable, originalTypeEvent.replace(namespaceRegex, ''));\n const fn = isDelegated ? bootstrapDelegationHandler(element, handler, callable) : bootstrapHandler(element, callable);\n fn.delegationSelector = isDelegated ? handler : null;\n fn.callable = callable;\n fn.oneOff = oneOff;\n fn.uidEvent = uid;\n handlers[uid] = fn;\n element.addEventListener(typeEvent, fn, isDelegated);\n }\n\n function removeHandler(element, events, typeEvent, handler, delegationSelector) {\n const fn = findHandler(events[typeEvent], handler, delegationSelector);\n\n if (!fn) {\n return;\n }\n\n element.removeEventListener(typeEvent, fn, Boolean(delegationSelector));\n delete events[typeEvent][fn.uidEvent];\n }\n\n function removeNamespacedHandlers(element, events, typeEvent, namespace) {\n const storeElementEvent = events[typeEvent] || {};\n\n for (const handlerKey of Object.keys(storeElementEvent)) {\n if (handlerKey.includes(namespace)) {\n const event = storeElementEvent[handlerKey];\n removeHandler(element, events, typeEvent, event.callable, event.delegationSelector);\n }\n }\n }\n\n function getTypeEvent(event) {\n // allow to get the native events from namespaced events ('click.bs.button' --> 'click')\n event = event.replace(stripNameRegex, '');\n return customEvents[event] || event;\n }\n\n const EventHandler = {\n on(element, event, handler, delegationFunction) {\n addHandler(element, event, handler, delegationFunction, false);\n },\n\n one(element, event, handler, delegationFunction) {\n addHandler(element, event, handler, delegationFunction, true);\n },\n\n off(element, originalTypeEvent, handler, delegationFunction) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return;\n }\n\n const [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction);\n const inNamespace = typeEvent !== originalTypeEvent;\n const events = getElementEvents(element);\n const storeElementEvent = events[typeEvent] || {};\n const isNamespace = originalTypeEvent.startsWith('.');\n\n if (typeof callable !== 'undefined') {\n // Simplest case: handler is passed, remove that listener ONLY.\n if (!Object.keys(storeElementEvent).length) {\n return;\n }\n\n removeHandler(element, events, typeEvent, callable, isDelegated ? handler : null);\n return;\n }\n\n if (isNamespace) {\n for (const elementEvent of Object.keys(events)) {\n removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1));\n }\n }\n\n for (const keyHandlers of Object.keys(storeElementEvent)) {\n const handlerKey = keyHandlers.replace(stripUidRegex, '');\n\n if (!inNamespace || originalTypeEvent.includes(handlerKey)) {\n const event = storeElementEvent[keyHandlers];\n removeHandler(element, events, typeEvent, event.callable, event.delegationSelector);\n }\n }\n },\n\n trigger(element, event, args) {\n if (typeof event !== 'string' || !element) {\n return null;\n }\n\n const $ = getjQuery();\n const typeEvent = getTypeEvent(event);\n const inNamespace = event !== typeEvent;\n let jQueryEvent = null;\n let bubbles = true;\n let nativeDispatch = true;\n let defaultPrevented = false;\n\n if (inNamespace && $) {\n jQueryEvent = $.Event(event, args);\n $(element).trigger(jQueryEvent);\n bubbles = !jQueryEvent.isPropagationStopped();\n nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();\n defaultPrevented = jQueryEvent.isDefaultPrevented();\n }\n\n let evt = new Event(event, {\n bubbles,\n cancelable: true\n });\n evt = hydrateObj(evt, args);\n\n if (defaultPrevented) {\n evt.preventDefault();\n }\n\n if (nativeDispatch) {\n element.dispatchEvent(evt);\n }\n\n if (evt.defaultPrevented && jQueryEvent) {\n jQueryEvent.preventDefault();\n }\n\n return evt;\n }\n\n };\n\n function hydrateObj(obj, meta) {\n for (const [key, value] of Object.entries(meta || {})) {\n try {\n obj[key] = value;\n } catch (_unused) {\n Object.defineProperty(obj, key, {\n configurable: true,\n\n get() {\n return value;\n }\n\n });\n }\n }\n\n return obj;\n }\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): dom/data.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n /**\n * Constants\n */\n const elementMap = new Map();\n const Data = {\n set(element, key, instance) {\n if (!elementMap.has(element)) {\n elementMap.set(element, new Map());\n }\n\n const instanceMap = elementMap.get(element); // make it clear we only want one instance per element\n // can be removed later when multiple key/instances are fine to be used\n\n if (!instanceMap.has(key) && instanceMap.size !== 0) {\n // eslint-disable-next-line no-console\n console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`);\n return;\n }\n\n instanceMap.set(key, instance);\n },\n\n get(element, key) {\n if (elementMap.has(element)) {\n return elementMap.get(element).get(key) || null;\n }\n\n return null;\n },\n\n remove(element, key) {\n if (!elementMap.has(element)) {\n return;\n }\n\n const instanceMap = elementMap.get(element);\n instanceMap.delete(key); // free up element references if there are no instances left for an element\n\n if (instanceMap.size === 0) {\n elementMap.delete(element);\n }\n }\n\n };\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): dom/manipulator.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n function normalizeData(value) {\n if (value === 'true') {\n return true;\n }\n\n if (value === 'false') {\n return false;\n }\n\n if (value === Number(value).toString()) {\n return Number(value);\n }\n\n if (value === '' || value === 'null') {\n return null;\n }\n\n if (typeof value !== 'string') {\n return value;\n }\n\n try {\n return JSON.parse(decodeURIComponent(value));\n } catch (_unused) {\n return value;\n }\n }\n\n function normalizeDataKey(key) {\n return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`);\n }\n\n const Manipulator = {\n setDataAttribute(element, key, value) {\n element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value);\n },\n\n removeDataAttribute(element, key) {\n element.removeAttribute(`data-bs-${normalizeDataKey(key)}`);\n },\n\n getDataAttributes(element) {\n if (!element) {\n return {};\n }\n\n const attributes = {};\n const bsKeys = Object.keys(element.dataset).filter(key => key.startsWith('bs') && !key.startsWith('bsConfig'));\n\n for (const key of bsKeys) {\n let pureKey = key.replace(/^bs/, '');\n pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length);\n attributes[pureKey] = normalizeData(element.dataset[key]);\n }\n\n return attributes;\n },\n\n getDataAttribute(element, key) {\n return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`));\n }\n\n };\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): util/config.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Class definition\n */\n\n class Config {\n // Getters\n static get Default() {\n return {};\n }\n\n static get DefaultType() {\n return {};\n }\n\n static get NAME() {\n throw new Error('You have to implement the static method \"NAME\", for each component!');\n }\n\n _getConfig(config) {\n config = this._mergeConfigObj(config);\n config = this._configAfterMerge(config);\n\n this._typeCheckConfig(config);\n\n return config;\n }\n\n _configAfterMerge(config) {\n return config;\n }\n\n _mergeConfigObj(config, element) {\n const jsonConfig = isElement$1(element) ? Manipulator.getDataAttribute(element, 'config') : {}; // try to parse\n\n return { ...this.constructor.Default,\n ...(typeof jsonConfig === 'object' ? jsonConfig : {}),\n ...(isElement$1(element) ? Manipulator.getDataAttributes(element) : {}),\n ...(typeof config === 'object' ? config : {})\n };\n }\n\n _typeCheckConfig(config, configTypes = this.constructor.DefaultType) {\n for (const property of Object.keys(configTypes)) {\n const expectedTypes = configTypes[property];\n const value = config[property];\n const valueType = isElement$1(value) ? 'element' : toType(value);\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option \"${property}\" provided type \"${valueType}\" but expected type \"${expectedTypes}\".`);\n }\n }\n }\n\n }\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): base-component.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const VERSION = '5.2.1';\n /**\n * Class definition\n */\n\n class BaseComponent extends Config {\n constructor(element, config) {\n super();\n element = getElement(element);\n\n if (!element) {\n return;\n }\n\n this._element = element;\n this._config = this._getConfig(config);\n Data.set(this._element, this.constructor.DATA_KEY, this);\n } // Public\n\n\n dispose() {\n Data.remove(this._element, this.constructor.DATA_KEY);\n EventHandler.off(this._element, this.constructor.EVENT_KEY);\n\n for (const propertyName of Object.getOwnPropertyNames(this)) {\n this[propertyName] = null;\n }\n }\n\n _queueCallback(callback, element, isAnimated = true) {\n executeAfterTransition(callback, element, isAnimated);\n }\n\n _getConfig(config) {\n config = this._mergeConfigObj(config, this._element);\n config = this._configAfterMerge(config);\n\n this._typeCheckConfig(config);\n\n return config;\n } // Static\n\n\n static getInstance(element) {\n return Data.get(getElement(element), this.DATA_KEY);\n }\n\n static getOrCreateInstance(element, config = {}) {\n return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null);\n }\n\n static get VERSION() {\n return VERSION;\n }\n\n static get DATA_KEY() {\n return `bs.${this.NAME}`;\n }\n\n static get EVENT_KEY() {\n return `.${this.DATA_KEY}`;\n }\n\n static eventName(name) {\n return `${name}${this.EVENT_KEY}`;\n }\n\n }\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): util/component-functions.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n const enableDismissTrigger = (component, method = 'hide') => {\n const clickEvent = `click.dismiss${component.EVENT_KEY}`;\n const name = component.NAME;\n EventHandler.on(document, clickEvent, `[data-bs-dismiss=\"${name}\"]`, function (event) {\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault();\n }\n\n if (isDisabled(this)) {\n return;\n }\n\n const target = getElementFromSelector(this) || this.closest(`.${name}`);\n const instance = component.getOrCreateInstance(target); // Method argument is left, for Alert and only, as it doesn't implement the 'hide' method\n\n instance[method]();\n });\n };\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): alert.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$f = 'alert';\n const DATA_KEY$a = 'bs.alert';\n const EVENT_KEY$b = `.${DATA_KEY$a}`;\n const EVENT_CLOSE = `close${EVENT_KEY$b}`;\n const EVENT_CLOSED = `closed${EVENT_KEY$b}`;\n const CLASS_NAME_FADE$5 = 'fade';\n const CLASS_NAME_SHOW$8 = 'show';\n /**\n * Class definition\n */\n\n class Alert extends BaseComponent {\n // Getters\n static get NAME() {\n return NAME$f;\n } // Public\n\n\n close() {\n const closeEvent = EventHandler.trigger(this._element, EVENT_CLOSE);\n\n if (closeEvent.defaultPrevented) {\n return;\n }\n\n this._element.classList.remove(CLASS_NAME_SHOW$8);\n\n const isAnimated = this._element.classList.contains(CLASS_NAME_FADE$5);\n\n this._queueCallback(() => this._destroyElement(), this._element, isAnimated);\n } // Private\n\n\n _destroyElement() {\n this._element.remove();\n\n EventHandler.trigger(this._element, EVENT_CLOSED);\n this.dispose();\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Alert.getOrCreateInstance(this);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config](this);\n });\n }\n\n }\n /**\n * Data API implementation\n */\n\n\n enableDismissTrigger(Alert, 'close');\n /**\n * jQuery\n */\n\n defineJQueryPlugin(Alert);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): button.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$e = 'button';\n const DATA_KEY$9 = 'bs.button';\n const EVENT_KEY$a = `.${DATA_KEY$9}`;\n const DATA_API_KEY$6 = '.data-api';\n const CLASS_NAME_ACTIVE$3 = 'active';\n const SELECTOR_DATA_TOGGLE$5 = '[data-bs-toggle=\"button\"]';\n const EVENT_CLICK_DATA_API$6 = `click${EVENT_KEY$a}${DATA_API_KEY$6}`;\n /**\n * Class definition\n */\n\n class Button extends BaseComponent {\n // Getters\n static get NAME() {\n return NAME$e;\n } // Public\n\n\n toggle() {\n // Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method\n this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE$3));\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Button.getOrCreateInstance(this);\n\n if (config === 'toggle') {\n data[config]();\n }\n });\n }\n\n }\n /**\n * Data API implementation\n */\n\n\n EventHandler.on(document, EVENT_CLICK_DATA_API$6, SELECTOR_DATA_TOGGLE$5, event => {\n event.preventDefault();\n const button = event.target.closest(SELECTOR_DATA_TOGGLE$5);\n const data = Button.getOrCreateInstance(button);\n data.toggle();\n });\n /**\n * jQuery\n */\n\n defineJQueryPlugin(Button);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): dom/selector-engine.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const SelectorEngine = {\n find(selector, element = document.documentElement) {\n return [].concat(...Element.prototype.querySelectorAll.call(element, selector));\n },\n\n findOne(selector, element = document.documentElement) {\n return Element.prototype.querySelector.call(element, selector);\n },\n\n children(element, selector) {\n return [].concat(...element.children).filter(child => child.matches(selector));\n },\n\n parents(element, selector) {\n const parents = [];\n let ancestor = element.parentNode.closest(selector);\n\n while (ancestor) {\n parents.push(ancestor);\n ancestor = ancestor.parentNode.closest(selector);\n }\n\n return parents;\n },\n\n prev(element, selector) {\n let previous = element.previousElementSibling;\n\n while (previous) {\n if (previous.matches(selector)) {\n return [previous];\n }\n\n previous = previous.previousElementSibling;\n }\n\n return [];\n },\n\n // TODO: this is now unused; remove later along with prev()\n next(element, selector) {\n let next = element.nextElementSibling;\n\n while (next) {\n if (next.matches(selector)) {\n return [next];\n }\n\n next = next.nextElementSibling;\n }\n\n return [];\n },\n\n focusableChildren(element) {\n const focusables = ['a', 'button', 'input', 'textarea', 'select', 'details', '[tabindex]', '[contenteditable=\"true\"]'].map(selector => `${selector}:not([tabindex^=\"-\"])`).join(',');\n return this.find(focusables, element).filter(el => !isDisabled(el) && isVisible(el));\n }\n\n };\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): util/swipe.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$d = 'swipe';\n const EVENT_KEY$9 = '.bs.swipe';\n const EVENT_TOUCHSTART = `touchstart${EVENT_KEY$9}`;\n const EVENT_TOUCHMOVE = `touchmove${EVENT_KEY$9}`;\n const EVENT_TOUCHEND = `touchend${EVENT_KEY$9}`;\n const EVENT_POINTERDOWN = `pointerdown${EVENT_KEY$9}`;\n const EVENT_POINTERUP = `pointerup${EVENT_KEY$9}`;\n const POINTER_TYPE_TOUCH = 'touch';\n const POINTER_TYPE_PEN = 'pen';\n const CLASS_NAME_POINTER_EVENT = 'pointer-event';\n const SWIPE_THRESHOLD = 40;\n const Default$c = {\n endCallback: null,\n leftCallback: null,\n rightCallback: null\n };\n const DefaultType$c = {\n endCallback: '(function|null)',\n leftCallback: '(function|null)',\n rightCallback: '(function|null)'\n };\n /**\n * Class definition\n */\n\n class Swipe extends Config {\n constructor(element, config) {\n super();\n this._element = element;\n\n if (!element || !Swipe.isSupported()) {\n return;\n }\n\n this._config = this._getConfig(config);\n this._deltaX = 0;\n this._supportPointerEvents = Boolean(window.PointerEvent);\n\n this._initEvents();\n } // Getters\n\n\n static get Default() {\n return Default$c;\n }\n\n static get DefaultType() {\n return DefaultType$c;\n }\n\n static get NAME() {\n return NAME$d;\n } // Public\n\n\n dispose() {\n EventHandler.off(this._element, EVENT_KEY$9);\n } // Private\n\n\n _start(event) {\n if (!this._supportPointerEvents) {\n this._deltaX = event.touches[0].clientX;\n return;\n }\n\n if (this._eventIsPointerPenTouch(event)) {\n this._deltaX = event.clientX;\n }\n }\n\n _end(event) {\n if (this._eventIsPointerPenTouch(event)) {\n this._deltaX = event.clientX - this._deltaX;\n }\n\n this._handleSwipe();\n\n execute(this._config.endCallback);\n }\n\n _move(event) {\n this._deltaX = event.touches && event.touches.length > 1 ? 0 : event.touches[0].clientX - this._deltaX;\n }\n\n _handleSwipe() {\n const absDeltaX = Math.abs(this._deltaX);\n\n if (absDeltaX <= SWIPE_THRESHOLD) {\n return;\n }\n\n const direction = absDeltaX / this._deltaX;\n this._deltaX = 0;\n\n if (!direction) {\n return;\n }\n\n execute(direction > 0 ? this._config.rightCallback : this._config.leftCallback);\n }\n\n _initEvents() {\n if (this._supportPointerEvents) {\n EventHandler.on(this._element, EVENT_POINTERDOWN, event => this._start(event));\n EventHandler.on(this._element, EVENT_POINTERUP, event => this._end(event));\n\n this._element.classList.add(CLASS_NAME_POINTER_EVENT);\n } else {\n EventHandler.on(this._element, EVENT_TOUCHSTART, event => this._start(event));\n EventHandler.on(this._element, EVENT_TOUCHMOVE, event => this._move(event));\n EventHandler.on(this._element, EVENT_TOUCHEND, event => this._end(event));\n }\n }\n\n _eventIsPointerPenTouch(event) {\n return this._supportPointerEvents && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH);\n } // Static\n\n\n static isSupported() {\n return 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;\n }\n\n }\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): carousel.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$c = 'carousel';\n const DATA_KEY$8 = 'bs.carousel';\n const EVENT_KEY$8 = `.${DATA_KEY$8}`;\n const DATA_API_KEY$5 = '.data-api';\n const ARROW_LEFT_KEY$1 = 'ArrowLeft';\n const ARROW_RIGHT_KEY$1 = 'ArrowRight';\n const TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch\n\n const ORDER_NEXT = 'next';\n const ORDER_PREV = 'prev';\n const DIRECTION_LEFT = 'left';\n const DIRECTION_RIGHT = 'right';\n const EVENT_SLIDE = `slide${EVENT_KEY$8}`;\n const EVENT_SLID = `slid${EVENT_KEY$8}`;\n const EVENT_KEYDOWN$1 = `keydown${EVENT_KEY$8}`;\n const EVENT_MOUSEENTER$1 = `mouseenter${EVENT_KEY$8}`;\n const EVENT_MOUSELEAVE$1 = `mouseleave${EVENT_KEY$8}`;\n const EVENT_DRAG_START = `dragstart${EVENT_KEY$8}`;\n const EVENT_LOAD_DATA_API$3 = `load${EVENT_KEY$8}${DATA_API_KEY$5}`;\n const EVENT_CLICK_DATA_API$5 = `click${EVENT_KEY$8}${DATA_API_KEY$5}`;\n const CLASS_NAME_CAROUSEL = 'carousel';\n const CLASS_NAME_ACTIVE$2 = 'active';\n const CLASS_NAME_SLIDE = 'slide';\n const CLASS_NAME_END = 'carousel-item-end';\n const CLASS_NAME_START = 'carousel-item-start';\n const CLASS_NAME_NEXT = 'carousel-item-next';\n const CLASS_NAME_PREV = 'carousel-item-prev';\n const SELECTOR_ACTIVE = '.active';\n const SELECTOR_ITEM = '.carousel-item';\n const SELECTOR_ACTIVE_ITEM = SELECTOR_ACTIVE + SELECTOR_ITEM;\n const SELECTOR_ITEM_IMG = '.carousel-item img';\n const SELECTOR_INDICATORS = '.carousel-indicators';\n const SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]';\n const SELECTOR_DATA_RIDE = '[data-bs-ride=\"carousel\"]';\n const KEY_TO_DIRECTION = {\n [ARROW_LEFT_KEY$1]: DIRECTION_RIGHT,\n [ARROW_RIGHT_KEY$1]: DIRECTION_LEFT\n };\n const Default$b = {\n interval: 5000,\n keyboard: true,\n pause: 'hover',\n ride: false,\n touch: true,\n wrap: true\n };\n const DefaultType$b = {\n interval: '(number|boolean)',\n // TODO:v6 remove boolean support\n keyboard: 'boolean',\n pause: '(string|boolean)',\n ride: '(boolean|string)',\n touch: 'boolean',\n wrap: 'boolean'\n };\n /**\n * Class definition\n */\n\n class Carousel extends BaseComponent {\n constructor(element, config) {\n super(element, config);\n this._interval = null;\n this._activeElement = null;\n this._isSliding = false;\n this.touchTimeout = null;\n this._swipeHelper = null;\n this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, this._element);\n\n this._addEventListeners();\n\n if (this._config.ride === CLASS_NAME_CAROUSEL) {\n this.cycle();\n }\n } // Getters\n\n\n static get Default() {\n return Default$b;\n }\n\n static get DefaultType() {\n return DefaultType$b;\n }\n\n static get NAME() {\n return NAME$c;\n } // Public\n\n\n next() {\n this._slide(ORDER_NEXT);\n }\n\n nextWhenVisible() {\n // FIXME TODO use `document.visibilityState`\n // Don't call next when the page isn't visible\n // or the carousel or its parent isn't visible\n if (!document.hidden && isVisible(this._element)) {\n this.next();\n }\n }\n\n prev() {\n this._slide(ORDER_PREV);\n }\n\n pause() {\n if (this._isSliding) {\n triggerTransitionEnd(this._element);\n }\n\n this._clearInterval();\n }\n\n cycle() {\n this._clearInterval();\n\n this._updateInterval();\n\n this._interval = setInterval(() => this.nextWhenVisible(), this._config.interval);\n }\n\n _maybeEnableCycle() {\n if (!this._config.ride) {\n return;\n }\n\n if (this._isSliding) {\n EventHandler.one(this._element, EVENT_SLID, () => this.cycle());\n return;\n }\n\n this.cycle();\n }\n\n to(index) {\n const items = this._getItems();\n\n if (index > items.length - 1 || index < 0) {\n return;\n }\n\n if (this._isSliding) {\n EventHandler.one(this._element, EVENT_SLID, () => this.to(index));\n return;\n }\n\n const activeIndex = this._getItemIndex(this._getActive());\n\n if (activeIndex === index) {\n return;\n }\n\n const order = index > activeIndex ? ORDER_NEXT : ORDER_PREV;\n\n this._slide(order, items[index]);\n }\n\n dispose() {\n if (this._swipeHelper) {\n this._swipeHelper.dispose();\n }\n\n super.dispose();\n } // Private\n\n\n _configAfterMerge(config) {\n config.defaultInterval = config.interval;\n return config;\n }\n\n _addEventListeners() {\n if (this._config.keyboard) {\n EventHandler.on(this._element, EVENT_KEYDOWN$1, event => this._keydown(event));\n }\n\n if (this._config.pause === 'hover') {\n EventHandler.on(this._element, EVENT_MOUSEENTER$1, () => this.pause());\n EventHandler.on(this._element, EVENT_MOUSELEAVE$1, () => this._maybeEnableCycle());\n }\n\n if (this._config.touch && Swipe.isSupported()) {\n this._addTouchEventListeners();\n }\n }\n\n _addTouchEventListeners() {\n for (const img of SelectorEngine.find(SELECTOR_ITEM_IMG, this._element)) {\n EventHandler.on(img, EVENT_DRAG_START, event => event.preventDefault());\n }\n\n const endCallBack = () => {\n if (this._config.pause !== 'hover') {\n return;\n } // If it's a touch-enabled device, mouseenter/leave are fired as\n // part of the mouse compatibility events on first tap - the carousel\n // would stop cycling until user tapped out of it;\n // here, we listen for touchend, explicitly pause the carousel\n // (as if it's the second time we tap on it, mouseenter compat event\n // is NOT fired) and after a timeout (to allow for mouse compatibility\n // events to fire) we explicitly restart cycling\n\n\n this.pause();\n\n if (this.touchTimeout) {\n clearTimeout(this.touchTimeout);\n }\n\n this.touchTimeout = setTimeout(() => this._maybeEnableCycle(), TOUCHEVENT_COMPAT_WAIT + this._config.interval);\n };\n\n const swipeConfig = {\n leftCallback: () => this._slide(this._directionToOrder(DIRECTION_LEFT)),\n rightCallback: () => this._slide(this._directionToOrder(DIRECTION_RIGHT)),\n endCallback: endCallBack\n };\n this._swipeHelper = new Swipe(this._element, swipeConfig);\n }\n\n _keydown(event) {\n if (/input|textarea/i.test(event.target.tagName)) {\n return;\n }\n\n const direction = KEY_TO_DIRECTION[event.key];\n\n if (direction) {\n event.preventDefault();\n\n this._slide(this._directionToOrder(direction));\n }\n }\n\n _getItemIndex(element) {\n return this._getItems().indexOf(element);\n }\n\n _setActiveIndicatorElement(index) {\n if (!this._indicatorsElement) {\n return;\n }\n\n const activeIndicator = SelectorEngine.findOne(SELECTOR_ACTIVE, this._indicatorsElement);\n activeIndicator.classList.remove(CLASS_NAME_ACTIVE$2);\n activeIndicator.removeAttribute('aria-current');\n const newActiveIndicator = SelectorEngine.findOne(`[data-bs-slide-to=\"${index}\"]`, this._indicatorsElement);\n\n if (newActiveIndicator) {\n newActiveIndicator.classList.add(CLASS_NAME_ACTIVE$2);\n newActiveIndicator.setAttribute('aria-current', 'true');\n }\n }\n\n _updateInterval() {\n const element = this._activeElement || this._getActive();\n\n if (!element) {\n return;\n }\n\n const elementInterval = Number.parseInt(element.getAttribute('data-bs-interval'), 10);\n this._config.interval = elementInterval || this._config.defaultInterval;\n }\n\n _slide(order, element = null) {\n if (this._isSliding) {\n return;\n }\n\n const activeElement = this._getActive();\n\n const isNext = order === ORDER_NEXT;\n const nextElement = element || getNextActiveElement(this._getItems(), activeElement, isNext, this._config.wrap);\n\n if (nextElement === activeElement) {\n return;\n }\n\n const nextElementIndex = this._getItemIndex(nextElement);\n\n const triggerEvent = eventName => {\n return EventHandler.trigger(this._element, eventName, {\n relatedTarget: nextElement,\n direction: this._orderToDirection(order),\n from: this._getItemIndex(activeElement),\n to: nextElementIndex\n });\n };\n\n const slideEvent = triggerEvent(EVENT_SLIDE);\n\n if (slideEvent.defaultPrevented) {\n return;\n }\n\n if (!activeElement || !nextElement) {\n // Some weirdness is happening, so we bail\n // todo: change tests that use empty divs to avoid this check\n return;\n }\n\n const isCycling = Boolean(this._interval);\n this.pause();\n this._isSliding = true;\n\n this._setActiveIndicatorElement(nextElementIndex);\n\n this._activeElement = nextElement;\n const directionalClassName = isNext ? CLASS_NAME_START : CLASS_NAME_END;\n const orderClassName = isNext ? CLASS_NAME_NEXT : CLASS_NAME_PREV;\n nextElement.classList.add(orderClassName);\n reflow(nextElement);\n activeElement.classList.add(directionalClassName);\n nextElement.classList.add(directionalClassName);\n\n const completeCallBack = () => {\n nextElement.classList.remove(directionalClassName, orderClassName);\n nextElement.classList.add(CLASS_NAME_ACTIVE$2);\n activeElement.classList.remove(CLASS_NAME_ACTIVE$2, orderClassName, directionalClassName);\n this._isSliding = false;\n triggerEvent(EVENT_SLID);\n };\n\n this._queueCallback(completeCallBack, activeElement, this._isAnimated());\n\n if (isCycling) {\n this.cycle();\n }\n }\n\n _isAnimated() {\n return this._element.classList.contains(CLASS_NAME_SLIDE);\n }\n\n _getActive() {\n return SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);\n }\n\n _getItems() {\n return SelectorEngine.find(SELECTOR_ITEM, this._element);\n }\n\n _clearInterval() {\n if (this._interval) {\n clearInterval(this._interval);\n this._interval = null;\n }\n }\n\n _directionToOrder(direction) {\n if (isRTL()) {\n return direction === DIRECTION_LEFT ? ORDER_PREV : ORDER_NEXT;\n }\n\n return direction === DIRECTION_LEFT ? ORDER_NEXT : ORDER_PREV;\n }\n\n _orderToDirection(order) {\n if (isRTL()) {\n return order === ORDER_PREV ? DIRECTION_LEFT : DIRECTION_RIGHT;\n }\n\n return order === ORDER_PREV ? DIRECTION_RIGHT : DIRECTION_LEFT;\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Carousel.getOrCreateInstance(this, config);\n\n if (typeof config === 'number') {\n data.to(config);\n return;\n }\n\n if (typeof config === 'string') {\n if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n }\n });\n }\n\n }\n /**\n * Data API implementation\n */\n\n\n EventHandler.on(document, EVENT_CLICK_DATA_API$5, SELECTOR_DATA_SLIDE, function (event) {\n const target = getElementFromSelector(this);\n\n if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {\n return;\n }\n\n event.preventDefault();\n const carousel = Carousel.getOrCreateInstance(target);\n const slideIndex = this.getAttribute('data-bs-slide-to');\n\n if (slideIndex) {\n carousel.to(slideIndex);\n\n carousel._maybeEnableCycle();\n\n return;\n }\n\n if (Manipulator.getDataAttribute(this, 'slide') === 'next') {\n carousel.next();\n\n carousel._maybeEnableCycle();\n\n return;\n }\n\n carousel.prev();\n\n carousel._maybeEnableCycle();\n });\n EventHandler.on(window, EVENT_LOAD_DATA_API$3, () => {\n const carousels = SelectorEngine.find(SELECTOR_DATA_RIDE);\n\n for (const carousel of carousels) {\n Carousel.getOrCreateInstance(carousel);\n }\n });\n /**\n * jQuery\n */\n\n defineJQueryPlugin(Carousel);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): collapse.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$b = 'collapse';\n const DATA_KEY$7 = 'bs.collapse';\n const EVENT_KEY$7 = `.${DATA_KEY$7}`;\n const DATA_API_KEY$4 = '.data-api';\n const EVENT_SHOW$6 = `show${EVENT_KEY$7}`;\n const EVENT_SHOWN$6 = `shown${EVENT_KEY$7}`;\n const EVENT_HIDE$6 = `hide${EVENT_KEY$7}`;\n const EVENT_HIDDEN$6 = `hidden${EVENT_KEY$7}`;\n const EVENT_CLICK_DATA_API$4 = `click${EVENT_KEY$7}${DATA_API_KEY$4}`;\n const CLASS_NAME_SHOW$7 = 'show';\n const CLASS_NAME_COLLAPSE = 'collapse';\n const CLASS_NAME_COLLAPSING = 'collapsing';\n const CLASS_NAME_COLLAPSED = 'collapsed';\n const CLASS_NAME_DEEPER_CHILDREN = `:scope .${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`;\n const CLASS_NAME_HORIZONTAL = 'collapse-horizontal';\n const WIDTH = 'width';\n const HEIGHT = 'height';\n const SELECTOR_ACTIVES = '.collapse.show, .collapse.collapsing';\n const SELECTOR_DATA_TOGGLE$4 = '[data-bs-toggle=\"collapse\"]';\n const Default$a = {\n parent: null,\n toggle: true\n };\n const DefaultType$a = {\n parent: '(null|element)',\n toggle: 'boolean'\n };\n /**\n * Class definition\n */\n\n class Collapse extends BaseComponent {\n constructor(element, config) {\n super(element, config);\n this._isTransitioning = false;\n this._triggerArray = [];\n const toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE$4);\n\n for (const elem of toggleList) {\n const selector = getSelectorFromElement(elem);\n const filterElement = SelectorEngine.find(selector).filter(foundElement => foundElement === this._element);\n\n if (selector !== null && filterElement.length) {\n this._triggerArray.push(elem);\n }\n }\n\n this._initializeChildren();\n\n if (!this._config.parent) {\n this._addAriaAndCollapsedClass(this._triggerArray, this._isShown());\n }\n\n if (this._config.toggle) {\n this.toggle();\n }\n } // Getters\n\n\n static get Default() {\n return Default$a;\n }\n\n static get DefaultType() {\n return DefaultType$a;\n }\n\n static get NAME() {\n return NAME$b;\n } // Public\n\n\n toggle() {\n if (this._isShown()) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n show() {\n if (this._isTransitioning || this._isShown()) {\n return;\n }\n\n let activeChildren = []; // find active children\n\n if (this._config.parent) {\n activeChildren = this._getFirstLevelChildren(SELECTOR_ACTIVES).filter(element => element !== this._element).map(element => Collapse.getOrCreateInstance(element, {\n toggle: false\n }));\n }\n\n if (activeChildren.length && activeChildren[0]._isTransitioning) {\n return;\n }\n\n const startEvent = EventHandler.trigger(this._element, EVENT_SHOW$6);\n\n if (startEvent.defaultPrevented) {\n return;\n }\n\n for (const activeInstance of activeChildren) {\n activeInstance.hide();\n }\n\n const dimension = this._getDimension();\n\n this._element.classList.remove(CLASS_NAME_COLLAPSE);\n\n this._element.classList.add(CLASS_NAME_COLLAPSING);\n\n this._element.style[dimension] = 0;\n\n this._addAriaAndCollapsedClass(this._triggerArray, true);\n\n this._isTransitioning = true;\n\n const complete = () => {\n this._isTransitioning = false;\n\n this._element.classList.remove(CLASS_NAME_COLLAPSING);\n\n this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7);\n\n this._element.style[dimension] = '';\n EventHandler.trigger(this._element, EVENT_SHOWN$6);\n };\n\n const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);\n const scrollSize = `scroll${capitalizedDimension}`;\n\n this._queueCallback(complete, this._element, true);\n\n this._element.style[dimension] = `${this._element[scrollSize]}px`;\n }\n\n hide() {\n if (this._isTransitioning || !this._isShown()) {\n return;\n }\n\n const startEvent = EventHandler.trigger(this._element, EVENT_HIDE$6);\n\n if (startEvent.defaultPrevented) {\n return;\n }\n\n const dimension = this._getDimension();\n\n this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`;\n reflow(this._element);\n\n this._element.classList.add(CLASS_NAME_COLLAPSING);\n\n this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7);\n\n for (const trigger of this._triggerArray) {\n const element = getElementFromSelector(trigger);\n\n if (element && !this._isShown(element)) {\n this._addAriaAndCollapsedClass([trigger], false);\n }\n }\n\n this._isTransitioning = true;\n\n const complete = () => {\n this._isTransitioning = false;\n\n this._element.classList.remove(CLASS_NAME_COLLAPSING);\n\n this._element.classList.add(CLASS_NAME_COLLAPSE);\n\n EventHandler.trigger(this._element, EVENT_HIDDEN$6);\n };\n\n this._element.style[dimension] = '';\n\n this._queueCallback(complete, this._element, true);\n }\n\n _isShown(element = this._element) {\n return element.classList.contains(CLASS_NAME_SHOW$7);\n } // Private\n\n\n _configAfterMerge(config) {\n config.toggle = Boolean(config.toggle); // Coerce string values\n\n config.parent = getElement(config.parent);\n return config;\n }\n\n _getDimension() {\n return this._element.classList.contains(CLASS_NAME_HORIZONTAL) ? WIDTH : HEIGHT;\n }\n\n _initializeChildren() {\n if (!this._config.parent) {\n return;\n }\n\n const children = this._getFirstLevelChildren(SELECTOR_DATA_TOGGLE$4);\n\n for (const element of children) {\n const selected = getElementFromSelector(element);\n\n if (selected) {\n this._addAriaAndCollapsedClass([element], this._isShown(selected));\n }\n }\n }\n\n _getFirstLevelChildren(selector) {\n const children = SelectorEngine.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent); // remove children if greater depth\n\n return SelectorEngine.find(selector, this._config.parent).filter(element => !children.includes(element));\n }\n\n _addAriaAndCollapsedClass(triggerArray, isOpen) {\n if (!triggerArray.length) {\n return;\n }\n\n for (const element of triggerArray) {\n element.classList.toggle(CLASS_NAME_COLLAPSED, !isOpen);\n element.setAttribute('aria-expanded', isOpen);\n }\n } // Static\n\n\n static jQueryInterface(config) {\n const _config = {};\n\n if (typeof config === 'string' && /show|hide/.test(config)) {\n _config.toggle = false;\n }\n\n return this.each(function () {\n const data = Collapse.getOrCreateInstance(this, _config);\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n }\n });\n }\n\n }\n /**\n * Data API implementation\n */\n\n\n EventHandler.on(document, EVENT_CLICK_DATA_API$4, SELECTOR_DATA_TOGGLE$4, function (event) {\n // preventDefault only for <a> elements (which change the URL) not inside the collapsible element\n if (event.target.tagName === 'A' || event.delegateTarget && event.delegateTarget.tagName === 'A') {\n event.preventDefault();\n }\n\n const selector = getSelectorFromElement(this);\n const selectorElements = SelectorEngine.find(selector);\n\n for (const element of selectorElements) {\n Collapse.getOrCreateInstance(element, {\n toggle: false\n }).toggle();\n }\n });\n /**\n * jQuery\n */\n\n defineJQueryPlugin(Collapse);\n\n var top = 'top';\n var bottom = 'bottom';\n var right = 'right';\n var left = 'left';\n var auto = 'auto';\n var basePlacements = [top, bottom, right, left];\n var start = 'start';\n var end = 'end';\n var clippingParents = 'clippingParents';\n var viewport = 'viewport';\n var popper = 'popper';\n var reference = 'reference';\n var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n }, []);\n var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n }, []); // modifiers that need to read the DOM\n\n var beforeRead = 'beforeRead';\n var read = 'read';\n var afterRead = 'afterRead'; // pure-logic modifiers\n\n var beforeMain = 'beforeMain';\n var main = 'main';\n var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\n var beforeWrite = 'beforeWrite';\n var write = 'write';\n var afterWrite = 'afterWrite';\n var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];\n\n function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n }\n\n function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n }\n\n function isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n }\n\n function isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n }\n\n function isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n }\n\n // and applies them to the HTMLElements such as popper and arrow\n\n function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n }\n\n function effect$2(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const applyStyles$1 = {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect$2,\n requires: ['computeStyles']\n };\n\n function getBasePlacement(placement) {\n return placement.split('-')[0];\n }\n\n var max = Math.max;\n var min = Math.min;\n var round = Math.round;\n\n function getUAString() {\n var uaData = navigator.userAgentData;\n\n if (uaData != null && uaData.brands) {\n return uaData.brands.map(function (item) {\n return item.brand + \"/\" + item.version;\n }).join(' ');\n }\n\n return navigator.userAgent;\n }\n\n function isLayoutViewport() {\n return !/^((?!chrome|android).)*safari/i.test(getUAString());\n }\n\n function getBoundingClientRect(element, includeScale, isFixedStrategy) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n\n var clientRect = element.getBoundingClientRect();\n var scaleX = 1;\n var scaleY = 1;\n\n if (includeScale && isHTMLElement(element)) {\n scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n }\n\n var _ref = isElement(element) ? getWindow(element) : window,\n visualViewport = _ref.visualViewport;\n\n var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n var width = clientRect.width / scaleX;\n var height = clientRect.height / scaleY;\n return {\n width: width,\n height: height,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x,\n x: x,\n y: y\n };\n }\n\n // means it doesn't take into account transforms.\n\n function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n }\n\n function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n }\n\n function getComputedStyle$1(element) {\n return getWindow(element).getComputedStyle(element);\n }\n\n function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n }\n\n function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n }\n\n function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n }\n\n function getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle$1(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n } // `.offsetParent` reports `null` for fixed elements, while absolute elements\n // return the containing block\n\n\n function getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle$1(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle$1(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n } // Gets the closest ancestor positioned element. Handles some edge cases,\n // such as table ancestors and cross browser bugs.\n\n\n function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle$1(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n }\n\n function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n }\n\n function within(min$1, value, max$1) {\n return max(min$1, min(value, max$1));\n }\n function withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n }\n\n function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n }\n\n function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n }\n\n function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n }\n\n var toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n };\n\n function arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n }\n\n function effect$1(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n\n return;\n }\n\n state.elements.arrow = arrowElement;\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const arrow$1 = {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect$1,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n };\n\n function getVariation(placement) {\n return placement.split('-')[1];\n }\n\n var unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n }; // Round the offsets to the nearest suitable subpixel based on the DPR.\n // Zooming can change the DPR, but it seems to report a value that will\n // cleanly divide the values into the appropriate subpixels.\n\n function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n }\n\n function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets,\n isFixed = _ref2.isFixed;\n var _offsets$x = offsets.x,\n x = _offsets$x === void 0 ? 0 : _offsets$x,\n _offsets$y = offsets.y,\n y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref3.x;\n y = _ref3.y;\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle$1(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom;\n var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n offsetParent[heightProp];\n y -= offsetY - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right;\n var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n offsetParent[widthProp];\n x -= offsetX - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref4.x;\n y = _ref4.y;\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n }\n\n function computeStyles(_ref5) {\n var state = _ref5.state,\n options = _ref5.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration,\n isFixed: state.options.strategy === 'fixed'\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const computeStyles$1 = {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n };\n\n var passive = {\n passive: true\n };\n\n function effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const eventListeners = {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n };\n\n var hash$1 = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n };\n function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash$1[matched];\n });\n }\n\n var hash = {\n start: 'end',\n end: 'start'\n };\n function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n }\n\n function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n }\n\n function getWindowScrollBarX(element) {\n // If <html> has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on <html>\n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n }\n\n function getViewportRect(element, strategy) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0;\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n var layoutViewport = isLayoutViewport();\n\n if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n }\n\n // of the `<html>` and `<body>` rect bounds if horizontally scrollable\n\n function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle$1(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n }\n\n function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle$1(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n }\n\n function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n }\n\n /*\n given a DOM element, return the list of all scroll parents, up the list of ancesors\n until we get to the top window object. This list is what we attach scroll listeners\n to, because if any of these parent elements scroll, we'll need to re-calculate the\n reference element's position.\n */\n\n function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n }\n\n function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n }\n\n function getInnerBoundingClientRect(element, strategy) {\n var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n }\n\n function getClientRectFromMixedType(element, clippingParent, strategy) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n } // A \"clipping parent\" is an overflowable container with the characteristic of\n // clipping (or hiding) overflowing elements with a position different from\n // `initial`\n\n\n function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle$1(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n } // Gets the maximum area that the element is visible in due to any number of\n // clipping parents\n\n\n function getClippingRect(element, boundary, rootBoundary, strategy) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n }\n\n function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n }\n }\n\n return offsets;\n }\n\n function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$strategy = _options.strategy,\n strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n }\n\n function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements$1 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements$1.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements$1;\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n }\n\n function getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n }\n\n function flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const flip$1 = {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n };\n\n function getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n }\n\n function isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n }\n\n function hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const hide$1 = {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n };\n\n function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n }\n\n function offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const offset$1 = {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n };\n\n function popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const popperOffsets$1 = {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n };\n\n function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n }\n\n function preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n mainAxis: tetherOffsetValue,\n altAxis: tetherOffsetValue\n } : Object.assign({\n mainAxis: 0,\n altAxis: 0\n }, tetherOffsetValue);\n var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var _offsetModifierState$;\n\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min$1 = offset + overflow[mainSide];\n var max$1 = offset - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = offset + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _offsetModifierState$2;\n\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _len = altAxis === 'y' ? 'height' : 'width';\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const preventOverflow$1 = {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n };\n\n function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n\n function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n }\n\n function isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = round(rect.width) / element.offsetWidth || 1;\n var scaleY = round(rect.height) / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n } // Returns the composite rect of an element relative to its offsetParent.\n // Composite means it takes into account transforms as well as layout.\n\n\n function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n }\n\n function order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n }\n\n function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n }\n\n function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n }\n\n function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n }\n\n var DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n };\n\n function areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n }\n\n function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n }); // Validate the provided modifiers so that the consumer will get warned\n\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n }\n var createPopper$2 = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\n var defaultModifiers$1 = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1];\n var createPopper$1 = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers$1\n }); // eslint-disable-next-line import/no-unused-modules\n\n var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1, offset$1, flip$1, preventOverflow$1, arrow$1, hide$1];\n var createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n }); // eslint-disable-next-line import/no-unused-modules\n\n const Popper = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({\n __proto__: null,\n popperGenerator,\n detectOverflow,\n createPopperBase: createPopper$2,\n createPopper,\n createPopperLite: createPopper$1,\n top,\n bottom,\n right,\n left,\n auto,\n basePlacements,\n start,\n end,\n clippingParents,\n viewport,\n popper,\n reference,\n variationPlacements,\n placements,\n beforeRead,\n read,\n afterRead,\n beforeMain,\n main,\n afterMain,\n beforeWrite,\n write,\n afterWrite,\n modifierPhases,\n applyStyles: applyStyles$1,\n arrow: arrow$1,\n computeStyles: computeStyles$1,\n eventListeners,\n flip: flip$1,\n hide: hide$1,\n offset: offset$1,\n popperOffsets: popperOffsets$1,\n preventOverflow: preventOverflow$1\n }, Symbol.toStringTag, { value: 'Module' }));\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): dropdown.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$a = 'dropdown';\n const DATA_KEY$6 = 'bs.dropdown';\n const EVENT_KEY$6 = `.${DATA_KEY$6}`;\n const DATA_API_KEY$3 = '.data-api';\n const ESCAPE_KEY$2 = 'Escape';\n const TAB_KEY$1 = 'Tab';\n const ARROW_UP_KEY$1 = 'ArrowUp';\n const ARROW_DOWN_KEY$1 = 'ArrowDown';\n const RIGHT_MOUSE_BUTTON = 2; // MouseEvent.button value for the secondary button, usually the right button\n\n const EVENT_HIDE$5 = `hide${EVENT_KEY$6}`;\n const EVENT_HIDDEN$5 = `hidden${EVENT_KEY$6}`;\n const EVENT_SHOW$5 = `show${EVENT_KEY$6}`;\n const EVENT_SHOWN$5 = `shown${EVENT_KEY$6}`;\n const EVENT_CLICK_DATA_API$3 = `click${EVENT_KEY$6}${DATA_API_KEY$3}`;\n const EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY$6}${DATA_API_KEY$3}`;\n const EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY$6}${DATA_API_KEY$3}`;\n const CLASS_NAME_SHOW$6 = 'show';\n const CLASS_NAME_DROPUP = 'dropup';\n const CLASS_NAME_DROPEND = 'dropend';\n const CLASS_NAME_DROPSTART = 'dropstart';\n const CLASS_NAME_DROPUP_CENTER = 'dropup-center';\n const CLASS_NAME_DROPDOWN_CENTER = 'dropdown-center';\n const SELECTOR_DATA_TOGGLE$3 = '[data-bs-toggle=\"dropdown\"]:not(.disabled):not(:disabled)';\n const SELECTOR_DATA_TOGGLE_SHOWN = `${SELECTOR_DATA_TOGGLE$3}.${CLASS_NAME_SHOW$6}`;\n const SELECTOR_MENU = '.dropdown-menu';\n const SELECTOR_NAVBAR = '.navbar';\n const SELECTOR_NAVBAR_NAV = '.navbar-nav';\n const SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)';\n const PLACEMENT_TOP = isRTL() ? 'top-end' : 'top-start';\n const PLACEMENT_TOPEND = isRTL() ? 'top-start' : 'top-end';\n const PLACEMENT_BOTTOM = isRTL() ? 'bottom-end' : 'bottom-start';\n const PLACEMENT_BOTTOMEND = isRTL() ? 'bottom-start' : 'bottom-end';\n const PLACEMENT_RIGHT = isRTL() ? 'left-start' : 'right-start';\n const PLACEMENT_LEFT = isRTL() ? 'right-start' : 'left-start';\n const PLACEMENT_TOPCENTER = 'top';\n const PLACEMENT_BOTTOMCENTER = 'bottom';\n const Default$9 = {\n autoClose: true,\n boundary: 'clippingParents',\n display: 'dynamic',\n offset: [0, 2],\n popperConfig: null,\n reference: 'toggle'\n };\n const DefaultType$9 = {\n autoClose: '(boolean|string)',\n boundary: '(string|element)',\n display: 'string',\n offset: '(array|string|function)',\n popperConfig: '(null|object|function)',\n reference: '(string|element|object)'\n };\n /**\n * Class definition\n */\n\n class Dropdown extends BaseComponent {\n constructor(element, config) {\n super(element, config);\n this._popper = null;\n this._parent = this._element.parentNode; // dropdown wrapper\n // todo: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.2/forms/input-group/\n\n this._menu = SelectorEngine.next(this._element, SELECTOR_MENU)[0] || SelectorEngine.prev(this._element, SELECTOR_MENU)[0];\n this._inNavbar = this._detectNavbar();\n } // Getters\n\n\n static get Default() {\n return Default$9;\n }\n\n static get DefaultType() {\n return DefaultType$9;\n }\n\n static get NAME() {\n return NAME$a;\n } // Public\n\n\n toggle() {\n return this._isShown() ? this.hide() : this.show();\n }\n\n show() {\n if (isDisabled(this._element) || this._isShown()) {\n return;\n }\n\n const relatedTarget = {\n relatedTarget: this._element\n };\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$5, relatedTarget);\n\n if (showEvent.defaultPrevented) {\n return;\n }\n\n this._createPopper(); // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n\n\n if ('ontouchstart' in document.documentElement && !this._parent.closest(SELECTOR_NAVBAR_NAV)) {\n for (const element of [].concat(...document.body.children)) {\n EventHandler.on(element, 'mouseover', noop);\n }\n }\n\n this._element.focus();\n\n this._element.setAttribute('aria-expanded', true);\n\n this._menu.classList.add(CLASS_NAME_SHOW$6);\n\n this._element.classList.add(CLASS_NAME_SHOW$6);\n\n EventHandler.trigger(this._element, EVENT_SHOWN$5, relatedTarget);\n }\n\n hide() {\n if (isDisabled(this._element) || !this._isShown()) {\n return;\n }\n\n const relatedTarget = {\n relatedTarget: this._element\n };\n\n this._completeHide(relatedTarget);\n }\n\n dispose() {\n if (this._popper) {\n this._popper.destroy();\n }\n\n super.dispose();\n }\n\n update() {\n this._inNavbar = this._detectNavbar();\n\n if (this._popper) {\n this._popper.update();\n }\n } // Private\n\n\n _completeHide(relatedTarget) {\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$5, relatedTarget);\n\n if (hideEvent.defaultPrevented) {\n return;\n } // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n\n\n if ('ontouchstart' in document.documentElement) {\n for (const element of [].concat(...document.body.children)) {\n EventHandler.off(element, 'mouseover', noop);\n }\n }\n\n if (this._popper) {\n this._popper.destroy();\n }\n\n this._menu.classList.remove(CLASS_NAME_SHOW$6);\n\n this._element.classList.remove(CLASS_NAME_SHOW$6);\n\n this._element.setAttribute('aria-expanded', 'false');\n\n Manipulator.removeDataAttribute(this._menu, 'popper');\n EventHandler.trigger(this._element, EVENT_HIDDEN$5, relatedTarget);\n }\n\n _getConfig(config) {\n config = super._getConfig(config);\n\n if (typeof config.reference === 'object' && !isElement$1(config.reference) && typeof config.reference.getBoundingClientRect !== 'function') {\n // Popper virtual elements require a getBoundingClientRect method\n throw new TypeError(`${NAME$a.toUpperCase()}: Option \"reference\" provided type \"object\" without a required \"getBoundingClientRect\" method.`);\n }\n\n return config;\n }\n\n _createPopper() {\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap\\'s dropdowns require Popper (https://popper.js.org)');\n }\n\n let referenceElement = this._element;\n\n if (this._config.reference === 'parent') {\n referenceElement = this._parent;\n } else if (isElement$1(this._config.reference)) {\n referenceElement = getElement(this._config.reference);\n } else if (typeof this._config.reference === 'object') {\n referenceElement = this._config.reference;\n }\n\n const popperConfig = this._getPopperConfig();\n\n this._popper = createPopper(referenceElement, this._menu, popperConfig);\n }\n\n _isShown() {\n return this._menu.classList.contains(CLASS_NAME_SHOW$6);\n }\n\n _getPlacement() {\n const parentDropdown = this._parent;\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPEND)) {\n return PLACEMENT_RIGHT;\n }\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPSTART)) {\n return PLACEMENT_LEFT;\n }\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPUP_CENTER)) {\n return PLACEMENT_TOPCENTER;\n }\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPDOWN_CENTER)) {\n return PLACEMENT_BOTTOMCENTER;\n } // We need to trim the value because custom properties can also include spaces\n\n\n const isEnd = getComputedStyle(this._menu).getPropertyValue('--bs-position').trim() === 'end';\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {\n return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP;\n }\n\n return isEnd ? PLACEMENT_BOTTOMEND : PLACEMENT_BOTTOM;\n }\n\n _detectNavbar() {\n return this._element.closest(SELECTOR_NAVBAR) !== null;\n }\n\n _getOffset() {\n const {\n offset\n } = this._config;\n\n if (typeof offset === 'string') {\n return offset.split(',').map(value => Number.parseInt(value, 10));\n }\n\n if (typeof offset === 'function') {\n return popperData => offset(popperData, this._element);\n }\n\n return offset;\n }\n\n _getPopperConfig() {\n const defaultBsPopperConfig = {\n placement: this._getPlacement(),\n modifiers: [{\n name: 'preventOverflow',\n options: {\n boundary: this._config.boundary\n }\n }, {\n name: 'offset',\n options: {\n offset: this._getOffset()\n }\n }]\n }; // Disable Popper if we have a static display or Dropdown is in Navbar\n\n if (this._inNavbar || this._config.display === 'static') {\n Manipulator.setDataAttribute(this._menu, 'popper', 'static'); // todo:v6 remove\n\n defaultBsPopperConfig.modifiers = [{\n name: 'applyStyles',\n enabled: false\n }];\n }\n\n return { ...defaultBsPopperConfig,\n ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)\n };\n }\n\n _selectMenuItem({\n key,\n target\n }) {\n const items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, this._menu).filter(element => isVisible(element));\n\n if (!items.length) {\n return;\n } // if target isn't included in items (e.g. when expanding the dropdown)\n // allow cycling to get the last item in case key equals ARROW_UP_KEY\n\n\n getNextActiveElement(items, target, key === ARROW_DOWN_KEY$1, !items.includes(target)).focus();\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Dropdown.getOrCreateInstance(this, config);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n });\n }\n\n static clearMenus(event) {\n if (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY$1) {\n return;\n }\n\n const openToggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE_SHOWN);\n\n for (const toggle of openToggles) {\n const context = Dropdown.getInstance(toggle);\n\n if (!context || context._config.autoClose === false) {\n continue;\n }\n\n const composedPath = event.composedPath();\n const isMenuTarget = composedPath.includes(context._menu);\n\n if (composedPath.includes(context._element) || context._config.autoClose === 'inside' && !isMenuTarget || context._config.autoClose === 'outside' && isMenuTarget) {\n continue;\n } // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu\n\n\n if (context._menu.contains(event.target) && (event.type === 'keyup' && event.key === TAB_KEY$1 || /input|select|option|textarea|form/i.test(event.target.tagName))) {\n continue;\n }\n\n const relatedTarget = {\n relatedTarget: context._element\n };\n\n if (event.type === 'click') {\n relatedTarget.clickEvent = event;\n }\n\n context._completeHide(relatedTarget);\n }\n }\n\n static dataApiKeydownHandler(event) {\n // If not an UP | DOWN | ESCAPE key => not a dropdown command\n // If input/textarea && if key is other than ESCAPE => not a dropdown command\n const isInput = /input|textarea/i.test(event.target.tagName);\n const isEscapeEvent = event.key === ESCAPE_KEY$2;\n const isUpOrDownEvent = [ARROW_UP_KEY$1, ARROW_DOWN_KEY$1].includes(event.key);\n\n if (!isUpOrDownEvent && !isEscapeEvent) {\n return;\n }\n\n if (isInput && !isEscapeEvent) {\n return;\n }\n\n event.preventDefault(); // todo: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.2/forms/input-group/\n\n const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0] || SelectorEngine.next(this, SELECTOR_DATA_TOGGLE$3)[0];\n const instance = Dropdown.getOrCreateInstance(getToggleButton);\n\n if (isUpOrDownEvent) {\n event.stopPropagation();\n instance.show();\n\n instance._selectMenuItem(event);\n\n return;\n }\n\n if (instance._isShown()) {\n // else is escape and we check if it is shown\n event.stopPropagation();\n instance.hide();\n getToggleButton.focus();\n }\n }\n\n }\n /**\n * Data API implementation\n */\n\n\n EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE$3, Dropdown.dataApiKeydownHandler);\n EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler);\n EventHandler.on(document, EVENT_CLICK_DATA_API$3, Dropdown.clearMenus);\n EventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus);\n EventHandler.on(document, EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$3, function (event) {\n event.preventDefault();\n Dropdown.getOrCreateInstance(this).toggle();\n });\n /**\n * jQuery\n */\n\n defineJQueryPlugin(Dropdown);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): util/scrollBar.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';\n const SELECTOR_STICKY_CONTENT = '.sticky-top';\n const PROPERTY_PADDING = 'padding-right';\n const PROPERTY_MARGIN = 'margin-right';\n /**\n * Class definition\n */\n\n class ScrollBarHelper {\n constructor() {\n this._element = document.body;\n } // Public\n\n\n getWidth() {\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes\n const documentWidth = document.documentElement.clientWidth;\n return Math.abs(window.innerWidth - documentWidth);\n }\n\n hide() {\n const width = this.getWidth();\n\n this._disableOverFlow(); // give padding to element to balance the hidden scrollbar width\n\n\n this._setElementAttributes(this._element, PROPERTY_PADDING, calculatedValue => calculatedValue + width); // trick: We adjust positive paddingRight and negative marginRight to sticky-top elements to keep showing fullwidth\n\n\n this._setElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING, calculatedValue => calculatedValue + width);\n\n this._setElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN, calculatedValue => calculatedValue - width);\n }\n\n reset() {\n this._resetElementAttributes(this._element, 'overflow');\n\n this._resetElementAttributes(this._element, PROPERTY_PADDING);\n\n this._resetElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING);\n\n this._resetElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN);\n }\n\n isOverflowing() {\n return this.getWidth() > 0;\n } // Private\n\n\n _disableOverFlow() {\n this._saveInitialAttribute(this._element, 'overflow');\n\n this._element.style.overflow = 'hidden';\n }\n\n _setElementAttributes(selector, styleProperty, callback) {\n const scrollbarWidth = this.getWidth();\n\n const manipulationCallBack = element => {\n if (element !== this._element && window.innerWidth > element.clientWidth + scrollbarWidth) {\n return;\n }\n\n this._saveInitialAttribute(element, styleProperty);\n\n const calculatedValue = window.getComputedStyle(element).getPropertyValue(styleProperty);\n element.style.setProperty(styleProperty, `${callback(Number.parseFloat(calculatedValue))}px`);\n };\n\n this._applyManipulationCallback(selector, manipulationCallBack);\n }\n\n _saveInitialAttribute(element, styleProperty) {\n const actualValue = element.style.getPropertyValue(styleProperty);\n\n if (actualValue) {\n Manipulator.setDataAttribute(element, styleProperty, actualValue);\n }\n }\n\n _resetElementAttributes(selector, styleProperty) {\n const manipulationCallBack = element => {\n const value = Manipulator.getDataAttribute(element, styleProperty); // We only want to remove the property if the value is `null`; the value can also be zero\n\n if (value === null) {\n element.style.removeProperty(styleProperty);\n return;\n }\n\n Manipulator.removeDataAttribute(element, styleProperty);\n element.style.setProperty(styleProperty, value);\n };\n\n this._applyManipulationCallback(selector, manipulationCallBack);\n }\n\n _applyManipulationCallback(selector, callBack) {\n if (isElement$1(selector)) {\n callBack(selector);\n return;\n }\n\n for (const sel of SelectorEngine.find(selector, this._element)) {\n callBack(sel);\n }\n }\n\n }\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): util/backdrop.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$9 = 'backdrop';\n const CLASS_NAME_FADE$4 = 'fade';\n const CLASS_NAME_SHOW$5 = 'show';\n const EVENT_MOUSEDOWN = `mousedown.bs.${NAME$9}`;\n const Default$8 = {\n className: 'modal-backdrop',\n clickCallback: null,\n isAnimated: false,\n isVisible: true,\n // if false, we use the backdrop helper without adding any element to the dom\n rootElement: 'body' // give the choice to place backdrop under different elements\n\n };\n const DefaultType$8 = {\n className: 'string',\n clickCallback: '(function|null)',\n isAnimated: 'boolean',\n isVisible: 'boolean',\n rootElement: '(element|string)'\n };\n /**\n * Class definition\n */\n\n class Backdrop extends Config {\n constructor(config) {\n super();\n this._config = this._getConfig(config);\n this._isAppended = false;\n this._element = null;\n } // Getters\n\n\n static get Default() {\n return Default$8;\n }\n\n static get DefaultType() {\n return DefaultType$8;\n }\n\n static get NAME() {\n return NAME$9;\n } // Public\n\n\n show(callback) {\n if (!this._config.isVisible) {\n execute(callback);\n return;\n }\n\n this._append();\n\n const element = this._getElement();\n\n if (this._config.isAnimated) {\n reflow(element);\n }\n\n element.classList.add(CLASS_NAME_SHOW$5);\n\n this._emulateAnimation(() => {\n execute(callback);\n });\n }\n\n hide(callback) {\n if (!this._config.isVisible) {\n execute(callback);\n return;\n }\n\n this._getElement().classList.remove(CLASS_NAME_SHOW$5);\n\n this._emulateAnimation(() => {\n this.dispose();\n execute(callback);\n });\n }\n\n dispose() {\n if (!this._isAppended) {\n return;\n }\n\n EventHandler.off(this._element, EVENT_MOUSEDOWN);\n\n this._element.remove();\n\n this._isAppended = false;\n } // Private\n\n\n _getElement() {\n if (!this._element) {\n const backdrop = document.createElement('div');\n backdrop.className = this._config.className;\n\n if (this._config.isAnimated) {\n backdrop.classList.add(CLASS_NAME_FADE$4);\n }\n\n this._element = backdrop;\n }\n\n return this._element;\n }\n\n _configAfterMerge(config) {\n // use getElement() with the default \"body\" to get a fresh Element on each instantiation\n config.rootElement = getElement(config.rootElement);\n return config;\n }\n\n _append() {\n if (this._isAppended) {\n return;\n }\n\n const element = this._getElement();\n\n this._config.rootElement.append(element);\n\n EventHandler.on(element, EVENT_MOUSEDOWN, () => {\n execute(this._config.clickCallback);\n });\n this._isAppended = true;\n }\n\n _emulateAnimation(callback) {\n executeAfterTransition(callback, this._getElement(), this._config.isAnimated);\n }\n\n }\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): util/focustrap.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$8 = 'focustrap';\n const DATA_KEY$5 = 'bs.focustrap';\n const EVENT_KEY$5 = `.${DATA_KEY$5}`;\n const EVENT_FOCUSIN$2 = `focusin${EVENT_KEY$5}`;\n const EVENT_KEYDOWN_TAB = `keydown.tab${EVENT_KEY$5}`;\n const TAB_KEY = 'Tab';\n const TAB_NAV_FORWARD = 'forward';\n const TAB_NAV_BACKWARD = 'backward';\n const Default$7 = {\n autofocus: true,\n trapElement: null // The element to trap focus inside of\n\n };\n const DefaultType$7 = {\n autofocus: 'boolean',\n trapElement: 'element'\n };\n /**\n * Class definition\n */\n\n class FocusTrap extends Config {\n constructor(config) {\n super();\n this._config = this._getConfig(config);\n this._isActive = false;\n this._lastTabNavDirection = null;\n } // Getters\n\n\n static get Default() {\n return Default$7;\n }\n\n static get DefaultType() {\n return DefaultType$7;\n }\n\n static get NAME() {\n return NAME$8;\n } // Public\n\n\n activate() {\n if (this._isActive) {\n return;\n }\n\n if (this._config.autofocus) {\n this._config.trapElement.focus();\n }\n\n EventHandler.off(document, EVENT_KEY$5); // guard against infinite focus loop\n\n EventHandler.on(document, EVENT_FOCUSIN$2, event => this._handleFocusin(event));\n EventHandler.on(document, EVENT_KEYDOWN_TAB, event => this._handleKeydown(event));\n this._isActive = true;\n }\n\n deactivate() {\n if (!this._isActive) {\n return;\n }\n\n this._isActive = false;\n EventHandler.off(document, EVENT_KEY$5);\n } // Private\n\n\n _handleFocusin(event) {\n const {\n trapElement\n } = this._config;\n\n if (event.target === document || event.target === trapElement || trapElement.contains(event.target)) {\n return;\n }\n\n const elements = SelectorEngine.focusableChildren(trapElement);\n\n if (elements.length === 0) {\n trapElement.focus();\n } else if (this._lastTabNavDirection === TAB_NAV_BACKWARD) {\n elements[elements.length - 1].focus();\n } else {\n elements[0].focus();\n }\n }\n\n _handleKeydown(event) {\n if (event.key !== TAB_KEY) {\n return;\n }\n\n this._lastTabNavDirection = event.shiftKey ? TAB_NAV_BACKWARD : TAB_NAV_FORWARD;\n }\n\n }\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): modal.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$7 = 'modal';\n const DATA_KEY$4 = 'bs.modal';\n const EVENT_KEY$4 = `.${DATA_KEY$4}`;\n const DATA_API_KEY$2 = '.data-api';\n const ESCAPE_KEY$1 = 'Escape';\n const EVENT_HIDE$4 = `hide${EVENT_KEY$4}`;\n const EVENT_HIDE_PREVENTED$1 = `hidePrevented${EVENT_KEY$4}`;\n const EVENT_HIDDEN$4 = `hidden${EVENT_KEY$4}`;\n const EVENT_SHOW$4 = `show${EVENT_KEY$4}`;\n const EVENT_SHOWN$4 = `shown${EVENT_KEY$4}`;\n const EVENT_RESIZE$1 = `resize${EVENT_KEY$4}`;\n const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY$4}`;\n const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY$4}`;\n const EVENT_KEYDOWN_DISMISS$1 = `keydown.dismiss${EVENT_KEY$4}`;\n const EVENT_CLICK_DATA_API$2 = `click${EVENT_KEY$4}${DATA_API_KEY$2}`;\n const CLASS_NAME_OPEN = 'modal-open';\n const CLASS_NAME_FADE$3 = 'fade';\n const CLASS_NAME_SHOW$4 = 'show';\n const CLASS_NAME_STATIC = 'modal-static';\n const OPEN_SELECTOR$1 = '.modal.show';\n const SELECTOR_DIALOG = '.modal-dialog';\n const SELECTOR_MODAL_BODY = '.modal-body';\n const SELECTOR_DATA_TOGGLE$2 = '[data-bs-toggle=\"modal\"]';\n const Default$6 = {\n backdrop: true,\n focus: true,\n keyboard: true\n };\n const DefaultType$6 = {\n backdrop: '(boolean|string)',\n focus: 'boolean',\n keyboard: 'boolean'\n };\n /**\n * Class definition\n */\n\n class Modal extends BaseComponent {\n constructor(element, config) {\n super(element, config);\n this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, this._element);\n this._backdrop = this._initializeBackDrop();\n this._focustrap = this._initializeFocusTrap();\n this._isShown = false;\n this._isTransitioning = false;\n this._scrollBar = new ScrollBarHelper();\n\n this._addEventListeners();\n } // Getters\n\n\n static get Default() {\n return Default$6;\n }\n\n static get DefaultType() {\n return DefaultType$6;\n }\n\n static get NAME() {\n return NAME$7;\n } // Public\n\n\n toggle(relatedTarget) {\n return this._isShown ? this.hide() : this.show(relatedTarget);\n }\n\n show(relatedTarget) {\n if (this._isShown || this._isTransitioning) {\n return;\n }\n\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$4, {\n relatedTarget\n });\n\n if (showEvent.defaultPrevented) {\n return;\n }\n\n this._isShown = true;\n this._isTransitioning = true;\n\n this._scrollBar.hide();\n\n document.body.classList.add(CLASS_NAME_OPEN);\n\n this._adjustDialog();\n\n this._backdrop.show(() => this._showElement(relatedTarget));\n }\n\n hide() {\n if (!this._isShown || this._isTransitioning) {\n return;\n }\n\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$4);\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n this._isShown = false;\n this._isTransitioning = true;\n\n this._focustrap.deactivate();\n\n this._element.classList.remove(CLASS_NAME_SHOW$4);\n\n this._queueCallback(() => this._hideModal(), this._element, this._isAnimated());\n }\n\n dispose() {\n for (const htmlElement of [window, this._dialog]) {\n EventHandler.off(htmlElement, EVENT_KEY$4);\n }\n\n this._backdrop.dispose();\n\n this._focustrap.deactivate();\n\n super.dispose();\n }\n\n handleUpdate() {\n this._adjustDialog();\n } // Private\n\n\n _initializeBackDrop() {\n return new Backdrop({\n isVisible: Boolean(this._config.backdrop),\n // 'static' option will be translated to true, and booleans will keep their value,\n isAnimated: this._isAnimated()\n });\n }\n\n _initializeFocusTrap() {\n return new FocusTrap({\n trapElement: this._element\n });\n }\n\n _showElement(relatedTarget) {\n // try to append dynamic modal\n if (!document.body.contains(this._element)) {\n document.body.append(this._element);\n }\n\n this._element.style.display = 'block';\n\n this._element.removeAttribute('aria-hidden');\n\n this._element.setAttribute('aria-modal', true);\n\n this._element.setAttribute('role', 'dialog');\n\n this._element.scrollTop = 0;\n const modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog);\n\n if (modalBody) {\n modalBody.scrollTop = 0;\n }\n\n reflow(this._element);\n\n this._element.classList.add(CLASS_NAME_SHOW$4);\n\n const transitionComplete = () => {\n if (this._config.focus) {\n this._focustrap.activate();\n }\n\n this._isTransitioning = false;\n EventHandler.trigger(this._element, EVENT_SHOWN$4, {\n relatedTarget\n });\n };\n\n this._queueCallback(transitionComplete, this._dialog, this._isAnimated());\n }\n\n _addEventListeners() {\n EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS$1, event => {\n if (event.key !== ESCAPE_KEY$1) {\n return;\n }\n\n if (this._config.keyboard) {\n event.preventDefault();\n this.hide();\n return;\n }\n\n this._triggerBackdropTransition();\n });\n EventHandler.on(window, EVENT_RESIZE$1, () => {\n if (this._isShown && !this._isTransitioning) {\n this._adjustDialog();\n }\n });\n EventHandler.on(this._element, EVENT_MOUSEDOWN_DISMISS, event => {\n EventHandler.one(this._element, EVENT_CLICK_DISMISS, event2 => {\n // a bad trick to segregate clicks that may start inside dialog but end outside, and avoid listen to scrollbar clicks\n if (this._dialog.contains(event.target) || this._dialog.contains(event2.target)) {\n return;\n }\n\n if (this._config.backdrop === 'static') {\n this._triggerBackdropTransition();\n\n return;\n }\n\n if (this._config.backdrop) {\n this.hide();\n }\n });\n });\n }\n\n _hideModal() {\n this._element.style.display = 'none';\n\n this._element.setAttribute('aria-hidden', true);\n\n this._element.removeAttribute('aria-modal');\n\n this._element.removeAttribute('role');\n\n this._isTransitioning = false;\n\n this._backdrop.hide(() => {\n document.body.classList.remove(CLASS_NAME_OPEN);\n\n this._resetAdjustments();\n\n this._scrollBar.reset();\n\n EventHandler.trigger(this._element, EVENT_HIDDEN$4);\n });\n }\n\n _isAnimated() {\n return this._element.classList.contains(CLASS_NAME_FADE$3);\n }\n\n _triggerBackdropTransition() {\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED$1);\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;\n const initialOverflowY = this._element.style.overflowY; // return if the following background transition hasn't yet completed\n\n if (initialOverflowY === 'hidden' || this._element.classList.contains(CLASS_NAME_STATIC)) {\n return;\n }\n\n if (!isModalOverflowing) {\n this._element.style.overflowY = 'hidden';\n }\n\n this._element.classList.add(CLASS_NAME_STATIC);\n\n this._queueCallback(() => {\n this._element.classList.remove(CLASS_NAME_STATIC);\n\n this._queueCallback(() => {\n this._element.style.overflowY = initialOverflowY;\n }, this._dialog);\n }, this._dialog);\n\n this._element.focus();\n }\n /**\n * The following methods are used to handle overflowing modals\n */\n\n\n _adjustDialog() {\n const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;\n\n const scrollbarWidth = this._scrollBar.getWidth();\n\n const isBodyOverflowing = scrollbarWidth > 0;\n\n if (isBodyOverflowing && !isModalOverflowing) {\n const property = isRTL() ? 'paddingLeft' : 'paddingRight';\n this._element.style[property] = `${scrollbarWidth}px`;\n }\n\n if (!isBodyOverflowing && isModalOverflowing) {\n const property = isRTL() ? 'paddingRight' : 'paddingLeft';\n this._element.style[property] = `${scrollbarWidth}px`;\n }\n }\n\n _resetAdjustments() {\n this._element.style.paddingLeft = '';\n this._element.style.paddingRight = '';\n } // Static\n\n\n static jQueryInterface(config, relatedTarget) {\n return this.each(function () {\n const data = Modal.getOrCreateInstance(this, config);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config](relatedTarget);\n });\n }\n\n }\n /**\n * Data API implementation\n */\n\n\n EventHandler.on(document, EVENT_CLICK_DATA_API$2, SELECTOR_DATA_TOGGLE$2, function (event) {\n const target = getElementFromSelector(this);\n\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault();\n }\n\n EventHandler.one(target, EVENT_SHOW$4, showEvent => {\n if (showEvent.defaultPrevented) {\n // only register focus restorer if modal will actually get shown\n return;\n }\n\n EventHandler.one(target, EVENT_HIDDEN$4, () => {\n if (isVisible(this)) {\n this.focus();\n }\n });\n }); // avoid conflict when clicking modal toggler while another one is open\n\n const alreadyOpen = SelectorEngine.findOne(OPEN_SELECTOR$1);\n\n if (alreadyOpen) {\n Modal.getInstance(alreadyOpen).hide();\n }\n\n const data = Modal.getOrCreateInstance(target);\n data.toggle(this);\n });\n enableDismissTrigger(Modal);\n /**\n * jQuery\n */\n\n defineJQueryPlugin(Modal);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): offcanvas.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$6 = 'offcanvas';\n const DATA_KEY$3 = 'bs.offcanvas';\n const EVENT_KEY$3 = `.${DATA_KEY$3}`;\n const DATA_API_KEY$1 = '.data-api';\n const EVENT_LOAD_DATA_API$2 = `load${EVENT_KEY$3}${DATA_API_KEY$1}`;\n const ESCAPE_KEY = 'Escape';\n const CLASS_NAME_SHOW$3 = 'show';\n const CLASS_NAME_SHOWING$1 = 'showing';\n const CLASS_NAME_HIDING = 'hiding';\n const CLASS_NAME_BACKDROP = 'offcanvas-backdrop';\n const OPEN_SELECTOR = '.offcanvas.show';\n const EVENT_SHOW$3 = `show${EVENT_KEY$3}`;\n const EVENT_SHOWN$3 = `shown${EVENT_KEY$3}`;\n const EVENT_HIDE$3 = `hide${EVENT_KEY$3}`;\n const EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY$3}`;\n const EVENT_HIDDEN$3 = `hidden${EVENT_KEY$3}`;\n const EVENT_RESIZE = `resize${EVENT_KEY$3}`;\n const EVENT_CLICK_DATA_API$1 = `click${EVENT_KEY$3}${DATA_API_KEY$1}`;\n const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY$3}`;\n const SELECTOR_DATA_TOGGLE$1 = '[data-bs-toggle=\"offcanvas\"]';\n const Default$5 = {\n backdrop: true,\n keyboard: true,\n scroll: false\n };\n const DefaultType$5 = {\n backdrop: '(boolean|string)',\n keyboard: 'boolean',\n scroll: 'boolean'\n };\n /**\n * Class definition\n */\n\n class Offcanvas extends BaseComponent {\n constructor(element, config) {\n super(element, config);\n this._isShown = false;\n this._backdrop = this._initializeBackDrop();\n this._focustrap = this._initializeFocusTrap();\n\n this._addEventListeners();\n } // Getters\n\n\n static get Default() {\n return Default$5;\n }\n\n static get DefaultType() {\n return DefaultType$5;\n }\n\n static get NAME() {\n return NAME$6;\n } // Public\n\n\n toggle(relatedTarget) {\n return this._isShown ? this.hide() : this.show(relatedTarget);\n }\n\n show(relatedTarget) {\n if (this._isShown) {\n return;\n }\n\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$3, {\n relatedTarget\n });\n\n if (showEvent.defaultPrevented) {\n return;\n }\n\n this._isShown = true;\n\n this._backdrop.show();\n\n if (!this._config.scroll) {\n new ScrollBarHelper().hide();\n }\n\n this._element.setAttribute('aria-modal', true);\n\n this._element.setAttribute('role', 'dialog');\n\n this._element.classList.add(CLASS_NAME_SHOWING$1);\n\n const completeCallBack = () => {\n if (!this._config.scroll || this._config.backdrop) {\n this._focustrap.activate();\n }\n\n this._element.classList.add(CLASS_NAME_SHOW$3);\n\n this._element.classList.remove(CLASS_NAME_SHOWING$1);\n\n EventHandler.trigger(this._element, EVENT_SHOWN$3, {\n relatedTarget\n });\n };\n\n this._queueCallback(completeCallBack, this._element, true);\n }\n\n hide() {\n if (!this._isShown) {\n return;\n }\n\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$3);\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n this._focustrap.deactivate();\n\n this._element.blur();\n\n this._isShown = false;\n\n this._element.classList.add(CLASS_NAME_HIDING);\n\n this._backdrop.hide();\n\n const completeCallback = () => {\n this._element.classList.remove(CLASS_NAME_SHOW$3, CLASS_NAME_HIDING);\n\n this._element.removeAttribute('aria-modal');\n\n this._element.removeAttribute('role');\n\n if (!this._config.scroll) {\n new ScrollBarHelper().reset();\n }\n\n EventHandler.trigger(this._element, EVENT_HIDDEN$3);\n };\n\n this._queueCallback(completeCallback, this._element, true);\n }\n\n dispose() {\n this._backdrop.dispose();\n\n this._focustrap.deactivate();\n\n super.dispose();\n } // Private\n\n\n _initializeBackDrop() {\n const clickCallback = () => {\n if (this._config.backdrop === 'static') {\n EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);\n return;\n }\n\n this.hide();\n }; // 'static' option will be translated to true, and booleans will keep their value\n\n\n const isVisible = Boolean(this._config.backdrop);\n return new Backdrop({\n className: CLASS_NAME_BACKDROP,\n isVisible,\n isAnimated: true,\n rootElement: this._element.parentNode,\n clickCallback: isVisible ? clickCallback : null\n });\n }\n\n _initializeFocusTrap() {\n return new FocusTrap({\n trapElement: this._element\n });\n }\n\n _addEventListeners() {\n EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => {\n if (event.key !== ESCAPE_KEY) {\n return;\n }\n\n if (!this._config.keyboard) {\n EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);\n return;\n }\n\n this.hide();\n });\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Offcanvas.getOrCreateInstance(this, config);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config](this);\n });\n }\n\n }\n /**\n * Data API implementation\n */\n\n\n EventHandler.on(document, EVENT_CLICK_DATA_API$1, SELECTOR_DATA_TOGGLE$1, function (event) {\n const target = getElementFromSelector(this);\n\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault();\n }\n\n if (isDisabled(this)) {\n return;\n }\n\n EventHandler.one(target, EVENT_HIDDEN$3, () => {\n // focus on trigger when it is closed\n if (isVisible(this)) {\n this.focus();\n }\n }); // avoid conflict when clicking a toggler of an offcanvas, while another is open\n\n const alreadyOpen = SelectorEngine.findOne(OPEN_SELECTOR);\n\n if (alreadyOpen && alreadyOpen !== target) {\n Offcanvas.getInstance(alreadyOpen).hide();\n }\n\n const data = Offcanvas.getOrCreateInstance(target);\n data.toggle(this);\n });\n EventHandler.on(window, EVENT_LOAD_DATA_API$2, () => {\n for (const selector of SelectorEngine.find(OPEN_SELECTOR)) {\n Offcanvas.getOrCreateInstance(selector).show();\n }\n });\n EventHandler.on(window, EVENT_RESIZE, () => {\n for (const element of SelectorEngine.find('[aria-modal][class*=show][class*=offcanvas-]')) {\n if (getComputedStyle(element).position !== 'fixed') {\n Offcanvas.getOrCreateInstance(element).hide();\n }\n }\n });\n enableDismissTrigger(Offcanvas);\n /**\n * jQuery\n */\n\n defineJQueryPlugin(Offcanvas);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): util/sanitizer.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n const uriAttributes = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']);\n const ARIA_ATTRIBUTE_PATTERN = /^aria-[\\w-]*$/i;\n /**\n * A pattern that recognizes a commonly useful subset of URLs that are safe.\n *\n * Shout-out to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts\n */\n\n const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i;\n /**\n * A pattern that matches safe data URLs. Only matches image, video and audio types.\n *\n * Shout-out to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts\n */\n\n const DATA_URL_PATTERN = /^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[\\d+/a-z]+=*$/i;\n\n const allowedAttribute = (attribute, allowedAttributeList) => {\n const attributeName = attribute.nodeName.toLowerCase();\n\n if (allowedAttributeList.includes(attributeName)) {\n if (uriAttributes.has(attributeName)) {\n return Boolean(SAFE_URL_PATTERN.test(attribute.nodeValue) || DATA_URL_PATTERN.test(attribute.nodeValue));\n }\n\n return true;\n } // Check if a regular expression validates the attribute.\n\n\n return allowedAttributeList.filter(attributeRegex => attributeRegex instanceof RegExp).some(regex => regex.test(attributeName));\n };\n\n const DefaultAllowlist = {\n // Global attributes allowed on any supplied element below.\n '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],\n a: ['target', 'href', 'title', 'rel'],\n area: [],\n b: [],\n br: [],\n col: [],\n code: [],\n div: [],\n em: [],\n hr: [],\n h1: [],\n h2: [],\n h3: [],\n h4: [],\n h5: [],\n h6: [],\n i: [],\n img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],\n li: [],\n ol: [],\n p: [],\n pre: [],\n s: [],\n small: [],\n span: [],\n sub: [],\n sup: [],\n strong: [],\n u: [],\n ul: []\n };\n function sanitizeHtml(unsafeHtml, allowList, sanitizeFunction) {\n if (!unsafeHtml.length) {\n return unsafeHtml;\n }\n\n if (sanitizeFunction && typeof sanitizeFunction === 'function') {\n return sanitizeFunction(unsafeHtml);\n }\n\n const domParser = new window.DOMParser();\n const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');\n const elements = [].concat(...createdDocument.body.querySelectorAll('*'));\n\n for (const element of elements) {\n const elementName = element.nodeName.toLowerCase();\n\n if (!Object.keys(allowList).includes(elementName)) {\n element.remove();\n continue;\n }\n\n const attributeList = [].concat(...element.attributes);\n const allowedAttributes = [].concat(allowList['*'] || [], allowList[elementName] || []);\n\n for (const attribute of attributeList) {\n if (!allowedAttribute(attribute, allowedAttributes)) {\n element.removeAttribute(attribute.nodeName);\n }\n }\n }\n\n return createdDocument.body.innerHTML;\n }\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): util/template-factory.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$5 = 'TemplateFactory';\n const Default$4 = {\n allowList: DefaultAllowlist,\n content: {},\n // { selector : text , selector2 : text2 , }\n extraClass: '',\n html: false,\n sanitize: true,\n sanitizeFn: null,\n template: '<div></div>'\n };\n const DefaultType$4 = {\n allowList: 'object',\n content: 'object',\n extraClass: '(string|function)',\n html: 'boolean',\n sanitize: 'boolean',\n sanitizeFn: '(null|function)',\n template: 'string'\n };\n const DefaultContentType = {\n entry: '(string|element|function|null)',\n selector: '(string|element)'\n };\n /**\n * Class definition\n */\n\n class TemplateFactory extends Config {\n constructor(config) {\n super();\n this._config = this._getConfig(config);\n } // Getters\n\n\n static get Default() {\n return Default$4;\n }\n\n static get DefaultType() {\n return DefaultType$4;\n }\n\n static get NAME() {\n return NAME$5;\n } // Public\n\n\n getContent() {\n return Object.values(this._config.content).map(config => this._resolvePossibleFunction(config)).filter(Boolean);\n }\n\n hasContent() {\n return this.getContent().length > 0;\n }\n\n changeContent(content) {\n this._checkContent(content);\n\n this._config.content = { ...this._config.content,\n ...content\n };\n return this;\n }\n\n toHtml() {\n const templateWrapper = document.createElement('div');\n templateWrapper.innerHTML = this._maybeSanitize(this._config.template);\n\n for (const [selector, text] of Object.entries(this._config.content)) {\n this._setContent(templateWrapper, text, selector);\n }\n\n const template = templateWrapper.children[0];\n\n const extraClass = this._resolvePossibleFunction(this._config.extraClass);\n\n if (extraClass) {\n template.classList.add(...extraClass.split(' '));\n }\n\n return template;\n } // Private\n\n\n _typeCheckConfig(config) {\n super._typeCheckConfig(config);\n\n this._checkContent(config.content);\n }\n\n _checkContent(arg) {\n for (const [selector, content] of Object.entries(arg)) {\n super._typeCheckConfig({\n selector,\n entry: content\n }, DefaultContentType);\n }\n }\n\n _setContent(template, content, selector) {\n const templateElement = SelectorEngine.findOne(selector, template);\n\n if (!templateElement) {\n return;\n }\n\n content = this._resolvePossibleFunction(content);\n\n if (!content) {\n templateElement.remove();\n return;\n }\n\n if (isElement$1(content)) {\n this._putElementInTemplate(getElement(content), templateElement);\n\n return;\n }\n\n if (this._config.html) {\n templateElement.innerHTML = this._maybeSanitize(content);\n return;\n }\n\n templateElement.textContent = content;\n }\n\n _maybeSanitize(arg) {\n return this._config.sanitize ? sanitizeHtml(arg, this._config.allowList, this._config.sanitizeFn) : arg;\n }\n\n _resolvePossibleFunction(arg) {\n return typeof arg === 'function' ? arg(this) : arg;\n }\n\n _putElementInTemplate(element, templateElement) {\n if (this._config.html) {\n templateElement.innerHTML = '';\n templateElement.append(element);\n return;\n }\n\n templateElement.textContent = element.textContent;\n }\n\n }\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): tooltip.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$4 = 'tooltip';\n const DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn']);\n const CLASS_NAME_FADE$2 = 'fade';\n const CLASS_NAME_MODAL = 'modal';\n const CLASS_NAME_SHOW$2 = 'show';\n const SELECTOR_TOOLTIP_INNER = '.tooltip-inner';\n const SELECTOR_MODAL = `.${CLASS_NAME_MODAL}`;\n const EVENT_MODAL_HIDE = 'hide.bs.modal';\n const TRIGGER_HOVER = 'hover';\n const TRIGGER_FOCUS = 'focus';\n const TRIGGER_CLICK = 'click';\n const TRIGGER_MANUAL = 'manual';\n const EVENT_HIDE$2 = 'hide';\n const EVENT_HIDDEN$2 = 'hidden';\n const EVENT_SHOW$2 = 'show';\n const EVENT_SHOWN$2 = 'shown';\n const EVENT_INSERTED = 'inserted';\n const EVENT_CLICK$1 = 'click';\n const EVENT_FOCUSIN$1 = 'focusin';\n const EVENT_FOCUSOUT$1 = 'focusout';\n const EVENT_MOUSEENTER = 'mouseenter';\n const EVENT_MOUSELEAVE = 'mouseleave';\n const AttachmentMap = {\n AUTO: 'auto',\n TOP: 'top',\n RIGHT: isRTL() ? 'left' : 'right',\n BOTTOM: 'bottom',\n LEFT: isRTL() ? 'right' : 'left'\n };\n const Default$3 = {\n allowList: DefaultAllowlist,\n animation: true,\n boundary: 'clippingParents',\n container: false,\n customClass: '',\n delay: 0,\n fallbackPlacements: ['top', 'right', 'bottom', 'left'],\n html: false,\n offset: [0, 0],\n placement: 'top',\n popperConfig: null,\n sanitize: true,\n sanitizeFn: null,\n selector: false,\n template: '<div class=\"tooltip\" role=\"tooltip\">' + '<div class=\"tooltip-arrow\"></div>' + '<div class=\"tooltip-inner\"></div>' + '</div>',\n title: '',\n trigger: 'hover focus'\n };\n const DefaultType$3 = {\n allowList: 'object',\n animation: 'boolean',\n boundary: '(string|element)',\n container: '(string|element|boolean)',\n customClass: '(string|function)',\n delay: '(number|object)',\n fallbackPlacements: 'array',\n html: 'boolean',\n offset: '(array|string|function)',\n placement: '(string|function)',\n popperConfig: '(null|object|function)',\n sanitize: 'boolean',\n sanitizeFn: '(null|function)',\n selector: '(string|boolean)',\n template: 'string',\n title: '(string|element|function)',\n trigger: 'string'\n };\n /**\n * Class definition\n */\n\n class Tooltip extends BaseComponent {\n constructor(element, config) {\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap\\'s tooltips require Popper (https://popper.js.org)');\n }\n\n super(element, config); // Private\n\n this._isEnabled = true;\n this._timeout = 0;\n this._isHovered = null;\n this._activeTrigger = {};\n this._popper = null;\n this._templateFactory = null;\n this._newContent = null; // Protected\n\n this.tip = null;\n\n this._setListeners();\n } // Getters\n\n\n static get Default() {\n return Default$3;\n }\n\n static get DefaultType() {\n return DefaultType$3;\n }\n\n static get NAME() {\n return NAME$4;\n } // Public\n\n\n enable() {\n this._isEnabled = true;\n }\n\n disable() {\n this._isEnabled = false;\n }\n\n toggleEnabled() {\n this._isEnabled = !this._isEnabled;\n }\n\n toggle(event) {\n if (!this._isEnabled) {\n return;\n }\n\n if (event) {\n const context = this._initializeOnDelegatedTarget(event);\n\n context._activeTrigger.click = !context._activeTrigger.click;\n\n if (context._isWithActiveTrigger()) {\n context._enter();\n } else {\n context._leave();\n }\n\n return;\n }\n\n if (this._isShown()) {\n this._leave();\n\n return;\n }\n\n this._enter();\n }\n\n dispose() {\n clearTimeout(this._timeout);\n EventHandler.off(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);\n\n if (this.tip) {\n this.tip.remove();\n }\n\n if (this._config.originalTitle) {\n this._element.setAttribute('title', this._config.originalTitle);\n }\n\n this._disposePopper();\n\n super.dispose();\n }\n\n show() {\n if (this._element.style.display === 'none') {\n throw new Error('Please use show on visible elements');\n }\n\n if (!(this._isWithContent() && this._isEnabled)) {\n return;\n }\n\n const showEvent = EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOW$2));\n const shadowRoot = findShadowRoot(this._element);\n\n const isInTheDom = (shadowRoot || this._element.ownerDocument.documentElement).contains(this._element);\n\n if (showEvent.defaultPrevented || !isInTheDom) {\n return;\n } // todo v6 remove this OR make it optional\n\n\n if (this.tip) {\n this.tip.remove();\n this.tip = null;\n }\n\n const tip = this._getTipElement();\n\n this._element.setAttribute('aria-describedby', tip.getAttribute('id'));\n\n const {\n container\n } = this._config;\n\n if (!this._element.ownerDocument.documentElement.contains(this.tip)) {\n container.append(tip);\n EventHandler.trigger(this._element, this.constructor.eventName(EVENT_INSERTED));\n }\n\n if (this._popper) {\n this._popper.update();\n } else {\n this._popper = this._createPopper(tip);\n }\n\n tip.classList.add(CLASS_NAME_SHOW$2); // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n\n if ('ontouchstart' in document.documentElement) {\n for (const element of [].concat(...document.body.children)) {\n EventHandler.on(element, 'mouseover', noop);\n }\n }\n\n const complete = () => {\n EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOWN$2));\n\n if (this._isHovered === false) {\n this._leave();\n }\n\n this._isHovered = false;\n };\n\n this._queueCallback(complete, this.tip, this._isAnimated());\n }\n\n hide() {\n if (!this._isShown()) {\n return;\n }\n\n const hideEvent = EventHandler.trigger(this._element, this.constructor.eventName(EVENT_HIDE$2));\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n const tip = this._getTipElement();\n\n tip.classList.remove(CLASS_NAME_SHOW$2); // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n\n if ('ontouchstart' in document.documentElement) {\n for (const element of [].concat(...document.body.children)) {\n EventHandler.off(element, 'mouseover', noop);\n }\n }\n\n this._activeTrigger[TRIGGER_CLICK] = false;\n this._activeTrigger[TRIGGER_FOCUS] = false;\n this._activeTrigger[TRIGGER_HOVER] = false;\n this._isHovered = null; // it is a trick to support manual triggering\n\n const complete = () => {\n if (this._isWithActiveTrigger()) {\n return;\n }\n\n if (!this._isHovered) {\n tip.remove();\n }\n\n this._element.removeAttribute('aria-describedby');\n\n EventHandler.trigger(this._element, this.constructor.eventName(EVENT_HIDDEN$2));\n\n this._disposePopper();\n };\n\n this._queueCallback(complete, this.tip, this._isAnimated());\n }\n\n update() {\n if (this._popper) {\n this._popper.update();\n }\n } // Protected\n\n\n _isWithContent() {\n return Boolean(this._getTitle());\n }\n\n _getTipElement() {\n if (!this.tip) {\n this.tip = this._createTipElement(this._newContent || this._getContentForTemplate());\n }\n\n return this.tip;\n }\n\n _createTipElement(content) {\n const tip = this._getTemplateFactory(content).toHtml(); // todo: remove this check on v6\n\n\n if (!tip) {\n return null;\n }\n\n tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$2); // todo: on v6 the following can be achieved with CSS only\n\n tip.classList.add(`bs-${this.constructor.NAME}-auto`);\n const tipId = getUID(this.constructor.NAME).toString();\n tip.setAttribute('id', tipId);\n\n if (this._isAnimated()) {\n tip.classList.add(CLASS_NAME_FADE$2);\n }\n\n return tip;\n }\n\n setContent(content) {\n this._newContent = content;\n\n if (this._isShown()) {\n this._disposePopper();\n\n this.show();\n }\n }\n\n _getTemplateFactory(content) {\n if (this._templateFactory) {\n this._templateFactory.changeContent(content);\n } else {\n this._templateFactory = new TemplateFactory({ ...this._config,\n // the `content` var has to be after `this._config`\n // to override config.content in case of popover\n content,\n extraClass: this._resolvePossibleFunction(this._config.customClass)\n });\n }\n\n return this._templateFactory;\n }\n\n _getContentForTemplate() {\n return {\n [SELECTOR_TOOLTIP_INNER]: this._getTitle()\n };\n }\n\n _getTitle() {\n return this._resolvePossibleFunction(this._config.title) || this._config.originalTitle;\n } // Private\n\n\n _initializeOnDelegatedTarget(event) {\n return this.constructor.getOrCreateInstance(event.delegateTarget, this._getDelegateConfig());\n }\n\n _isAnimated() {\n return this._config.animation || this.tip && this.tip.classList.contains(CLASS_NAME_FADE$2);\n }\n\n _isShown() {\n return this.tip && this.tip.classList.contains(CLASS_NAME_SHOW$2);\n }\n\n _createPopper(tip) {\n const placement = typeof this._config.placement === 'function' ? this._config.placement.call(this, tip, this._element) : this._config.placement;\n const attachment = AttachmentMap[placement.toUpperCase()];\n return createPopper(this._element, tip, this._getPopperConfig(attachment));\n }\n\n _getOffset() {\n const {\n offset\n } = this._config;\n\n if (typeof offset === 'string') {\n return offset.split(',').map(value => Number.parseInt(value, 10));\n }\n\n if (typeof offset === 'function') {\n return popperData => offset(popperData, this._element);\n }\n\n return offset;\n }\n\n _resolvePossibleFunction(arg) {\n return typeof arg === 'function' ? arg.call(this._element) : arg;\n }\n\n _getPopperConfig(attachment) {\n const defaultBsPopperConfig = {\n placement: attachment,\n modifiers: [{\n name: 'flip',\n options: {\n fallbackPlacements: this._config.fallbackPlacements\n }\n }, {\n name: 'offset',\n options: {\n offset: this._getOffset()\n }\n }, {\n name: 'preventOverflow',\n options: {\n boundary: this._config.boundary\n }\n }, {\n name: 'arrow',\n options: {\n element: `.${this.constructor.NAME}-arrow`\n }\n }, {\n name: 'preSetPlacement',\n enabled: true,\n phase: 'beforeMain',\n fn: data => {\n // Pre-set Popper's placement attribute in order to read the arrow sizes properly.\n // Otherwise, Popper mixes up the width and height dimensions since the initial arrow style is for top placement\n this._getTipElement().setAttribute('data-popper-placement', data.state.placement);\n }\n }]\n };\n return { ...defaultBsPopperConfig,\n ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)\n };\n }\n\n _setListeners() {\n const triggers = this._config.trigger.split(' ');\n\n for (const trigger of triggers) {\n if (trigger === 'click') {\n EventHandler.on(this._element, this.constructor.eventName(EVENT_CLICK$1), this._config.selector, event => this.toggle(event));\n } else if (trigger !== TRIGGER_MANUAL) {\n const eventIn = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSEENTER) : this.constructor.eventName(EVENT_FOCUSIN$1);\n const eventOut = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSELEAVE) : this.constructor.eventName(EVENT_FOCUSOUT$1);\n EventHandler.on(this._element, eventIn, this._config.selector, event => {\n const context = this._initializeOnDelegatedTarget(event);\n\n context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;\n\n context._enter();\n });\n EventHandler.on(this._element, eventOut, this._config.selector, event => {\n const context = this._initializeOnDelegatedTarget(event);\n\n context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = context._element.contains(event.relatedTarget);\n\n context._leave();\n });\n }\n }\n\n this._hideModalHandler = () => {\n if (this._element) {\n this.hide();\n }\n };\n\n EventHandler.on(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);\n\n if (this._config.selector) {\n this._config = { ...this._config,\n trigger: 'manual',\n selector: ''\n };\n } else {\n this._fixTitle();\n }\n }\n\n _fixTitle() {\n const title = this._config.originalTitle;\n\n if (!title) {\n return;\n }\n\n if (!this._element.getAttribute('aria-label') && !this._element.textContent.trim()) {\n this._element.setAttribute('aria-label', title);\n }\n\n this._element.removeAttribute('title');\n }\n\n _enter() {\n if (this._isShown() || this._isHovered) {\n this._isHovered = true;\n return;\n }\n\n this._isHovered = true;\n\n this._setTimeout(() => {\n if (this._isHovered) {\n this.show();\n }\n }, this._config.delay.show);\n }\n\n _leave() {\n if (this._isWithActiveTrigger()) {\n return;\n }\n\n this._isHovered = false;\n\n this._setTimeout(() => {\n if (!this._isHovered) {\n this.hide();\n }\n }, this._config.delay.hide);\n }\n\n _setTimeout(handler, timeout) {\n clearTimeout(this._timeout);\n this._timeout = setTimeout(handler, timeout);\n }\n\n _isWithActiveTrigger() {\n return Object.values(this._activeTrigger).includes(true);\n }\n\n _getConfig(config) {\n const dataAttributes = Manipulator.getDataAttributes(this._element);\n\n for (const dataAttribute of Object.keys(dataAttributes)) {\n if (DISALLOWED_ATTRIBUTES.has(dataAttribute)) {\n delete dataAttributes[dataAttribute];\n }\n }\n\n config = { ...dataAttributes,\n ...(typeof config === 'object' && config ? config : {})\n };\n config = this._mergeConfigObj(config);\n config = this._configAfterMerge(config);\n\n this._typeCheckConfig(config);\n\n return config;\n }\n\n _configAfterMerge(config) {\n config.container = config.container === false ? document.body : getElement(config.container);\n\n if (typeof config.delay === 'number') {\n config.delay = {\n show: config.delay,\n hide: config.delay\n };\n }\n\n config.originalTitle = this._element.getAttribute('title') || '';\n\n if (typeof config.title === 'number') {\n config.title = config.title.toString();\n }\n\n if (typeof config.content === 'number') {\n config.content = config.content.toString();\n }\n\n return config;\n }\n\n _getDelegateConfig() {\n const config = {};\n\n for (const key in this._config) {\n if (this.constructor.Default[key] !== this._config[key]) {\n config[key] = this._config[key];\n }\n } // In the future can be replaced with:\n // const keysWithDifferentValues = Object.entries(this._config).filter(entry => this.constructor.Default[entry[0]] !== this._config[entry[0]])\n // `Object.fromEntries(keysWithDifferentValues)`\n\n\n return config;\n }\n\n _disposePopper() {\n if (this._popper) {\n this._popper.destroy();\n\n this._popper = null;\n }\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Tooltip.getOrCreateInstance(this, config);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n });\n }\n\n }\n /**\n * jQuery\n */\n\n\n defineJQueryPlugin(Tooltip);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): popover.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$3 = 'popover';\n const SELECTOR_TITLE = '.popover-header';\n const SELECTOR_CONTENT = '.popover-body';\n const Default$2 = { ...Tooltip.Default,\n content: '',\n offset: [0, 8],\n placement: 'right',\n template: '<div class=\"popover\" role=\"tooltip\">' + '<div class=\"popover-arrow\"></div>' + '<h3 class=\"popover-header\"></h3>' + '<div class=\"popover-body\"></div>' + '</div>',\n trigger: 'click'\n };\n const DefaultType$2 = { ...Tooltip.DefaultType,\n content: '(null|string|element|function)'\n };\n /**\n * Class definition\n */\n\n class Popover extends Tooltip {\n // Getters\n static get Default() {\n return Default$2;\n }\n\n static get DefaultType() {\n return DefaultType$2;\n }\n\n static get NAME() {\n return NAME$3;\n } // Overrides\n\n\n _isWithContent() {\n return this._getTitle() || this._getContent();\n } // Private\n\n\n _getContentForTemplate() {\n return {\n [SELECTOR_TITLE]: this._getTitle(),\n [SELECTOR_CONTENT]: this._getContent()\n };\n }\n\n _getContent() {\n return this._resolvePossibleFunction(this._config.content);\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Popover.getOrCreateInstance(this, config);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n });\n }\n\n }\n /**\n * jQuery\n */\n\n\n defineJQueryPlugin(Popover);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): scrollspy.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$2 = 'scrollspy';\n const DATA_KEY$2 = 'bs.scrollspy';\n const EVENT_KEY$2 = `.${DATA_KEY$2}`;\n const DATA_API_KEY = '.data-api';\n const EVENT_ACTIVATE = `activate${EVENT_KEY$2}`;\n const EVENT_CLICK = `click${EVENT_KEY$2}`;\n const EVENT_LOAD_DATA_API$1 = `load${EVENT_KEY$2}${DATA_API_KEY}`;\n const CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item';\n const CLASS_NAME_ACTIVE$1 = 'active';\n const SELECTOR_DATA_SPY = '[data-bs-spy=\"scroll\"]';\n const SELECTOR_TARGET_LINKS = '[href]';\n const SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';\n const SELECTOR_NAV_LINKS = '.nav-link';\n const SELECTOR_NAV_ITEMS = '.nav-item';\n const SELECTOR_LIST_ITEMS = '.list-group-item';\n const SELECTOR_LINK_ITEMS = `${SELECTOR_NAV_LINKS}, ${SELECTOR_NAV_ITEMS} > ${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}`;\n const SELECTOR_DROPDOWN = '.dropdown';\n const SELECTOR_DROPDOWN_TOGGLE$1 = '.dropdown-toggle';\n const Default$1 = {\n offset: null,\n // TODO: v6 @deprecated, keep it for backwards compatibility reasons\n rootMargin: '0px 0px -25%',\n smoothScroll: false,\n target: null,\n threshold: [0.1, 0.5, 1]\n };\n const DefaultType$1 = {\n offset: '(number|null)',\n // TODO v6 @deprecated, keep it for backwards compatibility reasons\n rootMargin: 'string',\n smoothScroll: 'boolean',\n target: 'element',\n threshold: 'array'\n };\n /**\n * Class definition\n */\n\n class ScrollSpy extends BaseComponent {\n constructor(element, config) {\n super(element, config); // this._element is the observablesContainer and config.target the menu links wrapper\n\n this._targetLinks = new Map();\n this._observableSections = new Map();\n this._rootElement = getComputedStyle(this._element).overflowY === 'visible' ? null : this._element;\n this._activeTarget = null;\n this._observer = null;\n this._previousScrollData = {\n visibleEntryTop: 0,\n parentScrollTop: 0\n };\n this.refresh(); // initialize\n } // Getters\n\n\n static get Default() {\n return Default$1;\n }\n\n static get DefaultType() {\n return DefaultType$1;\n }\n\n static get NAME() {\n return NAME$2;\n } // Public\n\n\n refresh() {\n this._initializeTargetsAndObservables();\n\n this._maybeEnableSmoothScroll();\n\n if (this._observer) {\n this._observer.disconnect();\n } else {\n this._observer = this._getNewObserver();\n }\n\n for (const section of this._observableSections.values()) {\n this._observer.observe(section);\n }\n }\n\n dispose() {\n this._observer.disconnect();\n\n super.dispose();\n } // Private\n\n\n _configAfterMerge(config) {\n // TODO: on v6 target should be given explicitly & remove the {target: 'ss-target'} case\n config.target = getElement(config.target) || document.body; // TODO: v6 Only for backwards compatibility reasons. Use rootMargin only\n\n config.rootMargin = config.offset ? `${config.offset}px 0px -30%` : config.rootMargin;\n\n if (typeof config.threshold === 'string') {\n config.threshold = config.threshold.split(',').map(value => Number.parseFloat(value));\n }\n\n return config;\n }\n\n _maybeEnableSmoothScroll() {\n if (!this._config.smoothScroll) {\n return;\n } // unregister any previous listeners\n\n\n EventHandler.off(this._config.target, EVENT_CLICK);\n EventHandler.on(this._config.target, EVENT_CLICK, SELECTOR_TARGET_LINKS, event => {\n const observableSection = this._observableSections.get(event.target.hash);\n\n if (observableSection) {\n event.preventDefault();\n const root = this._rootElement || window;\n const height = observableSection.offsetTop - this._element.offsetTop;\n\n if (root.scrollTo) {\n root.scrollTo({\n top: height,\n behavior: 'smooth'\n });\n return;\n } // Chrome 60 doesn't support `scrollTo`\n\n\n root.scrollTop = height;\n }\n });\n }\n\n _getNewObserver() {\n const options = {\n root: this._rootElement,\n threshold: this._config.threshold,\n rootMargin: this._config.rootMargin\n };\n return new IntersectionObserver(entries => this._observerCallback(entries), options);\n } // The logic of selection\n\n\n _observerCallback(entries) {\n const targetElement = entry => this._targetLinks.get(`#${entry.target.id}`);\n\n const activate = entry => {\n this._previousScrollData.visibleEntryTop = entry.target.offsetTop;\n\n this._process(targetElement(entry));\n };\n\n const parentScrollTop = (this._rootElement || document.documentElement).scrollTop;\n const userScrollsDown = parentScrollTop >= this._previousScrollData.parentScrollTop;\n this._previousScrollData.parentScrollTop = parentScrollTop;\n\n for (const entry of entries) {\n if (!entry.isIntersecting) {\n this._activeTarget = null;\n\n this._clearActiveClass(targetElement(entry));\n\n continue;\n }\n\n const entryIsLowerThanPrevious = entry.target.offsetTop >= this._previousScrollData.visibleEntryTop; // if we are scrolling down, pick the bigger offsetTop\n\n if (userScrollsDown && entryIsLowerThanPrevious) {\n activate(entry); // if parent isn't scrolled, let's keep the first visible item, breaking the iteration\n\n if (!parentScrollTop) {\n return;\n }\n\n continue;\n } // if we are scrolling up, pick the smallest offsetTop\n\n\n if (!userScrollsDown && !entryIsLowerThanPrevious) {\n activate(entry);\n }\n }\n }\n\n _initializeTargetsAndObservables() {\n this._targetLinks = new Map();\n this._observableSections = new Map();\n const targetLinks = SelectorEngine.find(SELECTOR_TARGET_LINKS, this._config.target);\n\n for (const anchor of targetLinks) {\n // ensure that the anchor has an id and is not disabled\n if (!anchor.hash || isDisabled(anchor)) {\n continue;\n }\n\n const observableSection = SelectorEngine.findOne(anchor.hash, this._element); // ensure that the observableSection exists & is visible\n\n if (isVisible(observableSection)) {\n this._targetLinks.set(anchor.hash, anchor);\n\n this._observableSections.set(anchor.hash, observableSection);\n }\n }\n }\n\n _process(target) {\n if (this._activeTarget === target) {\n return;\n }\n\n this._clearActiveClass(this._config.target);\n\n this._activeTarget = target;\n target.classList.add(CLASS_NAME_ACTIVE$1);\n\n this._activateParents(target);\n\n EventHandler.trigger(this._element, EVENT_ACTIVATE, {\n relatedTarget: target\n });\n }\n\n _activateParents(target) {\n // Activate dropdown parents\n if (target.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {\n SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE$1, target.closest(SELECTOR_DROPDOWN)).classList.add(CLASS_NAME_ACTIVE$1);\n return;\n }\n\n for (const listGroup of SelectorEngine.parents(target, SELECTOR_NAV_LIST_GROUP)) {\n // Set triggered links parents as active\n // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor\n for (const item of SelectorEngine.prev(listGroup, SELECTOR_LINK_ITEMS)) {\n item.classList.add(CLASS_NAME_ACTIVE$1);\n }\n }\n }\n\n _clearActiveClass(parent) {\n parent.classList.remove(CLASS_NAME_ACTIVE$1);\n const activeNodes = SelectorEngine.find(`${SELECTOR_TARGET_LINKS}.${CLASS_NAME_ACTIVE$1}`, parent);\n\n for (const node of activeNodes) {\n node.classList.remove(CLASS_NAME_ACTIVE$1);\n }\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = ScrollSpy.getOrCreateInstance(this, config);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n });\n }\n\n }\n /**\n * Data API implementation\n */\n\n\n EventHandler.on(window, EVENT_LOAD_DATA_API$1, () => {\n for (const spy of SelectorEngine.find(SELECTOR_DATA_SPY)) {\n ScrollSpy.getOrCreateInstance(spy);\n }\n });\n /**\n * jQuery\n */\n\n defineJQueryPlugin(ScrollSpy);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): tab.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$1 = 'tab';\n const DATA_KEY$1 = 'bs.tab';\n const EVENT_KEY$1 = `.${DATA_KEY$1}`;\n const EVENT_HIDE$1 = `hide${EVENT_KEY$1}`;\n const EVENT_HIDDEN$1 = `hidden${EVENT_KEY$1}`;\n const EVENT_SHOW$1 = `show${EVENT_KEY$1}`;\n const EVENT_SHOWN$1 = `shown${EVENT_KEY$1}`;\n const EVENT_CLICK_DATA_API = `click${EVENT_KEY$1}`;\n const EVENT_KEYDOWN = `keydown${EVENT_KEY$1}`;\n const EVENT_LOAD_DATA_API = `load${EVENT_KEY$1}`;\n const ARROW_LEFT_KEY = 'ArrowLeft';\n const ARROW_RIGHT_KEY = 'ArrowRight';\n const ARROW_UP_KEY = 'ArrowUp';\n const ARROW_DOWN_KEY = 'ArrowDown';\n const CLASS_NAME_ACTIVE = 'active';\n const CLASS_NAME_FADE$1 = 'fade';\n const CLASS_NAME_SHOW$1 = 'show';\n const CLASS_DROPDOWN = 'dropdown';\n const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';\n const SELECTOR_DROPDOWN_MENU = '.dropdown-menu';\n const SELECTOR_DROPDOWN_ITEM = '.dropdown-item';\n const NOT_SELECTOR_DROPDOWN_TOGGLE = ':not(.dropdown-toggle)';\n const SELECTOR_TAB_PANEL = '.list-group, .nav, [role=\"tablist\"]';\n const SELECTOR_OUTER = '.nav-item, .list-group-item';\n const SELECTOR_INNER = `.nav-link${NOT_SELECTOR_DROPDOWN_TOGGLE}, .list-group-item${NOT_SELECTOR_DROPDOWN_TOGGLE}, [role=\"tab\"]${NOT_SELECTOR_DROPDOWN_TOGGLE}`;\n const SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"tab\"], [data-bs-toggle=\"pill\"], [data-bs-toggle=\"list\"]'; // todo:v6: could be only `tab`\n\n const SELECTOR_INNER_ELEM = `${SELECTOR_INNER}, ${SELECTOR_DATA_TOGGLE}`;\n const SELECTOR_DATA_TOGGLE_ACTIVE = `.${CLASS_NAME_ACTIVE}[data-bs-toggle=\"tab\"], .${CLASS_NAME_ACTIVE}[data-bs-toggle=\"pill\"], .${CLASS_NAME_ACTIVE}[data-bs-toggle=\"list\"]`;\n /**\n * Class definition\n */\n\n class Tab extends BaseComponent {\n constructor(element) {\n super(element);\n this._parent = this._element.closest(SELECTOR_TAB_PANEL);\n\n if (!this._parent) {\n return; // todo: should Throw exception on v6\n // throw new TypeError(`${element.outerHTML} has not a valid parent ${SELECTOR_INNER_ELEM}`)\n } // Set up initial aria attributes\n\n\n this._setInitialAttributes(this._parent, this._getChildren());\n\n EventHandler.on(this._element, EVENT_KEYDOWN, event => this._keydown(event));\n } // Getters\n\n\n static get NAME() {\n return NAME$1;\n } // Public\n\n\n show() {\n // Shows this elem and deactivate the active sibling if exists\n const innerElem = this._element;\n\n if (this._elemIsActive(innerElem)) {\n return;\n } // Search for active tab on same parent to deactivate it\n\n\n const active = this._getActiveElem();\n\n const hideEvent = active ? EventHandler.trigger(active, EVENT_HIDE$1, {\n relatedTarget: innerElem\n }) : null;\n const showEvent = EventHandler.trigger(innerElem, EVENT_SHOW$1, {\n relatedTarget: active\n });\n\n if (showEvent.defaultPrevented || hideEvent && hideEvent.defaultPrevented) {\n return;\n }\n\n this._deactivate(active, innerElem);\n\n this._activate(innerElem, active);\n } // Private\n\n\n _activate(element, relatedElem) {\n if (!element) {\n return;\n }\n\n element.classList.add(CLASS_NAME_ACTIVE);\n\n this._activate(getElementFromSelector(element)); // Search and activate/show the proper section\n\n\n const complete = () => {\n if (element.getAttribute('role') !== 'tab') {\n element.classList.add(CLASS_NAME_SHOW$1);\n return;\n }\n\n element.focus();\n element.removeAttribute('tabindex');\n element.setAttribute('aria-selected', true);\n\n this._toggleDropDown(element, true);\n\n EventHandler.trigger(element, EVENT_SHOWN$1, {\n relatedTarget: relatedElem\n });\n };\n\n this._queueCallback(complete, element, element.classList.contains(CLASS_NAME_FADE$1));\n }\n\n _deactivate(element, relatedElem) {\n if (!element) {\n return;\n }\n\n element.classList.remove(CLASS_NAME_ACTIVE);\n element.blur();\n\n this._deactivate(getElementFromSelector(element)); // Search and deactivate the shown section too\n\n\n const complete = () => {\n if (element.getAttribute('role') !== 'tab') {\n element.classList.remove(CLASS_NAME_SHOW$1);\n return;\n }\n\n element.setAttribute('aria-selected', false);\n element.setAttribute('tabindex', '-1');\n\n this._toggleDropDown(element, false);\n\n EventHandler.trigger(element, EVENT_HIDDEN$1, {\n relatedTarget: relatedElem\n });\n };\n\n this._queueCallback(complete, element, element.classList.contains(CLASS_NAME_FADE$1));\n }\n\n _keydown(event) {\n if (![ARROW_LEFT_KEY, ARROW_RIGHT_KEY, ARROW_UP_KEY, ARROW_DOWN_KEY].includes(event.key)) {\n return;\n }\n\n event.stopPropagation(); // stopPropagation/preventDefault both added to support up/down keys without scrolling the page\n\n event.preventDefault();\n const isNext = [ARROW_RIGHT_KEY, ARROW_DOWN_KEY].includes(event.key);\n const nextActiveElement = getNextActiveElement(this._getChildren().filter(element => !isDisabled(element)), event.target, isNext, true);\n\n if (nextActiveElement) {\n Tab.getOrCreateInstance(nextActiveElement).show();\n }\n }\n\n _getChildren() {\n // collection of inner elements\n return SelectorEngine.find(SELECTOR_INNER_ELEM, this._parent);\n }\n\n _getActiveElem() {\n return this._getChildren().find(child => this._elemIsActive(child)) || null;\n }\n\n _setInitialAttributes(parent, children) {\n this._setAttributeIfNotExists(parent, 'role', 'tablist');\n\n for (const child of children) {\n this._setInitialAttributesOnChild(child);\n }\n }\n\n _setInitialAttributesOnChild(child) {\n child = this._getInnerElement(child);\n\n const isActive = this._elemIsActive(child);\n\n const outerElem = this._getOuterElement(child);\n\n child.setAttribute('aria-selected', isActive);\n\n if (outerElem !== child) {\n this._setAttributeIfNotExists(outerElem, 'role', 'presentation');\n }\n\n if (!isActive) {\n child.setAttribute('tabindex', '-1');\n }\n\n this._setAttributeIfNotExists(child, 'role', 'tab'); // set attributes to the related panel too\n\n\n this._setInitialAttributesOnTargetPanel(child);\n }\n\n _setInitialAttributesOnTargetPanel(child) {\n const target = getElementFromSelector(child);\n\n if (!target) {\n return;\n }\n\n this._setAttributeIfNotExists(target, 'role', 'tabpanel');\n\n if (child.id) {\n this._setAttributeIfNotExists(target, 'aria-labelledby', `#${child.id}`);\n }\n }\n\n _toggleDropDown(element, open) {\n const outerElem = this._getOuterElement(element);\n\n if (!outerElem.classList.contains(CLASS_DROPDOWN)) {\n return;\n }\n\n const toggle = (selector, className) => {\n const element = SelectorEngine.findOne(selector, outerElem);\n\n if (element) {\n element.classList.toggle(className, open);\n }\n };\n\n toggle(SELECTOR_DROPDOWN_TOGGLE, CLASS_NAME_ACTIVE);\n toggle(SELECTOR_DROPDOWN_MENU, CLASS_NAME_SHOW$1);\n toggle(SELECTOR_DROPDOWN_ITEM, CLASS_NAME_ACTIVE);\n outerElem.setAttribute('aria-expanded', open);\n }\n\n _setAttributeIfNotExists(element, attribute, value) {\n if (!element.hasAttribute(attribute)) {\n element.setAttribute(attribute, value);\n }\n }\n\n _elemIsActive(elem) {\n return elem.classList.contains(CLASS_NAME_ACTIVE);\n } // Try to get the inner element (usually the .nav-link)\n\n\n _getInnerElement(elem) {\n return elem.matches(SELECTOR_INNER_ELEM) ? elem : SelectorEngine.findOne(SELECTOR_INNER_ELEM, elem);\n } // Try to get the outer element (usually the .nav-item)\n\n\n _getOuterElement(elem) {\n return elem.closest(SELECTOR_OUTER) || elem;\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Tab.getOrCreateInstance(this);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n });\n }\n\n }\n /**\n * Data API implementation\n */\n\n\n EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault();\n }\n\n if (isDisabled(this)) {\n return;\n }\n\n Tab.getOrCreateInstance(this).show();\n });\n /**\n * Initialize on focus\n */\n\n EventHandler.on(window, EVENT_LOAD_DATA_API, () => {\n for (const element of SelectorEngine.find(SELECTOR_DATA_TOGGLE_ACTIVE)) {\n Tab.getOrCreateInstance(element);\n }\n });\n /**\n * jQuery\n */\n\n defineJQueryPlugin(Tab);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): toast.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME = 'toast';\n const DATA_KEY = 'bs.toast';\n const EVENT_KEY = `.${DATA_KEY}`;\n const EVENT_MOUSEOVER = `mouseover${EVENT_KEY}`;\n const EVENT_MOUSEOUT = `mouseout${EVENT_KEY}`;\n const EVENT_FOCUSIN = `focusin${EVENT_KEY}`;\n const EVENT_FOCUSOUT = `focusout${EVENT_KEY}`;\n const EVENT_HIDE = `hide${EVENT_KEY}`;\n const EVENT_HIDDEN = `hidden${EVENT_KEY}`;\n const EVENT_SHOW = `show${EVENT_KEY}`;\n const EVENT_SHOWN = `shown${EVENT_KEY}`;\n const CLASS_NAME_FADE = 'fade';\n const CLASS_NAME_HIDE = 'hide'; // @deprecated - kept here only for backwards compatibility\n\n const CLASS_NAME_SHOW = 'show';\n const CLASS_NAME_SHOWING = 'showing';\n const DefaultType = {\n animation: 'boolean',\n autohide: 'boolean',\n delay: 'number'\n };\n const Default = {\n animation: true,\n autohide: true,\n delay: 5000\n };\n /**\n * Class definition\n */\n\n class Toast extends BaseComponent {\n constructor(element, config) {\n super(element, config);\n this._timeout = null;\n this._hasMouseInteraction = false;\n this._hasKeyboardInteraction = false;\n\n this._setListeners();\n } // Getters\n\n\n static get Default() {\n return Default;\n }\n\n static get DefaultType() {\n return DefaultType;\n }\n\n static get NAME() {\n return NAME;\n } // Public\n\n\n show() {\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW);\n\n if (showEvent.defaultPrevented) {\n return;\n }\n\n this._clearTimeout();\n\n if (this._config.animation) {\n this._element.classList.add(CLASS_NAME_FADE);\n }\n\n const complete = () => {\n this._element.classList.remove(CLASS_NAME_SHOWING);\n\n EventHandler.trigger(this._element, EVENT_SHOWN);\n\n this._maybeScheduleHide();\n };\n\n this._element.classList.remove(CLASS_NAME_HIDE); // @deprecated\n\n\n reflow(this._element);\n\n this._element.classList.add(CLASS_NAME_SHOW, CLASS_NAME_SHOWING);\n\n this._queueCallback(complete, this._element, this._config.animation);\n }\n\n hide() {\n if (!this.isShown()) {\n return;\n }\n\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE);\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n const complete = () => {\n this._element.classList.add(CLASS_NAME_HIDE); // @deprecated\n\n\n this._element.classList.remove(CLASS_NAME_SHOWING, CLASS_NAME_SHOW);\n\n EventHandler.trigger(this._element, EVENT_HIDDEN);\n };\n\n this._element.classList.add(CLASS_NAME_SHOWING);\n\n this._queueCallback(complete, this._element, this._config.animation);\n }\n\n dispose() {\n this._clearTimeout();\n\n if (this.isShown()) {\n this._element.classList.remove(CLASS_NAME_SHOW);\n }\n\n super.dispose();\n }\n\n isShown() {\n return this._element.classList.contains(CLASS_NAME_SHOW);\n } // Private\n\n\n _maybeScheduleHide() {\n if (!this._config.autohide) {\n return;\n }\n\n if (this._hasMouseInteraction || this._hasKeyboardInteraction) {\n return;\n }\n\n this._timeout = setTimeout(() => {\n this.hide();\n }, this._config.delay);\n }\n\n _onInteraction(event, isInteracting) {\n switch (event.type) {\n case 'mouseover':\n case 'mouseout':\n this._hasMouseInteraction = isInteracting;\n break;\n\n case 'focusin':\n case 'focusout':\n this._hasKeyboardInteraction = isInteracting;\n break;\n }\n\n if (isInteracting) {\n this._clearTimeout();\n\n return;\n }\n\n const nextElement = event.relatedTarget;\n\n if (this._element === nextElement || this._element.contains(nextElement)) {\n return;\n }\n\n this._maybeScheduleHide();\n }\n\n _setListeners() {\n EventHandler.on(this._element, EVENT_MOUSEOVER, event => this._onInteraction(event, true));\n EventHandler.on(this._element, EVENT_MOUSEOUT, event => this._onInteraction(event, false));\n EventHandler.on(this._element, EVENT_FOCUSIN, event => this._onInteraction(event, true));\n EventHandler.on(this._element, EVENT_FOCUSOUT, event => this._onInteraction(event, false));\n }\n\n _clearTimeout() {\n clearTimeout(this._timeout);\n this._timeout = null;\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Toast.getOrCreateInstance(this, config);\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config](this);\n }\n });\n }\n\n }\n /**\n * Data API implementation\n */\n\n\n enableDismissTrigger(Toast);\n /**\n * jQuery\n */\n\n defineJQueryPlugin(Toast);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): index.umd.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n const index_umd = {\n Alert,\n Button,\n Carousel,\n Collapse,\n Dropdown,\n Modal,\n Offcanvas,\n Popover,\n ScrollSpy,\n Tab,\n Toast,\n Tooltip\n };\n\n return index_umd;\n\n}));\n//# sourceMappingURL=bootstrap.bundle.js.map\n","import { noop, safe_not_equal, subscribe, run_all, is_function } from '../internal/index.mjs';\nexport { get_store_value as get } from '../internal/index.mjs';\n\nconst subscriber_queue = [];\n/**\n * Creates a `Readable` store that allows reading by subscription.\n * @param value initial value\n * @param {StartStopNotifier}start start and stop notifications for subscriptions\n */\nfunction readable(value, start) {\n return {\n subscribe: writable(value, start).subscribe\n };\n}\n/**\n * Create a `Writable` store that allows both updating and reading by subscription.\n * @param {*=}value initial value\n * @param {StartStopNotifier=}start start and stop notifications for subscriptions\n */\nfunction writable(value, start = noop) {\n let stop;\n const subscribers = new Set();\n function set(new_value) {\n if (safe_not_equal(value, new_value)) {\n value = new_value;\n if (stop) { // store is ready\n const run_queue = !subscriber_queue.length;\n for (const subscriber of subscribers) {\n subscriber[1]();\n subscriber_queue.push(subscriber, value);\n }\n if (run_queue) {\n for (let i = 0; i < subscriber_queue.length; i += 2) {\n subscriber_queue[i][0](subscriber_queue[i + 1]);\n }\n subscriber_queue.length = 0;\n }\n }\n }\n }\n function update(fn) {\n set(fn(value));\n }\n function subscribe(run, invalidate = noop) {\n const subscriber = [run, invalidate];\n subscribers.add(subscriber);\n if (subscribers.size === 1) {\n stop = start(set) || noop;\n }\n run(value);\n return () => {\n subscribers.delete(subscriber);\n if (subscribers.size === 0) {\n stop();\n stop = null;\n }\n };\n }\n return { set, update, subscribe };\n}\nfunction derived(stores, fn, initial_value) {\n const single = !Array.isArray(stores);\n const stores_array = single\n ? [stores]\n : stores;\n const auto = fn.length < 2;\n return readable(initial_value, (set) => {\n let inited = false;\n const values = [];\n let pending = 0;\n let cleanup = noop;\n const sync = () => {\n if (pending) {\n return;\n }\n cleanup();\n const result = fn(single ? values[0] : values, set);\n if (auto) {\n set(result);\n }\n else {\n cleanup = is_function(result) ? result : noop;\n }\n };\n const unsubscribers = stores_array.map((store, i) => subscribe(store, (value) => {\n values[i] = value;\n pending &= ~(1 << i);\n if (inited) {\n sync();\n }\n }, () => {\n pending |= (1 << i);\n }));\n inited = true;\n sync();\n return function stop() {\n run_all(unsubscribers);\n cleanup();\n };\n });\n}\n\nexport { derived, readable, writable };\n","import { writable } from 'svelte/store';\n\nexport const map_store = writable();\nexport const results_store = writable();\nexport const last_api_request_url_store = writable();\nexport const error_store = writable();\nexport const page = writable();\n\n/**\n * Update the global page state.\n *\n * When called without a parameter, then the current window.location is\n * parsed and the page state is set accordingly. Otherwise the page state\n * is set from the parameters. 'pagename' is the overall subpage (without\n * .html extension). 'params' must be an URLSearchParams object and contain\n * the requested query parameters. It may also be omitted completely for a\n * link without query parameters.\n */\nconst default_pagename = Nominatim_Config.Reverse_Only ? 'reverse' : 'search';\nconst pagenames = [\n default_pagename,\n 'reverse',\n 'details',\n 'deletable',\n 'polygons',\n 'status',\n 'about'\n];\n\nexport function refresh_page(pagename, params) {\n if (typeof pagename === 'undefined') {\n pagename = window.location.pathname.replace('.html', '').replace(/^.*\\//, '');\n\n if (!pagenames.includes(pagename)) pagename = default_pagename;\n\n params = new URLSearchParams(window.location.search);\n } else {\n if (!pagenames.includes(pagename)) pagename = default_pagename;\n\n if (typeof params === 'undefined') {\n params = new URLSearchParams();\n }\n\n let param_str = params.toString();\n if (param_str) {\n param_str = '?' + param_str;\n }\n let new_url = pagename + '.html' + param_str;\n\n if (window.location.protocol.match(/^http/)) {\n window.history.pushState([], '', new_url);\n } else {\n window.location.href = new_url;\n }\n }\n\n page.set({ tab: pagename, params: params });\n last_api_request_url_store.set(null);\n error_store.set(null);\n}\n","<style>\n footer {\n clear: both;\n font-size: 0.8em;\n text-align: center;\n }\n footer p {\n margin: 1em;\n }\n</style>\n\n<footer>\n <p class=\"disclaimer\">\n Addresses and postcodes are approximate\n </p>\n <p class=\"copyright\">\n © <a href=\"https://osm.org/copyright\">OpenStreetMap</a> contributors\n </p>\n</footer>\n","import { last_api_request_url_store, error_store } from './stores.js';\n\nfunction api_request_progress(status) {\n var loading_el = document.getElementById('loading');\n if (!loading_el) return; // might not be on page yet\n\n loading_el.style.display = (status === 'start') ? 'block' : null;\n}\n\nexport async function fetch_from_api(endpoint_name, params, callback) {\n var api_url = generate_nominatim_api_url(endpoint_name, params);\n\n // For the test suite:\n // If httpbin_status URL parameter is set we call https://httpbin.org/#/Status_codes\n var tmp_params = new URLSearchParams(window.location.search);\n if (tmp_params && tmp_params.get('httpbin_status')) {\n api_url = 'https://httpbin.org/status/' + parseInt(tmp_params.get('httpbin_status'), 10);\n }\n\n api_request_progress('start');\n if (endpoint_name !== 'status') last_api_request_url_store.set(null);\n\n try {\n await fetch(api_url, { headers: Nominatim_Config.Nominatim_API_Endpoint_Headers || {} })\n .then(async (response) => {\n if (!((response.status >= 200 && response.status < 300) || response.status === 404)) {\n error_store.set(`Error fetching data from ${api_url} (${response.statusText})`);\n return undefined;\n }\n\n // Parse JSON here instead of returning a promise so we can catch possible\n // errors.\n var data;\n try {\n data = await response.json();\n } catch (err) {\n // e.g. 'JSON.parse: unexpected non-whitespace character after JSON data at line 1'\n error_store.set(`Error parsing JSON data from ${api_url} (${err})`);\n return undefined;\n }\n return data;\n })\n .then((data) => {\n if (data) {\n if (data.error) {\n error_store.set(data.error.message);\n }\n callback(data);\n }\n api_request_progress('finish');\n });\n } catch (error) {\n error_store.set(`Error fetching data from ${api_url} (${error})`);\n api_request_progress('finish');\n }\n\n if (endpoint_name !== 'status') last_api_request_url_store.set(api_url);\n}\n\nvar fetch_content_cache = {};\nexport async function fetch_content_into_element(url, dom_element) {\n if (!window.location.protocol.match(/^http/)) {\n dom_element.innerHTML = `Cannot display data from ${url} here. `\n + 'Browser security prevents loading content from file:// URLs.';\n return;\n }\n\n if (fetch_content_cache[url]) {\n dom_element.innerHTML = fetch_content_cache[url];\n return;\n }\n try {\n await fetch(url)\n .then(response => response.text())\n .then(html => {\n html = html.replace('Nominatim_API_Endpoint', generate_nominatim_endpoint_url());\n dom_element.innerHTML = html;\n fetch_content_cache[url] = html;\n });\n } catch (error) {\n dom_element.innerHTML = `Error fetching content from ${url} (${error})`;\n }\n}\n\nfunction generate_nominatim_endpoint_url(endpoint_name) {\n var conf_endpoint = Nominatim_Config.Nominatim_API_Endpoint;\n\n if (typeof conf_endpoint === 'function') {\n return conf_endpoint(endpoint_name);\n }\n\n if (!endpoint_name) return conf_endpoint;\n\n return conf_endpoint + endpoint_name + '.php';\n}\n\nfunction generate_nominatim_api_url(endpoint_name, params) {\n // default value for /search\n if (params.dedupe === 1) delete params.dedupe;\n\n extend_parameters(params, Nominatim_Config.Nominatim_API_Endpoint_Params);\n return generate_nominatim_endpoint_url(endpoint_name)\n + '?'\n + Object.keys(clean_up_parameters(params)).map((k) => {\n return encodeURIComponent(k) + '=' + encodeURIComponent(params[k]);\n }).join('&');\n}\n\nfunction extend_parameters(params, params2) {\n var param_names = Object.keys(params2);\n for (var i = 0; i < param_names.length; i += 1) {\n params[param_names[i]] = params2[param_names[i]];\n }\n}\n\nfunction clean_up_parameters(params) {\n // `&a=&b=&c=1` => '&c=1'\n var param_names = Object.keys(params);\n for (var i = 0; i < param_names.length; i += 1) {\n var val = params[param_names[i]];\n if (typeof (val) === 'undefined' || val === '' || val === null) {\n delete params[param_names[i]];\n }\n }\n return params;\n}\n\nexport function update_html_title(title) {\n document.title = [title, Nominatim_Config.Page_Title]\n .filter((val) => val && val.length > 1)\n .join(' | ');\n}\n\n","<script>\n import { refresh_page } from '../lib/stores.js';\n\n export let page;\n export let params_hash = {};\n export let extra_classes = '';\n let href = page + '.html';\n\n function handleClick() {\n refresh_page(page, new URLSearchParams(params_hash));\n }\n\n $: {\n let param_str = new URLSearchParams(params_hash).toString();\n href = page + '.html' + (param_str ? '?' : '') + param_str;\n }\n</script>\n\n<a on:click|preventDefault|stopPropagation={handleClick} href={href} class={extra_classes}><slot></slot></a>\n","<script>\nimport { refresh_page } from '../lib/stores.js';\n\nexport let lat = null;\nexport let lon = null;\nexport let zoom = null;\nexport let extra_classes = '';\n\nlet params = new URLSearchParams();\nlet href = 'reverse.html';\n\n$: {\n let new_params = new URLSearchParams();\n\n if (lat && lon) {\n new_params.set('lat', lat);\n new_params.set('lon', lon);\n\n if (zoom) {\n new_params.set('zoom', zoom);\n }\n }\n\n params = new_params;\n}\n\n$: {\n let param_str = params.toString();\n href = 'reverse.html' + (param_str ? '?' : '') + param_str;\n}\n</script>\n\n<a on:click|preventDefault|stopPropagation={() => refresh_page('reverse', params)} href={href} class={extra_classes}><slot></slot></a>\n","var EN_US = ['second', 'minute', 'hour', 'day', 'week', 'month', 'year'];\nexport default function (diff, idx) {\n if (idx === 0)\n return ['just now', 'right now'];\n var unit = EN_US[Math.floor(idx / 2)];\n if (diff > 1)\n unit += 's';\n return [diff + \" \" + unit + \" ago\", \"in \" + diff + \" \" + unit];\n}\n//# sourceMappingURL=en_US.js.map","var ZH_CN = ['秒', '分钟', '小时', '天', '周', '个月', '年'];\nexport default function (diff, idx) {\n if (idx === 0)\n return ['刚刚', '片刻后'];\n var unit = ZH_CN[~~(idx / 2)];\n return [diff + \" \" + unit + \"\\u524D\", diff + \" \" + unit + \"\\u540E\"];\n}\n//# sourceMappingURL=zh_CN.js.map","/**\n * Created by hustcc on 18/5/20.\n * Contract: i@hust.cc\n */\n/**\n * All supported locales\n */\nvar Locales = {};\n/**\n * register a locale\n * @param locale\n * @param func\n */\nexport var register = function (locale, func) {\n Locales[locale] = func;\n};\n/**\n * get a locale, default is en_US\n * @param locale\n * @returns {*}\n */\nexport var getLocale = function (locale) {\n return Locales[locale] || Locales['en_US'];\n};\n//# sourceMappingURL=register.js.map","/**\n * Created by hustcc on 18/5/20.\n * Contract: i@hust.cc\n */\nvar SEC_ARRAY = [\n 60,\n 60,\n 24,\n 7,\n 365 / 7 / 12,\n 12,\n];\n/**\n * format Date / string / timestamp to timestamp\n * @param input\n * @returns {*}\n */\nexport function toDate(input) {\n if (input instanceof Date)\n return input;\n // @ts-ignore\n if (!isNaN(input) || /^\\d+$/.test(input))\n return new Date(parseInt(input));\n input = (input || '')\n // @ts-ignore\n .trim()\n .replace(/\\.\\d+/, '') // remove milliseconds\n .replace(/-/, '/')\n .replace(/-/, '/')\n .replace(/(\\d)T(\\d)/, '$1 $2')\n .replace(/Z/, ' UTC') // 2017-2-5T3:57:52Z -> 2017-2-5 3:57:52UTC\n .replace(/([+-]\\d\\d):?(\\d\\d)/, ' $1$2'); // -04:00 -> -0400\n return new Date(input);\n}\n/**\n * format the diff second to *** time ago, with setting locale\n * @param diff\n * @param localeFunc\n * @returns\n */\nexport function formatDiff(diff, localeFunc) {\n /**\n * if locale is not exist, use defaultLocale.\n * if defaultLocale is not exist, use build-in `en`.\n * be sure of no error when locale is not exist.\n *\n * If `time in`, then 1\n * If `time ago`, then 0\n */\n var agoIn = diff < 0 ? 1 : 0;\n /**\n * Get absolute value of number (|diff| is non-negative) value of x\n * |diff| = diff if diff is positive\n * |diff| = -diff if diff is negative\n * |0| = 0\n */\n diff = Math.abs(diff);\n /**\n * Time in seconds\n */\n var totalSec = diff;\n /**\n * Unit of time\n */\n var idx = 0;\n for (; diff >= SEC_ARRAY[idx] && idx < SEC_ARRAY.length; idx++) {\n diff /= SEC_ARRAY[idx];\n }\n /**\n * Math.floor() is alternative of ~~\n *\n * The differences and bugs:\n * Math.floor(3.7) -> 4 but ~~3.7 -> 3\n * Math.floor(1559125440000.6) -> 1559125440000 but ~~1559125440000.6 -> 52311552\n *\n * More information about the performance of algebraic:\n * https://www.youtube.com/watch?v=65-RbBwZQdU\n */\n diff = Math.floor(diff);\n idx *= 2;\n if (diff > (idx === 0 ? 9 : 1))\n idx += 1;\n return localeFunc(diff, idx, totalSec)[agoIn].replace('%s', diff.toString());\n}\n/**\n * calculate the diff second between date to be formatted an now date.\n * @param date\n * @param relativeDate\n * @returns {number}\n */\nexport function diffSec(date, relativeDate) {\n var relDate = relativeDate ? toDate(relativeDate) : new Date();\n return (+relDate - +toDate(date)) / 1000;\n}\n/**\n * nextInterval: calculate the next interval time.\n * - diff: the diff sec between now and date to be formatted.\n *\n * What's the meaning?\n * diff = 61 then return 59\n * diff = 3601 (an hour + 1 second), then return 3599\n * make the interval with high performance.\n **/\nexport function nextInterval(diff) {\n var rst = 1, i = 0, d = Math.abs(diff);\n for (; diff >= SEC_ARRAY[i] && i < SEC_ARRAY.length; i++) {\n diff /= SEC_ARRAY[i];\n rst *= SEC_ARRAY[i];\n }\n d = d % rst;\n d = d ? rst - d : rst;\n return Math.ceil(d);\n}\n//# sourceMappingURL=date.js.map","import { formatDiff, diffSec } from './utils/date';\nimport { getLocale } from './register';\n/**\n * format a TDate into string\n * @param date\n * @param locale\n * @param opts\n */\nexport var format = function (date, locale, opts) {\n // diff seconds\n var sec = diffSec(date, opts && opts.relativeDate);\n // format it with locale\n return formatDiff(sec, getLocale(locale));\n};\n//# sourceMappingURL=format.js.map","<script>\n import PageLink from './PageLink.svelte';\n import * as timeago from 'timeago.js';\n import { last_api_request_url_store } from '../lib/stores.js';\n import { fetch_from_api } from '../lib/api_utils.js';\n\n let last_updated_date;\n let last_api_request_url;\n let fetch_running = false; // prevent multiple parallel fetch runs\n\n last_api_request_url_store.subscribe(url => {\n last_api_request_url = url;\n\n if (last_api_request_url) {\n last_api_request_url = new URL(last_api_request_url, window.location.origin);\n last_api_request_url.searchParams.delete('polygon_geojson');\n last_api_request_url = last_api_request_url.toString();\n }\n\n if (fetch_running || last_updated_date) return;\n\n fetch_running = true;\n\n fetch_from_api('status', { format: 'json' }, function (data) {\n last_updated_date = data.data_updated;\n fetch_running = false;\n });\n });\n</script>\n\n<style>\n #last-updated {\n position: relative;\n font-size: 0.8rem;\n font-style: italic;\n }\n #loading {\n display: none;\n position: absolute;\n padding: 0.5em 1em;\n top: 0;\n left: 0;\n width: 100%;\n background-color: #eee;\n z-index: 100;\n }\n</style>\n\n<div id=\"last-updated\" class=\"container-fluid py-2 px-4 mb-3\">\n <div id=\"loading\" class=\"py-2 px-4\">\n <div class=\"spinner-border spinner-border-sm text-primary me-1\" role=\"status\"></div>\n Loading data from API ...\n </div>\n <div class=\"row\">\n <div class=\"col-sm-6\">\n {#if last_api_request_url}\n <div id=\"api-request\">\n Data from <a href=\"{last_api_request_url}\">API request</a>\n <span id=\"api-request-debug\">\n (<a href=\"{last_api_request_url}&debug=1\">debug output</a>)\n </span>\n </div>\n {/if}\n </div>\n <div class=\"col-sm-6 text-end\">\n {#if last_updated_date}\n Data last updated:\n <abbr id=\"data-date\" title=\"{last_updated_date} (UTC timezone)\">{timeago.format(new Date(last_updated_date))}</abbr>\n {/if}\n (<PageLink page=\"status\">Details</PageLink>)\n </div>\n </div>\n</div>\n","/**\n * Created by hustcc on 18/5/20.\n * Contract: i@hust.cc\n */\nimport en_US from './lang/en_US';\nimport zh_CN from './lang/zh_CN';\nimport { register } from './register';\nregister('en_US', en_US);\nregister('zh_CN', zh_CN);\nexport { format } from './format';\nexport { render, cancel } from './realtime';\nexport { register };\n//# sourceMappingURL=index.js.map","<script>\n import { error_store } from '../lib/stores.js';\n\n let error_message;\n\n error_store.subscribe(text => { error_message = text; });\n\n function dismiss_message() {\n error_store.set(null);\n }\n</script>\n\n{#if error_message}\n <div id=\"error\" class=\"container-fluid alert-danger py-3 px-4\">\n {error_message}\n\n <button type=\"button\" class=\"btn-close float-end\" aria-label=\"dismiss\" on:click={dismiss_message}></button>\n </div>\n{/if}\n","<script>\n import PageLink from './PageLink.svelte';\n import ReverseLink from './ReverseLink.svelte';\n import LastUpdated from './LastUpdated.svelte';\n import Error from './Error.svelte';\n\n import { map_store, page } from '../lib/stores.js';\n\n $: view = $page.tab;\n $: page_title = Nominatim_Config.Page_Title;\n $: reverse_only = Nominatim_Config.Reverse_Only;\n\n let map_lat;\n let map_lon;\n\n map_store.subscribe(map => {\n if (!map) return;\n\n map.on('move', function () {\n map_lat = map.getCenter().lat;\n map_lon = map.getCenter().lng;\n });\n });\n</script>\n\n<style>\n .navbar-brand :global(a:hover) {\n text-decoration: none;\n }\n\n .navbar-brand h1 {\n display: inline;\n font-size: 1.2em;\n color: #333;\n }\n\n .navbar-brand img {\n display: inline-block;\n margin-right: 5px;\n margin-top: -5px;\n }\n\n .nav-item {\n white-space: nowrap;\n }\n\n .page-title-section {\n display: none;\n text-align: center;\n padding: 1em;\n }\n @media (max-width: 600px) {\n .page-title-section {\n display: block;\n }\n }\n\n .search-section {\n padding: 1em 30px;\n background-color: #f5f5f5;\n border-top: 2px solid #ddd;\n border-bottom: 2px solid #ddd;\n }\n</style>\n\n<header class=\"container-fluid\">\n <nav class=\"navbar navbar-expand-sm navbar-light\">\n <div class=\"container-fluid\">\n <!-- Brand -->\n <div class=\"navbar-brand\">\n <PageLink page={reverse_only ? 'reverse' : 'search'}>\n <img alt=\"logo\" id=\"theme-logo\" src=\"theme/logo.png\" />\n <h1>{page_title}</h1>\n </PageLink>\n </div>\n <!-- Toggler (hamburger button) -->\n <button class=\"navbar-toggler\" type=\"button\" data-bs-toggle=\"collapse\" data-bs-target=\"#navbarSupportedContent\" aria-controls=\"navbarSupportedContent\" aria-expanded=\"false\" aria-label=\"Toggle navigation\">\n <span class=\"navbar-toggler-icon\"></span>\n </button>\n <div class=\"collapse navbar-collapse\" id=\"navbarSupportedContent\">\n <!-- Left-aligned links -->\n <ul class=\"navbar-nav me-auto\">\n {#if !reverse_only}\n <li class=\"nav-item\">\n <PageLink page=\"search\" extra_classes=\"nav-link {view === 'search' ? 'active' : ''}\">Search</PageLink>\n </li>\n {/if}\n <li class=\"nav-item\">\n <ReverseLink lat={map_lat} lon={map_lon} extra_classes=\"nav-link {view === 'reverse' ? 'active' : ''}\">Reverse</ReverseLink>\n </li>\n <li class=\"nav-item\">\n <PageLink page=\"details\" extra_classes=\"nav-link {view === 'details' ? 'active' : ''}\">Search By ID</PageLink>\n </li>\n </ul>\n </div>\n <!-- Right aligned links -->\n <ul class=\"navbar-nav\">\n <li class=\"nav-item\">\n <PageLink page=\"about\" extra_classes=\"nav-link {view === 'about' ? 'active' : ''}\">About & Help</PageLink>\n </li>\n </ul>\n </div>\n </nav>\n</header>\n<section class=\"page-title-section\">\n <h2>{view}</h2>\n</section>\n<section class=\"search-section\">\n <slot/>\n</section>\n<Error/>\n<LastUpdated/>\n","<script>\n import { refresh_page } from '../lib/stores.js';\n\n export let page;\n\n function serialize_form(form) {\n var params = new URLSearchParams();\n\n Array.prototype.slice.call(form.elements).forEach(function (field) {\n if (!field.name || field.disabled || ['submit', 'button'].indexOf(field.type) > -1) return;\n\n if (['checkbox', 'radio'].indexOf(field.type) > -1 && !field.checked) return;\n if (typeof field.value === 'undefined' || field.value === '') return;\n\n // Default value for /search endpoint\n if (field.name === 'dedupe' && (field.value === 1 || field.value === '1')) return;\n\n params.set(field.name, field.value);\n });\n\n return params;\n }\n\n // https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation\n // doesn't support hidden fields, so we check those in an extra step\n function validate_field(field) {\n if (field.type === 'hidden') {\n if (field.value.length) {\n if (field.pattern && !field.value.match(field.pattern)) return false;\n }\n }\n return field.checkValidity(); // for hidden field always true\n }\n\n function handle_submit(event) {\n let form = event.target;\n\n let allow_submit = true;\n\n Array.prototype.slice.call(form.elements).forEach(function (field) {\n if (!validate_field(field)) {\n alert('Invalid input in ' + field.name);\n allow_submit = false;\n }\n });\n\n if (allow_submit) refresh_page(page, serialize_form(form));\n }\n</script>\n\n<form on:submit|preventDefault={handle_submit} class=\"form-inline\" role=\"search\" accept-charset=\"UTF-8\" action=\"\">\n <div class=\"row g-2\">\n <slot></slot>\n </div>\n</form>\n","<script>\n import UrlSubmitForm from '../components/UrlSubmitForm.svelte';\n\n import { map_store } from '../lib/stores.js';\n import { get } from 'svelte/store';\n\n export let bStructuredSearch = false;\n export let api_request_params = {};\n let sViewBox;\n let lat;\n let lon;\n\n function map_viewbox_as_string(map) {\n var bounds = map.getBounds();\n var west = bounds.getWest();\n var east = bounds.getEast();\n\n if ((east - west) >= 360) { // covers more than whole planet\n west = map.getCenter().lng - 179.999;\n east = map.getCenter().lng + 179.999;\n }\n east = L.latLng(77, east).wrap().lng;\n west = L.latLng(77, west).wrap().lng;\n\n return [\n west.toFixed(5), // left\n bounds.getNorth().toFixed(5), // top\n east.toFixed(5), // right\n bounds.getSouth().toFixed(5) // bottom\n ].join(',');\n }\n\n function set_viewbox(map) {\n let use_viewbox = document.getElementById('use_viewbox');\n if (use_viewbox && use_viewbox.checked) {\n sViewBox = map_viewbox_as_string(map);\n } else {\n sViewBox = '';\n }\n }\n\n function update_reverse_link(map) {\n let center_lat_lng = map.wrapLatLng(map.getCenter());\n lat = center_lat_lng.lat.toFixed(5);\n lon = center_lat_lng.lng.toFixed(5);\n }\n\n map_store.subscribe(map => {\n if (!map) { return; }\n\n map.on('move', function () {\n set_viewbox(map);\n update_reverse_link(map);\n });\n\n map.on('load', function () {\n set_viewbox(map);\n update_reverse_link(map);\n });\n });\n\n function reset_viewbox() {\n let map = get(map_store);\n if (map) { set_viewbox(map); }\n }\n\n function set_bounded(e) {\n document.querySelector('input[name=bounded]').value = e.target.checked ? 1 : '';\n }\n\n function set_dedupe(e) {\n document.querySelector('input[name=dedupe]').value = e.target.checked ? 1 : 0;\n }\n\n function set_api_param(e) {\n document.querySelector('input[name=' + e.target.dataset.apiParam + ']').value = e.target.value;\n }\n</script>\n\n<ul class=\"nav nav-tabs\">\n <li class=\"nav-item\">\n <a class=\"nav-link\" class:active={!bStructuredSearch} data-bs-toggle=\"tab\" href=\"#simple\">Simple</a>\n </li>\n <li class=\"nav-item\">\n <a class=\"nav-link\" class:active={bStructuredSearch} data-bs-toggle=\"tab\" href=\"#structured\">Structured</a>\n </li>\n</ul>\n\n<div class=\"tab-content py-2\">\n <div class=\"tab-pane\" class:active={!bStructuredSearch} id=\"simple\" role=\"tabpanel\">\n <UrlSubmitForm page=\"search\">\n <div class=\"col-auto\">\n <input id=\"q\"\n name=\"q\"\n type=\"text\"\n class=\"form-control form-control-sm\"\n placeholder=\"Search\"\n value=\"{api_request_params.q || ''}\" />\n </div>\n <div class=\"col-auto\">\n <button type=\"submit\" class=\"btn btn-primary btn-sm mx-1\">Search</button>\n <input type=\"hidden\" name=\"viewbox\" value=\"{sViewBox || ''}\" />\n <input type=\"hidden\" name=\"dedupe\" value=\"{api_request_params.dedupe === 0 ? 0 : 1}\" />\n <input type=\"hidden\" name=\"bounded\" value=\"{api_request_params.bounded ? 1 : ''}\" />\n <input type=\"hidden\" name=\"accept-language\" value=\"{api_request_params['accept-language'] || ''}\" />\n <input type=\"hidden\" name=\"countrycodes\" value=\"{api_request_params.countrycodes || ''}\"\n pattern=\"^[a-zA-Z]{'{2}'}(,[a-zA-Z]{'{2}'})*$\" />\n <input type=\"hidden\" name=\"limit\" value=\"{api_request_params.limit || ''}\" />\n <input type=\"hidden\" name=\"polygon_threshold\" value=\"{api_request_params.polygon_threshold || ''}\" />\n </div>\n </UrlSubmitForm>\n </div>\n <div class=\"tab-pane\" class:active={bStructuredSearch} id=\"structured\" role=\"tabpanel\">\n <UrlSubmitForm page=\"search\">\n <div class=\"col-auto\">\n <input name=\"street\" type=\"text\" class=\"form-control form-control-sm me-1\"\n placeholder=\"House number/Street\"\n value=\"{api_request_params.street || ''}\" />\n </div>\n <div class=\"col-auto\">\n <input name=\"city\" type=\"text\" class=\"form-control form-control-sm me-1\"\n placeholder=\"City\"\n value=\"{api_request_params.city || ''}\" />\n </div>\n <div class=\"col-auto\">\n <input id=\"county\" name=\"county\" type=\"text\" class=\"form-control form-control-sm me-1\"\n placeholder=\"County\"\n value=\"{api_request_params.county || ''}\" />\n </div>\n <div class=\"col-auto\">\n <input name=\"state\" type=\"text\" class=\"form-control form-control-sm me-1\"\n placeholder=\"State\"\n value=\"{api_request_params.state || ''}\" />\n </div>\n <div class=\"col-auto\">\n <input name=\"country\" type=\"text\" class=\"form-control form-control-sm me-1\"\n placeholder=\"Country\"\n value=\"{api_request_params.country || ''}\" />\n </div>\n <div class=\"col-auto\">\n <input name=\"postalcode\" type=\"text\" class=\"form-control form-control-sm me-1\"\n placeholder=\"Postal Code\"\n value=\"{api_request_params.postalcode || ''}\" />\n </div>\n <div class=\"col-auto\">\n <button type=\"submit\" class=\"btn btn-primary btn-sm\">Search</button>\n <input type=\"hidden\" name=\"viewbox\" value=\"{sViewBox || ''}\" />\n <input type=\"hidden\" name=\"dedupe\" value=\"{api_request_params.dedupe === 0 ? 0 : 1}\" />\n <input type=\"hidden\" name=\"bounded\" value=\"{api_request_params.bounded ? 1 : ''}\" />\n <input type=\"hidden\" name=\"accept-language\" value=\"{api_request_params['accept-language'] || ''}\" />\n <input type=\"hidden\" name=\"countrycodes\" value=\"{api_request_params.countrycodes || ''}\"\n pattern=\"^[a-zA-Z]{'{2}'}(,[a-zA-Z]{'{2}'})*$\" />\n <input type=\"hidden\" name=\"limit\" value=\"{api_request_params.limit || ''}\" />\n <input type=\"hidden\" name=\"polygon_threshold\" value=\"{api_request_params.polygon_threshold || ''}\" />\n </div>\n </UrlSubmitForm>\n </div>\n</div> <!-- /tab-content -->\n\n<!-- Additional options -->\n<details id=\"searchAdvancedOptions\">\n <summary><small>Advanced options</small></summary>\n <ul>\n <li>\n <div class=\"form-check form-check-inline\">\n <label class=\"form-check-label\" for=\"use_viewbox\">apply viewbox</label>\n <input type=\"checkbox\" class=\"form-check-input api-param-setting\"\n id=\"use_viewbox\" checked={api_request_params.viewbox} on:change={reset_viewbox}>\n </div>\n </li>\n\n <li>\n <div class=\"form-check form-check-inline\">\n <label class=\"form-check-label\" for=\"option_bounded\">bounded to viewbox</label>\n <input type=\"checkbox\" class=\"form-check-input api-param-setting\"\n id=\"option_bounded\" checked={!!api_request_params.bounded} on:change={set_bounded}>\n </div>\n </li>\n\n <li>\n <div class=\"form-check form-check-inline\">\n <label class=\"form-check-label\" for=\"option_dedupe\">deduplicate results</label>\n <input type=\"checkbox\" class=\"form-check-input api-param-setting\"\n id=\"option_dedupe\" checked={api_request_params.dedupe === 0 ? 0 : 1} on:change={set_dedupe}>\n </div>\n </li>\n\n <li>\n <label for=\"option_limit\">Maximum number of results</label>\n <input type=\"number\" class=\"form-control form-control-sm d-inline w-auto api-param-setting\"\n data-api-param=\"limit\" id=\"option_limit\" min=\"1\" max=\"50\"\n value=\"{api_request_params.limit || ''}\"\n on:change={set_api_param}>\n </li>\n\n <li>\n <label for=\"option_polygon_threshold\">Polygon simplification</label>\n <input type=\"number\" class=\"form-control form-control-sm d-inline w-auto api-param-setting\"\n data-api-param=\"polygon_threshold\" id=\"option_polygon_threshold\" min=\"0.0\" max=\"1.0\" step=\"0.001\"\n value=\"{api_request_params.polygon_threshold || ''}\"\n on:change={set_api_param}>\n </li>\n\n <li>\n <label for=\"accept_lang\">Languages</label>\n <input type=\"text\" placeholder=\"e.g. en,zh-Hant\" class=\"form-control form-control-sm d-inline w-auto api-param-setting\"\n data-api-param=\"accept-language\" id=\"accept_lang\" size=\"15\"\n value=\"{api_request_params['accept-language'] || ''}\"\n on:change={set_api_param}>\n </li>\n\n <li>\n <label for=\"option_ccode\">Country Codes</label>\n <input type=\"text\" placeholder=\"e.g. de,gb\" class=\"form-control form-control-sm d-inline w-auto api-param-setting\"\n data-api-param=\"countrycodes\" id=\"option_ccode\" size=\"15\"\n value=\"{api_request_params.countrycodes || ''}\"\n pattern=\"^[a-zA-Z]{'{2}'}(,[a-zA-Z]{'{2}'})*$\"\n on:change={set_api_param}>\n </li>\n </ul>\n</details>\n\n<style>\n .nav-tabs {\n font-size: 0.8em;\n margin-top: -1em;\n }\n\n .nav-link {\n padding: 0.1rem 1rem;\n }\n\n #q {\n width: 500px;\n max-width: 100%;\n }\n\n #searchAdvancedOptions ul {\n list-style-type: none;\n padding: 0;\n font-size: 0.85rem;\n }\n\n #searchAdvancedOptions li {\n display: inline-block;\n padding: 4px 10px;\n border-radius: 5px;\n border: 1px dotted #ccc;\n margin-right: 1em;\n }\n\n #searchAdvancedOptions label {\n margin-right: 0.5em;\n }\n\n</style>\n","/*!\n * escape-html\n * Copyright(c) 2012-2013 TJ Holowaychuk\n * Copyright(c) 2015 Andreas Lubbe\n * Copyright(c) 2015 Tiancheng \"Timothy\" Gu\n * MIT Licensed\n */\n\n'use strict';\n\n/**\n * Module variables.\n * @private\n */\n\nvar matchHtmlRegExp = /[\"'&<>]/;\n\n/**\n * Module exports.\n * @public\n */\n\nmodule.exports = escapeHtml;\n\n/**\n * Escape special characters in the given string of html.\n *\n * @param {string} string The string to escape for inserting into HTML\n * @return {string}\n * @public\n */\n\nfunction escapeHtml(string) {\n var str = '' + string;\n var match = matchHtmlRegExp.exec(str);\n\n if (!match) {\n return str;\n }\n\n var escape;\n var html = '';\n var index = 0;\n var lastIndex = 0;\n\n for (index = match.index; index < str.length; index++) {\n switch (str.charCodeAt(index)) {\n case 34: // \"\n escape = '"';\n break;\n case 38: // &\n escape = '&';\n break;\n case 39: // '\n escape = ''';\n break;\n case 60: // <\n escape = '<';\n break;\n case 62: // >\n escape = '>';\n break;\n default:\n continue;\n }\n\n if (lastIndex !== index) {\n html += str.substring(lastIndex, index);\n }\n\n lastIndex = index + 1;\n html += escape;\n }\n\n return lastIndex !== index\n ? html + str.substring(lastIndex, index)\n : html;\n}\n","module.exports.formatOSMType = formatOSMType;\nmodule.exports.osmLink = osmLink;\nmodule.exports.formatLabel = formatLabel;\nmodule.exports.wikipediaLink = wikipediaLink;\nmodule.exports.coverageType = coverageType;\nmodule.exports.isAdminBoundary = isAdminBoundary;\nmodule.exports.formatAddressRank = formatAddressRank;\nmodule.exports.formatPlaceType = formatPlaceType;\nmodule.exports.formatAdminLevel = formatAdminLevel;\nmodule.exports.formatDistance = formatDistance;\nmodule.exports.formatKeywordToken = formatKeywordToken;\nmodule.exports.zoomLevels = zoomLevels;\n\nconst escapeHtml = require('escape-html');\n\nfunction formatOSMType(sType, bExcludeExternal) {\n if (sType === 'N') return 'node';\n if (sType === 'W') return 'way';\n if (sType === 'R') return 'relation';\n\n if (!bExcludeExternal) return '';\n\n if (sType === 'T') return 'way';\n if (sType === 'I') return 'way';\n\n return '';\n}\n\nfunction osmLink(aPlace) {\n if (!aPlace.osm_type) return '';\n var sOSMType = formatOSMType(aPlace.osm_type, false);\n if (!sOSMType) return '';\n\n return '<a href=\"https://www.openstreetmap.org/' + sOSMType + '/' + aPlace.osm_id + '\">' + sOSMType + ' ' + aPlace.osm_id + '</a>';\n}\n\nfunction formatLabel(aPlace) {\n if (aPlace.label) return aPlace.label;\n\n function capitalize(s) {\n return s && s[0].toUpperCase() + s.slice(1);\n }\n\n if (aPlace.type && aPlace.type === 'yes' && aPlace.class) {\n return capitalize(aPlace.class.replace(/_/g, ' '));\n }\n if (aPlace.type) {\n return capitalize(aPlace.type.replace(/_/g, ' '));\n }\n return '';\n}\n\n/* en:London_Borough_of_Redbridge => https://en.wikipedia.org/wiki/London_Borough_of_Redbridge */\nfunction wikipediaLink(aPlace) {\n if (!aPlace.calculated_wikipedia) return '';\n\n var parts = aPlace.calculated_wikipedia.split(':', 2);\n\n var sTitle = escapeHtml(aPlace.calculated_wikipedia);\n var sLanguage = escapeHtml(parts[0]);\n var sArticle = escapeHtml(parts[1]);\n\n return '<a href=\"https://' + sLanguage + '.wikipedia.org/wiki/' + sArticle + '\" target=\"_blank\">' + sTitle + '</a>';\n}\n\nfunction coverageType(aPlace) {\n return (aPlace.isarea ? 'Polygon' : 'Point');\n}\n\nfunction isAdminBoundary(aPlace) {\n return aPlace.category === 'boundary' && aPlace.type === 'administrative';\n}\n\nfunction formatAddressRank(iRank) {\n if (iRank < 4) return 'other';\n if (iRank < 6) return 'country';\n if (iRank < 8) return 'region';\n if (iRank < 10) return 'state';\n if (iRank < 12) return 'state district';\n if (iRank < 14) return 'county';\n if (iRank < 16) return 'municipality';\n if (iRank < 18) return 'city / town / village';\n if (iRank < 20) return 'city / village district';\n if (iRank < 22) return 'suburb / hamlet';\n if (iRank < 24) return 'neighbourhood';\n if (iRank < 26) return 'city block / square';\n if (iRank === 26) return 'major street';\n if (iRank === 27) return 'minory street / path';\n if (iRank <= 30) return 'house / building';\n return 'other';\n}\n\nfunction formatPlaceType(aPlace) {\n var sOut = aPlace.class + ':' + aPlace.type;\n if (aPlace.type && aPlace.type === 'administrative' && aPlace.place_type) {\n sOut = sOut + ' (' + aPlace.place_type + ')';\n }\n return escapeHtml(sOut);\n}\n\n// Any over 15 are invalid data in OSM anyway\nfunction formatAdminLevel(iLevel) {\n return (iLevel && iLevel < 15 ? iLevel : '');\n}\n\nfunction formatDistance(fDistance, bInMeters) {\n if (bInMeters) {\n if (fDistance < 1) return '0';\n var sFormatted = (fDistance >= 1000)\n ? Math.round(fDistance / 1000, 1) + ' km'\n : Math.round(fDistance, 0) + ' m';\n\n return '<abbr class=\"distance\" title=\"' + fDistance + ' meters\">~' + sFormatted + '</abbr>';\n }\n\n // spheric distance, http://postgis.net/docs/ST_Distance_Spheroid.html\n if (fDistance === 0) return '0';\n\n return '<abbr class=\"distance\" title=\"spheric distance ' + fDistance + '\">~'\n + (Math.round(fDistance * 1000, 4) / 1000)\n + '</abbr>';\n}\n\n// mark partial tokens (those starting with a space) with a star for readability\nfunction formatKeywordToken(sToken) {\n return (sToken[0] === ' ' ? '*' : '') + escapeHtml(sToken);\n}\n\nfunction zoomLevels() {\n const aZoomLevels = [\n /* 0 */ 'Continent / Sea',\n /* 1 */ '',\n /* 2 */ '',\n /* 3 */ 'Country',\n /* 4 */ '',\n /* 5 */ 'State',\n /* 6 */ 'Region',\n /* 7 */ '',\n /* 8 */ 'County',\n /* 9 */ '',\n /* 10 */ 'City',\n /* 11 */ '',\n /* 12 */ 'Town / Village',\n /* 13 */ '',\n /* 14 */ 'Suburb',\n /* 15 */ '',\n /* 16 */ 'Street',\n /* 17 */ '',\n /* 18 */ 'Building',\n /* 19 */ '',\n /* 20 */ '',\n /* 21 */ ''\n ];\n return aZoomLevels;\n}\n","<script>\n import { refresh_page } from '../lib/stores.js';\n\n export let extra_classes = '';\n export let feature = null;\n\n let url_params = new URLSearchParams();\n let href = 'details.html';\n\n function formatShortOSMType(sType) {\n if (sType === 'node') return 'N';\n if (sType === 'way') return 'W';\n if (sType === 'relation') return 'R';\n return '';\n }\n\n function handleClick() {\n refresh_page('details', url_params);\n }\n\n $: {\n let new_params = new URLSearchParams();\n\n if (feature !== null) {\n if (feature.osm_type) {\n if (feature.osm_type.length === 1) {\n new_params.set('osmtype', feature.osm_type);\n } else {\n new_params.set('osmtype', formatShortOSMType(feature.osm_type));\n }\n\n new_params.set('osmid', feature.osm_id);\n\n if (feature.class) {\n new_params.set('class', feature.class);\n } else if (feature.category) {\n new_params.set('class', feature.category);\n }\n } else if (feature.place_id) {\n new_params.set('place_id', feature.place_id);\n }\n }\n url_params = new_params;\n }\n\n $: {\n let param_str = url_params.toString();\n href = 'details.html' + (param_str ? '?' : '') + param_str;\n }\n</script>\n\n<a on:click|preventDefault|stopPropagation={handleClick} href={href} class={extra_classes}><slot></slot></a>\n","<script>\n import { onMount } from 'svelte';\n import { fetch_content_into_element } from '../lib/api_utils.js';\n\n onMount(() => {\n fetch_content_into_element('theme/welcome.html', document.getElementById('welcome'));\n });\n</script>\n\n<div id=\"welcome\"></div>\n","<script>\n\n export let aPlace;\n\n $: sIcon = getIcon(aPlace.category, aPlace.type);\n $: title = 'icon for ' + aPlace.category + ' ' + aPlace.type;\n $: url = Nominatim_Config.Images_Base_Url + sIcon + '.p.20.png';\n\n function getIcon(category, type) {\n // equivalent to PHP Nominatim::ClassTypes::getIcon\n // covers 83 of 214 available icon filenames, e.g. transport_roundabout_anticlockwise\n // transport_rental_bicycle or place_of_worship_christian would need more data from\n // the place.\n var aIcons = {\n 'boundary:administrative': 'poi_boundary_administrative',\n 'place:city': 'poi_place_city',\n 'place:town': 'poi_place_town',\n 'place:village': 'poi_place_village',\n 'place:hamlet': 'poi_place_village',\n 'place:suburb': 'poi_place_village',\n 'place:locality': 'poi_place_village',\n 'place:airport': 'transport_airport2',\n 'aeroway:aerodrome': 'transport_airport2',\n 'railway:station': 'transport_train_station2',\n 'amenity:place_of_worship': 'place_of_worship_unknown3',\n 'amenity:pub': 'food_pub',\n 'amenity:bar': 'food_bar',\n 'amenity:university': 'education_university',\n 'tourism:museum': 'tourist_museum',\n 'amenity:arts_centre': 'tourist_art_gallery2',\n 'tourism:zoo': 'tourist_zoo',\n 'tourism:theme_park': 'poi_point_of_interest',\n 'tourism:attraction': 'poi_point_of_interest',\n 'leisure:golf_course': 'sport_golf',\n 'historic:castle': 'tourist_castle',\n 'amenity:hospital': 'health_hospital',\n 'amenity:school': 'education_school',\n 'amenity:theatre': 'tourist_theatre',\n 'amenity:library': 'amenity_library',\n 'amenity:fire_station': 'amenity_firestation3',\n 'amenity:police': 'amenity_police2',\n 'amenity:bank': 'money_bank2',\n 'amenity:post_office': 'amenity_post_office',\n 'tourism:hotel': 'accommodation_hotel2',\n 'amenity:cinema': 'tourist_cinema',\n 'tourism:artwork': 'tourist_art_gallery2',\n 'historic:archaeological_site': 'tourist_archaeological2',\n 'amenity:doctors': 'health_doctors',\n 'leisure:sports_centre': 'sport_leisure_centre',\n 'leisure:swimming_pool': 'sport_swimming_outdoor',\n 'shop:supermarket': 'shopping_supermarket',\n 'shop:convenience': 'shopping_convenience',\n 'amenity:restaurant': 'food_restaurant',\n 'amenity:fast_food': 'food_fastfood',\n 'amenity:cafe': 'food_cafe',\n 'tourism:guest_house': 'accommodation_bed_and_breakfast',\n 'amenity:pharmacy': 'health_pharmacy_dispensing',\n 'amenity:fuel': 'transport_fuel',\n 'natural:peak': 'poi_peak',\n 'natural:wood': 'landuse_coniferous_and_deciduous',\n 'shop:bicycle': 'shopping_bicycle',\n 'shop:clothes': 'shopping_clothes',\n 'shop:hairdresser': 'shopping_hairdresser',\n 'shop:doityourself': 'shopping_diy',\n 'shop:estate_agent': 'shopping_estateagent2',\n 'shop:car': 'shopping_car',\n 'shop:garden_centre': 'shopping_garden_centre',\n 'shop:car_repair': 'shopping_car_repair',\n 'shop:bakery': 'shopping_bakery',\n 'shop:butcher': 'shopping_butcher',\n 'shop:apparel': 'shopping_clothes',\n 'shop:laundry': 'shopping_laundrette',\n 'shop:beverages': 'shopping_alcohol',\n 'shop:alcohol': 'shopping_alcohol',\n 'shop:optician': 'health_opticians',\n 'shop:chemist': 'health_pharmacy',\n 'shop:gallery': 'tourist_art_gallery2',\n 'shop:jewelry': 'shopping_jewelry',\n 'tourism:information': 'amenity_information',\n 'historic:ruins': 'tourist_ruin',\n 'amenity:college': 'education_school',\n 'historic:monument': 'tourist_monument',\n 'historic:memorial': 'tourist_monument',\n 'historic:mine': 'poi_mine',\n 'tourism:caravan_site': 'accommodation_caravan_park',\n 'amenity:bus_station': 'transport_bus_station',\n 'amenity:atm': 'money_atm2',\n 'tourism:viewpoint': 'tourist_view_point',\n 'tourism:guesthouse': 'accommodation_bed_and_breakfast',\n 'railway:tram': 'transport_tram_stop',\n 'amenity:courthouse': 'amenity_court',\n 'amenity:recycling': 'amenity_recycling',\n 'amenity:dentist': 'health_dentist',\n 'natural:beach': 'tourist_beach',\n 'railway:tram_stop': 'transport_tram_stop',\n 'amenity:prison': 'amenity_prison',\n 'highway:bus_stop': 'transport_bus_stop2'\n };\n\n return aIcons[category + ':' + type];\n }\n\n</script>\n\n{#if sIcon}\n <img class=\"mapicon\" src={url} alt={title} />\n{/if}\n\n<style>\n .mapicon {\n margin: 10px 0;\n }\n</style>\n","<script>\n import { results_store } from '../lib/stores.js';\n import { formatLabel } from '../lib/helpers.js';\n\n import DetailsLink from './DetailsLink.svelte';\n import Welcome from './Welcome.svelte';\n import MapIcon from './MapIcon.svelte';\n\n export let reverse_search = false;\n export let current_result = null;\n\n let aSearchResults;\n let iHighlightNum;\n let sMoreURL;\n\n results_store.subscribe(data => {\n if (!data) { return; }\n aSearchResults = data;\n iHighlightNum = 0;\n current_result = aSearchResults[0];\n\n\n let search_params = new URLSearchParams(window.location.search);\n\n let aResults = data;\n // lonvia wrote: https://github.com/osm-search/nominatim-ui/issues/24\n // I would suggest to remove the guessing and always show the link. Nominatim only returns\n // one or two results when it believes the result to be a good enough match.\n // if (aResults.length >= 10) {\n var aExcludePlaceIds = [];\n if (search_params.has('exclude_place_ids')) {\n aExcludePlaceIds = search_params.get('exclude_place_ids').split(',');\n }\n for (var i = 0; i < aResults.length; i += 1) {\n aExcludePlaceIds.push(aResults[i].place_id);\n }\n var parsed_url = new URLSearchParams(window.location.search);\n parsed_url.set('exclude_place_ids', aExcludePlaceIds.join(','));\n sMoreURL = '?' + parsed_url.toString();\n });\n\n function handleClick(e) {\n let result_el = e.target;\n if (!result_el.className.match('result')) {\n result_el = result_el.parentElement;\n }\n let pos = Number(result_el.dataset.position);\n\n current_result = aSearchResults[pos];\n iHighlightNum = pos;\n }\n\n</script>\n\n{#if aSearchResults && aSearchResults.length > 0}\n <div id=\"searchresults\">\n\n {#each aSearchResults as aResult, iResNum}\n <div class=\"result\" class:highlight={iResNum === iHighlightNum} data-position=\"{iResNum}\" on:click|stopPropagation={handleClick}>\n <div style=\"float:right\">\n <MapIcon aPlace={aResult} />\n </div>\n <span class=\"name\">{aResult.display_name}</span>\n <span class=\"type\">{formatLabel(aResult)}</span>\n <p class=\"coords\">{aResult.lat},{aResult.lon}</p>\n\n <DetailsLink extra_classes=\"btn btn-outline-secondary btn-sm\" feature={aResult}>details</DetailsLink>\n </div>\n {/each}\n\n {#if sMoreURL && !reverse_search}\n <div class=\"more\">\n <a class=\"btn btn-primary\" href=\"{sMoreURL}\">\n Search for more results\n </a>\n </div>\n {/if}\n </div>\n{:else if aSearchResults}\n {#if reverse_search}\n <div id=\"intro\" class=\"sidebar\">Search for coordinates or click anywhere on the map.</div>\n {:else}\n <div class=\"noresults\">No search results found</div>\n {/if}\n{:else}\n <Welcome/>\n{/if}\n\n<style>\n .result {\n font-size: 0.8em;\n margin: 5px;\n margin-top:0px;\n padding: 4px 8px;\n border-radius: 2px;\n background:#F0F7FF;\n border: 2px solid #D7E7FF;\n cursor:pointer;\n min-height: 5em;\n }\n\n .result.highlight {\n background-color: #D9E7F7;\n border-color: #9DB9E4;\n }\n .result.highlight :global(a) {\n margin: 10px auto;\n display: block;\n max-width: 10em;\n padding: 1px;\n background-color: white;\n }\n .result .type{\n color: gray;\n font-size: 0.8em;\n }\n .result :global(a) {\n display: none;\n }\n\n .result .coords {\n display: none; \n }\n\n .noresults{\n text-align: center;\n padding: 1em;\n }\n\n .more{\n text-align:center;\n margin-top: 1em;\n }\n\n .result.highlight :global(a):hover {\n color: #111;\n }\n</style>\n","/* @preserve\n * Leaflet 1.9.1, a JS library for interactive maps. https://leafletjs.com\n * (c) 2010-2022 Vladimir Agafonkin, (c) 2010-2011 CloudMade\n */\n\nvar version = \"1.9.1\";\n\n/*\r\n * @namespace Util\r\n *\r\n * Various utility functions, used by Leaflet internally.\r\n */\r\n\r\n// @function extend(dest: Object, src?: Object): Object\r\n// Merges the properties of the `src` object (or multiple objects) into `dest` object and returns the latter. Has an `L.extend` shortcut.\r\nfunction extend(dest) {\r\n\tvar i, j, len, src;\r\n\r\n\tfor (j = 1, len = arguments.length; j < len; j++) {\r\n\t\tsrc = arguments[j];\r\n\t\tfor (i in src) {\r\n\t\t\tdest[i] = src[i];\r\n\t\t}\r\n\t}\r\n\treturn dest;\r\n}\r\n\r\n// @function create(proto: Object, properties?: Object): Object\r\n// Compatibility polyfill for [Object.create](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/create)\r\nvar create$2 = Object.create || (function () {\r\n\tfunction F() {}\r\n\treturn function (proto) {\r\n\t\tF.prototype = proto;\r\n\t\treturn new F();\r\n\t};\r\n})();\r\n\r\n// @function bind(fn: Function, …): Function\r\n// Returns a new function bound to the arguments passed, like [Function.prototype.bind](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/bind).\r\n// Has a `L.bind()` shortcut.\r\nfunction bind(fn, obj) {\r\n\tvar slice = Array.prototype.slice;\r\n\r\n\tif (fn.bind) {\r\n\t\treturn fn.bind.apply(fn, slice.call(arguments, 1));\r\n\t}\r\n\r\n\tvar args = slice.call(arguments, 2);\r\n\r\n\treturn function () {\r\n\t\treturn fn.apply(obj, args.length ? args.concat(slice.call(arguments)) : arguments);\r\n\t};\r\n}\r\n\r\n// @property lastId: Number\r\n// Last unique ID used by [`stamp()`](#util-stamp)\r\nvar lastId = 0;\r\n\r\n// @function stamp(obj: Object): Number\r\n// Returns the unique ID of an object, assigning it one if it doesn't have it.\r\nfunction stamp(obj) {\r\n\tif (!('_leaflet_id' in obj)) {\r\n\t\tobj['_leaflet_id'] = ++lastId;\r\n\t}\r\n\treturn obj._leaflet_id;\r\n}\r\n\r\n// @function throttle(fn: Function, time: Number, context: Object): Function\r\n// Returns a function which executes function `fn` with the given scope `context`\r\n// (so that the `this` keyword refers to `context` inside `fn`'s code). The function\r\n// `fn` will be called no more than one time per given amount of `time`. The arguments\r\n// received by the bound function will be any arguments passed when binding the\r\n// function, followed by any arguments passed when invoking the bound function.\r\n// Has an `L.throttle` shortcut.\r\nfunction throttle(fn, time, context) {\r\n\tvar lock, args, wrapperFn, later;\r\n\r\n\tlater = function () {\r\n\t\t// reset lock and call if queued\r\n\t\tlock = false;\r\n\t\tif (args) {\r\n\t\t\twrapperFn.apply(context, args);\r\n\t\t\targs = false;\r\n\t\t}\r\n\t};\r\n\r\n\twrapperFn = function () {\r\n\t\tif (lock) {\r\n\t\t\t// called too soon, queue to call later\r\n\t\t\targs = arguments;\r\n\r\n\t\t} else {\r\n\t\t\t// call and lock until later\r\n\t\t\tfn.apply(context, arguments);\r\n\t\t\tsetTimeout(later, time);\r\n\t\t\tlock = true;\r\n\t\t}\r\n\t};\r\n\r\n\treturn wrapperFn;\r\n}\r\n\r\n// @function wrapNum(num: Number, range: Number[], includeMax?: Boolean): Number\r\n// Returns the number `num` modulo `range` in such a way so it lies within\r\n// `range[0]` and `range[1]`. The returned value will be always smaller than\r\n// `range[1]` unless `includeMax` is set to `true`.\r\nfunction wrapNum(x, range, includeMax) {\r\n\tvar max = range[1],\r\n\t min = range[0],\r\n\t d = max - min;\r\n\treturn x === max && includeMax ? x : ((x - min) % d + d) % d + min;\r\n}\r\n\r\n// @function falseFn(): Function\r\n// Returns a function which always returns `false`.\r\nfunction falseFn() { return false; }\r\n\r\n// @function formatNum(num: Number, precision?: Number|false): Number\r\n// Returns the number `num` rounded with specified `precision`.\r\n// The default `precision` value is 6 decimal places.\r\n// `false` can be passed to skip any processing (can be useful to avoid round-off errors).\r\nfunction formatNum(num, precision) {\r\n\tif (precision === false) { return num; }\r\n\tvar pow = Math.pow(10, precision === undefined ? 6 : precision);\r\n\treturn Math.round(num * pow) / pow;\r\n}\r\n\r\n// @function trim(str: String): String\r\n// Compatibility polyfill for [String.prototype.trim](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/Trim)\r\nfunction trim(str) {\r\n\treturn str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g, '');\r\n}\r\n\r\n// @function splitWords(str: String): String[]\r\n// Trims and splits the string on whitespace and returns the array of parts.\r\nfunction splitWords(str) {\r\n\treturn trim(str).split(/\\s+/);\r\n}\r\n\r\n// @function setOptions(obj: Object, options: Object): Object\r\n// Merges the given properties to the `options` of the `obj` object, returning the resulting options. See `Class options`. Has an `L.setOptions` shortcut.\r\nfunction setOptions(obj, options) {\r\n\tif (!Object.prototype.hasOwnProperty.call(obj, 'options')) {\r\n\t\tobj.options = obj.options ? create$2(obj.options) : {};\r\n\t}\r\n\tfor (var i in options) {\r\n\t\tobj.options[i] = options[i];\r\n\t}\r\n\treturn obj.options;\r\n}\r\n\r\n// @function getParamString(obj: Object, existingUrl?: String, uppercase?: Boolean): String\r\n// Converts an object into a parameter URL string, e.g. `{a: \"foo\", b: \"bar\"}`\r\n// translates to `'?a=foo&b=bar'`. If `existingUrl` is set, the parameters will\r\n// be appended at the end. If `uppercase` is `true`, the parameter names will\r\n// be uppercased (e.g. `'?A=foo&B=bar'`)\r\nfunction getParamString(obj, existingUrl, uppercase) {\r\n\tvar params = [];\r\n\tfor (var i in obj) {\r\n\t\tparams.push(encodeURIComponent(uppercase ? i.toUpperCase() : i) + '=' + encodeURIComponent(obj[i]));\r\n\t}\r\n\treturn ((!existingUrl || existingUrl.indexOf('?') === -1) ? '?' : '&') + params.join('&');\r\n}\r\n\r\nvar templateRe = /\\{ *([\\w_ -]+) *\\}/g;\r\n\r\n// @function template(str: String, data: Object): String\r\n// Simple templating facility, accepts a template string of the form `'Hello {a}, {b}'`\r\n// and a data object like `{a: 'foo', b: 'bar'}`, returns evaluated string\r\n// `('Hello foo, bar')`. You can also specify functions instead of strings for\r\n// data values — they will be evaluated passing `data` as an argument.\r\nfunction template(str, data) {\r\n\treturn str.replace(templateRe, function (str, key) {\r\n\t\tvar value = data[key];\r\n\r\n\t\tif (value === undefined) {\r\n\t\t\tthrow new Error('No value provided for variable ' + str);\r\n\r\n\t\t} else if (typeof value === 'function') {\r\n\t\t\tvalue = value(data);\r\n\t\t}\r\n\t\treturn value;\r\n\t});\r\n}\r\n\r\n// @function isArray(obj): Boolean\r\n// Compatibility polyfill for [Array.isArray](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray)\r\nvar isArray = Array.isArray || function (obj) {\r\n\treturn (Object.prototype.toString.call(obj) === '[object Array]');\r\n};\r\n\r\n// @function indexOf(array: Array, el: Object): Number\r\n// Compatibility polyfill for [Array.prototype.indexOf](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf)\r\nfunction indexOf(array, el) {\r\n\tfor (var i = 0; i < array.length; i++) {\r\n\t\tif (array[i] === el) { return i; }\r\n\t}\r\n\treturn -1;\r\n}\r\n\r\n// @property emptyImageUrl: String\r\n// Data URI string containing a base64-encoded empty GIF image.\r\n// Used as a hack to free memory from unused images on WebKit-powered\r\n// mobile devices (by setting image `src` to this string).\r\nvar emptyImageUrl = 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=';\r\n\r\n// inspired by https://paulirish.com/2011/requestanimationframe-for-smart-animating/\r\n\r\nfunction getPrefixed(name) {\r\n\treturn window['webkit' + name] || window['moz' + name] || window['ms' + name];\r\n}\r\n\r\nvar lastTime = 0;\r\n\r\n// fallback for IE 7-8\r\nfunction timeoutDefer(fn) {\r\n\tvar time = +new Date(),\r\n\t timeToCall = Math.max(0, 16 - (time - lastTime));\r\n\r\n\tlastTime = time + timeToCall;\r\n\treturn window.setTimeout(fn, timeToCall);\r\n}\r\n\r\nvar requestFn = window.requestAnimationFrame || getPrefixed('RequestAnimationFrame') || timeoutDefer;\r\nvar cancelFn = window.cancelAnimationFrame || getPrefixed('CancelAnimationFrame') ||\r\n\t\tgetPrefixed('CancelRequestAnimationFrame') || function (id) { window.clearTimeout(id); };\r\n\r\n// @function requestAnimFrame(fn: Function, context?: Object, immediate?: Boolean): Number\r\n// Schedules `fn` to be executed when the browser repaints. `fn` is bound to\r\n// `context` if given. When `immediate` is set, `fn` is called immediately if\r\n// the browser doesn't have native support for\r\n// [`window.requestAnimationFrame`](https://developer.mozilla.org/docs/Web/API/window/requestAnimationFrame),\r\n// otherwise it's delayed. Returns a request ID that can be used to cancel the request.\r\nfunction requestAnimFrame(fn, context, immediate) {\r\n\tif (immediate && requestFn === timeoutDefer) {\r\n\t\tfn.call(context);\r\n\t} else {\r\n\t\treturn requestFn.call(window, bind(fn, context));\r\n\t}\r\n}\r\n\r\n// @function cancelAnimFrame(id: Number): undefined\r\n// Cancels a previous `requestAnimFrame`. See also [window.cancelAnimationFrame](https://developer.mozilla.org/docs/Web/API/window/cancelAnimationFrame).\r\nfunction cancelAnimFrame(id) {\r\n\tif (id) {\r\n\t\tcancelFn.call(window, id);\r\n\t}\r\n}\n\nvar Util = {\n __proto__: null,\n extend: extend,\n create: create$2,\n bind: bind,\n get lastId () { return lastId; },\n stamp: stamp,\n throttle: throttle,\n wrapNum: wrapNum,\n falseFn: falseFn,\n formatNum: formatNum,\n trim: trim,\n splitWords: splitWords,\n setOptions: setOptions,\n getParamString: getParamString,\n template: template,\n isArray: isArray,\n indexOf: indexOf,\n emptyImageUrl: emptyImageUrl,\n requestFn: requestFn,\n cancelFn: cancelFn,\n requestAnimFrame: requestAnimFrame,\n cancelAnimFrame: cancelAnimFrame\n};\n\n// @class Class\r\n// @aka L.Class\r\n\r\n// @section\r\n// @uninheritable\r\n\r\n// Thanks to John Resig and Dean Edwards for inspiration!\r\n\r\nfunction Class() {}\r\n\r\nClass.extend = function (props) {\r\n\r\n\t// @function extend(props: Object): Function\r\n\t// [Extends the current class](#class-inheritance) given the properties to be included.\r\n\t// Returns a Javascript function that is a class constructor (to be called with `new`).\r\n\tvar NewClass = function () {\r\n\r\n\t\tsetOptions(this);\r\n\r\n\t\t// call the constructor\r\n\t\tif (this.initialize) {\r\n\t\t\tthis.initialize.apply(this, arguments);\r\n\t\t}\r\n\r\n\t\t// call all constructor hooks\r\n\t\tthis.callInitHooks();\r\n\t};\r\n\r\n\tvar parentProto = NewClass.__super__ = this.prototype;\r\n\r\n\tvar proto = create$2(parentProto);\r\n\tproto.constructor = NewClass;\r\n\r\n\tNewClass.prototype = proto;\r\n\r\n\t// inherit parent's statics\r\n\tfor (var i in this) {\r\n\t\tif (Object.prototype.hasOwnProperty.call(this, i) && i !== 'prototype' && i !== '__super__') {\r\n\t\t\tNewClass[i] = this[i];\r\n\t\t}\r\n\t}\r\n\r\n\t// mix static properties into the class\r\n\tif (props.statics) {\r\n\t\textend(NewClass, props.statics);\r\n\t}\r\n\r\n\t// mix includes into the prototype\r\n\tif (props.includes) {\r\n\t\tcheckDeprecatedMixinEvents(props.includes);\r\n\t\textend.apply(null, [proto].concat(props.includes));\r\n\t}\r\n\r\n\t// mix given properties into the prototype\r\n\textend(proto, props);\r\n\tdelete proto.statics;\r\n\tdelete proto.includes;\r\n\r\n\t// merge options\r\n\tif (proto.options) {\r\n\t\tproto.options = parentProto.options ? create$2(parentProto.options) : {};\r\n\t\textend(proto.options, props.options);\r\n\t}\r\n\r\n\tproto._initHooks = [];\r\n\r\n\t// add method for calling all hooks\r\n\tproto.callInitHooks = function () {\r\n\r\n\t\tif (this._initHooksCalled) { return; }\r\n\r\n\t\tif (parentProto.callInitHooks) {\r\n\t\t\tparentProto.callInitHooks.call(this);\r\n\t\t}\r\n\r\n\t\tthis._initHooksCalled = true;\r\n\r\n\t\tfor (var i = 0, len = proto._initHooks.length; i < len; i++) {\r\n\t\t\tproto._initHooks[i].call(this);\r\n\t\t}\r\n\t};\r\n\r\n\treturn NewClass;\r\n};\r\n\r\n\r\n// @function include(properties: Object): this\r\n// [Includes a mixin](#class-includes) into the current class.\r\nClass.include = function (props) {\r\n\tvar parentOptions = this.prototype.options;\r\n\textend(this.prototype, props);\r\n\tif (props.options) {\r\n\t\tthis.prototype.options = parentOptions;\r\n\t\tthis.mergeOptions(props.options);\r\n\t}\r\n\treturn this;\r\n};\r\n\r\n// @function mergeOptions(options: Object): this\r\n// [Merges `options`](#class-options) into the defaults of the class.\r\nClass.mergeOptions = function (options) {\r\n\textend(this.prototype.options, options);\r\n\treturn this;\r\n};\r\n\r\n// @function addInitHook(fn: Function): this\r\n// Adds a [constructor hook](#class-constructor-hooks) to the class.\r\nClass.addInitHook = function (fn) { // (Function) || (String, args...)\r\n\tvar args = Array.prototype.slice.call(arguments, 1);\r\n\r\n\tvar init = typeof fn === 'function' ? fn : function () {\r\n\t\tthis[fn].apply(this, args);\r\n\t};\r\n\r\n\tthis.prototype._initHooks = this.prototype._initHooks || [];\r\n\tthis.prototype._initHooks.push(init);\r\n\treturn this;\r\n};\r\n\r\nfunction checkDeprecatedMixinEvents(includes) {\r\n\tif (typeof L === 'undefined' || !L || !L.Mixin) { return; }\r\n\r\n\tincludes = isArray(includes) ? includes : [includes];\r\n\r\n\tfor (var i = 0; i < includes.length; i++) {\r\n\t\tif (includes[i] === L.Mixin.Events) {\r\n\t\t\tconsole.warn('Deprecated include of L.Mixin.Events: ' +\r\n\t\t\t\t'this property will be removed in future releases, ' +\r\n\t\t\t\t'please inherit from L.Evented instead.', new Error().stack);\r\n\t\t}\r\n\t}\r\n}\n\n/*\r\n * @class Evented\r\n * @aka L.Evented\r\n * @inherits Class\r\n *\r\n * A set of methods shared between event-powered classes (like `Map` and `Marker`). Generally, events allow you to execute some function when something happens with an object (e.g. the user clicks on the map, causing the map to fire `'click'` event).\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * map.on('click', function(e) {\r\n * \talert(e.latlng);\r\n * } );\r\n * ```\r\n *\r\n * Leaflet deals with event listeners by reference, so if you want to add a listener and then remove it, define it as a function:\r\n *\r\n * ```js\r\n * function onClick(e) { ... }\r\n *\r\n * map.on('click', onClick);\r\n * map.off('click', onClick);\r\n * ```\r\n */\r\n\r\nvar Events = {\r\n\t/* @method on(type: String, fn: Function, context?: Object): this\r\n\t * Adds a listener function (`fn`) to a particular event type of the object. You can optionally specify the context of the listener (object the this keyword will point to). You can also pass several space-separated types (e.g. `'click dblclick'`).\r\n\t *\r\n\t * @alternative\r\n\t * @method on(eventMap: Object): this\r\n\t * Adds a set of type/listener pairs, e.g. `{click: onClick, mousemove: onMouseMove}`\r\n\t */\r\n\ton: function (types, fn, context) {\r\n\r\n\t\t// types can be a map of types/handlers\r\n\t\tif (typeof types === 'object') {\r\n\t\t\tfor (var type in types) {\r\n\t\t\t\t// we don't process space-separated events here for performance;\r\n\t\t\t\t// it's a hot path since Layer uses the on(obj) syntax\r\n\t\t\t\tthis._on(type, types[type], fn);\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\t// types can be a string of space-separated words\r\n\t\t\ttypes = splitWords(types);\r\n\r\n\t\t\tfor (var i = 0, len = types.length; i < len; i++) {\r\n\t\t\t\tthis._on(types[i], fn, context);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t/* @method off(type: String, fn?: Function, context?: Object): this\r\n\t * Removes a previously added listener function. If no function is specified, it will remove all the listeners of that particular event from the object. Note that if you passed a custom context to `on`, you must pass the same context to `off` in order to remove the listener.\r\n\t *\r\n\t * @alternative\r\n\t * @method off(eventMap: Object): this\r\n\t * Removes a set of type/listener pairs.\r\n\t *\r\n\t * @alternative\r\n\t * @method off: this\r\n\t * Removes all listeners to all events on the object. This includes implicitly attached events.\r\n\t */\r\n\toff: function (types, fn, context) {\r\n\r\n\t\tif (!arguments.length) {\r\n\t\t\t// clear all listeners if called without arguments\r\n\t\t\tdelete this._events;\r\n\r\n\t\t} else if (typeof types === 'object') {\r\n\t\t\tfor (var type in types) {\r\n\t\t\t\tthis._off(type, types[type], fn);\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\ttypes = splitWords(types);\r\n\r\n\t\t\tvar removeAll = arguments.length === 1;\r\n\t\t\tfor (var i = 0, len = types.length; i < len; i++) {\r\n\t\t\t\tif (removeAll) {\r\n\t\t\t\t\tthis._off(types[i]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis._off(types[i], fn, context);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// attach listener (without syntactic sugar now)\r\n\t_on: function (type, fn, context, _once) {\r\n\t\tif (typeof fn !== 'function') {\r\n\t\t\tconsole.warn('wrong listener type: ' + typeof fn);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// check if fn already there\r\n\t\tif (this._listens(type, fn, context) !== false) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (context === this) {\r\n\t\t\t// Less memory footprint.\r\n\t\t\tcontext = undefined;\r\n\t\t}\r\n\r\n\t\tvar newListener = {fn: fn, ctx: context};\r\n\t\tif (_once) {\r\n\t\t\tnewListener.once = true;\r\n\t\t}\r\n\r\n\t\tthis._events = this._events || {};\r\n\t\tthis._events[type] = this._events[type] || [];\r\n\t\tthis._events[type].push(newListener);\r\n\t},\r\n\r\n\t_off: function (type, fn, context) {\r\n\t\tvar listeners,\r\n\t\t i,\r\n\t\t len;\r\n\r\n\t\tif (!this._events) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tlisteners = this._events[type];\r\n\t\tif (!listeners) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (arguments.length === 1) { // remove all\r\n\t\t\tif (this._firingCount) {\r\n\t\t\t\t// Set all removed listeners to noop\r\n\t\t\t\t// so they are not called if remove happens in fire\r\n\t\t\t\tfor (i = 0, len = listeners.length; i < len; i++) {\r\n\t\t\t\t\tlisteners[i].fn = falseFn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// clear all listeners for a type if function isn't specified\r\n\t\t\tdelete this._events[type];\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (typeof fn !== 'function') {\r\n\t\t\tconsole.warn('wrong listener type: ' + typeof fn);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// find fn and remove it\r\n\t\tvar index = this._listens(type, fn, context);\r\n\t\tif (index !== false) {\r\n\t\t\tvar listener = listeners[index];\r\n\t\t\tif (this._firingCount) {\r\n\t\t\t\t// set the removed listener to noop so that's not called if remove happens in fire\r\n\t\t\t\tlistener.fn = falseFn;\r\n\r\n\t\t\t\t/* copy array in case events are being fired */\r\n\t\t\t\tthis._events[type] = listeners = listeners.slice();\r\n\t\t\t}\r\n\t\t\tlisteners.splice(index, 1);\r\n\t\t}\r\n\t},\r\n\r\n\t// @method fire(type: String, data?: Object, propagate?: Boolean): this\r\n\t// Fires an event of the specified type. You can optionally provide a data\r\n\t// object — the first argument of the listener function will contain its\r\n\t// properties. The event can optionally be propagated to event parents.\r\n\tfire: function (type, data, propagate) {\r\n\t\tif (!this.listens(type, propagate)) { return this; }\r\n\r\n\t\tvar event = extend({}, data, {\r\n\t\t\ttype: type,\r\n\t\t\ttarget: this,\r\n\t\t\tsourceTarget: data && data.sourceTarget || this\r\n\t\t});\r\n\r\n\t\tif (this._events) {\r\n\t\t\tvar listeners = this._events[type];\r\n\t\t\tif (listeners) {\r\n\t\t\t\tthis._firingCount = (this._firingCount + 1) || 1;\r\n\t\t\t\tfor (var i = 0, len = listeners.length; i < len; i++) {\r\n\t\t\t\t\tvar l = listeners[i];\r\n\t\t\t\t\t// off overwrites l.fn, so we need to copy fn to a var\r\n\t\t\t\t\tvar fn = l.fn;\r\n\t\t\t\t\tif (l.once) {\r\n\t\t\t\t\t\tthis.off(type, fn, l.ctx);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfn.call(l.ctx || this, event);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._firingCount--;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (propagate) {\r\n\t\t\t// propagate the event to parents (set with addEventParent)\r\n\t\t\tthis._propagateEvent(event);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method listens(type: String, propagate?: Boolean): Boolean\r\n\t// @method listens(type: String, fn: Function, context?: Object, propagate?: Boolean): Boolean\r\n\t// Returns `true` if a particular event type has any listeners attached to it.\r\n\t// The verification can optionally be propagated, it will return `true` if parents have the listener attached to it.\r\n\tlistens: function (type, fn, context, propagate) {\r\n\t\tif (typeof type !== 'string') {\r\n\t\t\tconsole.warn('\"string\" type argument expected');\r\n\t\t}\r\n\r\n\t\t// we don't overwrite the input `fn` value, because we need to use it for propagation\r\n\t\tvar _fn = fn;\r\n\t\tif (typeof fn !== 'function') {\r\n\t\t\tpropagate = !!fn;\r\n\t\t\t_fn = undefined;\r\n\t\t\tcontext = undefined;\r\n\t\t}\r\n\r\n\t\tvar listeners = this._events && this._events[type];\r\n\t\tif (listeners && listeners.length) {\r\n\t\t\tif (this._listens(type, _fn, context) !== false) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (propagate) {\r\n\t\t\t// also check parents for listeners if event propagates\r\n\t\t\tfor (var id in this._eventParents) {\r\n\t\t\t\tif (this._eventParents[id].listens(type, fn, context, propagate)) { return true; }\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\r\n\t// returns the index (number) or false\r\n\t_listens: function (type, fn, context) {\r\n\t\tif (!this._events) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tvar listeners = this._events[type] || [];\r\n\t\tif (!fn) {\r\n\t\t\treturn !!listeners.length;\r\n\t\t}\r\n\r\n\t\tif (context === this) {\r\n\t\t\t// Less memory footprint.\r\n\t\t\tcontext = undefined;\r\n\t\t}\r\n\r\n\t\tfor (var i = 0, len = listeners.length; i < len; i++) {\r\n\t\t\tif (listeners[i].fn === fn && listeners[i].ctx === context) {\r\n\t\t\t\treturn i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\r\n\t},\r\n\r\n\t// @method once(…): this\r\n\t// Behaves as [`on(…)`](#evented-on), except the listener will only get fired once and then removed.\r\n\tonce: function (types, fn, context) {\r\n\r\n\t\t// types can be a map of types/handlers\r\n\t\tif (typeof types === 'object') {\r\n\t\t\tfor (var type in types) {\r\n\t\t\t\t// we don't process space-separated events here for performance;\r\n\t\t\t\t// it's a hot path since Layer uses the on(obj) syntax\r\n\t\t\t\tthis._on(type, types[type], fn, true);\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\t// types can be a string of space-separated words\r\n\t\t\ttypes = splitWords(types);\r\n\r\n\t\t\tfor (var i = 0, len = types.length; i < len; i++) {\r\n\t\t\t\tthis._on(types[i], fn, context, true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method addEventParent(obj: Evented): this\r\n\t// Adds an event parent - an `Evented` that will receive propagated events\r\n\taddEventParent: function (obj) {\r\n\t\tthis._eventParents = this._eventParents || {};\r\n\t\tthis._eventParents[stamp(obj)] = obj;\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method removeEventParent(obj: Evented): this\r\n\t// Removes an event parent, so it will stop receiving propagated events\r\n\tremoveEventParent: function (obj) {\r\n\t\tif (this._eventParents) {\r\n\t\t\tdelete this._eventParents[stamp(obj)];\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_propagateEvent: function (e) {\r\n\t\tfor (var id in this._eventParents) {\r\n\t\t\tthis._eventParents[id].fire(e.type, extend({\r\n\t\t\t\tlayer: e.target,\r\n\t\t\t\tpropagatedFrom: e.target\r\n\t\t\t}, e), true);\r\n\t\t}\r\n\t}\r\n};\r\n\r\n// aliases; we should ditch those eventually\r\n\r\n// @method addEventListener(…): this\r\n// Alias to [`on(…)`](#evented-on)\r\nEvents.addEventListener = Events.on;\r\n\r\n// @method removeEventListener(…): this\r\n// Alias to [`off(…)`](#evented-off)\r\n\r\n// @method clearAllEventListeners(…): this\r\n// Alias to [`off()`](#evented-off)\r\nEvents.removeEventListener = Events.clearAllEventListeners = Events.off;\r\n\r\n// @method addOneTimeEventListener(…): this\r\n// Alias to [`once(…)`](#evented-once)\r\nEvents.addOneTimeEventListener = Events.once;\r\n\r\n// @method fireEvent(…): this\r\n// Alias to [`fire(…)`](#evented-fire)\r\nEvents.fireEvent = Events.fire;\r\n\r\n// @method hasEventListeners(…): Boolean\r\n// Alias to [`listens(…)`](#evented-listens)\r\nEvents.hasEventListeners = Events.listens;\r\n\r\nvar Evented = Class.extend(Events);\n\n/*\r\n * @class Point\r\n * @aka L.Point\r\n *\r\n * Represents a point with `x` and `y` coordinates in pixels.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var point = L.point(200, 300);\r\n * ```\r\n *\r\n * All Leaflet methods and options that accept `Point` objects also accept them in a simple Array form (unless noted otherwise), so these lines are equivalent:\r\n *\r\n * ```js\r\n * map.panBy([200, 300]);\r\n * map.panBy(L.point(200, 300));\r\n * ```\r\n *\r\n * Note that `Point` does not inherit from Leaflet's `Class` object,\r\n * which means new classes can't inherit from it, and new methods\r\n * can't be added to it with the `include` function.\r\n */\r\n\r\nfunction Point(x, y, round) {\r\n\t// @property x: Number; The `x` coordinate of the point\r\n\tthis.x = (round ? Math.round(x) : x);\r\n\t// @property y: Number; The `y` coordinate of the point\r\n\tthis.y = (round ? Math.round(y) : y);\r\n}\r\n\r\nvar trunc = Math.trunc || function (v) {\r\n\treturn v > 0 ? Math.floor(v) : Math.ceil(v);\r\n};\r\n\r\nPoint.prototype = {\r\n\r\n\t// @method clone(): Point\r\n\t// Returns a copy of the current point.\r\n\tclone: function () {\r\n\t\treturn new Point(this.x, this.y);\r\n\t},\r\n\r\n\t// @method add(otherPoint: Point): Point\r\n\t// Returns the result of addition of the current and the given points.\r\n\tadd: function (point) {\r\n\t\t// non-destructive, returns a new point\r\n\t\treturn this.clone()._add(toPoint(point));\r\n\t},\r\n\r\n\t_add: function (point) {\r\n\t\t// destructive, used directly for performance in situations where it's safe to modify existing point\r\n\t\tthis.x += point.x;\r\n\t\tthis.y += point.y;\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method subtract(otherPoint: Point): Point\r\n\t// Returns the result of subtraction of the given point from the current.\r\n\tsubtract: function (point) {\r\n\t\treturn this.clone()._subtract(toPoint(point));\r\n\t},\r\n\r\n\t_subtract: function (point) {\r\n\t\tthis.x -= point.x;\r\n\t\tthis.y -= point.y;\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method divideBy(num: Number): Point\r\n\t// Returns the result of division of the current point by the given number.\r\n\tdivideBy: function (num) {\r\n\t\treturn this.clone()._divideBy(num);\r\n\t},\r\n\r\n\t_divideBy: function (num) {\r\n\t\tthis.x /= num;\r\n\t\tthis.y /= num;\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method multiplyBy(num: Number): Point\r\n\t// Returns the result of multiplication of the current point by the given number.\r\n\tmultiplyBy: function (num) {\r\n\t\treturn this.clone()._multiplyBy(num);\r\n\t},\r\n\r\n\t_multiplyBy: function (num) {\r\n\t\tthis.x *= num;\r\n\t\tthis.y *= num;\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method scaleBy(scale: Point): Point\r\n\t// Multiply each coordinate of the current point by each coordinate of\r\n\t// `scale`. In linear algebra terms, multiply the point by the\r\n\t// [scaling matrix](https://en.wikipedia.org/wiki/Scaling_%28geometry%29#Matrix_representation)\r\n\t// defined by `scale`.\r\n\tscaleBy: function (point) {\r\n\t\treturn new Point(this.x * point.x, this.y * point.y);\r\n\t},\r\n\r\n\t// @method unscaleBy(scale: Point): Point\r\n\t// Inverse of `scaleBy`. Divide each coordinate of the current point by\r\n\t// each coordinate of `scale`.\r\n\tunscaleBy: function (point) {\r\n\t\treturn new Point(this.x / point.x, this.y / point.y);\r\n\t},\r\n\r\n\t// @method round(): Point\r\n\t// Returns a copy of the current point with rounded coordinates.\r\n\tround: function () {\r\n\t\treturn this.clone()._round();\r\n\t},\r\n\r\n\t_round: function () {\r\n\t\tthis.x = Math.round(this.x);\r\n\t\tthis.y = Math.round(this.y);\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method floor(): Point\r\n\t// Returns a copy of the current point with floored coordinates (rounded down).\r\n\tfloor: function () {\r\n\t\treturn this.clone()._floor();\r\n\t},\r\n\r\n\t_floor: function () {\r\n\t\tthis.x = Math.floor(this.x);\r\n\t\tthis.y = Math.floor(this.y);\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method ceil(): Point\r\n\t// Returns a copy of the current point with ceiled coordinates (rounded up).\r\n\tceil: function () {\r\n\t\treturn this.clone()._ceil();\r\n\t},\r\n\r\n\t_ceil: function () {\r\n\t\tthis.x = Math.ceil(this.x);\r\n\t\tthis.y = Math.ceil(this.y);\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method trunc(): Point\r\n\t// Returns a copy of the current point with truncated coordinates (rounded towards zero).\r\n\ttrunc: function () {\r\n\t\treturn this.clone()._trunc();\r\n\t},\r\n\r\n\t_trunc: function () {\r\n\t\tthis.x = trunc(this.x);\r\n\t\tthis.y = trunc(this.y);\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method distanceTo(otherPoint: Point): Number\r\n\t// Returns the cartesian distance between the current and the given points.\r\n\tdistanceTo: function (point) {\r\n\t\tpoint = toPoint(point);\r\n\r\n\t\tvar x = point.x - this.x,\r\n\t\t y = point.y - this.y;\r\n\r\n\t\treturn Math.sqrt(x * x + y * y);\r\n\t},\r\n\r\n\t// @method equals(otherPoint: Point): Boolean\r\n\t// Returns `true` if the given point has the same coordinates.\r\n\tequals: function (point) {\r\n\t\tpoint = toPoint(point);\r\n\r\n\t\treturn point.x === this.x &&\r\n\t\t point.y === this.y;\r\n\t},\r\n\r\n\t// @method contains(otherPoint: Point): Boolean\r\n\t// Returns `true` if both coordinates of the given point are less than the corresponding current point coordinates (in absolute values).\r\n\tcontains: function (point) {\r\n\t\tpoint = toPoint(point);\r\n\r\n\t\treturn Math.abs(point.x) <= Math.abs(this.x) &&\r\n\t\t Math.abs(point.y) <= Math.abs(this.y);\r\n\t},\r\n\r\n\t// @method toString(): String\r\n\t// Returns a string representation of the point for debugging purposes.\r\n\ttoString: function () {\r\n\t\treturn 'Point(' +\r\n\t\t formatNum(this.x) + ', ' +\r\n\t\t formatNum(this.y) + ')';\r\n\t}\r\n};\r\n\r\n// @factory L.point(x: Number, y: Number, round?: Boolean)\r\n// Creates a Point object with the given `x` and `y` coordinates. If optional `round` is set to true, rounds the `x` and `y` values.\r\n\r\n// @alternative\r\n// @factory L.point(coords: Number[])\r\n// Expects an array of the form `[x, y]` instead.\r\n\r\n// @alternative\r\n// @factory L.point(coords: Object)\r\n// Expects a plain object of the form `{x: Number, y: Number}` instead.\r\nfunction toPoint(x, y, round) {\r\n\tif (x instanceof Point) {\r\n\t\treturn x;\r\n\t}\r\n\tif (isArray(x)) {\r\n\t\treturn new Point(x[0], x[1]);\r\n\t}\r\n\tif (x === undefined || x === null) {\r\n\t\treturn x;\r\n\t}\r\n\tif (typeof x === 'object' && 'x' in x && 'y' in x) {\r\n\t\treturn new Point(x.x, x.y);\r\n\t}\r\n\treturn new Point(x, y, round);\r\n}\n\n/*\r\n * @class Bounds\r\n * @aka L.Bounds\r\n *\r\n * Represents a rectangular area in pixel coordinates.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var p1 = L.point(10, 10),\r\n * p2 = L.point(40, 60),\r\n * bounds = L.bounds(p1, p2);\r\n * ```\r\n *\r\n * All Leaflet methods that accept `Bounds` objects also accept them in a simple Array form (unless noted otherwise), so the bounds example above can be passed like this:\r\n *\r\n * ```js\r\n * otherBounds.intersects([[10, 10], [40, 60]]);\r\n * ```\r\n *\r\n * Note that `Bounds` does not inherit from Leaflet's `Class` object,\r\n * which means new classes can't inherit from it, and new methods\r\n * can't be added to it with the `include` function.\r\n */\r\n\r\nfunction Bounds(a, b) {\r\n\tif (!a) { return; }\r\n\r\n\tvar points = b ? [a, b] : a;\r\n\r\n\tfor (var i = 0, len = points.length; i < len; i++) {\r\n\t\tthis.extend(points[i]);\r\n\t}\r\n}\r\n\r\nBounds.prototype = {\r\n\t// @method extend(point: Point): this\r\n\t// Extends the bounds to contain the given point.\r\n\r\n\t// @alternative\r\n\t// @method extend(otherBounds: Bounds): this\r\n\t// Extend the bounds to contain the given bounds\r\n\textend: function (obj) {\r\n\t\tvar min2, max2;\r\n\t\tif (!obj) { return this; }\r\n\r\n\t\tif (obj instanceof Point || typeof obj[0] === 'number' || 'x' in obj) {\r\n\t\t\tmin2 = max2 = toPoint(obj);\r\n\t\t} else {\r\n\t\t\tobj = toBounds(obj);\r\n\t\t\tmin2 = obj.min;\r\n\t\t\tmax2 = obj.max;\r\n\r\n\t\t\tif (!min2 || !max2) { return this; }\r\n\t\t}\r\n\r\n\t\t// @property min: Point\r\n\t\t// The top left corner of the rectangle.\r\n\t\t// @property max: Point\r\n\t\t// The bottom right corner of the rectangle.\r\n\t\tif (!this.min && !this.max) {\r\n\t\t\tthis.min = min2.clone();\r\n\t\t\tthis.max = max2.clone();\r\n\t\t} else {\r\n\t\t\tthis.min.x = Math.min(min2.x, this.min.x);\r\n\t\t\tthis.max.x = Math.max(max2.x, this.max.x);\r\n\t\t\tthis.min.y = Math.min(min2.y, this.min.y);\r\n\t\t\tthis.max.y = Math.max(max2.y, this.max.y);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method getCenter(round?: Boolean): Point\r\n\t// Returns the center point of the bounds.\r\n\tgetCenter: function (round) {\r\n\t\treturn toPoint(\r\n\t\t (this.min.x + this.max.x) / 2,\r\n\t\t (this.min.y + this.max.y) / 2, round);\r\n\t},\r\n\r\n\t// @method getBottomLeft(): Point\r\n\t// Returns the bottom-left point of the bounds.\r\n\tgetBottomLeft: function () {\r\n\t\treturn toPoint(this.min.x, this.max.y);\r\n\t},\r\n\r\n\t// @method getTopRight(): Point\r\n\t// Returns the top-right point of the bounds.\r\n\tgetTopRight: function () { // -> Point\r\n\t\treturn toPoint(this.max.x, this.min.y);\r\n\t},\r\n\r\n\t// @method getTopLeft(): Point\r\n\t// Returns the top-left point of the bounds (i.e. [`this.min`](#bounds-min)).\r\n\tgetTopLeft: function () {\r\n\t\treturn this.min; // left, top\r\n\t},\r\n\r\n\t// @method getBottomRight(): Point\r\n\t// Returns the bottom-right point of the bounds (i.e. [`this.max`](#bounds-max)).\r\n\tgetBottomRight: function () {\r\n\t\treturn this.max; // right, bottom\r\n\t},\r\n\r\n\t// @method getSize(): Point\r\n\t// Returns the size of the given bounds\r\n\tgetSize: function () {\r\n\t\treturn this.max.subtract(this.min);\r\n\t},\r\n\r\n\t// @method contains(otherBounds: Bounds): Boolean\r\n\t// Returns `true` if the rectangle contains the given one.\r\n\t// @alternative\r\n\t// @method contains(point: Point): Boolean\r\n\t// Returns `true` if the rectangle contains the given point.\r\n\tcontains: function (obj) {\r\n\t\tvar min, max;\r\n\r\n\t\tif (typeof obj[0] === 'number' || obj instanceof Point) {\r\n\t\t\tobj = toPoint(obj);\r\n\t\t} else {\r\n\t\t\tobj = toBounds(obj);\r\n\t\t}\r\n\r\n\t\tif (obj instanceof Bounds) {\r\n\t\t\tmin = obj.min;\r\n\t\t\tmax = obj.max;\r\n\t\t} else {\r\n\t\t\tmin = max = obj;\r\n\t\t}\r\n\r\n\t\treturn (min.x >= this.min.x) &&\r\n\t\t (max.x <= this.max.x) &&\r\n\t\t (min.y >= this.min.y) &&\r\n\t\t (max.y <= this.max.y);\r\n\t},\r\n\r\n\t// @method intersects(otherBounds: Bounds): Boolean\r\n\t// Returns `true` if the rectangle intersects the given bounds. Two bounds\r\n\t// intersect if they have at least one point in common.\r\n\tintersects: function (bounds) { // (Bounds) -> Boolean\r\n\t\tbounds = toBounds(bounds);\r\n\r\n\t\tvar min = this.min,\r\n\t\t max = this.max,\r\n\t\t min2 = bounds.min,\r\n\t\t max2 = bounds.max,\r\n\t\t xIntersects = (max2.x >= min.x) && (min2.x <= max.x),\r\n\t\t yIntersects = (max2.y >= min.y) && (min2.y <= max.y);\r\n\r\n\t\treturn xIntersects && yIntersects;\r\n\t},\r\n\r\n\t// @method overlaps(otherBounds: Bounds): Boolean\r\n\t// Returns `true` if the rectangle overlaps the given bounds. Two bounds\r\n\t// overlap if their intersection is an area.\r\n\toverlaps: function (bounds) { // (Bounds) -> Boolean\r\n\t\tbounds = toBounds(bounds);\r\n\r\n\t\tvar min = this.min,\r\n\t\t max = this.max,\r\n\t\t min2 = bounds.min,\r\n\t\t max2 = bounds.max,\r\n\t\t xOverlaps = (max2.x > min.x) && (min2.x < max.x),\r\n\t\t yOverlaps = (max2.y > min.y) && (min2.y < max.y);\r\n\r\n\t\treturn xOverlaps && yOverlaps;\r\n\t},\r\n\r\n\t// @method isValid(): Boolean\r\n\t// Returns `true` if the bounds are properly initialized.\r\n\tisValid: function () {\r\n\t\treturn !!(this.min && this.max);\r\n\t},\r\n\r\n\r\n\t// @method pad(bufferRatio: Number): Bounds\r\n\t// Returns bounds created by extending or retracting the current bounds by a given ratio in each direction.\r\n\t// For example, a ratio of 0.5 extends the bounds by 50% in each direction.\r\n\t// Negative values will retract the bounds.\r\n\tpad: function (bufferRatio) {\r\n\t\tvar min = this.min,\r\n\t\tmax = this.max,\r\n\t\theightBuffer = Math.abs(min.x - max.x) * bufferRatio,\r\n\t\twidthBuffer = Math.abs(min.y - max.y) * bufferRatio;\r\n\r\n\r\n\t\treturn toBounds(\r\n\t\t\ttoPoint(min.x - heightBuffer, min.y - widthBuffer),\r\n\t\t\ttoPoint(max.x + heightBuffer, max.y + widthBuffer));\r\n\t},\r\n\r\n\r\n\t// @method equals(otherBounds: Bounds, maxMargin?: Number): Boolean\r\n\t// Returns `true` if the rectangle is equivalent (within a small margin of error) to the given bounds. The margin of error can be overridden by setting `maxMargin` to a small number.\r\n\tequals: function (bounds) {\r\n\t\tif (!bounds) { return false; }\r\n\r\n\t\tbounds = toBounds(bounds);\r\n\r\n\t\treturn this.min.equals(bounds.getTopLeft()) &&\r\n\t\t\tthis.max.equals(bounds.getBottomRight());\r\n\t},\r\n};\r\n\r\n\r\n// @factory L.bounds(corner1: Point, corner2: Point)\r\n// Creates a Bounds object from two corners coordinate pairs.\r\n// @alternative\r\n// @factory L.bounds(points: Point[])\r\n// Creates a Bounds object from the given array of points.\r\nfunction toBounds(a, b) {\r\n\tif (!a || a instanceof Bounds) {\r\n\t\treturn a;\r\n\t}\r\n\treturn new Bounds(a, b);\r\n}\n\n/*\r\n * @class LatLngBounds\r\n * @aka L.LatLngBounds\r\n *\r\n * Represents a rectangular geographical area on a map.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var corner1 = L.latLng(40.712, -74.227),\r\n * corner2 = L.latLng(40.774, -74.125),\r\n * bounds = L.latLngBounds(corner1, corner2);\r\n * ```\r\n *\r\n * All Leaflet methods that accept LatLngBounds objects also accept them in a simple Array form (unless noted otherwise), so the bounds example above can be passed like this:\r\n *\r\n * ```js\r\n * map.fitBounds([\r\n * \t[40.712, -74.227],\r\n * \t[40.774, -74.125]\r\n * ]);\r\n * ```\r\n *\r\n * Caution: if the area crosses the antimeridian (often confused with the International Date Line), you must specify corners _outside_ the [-180, 180] degrees longitude range.\r\n *\r\n * Note that `LatLngBounds` does not inherit from Leaflet's `Class` object,\r\n * which means new classes can't inherit from it, and new methods\r\n * can't be added to it with the `include` function.\r\n */\r\n\r\nfunction LatLngBounds(corner1, corner2) { // (LatLng, LatLng) or (LatLng[])\r\n\tif (!corner1) { return; }\r\n\r\n\tvar latlngs = corner2 ? [corner1, corner2] : corner1;\r\n\r\n\tfor (var i = 0, len = latlngs.length; i < len; i++) {\r\n\t\tthis.extend(latlngs[i]);\r\n\t}\r\n}\r\n\r\nLatLngBounds.prototype = {\r\n\r\n\t// @method extend(latlng: LatLng): this\r\n\t// Extend the bounds to contain the given point\r\n\r\n\t// @alternative\r\n\t// @method extend(otherBounds: LatLngBounds): this\r\n\t// Extend the bounds to contain the given bounds\r\n\textend: function (obj) {\r\n\t\tvar sw = this._southWest,\r\n\t\t ne = this._northEast,\r\n\t\t sw2, ne2;\r\n\r\n\t\tif (obj instanceof LatLng) {\r\n\t\t\tsw2 = obj;\r\n\t\t\tne2 = obj;\r\n\r\n\t\t} else if (obj instanceof LatLngBounds) {\r\n\t\t\tsw2 = obj._southWest;\r\n\t\t\tne2 = obj._northEast;\r\n\r\n\t\t\tif (!sw2 || !ne2) { return this; }\r\n\r\n\t\t} else {\r\n\t\t\treturn obj ? this.extend(toLatLng(obj) || toLatLngBounds(obj)) : this;\r\n\t\t}\r\n\r\n\t\tif (!sw && !ne) {\r\n\t\t\tthis._southWest = new LatLng(sw2.lat, sw2.lng);\r\n\t\t\tthis._northEast = new LatLng(ne2.lat, ne2.lng);\r\n\t\t} else {\r\n\t\t\tsw.lat = Math.min(sw2.lat, sw.lat);\r\n\t\t\tsw.lng = Math.min(sw2.lng, sw.lng);\r\n\t\t\tne.lat = Math.max(ne2.lat, ne.lat);\r\n\t\t\tne.lng = Math.max(ne2.lng, ne.lng);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method pad(bufferRatio: Number): LatLngBounds\r\n\t// Returns bounds created by extending or retracting the current bounds by a given ratio in each direction.\r\n\t// For example, a ratio of 0.5 extends the bounds by 50% in each direction.\r\n\t// Negative values will retract the bounds.\r\n\tpad: function (bufferRatio) {\r\n\t\tvar sw = this._southWest,\r\n\t\t ne = this._northEast,\r\n\t\t heightBuffer = Math.abs(sw.lat - ne.lat) * bufferRatio,\r\n\t\t widthBuffer = Math.abs(sw.lng - ne.lng) * bufferRatio;\r\n\r\n\t\treturn new LatLngBounds(\r\n\t\t new LatLng(sw.lat - heightBuffer, sw.lng - widthBuffer),\r\n\t\t new LatLng(ne.lat + heightBuffer, ne.lng + widthBuffer));\r\n\t},\r\n\r\n\t// @method getCenter(): LatLng\r\n\t// Returns the center point of the bounds.\r\n\tgetCenter: function () {\r\n\t\treturn new LatLng(\r\n\t\t (this._southWest.lat + this._northEast.lat) / 2,\r\n\t\t (this._southWest.lng + this._northEast.lng) / 2);\r\n\t},\r\n\r\n\t// @method getSouthWest(): LatLng\r\n\t// Returns the south-west point of the bounds.\r\n\tgetSouthWest: function () {\r\n\t\treturn this._southWest;\r\n\t},\r\n\r\n\t// @method getNorthEast(): LatLng\r\n\t// Returns the north-east point of the bounds.\r\n\tgetNorthEast: function () {\r\n\t\treturn this._northEast;\r\n\t},\r\n\r\n\t// @method getNorthWest(): LatLng\r\n\t// Returns the north-west point of the bounds.\r\n\tgetNorthWest: function () {\r\n\t\treturn new LatLng(this.getNorth(), this.getWest());\r\n\t},\r\n\r\n\t// @method getSouthEast(): LatLng\r\n\t// Returns the south-east point of the bounds.\r\n\tgetSouthEast: function () {\r\n\t\treturn new LatLng(this.getSouth(), this.getEast());\r\n\t},\r\n\r\n\t// @method getWest(): Number\r\n\t// Returns the west longitude of the bounds\r\n\tgetWest: function () {\r\n\t\treturn this._southWest.lng;\r\n\t},\r\n\r\n\t// @method getSouth(): Number\r\n\t// Returns the south latitude of the bounds\r\n\tgetSouth: function () {\r\n\t\treturn this._southWest.lat;\r\n\t},\r\n\r\n\t// @method getEast(): Number\r\n\t// Returns the east longitude of the bounds\r\n\tgetEast: function () {\r\n\t\treturn this._northEast.lng;\r\n\t},\r\n\r\n\t// @method getNorth(): Number\r\n\t// Returns the north latitude of the bounds\r\n\tgetNorth: function () {\r\n\t\treturn this._northEast.lat;\r\n\t},\r\n\r\n\t// @method contains(otherBounds: LatLngBounds): Boolean\r\n\t// Returns `true` if the rectangle contains the given one.\r\n\r\n\t// @alternative\r\n\t// @method contains (latlng: LatLng): Boolean\r\n\t// Returns `true` if the rectangle contains the given point.\r\n\tcontains: function (obj) { // (LatLngBounds) or (LatLng) -> Boolean\r\n\t\tif (typeof obj[0] === 'number' || obj instanceof LatLng || 'lat' in obj) {\r\n\t\t\tobj = toLatLng(obj);\r\n\t\t} else {\r\n\t\t\tobj = toLatLngBounds(obj);\r\n\t\t}\r\n\r\n\t\tvar sw = this._southWest,\r\n\t\t ne = this._northEast,\r\n\t\t sw2, ne2;\r\n\r\n\t\tif (obj instanceof LatLngBounds) {\r\n\t\t\tsw2 = obj.getSouthWest();\r\n\t\t\tne2 = obj.getNorthEast();\r\n\t\t} else {\r\n\t\t\tsw2 = ne2 = obj;\r\n\t\t}\r\n\r\n\t\treturn (sw2.lat >= sw.lat) && (ne2.lat <= ne.lat) &&\r\n\t\t (sw2.lng >= sw.lng) && (ne2.lng <= ne.lng);\r\n\t},\r\n\r\n\t// @method intersects(otherBounds: LatLngBounds): Boolean\r\n\t// Returns `true` if the rectangle intersects the given bounds. Two bounds intersect if they have at least one point in common.\r\n\tintersects: function (bounds) {\r\n\t\tbounds = toLatLngBounds(bounds);\r\n\r\n\t\tvar sw = this._southWest,\r\n\t\t ne = this._northEast,\r\n\t\t sw2 = bounds.getSouthWest(),\r\n\t\t ne2 = bounds.getNorthEast(),\r\n\r\n\t\t latIntersects = (ne2.lat >= sw.lat) && (sw2.lat <= ne.lat),\r\n\t\t lngIntersects = (ne2.lng >= sw.lng) && (sw2.lng <= ne.lng);\r\n\r\n\t\treturn latIntersects && lngIntersects;\r\n\t},\r\n\r\n\t// @method overlaps(otherBounds: LatLngBounds): Boolean\r\n\t// Returns `true` if the rectangle overlaps the given bounds. Two bounds overlap if their intersection is an area.\r\n\toverlaps: function (bounds) {\r\n\t\tbounds = toLatLngBounds(bounds);\r\n\r\n\t\tvar sw = this._southWest,\r\n\t\t ne = this._northEast,\r\n\t\t sw2 = bounds.getSouthWest(),\r\n\t\t ne2 = bounds.getNorthEast(),\r\n\r\n\t\t latOverlaps = (ne2.lat > sw.lat) && (sw2.lat < ne.lat),\r\n\t\t lngOverlaps = (ne2.lng > sw.lng) && (sw2.lng < ne.lng);\r\n\r\n\t\treturn latOverlaps && lngOverlaps;\r\n\t},\r\n\r\n\t// @method toBBoxString(): String\r\n\t// Returns a string with bounding box coordinates in a 'southwest_lng,southwest_lat,northeast_lng,northeast_lat' format. Useful for sending requests to web services that return geo data.\r\n\ttoBBoxString: function () {\r\n\t\treturn [this.getWest(), this.getSouth(), this.getEast(), this.getNorth()].join(',');\r\n\t},\r\n\r\n\t// @method equals(otherBounds: LatLngBounds, maxMargin?: Number): Boolean\r\n\t// Returns `true` if the rectangle is equivalent (within a small margin of error) to the given bounds. The margin of error can be overridden by setting `maxMargin` to a small number.\r\n\tequals: function (bounds, maxMargin) {\r\n\t\tif (!bounds) { return false; }\r\n\r\n\t\tbounds = toLatLngBounds(bounds);\r\n\r\n\t\treturn this._southWest.equals(bounds.getSouthWest(), maxMargin) &&\r\n\t\t this._northEast.equals(bounds.getNorthEast(), maxMargin);\r\n\t},\r\n\r\n\t// @method isValid(): Boolean\r\n\t// Returns `true` if the bounds are properly initialized.\r\n\tisValid: function () {\r\n\t\treturn !!(this._southWest && this._northEast);\r\n\t}\r\n};\r\n\r\n// TODO International date line?\r\n\r\n// @factory L.latLngBounds(corner1: LatLng, corner2: LatLng)\r\n// Creates a `LatLngBounds` object by defining two diagonally opposite corners of the rectangle.\r\n\r\n// @alternative\r\n// @factory L.latLngBounds(latlngs: LatLng[])\r\n// Creates a `LatLngBounds` object defined by the geographical points it contains. Very useful for zooming the map to fit a particular set of locations with [`fitBounds`](#map-fitbounds).\r\nfunction toLatLngBounds(a, b) {\r\n\tif (a instanceof LatLngBounds) {\r\n\t\treturn a;\r\n\t}\r\n\treturn new LatLngBounds(a, b);\r\n}\n\n/* @class LatLng\r\n * @aka L.LatLng\r\n *\r\n * Represents a geographical point with a certain latitude and longitude.\r\n *\r\n * @example\r\n *\r\n * ```\r\n * var latlng = L.latLng(50.5, 30.5);\r\n * ```\r\n *\r\n * All Leaflet methods that accept LatLng objects also accept them in a simple Array form and simple object form (unless noted otherwise), so these lines are equivalent:\r\n *\r\n * ```\r\n * map.panTo([50, 30]);\r\n * map.panTo({lon: 30, lat: 50});\r\n * map.panTo({lat: 50, lng: 30});\r\n * map.panTo(L.latLng(50, 30));\r\n * ```\r\n *\r\n * Note that `LatLng` does not inherit from Leaflet's `Class` object,\r\n * which means new classes can't inherit from it, and new methods\r\n * can't be added to it with the `include` function.\r\n */\r\n\r\nfunction LatLng(lat, lng, alt) {\r\n\tif (isNaN(lat) || isNaN(lng)) {\r\n\t\tthrow new Error('Invalid LatLng object: (' + lat + ', ' + lng + ')');\r\n\t}\r\n\r\n\t// @property lat: Number\r\n\t// Latitude in degrees\r\n\tthis.lat = +lat;\r\n\r\n\t// @property lng: Number\r\n\t// Longitude in degrees\r\n\tthis.lng = +lng;\r\n\r\n\t// @property alt: Number\r\n\t// Altitude in meters (optional)\r\n\tif (alt !== undefined) {\r\n\t\tthis.alt = +alt;\r\n\t}\r\n}\r\n\r\nLatLng.prototype = {\r\n\t// @method equals(otherLatLng: LatLng, maxMargin?: Number): Boolean\r\n\t// Returns `true` if the given `LatLng` point is at the same position (within a small margin of error). The margin of error can be overridden by setting `maxMargin` to a small number.\r\n\tequals: function (obj, maxMargin) {\r\n\t\tif (!obj) { return false; }\r\n\r\n\t\tobj = toLatLng(obj);\r\n\r\n\t\tvar margin = Math.max(\r\n\t\t Math.abs(this.lat - obj.lat),\r\n\t\t Math.abs(this.lng - obj.lng));\r\n\r\n\t\treturn margin <= (maxMargin === undefined ? 1.0E-9 : maxMargin);\r\n\t},\r\n\r\n\t// @method toString(): String\r\n\t// Returns a string representation of the point (for debugging purposes).\r\n\ttoString: function (precision) {\r\n\t\treturn 'LatLng(' +\r\n\t\t formatNum(this.lat, precision) + ', ' +\r\n\t\t formatNum(this.lng, precision) + ')';\r\n\t},\r\n\r\n\t// @method distanceTo(otherLatLng: LatLng): Number\r\n\t// Returns the distance (in meters) to the given `LatLng` calculated using the [Spherical Law of Cosines](https://en.wikipedia.org/wiki/Spherical_law_of_cosines).\r\n\tdistanceTo: function (other) {\r\n\t\treturn Earth.distance(this, toLatLng(other));\r\n\t},\r\n\r\n\t// @method wrap(): LatLng\r\n\t// Returns a new `LatLng` object with the longitude wrapped so it's always between -180 and +180 degrees.\r\n\twrap: function () {\r\n\t\treturn Earth.wrapLatLng(this);\r\n\t},\r\n\r\n\t// @method toBounds(sizeInMeters: Number): LatLngBounds\r\n\t// Returns a new `LatLngBounds` object in which each boundary is `sizeInMeters/2` meters apart from the `LatLng`.\r\n\ttoBounds: function (sizeInMeters) {\r\n\t\tvar latAccuracy = 180 * sizeInMeters / 40075017,\r\n\t\t lngAccuracy = latAccuracy / Math.cos((Math.PI / 180) * this.lat);\r\n\r\n\t\treturn toLatLngBounds(\r\n\t\t [this.lat - latAccuracy, this.lng - lngAccuracy],\r\n\t\t [this.lat + latAccuracy, this.lng + lngAccuracy]);\r\n\t},\r\n\r\n\tclone: function () {\r\n\t\treturn new LatLng(this.lat, this.lng, this.alt);\r\n\t}\r\n};\r\n\r\n\r\n\r\n// @factory L.latLng(latitude: Number, longitude: Number, altitude?: Number): LatLng\r\n// Creates an object representing a geographical point with the given latitude and longitude (and optionally altitude).\r\n\r\n// @alternative\r\n// @factory L.latLng(coords: Array): LatLng\r\n// Expects an array of the form `[Number, Number]` or `[Number, Number, Number]` instead.\r\n\r\n// @alternative\r\n// @factory L.latLng(coords: Object): LatLng\r\n// Expects an plain object of the form `{lat: Number, lng: Number}` or `{lat: Number, lng: Number, alt: Number}` instead.\r\n\r\nfunction toLatLng(a, b, c) {\r\n\tif (a instanceof LatLng) {\r\n\t\treturn a;\r\n\t}\r\n\tif (isArray(a) && typeof a[0] !== 'object') {\r\n\t\tif (a.length === 3) {\r\n\t\t\treturn new LatLng(a[0], a[1], a[2]);\r\n\t\t}\r\n\t\tif (a.length === 2) {\r\n\t\t\treturn new LatLng(a[0], a[1]);\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\tif (a === undefined || a === null) {\r\n\t\treturn a;\r\n\t}\r\n\tif (typeof a === 'object' && 'lat' in a) {\r\n\t\treturn new LatLng(a.lat, 'lng' in a ? a.lng : a.lon, a.alt);\r\n\t}\r\n\tif (b === undefined) {\r\n\t\treturn null;\r\n\t}\r\n\treturn new LatLng(a, b, c);\r\n}\n\n/*\r\n * @namespace CRS\r\n * @crs L.CRS.Base\r\n * Object that defines coordinate reference systems for projecting\r\n * geographical points into pixel (screen) coordinates and back (and to\r\n * coordinates in other units for [WMS](https://en.wikipedia.org/wiki/Web_Map_Service) services). See\r\n * [spatial reference system](https://en.wikipedia.org/wiki/Spatial_reference_system).\r\n *\r\n * Leaflet defines the most usual CRSs by default. If you want to use a\r\n * CRS not defined by default, take a look at the\r\n * [Proj4Leaflet](https://github.com/kartena/Proj4Leaflet) plugin.\r\n *\r\n * Note that the CRS instances do not inherit from Leaflet's `Class` object,\r\n * and can't be instantiated. Also, new classes can't inherit from them,\r\n * and methods can't be added to them with the `include` function.\r\n */\r\n\r\nvar CRS = {\r\n\t// @method latLngToPoint(latlng: LatLng, zoom: Number): Point\r\n\t// Projects geographical coordinates into pixel coordinates for a given zoom.\r\n\tlatLngToPoint: function (latlng, zoom) {\r\n\t\tvar projectedPoint = this.projection.project(latlng),\r\n\t\t scale = this.scale(zoom);\r\n\r\n\t\treturn this.transformation._transform(projectedPoint, scale);\r\n\t},\r\n\r\n\t// @method pointToLatLng(point: Point, zoom: Number): LatLng\r\n\t// The inverse of `latLngToPoint`. Projects pixel coordinates on a given\r\n\t// zoom into geographical coordinates.\r\n\tpointToLatLng: function (point, zoom) {\r\n\t\tvar scale = this.scale(zoom),\r\n\t\t untransformedPoint = this.transformation.untransform(point, scale);\r\n\r\n\t\treturn this.projection.unproject(untransformedPoint);\r\n\t},\r\n\r\n\t// @method project(latlng: LatLng): Point\r\n\t// Projects geographical coordinates into coordinates in units accepted for\r\n\t// this CRS (e.g. meters for EPSG:3857, for passing it to WMS services).\r\n\tproject: function (latlng) {\r\n\t\treturn this.projection.project(latlng);\r\n\t},\r\n\r\n\t// @method unproject(point: Point): LatLng\r\n\t// Given a projected coordinate returns the corresponding LatLng.\r\n\t// The inverse of `project`.\r\n\tunproject: function (point) {\r\n\t\treturn this.projection.unproject(point);\r\n\t},\r\n\r\n\t// @method scale(zoom: Number): Number\r\n\t// Returns the scale used when transforming projected coordinates into\r\n\t// pixel coordinates for a particular zoom. For example, it returns\r\n\t// `256 * 2^zoom` for Mercator-based CRS.\r\n\tscale: function (zoom) {\r\n\t\treturn 256 * Math.pow(2, zoom);\r\n\t},\r\n\r\n\t// @method zoom(scale: Number): Number\r\n\t// Inverse of `scale()`, returns the zoom level corresponding to a scale\r\n\t// factor of `scale`.\r\n\tzoom: function (scale) {\r\n\t\treturn Math.log(scale / 256) / Math.LN2;\r\n\t},\r\n\r\n\t// @method getProjectedBounds(zoom: Number): Bounds\r\n\t// Returns the projection's bounds scaled and transformed for the provided `zoom`.\r\n\tgetProjectedBounds: function (zoom) {\r\n\t\tif (this.infinite) { return null; }\r\n\r\n\t\tvar b = this.projection.bounds,\r\n\t\t s = this.scale(zoom),\r\n\t\t min = this.transformation.transform(b.min, s),\r\n\t\t max = this.transformation.transform(b.max, s);\r\n\r\n\t\treturn new Bounds(min, max);\r\n\t},\r\n\r\n\t// @method distance(latlng1: LatLng, latlng2: LatLng): Number\r\n\t// Returns the distance between two geographical coordinates.\r\n\r\n\t// @property code: String\r\n\t// Standard code name of the CRS passed into WMS services (e.g. `'EPSG:3857'`)\r\n\t//\r\n\t// @property wrapLng: Number[]\r\n\t// An array of two numbers defining whether the longitude (horizontal) coordinate\r\n\t// axis wraps around a given range and how. Defaults to `[-180, 180]` in most\r\n\t// geographical CRSs. If `undefined`, the longitude axis does not wrap around.\r\n\t//\r\n\t// @property wrapLat: Number[]\r\n\t// Like `wrapLng`, but for the latitude (vertical) axis.\r\n\r\n\t// wrapLng: [min, max],\r\n\t// wrapLat: [min, max],\r\n\r\n\t// @property infinite: Boolean\r\n\t// If true, the coordinate space will be unbounded (infinite in both axes)\r\n\tinfinite: false,\r\n\r\n\t// @method wrapLatLng(latlng: LatLng): LatLng\r\n\t// Returns a `LatLng` where lat and lng has been wrapped according to the\r\n\t// CRS's `wrapLat` and `wrapLng` properties, if they are outside the CRS's bounds.\r\n\twrapLatLng: function (latlng) {\r\n\t\tvar lng = this.wrapLng ? wrapNum(latlng.lng, this.wrapLng, true) : latlng.lng,\r\n\t\t lat = this.wrapLat ? wrapNum(latlng.lat, this.wrapLat, true) : latlng.lat,\r\n\t\t alt = latlng.alt;\r\n\r\n\t\treturn new LatLng(lat, lng, alt);\r\n\t},\r\n\r\n\t// @method wrapLatLngBounds(bounds: LatLngBounds): LatLngBounds\r\n\t// Returns a `LatLngBounds` with the same size as the given one, ensuring\r\n\t// that its center is within the CRS's bounds.\r\n\t// Only accepts actual `L.LatLngBounds` instances, not arrays.\r\n\twrapLatLngBounds: function (bounds) {\r\n\t\tvar center = bounds.getCenter(),\r\n\t\t newCenter = this.wrapLatLng(center),\r\n\t\t latShift = center.lat - newCenter.lat,\r\n\t\t lngShift = center.lng - newCenter.lng;\r\n\r\n\t\tif (latShift === 0 && lngShift === 0) {\r\n\t\t\treturn bounds;\r\n\t\t}\r\n\r\n\t\tvar sw = bounds.getSouthWest(),\r\n\t\t ne = bounds.getNorthEast(),\r\n\t\t newSw = new LatLng(sw.lat - latShift, sw.lng - lngShift),\r\n\t\t newNe = new LatLng(ne.lat - latShift, ne.lng - lngShift);\r\n\r\n\t\treturn new LatLngBounds(newSw, newNe);\r\n\t}\r\n};\n\n/*\n * @namespace CRS\n * @crs L.CRS.Earth\n *\n * Serves as the base for CRS that are global such that they cover the earth.\n * Can only be used as the base for other CRS and cannot be used directly,\n * since it does not have a `code`, `projection` or `transformation`. `distance()` returns\n * meters.\n */\n\nvar Earth = extend({}, CRS, {\n\twrapLng: [-180, 180],\n\n\t// Mean Earth Radius, as recommended for use by\n\t// the International Union of Geodesy and Geophysics,\n\t// see https://rosettacode.org/wiki/Haversine_formula\n\tR: 6371000,\n\n\t// distance between two geographical points using spherical law of cosines approximation\n\tdistance: function (latlng1, latlng2) {\n\t\tvar rad = Math.PI / 180,\n\t\t lat1 = latlng1.lat * rad,\n\t\t lat2 = latlng2.lat * rad,\n\t\t sinDLat = Math.sin((latlng2.lat - latlng1.lat) * rad / 2),\n\t\t sinDLon = Math.sin((latlng2.lng - latlng1.lng) * rad / 2),\n\t\t a = sinDLat * sinDLat + Math.cos(lat1) * Math.cos(lat2) * sinDLon * sinDLon,\n\t\t c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n\t\treturn this.R * c;\n\t}\n});\n\n/*\r\n * @namespace Projection\r\n * @projection L.Projection.SphericalMercator\r\n *\r\n * Spherical Mercator projection — the most common projection for online maps,\r\n * used by almost all free and commercial tile providers. Assumes that Earth is\r\n * a sphere. Used by the `EPSG:3857` CRS.\r\n */\r\n\r\nvar earthRadius = 6378137;\r\n\r\nvar SphericalMercator = {\r\n\r\n\tR: earthRadius,\r\n\tMAX_LATITUDE: 85.0511287798,\r\n\r\n\tproject: function (latlng) {\r\n\t\tvar d = Math.PI / 180,\r\n\t\t max = this.MAX_LATITUDE,\r\n\t\t lat = Math.max(Math.min(max, latlng.lat), -max),\r\n\t\t sin = Math.sin(lat * d);\r\n\r\n\t\treturn new Point(\r\n\t\t\tthis.R * latlng.lng * d,\r\n\t\t\tthis.R * Math.log((1 + sin) / (1 - sin)) / 2);\r\n\t},\r\n\r\n\tunproject: function (point) {\r\n\t\tvar d = 180 / Math.PI;\r\n\r\n\t\treturn new LatLng(\r\n\t\t\t(2 * Math.atan(Math.exp(point.y / this.R)) - (Math.PI / 2)) * d,\r\n\t\t\tpoint.x * d / this.R);\r\n\t},\r\n\r\n\tbounds: (function () {\r\n\t\tvar d = earthRadius * Math.PI;\r\n\t\treturn new Bounds([-d, -d], [d, d]);\r\n\t})()\r\n};\n\n/*\r\n * @class Transformation\r\n * @aka L.Transformation\r\n *\r\n * Represents an affine transformation: a set of coefficients `a`, `b`, `c`, `d`\r\n * for transforming a point of a form `(x, y)` into `(a*x + b, c*y + d)` and doing\r\n * the reverse. Used by Leaflet in its projections code.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var transformation = L.transformation(2, 5, -1, 10),\r\n * \tp = L.point(1, 2),\r\n * \tp2 = transformation.transform(p), // L.point(7, 8)\r\n * \tp3 = transformation.untransform(p2); // L.point(1, 2)\r\n * ```\r\n */\r\n\r\n\r\n// factory new L.Transformation(a: Number, b: Number, c: Number, d: Number)\r\n// Creates a `Transformation` object with the given coefficients.\r\nfunction Transformation(a, b, c, d) {\r\n\tif (isArray(a)) {\r\n\t\t// use array properties\r\n\t\tthis._a = a[0];\r\n\t\tthis._b = a[1];\r\n\t\tthis._c = a[2];\r\n\t\tthis._d = a[3];\r\n\t\treturn;\r\n\t}\r\n\tthis._a = a;\r\n\tthis._b = b;\r\n\tthis._c = c;\r\n\tthis._d = d;\r\n}\r\n\r\nTransformation.prototype = {\r\n\t// @method transform(point: Point, scale?: Number): Point\r\n\t// Returns a transformed point, optionally multiplied by the given scale.\r\n\t// Only accepts actual `L.Point` instances, not arrays.\r\n\ttransform: function (point, scale) { // (Point, Number) -> Point\r\n\t\treturn this._transform(point.clone(), scale);\r\n\t},\r\n\r\n\t// destructive transform (faster)\r\n\t_transform: function (point, scale) {\r\n\t\tscale = scale || 1;\r\n\t\tpoint.x = scale * (this._a * point.x + this._b);\r\n\t\tpoint.y = scale * (this._c * point.y + this._d);\r\n\t\treturn point;\r\n\t},\r\n\r\n\t// @method untransform(point: Point, scale?: Number): Point\r\n\t// Returns the reverse transformation of the given point, optionally divided\r\n\t// by the given scale. Only accepts actual `L.Point` instances, not arrays.\r\n\tuntransform: function (point, scale) {\r\n\t\tscale = scale || 1;\r\n\t\treturn new Point(\r\n\t\t (point.x / scale - this._b) / this._a,\r\n\t\t (point.y / scale - this._d) / this._c);\r\n\t}\r\n};\r\n\r\n// factory L.transformation(a: Number, b: Number, c: Number, d: Number)\r\n\r\n// @factory L.transformation(a: Number, b: Number, c: Number, d: Number)\r\n// Instantiates a Transformation object with the given coefficients.\r\n\r\n// @alternative\r\n// @factory L.transformation(coefficients: Array): Transformation\r\n// Expects an coefficients array of the form\r\n// `[a: Number, b: Number, c: Number, d: Number]`.\r\n\r\nfunction toTransformation(a, b, c, d) {\r\n\treturn new Transformation(a, b, c, d);\r\n}\n\n/*\r\n * @namespace CRS\r\n * @crs L.CRS.EPSG3857\r\n *\r\n * The most common CRS for online maps, used by almost all free and commercial\r\n * tile providers. Uses Spherical Mercator projection. Set in by default in\r\n * Map's `crs` option.\r\n */\r\n\r\nvar EPSG3857 = extend({}, Earth, {\r\n\tcode: 'EPSG:3857',\r\n\tprojection: SphericalMercator,\r\n\r\n\ttransformation: (function () {\r\n\t\tvar scale = 0.5 / (Math.PI * SphericalMercator.R);\r\n\t\treturn toTransformation(scale, 0.5, -scale, 0.5);\r\n\t}())\r\n});\r\n\r\nvar EPSG900913 = extend({}, EPSG3857, {\r\n\tcode: 'EPSG:900913'\r\n});\n\n// @namespace SVG; @section\n// There are several static functions which can be called without instantiating L.SVG:\n\n// @function create(name: String): SVGElement\n// Returns a instance of [SVGElement](https://developer.mozilla.org/docs/Web/API/SVGElement),\n// corresponding to the class name passed. For example, using 'line' will return\n// an instance of [SVGLineElement](https://developer.mozilla.org/docs/Web/API/SVGLineElement).\nfunction svgCreate(name) {\n\treturn document.createElementNS('http://www.w3.org/2000/svg', name);\n}\n\n// @function pointsToPath(rings: Point[], closed: Boolean): String\n// Generates a SVG path string for multiple rings, with each ring turning\n// into \"M..L..L..\" instructions\nfunction pointsToPath(rings, closed) {\n\tvar str = '',\n\ti, j, len, len2, points, p;\n\n\tfor (i = 0, len = rings.length; i < len; i++) {\n\t\tpoints = rings[i];\n\n\t\tfor (j = 0, len2 = points.length; j < len2; j++) {\n\t\t\tp = points[j];\n\t\t\tstr += (j ? 'L' : 'M') + p.x + ' ' + p.y;\n\t\t}\n\n\t\t// closes the ring for polygons; \"x\" is VML syntax\n\t\tstr += closed ? (Browser.svg ? 'z' : 'x') : '';\n\t}\n\n\t// SVG complains about empty path strings\n\treturn str || 'M0 0';\n}\n\n/*\r\n * @namespace Browser\r\n * @aka L.Browser\r\n *\r\n * A namespace with static properties for browser/feature detection used by Leaflet internally.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * if (L.Browser.ielt9) {\r\n * alert('Upgrade your browser, dude!');\r\n * }\r\n * ```\r\n */\r\n\r\nvar style = document.documentElement.style;\r\n\r\n// @property ie: Boolean; `true` for all Internet Explorer versions (not Edge).\r\nvar ie = 'ActiveXObject' in window;\r\n\r\n// @property ielt9: Boolean; `true` for Internet Explorer versions less than 9.\r\nvar ielt9 = ie && !document.addEventListener;\r\n\r\n// @property edge: Boolean; `true` for the Edge web browser.\r\nvar edge = 'msLaunchUri' in navigator && !('documentMode' in document);\r\n\r\n// @property webkit: Boolean;\r\n// `true` for webkit-based browsers like Chrome and Safari (including mobile versions).\r\nvar webkit = userAgentContains('webkit');\r\n\r\n// @property android: Boolean\r\n// **Deprecated.** `true` for any browser running on an Android platform.\r\nvar android = userAgentContains('android');\r\n\r\n// @property android23: Boolean; **Deprecated.** `true` for browsers running on Android 2 or Android 3.\r\nvar android23 = userAgentContains('android 2') || userAgentContains('android 3');\r\n\r\n/* See https://stackoverflow.com/a/17961266 for details on detecting stock Android */\r\nvar webkitVer = parseInt(/WebKit\\/([0-9]+)|$/.exec(navigator.userAgent)[1], 10); // also matches AppleWebKit\r\n// @property androidStock: Boolean; **Deprecated.** `true` for the Android stock browser (i.e. not Chrome)\r\nvar androidStock = android && userAgentContains('Google') && webkitVer < 537 && !('AudioNode' in window);\r\n\r\n// @property opera: Boolean; `true` for the Opera browser\r\nvar opera = !!window.opera;\r\n\r\n// @property chrome: Boolean; `true` for the Chrome browser.\r\nvar chrome = !edge && userAgentContains('chrome');\r\n\r\n// @property gecko: Boolean; `true` for gecko-based browsers like Firefox.\r\nvar gecko = userAgentContains('gecko') && !webkit && !opera && !ie;\r\n\r\n// @property safari: Boolean; `true` for the Safari browser.\r\nvar safari = !chrome && userAgentContains('safari');\r\n\r\nvar phantom = userAgentContains('phantom');\r\n\r\n// @property opera12: Boolean\r\n// `true` for the Opera browser supporting CSS transforms (version 12 or later).\r\nvar opera12 = 'OTransition' in style;\r\n\r\n// @property win: Boolean; `true` when the browser is running in a Windows platform\r\nvar win = navigator.platform.indexOf('Win') === 0;\r\n\r\n// @property ie3d: Boolean; `true` for all Internet Explorer versions supporting CSS transforms.\r\nvar ie3d = ie && ('transition' in style);\r\n\r\n// @property webkit3d: Boolean; `true` for webkit-based browsers supporting CSS transforms.\r\nvar webkit3d = ('WebKitCSSMatrix' in window) && ('m11' in new window.WebKitCSSMatrix()) && !android23;\r\n\r\n// @property gecko3d: Boolean; `true` for gecko-based browsers supporting CSS transforms.\r\nvar gecko3d = 'MozPerspective' in style;\r\n\r\n// @property any3d: Boolean\r\n// `true` for all browsers supporting CSS transforms.\r\nvar any3d = !window.L_DISABLE_3D && (ie3d || webkit3d || gecko3d) && !opera12 && !phantom;\r\n\r\n// @property mobile: Boolean; `true` for all browsers running in a mobile device.\r\nvar mobile = typeof orientation !== 'undefined' || userAgentContains('mobile');\r\n\r\n// @property mobileWebkit: Boolean; `true` for all webkit-based browsers in a mobile device.\r\nvar mobileWebkit = mobile && webkit;\r\n\r\n// @property mobileWebkit3d: Boolean\r\n// `true` for all webkit-based browsers in a mobile device supporting CSS transforms.\r\nvar mobileWebkit3d = mobile && webkit3d;\r\n\r\n// @property msPointer: Boolean\r\n// `true` for browsers implementing the Microsoft touch events model (notably IE10).\r\nvar msPointer = !window.PointerEvent && window.MSPointerEvent;\r\n\r\n// @property pointer: Boolean\r\n// `true` for all browsers supporting [pointer events](https://msdn.microsoft.com/en-us/library/dn433244%28v=vs.85%29.aspx).\r\nvar pointer = !!(window.PointerEvent || msPointer);\r\n\r\n// @property touchNative: Boolean\r\n// `true` for all browsers supporting [touch events](https://developer.mozilla.org/docs/Web/API/Touch_events).\r\n// **This does not necessarily mean** that the browser is running in a computer with\r\n// a touchscreen, it only means that the browser is capable of understanding\r\n// touch events.\r\nvar touchNative = 'ontouchstart' in window || !!window.TouchEvent;\r\n\r\n// @property touch: Boolean\r\n// `true` for all browsers supporting either [touch](#browser-touch) or [pointer](#browser-pointer) events.\r\n// Note: pointer events will be preferred (if available), and processed for all `touch*` listeners.\r\nvar touch = !window.L_NO_TOUCH && (touchNative || pointer);\r\n\r\n// @property mobileOpera: Boolean; `true` for the Opera browser in a mobile device.\r\nvar mobileOpera = mobile && opera;\r\n\r\n// @property mobileGecko: Boolean\r\n// `true` for gecko-based browsers running in a mobile device.\r\nvar mobileGecko = mobile && gecko;\r\n\r\n// @property retina: Boolean\r\n// `true` for browsers on a high-resolution \"retina\" screen or on any screen when browser's display zoom is more than 100%.\r\nvar retina = (window.devicePixelRatio || (window.screen.deviceXDPI / window.screen.logicalXDPI)) > 1;\r\n\r\n// @property passiveEvents: Boolean\r\n// `true` for browsers that support passive events.\r\nvar passiveEvents = (function () {\r\n\tvar supportsPassiveOption = false;\r\n\ttry {\r\n\t\tvar opts = Object.defineProperty({}, 'passive', {\r\n\t\t\tget: function () { // eslint-disable-line getter-return\r\n\t\t\t\tsupportsPassiveOption = true;\r\n\t\t\t}\r\n\t\t});\r\n\t\twindow.addEventListener('testPassiveEventSupport', falseFn, opts);\r\n\t\twindow.removeEventListener('testPassiveEventSupport', falseFn, opts);\r\n\t} catch (e) {\r\n\t\t// Errors can safely be ignored since this is only a browser support test.\r\n\t}\r\n\treturn supportsPassiveOption;\r\n}());\r\n\r\n// @property canvas: Boolean\r\n// `true` when the browser supports [`<canvas>`](https://developer.mozilla.org/docs/Web/API/Canvas_API).\r\nvar canvas$1 = (function () {\r\n\treturn !!document.createElement('canvas').getContext;\r\n}());\r\n\r\n// @property svg: Boolean\r\n// `true` when the browser supports [SVG](https://developer.mozilla.org/docs/Web/SVG).\r\nvar svg$1 = !!(document.createElementNS && svgCreate('svg').createSVGRect);\r\n\r\nvar inlineSvg = !!svg$1 && (function () {\r\n\tvar div = document.createElement('div');\r\n\tdiv.innerHTML = '<svg/>';\r\n\treturn (div.firstChild && div.firstChild.namespaceURI) === 'http://www.w3.org/2000/svg';\r\n})();\r\n\r\n// @property vml: Boolean\r\n// `true` if the browser supports [VML](https://en.wikipedia.org/wiki/Vector_Markup_Language).\r\nvar vml = !svg$1 && (function () {\r\n\ttry {\r\n\t\tvar div = document.createElement('div');\r\n\t\tdiv.innerHTML = '<v:shape adj=\"1\"/>';\r\n\r\n\t\tvar shape = div.firstChild;\r\n\t\tshape.style.behavior = 'url(#default#VML)';\r\n\r\n\t\treturn shape && (typeof shape.adj === 'object');\r\n\r\n\t} catch (e) {\r\n\t\treturn false;\r\n\t}\r\n}());\r\n\r\n\r\n// @property mac: Boolean; `true` when the browser is running in a Mac platform\r\nvar mac = navigator.platform.indexOf('Mac') === 0;\r\n\r\n// @property mac: Boolean; `true` when the browser is running in a Linux platform\r\nvar linux = navigator.platform.indexOf('Linux') === 0;\r\n\r\nfunction userAgentContains(str) {\r\n\treturn navigator.userAgent.toLowerCase().indexOf(str) >= 0;\r\n}\r\n\r\n\r\nvar Browser = {\r\n\tie: ie,\r\n\tielt9: ielt9,\r\n\tedge: edge,\r\n\twebkit: webkit,\r\n\tandroid: android,\r\n\tandroid23: android23,\r\n\tandroidStock: androidStock,\r\n\topera: opera,\r\n\tchrome: chrome,\r\n\tgecko: gecko,\r\n\tsafari: safari,\r\n\tphantom: phantom,\r\n\topera12: opera12,\r\n\twin: win,\r\n\tie3d: ie3d,\r\n\twebkit3d: webkit3d,\r\n\tgecko3d: gecko3d,\r\n\tany3d: any3d,\r\n\tmobile: mobile,\r\n\tmobileWebkit: mobileWebkit,\r\n\tmobileWebkit3d: mobileWebkit3d,\r\n\tmsPointer: msPointer,\r\n\tpointer: pointer,\r\n\ttouch: touch,\r\n\ttouchNative: touchNative,\r\n\tmobileOpera: mobileOpera,\r\n\tmobileGecko: mobileGecko,\r\n\tretina: retina,\r\n\tpassiveEvents: passiveEvents,\r\n\tcanvas: canvas$1,\r\n\tsvg: svg$1,\r\n\tvml: vml,\r\n\tinlineSvg: inlineSvg,\r\n\tmac: mac,\r\n\tlinux: linux\r\n};\n\n/*\n * Extends L.DomEvent to provide touch support for Internet Explorer and Windows-based devices.\n */\n\nvar POINTER_DOWN = Browser.msPointer ? 'MSPointerDown' : 'pointerdown';\nvar POINTER_MOVE = Browser.msPointer ? 'MSPointerMove' : 'pointermove';\nvar POINTER_UP = Browser.msPointer ? 'MSPointerUp' : 'pointerup';\nvar POINTER_CANCEL = Browser.msPointer ? 'MSPointerCancel' : 'pointercancel';\nvar pEvent = {\n\ttouchstart : POINTER_DOWN,\n\ttouchmove : POINTER_MOVE,\n\ttouchend : POINTER_UP,\n\ttouchcancel : POINTER_CANCEL\n};\nvar handle = {\n\ttouchstart : _onPointerStart,\n\ttouchmove : _handlePointer,\n\ttouchend : _handlePointer,\n\ttouchcancel : _handlePointer\n};\nvar _pointers = {};\nvar _pointerDocListener = false;\n\n// Provides a touch events wrapper for (ms)pointer events.\n// ref https://www.w3.org/TR/pointerevents/ https://www.w3.org/Bugs/Public/show_bug.cgi?id=22890\n\nfunction addPointerListener(obj, type, handler) {\n\tif (type === 'touchstart') {\n\t\t_addPointerDocListener();\n\t}\n\tif (!handle[type]) {\n\t\tconsole.warn('wrong event specified:', type);\n\t\treturn L.Util.falseFn;\n\t}\n\thandler = handle[type].bind(this, handler);\n\tobj.addEventListener(pEvent[type], handler, false);\n\treturn handler;\n}\n\nfunction removePointerListener(obj, type, handler) {\n\tif (!pEvent[type]) {\n\t\tconsole.warn('wrong event specified:', type);\n\t\treturn;\n\t}\n\tobj.removeEventListener(pEvent[type], handler, false);\n}\n\nfunction _globalPointerDown(e) {\n\t_pointers[e.pointerId] = e;\n}\n\nfunction _globalPointerMove(e) {\n\tif (_pointers[e.pointerId]) {\n\t\t_pointers[e.pointerId] = e;\n\t}\n}\n\nfunction _globalPointerUp(e) {\n\tdelete _pointers[e.pointerId];\n}\n\nfunction _addPointerDocListener() {\n\t// need to keep track of what pointers and how many are active to provide e.touches emulation\n\tif (!_pointerDocListener) {\n\t\t// we listen document as any drags that end by moving the touch off the screen get fired there\n\t\tdocument.addEventListener(POINTER_DOWN, _globalPointerDown, true);\n\t\tdocument.addEventListener(POINTER_MOVE, _globalPointerMove, true);\n\t\tdocument.addEventListener(POINTER_UP, _globalPointerUp, true);\n\t\tdocument.addEventListener(POINTER_CANCEL, _globalPointerUp, true);\n\n\t\t_pointerDocListener = true;\n\t}\n}\n\nfunction _handlePointer(handler, e) {\n\tif (e.pointerType === (e.MSPOINTER_TYPE_MOUSE || 'mouse')) { return; }\n\n\te.touches = [];\n\tfor (var i in _pointers) {\n\t\te.touches.push(_pointers[i]);\n\t}\n\te.changedTouches = [e];\n\n\thandler(e);\n}\n\nfunction _onPointerStart(handler, e) {\n\t// IE10 specific: MsTouch needs preventDefault. See #2000\n\tif (e.MSPOINTER_TYPE_TOUCH && e.pointerType === e.MSPOINTER_TYPE_TOUCH) {\n\t\tpreventDefault(e);\n\t}\n\t_handlePointer(handler, e);\n}\n\n/*\r\n * Extends the event handling code with double tap support for mobile browsers.\r\n *\r\n * Note: currently most browsers fire native dblclick, with only a few exceptions\r\n * (see https://github.com/Leaflet/Leaflet/issues/7012#issuecomment-595087386)\r\n */\r\n\r\nfunction makeDblclick(event) {\r\n\t// in modern browsers `type` cannot be just overridden:\r\n\t// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Getter_only\r\n\tvar newEvent = {},\r\n\t prop, i;\r\n\tfor (i in event) {\r\n\t\tprop = event[i];\r\n\t\tnewEvent[i] = prop && prop.bind ? prop.bind(event) : prop;\r\n\t}\r\n\tevent = newEvent;\r\n\tnewEvent.type = 'dblclick';\r\n\tnewEvent.detail = 2;\r\n\tnewEvent.isTrusted = false;\r\n\tnewEvent._simulated = true; // for debug purposes\r\n\treturn newEvent;\r\n}\r\n\r\nvar delay = 200;\r\nfunction addDoubleTapListener(obj, handler) {\r\n\t// Most browsers handle double tap natively\r\n\tobj.addEventListener('dblclick', handler);\r\n\r\n\t// On some platforms the browser doesn't fire native dblclicks for touch events.\r\n\t// It seems that in all such cases `detail` property of `click` event is always `1`.\r\n\t// So here we rely on that fact to avoid excessive 'dblclick' simulation when not needed.\r\n\tvar last = 0,\r\n\t detail;\r\n\tfunction simDblclick(e) {\r\n\t\tif (e.detail !== 1) {\r\n\t\t\tdetail = e.detail; // keep in sync to avoid false dblclick in some cases\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (e.pointerType === 'mouse' ||\r\n\t\t\t(e.sourceCapabilities && !e.sourceCapabilities.firesTouchEvents)) {\r\n\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// When clicking on an <input>, the browser generates a click on its\r\n\t\t// <label> (and vice versa) triggering two clicks in quick succession.\r\n\t\t// This ignores clicks on elements which are a label with a 'for'\r\n\t\t// attribute (or children of such a label), but not children of\r\n\t\t// a <input>.\r\n\t\tvar path = getPropagationPath(e);\r\n\t\tif (path.some(function (el) {\r\n\t\t\treturn el instanceof HTMLLabelElement && el.attributes.for;\r\n\t\t}) &&\r\n\t\t\t!path.some(function (el) {\r\n\t\t\t\treturn (\r\n\t\t\t\t\tel instanceof HTMLInputElement ||\r\n\t\t\t\t\tel instanceof HTMLSelectElement\r\n\t\t\t\t);\r\n\t\t\t})\r\n\t\t) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar now = Date.now();\r\n\t\tif (now - last <= delay) {\r\n\t\t\tdetail++;\r\n\t\t\tif (detail === 2) {\r\n\t\t\t\thandler(makeDblclick(e));\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tdetail = 1;\r\n\t\t}\r\n\t\tlast = now;\r\n\t}\r\n\r\n\tobj.addEventListener('click', simDblclick);\r\n\r\n\treturn {\r\n\t\tdblclick: handler,\r\n\t\tsimDblclick: simDblclick\r\n\t};\r\n}\r\n\r\nfunction removeDoubleTapListener(obj, handlers) {\r\n\tobj.removeEventListener('dblclick', handlers.dblclick);\r\n\tobj.removeEventListener('click', handlers.simDblclick);\r\n}\n\n/*\r\n * @namespace DomUtil\r\n *\r\n * Utility functions to work with the [DOM](https://developer.mozilla.org/docs/Web/API/Document_Object_Model)\r\n * tree, used by Leaflet internally.\r\n *\r\n * Most functions expecting or returning a `HTMLElement` also work for\r\n * SVG elements. The only difference is that classes refer to CSS classes\r\n * in HTML and SVG classes in SVG.\r\n */\r\n\r\n\r\n// @property TRANSFORM: String\r\n// Vendor-prefixed transform style name (e.g. `'webkitTransform'` for WebKit).\r\nvar TRANSFORM = testProp(\r\n\t['transform', 'webkitTransform', 'OTransform', 'MozTransform', 'msTransform']);\r\n\r\n// webkitTransition comes first because some browser versions that drop vendor prefix don't do\r\n// the same for the transitionend event, in particular the Android 4.1 stock browser\r\n\r\n// @property TRANSITION: String\r\n// Vendor-prefixed transition style name.\r\nvar TRANSITION = testProp(\r\n\t['webkitTransition', 'transition', 'OTransition', 'MozTransition', 'msTransition']);\r\n\r\n// @property TRANSITION_END: String\r\n// Vendor-prefixed transitionend event name.\r\nvar TRANSITION_END =\r\n\tTRANSITION === 'webkitTransition' || TRANSITION === 'OTransition' ? TRANSITION + 'End' : 'transitionend';\r\n\r\n\r\n// @function get(id: String|HTMLElement): HTMLElement\r\n// Returns an element given its DOM id, or returns the element itself\r\n// if it was passed directly.\r\nfunction get(id) {\r\n\treturn typeof id === 'string' ? document.getElementById(id) : id;\r\n}\r\n\r\n// @function getStyle(el: HTMLElement, styleAttrib: String): String\r\n// Returns the value for a certain style attribute on an element,\r\n// including computed values or values set through CSS.\r\nfunction getStyle(el, style) {\r\n\tvar value = el.style[style] || (el.currentStyle && el.currentStyle[style]);\r\n\r\n\tif ((!value || value === 'auto') && document.defaultView) {\r\n\t\tvar css = document.defaultView.getComputedStyle(el, null);\r\n\t\tvalue = css ? css[style] : null;\r\n\t}\r\n\treturn value === 'auto' ? null : value;\r\n}\r\n\r\n// @function create(tagName: String, className?: String, container?: HTMLElement): HTMLElement\r\n// Creates an HTML element with `tagName`, sets its class to `className`, and optionally appends it to `container` element.\r\nfunction create$1(tagName, className, container) {\r\n\tvar el = document.createElement(tagName);\r\n\tel.className = className || '';\r\n\r\n\tif (container) {\r\n\t\tcontainer.appendChild(el);\r\n\t}\r\n\treturn el;\r\n}\r\n\r\n// @function remove(el: HTMLElement)\r\n// Removes `el` from its parent element\r\nfunction remove(el) {\r\n\tvar parent = el.parentNode;\r\n\tif (parent) {\r\n\t\tparent.removeChild(el);\r\n\t}\r\n}\r\n\r\n// @function empty(el: HTMLElement)\r\n// Removes all of `el`'s children elements from `el`\r\nfunction empty(el) {\r\n\twhile (el.firstChild) {\r\n\t\tel.removeChild(el.firstChild);\r\n\t}\r\n}\r\n\r\n// @function toFront(el: HTMLElement)\r\n// Makes `el` the last child of its parent, so it renders in front of the other children.\r\nfunction toFront(el) {\r\n\tvar parent = el.parentNode;\r\n\tif (parent && parent.lastChild !== el) {\r\n\t\tparent.appendChild(el);\r\n\t}\r\n}\r\n\r\n// @function toBack(el: HTMLElement)\r\n// Makes `el` the first child of its parent, so it renders behind the other children.\r\nfunction toBack(el) {\r\n\tvar parent = el.parentNode;\r\n\tif (parent && parent.firstChild !== el) {\r\n\t\tparent.insertBefore(el, parent.firstChild);\r\n\t}\r\n}\r\n\r\n// @function hasClass(el: HTMLElement, name: String): Boolean\r\n// Returns `true` if the element's class attribute contains `name`.\r\nfunction hasClass(el, name) {\r\n\tif (el.classList !== undefined) {\r\n\t\treturn el.classList.contains(name);\r\n\t}\r\n\tvar className = getClass(el);\r\n\treturn className.length > 0 && new RegExp('(^|\\\\s)' + name + '(\\\\s|$)').test(className);\r\n}\r\n\r\n// @function addClass(el: HTMLElement, name: String)\r\n// Adds `name` to the element's class attribute.\r\nfunction addClass(el, name) {\r\n\tif (el.classList !== undefined) {\r\n\t\tvar classes = splitWords(name);\r\n\t\tfor (var i = 0, len = classes.length; i < len; i++) {\r\n\t\t\tel.classList.add(classes[i]);\r\n\t\t}\r\n\t} else if (!hasClass(el, name)) {\r\n\t\tvar className = getClass(el);\r\n\t\tsetClass(el, (className ? className + ' ' : '') + name);\r\n\t}\r\n}\r\n\r\n// @function removeClass(el: HTMLElement, name: String)\r\n// Removes `name` from the element's class attribute.\r\nfunction removeClass(el, name) {\r\n\tif (el.classList !== undefined) {\r\n\t\tel.classList.remove(name);\r\n\t} else {\r\n\t\tsetClass(el, trim((' ' + getClass(el) + ' ').replace(' ' + name + ' ', ' ')));\r\n\t}\r\n}\r\n\r\n// @function setClass(el: HTMLElement, name: String)\r\n// Sets the element's class.\r\nfunction setClass(el, name) {\r\n\tif (el.className.baseVal === undefined) {\r\n\t\tel.className = name;\r\n\t} else {\r\n\t\t// in case of SVG element\r\n\t\tel.className.baseVal = name;\r\n\t}\r\n}\r\n\r\n// @function getClass(el: HTMLElement): String\r\n// Returns the element's class.\r\nfunction getClass(el) {\r\n\t// Check if the element is an SVGElementInstance and use the correspondingElement instead\r\n\t// (Required for linked SVG elements in IE11.)\r\n\tif (el.correspondingElement) {\r\n\t\tel = el.correspondingElement;\r\n\t}\r\n\treturn el.className.baseVal === undefined ? el.className : el.className.baseVal;\r\n}\r\n\r\n// @function setOpacity(el: HTMLElement, opacity: Number)\r\n// Set the opacity of an element (including old IE support).\r\n// `opacity` must be a number from `0` to `1`.\r\nfunction setOpacity(el, value) {\r\n\tif ('opacity' in el.style) {\r\n\t\tel.style.opacity = value;\r\n\t} else if ('filter' in el.style) {\r\n\t\t_setOpacityIE(el, value);\r\n\t}\r\n}\r\n\r\nfunction _setOpacityIE(el, value) {\r\n\tvar filter = false,\r\n\t filterName = 'DXImageTransform.Microsoft.Alpha';\r\n\r\n\t// filters collection throws an error if we try to retrieve a filter that doesn't exist\r\n\ttry {\r\n\t\tfilter = el.filters.item(filterName);\r\n\t} catch (e) {\r\n\t\t// don't set opacity to 1 if we haven't already set an opacity,\r\n\t\t// it isn't needed and breaks transparent pngs.\r\n\t\tif (value === 1) { return; }\r\n\t}\r\n\r\n\tvalue = Math.round(value * 100);\r\n\r\n\tif (filter) {\r\n\t\tfilter.Enabled = (value !== 100);\r\n\t\tfilter.Opacity = value;\r\n\t} else {\r\n\t\tel.style.filter += ' progid:' + filterName + '(opacity=' + value + ')';\r\n\t}\r\n}\r\n\r\n// @function testProp(props: String[]): String|false\r\n// Goes through the array of style names and returns the first name\r\n// that is a valid style name for an element. If no such name is found,\r\n// it returns false. Useful for vendor-prefixed styles like `transform`.\r\nfunction testProp(props) {\r\n\tvar style = document.documentElement.style;\r\n\r\n\tfor (var i = 0; i < props.length; i++) {\r\n\t\tif (props[i] in style) {\r\n\t\t\treturn props[i];\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n}\r\n\r\n// @function setTransform(el: HTMLElement, offset: Point, scale?: Number)\r\n// Resets the 3D CSS transform of `el` so it is translated by `offset` pixels\r\n// and optionally scaled by `scale`. Does not have an effect if the\r\n// browser doesn't support 3D CSS transforms.\r\nfunction setTransform(el, offset, scale) {\r\n\tvar pos = offset || new Point(0, 0);\r\n\r\n\tel.style[TRANSFORM] =\r\n\t\t(Browser.ie3d ?\r\n\t\t\t'translate(' + pos.x + 'px,' + pos.y + 'px)' :\r\n\t\t\t'translate3d(' + pos.x + 'px,' + pos.y + 'px,0)') +\r\n\t\t(scale ? ' scale(' + scale + ')' : '');\r\n}\r\n\r\n// @function setPosition(el: HTMLElement, position: Point)\r\n// Sets the position of `el` to coordinates specified by `position`,\r\n// using CSS translate or top/left positioning depending on the browser\r\n// (used by Leaflet internally to position its layers).\r\nfunction setPosition(el, point) {\r\n\r\n\t/*eslint-disable */\r\n\tel._leaflet_pos = point;\r\n\t/* eslint-enable */\r\n\r\n\tif (Browser.any3d) {\r\n\t\tsetTransform(el, point);\r\n\t} else {\r\n\t\tel.style.left = point.x + 'px';\r\n\t\tel.style.top = point.y + 'px';\r\n\t}\r\n}\r\n\r\n// @function getPosition(el: HTMLElement): Point\r\n// Returns the coordinates of an element previously positioned with setPosition.\r\nfunction getPosition(el) {\r\n\t// this method is only used for elements previously positioned using setPosition,\r\n\t// so it's safe to cache the position for performance\r\n\r\n\treturn el._leaflet_pos || new Point(0, 0);\r\n}\r\n\r\n// @function disableTextSelection()\r\n// Prevents the user from generating `selectstart` DOM events, usually generated\r\n// when the user drags the mouse through a page with text. Used internally\r\n// by Leaflet to override the behaviour of any click-and-drag interaction on\r\n// the map. Affects drag interactions on the whole document.\r\n\r\n// @function enableTextSelection()\r\n// Cancels the effects of a previous [`L.DomUtil.disableTextSelection`](#domutil-disabletextselection).\r\nvar disableTextSelection;\r\nvar enableTextSelection;\r\nvar _userSelect;\r\nif ('onselectstart' in document) {\r\n\tdisableTextSelection = function () {\r\n\t\ton(window, 'selectstart', preventDefault);\r\n\t};\r\n\tenableTextSelection = function () {\r\n\t\toff(window, 'selectstart', preventDefault);\r\n\t};\r\n} else {\r\n\tvar userSelectProperty = testProp(\r\n\t\t['userSelect', 'WebkitUserSelect', 'OUserSelect', 'MozUserSelect', 'msUserSelect']);\r\n\r\n\tdisableTextSelection = function () {\r\n\t\tif (userSelectProperty) {\r\n\t\t\tvar style = document.documentElement.style;\r\n\t\t\t_userSelect = style[userSelectProperty];\r\n\t\t\tstyle[userSelectProperty] = 'none';\r\n\t\t}\r\n\t};\r\n\tenableTextSelection = function () {\r\n\t\tif (userSelectProperty) {\r\n\t\t\tdocument.documentElement.style[userSelectProperty] = _userSelect;\r\n\t\t\t_userSelect = undefined;\r\n\t\t}\r\n\t};\r\n}\r\n\r\n// @function disableImageDrag()\r\n// As [`L.DomUtil.disableTextSelection`](#domutil-disabletextselection), but\r\n// for `dragstart` DOM events, usually generated when the user drags an image.\r\nfunction disableImageDrag() {\r\n\ton(window, 'dragstart', preventDefault);\r\n}\r\n\r\n// @function enableImageDrag()\r\n// Cancels the effects of a previous [`L.DomUtil.disableImageDrag`](#domutil-disabletextselection).\r\nfunction enableImageDrag() {\r\n\toff(window, 'dragstart', preventDefault);\r\n}\r\n\r\nvar _outlineElement, _outlineStyle;\r\n// @function preventOutline(el: HTMLElement)\r\n// Makes the [outline](https://developer.mozilla.org/docs/Web/CSS/outline)\r\n// of the element `el` invisible. Used internally by Leaflet to prevent\r\n// focusable elements from displaying an outline when the user performs a\r\n// drag interaction on them.\r\nfunction preventOutline(element) {\r\n\twhile (element.tabIndex === -1) {\r\n\t\telement = element.parentNode;\r\n\t}\r\n\tif (!element.style) { return; }\r\n\trestoreOutline();\r\n\t_outlineElement = element;\r\n\t_outlineStyle = element.style.outline;\r\n\telement.style.outline = 'none';\r\n\ton(window, 'keydown', restoreOutline);\r\n}\r\n\r\n// @function restoreOutline()\r\n// Cancels the effects of a previous [`L.DomUtil.preventOutline`]().\r\nfunction restoreOutline() {\r\n\tif (!_outlineElement) { return; }\r\n\t_outlineElement.style.outline = _outlineStyle;\r\n\t_outlineElement = undefined;\r\n\t_outlineStyle = undefined;\r\n\toff(window, 'keydown', restoreOutline);\r\n}\r\n\r\n// @function getSizedParentNode(el: HTMLElement): HTMLElement\r\n// Finds the closest parent node which size (width and height) is not null.\r\nfunction getSizedParentNode(element) {\r\n\tdo {\r\n\t\telement = element.parentNode;\r\n\t} while ((!element.offsetWidth || !element.offsetHeight) && element !== document.body);\r\n\treturn element;\r\n}\r\n\r\n// @function getScale(el: HTMLElement): Object\r\n// Computes the CSS scale currently applied on the element.\r\n// Returns an object with `x` and `y` members as horizontal and vertical scales respectively,\r\n// and `boundingClientRect` as the result of [`getBoundingClientRect()`](https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect).\r\nfunction getScale(element) {\r\n\tvar rect = element.getBoundingClientRect(); // Read-only in old browsers.\r\n\r\n\treturn {\r\n\t\tx: rect.width / element.offsetWidth || 1,\r\n\t\ty: rect.height / element.offsetHeight || 1,\r\n\t\tboundingClientRect: rect\r\n\t};\r\n}\n\nvar DomUtil = {\n __proto__: null,\n TRANSFORM: TRANSFORM,\n TRANSITION: TRANSITION,\n TRANSITION_END: TRANSITION_END,\n get: get,\n getStyle: getStyle,\n create: create$1,\n remove: remove,\n empty: empty,\n toFront: toFront,\n toBack: toBack,\n hasClass: hasClass,\n addClass: addClass,\n removeClass: removeClass,\n setClass: setClass,\n getClass: getClass,\n setOpacity: setOpacity,\n testProp: testProp,\n setTransform: setTransform,\n setPosition: setPosition,\n getPosition: getPosition,\n get disableTextSelection () { return disableTextSelection; },\n get enableTextSelection () { return enableTextSelection; },\n disableImageDrag: disableImageDrag,\n enableImageDrag: enableImageDrag,\n preventOutline: preventOutline,\n restoreOutline: restoreOutline,\n getSizedParentNode: getSizedParentNode,\n getScale: getScale\n};\n\n/*\r\n * @namespace DomEvent\r\n * Utility functions to work with the [DOM events](https://developer.mozilla.org/docs/Web/API/Event), used by Leaflet internally.\r\n */\r\n\r\n// Inspired by John Resig, Dean Edwards and YUI addEvent implementations.\r\n\r\n// @function on(el: HTMLElement, types: String, fn: Function, context?: Object): this\r\n// Adds a listener function (`fn`) to a particular DOM event type of the\r\n// element `el`. You can optionally specify the context of the listener\r\n// (object the `this` keyword will point to). You can also pass several\r\n// space-separated types (e.g. `'click dblclick'`).\r\n\r\n// @alternative\r\n// @function on(el: HTMLElement, eventMap: Object, context?: Object): this\r\n// Adds a set of type/listener pairs, e.g. `{click: onClick, mousemove: onMouseMove}`\r\nfunction on(obj, types, fn, context) {\r\n\r\n\tif (types && typeof types === 'object') {\r\n\t\tfor (var type in types) {\r\n\t\t\taddOne(obj, type, types[type], fn);\r\n\t\t}\r\n\t} else {\r\n\t\ttypes = splitWords(types);\r\n\r\n\t\tfor (var i = 0, len = types.length; i < len; i++) {\r\n\t\t\taddOne(obj, types[i], fn, context);\r\n\t\t}\r\n\t}\r\n\r\n\treturn this;\r\n}\r\n\r\nvar eventsKey = '_leaflet_events';\r\n\r\n// @function off(el: HTMLElement, types: String, fn: Function, context?: Object): this\r\n// Removes a previously added listener function.\r\n// Note that if you passed a custom context to on, you must pass the same\r\n// context to `off` in order to remove the listener.\r\n\r\n// @alternative\r\n// @function off(el: HTMLElement, eventMap: Object, context?: Object): this\r\n// Removes a set of type/listener pairs, e.g. `{click: onClick, mousemove: onMouseMove}`\r\n\r\n// @alternative\r\n// @function off(el: HTMLElement, types: String): this\r\n// Removes all previously added listeners of given types.\r\n\r\n// @alternative\r\n// @function off(el: HTMLElement): this\r\n// Removes all previously added listeners from given HTMLElement\r\nfunction off(obj, types, fn, context) {\r\n\r\n\tif (arguments.length === 1) {\r\n\t\tbatchRemove(obj);\r\n\t\tdelete obj[eventsKey];\r\n\r\n\t} else if (types && typeof types === 'object') {\r\n\t\tfor (var type in types) {\r\n\t\t\tremoveOne(obj, type, types[type], fn);\r\n\t\t}\r\n\r\n\t} else {\r\n\t\ttypes = splitWords(types);\r\n\r\n\t\tif (arguments.length === 2) {\r\n\t\t\tbatchRemove(obj, function (type) {\r\n\t\t\t\treturn indexOf(types, type) !== -1;\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tfor (var i = 0, len = types.length; i < len; i++) {\r\n\t\t\t\tremoveOne(obj, types[i], fn, context);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn this;\r\n}\r\n\r\nfunction batchRemove(obj, filterFn) {\r\n\tfor (var id in obj[eventsKey]) {\r\n\t\tvar type = id.split(/\\d/)[0];\r\n\t\tif (!filterFn || filterFn(type)) {\r\n\t\t\tremoveOne(obj, type, null, null, id);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvar mouseSubst = {\r\n\tmouseenter: 'mouseover',\r\n\tmouseleave: 'mouseout',\r\n\twheel: !('onwheel' in window) && 'mousewheel'\r\n};\r\n\r\nfunction addOne(obj, type, fn, context) {\r\n\tvar id = type + stamp(fn) + (context ? '_' + stamp(context) : '');\r\n\r\n\tif (obj[eventsKey] && obj[eventsKey][id]) { return this; }\r\n\r\n\tvar handler = function (e) {\r\n\t\treturn fn.call(context || obj, e || window.event);\r\n\t};\r\n\r\n\tvar originalHandler = handler;\r\n\r\n\tif (!Browser.touchNative && Browser.pointer && type.indexOf('touch') === 0) {\r\n\t\t// Needs DomEvent.Pointer.js\r\n\t\thandler = addPointerListener(obj, type, handler);\r\n\r\n\t} else if (Browser.touch && (type === 'dblclick')) {\r\n\t\thandler = addDoubleTapListener(obj, handler);\r\n\r\n\t} else if ('addEventListener' in obj) {\r\n\r\n\t\tif (type === 'touchstart' || type === 'touchmove' || type === 'wheel' || type === 'mousewheel') {\r\n\t\t\tobj.addEventListener(mouseSubst[type] || type, handler, Browser.passiveEvents ? {passive: false} : false);\r\n\r\n\t\t} else if (type === 'mouseenter' || type === 'mouseleave') {\r\n\t\t\thandler = function (e) {\r\n\t\t\t\te = e || window.event;\r\n\t\t\t\tif (isExternalTarget(obj, e)) {\r\n\t\t\t\t\toriginalHandler(e);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\tobj.addEventListener(mouseSubst[type], handler, false);\r\n\r\n\t\t} else {\r\n\t\t\tobj.addEventListener(type, originalHandler, false);\r\n\t\t}\r\n\r\n\t} else {\r\n\t\tobj.attachEvent('on' + type, handler);\r\n\t}\r\n\r\n\tobj[eventsKey] = obj[eventsKey] || {};\r\n\tobj[eventsKey][id] = handler;\r\n}\r\n\r\nfunction removeOne(obj, type, fn, context, id) {\r\n\tid = id || type + stamp(fn) + (context ? '_' + stamp(context) : '');\r\n\tvar handler = obj[eventsKey] && obj[eventsKey][id];\r\n\r\n\tif (!handler) { return this; }\r\n\r\n\tif (!Browser.touchNative && Browser.pointer && type.indexOf('touch') === 0) {\r\n\t\tremovePointerListener(obj, type, handler);\r\n\r\n\t} else if (Browser.touch && (type === 'dblclick')) {\r\n\t\tremoveDoubleTapListener(obj, handler);\r\n\r\n\t} else if ('removeEventListener' in obj) {\r\n\r\n\t\tobj.removeEventListener(mouseSubst[type] || type, handler, false);\r\n\r\n\t} else {\r\n\t\tobj.detachEvent('on' + type, handler);\r\n\t}\r\n\r\n\tobj[eventsKey][id] = null;\r\n}\r\n\r\n// @function stopPropagation(ev: DOMEvent): this\r\n// Stop the given event from propagation to parent elements. Used inside the listener functions:\r\n// ```js\r\n// L.DomEvent.on(div, 'click', function (ev) {\r\n// \tL.DomEvent.stopPropagation(ev);\r\n// });\r\n// ```\r\nfunction stopPropagation(e) {\r\n\r\n\tif (e.stopPropagation) {\r\n\t\te.stopPropagation();\r\n\t} else if (e.originalEvent) { // In case of Leaflet event.\r\n\t\te.originalEvent._stopped = true;\r\n\t} else {\r\n\t\te.cancelBubble = true;\r\n\t}\r\n\r\n\treturn this;\r\n}\r\n\r\n// @function disableScrollPropagation(el: HTMLElement): this\r\n// Adds `stopPropagation` to the element's `'wheel'` events (plus browser variants).\r\nfunction disableScrollPropagation(el) {\r\n\taddOne(el, 'wheel', stopPropagation);\r\n\treturn this;\r\n}\r\n\r\n// @function disableClickPropagation(el: HTMLElement): this\r\n// Adds `stopPropagation` to the element's `'click'`, `'dblclick'`, `'contextmenu'`,\r\n// `'mousedown'` and `'touchstart'` events (plus browser variants).\r\nfunction disableClickPropagation(el) {\r\n\ton(el, 'mousedown touchstart dblclick contextmenu', stopPropagation);\r\n\tel['_leaflet_disable_click'] = true;\r\n\treturn this;\r\n}\r\n\r\n// @function preventDefault(ev: DOMEvent): this\r\n// Prevents the default action of the DOM Event `ev` from happening (such as\r\n// following a link in the href of the a element, or doing a POST request\r\n// with page reload when a `<form>` is submitted).\r\n// Use it inside listener functions.\r\nfunction preventDefault(e) {\r\n\tif (e.preventDefault) {\r\n\t\te.preventDefault();\r\n\t} else {\r\n\t\te.returnValue = false;\r\n\t}\r\n\treturn this;\r\n}\r\n\r\n// @function stop(ev: DOMEvent): this\r\n// Does `stopPropagation` and `preventDefault` at the same time.\r\nfunction stop(e) {\r\n\tpreventDefault(e);\r\n\tstopPropagation(e);\r\n\treturn this;\r\n}\r\n\r\n// @function getPropagationPath(ev: DOMEvent): Array\r\n// Compatibility polyfill for [`Event.composedPath()`](https://developer.mozilla.org/en-US/docs/Web/API/Event/composedPath).\r\n// Returns an array containing the `HTMLElement`s that the given DOM event\r\n// should propagate to (if not stopped).\r\nfunction getPropagationPath(ev) {\r\n\tif (ev.composedPath) {\r\n\t\treturn ev.composedPath();\r\n\t}\r\n\r\n\tvar path = [];\r\n\tvar el = ev.target;\r\n\r\n\twhile (el) {\r\n\t\tpath.push(el);\r\n\t\tel = el.parentNode;\r\n\t}\r\n\treturn path;\r\n}\r\n\r\n\r\n// @function getMousePosition(ev: DOMEvent, container?: HTMLElement): Point\r\n// Gets normalized mouse position from a DOM event relative to the\r\n// `container` (border excluded) or to the whole page if not specified.\r\nfunction getMousePosition(e, container) {\r\n\tif (!container) {\r\n\t\treturn new Point(e.clientX, e.clientY);\r\n\t}\r\n\r\n\tvar scale = getScale(container),\r\n\t offset = scale.boundingClientRect; // left and top values are in page scale (like the event clientX/Y)\r\n\r\n\treturn new Point(\r\n\t\t// offset.left/top values are in page scale (like clientX/Y),\r\n\t\t// whereas clientLeft/Top (border width) values are the original values (before CSS scale applies).\r\n\t\t(e.clientX - offset.left) / scale.x - container.clientLeft,\r\n\t\t(e.clientY - offset.top) / scale.y - container.clientTop\r\n\t);\r\n}\r\n\r\n\r\n// except , Safari and\r\n// We need double the scroll pixels (see #7403 and #4538) for all Browsers\r\n// except OSX (Mac) -> 3x, Chrome running on Linux 1x\r\n\r\nvar wheelPxFactor =\r\n\t(Browser.linux && Browser.chrome) ? window.devicePixelRatio :\r\n\tBrowser.mac ? window.devicePixelRatio * 3 :\r\n\twindow.devicePixelRatio > 0 ? 2 * window.devicePixelRatio : 1;\r\n// @function getWheelDelta(ev: DOMEvent): Number\r\n// Gets normalized wheel delta from a wheel DOM event, in vertical\r\n// pixels scrolled (negative if scrolling down).\r\n// Events from pointing devices without precise scrolling are mapped to\r\n// a best guess of 60 pixels.\r\nfunction getWheelDelta(e) {\r\n\treturn (Browser.edge) ? e.wheelDeltaY / 2 : // Don't trust window-geometry-based delta\r\n\t (e.deltaY && e.deltaMode === 0) ? -e.deltaY / wheelPxFactor : // Pixels\r\n\t (e.deltaY && e.deltaMode === 1) ? -e.deltaY * 20 : // Lines\r\n\t (e.deltaY && e.deltaMode === 2) ? -e.deltaY * 60 : // Pages\r\n\t (e.deltaX || e.deltaZ) ? 0 :\t// Skip horizontal/depth wheel events\r\n\t e.wheelDelta ? (e.wheelDeltaY || e.wheelDelta) / 2 : // Legacy IE pixels\r\n\t (e.detail && Math.abs(e.detail) < 32765) ? -e.detail * 20 : // Legacy Moz lines\r\n\t e.detail ? e.detail / -32765 * 60 : // Legacy Moz pages\r\n\t 0;\r\n}\r\n\r\n// check if element really left/entered the event target (for mouseenter/mouseleave)\r\nfunction isExternalTarget(el, e) {\r\n\r\n\tvar related = e.relatedTarget;\r\n\r\n\tif (!related) { return true; }\r\n\r\n\ttry {\r\n\t\twhile (related && (related !== el)) {\r\n\t\t\trelated = related.parentNode;\r\n\t\t}\r\n\t} catch (err) {\r\n\t\treturn false;\r\n\t}\r\n\treturn (related !== el);\r\n}\n\nvar DomEvent = {\n __proto__: null,\n on: on,\n off: off,\n stopPropagation: stopPropagation,\n disableScrollPropagation: disableScrollPropagation,\n disableClickPropagation: disableClickPropagation,\n preventDefault: preventDefault,\n stop: stop,\n getPropagationPath: getPropagationPath,\n getMousePosition: getMousePosition,\n getWheelDelta: getWheelDelta,\n isExternalTarget: isExternalTarget,\n addListener: on,\n removeListener: off\n};\n\n/*\n * @class PosAnimation\n * @aka L.PosAnimation\n * @inherits Evented\n * Used internally for panning animations, utilizing CSS3 Transitions for modern browsers and a timer fallback for IE6-9.\n *\n * @example\n * ```js\n * var myPositionMarker = L.marker([48.864716, 2.294694]).addTo(map);\n *\n * myPositionMarker.on(\"click\", function() {\n * \tvar pos = map.latLngToLayerPoint(myPositionMarker.getLatLng());\n * \tpos.y -= 25;\n * \tvar fx = new L.PosAnimation();\n *\n * \tfx.once('end',function() {\n * \t\tpos.y += 25;\n * \t\tfx.run(myPositionMarker._icon, pos, 0.8);\n * \t});\n *\n * \tfx.run(myPositionMarker._icon, pos, 0.3);\n * });\n *\n * ```\n *\n * @constructor L.PosAnimation()\n * Creates a `PosAnimation` object.\n *\n */\n\nvar PosAnimation = Evented.extend({\n\n\t// @method run(el: HTMLElement, newPos: Point, duration?: Number, easeLinearity?: Number)\n\t// Run an animation of a given element to a new position, optionally setting\n\t// duration in seconds (`0.25` by default) and easing linearity factor (3rd\n\t// argument of the [cubic bezier curve](https://cubic-bezier.com/#0,0,.5,1),\n\t// `0.5` by default).\n\trun: function (el, newPos, duration, easeLinearity) {\n\t\tthis.stop();\n\n\t\tthis._el = el;\n\t\tthis._inProgress = true;\n\t\tthis._duration = duration || 0.25;\n\t\tthis._easeOutPower = 1 / Math.max(easeLinearity || 0.5, 0.2);\n\n\t\tthis._startPos = getPosition(el);\n\t\tthis._offset = newPos.subtract(this._startPos);\n\t\tthis._startTime = +new Date();\n\n\t\t// @event start: Event\n\t\t// Fired when the animation starts\n\t\tthis.fire('start');\n\n\t\tthis._animate();\n\t},\n\n\t// @method stop()\n\t// Stops the animation (if currently running).\n\tstop: function () {\n\t\tif (!this._inProgress) { return; }\n\n\t\tthis._step(true);\n\t\tthis._complete();\n\t},\n\n\t_animate: function () {\n\t\t// animation loop\n\t\tthis._animId = requestAnimFrame(this._animate, this);\n\t\tthis._step();\n\t},\n\n\t_step: function (round) {\n\t\tvar elapsed = (+new Date()) - this._startTime,\n\t\t duration = this._duration * 1000;\n\n\t\tif (elapsed < duration) {\n\t\t\tthis._runFrame(this._easeOut(elapsed / duration), round);\n\t\t} else {\n\t\t\tthis._runFrame(1);\n\t\t\tthis._complete();\n\t\t}\n\t},\n\n\t_runFrame: function (progress, round) {\n\t\tvar pos = this._startPos.add(this._offset.multiplyBy(progress));\n\t\tif (round) {\n\t\t\tpos._round();\n\t\t}\n\t\tsetPosition(this._el, pos);\n\n\t\t// @event step: Event\n\t\t// Fired continuously during the animation.\n\t\tthis.fire('step');\n\t},\n\n\t_complete: function () {\n\t\tcancelAnimFrame(this._animId);\n\n\t\tthis._inProgress = false;\n\t\t// @event end: Event\n\t\t// Fired when the animation ends.\n\t\tthis.fire('end');\n\t},\n\n\t_easeOut: function (t) {\n\t\treturn 1 - Math.pow(1 - t, this._easeOutPower);\n\t}\n});\n\n/*\r\n * @class Map\r\n * @aka L.Map\r\n * @inherits Evented\r\n *\r\n * The central class of the API — it is used to create a map on a page and manipulate it.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * // initialize the map on the \"map\" div with a given center and zoom\r\n * var map = L.map('map', {\r\n * \tcenter: [51.505, -0.09],\r\n * \tzoom: 13\r\n * });\r\n * ```\r\n *\r\n */\r\n\r\nvar Map = Evented.extend({\r\n\r\n\toptions: {\r\n\t\t// @section Map State Options\r\n\t\t// @option crs: CRS = L.CRS.EPSG3857\r\n\t\t// The [Coordinate Reference System](#crs) to use. Don't change this if you're not\r\n\t\t// sure what it means.\r\n\t\tcrs: EPSG3857,\r\n\r\n\t\t// @option center: LatLng = undefined\r\n\t\t// Initial geographic center of the map\r\n\t\tcenter: undefined,\r\n\r\n\t\t// @option zoom: Number = undefined\r\n\t\t// Initial map zoom level\r\n\t\tzoom: undefined,\r\n\r\n\t\t// @option minZoom: Number = *\r\n\t\t// Minimum zoom level of the map.\r\n\t\t// If not specified and at least one `GridLayer` or `TileLayer` is in the map,\r\n\t\t// the lowest of their `minZoom` options will be used instead.\r\n\t\tminZoom: undefined,\r\n\r\n\t\t// @option maxZoom: Number = *\r\n\t\t// Maximum zoom level of the map.\r\n\t\t// If not specified and at least one `GridLayer` or `TileLayer` is in the map,\r\n\t\t// the highest of their `maxZoom` options will be used instead.\r\n\t\tmaxZoom: undefined,\r\n\r\n\t\t// @option layers: Layer[] = []\r\n\t\t// Array of layers that will be added to the map initially\r\n\t\tlayers: [],\r\n\r\n\t\t// @option maxBounds: LatLngBounds = null\r\n\t\t// When this option is set, the map restricts the view to the given\r\n\t\t// geographical bounds, bouncing the user back if the user tries to pan\r\n\t\t// outside the view. To set the restriction dynamically, use\r\n\t\t// [`setMaxBounds`](#map-setmaxbounds) method.\r\n\t\tmaxBounds: undefined,\r\n\r\n\t\t// @option renderer: Renderer = *\r\n\t\t// The default method for drawing vector layers on the map. `L.SVG`\r\n\t\t// or `L.Canvas` by default depending on browser support.\r\n\t\trenderer: undefined,\r\n\r\n\r\n\t\t// @section Animation Options\r\n\t\t// @option zoomAnimation: Boolean = true\r\n\t\t// Whether the map zoom animation is enabled. By default it's enabled\r\n\t\t// in all browsers that support CSS3 Transitions except Android.\r\n\t\tzoomAnimation: true,\r\n\r\n\t\t// @option zoomAnimationThreshold: Number = 4\r\n\t\t// Won't animate zoom if the zoom difference exceeds this value.\r\n\t\tzoomAnimationThreshold: 4,\r\n\r\n\t\t// @option fadeAnimation: Boolean = true\r\n\t\t// Whether the tile fade animation is enabled. By default it's enabled\r\n\t\t// in all browsers that support CSS3 Transitions except Android.\r\n\t\tfadeAnimation: true,\r\n\r\n\t\t// @option markerZoomAnimation: Boolean = true\r\n\t\t// Whether markers animate their zoom with the zoom animation, if disabled\r\n\t\t// they will disappear for the length of the animation. By default it's\r\n\t\t// enabled in all browsers that support CSS3 Transitions except Android.\r\n\t\tmarkerZoomAnimation: true,\r\n\r\n\t\t// @option transform3DLimit: Number = 2^23\r\n\t\t// Defines the maximum size of a CSS translation transform. The default\r\n\t\t// value should not be changed unless a web browser positions layers in\r\n\t\t// the wrong place after doing a large `panBy`.\r\n\t\ttransform3DLimit: 8388608, // Precision limit of a 32-bit float\r\n\r\n\t\t// @section Interaction Options\r\n\t\t// @option zoomSnap: Number = 1\r\n\t\t// Forces the map's zoom level to always be a multiple of this, particularly\r\n\t\t// right after a [`fitBounds()`](#map-fitbounds) or a pinch-zoom.\r\n\t\t// By default, the zoom level snaps to the nearest integer; lower values\r\n\t\t// (e.g. `0.5` or `0.1`) allow for greater granularity. A value of `0`\r\n\t\t// means the zoom level will not be snapped after `fitBounds` or a pinch-zoom.\r\n\t\tzoomSnap: 1,\r\n\r\n\t\t// @option zoomDelta: Number = 1\r\n\t\t// Controls how much the map's zoom level will change after a\r\n\t\t// [`zoomIn()`](#map-zoomin), [`zoomOut()`](#map-zoomout), pressing `+`\r\n\t\t// or `-` on the keyboard, or using the [zoom controls](#control-zoom).\r\n\t\t// Values smaller than `1` (e.g. `0.5`) allow for greater granularity.\r\n\t\tzoomDelta: 1,\r\n\r\n\t\t// @option trackResize: Boolean = true\r\n\t\t// Whether the map automatically handles browser window resize to update itself.\r\n\t\ttrackResize: true\r\n\t},\r\n\r\n\tinitialize: function (id, options) { // (HTMLElement or String, Object)\r\n\t\toptions = setOptions(this, options);\r\n\r\n\t\t// Make sure to assign internal flags at the beginning,\r\n\t\t// to avoid inconsistent state in some edge cases.\r\n\t\tthis._handlers = [];\r\n\t\tthis._layers = {};\r\n\t\tthis._zoomBoundLayers = {};\r\n\t\tthis._sizeChanged = true;\r\n\r\n\t\tthis._initContainer(id);\r\n\t\tthis._initLayout();\r\n\r\n\t\t// hack for https://github.com/Leaflet/Leaflet/issues/1980\r\n\t\tthis._onResize = bind(this._onResize, this);\r\n\r\n\t\tthis._initEvents();\r\n\r\n\t\tif (options.maxBounds) {\r\n\t\t\tthis.setMaxBounds(options.maxBounds);\r\n\t\t}\r\n\r\n\t\tif (options.zoom !== undefined) {\r\n\t\t\tthis._zoom = this._limitZoom(options.zoom);\r\n\t\t}\r\n\r\n\t\tif (options.center && options.zoom !== undefined) {\r\n\t\t\tthis.setView(toLatLng(options.center), options.zoom, {reset: true});\r\n\t\t}\r\n\r\n\t\tthis.callInitHooks();\r\n\r\n\t\t// don't animate on browsers without hardware-accelerated transitions or old Android/Opera\r\n\t\tthis._zoomAnimated = TRANSITION && Browser.any3d && !Browser.mobileOpera &&\r\n\t\t\t\tthis.options.zoomAnimation;\r\n\r\n\t\t// zoom transitions run with the same duration for all layers, so if one of transitionend events\r\n\t\t// happens after starting zoom animation (propagating to the map pane), we know that it ended globally\r\n\t\tif (this._zoomAnimated) {\r\n\t\t\tthis._createAnimProxy();\r\n\t\t\ton(this._proxy, TRANSITION_END, this._catchTransitionEnd, this);\r\n\t\t}\r\n\r\n\t\tthis._addLayers(this.options.layers);\r\n\t},\r\n\r\n\r\n\t// @section Methods for modifying map state\r\n\r\n\t// @method setView(center: LatLng, zoom: Number, options?: Zoom/pan options): this\r\n\t// Sets the view of the map (geographical center and zoom) with the given\r\n\t// animation options.\r\n\tsetView: function (center, zoom, options) {\r\n\r\n\t\tzoom = zoom === undefined ? this._zoom : this._limitZoom(zoom);\r\n\t\tcenter = this._limitCenter(toLatLng(center), zoom, this.options.maxBounds);\r\n\t\toptions = options || {};\r\n\r\n\t\tthis._stop();\r\n\r\n\t\tif (this._loaded && !options.reset && options !== true) {\r\n\r\n\t\t\tif (options.animate !== undefined) {\r\n\t\t\t\toptions.zoom = extend({animate: options.animate}, options.zoom);\r\n\t\t\t\toptions.pan = extend({animate: options.animate, duration: options.duration}, options.pan);\r\n\t\t\t}\r\n\r\n\t\t\t// try animating pan or zoom\r\n\t\t\tvar moved = (this._zoom !== zoom) ?\r\n\t\t\t\tthis._tryAnimatedZoom && this._tryAnimatedZoom(center, zoom, options.zoom) :\r\n\t\t\t\tthis._tryAnimatedPan(center, options.pan);\r\n\r\n\t\t\tif (moved) {\r\n\t\t\t\t// prevent resize handler call, the view will refresh after animation anyway\r\n\t\t\t\tclearTimeout(this._sizeTimer);\r\n\t\t\t\treturn this;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// animation didn't start, just reset the map view\r\n\t\tthis._resetView(center, zoom, options.pan && options.pan.noMoveStart);\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method setZoom(zoom: Number, options?: Zoom/pan options): this\r\n\t// Sets the zoom of the map.\r\n\tsetZoom: function (zoom, options) {\r\n\t\tif (!this._loaded) {\r\n\t\t\tthis._zoom = zoom;\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\treturn this.setView(this.getCenter(), zoom, {zoom: options});\r\n\t},\r\n\r\n\t// @method zoomIn(delta?: Number, options?: Zoom options): this\r\n\t// Increases the zoom of the map by `delta` ([`zoomDelta`](#map-zoomdelta) by default).\r\n\tzoomIn: function (delta, options) {\r\n\t\tdelta = delta || (Browser.any3d ? this.options.zoomDelta : 1);\r\n\t\treturn this.setZoom(this._zoom + delta, options);\r\n\t},\r\n\r\n\t// @method zoomOut(delta?: Number, options?: Zoom options): this\r\n\t// Decreases the zoom of the map by `delta` ([`zoomDelta`](#map-zoomdelta) by default).\r\n\tzoomOut: function (delta, options) {\r\n\t\tdelta = delta || (Browser.any3d ? this.options.zoomDelta : 1);\r\n\t\treturn this.setZoom(this._zoom - delta, options);\r\n\t},\r\n\r\n\t// @method setZoomAround(latlng: LatLng, zoom: Number, options: Zoom options): this\r\n\t// Zooms the map while keeping a specified geographical point on the map\r\n\t// stationary (e.g. used internally for scroll zoom and double-click zoom).\r\n\t// @alternative\r\n\t// @method setZoomAround(offset: Point, zoom: Number, options: Zoom options): this\r\n\t// Zooms the map while keeping a specified pixel on the map (relative to the top-left corner) stationary.\r\n\tsetZoomAround: function (latlng, zoom, options) {\r\n\t\tvar scale = this.getZoomScale(zoom),\r\n\t\t viewHalf = this.getSize().divideBy(2),\r\n\t\t containerPoint = latlng instanceof Point ? latlng : this.latLngToContainerPoint(latlng),\r\n\r\n\t\t centerOffset = containerPoint.subtract(viewHalf).multiplyBy(1 - 1 / scale),\r\n\t\t newCenter = this.containerPointToLatLng(viewHalf.add(centerOffset));\r\n\r\n\t\treturn this.setView(newCenter, zoom, {zoom: options});\r\n\t},\r\n\r\n\t_getBoundsCenterZoom: function (bounds, options) {\r\n\r\n\t\toptions = options || {};\r\n\t\tbounds = bounds.getBounds ? bounds.getBounds() : toLatLngBounds(bounds);\r\n\r\n\t\tvar paddingTL = toPoint(options.paddingTopLeft || options.padding || [0, 0]),\r\n\t\t paddingBR = toPoint(options.paddingBottomRight || options.padding || [0, 0]),\r\n\r\n\t\t zoom = this.getBoundsZoom(bounds, false, paddingTL.add(paddingBR));\r\n\r\n\t\tzoom = (typeof options.maxZoom === 'number') ? Math.min(options.maxZoom, zoom) : zoom;\r\n\r\n\t\tif (zoom === Infinity) {\r\n\t\t\treturn {\r\n\t\t\t\tcenter: bounds.getCenter(),\r\n\t\t\t\tzoom: zoom\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\tvar paddingOffset = paddingBR.subtract(paddingTL).divideBy(2),\r\n\r\n\t\t swPoint = this.project(bounds.getSouthWest(), zoom),\r\n\t\t nePoint = this.project(bounds.getNorthEast(), zoom),\r\n\t\t center = this.unproject(swPoint.add(nePoint).divideBy(2).add(paddingOffset), zoom);\r\n\r\n\t\treturn {\r\n\t\t\tcenter: center,\r\n\t\t\tzoom: zoom\r\n\t\t};\r\n\t},\r\n\r\n\t// @method fitBounds(bounds: LatLngBounds, options?: fitBounds options): this\r\n\t// Sets a map view that contains the given geographical bounds with the\r\n\t// maximum zoom level possible.\r\n\tfitBounds: function (bounds, options) {\r\n\r\n\t\tbounds = toLatLngBounds(bounds);\r\n\r\n\t\tif (!bounds.isValid()) {\r\n\t\t\tthrow new Error('Bounds are not valid.');\r\n\t\t}\r\n\r\n\t\tvar target = this._getBoundsCenterZoom(bounds, options);\r\n\t\treturn this.setView(target.center, target.zoom, options);\r\n\t},\r\n\r\n\t// @method fitWorld(options?: fitBounds options): this\r\n\t// Sets a map view that mostly contains the whole world with the maximum\r\n\t// zoom level possible.\r\n\tfitWorld: function (options) {\r\n\t\treturn this.fitBounds([[-90, -180], [90, 180]], options);\r\n\t},\r\n\r\n\t// @method panTo(latlng: LatLng, options?: Pan options): this\r\n\t// Pans the map to a given center.\r\n\tpanTo: function (center, options) { // (LatLng)\r\n\t\treturn this.setView(center, this._zoom, {pan: options});\r\n\t},\r\n\r\n\t// @method panBy(offset: Point, options?: Pan options): this\r\n\t// Pans the map by a given number of pixels (animated).\r\n\tpanBy: function (offset, options) {\r\n\t\toffset = toPoint(offset).round();\r\n\t\toptions = options || {};\r\n\r\n\t\tif (!offset.x && !offset.y) {\r\n\t\t\treturn this.fire('moveend');\r\n\t\t}\r\n\t\t// If we pan too far, Chrome gets issues with tiles\r\n\t\t// and makes them disappear or appear in the wrong place (slightly offset) #2602\r\n\t\tif (options.animate !== true && !this.getSize().contains(offset)) {\r\n\t\t\tthis._resetView(this.unproject(this.project(this.getCenter()).add(offset)), this.getZoom());\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tif (!this._panAnim) {\r\n\t\t\tthis._panAnim = new PosAnimation();\r\n\r\n\t\t\tthis._panAnim.on({\r\n\t\t\t\t'step': this._onPanTransitionStep,\r\n\t\t\t\t'end': this._onPanTransitionEnd\r\n\t\t\t}, this);\r\n\t\t}\r\n\r\n\t\t// don't fire movestart if animating inertia\r\n\t\tif (!options.noMoveStart) {\r\n\t\t\tthis.fire('movestart');\r\n\t\t}\r\n\r\n\t\t// animate pan unless animate: false specified\r\n\t\tif (options.animate !== false) {\r\n\t\t\taddClass(this._mapPane, 'leaflet-pan-anim');\r\n\r\n\t\t\tvar newPos = this._getMapPanePos().subtract(offset).round();\r\n\t\t\tthis._panAnim.run(this._mapPane, newPos, options.duration || 0.25, options.easeLinearity);\r\n\t\t} else {\r\n\t\t\tthis._rawPanBy(offset);\r\n\t\t\tthis.fire('move').fire('moveend');\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method flyTo(latlng: LatLng, zoom?: Number, options?: Zoom/pan options): this\r\n\t// Sets the view of the map (geographical center and zoom) performing a smooth\r\n\t// pan-zoom animation.\r\n\tflyTo: function (targetCenter, targetZoom, options) {\r\n\r\n\t\toptions = options || {};\r\n\t\tif (options.animate === false || !Browser.any3d) {\r\n\t\t\treturn this.setView(targetCenter, targetZoom, options);\r\n\t\t}\r\n\r\n\t\tthis._stop();\r\n\r\n\t\tvar from = this.project(this.getCenter()),\r\n\t\t to = this.project(targetCenter),\r\n\t\t size = this.getSize(),\r\n\t\t startZoom = this._zoom;\r\n\r\n\t\ttargetCenter = toLatLng(targetCenter);\r\n\t\ttargetZoom = targetZoom === undefined ? startZoom : targetZoom;\r\n\r\n\t\tvar w0 = Math.max(size.x, size.y),\r\n\t\t w1 = w0 * this.getZoomScale(startZoom, targetZoom),\r\n\t\t u1 = (to.distanceTo(from)) || 1,\r\n\t\t rho = 1.42,\r\n\t\t rho2 = rho * rho;\r\n\r\n\t\tfunction r(i) {\r\n\t\t\tvar s1 = i ? -1 : 1,\r\n\t\t\t s2 = i ? w1 : w0,\r\n\t\t\t t1 = w1 * w1 - w0 * w0 + s1 * rho2 * rho2 * u1 * u1,\r\n\t\t\t b1 = 2 * s2 * rho2 * u1,\r\n\t\t\t b = t1 / b1,\r\n\t\t\t sq = Math.sqrt(b * b + 1) - b;\r\n\r\n\t\t\t // workaround for floating point precision bug when sq = 0, log = -Infinite,\r\n\t\t\t // thus triggering an infinite loop in flyTo\r\n\t\t\t var log = sq < 0.000000001 ? -18 : Math.log(sq);\r\n\r\n\t\t\treturn log;\r\n\t\t}\r\n\r\n\t\tfunction sinh(n) { return (Math.exp(n) - Math.exp(-n)) / 2; }\r\n\t\tfunction cosh(n) { return (Math.exp(n) + Math.exp(-n)) / 2; }\r\n\t\tfunction tanh(n) { return sinh(n) / cosh(n); }\r\n\r\n\t\tvar r0 = r(0);\r\n\r\n\t\tfunction w(s) { return w0 * (cosh(r0) / cosh(r0 + rho * s)); }\r\n\t\tfunction u(s) { return w0 * (cosh(r0) * tanh(r0 + rho * s) - sinh(r0)) / rho2; }\r\n\r\n\t\tfunction easeOut(t) { return 1 - Math.pow(1 - t, 1.5); }\r\n\r\n\t\tvar start = Date.now(),\r\n\t\t S = (r(1) - r0) / rho,\r\n\t\t duration = options.duration ? 1000 * options.duration : 1000 * S * 0.8;\r\n\r\n\t\tfunction frame() {\r\n\t\t\tvar t = (Date.now() - start) / duration,\r\n\t\t\t s = easeOut(t) * S;\r\n\r\n\t\t\tif (t <= 1) {\r\n\t\t\t\tthis._flyToFrame = requestAnimFrame(frame, this);\r\n\r\n\t\t\t\tthis._move(\r\n\t\t\t\t\tthis.unproject(from.add(to.subtract(from).multiplyBy(u(s) / u1)), startZoom),\r\n\t\t\t\t\tthis.getScaleZoom(w0 / w(s), startZoom),\r\n\t\t\t\t\t{flyTo: true});\r\n\r\n\t\t\t} else {\r\n\t\t\t\tthis\r\n\t\t\t\t\t._move(targetCenter, targetZoom)\r\n\t\t\t\t\t._moveEnd(true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._moveStart(true, options.noMoveStart);\r\n\r\n\t\tframe.call(this);\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method flyToBounds(bounds: LatLngBounds, options?: fitBounds options): this\r\n\t// Sets the view of the map with a smooth animation like [`flyTo`](#map-flyto),\r\n\t// but takes a bounds parameter like [`fitBounds`](#map-fitbounds).\r\n\tflyToBounds: function (bounds, options) {\r\n\t\tvar target = this._getBoundsCenterZoom(bounds, options);\r\n\t\treturn this.flyTo(target.center, target.zoom, options);\r\n\t},\r\n\r\n\t// @method setMaxBounds(bounds: LatLngBounds): this\r\n\t// Restricts the map view to the given bounds (see the [maxBounds](#map-maxbounds) option).\r\n\tsetMaxBounds: function (bounds) {\r\n\t\tbounds = toLatLngBounds(bounds);\r\n\r\n\t\tif (this.listens('moveend', this._panInsideMaxBounds)) {\r\n\t\t\tthis.off('moveend', this._panInsideMaxBounds);\r\n\t\t}\r\n\r\n\t\tif (!bounds.isValid()) {\r\n\t\t\tthis.options.maxBounds = null;\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tthis.options.maxBounds = bounds;\r\n\r\n\t\tif (this._loaded) {\r\n\t\t\tthis._panInsideMaxBounds();\r\n\t\t}\r\n\r\n\t\treturn this.on('moveend', this._panInsideMaxBounds);\r\n\t},\r\n\r\n\t// @method setMinZoom(zoom: Number): this\r\n\t// Sets the lower limit for the available zoom levels (see the [minZoom](#map-minzoom) option).\r\n\tsetMinZoom: function (zoom) {\r\n\t\tvar oldZoom = this.options.minZoom;\r\n\t\tthis.options.minZoom = zoom;\r\n\r\n\t\tif (this._loaded && oldZoom !== zoom) {\r\n\t\t\tthis.fire('zoomlevelschange');\r\n\r\n\t\t\tif (this.getZoom() < this.options.minZoom) {\r\n\t\t\t\treturn this.setZoom(zoom);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method setMaxZoom(zoom: Number): this\r\n\t// Sets the upper limit for the available zoom levels (see the [maxZoom](#map-maxzoom) option).\r\n\tsetMaxZoom: function (zoom) {\r\n\t\tvar oldZoom = this.options.maxZoom;\r\n\t\tthis.options.maxZoom = zoom;\r\n\r\n\t\tif (this._loaded && oldZoom !== zoom) {\r\n\t\t\tthis.fire('zoomlevelschange');\r\n\r\n\t\t\tif (this.getZoom() > this.options.maxZoom) {\r\n\t\t\t\treturn this.setZoom(zoom);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method panInsideBounds(bounds: LatLngBounds, options?: Pan options): this\r\n\t// Pans the map to the closest view that would lie inside the given bounds (if it's not already), controlling the animation using the options specific, if any.\r\n\tpanInsideBounds: function (bounds, options) {\r\n\t\tthis._enforcingBounds = true;\r\n\t\tvar center = this.getCenter(),\r\n\t\t newCenter = this._limitCenter(center, this._zoom, toLatLngBounds(bounds));\r\n\r\n\t\tif (!center.equals(newCenter)) {\r\n\t\t\tthis.panTo(newCenter, options);\r\n\t\t}\r\n\r\n\t\tthis._enforcingBounds = false;\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method panInside(latlng: LatLng, options?: padding options): this\r\n\t// Pans the map the minimum amount to make the `latlng` visible. Use\r\n\t// padding options to fit the display to more restricted bounds.\r\n\t// If `latlng` is already within the (optionally padded) display bounds,\r\n\t// the map will not be panned.\r\n\tpanInside: function (latlng, options) {\r\n\t\toptions = options || {};\r\n\r\n\t\tvar paddingTL = toPoint(options.paddingTopLeft || options.padding || [0, 0]),\r\n\t\t paddingBR = toPoint(options.paddingBottomRight || options.padding || [0, 0]),\r\n\t\t pixelCenter = this.project(this.getCenter()),\r\n\t\t pixelPoint = this.project(latlng),\r\n\t\t pixelBounds = this.getPixelBounds(),\r\n\t\t paddedBounds = toBounds([pixelBounds.min.add(paddingTL), pixelBounds.max.subtract(paddingBR)]),\r\n\t\t paddedSize = paddedBounds.getSize();\r\n\r\n\t\tif (!paddedBounds.contains(pixelPoint)) {\r\n\t\t\tthis._enforcingBounds = true;\r\n\t\t\tvar centerOffset = pixelPoint.subtract(paddedBounds.getCenter());\r\n\t\t\tvar offset = paddedBounds.extend(pixelPoint).getSize().subtract(paddedSize);\r\n\t\t\tpixelCenter.x += centerOffset.x < 0 ? -offset.x : offset.x;\r\n\t\t\tpixelCenter.y += centerOffset.y < 0 ? -offset.y : offset.y;\r\n\t\t\tthis.panTo(this.unproject(pixelCenter), options);\r\n\t\t\tthis._enforcingBounds = false;\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method invalidateSize(options: Zoom/pan options): this\r\n\t// Checks if the map container size changed and updates the map if so —\r\n\t// call it after you've changed the map size dynamically, also animating\r\n\t// pan by default. If `options.pan` is `false`, panning will not occur.\r\n\t// If `options.debounceMoveend` is `true`, it will delay `moveend` event so\r\n\t// that it doesn't happen often even if the method is called many\r\n\t// times in a row.\r\n\r\n\t// @alternative\r\n\t// @method invalidateSize(animate: Boolean): this\r\n\t// Checks if the map container size changed and updates the map if so —\r\n\t// call it after you've changed the map size dynamically, also animating\r\n\t// pan by default.\r\n\tinvalidateSize: function (options) {\r\n\t\tif (!this._loaded) { return this; }\r\n\r\n\t\toptions = extend({\r\n\t\t\tanimate: false,\r\n\t\t\tpan: true\r\n\t\t}, options === true ? {animate: true} : options);\r\n\r\n\t\tvar oldSize = this.getSize();\r\n\t\tthis._sizeChanged = true;\r\n\t\tthis._lastCenter = null;\r\n\r\n\t\tvar newSize = this.getSize(),\r\n\t\t oldCenter = oldSize.divideBy(2).round(),\r\n\t\t newCenter = newSize.divideBy(2).round(),\r\n\t\t offset = oldCenter.subtract(newCenter);\r\n\r\n\t\tif (!offset.x && !offset.y) { return this; }\r\n\r\n\t\tif (options.animate && options.pan) {\r\n\t\t\tthis.panBy(offset);\r\n\r\n\t\t} else {\r\n\t\t\tif (options.pan) {\r\n\t\t\t\tthis._rawPanBy(offset);\r\n\t\t\t}\r\n\r\n\t\t\tthis.fire('move');\r\n\r\n\t\t\tif (options.debounceMoveend) {\r\n\t\t\t\tclearTimeout(this._sizeTimer);\r\n\t\t\t\tthis._sizeTimer = setTimeout(bind(this.fire, this, 'moveend'), 200);\r\n\t\t\t} else {\r\n\t\t\t\tthis.fire('moveend');\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// @section Map state change events\r\n\t\t// @event resize: ResizeEvent\r\n\t\t// Fired when the map is resized.\r\n\t\treturn this.fire('resize', {\r\n\t\t\toldSize: oldSize,\r\n\t\t\tnewSize: newSize\r\n\t\t});\r\n\t},\r\n\r\n\t// @section Methods for modifying map state\r\n\t// @method stop(): this\r\n\t// Stops the currently running `panTo` or `flyTo` animation, if any.\r\n\tstop: function () {\r\n\t\tthis.setZoom(this._limitZoom(this._zoom));\r\n\t\tif (!this.options.zoomSnap) {\r\n\t\t\tthis.fire('viewreset');\r\n\t\t}\r\n\t\treturn this._stop();\r\n\t},\r\n\r\n\t// @section Geolocation methods\r\n\t// @method locate(options?: Locate options): this\r\n\t// Tries to locate the user using the Geolocation API, firing a [`locationfound`](#map-locationfound)\r\n\t// event with location data on success or a [`locationerror`](#map-locationerror) event on failure,\r\n\t// and optionally sets the map view to the user's location with respect to\r\n\t// detection accuracy (or to the world view if geolocation failed).\r\n\t// Note that, if your page doesn't use HTTPS, this method will fail in\r\n\t// modern browsers ([Chrome 50 and newer](https://sites.google.com/a/chromium.org/dev/Home/chromium-security/deprecating-powerful-features-on-insecure-origins))\r\n\t// See `Locate options` for more details.\r\n\tlocate: function (options) {\r\n\r\n\t\toptions = this._locateOptions = extend({\r\n\t\t\ttimeout: 10000,\r\n\t\t\twatch: false\r\n\t\t\t// setView: false\r\n\t\t\t// maxZoom: <Number>\r\n\t\t\t// maximumAge: 0\r\n\t\t\t// enableHighAccuracy: false\r\n\t\t}, options);\r\n\r\n\t\tif (!('geolocation' in navigator)) {\r\n\t\t\tthis._handleGeolocationError({\r\n\t\t\t\tcode: 0,\r\n\t\t\t\tmessage: 'Geolocation not supported.'\r\n\t\t\t});\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tvar onResponse = bind(this._handleGeolocationResponse, this),\r\n\t\t onError = bind(this._handleGeolocationError, this);\r\n\r\n\t\tif (options.watch) {\r\n\t\t\tthis._locationWatchId =\r\n\t\t\t navigator.geolocation.watchPosition(onResponse, onError, options);\r\n\t\t} else {\r\n\t\t\tnavigator.geolocation.getCurrentPosition(onResponse, onError, options);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method stopLocate(): this\r\n\t// Stops watching location previously initiated by `map.locate({watch: true})`\r\n\t// and aborts resetting the map view if map.locate was called with\r\n\t// `{setView: true}`.\r\n\tstopLocate: function () {\r\n\t\tif (navigator.geolocation && navigator.geolocation.clearWatch) {\r\n\t\t\tnavigator.geolocation.clearWatch(this._locationWatchId);\r\n\t\t}\r\n\t\tif (this._locateOptions) {\r\n\t\t\tthis._locateOptions.setView = false;\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_handleGeolocationError: function (error) {\r\n\t\tif (!this._container._leaflet_id) { return; }\r\n\r\n\t\tvar c = error.code,\r\n\t\t message = error.message ||\r\n\t\t (c === 1 ? 'permission denied' :\r\n\t\t (c === 2 ? 'position unavailable' : 'timeout'));\r\n\r\n\t\tif (this._locateOptions.setView && !this._loaded) {\r\n\t\t\tthis.fitWorld();\r\n\t\t}\r\n\r\n\t\t// @section Location events\r\n\t\t// @event locationerror: ErrorEvent\r\n\t\t// Fired when geolocation (using the [`locate`](#map-locate) method) failed.\r\n\t\tthis.fire('locationerror', {\r\n\t\t\tcode: c,\r\n\t\t\tmessage: 'Geolocation error: ' + message + '.'\r\n\t\t});\r\n\t},\r\n\r\n\t_handleGeolocationResponse: function (pos) {\r\n\t\tif (!this._container._leaflet_id) { return; }\r\n\r\n\t\tvar lat = pos.coords.latitude,\r\n\t\t lng = pos.coords.longitude,\r\n\t\t latlng = new LatLng(lat, lng),\r\n\t\t bounds = latlng.toBounds(pos.coords.accuracy * 2),\r\n\t\t options = this._locateOptions;\r\n\r\n\t\tif (options.setView) {\r\n\t\t\tvar zoom = this.getBoundsZoom(bounds);\r\n\t\t\tthis.setView(latlng, options.maxZoom ? Math.min(zoom, options.maxZoom) : zoom);\r\n\t\t}\r\n\r\n\t\tvar data = {\r\n\t\t\tlatlng: latlng,\r\n\t\t\tbounds: bounds,\r\n\t\t\ttimestamp: pos.timestamp\r\n\t\t};\r\n\r\n\t\tfor (var i in pos.coords) {\r\n\t\t\tif (typeof pos.coords[i] === 'number') {\r\n\t\t\t\tdata[i] = pos.coords[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// @event locationfound: LocationEvent\r\n\t\t// Fired when geolocation (using the [`locate`](#map-locate) method)\r\n\t\t// went successfully.\r\n\t\tthis.fire('locationfound', data);\r\n\t},\r\n\r\n\t// TODO Appropriate docs section?\r\n\t// @section Other Methods\r\n\t// @method addHandler(name: String, HandlerClass: Function): this\r\n\t// Adds a new `Handler` to the map, given its name and constructor function.\r\n\taddHandler: function (name, HandlerClass) {\r\n\t\tif (!HandlerClass) { return this; }\r\n\r\n\t\tvar handler = this[name] = new HandlerClass(this);\r\n\r\n\t\tthis._handlers.push(handler);\r\n\r\n\t\tif (this.options[name]) {\r\n\t\t\thandler.enable();\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method remove(): this\r\n\t// Destroys the map and clears all related event listeners.\r\n\tremove: function () {\r\n\r\n\t\tthis._initEvents(true);\r\n\t\tif (this.options.maxBounds) { this.off('moveend', this._panInsideMaxBounds); }\r\n\r\n\t\tif (this._containerId !== this._container._leaflet_id) {\r\n\t\t\tthrow new Error('Map container is being reused by another instance');\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\t// throws error in IE6-8\r\n\t\t\tdelete this._container._leaflet_id;\r\n\t\t\tdelete this._containerId;\r\n\t\t} catch (e) {\r\n\t\t\t/*eslint-disable */\r\n\t\t\tthis._container._leaflet_id = undefined;\r\n\t\t\t/* eslint-enable */\r\n\t\t\tthis._containerId = undefined;\r\n\t\t}\r\n\r\n\t\tif (this._locationWatchId !== undefined) {\r\n\t\t\tthis.stopLocate();\r\n\t\t}\r\n\r\n\t\tthis._stop();\r\n\r\n\t\tremove(this._mapPane);\r\n\r\n\t\tif (this._clearControlPos) {\r\n\t\t\tthis._clearControlPos();\r\n\t\t}\r\n\t\tif (this._resizeRequest) {\r\n\t\t\tcancelAnimFrame(this._resizeRequest);\r\n\t\t\tthis._resizeRequest = null;\r\n\t\t}\r\n\r\n\t\tthis._clearHandlers();\r\n\r\n\t\tif (this._loaded) {\r\n\t\t\t// @section Map state change events\r\n\t\t\t// @event unload: Event\r\n\t\t\t// Fired when the map is destroyed with [remove](#map-remove) method.\r\n\t\t\tthis.fire('unload');\r\n\t\t}\r\n\r\n\t\tvar i;\r\n\t\tfor (i in this._layers) {\r\n\t\t\tthis._layers[i].remove();\r\n\t\t}\r\n\t\tfor (i in this._panes) {\r\n\t\t\tremove(this._panes[i]);\r\n\t\t}\r\n\r\n\t\tthis._layers = [];\r\n\t\tthis._panes = [];\r\n\t\tdelete this._mapPane;\r\n\t\tdelete this._renderer;\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @section Other Methods\r\n\t// @method createPane(name: String, container?: HTMLElement): HTMLElement\r\n\t// Creates a new [map pane](#map-pane) with the given name if it doesn't exist already,\r\n\t// then returns it. The pane is created as a child of `container`, or\r\n\t// as a child of the main map pane if not set.\r\n\tcreatePane: function (name, container) {\r\n\t\tvar className = 'leaflet-pane' + (name ? ' leaflet-' + name.replace('Pane', '') + '-pane' : ''),\r\n\t\t pane = create$1('div', className, container || this._mapPane);\r\n\r\n\t\tif (name) {\r\n\t\t\tthis._panes[name] = pane;\r\n\t\t}\r\n\t\treturn pane;\r\n\t},\r\n\r\n\t// @section Methods for Getting Map State\r\n\r\n\t// @method getCenter(): LatLng\r\n\t// Returns the geographical center of the map view\r\n\tgetCenter: function () {\r\n\t\tthis._checkIfLoaded();\r\n\r\n\t\tif (this._lastCenter && !this._moved()) {\r\n\t\t\treturn this._lastCenter.clone();\r\n\t\t}\r\n\t\treturn this.layerPointToLatLng(this._getCenterLayerPoint());\r\n\t},\r\n\r\n\t// @method getZoom(): Number\r\n\t// Returns the current zoom level of the map view\r\n\tgetZoom: function () {\r\n\t\treturn this._zoom;\r\n\t},\r\n\r\n\t// @method getBounds(): LatLngBounds\r\n\t// Returns the geographical bounds visible in the current map view\r\n\tgetBounds: function () {\r\n\t\tvar bounds = this.getPixelBounds(),\r\n\t\t sw = this.unproject(bounds.getBottomLeft()),\r\n\t\t ne = this.unproject(bounds.getTopRight());\r\n\r\n\t\treturn new LatLngBounds(sw, ne);\r\n\t},\r\n\r\n\t// @method getMinZoom(): Number\r\n\t// Returns the minimum zoom level of the map (if set in the `minZoom` option of the map or of any layers), or `0` by default.\r\n\tgetMinZoom: function () {\r\n\t\treturn this.options.minZoom === undefined ? this._layersMinZoom || 0 : this.options.minZoom;\r\n\t},\r\n\r\n\t// @method getMaxZoom(): Number\r\n\t// Returns the maximum zoom level of the map (if set in the `maxZoom` option of the map or of any layers).\r\n\tgetMaxZoom: function () {\r\n\t\treturn this.options.maxZoom === undefined ?\r\n\t\t\t(this._layersMaxZoom === undefined ? Infinity : this._layersMaxZoom) :\r\n\t\t\tthis.options.maxZoom;\r\n\t},\r\n\r\n\t// @method getBoundsZoom(bounds: LatLngBounds, inside?: Boolean, padding?: Point): Number\r\n\t// Returns the maximum zoom level on which the given bounds fit to the map\r\n\t// view in its entirety. If `inside` (optional) is set to `true`, the method\r\n\t// instead returns the minimum zoom level on which the map view fits into\r\n\t// the given bounds in its entirety.\r\n\tgetBoundsZoom: function (bounds, inside, padding) { // (LatLngBounds[, Boolean, Point]) -> Number\r\n\t\tbounds = toLatLngBounds(bounds);\r\n\t\tpadding = toPoint(padding || [0, 0]);\r\n\r\n\t\tvar zoom = this.getZoom() || 0,\r\n\t\t min = this.getMinZoom(),\r\n\t\t max = this.getMaxZoom(),\r\n\t\t nw = bounds.getNorthWest(),\r\n\t\t se = bounds.getSouthEast(),\r\n\t\t size = this.getSize().subtract(padding),\r\n\t\t boundsSize = toBounds(this.project(se, zoom), this.project(nw, zoom)).getSize(),\r\n\t\t snap = Browser.any3d ? this.options.zoomSnap : 1,\r\n\t\t scalex = size.x / boundsSize.x,\r\n\t\t scaley = size.y / boundsSize.y,\r\n\t\t scale = inside ? Math.max(scalex, scaley) : Math.min(scalex, scaley);\r\n\r\n\t\tzoom = this.getScaleZoom(scale, zoom);\r\n\r\n\t\tif (snap) {\r\n\t\t\tzoom = Math.round(zoom / (snap / 100)) * (snap / 100); // don't jump if within 1% of a snap level\r\n\t\t\tzoom = inside ? Math.ceil(zoom / snap) * snap : Math.floor(zoom / snap) * snap;\r\n\t\t}\r\n\r\n\t\treturn Math.max(min, Math.min(max, zoom));\r\n\t},\r\n\r\n\t// @method getSize(): Point\r\n\t// Returns the current size of the map container (in pixels).\r\n\tgetSize: function () {\r\n\t\tif (!this._size || this._sizeChanged) {\r\n\t\t\tthis._size = new Point(\r\n\t\t\t\tthis._container.clientWidth || 0,\r\n\t\t\t\tthis._container.clientHeight || 0);\r\n\r\n\t\t\tthis._sizeChanged = false;\r\n\t\t}\r\n\t\treturn this._size.clone();\r\n\t},\r\n\r\n\t// @method getPixelBounds(): Bounds\r\n\t// Returns the bounds of the current map view in projected pixel\r\n\t// coordinates (sometimes useful in layer and overlay implementations).\r\n\tgetPixelBounds: function (center, zoom) {\r\n\t\tvar topLeftPoint = this._getTopLeftPoint(center, zoom);\r\n\t\treturn new Bounds(topLeftPoint, topLeftPoint.add(this.getSize()));\r\n\t},\r\n\r\n\t// TODO: Check semantics - isn't the pixel origin the 0,0 coord relative to\r\n\t// the map pane? \"left point of the map layer\" can be confusing, specially\r\n\t// since there can be negative offsets.\r\n\t// @method getPixelOrigin(): Point\r\n\t// Returns the projected pixel coordinates of the top left point of\r\n\t// the map layer (useful in custom layer and overlay implementations).\r\n\tgetPixelOrigin: function () {\r\n\t\tthis._checkIfLoaded();\r\n\t\treturn this._pixelOrigin;\r\n\t},\r\n\r\n\t// @method getPixelWorldBounds(zoom?: Number): Bounds\r\n\t// Returns the world's bounds in pixel coordinates for zoom level `zoom`.\r\n\t// If `zoom` is omitted, the map's current zoom level is used.\r\n\tgetPixelWorldBounds: function (zoom) {\r\n\t\treturn this.options.crs.getProjectedBounds(zoom === undefined ? this.getZoom() : zoom);\r\n\t},\r\n\r\n\t// @section Other Methods\r\n\r\n\t// @method getPane(pane: String|HTMLElement): HTMLElement\r\n\t// Returns a [map pane](#map-pane), given its name or its HTML element (its identity).\r\n\tgetPane: function (pane) {\r\n\t\treturn typeof pane === 'string' ? this._panes[pane] : pane;\r\n\t},\r\n\r\n\t// @method getPanes(): Object\r\n\t// Returns a plain object containing the names of all [panes](#map-pane) as keys and\r\n\t// the panes as values.\r\n\tgetPanes: function () {\r\n\t\treturn this._panes;\r\n\t},\r\n\r\n\t// @method getContainer: HTMLElement\r\n\t// Returns the HTML element that contains the map.\r\n\tgetContainer: function () {\r\n\t\treturn this._container;\r\n\t},\r\n\r\n\r\n\t// @section Conversion Methods\r\n\r\n\t// @method getZoomScale(toZoom: Number, fromZoom: Number): Number\r\n\t// Returns the scale factor to be applied to a map transition from zoom level\r\n\t// `fromZoom` to `toZoom`. Used internally to help with zoom animations.\r\n\tgetZoomScale: function (toZoom, fromZoom) {\r\n\t\t// TODO replace with universal implementation after refactoring projections\r\n\t\tvar crs = this.options.crs;\r\n\t\tfromZoom = fromZoom === undefined ? this._zoom : fromZoom;\r\n\t\treturn crs.scale(toZoom) / crs.scale(fromZoom);\r\n\t},\r\n\r\n\t// @method getScaleZoom(scale: Number, fromZoom: Number): Number\r\n\t// Returns the zoom level that the map would end up at, if it is at `fromZoom`\r\n\t// level and everything is scaled by a factor of `scale`. Inverse of\r\n\t// [`getZoomScale`](#map-getZoomScale).\r\n\tgetScaleZoom: function (scale, fromZoom) {\r\n\t\tvar crs = this.options.crs;\r\n\t\tfromZoom = fromZoom === undefined ? this._zoom : fromZoom;\r\n\t\tvar zoom = crs.zoom(scale * crs.scale(fromZoom));\r\n\t\treturn isNaN(zoom) ? Infinity : zoom;\r\n\t},\r\n\r\n\t// @method project(latlng: LatLng, zoom: Number): Point\r\n\t// Projects a geographical coordinate `LatLng` according to the projection\r\n\t// of the map's CRS, then scales it according to `zoom` and the CRS's\r\n\t// `Transformation`. The result is pixel coordinate relative to\r\n\t// the CRS origin.\r\n\tproject: function (latlng, zoom) {\r\n\t\tzoom = zoom === undefined ? this._zoom : zoom;\r\n\t\treturn this.options.crs.latLngToPoint(toLatLng(latlng), zoom);\r\n\t},\r\n\r\n\t// @method unproject(point: Point, zoom: Number): LatLng\r\n\t// Inverse of [`project`](#map-project).\r\n\tunproject: function (point, zoom) {\r\n\t\tzoom = zoom === undefined ? this._zoom : zoom;\r\n\t\treturn this.options.crs.pointToLatLng(toPoint(point), zoom);\r\n\t},\r\n\r\n\t// @method layerPointToLatLng(point: Point): LatLng\r\n\t// Given a pixel coordinate relative to the [origin pixel](#map-getpixelorigin),\r\n\t// returns the corresponding geographical coordinate (for the current zoom level).\r\n\tlayerPointToLatLng: function (point) {\r\n\t\tvar projectedPoint = toPoint(point).add(this.getPixelOrigin());\r\n\t\treturn this.unproject(projectedPoint);\r\n\t},\r\n\r\n\t// @method latLngToLayerPoint(latlng: LatLng): Point\r\n\t// Given a geographical coordinate, returns the corresponding pixel coordinate\r\n\t// relative to the [origin pixel](#map-getpixelorigin).\r\n\tlatLngToLayerPoint: function (latlng) {\r\n\t\tvar projectedPoint = this.project(toLatLng(latlng))._round();\r\n\t\treturn projectedPoint._subtract(this.getPixelOrigin());\r\n\t},\r\n\r\n\t// @method wrapLatLng(latlng: LatLng): LatLng\r\n\t// Returns a `LatLng` where `lat` and `lng` has been wrapped according to the\r\n\t// map's CRS's `wrapLat` and `wrapLng` properties, if they are outside the\r\n\t// CRS's bounds.\r\n\t// By default this means longitude is wrapped around the dateline so its\r\n\t// value is between -180 and +180 degrees.\r\n\twrapLatLng: function (latlng) {\r\n\t\treturn this.options.crs.wrapLatLng(toLatLng(latlng));\r\n\t},\r\n\r\n\t// @method wrapLatLngBounds(bounds: LatLngBounds): LatLngBounds\r\n\t// Returns a `LatLngBounds` with the same size as the given one, ensuring that\r\n\t// its center is within the CRS's bounds.\r\n\t// By default this means the center longitude is wrapped around the dateline so its\r\n\t// value is between -180 and +180 degrees, and the majority of the bounds\r\n\t// overlaps the CRS's bounds.\r\n\twrapLatLngBounds: function (latlng) {\r\n\t\treturn this.options.crs.wrapLatLngBounds(toLatLngBounds(latlng));\r\n\t},\r\n\r\n\t// @method distance(latlng1: LatLng, latlng2: LatLng): Number\r\n\t// Returns the distance between two geographical coordinates according to\r\n\t// the map's CRS. By default this measures distance in meters.\r\n\tdistance: function (latlng1, latlng2) {\r\n\t\treturn this.options.crs.distance(toLatLng(latlng1), toLatLng(latlng2));\r\n\t},\r\n\r\n\t// @method containerPointToLayerPoint(point: Point): Point\r\n\t// Given a pixel coordinate relative to the map container, returns the corresponding\r\n\t// pixel coordinate relative to the [origin pixel](#map-getpixelorigin).\r\n\tcontainerPointToLayerPoint: function (point) { // (Point)\r\n\t\treturn toPoint(point).subtract(this._getMapPanePos());\r\n\t},\r\n\r\n\t// @method layerPointToContainerPoint(point: Point): Point\r\n\t// Given a pixel coordinate relative to the [origin pixel](#map-getpixelorigin),\r\n\t// returns the corresponding pixel coordinate relative to the map container.\r\n\tlayerPointToContainerPoint: function (point) { // (Point)\r\n\t\treturn toPoint(point).add(this._getMapPanePos());\r\n\t},\r\n\r\n\t// @method containerPointToLatLng(point: Point): LatLng\r\n\t// Given a pixel coordinate relative to the map container, returns\r\n\t// the corresponding geographical coordinate (for the current zoom level).\r\n\tcontainerPointToLatLng: function (point) {\r\n\t\tvar layerPoint = this.containerPointToLayerPoint(toPoint(point));\r\n\t\treturn this.layerPointToLatLng(layerPoint);\r\n\t},\r\n\r\n\t// @method latLngToContainerPoint(latlng: LatLng): Point\r\n\t// Given a geographical coordinate, returns the corresponding pixel coordinate\r\n\t// relative to the map container.\r\n\tlatLngToContainerPoint: function (latlng) {\r\n\t\treturn this.layerPointToContainerPoint(this.latLngToLayerPoint(toLatLng(latlng)));\r\n\t},\r\n\r\n\t// @method mouseEventToContainerPoint(ev: MouseEvent): Point\r\n\t// Given a MouseEvent object, returns the pixel coordinate relative to the\r\n\t// map container where the event took place.\r\n\tmouseEventToContainerPoint: function (e) {\r\n\t\treturn getMousePosition(e, this._container);\r\n\t},\r\n\r\n\t// @method mouseEventToLayerPoint(ev: MouseEvent): Point\r\n\t// Given a MouseEvent object, returns the pixel coordinate relative to\r\n\t// the [origin pixel](#map-getpixelorigin) where the event took place.\r\n\tmouseEventToLayerPoint: function (e) {\r\n\t\treturn this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e));\r\n\t},\r\n\r\n\t// @method mouseEventToLatLng(ev: MouseEvent): LatLng\r\n\t// Given a MouseEvent object, returns geographical coordinate where the\r\n\t// event took place.\r\n\tmouseEventToLatLng: function (e) { // (MouseEvent)\r\n\t\treturn this.layerPointToLatLng(this.mouseEventToLayerPoint(e));\r\n\t},\r\n\r\n\r\n\t// map initialization methods\r\n\r\n\t_initContainer: function (id) {\r\n\t\tvar container = this._container = get(id);\r\n\r\n\t\tif (!container) {\r\n\t\t\tthrow new Error('Map container not found.');\r\n\t\t} else if (container._leaflet_id) {\r\n\t\t\tthrow new Error('Map container is already initialized.');\r\n\t\t}\r\n\r\n\t\ton(container, 'scroll', this._onScroll, this);\r\n\t\tthis._containerId = stamp(container);\r\n\t},\r\n\r\n\t_initLayout: function () {\r\n\t\tvar container = this._container;\r\n\r\n\t\tthis._fadeAnimated = this.options.fadeAnimation && Browser.any3d;\r\n\r\n\t\taddClass(container, 'leaflet-container' +\r\n\t\t\t(Browser.touch ? ' leaflet-touch' : '') +\r\n\t\t\t(Browser.retina ? ' leaflet-retina' : '') +\r\n\t\t\t(Browser.ielt9 ? ' leaflet-oldie' : '') +\r\n\t\t\t(Browser.safari ? ' leaflet-safari' : '') +\r\n\t\t\t(this._fadeAnimated ? ' leaflet-fade-anim' : ''));\r\n\r\n\t\tvar position = getStyle(container, 'position');\r\n\r\n\t\tif (position !== 'absolute' && position !== 'relative' && position !== 'fixed') {\r\n\t\t\tcontainer.style.position = 'relative';\r\n\t\t}\r\n\r\n\t\tthis._initPanes();\r\n\r\n\t\tif (this._initControlPos) {\r\n\t\t\tthis._initControlPos();\r\n\t\t}\r\n\t},\r\n\r\n\t_initPanes: function () {\r\n\t\tvar panes = this._panes = {};\r\n\t\tthis._paneRenderers = {};\r\n\r\n\t\t// @section\r\n\t\t//\r\n\t\t// Panes are DOM elements used to control the ordering of layers on the map. You\r\n\t\t// can access panes with [`map.getPane`](#map-getpane) or\r\n\t\t// [`map.getPanes`](#map-getpanes) methods. New panes can be created with the\r\n\t\t// [`map.createPane`](#map-createpane) method.\r\n\t\t//\r\n\t\t// Every map has the following default panes that differ only in zIndex.\r\n\t\t//\r\n\t\t// @pane mapPane: HTMLElement = 'auto'\r\n\t\t// Pane that contains all other map panes\r\n\r\n\t\tthis._mapPane = this.createPane('mapPane', this._container);\r\n\t\tsetPosition(this._mapPane, new Point(0, 0));\r\n\r\n\t\t// @pane tilePane: HTMLElement = 200\r\n\t\t// Pane for `GridLayer`s and `TileLayer`s\r\n\t\tthis.createPane('tilePane');\r\n\t\t// @pane overlayPane: HTMLElement = 400\r\n\t\t// Pane for vectors (`Path`s, like `Polyline`s and `Polygon`s), `ImageOverlay`s and `VideoOverlay`s\r\n\t\tthis.createPane('overlayPane');\r\n\t\t// @pane shadowPane: HTMLElement = 500\r\n\t\t// Pane for overlay shadows (e.g. `Marker` shadows)\r\n\t\tthis.createPane('shadowPane');\r\n\t\t// @pane markerPane: HTMLElement = 600\r\n\t\t// Pane for `Icon`s of `Marker`s\r\n\t\tthis.createPane('markerPane');\r\n\t\t// @pane tooltipPane: HTMLElement = 650\r\n\t\t// Pane for `Tooltip`s.\r\n\t\tthis.createPane('tooltipPane');\r\n\t\t// @pane popupPane: HTMLElement = 700\r\n\t\t// Pane for `Popup`s.\r\n\t\tthis.createPane('popupPane');\r\n\r\n\t\tif (!this.options.markerZoomAnimation) {\r\n\t\t\taddClass(panes.markerPane, 'leaflet-zoom-hide');\r\n\t\t\taddClass(panes.shadowPane, 'leaflet-zoom-hide');\r\n\t\t}\r\n\t},\r\n\r\n\r\n\t// private methods that modify map state\r\n\r\n\t// @section Map state change events\r\n\t_resetView: function (center, zoom, noMoveStart) {\r\n\t\tsetPosition(this._mapPane, new Point(0, 0));\r\n\r\n\t\tvar loading = !this._loaded;\r\n\t\tthis._loaded = true;\r\n\t\tzoom = this._limitZoom(zoom);\r\n\r\n\t\tthis.fire('viewprereset');\r\n\r\n\t\tvar zoomChanged = this._zoom !== zoom;\r\n\t\tthis\r\n\t\t\t._moveStart(zoomChanged, noMoveStart)\r\n\t\t\t._move(center, zoom)\r\n\t\t\t._moveEnd(zoomChanged);\r\n\r\n\t\t// @event viewreset: Event\r\n\t\t// Fired when the map needs to redraw its content (this usually happens\r\n\t\t// on map zoom or load). Very useful for creating custom overlays.\r\n\t\tthis.fire('viewreset');\r\n\r\n\t\t// @event load: Event\r\n\t\t// Fired when the map is initialized (when its center and zoom are set\r\n\t\t// for the first time).\r\n\t\tif (loading) {\r\n\t\t\tthis.fire('load');\r\n\t\t}\r\n\t},\r\n\r\n\t_moveStart: function (zoomChanged, noMoveStart) {\r\n\t\t// @event zoomstart: Event\r\n\t\t// Fired when the map zoom is about to change (e.g. before zoom animation).\r\n\t\t// @event movestart: Event\r\n\t\t// Fired when the view of the map starts changing (e.g. user starts dragging the map).\r\n\t\tif (zoomChanged) {\r\n\t\t\tthis.fire('zoomstart');\r\n\t\t}\r\n\t\tif (!noMoveStart) {\r\n\t\t\tthis.fire('movestart');\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_move: function (center, zoom, data, supressEvent) {\r\n\t\tif (zoom === undefined) {\r\n\t\t\tzoom = this._zoom;\r\n\t\t}\r\n\t\tvar zoomChanged = this._zoom !== zoom;\r\n\r\n\t\tthis._zoom = zoom;\r\n\t\tthis._lastCenter = center;\r\n\t\tthis._pixelOrigin = this._getNewPixelOrigin(center);\r\n\r\n\t\tif (!supressEvent) {\r\n\t\t\t// @event zoom: Event\r\n\t\t\t// Fired repeatedly during any change in zoom level,\r\n\t\t\t// including zoom and fly animations.\r\n\t\t\tif (zoomChanged || (data && data.pinch)) {\t// Always fire 'zoom' if pinching because #3530\r\n\t\t\t\tthis.fire('zoom', data);\r\n\t\t\t}\r\n\r\n\t\t\t// @event move: Event\r\n\t\t\t// Fired repeatedly during any movement of the map,\r\n\t\t\t// including pan and fly animations.\r\n\t\t\tthis.fire('move', data);\r\n\t\t} else if (data && data.pinch) {\t// Always fire 'zoom' if pinching because #3530\r\n\t\t\tthis.fire('zoom', data);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_moveEnd: function (zoomChanged) {\r\n\t\t// @event zoomend: Event\r\n\t\t// Fired when the map zoom changed, after any animations.\r\n\t\tif (zoomChanged) {\r\n\t\t\tthis.fire('zoomend');\r\n\t\t}\r\n\r\n\t\t// @event moveend: Event\r\n\t\t// Fired when the center of the map stops changing\r\n\t\t// (e.g. user stopped dragging the map or after non-centered zoom).\r\n\t\treturn this.fire('moveend');\r\n\t},\r\n\r\n\t_stop: function () {\r\n\t\tcancelAnimFrame(this._flyToFrame);\r\n\t\tif (this._panAnim) {\r\n\t\t\tthis._panAnim.stop();\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_rawPanBy: function (offset) {\r\n\t\tsetPosition(this._mapPane, this._getMapPanePos().subtract(offset));\r\n\t},\r\n\r\n\t_getZoomSpan: function () {\r\n\t\treturn this.getMaxZoom() - this.getMinZoom();\r\n\t},\r\n\r\n\t_panInsideMaxBounds: function () {\r\n\t\tif (!this._enforcingBounds) {\r\n\t\t\tthis.panInsideBounds(this.options.maxBounds);\r\n\t\t}\r\n\t},\r\n\r\n\t_checkIfLoaded: function () {\r\n\t\tif (!this._loaded) {\r\n\t\t\tthrow new Error('Set map center and zoom first.');\r\n\t\t}\r\n\t},\r\n\r\n\t// DOM event handling\r\n\r\n\t// @section Interaction events\r\n\t_initEvents: function (remove) {\r\n\t\tthis._targets = {};\r\n\t\tthis._targets[stamp(this._container)] = this;\r\n\r\n\t\tvar onOff = remove ? off : on;\r\n\r\n\t\t// @event click: MouseEvent\r\n\t\t// Fired when the user clicks (or taps) the map.\r\n\t\t// @event dblclick: MouseEvent\r\n\t\t// Fired when the user double-clicks (or double-taps) the map.\r\n\t\t// @event mousedown: MouseEvent\r\n\t\t// Fired when the user pushes the mouse button on the map.\r\n\t\t// @event mouseup: MouseEvent\r\n\t\t// Fired when the user releases the mouse button on the map.\r\n\t\t// @event mouseover: MouseEvent\r\n\t\t// Fired when the mouse enters the map.\r\n\t\t// @event mouseout: MouseEvent\r\n\t\t// Fired when the mouse leaves the map.\r\n\t\t// @event mousemove: MouseEvent\r\n\t\t// Fired while the mouse moves over the map.\r\n\t\t// @event contextmenu: MouseEvent\r\n\t\t// Fired when the user pushes the right mouse button on the map, prevents\r\n\t\t// default browser context menu from showing if there are listeners on\r\n\t\t// this event. Also fired on mobile when the user holds a single touch\r\n\t\t// for a second (also called long press).\r\n\t\t// @event keypress: KeyboardEvent\r\n\t\t// Fired when the user presses a key from the keyboard that produces a character value while the map is focused.\r\n\t\t// @event keydown: KeyboardEvent\r\n\t\t// Fired when the user presses a key from the keyboard while the map is focused. Unlike the `keypress` event,\r\n\t\t// the `keydown` event is fired for keys that produce a character value and for keys\r\n\t\t// that do not produce a character value.\r\n\t\t// @event keyup: KeyboardEvent\r\n\t\t// Fired when the user releases a key from the keyboard while the map is focused.\r\n\t\tonOff(this._container, 'click dblclick mousedown mouseup ' +\r\n\t\t\t'mouseover mouseout mousemove contextmenu keypress keydown keyup', this._handleDOMEvent, this);\r\n\r\n\t\tif (this.options.trackResize) {\r\n\t\t\tonOff(window, 'resize', this._onResize, this);\r\n\t\t}\r\n\r\n\t\tif (Browser.any3d && this.options.transform3DLimit) {\r\n\t\t\t(remove ? this.off : this.on).call(this, 'moveend', this._onMoveEnd);\r\n\t\t}\r\n\t},\r\n\r\n\t_onResize: function () {\r\n\t\tcancelAnimFrame(this._resizeRequest);\r\n\t\tthis._resizeRequest = requestAnimFrame(\r\n\t\t function () { this.invalidateSize({debounceMoveend: true}); }, this);\r\n\t},\r\n\r\n\t_onScroll: function () {\r\n\t\tthis._container.scrollTop = 0;\r\n\t\tthis._container.scrollLeft = 0;\r\n\t},\r\n\r\n\t_onMoveEnd: function () {\r\n\t\tvar pos = this._getMapPanePos();\r\n\t\tif (Math.max(Math.abs(pos.x), Math.abs(pos.y)) >= this.options.transform3DLimit) {\r\n\t\t\t// https://bugzilla.mozilla.org/show_bug.cgi?id=1203873 but Webkit also have\r\n\t\t\t// a pixel offset on very high values, see: https://jsfiddle.net/dg6r5hhb/\r\n\t\t\tthis._resetView(this.getCenter(), this.getZoom());\r\n\t\t}\r\n\t},\r\n\r\n\t_findEventTargets: function (e, type) {\r\n\t\tvar targets = [],\r\n\t\t target,\r\n\t\t isHover = type === 'mouseout' || type === 'mouseover',\r\n\t\t src = e.target || e.srcElement,\r\n\t\t dragging = false;\r\n\r\n\t\twhile (src) {\r\n\t\t\ttarget = this._targets[stamp(src)];\r\n\t\t\tif (target && (type === 'click' || type === 'preclick') && this._draggableMoved(target)) {\r\n\t\t\t\t// Prevent firing click after you just dragged an object.\r\n\t\t\t\tdragging = true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif (target && target.listens(type, true)) {\r\n\t\t\t\tif (isHover && !isExternalTarget(src, e)) { break; }\r\n\t\t\t\ttargets.push(target);\r\n\t\t\t\tif (isHover) { break; }\r\n\t\t\t}\r\n\t\t\tif (src === this._container) { break; }\r\n\t\t\tsrc = src.parentNode;\r\n\t\t}\r\n\t\tif (!targets.length && !dragging && !isHover && this.listens(type, true)) {\r\n\t\t\ttargets = [this];\r\n\t\t}\r\n\t\treturn targets;\r\n\t},\r\n\r\n\t_isClickDisabled: function (el) {\r\n\t\twhile (el && el !== this._container) {\r\n\t\t\tif (el['_leaflet_disable_click']) { return true; }\r\n\t\t\tel = el.parentNode;\r\n\t\t}\r\n\t},\r\n\r\n\t_handleDOMEvent: function (e) {\r\n\t\tvar el = (e.target || e.srcElement);\r\n\t\tif (!this._loaded || el['_leaflet_disable_events'] || e.type === 'click' && this._isClickDisabled(el)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar type = e.type;\r\n\r\n\t\tif (type === 'mousedown') {\r\n\t\t\t// prevents outline when clicking on keyboard-focusable element\r\n\t\t\tpreventOutline(el);\r\n\t\t}\r\n\r\n\t\tthis._fireDOMEvent(e, type);\r\n\t},\r\n\r\n\t_mouseEvents: ['click', 'dblclick', 'mouseover', 'mouseout', 'contextmenu'],\r\n\r\n\t_fireDOMEvent: function (e, type, canvasTargets) {\r\n\r\n\t\tif (e.type === 'click') {\r\n\t\t\t// Fire a synthetic 'preclick' event which propagates up (mainly for closing popups).\r\n\t\t\t// @event preclick: MouseEvent\r\n\t\t\t// Fired before mouse click on the map (sometimes useful when you\r\n\t\t\t// want something to happen on click before any existing click\r\n\t\t\t// handlers start running).\r\n\t\t\tvar synth = extend({}, e);\r\n\t\t\tsynth.type = 'preclick';\r\n\t\t\tthis._fireDOMEvent(synth, synth.type, canvasTargets);\r\n\t\t}\r\n\r\n\t\t// Find the layer the event is propagating from and its parents.\r\n\t\tvar targets = this._findEventTargets(e, type);\r\n\r\n\t\tif (canvasTargets) {\r\n\t\t\tvar filtered = []; // pick only targets with listeners\r\n\t\t\tfor (var i = 0; i < canvasTargets.length; i++) {\r\n\t\t\t\tif (canvasTargets[i].listens(type, true)) {\r\n\t\t\t\t\tfiltered.push(canvasTargets[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ttargets = filtered.concat(targets);\r\n\t\t}\r\n\r\n\t\tif (!targets.length) { return; }\r\n\r\n\t\tif (type === 'contextmenu') {\r\n\t\t\tpreventDefault(e);\r\n\t\t}\r\n\r\n\t\tvar target = targets[0];\r\n\t\tvar data = {\r\n\t\t\toriginalEvent: e\r\n\t\t};\r\n\r\n\t\tif (e.type !== 'keypress' && e.type !== 'keydown' && e.type !== 'keyup') {\r\n\t\t\tvar isMarker = target.getLatLng && (!target._radius || target._radius <= 10);\r\n\t\t\tdata.containerPoint = isMarker ?\r\n\t\t\t\tthis.latLngToContainerPoint(target.getLatLng()) : this.mouseEventToContainerPoint(e);\r\n\t\t\tdata.layerPoint = this.containerPointToLayerPoint(data.containerPoint);\r\n\t\t\tdata.latlng = isMarker ? target.getLatLng() : this.layerPointToLatLng(data.layerPoint);\r\n\t\t}\r\n\r\n\t\tfor (i = 0; i < targets.length; i++) {\r\n\t\t\ttargets[i].fire(type, data, true);\r\n\t\t\tif (data.originalEvent._stopped ||\r\n\t\t\t\t(targets[i].options.bubblingMouseEvents === false && indexOf(this._mouseEvents, type) !== -1)) { return; }\r\n\t\t}\r\n\t},\r\n\r\n\t_draggableMoved: function (obj) {\r\n\t\tobj = obj.dragging && obj.dragging.enabled() ? obj : this;\r\n\t\treturn (obj.dragging && obj.dragging.moved()) || (this.boxZoom && this.boxZoom.moved());\r\n\t},\r\n\r\n\t_clearHandlers: function () {\r\n\t\tfor (var i = 0, len = this._handlers.length; i < len; i++) {\r\n\t\t\tthis._handlers[i].disable();\r\n\t\t}\r\n\t},\r\n\r\n\t// @section Other Methods\r\n\r\n\t// @method whenReady(fn: Function, context?: Object): this\r\n\t// Runs the given function `fn` when the map gets initialized with\r\n\t// a view (center and zoom) and at least one layer, or immediately\r\n\t// if it's already initialized, optionally passing a function context.\r\n\twhenReady: function (callback, context) {\r\n\t\tif (this._loaded) {\r\n\t\t\tcallback.call(context || this, {target: this});\r\n\t\t} else {\r\n\t\t\tthis.on('load', callback, context);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\r\n\t// private methods for getting map state\r\n\r\n\t_getMapPanePos: function () {\r\n\t\treturn getPosition(this._mapPane) || new Point(0, 0);\r\n\t},\r\n\r\n\t_moved: function () {\r\n\t\tvar pos = this._getMapPanePos();\r\n\t\treturn pos && !pos.equals([0, 0]);\r\n\t},\r\n\r\n\t_getTopLeftPoint: function (center, zoom) {\r\n\t\tvar pixelOrigin = center && zoom !== undefined ?\r\n\t\t\tthis._getNewPixelOrigin(center, zoom) :\r\n\t\t\tthis.getPixelOrigin();\r\n\t\treturn pixelOrigin.subtract(this._getMapPanePos());\r\n\t},\r\n\r\n\t_getNewPixelOrigin: function (center, zoom) {\r\n\t\tvar viewHalf = this.getSize()._divideBy(2);\r\n\t\treturn this.project(center, zoom)._subtract(viewHalf)._add(this._getMapPanePos())._round();\r\n\t},\r\n\r\n\t_latLngToNewLayerPoint: function (latlng, zoom, center) {\r\n\t\tvar topLeft = this._getNewPixelOrigin(center, zoom);\r\n\t\treturn this.project(latlng, zoom)._subtract(topLeft);\r\n\t},\r\n\r\n\t_latLngBoundsToNewLayerBounds: function (latLngBounds, zoom, center) {\r\n\t\tvar topLeft = this._getNewPixelOrigin(center, zoom);\r\n\t\treturn toBounds([\r\n\t\t\tthis.project(latLngBounds.getSouthWest(), zoom)._subtract(topLeft),\r\n\t\t\tthis.project(latLngBounds.getNorthWest(), zoom)._subtract(topLeft),\r\n\t\t\tthis.project(latLngBounds.getSouthEast(), zoom)._subtract(topLeft),\r\n\t\t\tthis.project(latLngBounds.getNorthEast(), zoom)._subtract(topLeft)\r\n\t\t]);\r\n\t},\r\n\r\n\t// layer point of the current center\r\n\t_getCenterLayerPoint: function () {\r\n\t\treturn this.containerPointToLayerPoint(this.getSize()._divideBy(2));\r\n\t},\r\n\r\n\t// offset of the specified place to the current center in pixels\r\n\t_getCenterOffset: function (latlng) {\r\n\t\treturn this.latLngToLayerPoint(latlng).subtract(this._getCenterLayerPoint());\r\n\t},\r\n\r\n\t// adjust center for view to get inside bounds\r\n\t_limitCenter: function (center, zoom, bounds) {\r\n\r\n\t\tif (!bounds) { return center; }\r\n\r\n\t\tvar centerPoint = this.project(center, zoom),\r\n\t\t viewHalf = this.getSize().divideBy(2),\r\n\t\t viewBounds = new Bounds(centerPoint.subtract(viewHalf), centerPoint.add(viewHalf)),\r\n\t\t offset = this._getBoundsOffset(viewBounds, bounds, zoom);\r\n\r\n\t\t// If offset is less than a pixel, ignore.\r\n\t\t// This prevents unstable projections from getting into\r\n\t\t// an infinite loop of tiny offsets.\r\n\t\tif (offset.round().equals([0, 0])) {\r\n\t\t\treturn center;\r\n\t\t}\r\n\r\n\t\treturn this.unproject(centerPoint.add(offset), zoom);\r\n\t},\r\n\r\n\t// adjust offset for view to get inside bounds\r\n\t_limitOffset: function (offset, bounds) {\r\n\t\tif (!bounds) { return offset; }\r\n\r\n\t\tvar viewBounds = this.getPixelBounds(),\r\n\t\t newBounds = new Bounds(viewBounds.min.add(offset), viewBounds.max.add(offset));\r\n\r\n\t\treturn offset.add(this._getBoundsOffset(newBounds, bounds));\r\n\t},\r\n\r\n\t// returns offset needed for pxBounds to get inside maxBounds at a specified zoom\r\n\t_getBoundsOffset: function (pxBounds, maxBounds, zoom) {\r\n\t\tvar projectedMaxBounds = toBounds(\r\n\t\t this.project(maxBounds.getNorthEast(), zoom),\r\n\t\t this.project(maxBounds.getSouthWest(), zoom)\r\n\t\t ),\r\n\t\t minOffset = projectedMaxBounds.min.subtract(pxBounds.min),\r\n\t\t maxOffset = projectedMaxBounds.max.subtract(pxBounds.max),\r\n\r\n\t\t dx = this._rebound(minOffset.x, -maxOffset.x),\r\n\t\t dy = this._rebound(minOffset.y, -maxOffset.y);\r\n\r\n\t\treturn new Point(dx, dy);\r\n\t},\r\n\r\n\t_rebound: function (left, right) {\r\n\t\treturn left + right > 0 ?\r\n\t\t\tMath.round(left - right) / 2 :\r\n\t\t\tMath.max(0, Math.ceil(left)) - Math.max(0, Math.floor(right));\r\n\t},\r\n\r\n\t_limitZoom: function (zoom) {\r\n\t\tvar min = this.getMinZoom(),\r\n\t\t max = this.getMaxZoom(),\r\n\t\t snap = Browser.any3d ? this.options.zoomSnap : 1;\r\n\t\tif (snap) {\r\n\t\t\tzoom = Math.round(zoom / snap) * snap;\r\n\t\t}\r\n\t\treturn Math.max(min, Math.min(max, zoom));\r\n\t},\r\n\r\n\t_onPanTransitionStep: function () {\r\n\t\tthis.fire('move');\r\n\t},\r\n\r\n\t_onPanTransitionEnd: function () {\r\n\t\tremoveClass(this._mapPane, 'leaflet-pan-anim');\r\n\t\tthis.fire('moveend');\r\n\t},\r\n\r\n\t_tryAnimatedPan: function (center, options) {\r\n\t\t// difference between the new and current centers in pixels\r\n\t\tvar offset = this._getCenterOffset(center)._trunc();\r\n\r\n\t\t// don't animate too far unless animate: true specified in options\r\n\t\tif ((options && options.animate) !== true && !this.getSize().contains(offset)) { return false; }\r\n\r\n\t\tthis.panBy(offset, options);\r\n\r\n\t\treturn true;\r\n\t},\r\n\r\n\t_createAnimProxy: function () {\r\n\r\n\t\tvar proxy = this._proxy = create$1('div', 'leaflet-proxy leaflet-zoom-animated');\r\n\t\tthis._panes.mapPane.appendChild(proxy);\r\n\r\n\t\tthis.on('zoomanim', function (e) {\r\n\t\t\tvar prop = TRANSFORM,\r\n\t\t\t transform = this._proxy.style[prop];\r\n\r\n\t\t\tsetTransform(this._proxy, this.project(e.center, e.zoom), this.getZoomScale(e.zoom, 1));\r\n\r\n\t\t\t// workaround for case when transform is the same and so transitionend event is not fired\r\n\t\t\tif (transform === this._proxy.style[prop] && this._animatingZoom) {\r\n\t\t\t\tthis._onZoomTransitionEnd();\r\n\t\t\t}\r\n\t\t}, this);\r\n\r\n\t\tthis.on('load moveend', this._animMoveEnd, this);\r\n\r\n\t\tthis._on('unload', this._destroyAnimProxy, this);\r\n\t},\r\n\r\n\t_destroyAnimProxy: function () {\r\n\t\tremove(this._proxy);\r\n\t\tthis.off('load moveend', this._animMoveEnd, this);\r\n\t\tdelete this._proxy;\r\n\t},\r\n\r\n\t_animMoveEnd: function () {\r\n\t\tvar c = this.getCenter(),\r\n\t\t z = this.getZoom();\r\n\t\tsetTransform(this._proxy, this.project(c, z), this.getZoomScale(z, 1));\r\n\t},\r\n\r\n\t_catchTransitionEnd: function (e) {\r\n\t\tif (this._animatingZoom && e.propertyName.indexOf('transform') >= 0) {\r\n\t\t\tthis._onZoomTransitionEnd();\r\n\t\t}\r\n\t},\r\n\r\n\t_nothingToAnimate: function () {\r\n\t\treturn !this._container.getElementsByClassName('leaflet-zoom-animated').length;\r\n\t},\r\n\r\n\t_tryAnimatedZoom: function (center, zoom, options) {\r\n\r\n\t\tif (this._animatingZoom) { return true; }\r\n\r\n\t\toptions = options || {};\r\n\r\n\t\t// don't animate if disabled, not supported or zoom difference is too large\r\n\t\tif (!this._zoomAnimated || options.animate === false || this._nothingToAnimate() ||\r\n\t\t Math.abs(zoom - this._zoom) > this.options.zoomAnimationThreshold) { return false; }\r\n\r\n\t\t// offset is the pixel coords of the zoom origin relative to the current center\r\n\t\tvar scale = this.getZoomScale(zoom),\r\n\t\t offset = this._getCenterOffset(center)._divideBy(1 - 1 / scale);\r\n\r\n\t\t// don't animate if the zoom origin isn't within one screen from the current center, unless forced\r\n\t\tif (options.animate !== true && !this.getSize().contains(offset)) { return false; }\r\n\r\n\t\trequestAnimFrame(function () {\r\n\t\t\tthis\r\n\t\t\t ._moveStart(true, false)\r\n\t\t\t ._animateZoom(center, zoom, true);\r\n\t\t}, this);\r\n\r\n\t\treturn true;\r\n\t},\r\n\r\n\t_animateZoom: function (center, zoom, startAnim, noUpdate) {\r\n\t\tif (!this._mapPane) { return; }\r\n\r\n\t\tif (startAnim) {\r\n\t\t\tthis._animatingZoom = true;\r\n\r\n\t\t\t// remember what center/zoom to set after animation\r\n\t\t\tthis._animateToCenter = center;\r\n\t\t\tthis._animateToZoom = zoom;\r\n\r\n\t\t\taddClass(this._mapPane, 'leaflet-zoom-anim');\r\n\t\t}\r\n\r\n\t\t// @section Other Events\r\n\t\t// @event zoomanim: ZoomAnimEvent\r\n\t\t// Fired at least once per zoom animation. For continuous zoom, like pinch zooming, fired once per frame during zoom.\r\n\t\tthis.fire('zoomanim', {\r\n\t\t\tcenter: center,\r\n\t\t\tzoom: zoom,\r\n\t\t\tnoUpdate: noUpdate\r\n\t\t});\r\n\r\n\t\tif (!this._tempFireZoomEvent) {\r\n\t\t\tthis._tempFireZoomEvent = this._zoom !== this._animateToZoom;\r\n\t\t}\r\n\r\n\t\tthis._move(this._animateToCenter, this._animateToZoom, undefined, true);\r\n\r\n\t\t// Work around webkit not firing 'transitionend', see https://github.com/Leaflet/Leaflet/issues/3689, 2693\r\n\t\tsetTimeout(bind(this._onZoomTransitionEnd, this), 250);\r\n\t},\r\n\r\n\t_onZoomTransitionEnd: function () {\r\n\t\tif (!this._animatingZoom) { return; }\r\n\r\n\t\tif (this._mapPane) {\r\n\t\t\tremoveClass(this._mapPane, 'leaflet-zoom-anim');\r\n\t\t}\r\n\r\n\t\tthis._animatingZoom = false;\r\n\r\n\t\tthis._move(this._animateToCenter, this._animateToZoom, undefined, true);\r\n\r\n\t\tif (this._tempFireZoomEvent) {\r\n\t\t\tthis.fire('zoom');\r\n\t\t}\r\n\t\tdelete this._tempFireZoomEvent;\r\n\r\n\t\tthis.fire('move');\r\n\r\n\t\tthis._moveEnd(true);\r\n\t}\r\n});\r\n\r\n// @section\r\n\r\n// @factory L.map(id: String, options?: Map options)\r\n// Instantiates a map object given the DOM ID of a `<div>` element\r\n// and optionally an object literal with `Map options`.\r\n//\r\n// @alternative\r\n// @factory L.map(el: HTMLElement, options?: Map options)\r\n// Instantiates a map object given an instance of a `<div>` HTML element\r\n// and optionally an object literal with `Map options`.\r\nfunction createMap(id, options) {\r\n\treturn new Map(id, options);\r\n}\n\n/*\r\n * @class Control\r\n * @aka L.Control\r\n * @inherits Class\r\n *\r\n * L.Control is a base class for implementing map controls. Handles positioning.\r\n * All other controls extend from this class.\r\n */\r\n\r\nvar Control = Class.extend({\r\n\t// @section\r\n\t// @aka Control Options\r\n\toptions: {\r\n\t\t// @option position: String = 'topright'\r\n\t\t// The position of the control (one of the map corners). Possible values are `'topleft'`,\r\n\t\t// `'topright'`, `'bottomleft'` or `'bottomright'`\r\n\t\tposition: 'topright'\r\n\t},\r\n\r\n\tinitialize: function (options) {\r\n\t\tsetOptions(this, options);\r\n\t},\r\n\r\n\t/* @section\r\n\t * Classes extending L.Control will inherit the following methods:\r\n\t *\r\n\t * @method getPosition: string\r\n\t * Returns the position of the control.\r\n\t */\r\n\tgetPosition: function () {\r\n\t\treturn this.options.position;\r\n\t},\r\n\r\n\t// @method setPosition(position: string): this\r\n\t// Sets the position of the control.\r\n\tsetPosition: function (position) {\r\n\t\tvar map = this._map;\r\n\r\n\t\tif (map) {\r\n\t\t\tmap.removeControl(this);\r\n\t\t}\r\n\r\n\t\tthis.options.position = position;\r\n\r\n\t\tif (map) {\r\n\t\t\tmap.addControl(this);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method getContainer: HTMLElement\r\n\t// Returns the HTMLElement that contains the control.\r\n\tgetContainer: function () {\r\n\t\treturn this._container;\r\n\t},\r\n\r\n\t// @method addTo(map: Map): this\r\n\t// Adds the control to the given map.\r\n\taddTo: function (map) {\r\n\t\tthis.remove();\r\n\t\tthis._map = map;\r\n\r\n\t\tvar container = this._container = this.onAdd(map),\r\n\t\t pos = this.getPosition(),\r\n\t\t corner = map._controlCorners[pos];\r\n\r\n\t\taddClass(container, 'leaflet-control');\r\n\r\n\t\tif (pos.indexOf('bottom') !== -1) {\r\n\t\t\tcorner.insertBefore(container, corner.firstChild);\r\n\t\t} else {\r\n\t\t\tcorner.appendChild(container);\r\n\t\t}\r\n\r\n\t\tthis._map.on('unload', this.remove, this);\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method remove: this\r\n\t// Removes the control from the map it is currently active on.\r\n\tremove: function () {\r\n\t\tif (!this._map) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tremove(this._container);\r\n\r\n\t\tif (this.onRemove) {\r\n\t\t\tthis.onRemove(this._map);\r\n\t\t}\r\n\r\n\t\tthis._map.off('unload', this.remove, this);\r\n\t\tthis._map = null;\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_refocusOnMap: function (e) {\r\n\t\t// if map exists and event is not a keyboard event\r\n\t\tif (this._map && e && e.screenX > 0 && e.screenY > 0) {\r\n\t\t\tthis._map.getContainer().focus();\r\n\t\t}\r\n\t}\r\n});\r\n\r\nvar control = function (options) {\r\n\treturn new Control(options);\r\n};\r\n\r\n/* @section Extension methods\r\n * @uninheritable\r\n *\r\n * Every control should extend from `L.Control` and (re-)implement the following methods.\r\n *\r\n * @method onAdd(map: Map): HTMLElement\r\n * Should return the container DOM element for the control and add listeners on relevant map events. Called on [`control.addTo(map)`](#control-addTo).\r\n *\r\n * @method onRemove(map: Map)\r\n * Optional method. Should contain all clean up code that removes the listeners previously added in [`onAdd`](#control-onadd). Called on [`control.remove()`](#control-remove).\r\n */\r\n\r\n/* @namespace Map\r\n * @section Methods for Layers and Controls\r\n */\r\nMap.include({\r\n\t// @method addControl(control: Control): this\r\n\t// Adds the given control to the map\r\n\taddControl: function (control) {\r\n\t\tcontrol.addTo(this);\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method removeControl(control: Control): this\r\n\t// Removes the given control from the map\r\n\tremoveControl: function (control) {\r\n\t\tcontrol.remove();\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_initControlPos: function () {\r\n\t\tvar corners = this._controlCorners = {},\r\n\t\t l = 'leaflet-',\r\n\t\t container = this._controlContainer =\r\n\t\t create$1('div', l + 'control-container', this._container);\r\n\r\n\t\tfunction createCorner(vSide, hSide) {\r\n\t\t\tvar className = l + vSide + ' ' + l + hSide;\r\n\r\n\t\t\tcorners[vSide + hSide] = create$1('div', className, container);\r\n\t\t}\r\n\r\n\t\tcreateCorner('top', 'left');\r\n\t\tcreateCorner('top', 'right');\r\n\t\tcreateCorner('bottom', 'left');\r\n\t\tcreateCorner('bottom', 'right');\r\n\t},\r\n\r\n\t_clearControlPos: function () {\r\n\t\tfor (var i in this._controlCorners) {\r\n\t\t\tremove(this._controlCorners[i]);\r\n\t\t}\r\n\t\tremove(this._controlContainer);\r\n\t\tdelete this._controlCorners;\r\n\t\tdelete this._controlContainer;\r\n\t}\r\n});\n\n/*\r\n * @class Control.Layers\r\n * @aka L.Control.Layers\r\n * @inherits Control\r\n *\r\n * The layers control gives users the ability to switch between different base layers and switch overlays on/off (check out the [detailed example](https://leafletjs.com/examples/layers-control/)). Extends `Control`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var baseLayers = {\r\n * \t\"Mapbox\": mapbox,\r\n * \t\"OpenStreetMap\": osm\r\n * };\r\n *\r\n * var overlays = {\r\n * \t\"Marker\": marker,\r\n * \t\"Roads\": roadsLayer\r\n * };\r\n *\r\n * L.control.layers(baseLayers, overlays).addTo(map);\r\n * ```\r\n *\r\n * The `baseLayers` and `overlays` parameters are object literals with layer names as keys and `Layer` objects as values:\r\n *\r\n * ```js\r\n * {\r\n * \"<someName1>\": layer1,\r\n * \"<someName2>\": layer2\r\n * }\r\n * ```\r\n *\r\n * The layer names can contain HTML, which allows you to add additional styling to the items:\r\n *\r\n * ```js\r\n * {\"<img src='my-layer-icon' /> <span class='my-layer-item'>My Layer</span>\": myLayer}\r\n * ```\r\n */\r\n\r\nvar Layers = Control.extend({\r\n\t// @section\r\n\t// @aka Control.Layers options\r\n\toptions: {\r\n\t\t// @option collapsed: Boolean = true\r\n\t\t// If `true`, the control will be collapsed into an icon and expanded on mouse hover, touch, or keyboard activation.\r\n\t\tcollapsed: true,\r\n\t\tposition: 'topright',\r\n\r\n\t\t// @option autoZIndex: Boolean = true\r\n\t\t// If `true`, the control will assign zIndexes in increasing order to all of its layers so that the order is preserved when switching them on/off.\r\n\t\tautoZIndex: true,\r\n\r\n\t\t// @option hideSingleBase: Boolean = false\r\n\t\t// If `true`, the base layers in the control will be hidden when there is only one.\r\n\t\thideSingleBase: false,\r\n\r\n\t\t// @option sortLayers: Boolean = false\r\n\t\t// Whether to sort the layers. When `false`, layers will keep the order\r\n\t\t// in which they were added to the control.\r\n\t\tsortLayers: false,\r\n\r\n\t\t// @option sortFunction: Function = *\r\n\t\t// A [compare function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/sort)\r\n\t\t// that will be used for sorting the layers, when `sortLayers` is `true`.\r\n\t\t// The function receives both the `L.Layer` instances and their names, as in\r\n\t\t// `sortFunction(layerA, layerB, nameA, nameB)`.\r\n\t\t// By default, it sorts layers alphabetically by their name.\r\n\t\tsortFunction: function (layerA, layerB, nameA, nameB) {\r\n\t\t\treturn nameA < nameB ? -1 : (nameB < nameA ? 1 : 0);\r\n\t\t}\r\n\t},\r\n\r\n\tinitialize: function (baseLayers, overlays, options) {\r\n\t\tsetOptions(this, options);\r\n\r\n\t\tthis._layerControlInputs = [];\r\n\t\tthis._layers = [];\r\n\t\tthis._lastZIndex = 0;\r\n\t\tthis._handlingClick = false;\r\n\r\n\t\tfor (var i in baseLayers) {\r\n\t\t\tthis._addLayer(baseLayers[i], i);\r\n\t\t}\r\n\r\n\t\tfor (i in overlays) {\r\n\t\t\tthis._addLayer(overlays[i], i, true);\r\n\t\t}\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\t\tthis._initLayout();\r\n\t\tthis._update();\r\n\r\n\t\tthis._map = map;\r\n\t\tmap.on('zoomend', this._checkDisabledLayers, this);\r\n\r\n\t\tfor (var i = 0; i < this._layers.length; i++) {\r\n\t\t\tthis._layers[i].layer.on('add remove', this._onLayerChange, this);\r\n\t\t}\r\n\r\n\t\treturn this._container;\r\n\t},\r\n\r\n\taddTo: function (map) {\r\n\t\tControl.prototype.addTo.call(this, map);\r\n\t\t// Trigger expand after Layers Control has been inserted into DOM so that is now has an actual height.\r\n\t\treturn this._expandIfNotCollapsed();\r\n\t},\r\n\r\n\tonRemove: function () {\r\n\t\tthis._map.off('zoomend', this._checkDisabledLayers, this);\r\n\r\n\t\tfor (var i = 0; i < this._layers.length; i++) {\r\n\t\t\tthis._layers[i].layer.off('add remove', this._onLayerChange, this);\r\n\t\t}\r\n\t},\r\n\r\n\t// @method addBaseLayer(layer: Layer, name: String): this\r\n\t// Adds a base layer (radio button entry) with the given name to the control.\r\n\taddBaseLayer: function (layer, name) {\r\n\t\tthis._addLayer(layer, name);\r\n\t\treturn (this._map) ? this._update() : this;\r\n\t},\r\n\r\n\t// @method addOverlay(layer: Layer, name: String): this\r\n\t// Adds an overlay (checkbox entry) with the given name to the control.\r\n\taddOverlay: function (layer, name) {\r\n\t\tthis._addLayer(layer, name, true);\r\n\t\treturn (this._map) ? this._update() : this;\r\n\t},\r\n\r\n\t// @method removeLayer(layer: Layer): this\r\n\t// Remove the given layer from the control.\r\n\tremoveLayer: function (layer) {\r\n\t\tlayer.off('add remove', this._onLayerChange, this);\r\n\r\n\t\tvar obj = this._getLayer(stamp(layer));\r\n\t\tif (obj) {\r\n\t\t\tthis._layers.splice(this._layers.indexOf(obj), 1);\r\n\t\t}\r\n\t\treturn (this._map) ? this._update() : this;\r\n\t},\r\n\r\n\t// @method expand(): this\r\n\t// Expand the control container if collapsed.\r\n\texpand: function () {\r\n\t\taddClass(this._container, 'leaflet-control-layers-expanded');\r\n\t\tthis._section.style.height = null;\r\n\t\tvar acceptableHeight = this._map.getSize().y - (this._container.offsetTop + 50);\r\n\t\tif (acceptableHeight < this._section.clientHeight) {\r\n\t\t\taddClass(this._section, 'leaflet-control-layers-scrollbar');\r\n\t\t\tthis._section.style.height = acceptableHeight + 'px';\r\n\t\t} else {\r\n\t\t\tremoveClass(this._section, 'leaflet-control-layers-scrollbar');\r\n\t\t}\r\n\t\tthis._checkDisabledLayers();\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method collapse(): this\r\n\t// Collapse the control container if expanded.\r\n\tcollapse: function () {\r\n\t\tremoveClass(this._container, 'leaflet-control-layers-expanded');\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_initLayout: function () {\r\n\t\tvar className = 'leaflet-control-layers',\r\n\t\t container = this._container = create$1('div', className),\r\n\t\t collapsed = this.options.collapsed;\r\n\r\n\t\t// makes this work on IE touch devices by stopping it from firing a mouseout event when the touch is released\r\n\t\tcontainer.setAttribute('aria-haspopup', true);\r\n\r\n\t\tdisableClickPropagation(container);\r\n\t\tdisableScrollPropagation(container);\r\n\r\n\t\tvar section = this._section = create$1('section', className + '-list');\r\n\r\n\t\tif (collapsed) {\r\n\t\t\tthis._map.on('click', this.collapse, this);\r\n\r\n\t\t\ton(container, {\r\n\t\t\t\tmouseenter: function () {\r\n\t\t\t\t\ton(section, 'click', preventDefault);\r\n\t\t\t\t\tthis.expand();\r\n\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\toff(section, 'click', preventDefault);\r\n\t\t\t\t\t});\r\n\t\t\t\t},\r\n\t\t\t\tmouseleave: this.collapse\r\n\t\t\t}, this);\r\n\t\t}\r\n\r\n\t\tvar link = this._layersLink = create$1('a', className + '-toggle', container);\r\n\t\tlink.href = '#';\r\n\t\tlink.title = 'Layers';\r\n\t\tlink.setAttribute('role', 'button');\r\n\r\n\t\ton(link, 'click', preventDefault); // prevent link function\r\n\t\ton(link, 'focus', this.expand, this);\r\n\r\n\t\tif (!collapsed) {\r\n\t\t\tthis.expand();\r\n\t\t}\r\n\r\n\t\tthis._baseLayersList = create$1('div', className + '-base', section);\r\n\t\tthis._separator = create$1('div', className + '-separator', section);\r\n\t\tthis._overlaysList = create$1('div', className + '-overlays', section);\r\n\r\n\t\tcontainer.appendChild(section);\r\n\t},\r\n\r\n\t_getLayer: function (id) {\r\n\t\tfor (var i = 0; i < this._layers.length; i++) {\r\n\r\n\t\t\tif (this._layers[i] && stamp(this._layers[i].layer) === id) {\r\n\t\t\t\treturn this._layers[i];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_addLayer: function (layer, name, overlay) {\r\n\t\tif (this._map) {\r\n\t\t\tlayer.on('add remove', this._onLayerChange, this);\r\n\t\t}\r\n\r\n\t\tthis._layers.push({\r\n\t\t\tlayer: layer,\r\n\t\t\tname: name,\r\n\t\t\toverlay: overlay\r\n\t\t});\r\n\r\n\t\tif (this.options.sortLayers) {\r\n\t\t\tthis._layers.sort(bind(function (a, b) {\r\n\t\t\t\treturn this.options.sortFunction(a.layer, b.layer, a.name, b.name);\r\n\t\t\t}, this));\r\n\t\t}\r\n\r\n\t\tif (this.options.autoZIndex && layer.setZIndex) {\r\n\t\t\tthis._lastZIndex++;\r\n\t\t\tlayer.setZIndex(this._lastZIndex);\r\n\t\t}\r\n\r\n\t\tthis._expandIfNotCollapsed();\r\n\t},\r\n\r\n\t_update: function () {\r\n\t\tif (!this._container) { return this; }\r\n\r\n\t\tempty(this._baseLayersList);\r\n\t\tempty(this._overlaysList);\r\n\r\n\t\tthis._layerControlInputs = [];\r\n\t\tvar baseLayersPresent, overlaysPresent, i, obj, baseLayersCount = 0;\r\n\r\n\t\tfor (i = 0; i < this._layers.length; i++) {\r\n\t\t\tobj = this._layers[i];\r\n\t\t\tthis._addItem(obj);\r\n\t\t\toverlaysPresent = overlaysPresent || obj.overlay;\r\n\t\t\tbaseLayersPresent = baseLayersPresent || !obj.overlay;\r\n\t\t\tbaseLayersCount += !obj.overlay ? 1 : 0;\r\n\t\t}\r\n\r\n\t\t// Hide base layers section if there's only one layer.\r\n\t\tif (this.options.hideSingleBase) {\r\n\t\t\tbaseLayersPresent = baseLayersPresent && baseLayersCount > 1;\r\n\t\t\tthis._baseLayersList.style.display = baseLayersPresent ? '' : 'none';\r\n\t\t}\r\n\r\n\t\tthis._separator.style.display = overlaysPresent && baseLayersPresent ? '' : 'none';\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_onLayerChange: function (e) {\r\n\t\tif (!this._handlingClick) {\r\n\t\t\tthis._update();\r\n\t\t}\r\n\r\n\t\tvar obj = this._getLayer(stamp(e.target));\r\n\r\n\t\t// @namespace Map\r\n\t\t// @section Layer events\r\n\t\t// @event baselayerchange: LayersControlEvent\r\n\t\t// Fired when the base layer is changed through the [layers control](#control-layers).\r\n\t\t// @event overlayadd: LayersControlEvent\r\n\t\t// Fired when an overlay is selected through the [layers control](#control-layers).\r\n\t\t// @event overlayremove: LayersControlEvent\r\n\t\t// Fired when an overlay is deselected through the [layers control](#control-layers).\r\n\t\t// @namespace Control.Layers\r\n\t\tvar type = obj.overlay ?\r\n\t\t\t(e.type === 'add' ? 'overlayadd' : 'overlayremove') :\r\n\t\t\t(e.type === 'add' ? 'baselayerchange' : null);\r\n\r\n\t\tif (type) {\r\n\t\t\tthis._map.fire(type, obj);\r\n\t\t}\r\n\t},\r\n\r\n\t// IE7 bugs out if you create a radio dynamically, so you have to do it this hacky way (see https://stackoverflow.com/a/119079)\r\n\t_createRadioElement: function (name, checked) {\r\n\r\n\t\tvar radioHtml = '<input type=\"radio\" class=\"leaflet-control-layers-selector\" name=\"' +\r\n\t\t\t\tname + '\"' + (checked ? ' checked=\"checked\"' : '') + '/>';\r\n\r\n\t\tvar radioFragment = document.createElement('div');\r\n\t\tradioFragment.innerHTML = radioHtml;\r\n\r\n\t\treturn radioFragment.firstChild;\r\n\t},\r\n\r\n\t_addItem: function (obj) {\r\n\t\tvar label = document.createElement('label'),\r\n\t\t checked = this._map.hasLayer(obj.layer),\r\n\t\t input;\r\n\r\n\t\tif (obj.overlay) {\r\n\t\t\tinput = document.createElement('input');\r\n\t\t\tinput.type = 'checkbox';\r\n\t\t\tinput.className = 'leaflet-control-layers-selector';\r\n\t\t\tinput.defaultChecked = checked;\r\n\t\t} else {\r\n\t\t\tinput = this._createRadioElement('leaflet-base-layers_' + stamp(this), checked);\r\n\t\t}\r\n\r\n\t\tthis._layerControlInputs.push(input);\r\n\t\tinput.layerId = stamp(obj.layer);\r\n\r\n\t\ton(input, 'click', this._onInputClick, this);\r\n\r\n\t\tvar name = document.createElement('span');\r\n\t\tname.innerHTML = ' ' + obj.name;\r\n\r\n\t\t// Helps from preventing layer control flicker when checkboxes are disabled\r\n\t\t// https://github.com/Leaflet/Leaflet/issues/2771\r\n\t\tvar holder = document.createElement('span');\r\n\r\n\t\tlabel.appendChild(holder);\r\n\t\tholder.appendChild(input);\r\n\t\tholder.appendChild(name);\r\n\r\n\t\tvar container = obj.overlay ? this._overlaysList : this._baseLayersList;\r\n\t\tcontainer.appendChild(label);\r\n\r\n\t\tthis._checkDisabledLayers();\r\n\t\treturn label;\r\n\t},\r\n\r\n\t_onInputClick: function () {\r\n\t\tvar inputs = this._layerControlInputs,\r\n\t\t input, layer;\r\n\t\tvar addedLayers = [],\r\n\t\t removedLayers = [];\r\n\r\n\t\tthis._handlingClick = true;\r\n\r\n\t\tfor (var i = inputs.length - 1; i >= 0; i--) {\r\n\t\t\tinput = inputs[i];\r\n\t\t\tlayer = this._getLayer(input.layerId).layer;\r\n\r\n\t\t\tif (input.checked) {\r\n\t\t\t\taddedLayers.push(layer);\r\n\t\t\t} else if (!input.checked) {\r\n\t\t\t\tremovedLayers.push(layer);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Bugfix issue 2318: Should remove all old layers before readding new ones\r\n\t\tfor (i = 0; i < removedLayers.length; i++) {\r\n\t\t\tif (this._map.hasLayer(removedLayers[i])) {\r\n\t\t\t\tthis._map.removeLayer(removedLayers[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (i = 0; i < addedLayers.length; i++) {\r\n\t\t\tif (!this._map.hasLayer(addedLayers[i])) {\r\n\t\t\t\tthis._map.addLayer(addedLayers[i]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._handlingClick = false;\r\n\r\n\t\tthis._refocusOnMap();\r\n\t},\r\n\r\n\t_checkDisabledLayers: function () {\r\n\t\tvar inputs = this._layerControlInputs,\r\n\t\t input,\r\n\t\t layer,\r\n\t\t zoom = this._map.getZoom();\r\n\r\n\t\tfor (var i = inputs.length - 1; i >= 0; i--) {\r\n\t\t\tinput = inputs[i];\r\n\t\t\tlayer = this._getLayer(input.layerId).layer;\r\n\t\t\tinput.disabled = (layer.options.minZoom !== undefined && zoom < layer.options.minZoom) ||\r\n\t\t\t (layer.options.maxZoom !== undefined && zoom > layer.options.maxZoom);\r\n\r\n\t\t}\r\n\t},\r\n\r\n\t_expandIfNotCollapsed: function () {\r\n\t\tif (this._map && !this.options.collapsed) {\r\n\t\t\tthis.expand();\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n\r\n});\r\n\r\n\r\n// @factory L.control.layers(baselayers?: Object, overlays?: Object, options?: Control.Layers options)\r\n// Creates a layers control with the given layers. Base layers will be switched with radio buttons, while overlays will be switched with checkboxes. Note that all base layers should be passed in the base layers object, but only one should be added to the map during map instantiation.\r\nvar layers = function (baseLayers, overlays, options) {\r\n\treturn new Layers(baseLayers, overlays, options);\r\n};\n\n/*\r\n * @class Control.Zoom\r\n * @aka L.Control.Zoom\r\n * @inherits Control\r\n *\r\n * A basic zoom control with two buttons (zoom in and zoom out). It is put on the map by default unless you set its [`zoomControl` option](#map-zoomcontrol) to `false`. Extends `Control`.\r\n */\r\n\r\nvar Zoom = Control.extend({\r\n\t// @section\r\n\t// @aka Control.Zoom options\r\n\toptions: {\r\n\t\tposition: 'topleft',\r\n\r\n\t\t// @option zoomInText: String = '<span aria-hidden=\"true\">+</span>'\r\n\t\t// The text set on the 'zoom in' button.\r\n\t\tzoomInText: '<span aria-hidden=\"true\">+</span>',\r\n\r\n\t\t// @option zoomInTitle: String = 'Zoom in'\r\n\t\t// The title set on the 'zoom in' button.\r\n\t\tzoomInTitle: 'Zoom in',\r\n\r\n\t\t// @option zoomOutText: String = '<span aria-hidden=\"true\">−</span>'\r\n\t\t// The text set on the 'zoom out' button.\r\n\t\tzoomOutText: '<span aria-hidden=\"true\">−</span>',\r\n\r\n\t\t// @option zoomOutTitle: String = 'Zoom out'\r\n\t\t// The title set on the 'zoom out' button.\r\n\t\tzoomOutTitle: 'Zoom out'\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\t\tvar zoomName = 'leaflet-control-zoom',\r\n\t\t container = create$1('div', zoomName + ' leaflet-bar'),\r\n\t\t options = this.options;\r\n\r\n\t\tthis._zoomInButton = this._createButton(options.zoomInText, options.zoomInTitle,\r\n\t\t zoomName + '-in', container, this._zoomIn);\r\n\t\tthis._zoomOutButton = this._createButton(options.zoomOutText, options.zoomOutTitle,\r\n\t\t zoomName + '-out', container, this._zoomOut);\r\n\r\n\t\tthis._updateDisabled();\r\n\t\tmap.on('zoomend zoomlevelschange', this._updateDisabled, this);\r\n\r\n\t\treturn container;\r\n\t},\r\n\r\n\tonRemove: function (map) {\r\n\t\tmap.off('zoomend zoomlevelschange', this._updateDisabled, this);\r\n\t},\r\n\r\n\tdisable: function () {\r\n\t\tthis._disabled = true;\r\n\t\tthis._updateDisabled();\r\n\t\treturn this;\r\n\t},\r\n\r\n\tenable: function () {\r\n\t\tthis._disabled = false;\r\n\t\tthis._updateDisabled();\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_zoomIn: function (e) {\r\n\t\tif (!this._disabled && this._map._zoom < this._map.getMaxZoom()) {\r\n\t\t\tthis._map.zoomIn(this._map.options.zoomDelta * (e.shiftKey ? 3 : 1));\r\n\t\t}\r\n\t},\r\n\r\n\t_zoomOut: function (e) {\r\n\t\tif (!this._disabled && this._map._zoom > this._map.getMinZoom()) {\r\n\t\t\tthis._map.zoomOut(this._map.options.zoomDelta * (e.shiftKey ? 3 : 1));\r\n\t\t}\r\n\t},\r\n\r\n\t_createButton: function (html, title, className, container, fn) {\r\n\t\tvar link = create$1('a', className, container);\r\n\t\tlink.innerHTML = html;\r\n\t\tlink.href = '#';\r\n\t\tlink.title = title;\r\n\r\n\t\t/*\r\n\t\t * Will force screen readers like VoiceOver to read this as \"Zoom in - button\"\r\n\t\t */\r\n\t\tlink.setAttribute('role', 'button');\r\n\t\tlink.setAttribute('aria-label', title);\r\n\r\n\t\tdisableClickPropagation(link);\r\n\t\ton(link, 'click', stop);\r\n\t\ton(link, 'click', fn, this);\r\n\t\ton(link, 'click', this._refocusOnMap, this);\r\n\r\n\t\treturn link;\r\n\t},\r\n\r\n\t_updateDisabled: function () {\r\n\t\tvar map = this._map,\r\n\t\t className = 'leaflet-disabled';\r\n\r\n\t\tremoveClass(this._zoomInButton, className);\r\n\t\tremoveClass(this._zoomOutButton, className);\r\n\t\tthis._zoomInButton.setAttribute('aria-disabled', 'false');\r\n\t\tthis._zoomOutButton.setAttribute('aria-disabled', 'false');\r\n\r\n\t\tif (this._disabled || map._zoom === map.getMinZoom()) {\r\n\t\t\taddClass(this._zoomOutButton, className);\r\n\t\t\tthis._zoomOutButton.setAttribute('aria-disabled', 'true');\r\n\t\t}\r\n\t\tif (this._disabled || map._zoom === map.getMaxZoom()) {\r\n\t\t\taddClass(this._zoomInButton, className);\r\n\t\t\tthis._zoomInButton.setAttribute('aria-disabled', 'true');\r\n\t\t}\r\n\t}\r\n});\r\n\r\n// @namespace Map\r\n// @section Control options\r\n// @option zoomControl: Boolean = true\r\n// Whether a [zoom control](#control-zoom) is added to the map by default.\r\nMap.mergeOptions({\r\n\tzoomControl: true\r\n});\r\n\r\nMap.addInitHook(function () {\r\n\tif (this.options.zoomControl) {\r\n\t\t// @section Controls\r\n\t\t// @property zoomControl: Control.Zoom\r\n\t\t// The default zoom control (only available if the\r\n\t\t// [`zoomControl` option](#map-zoomcontrol) was `true` when creating the map).\r\n\t\tthis.zoomControl = new Zoom();\r\n\t\tthis.addControl(this.zoomControl);\r\n\t}\r\n});\r\n\r\n// @namespace Control.Zoom\r\n// @factory L.control.zoom(options: Control.Zoom options)\r\n// Creates a zoom control\r\nvar zoom = function (options) {\r\n\treturn new Zoom(options);\r\n};\n\n/*\n * @class Control.Scale\n * @aka L.Control.Scale\n * @inherits Control\n *\n * A simple scale control that shows the scale of the current center of screen in metric (m/km) and imperial (mi/ft) systems. Extends `Control`.\n *\n * @example\n *\n * ```js\n * L.control.scale().addTo(map);\n * ```\n */\n\nvar Scale = Control.extend({\n\t// @section\n\t// @aka Control.Scale options\n\toptions: {\n\t\tposition: 'bottomleft',\n\n\t\t// @option maxWidth: Number = 100\n\t\t// Maximum width of the control in pixels. The width is set dynamically to show round values (e.g. 100, 200, 500).\n\t\tmaxWidth: 100,\n\n\t\t// @option metric: Boolean = True\n\t\t// Whether to show the metric scale line (m/km).\n\t\tmetric: true,\n\n\t\t// @option imperial: Boolean = True\n\t\t// Whether to show the imperial scale line (mi/ft).\n\t\timperial: true\n\n\t\t// @option updateWhenIdle: Boolean = false\n\t\t// If `true`, the control is updated on [`moveend`](#map-moveend), otherwise it's always up-to-date (updated on [`move`](#map-move)).\n\t},\n\n\tonAdd: function (map) {\n\t\tvar className = 'leaflet-control-scale',\n\t\t container = create$1('div', className),\n\t\t options = this.options;\n\n\t\tthis._addScales(options, className + '-line', container);\n\n\t\tmap.on(options.updateWhenIdle ? 'moveend' : 'move', this._update, this);\n\t\tmap.whenReady(this._update, this);\n\n\t\treturn container;\n\t},\n\n\tonRemove: function (map) {\n\t\tmap.off(this.options.updateWhenIdle ? 'moveend' : 'move', this._update, this);\n\t},\n\n\t_addScales: function (options, className, container) {\n\t\tif (options.metric) {\n\t\t\tthis._mScale = create$1('div', className, container);\n\t\t}\n\t\tif (options.imperial) {\n\t\t\tthis._iScale = create$1('div', className, container);\n\t\t}\n\t},\n\n\t_update: function () {\n\t\tvar map = this._map,\n\t\t y = map.getSize().y / 2;\n\n\t\tvar maxMeters = map.distance(\n\t\t\tmap.containerPointToLatLng([0, y]),\n\t\t\tmap.containerPointToLatLng([this.options.maxWidth, y]));\n\n\t\tthis._updateScales(maxMeters);\n\t},\n\n\t_updateScales: function (maxMeters) {\n\t\tif (this.options.metric && maxMeters) {\n\t\t\tthis._updateMetric(maxMeters);\n\t\t}\n\t\tif (this.options.imperial && maxMeters) {\n\t\t\tthis._updateImperial(maxMeters);\n\t\t}\n\t},\n\n\t_updateMetric: function (maxMeters) {\n\t\tvar meters = this._getRoundNum(maxMeters),\n\t\t label = meters < 1000 ? meters + ' m' : (meters / 1000) + ' km';\n\n\t\tthis._updateScale(this._mScale, label, meters / maxMeters);\n\t},\n\n\t_updateImperial: function (maxMeters) {\n\t\tvar maxFeet = maxMeters * 3.2808399,\n\t\t maxMiles, miles, feet;\n\n\t\tif (maxFeet > 5280) {\n\t\t\tmaxMiles = maxFeet / 5280;\n\t\t\tmiles = this._getRoundNum(maxMiles);\n\t\t\tthis._updateScale(this._iScale, miles + ' mi', miles / maxMiles);\n\n\t\t} else {\n\t\t\tfeet = this._getRoundNum(maxFeet);\n\t\t\tthis._updateScale(this._iScale, feet + ' ft', feet / maxFeet);\n\t\t}\n\t},\n\n\t_updateScale: function (scale, text, ratio) {\n\t\tscale.style.width = Math.round(this.options.maxWidth * ratio) + 'px';\n\t\tscale.innerHTML = text;\n\t},\n\n\t_getRoundNum: function (num) {\n\t\tvar pow10 = Math.pow(10, (Math.floor(num) + '').length - 1),\n\t\t d = num / pow10;\n\n\t\td = d >= 10 ? 10 :\n\t\t d >= 5 ? 5 :\n\t\t d >= 3 ? 3 :\n\t\t d >= 2 ? 2 : 1;\n\n\t\treturn pow10 * d;\n\t}\n});\n\n\n// @factory L.control.scale(options?: Control.Scale options)\n// Creates an scale control with the given options.\nvar scale = function (options) {\n\treturn new Scale(options);\n};\n\nvar ukrainianFlag = '<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>';\r\n\r\n\r\n/*\r\n * @class Control.Attribution\r\n * @aka L.Control.Attribution\r\n * @inherits Control\r\n *\r\n * The attribution control allows you to display attribution data in a small text box on a map. It is put on the map by default unless you set its [`attributionControl` option](#map-attributioncontrol) to `false`, and it fetches attribution texts from layers with the [`getAttribution` method](#layer-getattribution) automatically. Extends Control.\r\n */\r\n\r\nvar Attribution = Control.extend({\r\n\t// @section\r\n\t// @aka Control.Attribution options\r\n\toptions: {\r\n\t\tposition: 'bottomright',\r\n\r\n\t\t// @option prefix: String|false = 'Leaflet'\r\n\t\t// The HTML text shown before the attributions. Pass `false` to disable.\r\n\t\tprefix: '<a href=\"https://leafletjs.com\" title=\"A JavaScript library for interactive maps\">' + (Browser.inlineSvg ? ukrainianFlag + ' ' : '') + 'Leaflet</a>'\r\n\t},\r\n\r\n\tinitialize: function (options) {\r\n\t\tsetOptions(this, options);\r\n\r\n\t\tthis._attributions = {};\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\t\tmap.attributionControl = this;\r\n\t\tthis._container = create$1('div', 'leaflet-control-attribution');\r\n\t\tdisableClickPropagation(this._container);\r\n\r\n\t\t// TODO ugly, refactor\r\n\t\tfor (var i in map._layers) {\r\n\t\t\tif (map._layers[i].getAttribution) {\r\n\t\t\t\tthis.addAttribution(map._layers[i].getAttribution());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._update();\r\n\r\n\t\tmap.on('layeradd', this._addAttribution, this);\r\n\r\n\t\treturn this._container;\r\n\t},\r\n\r\n\tonRemove: function (map) {\r\n\t\tmap.off('layeradd', this._addAttribution, this);\r\n\t},\r\n\r\n\t_addAttribution: function (ev) {\r\n\t\tif (ev.layer.getAttribution) {\r\n\t\t\tthis.addAttribution(ev.layer.getAttribution());\r\n\t\t\tev.layer.once('remove', function () {\r\n\t\t\t\tthis.removeAttribution(ev.layer.getAttribution());\r\n\t\t\t}, this);\r\n\t\t}\r\n\t},\r\n\r\n\t// @method setPrefix(prefix: String|false): this\r\n\t// The HTML text shown before the attributions. Pass `false` to disable.\r\n\tsetPrefix: function (prefix) {\r\n\t\tthis.options.prefix = prefix;\r\n\t\tthis._update();\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method addAttribution(text: String): this\r\n\t// Adds an attribution text (e.g. `'© OpenStreetMap contributors'`).\r\n\taddAttribution: function (text) {\r\n\t\tif (!text) { return this; }\r\n\r\n\t\tif (!this._attributions[text]) {\r\n\t\t\tthis._attributions[text] = 0;\r\n\t\t}\r\n\t\tthis._attributions[text]++;\r\n\r\n\t\tthis._update();\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method removeAttribution(text: String): this\r\n\t// Removes an attribution text.\r\n\tremoveAttribution: function (text) {\r\n\t\tif (!text) { return this; }\r\n\r\n\t\tif (this._attributions[text]) {\r\n\t\t\tthis._attributions[text]--;\r\n\t\t\tthis._update();\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_update: function () {\r\n\t\tif (!this._map) { return; }\r\n\r\n\t\tvar attribs = [];\r\n\r\n\t\tfor (var i in this._attributions) {\r\n\t\t\tif (this._attributions[i]) {\r\n\t\t\t\tattribs.push(i);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar prefixAndAttribs = [];\r\n\r\n\t\tif (this.options.prefix) {\r\n\t\t\tprefixAndAttribs.push(this.options.prefix);\r\n\t\t}\r\n\t\tif (attribs.length) {\r\n\t\t\tprefixAndAttribs.push(attribs.join(', '));\r\n\t\t}\r\n\r\n\t\tthis._container.innerHTML = prefixAndAttribs.join(' <span aria-hidden=\"true\">|</span> ');\r\n\t}\r\n});\r\n\r\n// @namespace Map\r\n// @section Control options\r\n// @option attributionControl: Boolean = true\r\n// Whether a [attribution control](#control-attribution) is added to the map by default.\r\nMap.mergeOptions({\r\n\tattributionControl: true\r\n});\r\n\r\nMap.addInitHook(function () {\r\n\tif (this.options.attributionControl) {\r\n\t\tnew Attribution().addTo(this);\r\n\t}\r\n});\r\n\r\n// @namespace Control.Attribution\r\n// @factory L.control.attribution(options: Control.Attribution options)\r\n// Creates an attribution control.\r\nvar attribution = function (options) {\r\n\treturn new Attribution(options);\r\n};\n\nControl.Layers = Layers;\nControl.Zoom = Zoom;\nControl.Scale = Scale;\nControl.Attribution = Attribution;\n\ncontrol.layers = layers;\ncontrol.zoom = zoom;\ncontrol.scale = scale;\ncontrol.attribution = attribution;\n\n/*\n\tL.Handler is a base class for handler classes that are used internally to inject\n\tinteraction features like dragging to classes like Map and Marker.\n*/\n\n// @class Handler\n// @aka L.Handler\n// Abstract class for map interaction handlers\n\nvar Handler = Class.extend({\n\tinitialize: function (map) {\n\t\tthis._map = map;\n\t},\n\n\t// @method enable(): this\n\t// Enables the handler\n\tenable: function () {\n\t\tif (this._enabled) { return this; }\n\n\t\tthis._enabled = true;\n\t\tthis.addHooks();\n\t\treturn this;\n\t},\n\n\t// @method disable(): this\n\t// Disables the handler\n\tdisable: function () {\n\t\tif (!this._enabled) { return this; }\n\n\t\tthis._enabled = false;\n\t\tthis.removeHooks();\n\t\treturn this;\n\t},\n\n\t// @method enabled(): Boolean\n\t// Returns `true` if the handler is enabled\n\tenabled: function () {\n\t\treturn !!this._enabled;\n\t}\n\n\t// @section Extension methods\n\t// Classes inheriting from `Handler` must implement the two following methods:\n\t// @method addHooks()\n\t// Called when the handler is enabled, should add event hooks.\n\t// @method removeHooks()\n\t// Called when the handler is disabled, should remove the event hooks added previously.\n});\n\n// @section There is static function which can be called without instantiating L.Handler:\n// @function addTo(map: Map, name: String): this\n// Adds a new Handler to the given map with the given name.\nHandler.addTo = function (map, name) {\n\tmap.addHandler(name, this);\n\treturn this;\n};\n\nvar Mixin = {Events: Events};\n\n/*\r\n * @class Draggable\r\n * @aka L.Draggable\r\n * @inherits Evented\r\n *\r\n * A class for making DOM elements draggable (including touch support).\r\n * Used internally for map and marker dragging. Only works for elements\r\n * that were positioned with [`L.DomUtil.setPosition`](#domutil-setposition).\r\n *\r\n * @example\r\n * ```js\r\n * var draggable = new L.Draggable(elementToDrag);\r\n * draggable.enable();\r\n * ```\r\n */\r\n\r\nvar START = Browser.touch ? 'touchstart mousedown' : 'mousedown';\r\n\r\nvar Draggable = Evented.extend({\r\n\r\n\toptions: {\r\n\t\t// @section\r\n\t\t// @aka Draggable options\r\n\t\t// @option clickTolerance: Number = 3\r\n\t\t// The max number of pixels a user can shift the mouse pointer during a click\r\n\t\t// for it to be considered a valid click (as opposed to a mouse drag).\r\n\t\tclickTolerance: 3\r\n\t},\r\n\r\n\t// @constructor L.Draggable(el: HTMLElement, dragHandle?: HTMLElement, preventOutline?: Boolean, options?: Draggable options)\r\n\t// Creates a `Draggable` object for moving `el` when you start dragging the `dragHandle` element (equals `el` itself by default).\r\n\tinitialize: function (element, dragStartTarget, preventOutline, options) {\r\n\t\tsetOptions(this, options);\r\n\r\n\t\tthis._element = element;\r\n\t\tthis._dragStartTarget = dragStartTarget || element;\r\n\t\tthis._preventOutline = preventOutline;\r\n\t},\r\n\r\n\t// @method enable()\r\n\t// Enables the dragging ability\r\n\tenable: function () {\r\n\t\tif (this._enabled) { return; }\r\n\r\n\t\ton(this._dragStartTarget, START, this._onDown, this);\r\n\r\n\t\tthis._enabled = true;\r\n\t},\r\n\r\n\t// @method disable()\r\n\t// Disables the dragging ability\r\n\tdisable: function () {\r\n\t\tif (!this._enabled) { return; }\r\n\r\n\t\t// If we're currently dragging this draggable,\r\n\t\t// disabling it counts as first ending the drag.\r\n\t\tif (Draggable._dragging === this) {\r\n\t\t\tthis.finishDrag(true);\r\n\t\t}\r\n\r\n\t\toff(this._dragStartTarget, START, this._onDown, this);\r\n\r\n\t\tthis._enabled = false;\r\n\t\tthis._moved = false;\r\n\t},\r\n\r\n\t_onDown: function (e) {\r\n\t\t// Ignore the event if disabled; this happens in IE11\r\n\t\t// under some circumstances, see #3666.\r\n\t\tif (!this._enabled) { return; }\r\n\r\n\t\tthis._moved = false;\r\n\r\n\t\tif (hasClass(this._element, 'leaflet-zoom-anim')) { return; }\r\n\r\n\t\tif (e.touches && e.touches.length !== 1) {\r\n\t\t\t// Finish dragging to avoid conflict with touchZoom\r\n\t\t\tif (Draggable._dragging === this) {\r\n\t\t\t\tthis.finishDrag();\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (Draggable._dragging || e.shiftKey || ((e.which !== 1) && (e.button !== 1) && !e.touches)) { return; }\r\n\t\tDraggable._dragging = this; // Prevent dragging multiple objects at once.\r\n\r\n\t\tif (this._preventOutline) {\r\n\t\t\tpreventOutline(this._element);\r\n\t\t}\r\n\r\n\t\tdisableImageDrag();\r\n\t\tdisableTextSelection();\r\n\r\n\t\tif (this._moving) { return; }\r\n\r\n\t\t// @event down: Event\r\n\t\t// Fired when a drag is about to start.\r\n\t\tthis.fire('down');\r\n\r\n\t\tvar first = e.touches ? e.touches[0] : e,\r\n\t\t sizedParent = getSizedParentNode(this._element);\r\n\r\n\t\tthis._startPoint = new Point(first.clientX, first.clientY);\r\n\t\tthis._startPos = getPosition(this._element);\r\n\r\n\t\t// Cache the scale, so that we can continuously compensate for it during drag (_onMove).\r\n\t\tthis._parentScale = getScale(sizedParent);\r\n\r\n\t\tvar mouseevent = e.type === 'mousedown';\r\n\t\ton(document, mouseevent ? 'mousemove' : 'touchmove', this._onMove, this);\r\n\t\ton(document, mouseevent ? 'mouseup' : 'touchend touchcancel', this._onUp, this);\r\n\t},\r\n\r\n\t_onMove: function (e) {\r\n\t\t// Ignore the event if disabled; this happens in IE11\r\n\t\t// under some circumstances, see #3666.\r\n\t\tif (!this._enabled) { return; }\r\n\r\n\t\tif (e.touches && e.touches.length > 1) {\r\n\t\t\tthis._moved = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar first = (e.touches && e.touches.length === 1 ? e.touches[0] : e),\r\n\t\t offset = new Point(first.clientX, first.clientY)._subtract(this._startPoint);\r\n\r\n\t\tif (!offset.x && !offset.y) { return; }\r\n\t\tif (Math.abs(offset.x) + Math.abs(offset.y) < this.options.clickTolerance) { return; }\r\n\r\n\t\t// We assume that the parent container's position, border and scale do not change for the duration of the drag.\r\n\t\t// Therefore there is no need to account for the position and border (they are eliminated by the subtraction)\r\n\t\t// and we can use the cached value for the scale.\r\n\t\toffset.x /= this._parentScale.x;\r\n\t\toffset.y /= this._parentScale.y;\r\n\r\n\t\tpreventDefault(e);\r\n\r\n\t\tif (!this._moved) {\r\n\t\t\t// @event dragstart: Event\r\n\t\t\t// Fired when a drag starts\r\n\t\t\tthis.fire('dragstart');\r\n\r\n\t\t\tthis._moved = true;\r\n\r\n\t\t\taddClass(document.body, 'leaflet-dragging');\r\n\r\n\t\t\tthis._lastTarget = e.target || e.srcElement;\r\n\t\t\t// IE and Edge do not give the <use> element, so fetch it\r\n\t\t\t// if necessary\r\n\t\t\tif (window.SVGElementInstance && this._lastTarget instanceof window.SVGElementInstance) {\r\n\t\t\t\tthis._lastTarget = this._lastTarget.correspondingUseElement;\r\n\t\t\t}\r\n\t\t\taddClass(this._lastTarget, 'leaflet-drag-target');\r\n\t\t}\r\n\r\n\t\tthis._newPos = this._startPos.add(offset);\r\n\t\tthis._moving = true;\r\n\r\n\t\tthis._lastEvent = e;\r\n\t\tthis._updatePosition();\r\n\t},\r\n\r\n\t_updatePosition: function () {\r\n\t\tvar e = {originalEvent: this._lastEvent};\r\n\r\n\t\t// @event predrag: Event\r\n\t\t// Fired continuously during dragging *before* each corresponding\r\n\t\t// update of the element's position.\r\n\t\tthis.fire('predrag', e);\r\n\t\tsetPosition(this._element, this._newPos);\r\n\r\n\t\t// @event drag: Event\r\n\t\t// Fired continuously during dragging.\r\n\t\tthis.fire('drag', e);\r\n\t},\r\n\r\n\t_onUp: function () {\r\n\t\t// Ignore the event if disabled; this happens in IE11\r\n\t\t// under some circumstances, see #3666.\r\n\t\tif (!this._enabled) { return; }\r\n\t\tthis.finishDrag();\r\n\t},\r\n\r\n\tfinishDrag: function (noInertia) {\r\n\t\tremoveClass(document.body, 'leaflet-dragging');\r\n\r\n\t\tif (this._lastTarget) {\r\n\t\t\tremoveClass(this._lastTarget, 'leaflet-drag-target');\r\n\t\t\tthis._lastTarget = null;\r\n\t\t}\r\n\r\n\t\toff(document, 'mousemove touchmove', this._onMove, this);\r\n\t\toff(document, 'mouseup touchend touchcancel', this._onUp, this);\r\n\r\n\t\tenableImageDrag();\r\n\t\tenableTextSelection();\r\n\r\n\t\tif (this._moved && this._moving) {\r\n\r\n\t\t\t// @event dragend: DragEndEvent\r\n\t\t\t// Fired when the drag ends.\r\n\t\t\tthis.fire('dragend', {\r\n\t\t\t\tnoInertia: noInertia,\r\n\t\t\t\tdistance: this._newPos.distanceTo(this._startPos)\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis._moving = false;\r\n\t\tDraggable._dragging = false;\r\n\t}\r\n\r\n});\n\n/*\r\n * @namespace LineUtil\r\n *\r\n * Various utility functions for polyline points processing, used by Leaflet internally to make polylines lightning-fast.\r\n */\r\n\r\n// Simplify polyline with vertex reduction and Douglas-Peucker simplification.\r\n// Improves rendering performance dramatically by lessening the number of points to draw.\r\n\r\n// @function simplify(points: Point[], tolerance: Number): Point[]\r\n// Dramatically reduces the number of points in a polyline while retaining\r\n// its shape and returns a new array of simplified points, using the\r\n// [Ramer-Douglas-Peucker algorithm](https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm).\r\n// Used for a huge performance boost when processing/displaying Leaflet polylines for\r\n// each zoom level and also reducing visual noise. tolerance affects the amount of\r\n// simplification (lesser value means higher quality but slower and with more points).\r\n// Also released as a separated micro-library [Simplify.js](https://mourner.github.io/simplify-js/).\r\nfunction simplify(points, tolerance) {\r\n\tif (!tolerance || !points.length) {\r\n\t\treturn points.slice();\r\n\t}\r\n\r\n\tvar sqTolerance = tolerance * tolerance;\r\n\r\n\t // stage 1: vertex reduction\r\n\t points = _reducePoints(points, sqTolerance);\r\n\r\n\t // stage 2: Douglas-Peucker simplification\r\n\t points = _simplifyDP(points, sqTolerance);\r\n\r\n\treturn points;\r\n}\r\n\r\n// @function pointToSegmentDistance(p: Point, p1: Point, p2: Point): Number\r\n// Returns the distance between point `p` and segment `p1` to `p2`.\r\nfunction pointToSegmentDistance(p, p1, p2) {\r\n\treturn Math.sqrt(_sqClosestPointOnSegment(p, p1, p2, true));\r\n}\r\n\r\n// @function closestPointOnSegment(p: Point, p1: Point, p2: Point): Number\r\n// Returns the closest point from a point `p` on a segment `p1` to `p2`.\r\nfunction closestPointOnSegment(p, p1, p2) {\r\n\treturn _sqClosestPointOnSegment(p, p1, p2);\r\n}\r\n\r\n// Ramer-Douglas-Peucker simplification, see https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm\r\nfunction _simplifyDP(points, sqTolerance) {\r\n\r\n\tvar len = points.length,\r\n\t ArrayConstructor = typeof Uint8Array !== undefined + '' ? Uint8Array : Array,\r\n\t markers = new ArrayConstructor(len);\r\n\r\n\t markers[0] = markers[len - 1] = 1;\r\n\r\n\t_simplifyDPStep(points, markers, sqTolerance, 0, len - 1);\r\n\r\n\tvar i,\r\n\t newPoints = [];\r\n\r\n\tfor (i = 0; i < len; i++) {\r\n\t\tif (markers[i]) {\r\n\t\t\tnewPoints.push(points[i]);\r\n\t\t}\r\n\t}\r\n\r\n\treturn newPoints;\r\n}\r\n\r\nfunction _simplifyDPStep(points, markers, sqTolerance, first, last) {\r\n\r\n\tvar maxSqDist = 0,\r\n\tindex, i, sqDist;\r\n\r\n\tfor (i = first + 1; i <= last - 1; i++) {\r\n\t\tsqDist = _sqClosestPointOnSegment(points[i], points[first], points[last], true);\r\n\r\n\t\tif (sqDist > maxSqDist) {\r\n\t\t\tindex = i;\r\n\t\t\tmaxSqDist = sqDist;\r\n\t\t}\r\n\t}\r\n\r\n\tif (maxSqDist > sqTolerance) {\r\n\t\tmarkers[index] = 1;\r\n\r\n\t\t_simplifyDPStep(points, markers, sqTolerance, first, index);\r\n\t\t_simplifyDPStep(points, markers, sqTolerance, index, last);\r\n\t}\r\n}\r\n\r\n// reduce points that are too close to each other to a single point\r\nfunction _reducePoints(points, sqTolerance) {\r\n\tvar reducedPoints = [points[0]];\r\n\r\n\tfor (var i = 1, prev = 0, len = points.length; i < len; i++) {\r\n\t\tif (_sqDist(points[i], points[prev]) > sqTolerance) {\r\n\t\t\treducedPoints.push(points[i]);\r\n\t\t\tprev = i;\r\n\t\t}\r\n\t}\r\n\tif (prev < len - 1) {\r\n\t\treducedPoints.push(points[len - 1]);\r\n\t}\r\n\treturn reducedPoints;\r\n}\r\n\r\nvar _lastCode;\r\n\r\n// @function clipSegment(a: Point, b: Point, bounds: Bounds, useLastCode?: Boolean, round?: Boolean): Point[]|Boolean\r\n// Clips the segment a to b by rectangular bounds with the\r\n// [Cohen-Sutherland algorithm](https://en.wikipedia.org/wiki/Cohen%E2%80%93Sutherland_algorithm)\r\n// (modifying the segment points directly!). Used by Leaflet to only show polyline\r\n// points that are on the screen or near, increasing performance.\r\nfunction clipSegment(a, b, bounds, useLastCode, round) {\r\n\tvar codeA = useLastCode ? _lastCode : _getBitCode(a, bounds),\r\n\t codeB = _getBitCode(b, bounds),\r\n\r\n\t codeOut, p, newCode;\r\n\r\n\t // save 2nd code to avoid calculating it on the next segment\r\n\t _lastCode = codeB;\r\n\r\n\twhile (true) {\r\n\t\t// if a,b is inside the clip window (trivial accept)\r\n\t\tif (!(codeA | codeB)) {\r\n\t\t\treturn [a, b];\r\n\t\t}\r\n\r\n\t\t// if a,b is outside the clip window (trivial reject)\r\n\t\tif (codeA & codeB) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// other cases\r\n\t\tcodeOut = codeA || codeB;\r\n\t\tp = _getEdgeIntersection(a, b, codeOut, bounds, round);\r\n\t\tnewCode = _getBitCode(p, bounds);\r\n\r\n\t\tif (codeOut === codeA) {\r\n\t\t\ta = p;\r\n\t\t\tcodeA = newCode;\r\n\t\t} else {\r\n\t\t\tb = p;\r\n\t\t\tcodeB = newCode;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction _getEdgeIntersection(a, b, code, bounds, round) {\r\n\tvar dx = b.x - a.x,\r\n\t dy = b.y - a.y,\r\n\t min = bounds.min,\r\n\t max = bounds.max,\r\n\t x, y;\r\n\r\n\tif (code & 8) { // top\r\n\t\tx = a.x + dx * (max.y - a.y) / dy;\r\n\t\ty = max.y;\r\n\r\n\t} else if (code & 4) { // bottom\r\n\t\tx = a.x + dx * (min.y - a.y) / dy;\r\n\t\ty = min.y;\r\n\r\n\t} else if (code & 2) { // right\r\n\t\tx = max.x;\r\n\t\ty = a.y + dy * (max.x - a.x) / dx;\r\n\r\n\t} else if (code & 1) { // left\r\n\t\tx = min.x;\r\n\t\ty = a.y + dy * (min.x - a.x) / dx;\r\n\t}\r\n\r\n\treturn new Point(x, y, round);\r\n}\r\n\r\nfunction _getBitCode(p, bounds) {\r\n\tvar code = 0;\r\n\r\n\tif (p.x < bounds.min.x) { // left\r\n\t\tcode |= 1;\r\n\t} else if (p.x > bounds.max.x) { // right\r\n\t\tcode |= 2;\r\n\t}\r\n\r\n\tif (p.y < bounds.min.y) { // bottom\r\n\t\tcode |= 4;\r\n\t} else if (p.y > bounds.max.y) { // top\r\n\t\tcode |= 8;\r\n\t}\r\n\r\n\treturn code;\r\n}\r\n\r\n// square distance (to avoid unnecessary Math.sqrt calls)\r\nfunction _sqDist(p1, p2) {\r\n\tvar dx = p2.x - p1.x,\r\n\t dy = p2.y - p1.y;\r\n\treturn dx * dx + dy * dy;\r\n}\r\n\r\n// return closest point on segment or distance to that point\r\nfunction _sqClosestPointOnSegment(p, p1, p2, sqDist) {\r\n\tvar x = p1.x,\r\n\t y = p1.y,\r\n\t dx = p2.x - x,\r\n\t dy = p2.y - y,\r\n\t dot = dx * dx + dy * dy,\r\n\t t;\r\n\r\n\tif (dot > 0) {\r\n\t\tt = ((p.x - x) * dx + (p.y - y) * dy) / dot;\r\n\r\n\t\tif (t > 1) {\r\n\t\t\tx = p2.x;\r\n\t\t\ty = p2.y;\r\n\t\t} else if (t > 0) {\r\n\t\t\tx += dx * t;\r\n\t\t\ty += dy * t;\r\n\t\t}\r\n\t}\r\n\r\n\tdx = p.x - x;\r\n\tdy = p.y - y;\r\n\r\n\treturn sqDist ? dx * dx + dy * dy : new Point(x, y);\r\n}\r\n\r\n\r\n// @function isFlat(latlngs: LatLng[]): Boolean\r\n// Returns true if `latlngs` is a flat array, false is nested.\r\nfunction isFlat(latlngs) {\r\n\treturn !isArray(latlngs[0]) || (typeof latlngs[0][0] !== 'object' && typeof latlngs[0][0] !== 'undefined');\r\n}\r\n\r\nfunction _flat(latlngs) {\r\n\tconsole.warn('Deprecated use of _flat, please use L.LineUtil.isFlat instead.');\r\n\treturn isFlat(latlngs);\r\n}\r\n\r\n/* @function polylineCenter(latlngs: LatLng[], crs: CRS): LatLng\r\n * Returns the center ([centroid](http://en.wikipedia.org/wiki/Centroid)) of the passed LatLngs (first ring) from a polyline.\r\n */\r\nfunction polylineCenter(latlngs, crs) {\r\n\tvar i, halfDist, segDist, dist, p1, p2, ratio, center;\r\n\r\n\tif (!latlngs || latlngs.length === 0) {\r\n\t\tthrow new Error('latlngs not passed');\r\n\t}\r\n\r\n\tif (!isFlat(latlngs)) {\r\n\t\tconsole.warn('latlngs are not flat! Only the first ring will be used');\r\n\t\tlatlngs = latlngs[0];\r\n\t}\r\n\r\n\tvar points = [];\r\n\tfor (var j in latlngs) {\r\n\t\tpoints.push(crs.project(toLatLng(latlngs[j])));\r\n\t}\r\n\r\n\tvar len = points.length;\r\n\r\n\tfor (i = 0, halfDist = 0; i < len - 1; i++) {\r\n\t\thalfDist += points[i].distanceTo(points[i + 1]) / 2;\r\n\t}\r\n\r\n\t// The line is so small in the current view that all points are on the same pixel.\r\n\tif (halfDist === 0) {\r\n\t\tcenter = points[0];\r\n\t} else {\r\n\t\tfor (i = 0, dist = 0; i < len - 1; i++) {\r\n\t\t\tp1 = points[i];\r\n\t\t\tp2 = points[i + 1];\r\n\t\t\tsegDist = p1.distanceTo(p2);\r\n\t\t\tdist += segDist;\r\n\r\n\t\t\tif (dist > halfDist) {\r\n\t\t\t\tratio = (dist - halfDist) / segDist;\r\n\t\t\t\tcenter = [\r\n\t\t\t\t\tp2.x - ratio * (p2.x - p1.x),\r\n\t\t\t\t\tp2.y - ratio * (p2.y - p1.y)\r\n\t\t\t\t];\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn crs.unproject(toPoint(center));\r\n}\n\nvar LineUtil = {\n __proto__: null,\n simplify: simplify,\n pointToSegmentDistance: pointToSegmentDistance,\n closestPointOnSegment: closestPointOnSegment,\n clipSegment: clipSegment,\n _getEdgeIntersection: _getEdgeIntersection,\n _getBitCode: _getBitCode,\n _sqClosestPointOnSegment: _sqClosestPointOnSegment,\n isFlat: isFlat,\n _flat: _flat,\n polylineCenter: polylineCenter\n};\n\n/*\r\n * @namespace PolyUtil\r\n * Various utility functions for polygon geometries.\r\n */\r\n\r\n/* @function clipPolygon(points: Point[], bounds: Bounds, round?: Boolean): Point[]\r\n * Clips the polygon geometry defined by the given `points` by the given bounds (using the [Sutherland-Hodgman algorithm](https://en.wikipedia.org/wiki/Sutherland%E2%80%93Hodgman_algorithm)).\r\n * Used by Leaflet to only show polygon points that are on the screen or near, increasing\r\n * performance. Note that polygon points needs different algorithm for clipping\r\n * than polyline, so there's a separate method for it.\r\n */\r\nfunction clipPolygon(points, bounds, round) {\r\n\tvar clippedPoints,\r\n\t edges = [1, 4, 2, 8],\r\n\t i, j, k,\r\n\t a, b,\r\n\t len, edge, p;\r\n\r\n\tfor (i = 0, len = points.length; i < len; i++) {\r\n\t\tpoints[i]._code = _getBitCode(points[i], bounds);\r\n\t}\r\n\r\n\t// for each edge (left, bottom, right, top)\r\n\tfor (k = 0; k < 4; k++) {\r\n\t\tedge = edges[k];\r\n\t\tclippedPoints = [];\r\n\r\n\t\tfor (i = 0, len = points.length, j = len - 1; i < len; j = i++) {\r\n\t\t\ta = points[i];\r\n\t\t\tb = points[j];\r\n\r\n\t\t\t// if a is inside the clip window\r\n\t\t\tif (!(a._code & edge)) {\r\n\t\t\t\t// if b is outside the clip window (a->b goes out of screen)\r\n\t\t\t\tif (b._code & edge) {\r\n\t\t\t\t\tp = _getEdgeIntersection(b, a, edge, bounds, round);\r\n\t\t\t\t\tp._code = _getBitCode(p, bounds);\r\n\t\t\t\t\tclippedPoints.push(p);\r\n\t\t\t\t}\r\n\t\t\t\tclippedPoints.push(a);\r\n\r\n\t\t\t// else if b is inside the clip window (a->b enters the screen)\r\n\t\t\t} else if (!(b._code & edge)) {\r\n\t\t\t\tp = _getEdgeIntersection(b, a, edge, bounds, round);\r\n\t\t\t\tp._code = _getBitCode(p, bounds);\r\n\t\t\t\tclippedPoints.push(p);\r\n\t\t\t}\r\n\t\t}\r\n\t\tpoints = clippedPoints;\r\n\t}\r\n\r\n\treturn points;\r\n}\r\n\r\n/* @function polygonCenter(latlngs: LatLng[] crs: CRS): LatLng\r\n * Returns the center ([centroid](http://en.wikipedia.org/wiki/Centroid)) of the passed LatLngs (first ring) from a polygon.\r\n */\r\nfunction polygonCenter(latlngs, crs) {\r\n\tvar i, j, p1, p2, f, area, x, y, center;\r\n\r\n\tif (!latlngs || latlngs.length === 0) {\r\n\t\tthrow new Error('latlngs not passed');\r\n\t}\r\n\r\n\tif (!isFlat(latlngs)) {\r\n\t\tconsole.warn('latlngs are not flat! Only the first ring will be used');\r\n\t\tlatlngs = latlngs[0];\r\n\t}\r\n\r\n\tvar points = [];\r\n\tfor (var k in latlngs) {\r\n\t\tpoints.push(crs.project(toLatLng(latlngs[k])));\r\n\t}\r\n\r\n\tvar len = points.length;\r\n\tarea = x = y = 0;\r\n\r\n\t// polygon centroid algorithm;\r\n\tfor (i = 0, j = len - 1; i < len; j = i++) {\r\n\t\tp1 = points[i];\r\n\t\tp2 = points[j];\r\n\r\n\t\tf = p1.y * p2.x - p2.y * p1.x;\r\n\t\tx += (p1.x + p2.x) * f;\r\n\t\ty += (p1.y + p2.y) * f;\r\n\t\tarea += f * 3;\r\n\t}\r\n\r\n\tif (area === 0) {\r\n\t\t// Polygon is so small that all points are on same pixel.\r\n\t\tcenter = points[0];\r\n\t} else {\r\n\t\tcenter = [x / area, y / area];\r\n\t}\r\n\treturn crs.unproject(toPoint(center));\r\n}\n\nvar PolyUtil = {\n __proto__: null,\n clipPolygon: clipPolygon,\n polygonCenter: polygonCenter\n};\n\n/*\r\n * @namespace Projection\r\n * @section\r\n * Leaflet comes with a set of already defined Projections out of the box:\r\n *\r\n * @projection L.Projection.LonLat\r\n *\r\n * Equirectangular, or Plate Carree projection — the most simple projection,\r\n * mostly used by GIS enthusiasts. Directly maps `x` as longitude, and `y` as\r\n * latitude. Also suitable for flat worlds, e.g. game maps. Used by the\r\n * `EPSG:4326` and `Simple` CRS.\r\n */\r\n\r\nvar LonLat = {\r\n\tproject: function (latlng) {\r\n\t\treturn new Point(latlng.lng, latlng.lat);\r\n\t},\r\n\r\n\tunproject: function (point) {\r\n\t\treturn new LatLng(point.y, point.x);\r\n\t},\r\n\r\n\tbounds: new Bounds([-180, -90], [180, 90])\r\n};\n\n/*\r\n * @namespace Projection\r\n * @projection L.Projection.Mercator\r\n *\r\n * Elliptical Mercator projection — more complex than Spherical Mercator. Assumes that Earth is an ellipsoid. Used by the EPSG:3395 CRS.\r\n */\r\n\r\nvar Mercator = {\r\n\tR: 6378137,\r\n\tR_MINOR: 6356752.314245179,\r\n\r\n\tbounds: new Bounds([-20037508.34279, -15496570.73972], [20037508.34279, 18764656.23138]),\r\n\r\n\tproject: function (latlng) {\r\n\t\tvar d = Math.PI / 180,\r\n\t\t r = this.R,\r\n\t\t y = latlng.lat * d,\r\n\t\t tmp = this.R_MINOR / r,\r\n\t\t e = Math.sqrt(1 - tmp * tmp),\r\n\t\t con = e * Math.sin(y);\r\n\r\n\t\tvar ts = Math.tan(Math.PI / 4 - y / 2) / Math.pow((1 - con) / (1 + con), e / 2);\r\n\t\ty = -r * Math.log(Math.max(ts, 1E-10));\r\n\r\n\t\treturn new Point(latlng.lng * d * r, y);\r\n\t},\r\n\r\n\tunproject: function (point) {\r\n\t\tvar d = 180 / Math.PI,\r\n\t\t r = this.R,\r\n\t\t tmp = this.R_MINOR / r,\r\n\t\t e = Math.sqrt(1 - tmp * tmp),\r\n\t\t ts = Math.exp(-point.y / r),\r\n\t\t phi = Math.PI / 2 - 2 * Math.atan(ts);\r\n\r\n\t\tfor (var i = 0, dphi = 0.1, con; i < 15 && Math.abs(dphi) > 1e-7; i++) {\r\n\t\t\tcon = e * Math.sin(phi);\r\n\t\t\tcon = Math.pow((1 - con) / (1 + con), e / 2);\r\n\t\t\tdphi = Math.PI / 2 - 2 * Math.atan(ts * con) - phi;\r\n\t\t\tphi += dphi;\r\n\t\t}\r\n\r\n\t\treturn new LatLng(phi * d, point.x * d / r);\r\n\t}\r\n};\n\n/*\n * @class Projection\n\n * An object with methods for projecting geographical coordinates of the world onto\n * a flat surface (and back). See [Map projection](https://en.wikipedia.org/wiki/Map_projection).\n\n * @property bounds: Bounds\n * The bounds (specified in CRS units) where the projection is valid\n\n * @method project(latlng: LatLng): Point\n * Projects geographical coordinates into a 2D point.\n * Only accepts actual `L.LatLng` instances, not arrays.\n\n * @method unproject(point: Point): LatLng\n * The inverse of `project`. Projects a 2D point into a geographical location.\n * Only accepts actual `L.Point` instances, not arrays.\n\n * Note that the projection instances do not inherit from Leaflet's `Class` object,\n * and can't be instantiated. Also, new classes can't inherit from them,\n * and methods can't be added to them with the `include` function.\n\n */\n\nvar index = {\n __proto__: null,\n LonLat: LonLat,\n Mercator: Mercator,\n SphericalMercator: SphericalMercator\n};\n\n/*\r\n * @namespace CRS\r\n * @crs L.CRS.EPSG3395\r\n *\r\n * Rarely used by some commercial tile providers. Uses Elliptical Mercator projection.\r\n */\r\nvar EPSG3395 = extend({}, Earth, {\r\n\tcode: 'EPSG:3395',\r\n\tprojection: Mercator,\r\n\r\n\ttransformation: (function () {\r\n\t\tvar scale = 0.5 / (Math.PI * Mercator.R);\r\n\t\treturn toTransformation(scale, 0.5, -scale, 0.5);\r\n\t}())\r\n});\n\n/*\r\n * @namespace CRS\r\n * @crs L.CRS.EPSG4326\r\n *\r\n * A common CRS among GIS enthusiasts. Uses simple Equirectangular projection.\r\n *\r\n * Leaflet 1.0.x complies with the [TMS coordinate scheme for EPSG:4326](https://wiki.osgeo.org/wiki/Tile_Map_Service_Specification#global-geodetic),\r\n * which is a breaking change from 0.7.x behaviour. If you are using a `TileLayer`\r\n * with this CRS, ensure that there are two 256x256 pixel tiles covering the\r\n * whole earth at zoom level zero, and that the tile coordinate origin is (-180,+90),\r\n * or (-180,-90) for `TileLayer`s with [the `tms` option](#tilelayer-tms) set.\r\n */\r\n\r\nvar EPSG4326 = extend({}, Earth, {\r\n\tcode: 'EPSG:4326',\r\n\tprojection: LonLat,\r\n\ttransformation: toTransformation(1 / 180, 1, -1 / 180, 0.5)\r\n});\n\n/*\n * @namespace CRS\n * @crs L.CRS.Simple\n *\n * A simple CRS that maps longitude and latitude into `x` and `y` directly.\n * May be used for maps of flat surfaces (e.g. game maps). Note that the `y`\n * axis should still be inverted (going from bottom to top). `distance()` returns\n * simple euclidean distance.\n */\n\nvar Simple = extend({}, CRS, {\n\tprojection: LonLat,\n\ttransformation: toTransformation(1, 0, -1, 0),\n\n\tscale: function (zoom) {\n\t\treturn Math.pow(2, zoom);\n\t},\n\n\tzoom: function (scale) {\n\t\treturn Math.log(scale) / Math.LN2;\n\t},\n\n\tdistance: function (latlng1, latlng2) {\n\t\tvar dx = latlng2.lng - latlng1.lng,\n\t\t dy = latlng2.lat - latlng1.lat;\n\n\t\treturn Math.sqrt(dx * dx + dy * dy);\n\t},\n\n\tinfinite: true\n});\n\nCRS.Earth = Earth;\nCRS.EPSG3395 = EPSG3395;\nCRS.EPSG3857 = EPSG3857;\nCRS.EPSG900913 = EPSG900913;\nCRS.EPSG4326 = EPSG4326;\nCRS.Simple = Simple;\n\n/*\n * @class Layer\n * @inherits Evented\n * @aka L.Layer\n * @aka ILayer\n *\n * A set of methods from the Layer base class that all Leaflet layers use.\n * Inherits all methods, options and events from `L.Evented`.\n *\n * @example\n *\n * ```js\n * var layer = L.marker(latlng).addTo(map);\n * layer.addTo(map);\n * layer.remove();\n * ```\n *\n * @event add: Event\n * Fired after the layer is added to a map\n *\n * @event remove: Event\n * Fired after the layer is removed from a map\n */\n\n\nvar Layer = Evented.extend({\n\n\t// Classes extending `L.Layer` will inherit the following options:\n\toptions: {\n\t\t// @option pane: String = 'overlayPane'\n\t\t// By default the layer will be added to the map's [overlay pane](#map-overlaypane). Overriding this option will cause the layer to be placed on another pane by default.\n\t\tpane: 'overlayPane',\n\n\t\t// @option attribution: String = null\n\t\t// String to be shown in the attribution control, e.g. \"© OpenStreetMap contributors\". It describes the layer data and is often a legal obligation towards copyright holders and tile providers.\n\t\tattribution: null,\n\n\t\tbubblingMouseEvents: true\n\t},\n\n\t/* @section\n\t * Classes extending `L.Layer` will inherit the following methods:\n\t *\n\t * @method addTo(map: Map|LayerGroup): this\n\t * Adds the layer to the given map or layer group.\n\t */\n\taddTo: function (map) {\n\t\tmap.addLayer(this);\n\t\treturn this;\n\t},\n\n\t// @method remove: this\n\t// Removes the layer from the map it is currently active on.\n\tremove: function () {\n\t\treturn this.removeFrom(this._map || this._mapToAdd);\n\t},\n\n\t// @method removeFrom(map: Map): this\n\t// Removes the layer from the given map\n\t//\n\t// @alternative\n\t// @method removeFrom(group: LayerGroup): this\n\t// Removes the layer from the given `LayerGroup`\n\tremoveFrom: function (obj) {\n\t\tif (obj) {\n\t\t\tobj.removeLayer(this);\n\t\t}\n\t\treturn this;\n\t},\n\n\t// @method getPane(name? : String): HTMLElement\n\t// Returns the `HTMLElement` representing the named pane on the map. If `name` is omitted, returns the pane for this layer.\n\tgetPane: function (name) {\n\t\treturn this._map.getPane(name ? (this.options[name] || name) : this.options.pane);\n\t},\n\n\taddInteractiveTarget: function (targetEl) {\n\t\tthis._map._targets[stamp(targetEl)] = this;\n\t\treturn this;\n\t},\n\n\tremoveInteractiveTarget: function (targetEl) {\n\t\tdelete this._map._targets[stamp(targetEl)];\n\t\treturn this;\n\t},\n\n\t// @method getAttribution: String\n\t// Used by the `attribution control`, returns the [attribution option](#gridlayer-attribution).\n\tgetAttribution: function () {\n\t\treturn this.options.attribution;\n\t},\n\n\t_layerAdd: function (e) {\n\t\tvar map = e.target;\n\n\t\t// check in case layer gets added and then removed before the map is ready\n\t\tif (!map.hasLayer(this)) { return; }\n\n\t\tthis._map = map;\n\t\tthis._zoomAnimated = map._zoomAnimated;\n\n\t\tif (this.getEvents) {\n\t\t\tvar events = this.getEvents();\n\t\t\tmap.on(events, this);\n\t\t\tthis.once('remove', function () {\n\t\t\t\tmap.off(events, this);\n\t\t\t}, this);\n\t\t}\n\n\t\tthis.onAdd(map);\n\n\t\tthis.fire('add');\n\t\tmap.fire('layeradd', {layer: this});\n\t}\n});\n\n/* @section Extension methods\n * @uninheritable\n *\n * Every layer should extend from `L.Layer` and (re-)implement the following methods.\n *\n * @method onAdd(map: Map): this\n * Should contain code that creates DOM elements for the layer, adds them to `map panes` where they should belong and puts listeners on relevant map events. Called on [`map.addLayer(layer)`](#map-addlayer).\n *\n * @method onRemove(map: Map): this\n * Should contain all clean up code that removes the layer's elements from the DOM and removes listeners previously added in [`onAdd`](#layer-onadd). Called on [`map.removeLayer(layer)`](#map-removelayer).\n *\n * @method getEvents(): Object\n * This optional method should return an object like `{ viewreset: this._reset }` for [`addEventListener`](#evented-addeventlistener). The event handlers in this object will be automatically added and removed from the map with your layer.\n *\n * @method getAttribution(): String\n * This optional method should return a string containing HTML to be shown on the `Attribution control` whenever the layer is visible.\n *\n * @method beforeAdd(map: Map): this\n * Optional method. Called on [`map.addLayer(layer)`](#map-addlayer), before the layer is added to the map, before events are initialized, without waiting until the map is in a usable state. Use for early initialization only.\n */\n\n\n/* @namespace Map\n * @section Layer events\n *\n * @event layeradd: LayerEvent\n * Fired when a new layer is added to the map.\n *\n * @event layerremove: LayerEvent\n * Fired when some layer is removed from the map\n *\n * @section Methods for Layers and Controls\n */\nMap.include({\n\t// @method addLayer(layer: Layer): this\n\t// Adds the given layer to the map\n\taddLayer: function (layer) {\n\t\tif (!layer._layerAdd) {\n\t\t\tthrow new Error('The provided object is not a Layer.');\n\t\t}\n\n\t\tvar id = stamp(layer);\n\t\tif (this._layers[id]) { return this; }\n\t\tthis._layers[id] = layer;\n\n\t\tlayer._mapToAdd = this;\n\n\t\tif (layer.beforeAdd) {\n\t\t\tlayer.beforeAdd(this);\n\t\t}\n\n\t\tthis.whenReady(layer._layerAdd, layer);\n\n\t\treturn this;\n\t},\n\n\t// @method removeLayer(layer: Layer): this\n\t// Removes the given layer from the map.\n\tremoveLayer: function (layer) {\n\t\tvar id = stamp(layer);\n\n\t\tif (!this._layers[id]) { return this; }\n\n\t\tif (this._loaded) {\n\t\t\tlayer.onRemove(this);\n\t\t}\n\n\t\tdelete this._layers[id];\n\n\t\tif (this._loaded) {\n\t\t\tthis.fire('layerremove', {layer: layer});\n\t\t\tlayer.fire('remove');\n\t\t}\n\n\t\tlayer._map = layer._mapToAdd = null;\n\n\t\treturn this;\n\t},\n\n\t// @method hasLayer(layer: Layer): Boolean\n\t// Returns `true` if the given layer is currently added to the map\n\thasLayer: function (layer) {\n\t\treturn stamp(layer) in this._layers;\n\t},\n\n\t/* @method eachLayer(fn: Function, context?: Object): this\n\t * Iterates over the layers of the map, optionally specifying context of the iterator function.\n\t * ```\n\t * map.eachLayer(function(layer){\n\t * layer.bindPopup('Hello');\n\t * });\n\t * ```\n\t */\n\teachLayer: function (method, context) {\n\t\tfor (var i in this._layers) {\n\t\t\tmethod.call(context, this._layers[i]);\n\t\t}\n\t\treturn this;\n\t},\n\n\t_addLayers: function (layers) {\n\t\tlayers = layers ? (isArray(layers) ? layers : [layers]) : [];\n\n\t\tfor (var i = 0, len = layers.length; i < len; i++) {\n\t\t\tthis.addLayer(layers[i]);\n\t\t}\n\t},\n\n\t_addZoomLimit: function (layer) {\n\t\tif (!isNaN(layer.options.maxZoom) || !isNaN(layer.options.minZoom)) {\n\t\t\tthis._zoomBoundLayers[stamp(layer)] = layer;\n\t\t\tthis._updateZoomLevels();\n\t\t}\n\t},\n\n\t_removeZoomLimit: function (layer) {\n\t\tvar id = stamp(layer);\n\n\t\tif (this._zoomBoundLayers[id]) {\n\t\t\tdelete this._zoomBoundLayers[id];\n\t\t\tthis._updateZoomLevels();\n\t\t}\n\t},\n\n\t_updateZoomLevels: function () {\n\t\tvar minZoom = Infinity,\n\t\t maxZoom = -Infinity,\n\t\t oldZoomSpan = this._getZoomSpan();\n\n\t\tfor (var i in this._zoomBoundLayers) {\n\t\t\tvar options = this._zoomBoundLayers[i].options;\n\n\t\t\tminZoom = options.minZoom === undefined ? minZoom : Math.min(minZoom, options.minZoom);\n\t\t\tmaxZoom = options.maxZoom === undefined ? maxZoom : Math.max(maxZoom, options.maxZoom);\n\t\t}\n\n\t\tthis._layersMaxZoom = maxZoom === -Infinity ? undefined : maxZoom;\n\t\tthis._layersMinZoom = minZoom === Infinity ? undefined : minZoom;\n\n\t\t// @section Map state change events\n\t\t// @event zoomlevelschange: Event\n\t\t// Fired when the number of zoomlevels on the map is changed due\n\t\t// to adding or removing a layer.\n\t\tif (oldZoomSpan !== this._getZoomSpan()) {\n\t\t\tthis.fire('zoomlevelschange');\n\t\t}\n\n\t\tif (this.options.maxZoom === undefined && this._layersMaxZoom && this.getZoom() > this._layersMaxZoom) {\n\t\t\tthis.setZoom(this._layersMaxZoom);\n\t\t}\n\t\tif (this.options.minZoom === undefined && this._layersMinZoom && this.getZoom() < this._layersMinZoom) {\n\t\t\tthis.setZoom(this._layersMinZoom);\n\t\t}\n\t}\n});\n\n/*\r\n * @class LayerGroup\r\n * @aka L.LayerGroup\r\n * @inherits Interactive layer\r\n *\r\n * Used to group several layers and handle them as one. If you add it to the map,\r\n * any layers added or removed from the group will be added/removed on the map as\r\n * well. Extends `Layer`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * L.layerGroup([marker1, marker2])\r\n * \t.addLayer(polyline)\r\n * \t.addTo(map);\r\n * ```\r\n */\r\n\r\nvar LayerGroup = Layer.extend({\r\n\r\n\tinitialize: function (layers, options) {\r\n\t\tsetOptions(this, options);\r\n\r\n\t\tthis._layers = {};\r\n\r\n\t\tvar i, len;\r\n\r\n\t\tif (layers) {\r\n\t\t\tfor (i = 0, len = layers.length; i < len; i++) {\r\n\t\t\t\tthis.addLayer(layers[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t// @method addLayer(layer: Layer): this\r\n\t// Adds the given layer to the group.\r\n\taddLayer: function (layer) {\r\n\t\tvar id = this.getLayerId(layer);\r\n\r\n\t\tthis._layers[id] = layer;\r\n\r\n\t\tif (this._map) {\r\n\t\t\tthis._map.addLayer(layer);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method removeLayer(layer: Layer): this\r\n\t// Removes the given layer from the group.\r\n\t// @alternative\r\n\t// @method removeLayer(id: Number): this\r\n\t// Removes the layer with the given internal ID from the group.\r\n\tremoveLayer: function (layer) {\r\n\t\tvar id = layer in this._layers ? layer : this.getLayerId(layer);\r\n\r\n\t\tif (this._map && this._layers[id]) {\r\n\t\t\tthis._map.removeLayer(this._layers[id]);\r\n\t\t}\r\n\r\n\t\tdelete this._layers[id];\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method hasLayer(layer: Layer): Boolean\r\n\t// Returns `true` if the given layer is currently added to the group.\r\n\t// @alternative\r\n\t// @method hasLayer(id: Number): Boolean\r\n\t// Returns `true` if the given internal ID is currently added to the group.\r\n\thasLayer: function (layer) {\r\n\t\tvar layerId = typeof layer === 'number' ? layer : this.getLayerId(layer);\r\n\t\treturn layerId in this._layers;\r\n\t},\r\n\r\n\t// @method clearLayers(): this\r\n\t// Removes all the layers from the group.\r\n\tclearLayers: function () {\r\n\t\treturn this.eachLayer(this.removeLayer, this);\r\n\t},\r\n\r\n\t// @method invoke(methodName: String, …): this\r\n\t// Calls `methodName` on every layer contained in this group, passing any\r\n\t// additional parameters. Has no effect if the layers contained do not\r\n\t// implement `methodName`.\r\n\tinvoke: function (methodName) {\r\n\t\tvar args = Array.prototype.slice.call(arguments, 1),\r\n\t\t i, layer;\r\n\r\n\t\tfor (i in this._layers) {\r\n\t\t\tlayer = this._layers[i];\r\n\r\n\t\t\tif (layer[methodName]) {\r\n\t\t\t\tlayer[methodName].apply(layer, args);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\t\tthis.eachLayer(map.addLayer, map);\r\n\t},\r\n\r\n\tonRemove: function (map) {\r\n\t\tthis.eachLayer(map.removeLayer, map);\r\n\t},\r\n\r\n\t// @method eachLayer(fn: Function, context?: Object): this\r\n\t// Iterates over the layers of the group, optionally specifying context of the iterator function.\r\n\t// ```js\r\n\t// group.eachLayer(function (layer) {\r\n\t// \tlayer.bindPopup('Hello');\r\n\t// });\r\n\t// ```\r\n\teachLayer: function (method, context) {\r\n\t\tfor (var i in this._layers) {\r\n\t\t\tmethod.call(context, this._layers[i]);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method getLayer(id: Number): Layer\r\n\t// Returns the layer with the given internal ID.\r\n\tgetLayer: function (id) {\r\n\t\treturn this._layers[id];\r\n\t},\r\n\r\n\t// @method getLayers(): Layer[]\r\n\t// Returns an array of all the layers added to the group.\r\n\tgetLayers: function () {\r\n\t\tvar layers = [];\r\n\t\tthis.eachLayer(layers.push, layers);\r\n\t\treturn layers;\r\n\t},\r\n\r\n\t// @method setZIndex(zIndex: Number): this\r\n\t// Calls `setZIndex` on every layer contained in this group, passing the z-index.\r\n\tsetZIndex: function (zIndex) {\r\n\t\treturn this.invoke('setZIndex', zIndex);\r\n\t},\r\n\r\n\t// @method getLayerId(layer: Layer): Number\r\n\t// Returns the internal ID for a layer\r\n\tgetLayerId: function (layer) {\r\n\t\treturn stamp(layer);\r\n\t}\r\n});\r\n\r\n\r\n// @factory L.layerGroup(layers?: Layer[], options?: Object)\r\n// Create a layer group, optionally given an initial set of layers and an `options` object.\r\nvar layerGroup = function (layers, options) {\r\n\treturn new LayerGroup(layers, options);\r\n};\n\n/*\r\n * @class FeatureGroup\r\n * @aka L.FeatureGroup\r\n * @inherits LayerGroup\r\n *\r\n * Extended `LayerGroup` that makes it easier to do the same thing to all its member layers:\r\n * * [`bindPopup`](#layer-bindpopup) binds a popup to all of the layers at once (likewise with [`bindTooltip`](#layer-bindtooltip))\r\n * * Events are propagated to the `FeatureGroup`, so if the group has an event\r\n * handler, it will handle events from any of the layers. This includes mouse events\r\n * and custom events.\r\n * * Has `layeradd` and `layerremove` events\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * L.featureGroup([marker1, marker2, polyline])\r\n * \t.bindPopup('Hello world!')\r\n * \t.on('click', function() { alert('Clicked on a member of the group!'); })\r\n * \t.addTo(map);\r\n * ```\r\n */\r\n\r\nvar FeatureGroup = LayerGroup.extend({\r\n\r\n\taddLayer: function (layer) {\r\n\t\tif (this.hasLayer(layer)) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tlayer.addEventParent(this);\r\n\r\n\t\tLayerGroup.prototype.addLayer.call(this, layer);\r\n\r\n\t\t// @event layeradd: LayerEvent\r\n\t\t// Fired when a layer is added to this `FeatureGroup`\r\n\t\treturn this.fire('layeradd', {layer: layer});\r\n\t},\r\n\r\n\tremoveLayer: function (layer) {\r\n\t\tif (!this.hasLayer(layer)) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\tif (layer in this._layers) {\r\n\t\t\tlayer = this._layers[layer];\r\n\t\t}\r\n\r\n\t\tlayer.removeEventParent(this);\r\n\r\n\t\tLayerGroup.prototype.removeLayer.call(this, layer);\r\n\r\n\t\t// @event layerremove: LayerEvent\r\n\t\t// Fired when a layer is removed from this `FeatureGroup`\r\n\t\treturn this.fire('layerremove', {layer: layer});\r\n\t},\r\n\r\n\t// @method setStyle(style: Path options): this\r\n\t// Sets the given path options to each layer of the group that has a `setStyle` method.\r\n\tsetStyle: function (style) {\r\n\t\treturn this.invoke('setStyle', style);\r\n\t},\r\n\r\n\t// @method bringToFront(): this\r\n\t// Brings the layer group to the top of all other layers\r\n\tbringToFront: function () {\r\n\t\treturn this.invoke('bringToFront');\r\n\t},\r\n\r\n\t// @method bringToBack(): this\r\n\t// Brings the layer group to the back of all other layers\r\n\tbringToBack: function () {\r\n\t\treturn this.invoke('bringToBack');\r\n\t},\r\n\r\n\t// @method getBounds(): LatLngBounds\r\n\t// Returns the LatLngBounds of the Feature Group (created from bounds and coordinates of its children).\r\n\tgetBounds: function () {\r\n\t\tvar bounds = new LatLngBounds();\r\n\r\n\t\tfor (var id in this._layers) {\r\n\t\t\tvar layer = this._layers[id];\r\n\t\t\tbounds.extend(layer.getBounds ? layer.getBounds() : layer.getLatLng());\r\n\t\t}\r\n\t\treturn bounds;\r\n\t}\r\n});\r\n\r\n// @factory L.featureGroup(layers?: Layer[], options?: Object)\r\n// Create a feature group, optionally given an initial set of layers and an `options` object.\r\nvar featureGroup = function (layers, options) {\r\n\treturn new FeatureGroup(layers, options);\r\n};\n\n/*\r\n * @class Icon\r\n * @aka L.Icon\r\n *\r\n * Represents an icon to provide when creating a marker.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var myIcon = L.icon({\r\n * iconUrl: 'my-icon.png',\r\n * iconRetinaUrl: 'my-icon@2x.png',\r\n * iconSize: [38, 95],\r\n * iconAnchor: [22, 94],\r\n * popupAnchor: [-3, -76],\r\n * shadowUrl: 'my-icon-shadow.png',\r\n * shadowRetinaUrl: 'my-icon-shadow@2x.png',\r\n * shadowSize: [68, 95],\r\n * shadowAnchor: [22, 94]\r\n * });\r\n *\r\n * L.marker([50.505, 30.57], {icon: myIcon}).addTo(map);\r\n * ```\r\n *\r\n * `L.Icon.Default` extends `L.Icon` and is the blue icon Leaflet uses for markers by default.\r\n *\r\n */\r\n\r\nvar Icon = Class.extend({\r\n\r\n\t/* @section\r\n\t * @aka Icon options\r\n\t *\r\n\t * @option iconUrl: String = null\r\n\t * **(required)** The URL to the icon image (absolute or relative to your script path).\r\n\t *\r\n\t * @option iconRetinaUrl: String = null\r\n\t * The URL to a retina sized version of the icon image (absolute or relative to your\r\n\t * script path). Used for Retina screen devices.\r\n\t *\r\n\t * @option iconSize: Point = null\r\n\t * Size of the icon image in pixels.\r\n\t *\r\n\t * @option iconAnchor: Point = null\r\n\t * The coordinates of the \"tip\" of the icon (relative to its top left corner). The icon\r\n\t * will be aligned so that this point is at the marker's geographical location. Centered\r\n\t * by default if size is specified, also can be set in CSS with negative margins.\r\n\t *\r\n\t * @option popupAnchor: Point = [0, 0]\r\n\t * The coordinates of the point from which popups will \"open\", relative to the icon anchor.\r\n\t *\r\n\t * @option tooltipAnchor: Point = [0, 0]\r\n\t * The coordinates of the point from which tooltips will \"open\", relative to the icon anchor.\r\n\t *\r\n\t * @option shadowUrl: String = null\r\n\t * The URL to the icon shadow image. If not specified, no shadow image will be created.\r\n\t *\r\n\t * @option shadowRetinaUrl: String = null\r\n\t *\r\n\t * @option shadowSize: Point = null\r\n\t * Size of the shadow image in pixels.\r\n\t *\r\n\t * @option shadowAnchor: Point = null\r\n\t * The coordinates of the \"tip\" of the shadow (relative to its top left corner) (the same\r\n\t * as iconAnchor if not specified).\r\n\t *\r\n\t * @option className: String = ''\r\n\t * A custom class name to assign to both icon and shadow images. Empty by default.\r\n\t */\r\n\r\n\toptions: {\r\n\t\tpopupAnchor: [0, 0],\r\n\t\ttooltipAnchor: [0, 0],\r\n\r\n\t\t// @option crossOrigin: Boolean|String = false\r\n\t\t// Whether the crossOrigin attribute will be added to the tiles.\r\n\t\t// If a String is provided, all tiles will have their crossOrigin attribute set to the String provided. This is needed if you want to access tile pixel data.\r\n\t\t// Refer to [CORS Settings](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for valid String values.\r\n\t\tcrossOrigin: false\r\n\t},\r\n\r\n\tinitialize: function (options) {\r\n\t\tsetOptions(this, options);\r\n\t},\r\n\r\n\t// @method createIcon(oldIcon?: HTMLElement): HTMLElement\r\n\t// Called internally when the icon has to be shown, returns a `<img>` HTML element\r\n\t// styled according to the options.\r\n\tcreateIcon: function (oldIcon) {\r\n\t\treturn this._createIcon('icon', oldIcon);\r\n\t},\r\n\r\n\t// @method createShadow(oldIcon?: HTMLElement): HTMLElement\r\n\t// As `createIcon`, but for the shadow beneath it.\r\n\tcreateShadow: function (oldIcon) {\r\n\t\treturn this._createIcon('shadow', oldIcon);\r\n\t},\r\n\r\n\t_createIcon: function (name, oldIcon) {\r\n\t\tvar src = this._getIconUrl(name);\r\n\r\n\t\tif (!src) {\r\n\t\t\tif (name === 'icon') {\r\n\t\t\t\tthrow new Error('iconUrl not set in Icon options (see the docs).');\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tvar img = this._createImg(src, oldIcon && oldIcon.tagName === 'IMG' ? oldIcon : null);\r\n\t\tthis._setIconStyles(img, name);\r\n\r\n\t\tif (this.options.crossOrigin || this.options.crossOrigin === '') {\r\n\t\t\timg.crossOrigin = this.options.crossOrigin === true ? '' : this.options.crossOrigin;\r\n\t\t}\r\n\r\n\t\treturn img;\r\n\t},\r\n\r\n\t_setIconStyles: function (img, name) {\r\n\t\tvar options = this.options;\r\n\t\tvar sizeOption = options[name + 'Size'];\r\n\r\n\t\tif (typeof sizeOption === 'number') {\r\n\t\t\tsizeOption = [sizeOption, sizeOption];\r\n\t\t}\r\n\r\n\t\tvar size = toPoint(sizeOption),\r\n\t\t anchor = toPoint(name === 'shadow' && options.shadowAnchor || options.iconAnchor ||\r\n\t\t size && size.divideBy(2, true));\r\n\r\n\t\timg.className = 'leaflet-marker-' + name + ' ' + (options.className || '');\r\n\r\n\t\tif (anchor) {\r\n\t\t\timg.style.marginLeft = (-anchor.x) + 'px';\r\n\t\t\timg.style.marginTop = (-anchor.y) + 'px';\r\n\t\t}\r\n\r\n\t\tif (size) {\r\n\t\t\timg.style.width = size.x + 'px';\r\n\t\t\timg.style.height = size.y + 'px';\r\n\t\t}\r\n\t},\r\n\r\n\t_createImg: function (src, el) {\r\n\t\tel = el || document.createElement('img');\r\n\t\tel.src = src;\r\n\t\treturn el;\r\n\t},\r\n\r\n\t_getIconUrl: function (name) {\r\n\t\treturn Browser.retina && this.options[name + 'RetinaUrl'] || this.options[name + 'Url'];\r\n\t}\r\n});\r\n\r\n\r\n// @factory L.icon(options: Icon options)\r\n// Creates an icon instance with the given options.\r\nfunction icon(options) {\r\n\treturn new Icon(options);\r\n}\n\n/*\n * @miniclass Icon.Default (Icon)\n * @aka L.Icon.Default\n * @section\n *\n * A trivial subclass of `Icon`, represents the icon to use in `Marker`s when\n * no icon is specified. Points to the blue marker image distributed with Leaflet\n * releases.\n *\n * In order to customize the default icon, just change the properties of `L.Icon.Default.prototype.options`\n * (which is a set of `Icon options`).\n *\n * If you want to _completely_ replace the default icon, override the\n * `L.Marker.prototype.options.icon` with your own icon instead.\n */\n\nvar IconDefault = Icon.extend({\n\n\toptions: {\n\t\ticonUrl: 'marker-icon.png',\n\t\ticonRetinaUrl: 'marker-icon-2x.png',\n\t\tshadowUrl: 'marker-shadow.png',\n\t\ticonSize: [25, 41],\n\t\ticonAnchor: [12, 41],\n\t\tpopupAnchor: [1, -34],\n\t\ttooltipAnchor: [16, -28],\n\t\tshadowSize: [41, 41]\n\t},\n\n\t_getIconUrl: function (name) {\n\t\tif (typeof IconDefault.imagePath !== 'string') {\t// Deprecated, backwards-compatibility only\n\t\t\tIconDefault.imagePath = this._detectIconPath();\n\t\t}\n\n\t\t// @option imagePath: String\n\t\t// `Icon.Default` will try to auto-detect the location of the\n\t\t// blue icon images. If you are placing these images in a non-standard\n\t\t// way, set this option to point to the right path.\n\t\treturn (this.options.imagePath || IconDefault.imagePath) + Icon.prototype._getIconUrl.call(this, name);\n\t},\n\n\t_stripUrl: function (path) {\t// separate function to use in tests\n\t\tvar strip = function (str, re, idx) {\n\t\t\tvar match = re.exec(str);\n\t\t\treturn match && match[idx];\n\t\t};\n\t\tpath = strip(path, /^url\\((['\"])?(.+)\\1\\)$/, 2);\n\t\treturn path && strip(path, /^(.*)marker-icon\\.png$/, 1);\n\t},\n\n\t_detectIconPath: function () {\n\t\tvar el = create$1('div', 'leaflet-default-icon-path', document.body);\n\t\tvar path = getStyle(el, 'background-image') ||\n\t\t getStyle(el, 'backgroundImage');\t// IE8\n\n\t\tdocument.body.removeChild(el);\n\t\tpath = this._stripUrl(path);\n\t\tif (path) { return path; }\n\t\tvar link = document.querySelector('link[href$=\"leaflet.css\"]');\n\t\tif (!link) { return ''; }\n\t\treturn link.href.substring(0, link.href.length - 'leaflet.css'.length - 1);\n\t}\n});\n\n/*\n * L.Handler.MarkerDrag is used internally by L.Marker to make the markers draggable.\n */\n\n\n/* @namespace Marker\n * @section Interaction handlers\n *\n * Interaction handlers are properties of a marker instance that allow you to control interaction behavior in runtime, enabling or disabling certain features such as dragging (see `Handler` methods). Example:\n *\n * ```js\n * marker.dragging.disable();\n * ```\n *\n * @property dragging: Handler\n * Marker dragging handler (by both mouse and touch). Only valid when the marker is on the map (Otherwise set [`marker.options.draggable`](#marker-draggable)).\n */\n\nvar MarkerDrag = Handler.extend({\n\tinitialize: function (marker) {\n\t\tthis._marker = marker;\n\t},\n\n\taddHooks: function () {\n\t\tvar icon = this._marker._icon;\n\n\t\tif (!this._draggable) {\n\t\t\tthis._draggable = new Draggable(icon, icon, true);\n\t\t}\n\n\t\tthis._draggable.on({\n\t\t\tdragstart: this._onDragStart,\n\t\t\tpredrag: this._onPreDrag,\n\t\t\tdrag: this._onDrag,\n\t\t\tdragend: this._onDragEnd\n\t\t}, this).enable();\n\n\t\taddClass(icon, 'leaflet-marker-draggable');\n\t},\n\n\tremoveHooks: function () {\n\t\tthis._draggable.off({\n\t\t\tdragstart: this._onDragStart,\n\t\t\tpredrag: this._onPreDrag,\n\t\t\tdrag: this._onDrag,\n\t\t\tdragend: this._onDragEnd\n\t\t}, this).disable();\n\n\t\tif (this._marker._icon) {\n\t\t\tremoveClass(this._marker._icon, 'leaflet-marker-draggable');\n\t\t}\n\t},\n\n\tmoved: function () {\n\t\treturn this._draggable && this._draggable._moved;\n\t},\n\n\t_adjustPan: function (e) {\n\t\tvar marker = this._marker,\n\t\t map = marker._map,\n\t\t speed = this._marker.options.autoPanSpeed,\n\t\t padding = this._marker.options.autoPanPadding,\n\t\t iconPos = getPosition(marker._icon),\n\t\t bounds = map.getPixelBounds(),\n\t\t origin = map.getPixelOrigin();\n\n\t\tvar panBounds = toBounds(\n\t\t\tbounds.min._subtract(origin).add(padding),\n\t\t\tbounds.max._subtract(origin).subtract(padding)\n\t\t);\n\n\t\tif (!panBounds.contains(iconPos)) {\n\t\t\t// Compute incremental movement\n\t\t\tvar movement = toPoint(\n\t\t\t\t(Math.max(panBounds.max.x, iconPos.x) - panBounds.max.x) / (bounds.max.x - panBounds.max.x) -\n\t\t\t\t(Math.min(panBounds.min.x, iconPos.x) - panBounds.min.x) / (bounds.min.x - panBounds.min.x),\n\n\t\t\t\t(Math.max(panBounds.max.y, iconPos.y) - panBounds.max.y) / (bounds.max.y - panBounds.max.y) -\n\t\t\t\t(Math.min(panBounds.min.y, iconPos.y) - panBounds.min.y) / (bounds.min.y - panBounds.min.y)\n\t\t\t).multiplyBy(speed);\n\n\t\t\tmap.panBy(movement, {animate: false});\n\n\t\t\tthis._draggable._newPos._add(movement);\n\t\t\tthis._draggable._startPos._add(movement);\n\n\t\t\tsetPosition(marker._icon, this._draggable._newPos);\n\t\t\tthis._onDrag(e);\n\n\t\t\tthis._panRequest = requestAnimFrame(this._adjustPan.bind(this, e));\n\t\t}\n\t},\n\n\t_onDragStart: function () {\n\t\t// @section Dragging events\n\t\t// @event dragstart: Event\n\t\t// Fired when the user starts dragging the marker.\n\n\t\t// @event movestart: Event\n\t\t// Fired when the marker starts moving (because of dragging).\n\n\t\tthis._oldLatLng = this._marker.getLatLng();\n\n\t\t// When using ES6 imports it could not be set when `Popup` was not imported as well\n\t\tthis._marker.closePopup && this._marker.closePopup();\n\n\t\tthis._marker\n\t\t\t.fire('movestart')\n\t\t\t.fire('dragstart');\n\t},\n\n\t_onPreDrag: function (e) {\n\t\tif (this._marker.options.autoPan) {\n\t\t\tcancelAnimFrame(this._panRequest);\n\t\t\tthis._panRequest = requestAnimFrame(this._adjustPan.bind(this, e));\n\t\t}\n\t},\n\n\t_onDrag: function (e) {\n\t\tvar marker = this._marker,\n\t\t shadow = marker._shadow,\n\t\t iconPos = getPosition(marker._icon),\n\t\t latlng = marker._map.layerPointToLatLng(iconPos);\n\n\t\t// update shadow position\n\t\tif (shadow) {\n\t\t\tsetPosition(shadow, iconPos);\n\t\t}\n\n\t\tmarker._latlng = latlng;\n\t\te.latlng = latlng;\n\t\te.oldLatLng = this._oldLatLng;\n\n\t\t// @event drag: Event\n\t\t// Fired repeatedly while the user drags the marker.\n\t\tmarker\n\t\t .fire('move', e)\n\t\t .fire('drag', e);\n\t},\n\n\t_onDragEnd: function (e) {\n\t\t// @event dragend: DragEndEvent\n\t\t// Fired when the user stops dragging the marker.\n\n\t\t cancelAnimFrame(this._panRequest);\n\n\t\t// @event moveend: Event\n\t\t// Fired when the marker stops moving (because of dragging).\n\t\tdelete this._oldLatLng;\n\t\tthis._marker\n\t\t .fire('moveend')\n\t\t .fire('dragend', e);\n\t}\n});\n\n/*\r\n * @class Marker\r\n * @inherits Interactive layer\r\n * @aka L.Marker\r\n * L.Marker is used to display clickable/draggable icons on the map. Extends `Layer`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * L.marker([50.5, 30.5]).addTo(map);\r\n * ```\r\n */\r\n\r\nvar Marker = Layer.extend({\r\n\r\n\t// @section\r\n\t// @aka Marker options\r\n\toptions: {\r\n\t\t// @option icon: Icon = *\r\n\t\t// Icon instance to use for rendering the marker.\r\n\t\t// See [Icon documentation](#L.Icon) for details on how to customize the marker icon.\r\n\t\t// If not specified, a common instance of `L.Icon.Default` is used.\r\n\t\ticon: new IconDefault(),\r\n\r\n\t\t// Option inherited from \"Interactive layer\" abstract class\r\n\t\tinteractive: true,\r\n\r\n\t\t// @option keyboard: Boolean = true\r\n\t\t// Whether the marker can be tabbed to with a keyboard and clicked by pressing enter.\r\n\t\tkeyboard: true,\r\n\r\n\t\t// @option title: String = ''\r\n\t\t// Text for the browser tooltip that appear on marker hover (no tooltip by default).\r\n\t\t// [Useful for accessibility](https://leafletjs.com/examples/accessibility/#markers-must-be-labelled).\r\n\t\ttitle: '',\r\n\r\n\t\t// @option alt: String = 'Marker'\r\n\t\t// Text for the `alt` attribute of the icon image.\r\n\t\t// [Useful for accessibility](https://leafletjs.com/examples/accessibility/#markers-must-be-labelled).\r\n\t\talt: 'Marker',\r\n\r\n\t\t// @option zIndexOffset: Number = 0\r\n\t\t// By default, marker images zIndex is set automatically based on its latitude. Use this option if you want to put the marker on top of all others (or below), specifying a high value like `1000` (or high negative value, respectively).\r\n\t\tzIndexOffset: 0,\r\n\r\n\t\t// @option opacity: Number = 1.0\r\n\t\t// The opacity of the marker.\r\n\t\topacity: 1,\r\n\r\n\t\t// @option riseOnHover: Boolean = false\r\n\t\t// If `true`, the marker will get on top of others when you hover the mouse over it.\r\n\t\triseOnHover: false,\r\n\r\n\t\t// @option riseOffset: Number = 250\r\n\t\t// The z-index offset used for the `riseOnHover` feature.\r\n\t\triseOffset: 250,\r\n\r\n\t\t// @option pane: String = 'markerPane'\r\n\t\t// `Map pane` where the markers icon will be added.\r\n\t\tpane: 'markerPane',\r\n\r\n\t\t// @option shadowPane: String = 'shadowPane'\r\n\t\t// `Map pane` where the markers shadow will be added.\r\n\t\tshadowPane: 'shadowPane',\r\n\r\n\t\t// @option bubblingMouseEvents: Boolean = false\r\n\t\t// When `true`, a mouse event on this marker will trigger the same event on the map\r\n\t\t// (unless [`L.DomEvent.stopPropagation`](#domevent-stoppropagation) is used).\r\n\t\tbubblingMouseEvents: false,\r\n\r\n\t\t// @option autoPanOnFocus: Boolean = true\r\n\t\t// When `true`, the map will pan whenever the marker is focused (via\r\n\t\t// e.g. pressing `tab` on the keyboard) to ensure the marker is\r\n\t\t// visible within the map's bounds\r\n\t\tautoPanOnFocus: true,\r\n\r\n\t\t// @section Draggable marker options\r\n\t\t// @option draggable: Boolean = false\r\n\t\t// Whether the marker is draggable with mouse/touch or not.\r\n\t\tdraggable: false,\r\n\r\n\t\t// @option autoPan: Boolean = false\r\n\t\t// Whether to pan the map when dragging this marker near its edge or not.\r\n\t\tautoPan: false,\r\n\r\n\t\t// @option autoPanPadding: Point = Point(50, 50)\r\n\t\t// Distance (in pixels to the left/right and to the top/bottom) of the\r\n\t\t// map edge to start panning the map.\r\n\t\tautoPanPadding: [50, 50],\r\n\r\n\t\t// @option autoPanSpeed: Number = 10\r\n\t\t// Number of pixels the map should pan by.\r\n\t\tautoPanSpeed: 10\r\n\t},\r\n\r\n\t/* @section\r\n\t *\r\n\t * In addition to [shared layer methods](#Layer) like `addTo()` and `remove()` and [popup methods](#Popup) like bindPopup() you can also use the following methods:\r\n\t */\r\n\r\n\tinitialize: function (latlng, options) {\r\n\t\tsetOptions(this, options);\r\n\t\tthis._latlng = toLatLng(latlng);\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\t\tthis._zoomAnimated = this._zoomAnimated && map.options.markerZoomAnimation;\r\n\r\n\t\tif (this._zoomAnimated) {\r\n\t\t\tmap.on('zoomanim', this._animateZoom, this);\r\n\t\t}\r\n\r\n\t\tthis._initIcon();\r\n\t\tthis.update();\r\n\t},\r\n\r\n\tonRemove: function (map) {\r\n\t\tif (this.dragging && this.dragging.enabled()) {\r\n\t\t\tthis.options.draggable = true;\r\n\t\t\tthis.dragging.removeHooks();\r\n\t\t}\r\n\t\tdelete this.dragging;\r\n\r\n\t\tif (this._zoomAnimated) {\r\n\t\t\tmap.off('zoomanim', this._animateZoom, this);\r\n\t\t}\r\n\r\n\t\tthis._removeIcon();\r\n\t\tthis._removeShadow();\r\n\t},\r\n\r\n\tgetEvents: function () {\r\n\t\treturn {\r\n\t\t\tzoom: this.update,\r\n\t\t\tviewreset: this.update\r\n\t\t};\r\n\t},\r\n\r\n\t// @method getLatLng: LatLng\r\n\t// Returns the current geographical position of the marker.\r\n\tgetLatLng: function () {\r\n\t\treturn this._latlng;\r\n\t},\r\n\r\n\t// @method setLatLng(latlng: LatLng): this\r\n\t// Changes the marker position to the given point.\r\n\tsetLatLng: function (latlng) {\r\n\t\tvar oldLatLng = this._latlng;\r\n\t\tthis._latlng = toLatLng(latlng);\r\n\t\tthis.update();\r\n\r\n\t\t// @event move: Event\r\n\t\t// Fired when the marker is moved via [`setLatLng`](#marker-setlatlng) or by [dragging](#marker-dragging). Old and new coordinates are included in event arguments as `oldLatLng`, `latlng`.\r\n\t\treturn this.fire('move', {oldLatLng: oldLatLng, latlng: this._latlng});\r\n\t},\r\n\r\n\t// @method setZIndexOffset(offset: Number): this\r\n\t// Changes the [zIndex offset](#marker-zindexoffset) of the marker.\r\n\tsetZIndexOffset: function (offset) {\r\n\t\tthis.options.zIndexOffset = offset;\r\n\t\treturn this.update();\r\n\t},\r\n\r\n\t// @method getIcon: Icon\r\n\t// Returns the current icon used by the marker\r\n\tgetIcon: function () {\r\n\t\treturn this.options.icon;\r\n\t},\r\n\r\n\t// @method setIcon(icon: Icon): this\r\n\t// Changes the marker icon.\r\n\tsetIcon: function (icon) {\r\n\r\n\t\tthis.options.icon = icon;\r\n\r\n\t\tif (this._map) {\r\n\t\t\tthis._initIcon();\r\n\t\t\tthis.update();\r\n\t\t}\r\n\r\n\t\tif (this._popup) {\r\n\t\t\tthis.bindPopup(this._popup, this._popup.options);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tgetElement: function () {\r\n\t\treturn this._icon;\r\n\t},\r\n\r\n\tupdate: function () {\r\n\r\n\t\tif (this._icon && this._map) {\r\n\t\t\tvar pos = this._map.latLngToLayerPoint(this._latlng).round();\r\n\t\t\tthis._setPos(pos);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_initIcon: function () {\r\n\t\tvar options = this.options,\r\n\t\t classToAdd = 'leaflet-zoom-' + (this._zoomAnimated ? 'animated' : 'hide');\r\n\r\n\t\tvar icon = options.icon.createIcon(this._icon),\r\n\t\t addIcon = false;\r\n\r\n\t\t// if we're not reusing the icon, remove the old one and init new one\r\n\t\tif (icon !== this._icon) {\r\n\t\t\tif (this._icon) {\r\n\t\t\t\tthis._removeIcon();\r\n\t\t\t}\r\n\t\t\taddIcon = true;\r\n\r\n\t\t\tif (options.title) {\r\n\t\t\t\ticon.title = options.title;\r\n\t\t\t}\r\n\r\n\t\t\tif (icon.tagName === 'IMG') {\r\n\t\t\t\ticon.alt = options.alt || '';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\taddClass(icon, classToAdd);\r\n\r\n\t\tif (options.keyboard) {\r\n\t\t\ticon.tabIndex = '0';\r\n\t\t\ticon.setAttribute('role', 'button');\r\n\t\t}\r\n\r\n\t\tthis._icon = icon;\r\n\r\n\t\tif (options.riseOnHover) {\r\n\t\t\tthis.on({\r\n\t\t\t\tmouseover: this._bringToFront,\r\n\t\t\t\tmouseout: this._resetZIndex\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif (this.options.autoPanOnFocus) {\r\n\t\t\ton(icon, 'focus', this._panOnFocus, this);\r\n\t\t}\r\n\r\n\t\tvar newShadow = options.icon.createShadow(this._shadow),\r\n\t\t addShadow = false;\r\n\r\n\t\tif (newShadow !== this._shadow) {\r\n\t\t\tthis._removeShadow();\r\n\t\t\taddShadow = true;\r\n\t\t}\r\n\r\n\t\tif (newShadow) {\r\n\t\t\taddClass(newShadow, classToAdd);\r\n\t\t\tnewShadow.alt = '';\r\n\t\t}\r\n\t\tthis._shadow = newShadow;\r\n\r\n\r\n\t\tif (options.opacity < 1) {\r\n\t\t\tthis._updateOpacity();\r\n\t\t}\r\n\r\n\r\n\t\tif (addIcon) {\r\n\t\t\tthis.getPane().appendChild(this._icon);\r\n\t\t}\r\n\t\tthis._initInteraction();\r\n\t\tif (newShadow && addShadow) {\r\n\t\t\tthis.getPane(options.shadowPane).appendChild(this._shadow);\r\n\t\t}\r\n\t},\r\n\r\n\t_removeIcon: function () {\r\n\t\tif (this.options.riseOnHover) {\r\n\t\t\tthis.off({\r\n\t\t\t\tmouseover: this._bringToFront,\r\n\t\t\t\tmouseout: this._resetZIndex\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif (this.options.autoPanOnFocus) {\r\n\t\t\toff(this._icon, 'focus', this._panOnFocus, this);\r\n\t\t}\r\n\r\n\t\tremove(this._icon);\r\n\t\tthis.removeInteractiveTarget(this._icon);\r\n\r\n\t\tthis._icon = null;\r\n\t},\r\n\r\n\t_removeShadow: function () {\r\n\t\tif (this._shadow) {\r\n\t\t\tremove(this._shadow);\r\n\t\t}\r\n\t\tthis._shadow = null;\r\n\t},\r\n\r\n\t_setPos: function (pos) {\r\n\r\n\t\tif (this._icon) {\r\n\t\t\tsetPosition(this._icon, pos);\r\n\t\t}\r\n\r\n\t\tif (this._shadow) {\r\n\t\t\tsetPosition(this._shadow, pos);\r\n\t\t}\r\n\r\n\t\tthis._zIndex = pos.y + this.options.zIndexOffset;\r\n\r\n\t\tthis._resetZIndex();\r\n\t},\r\n\r\n\t_updateZIndex: function (offset) {\r\n\t\tif (this._icon) {\r\n\t\t\tthis._icon.style.zIndex = this._zIndex + offset;\r\n\t\t}\r\n\t},\r\n\r\n\t_animateZoom: function (opt) {\r\n\t\tvar pos = this._map._latLngToNewLayerPoint(this._latlng, opt.zoom, opt.center).round();\r\n\r\n\t\tthis._setPos(pos);\r\n\t},\r\n\r\n\t_initInteraction: function () {\r\n\r\n\t\tif (!this.options.interactive) { return; }\r\n\r\n\t\taddClass(this._icon, 'leaflet-interactive');\r\n\r\n\t\tthis.addInteractiveTarget(this._icon);\r\n\r\n\t\tif (MarkerDrag) {\r\n\t\t\tvar draggable = this.options.draggable;\r\n\t\t\tif (this.dragging) {\r\n\t\t\t\tdraggable = this.dragging.enabled();\r\n\t\t\t\tthis.dragging.disable();\r\n\t\t\t}\r\n\r\n\t\t\tthis.dragging = new MarkerDrag(this);\r\n\r\n\t\t\tif (draggable) {\r\n\t\t\t\tthis.dragging.enable();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t// @method setOpacity(opacity: Number): this\r\n\t// Changes the opacity of the marker.\r\n\tsetOpacity: function (opacity) {\r\n\t\tthis.options.opacity = opacity;\r\n\t\tif (this._map) {\r\n\t\t\tthis._updateOpacity();\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_updateOpacity: function () {\r\n\t\tvar opacity = this.options.opacity;\r\n\r\n\t\tif (this._icon) {\r\n\t\t\tsetOpacity(this._icon, opacity);\r\n\t\t}\r\n\r\n\t\tif (this._shadow) {\r\n\t\t\tsetOpacity(this._shadow, opacity);\r\n\t\t}\r\n\t},\r\n\r\n\t_bringToFront: function () {\r\n\t\tthis._updateZIndex(this.options.riseOffset);\r\n\t},\r\n\r\n\t_resetZIndex: function () {\r\n\t\tthis._updateZIndex(0);\r\n\t},\r\n\r\n\t_panOnFocus: function () {\r\n\t\tvar map = this._map;\r\n\t\tif (!map) { return; }\r\n\r\n\t\tvar iconOpts = this.options.icon.options;\r\n\t\tvar size = iconOpts.iconSize ? toPoint(iconOpts.iconSize) : toPoint(0, 0);\r\n\t\tvar anchor = iconOpts.iconAnchor ? toPoint(iconOpts.iconAnchor) : toPoint(0, 0);\r\n\r\n\t\tmap.panInside(this._latlng, {\r\n\t\t\tpaddingTopLeft: anchor,\r\n\t\t\tpaddingBottomRight: size.subtract(anchor)\r\n\t\t});\r\n\t},\r\n\r\n\t_getPopupAnchor: function () {\r\n\t\treturn this.options.icon.options.popupAnchor;\r\n\t},\r\n\r\n\t_getTooltipAnchor: function () {\r\n\t\treturn this.options.icon.options.tooltipAnchor;\r\n\t}\r\n});\r\n\r\n\r\n// factory L.marker(latlng: LatLng, options? : Marker options)\r\n\r\n// @factory L.marker(latlng: LatLng, options? : Marker options)\r\n// Instantiates a Marker object given a geographical point and optionally an options object.\r\nfunction marker(latlng, options) {\r\n\treturn new Marker(latlng, options);\r\n}\n\n/*\n * @class Path\n * @aka L.Path\n * @inherits Interactive layer\n *\n * An abstract class that contains options and constants shared between vector\n * overlays (Polygon, Polyline, Circle). Do not use it directly. Extends `Layer`.\n */\n\nvar Path = Layer.extend({\n\n\t// @section\n\t// @aka Path options\n\toptions: {\n\t\t// @option stroke: Boolean = true\n\t\t// Whether to draw stroke along the path. Set it to `false` to disable borders on polygons or circles.\n\t\tstroke: true,\n\n\t\t// @option color: String = '#3388ff'\n\t\t// Stroke color\n\t\tcolor: '#3388ff',\n\n\t\t// @option weight: Number = 3\n\t\t// Stroke width in pixels\n\t\tweight: 3,\n\n\t\t// @option opacity: Number = 1.0\n\t\t// Stroke opacity\n\t\topacity: 1,\n\n\t\t// @option lineCap: String= 'round'\n\t\t// A string that defines [shape to be used at the end](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-linecap) of the stroke.\n\t\tlineCap: 'round',\n\n\t\t// @option lineJoin: String = 'round'\n\t\t// A string that defines [shape to be used at the corners](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-linejoin) of the stroke.\n\t\tlineJoin: 'round',\n\n\t\t// @option dashArray: String = null\n\t\t// A string that defines the stroke [dash pattern](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-dasharray). Doesn't work on `Canvas`-powered layers in [some old browsers](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setLineDash#Browser_compatibility).\n\t\tdashArray: null,\n\n\t\t// @option dashOffset: String = null\n\t\t// A string that defines the [distance into the dash pattern to start the dash](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-dashoffset). Doesn't work on `Canvas`-powered layers in [some old browsers](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setLineDash#Browser_compatibility).\n\t\tdashOffset: null,\n\n\t\t// @option fill: Boolean = depends\n\t\t// Whether to fill the path with color. Set it to `false` to disable filling on polygons or circles.\n\t\tfill: false,\n\n\t\t// @option fillColor: String = *\n\t\t// Fill color. Defaults to the value of the [`color`](#path-color) option\n\t\tfillColor: null,\n\n\t\t// @option fillOpacity: Number = 0.2\n\t\t// Fill opacity.\n\t\tfillOpacity: 0.2,\n\n\t\t// @option fillRule: String = 'evenodd'\n\t\t// A string that defines [how the inside of a shape](https://developer.mozilla.org/docs/Web/SVG/Attribute/fill-rule) is determined.\n\t\tfillRule: 'evenodd',\n\n\t\t// className: '',\n\n\t\t// Option inherited from \"Interactive layer\" abstract class\n\t\tinteractive: true,\n\n\t\t// @option bubblingMouseEvents: Boolean = true\n\t\t// When `true`, a mouse event on this path will trigger the same event on the map\n\t\t// (unless [`L.DomEvent.stopPropagation`](#domevent-stoppropagation) is used).\n\t\tbubblingMouseEvents: true\n\t},\n\n\tbeforeAdd: function (map) {\n\t\t// Renderer is set here because we need to call renderer.getEvents\n\t\t// before this.getEvents.\n\t\tthis._renderer = map.getRenderer(this);\n\t},\n\n\tonAdd: function () {\n\t\tthis._renderer._initPath(this);\n\t\tthis._reset();\n\t\tthis._renderer._addPath(this);\n\t},\n\n\tonRemove: function () {\n\t\tthis._renderer._removePath(this);\n\t},\n\n\t// @method redraw(): this\n\t// Redraws the layer. Sometimes useful after you changed the coordinates that the path uses.\n\tredraw: function () {\n\t\tif (this._map) {\n\t\t\tthis._renderer._updatePath(this);\n\t\t}\n\t\treturn this;\n\t},\n\n\t// @method setStyle(style: Path options): this\n\t// Changes the appearance of a Path based on the options in the `Path options` object.\n\tsetStyle: function (style) {\n\t\tsetOptions(this, style);\n\t\tif (this._renderer) {\n\t\t\tthis._renderer._updateStyle(this);\n\t\t\tif (this.options.stroke && style && Object.prototype.hasOwnProperty.call(style, 'weight')) {\n\t\t\t\tthis._updateBounds();\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t},\n\n\t// @method bringToFront(): this\n\t// Brings the layer to the top of all path layers.\n\tbringToFront: function () {\n\t\tif (this._renderer) {\n\t\t\tthis._renderer._bringToFront(this);\n\t\t}\n\t\treturn this;\n\t},\n\n\t// @method bringToBack(): this\n\t// Brings the layer to the bottom of all path layers.\n\tbringToBack: function () {\n\t\tif (this._renderer) {\n\t\t\tthis._renderer._bringToBack(this);\n\t\t}\n\t\treturn this;\n\t},\n\n\tgetElement: function () {\n\t\treturn this._path;\n\t},\n\n\t_reset: function () {\n\t\t// defined in child classes\n\t\tthis._project();\n\t\tthis._update();\n\t},\n\n\t_clickTolerance: function () {\n\t\t// used when doing hit detection for Canvas layers\n\t\treturn (this.options.stroke ? this.options.weight / 2 : 0) +\n\t\t (this._renderer.options.tolerance || 0);\n\t}\n});\n\n/*\n * @class CircleMarker\n * @aka L.CircleMarker\n * @inherits Path\n *\n * A circle of a fixed size with radius specified in pixels. Extends `Path`.\n */\n\nvar CircleMarker = Path.extend({\n\n\t// @section\n\t// @aka CircleMarker options\n\toptions: {\n\t\tfill: true,\n\n\t\t// @option radius: Number = 10\n\t\t// Radius of the circle marker, in pixels\n\t\tradius: 10\n\t},\n\n\tinitialize: function (latlng, options) {\n\t\tsetOptions(this, options);\n\t\tthis._latlng = toLatLng(latlng);\n\t\tthis._radius = this.options.radius;\n\t},\n\n\t// @method setLatLng(latLng: LatLng): this\n\t// Sets the position of a circle marker to a new location.\n\tsetLatLng: function (latlng) {\n\t\tvar oldLatLng = this._latlng;\n\t\tthis._latlng = toLatLng(latlng);\n\t\tthis.redraw();\n\n\t\t// @event move: Event\n\t\t// Fired when the marker is moved via [`setLatLng`](#circlemarker-setlatlng). Old and new coordinates are included in event arguments as `oldLatLng`, `latlng`.\n\t\treturn this.fire('move', {oldLatLng: oldLatLng, latlng: this._latlng});\n\t},\n\n\t// @method getLatLng(): LatLng\n\t// Returns the current geographical position of the circle marker\n\tgetLatLng: function () {\n\t\treturn this._latlng;\n\t},\n\n\t// @method setRadius(radius: Number): this\n\t// Sets the radius of a circle marker. Units are in pixels.\n\tsetRadius: function (radius) {\n\t\tthis.options.radius = this._radius = radius;\n\t\treturn this.redraw();\n\t},\n\n\t// @method getRadius(): Number\n\t// Returns the current radius of the circle\n\tgetRadius: function () {\n\t\treturn this._radius;\n\t},\n\n\tsetStyle : function (options) {\n\t\tvar radius = options && options.radius || this._radius;\n\t\tPath.prototype.setStyle.call(this, options);\n\t\tthis.setRadius(radius);\n\t\treturn this;\n\t},\n\n\t_project: function () {\n\t\tthis._point = this._map.latLngToLayerPoint(this._latlng);\n\t\tthis._updateBounds();\n\t},\n\n\t_updateBounds: function () {\n\t\tvar r = this._radius,\n\t\t r2 = this._radiusY || r,\n\t\t w = this._clickTolerance(),\n\t\t p = [r + w, r2 + w];\n\t\tthis._pxBounds = new Bounds(this._point.subtract(p), this._point.add(p));\n\t},\n\n\t_update: function () {\n\t\tif (this._map) {\n\t\t\tthis._updatePath();\n\t\t}\n\t},\n\n\t_updatePath: function () {\n\t\tthis._renderer._updateCircle(this);\n\t},\n\n\t_empty: function () {\n\t\treturn this._radius && !this._renderer._bounds.intersects(this._pxBounds);\n\t},\n\n\t// Needed by the `Canvas` renderer for interactivity\n\t_containsPoint: function (p) {\n\t\treturn p.distanceTo(this._point) <= this._radius + this._clickTolerance();\n\t}\n});\n\n\n// @factory L.circleMarker(latlng: LatLng, options?: CircleMarker options)\n// Instantiates a circle marker object given a geographical point, and an optional options object.\nfunction circleMarker(latlng, options) {\n\treturn new CircleMarker(latlng, options);\n}\n\n/*\n * @class Circle\n * @aka L.Circle\n * @inherits CircleMarker\n *\n * A class for drawing circle overlays on a map. Extends `CircleMarker`.\n *\n * It's an approximation and starts to diverge from a real circle closer to poles (due to projection distortion).\n *\n * @example\n *\n * ```js\n * L.circle([50.5, 30.5], {radius: 200}).addTo(map);\n * ```\n */\n\nvar Circle = CircleMarker.extend({\n\n\tinitialize: function (latlng, options, legacyOptions) {\n\t\tif (typeof options === 'number') {\n\t\t\t// Backwards compatibility with 0.7.x factory (latlng, radius, options?)\n\t\t\toptions = extend({}, legacyOptions, {radius: options});\n\t\t}\n\t\tsetOptions(this, options);\n\t\tthis._latlng = toLatLng(latlng);\n\n\t\tif (isNaN(this.options.radius)) { throw new Error('Circle radius cannot be NaN'); }\n\n\t\t// @section\n\t\t// @aka Circle options\n\t\t// @option radius: Number; Radius of the circle, in meters.\n\t\tthis._mRadius = this.options.radius;\n\t},\n\n\t// @method setRadius(radius: Number): this\n\t// Sets the radius of a circle. Units are in meters.\n\tsetRadius: function (radius) {\n\t\tthis._mRadius = radius;\n\t\treturn this.redraw();\n\t},\n\n\t// @method getRadius(): Number\n\t// Returns the current radius of a circle. Units are in meters.\n\tgetRadius: function () {\n\t\treturn this._mRadius;\n\t},\n\n\t// @method getBounds(): LatLngBounds\n\t// Returns the `LatLngBounds` of the path.\n\tgetBounds: function () {\n\t\tvar half = [this._radius, this._radiusY || this._radius];\n\n\t\treturn new LatLngBounds(\n\t\t\tthis._map.layerPointToLatLng(this._point.subtract(half)),\n\t\t\tthis._map.layerPointToLatLng(this._point.add(half)));\n\t},\n\n\tsetStyle: Path.prototype.setStyle,\n\n\t_project: function () {\n\n\t\tvar lng = this._latlng.lng,\n\t\t lat = this._latlng.lat,\n\t\t map = this._map,\n\t\t crs = map.options.crs;\n\n\t\tif (crs.distance === Earth.distance) {\n\t\t\tvar d = Math.PI / 180,\n\t\t\t latR = (this._mRadius / Earth.R) / d,\n\t\t\t top = map.project([lat + latR, lng]),\n\t\t\t bottom = map.project([lat - latR, lng]),\n\t\t\t p = top.add(bottom).divideBy(2),\n\t\t\t lat2 = map.unproject(p).lat,\n\t\t\t lngR = Math.acos((Math.cos(latR * d) - Math.sin(lat * d) * Math.sin(lat2 * d)) /\n\t\t\t (Math.cos(lat * d) * Math.cos(lat2 * d))) / d;\n\n\t\t\tif (isNaN(lngR) || lngR === 0) {\n\t\t\t\tlngR = latR / Math.cos(Math.PI / 180 * lat); // Fallback for edge case, #2425\n\t\t\t}\n\n\t\t\tthis._point = p.subtract(map.getPixelOrigin());\n\t\t\tthis._radius = isNaN(lngR) ? 0 : p.x - map.project([lat2, lng - lngR]).x;\n\t\t\tthis._radiusY = p.y - top.y;\n\n\t\t} else {\n\t\t\tvar latlng2 = crs.unproject(crs.project(this._latlng).subtract([this._mRadius, 0]));\n\n\t\t\tthis._point = map.latLngToLayerPoint(this._latlng);\n\t\t\tthis._radius = this._point.x - map.latLngToLayerPoint(latlng2).x;\n\t\t}\n\n\t\tthis._updateBounds();\n\t}\n});\n\n// @factory L.circle(latlng: LatLng, options?: Circle options)\n// Instantiates a circle object given a geographical point, and an options object\n// which contains the circle radius.\n// @alternative\n// @factory L.circle(latlng: LatLng, radius: Number, options?: Circle options)\n// Obsolete way of instantiating a circle, for compatibility with 0.7.x code.\n// Do not use in new applications or plugins.\nfunction circle(latlng, options, legacyOptions) {\n\treturn new Circle(latlng, options, legacyOptions);\n}\n\n/*\n * @class Polyline\n * @aka L.Polyline\n * @inherits Path\n *\n * A class for drawing polyline overlays on a map. Extends `Path`.\n *\n * @example\n *\n * ```js\n * // create a red polyline from an array of LatLng points\n * var latlngs = [\n * \t[45.51, -122.68],\n * \t[37.77, -122.43],\n * \t[34.04, -118.2]\n * ];\n *\n * var polyline = L.polyline(latlngs, {color: 'red'}).addTo(map);\n *\n * // zoom the map to the polyline\n * map.fitBounds(polyline.getBounds());\n * ```\n *\n * You can also pass a multi-dimensional array to represent a `MultiPolyline` shape:\n *\n * ```js\n * // create a red polyline from an array of arrays of LatLng points\n * var latlngs = [\n * \t[[45.51, -122.68],\n * \t [37.77, -122.43],\n * \t [34.04, -118.2]],\n * \t[[40.78, -73.91],\n * \t [41.83, -87.62],\n * \t [32.76, -96.72]]\n * ];\n * ```\n */\n\n\nvar Polyline = Path.extend({\n\n\t// @section\n\t// @aka Polyline options\n\toptions: {\n\t\t// @option smoothFactor: Number = 1.0\n\t\t// How much to simplify the polyline on each zoom level. More means\n\t\t// better performance and smoother look, and less means more accurate representation.\n\t\tsmoothFactor: 1.0,\n\n\t\t// @option noClip: Boolean = false\n\t\t// Disable polyline clipping.\n\t\tnoClip: false\n\t},\n\n\tinitialize: function (latlngs, options) {\n\t\tsetOptions(this, options);\n\t\tthis._setLatLngs(latlngs);\n\t},\n\n\t// @method getLatLngs(): LatLng[]\n\t// Returns an array of the points in the path, or nested arrays of points in case of multi-polyline.\n\tgetLatLngs: function () {\n\t\treturn this._latlngs;\n\t},\n\n\t// @method setLatLngs(latlngs: LatLng[]): this\n\t// Replaces all the points in the polyline with the given array of geographical points.\n\tsetLatLngs: function (latlngs) {\n\t\tthis._setLatLngs(latlngs);\n\t\treturn this.redraw();\n\t},\n\n\t// @method isEmpty(): Boolean\n\t// Returns `true` if the Polyline has no LatLngs.\n\tisEmpty: function () {\n\t\treturn !this._latlngs.length;\n\t},\n\n\t// @method closestLayerPoint(p: Point): Point\n\t// Returns the point closest to `p` on the Polyline.\n\tclosestLayerPoint: function (p) {\n\t\tvar minDistance = Infinity,\n\t\t minPoint = null,\n\t\t closest = _sqClosestPointOnSegment,\n\t\t p1, p2;\n\n\t\tfor (var j = 0, jLen = this._parts.length; j < jLen; j++) {\n\t\t\tvar points = this._parts[j];\n\n\t\t\tfor (var i = 1, len = points.length; i < len; i++) {\n\t\t\t\tp1 = points[i - 1];\n\t\t\t\tp2 = points[i];\n\n\t\t\t\tvar sqDist = closest(p, p1, p2, true);\n\n\t\t\t\tif (sqDist < minDistance) {\n\t\t\t\t\tminDistance = sqDist;\n\t\t\t\t\tminPoint = closest(p, p1, p2);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (minPoint) {\n\t\t\tminPoint.distance = Math.sqrt(minDistance);\n\t\t}\n\t\treturn minPoint;\n\t},\n\n\t// @method getCenter(): LatLng\n\t// Returns the center ([centroid](https://en.wikipedia.org/wiki/Centroid)) of the polyline.\n\tgetCenter: function () {\n\t\t// throws error when not yet added to map as this center calculation requires projected coordinates\n\t\tif (!this._map) {\n\t\t\tthrow new Error('Must add layer to map before using getCenter()');\n\t\t}\n\t\treturn polylineCenter(this._defaultShape(), this._map.options.crs);\n\t},\n\n\t// @method getBounds(): LatLngBounds\n\t// Returns the `LatLngBounds` of the path.\n\tgetBounds: function () {\n\t\treturn this._bounds;\n\t},\n\n\t// @method addLatLng(latlng: LatLng, latlngs?: LatLng[]): this\n\t// Adds a given point to the polyline. By default, adds to the first ring of\n\t// the polyline in case of a multi-polyline, but can be overridden by passing\n\t// a specific ring as a LatLng array (that you can earlier access with [`getLatLngs`](#polyline-getlatlngs)).\n\taddLatLng: function (latlng, latlngs) {\n\t\tlatlngs = latlngs || this._defaultShape();\n\t\tlatlng = toLatLng(latlng);\n\t\tlatlngs.push(latlng);\n\t\tthis._bounds.extend(latlng);\n\t\treturn this.redraw();\n\t},\n\n\t_setLatLngs: function (latlngs) {\n\t\tthis._bounds = new LatLngBounds();\n\t\tthis._latlngs = this._convertLatLngs(latlngs);\n\t},\n\n\t_defaultShape: function () {\n\t\treturn isFlat(this._latlngs) ? this._latlngs : this._latlngs[0];\n\t},\n\n\t// recursively convert latlngs input into actual LatLng instances; calculate bounds along the way\n\t_convertLatLngs: function (latlngs) {\n\t\tvar result = [],\n\t\t flat = isFlat(latlngs);\n\n\t\tfor (var i = 0, len = latlngs.length; i < len; i++) {\n\t\t\tif (flat) {\n\t\t\t\tresult[i] = toLatLng(latlngs[i]);\n\t\t\t\tthis._bounds.extend(result[i]);\n\t\t\t} else {\n\t\t\t\tresult[i] = this._convertLatLngs(latlngs[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t},\n\n\t_project: function () {\n\t\tvar pxBounds = new Bounds();\n\t\tthis._rings = [];\n\t\tthis._projectLatlngs(this._latlngs, this._rings, pxBounds);\n\n\t\tif (this._bounds.isValid() && pxBounds.isValid()) {\n\t\t\tthis._rawPxBounds = pxBounds;\n\t\t\tthis._updateBounds();\n\t\t}\n\t},\n\n\t_updateBounds: function () {\n\t\tvar w = this._clickTolerance(),\n\t\t p = new Point(w, w);\n\n\t\tif (!this._rawPxBounds) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._pxBounds = new Bounds([\n\t\t\tthis._rawPxBounds.min.subtract(p),\n\t\t\tthis._rawPxBounds.max.add(p)\n\t\t]);\n\t},\n\n\t// recursively turns latlngs into a set of rings with projected coordinates\n\t_projectLatlngs: function (latlngs, result, projectedBounds) {\n\t\tvar flat = latlngs[0] instanceof LatLng,\n\t\t len = latlngs.length,\n\t\t i, ring;\n\n\t\tif (flat) {\n\t\t\tring = [];\n\t\t\tfor (i = 0; i < len; i++) {\n\t\t\t\tring[i] = this._map.latLngToLayerPoint(latlngs[i]);\n\t\t\t\tprojectedBounds.extend(ring[i]);\n\t\t\t}\n\t\t\tresult.push(ring);\n\t\t} else {\n\t\t\tfor (i = 0; i < len; i++) {\n\t\t\t\tthis._projectLatlngs(latlngs[i], result, projectedBounds);\n\t\t\t}\n\t\t}\n\t},\n\n\t// clip polyline by renderer bounds so that we have less to render for performance\n\t_clipPoints: function () {\n\t\tvar bounds = this._renderer._bounds;\n\n\t\tthis._parts = [];\n\t\tif (!this._pxBounds || !this._pxBounds.intersects(bounds)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.options.noClip) {\n\t\t\tthis._parts = this._rings;\n\t\t\treturn;\n\t\t}\n\n\t\tvar parts = this._parts,\n\t\t i, j, k, len, len2, segment, points;\n\n\t\tfor (i = 0, k = 0, len = this._rings.length; i < len; i++) {\n\t\t\tpoints = this._rings[i];\n\n\t\t\tfor (j = 0, len2 = points.length; j < len2 - 1; j++) {\n\t\t\t\tsegment = clipSegment(points[j], points[j + 1], bounds, j, true);\n\n\t\t\t\tif (!segment) { continue; }\n\n\t\t\t\tparts[k] = parts[k] || [];\n\t\t\t\tparts[k].push(segment[0]);\n\n\t\t\t\t// if segment goes out of screen, or it's the last one, it's the end of the line part\n\t\t\t\tif ((segment[1] !== points[j + 1]) || (j === len2 - 2)) {\n\t\t\t\t\tparts[k].push(segment[1]);\n\t\t\t\t\tk++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// simplify each clipped part of the polyline for performance\n\t_simplifyPoints: function () {\n\t\tvar parts = this._parts,\n\t\t tolerance = this.options.smoothFactor;\n\n\t\tfor (var i = 0, len = parts.length; i < len; i++) {\n\t\t\tparts[i] = simplify(parts[i], tolerance);\n\t\t}\n\t},\n\n\t_update: function () {\n\t\tif (!this._map) { return; }\n\n\t\tthis._clipPoints();\n\t\tthis._simplifyPoints();\n\t\tthis._updatePath();\n\t},\n\n\t_updatePath: function () {\n\t\tthis._renderer._updatePoly(this);\n\t},\n\n\t// Needed by the `Canvas` renderer for interactivity\n\t_containsPoint: function (p, closed) {\n\t\tvar i, j, k, len, len2, part,\n\t\t w = this._clickTolerance();\n\n\t\tif (!this._pxBounds || !this._pxBounds.contains(p)) { return false; }\n\n\t\t// hit detection for polylines\n\t\tfor (i = 0, len = this._parts.length; i < len; i++) {\n\t\t\tpart = this._parts[i];\n\n\t\t\tfor (j = 0, len2 = part.length, k = len2 - 1; j < len2; k = j++) {\n\t\t\t\tif (!closed && (j === 0)) { continue; }\n\n\t\t\t\tif (pointToSegmentDistance(p, part[k], part[j]) <= w) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n});\n\n// @factory L.polyline(latlngs: LatLng[], options?: Polyline options)\n// Instantiates a polyline object given an array of geographical points and\n// optionally an options object. You can create a `Polyline` object with\n// multiple separate lines (`MultiPolyline`) by passing an array of arrays\n// of geographic points.\nfunction polyline(latlngs, options) {\n\treturn new Polyline(latlngs, options);\n}\n\n// Retrocompat. Allow plugins to support Leaflet versions before and after 1.1.\nPolyline._flat = _flat;\n\n/*\n * @class Polygon\n * @aka L.Polygon\n * @inherits Polyline\n *\n * A class for drawing polygon overlays on a map. Extends `Polyline`.\n *\n * Note that points you pass when creating a polygon shouldn't have an additional last point equal to the first one — it's better to filter out such points.\n *\n *\n * @example\n *\n * ```js\n * // create a red polygon from an array of LatLng points\n * var latlngs = [[37, -109.05],[41, -109.03],[41, -102.05],[37, -102.04]];\n *\n * var polygon = L.polygon(latlngs, {color: 'red'}).addTo(map);\n *\n * // zoom the map to the polygon\n * map.fitBounds(polygon.getBounds());\n * ```\n *\n * You can also pass an array of arrays of latlngs, with the first array representing the outer shape and the other arrays representing holes in the outer shape:\n *\n * ```js\n * var latlngs = [\n * [[37, -109.05],[41, -109.03],[41, -102.05],[37, -102.04]], // outer ring\n * [[37.29, -108.58],[40.71, -108.58],[40.71, -102.50],[37.29, -102.50]] // hole\n * ];\n * ```\n *\n * Additionally, you can pass a multi-dimensional array to represent a MultiPolygon shape.\n *\n * ```js\n * var latlngs = [\n * [ // first polygon\n * [[37, -109.05],[41, -109.03],[41, -102.05],[37, -102.04]], // outer ring\n * [[37.29, -108.58],[40.71, -108.58],[40.71, -102.50],[37.29, -102.50]] // hole\n * ],\n * [ // second polygon\n * [[41, -111.03],[45, -111.04],[45, -104.05],[41, -104.05]]\n * ]\n * ];\n * ```\n */\n\nvar Polygon = Polyline.extend({\n\n\toptions: {\n\t\tfill: true\n\t},\n\n\tisEmpty: function () {\n\t\treturn !this._latlngs.length || !this._latlngs[0].length;\n\t},\n\n\t// @method getCenter(): LatLng\n\t// Returns the center ([centroid](http://en.wikipedia.org/wiki/Centroid)) of the Polygon.\n\tgetCenter: function () {\n\t\t// throws error when not yet added to map as this center calculation requires projected coordinates\n\t\tif (!this._map) {\n\t\t\tthrow new Error('Must add layer to map before using getCenter()');\n\t\t}\n\t\treturn polygonCenter(this._defaultShape(), this._map.options.crs);\n\t},\n\n\t_convertLatLngs: function (latlngs) {\n\t\tvar result = Polyline.prototype._convertLatLngs.call(this, latlngs),\n\t\t len = result.length;\n\n\t\t// remove last point if it equals first one\n\t\tif (len >= 2 && result[0] instanceof LatLng && result[0].equals(result[len - 1])) {\n\t\t\tresult.pop();\n\t\t}\n\t\treturn result;\n\t},\n\n\t_setLatLngs: function (latlngs) {\n\t\tPolyline.prototype._setLatLngs.call(this, latlngs);\n\t\tif (isFlat(this._latlngs)) {\n\t\t\tthis._latlngs = [this._latlngs];\n\t\t}\n\t},\n\n\t_defaultShape: function () {\n\t\treturn isFlat(this._latlngs[0]) ? this._latlngs[0] : this._latlngs[0][0];\n\t},\n\n\t_clipPoints: function () {\n\t\t// polygons need a different clipping algorithm so we redefine that\n\n\t\tvar bounds = this._renderer._bounds,\n\t\t w = this.options.weight,\n\t\t p = new Point(w, w);\n\n\t\t// increase clip padding by stroke width to avoid stroke on clip edges\n\t\tbounds = new Bounds(bounds.min.subtract(p), bounds.max.add(p));\n\n\t\tthis._parts = [];\n\t\tif (!this._pxBounds || !this._pxBounds.intersects(bounds)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.options.noClip) {\n\t\t\tthis._parts = this._rings;\n\t\t\treturn;\n\t\t}\n\n\t\tfor (var i = 0, len = this._rings.length, clipped; i < len; i++) {\n\t\t\tclipped = clipPolygon(this._rings[i], bounds, true);\n\t\t\tif (clipped.length) {\n\t\t\t\tthis._parts.push(clipped);\n\t\t\t}\n\t\t}\n\t},\n\n\t_updatePath: function () {\n\t\tthis._renderer._updatePoly(this, true);\n\t},\n\n\t// Needed by the `Canvas` renderer for interactivity\n\t_containsPoint: function (p) {\n\t\tvar inside = false,\n\t\t part, p1, p2, i, j, k, len, len2;\n\n\t\tif (!this._pxBounds || !this._pxBounds.contains(p)) { return false; }\n\n\t\t// ray casting algorithm for detecting if point is in polygon\n\t\tfor (i = 0, len = this._parts.length; i < len; i++) {\n\t\t\tpart = this._parts[i];\n\n\t\t\tfor (j = 0, len2 = part.length, k = len2 - 1; j < len2; k = j++) {\n\t\t\t\tp1 = part[j];\n\t\t\t\tp2 = part[k];\n\n\t\t\t\tif (((p1.y > p.y) !== (p2.y > p.y)) && (p.x < (p2.x - p1.x) * (p.y - p1.y) / (p2.y - p1.y) + p1.x)) {\n\t\t\t\t\tinside = !inside;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// also check if it's on polygon stroke\n\t\treturn inside || Polyline.prototype._containsPoint.call(this, p, true);\n\t}\n\n});\n\n\n// @factory L.polygon(latlngs: LatLng[], options?: Polyline options)\nfunction polygon(latlngs, options) {\n\treturn new Polygon(latlngs, options);\n}\n\n/*\r\n * @class GeoJSON\r\n * @aka L.GeoJSON\r\n * @inherits FeatureGroup\r\n *\r\n * Represents a GeoJSON object or an array of GeoJSON objects. Allows you to parse\r\n * GeoJSON data and display it on the map. Extends `FeatureGroup`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * L.geoJSON(data, {\r\n * \tstyle: function (feature) {\r\n * \t\treturn {color: feature.properties.color};\r\n * \t}\r\n * }).bindPopup(function (layer) {\r\n * \treturn layer.feature.properties.description;\r\n * }).addTo(map);\r\n * ```\r\n */\r\n\r\nvar GeoJSON = FeatureGroup.extend({\r\n\r\n\t/* @section\r\n\t * @aka GeoJSON options\r\n\t *\r\n\t * @option pointToLayer: Function = *\r\n\t * A `Function` defining how GeoJSON points spawn Leaflet layers. It is internally\r\n\t * called when data is added, passing the GeoJSON point feature and its `LatLng`.\r\n\t * The default is to spawn a default `Marker`:\r\n\t * ```js\r\n\t * function(geoJsonPoint, latlng) {\r\n\t * \treturn L.marker(latlng);\r\n\t * }\r\n\t * ```\r\n\t *\r\n\t * @option style: Function = *\r\n\t * A `Function` defining the `Path options` for styling GeoJSON lines and polygons,\r\n\t * called internally when data is added.\r\n\t * The default value is to not override any defaults:\r\n\t * ```js\r\n\t * function (geoJsonFeature) {\r\n\t * \treturn {}\r\n\t * }\r\n\t * ```\r\n\t *\r\n\t * @option onEachFeature: Function = *\r\n\t * A `Function` that will be called once for each created `Feature`, after it has\r\n\t * been created and styled. Useful for attaching events and popups to features.\r\n\t * The default is to do nothing with the newly created layers:\r\n\t * ```js\r\n\t * function (feature, layer) {}\r\n\t * ```\r\n\t *\r\n\t * @option filter: Function = *\r\n\t * A `Function` that will be used to decide whether to include a feature or not.\r\n\t * The default is to include all features:\r\n\t * ```js\r\n\t * function (geoJsonFeature) {\r\n\t * \treturn true;\r\n\t * }\r\n\t * ```\r\n\t * Note: dynamically changing the `filter` option will have effect only on newly\r\n\t * added data. It will _not_ re-evaluate already included features.\r\n\t *\r\n\t * @option coordsToLatLng: Function = *\r\n\t * A `Function` that will be used for converting GeoJSON coordinates to `LatLng`s.\r\n\t * The default is the `coordsToLatLng` static method.\r\n\t *\r\n\t * @option markersInheritOptions: Boolean = false\r\n\t * Whether default Markers for \"Point\" type Features inherit from group options.\r\n\t */\r\n\r\n\tinitialize: function (geojson, options) {\r\n\t\tsetOptions(this, options);\r\n\r\n\t\tthis._layers = {};\r\n\r\n\t\tif (geojson) {\r\n\t\t\tthis.addData(geojson);\r\n\t\t}\r\n\t},\r\n\r\n\t// @method addData( <GeoJSON> data ): this\r\n\t// Adds a GeoJSON object to the layer.\r\n\taddData: function (geojson) {\r\n\t\tvar features = isArray(geojson) ? geojson : geojson.features,\r\n\t\t i, len, feature;\r\n\r\n\t\tif (features) {\r\n\t\t\tfor (i = 0, len = features.length; i < len; i++) {\r\n\t\t\t\t// only add this if geometry or geometries are set and not null\r\n\t\t\t\tfeature = features[i];\r\n\t\t\t\tif (feature.geometries || feature.geometry || feature.features || feature.coordinates) {\r\n\t\t\t\t\tthis.addData(feature);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tvar options = this.options;\r\n\r\n\t\tif (options.filter && !options.filter(geojson)) { return this; }\r\n\r\n\t\tvar layer = geometryToLayer(geojson, options);\r\n\t\tif (!layer) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\tlayer.feature = asFeature(geojson);\r\n\r\n\t\tlayer.defaultOptions = layer.options;\r\n\t\tthis.resetStyle(layer);\r\n\r\n\t\tif (options.onEachFeature) {\r\n\t\t\toptions.onEachFeature(geojson, layer);\r\n\t\t}\r\n\r\n\t\treturn this.addLayer(layer);\r\n\t},\r\n\r\n\t// @method resetStyle( <Path> layer? ): this\r\n\t// Resets the given vector layer's style to the original GeoJSON style, useful for resetting style after hover events.\r\n\t// If `layer` is omitted, the style of all features in the current layer is reset.\r\n\tresetStyle: function (layer) {\r\n\t\tif (layer === undefined) {\r\n\t\t\treturn this.eachLayer(this.resetStyle, this);\r\n\t\t}\r\n\t\t// reset any custom styles\r\n\t\tlayer.options = extend({}, layer.defaultOptions);\r\n\t\tthis._setLayerStyle(layer, this.options.style);\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method setStyle( <Function> style ): this\r\n\t// Changes styles of GeoJSON vector layers with the given style function.\r\n\tsetStyle: function (style) {\r\n\t\treturn this.eachLayer(function (layer) {\r\n\t\t\tthis._setLayerStyle(layer, style);\r\n\t\t}, this);\r\n\t},\r\n\r\n\t_setLayerStyle: function (layer, style) {\r\n\t\tif (layer.setStyle) {\r\n\t\t\tif (typeof style === 'function') {\r\n\t\t\t\tstyle = style(layer.feature);\r\n\t\t\t}\r\n\t\t\tlayer.setStyle(style);\r\n\t\t}\r\n\t}\r\n});\r\n\r\n// @section\r\n// There are several static functions which can be called without instantiating L.GeoJSON:\r\n\r\n// @function geometryToLayer(featureData: Object, options?: GeoJSON options): Layer\r\n// Creates a `Layer` from a given GeoJSON feature. Can use a custom\r\n// [`pointToLayer`](#geojson-pointtolayer) and/or [`coordsToLatLng`](#geojson-coordstolatlng)\r\n// functions if provided as options.\r\nfunction geometryToLayer(geojson, options) {\r\n\r\n\tvar geometry = geojson.type === 'Feature' ? geojson.geometry : geojson,\r\n\t coords = geometry ? geometry.coordinates : null,\r\n\t layers = [],\r\n\t pointToLayer = options && options.pointToLayer,\r\n\t _coordsToLatLng = options && options.coordsToLatLng || coordsToLatLng,\r\n\t latlng, latlngs, i, len;\r\n\r\n\tif (!coords && !geometry) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\tswitch (geometry.type) {\r\n\tcase 'Point':\r\n\t\tlatlng = _coordsToLatLng(coords);\r\n\t\treturn _pointToLayer(pointToLayer, geojson, latlng, options);\r\n\r\n\tcase 'MultiPoint':\r\n\t\tfor (i = 0, len = coords.length; i < len; i++) {\r\n\t\t\tlatlng = _coordsToLatLng(coords[i]);\r\n\t\t\tlayers.push(_pointToLayer(pointToLayer, geojson, latlng, options));\r\n\t\t}\r\n\t\treturn new FeatureGroup(layers);\r\n\r\n\tcase 'LineString':\r\n\tcase 'MultiLineString':\r\n\t\tlatlngs = coordsToLatLngs(coords, geometry.type === 'LineString' ? 0 : 1, _coordsToLatLng);\r\n\t\treturn new Polyline(latlngs, options);\r\n\r\n\tcase 'Polygon':\r\n\tcase 'MultiPolygon':\r\n\t\tlatlngs = coordsToLatLngs(coords, geometry.type === 'Polygon' ? 1 : 2, _coordsToLatLng);\r\n\t\treturn new Polygon(latlngs, options);\r\n\r\n\tcase 'GeometryCollection':\r\n\t\tfor (i = 0, len = geometry.geometries.length; i < len; i++) {\r\n\t\t\tvar geoLayer = geometryToLayer({\r\n\t\t\t\tgeometry: geometry.geometries[i],\r\n\t\t\t\ttype: 'Feature',\r\n\t\t\t\tproperties: geojson.properties\r\n\t\t\t}, options);\r\n\r\n\t\t\tif (geoLayer) {\r\n\t\t\t\tlayers.push(geoLayer);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new FeatureGroup(layers);\r\n\r\n\tcase 'FeatureCollection':\r\n\t\tfor (i = 0, len = geometry.features.length; i < len; i++) {\r\n\t\t\tvar featureLayer = geometryToLayer(geometry.features[i], options);\r\n\r\n\t\t\tif (featureLayer) {\r\n\t\t\t\tlayers.push(featureLayer);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new FeatureGroup(layers);\r\n\r\n\tdefault:\r\n\t\tthrow new Error('Invalid GeoJSON object.');\r\n\t}\r\n}\r\n\r\nfunction _pointToLayer(pointToLayerFn, geojson, latlng, options) {\r\n\treturn pointToLayerFn ?\r\n\t\tpointToLayerFn(geojson, latlng) :\r\n\t\tnew Marker(latlng, options && options.markersInheritOptions && options);\r\n}\r\n\r\n// @function coordsToLatLng(coords: Array): LatLng\r\n// Creates a `LatLng` object from an array of 2 numbers (longitude, latitude)\r\n// or 3 numbers (longitude, latitude, altitude) used in GeoJSON for points.\r\nfunction coordsToLatLng(coords) {\r\n\treturn new LatLng(coords[1], coords[0], coords[2]);\r\n}\r\n\r\n// @function coordsToLatLngs(coords: Array, levelsDeep?: Number, coordsToLatLng?: Function): Array\r\n// Creates a multidimensional array of `LatLng`s from a GeoJSON coordinates array.\r\n// `levelsDeep` specifies the nesting level (0 is for an array of points, 1 for an array of arrays of points, etc., 0 by default).\r\n// Can use a custom [`coordsToLatLng`](#geojson-coordstolatlng) function.\r\nfunction coordsToLatLngs(coords, levelsDeep, _coordsToLatLng) {\r\n\tvar latlngs = [];\r\n\r\n\tfor (var i = 0, len = coords.length, latlng; i < len; i++) {\r\n\t\tlatlng = levelsDeep ?\r\n\t\t\tcoordsToLatLngs(coords[i], levelsDeep - 1, _coordsToLatLng) :\r\n\t\t\t(_coordsToLatLng || coordsToLatLng)(coords[i]);\r\n\r\n\t\tlatlngs.push(latlng);\r\n\t}\r\n\r\n\treturn latlngs;\r\n}\r\n\r\n// @function latLngToCoords(latlng: LatLng, precision?: Number|false): Array\r\n// Reverse of [`coordsToLatLng`](#geojson-coordstolatlng)\r\n// Coordinates values are rounded with [`formatNum`](#util-formatnum) function.\r\nfunction latLngToCoords(latlng, precision) {\r\n\tlatlng = toLatLng(latlng);\r\n\treturn latlng.alt !== undefined ?\r\n\t\t[formatNum(latlng.lng, precision), formatNum(latlng.lat, precision), formatNum(latlng.alt, precision)] :\r\n\t\t[formatNum(latlng.lng, precision), formatNum(latlng.lat, precision)];\r\n}\r\n\r\n// @function latLngsToCoords(latlngs: Array, levelsDeep?: Number, closed?: Boolean, precision?: Number|false): Array\r\n// Reverse of [`coordsToLatLngs`](#geojson-coordstolatlngs)\r\n// `closed` determines whether the first point should be appended to the end of the array to close the feature, only used when `levelsDeep` is 0. False by default.\r\n// Coordinates values are rounded with [`formatNum`](#util-formatnum) function.\r\nfunction latLngsToCoords(latlngs, levelsDeep, closed, precision) {\r\n\tvar coords = [];\r\n\r\n\tfor (var i = 0, len = latlngs.length; i < len; i++) {\r\n\t\t// Check for flat arrays required to ensure unbalanced arrays are correctly converted in recursion\r\n\t\tcoords.push(levelsDeep ?\r\n\t\t\tlatLngsToCoords(latlngs[i], isFlat(latlngs[i]) ? 0 : levelsDeep - 1, closed, precision) :\r\n\t\t\tlatLngToCoords(latlngs[i], precision));\r\n\t}\r\n\r\n\tif (!levelsDeep && closed) {\r\n\t\tcoords.push(coords[0]);\r\n\t}\r\n\r\n\treturn coords;\r\n}\r\n\r\nfunction getFeature(layer, newGeometry) {\r\n\treturn layer.feature ?\r\n\t\textend({}, layer.feature, {geometry: newGeometry}) :\r\n\t\tasFeature(newGeometry);\r\n}\r\n\r\n// @function asFeature(geojson: Object): Object\r\n// Normalize GeoJSON geometries/features into GeoJSON features.\r\nfunction asFeature(geojson) {\r\n\tif (geojson.type === 'Feature' || geojson.type === 'FeatureCollection') {\r\n\t\treturn geojson;\r\n\t}\r\n\r\n\treturn {\r\n\t\ttype: 'Feature',\r\n\t\tproperties: {},\r\n\t\tgeometry: geojson\r\n\t};\r\n}\r\n\r\nvar PointToGeoJSON = {\r\n\ttoGeoJSON: function (precision) {\r\n\t\treturn getFeature(this, {\r\n\t\t\ttype: 'Point',\r\n\t\t\tcoordinates: latLngToCoords(this.getLatLng(), precision)\r\n\t\t});\r\n\t}\r\n};\r\n\r\n// @namespace Marker\r\n// @section Other methods\r\n// @method toGeoJSON(precision?: Number|false): Object\r\n// Coordinates values are rounded with [`formatNum`](#util-formatnum) function with given `precision`.\r\n// Returns a [`GeoJSON`](https://en.wikipedia.org/wiki/GeoJSON) representation of the marker (as a GeoJSON `Point` Feature).\r\nMarker.include(PointToGeoJSON);\r\n\r\n// @namespace CircleMarker\r\n// @method toGeoJSON(precision?: Number|false): Object\r\n// Coordinates values are rounded with [`formatNum`](#util-formatnum) function with given `precision`.\r\n// Returns a [`GeoJSON`](https://en.wikipedia.org/wiki/GeoJSON) representation of the circle marker (as a GeoJSON `Point` Feature).\r\nCircle.include(PointToGeoJSON);\r\nCircleMarker.include(PointToGeoJSON);\r\n\r\n\r\n// @namespace Polyline\r\n// @method toGeoJSON(precision?: Number|false): Object\r\n// Coordinates values are rounded with [`formatNum`](#util-formatnum) function with given `precision`.\r\n// Returns a [`GeoJSON`](https://en.wikipedia.org/wiki/GeoJSON) representation of the polyline (as a GeoJSON `LineString` or `MultiLineString` Feature).\r\nPolyline.include({\r\n\ttoGeoJSON: function (precision) {\r\n\t\tvar multi = !isFlat(this._latlngs);\r\n\r\n\t\tvar coords = latLngsToCoords(this._latlngs, multi ? 1 : 0, false, precision);\r\n\r\n\t\treturn getFeature(this, {\r\n\t\t\ttype: (multi ? 'Multi' : '') + 'LineString',\r\n\t\t\tcoordinates: coords\r\n\t\t});\r\n\t}\r\n});\r\n\r\n// @namespace Polygon\r\n// @method toGeoJSON(precision?: Number|false): Object\r\n// Coordinates values are rounded with [`formatNum`](#util-formatnum) function with given `precision`.\r\n// Returns a [`GeoJSON`](https://en.wikipedia.org/wiki/GeoJSON) representation of the polygon (as a GeoJSON `Polygon` or `MultiPolygon` Feature).\r\nPolygon.include({\r\n\ttoGeoJSON: function (precision) {\r\n\t\tvar holes = !isFlat(this._latlngs),\r\n\t\t multi = holes && !isFlat(this._latlngs[0]);\r\n\r\n\t\tvar coords = latLngsToCoords(this._latlngs, multi ? 2 : holes ? 1 : 0, true, precision);\r\n\r\n\t\tif (!holes) {\r\n\t\t\tcoords = [coords];\r\n\t\t}\r\n\r\n\t\treturn getFeature(this, {\r\n\t\t\ttype: (multi ? 'Multi' : '') + 'Polygon',\r\n\t\t\tcoordinates: coords\r\n\t\t});\r\n\t}\r\n});\r\n\r\n\r\n// @namespace LayerGroup\r\nLayerGroup.include({\r\n\ttoMultiPoint: function (precision) {\r\n\t\tvar coords = [];\r\n\r\n\t\tthis.eachLayer(function (layer) {\r\n\t\t\tcoords.push(layer.toGeoJSON(precision).geometry.coordinates);\r\n\t\t});\r\n\r\n\t\treturn getFeature(this, {\r\n\t\t\ttype: 'MultiPoint',\r\n\t\t\tcoordinates: coords\r\n\t\t});\r\n\t},\r\n\r\n\t// @method toGeoJSON(precision?: Number|false): Object\r\n\t// Coordinates values are rounded with [`formatNum`](#util-formatnum) function with given `precision`.\r\n\t// Returns a [`GeoJSON`](https://en.wikipedia.org/wiki/GeoJSON) representation of the layer group (as a GeoJSON `FeatureCollection`, `GeometryCollection`, or `MultiPoint`).\r\n\ttoGeoJSON: function (precision) {\r\n\r\n\t\tvar type = this.feature && this.feature.geometry && this.feature.geometry.type;\r\n\r\n\t\tif (type === 'MultiPoint') {\r\n\t\t\treturn this.toMultiPoint(precision);\r\n\t\t}\r\n\r\n\t\tvar isGeometryCollection = type === 'GeometryCollection',\r\n\t\t jsons = [];\r\n\r\n\t\tthis.eachLayer(function (layer) {\r\n\t\t\tif (layer.toGeoJSON) {\r\n\t\t\t\tvar json = layer.toGeoJSON(precision);\r\n\t\t\t\tif (isGeometryCollection) {\r\n\t\t\t\t\tjsons.push(json.geometry);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar feature = asFeature(json);\r\n\t\t\t\t\t// Squash nested feature collections\r\n\t\t\t\t\tif (feature.type === 'FeatureCollection') {\r\n\t\t\t\t\t\tjsons.push.apply(jsons, feature.features);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tjsons.push(feature);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif (isGeometryCollection) {\r\n\t\t\treturn getFeature(this, {\r\n\t\t\t\tgeometries: jsons,\r\n\t\t\t\ttype: 'GeometryCollection'\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\ttype: 'FeatureCollection',\r\n\t\t\tfeatures: jsons\r\n\t\t};\r\n\t}\r\n});\r\n\r\n// @namespace GeoJSON\r\n// @factory L.geoJSON(geojson?: Object, options?: GeoJSON options)\r\n// Creates a GeoJSON layer. Optionally accepts an object in\r\n// [GeoJSON format](https://tools.ietf.org/html/rfc7946) to display on the map\r\n// (you can alternatively add it later with `addData` method) and an `options` object.\r\nfunction geoJSON(geojson, options) {\r\n\treturn new GeoJSON(geojson, options);\r\n}\r\n\r\n// Backward compatibility.\r\nvar geoJson = geoJSON;\n\n/*\r\n * @class ImageOverlay\r\n * @aka L.ImageOverlay\r\n * @inherits Interactive layer\r\n *\r\n * Used to load and display a single image over specific bounds of the map. Extends `Layer`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var imageUrl = 'https://maps.lib.utexas.edu/maps/historical/newark_nj_1922.jpg',\r\n * \timageBounds = [[40.712216, -74.22655], [40.773941, -74.12544]];\r\n * L.imageOverlay(imageUrl, imageBounds).addTo(map);\r\n * ```\r\n */\r\n\r\nvar ImageOverlay = Layer.extend({\r\n\r\n\t// @section\r\n\t// @aka ImageOverlay options\r\n\toptions: {\r\n\t\t// @option opacity: Number = 1.0\r\n\t\t// The opacity of the image overlay.\r\n\t\topacity: 1,\r\n\r\n\t\t// @option alt: String = ''\r\n\t\t// Text for the `alt` attribute of the image (useful for accessibility).\r\n\t\talt: '',\r\n\r\n\t\t// @option interactive: Boolean = false\r\n\t\t// If `true`, the image overlay will emit [mouse events](#interactive-layer) when clicked or hovered.\r\n\t\tinteractive: false,\r\n\r\n\t\t// @option crossOrigin: Boolean|String = false\r\n\t\t// Whether the crossOrigin attribute will be added to the image.\r\n\t\t// If a String is provided, the image will have its crossOrigin attribute set to the String provided. This is needed if you want to access image pixel data.\r\n\t\t// Refer to [CORS Settings](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for valid String values.\r\n\t\tcrossOrigin: false,\r\n\r\n\t\t// @option errorOverlayUrl: String = ''\r\n\t\t// URL to the overlay image to show in place of the overlay that failed to load.\r\n\t\terrorOverlayUrl: '',\r\n\r\n\t\t// @option zIndex: Number = 1\r\n\t\t// The explicit [zIndex](https://developer.mozilla.org/docs/Web/CSS/CSS_Positioning/Understanding_z_index) of the overlay layer.\r\n\t\tzIndex: 1,\r\n\r\n\t\t// @option className: String = ''\r\n\t\t// A custom class name to assign to the image. Empty by default.\r\n\t\tclassName: ''\r\n\t},\r\n\r\n\tinitialize: function (url, bounds, options) { // (String, LatLngBounds, Object)\r\n\t\tthis._url = url;\r\n\t\tthis._bounds = toLatLngBounds(bounds);\r\n\r\n\t\tsetOptions(this, options);\r\n\t},\r\n\r\n\tonAdd: function () {\r\n\t\tif (!this._image) {\r\n\t\t\tthis._initImage();\r\n\r\n\t\t\tif (this.options.opacity < 1) {\r\n\t\t\t\tthis._updateOpacity();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (this.options.interactive) {\r\n\t\t\taddClass(this._image, 'leaflet-interactive');\r\n\t\t\tthis.addInteractiveTarget(this._image);\r\n\t\t}\r\n\r\n\t\tthis.getPane().appendChild(this._image);\r\n\t\tthis._reset();\r\n\t},\r\n\r\n\tonRemove: function () {\r\n\t\tremove(this._image);\r\n\t\tif (this.options.interactive) {\r\n\t\t\tthis.removeInteractiveTarget(this._image);\r\n\t\t}\r\n\t},\r\n\r\n\t// @method setOpacity(opacity: Number): this\r\n\t// Sets the opacity of the overlay.\r\n\tsetOpacity: function (opacity) {\r\n\t\tthis.options.opacity = opacity;\r\n\r\n\t\tif (this._image) {\r\n\t\t\tthis._updateOpacity();\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\tsetStyle: function (styleOpts) {\r\n\t\tif (styleOpts.opacity) {\r\n\t\t\tthis.setOpacity(styleOpts.opacity);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method bringToFront(): this\r\n\t// Brings the layer to the top of all overlays.\r\n\tbringToFront: function () {\r\n\t\tif (this._map) {\r\n\t\t\ttoFront(this._image);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method bringToBack(): this\r\n\t// Brings the layer to the bottom of all overlays.\r\n\tbringToBack: function () {\r\n\t\tif (this._map) {\r\n\t\t\ttoBack(this._image);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method setUrl(url: String): this\r\n\t// Changes the URL of the image.\r\n\tsetUrl: function (url) {\r\n\t\tthis._url = url;\r\n\r\n\t\tif (this._image) {\r\n\t\t\tthis._image.src = url;\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method setBounds(bounds: LatLngBounds): this\r\n\t// Update the bounds that this ImageOverlay covers\r\n\tsetBounds: function (bounds) {\r\n\t\tthis._bounds = toLatLngBounds(bounds);\r\n\r\n\t\tif (this._map) {\r\n\t\t\tthis._reset();\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\tgetEvents: function () {\r\n\t\tvar events = {\r\n\t\t\tzoom: this._reset,\r\n\t\t\tviewreset: this._reset\r\n\t\t};\r\n\r\n\t\tif (this._zoomAnimated) {\r\n\t\t\tevents.zoomanim = this._animateZoom;\r\n\t\t}\r\n\r\n\t\treturn events;\r\n\t},\r\n\r\n\t// @method setZIndex(value: Number): this\r\n\t// Changes the [zIndex](#imageoverlay-zindex) of the image overlay.\r\n\tsetZIndex: function (value) {\r\n\t\tthis.options.zIndex = value;\r\n\t\tthis._updateZIndex();\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method getBounds(): LatLngBounds\r\n\t// Get the bounds that this ImageOverlay covers\r\n\tgetBounds: function () {\r\n\t\treturn this._bounds;\r\n\t},\r\n\r\n\t// @method getElement(): HTMLElement\r\n\t// Returns the instance of [`HTMLImageElement`](https://developer.mozilla.org/docs/Web/API/HTMLImageElement)\r\n\t// used by this overlay.\r\n\tgetElement: function () {\r\n\t\treturn this._image;\r\n\t},\r\n\r\n\t_initImage: function () {\r\n\t\tvar wasElementSupplied = this._url.tagName === 'IMG';\r\n\t\tvar img = this._image = wasElementSupplied ? this._url : create$1('img');\r\n\r\n\t\taddClass(img, 'leaflet-image-layer');\r\n\t\tif (this._zoomAnimated) { addClass(img, 'leaflet-zoom-animated'); }\r\n\t\tif (this.options.className) { addClass(img, this.options.className); }\r\n\r\n\t\timg.onselectstart = falseFn;\r\n\t\timg.onmousemove = falseFn;\r\n\r\n\t\t// @event load: Event\r\n\t\t// Fired when the ImageOverlay layer has loaded its image\r\n\t\timg.onload = bind(this.fire, this, 'load');\r\n\t\timg.onerror = bind(this._overlayOnError, this, 'error');\r\n\r\n\t\tif (this.options.crossOrigin || this.options.crossOrigin === '') {\r\n\t\t\timg.crossOrigin = this.options.crossOrigin === true ? '' : this.options.crossOrigin;\r\n\t\t}\r\n\r\n\t\tif (this.options.zIndex) {\r\n\t\t\tthis._updateZIndex();\r\n\t\t}\r\n\r\n\t\tif (wasElementSupplied) {\r\n\t\t\tthis._url = img.src;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\timg.src = this._url;\r\n\t\timg.alt = this.options.alt;\r\n\t},\r\n\r\n\t_animateZoom: function (e) {\r\n\t\tvar scale = this._map.getZoomScale(e.zoom),\r\n\t\t offset = this._map._latLngBoundsToNewLayerBounds(this._bounds, e.zoom, e.center).min;\r\n\r\n\t\tsetTransform(this._image, offset, scale);\r\n\t},\r\n\r\n\t_reset: function () {\r\n\t\tvar image = this._image,\r\n\t\t bounds = new Bounds(\r\n\t\t this._map.latLngToLayerPoint(this._bounds.getNorthWest()),\r\n\t\t this._map.latLngToLayerPoint(this._bounds.getSouthEast())),\r\n\t\t size = bounds.getSize();\r\n\r\n\t\tsetPosition(image, bounds.min);\r\n\r\n\t\timage.style.width = size.x + 'px';\r\n\t\timage.style.height = size.y + 'px';\r\n\t},\r\n\r\n\t_updateOpacity: function () {\r\n\t\tsetOpacity(this._image, this.options.opacity);\r\n\t},\r\n\r\n\t_updateZIndex: function () {\r\n\t\tif (this._image && this.options.zIndex !== undefined && this.options.zIndex !== null) {\r\n\t\t\tthis._image.style.zIndex = this.options.zIndex;\r\n\t\t}\r\n\t},\r\n\r\n\t_overlayOnError: function () {\r\n\t\t// @event error: Event\r\n\t\t// Fired when the ImageOverlay layer fails to load its image\r\n\t\tthis.fire('error');\r\n\r\n\t\tvar errorUrl = this.options.errorOverlayUrl;\r\n\t\tif (errorUrl && this._url !== errorUrl) {\r\n\t\t\tthis._url = errorUrl;\r\n\t\t\tthis._image.src = errorUrl;\r\n\t\t}\r\n\t},\r\n\r\n\t// @method getCenter(): LatLng\r\n\t// Returns the center of the ImageOverlay.\r\n\tgetCenter: function () {\r\n\t\treturn this._bounds.getCenter();\r\n\t}\r\n});\r\n\r\n// @factory L.imageOverlay(imageUrl: String, bounds: LatLngBounds, options?: ImageOverlay options)\r\n// Instantiates an image overlay object given the URL of the image and the\r\n// geographical bounds it is tied to.\r\nvar imageOverlay = function (url, bounds, options) {\r\n\treturn new ImageOverlay(url, bounds, options);\r\n};\n\n/*\r\n * @class VideoOverlay\r\n * @aka L.VideoOverlay\r\n * @inherits ImageOverlay\r\n *\r\n * Used to load and display a video player over specific bounds of the map. Extends `ImageOverlay`.\r\n *\r\n * A video overlay uses the [`<video>`](https://developer.mozilla.org/docs/Web/HTML/Element/video)\r\n * HTML5 element.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var videoUrl = 'https://www.mapbox.com/bites/00188/patricia_nasa.webm',\r\n * \tvideoBounds = [[ 32, -130], [ 13, -100]];\r\n * L.videoOverlay(videoUrl, videoBounds ).addTo(map);\r\n * ```\r\n */\r\n\r\nvar VideoOverlay = ImageOverlay.extend({\r\n\r\n\t// @section\r\n\t// @aka VideoOverlay options\r\n\toptions: {\r\n\t\t// @option autoplay: Boolean = true\r\n\t\t// Whether the video starts playing automatically when loaded.\r\n\t\t// On some browsers autoplay will only work with `muted: true`\r\n\t\tautoplay: true,\r\n\r\n\t\t// @option loop: Boolean = true\r\n\t\t// Whether the video will loop back to the beginning when played.\r\n\t\tloop: true,\r\n\r\n\t\t// @option keepAspectRatio: Boolean = true\r\n\t\t// Whether the video will save aspect ratio after the projection.\r\n\t\t// Relevant for supported browsers. See [browser compatibility](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit)\r\n\t\tkeepAspectRatio: true,\r\n\r\n\t\t// @option muted: Boolean = false\r\n\t\t// Whether the video starts on mute when loaded.\r\n\t\tmuted: false,\r\n\r\n\t\t// @option playsInline: Boolean = true\r\n\t\t// Mobile browsers will play the video right where it is instead of open it up in fullscreen mode.\r\n\t\tplaysInline: true\r\n\t},\r\n\r\n\t_initImage: function () {\r\n\t\tvar wasElementSupplied = this._url.tagName === 'VIDEO';\r\n\t\tvar vid = this._image = wasElementSupplied ? this._url : create$1('video');\r\n\r\n\t\taddClass(vid, 'leaflet-image-layer');\r\n\t\tif (this._zoomAnimated) { addClass(vid, 'leaflet-zoom-animated'); }\r\n\t\tif (this.options.className) { addClass(vid, this.options.className); }\r\n\r\n\t\tvid.onselectstart = falseFn;\r\n\t\tvid.onmousemove = falseFn;\r\n\r\n\t\t// @event load: Event\r\n\t\t// Fired when the video has finished loading the first frame\r\n\t\tvid.onloadeddata = bind(this.fire, this, 'load');\r\n\r\n\t\tif (wasElementSupplied) {\r\n\t\t\tvar sourceElements = vid.getElementsByTagName('source');\r\n\t\t\tvar sources = [];\r\n\t\t\tfor (var j = 0; j < sourceElements.length; j++) {\r\n\t\t\t\tsources.push(sourceElements[j].src);\r\n\t\t\t}\r\n\r\n\t\t\tthis._url = (sourceElements.length > 0) ? sources : [vid.src];\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (!isArray(this._url)) { this._url = [this._url]; }\r\n\r\n\t\tif (!this.options.keepAspectRatio && Object.prototype.hasOwnProperty.call(vid.style, 'objectFit')) {\r\n\t\t\tvid.style['objectFit'] = 'fill';\r\n\t\t}\r\n\t\tvid.autoplay = !!this.options.autoplay;\r\n\t\tvid.loop = !!this.options.loop;\r\n\t\tvid.muted = !!this.options.muted;\r\n\t\tvid.playsInline = !!this.options.playsInline;\r\n\t\tfor (var i = 0; i < this._url.length; i++) {\r\n\t\t\tvar source = create$1('source');\r\n\t\t\tsource.src = this._url[i];\r\n\t\t\tvid.appendChild(source);\r\n\t\t}\r\n\t}\r\n\r\n\t// @method getElement(): HTMLVideoElement\r\n\t// Returns the instance of [`HTMLVideoElement`](https://developer.mozilla.org/docs/Web/API/HTMLVideoElement)\r\n\t// used by this overlay.\r\n});\r\n\r\n\r\n// @factory L.videoOverlay(video: String|Array|HTMLVideoElement, bounds: LatLngBounds, options?: VideoOverlay options)\r\n// Instantiates an image overlay object given the URL of the video (or array of URLs, or even a video element) and the\r\n// geographical bounds it is tied to.\r\n\r\nfunction videoOverlay(video, bounds, options) {\r\n\treturn new VideoOverlay(video, bounds, options);\r\n}\n\n/*\n * @class SVGOverlay\n * @aka L.SVGOverlay\n * @inherits ImageOverlay\n *\n * Used to load, display and provide DOM access to an SVG file over specific bounds of the map. Extends `ImageOverlay`.\n *\n * An SVG overlay uses the [`<svg>`](https://developer.mozilla.org/docs/Web/SVG/Element/svg) element.\n *\n * @example\n *\n * ```js\n * var svgElement = document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\");\n * svgElement.setAttribute('xmlns', \"http://www.w3.org/2000/svg\");\n * svgElement.setAttribute('viewBox', \"0 0 200 200\");\n * svgElement.innerHTML = '<rect width=\"200\" height=\"200\"/><rect x=\"75\" y=\"23\" width=\"50\" height=\"50\" style=\"fill:red\"/><rect x=\"75\" y=\"123\" width=\"50\" height=\"50\" style=\"fill:#0013ff\"/>';\n * var svgElementBounds = [ [ 32, -130 ], [ 13, -100 ] ];\n * L.svgOverlay(svgElement, svgElementBounds).addTo(map);\n * ```\n */\n\nvar SVGOverlay = ImageOverlay.extend({\n\t_initImage: function () {\n\t\tvar el = this._image = this._url;\n\n\t\taddClass(el, 'leaflet-image-layer');\n\t\tif (this._zoomAnimated) { addClass(el, 'leaflet-zoom-animated'); }\n\t\tif (this.options.className) { addClass(el, this.options.className); }\n\n\t\tel.onselectstart = falseFn;\n\t\tel.onmousemove = falseFn;\n\t}\n\n\t// @method getElement(): SVGElement\n\t// Returns the instance of [`SVGElement`](https://developer.mozilla.org/docs/Web/API/SVGElement)\n\t// used by this overlay.\n});\n\n\n// @factory L.svgOverlay(svg: String|SVGElement, bounds: LatLngBounds, options?: SVGOverlay options)\n// Instantiates an image overlay object given an SVG element and the geographical bounds it is tied to.\n// A viewBox attribute is required on the SVG element to zoom in and out properly.\n\nfunction svgOverlay(el, bounds, options) {\n\treturn new SVGOverlay(el, bounds, options);\n}\n\n/*\r\n * @class DivOverlay\r\n * @inherits Interactive layer\r\n * @aka L.DivOverlay\r\n * Base model for L.Popup and L.Tooltip. Inherit from it for custom overlays like plugins.\r\n */\r\n\r\n// @namespace DivOverlay\r\nvar DivOverlay = Layer.extend({\r\n\r\n\t// @section\r\n\t// @aka DivOverlay options\r\n\toptions: {\r\n\t\t// @option interactive: Boolean = false\r\n\t\t// If true, the popup/tooltip will listen to the mouse events.\r\n\t\tinteractive: false,\r\n\r\n\t\t// @option offset: Point = Point(0, 0)\r\n\t\t// The offset of the overlay position.\r\n\t\toffset: [0, 0],\r\n\r\n\t\t// @option className: String = ''\r\n\t\t// A custom CSS class name to assign to the overlay.\r\n\t\tclassName: '',\r\n\r\n\t\t// @option pane: String = undefined\r\n\t\t// `Map pane` where the overlay will be added.\r\n\t\tpane: undefined,\r\n\r\n\t\t// @option content: String|HTMLElement|Function = ''\r\n\t\t// Sets the HTML content of the overlay while initializing. If a function is passed the source layer will be\r\n\t\t// passed to the function. The function should return a `String` or `HTMLElement` to be used in the overlay.\r\n\t\tcontent: ''\r\n\t},\r\n\r\n\tinitialize: function (options, source) {\r\n\t\tif (options && (options instanceof L.LatLng || isArray(options))) {\r\n\t\t\tthis._latlng = toLatLng(options);\r\n\t\t\tsetOptions(this, source);\r\n\t\t} else {\r\n\t\t\tsetOptions(this, options);\r\n\t\t\tthis._source = source;\r\n\t\t}\r\n\t\tif (this.options.content) {\r\n\t\t\tthis._content = this.options.content;\r\n\t\t}\r\n\t},\r\n\r\n\t// @method openOn(map: Map): this\r\n\t// Adds the overlay to the map.\r\n\t// Alternative to `map.openPopup(popup)`/`.openTooltip(tooltip)`.\r\n\topenOn: function (map) {\r\n\t\tmap = arguments.length ? map : this._source._map; // experimental, not the part of public api\r\n\t\tif (!map.hasLayer(this)) {\r\n\t\t\tmap.addLayer(this);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method close(): this\r\n\t// Closes the overlay.\r\n\t// Alternative to `map.closePopup(popup)`/`.closeTooltip(tooltip)`\r\n\t// and `layer.closePopup()`/`.closeTooltip()`.\r\n\tclose: function () {\r\n\t\tif (this._map) {\r\n\t\t\tthis._map.removeLayer(this);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method toggle(layer?: Layer): this\r\n\t// Opens or closes the overlay bound to layer depending on its current state.\r\n\t// Argument may be omitted only for overlay bound to layer.\r\n\t// Alternative to `layer.togglePopup()`/`.toggleTooltip()`.\r\n\ttoggle: function (layer) {\r\n\t\tif (this._map) {\r\n\t\t\tthis.close();\r\n\t\t} else {\r\n\t\t\tif (arguments.length) {\r\n\t\t\t\tthis._source = layer;\r\n\t\t\t} else {\r\n\t\t\t\tlayer = this._source;\r\n\t\t\t}\r\n\t\t\tthis._prepareOpen();\r\n\r\n\t\t\t// open the overlay on the map\r\n\t\t\tthis.openOn(layer._map);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\t\tthis._zoomAnimated = map._zoomAnimated;\r\n\r\n\t\tif (!this._container) {\r\n\t\t\tthis._initLayout();\r\n\t\t}\r\n\r\n\t\tif (map._fadeAnimated) {\r\n\t\t\tsetOpacity(this._container, 0);\r\n\t\t}\r\n\r\n\t\tclearTimeout(this._removeTimeout);\r\n\t\tthis.getPane().appendChild(this._container);\r\n\t\tthis.update();\r\n\r\n\t\tif (map._fadeAnimated) {\r\n\t\t\tsetOpacity(this._container, 1);\r\n\t\t}\r\n\r\n\t\tthis.bringToFront();\r\n\r\n\t\tif (this.options.interactive) {\r\n\t\t\taddClass(this._container, 'leaflet-interactive');\r\n\t\t\tthis.addInteractiveTarget(this._container);\r\n\t\t}\r\n\t},\r\n\r\n\tonRemove: function (map) {\r\n\t\tif (map._fadeAnimated) {\r\n\t\t\tsetOpacity(this._container, 0);\r\n\t\t\tthis._removeTimeout = setTimeout(bind(remove, undefined, this._container), 200);\r\n\t\t} else {\r\n\t\t\tremove(this._container);\r\n\t\t}\r\n\r\n\t\tif (this.options.interactive) {\r\n\t\t\tremoveClass(this._container, 'leaflet-interactive');\r\n\t\t\tthis.removeInteractiveTarget(this._container);\r\n\t\t}\r\n\t},\r\n\r\n\t// @namespace DivOverlay\r\n\t// @method getLatLng: LatLng\r\n\t// Returns the geographical point of the overlay.\r\n\tgetLatLng: function () {\r\n\t\treturn this._latlng;\r\n\t},\r\n\r\n\t// @method setLatLng(latlng: LatLng): this\r\n\t// Sets the geographical point where the overlay will open.\r\n\tsetLatLng: function (latlng) {\r\n\t\tthis._latlng = toLatLng(latlng);\r\n\t\tif (this._map) {\r\n\t\t\tthis._updatePosition();\r\n\t\t\tthis._adjustPan();\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method getContent: String|HTMLElement\r\n\t// Returns the content of the overlay.\r\n\tgetContent: function () {\r\n\t\treturn this._content;\r\n\t},\r\n\r\n\t// @method setContent(htmlContent: String|HTMLElement|Function): this\r\n\t// Sets the HTML content of the overlay. If a function is passed the source layer will be passed to the function.\r\n\t// The function should return a `String` or `HTMLElement` to be used in the overlay.\r\n\tsetContent: function (content) {\r\n\t\tthis._content = content;\r\n\t\tthis.update();\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method getElement: String|HTMLElement\r\n\t// Returns the HTML container of the overlay.\r\n\tgetElement: function () {\r\n\t\treturn this._container;\r\n\t},\r\n\r\n\t// @method update: null\r\n\t// Updates the overlay content, layout and position. Useful for updating the overlay after something inside changed, e.g. image loaded.\r\n\tupdate: function () {\r\n\t\tif (!this._map) { return; }\r\n\r\n\t\tthis._container.style.visibility = 'hidden';\r\n\r\n\t\tthis._updateContent();\r\n\t\tthis._updateLayout();\r\n\t\tthis._updatePosition();\r\n\r\n\t\tthis._container.style.visibility = '';\r\n\r\n\t\tthis._adjustPan();\r\n\t},\r\n\r\n\tgetEvents: function () {\r\n\t\tvar events = {\r\n\t\t\tzoom: this._updatePosition,\r\n\t\t\tviewreset: this._updatePosition\r\n\t\t};\r\n\r\n\t\tif (this._zoomAnimated) {\r\n\t\t\tevents.zoomanim = this._animateZoom;\r\n\t\t}\r\n\t\treturn events;\r\n\t},\r\n\r\n\t// @method isOpen: Boolean\r\n\t// Returns `true` when the overlay is visible on the map.\r\n\tisOpen: function () {\r\n\t\treturn !!this._map && this._map.hasLayer(this);\r\n\t},\r\n\r\n\t// @method bringToFront: this\r\n\t// Brings this overlay in front of other overlays (in the same map pane).\r\n\tbringToFront: function () {\r\n\t\tif (this._map) {\r\n\t\t\ttoFront(this._container);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method bringToBack: this\r\n\t// Brings this overlay to the back of other overlays (in the same map pane).\r\n\tbringToBack: function () {\r\n\t\tif (this._map) {\r\n\t\t\ttoBack(this._container);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// prepare bound overlay to open: update latlng pos / content source (for FeatureGroup)\r\n\t_prepareOpen: function (latlng) {\r\n\t\tvar source = this._source;\r\n\t\tif (!source._map) { return false; }\r\n\r\n\t\tif (source instanceof FeatureGroup) {\r\n\t\t\tsource = null;\r\n\t\t\tvar layers = this._source._layers;\r\n\t\t\tfor (var id in layers) {\r\n\t\t\t\tif (layers[id]._map) {\r\n\t\t\t\t\tsource = layers[id];\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!source) { return false; } // Unable to get source layer.\r\n\r\n\t\t\t// set overlay source to this layer\r\n\t\t\tthis._source = source;\r\n\t\t}\r\n\r\n\t\tif (!latlng) {\r\n\t\t\tif (source.getCenter) {\r\n\t\t\t\tlatlng = source.getCenter();\r\n\t\t\t} else if (source.getLatLng) {\r\n\t\t\t\tlatlng = source.getLatLng();\r\n\t\t\t} else if (source.getBounds) {\r\n\t\t\t\tlatlng = source.getBounds().getCenter();\r\n\t\t\t} else {\r\n\t\t\t\tthrow new Error('Unable to get source layer LatLng.');\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.setLatLng(latlng);\r\n\r\n\t\tif (this._map) {\r\n\t\t\t// update the overlay (content, layout, etc...)\r\n\t\t\tthis.update();\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t},\r\n\r\n\t_updateContent: function () {\r\n\t\tif (!this._content) { return; }\r\n\r\n\t\tvar node = this._contentNode;\r\n\t\tvar content = (typeof this._content === 'function') ? this._content(this._source || this) : this._content;\r\n\r\n\t\tif (typeof content === 'string') {\r\n\t\t\tnode.innerHTML = content;\r\n\t\t} else {\r\n\t\t\twhile (node.hasChildNodes()) {\r\n\t\t\t\tnode.removeChild(node.firstChild);\r\n\t\t\t}\r\n\t\t\tnode.appendChild(content);\r\n\t\t}\r\n\r\n\t\t// @namespace DivOverlay\r\n\t\t// @section DivOverlay events\r\n\t\t// @event contentupdate: Event\r\n\t\t// Fired when the content of the overlay is updated\r\n\t\tthis.fire('contentupdate');\r\n\t},\r\n\r\n\t_updatePosition: function () {\r\n\t\tif (!this._map) { return; }\r\n\r\n\t\tvar pos = this._map.latLngToLayerPoint(this._latlng),\r\n\t\t offset = toPoint(this.options.offset),\r\n\t\t anchor = this._getAnchor();\r\n\r\n\t\tif (this._zoomAnimated) {\r\n\t\t\tsetPosition(this._container, pos.add(anchor));\r\n\t\t} else {\r\n\t\t\toffset = offset.add(pos).add(anchor);\r\n\t\t}\r\n\r\n\t\tvar bottom = this._containerBottom = -offset.y,\r\n\t\t left = this._containerLeft = -Math.round(this._containerWidth / 2) + offset.x;\r\n\r\n\t\t// bottom position the overlay in case the height of the overlay changes (images loading etc)\r\n\t\tthis._container.style.bottom = bottom + 'px';\r\n\t\tthis._container.style.left = left + 'px';\r\n\t},\r\n\r\n\t_getAnchor: function () {\r\n\t\treturn [0, 0];\r\n\t}\r\n\r\n});\r\n\r\nMap.include({\r\n\t_initOverlay: function (OverlayClass, content, latlng, options) {\r\n\t\tvar overlay = content;\r\n\t\tif (!(overlay instanceof OverlayClass)) {\r\n\t\t\toverlay = new OverlayClass(options).setContent(content);\r\n\t\t}\r\n\t\tif (latlng) {\r\n\t\t\toverlay.setLatLng(latlng);\r\n\t\t}\r\n\t\treturn overlay;\r\n\t}\r\n});\r\n\r\n\r\nLayer.include({\r\n\t_initOverlay: function (OverlayClass, old, content, options) {\r\n\t\tvar overlay = content;\r\n\t\tif (overlay instanceof OverlayClass) {\r\n\t\t\tsetOptions(overlay, options);\r\n\t\t\toverlay._source = this;\r\n\t\t} else {\r\n\t\t\toverlay = (old && !options) ? old : new OverlayClass(options, this);\r\n\t\t\toverlay.setContent(content);\r\n\t\t}\r\n\t\treturn overlay;\r\n\t}\r\n});\n\n/*\r\n * @class Popup\r\n * @inherits DivOverlay\r\n * @aka L.Popup\r\n * Used to open popups in certain places of the map. Use [Map.openPopup](#map-openpopup) to\r\n * open popups while making sure that only one popup is open at one time\r\n * (recommended for usability), or use [Map.addLayer](#map-addlayer) to open as many as you want.\r\n *\r\n * @example\r\n *\r\n * If you want to just bind a popup to marker click and then open it, it's really easy:\r\n *\r\n * ```js\r\n * marker.bindPopup(popupContent).openPopup();\r\n * ```\r\n * Path overlays like polylines also have a `bindPopup` method.\r\n *\r\n * A popup can be also standalone:\r\n *\r\n * ```js\r\n * var popup = L.popup()\r\n * \t.setLatLng(latlng)\r\n * \t.setContent('<p>Hello world!<br />This is a nice popup.</p>')\r\n * \t.openOn(map);\r\n * ```\r\n * or\r\n * ```js\r\n * var popup = L.popup(latlng, {content: '<p>Hello world!<br />This is a nice popup.</p>')\r\n * \t.openOn(map);\r\n * ```\r\n */\r\n\r\n\r\n// @namespace Popup\r\nvar Popup = DivOverlay.extend({\r\n\r\n\t// @section\r\n\t// @aka Popup options\r\n\toptions: {\r\n\t\t// @option pane: String = 'popupPane'\r\n\t\t// `Map pane` where the popup will be added.\r\n\t\tpane: 'popupPane',\r\n\r\n\t\t// @option offset: Point = Point(0, 7)\r\n\t\t// The offset of the popup position.\r\n\t\toffset: [0, 7],\r\n\r\n\t\t// @option maxWidth: Number = 300\r\n\t\t// Max width of the popup, in pixels.\r\n\t\tmaxWidth: 300,\r\n\r\n\t\t// @option minWidth: Number = 50\r\n\t\t// Min width of the popup, in pixels.\r\n\t\tminWidth: 50,\r\n\r\n\t\t// @option maxHeight: Number = null\r\n\t\t// If set, creates a scrollable container of the given height\r\n\t\t// inside a popup if its content exceeds it.\r\n\t\t// The scrollable container can be styled using the\r\n\t\t// `leaflet-popup-scrolled` CSS class selector.\r\n\t\tmaxHeight: null,\r\n\r\n\t\t// @option autoPan: Boolean = true\r\n\t\t// Set it to `false` if you don't want the map to do panning animation\r\n\t\t// to fit the opened popup.\r\n\t\tautoPan: true,\r\n\r\n\t\t// @option autoPanPaddingTopLeft: Point = null\r\n\t\t// The margin between the popup and the top left corner of the map\r\n\t\t// view after autopanning was performed.\r\n\t\tautoPanPaddingTopLeft: null,\r\n\r\n\t\t// @option autoPanPaddingBottomRight: Point = null\r\n\t\t// The margin between the popup and the bottom right corner of the map\r\n\t\t// view after autopanning was performed.\r\n\t\tautoPanPaddingBottomRight: null,\r\n\r\n\t\t// @option autoPanPadding: Point = Point(5, 5)\r\n\t\t// Equivalent of setting both top left and bottom right autopan padding to the same value.\r\n\t\tautoPanPadding: [5, 5],\r\n\r\n\t\t// @option keepInView: Boolean = false\r\n\t\t// Set it to `true` if you want to prevent users from panning the popup\r\n\t\t// off of the screen while it is open.\r\n\t\tkeepInView: false,\r\n\r\n\t\t// @option closeButton: Boolean = true\r\n\t\t// Controls the presence of a close button in the popup.\r\n\t\tcloseButton: true,\r\n\r\n\t\t// @option autoClose: Boolean = true\r\n\t\t// Set it to `false` if you want to override the default behavior of\r\n\t\t// the popup closing when another popup is opened.\r\n\t\tautoClose: true,\r\n\r\n\t\t// @option closeOnEscapeKey: Boolean = true\r\n\t\t// Set it to `false` if you want to override the default behavior of\r\n\t\t// the ESC key for closing of the popup.\r\n\t\tcloseOnEscapeKey: true,\r\n\r\n\t\t// @option closeOnClick: Boolean = *\r\n\t\t// Set it if you want to override the default behavior of the popup closing when user clicks\r\n\t\t// on the map. Defaults to the map's [`closePopupOnClick`](#map-closepopuponclick) option.\r\n\r\n\t\t// @option className: String = ''\r\n\t\t// A custom CSS class name to assign to the popup.\r\n\t\tclassName: ''\r\n\t},\r\n\r\n\t// @namespace Popup\r\n\t// @method openOn(map: Map): this\r\n\t// Alternative to `map.openPopup(popup)`.\r\n\t// Adds the popup to the map and closes the previous one.\r\n\topenOn: function (map) {\r\n\t\tmap = arguments.length ? map : this._source._map; // experimental, not the part of public api\r\n\r\n\t\tif (!map.hasLayer(this) && map._popup && map._popup.options.autoClose) {\r\n\t\t\tmap.removeLayer(map._popup);\r\n\t\t}\r\n\t\tmap._popup = this;\r\n\r\n\t\treturn DivOverlay.prototype.openOn.call(this, map);\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\t\tDivOverlay.prototype.onAdd.call(this, map);\r\n\r\n\t\t// @namespace Map\r\n\t\t// @section Popup events\r\n\t\t// @event popupopen: PopupEvent\r\n\t\t// Fired when a popup is opened in the map\r\n\t\tmap.fire('popupopen', {popup: this});\r\n\r\n\t\tif (this._source) {\r\n\t\t\t// @namespace Layer\r\n\t\t\t// @section Popup events\r\n\t\t\t// @event popupopen: PopupEvent\r\n\t\t\t// Fired when a popup bound to this layer is opened\r\n\t\t\tthis._source.fire('popupopen', {popup: this}, true);\r\n\t\t\t// For non-path layers, we toggle the popup when clicking\r\n\t\t\t// again the layer, so prevent the map to reopen it.\r\n\t\t\tif (!(this._source instanceof Path)) {\r\n\t\t\t\tthis._source.on('preclick', stopPropagation);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tonRemove: function (map) {\r\n\t\tDivOverlay.prototype.onRemove.call(this, map);\r\n\r\n\t\t// @namespace Map\r\n\t\t// @section Popup events\r\n\t\t// @event popupclose: PopupEvent\r\n\t\t// Fired when a popup in the map is closed\r\n\t\tmap.fire('popupclose', {popup: this});\r\n\r\n\t\tif (this._source) {\r\n\t\t\t// @namespace Layer\r\n\t\t\t// @section Popup events\r\n\t\t\t// @event popupclose: PopupEvent\r\n\t\t\t// Fired when a popup bound to this layer is closed\r\n\t\t\tthis._source.fire('popupclose', {popup: this}, true);\r\n\t\t\tif (!(this._source instanceof Path)) {\r\n\t\t\t\tthis._source.off('preclick', stopPropagation);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tgetEvents: function () {\r\n\t\tvar events = DivOverlay.prototype.getEvents.call(this);\r\n\r\n\t\tif (this.options.closeOnClick !== undefined ? this.options.closeOnClick : this._map.options.closePopupOnClick) {\r\n\t\t\tevents.preclick = this.close;\r\n\t\t}\r\n\r\n\t\tif (this.options.keepInView) {\r\n\t\t\tevents.moveend = this._adjustPan;\r\n\t\t}\r\n\r\n\t\treturn events;\r\n\t},\r\n\r\n\t_initLayout: function () {\r\n\t\tvar prefix = 'leaflet-popup',\r\n\t\t container = this._container = create$1('div',\r\n\t\t\tprefix + ' ' + (this.options.className || '') +\r\n\t\t\t' leaflet-zoom-animated');\r\n\r\n\t\tvar wrapper = this._wrapper = create$1('div', prefix + '-content-wrapper', container);\r\n\t\tthis._contentNode = create$1('div', prefix + '-content', wrapper);\r\n\r\n\t\tdisableClickPropagation(container);\r\n\t\tdisableScrollPropagation(this._contentNode);\r\n\t\ton(container, 'contextmenu', stopPropagation);\r\n\r\n\t\tthis._tipContainer = create$1('div', prefix + '-tip-container', container);\r\n\t\tthis._tip = create$1('div', prefix + '-tip', this._tipContainer);\r\n\r\n\t\tif (this.options.closeButton) {\r\n\t\t\tvar closeButton = this._closeButton = create$1('a', prefix + '-close-button', container);\r\n\t\t\tcloseButton.setAttribute('role', 'button'); // overrides the implicit role=link of <a> elements #7399\r\n\t\t\tcloseButton.setAttribute('aria-label', 'Close popup');\r\n\t\t\tcloseButton.href = '#close';\r\n\t\t\tcloseButton.innerHTML = '<span aria-hidden=\"true\">×</span>';\r\n\r\n\t\t\ton(closeButton, 'click', function (ev) {\r\n\t\t\t\tpreventDefault(ev);\r\n\t\t\t\tthis.close();\r\n\t\t\t}, this);\r\n\t\t}\r\n\t},\r\n\r\n\t_updateLayout: function () {\r\n\t\tvar container = this._contentNode,\r\n\t\t style = container.style;\r\n\r\n\t\tstyle.width = '';\r\n\t\tstyle.whiteSpace = 'nowrap';\r\n\r\n\t\tvar width = container.offsetWidth;\r\n\t\twidth = Math.min(width, this.options.maxWidth);\r\n\t\twidth = Math.max(width, this.options.minWidth);\r\n\r\n\t\tstyle.width = (width + 1) + 'px';\r\n\t\tstyle.whiteSpace = '';\r\n\r\n\t\tstyle.height = '';\r\n\r\n\t\tvar height = container.offsetHeight,\r\n\t\t maxHeight = this.options.maxHeight,\r\n\t\t scrolledClass = 'leaflet-popup-scrolled';\r\n\r\n\t\tif (maxHeight && height > maxHeight) {\r\n\t\t\tstyle.height = maxHeight + 'px';\r\n\t\t\taddClass(container, scrolledClass);\r\n\t\t} else {\r\n\t\t\tremoveClass(container, scrolledClass);\r\n\t\t}\r\n\r\n\t\tthis._containerWidth = this._container.offsetWidth;\r\n\t},\r\n\r\n\t_animateZoom: function (e) {\r\n\t\tvar pos = this._map._latLngToNewLayerPoint(this._latlng, e.zoom, e.center),\r\n\t\t anchor = this._getAnchor();\r\n\t\tsetPosition(this._container, pos.add(anchor));\r\n\t},\r\n\r\n\t_adjustPan: function (e) {\r\n\t\tif (!this.options.autoPan) { return; }\r\n\t\tif (this._map._panAnim) { this._map._panAnim.stop(); }\r\n\r\n\t\tvar map = this._map,\r\n\t\t marginBottom = parseInt(getStyle(this._container, 'marginBottom'), 10) || 0,\r\n\t\t containerHeight = this._container.offsetHeight + marginBottom,\r\n\t\t containerWidth = this._containerWidth,\r\n\t\t layerPos = new Point(this._containerLeft, -containerHeight - this._containerBottom);\r\n\r\n\t\tlayerPos._add(getPosition(this._container));\r\n\r\n\t\tvar containerPos = map.layerPointToContainerPoint(layerPos),\r\n\t\t padding = toPoint(this.options.autoPanPadding),\r\n\t\t paddingTL = toPoint(this.options.autoPanPaddingTopLeft || padding),\r\n\t\t paddingBR = toPoint(this.options.autoPanPaddingBottomRight || padding),\r\n\t\t size = map.getSize(),\r\n\t\t dx = 0,\r\n\t\t dy = 0;\r\n\r\n\t\tif (containerPos.x + containerWidth + paddingBR.x > size.x) { // right\r\n\t\t\tdx = containerPos.x + containerWidth - size.x + paddingBR.x;\r\n\t\t}\r\n\t\tif (containerPos.x - dx - paddingTL.x < 0) { // left\r\n\t\t\tdx = containerPos.x - paddingTL.x;\r\n\t\t}\r\n\t\tif (containerPos.y + containerHeight + paddingBR.y > size.y) { // bottom\r\n\t\t\tdy = containerPos.y + containerHeight - size.y + paddingBR.y;\r\n\t\t}\r\n\t\tif (containerPos.y - dy - paddingTL.y < 0) { // top\r\n\t\t\tdy = containerPos.y - paddingTL.y;\r\n\t\t}\r\n\r\n\t\t// @namespace Map\r\n\t\t// @section Popup events\r\n\t\t// @event autopanstart: Event\r\n\t\t// Fired when the map starts autopanning when opening a popup.\r\n\t\tif (dx || dy) {\r\n\t\t\tmap\r\n\t\t\t .fire('autopanstart')\r\n\t\t\t .panBy([dx, dy], {animate: e && e.type === 'moveend'});\r\n\t\t}\r\n\t},\r\n\r\n\t_getAnchor: function () {\r\n\t\t// Where should we anchor the popup on the source layer?\r\n\t\treturn toPoint(this._source && this._source._getPopupAnchor ? this._source._getPopupAnchor() : [0, 0]);\r\n\t}\r\n\r\n});\r\n\r\n// @namespace Popup\r\n// @factory L.popup(options?: Popup options, source?: Layer)\r\n// Instantiates a `Popup` object given an optional `options` object that describes its appearance and location and an optional `source` object that is used to tag the popup with a reference to the Layer to which it refers.\r\n// @alternative\r\n// @factory L.popup(latlng: LatLng, options?: Popup options)\r\n// Instantiates a `Popup` object given `latlng` where the popup will open and an optional `options` object that describes its appearance and location.\r\nvar popup = function (options, source) {\r\n\treturn new Popup(options, source);\r\n};\r\n\r\n\r\n/* @namespace Map\r\n * @section Interaction Options\r\n * @option closePopupOnClick: Boolean = true\r\n * Set it to `false` if you don't want popups to close when user clicks the map.\r\n */\r\nMap.mergeOptions({\r\n\tclosePopupOnClick: true\r\n});\r\n\r\n\r\n// @namespace Map\r\n// @section Methods for Layers and Controls\r\nMap.include({\r\n\t// @method openPopup(popup: Popup): this\r\n\t// Opens the specified popup while closing the previously opened (to make sure only one is opened at one time for usability).\r\n\t// @alternative\r\n\t// @method openPopup(content: String|HTMLElement, latlng: LatLng, options?: Popup options): this\r\n\t// Creates a popup with the specified content and options and opens it in the given point on a map.\r\n\topenPopup: function (popup, latlng, options) {\r\n\t\tthis._initOverlay(Popup, popup, latlng, options)\r\n\t\t .openOn(this);\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method closePopup(popup?: Popup): this\r\n\t// Closes the popup previously opened with [openPopup](#map-openpopup) (or the given one).\r\n\tclosePopup: function (popup) {\r\n\t\tpopup = arguments.length ? popup : this._popup;\r\n\t\tif (popup) {\r\n\t\t\tpopup.close();\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n});\r\n\r\n/*\r\n * @namespace Layer\r\n * @section Popup methods example\r\n *\r\n * All layers share a set of methods convenient for binding popups to it.\r\n *\r\n * ```js\r\n * var layer = L.Polygon(latlngs).bindPopup('Hi There!').addTo(map);\r\n * layer.openPopup();\r\n * layer.closePopup();\r\n * ```\r\n *\r\n * Popups will also be automatically opened when the layer is clicked on and closed when the layer is removed from the map or another popup is opened.\r\n */\r\n\r\n// @section Popup methods\r\nLayer.include({\r\n\r\n\t// @method bindPopup(content: String|HTMLElement|Function|Popup, options?: Popup options): this\r\n\t// Binds a popup to the layer with the passed `content` and sets up the\r\n\t// necessary event listeners. If a `Function` is passed it will receive\r\n\t// the layer as the first argument and should return a `String` or `HTMLElement`.\r\n\tbindPopup: function (content, options) {\r\n\t\tthis._popup = this._initOverlay(Popup, this._popup, content, options);\r\n\t\tif (!this._popupHandlersAdded) {\r\n\t\t\tthis.on({\r\n\t\t\t\tclick: this._openPopup,\r\n\t\t\t\tkeypress: this._onKeyPress,\r\n\t\t\t\tremove: this.closePopup,\r\n\t\t\t\tmove: this._movePopup\r\n\t\t\t});\r\n\t\t\tthis._popupHandlersAdded = true;\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method unbindPopup(): this\r\n\t// Removes the popup previously bound with `bindPopup`.\r\n\tunbindPopup: function () {\r\n\t\tif (this._popup) {\r\n\t\t\tthis.off({\r\n\t\t\t\tclick: this._openPopup,\r\n\t\t\t\tkeypress: this._onKeyPress,\r\n\t\t\t\tremove: this.closePopup,\r\n\t\t\t\tmove: this._movePopup\r\n\t\t\t});\r\n\t\t\tthis._popupHandlersAdded = false;\r\n\t\t\tthis._popup = null;\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method openPopup(latlng?: LatLng): this\r\n\t// Opens the bound popup at the specified `latlng` or at the default popup anchor if no `latlng` is passed.\r\n\topenPopup: function (latlng) {\r\n\t\tif (this._popup && this._popup._prepareOpen(latlng)) {\r\n\t\t\t// open the popup on the map\r\n\t\t\tthis._popup.openOn(this._map);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method closePopup(): this\r\n\t// Closes the popup bound to this layer if it is open.\r\n\tclosePopup: function () {\r\n\t\tif (this._popup) {\r\n\t\t\tthis._popup.close();\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method togglePopup(): this\r\n\t// Opens or closes the popup bound to this layer depending on its current state.\r\n\ttogglePopup: function () {\r\n\t\tif (this._popup) {\r\n\t\t\tthis._popup.toggle(this);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method isPopupOpen(): boolean\r\n\t// Returns `true` if the popup bound to this layer is currently open.\r\n\tisPopupOpen: function () {\r\n\t\treturn (this._popup ? this._popup.isOpen() : false);\r\n\t},\r\n\r\n\t// @method setPopupContent(content: String|HTMLElement|Popup): this\r\n\t// Sets the content of the popup bound to this layer.\r\n\tsetPopupContent: function (content) {\r\n\t\tif (this._popup) {\r\n\t\t\tthis._popup.setContent(content);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method getPopup(): Popup\r\n\t// Returns the popup bound to this layer.\r\n\tgetPopup: function () {\r\n\t\treturn this._popup;\r\n\t},\r\n\r\n\t_openPopup: function (e) {\r\n\t\tif (!this._popup || !this._map) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// prevent map click\r\n\t\tstop(e);\r\n\r\n\t\tvar target = e.layer || e.target;\r\n\t\tif (this._popup._source === target && !(target instanceof Path)) {\r\n\t\t\t// treat it like a marker and figure out\r\n\t\t\t// if we should toggle it open/closed\r\n\t\t\tif (this._map.hasLayer(this._popup)) {\r\n\t\t\t\tthis.closePopup();\r\n\t\t\t} else {\r\n\t\t\t\tthis.openPopup(e.latlng);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._popup._source = target;\r\n\t\tthis.openPopup(e.latlng);\r\n\t},\r\n\r\n\t_movePopup: function (e) {\r\n\t\tthis._popup.setLatLng(e.latlng);\r\n\t},\r\n\r\n\t_onKeyPress: function (e) {\r\n\t\tif (e.originalEvent.keyCode === 13) {\r\n\t\t\tthis._openPopup(e);\r\n\t\t}\r\n\t}\r\n});\n\n/*\n * @class Tooltip\n * @inherits DivOverlay\n * @aka L.Tooltip\n * Used to display small texts on top of map layers.\n *\n * @example\n * If you want to just bind a tooltip to marker:\n *\n * ```js\n * marker.bindTooltip(\"my tooltip text\").openTooltip();\n * ```\n * Path overlays like polylines also have a `bindTooltip` method.\n *\n * A tooltip can be also standalone:\n *\n * ```js\n * var tooltip = L.tooltip()\n * \t.setLatLng(latlng)\n * \t.setContent('Hello world!<br />This is a nice tooltip.')\n * \t.addTo(map);\n * ```\n * or\n * ```js\n * var tooltip = L.tooltip(latlng, {content: 'Hello world!<br />This is a nice tooltip.'})\n * \t.addTo(map);\n * ```\n *\n *\n * Note about tooltip offset. Leaflet takes two options in consideration\n * for computing tooltip offsetting:\n * - the `offset` Tooltip option: it defaults to [0, 0], and it's specific to one tooltip.\n * Add a positive x offset to move the tooltip to the right, and a positive y offset to\n * move it to the bottom. Negatives will move to the left and top.\n * - the `tooltipAnchor` Icon option: this will only be considered for Marker. You\n * should adapt this value if you use a custom icon.\n */\n\n\n// @namespace Tooltip\nvar Tooltip = DivOverlay.extend({\n\n\t// @section\n\t// @aka Tooltip options\n\toptions: {\n\t\t// @option pane: String = 'tooltipPane'\n\t\t// `Map pane` where the tooltip will be added.\n\t\tpane: 'tooltipPane',\n\n\t\t// @option offset: Point = Point(0, 0)\n\t\t// Optional offset of the tooltip position.\n\t\toffset: [0, 0],\n\n\t\t// @option direction: String = 'auto'\n\t\t// Direction where to open the tooltip. Possible values are: `right`, `left`,\n\t\t// `top`, `bottom`, `center`, `auto`.\n\t\t// `auto` will dynamically switch between `right` and `left` according to the tooltip\n\t\t// position on the map.\n\t\tdirection: 'auto',\n\n\t\t// @option permanent: Boolean = false\n\t\t// Whether to open the tooltip permanently or only on mouseover.\n\t\tpermanent: false,\n\n\t\t// @option sticky: Boolean = false\n\t\t// If true, the tooltip will follow the mouse instead of being fixed at the feature center.\n\t\tsticky: false,\n\n\t\t// @option opacity: Number = 0.9\n\t\t// Tooltip container opacity.\n\t\topacity: 0.9\n\t},\n\n\tonAdd: function (map) {\n\t\tDivOverlay.prototype.onAdd.call(this, map);\n\t\tthis.setOpacity(this.options.opacity);\n\n\t\t// @namespace Map\n\t\t// @section Tooltip events\n\t\t// @event tooltipopen: TooltipEvent\n\t\t// Fired when a tooltip is opened in the map.\n\t\tmap.fire('tooltipopen', {tooltip: this});\n\n\t\tif (this._source) {\n\t\t\tthis.addEventParent(this._source);\n\n\t\t\t// @namespace Layer\n\t\t\t// @section Tooltip events\n\t\t\t// @event tooltipopen: TooltipEvent\n\t\t\t// Fired when a tooltip bound to this layer is opened.\n\t\t\tthis._source.fire('tooltipopen', {tooltip: this}, true);\n\t\t}\n\t},\n\n\tonRemove: function (map) {\n\t\tDivOverlay.prototype.onRemove.call(this, map);\n\n\t\t// @namespace Map\n\t\t// @section Tooltip events\n\t\t// @event tooltipclose: TooltipEvent\n\t\t// Fired when a tooltip in the map is closed.\n\t\tmap.fire('tooltipclose', {tooltip: this});\n\n\t\tif (this._source) {\n\t\t\tthis.removeEventParent(this._source);\n\n\t\t\t// @namespace Layer\n\t\t\t// @section Tooltip events\n\t\t\t// @event tooltipclose: TooltipEvent\n\t\t\t// Fired when a tooltip bound to this layer is closed.\n\t\t\tthis._source.fire('tooltipclose', {tooltip: this}, true);\n\t\t}\n\t},\n\n\tgetEvents: function () {\n\t\tvar events = DivOverlay.prototype.getEvents.call(this);\n\n\t\tif (!this.options.permanent) {\n\t\t\tevents.preclick = this.close;\n\t\t}\n\n\t\treturn events;\n\t},\n\n\t_initLayout: function () {\n\t\tvar prefix = 'leaflet-tooltip',\n\t\t className = prefix + ' ' + (this.options.className || '') + ' leaflet-zoom-' + (this._zoomAnimated ? 'animated' : 'hide');\n\n\t\tthis._contentNode = this._container = create$1('div', className);\n\n\t\tthis._container.setAttribute('role', 'tooltip');\n\t\tthis._container.setAttribute('id', 'leaflet-tooltip-' + stamp(this));\n\t},\n\n\t_updateLayout: function () {},\n\n\t_adjustPan: function () {},\n\n\t_setPosition: function (pos) {\n\t\tvar subX, subY,\n\t\t map = this._map,\n\t\t container = this._container,\n\t\t centerPoint = map.latLngToContainerPoint(map.getCenter()),\n\t\t tooltipPoint = map.layerPointToContainerPoint(pos),\n\t\t direction = this.options.direction,\n\t\t tooltipWidth = container.offsetWidth,\n\t\t tooltipHeight = container.offsetHeight,\n\t\t offset = toPoint(this.options.offset),\n\t\t anchor = this._getAnchor();\n\n\t\tif (direction === 'top') {\n\t\t\tsubX = tooltipWidth / 2;\n\t\t\tsubY = tooltipHeight;\n\t\t} else if (direction === 'bottom') {\n\t\t\tsubX = tooltipWidth / 2;\n\t\t\tsubY = 0;\n\t\t} else if (direction === 'center') {\n\t\t\tsubX = tooltipWidth / 2;\n\t\t\tsubY = tooltipHeight / 2;\n\t\t} else if (direction === 'right') {\n\t\t\tsubX = 0;\n\t\t\tsubY = tooltipHeight / 2;\n\t\t} else if (direction === 'left') {\n\t\t\tsubX = tooltipWidth;\n\t\t\tsubY = tooltipHeight / 2;\n\t\t} else if (tooltipPoint.x < centerPoint.x) {\n\t\t\tdirection = 'right';\n\t\t\tsubX = 0;\n\t\t\tsubY = tooltipHeight / 2;\n\t\t} else {\n\t\t\tdirection = 'left';\n\t\t\tsubX = tooltipWidth + (offset.x + anchor.x) * 2;\n\t\t\tsubY = tooltipHeight / 2;\n\t\t}\n\n\t\tpos = pos.subtract(toPoint(subX, subY, true)).add(offset).add(anchor);\n\n\t\tremoveClass(container, 'leaflet-tooltip-right');\n\t\tremoveClass(container, 'leaflet-tooltip-left');\n\t\tremoveClass(container, 'leaflet-tooltip-top');\n\t\tremoveClass(container, 'leaflet-tooltip-bottom');\n\t\taddClass(container, 'leaflet-tooltip-' + direction);\n\t\tsetPosition(container, pos);\n\t},\n\n\t_updatePosition: function () {\n\t\tvar pos = this._map.latLngToLayerPoint(this._latlng);\n\t\tthis._setPosition(pos);\n\t},\n\n\tsetOpacity: function (opacity) {\n\t\tthis.options.opacity = opacity;\n\n\t\tif (this._container) {\n\t\t\tsetOpacity(this._container, opacity);\n\t\t}\n\t},\n\n\t_animateZoom: function (e) {\n\t\tvar pos = this._map._latLngToNewLayerPoint(this._latlng, e.zoom, e.center);\n\t\tthis._setPosition(pos);\n\t},\n\n\t_getAnchor: function () {\n\t\t// Where should we anchor the tooltip on the source layer?\n\t\treturn toPoint(this._source && this._source._getTooltipAnchor && !this.options.sticky ? this._source._getTooltipAnchor() : [0, 0]);\n\t}\n\n});\n\n// @namespace Tooltip\n// @factory L.tooltip(options?: Tooltip options, source?: Layer)\n// Instantiates a `Tooltip` object given an optional `options` object that describes its appearance and location and an optional `source` object that is used to tag the tooltip with a reference to the Layer to which it refers.\n// @alternative\n// @factory L.tooltip(latlng: LatLng, options?: Tooltip options)\n// Instantiates a `Tooltip` object given `latlng` where the tooltip will open and an optional `options` object that describes its appearance and location.\nvar tooltip = function (options, source) {\n\treturn new Tooltip(options, source);\n};\n\n// @namespace Map\n// @section Methods for Layers and Controls\nMap.include({\n\n\t// @method openTooltip(tooltip: Tooltip): this\n\t// Opens the specified tooltip.\n\t// @alternative\n\t// @method openTooltip(content: String|HTMLElement, latlng: LatLng, options?: Tooltip options): this\n\t// Creates a tooltip with the specified content and options and open it.\n\topenTooltip: function (tooltip, latlng, options) {\n\t\tthis._initOverlay(Tooltip, tooltip, latlng, options)\n\t\t .openOn(this);\n\n\t\treturn this;\n\t},\n\n\t// @method closeTooltip(tooltip: Tooltip): this\n\t// Closes the tooltip given as parameter.\n\tcloseTooltip: function (tooltip) {\n\t\ttooltip.close();\n\t\treturn this;\n\t}\n\n});\n\n/*\n * @namespace Layer\n * @section Tooltip methods example\n *\n * All layers share a set of methods convenient for binding tooltips to it.\n *\n * ```js\n * var layer = L.Polygon(latlngs).bindTooltip('Hi There!').addTo(map);\n * layer.openTooltip();\n * layer.closeTooltip();\n * ```\n */\n\n// @section Tooltip methods\nLayer.include({\n\n\t// @method bindTooltip(content: String|HTMLElement|Function|Tooltip, options?: Tooltip options): this\n\t// Binds a tooltip to the layer with the passed `content` and sets up the\n\t// necessary event listeners. If a `Function` is passed it will receive\n\t// the layer as the first argument and should return a `String` or `HTMLElement`.\n\tbindTooltip: function (content, options) {\n\n\t\tif (this._tooltip && this.isTooltipOpen()) {\n\t\t\tthis.unbindTooltip();\n\t\t}\n\n\t\tthis._tooltip = this._initOverlay(Tooltip, this._tooltip, content, options);\n\t\tthis._initTooltipInteractions();\n\n\t\tif (this._tooltip.options.permanent && this._map && this._map.hasLayer(this)) {\n\t\t\tthis.openTooltip();\n\t\t}\n\n\t\treturn this;\n\t},\n\n\t// @method unbindTooltip(): this\n\t// Removes the tooltip previously bound with `bindTooltip`.\n\tunbindTooltip: function () {\n\t\tif (this._tooltip) {\n\t\t\tthis._initTooltipInteractions(true);\n\t\t\tthis.closeTooltip();\n\t\t\tthis._tooltip = null;\n\t\t}\n\t\treturn this;\n\t},\n\n\t_initTooltipInteractions: function (remove) {\n\t\tif (!remove && this._tooltipHandlersAdded) { return; }\n\t\tvar onOff = remove ? 'off' : 'on',\n\t\t events = {\n\t\t\tremove: this.closeTooltip,\n\t\t\tmove: this._moveTooltip\n\t\t };\n\t\tif (!this._tooltip.options.permanent) {\n\t\t\tevents.mouseover = this._openTooltip;\n\t\t\tevents.mouseout = this.closeTooltip;\n\t\t\tevents.click = this._openTooltip;\n\t\t\tif (this._map) {\n\t\t\t\tthis._addFocusListeners();\n\t\t\t} else {\n\t\t\t\tevents.add = this._addFocusListeners;\n\t\t\t}\n\t\t} else {\n\t\t\tevents.add = this._openTooltip;\n\t\t}\n\t\tif (this._tooltip.options.sticky) {\n\t\t\tevents.mousemove = this._moveTooltip;\n\t\t}\n\t\tthis[onOff](events);\n\t\tthis._tooltipHandlersAdded = !remove;\n\t},\n\n\t// @method openTooltip(latlng?: LatLng): this\n\t// Opens the bound tooltip at the specified `latlng` or at the default tooltip anchor if no `latlng` is passed.\n\topenTooltip: function (latlng) {\n\t\tif (this._tooltip && this._tooltip._prepareOpen(latlng)) {\n\t\t\t// open the tooltip on the map\n\t\t\tthis._tooltip.openOn(this._map);\n\n\t\t\tif (this.getElement) {\n\t\t\t\tthis._setAriaDescribedByOnLayer(this);\n\t\t\t} else if (this.eachLayer) {\n\t\t\t\tthis.eachLayer(this._setAriaDescribedByOnLayer, this);\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t},\n\n\t// @method closeTooltip(): this\n\t// Closes the tooltip bound to this layer if it is open.\n\tcloseTooltip: function () {\n\t\tif (this._tooltip) {\n\t\t\treturn this._tooltip.close();\n\t\t}\n\t},\n\n\t// @method toggleTooltip(): this\n\t// Opens or closes the tooltip bound to this layer depending on its current state.\n\ttoggleTooltip: function () {\n\t\tif (this._tooltip) {\n\t\t\tthis._tooltip.toggle(this);\n\t\t}\n\t\treturn this;\n\t},\n\n\t// @method isTooltipOpen(): boolean\n\t// Returns `true` if the tooltip bound to this layer is currently open.\n\tisTooltipOpen: function () {\n\t\treturn this._tooltip.isOpen();\n\t},\n\n\t// @method setTooltipContent(content: String|HTMLElement|Tooltip): this\n\t// Sets the content of the tooltip bound to this layer.\n\tsetTooltipContent: function (content) {\n\t\tif (this._tooltip) {\n\t\t\tthis._tooltip.setContent(content);\n\t\t}\n\t\treturn this;\n\t},\n\n\t// @method getTooltip(): Tooltip\n\t// Returns the tooltip bound to this layer.\n\tgetTooltip: function () {\n\t\treturn this._tooltip;\n\t},\n\n\t_addFocusListeners: function () {\n\t\tif (this.getElement) {\n\t\t\tthis._addFocusListenersOnLayer(this);\n\t\t} else if (this.eachLayer) {\n\t\t\tthis.eachLayer(this._addFocusListenersOnLayer, this);\n\t\t}\n\t},\n\n\t_addFocusListenersOnLayer: function (layer) {\n\t\ton(layer.getElement(), 'focus', function () {\n\t\t\tthis._tooltip._source = layer;\n\t\t\tthis.openTooltip();\n\t\t}, this);\n\t\ton(layer.getElement(), 'blur', this.closeTooltip, this);\n\t},\n\n\t_setAriaDescribedByOnLayer: function (layer) {\n\t\tlayer.getElement().setAttribute('aria-describedby', this._tooltip._container.id);\n\t},\n\n\n\t_openTooltip: function (e) {\n\t\tif (!this._tooltip || !this._map || (this._map.dragging && this._map.dragging.moving())) {\n\t\t\treturn;\n\t\t}\n\t\tthis._tooltip._source = e.layer || e.target;\n\n\t\tthis.openTooltip(this._tooltip.options.sticky ? e.latlng : undefined);\n\t},\n\n\t_moveTooltip: function (e) {\n\t\tvar latlng = e.latlng, containerPoint, layerPoint;\n\t\tif (this._tooltip.options.sticky && e.originalEvent) {\n\t\t\tcontainerPoint = this._map.mouseEventToContainerPoint(e.originalEvent);\n\t\t\tlayerPoint = this._map.containerPointToLayerPoint(containerPoint);\n\t\t\tlatlng = this._map.layerPointToLatLng(layerPoint);\n\t\t}\n\t\tthis._tooltip.setLatLng(latlng);\n\t}\n});\n\n/*\n * @class DivIcon\n * @aka L.DivIcon\n * @inherits Icon\n *\n * Represents a lightweight icon for markers that uses a simple `<div>`\n * element instead of an image. Inherits from `Icon` but ignores the `iconUrl` and shadow options.\n *\n * @example\n * ```js\n * var myIcon = L.divIcon({className: 'my-div-icon'});\n * // you can set .my-div-icon styles in CSS\n *\n * L.marker([50.505, 30.57], {icon: myIcon}).addTo(map);\n * ```\n *\n * By default, it has a 'leaflet-div-icon' CSS class and is styled as a little white square with a shadow.\n */\n\nvar DivIcon = Icon.extend({\n\toptions: {\n\t\t// @section\n\t\t// @aka DivIcon options\n\t\ticonSize: [12, 12], // also can be set through CSS\n\n\t\t// iconAnchor: (Point),\n\t\t// popupAnchor: (Point),\n\n\t\t// @option html: String|HTMLElement = ''\n\t\t// Custom HTML code to put inside the div element, empty by default. Alternatively,\n\t\t// an instance of `HTMLElement`.\n\t\thtml: false,\n\n\t\t// @option bgPos: Point = [0, 0]\n\t\t// Optional relative position of the background, in pixels\n\t\tbgPos: null,\n\n\t\tclassName: 'leaflet-div-icon'\n\t},\n\n\tcreateIcon: function (oldIcon) {\n\t\tvar div = (oldIcon && oldIcon.tagName === 'DIV') ? oldIcon : document.createElement('div'),\n\t\t options = this.options;\n\n\t\tif (options.html instanceof Element) {\n\t\t\tempty(div);\n\t\t\tdiv.appendChild(options.html);\n\t\t} else {\n\t\t\tdiv.innerHTML = options.html !== false ? options.html : '';\n\t\t}\n\n\t\tif (options.bgPos) {\n\t\t\tvar bgPos = toPoint(options.bgPos);\n\t\t\tdiv.style.backgroundPosition = (-bgPos.x) + 'px ' + (-bgPos.y) + 'px';\n\t\t}\n\t\tthis._setIconStyles(div, 'icon');\n\n\t\treturn div;\n\t},\n\n\tcreateShadow: function () {\n\t\treturn null;\n\t}\n});\n\n// @factory L.divIcon(options: DivIcon options)\n// Creates a `DivIcon` instance with the given options.\nfunction divIcon(options) {\n\treturn new DivIcon(options);\n}\n\nIcon.Default = IconDefault;\n\n/*\n * @class GridLayer\n * @inherits Layer\n * @aka L.GridLayer\n *\n * Generic class for handling a tiled grid of HTML elements. This is the base class for all tile layers and replaces `TileLayer.Canvas`.\n * GridLayer can be extended to create a tiled grid of HTML elements like `<canvas>`, `<img>` or `<div>`. GridLayer will handle creating and animating these DOM elements for you.\n *\n *\n * @section Synchronous usage\n * @example\n *\n * To create a custom layer, extend GridLayer and implement the `createTile()` method, which will be passed a `Point` object with the `x`, `y`, and `z` (zoom level) coordinates to draw your tile.\n *\n * ```js\n * var CanvasLayer = L.GridLayer.extend({\n * createTile: function(coords){\n * // create a <canvas> element for drawing\n * var tile = L.DomUtil.create('canvas', 'leaflet-tile');\n *\n * // setup tile width and height according to the options\n * var size = this.getTileSize();\n * tile.width = size.x;\n * tile.height = size.y;\n *\n * // get a canvas context and draw something on it using coords.x, coords.y and coords.z\n * var ctx = tile.getContext('2d');\n *\n * // return the tile so it can be rendered on screen\n * return tile;\n * }\n * });\n * ```\n *\n * @section Asynchronous usage\n * @example\n *\n * Tile creation can also be asynchronous, this is useful when using a third-party drawing library. Once the tile is finished drawing it can be passed to the `done()` callback.\n *\n * ```js\n * var CanvasLayer = L.GridLayer.extend({\n * createTile: function(coords, done){\n * var error;\n *\n * // create a <canvas> element for drawing\n * var tile = L.DomUtil.create('canvas', 'leaflet-tile');\n *\n * // setup tile width and height according to the options\n * var size = this.getTileSize();\n * tile.width = size.x;\n * tile.height = size.y;\n *\n * // draw something asynchronously and pass the tile to the done() callback\n * setTimeout(function() {\n * done(error, tile);\n * }, 1000);\n *\n * return tile;\n * }\n * });\n * ```\n *\n * @section\n */\n\n\nvar GridLayer = Layer.extend({\n\n\t// @section\n\t// @aka GridLayer options\n\toptions: {\n\t\t// @option tileSize: Number|Point = 256\n\t\t// Width and height of tiles in the grid. Use a number if width and height are equal, or `L.point(width, height)` otherwise.\n\t\ttileSize: 256,\n\n\t\t// @option opacity: Number = 1.0\n\t\t// Opacity of the tiles. Can be used in the `createTile()` function.\n\t\topacity: 1,\n\n\t\t// @option updateWhenIdle: Boolean = (depends)\n\t\t// Load new tiles only when panning ends.\n\t\t// `true` by default on mobile browsers, in order to avoid too many requests and keep smooth navigation.\n\t\t// `false` otherwise in order to display new tiles _during_ panning, since it is easy to pan outside the\n\t\t// [`keepBuffer`](#gridlayer-keepbuffer) option in desktop browsers.\n\t\tupdateWhenIdle: Browser.mobile,\n\n\t\t// @option updateWhenZooming: Boolean = true\n\t\t// By default, a smooth zoom animation (during a [touch zoom](#map-touchzoom) or a [`flyTo()`](#map-flyto)) will update grid layers every integer zoom level. Setting this option to `false` will update the grid layer only when the smooth animation ends.\n\t\tupdateWhenZooming: true,\n\n\t\t// @option updateInterval: Number = 200\n\t\t// Tiles will not update more than once every `updateInterval` milliseconds when panning.\n\t\tupdateInterval: 200,\n\n\t\t// @option zIndex: Number = 1\n\t\t// The explicit zIndex of the tile layer.\n\t\tzIndex: 1,\n\n\t\t// @option bounds: LatLngBounds = undefined\n\t\t// If set, tiles will only be loaded inside the set `LatLngBounds`.\n\t\tbounds: null,\n\n\t\t// @option minZoom: Number = 0\n\t\t// The minimum zoom level down to which this layer will be displayed (inclusive).\n\t\tminZoom: 0,\n\n\t\t// @option maxZoom: Number = undefined\n\t\t// The maximum zoom level up to which this layer will be displayed (inclusive).\n\t\tmaxZoom: undefined,\n\n\t\t// @option maxNativeZoom: Number = undefined\n\t\t// Maximum zoom number the tile source has available. If it is specified,\n\t\t// the tiles on all zoom levels higher than `maxNativeZoom` will be loaded\n\t\t// from `maxNativeZoom` level and auto-scaled.\n\t\tmaxNativeZoom: undefined,\n\n\t\t// @option minNativeZoom: Number = undefined\n\t\t// Minimum zoom number the tile source has available. If it is specified,\n\t\t// the tiles on all zoom levels lower than `minNativeZoom` will be loaded\n\t\t// from `minNativeZoom` level and auto-scaled.\n\t\tminNativeZoom: undefined,\n\n\t\t// @option noWrap: Boolean = false\n\t\t// Whether the layer is wrapped around the antimeridian. If `true`, the\n\t\t// GridLayer will only be displayed once at low zoom levels. Has no\n\t\t// effect when the [map CRS](#map-crs) doesn't wrap around. Can be used\n\t\t// in combination with [`bounds`](#gridlayer-bounds) to prevent requesting\n\t\t// tiles outside the CRS limits.\n\t\tnoWrap: false,\n\n\t\t// @option pane: String = 'tilePane'\n\t\t// `Map pane` where the grid layer will be added.\n\t\tpane: 'tilePane',\n\n\t\t// @option className: String = ''\n\t\t// A custom class name to assign to the tile layer. Empty by default.\n\t\tclassName: '',\n\n\t\t// @option keepBuffer: Number = 2\n\t\t// When panning the map, keep this many rows and columns of tiles before unloading them.\n\t\tkeepBuffer: 2\n\t},\n\n\tinitialize: function (options) {\n\t\tsetOptions(this, options);\n\t},\n\n\tonAdd: function () {\n\t\tthis._initContainer();\n\n\t\tthis._levels = {};\n\t\tthis._tiles = {};\n\n\t\tthis._resetView(); // implicit _update() call\n\t},\n\n\tbeforeAdd: function (map) {\n\t\tmap._addZoomLimit(this);\n\t},\n\n\tonRemove: function (map) {\n\t\tthis._removeAllTiles();\n\t\tremove(this._container);\n\t\tmap._removeZoomLimit(this);\n\t\tthis._container = null;\n\t\tthis._tileZoom = undefined;\n\t},\n\n\t// @method bringToFront: this\n\t// Brings the tile layer to the top of all tile layers.\n\tbringToFront: function () {\n\t\tif (this._map) {\n\t\t\ttoFront(this._container);\n\t\t\tthis._setAutoZIndex(Math.max);\n\t\t}\n\t\treturn this;\n\t},\n\n\t// @method bringToBack: this\n\t// Brings the tile layer to the bottom of all tile layers.\n\tbringToBack: function () {\n\t\tif (this._map) {\n\t\t\ttoBack(this._container);\n\t\t\tthis._setAutoZIndex(Math.min);\n\t\t}\n\t\treturn this;\n\t},\n\n\t// @method getContainer: HTMLElement\n\t// Returns the HTML element that contains the tiles for this layer.\n\tgetContainer: function () {\n\t\treturn this._container;\n\t},\n\n\t// @method setOpacity(opacity: Number): this\n\t// Changes the [opacity](#gridlayer-opacity) of the grid layer.\n\tsetOpacity: function (opacity) {\n\t\tthis.options.opacity = opacity;\n\t\tthis._updateOpacity();\n\t\treturn this;\n\t},\n\n\t// @method setZIndex(zIndex: Number): this\n\t// Changes the [zIndex](#gridlayer-zindex) of the grid layer.\n\tsetZIndex: function (zIndex) {\n\t\tthis.options.zIndex = zIndex;\n\t\tthis._updateZIndex();\n\n\t\treturn this;\n\t},\n\n\t// @method isLoading: Boolean\n\t// Returns `true` if any tile in the grid layer has not finished loading.\n\tisLoading: function () {\n\t\treturn this._loading;\n\t},\n\n\t// @method redraw: this\n\t// Causes the layer to clear all the tiles and request them again.\n\tredraw: function () {\n\t\tif (this._map) {\n\t\t\tthis._removeAllTiles();\n\t\t\tvar tileZoom = this._clampZoom(this._map.getZoom());\n\t\t\tif (tileZoom !== this._tileZoom) {\n\t\t\t\tthis._tileZoom = tileZoom;\n\t\t\t\tthis._updateLevels();\n\t\t\t}\n\t\t\tthis._update();\n\t\t}\n\t\treturn this;\n\t},\n\n\tgetEvents: function () {\n\t\tvar events = {\n\t\t\tviewprereset: this._invalidateAll,\n\t\t\tviewreset: this._resetView,\n\t\t\tzoom: this._resetView,\n\t\t\tmoveend: this._onMoveEnd\n\t\t};\n\n\t\tif (!this.options.updateWhenIdle) {\n\t\t\t// update tiles on move, but not more often than once per given interval\n\t\t\tif (!this._onMove) {\n\t\t\t\tthis._onMove = throttle(this._onMoveEnd, this.options.updateInterval, this);\n\t\t\t}\n\n\t\t\tevents.move = this._onMove;\n\t\t}\n\n\t\tif (this._zoomAnimated) {\n\t\t\tevents.zoomanim = this._animateZoom;\n\t\t}\n\n\t\treturn events;\n\t},\n\n\t// @section Extension methods\n\t// Layers extending `GridLayer` shall reimplement the following method.\n\t// @method createTile(coords: Object, done?: Function): HTMLElement\n\t// Called only internally, must be overridden by classes extending `GridLayer`.\n\t// Returns the `HTMLElement` corresponding to the given `coords`. If the `done` callback\n\t// is specified, it must be called when the tile has finished loading and drawing.\n\tcreateTile: function () {\n\t\treturn document.createElement('div');\n\t},\n\n\t// @section\n\t// @method getTileSize: Point\n\t// Normalizes the [tileSize option](#gridlayer-tilesize) into a point. Used by the `createTile()` method.\n\tgetTileSize: function () {\n\t\tvar s = this.options.tileSize;\n\t\treturn s instanceof Point ? s : new Point(s, s);\n\t},\n\n\t_updateZIndex: function () {\n\t\tif (this._container && this.options.zIndex !== undefined && this.options.zIndex !== null) {\n\t\t\tthis._container.style.zIndex = this.options.zIndex;\n\t\t}\n\t},\n\n\t_setAutoZIndex: function (compare) {\n\t\t// go through all other layers of the same pane, set zIndex to max + 1 (front) or min - 1 (back)\n\n\t\tvar layers = this.getPane().children,\n\t\t edgeZIndex = -compare(-Infinity, Infinity); // -Infinity for max, Infinity for min\n\n\t\tfor (var i = 0, len = layers.length, zIndex; i < len; i++) {\n\n\t\t\tzIndex = layers[i].style.zIndex;\n\n\t\t\tif (layers[i] !== this._container && zIndex) {\n\t\t\t\tedgeZIndex = compare(edgeZIndex, +zIndex);\n\t\t\t}\n\t\t}\n\n\t\tif (isFinite(edgeZIndex)) {\n\t\t\tthis.options.zIndex = edgeZIndex + compare(-1, 1);\n\t\t\tthis._updateZIndex();\n\t\t}\n\t},\n\n\t_updateOpacity: function () {\n\t\tif (!this._map) { return; }\n\n\t\t// IE doesn't inherit filter opacity properly, so we're forced to set it on tiles\n\t\tif (Browser.ielt9) { return; }\n\n\t\tsetOpacity(this._container, this.options.opacity);\n\n\t\tvar now = +new Date(),\n\t\t nextFrame = false,\n\t\t willPrune = false;\n\n\t\tfor (var key in this._tiles) {\n\t\t\tvar tile = this._tiles[key];\n\t\t\tif (!tile.current || !tile.loaded) { continue; }\n\n\t\t\tvar fade = Math.min(1, (now - tile.loaded) / 200);\n\n\t\t\tsetOpacity(tile.el, fade);\n\t\t\tif (fade < 1) {\n\t\t\t\tnextFrame = true;\n\t\t\t} else {\n\t\t\t\tif (tile.active) {\n\t\t\t\t\twillPrune = true;\n\t\t\t\t} else {\n\t\t\t\t\tthis._onOpaqueTile(tile);\n\t\t\t\t}\n\t\t\t\ttile.active = true;\n\t\t\t}\n\t\t}\n\n\t\tif (willPrune && !this._noPrune) { this._pruneTiles(); }\n\n\t\tif (nextFrame) {\n\t\t\tcancelAnimFrame(this._fadeFrame);\n\t\t\tthis._fadeFrame = requestAnimFrame(this._updateOpacity, this);\n\t\t}\n\t},\n\n\t_onOpaqueTile: falseFn,\n\n\t_initContainer: function () {\n\t\tif (this._container) { return; }\n\n\t\tthis._container = create$1('div', 'leaflet-layer ' + (this.options.className || ''));\n\t\tthis._updateZIndex();\n\n\t\tif (this.options.opacity < 1) {\n\t\t\tthis._updateOpacity();\n\t\t}\n\n\t\tthis.getPane().appendChild(this._container);\n\t},\n\n\t_updateLevels: function () {\n\n\t\tvar zoom = this._tileZoom,\n\t\t maxZoom = this.options.maxZoom;\n\n\t\tif (zoom === undefined) { return undefined; }\n\n\t\tfor (var z in this._levels) {\n\t\t\tz = Number(z);\n\t\t\tif (this._levels[z].el.children.length || z === zoom) {\n\t\t\t\tthis._levels[z].el.style.zIndex = maxZoom - Math.abs(zoom - z);\n\t\t\t\tthis._onUpdateLevel(z);\n\t\t\t} else {\n\t\t\t\tremove(this._levels[z].el);\n\t\t\t\tthis._removeTilesAtZoom(z);\n\t\t\t\tthis._onRemoveLevel(z);\n\t\t\t\tdelete this._levels[z];\n\t\t\t}\n\t\t}\n\n\t\tvar level = this._levels[zoom],\n\t\t map = this._map;\n\n\t\tif (!level) {\n\t\t\tlevel = this._levels[zoom] = {};\n\n\t\t\tlevel.el = create$1('div', 'leaflet-tile-container leaflet-zoom-animated', this._container);\n\t\t\tlevel.el.style.zIndex = maxZoom;\n\n\t\t\tlevel.origin = map.project(map.unproject(map.getPixelOrigin()), zoom).round();\n\t\t\tlevel.zoom = zoom;\n\n\t\t\tthis._setZoomTransform(level, map.getCenter(), map.getZoom());\n\n\t\t\t// force the browser to consider the newly added element for transition\n\t\t\tfalseFn(level.el.offsetWidth);\n\n\t\t\tthis._onCreateLevel(level);\n\t\t}\n\n\t\tthis._level = level;\n\n\t\treturn level;\n\t},\n\n\t_onUpdateLevel: falseFn,\n\n\t_onRemoveLevel: falseFn,\n\n\t_onCreateLevel: falseFn,\n\n\t_pruneTiles: function () {\n\t\tif (!this._map) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar key, tile;\n\n\t\tvar zoom = this._map.getZoom();\n\t\tif (zoom > this.options.maxZoom ||\n\t\t\tzoom < this.options.minZoom) {\n\t\t\tthis._removeAllTiles();\n\t\t\treturn;\n\t\t}\n\n\t\tfor (key in this._tiles) {\n\t\t\ttile = this._tiles[key];\n\t\t\ttile.retain = tile.current;\n\t\t}\n\n\t\tfor (key in this._tiles) {\n\t\t\ttile = this._tiles[key];\n\t\t\tif (tile.current && !tile.active) {\n\t\t\t\tvar coords = tile.coords;\n\t\t\t\tif (!this._retainParent(coords.x, coords.y, coords.z, coords.z - 5)) {\n\t\t\t\t\tthis._retainChildren(coords.x, coords.y, coords.z, coords.z + 2);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (key in this._tiles) {\n\t\t\tif (!this._tiles[key].retain) {\n\t\t\t\tthis._removeTile(key);\n\t\t\t}\n\t\t}\n\t},\n\n\t_removeTilesAtZoom: function (zoom) {\n\t\tfor (var key in this._tiles) {\n\t\t\tif (this._tiles[key].coords.z !== zoom) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis._removeTile(key);\n\t\t}\n\t},\n\n\t_removeAllTiles: function () {\n\t\tfor (var key in this._tiles) {\n\t\t\tthis._removeTile(key);\n\t\t}\n\t},\n\n\t_invalidateAll: function () {\n\t\tfor (var z in this._levels) {\n\t\t\tremove(this._levels[z].el);\n\t\t\tthis._onRemoveLevel(Number(z));\n\t\t\tdelete this._levels[z];\n\t\t}\n\t\tthis._removeAllTiles();\n\n\t\tthis._tileZoom = undefined;\n\t},\n\n\t_retainParent: function (x, y, z, minZoom) {\n\t\tvar x2 = Math.floor(x / 2),\n\t\t y2 = Math.floor(y / 2),\n\t\t z2 = z - 1,\n\t\t coords2 = new Point(+x2, +y2);\n\t\tcoords2.z = +z2;\n\n\t\tvar key = this._tileCoordsToKey(coords2),\n\t\t tile = this._tiles[key];\n\n\t\tif (tile && tile.active) {\n\t\t\ttile.retain = true;\n\t\t\treturn true;\n\n\t\t} else if (tile && tile.loaded) {\n\t\t\ttile.retain = true;\n\t\t}\n\n\t\tif (z2 > minZoom) {\n\t\t\treturn this._retainParent(x2, y2, z2, minZoom);\n\t\t}\n\n\t\treturn false;\n\t},\n\n\t_retainChildren: function (x, y, z, maxZoom) {\n\n\t\tfor (var i = 2 * x; i < 2 * x + 2; i++) {\n\t\t\tfor (var j = 2 * y; j < 2 * y + 2; j++) {\n\n\t\t\t\tvar coords = new Point(i, j);\n\t\t\t\tcoords.z = z + 1;\n\n\t\t\t\tvar key = this._tileCoordsToKey(coords),\n\t\t\t\t tile = this._tiles[key];\n\n\t\t\t\tif (tile && tile.active) {\n\t\t\t\t\ttile.retain = true;\n\t\t\t\t\tcontinue;\n\n\t\t\t\t} else if (tile && tile.loaded) {\n\t\t\t\t\ttile.retain = true;\n\t\t\t\t}\n\n\t\t\t\tif (z + 1 < maxZoom) {\n\t\t\t\t\tthis._retainChildren(i, j, z + 1, maxZoom);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t_resetView: function (e) {\n\t\tvar animating = e && (e.pinch || e.flyTo);\n\t\tthis._setView(this._map.getCenter(), this._map.getZoom(), animating, animating);\n\t},\n\n\t_animateZoom: function (e) {\n\t\tthis._setView(e.center, e.zoom, true, e.noUpdate);\n\t},\n\n\t_clampZoom: function (zoom) {\n\t\tvar options = this.options;\n\n\t\tif (undefined !== options.minNativeZoom && zoom < options.minNativeZoom) {\n\t\t\treturn options.minNativeZoom;\n\t\t}\n\n\t\tif (undefined !== options.maxNativeZoom && options.maxNativeZoom < zoom) {\n\t\t\treturn options.maxNativeZoom;\n\t\t}\n\n\t\treturn zoom;\n\t},\n\n\t_setView: function (center, zoom, noPrune, noUpdate) {\n\t\tvar tileZoom = Math.round(zoom);\n\t\tif ((this.options.maxZoom !== undefined && tileZoom > this.options.maxZoom) ||\n\t\t (this.options.minZoom !== undefined && tileZoom < this.options.minZoom)) {\n\t\t\ttileZoom = undefined;\n\t\t} else {\n\t\t\ttileZoom = this._clampZoom(tileZoom);\n\t\t}\n\n\t\tvar tileZoomChanged = this.options.updateWhenZooming && (tileZoom !== this._tileZoom);\n\n\t\tif (!noUpdate || tileZoomChanged) {\n\n\t\t\tthis._tileZoom = tileZoom;\n\n\t\t\tif (this._abortLoading) {\n\t\t\t\tthis._abortLoading();\n\t\t\t}\n\n\t\t\tthis._updateLevels();\n\t\t\tthis._resetGrid();\n\n\t\t\tif (tileZoom !== undefined) {\n\t\t\t\tthis._update(center);\n\t\t\t}\n\n\t\t\tif (!noPrune) {\n\t\t\t\tthis._pruneTiles();\n\t\t\t}\n\n\t\t\t// Flag to prevent _updateOpacity from pruning tiles during\n\t\t\t// a zoom anim or a pinch gesture\n\t\t\tthis._noPrune = !!noPrune;\n\t\t}\n\n\t\tthis._setZoomTransforms(center, zoom);\n\t},\n\n\t_setZoomTransforms: function (center, zoom) {\n\t\tfor (var i in this._levels) {\n\t\t\tthis._setZoomTransform(this._levels[i], center, zoom);\n\t\t}\n\t},\n\n\t_setZoomTransform: function (level, center, zoom) {\n\t\tvar scale = this._map.getZoomScale(zoom, level.zoom),\n\t\t translate = level.origin.multiplyBy(scale)\n\t\t .subtract(this._map._getNewPixelOrigin(center, zoom)).round();\n\n\t\tif (Browser.any3d) {\n\t\t\tsetTransform(level.el, translate, scale);\n\t\t} else {\n\t\t\tsetPosition(level.el, translate);\n\t\t}\n\t},\n\n\t_resetGrid: function () {\n\t\tvar map = this._map,\n\t\t crs = map.options.crs,\n\t\t tileSize = this._tileSize = this.getTileSize(),\n\t\t tileZoom = this._tileZoom;\n\n\t\tvar bounds = this._map.getPixelWorldBounds(this._tileZoom);\n\t\tif (bounds) {\n\t\t\tthis._globalTileRange = this._pxBoundsToTileRange(bounds);\n\t\t}\n\n\t\tthis._wrapX = crs.wrapLng && !this.options.noWrap && [\n\t\t\tMath.floor(map.project([0, crs.wrapLng[0]], tileZoom).x / tileSize.x),\n\t\t\tMath.ceil(map.project([0, crs.wrapLng[1]], tileZoom).x / tileSize.y)\n\t\t];\n\t\tthis._wrapY = crs.wrapLat && !this.options.noWrap && [\n\t\t\tMath.floor(map.project([crs.wrapLat[0], 0], tileZoom).y / tileSize.x),\n\t\t\tMath.ceil(map.project([crs.wrapLat[1], 0], tileZoom).y / tileSize.y)\n\t\t];\n\t},\n\n\t_onMoveEnd: function () {\n\t\tif (!this._map || this._map._animatingZoom) { return; }\n\n\t\tthis._update();\n\t},\n\n\t_getTiledPixelBounds: function (center) {\n\t\tvar map = this._map,\n\t\t mapZoom = map._animatingZoom ? Math.max(map._animateToZoom, map.getZoom()) : map.getZoom(),\n\t\t scale = map.getZoomScale(mapZoom, this._tileZoom),\n\t\t pixelCenter = map.project(center, this._tileZoom).floor(),\n\t\t halfSize = map.getSize().divideBy(scale * 2);\n\n\t\treturn new Bounds(pixelCenter.subtract(halfSize), pixelCenter.add(halfSize));\n\t},\n\n\t// Private method to load tiles in the grid's active zoom level according to map bounds\n\t_update: function (center) {\n\t\tvar map = this._map;\n\t\tif (!map) { return; }\n\t\tvar zoom = this._clampZoom(map.getZoom());\n\n\t\tif (center === undefined) { center = map.getCenter(); }\n\t\tif (this._tileZoom === undefined) { return; }\t// if out of minzoom/maxzoom\n\n\t\tvar pixelBounds = this._getTiledPixelBounds(center),\n\t\t tileRange = this._pxBoundsToTileRange(pixelBounds),\n\t\t tileCenter = tileRange.getCenter(),\n\t\t queue = [],\n\t\t margin = this.options.keepBuffer,\n\t\t noPruneRange = new Bounds(tileRange.getBottomLeft().subtract([margin, -margin]),\n\t\t tileRange.getTopRight().add([margin, -margin]));\n\n\t\t// Sanity check: panic if the tile range contains Infinity somewhere.\n\t\tif (!(isFinite(tileRange.min.x) &&\n\t\t isFinite(tileRange.min.y) &&\n\t\t isFinite(tileRange.max.x) &&\n\t\t isFinite(tileRange.max.y))) { throw new Error('Attempted to load an infinite number of tiles'); }\n\n\t\tfor (var key in this._tiles) {\n\t\t\tvar c = this._tiles[key].coords;\n\t\t\tif (c.z !== this._tileZoom || !noPruneRange.contains(new Point(c.x, c.y))) {\n\t\t\t\tthis._tiles[key].current = false;\n\t\t\t}\n\t\t}\n\n\t\t// _update just loads more tiles. If the tile zoom level differs too much\n\t\t// from the map's, let _setView reset levels and prune old tiles.\n\t\tif (Math.abs(zoom - this._tileZoom) > 1) { this._setView(center, zoom); return; }\n\n\t\t// create a queue of coordinates to load tiles from\n\t\tfor (var j = tileRange.min.y; j <= tileRange.max.y; j++) {\n\t\t\tfor (var i = tileRange.min.x; i <= tileRange.max.x; i++) {\n\t\t\t\tvar coords = new Point(i, j);\n\t\t\t\tcoords.z = this._tileZoom;\n\n\t\t\t\tif (!this._isValidTile(coords)) { continue; }\n\n\t\t\t\tvar tile = this._tiles[this._tileCoordsToKey(coords)];\n\t\t\t\tif (tile) {\n\t\t\t\t\ttile.current = true;\n\t\t\t\t} else {\n\t\t\t\t\tqueue.push(coords);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort tile queue to load tiles in order of their distance to center\n\t\tqueue.sort(function (a, b) {\n\t\t\treturn a.distanceTo(tileCenter) - b.distanceTo(tileCenter);\n\t\t});\n\n\t\tif (queue.length !== 0) {\n\t\t\t// if it's the first batch of tiles to load\n\t\t\tif (!this._loading) {\n\t\t\t\tthis._loading = true;\n\t\t\t\t// @event loading: Event\n\t\t\t\t// Fired when the grid layer starts loading tiles.\n\t\t\t\tthis.fire('loading');\n\t\t\t}\n\n\t\t\t// create DOM fragment to append tiles in one batch\n\t\t\tvar fragment = document.createDocumentFragment();\n\n\t\t\tfor (i = 0; i < queue.length; i++) {\n\t\t\t\tthis._addTile(queue[i], fragment);\n\t\t\t}\n\n\t\t\tthis._level.el.appendChild(fragment);\n\t\t}\n\t},\n\n\t_isValidTile: function (coords) {\n\t\tvar crs = this._map.options.crs;\n\n\t\tif (!crs.infinite) {\n\t\t\t// don't load tile if it's out of bounds and not wrapped\n\t\t\tvar bounds = this._globalTileRange;\n\t\t\tif ((!crs.wrapLng && (coords.x < bounds.min.x || coords.x > bounds.max.x)) ||\n\t\t\t (!crs.wrapLat && (coords.y < bounds.min.y || coords.y > bounds.max.y))) { return false; }\n\t\t}\n\n\t\tif (!this.options.bounds) { return true; }\n\n\t\t// don't load tile if it doesn't intersect the bounds in options\n\t\tvar tileBounds = this._tileCoordsToBounds(coords);\n\t\treturn toLatLngBounds(this.options.bounds).overlaps(tileBounds);\n\t},\n\n\t_keyToBounds: function (key) {\n\t\treturn this._tileCoordsToBounds(this._keyToTileCoords(key));\n\t},\n\n\t_tileCoordsToNwSe: function (coords) {\n\t\tvar map = this._map,\n\t\t tileSize = this.getTileSize(),\n\t\t nwPoint = coords.scaleBy(tileSize),\n\t\t sePoint = nwPoint.add(tileSize),\n\t\t nw = map.unproject(nwPoint, coords.z),\n\t\t se = map.unproject(sePoint, coords.z);\n\t\treturn [nw, se];\n\t},\n\n\t// converts tile coordinates to its geographical bounds\n\t_tileCoordsToBounds: function (coords) {\n\t\tvar bp = this._tileCoordsToNwSe(coords),\n\t\t bounds = new LatLngBounds(bp[0], bp[1]);\n\n\t\tif (!this.options.noWrap) {\n\t\t\tbounds = this._map.wrapLatLngBounds(bounds);\n\t\t}\n\t\treturn bounds;\n\t},\n\t// converts tile coordinates to key for the tile cache\n\t_tileCoordsToKey: function (coords) {\n\t\treturn coords.x + ':' + coords.y + ':' + coords.z;\n\t},\n\n\t// converts tile cache key to coordinates\n\t_keyToTileCoords: function (key) {\n\t\tvar k = key.split(':'),\n\t\t coords = new Point(+k[0], +k[1]);\n\t\tcoords.z = +k[2];\n\t\treturn coords;\n\t},\n\n\t_removeTile: function (key) {\n\t\tvar tile = this._tiles[key];\n\t\tif (!tile) { return; }\n\n\t\tremove(tile.el);\n\n\t\tdelete this._tiles[key];\n\n\t\t// @event tileunload: TileEvent\n\t\t// Fired when a tile is removed (e.g. when a tile goes off the screen).\n\t\tthis.fire('tileunload', {\n\t\t\ttile: tile.el,\n\t\t\tcoords: this._keyToTileCoords(key)\n\t\t});\n\t},\n\n\t_initTile: function (tile) {\n\t\taddClass(tile, 'leaflet-tile');\n\n\t\tvar tileSize = this.getTileSize();\n\t\ttile.style.width = tileSize.x + 'px';\n\t\ttile.style.height = tileSize.y + 'px';\n\n\t\ttile.onselectstart = falseFn;\n\t\ttile.onmousemove = falseFn;\n\n\t\t// update opacity on tiles in IE7-8 because of filter inheritance problems\n\t\tif (Browser.ielt9 && this.options.opacity < 1) {\n\t\t\tsetOpacity(tile, this.options.opacity);\n\t\t}\n\t},\n\n\t_addTile: function (coords, container) {\n\t\tvar tilePos = this._getTilePos(coords),\n\t\t key = this._tileCoordsToKey(coords);\n\n\t\tvar tile = this.createTile(this._wrapCoords(coords), bind(this._tileReady, this, coords));\n\n\t\tthis._initTile(tile);\n\n\t\t// if createTile is defined with a second argument (\"done\" callback),\n\t\t// we know that tile is async and will be ready later; otherwise\n\t\tif (this.createTile.length < 2) {\n\t\t\t// mark tile as ready, but delay one frame for opacity animation to happen\n\t\t\trequestAnimFrame(bind(this._tileReady, this, coords, null, tile));\n\t\t}\n\n\t\tsetPosition(tile, tilePos);\n\n\t\t// save tile in cache\n\t\tthis._tiles[key] = {\n\t\t\tel: tile,\n\t\t\tcoords: coords,\n\t\t\tcurrent: true\n\t\t};\n\n\t\tcontainer.appendChild(tile);\n\t\t// @event tileloadstart: TileEvent\n\t\t// Fired when a tile is requested and starts loading.\n\t\tthis.fire('tileloadstart', {\n\t\t\ttile: tile,\n\t\t\tcoords: coords\n\t\t});\n\t},\n\n\t_tileReady: function (coords, err, tile) {\n\t\tif (err) {\n\t\t\t// @event tileerror: TileErrorEvent\n\t\t\t// Fired when there is an error loading a tile.\n\t\t\tthis.fire('tileerror', {\n\t\t\t\terror: err,\n\t\t\t\ttile: tile,\n\t\t\t\tcoords: coords\n\t\t\t});\n\t\t}\n\n\t\tvar key = this._tileCoordsToKey(coords);\n\n\t\ttile = this._tiles[key];\n\t\tif (!tile) { return; }\n\n\t\ttile.loaded = +new Date();\n\t\tif (this._map._fadeAnimated) {\n\t\t\tsetOpacity(tile.el, 0);\n\t\t\tcancelAnimFrame(this._fadeFrame);\n\t\t\tthis._fadeFrame = requestAnimFrame(this._updateOpacity, this);\n\t\t} else {\n\t\t\ttile.active = true;\n\t\t\tthis._pruneTiles();\n\t\t}\n\n\t\tif (!err) {\n\t\t\taddClass(tile.el, 'leaflet-tile-loaded');\n\n\t\t\t// @event tileload: TileEvent\n\t\t\t// Fired when a tile loads.\n\t\t\tthis.fire('tileload', {\n\t\t\t\ttile: tile.el,\n\t\t\t\tcoords: coords\n\t\t\t});\n\t\t}\n\n\t\tif (this._noTilesToLoad()) {\n\t\t\tthis._loading = false;\n\t\t\t// @event load: Event\n\t\t\t// Fired when the grid layer loaded all visible tiles.\n\t\t\tthis.fire('load');\n\n\t\t\tif (Browser.ielt9 || !this._map._fadeAnimated) {\n\t\t\t\trequestAnimFrame(this._pruneTiles, this);\n\t\t\t} else {\n\t\t\t\t// Wait a bit more than 0.2 secs (the duration of the tile fade-in)\n\t\t\t\t// to trigger a pruning.\n\t\t\t\tsetTimeout(bind(this._pruneTiles, this), 250);\n\t\t\t}\n\t\t}\n\t},\n\n\t_getTilePos: function (coords) {\n\t\treturn coords.scaleBy(this.getTileSize()).subtract(this._level.origin);\n\t},\n\n\t_wrapCoords: function (coords) {\n\t\tvar newCoords = new Point(\n\t\t\tthis._wrapX ? wrapNum(coords.x, this._wrapX) : coords.x,\n\t\t\tthis._wrapY ? wrapNum(coords.y, this._wrapY) : coords.y);\n\t\tnewCoords.z = coords.z;\n\t\treturn newCoords;\n\t},\n\n\t_pxBoundsToTileRange: function (bounds) {\n\t\tvar tileSize = this.getTileSize();\n\t\treturn new Bounds(\n\t\t\tbounds.min.unscaleBy(tileSize).floor(),\n\t\t\tbounds.max.unscaleBy(tileSize).ceil().subtract([1, 1]));\n\t},\n\n\t_noTilesToLoad: function () {\n\t\tfor (var key in this._tiles) {\n\t\t\tif (!this._tiles[key].loaded) { return false; }\n\t\t}\n\t\treturn true;\n\t}\n});\n\n// @factory L.gridLayer(options?: GridLayer options)\n// Creates a new instance of GridLayer with the supplied options.\nfunction gridLayer(options) {\n\treturn new GridLayer(options);\n}\n\n/*\r\n * @class TileLayer\r\n * @inherits GridLayer\r\n * @aka L.TileLayer\r\n * Used to load and display tile layers on the map. Note that most tile servers require attribution, which you can set under `Layer`. Extends `GridLayer`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png?{foo}', {foo: 'bar', attribution: '© <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> contributors'}).addTo(map);\n * ```\r\n *\r\n * @section URL template\r\n * @example\r\n *\r\n * A string of the following form:\r\n *\r\n * ```\r\n * 'https://{s}.somedomain.com/blabla/{z}/{x}/{y}{r}.png'\r\n * ```\r\n *\r\n * `{s}` means one of the available subdomains (used sequentially to help with browser parallel requests per domain limitation; subdomain values are specified in options; `a`, `b` or `c` by default, can be omitted), `{z}` — zoom level, `{x}` and `{y}` — tile coordinates. `{r}` can be used to add \"@2x\" to the URL to load retina tiles.\r\n *\r\n * You can use custom keys in the template, which will be [evaluated](#util-template) from TileLayer options, like this:\r\n *\r\n * ```\r\n * L.tileLayer('https://{s}.somedomain.com/{foo}/{z}/{x}/{y}.png', {foo: 'bar'});\r\n * ```\r\n */\r\n\r\n\r\nvar TileLayer = GridLayer.extend({\r\n\r\n\t// @section\r\n\t// @aka TileLayer options\r\n\toptions: {\r\n\t\t// @option minZoom: Number = 0\r\n\t\t// The minimum zoom level down to which this layer will be displayed (inclusive).\r\n\t\tminZoom: 0,\r\n\r\n\t\t// @option maxZoom: Number = 18\r\n\t\t// The maximum zoom level up to which this layer will be displayed (inclusive).\r\n\t\tmaxZoom: 18,\r\n\r\n\t\t// @option subdomains: String|String[] = 'abc'\r\n\t\t// Subdomains of the tile service. Can be passed in the form of one string (where each letter is a subdomain name) or an array of strings.\r\n\t\tsubdomains: 'abc',\r\n\r\n\t\t// @option errorTileUrl: String = ''\r\n\t\t// URL to the tile image to show in place of the tile that failed to load.\r\n\t\terrorTileUrl: '',\r\n\r\n\t\t// @option zoomOffset: Number = 0\r\n\t\t// The zoom number used in tile URLs will be offset with this value.\r\n\t\tzoomOffset: 0,\r\n\r\n\t\t// @option tms: Boolean = false\r\n\t\t// If `true`, inverses Y axis numbering for tiles (turn this on for [TMS](https://en.wikipedia.org/wiki/Tile_Map_Service) services).\r\n\t\ttms: false,\r\n\r\n\t\t// @option zoomReverse: Boolean = false\r\n\t\t// If set to true, the zoom number used in tile URLs will be reversed (`maxZoom - zoom` instead of `zoom`)\r\n\t\tzoomReverse: false,\r\n\r\n\t\t// @option detectRetina: Boolean = false\r\n\t\t// If `true` and user is on a retina display, it will request four tiles of half the specified size and a bigger zoom level in place of one to utilize the high resolution.\r\n\t\tdetectRetina: false,\r\n\r\n\t\t// @option crossOrigin: Boolean|String = false\r\n\t\t// Whether the crossOrigin attribute will be added to the tiles.\r\n\t\t// If a String is provided, all tiles will have their crossOrigin attribute set to the String provided. This is needed if you want to access tile pixel data.\r\n\t\t// Refer to [CORS Settings](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for valid String values.\r\n\t\tcrossOrigin: false,\r\n\r\n\t\t// @option referrerPolicy: Boolean|String = false\r\n\t\t// Whether the referrerPolicy attribute will be added to the tiles.\r\n\t\t// If a String is provided, all tiles will have their referrerPolicy attribute set to the String provided.\r\n\t\t// This may be needed if your map's rendering context has a strict default but your tile provider expects a valid referrer\r\n\t\t// (e.g. to validate an API token).\r\n\t\t// Refer to [HTMLImageElement.referrerPolicy](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/referrerPolicy) for valid String values.\r\n\t\treferrerPolicy: false\r\n\t},\r\n\r\n\tinitialize: function (url, options) {\r\n\r\n\t\tthis._url = url;\r\n\r\n\t\toptions = setOptions(this, options);\r\n\r\n\t\t// detecting retina displays, adjusting tileSize and zoom levels\r\n\t\tif (options.detectRetina && Browser.retina && options.maxZoom > 0) {\r\n\r\n\t\t\toptions.tileSize = Math.floor(options.tileSize / 2);\r\n\r\n\t\t\tif (!options.zoomReverse) {\r\n\t\t\t\toptions.zoomOffset++;\r\n\t\t\t\toptions.maxZoom = Math.max(options.minZoom, options.maxZoom - 1);\r\n\t\t\t} else {\r\n\t\t\t\toptions.zoomOffset--;\r\n\t\t\t\toptions.minZoom = Math.min(options.maxZoom, options.minZoom + 1);\r\n\t\t\t}\r\n\r\n\t\t\toptions.minZoom = Math.max(0, options.minZoom);\r\n\t\t} else if (!options.zoomReverse) {\r\n\t\t\t// make sure maxZoom is gte minZoom\r\n\t\t\toptions.maxZoom = Math.max(options.minZoom, options.maxZoom);\r\n\t\t} else {\r\n\t\t\t// make sure minZoom is lte maxZoom\r\n\t\t\toptions.minZoom = Math.min(options.maxZoom, options.minZoom);\r\n\t\t}\r\n\r\n\t\tif (typeof options.subdomains === 'string') {\r\n\t\t\toptions.subdomains = options.subdomains.split('');\r\n\t\t}\r\n\r\n\t\tthis.on('tileunload', this._onTileRemove);\r\n\t},\r\n\r\n\t// @method setUrl(url: String, noRedraw?: Boolean): this\r\n\t// Updates the layer's URL template and redraws it (unless `noRedraw` is set to `true`).\r\n\t// If the URL does not change, the layer will not be redrawn unless\r\n\t// the noRedraw parameter is set to false.\r\n\tsetUrl: function (url, noRedraw) {\r\n\t\tif (this._url === url && noRedraw === undefined) {\r\n\t\t\tnoRedraw = true;\r\n\t\t}\r\n\r\n\t\tthis._url = url;\r\n\r\n\t\tif (!noRedraw) {\r\n\t\t\tthis.redraw();\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method createTile(coords: Object, done?: Function): HTMLElement\r\n\t// Called only internally, overrides GridLayer's [`createTile()`](#gridlayer-createtile)\r\n\t// to return an `<img>` HTML element with the appropriate image URL given `coords`. The `done`\r\n\t// callback is called when the tile has been loaded.\r\n\tcreateTile: function (coords, done) {\r\n\t\tvar tile = document.createElement('img');\r\n\r\n\t\ton(tile, 'load', bind(this._tileOnLoad, this, done, tile));\r\n\t\ton(tile, 'error', bind(this._tileOnError, this, done, tile));\r\n\r\n\t\tif (this.options.crossOrigin || this.options.crossOrigin === '') {\r\n\t\t\ttile.crossOrigin = this.options.crossOrigin === true ? '' : this.options.crossOrigin;\r\n\t\t}\r\n\r\n\t\t// for this new option we follow the documented behavior\r\n\t\t// more closely by only setting the property when string\r\n\t\tif (typeof this.options.referrerPolicy === 'string') {\r\n\t\t\ttile.referrerPolicy = this.options.referrerPolicy;\r\n\t\t}\r\n\r\n\t\t// The alt attribute is set to the empty string,\r\n\t\t// allowing screen readers to ignore the decorative image tiles.\r\n\t\t// https://www.w3.org/WAI/tutorials/images/decorative/\r\n\t\t// https://www.w3.org/TR/html-aria/#el-img-empty-alt\r\n\t\ttile.alt = '';\r\n\r\n\t\ttile.src = this.getTileUrl(coords);\r\n\r\n\t\treturn tile;\r\n\t},\r\n\r\n\t// @section Extension methods\r\n\t// @uninheritable\r\n\t// Layers extending `TileLayer` might reimplement the following method.\r\n\t// @method getTileUrl(coords: Object): String\r\n\t// Called only internally, returns the URL for a tile given its coordinates.\r\n\t// Classes extending `TileLayer` can override this function to provide custom tile URL naming schemes.\r\n\tgetTileUrl: function (coords) {\r\n\t\tvar data = {\r\n\t\t\tr: Browser.retina ? '@2x' : '',\r\n\t\t\ts: this._getSubdomain(coords),\r\n\t\t\tx: coords.x,\r\n\t\t\ty: coords.y,\r\n\t\t\tz: this._getZoomForUrl()\r\n\t\t};\r\n\t\tif (this._map && !this._map.options.crs.infinite) {\r\n\t\t\tvar invertedY = this._globalTileRange.max.y - coords.y;\r\n\t\t\tif (this.options.tms) {\r\n\t\t\t\tdata['y'] = invertedY;\r\n\t\t\t}\r\n\t\t\tdata['-y'] = invertedY;\r\n\t\t}\r\n\r\n\t\treturn template(this._url, extend(data, this.options));\r\n\t},\r\n\r\n\t_tileOnLoad: function (done, tile) {\r\n\t\t// For https://github.com/Leaflet/Leaflet/issues/3332\r\n\t\tif (Browser.ielt9) {\r\n\t\t\tsetTimeout(bind(done, this, null, tile), 0);\r\n\t\t} else {\r\n\t\t\tdone(null, tile);\r\n\t\t}\r\n\t},\r\n\r\n\t_tileOnError: function (done, tile, e) {\r\n\t\tvar errorUrl = this.options.errorTileUrl;\r\n\t\tif (errorUrl && tile.getAttribute('src') !== errorUrl) {\r\n\t\t\ttile.src = errorUrl;\r\n\t\t}\r\n\t\tdone(e, tile);\r\n\t},\r\n\r\n\t_onTileRemove: function (e) {\r\n\t\te.tile.onload = null;\r\n\t},\r\n\r\n\t_getZoomForUrl: function () {\r\n\t\tvar zoom = this._tileZoom,\r\n\t\tmaxZoom = this.options.maxZoom,\r\n\t\tzoomReverse = this.options.zoomReverse,\r\n\t\tzoomOffset = this.options.zoomOffset;\r\n\r\n\t\tif (zoomReverse) {\r\n\t\t\tzoom = maxZoom - zoom;\r\n\t\t}\r\n\r\n\t\treturn zoom + zoomOffset;\r\n\t},\r\n\r\n\t_getSubdomain: function (tilePoint) {\r\n\t\tvar index = Math.abs(tilePoint.x + tilePoint.y) % this.options.subdomains.length;\r\n\t\treturn this.options.subdomains[index];\r\n\t},\r\n\r\n\t// stops loading all tiles in the background layer\r\n\t_abortLoading: function () {\r\n\t\tvar i, tile;\r\n\t\tfor (i in this._tiles) {\r\n\t\t\tif (this._tiles[i].coords.z !== this._tileZoom) {\r\n\t\t\t\ttile = this._tiles[i].el;\r\n\r\n\t\t\t\ttile.onload = falseFn;\r\n\t\t\t\ttile.onerror = falseFn;\r\n\r\n\t\t\t\tif (!tile.complete) {\r\n\t\t\t\t\ttile.src = emptyImageUrl;\r\n\t\t\t\t\tvar coords = this._tiles[i].coords;\r\n\t\t\t\t\tremove(tile);\r\n\t\t\t\t\tdelete this._tiles[i];\r\n\t\t\t\t\t// @event tileabort: TileEvent\r\n\t\t\t\t\t// Fired when a tile was loading but is now not wanted.\r\n\t\t\t\t\tthis.fire('tileabort', {\r\n\t\t\t\t\t\ttile: tile,\r\n\t\t\t\t\t\tcoords: coords\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_removeTile: function (key) {\r\n\t\tvar tile = this._tiles[key];\r\n\t\tif (!tile) { return; }\r\n\r\n\t\t// Cancels any pending http requests associated with the tile\r\n\t\ttile.el.setAttribute('src', emptyImageUrl);\r\n\r\n\t\treturn GridLayer.prototype._removeTile.call(this, key);\r\n\t},\r\n\r\n\t_tileReady: function (coords, err, tile) {\r\n\t\tif (!this._map || (tile && tile.getAttribute('src') === emptyImageUrl)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\treturn GridLayer.prototype._tileReady.call(this, coords, err, tile);\r\n\t}\r\n});\r\n\r\n\r\n// @factory L.tilelayer(urlTemplate: String, options?: TileLayer options)\r\n// Instantiates a tile layer object given a `URL template` and optionally an options object.\r\n\r\nfunction tileLayer(url, options) {\r\n\treturn new TileLayer(url, options);\r\n}\n\n/*\r\n * @class TileLayer.WMS\r\n * @inherits TileLayer\r\n * @aka L.TileLayer.WMS\r\n * Used to display [WMS](https://en.wikipedia.org/wiki/Web_Map_Service) services as tile layers on the map. Extends `TileLayer`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var nexrad = L.tileLayer.wms(\"http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi\", {\r\n * \tlayers: 'nexrad-n0r-900913',\r\n * \tformat: 'image/png',\r\n * \ttransparent: true,\r\n * \tattribution: \"Weather data © 2012 IEM Nexrad\"\r\n * });\r\n * ```\r\n */\r\n\r\nvar TileLayerWMS = TileLayer.extend({\r\n\r\n\t// @section\r\n\t// @aka TileLayer.WMS options\r\n\t// If any custom options not documented here are used, they will be sent to the\r\n\t// WMS server as extra parameters in each request URL. This can be useful for\r\n\t// [non-standard vendor WMS parameters](https://docs.geoserver.org/stable/en/user/services/wms/vendor.html).\r\n\tdefaultWmsParams: {\r\n\t\tservice: 'WMS',\r\n\t\trequest: 'GetMap',\r\n\r\n\t\t// @option layers: String = ''\r\n\t\t// **(required)** Comma-separated list of WMS layers to show.\r\n\t\tlayers: '',\r\n\r\n\t\t// @option styles: String = ''\r\n\t\t// Comma-separated list of WMS styles.\r\n\t\tstyles: '',\r\n\r\n\t\t// @option format: String = 'image/jpeg'\r\n\t\t// WMS image format (use `'image/png'` for layers with transparency).\r\n\t\tformat: 'image/jpeg',\r\n\r\n\t\t// @option transparent: Boolean = false\r\n\t\t// If `true`, the WMS service will return images with transparency.\r\n\t\ttransparent: false,\r\n\r\n\t\t// @option version: String = '1.1.1'\r\n\t\t// Version of the WMS service to use\r\n\t\tversion: '1.1.1'\r\n\t},\r\n\r\n\toptions: {\r\n\t\t// @option crs: CRS = null\r\n\t\t// Coordinate Reference System to use for the WMS requests, defaults to\r\n\t\t// map CRS. Don't change this if you're not sure what it means.\r\n\t\tcrs: null,\r\n\r\n\t\t// @option uppercase: Boolean = false\r\n\t\t// If `true`, WMS request parameter keys will be uppercase.\r\n\t\tuppercase: false\r\n\t},\r\n\r\n\tinitialize: function (url, options) {\r\n\r\n\t\tthis._url = url;\r\n\r\n\t\tvar wmsParams = extend({}, this.defaultWmsParams);\r\n\r\n\t\t// all keys that are not TileLayer options go to WMS params\r\n\t\tfor (var i in options) {\r\n\t\t\tif (!(i in this.options)) {\r\n\t\t\t\twmsParams[i] = options[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\toptions = setOptions(this, options);\r\n\r\n\t\tvar realRetina = options.detectRetina && Browser.retina ? 2 : 1;\r\n\t\tvar tileSize = this.getTileSize();\r\n\t\twmsParams.width = tileSize.x * realRetina;\r\n\t\twmsParams.height = tileSize.y * realRetina;\r\n\r\n\t\tthis.wmsParams = wmsParams;\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\r\n\t\tthis._crs = this.options.crs || map.options.crs;\r\n\t\tthis._wmsVersion = parseFloat(this.wmsParams.version);\r\n\r\n\t\tvar projectionKey = this._wmsVersion >= 1.3 ? 'crs' : 'srs';\r\n\t\tthis.wmsParams[projectionKey] = this._crs.code;\r\n\r\n\t\tTileLayer.prototype.onAdd.call(this, map);\r\n\t},\r\n\r\n\tgetTileUrl: function (coords) {\r\n\r\n\t\tvar tileBounds = this._tileCoordsToNwSe(coords),\r\n\t\t crs = this._crs,\r\n\t\t bounds = toBounds(crs.project(tileBounds[0]), crs.project(tileBounds[1])),\r\n\t\t min = bounds.min,\r\n\t\t max = bounds.max,\r\n\t\t bbox = (this._wmsVersion >= 1.3 && this._crs === EPSG4326 ?\r\n\t\t [min.y, min.x, max.y, max.x] :\r\n\t\t [min.x, min.y, max.x, max.y]).join(','),\r\n\t\t url = TileLayer.prototype.getTileUrl.call(this, coords);\r\n\t\treturn url +\r\n\t\t\tgetParamString(this.wmsParams, url, this.options.uppercase) +\r\n\t\t\t(this.options.uppercase ? '&BBOX=' : '&bbox=') + bbox;\r\n\t},\r\n\r\n\t// @method setParams(params: Object, noRedraw?: Boolean): this\r\n\t// Merges an object with the new parameters and re-requests tiles on the current screen (unless `noRedraw` was set to true).\r\n\tsetParams: function (params, noRedraw) {\r\n\r\n\t\textend(this.wmsParams, params);\r\n\r\n\t\tif (!noRedraw) {\r\n\t\t\tthis.redraw();\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t}\r\n});\r\n\r\n\r\n// @factory L.tileLayer.wms(baseUrl: String, options: TileLayer.WMS options)\r\n// Instantiates a WMS tile layer object given a base URL of the WMS service and a WMS parameters/options object.\r\nfunction tileLayerWMS(url, options) {\r\n\treturn new TileLayerWMS(url, options);\r\n}\n\nTileLayer.WMS = TileLayerWMS;\ntileLayer.wms = tileLayerWMS;\n\n/*\n * @class Renderer\n * @inherits Layer\n * @aka L.Renderer\n *\n * Base class for vector renderer implementations (`SVG`, `Canvas`). Handles the\n * DOM container of the renderer, its bounds, and its zoom animation.\n *\n * A `Renderer` works as an implicit layer group for all `Path`s - the renderer\n * itself can be added or removed to the map. All paths use a renderer, which can\n * be implicit (the map will decide the type of renderer and use it automatically)\n * or explicit (using the [`renderer`](#path-renderer) option of the path).\n *\n * Do not use this class directly, use `SVG` and `Canvas` instead.\n *\n * @event update: Event\n * Fired when the renderer updates its bounds, center and zoom, for example when\n * its map has moved\n */\n\nvar Renderer = Layer.extend({\n\n\t// @section\n\t// @aka Renderer options\n\toptions: {\n\t\t// @option padding: Number = 0.1\n\t\t// How much to extend the clip area around the map view (relative to its size)\n\t\t// e.g. 0.1 would be 10% of map view in each direction\n\t\tpadding: 0.1\n\t},\n\n\tinitialize: function (options) {\n\t\tsetOptions(this, options);\n\t\tstamp(this);\n\t\tthis._layers = this._layers || {};\n\t},\n\n\tonAdd: function () {\n\t\tif (!this._container) {\n\t\t\tthis._initContainer(); // defined by renderer implementations\n\n\t\t\tif (this._zoomAnimated) {\n\t\t\t\taddClass(this._container, 'leaflet-zoom-animated');\n\t\t\t}\n\t\t}\n\n\t\tthis.getPane().appendChild(this._container);\n\t\tthis._update();\n\t\tthis.on('update', this._updatePaths, this);\n\t},\n\n\tonRemove: function () {\n\t\tthis.off('update', this._updatePaths, this);\n\t\tthis._destroyContainer();\n\t},\n\n\tgetEvents: function () {\n\t\tvar events = {\n\t\t\tviewreset: this._reset,\n\t\t\tzoom: this._onZoom,\n\t\t\tmoveend: this._update,\n\t\t\tzoomend: this._onZoomEnd\n\t\t};\n\t\tif (this._zoomAnimated) {\n\t\t\tevents.zoomanim = this._onAnimZoom;\n\t\t}\n\t\treturn events;\n\t},\n\n\t_onAnimZoom: function (ev) {\n\t\tthis._updateTransform(ev.center, ev.zoom);\n\t},\n\n\t_onZoom: function () {\n\t\tthis._updateTransform(this._map.getCenter(), this._map.getZoom());\n\t},\n\n\t_updateTransform: function (center, zoom) {\n\t\tvar scale = this._map.getZoomScale(zoom, this._zoom),\n\t\t viewHalf = this._map.getSize().multiplyBy(0.5 + this.options.padding),\n\t\t currentCenterPoint = this._map.project(this._center, zoom),\n\n\t\t topLeftOffset = viewHalf.multiplyBy(-scale).add(currentCenterPoint)\n\t\t\t\t .subtract(this._map._getNewPixelOrigin(center, zoom));\n\n\t\tif (Browser.any3d) {\n\t\t\tsetTransform(this._container, topLeftOffset, scale);\n\t\t} else {\n\t\t\tsetPosition(this._container, topLeftOffset);\n\t\t}\n\t},\n\n\t_reset: function () {\n\t\tthis._update();\n\t\tthis._updateTransform(this._center, this._zoom);\n\n\t\tfor (var id in this._layers) {\n\t\t\tthis._layers[id]._reset();\n\t\t}\n\t},\n\n\t_onZoomEnd: function () {\n\t\tfor (var id in this._layers) {\n\t\t\tthis._layers[id]._project();\n\t\t}\n\t},\n\n\t_updatePaths: function () {\n\t\tfor (var id in this._layers) {\n\t\t\tthis._layers[id]._update();\n\t\t}\n\t},\n\n\t_update: function () {\n\t\t// Update pixel bounds of renderer container (for positioning/sizing/clipping later)\n\t\t// Subclasses are responsible of firing the 'update' event.\n\t\tvar p = this.options.padding,\n\t\t size = this._map.getSize(),\n\t\t min = this._map.containerPointToLayerPoint(size.multiplyBy(-p)).round();\n\n\t\tthis._bounds = new Bounds(min, min.add(size.multiplyBy(1 + p * 2)).round());\n\n\t\tthis._center = this._map.getCenter();\n\t\tthis._zoom = this._map.getZoom();\n\t}\n});\n\n/*\n * @class Canvas\n * @inherits Renderer\n * @aka L.Canvas\n *\n * Allows vector layers to be displayed with [`<canvas>`](https://developer.mozilla.org/docs/Web/API/Canvas_API).\n * Inherits `Renderer`.\n *\n * Due to [technical limitations](https://caniuse.com/canvas), Canvas is not\n * available in all web browsers, notably IE8, and overlapping geometries might\n * not display properly in some edge cases.\n *\n * @example\n *\n * Use Canvas by default for all paths in the map:\n *\n * ```js\n * var map = L.map('map', {\n * \trenderer: L.canvas()\n * });\n * ```\n *\n * Use a Canvas renderer with extra padding for specific vector geometries:\n *\n * ```js\n * var map = L.map('map');\n * var myRenderer = L.canvas({ padding: 0.5 });\n * var line = L.polyline( coordinates, { renderer: myRenderer } );\n * var circle = L.circle( center, { renderer: myRenderer } );\n * ```\n */\n\nvar Canvas = Renderer.extend({\n\n\t// @section\n\t// @aka Canvas options\n\toptions: {\n\t\t// @option tolerance: Number = 0\n\t\t// How much to extend the click tolerance around a path/object on the map.\n\t\ttolerance: 0\n\t},\n\n\tgetEvents: function () {\n\t\tvar events = Renderer.prototype.getEvents.call(this);\n\t\tevents.viewprereset = this._onViewPreReset;\n\t\treturn events;\n\t},\n\n\t_onViewPreReset: function () {\n\t\t// Set a flag so that a viewprereset+moveend+viewreset only updates&redraws once\n\t\tthis._postponeUpdatePaths = true;\n\t},\n\n\tonAdd: function () {\n\t\tRenderer.prototype.onAdd.call(this);\n\n\t\t// Redraw vectors since canvas is cleared upon removal,\n\t\t// in case of removing the renderer itself from the map.\n\t\tthis._draw();\n\t},\n\n\t_initContainer: function () {\n\t\tvar container = this._container = document.createElement('canvas');\n\n\t\ton(container, 'mousemove', this._onMouseMove, this);\n\t\ton(container, 'click dblclick mousedown mouseup contextmenu', this._onClick, this);\n\t\ton(container, 'mouseout', this._handleMouseOut, this);\n\t\tcontainer['_leaflet_disable_events'] = true;\n\n\t\tthis._ctx = container.getContext('2d');\n\t},\n\n\t_destroyContainer: function () {\n\t\tcancelAnimFrame(this._redrawRequest);\n\t\tdelete this._ctx;\n\t\tremove(this._container);\n\t\toff(this._container);\n\t\tdelete this._container;\n\t},\n\n\t_updatePaths: function () {\n\t\tif (this._postponeUpdatePaths) { return; }\n\n\t\tvar layer;\n\t\tthis._redrawBounds = null;\n\t\tfor (var id in this._layers) {\n\t\t\tlayer = this._layers[id];\n\t\t\tlayer._update();\n\t\t}\n\t\tthis._redraw();\n\t},\n\n\t_update: function () {\n\t\tif (this._map._animatingZoom && this._bounds) { return; }\n\n\t\tRenderer.prototype._update.call(this);\n\n\t\tvar b = this._bounds,\n\t\t container = this._container,\n\t\t size = b.getSize(),\n\t\t m = Browser.retina ? 2 : 1;\n\n\t\tsetPosition(container, b.min);\n\n\t\t// set canvas size (also clearing it); use double size on retina\n\t\tcontainer.width = m * size.x;\n\t\tcontainer.height = m * size.y;\n\t\tcontainer.style.width = size.x + 'px';\n\t\tcontainer.style.height = size.y + 'px';\n\n\t\tif (Browser.retina) {\n\t\t\tthis._ctx.scale(2, 2);\n\t\t}\n\n\t\t// translate so we use the same path coordinates after canvas element moves\n\t\tthis._ctx.translate(-b.min.x, -b.min.y);\n\n\t\t// Tell paths to redraw themselves\n\t\tthis.fire('update');\n\t},\n\n\t_reset: function () {\n\t\tRenderer.prototype._reset.call(this);\n\n\t\tif (this._postponeUpdatePaths) {\n\t\t\tthis._postponeUpdatePaths = false;\n\t\t\tthis._updatePaths();\n\t\t}\n\t},\n\n\t_initPath: function (layer) {\n\t\tthis._updateDashArray(layer);\n\t\tthis._layers[stamp(layer)] = layer;\n\n\t\tvar order = layer._order = {\n\t\t\tlayer: layer,\n\t\t\tprev: this._drawLast,\n\t\t\tnext: null\n\t\t};\n\t\tif (this._drawLast) { this._drawLast.next = order; }\n\t\tthis._drawLast = order;\n\t\tthis._drawFirst = this._drawFirst || this._drawLast;\n\t},\n\n\t_addPath: function (layer) {\n\t\tthis._requestRedraw(layer);\n\t},\n\n\t_removePath: function (layer) {\n\t\tvar order = layer._order;\n\t\tvar next = order.next;\n\t\tvar prev = order.prev;\n\n\t\tif (next) {\n\t\t\tnext.prev = prev;\n\t\t} else {\n\t\t\tthis._drawLast = prev;\n\t\t}\n\t\tif (prev) {\n\t\t\tprev.next = next;\n\t\t} else {\n\t\t\tthis._drawFirst = next;\n\t\t}\n\n\t\tdelete layer._order;\n\n\t\tdelete this._layers[stamp(layer)];\n\n\t\tthis._requestRedraw(layer);\n\t},\n\n\t_updatePath: function (layer) {\n\t\t// Redraw the union of the layer's old pixel\n\t\t// bounds and the new pixel bounds.\n\t\tthis._extendRedrawBounds(layer);\n\t\tlayer._project();\n\t\tlayer._update();\n\t\t// The redraw will extend the redraw bounds\n\t\t// with the new pixel bounds.\n\t\tthis._requestRedraw(layer);\n\t},\n\n\t_updateStyle: function (layer) {\n\t\tthis._updateDashArray(layer);\n\t\tthis._requestRedraw(layer);\n\t},\n\n\t_updateDashArray: function (layer) {\n\t\tif (typeof layer.options.dashArray === 'string') {\n\t\t\tvar parts = layer.options.dashArray.split(/[, ]+/),\n\t\t\t dashArray = [],\n\t\t\t dashValue,\n\t\t\t i;\n\t\t\tfor (i = 0; i < parts.length; i++) {\n\t\t\t\tdashValue = Number(parts[i]);\n\t\t\t\t// Ignore dash array containing invalid lengths\n\t\t\t\tif (isNaN(dashValue)) { return; }\n\t\t\t\tdashArray.push(dashValue);\n\t\t\t}\n\t\t\tlayer.options._dashArray = dashArray;\n\t\t} else {\n\t\t\tlayer.options._dashArray = layer.options.dashArray;\n\t\t}\n\t},\n\n\t_requestRedraw: function (layer) {\n\t\tif (!this._map) { return; }\n\n\t\tthis._extendRedrawBounds(layer);\n\t\tthis._redrawRequest = this._redrawRequest || requestAnimFrame(this._redraw, this);\n\t},\n\n\t_extendRedrawBounds: function (layer) {\n\t\tif (layer._pxBounds) {\n\t\t\tvar padding = (layer.options.weight || 0) + 1;\n\t\t\tthis._redrawBounds = this._redrawBounds || new Bounds();\n\t\t\tthis._redrawBounds.extend(layer._pxBounds.min.subtract([padding, padding]));\n\t\t\tthis._redrawBounds.extend(layer._pxBounds.max.add([padding, padding]));\n\t\t}\n\t},\n\n\t_redraw: function () {\n\t\tthis._redrawRequest = null;\n\n\t\tif (this._redrawBounds) {\n\t\t\tthis._redrawBounds.min._floor();\n\t\t\tthis._redrawBounds.max._ceil();\n\t\t}\n\n\t\tthis._clear(); // clear layers in redraw bounds\n\t\tthis._draw(); // draw layers\n\n\t\tthis._redrawBounds = null;\n\t},\n\n\t_clear: function () {\n\t\tvar bounds = this._redrawBounds;\n\t\tif (bounds) {\n\t\t\tvar size = bounds.getSize();\n\t\t\tthis._ctx.clearRect(bounds.min.x, bounds.min.y, size.x, size.y);\n\t\t} else {\n\t\t\tthis._ctx.save();\n\t\t\tthis._ctx.setTransform(1, 0, 0, 1, 0, 0);\n\t\t\tthis._ctx.clearRect(0, 0, this._container.width, this._container.height);\n\t\t\tthis._ctx.restore();\n\t\t}\n\t},\n\n\t_draw: function () {\n\t\tvar layer, bounds = this._redrawBounds;\n\t\tthis._ctx.save();\n\t\tif (bounds) {\n\t\t\tvar size = bounds.getSize();\n\t\t\tthis._ctx.beginPath();\n\t\t\tthis._ctx.rect(bounds.min.x, bounds.min.y, size.x, size.y);\n\t\t\tthis._ctx.clip();\n\t\t}\n\n\t\tthis._drawing = true;\n\n\t\tfor (var order = this._drawFirst; order; order = order.next) {\n\t\t\tlayer = order.layer;\n\t\t\tif (!bounds || (layer._pxBounds && layer._pxBounds.intersects(bounds))) {\n\t\t\t\tlayer._updatePath();\n\t\t\t}\n\t\t}\n\n\t\tthis._drawing = false;\n\n\t\tthis._ctx.restore(); // Restore state before clipping.\n\t},\n\n\t_updatePoly: function (layer, closed) {\n\t\tif (!this._drawing) { return; }\n\n\t\tvar i, j, len2, p,\n\t\t parts = layer._parts,\n\t\t len = parts.length,\n\t\t ctx = this._ctx;\n\n\t\tif (!len) { return; }\n\n\t\tctx.beginPath();\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tfor (j = 0, len2 = parts[i].length; j < len2; j++) {\n\t\t\t\tp = parts[i][j];\n\t\t\t\tctx[j ? 'lineTo' : 'moveTo'](p.x, p.y);\n\t\t\t}\n\t\t\tif (closed) {\n\t\t\t\tctx.closePath();\n\t\t\t}\n\t\t}\n\n\t\tthis._fillStroke(ctx, layer);\n\n\t\t// TODO optimization: 1 fill/stroke for all features with equal style instead of 1 for each feature\n\t},\n\n\t_updateCircle: function (layer) {\n\n\t\tif (!this._drawing || layer._empty()) { return; }\n\n\t\tvar p = layer._point,\n\t\t ctx = this._ctx,\n\t\t r = Math.max(Math.round(layer._radius), 1),\n\t\t s = (Math.max(Math.round(layer._radiusY), 1) || r) / r;\n\n\t\tif (s !== 1) {\n\t\t\tctx.save();\n\t\t\tctx.scale(1, s);\n\t\t}\n\n\t\tctx.beginPath();\n\t\tctx.arc(p.x, p.y / s, r, 0, Math.PI * 2, false);\n\n\t\tif (s !== 1) {\n\t\t\tctx.restore();\n\t\t}\n\n\t\tthis._fillStroke(ctx, layer);\n\t},\n\n\t_fillStroke: function (ctx, layer) {\n\t\tvar options = layer.options;\n\n\t\tif (options.fill) {\n\t\t\tctx.globalAlpha = options.fillOpacity;\n\t\t\tctx.fillStyle = options.fillColor || options.color;\n\t\t\tctx.fill(options.fillRule || 'evenodd');\n\t\t}\n\n\t\tif (options.stroke && options.weight !== 0) {\n\t\t\tif (ctx.setLineDash) {\n\t\t\t\tctx.setLineDash(layer.options && layer.options._dashArray || []);\n\t\t\t}\n\t\t\tctx.globalAlpha = options.opacity;\n\t\t\tctx.lineWidth = options.weight;\n\t\t\tctx.strokeStyle = options.color;\n\t\t\tctx.lineCap = options.lineCap;\n\t\t\tctx.lineJoin = options.lineJoin;\n\t\t\tctx.stroke();\n\t\t}\n\t},\n\n\t// Canvas obviously doesn't have mouse events for individual drawn objects,\n\t// so we emulate that by calculating what's under the mouse on mousemove/click manually\n\n\t_onClick: function (e) {\n\t\tvar point = this._map.mouseEventToLayerPoint(e), layer, clickedLayer;\n\n\t\tfor (var order = this._drawFirst; order; order = order.next) {\n\t\t\tlayer = order.layer;\n\t\t\tif (layer.options.interactive && layer._containsPoint(point)) {\n\t\t\t\tif (!(e.type === 'click' || e.type === 'preclick') || !this._map._draggableMoved(layer)) {\n\t\t\t\t\tclickedLayer = layer;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis._fireEvent(clickedLayer ? [clickedLayer] : false, e);\n\t},\n\n\t_onMouseMove: function (e) {\n\t\tif (!this._map || this._map.dragging.moving() || this._map._animatingZoom) { return; }\n\n\t\tvar point = this._map.mouseEventToLayerPoint(e);\n\t\tthis._handleMouseHover(e, point);\n\t},\n\n\n\t_handleMouseOut: function (e) {\n\t\tvar layer = this._hoveredLayer;\n\t\tif (layer) {\n\t\t\t// if we're leaving the layer, fire mouseout\n\t\t\tremoveClass(this._container, 'leaflet-interactive');\n\t\t\tthis._fireEvent([layer], e, 'mouseout');\n\t\t\tthis._hoveredLayer = null;\n\t\t\tthis._mouseHoverThrottled = false;\n\t\t}\n\t},\n\n\t_handleMouseHover: function (e, point) {\n\t\tif (this._mouseHoverThrottled) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar layer, candidateHoveredLayer;\n\n\t\tfor (var order = this._drawFirst; order; order = order.next) {\n\t\t\tlayer = order.layer;\n\t\t\tif (layer.options.interactive && layer._containsPoint(point)) {\n\t\t\t\tcandidateHoveredLayer = layer;\n\t\t\t}\n\t\t}\n\n\t\tif (candidateHoveredLayer !== this._hoveredLayer) {\n\t\t\tthis._handleMouseOut(e);\n\n\t\t\tif (candidateHoveredLayer) {\n\t\t\t\taddClass(this._container, 'leaflet-interactive'); // change cursor\n\t\t\t\tthis._fireEvent([candidateHoveredLayer], e, 'mouseover');\n\t\t\t\tthis._hoveredLayer = candidateHoveredLayer;\n\t\t\t}\n\t\t}\n\n\t\tthis._fireEvent(this._hoveredLayer ? [this._hoveredLayer] : false, e);\n\n\t\tthis._mouseHoverThrottled = true;\n\t\tsetTimeout(bind(function () {\n\t\t\tthis._mouseHoverThrottled = false;\n\t\t}, this), 32);\n\t},\n\n\t_fireEvent: function (layers, e, type) {\n\t\tthis._map._fireDOMEvent(e, type || e.type, layers);\n\t},\n\n\t_bringToFront: function (layer) {\n\t\tvar order = layer._order;\n\n\t\tif (!order) { return; }\n\n\t\tvar next = order.next;\n\t\tvar prev = order.prev;\n\n\t\tif (next) {\n\t\t\tnext.prev = prev;\n\t\t} else {\n\t\t\t// Already last\n\t\t\treturn;\n\t\t}\n\t\tif (prev) {\n\t\t\tprev.next = next;\n\t\t} else if (next) {\n\t\t\t// Update first entry unless this is the\n\t\t\t// single entry\n\t\t\tthis._drawFirst = next;\n\t\t}\n\n\t\torder.prev = this._drawLast;\n\t\tthis._drawLast.next = order;\n\n\t\torder.next = null;\n\t\tthis._drawLast = order;\n\n\t\tthis._requestRedraw(layer);\n\t},\n\n\t_bringToBack: function (layer) {\n\t\tvar order = layer._order;\n\n\t\tif (!order) { return; }\n\n\t\tvar next = order.next;\n\t\tvar prev = order.prev;\n\n\t\tif (prev) {\n\t\t\tprev.next = next;\n\t\t} else {\n\t\t\t// Already first\n\t\t\treturn;\n\t\t}\n\t\tif (next) {\n\t\t\tnext.prev = prev;\n\t\t} else if (prev) {\n\t\t\t// Update last entry unless this is the\n\t\t\t// single entry\n\t\t\tthis._drawLast = prev;\n\t\t}\n\n\t\torder.prev = null;\n\n\t\torder.next = this._drawFirst;\n\t\tthis._drawFirst.prev = order;\n\t\tthis._drawFirst = order;\n\n\t\tthis._requestRedraw(layer);\n\t}\n});\n\n// @factory L.canvas(options?: Renderer options)\n// Creates a Canvas renderer with the given options.\nfunction canvas(options) {\n\treturn Browser.canvas ? new Canvas(options) : null;\n}\n\n/*\n * Thanks to Dmitry Baranovsky and his Raphael library for inspiration!\n */\n\n\nvar vmlCreate = (function () {\n\ttry {\n\t\tdocument.namespaces.add('lvml', 'urn:schemas-microsoft-com:vml');\n\t\treturn function (name) {\n\t\t\treturn document.createElement('<lvml:' + name + ' class=\"lvml\">');\n\t\t};\n\t} catch (e) {\n\t\t// Do not return fn from catch block so `e` can be garbage collected\n\t\t// See https://github.com/Leaflet/Leaflet/pull/7279\n\t}\n\treturn function (name) {\n\t\treturn document.createElement('<' + name + ' xmlns=\"urn:schemas-microsoft.com:vml\" class=\"lvml\">');\n\t};\n})();\n\n\n/*\n * @class SVG\n *\n *\n * VML was deprecated in 2012, which means VML functionality exists only for backwards compatibility\n * with old versions of Internet Explorer.\n */\n\n// mixin to redefine some SVG methods to handle VML syntax which is similar but with some differences\nvar vmlMixin = {\n\n\t_initContainer: function () {\n\t\tthis._container = create$1('div', 'leaflet-vml-container');\n\t},\n\n\t_update: function () {\n\t\tif (this._map._animatingZoom) { return; }\n\t\tRenderer.prototype._update.call(this);\n\t\tthis.fire('update');\n\t},\n\n\t_initPath: function (layer) {\n\t\tvar container = layer._container = vmlCreate('shape');\n\n\t\taddClass(container, 'leaflet-vml-shape ' + (this.options.className || ''));\n\n\t\tcontainer.coordsize = '1 1';\n\n\t\tlayer._path = vmlCreate('path');\n\t\tcontainer.appendChild(layer._path);\n\n\t\tthis._updateStyle(layer);\n\t\tthis._layers[stamp(layer)] = layer;\n\t},\n\n\t_addPath: function (layer) {\n\t\tvar container = layer._container;\n\t\tthis._container.appendChild(container);\n\n\t\tif (layer.options.interactive) {\n\t\t\tlayer.addInteractiveTarget(container);\n\t\t}\n\t},\n\n\t_removePath: function (layer) {\n\t\tvar container = layer._container;\n\t\tremove(container);\n\t\tlayer.removeInteractiveTarget(container);\n\t\tdelete this._layers[stamp(layer)];\n\t},\n\n\t_updateStyle: function (layer) {\n\t\tvar stroke = layer._stroke,\n\t\t fill = layer._fill,\n\t\t options = layer.options,\n\t\t container = layer._container;\n\n\t\tcontainer.stroked = !!options.stroke;\n\t\tcontainer.filled = !!options.fill;\n\n\t\tif (options.stroke) {\n\t\t\tif (!stroke) {\n\t\t\t\tstroke = layer._stroke = vmlCreate('stroke');\n\t\t\t}\n\t\t\tcontainer.appendChild(stroke);\n\t\t\tstroke.weight = options.weight + 'px';\n\t\t\tstroke.color = options.color;\n\t\t\tstroke.opacity = options.opacity;\n\n\t\t\tif (options.dashArray) {\n\t\t\t\tstroke.dashStyle = isArray(options.dashArray) ?\n\t\t\t\t options.dashArray.join(' ') :\n\t\t\t\t options.dashArray.replace(/( *, *)/g, ' ');\n\t\t\t} else {\n\t\t\t\tstroke.dashStyle = '';\n\t\t\t}\n\t\t\tstroke.endcap = options.lineCap.replace('butt', 'flat');\n\t\t\tstroke.joinstyle = options.lineJoin;\n\n\t\t} else if (stroke) {\n\t\t\tcontainer.removeChild(stroke);\n\t\t\tlayer._stroke = null;\n\t\t}\n\n\t\tif (options.fill) {\n\t\t\tif (!fill) {\n\t\t\t\tfill = layer._fill = vmlCreate('fill');\n\t\t\t}\n\t\t\tcontainer.appendChild(fill);\n\t\t\tfill.color = options.fillColor || options.color;\n\t\t\tfill.opacity = options.fillOpacity;\n\n\t\t} else if (fill) {\n\t\t\tcontainer.removeChild(fill);\n\t\t\tlayer._fill = null;\n\t\t}\n\t},\n\n\t_updateCircle: function (layer) {\n\t\tvar p = layer._point.round(),\n\t\t r = Math.round(layer._radius),\n\t\t r2 = Math.round(layer._radiusY || r);\n\n\t\tthis._setPath(layer, layer._empty() ? 'M0 0' :\n\t\t\t'AL ' + p.x + ',' + p.y + ' ' + r + ',' + r2 + ' 0,' + (65535 * 360));\n\t},\n\n\t_setPath: function (layer, path) {\n\t\tlayer._path.v = path;\n\t},\n\n\t_bringToFront: function (layer) {\n\t\ttoFront(layer._container);\n\t},\n\n\t_bringToBack: function (layer) {\n\t\ttoBack(layer._container);\n\t}\n};\n\nvar create = Browser.vml ? vmlCreate : svgCreate;\n\n/*\n * @class SVG\n * @inherits Renderer\n * @aka L.SVG\n *\n * Allows vector layers to be displayed with [SVG](https://developer.mozilla.org/docs/Web/SVG).\n * Inherits `Renderer`.\n *\n * Due to [technical limitations](https://caniuse.com/svg), SVG is not\n * available in all web browsers, notably Android 2.x and 3.x.\n *\n * Although SVG is not available on IE7 and IE8, these browsers support\n * [VML](https://en.wikipedia.org/wiki/Vector_Markup_Language)\n * (a now deprecated technology), and the SVG renderer will fall back to VML in\n * this case.\n *\n * @example\n *\n * Use SVG by default for all paths in the map:\n *\n * ```js\n * var map = L.map('map', {\n * \trenderer: L.svg()\n * });\n * ```\n *\n * Use a SVG renderer with extra padding for specific vector geometries:\n *\n * ```js\n * var map = L.map('map');\n * var myRenderer = L.svg({ padding: 0.5 });\n * var line = L.polyline( coordinates, { renderer: myRenderer } );\n * var circle = L.circle( center, { renderer: myRenderer } );\n * ```\n */\n\nvar SVG = Renderer.extend({\n\n\t_initContainer: function () {\n\t\tthis._container = create('svg');\n\n\t\t// makes it possible to click through svg root; we'll reset it back in individual paths\n\t\tthis._container.setAttribute('pointer-events', 'none');\n\n\t\tthis._rootGroup = create('g');\n\t\tthis._container.appendChild(this._rootGroup);\n\t},\n\n\t_destroyContainer: function () {\n\t\tremove(this._container);\n\t\toff(this._container);\n\t\tdelete this._container;\n\t\tdelete this._rootGroup;\n\t\tdelete this._svgSize;\n\t},\n\n\t_update: function () {\n\t\tif (this._map._animatingZoom && this._bounds) { return; }\n\n\t\tRenderer.prototype._update.call(this);\n\n\t\tvar b = this._bounds,\n\t\t size = b.getSize(),\n\t\t container = this._container;\n\n\t\t// set size of svg-container if changed\n\t\tif (!this._svgSize || !this._svgSize.equals(size)) {\n\t\t\tthis._svgSize = size;\n\t\t\tcontainer.setAttribute('width', size.x);\n\t\t\tcontainer.setAttribute('height', size.y);\n\t\t}\n\n\t\t// movement: update container viewBox so that we don't have to change coordinates of individual layers\n\t\tsetPosition(container, b.min);\n\t\tcontainer.setAttribute('viewBox', [b.min.x, b.min.y, size.x, size.y].join(' '));\n\n\t\tthis.fire('update');\n\t},\n\n\t// methods below are called by vector layers implementations\n\n\t_initPath: function (layer) {\n\t\tvar path = layer._path = create('path');\n\n\t\t// @namespace Path\n\t\t// @option className: String = null\n\t\t// Custom class name set on an element. Only for SVG renderer.\n\t\tif (layer.options.className) {\n\t\t\taddClass(path, layer.options.className);\n\t\t}\n\n\t\tif (layer.options.interactive) {\n\t\t\taddClass(path, 'leaflet-interactive');\n\t\t}\n\n\t\tthis._updateStyle(layer);\n\t\tthis._layers[stamp(layer)] = layer;\n\t},\n\n\t_addPath: function (layer) {\n\t\tif (!this._rootGroup) { this._initContainer(); }\n\t\tthis._rootGroup.appendChild(layer._path);\n\t\tlayer.addInteractiveTarget(layer._path);\n\t},\n\n\t_removePath: function (layer) {\n\t\tremove(layer._path);\n\t\tlayer.removeInteractiveTarget(layer._path);\n\t\tdelete this._layers[stamp(layer)];\n\t},\n\n\t_updatePath: function (layer) {\n\t\tlayer._project();\n\t\tlayer._update();\n\t},\n\n\t_updateStyle: function (layer) {\n\t\tvar path = layer._path,\n\t\t options = layer.options;\n\n\t\tif (!path) { return; }\n\n\t\tif (options.stroke) {\n\t\t\tpath.setAttribute('stroke', options.color);\n\t\t\tpath.setAttribute('stroke-opacity', options.opacity);\n\t\t\tpath.setAttribute('stroke-width', options.weight);\n\t\t\tpath.setAttribute('stroke-linecap', options.lineCap);\n\t\t\tpath.setAttribute('stroke-linejoin', options.lineJoin);\n\n\t\t\tif (options.dashArray) {\n\t\t\t\tpath.setAttribute('stroke-dasharray', options.dashArray);\n\t\t\t} else {\n\t\t\t\tpath.removeAttribute('stroke-dasharray');\n\t\t\t}\n\n\t\t\tif (options.dashOffset) {\n\t\t\t\tpath.setAttribute('stroke-dashoffset', options.dashOffset);\n\t\t\t} else {\n\t\t\t\tpath.removeAttribute('stroke-dashoffset');\n\t\t\t}\n\t\t} else {\n\t\t\tpath.setAttribute('stroke', 'none');\n\t\t}\n\n\t\tif (options.fill) {\n\t\t\tpath.setAttribute('fill', options.fillColor || options.color);\n\t\t\tpath.setAttribute('fill-opacity', options.fillOpacity);\n\t\t\tpath.setAttribute('fill-rule', options.fillRule || 'evenodd');\n\t\t} else {\n\t\t\tpath.setAttribute('fill', 'none');\n\t\t}\n\t},\n\n\t_updatePoly: function (layer, closed) {\n\t\tthis._setPath(layer, pointsToPath(layer._parts, closed));\n\t},\n\n\t_updateCircle: function (layer) {\n\t\tvar p = layer._point,\n\t\t r = Math.max(Math.round(layer._radius), 1),\n\t\t r2 = Math.max(Math.round(layer._radiusY), 1) || r,\n\t\t arc = 'a' + r + ',' + r2 + ' 0 1,0 ';\n\n\t\t// drawing a circle with two half-arcs\n\t\tvar d = layer._empty() ? 'M0 0' :\n\t\t\t'M' + (p.x - r) + ',' + p.y +\n\t\t\tarc + (r * 2) + ',0 ' +\n\t\t\tarc + (-r * 2) + ',0 ';\n\n\t\tthis._setPath(layer, d);\n\t},\n\n\t_setPath: function (layer, path) {\n\t\tlayer._path.setAttribute('d', path);\n\t},\n\n\t// SVG does not have the concept of zIndex so we resort to changing the DOM order of elements\n\t_bringToFront: function (layer) {\n\t\ttoFront(layer._path);\n\t},\n\n\t_bringToBack: function (layer) {\n\t\ttoBack(layer._path);\n\t}\n});\n\nif (Browser.vml) {\n\tSVG.include(vmlMixin);\n}\n\n// @namespace SVG\n// @factory L.svg(options?: Renderer options)\n// Creates a SVG renderer with the given options.\nfunction svg(options) {\n\treturn Browser.svg || Browser.vml ? new SVG(options) : null;\n}\n\nMap.include({\n\t// @namespace Map; @method getRenderer(layer: Path): Renderer\n\t// Returns the instance of `Renderer` that should be used to render the given\n\t// `Path`. It will ensure that the `renderer` options of the map and paths\n\t// are respected, and that the renderers do exist on the map.\n\tgetRenderer: function (layer) {\n\t\t// @namespace Path; @option renderer: Renderer\n\t\t// Use this specific instance of `Renderer` for this path. Takes\n\t\t// precedence over the map's [default renderer](#map-renderer).\n\t\tvar renderer = layer.options.renderer || this._getPaneRenderer(layer.options.pane) || this.options.renderer || this._renderer;\n\n\t\tif (!renderer) {\n\t\t\trenderer = this._renderer = this._createRenderer();\n\t\t}\n\n\t\tif (!this.hasLayer(renderer)) {\n\t\t\tthis.addLayer(renderer);\n\t\t}\n\t\treturn renderer;\n\t},\n\n\t_getPaneRenderer: function (name) {\n\t\tif (name === 'overlayPane' || name === undefined) {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar renderer = this._paneRenderers[name];\n\t\tif (renderer === undefined) {\n\t\t\trenderer = this._createRenderer({pane: name});\n\t\t\tthis._paneRenderers[name] = renderer;\n\t\t}\n\t\treturn renderer;\n\t},\n\n\t_createRenderer: function (options) {\n\t\t// @namespace Map; @option preferCanvas: Boolean = false\n\t\t// Whether `Path`s should be rendered on a `Canvas` renderer.\n\t\t// By default, all `Path`s are rendered in a `SVG` renderer.\n\t\treturn (this.options.preferCanvas && canvas(options)) || svg(options);\n\t}\n});\n\n/*\n * L.Rectangle extends Polygon and creates a rectangle when passed a LatLngBounds object.\n */\n\n/*\n * @class Rectangle\n * @aka L.Rectangle\n * @inherits Polygon\n *\n * A class for drawing rectangle overlays on a map. Extends `Polygon`.\n *\n * @example\n *\n * ```js\n * // define rectangle geographical bounds\n * var bounds = [[54.559322, -5.767822], [56.1210604, -3.021240]];\n *\n * // create an orange rectangle\n * L.rectangle(bounds, {color: \"#ff7800\", weight: 1}).addTo(map);\n *\n * // zoom the map to the rectangle bounds\n * map.fitBounds(bounds);\n * ```\n *\n */\n\n\nvar Rectangle = Polygon.extend({\n\tinitialize: function (latLngBounds, options) {\n\t\tPolygon.prototype.initialize.call(this, this._boundsToLatLngs(latLngBounds), options);\n\t},\n\n\t// @method setBounds(latLngBounds: LatLngBounds): this\n\t// Redraws the rectangle with the passed bounds.\n\tsetBounds: function (latLngBounds) {\n\t\treturn this.setLatLngs(this._boundsToLatLngs(latLngBounds));\n\t},\n\n\t_boundsToLatLngs: function (latLngBounds) {\n\t\tlatLngBounds = toLatLngBounds(latLngBounds);\n\t\treturn [\n\t\t\tlatLngBounds.getSouthWest(),\n\t\t\tlatLngBounds.getNorthWest(),\n\t\t\tlatLngBounds.getNorthEast(),\n\t\t\tlatLngBounds.getSouthEast()\n\t\t];\n\t}\n});\n\n\n// @factory L.rectangle(latLngBounds: LatLngBounds, options?: Polyline options)\nfunction rectangle(latLngBounds, options) {\n\treturn new Rectangle(latLngBounds, options);\n}\n\nSVG.create = create;\nSVG.pointsToPath = pointsToPath;\n\nGeoJSON.geometryToLayer = geometryToLayer;\nGeoJSON.coordsToLatLng = coordsToLatLng;\nGeoJSON.coordsToLatLngs = coordsToLatLngs;\nGeoJSON.latLngToCoords = latLngToCoords;\nGeoJSON.latLngsToCoords = latLngsToCoords;\nGeoJSON.getFeature = getFeature;\nGeoJSON.asFeature = asFeature;\n\n/*\n * L.Handler.BoxZoom is used to add shift-drag zoom interaction to the map\n * (zoom to a selected bounding box), enabled by default.\n */\n\n// @namespace Map\n// @section Interaction Options\nMap.mergeOptions({\n\t// @option boxZoom: Boolean = true\n\t// Whether the map can be zoomed to a rectangular area specified by\n\t// dragging the mouse while pressing the shift key.\n\tboxZoom: true\n});\n\nvar BoxZoom = Handler.extend({\n\tinitialize: function (map) {\n\t\tthis._map = map;\n\t\tthis._container = map._container;\n\t\tthis._pane = map._panes.overlayPane;\n\t\tthis._resetStateTimeout = 0;\n\t\tmap.on('unload', this._destroy, this);\n\t},\n\n\taddHooks: function () {\n\t\ton(this._container, 'mousedown', this._onMouseDown, this);\n\t},\n\n\tremoveHooks: function () {\n\t\toff(this._container, 'mousedown', this._onMouseDown, this);\n\t},\n\n\tmoved: function () {\n\t\treturn this._moved;\n\t},\n\n\t_destroy: function () {\n\t\tremove(this._pane);\n\t\tdelete this._pane;\n\t},\n\n\t_resetState: function () {\n\t\tthis._resetStateTimeout = 0;\n\t\tthis._moved = false;\n\t},\n\n\t_clearDeferredResetState: function () {\n\t\tif (this._resetStateTimeout !== 0) {\n\t\t\tclearTimeout(this._resetStateTimeout);\n\t\t\tthis._resetStateTimeout = 0;\n\t\t}\n\t},\n\n\t_onMouseDown: function (e) {\n\t\tif (!e.shiftKey || ((e.which !== 1) && (e.button !== 1))) { return false; }\n\n\t\t// Clear the deferred resetState if it hasn't executed yet, otherwise it\n\t\t// will interrupt the interaction and orphan a box element in the container.\n\t\tthis._clearDeferredResetState();\n\t\tthis._resetState();\n\n\t\tdisableTextSelection();\n\t\tdisableImageDrag();\n\n\t\tthis._startPoint = this._map.mouseEventToContainerPoint(e);\n\n\t\ton(document, {\n\t\t\tcontextmenu: stop,\n\t\t\tmousemove: this._onMouseMove,\n\t\t\tmouseup: this._onMouseUp,\n\t\t\tkeydown: this._onKeyDown\n\t\t}, this);\n\t},\n\n\t_onMouseMove: function (e) {\n\t\tif (!this._moved) {\n\t\t\tthis._moved = true;\n\n\t\t\tthis._box = create$1('div', 'leaflet-zoom-box', this._container);\n\t\t\taddClass(this._container, 'leaflet-crosshair');\n\n\t\t\tthis._map.fire('boxzoomstart');\n\t\t}\n\n\t\tthis._point = this._map.mouseEventToContainerPoint(e);\n\n\t\tvar bounds = new Bounds(this._point, this._startPoint),\n\t\t size = bounds.getSize();\n\n\t\tsetPosition(this._box, bounds.min);\n\n\t\tthis._box.style.width = size.x + 'px';\n\t\tthis._box.style.height = size.y + 'px';\n\t},\n\n\t_finish: function () {\n\t\tif (this._moved) {\n\t\t\tremove(this._box);\n\t\t\tremoveClass(this._container, 'leaflet-crosshair');\n\t\t}\n\n\t\tenableTextSelection();\n\t\tenableImageDrag();\n\n\t\toff(document, {\n\t\t\tcontextmenu: stop,\n\t\t\tmousemove: this._onMouseMove,\n\t\t\tmouseup: this._onMouseUp,\n\t\t\tkeydown: this._onKeyDown\n\t\t}, this);\n\t},\n\n\t_onMouseUp: function (e) {\n\t\tif ((e.which !== 1) && (e.button !== 1)) { return; }\n\n\t\tthis._finish();\n\n\t\tif (!this._moved) { return; }\n\t\t// Postpone to next JS tick so internal click event handling\n\t\t// still see it as \"moved\".\n\t\tthis._clearDeferredResetState();\n\t\tthis._resetStateTimeout = setTimeout(bind(this._resetState, this), 0);\n\n\t\tvar bounds = new LatLngBounds(\n\t\t this._map.containerPointToLatLng(this._startPoint),\n\t\t this._map.containerPointToLatLng(this._point));\n\n\t\tthis._map\n\t\t\t.fitBounds(bounds)\n\t\t\t.fire('boxzoomend', {boxZoomBounds: bounds});\n\t},\n\n\t_onKeyDown: function (e) {\n\t\tif (e.keyCode === 27) {\n\t\t\tthis._finish();\n\t\t\tthis._clearDeferredResetState();\n\t\t\tthis._resetState();\n\t\t}\n\t}\n});\n\n// @section Handlers\n// @property boxZoom: Handler\n// Box (shift-drag with mouse) zoom handler.\nMap.addInitHook('addHandler', 'boxZoom', BoxZoom);\n\n/*\n * L.Handler.DoubleClickZoom is used to handle double-click zoom on the map, enabled by default.\n */\n\n// @namespace Map\n// @section Interaction Options\n\nMap.mergeOptions({\n\t// @option doubleClickZoom: Boolean|String = true\n\t// Whether the map can be zoomed in by double clicking on it and\n\t// zoomed out by double clicking while holding shift. If passed\n\t// `'center'`, double-click zoom will zoom to the center of the\n\t// view regardless of where the mouse was.\n\tdoubleClickZoom: true\n});\n\nvar DoubleClickZoom = Handler.extend({\n\taddHooks: function () {\n\t\tthis._map.on('dblclick', this._onDoubleClick, this);\n\t},\n\n\tremoveHooks: function () {\n\t\tthis._map.off('dblclick', this._onDoubleClick, this);\n\t},\n\n\t_onDoubleClick: function (e) {\n\t\tvar map = this._map,\n\t\t oldZoom = map.getZoom(),\n\t\t delta = map.options.zoomDelta,\n\t\t zoom = e.originalEvent.shiftKey ? oldZoom - delta : oldZoom + delta;\n\n\t\tif (map.options.doubleClickZoom === 'center') {\n\t\t\tmap.setZoom(zoom);\n\t\t} else {\n\t\t\tmap.setZoomAround(e.containerPoint, zoom);\n\t\t}\n\t}\n});\n\n// @section Handlers\n//\n// Map properties include interaction handlers that allow you to control\n// interaction behavior in runtime, enabling or disabling certain features such\n// as dragging or touch zoom (see `Handler` methods). For example:\n//\n// ```js\n// map.doubleClickZoom.disable();\n// ```\n//\n// @property doubleClickZoom: Handler\n// Double click zoom handler.\nMap.addInitHook('addHandler', 'doubleClickZoom', DoubleClickZoom);\n\n/*\n * L.Handler.MapDrag is used to make the map draggable (with panning inertia), enabled by default.\n */\n\n// @namespace Map\n// @section Interaction Options\nMap.mergeOptions({\n\t// @option dragging: Boolean = true\n\t// Whether the map is draggable with mouse/touch or not.\n\tdragging: true,\n\n\t// @section Panning Inertia Options\n\t// @option inertia: Boolean = *\n\t// If enabled, panning of the map will have an inertia effect where\n\t// the map builds momentum while dragging and continues moving in\n\t// the same direction for some time. Feels especially nice on touch\n\t// devices. Enabled by default.\n\tinertia: true,\n\n\t// @option inertiaDeceleration: Number = 3000\n\t// The rate with which the inertial movement slows down, in pixels/second².\n\tinertiaDeceleration: 3400, // px/s^2\n\n\t// @option inertiaMaxSpeed: Number = Infinity\n\t// Max speed of the inertial movement, in pixels/second.\n\tinertiaMaxSpeed: Infinity, // px/s\n\n\t// @option easeLinearity: Number = 0.2\n\teaseLinearity: 0.2,\n\n\t// TODO refactor, move to CRS\n\t// @option worldCopyJump: Boolean = false\n\t// With this option enabled, the map tracks when you pan to another \"copy\"\n\t// of the world and seamlessly jumps to the original one so that all overlays\n\t// like markers and vector layers are still visible.\n\tworldCopyJump: false,\n\n\t// @option maxBoundsViscosity: Number = 0.0\n\t// If `maxBounds` is set, this option will control how solid the bounds\n\t// are when dragging the map around. The default value of `0.0` allows the\n\t// user to drag outside the bounds at normal speed, higher values will\n\t// slow down map dragging outside bounds, and `1.0` makes the bounds fully\n\t// solid, preventing the user from dragging outside the bounds.\n\tmaxBoundsViscosity: 0.0\n});\n\nvar Drag = Handler.extend({\n\taddHooks: function () {\n\t\tif (!this._draggable) {\n\t\t\tvar map = this._map;\n\n\t\t\tthis._draggable = new Draggable(map._mapPane, map._container);\n\n\t\t\tthis._draggable.on({\n\t\t\t\tdragstart: this._onDragStart,\n\t\t\t\tdrag: this._onDrag,\n\t\t\t\tdragend: this._onDragEnd\n\t\t\t}, this);\n\n\t\t\tthis._draggable.on('predrag', this._onPreDragLimit, this);\n\t\t\tif (map.options.worldCopyJump) {\n\t\t\t\tthis._draggable.on('predrag', this._onPreDragWrap, this);\n\t\t\t\tmap.on('zoomend', this._onZoomEnd, this);\n\n\t\t\t\tmap.whenReady(this._onZoomEnd, this);\n\t\t\t}\n\t\t}\n\t\taddClass(this._map._container, 'leaflet-grab leaflet-touch-drag');\n\t\tthis._draggable.enable();\n\t\tthis._positions = [];\n\t\tthis._times = [];\n\t},\n\n\tremoveHooks: function () {\n\t\tremoveClass(this._map._container, 'leaflet-grab');\n\t\tremoveClass(this._map._container, 'leaflet-touch-drag');\n\t\tthis._draggable.disable();\n\t},\n\n\tmoved: function () {\n\t\treturn this._draggable && this._draggable._moved;\n\t},\n\n\tmoving: function () {\n\t\treturn this._draggable && this._draggable._moving;\n\t},\n\n\t_onDragStart: function () {\n\t\tvar map = this._map;\n\n\t\tmap._stop();\n\t\tif (this._map.options.maxBounds && this._map.options.maxBoundsViscosity) {\n\t\t\tvar bounds = toLatLngBounds(this._map.options.maxBounds);\n\n\t\t\tthis._offsetLimit = toBounds(\n\t\t\t\tthis._map.latLngToContainerPoint(bounds.getNorthWest()).multiplyBy(-1),\n\t\t\t\tthis._map.latLngToContainerPoint(bounds.getSouthEast()).multiplyBy(-1)\n\t\t\t\t\t.add(this._map.getSize()));\n\n\t\t\tthis._viscosity = Math.min(1.0, Math.max(0.0, this._map.options.maxBoundsViscosity));\n\t\t} else {\n\t\t\tthis._offsetLimit = null;\n\t\t}\n\n\t\tmap\n\t\t .fire('movestart')\n\t\t .fire('dragstart');\n\n\t\tif (map.options.inertia) {\n\t\t\tthis._positions = [];\n\t\t\tthis._times = [];\n\t\t}\n\t},\n\n\t_onDrag: function (e) {\n\t\tif (this._map.options.inertia) {\n\t\t\tvar time = this._lastTime = +new Date(),\n\t\t\t pos = this._lastPos = this._draggable._absPos || this._draggable._newPos;\n\n\t\t\tthis._positions.push(pos);\n\t\t\tthis._times.push(time);\n\n\t\t\tthis._prunePositions(time);\n\t\t}\n\n\t\tthis._map\n\t\t .fire('move', e)\n\t\t .fire('drag', e);\n\t},\n\n\t_prunePositions: function (time) {\n\t\twhile (this._positions.length > 1 && time - this._times[0] > 50) {\n\t\t\tthis._positions.shift();\n\t\t\tthis._times.shift();\n\t\t}\n\t},\n\n\t_onZoomEnd: function () {\n\t\tvar pxCenter = this._map.getSize().divideBy(2),\n\t\t pxWorldCenter = this._map.latLngToLayerPoint([0, 0]);\n\n\t\tthis._initialWorldOffset = pxWorldCenter.subtract(pxCenter).x;\n\t\tthis._worldWidth = this._map.getPixelWorldBounds().getSize().x;\n\t},\n\n\t_viscousLimit: function (value, threshold) {\n\t\treturn value - (value - threshold) * this._viscosity;\n\t},\n\n\t_onPreDragLimit: function () {\n\t\tif (!this._viscosity || !this._offsetLimit) { return; }\n\n\t\tvar offset = this._draggable._newPos.subtract(this._draggable._startPos);\n\n\t\tvar limit = this._offsetLimit;\n\t\tif (offset.x < limit.min.x) { offset.x = this._viscousLimit(offset.x, limit.min.x); }\n\t\tif (offset.y < limit.min.y) { offset.y = this._viscousLimit(offset.y, limit.min.y); }\n\t\tif (offset.x > limit.max.x) { offset.x = this._viscousLimit(offset.x, limit.max.x); }\n\t\tif (offset.y > limit.max.y) { offset.y = this._viscousLimit(offset.y, limit.max.y); }\n\n\t\tthis._draggable._newPos = this._draggable._startPos.add(offset);\n\t},\n\n\t_onPreDragWrap: function () {\n\t\t// TODO refactor to be able to adjust map pane position after zoom\n\t\tvar worldWidth = this._worldWidth,\n\t\t halfWidth = Math.round(worldWidth / 2),\n\t\t dx = this._initialWorldOffset,\n\t\t x = this._draggable._newPos.x,\n\t\t newX1 = (x - halfWidth + dx) % worldWidth + halfWidth - dx,\n\t\t newX2 = (x + halfWidth + dx) % worldWidth - halfWidth - dx,\n\t\t newX = Math.abs(newX1 + dx) < Math.abs(newX2 + dx) ? newX1 : newX2;\n\n\t\tthis._draggable._absPos = this._draggable._newPos.clone();\n\t\tthis._draggable._newPos.x = newX;\n\t},\n\n\t_onDragEnd: function (e) {\n\t\tvar map = this._map,\n\t\t options = map.options,\n\n\t\t noInertia = !options.inertia || e.noInertia || this._times.length < 2;\n\n\t\tmap.fire('dragend', e);\n\n\t\tif (noInertia) {\n\t\t\tmap.fire('moveend');\n\n\t\t} else {\n\t\t\tthis._prunePositions(+new Date());\n\n\t\t\tvar direction = this._lastPos.subtract(this._positions[0]),\n\t\t\t duration = (this._lastTime - this._times[0]) / 1000,\n\t\t\t ease = options.easeLinearity,\n\n\t\t\t speedVector = direction.multiplyBy(ease / duration),\n\t\t\t speed = speedVector.distanceTo([0, 0]),\n\n\t\t\t limitedSpeed = Math.min(options.inertiaMaxSpeed, speed),\n\t\t\t limitedSpeedVector = speedVector.multiplyBy(limitedSpeed / speed),\n\n\t\t\t decelerationDuration = limitedSpeed / (options.inertiaDeceleration * ease),\n\t\t\t offset = limitedSpeedVector.multiplyBy(-decelerationDuration / 2).round();\n\n\t\t\tif (!offset.x && !offset.y) {\n\t\t\t\tmap.fire('moveend');\n\n\t\t\t} else {\n\t\t\t\toffset = map._limitOffset(offset, map.options.maxBounds);\n\n\t\t\t\trequestAnimFrame(function () {\n\t\t\t\t\tmap.panBy(offset, {\n\t\t\t\t\t\tduration: decelerationDuration,\n\t\t\t\t\t\teaseLinearity: ease,\n\t\t\t\t\t\tnoMoveStart: true,\n\t\t\t\t\t\tanimate: true\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n});\n\n// @section Handlers\n// @property dragging: Handler\n// Map dragging handler (by both mouse and touch).\nMap.addInitHook('addHandler', 'dragging', Drag);\n\n/*\n * L.Map.Keyboard is handling keyboard interaction with the map, enabled by default.\n */\n\n// @namespace Map\n// @section Keyboard Navigation Options\nMap.mergeOptions({\n\t// @option keyboard: Boolean = true\n\t// Makes the map focusable and allows users to navigate the map with keyboard\n\t// arrows and `+`/`-` keys.\n\tkeyboard: true,\n\n\t// @option keyboardPanDelta: Number = 80\n\t// Amount of pixels to pan when pressing an arrow key.\n\tkeyboardPanDelta: 80\n});\n\nvar Keyboard = Handler.extend({\n\n\tkeyCodes: {\n\t\tleft: [37],\n\t\tright: [39],\n\t\tdown: [40],\n\t\tup: [38],\n\t\tzoomIn: [187, 107, 61, 171],\n\t\tzoomOut: [189, 109, 54, 173]\n\t},\n\n\tinitialize: function (map) {\n\t\tthis._map = map;\n\n\t\tthis._setPanDelta(map.options.keyboardPanDelta);\n\t\tthis._setZoomDelta(map.options.zoomDelta);\n\t},\n\n\taddHooks: function () {\n\t\tvar container = this._map._container;\n\n\t\t// make the container focusable by tabbing\n\t\tif (container.tabIndex <= 0) {\n\t\t\tcontainer.tabIndex = '0';\n\t\t}\n\n\t\ton(container, {\n\t\t\tfocus: this._onFocus,\n\t\t\tblur: this._onBlur,\n\t\t\tmousedown: this._onMouseDown\n\t\t}, this);\n\n\t\tthis._map.on({\n\t\t\tfocus: this._addHooks,\n\t\t\tblur: this._removeHooks\n\t\t}, this);\n\t},\n\n\tremoveHooks: function () {\n\t\tthis._removeHooks();\n\n\t\toff(this._map._container, {\n\t\t\tfocus: this._onFocus,\n\t\t\tblur: this._onBlur,\n\t\t\tmousedown: this._onMouseDown\n\t\t}, this);\n\n\t\tthis._map.off({\n\t\t\tfocus: this._addHooks,\n\t\t\tblur: this._removeHooks\n\t\t}, this);\n\t},\n\n\t_onMouseDown: function () {\n\t\tif (this._focused) { return; }\n\n\t\tvar body = document.body,\n\t\t docEl = document.documentElement,\n\t\t top = body.scrollTop || docEl.scrollTop,\n\t\t left = body.scrollLeft || docEl.scrollLeft;\n\n\t\tthis._map._container.focus();\n\n\t\twindow.scrollTo(left, top);\n\t},\n\n\t_onFocus: function () {\n\t\tthis._focused = true;\n\t\tthis._map.fire('focus');\n\t},\n\n\t_onBlur: function () {\n\t\tthis._focused = false;\n\t\tthis._map.fire('blur');\n\t},\n\n\t_setPanDelta: function (panDelta) {\n\t\tvar keys = this._panKeys = {},\n\t\t codes = this.keyCodes,\n\t\t i, len;\n\n\t\tfor (i = 0, len = codes.left.length; i < len; i++) {\n\t\t\tkeys[codes.left[i]] = [-1 * panDelta, 0];\n\t\t}\n\t\tfor (i = 0, len = codes.right.length; i < len; i++) {\n\t\t\tkeys[codes.right[i]] = [panDelta, 0];\n\t\t}\n\t\tfor (i = 0, len = codes.down.length; i < len; i++) {\n\t\t\tkeys[codes.down[i]] = [0, panDelta];\n\t\t}\n\t\tfor (i = 0, len = codes.up.length; i < len; i++) {\n\t\t\tkeys[codes.up[i]] = [0, -1 * panDelta];\n\t\t}\n\t},\n\n\t_setZoomDelta: function (zoomDelta) {\n\t\tvar keys = this._zoomKeys = {},\n\t\t codes = this.keyCodes,\n\t\t i, len;\n\n\t\tfor (i = 0, len = codes.zoomIn.length; i < len; i++) {\n\t\t\tkeys[codes.zoomIn[i]] = zoomDelta;\n\t\t}\n\t\tfor (i = 0, len = codes.zoomOut.length; i < len; i++) {\n\t\t\tkeys[codes.zoomOut[i]] = -zoomDelta;\n\t\t}\n\t},\n\n\t_addHooks: function () {\n\t\ton(document, 'keydown', this._onKeyDown, this);\n\t},\n\n\t_removeHooks: function () {\n\t\toff(document, 'keydown', this._onKeyDown, this);\n\t},\n\n\t_onKeyDown: function (e) {\n\t\tif (e.altKey || e.ctrlKey || e.metaKey) { return; }\n\n\t\tvar key = e.keyCode,\n\t\t map = this._map,\n\t\t offset;\n\n\t\tif (key in this._panKeys) {\n\t\t\tif (!map._panAnim || !map._panAnim._inProgress) {\n\t\t\t\toffset = this._panKeys[key];\n\t\t\t\tif (e.shiftKey) {\n\t\t\t\t\toffset = toPoint(offset).multiplyBy(3);\n\t\t\t\t}\n\n\t\t\t\tmap.panBy(offset);\n\n\t\t\t\tif (map.options.maxBounds) {\n\t\t\t\t\tmap.panInsideBounds(map.options.maxBounds);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (key in this._zoomKeys) {\n\t\t\tmap.setZoom(map.getZoom() + (e.shiftKey ? 3 : 1) * this._zoomKeys[key]);\n\n\t\t} else if (key === 27 && map._popup && map._popup.options.closeOnEscapeKey) {\n\t\t\tmap.closePopup();\n\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\n\t\tstop(e);\n\t}\n});\n\n// @section Handlers\n// @section Handlers\n// @property keyboard: Handler\n// Keyboard navigation handler.\nMap.addInitHook('addHandler', 'keyboard', Keyboard);\n\n/*\n * L.Handler.ScrollWheelZoom is used by L.Map to enable mouse scroll wheel zoom on the map.\n */\n\n// @namespace Map\n// @section Interaction Options\nMap.mergeOptions({\n\t// @section Mouse wheel options\n\t// @option scrollWheelZoom: Boolean|String = true\n\t// Whether the map can be zoomed by using the mouse wheel. If passed `'center'`,\n\t// it will zoom to the center of the view regardless of where the mouse was.\n\tscrollWheelZoom: true,\n\n\t// @option wheelDebounceTime: Number = 40\n\t// Limits the rate at which a wheel can fire (in milliseconds). By default\n\t// user can't zoom via wheel more often than once per 40 ms.\n\twheelDebounceTime: 40,\n\n\t// @option wheelPxPerZoomLevel: Number = 60\n\t// How many scroll pixels (as reported by [L.DomEvent.getWheelDelta](#domevent-getwheeldelta))\n\t// mean a change of one full zoom level. Smaller values will make wheel-zooming\n\t// faster (and vice versa).\n\twheelPxPerZoomLevel: 60\n});\n\nvar ScrollWheelZoom = Handler.extend({\n\taddHooks: function () {\n\t\ton(this._map._container, 'wheel', this._onWheelScroll, this);\n\n\t\tthis._delta = 0;\n\t},\n\n\tremoveHooks: function () {\n\t\toff(this._map._container, 'wheel', this._onWheelScroll, this);\n\t},\n\n\t_onWheelScroll: function (e) {\n\t\tvar delta = getWheelDelta(e);\n\n\t\tvar debounce = this._map.options.wheelDebounceTime;\n\n\t\tthis._delta += delta;\n\t\tthis._lastMousePos = this._map.mouseEventToContainerPoint(e);\n\n\t\tif (!this._startTime) {\n\t\t\tthis._startTime = +new Date();\n\t\t}\n\n\t\tvar left = Math.max(debounce - (+new Date() - this._startTime), 0);\n\n\t\tclearTimeout(this._timer);\n\t\tthis._timer = setTimeout(bind(this._performZoom, this), left);\n\n\t\tstop(e);\n\t},\n\n\t_performZoom: function () {\n\t\tvar map = this._map,\n\t\t zoom = map.getZoom(),\n\t\t snap = this._map.options.zoomSnap || 0;\n\n\t\tmap._stop(); // stop panning and fly animations if any\n\n\t\t// map the delta with a sigmoid function to -4..4 range leaning on -1..1\n\t\tvar d2 = this._delta / (this._map.options.wheelPxPerZoomLevel * 4),\n\t\t d3 = 4 * Math.log(2 / (1 + Math.exp(-Math.abs(d2)))) / Math.LN2,\n\t\t d4 = snap ? Math.ceil(d3 / snap) * snap : d3,\n\t\t delta = map._limitZoom(zoom + (this._delta > 0 ? d4 : -d4)) - zoom;\n\n\t\tthis._delta = 0;\n\t\tthis._startTime = null;\n\n\t\tif (!delta) { return; }\n\n\t\tif (map.options.scrollWheelZoom === 'center') {\n\t\t\tmap.setZoom(zoom + delta);\n\t\t} else {\n\t\t\tmap.setZoomAround(this._lastMousePos, zoom + delta);\n\t\t}\n\t}\n});\n\n// @section Handlers\n// @property scrollWheelZoom: Handler\n// Scroll wheel zoom handler.\nMap.addInitHook('addHandler', 'scrollWheelZoom', ScrollWheelZoom);\n\n/*\n * L.Map.TapHold is used to simulate `contextmenu` event on long hold,\n * which otherwise is not fired by mobile Safari.\n */\n\nvar tapHoldDelay = 600;\n\n// @namespace Map\n// @section Interaction Options\nMap.mergeOptions({\n\t// @section Touch interaction options\n\t// @option tapHold: Boolean\n\t// Enables simulation of `contextmenu` event, default is `true` for mobile Safari.\n\ttapHold: Browser.touchNative && Browser.safari && Browser.mobile,\n\n\t// @option tapTolerance: Number = 15\n\t// The max number of pixels a user can shift his finger during touch\n\t// for it to be considered a valid tap.\n\ttapTolerance: 15\n});\n\nvar TapHold = Handler.extend({\n\taddHooks: function () {\n\t\ton(this._map._container, 'touchstart', this._onDown, this);\n\t},\n\n\tremoveHooks: function () {\n\t\toff(this._map._container, 'touchstart', this._onDown, this);\n\t},\n\n\t_onDown: function (e) {\n\t\tclearTimeout(this._holdTimeout);\n\t\tif (e.touches.length !== 1) { return; }\n\n\t\tvar first = e.touches[0];\n\t\tthis._startPos = this._newPos = new Point(first.clientX, first.clientY);\n\n\t\tthis._holdTimeout = setTimeout(bind(function () {\n\t\t\tthis._cancel();\n\t\t\tif (!this._isTapValid()) { return; }\n\n\t\t\t// prevent simulated mouse events https://w3c.github.io/touch-events/#mouse-events\n\t\t\ton(document, 'touchend', preventDefault);\n\t\t\ton(document, 'touchend touchcancel', this._cancelClickPrevent);\n\t\t\tthis._simulateEvent('contextmenu', first);\n\t\t}, this), tapHoldDelay);\n\n\t\ton(document, 'touchend touchcancel contextmenu', this._cancel, this);\n\t\ton(document, 'touchmove', this._onMove, this);\n\t},\n\n\t_cancelClickPrevent: function cancelClickPrevent() {\n\t\toff(document, 'touchend', preventDefault);\n\t\toff(document, 'touchend touchcancel', cancelClickPrevent);\n\t},\n\n\t_cancel: function () {\n\t\tclearTimeout(this._holdTimeout);\n\t\toff(document, 'touchend touchcancel contextmenu', this._cancel, this);\n\t\toff(document, 'touchmove', this._onMove, this);\n\t},\n\n\t_onMove: function (e) {\n\t\tvar first = e.touches[0];\n\t\tthis._newPos = new Point(first.clientX, first.clientY);\n\t},\n\n\t_isTapValid: function () {\n\t\treturn this._newPos.distanceTo(this._startPos) <= this._map.options.tapTolerance;\n\t},\n\n\t_simulateEvent: function (type, e) {\n\t\tvar simulatedEvent = new MouseEvent(type, {\n\t\t\tbubbles: true,\n\t\t\tcancelable: true,\n\t\t\tview: window,\n\t\t\t// detail: 1,\n\t\t\tscreenX: e.screenX,\n\t\t\tscreenY: e.screenY,\n\t\t\tclientX: e.clientX,\n\t\t\tclientY: e.clientY,\n\t\t\t// button: 2,\n\t\t\t// buttons: 2\n\t\t});\n\n\t\tsimulatedEvent._simulated = true;\n\n\t\te.target.dispatchEvent(simulatedEvent);\n\t}\n});\n\n// @section Handlers\n// @property tapHold: Handler\n// Long tap handler to simulate `contextmenu` event (useful in mobile Safari).\nMap.addInitHook('addHandler', 'tapHold', TapHold);\n\n/*\n * L.Handler.TouchZoom is used by L.Map to add pinch zoom on supported mobile browsers.\n */\n\n// @namespace Map\n// @section Interaction Options\nMap.mergeOptions({\n\t// @section Touch interaction options\n\t// @option touchZoom: Boolean|String = *\n\t// Whether the map can be zoomed by touch-dragging with two fingers. If\n\t// passed `'center'`, it will zoom to the center of the view regardless of\n\t// where the touch events (fingers) were. Enabled for touch-capable web\n\t// browsers.\n\ttouchZoom: Browser.touch,\n\n\t// @option bounceAtZoomLimits: Boolean = true\n\t// Set it to false if you don't want the map to zoom beyond min/max zoom\n\t// and then bounce back when pinch-zooming.\n\tbounceAtZoomLimits: true\n});\n\nvar TouchZoom = Handler.extend({\n\taddHooks: function () {\n\t\taddClass(this._map._container, 'leaflet-touch-zoom');\n\t\ton(this._map._container, 'touchstart', this._onTouchStart, this);\n\t},\n\n\tremoveHooks: function () {\n\t\tremoveClass(this._map._container, 'leaflet-touch-zoom');\n\t\toff(this._map._container, 'touchstart', this._onTouchStart, this);\n\t},\n\n\t_onTouchStart: function (e) {\n\t\tvar map = this._map;\n\t\tif (!e.touches || e.touches.length !== 2 || map._animatingZoom || this._zooming) { return; }\n\n\t\tvar p1 = map.mouseEventToContainerPoint(e.touches[0]),\n\t\t p2 = map.mouseEventToContainerPoint(e.touches[1]);\n\n\t\tthis._centerPoint = map.getSize()._divideBy(2);\n\t\tthis._startLatLng = map.containerPointToLatLng(this._centerPoint);\n\t\tif (map.options.touchZoom !== 'center') {\n\t\t\tthis._pinchStartLatLng = map.containerPointToLatLng(p1.add(p2)._divideBy(2));\n\t\t}\n\n\t\tthis._startDist = p1.distanceTo(p2);\n\t\tthis._startZoom = map.getZoom();\n\n\t\tthis._moved = false;\n\t\tthis._zooming = true;\n\n\t\tmap._stop();\n\n\t\ton(document, 'touchmove', this._onTouchMove, this);\n\t\ton(document, 'touchend touchcancel', this._onTouchEnd, this);\n\n\t\tpreventDefault(e);\n\t},\n\n\t_onTouchMove: function (e) {\n\t\tif (!e.touches || e.touches.length !== 2 || !this._zooming) { return; }\n\n\t\tvar map = this._map,\n\t\t p1 = map.mouseEventToContainerPoint(e.touches[0]),\n\t\t p2 = map.mouseEventToContainerPoint(e.touches[1]),\n\t\t scale = p1.distanceTo(p2) / this._startDist;\n\n\t\tthis._zoom = map.getScaleZoom(scale, this._startZoom);\n\n\t\tif (!map.options.bounceAtZoomLimits && (\n\t\t\t(this._zoom < map.getMinZoom() && scale < 1) ||\n\t\t\t(this._zoom > map.getMaxZoom() && scale > 1))) {\n\t\t\tthis._zoom = map._limitZoom(this._zoom);\n\t\t}\n\n\t\tif (map.options.touchZoom === 'center') {\n\t\t\tthis._center = this._startLatLng;\n\t\t\tif (scale === 1) { return; }\n\t\t} else {\n\t\t\t// Get delta from pinch to center, so centerLatLng is delta applied to initial pinchLatLng\n\t\t\tvar delta = p1._add(p2)._divideBy(2)._subtract(this._centerPoint);\n\t\t\tif (scale === 1 && delta.x === 0 && delta.y === 0) { return; }\n\t\t\tthis._center = map.unproject(map.project(this._pinchStartLatLng, this._zoom).subtract(delta), this._zoom);\n\t\t}\n\n\t\tif (!this._moved) {\n\t\t\tmap._moveStart(true, false);\n\t\t\tthis._moved = true;\n\t\t}\n\n\t\tcancelAnimFrame(this._animRequest);\n\n\t\tvar moveFn = bind(map._move, map, this._center, this._zoom, {pinch: true, round: false}, undefined);\n\t\tthis._animRequest = requestAnimFrame(moveFn, this, true);\n\n\t\tpreventDefault(e);\n\t},\n\n\t_onTouchEnd: function () {\n\t\tif (!this._moved || !this._zooming) {\n\t\t\tthis._zooming = false;\n\t\t\treturn;\n\t\t}\n\n\t\tthis._zooming = false;\n\t\tcancelAnimFrame(this._animRequest);\n\n\t\toff(document, 'touchmove', this._onTouchMove, this);\n\t\toff(document, 'touchend touchcancel', this._onTouchEnd, this);\n\n\t\t// Pinch updates GridLayers' levels only when zoomSnap is off, so zoomSnap becomes noUpdate.\n\t\tif (this._map.options.zoomAnimation) {\n\t\t\tthis._map._animateZoom(this._center, this._map._limitZoom(this._zoom), true, this._map.options.zoomSnap);\n\t\t} else {\n\t\t\tthis._map._resetView(this._center, this._map._limitZoom(this._zoom));\n\t\t}\n\t}\n});\n\n// @section Handlers\n// @property touchZoom: Handler\n// Touch zoom handler.\nMap.addInitHook('addHandler', 'touchZoom', TouchZoom);\n\nMap.BoxZoom = BoxZoom;\nMap.DoubleClickZoom = DoubleClickZoom;\nMap.Drag = Drag;\nMap.Keyboard = Keyboard;\nMap.ScrollWheelZoom = ScrollWheelZoom;\nMap.TapHold = TapHold;\nMap.TouchZoom = TouchZoom;\n\nvar L$1 = {\n __proto__: null,\n version: version,\n Control: Control,\n control: control,\n Class: Class,\n Handler: Handler,\n extend: extend,\n bind: bind,\n stamp: stamp,\n setOptions: setOptions,\n Browser: Browser,\n Evented: Evented,\n Mixin: Mixin,\n Util: Util,\n PosAnimation: PosAnimation,\n Draggable: Draggable,\n DomEvent: DomEvent,\n DomUtil: DomUtil,\n Point: Point,\n point: toPoint,\n Bounds: Bounds,\n bounds: toBounds,\n Transformation: Transformation,\n transformation: toTransformation,\n LineUtil: LineUtil,\n PolyUtil: PolyUtil,\n LatLng: LatLng,\n latLng: toLatLng,\n LatLngBounds: LatLngBounds,\n latLngBounds: toLatLngBounds,\n CRS: CRS,\n Projection: index,\n Layer: Layer,\n LayerGroup: LayerGroup,\n layerGroup: layerGroup,\n FeatureGroup: FeatureGroup,\n featureGroup: featureGroup,\n ImageOverlay: ImageOverlay,\n imageOverlay: imageOverlay,\n VideoOverlay: VideoOverlay,\n videoOverlay: videoOverlay,\n SVGOverlay: SVGOverlay,\n svgOverlay: svgOverlay,\n DivOverlay: DivOverlay,\n Popup: Popup,\n popup: popup,\n Tooltip: Tooltip,\n tooltip: tooltip,\n icon: icon,\n DivIcon: DivIcon,\n divIcon: divIcon,\n Marker: Marker,\n marker: marker,\n Icon: Icon,\n GridLayer: GridLayer,\n gridLayer: gridLayer,\n TileLayer: TileLayer,\n tileLayer: tileLayer,\n Renderer: Renderer,\n Canvas: Canvas,\n canvas: canvas,\n Path: Path,\n CircleMarker: CircleMarker,\n circleMarker: circleMarker,\n Circle: Circle,\n circle: circle,\n Polyline: Polyline,\n polyline: polyline,\n Polygon: Polygon,\n polygon: polygon,\n Rectangle: Rectangle,\n rectangle: rectangle,\n SVG: SVG,\n svg: svg,\n GeoJSON: GeoJSON,\n geoJSON: geoJSON,\n geoJson: geoJson,\n Map: Map,\n map: createMap\n};\n\nvar globalL = extend(L$1, {noConflict: noConflict});\n\nvar globalObject = getGlobalObject();\nvar oldL = globalObject.L;\n\nglobalObject.L = globalL;\n\nfunction noConflict() {\n\tglobalObject.L = oldL;\n\treturn globalL;\n}\n\nfunction getGlobalObject() {\n\tif (typeof globalThis !== 'undefined') { return globalThis; }\n\tif (typeof self !== 'undefined') { return self; }\n\tif (typeof window !== 'undefined') { return window; }\n\tif (typeof global !== 'undefined') { return global; }\n\n\tthrow new Error('Unable to locate global object.');\n}\n\nexport { Bounds, Browser, CRS, Canvas, Circle, CircleMarker, Class, Control, DivIcon, DivOverlay, DomEvent, DomUtil, Draggable, Evented, FeatureGroup, GeoJSON, GridLayer, Handler, Icon, ImageOverlay, LatLng, LatLngBounds, Layer, LayerGroup, LineUtil, Map, Marker, Mixin, Path, Point, PolyUtil, Polygon, Polyline, Popup, PosAnimation, index as Projection, Rectangle, Renderer, SVG, SVGOverlay, TileLayer, Tooltip, Transformation, Util, VideoOverlay, bind, toBounds as bounds, canvas, circle, circleMarker, control, globalL as default, divIcon, extend, featureGroup, geoJSON, geoJson, gridLayer, icon, imageOverlay, toLatLng as latLng, toLatLngBounds as latLngBounds, layerGroup, createMap as map, marker, noConflict, toPoint as point, polygon, polyline, popup, rectangle, setOptions, stamp, svg, svgOverlay, tileLayer, tooltip, toTransformation as transformation, version, videoOverlay };\n//# sourceMappingURL=leaflet-src.esm.js.map\n","<script>\n\n import { map_store } from '../lib/stores.js';\n let last_click_latlng;\n\n let map_center;\n let map_zoom;\n let map_viewbox;\n let view_on_osm_link;\n let last_click;\n let mouse_position;\n\n function map_link_to_osm(map) {\n var zoom = map.getZoom();\n var lat = map.getCenter().lat.toFixed(5);\n var lng = map.getCenter().lng.toFixed(5);\n return 'https://openstreetmap.org/#map=' + zoom + '/' + lat + '/' + lng;\n }\n\n function map_viewbox_as_string(map) {\n var bounds = map.getBounds();\n var west = bounds.getWest();\n var east = bounds.getEast();\n\n if ((east - west) >= 360) { // covers more than whole planet\n west = map.getCenter().lng - 179.999;\n east = map.getCenter().lng + 179.999;\n }\n east = L.latLng(77, east).wrap().lng;\n west = L.latLng(77, west).wrap().lng;\n\n return [\n west.toFixed(5), // left\n bounds.getNorth().toFixed(5), // top\n east.toFixed(5), // right\n bounds.getSouth().toFixed(5) // bottom\n ].join(',');\n }\n\n function display_map_position(map, mouse_lat_lng) {\n map_center = map.getCenter().lat.toFixed(5) + ',' + map.getCenter().lng.toFixed(5);\n view_on_osm_link = map_link_to_osm(map);\n map_zoom = map.getZoom();\n map_viewbox = map_viewbox_as_string(map);\n mouse_position = '-';\n if (mouse_lat_lng) {\n mouse_position = [mouse_lat_lng.lat.toFixed(5), mouse_lat_lng.lng.toFixed(5)].join(',');\n }\n if (last_click_latlng) {\n last_click = [last_click_latlng.lat.toFixed(5), last_click_latlng.lng.toFixed(5)].join(',');\n }\n }\n\n\n map_store.subscribe(map => {\n if (!map) return;\n\n map.on('move', function () {\n display_map_position(map);\n // update_viewbox_field();\n });\n\n map.on('mousemove', function (e) {\n display_map_position(map, e.latlng);\n });\n\n map.on('click', function (e) {\n last_click_latlng = e.latlng;\n display_map_position(map);\n });\n\n map.on('load', function () {\n display_map_position(map);\n });\n });\n\n function handleHideClick() {\n document.getElementById('map-position').style.display = 'none';\n document.getElementById('show-map-position').style.display = 'block';\n }\n\n</script>\n\n<div id=\"map-position\">\n <div id=\"map-position-inner\">\n map center: {map_center}\n <a target=\"_blank\" href=\"{view_on_osm_link}\">view on osm.org</a>\n <br>\n map zoom: {map_zoom}\n <br>\n viewbox: {map_viewbox}\n <br>\n last click: {last_click}\n <br>\n mouse position: {mouse_position}\n </div>\n <div id=\"map-position-close\"><a href=\"#hide\" on:click={handleHideClick}>hide</a></div>\n</div>\n\n\n<style>\n #map-position {\n display: none;\n position: absolute;\n top: 0;\n right: 20px;\n padding: 0 5px;\n color: #333;\n font-size: 11px;\n background-color: rgba(255, 255, 255, 0.7);\n z-index: 1000;\n }\n\n #map-position-close {\n text-align: right;\n }\n\n \n \n\n @media (max-width: 768px) {\n #map-position {\n top: 20px;\n right: 20px;\n }\n }\n</style>\n","(function(factory,window){if(typeof define===\"function\"&&define.amd){define([\"leaflet\"],factory)}else if(typeof exports===\"object\"){module.exports=factory(require(\"leaflet\"))}if(typeof window!==\"undefined\"&&window.L){window.L.Control.MiniMap=factory(L);window.L.control.minimap=function(layer,options){return new window.L.Control.MiniMap(layer,options)}}})(function(L){var MiniMap=L.Control.extend({includes:L.Evented?L.Evented.prototype:L.Mixin.Events,options:{position:\"bottomright\",toggleDisplay:false,zoomLevelOffset:-5,zoomLevelFixed:false,centerFixed:false,zoomAnimation:false,autoToggleDisplay:false,minimized:false,width:150,height:150,collapsedWidth:19,collapsedHeight:19,aimingRectOptions:{color:\"#ff7800\",weight:1,clickable:false},shadowRectOptions:{color:\"#000000\",weight:1,clickable:false,opacity:0,fillOpacity:0},strings:{hideText:\"Hide MiniMap\",showText:\"Show MiniMap\"},mapOptions:{}},initialize:function(layer,options){L.Util.setOptions(this,options);this.options.aimingRectOptions.clickable=false;this.options.shadowRectOptions.clickable=false;this._layer=layer},onAdd:function(map){this._mainMap=map;this._container=L.DomUtil.create(\"div\",\"leaflet-control-minimap\");this._container.style.width=this.options.width+\"px\";this._container.style.height=this.options.height+\"px\";L.DomEvent.disableClickPropagation(this._container);L.DomEvent.on(this._container,\"mousewheel\",L.DomEvent.stopPropagation);var mapOptions={attributionControl:false,dragging:!this.options.centerFixed,zoomControl:false,zoomAnimation:this.options.zoomAnimation,autoToggleDisplay:this.options.autoToggleDisplay,touchZoom:this.options.centerFixed?\"center\":!this._isZoomLevelFixed(),scrollWheelZoom:this.options.centerFixed?\"center\":!this._isZoomLevelFixed(),doubleClickZoom:this.options.centerFixed?\"center\":!this._isZoomLevelFixed(),boxZoom:!this._isZoomLevelFixed(),crs:map.options.crs};mapOptions=L.Util.extend(this.options.mapOptions,mapOptions);this._miniMap=new L.Map(this._container,mapOptions);this._miniMap.addLayer(this._layer);this._mainMapMoving=false;this._miniMapMoving=false;this._userToggledDisplay=false;this._minimized=false;if(this.options.toggleDisplay){this._addToggleButton()}this._miniMap.whenReady(L.Util.bind(function(){this._aimingRect=L.rectangle(this._mainMap.getBounds(),this.options.aimingRectOptions).addTo(this._miniMap);this._shadowRect=L.rectangle(this._mainMap.getBounds(),this.options.shadowRectOptions).addTo(this._miniMap);this._mainMap.on(\"moveend\",this._onMainMapMoved,this);this._mainMap.on(\"move\",this._onMainMapMoving,this);this._miniMap.on(\"movestart\",this._onMiniMapMoveStarted,this);this._miniMap.on(\"move\",this._onMiniMapMoving,this);this._miniMap.on(\"moveend\",this._onMiniMapMoved,this)},this));return this._container},addTo:function(map){L.Control.prototype.addTo.call(this,map);var center=this.options.centerFixed||this._mainMap.getCenter();this._miniMap.setView(center,this._decideZoom(true));this._setDisplay(this.options.minimized);return this},onRemove:function(map){this._mainMap.off(\"moveend\",this._onMainMapMoved,this);this._mainMap.off(\"move\",this._onMainMapMoving,this);this._miniMap.off(\"moveend\",this._onMiniMapMoved,this);this._miniMap.removeLayer(this._layer)},changeLayer:function(layer){this._miniMap.removeLayer(this._layer);this._layer=layer;this._miniMap.addLayer(this._layer)},_addToggleButton:function(){this._toggleDisplayButton=this.options.toggleDisplay?this._createButton(\"\",this._toggleButtonInitialTitleText(),\"leaflet-control-minimap-toggle-display leaflet-control-minimap-toggle-display-\"+this.options.position,this._container,this._toggleDisplayButtonClicked,this):undefined;this._toggleDisplayButton.style.width=this.options.collapsedWidth+\"px\";this._toggleDisplayButton.style.height=this.options.collapsedHeight+\"px\"},_toggleButtonInitialTitleText:function(){if(this.options.minimized){return this.options.strings.showText}else{return this.options.strings.hideText}},_createButton:function(html,title,className,container,fn,context){var link=L.DomUtil.create(\"a\",className,container);link.innerHTML=html;link.href=\"#\";link.title=title;var stop=L.DomEvent.stopPropagation;L.DomEvent.on(link,\"click\",stop).on(link,\"mousedown\",stop).on(link,\"dblclick\",stop).on(link,\"click\",L.DomEvent.preventDefault).on(link,\"click\",fn,context);return link},_toggleDisplayButtonClicked:function(){this._userToggledDisplay=true;if(!this._minimized){this._minimize()}else{this._restore()}},_setDisplay:function(minimize){if(minimize!==this._minimized){if(!this._minimized){this._minimize()}else{this._restore()}}},_minimize:function(){if(this.options.toggleDisplay){this._container.style.width=this.options.collapsedWidth+\"px\";this._container.style.height=this.options.collapsedHeight+\"px\";this._toggleDisplayButton.className+=\" minimized-\"+this.options.position;this._toggleDisplayButton.title=this.options.strings.showText}else{this._container.style.display=\"none\"}this._minimized=true;this._onToggle()},_restore:function(){if(this.options.toggleDisplay){this._container.style.width=this.options.width+\"px\";this._container.style.height=this.options.height+\"px\";this._toggleDisplayButton.className=this._toggleDisplayButton.className.replace(\"minimized-\"+this.options.position,\"\");this._toggleDisplayButton.title=this.options.strings.hideText}else{this._container.style.display=\"block\"}this._minimized=false;this._onToggle()},_onMainMapMoved:function(e){if(!this._miniMapMoving){var center=this.options.centerFixed||this._mainMap.getCenter();this._mainMapMoving=true;this._miniMap.setView(center,this._decideZoom(true));this._setDisplay(this._decideMinimized())}else{this._miniMapMoving=false}this._aimingRect.setBounds(this._mainMap.getBounds())},_onMainMapMoving:function(e){this._aimingRect.setBounds(this._mainMap.getBounds())},_onMiniMapMoveStarted:function(e){if(!this.options.centerFixed){var lastAimingRect=this._aimingRect.getBounds();var sw=this._miniMap.latLngToContainerPoint(lastAimingRect.getSouthWest());var ne=this._miniMap.latLngToContainerPoint(lastAimingRect.getNorthEast());this._lastAimingRectPosition={sw:sw,ne:ne}}},_onMiniMapMoving:function(e){if(!this.options.centerFixed){if(!this._mainMapMoving&&this._lastAimingRectPosition){this._shadowRect.setBounds(new L.LatLngBounds(this._miniMap.containerPointToLatLng(this._lastAimingRectPosition.sw),this._miniMap.containerPointToLatLng(this._lastAimingRectPosition.ne)));this._shadowRect.setStyle({opacity:1,fillOpacity:.3})}}},_onMiniMapMoved:function(e){if(!this._mainMapMoving){this._miniMapMoving=true;this._mainMap.setView(this._miniMap.getCenter(),this._decideZoom(false));this._shadowRect.setStyle({opacity:0,fillOpacity:0})}else{this._mainMapMoving=false}},_isZoomLevelFixed:function(){var zoomLevelFixed=this.options.zoomLevelFixed;return this._isDefined(zoomLevelFixed)&&this._isInteger(zoomLevelFixed)},_decideZoom:function(fromMaintoMini){if(!this._isZoomLevelFixed()){if(fromMaintoMini){return this._mainMap.getZoom()+this.options.zoomLevelOffset}else{var currentDiff=this._miniMap.getZoom()-this._mainMap.getZoom();var proposedZoom=this._miniMap.getZoom()-this.options.zoomLevelOffset;var toRet;if(currentDiff>this.options.zoomLevelOffset&&this._mainMap.getZoom()<this._miniMap.getMinZoom()-this.options.zoomLevelOffset){if(this._miniMap.getZoom()>this._lastMiniMapZoom){toRet=this._mainMap.getZoom()+1;this._miniMap.setZoom(this._miniMap.getZoom()-1)}else{toRet=this._mainMap.getZoom()}}else{toRet=proposedZoom}this._lastMiniMapZoom=this._miniMap.getZoom();return toRet}}else{if(fromMaintoMini){return this.options.zoomLevelFixed}else{return this._mainMap.getZoom()}}},_decideMinimized:function(){if(this._userToggledDisplay){return this._minimized}if(this.options.autoToggleDisplay){if(this._mainMap.getBounds().contains(this._miniMap.getBounds())){return true}return false}return this._minimized},_isInteger:function(value){return typeof value===\"number\"},_isDefined:function(value){return typeof value!==\"undefined\"},_onToggle:function(){L.Util.requestAnimFrame(function(){L.DomEvent.on(this._container,\"transitionend\",this._fireToggleEvents,this);if(!L.Browser.any3d){L.Util.requestAnimFrame(this._fireToggleEvents,this)}},this)},_fireToggleEvents:function(){L.DomEvent.off(this._container,\"transitionend\",this._fireToggleEvents,this);var data={minimized:this._minimized};this.fire(this._minimized?\"minimize\":\"restore\",data);this.fire(\"toggle\",data)}});L.Map.mergeOptions({miniMapControl:false});L.Map.addInitHook(function(){if(this.options.miniMapControl){this.miniMapControl=(new MiniMap).addTo(this)}});return MiniMap},window);","\n<script>\n import * as L from 'leaflet';\n import 'leaflet-minimap';\n import 'leaflet/dist/leaflet.css';\n import 'leaflet-minimap/dist/Control.MiniMap.min.css';\n\n import { get } from 'svelte/store';\n import { map_store } from '../lib/stores.js';\n import MapPosition from '../components/MapPosition.svelte';\n\n export let display_minimap = false;\n export let current_result = null;\n export let position_marker = null;\n\n let dataLayers = [];\n\n function createMap(container) {\n const attribution = Nominatim_Config.Map_Tile_Attribution;\n\n let map = new L.map(container, {\n attributionControl: false,\n scrollWheelZoom: true, // !L.Browser.touch,\n touchZoom: false,\n center: [\n Nominatim_Config.Map_Default_Lat,\n Nominatim_Config.Map_Default_Lon\n ],\n zoom: Nominatim_Config.Map_Default_Zoom\n });\n\n if (attribution && attribution.length) {\n L.control.attribution({ prefix: '<a href=\"https://leafletjs.com/\">Leaflet</a>' }).addTo(map);\n }\n\n L.tileLayer(Nominatim_Config.Map_Tile_URL, {\n attribution: attribution\n }).addTo(map);\n\n if (display_minimap) {\n let osm2 = new L.TileLayer(Nominatim_Config.Map_Tile_URL, {\n minZoom: 0,\n maxZoom: 13,\n attribution: attribution\n });\n new L.Control.MiniMap(osm2, { toggleDisplay: true }).addTo(map);\n }\n\n const MapPositionControl = L.Control.extend({\n options: { position: 'topright' },\n onAdd: () => { return document.getElementById('show-map-position'); }\n });\n map.addControl(new MapPositionControl());\n\n return map;\n }\n\n function mapAction(container) {\n let map = createMap(container);\n map_store.set(map);\n setMapData(current_result);\n\n return {\n destroy: () => {\n map_store.set(null);\n map.remove();\n }\n };\n }\n\n function parse_and_normalize_geojson_string(part) {\n // normalize places the geometry into a featurecollection, similar to\n // https://github.com/mapbox/geojson-normalize\n var parsed_geojson = {\n type: 'FeatureCollection',\n features: [\n {\n type: 'Feature',\n geometry: part,\n properties: {}\n }\n ]\n };\n return parsed_geojson;\n }\n\n function resetMapData() {\n let map = get(map_store);\n if (!map) { return; }\n\n dataLayers.forEach(function (layer) {\n map.removeLayer(layer);\n });\n }\n\n function setMapData(aFeature) {\n let map = get(map_store);\n if (!map) { return; }\n\n resetMapData();\n\n if (position_marker) {\n // We don't need a marker, but L.circle would change radius when you zoom in/out\n let cm = L.circleMarker(\n position_marker,\n {\n radius: 5,\n weight: 2,\n fillColor: '#ff7800',\n color: 'red',\n opacity: 0.75,\n zIndexOffset: 100,\n clickable: false\n }\n );\n cm.bindTooltip(`Search (${position_marker[0]},${position_marker[1]})`).openTooltip();\n cm.addTo(map);\n dataLayers.push(cm);\n }\n\n var search_params = new URLSearchParams(window.location.search);\n var viewbox = search_params.get('viewbox');\n if (viewbox) {\n let coords = viewbox.split(','); // <x1>,<y1>,<x2>,<y2>\n let bounds = L.latLngBounds([coords[1], coords[0]], [coords[3], coords[2]]);\n L.rectangle(bounds, {\n color: '#69d53e',\n weight: 3,\n dashArray: '5 5',\n opacity: 0.8,\n fill: false\n }).addTo(map);\n }\n\n if (!aFeature) return;\n\n let lat = aFeature.centroid ? aFeature.centroid.coordinates[1] : aFeature.lat;\n let lon = aFeature.centroid ? aFeature.centroid.coordinates[0] : aFeature.lon;\n let geojson = aFeature.geometry || aFeature.geojson;\n\n if (lat && lon) {\n let circle = L.circleMarker([lat, lon], {\n radius: 10, weight: 2, fillColor: '#ff7800', color: 'blue', opacity: 0.75\n });\n if (position_marker) { // reverse result\n circle.bindTooltip('Result').openTooltip();\n }\n map.addLayer(circle);\n dataLayers.push(circle);\n }\n\n\n if (geojson) {\n var geojson_layer = L.geoJson(\n // https://leafletjs.com/reference-1.7.1.html#path-option\n parse_and_normalize_geojson_string(geojson),\n {\n style: function () {\n return { interactive: false, color: 'blue' };\n }\n }\n );\n map.addLayer(geojson_layer);\n dataLayers.push(geojson_layer);\n map.fitBounds(geojson_layer.getBounds());\n } else if (lat && lon && position_marker) {\n map.fitBounds([[lat, lon], position_marker], { padding: [50, 50] });\n } else if (lat && lon) {\n map.setView([lat, lon], 10);\n }\n }\n\n $: setMapData(current_result);\n\n function show_map_position_click(e) {\n e.target.style.display = 'none';\n document.getElementById('map-position').style.display = 'block';\n }\n</script>\n\n<MapPosition />\n<div id=\"map\" use:mapAction />\n<div id=\"show-map-position\" class=\"leaflet-bar btn btn-sm btn-outline-secondary\"\n on:click|stopPropagation={show_map_position_click}\n>show map bounds</div>\n\n<style>\n #map {\n height: 100%;\n background:#eee;\n }\n\n .btn-outline-secondary {\n background-color: white;\n }\n\n .btn-outline-secondary:hover {\n color: #111;\n }\n\n @media (max-width: 768px) {\n #map {\n height: 300px;\n }\n }\n\n</style>\n","<script>\n import { page, results_store } from '../lib/stores.js';\n import { fetch_from_api, update_html_title } from '../lib/api_utils.js';\n\n import Header from '../components/Header.svelte';\n import SearchSection from '../components/SearchSection.svelte';\n import ResultsList from '../components/ResultsList.svelte';\n import Map from '../components/Map.svelte';\n\n let api_request_params;\n let bStructuredSearch;\n let current_result;\n\n function loaddata(search_params) {\n update_html_title();\n\n api_request_params = {\n q: search_params.get('q'),\n street: search_params.get('street'),\n city: search_params.get('city'),\n county: search_params.get('county'),\n state: search_params.get('state'),\n country: search_params.get('country'),\n postalcode: search_params.get('postalcode'),\n polygon_geojson: Nominatim_Config.Search_AreaPolygons ? 1 : 0,\n viewbox: search_params.get('viewbox'),\n bounded: search_params.get('bounded'),\n dedupe: (!search_params.has('dedupe') || search_params.get('dedupe') === '1') ? 1 : 0,\n 'accept-language': search_params.get('accept-language'),\n countrycodes: search_params.get('countrycodes'),\n limit: search_params.get('limit'),\n polygon_threshold: search_params.get('polygon_threshold'),\n exclude_place_ids: search_params.get('exclude_place_ids'),\n format: 'jsonv2'\n };\n\n let anyStructuredFieldsSet = (api_request_params.street\n || api_request_params.city\n || api_request_params.county\n || api_request_params.state\n || api_request_params.country\n || api_request_params.postalcode);\n\n if (api_request_params.q || anyStructuredFieldsSet) {\n fetch_from_api('search', api_request_params, function (data) {\n results_store.set(data);\n\n update_html_title('Result for ' + api_request_params.q);\n\n if (anyStructuredFieldsSet) {\n document.querySelector(\".nav-tabs a[href='#structured']\").click();\n document.querySelector('input[name=street]').focus();\n } else {\n document.querySelector('input[name=q]').focus();\n }\n });\n } else {\n results_store.set(undefined);\n }\n }\n\n $: {\n let pageinfo = $page;\n if (pageinfo.tab === 'search') {\n loaddata(pageinfo.params);\n }\n }\n</script>\n\n<Header>\n <SearchSection api_request_params={api_request_params} bStructuredSearch={bStructuredSearch} />\n</Header>\n\n<div id=\"content\">\n <div class=\"sidebar\">\n <ResultsList bind:current_result reverse_search={false} />\n </div>\n <div id=\"map-wrapper\">\n <Map {current_result} display_minimap={true} />\n </div>\n</div>\n\n\n<style>\n .sidebar {\n width: 25%;\n min-width: 200px;\n padding: 15px;\n padding-top: 0;\n display: block;\n float: left;\n }\n\n #map-wrapper {\n position: relative;\n height: calc(100vh - 250pt);\n min-height: 300px;\n width: 75%;\n padding-right: 20px;\n display: block;\n float: left;\n }\n\n @media (max-width: 768px) {\n #content {\n top: 0;\n position: relative;\n }\n .sidebar {\n width: 100%;\n }\n #map-wrapper {\n width: 100%;\n height: 300px;\n padding-left: 20px;\n }\n }\n</style>\n","<script>\n import UrlSubmitForm from '../components/UrlSubmitForm.svelte';\n\n import { zoomLevels } from '../lib/helpers.js';\n import { map_store, refresh_page } from '../lib/stores.js';\n\n export let lat = '';\n export let lon = '';\n export let zoom = '';\n\n function gotoCoordinates(newlat, newlon, newzoom) {\n if (newlat === null || newlon === null) return;\n\n let params = new URLSearchParams();\n params.set('lat', newlat);\n params.set('lon', newlon);\n params.set('zoom', newzoom || zoom);\n refresh_page('reverse', params);\n }\n\n map_store.subscribe(map => {\n if (map) {\n map.on('click', (e) => {\n let coords = e.latlng.wrap();\n gotoCoordinates(coords.lat.toFixed(5), coords.lng.toFixed(5));\n });\n }\n });\n\n // common mistake is to copy&paste latitude and longitude into the 'lat' search box\n function maybeSplitLatitude(e) {\n var coords_split = e.target.value.split(',');\n if (coords_split.length === 2) {\n document.querySelector('input[name=lat]').value = L.Util.trim(coords_split[0]);\n document.querySelector('input[name=lon]').value = L.Util.trim(coords_split[1]);\n }\n }\n\n</script>\n\n<UrlSubmitForm page=\"reverse\">\n <div class=\"col-auto\">\n <label for=\"reverse-lat\">lat</label>\n </div>\n <div class=\"col-auto\">\n <input id=\"reverse-lat\"\n name=\"lat\"\n type=\"text\"\n class=\"form-control form-control-sm d-inline\"\n placeholder=\"latitude\"\n pattern=\"^-?\\d+(\\.\\d+)?$\"\n bind:value={lat}\n on:change={maybeSplitLatitude} />\n </div>\n <div class=\"col-auto\">\n <a id=\"switch-coords\"\n on:click|preventDefault|stopPropagation={() => gotoCoordinates(lon, lat)}\n class=\"btn btn-outline-secondary btn-sm\"\n title=\"switch lat and lon\"><></a>\n </div>\n <div class=\"col-auto\">\n <label for=\"reverse-lon\">lon</label>\n </div>\n <div class=\"col-auto\">\n <input id=\"reverse-lon\"\n name=\"lon\"\n type=\"text\"\n class=\"form-control form-control-sm\"\n placeholder=\"longitude\"\n pattern=\"^-?\\d+(\\.\\d+)?$\"\n bind:value={lon} />\n </div>\n <div class=\"col-auto\">\n <label for=\"reverse-zoom\">max zoom</label>\n </div>\n <div class=\"col-auto\">\n <select id=\"reverse-zoom\" name=\"zoom\" class=\"form-select form-select-sm\" bind:value={zoom}>\n <option value=\"\">---</option>\n {#each zoomLevels() as zoomTitle, i}\n <option value=\"{i}\">{i} - {zoomTitle}</option>\n {/each}\n </select>\n </div>\n <div class=\"col-auto\">\n <button type=\"submit\" class=\"btn btn-primary btn-sm mx-1\">Search</button>\n </div>\n</UrlSubmitForm>\n\n<style>\n label {\n font-size: 0.9rem;\n margin-top: 0.3rem;\n }\n\n #switch-coords {\n font-size: 0.6rem;\n font-weight: bold;\n cursor: pointer;\n padding: 2px;\n margin: 5px;\n }\n\n @media (max-width: 850px) {\n #reverse-lon, #reverse-lat, #reverse-zoom {\n width: 8em;\n }\n }\n</style>\n","<script>\n import { page, results_store } from '../lib/stores.js';\n import { fetch_from_api, update_html_title } from '../lib/api_utils.js';\n\n import Header from '../components/Header.svelte';\n import SearchSectionReverse from '../components/SearchSectionReverse.svelte';\n import ResultsList from '../components/ResultsList.svelte';\n import Map from '../components/Map.svelte';\n\n let api_request_params;\n let current_result;\n let position_marker; // what the user searched for\n\n function loaddata(search_params) {\n update_html_title();\n\n api_request_params = {\n lat: search_params.get('lat'),\n lon: search_params.get('lon'),\n zoom: (search_params.get('zoom') > 1\n ? Number(search_params.get('zoom'))\n : Number(Nominatim_Config.Reverse_Default_Search_Zoom)),\n format: 'jsonv2'\n };\n\n if (api_request_params.lat || api_request_params.lat) {\n\n fetch_from_api('reverse', api_request_params, function (data) {\n if (data && !data.error) {\n position_marker = [api_request_params.lat, api_request_params.lon];\n results_store.set([data]);\n } else {\n results_store.set([]);\n }\n\n update_html_title('Reverse result for '\n + api_request_params.lat\n + ','\n + api_request_params.lon);\n document.querySelector('input[name=lat]').focus();\n });\n } else {\n results_store.set(undefined);\n }\n }\n\n $: {\n let pageinfo = $page;\n if (pageinfo.tab === 'reverse') {\n loaddata(pageinfo.params);\n }\n }\n</script>\n\n<Header>\n <SearchSectionReverse {...api_request_params} />\n</Header>\n\n<div id=\"content\">\n <div class=\"sidebar\">\n <ResultsList bind:current_result reverse_search={true} />\n </div>\n <div id=\"map-wrapper\">\n <Map {current_result} {position_marker} display_minimap={true} />\n </div>\n</div>\n\n\n<style>\n .sidebar {\n width: 25%;\n min-width: 200px;\n padding: 15px;\n padding-top: 0;\n display: block;\n float: left;\n }\n\n #map-wrapper {\n position: relative;\n height: calc(100vh - 250pt);\n min-height: 300px;\n width: 75%;\n padding-right: 20px;\n display: block;\n float: left;\n }\n\n @media (max-width: 768px) {\n #content {\n top: 0;\n position: relative;\n }\n .sidebar {\n width: 100%;\n }\n #map-wrapper {\n width: 100%;\n height: 300px;\n padding-left: 20px;\n }\n }\n</style>\n","<script>\n import { refresh_page } from '../lib/stores.js';\n\n export let api_request_params = {};\n\n function handleFormSubmit(event) {\n let form_el = event.target;\n let val = form_el.querySelector('input[type=edit]').value.trim();\n let type_and_id_match = val.match(/^\\s*([NWR])(\\d+)\\s*$/i)\n || val.match(/\\/(relation|way|node)\\/(\\d+)\\s*$/);\n\n var params = new URLSearchParams();\n if (type_and_id_match) {\n params.set('osmtype', type_and_id_match[1].charAt(0).toUpperCase());\n params.set('osmid', type_and_id_match[2]);\n } else if (val.match(/^\\d+$/)) {\n params.set('place_id', val);\n } else {\n alert('invalid input');\n return;\n }\n\n refresh_page('details', params);\n }\n</script>\n\n<form on:submit|preventDefault={handleFormSubmit} class=\"form-inline\" action=\"details.html\">\n <div class=\"row g-1\">\n <div class=\"col-auto\">\n <input type=\"edit\"\n class=\"form-control form-control-sm me-1\"\n pattern=\"^[NWRnwr]?[0-9]+$|.*openstreetmap.*\"\n value=\"{api_request_params.osmtype || ''}{api_request_params.osmid || ''}{api_request_params.place_id || ''}\" />\n </div>\n <div class=\"col-auto\">\n <button type=\"submit\" class=\"btn btn-primary btn-sm\">Show</button>\n </div>\n </div>\n</form>\n<small class=\"form-text text-muted\">\n OSM type+id (<em>N123</em>, <em>n123</em>, <em>W123</em>, <em>w123</em>, <em>R123</em>, <em>r123</em>),\n Place id (<em>1234</em>) or\n URL (<em>https://openstreetmap.org/way/123</em>)\n</small>\n\n<style>\n form .form-control{\n width: 500px;\n max-width: 100%;\n }\n .form-text em {\n font-family: monospace;\n font-style: normal;\n }\n</style>\n","<script>\n import DetailsLink from '../components/DetailsLink.svelte';\n import PageLink from '../components/PageLink.svelte';\n import {\n formatPlaceType, osmLink, formatAdminLevel, formatDistance\n } from '../lib/helpers.js';\n\n export let addressLine;\n export let bDistanceInMeters;\n export let bMarkUnusedLines = false;\n\n $: bAddressLineUsed = addressLine.isaddress;\n $: reverse_only = Nominatim_Config.Reverse_Only;\n</script>\n\n<tr class:notused={bMarkUnusedLines && !bAddressLineUsed}>\n <td class=\"name fw-bold\">\n {#if addressLine.localname}\n {addressLine.localname}\n {:else}\n <span class=\"noname\">No Name</span>\n {/if}\n </td>\n <td>{formatPlaceType(addressLine)}</td>\n <td>{@html osmLink(addressLine)}</td>\n <td>{addressLine.rank_address}</td>\n <td>{formatAdminLevel(addressLine.admin_level)}</td>\n <td>{@html formatDistance(addressLine.distance, bDistanceInMeters)}</td>\n <td>\n {#if addressLine.osm_id}\n <DetailsLink feature={addressLine}>details</DetailsLink>\n {:else if !reverse_only && addressLine.type.match(/^country/)}\n <PageLink page='search' params_hash={{ country: addressLine.localname }}>search by name</PageLink>\n {:else if !reverse_only && addressLine.type === 'postcode'}\n <PageLink page='search' params_hash={{ postalcode: addressLine.localname }}>search by name</PageLink>\n {/if}\n </td>\n</tr>\n\n<style>\n .notused td {\n color: #ccc;\n }\n\n td {\n padding: 2px 8px;\n font-size: 0.9em;\n }\n</style>\n","<script>\n export let postcode;\n export let lat;\n export let lon;\n\n let overpass_query = `\n // Based on the map bounds, you can zoom out and rerun the query\n\n [timeout:30]; // in seconds\n\n // we define a shortcut\n // https://wiki.openstreetmap.org/wiki/Overpass_turbo/Extended_Overpass_Turbo_Queries\n {{postcode=${postcode}}}\n\n (\n node[\"addr:postcode\"=\"{{postcode}}\"]({{bbox}});\n way[\"addr:postcode\"=\"{{postcode}}\"]({{bbox}});\n relation[\"addr:postcode\"=\"{{postcode}}\"]({{bbox}});\n\n node[\"postal_code\"=\"{{postcode}}\"]({{bbox}});\n way[\"postal_code\"=\"{{postcode}}\"]({{bbox}});\n relation[\"postal_code\"=\"{{postcode}}\"]({{bbox}});\n );\n\n out body;\n >;\n out skel qt;\n `.replace(/^ {4}/gm, '');\n\n // https://wiki.openstreetmap.org/wiki/Overpass_turbo/Development#URL_Parameters\n // Q: the query\n // C: map position\n // R: run the query\n let url = 'https://overpass-turbo.eu/'\n + '?Q=' + encodeURIComponent(overpass_query)\n + '&C=' + encodeURIComponent([lat, lon, 15].join(';'))\n + '&R';\n\n function openHint() {\n document.getElementById('postcode-hint').style.display = 'block';\n }\n function closeHint() {\n document.getElementById('postcode-hint').style.display = 'none';\n }\n</script>\n\n(<a href=\"#openHint\" on:click|preventDefault|stopPropagation={openHint}>how?</a>)\n\n<div id=\"postcode-hint\" class=\"my-2 p-2\">\n <button type=\"button\" class=\"close\" aria-label=\"Close\" on:click|stopPropagation={closeHint}>\n <span aria-hidden=\"true\">×</span>\n </button>\n\n Nightly calculated from nearby places having this postcode.\n <a href=\"https://nominatim.org/release-docs/latest/develop/Postcodes/\">Documentation</a>.\n You can search for those with an <a href={url} target=\"_blank\">Overpass Turbo query</a>.\n</div>\n\n<style>\n #postcode-hint {\n font-size: 0.9em;\n background-color: #ededff;\n display: none;\n }\n .close {\n font-size: 1rem;\n }\n</style>","<script>\n export let title;\n</script>\n\n<style>\n td {\n padding: 2px 8px;\n font-size: 0.9em;\n }\n</style>\n\n<tr>\n <td>{title}</td>\n <td><slot></slot></td>\n</tr>\n","<script>\n export let items;\n</script>\n\n<style>\n .name {\n font-weight: bold;\n overflow-wrap: anywhere;\n }\n</style>\n\n{#each Object.keys(items) as name}\n <div class=\"line\">\n <span class=\"name\">{items[name]}</span> ({name})\n </div>\n{/each}\n","<script>\n import { fetch_from_api, update_html_title } from '../lib/api_utils.js';\n import { page } from '../lib/stores.js';\n\n import {\n osmLink, wikipediaLink, coverageType, isAdminBoundary,\n formatAddressRank, formatKeywordToken, formatOSMType\n } from '../lib/helpers.js';\n import Header from '../components/Header.svelte';\n import MapIcon from '../components/MapIcon.svelte';\n import SearchSectionDetails from '../components/SearchSectionDetails.svelte';\n import DetailsOneRow from '../components/DetailsOneRow.svelte';\n import DetailsLink from '../components/DetailsLink.svelte';\n import DetailsPostcodeHint from '../components/DetailsPostcodeHint.svelte';\n import InfoRow from '../components/DetailsInfoRow.svelte';\n import InfoRowList from '../components/DetailsInfoRowList.svelte';\n import Map from '../components/Map.svelte';\n\n let aPlace;\n let base_url;\n let api_request_params;\n let api_request_finished = false;\n\n function loaddata(search_params) {\n api_request_params = {\n place_id: search_params.get('place_id'),\n osmtype: search_params.get('osmtype'),\n osmid: search_params.get('osmid'),\n class: search_params.get('class'),\n keywords: search_params.get('keywords'),\n addressdetails: 1,\n hierarchy: (search_params.get('hierarchy') === '1' ? 1 : 0),\n group_hierarchy: 1,\n polygon_geojson: 1,\n format: 'json'\n };\n api_request_finished = false;\n\n if (api_request_params.place_id || (api_request_params.osmtype && api_request_params.osmid)) {\n\n if (api_request_params.place_id) {\n update_html_title('Details for ' + api_request_params.place_id);\n } else {\n update_html_title('Details for ' + api_request_params.osmtype + api_request_params.osmid);\n }\n\n fetch_from_api('details', api_request_params, function (data) {\n window.scrollTo(0, 0);\n api_request_finished = true;\n aPlace = (data && !data.error) ? data : undefined;\n });\n } else {\n aPlace = undefined;\n }\n }\n\n function place_has_keywords(aThisPlace) {\n // Return false if Nominatim API sends 'keywords: { name: [], address: [] }'\n return (\n aThisPlace.keywords && aThisPlace.keywords.name && aThisPlace.keywords.address\n && (aThisPlace.keywords.name.length > 0 || aThisPlace.keywords.address.length > 0)\n );\n }\n\n $: {\n let pageinfo = $page;\n if (pageinfo.tab === 'details') {\n loaddata(pageinfo.params);\n base_url = window.location.search;\n }\n }\n $: reverse_only = Nominatim_Config.Reverse_Only;\n</script>\n\n<Header>\n <SearchSectionDetails api_request_params={api_request_params}/>\n</Header>\n\n<div class=\"container\">\n {#if aPlace}\n <div class=\"row\">\n <div class=\"col-sm-10\">\n <h1>\n {aPlace.localname || `${formatOSMType(aPlace.osm_type)} ${aPlace.osm_id}` }\n <small><DetailsLink feature={aPlace}>link to this page</DetailsLink></small>\n </h1>\n </div>\n <div class=\"col-sm-2 text-end\">\n <MapIcon aPlace={aPlace} />\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-6\">\n <table id=\"locationdetails\" class=\"table table-striped table-responsive\">\n <tbody>\n <InfoRow title=\"Name\">\n {#if (Array.isArray(aPlace.names)) }\n <span class=\"noname fw-bold\">No Name</span>\n {:else}\n <InfoRowList items={aPlace.names} />\n {/if}\n </InfoRow>\n <InfoRow title=\"Type\">{aPlace.category}:{aPlace.type}</InfoRow>\n <InfoRow title=\"Last Updated\">{aPlace.indexed_date}</InfoRow>\n {#if (isAdminBoundary(aPlace)) }\n <InfoRow title=\"Admin Level\">{aPlace.admin_level}</InfoRow>\n {/if}\n <InfoRow title=\"Search Rank\">{aPlace.rank_search}</InfoRow>\n <InfoRow title=\"Address Rank\">{aPlace.rank_address} ({formatAddressRank(aPlace.rank_address)})</InfoRow>\n {#if aPlace.calculated_importance}\n <InfoRow title=\"Importance\">\n {aPlace.calculated_importance}\n {#if !aPlace.importance} (estimated){/if}\n </InfoRow>\n {/if}\n <InfoRow title=\"Coverage\">{coverageType(aPlace)}</InfoRow>\n <InfoRow title=\"Centre Point (lat,lon)\">\n {aPlace.centroid.coordinates[1]},{aPlace.centroid.coordinates[0]}\n </InfoRow>\n <InfoRow title=\"OSM\">{@html osmLink(aPlace)}</InfoRow>\n <InfoRow title=\"Place Id\">\n {aPlace.place_id}\n (<a href=\"https://nominatim.org/release-docs/develop/api/Output/#place_id-is-not-a-persistent-id\">on this server</a>)\n </InfoRow>\n {#if aPlace.calculated_wikipedia}\n <InfoRow title=\"Wikipedia Calculated\">{@html wikipediaLink(aPlace)}</InfoRow>\n {/if}\n <InfoRow title=\"Computed Postcode\">\n {#if aPlace.calculated_postcode}\n {aPlace.calculated_postcode}\n <DetailsPostcodeHint postcode={aPlace.calculated_postcode} lat={aPlace.centroid.coordinates[1]} lon={aPlace.centroid.coordinates[0]} />\n {/if}\n </InfoRow>\n <InfoRow title=\"Address Tags\"><InfoRowList items={aPlace.addresstags} /></InfoRow>\n <InfoRow title=\"Extra Tags\"><InfoRowList items={aPlace.extratags} /></InfoRow>\n </tbody>\n </table>\n </div>\n <div class=\"col-md-6\">\n <div id=\"map-wrapper\">\n <Map current_result={aPlace} />\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-12\">\n <h2>Address</h2>\n <table id=\"address\" class=\"table table-striped table-small\">\n <thead>\n <tr>\n <th>Local name</th>\n <th>Type</th>\n <th>OSM</th>\n <th>Address rank</th>\n <th>Admin level</th>\n <th>Distance</th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n {#if aPlace.address}\n {#each aPlace.address as addressLine}\n <DetailsOneRow addressLine={addressLine} bMarkUnusedLines={true} bDistanceInMeters={false} />\n {/each}\n {/if}\n\n {#if aPlace.linked_places}\n <tr class=\"all-columns\"><td colspan=\"7\"><h2>Linked Places</h2></td></tr>\n {#each aPlace.linked_places as addressLine}\n <DetailsOneRow addressLine={addressLine} bMarkUnusedLines={true} bDistanceInMeters={true} />\n {/each}\n {/if}\n\n {#if !reverse_only}\n <tr class=\"all-columns\"><td colspan=\"7\"><h2>Keywords</h2></td></tr>\n {#if api_request_params.keywords}\n\n {#if place_has_keywords(aPlace)}\n <tr class=\"all-columns\"><td colspan=\"7\"><h3>Name Keywords</h3></td></tr>\n {#each aPlace.keywords.name as keyword}\n <tr>\n <td>{formatKeywordToken(keyword.token)}</td>\n {#if keyword.id}\n <td>word id: {keyword.id}</td>\n {/if}\n </tr>\n {/each}\n\n {#if aPlace.keywords.address}\n <tr class=\"all-columns\"><td colspan=\"7\"><h3>Address Keywords</h3></td></tr>\n {#each aPlace.keywords.address as keyword}\n <tr>\n <td>{formatKeywordToken(keyword.token)}</td>\n {#if keyword.id}\n <td>word id: {keyword.id}</td>\n {/if}\n </tr>\n {/each}\n {/if}\n {:else}\n <tr><td>Place has no keywords</td></tr>\n {/if}\n {:else}\n <tr>\n <td>\n <a class=\"btn btn-outline-secondary btn-sm\"\n href=\"{base_url}&keywords=1\">display keywords</a>\n </td>\n </tr>\n {/if}\n {/if}\n\n <tr class=\"all-columns\"><td colspan=\"7\"><h2>Parent Of</h2></td></tr>\n {#if api_request_params.hierarchy}\n {#if aPlace.hierarchy && typeof (aPlace.hierarchy) === 'object' && Object.keys(aPlace.hierarchy).length}\n {#each Object.keys(aPlace.hierarchy) as type}\n <tr class=\"all-columns\"><td colspan=\"7\"><h3>{type}</h3></td></tr>\n {#each aPlace.hierarchy[type] as line}\n <DetailsOneRow addressLine={line} bDistanceInMeters={true} />\n {/each}\n {/each}\n\n {#if Object.keys(aPlace.hierarchy) > 500}\n <p>There are more child objects which are not shown.</p>\n {/if}\n {:else}\n <tr><td>Place is not parent of other places</td></tr>\n {/if}\n {:else}\n <tr>\n <td>\n <a class=\"btn btn-outline-secondary btn-sm\"\n href=\"{base_url}&hierarchy=1\">display child places</a>\n </td>\n </tr>\n {/if}\n </tbody>\n </table>\n </div>\n </div>\n {:else if (window.location.search !== '' && api_request_finished)}\n No such place found.\n {/if}\n</div>\n\n\n\n<style>\n h1 {\n margin: 10px 0;\n padding-left: 8px;\n }\n\n h1 small :global(a) {\n font-size: 0.5em;\n white-space: nowrap;\n }\n\n h2 {\n font-size: 2em;\n padding-left: 8px;\n background-color: white;\n }\n h3 {\n font-size: 1.5em;\n padding-left: 8px;\n }\n\n tr.all-columns {\n background-color: white !important; \n border: none;\n }\n tr.all-columns td {\n border-top: none !important;\n padding-left: 0 !important;\n }\n :global(span.noname){\n color:#800;\n }\n\n #map-wrapper {\n position: relative;\n width:100%;\n min-height: auto;\n height:300px;\n border: 1px solid #666;\n }\n</style>\n","<script>\n import { onMount } from 'svelte';\n import { fetch_from_api, update_html_title } from '../lib/api_utils.js';\n import { formatOSMType, osmLink } from '../lib/helpers.js';\n\n import Header from '../components/Header.svelte';\n\n let aPolygons = [];\n\n function loaddata() {\n fetch_from_api('polygons', { format: 'json' }, function (data) {\n aPolygons = data;\n });\n update_html_title('Broken polygons');\n }\n onMount(loaddata);\n</script>\n\n<Header/>\n<div class=\"container\">\n <div class=\"row\">\n <div class=\"col-sm-12\">\n <h1>Broken polygons</h1>\n\n <p>\n Total number of broken polygons: {aPolygons.length}.\n </p>\n\n <table class=\"table table-striped table-hover\">\n <thead>\n <th>OSM type</th>\n <th>OSM id</th>\n <th>Class</th>\n <th>Type</th>\n <th>Name</th>\n <th>Country Code</th>\n <th>Error message</th>\n <th>Updated</th>\n <th></th>\n </thead>\n <tbody>\n {#each aPolygons as polygon}\n <tr>\n <td>{polygon.osm_type}</td>\n <td>{@html osmLink(polygon)}</td>\n <td>{polygon.class}</td>\n <td>{polygon.type}</td>\n <td>{polygon.name}</td>\n <td>{polygon.country_code || ''}</td>\n <td>{polygon.errormessage}</td>\n <td>{polygon.updated}</td>\n <td>\n <a href=\"http://localhost:8111/import?url=https://www.openstreetmap.org/api/0.6/{formatOSMType(polygon.osm_type)}/{polygon.osm_id}/full\" target=\"josm\">josm</a>\n </td>\n </tr>\n {/each}\n </tbody>\n </table>\n </div>\n </div>\n</div>\n","<script>\n import { onMount } from 'svelte';\n import { fetch_from_api, update_html_title } from '../lib/api_utils.js';\n import { osmLink } from '../lib/helpers.js';\n\n import Header from '../components/Header.svelte';\n import DetailsLink from '../components/DetailsLink.svelte';\n\n let aPolygons = [];\n\n function loaddata() {\n fetch_from_api('deletable', { format: 'json' }, function (data) {\n aPolygons = data;\n });\n update_html_title('Deletable objects');\n }\n onMount(loaddata);\n</script>\n\n<Header/>\n<div class=\"container\">\n <div class=\"row\">\n <div class=\"col-sm-12\">\n <h1>Deletable</h1>\n\n <p>\n {aPolygons.length} objects have been deleted in OSM but are still in the Nominatim database.\n </p>\n\n <table class=\"table table-striped table-hover\">\n <thead>\n <th>Place id</th>\n <th>Country Code</th>\n <th>Name</th>\n <th>OSM id</th>\n <th>OSM type</th>\n <th>Class</th>\n <th>Type</th>\n </thead>\n <tbody>\n {#each aPolygons as polygon}\n <tr>\n <td><DetailsLink feature={polygon}>{polygon.place_id}</DetailsLink></td>\n <td>{polygon.country_code}</td>\n <td>{polygon.name}</td>\n <td>{@html osmLink(polygon)}</td>\n <td>{polygon.osm_type}</td>\n <td>{polygon.class}</td>\n <td>{polygon.type}</td>\n </tr>\n {/each}\n </tbody>\n </table>\n\n </div>\n </div>\n</div>\n\n","<script>\n import { onMount } from 'svelte';\n import { fetch_from_api, update_html_title } from '../lib/api_utils.js';\n\n import Header from '../components/Header.svelte';\n\n let aStatusData = {};\n let configuration = Nominatim_Config;\n\n function loaddata() {\n fetch_from_api('status', { format: 'json' }, function (data) {\n aStatusData = data;\n });\n update_html_title('Server status');\n }\n onMount(loaddata);\n</script>\n\n<Header/>\n<div class=\"container\">\n <div class=\"row\">\n <div class=\"col-sm-12\">\n <h1>Server status</h1>\n\n <dl>\n <dt>API Endpoint</dt>\n <dd><a href={configuration.Nominatim_API_Endpoint}>{configuration.Nominatim_API_Endpoint}</a></dd>\n\n <dt>Software version</dt>\n <dd>{aStatusData.software_version}</dd>\n\n <dt>Database version</dt>\n <dd>{aStatusData.database_version}</dd>\n\n <dt>Data last updated</dt>\n <dd>{aStatusData.data_updated}</dd>\n </dl>\n </div>\n </div>\n</div>\n","<script>\n import Header from '../components/Header.svelte';\n import { onMount } from 'svelte';\n import { fetch_content_into_element } from '../lib/api_utils.js';\n\n onMount(() => {\n fetch_content_into_element('theme/about-help.html', document.getElementById('about-help'));\n });\n</script>\n\n<Header />\n<div id=\"about-help\" class=\"container\"></div>\n\n<style>\n #about-help {\n max-width: 800px;\n padding: 4em;\n }\n</style>","<script>\n import 'bootstrap/dist/css/bootstrap.css';\n import 'bootstrap/dist/js/bootstrap.bundle.js';\n\n import { page, refresh_page } from './lib/stores.js';\n\n import Footer from './components/Footer.svelte';\n import SearchPage from './pages/SearchPage.svelte';\n import ReversePage from './pages/ReversePage.svelte';\n import DetailsPage from './pages/DetailsPage.svelte';\n import PolygonsPage from './pages/PolygonsPage.svelte';\n import DeletablePage from './pages/DeletablePage.svelte';\n import StatusPage from './pages/StatusPage.svelte';\n import AboutPage from './pages/AboutPage.svelte';\n\n $: view = $page.tab;\n\n refresh_page();\n</script>\n\n<!-- deal with back-button and other user action -->\n<svelte:window on:popstate={() => refresh_page()} />\n\n{#if view === 'search'}\n<SearchPage />\n{:else if view === 'reverse'}\n<ReversePage />\n{:else if view === 'details'}\n<DetailsPage />\n{:else if view === 'deletable'}\n<DeletablePage />\n{:else if view === 'polygons'}\n<PolygonsPage />\n{:else if view === 'status'}\n<StatusPage />\n{:else if view === 'about'}\n<AboutPage />\n{/if}\n<Footer/>\n","import App from './App.svelte';\n\nconst app = new App({ // eslint-disable-line no-unused-vars\n target: document.body\n});\n"],"names":["noop","assign","tar","src","k","run","fn","blank_object","Object","create","run_all","fns","forEach","is_function","thing","safe_not_equal","a","b","src_url_equal_anchor","current_component","src_url_equal","element_src","url","document","createElement","href","subscribe","store","callbacks","unsub","unsubscribe","get_store_value","value","_","component_subscribe","component","callback","$$","on_destroy","push","create_slot","definition","ctx","$$scope","slot_ctx","get_slot_context","slice","get_slot_changes","dirty","lets","undefined","merged","len","Math","max","length","i","update_slot_base","slot","slot_definition","slot_changes","get_slot_context_fn","slot_context","p","get_all_dirty_from_scope","append","target","node","appendChild","insert","anchor","insertBefore","detach","parentNode","removeChild","destroy_each","iterations","detaching","d","element","name","text","data","createTextNode","space","empty","listen","event","handler","options","addEventListener","removeEventListener","prevent_default","preventDefault","call","this","stop_propagation","stopPropagation","attr","attribute","removeAttribute","getAttribute","setAttribute","set_data","wholeText","set_input_value","input","select_option","select","option","__value","selected","selectedIndex","toggle_class","toggle","classList","HtmlTag","constructor","is_svg","e","n","c","html","h","m","nodeName","createElementNS","t","innerHTML","Array","from","childNodes","set_current_component","onMount","Error","get_current_component","on_mount","dirty_components","binding_callbacks","render_callbacks","flush_callbacks","resolved_promise","Promise","resolve","update_scheduled","add_render_callback","add_flush_callback","seen_callbacks","Set","flushidx","flush","saved_component","update","pop","has","add","clear","fragment","before_update","after_update","outroing","outros","group_outros","r","check_outros","transition_in","block","local","delete","transition_out","o","bind","index","props","bound","create_component","mount_component","customElement","new_on_destroy","map","filter","destroy_component","make_dirty","then","fill","init","instance","create_fragment","not_equal","append_styles","parent_component","on_disconnect","context","Map","skip_bound","root","ready","ret","rest","hydrate","nodes","children","l","intro","SvelteComponent","$destroy","$on","type","indexOf","splice","$set","$$props","obj","$$set","keys","MAX_UID","MILLISECONDS_MULTIPLIER","TRANSITION_END","toType","object","prototype","toString","match","toLowerCase","getUID","prefix","floor","random","getElementById","getSelector","selector","hrefAttribute","includes","startsWith","split","trim","getSelectorFromElement","querySelector","getElementFromSelector","getTransitionDurationFromElement","transitionDuration","transitionDelay","window","getComputedStyle","floatTransitionDuration","Number","parseFloat","floatTransitionDelay","triggerTransitionEnd","dispatchEvent","Event","isElement$1","jquery","nodeType","getElement","isVisible","getClientRects","elementIsVisible","getPropertyValue","closedDetails","closest","summary","isDisabled","Node","ELEMENT_NODE","contains","disabled","hasAttribute","findShadowRoot","documentElement","attachShadow","getRootNode","ShadowRoot","reflow","offsetHeight","getjQuery","jQuery","body","DOMContentLoadedCallbacks","onDOMContentLoaded","readyState","isRTL","dir","defineJQueryPlugin","plugin","$","NAME","JQUERY_NO_CONFLICT","jQueryInterface","Constructor","noConflict","execute","executeAfterTransition","transitionElement","waitForTransition","durationPadding","emulatedDuration","called","setTimeout","getNextActiveElement","list","activeElement","shouldGetNext","isCycleAllowed","listLength","min","namespaceRegex","stripNameRegex","stripUidRegex","eventRegistry","uidEvent","customEvents","mouseenter","mouseleave","nativeEvents","makeEventUid","uid","getElementEvents","bootstrapHandler","hydrateObj","delegateTarget","oneOff","EventHandler","off","apply","bootstrapDelegationHandler","domElements","querySelectorAll","domElement","findHandler","events","callable","delegationSelector","values","find","normalizeParameters","originalTypeEvent","delegationFunction","isDelegated","typeEvent","getTypeEvent","addHandler","wrapFunction","relatedTarget","handlers","previousFunction","replace","removeHandler","Boolean","removeNamespacedHandlers","namespace","storeElementEvent","handlerKey","on","one","inNamespace","isNamespace","elementEvent","keyHandlers","trigger","args","jQueryEvent","bubbles","nativeDispatch","defaultPrevented","isPropagationStopped","isImmediatePropagationStopped","isDefaultPrevented","evt","cancelable","meta","key","entries","_unused","defineProperty","configurable","get","elementMap","Data","set","instanceMap","size","console","error","remove","normalizeData","JSON","parse","decodeURIComponent","normalizeDataKey","chr","Manipulator","setDataAttribute","removeDataAttribute","getDataAttributes","attributes","bsKeys","dataset","pureKey","charAt","getDataAttribute","Config","Default","DefaultType","_getConfig","config","_mergeConfigObj","_configAfterMerge","_typeCheckConfig","jsonConfig","configTypes","property","expectedTypes","valueType","RegExp","test","TypeError","toUpperCase","VERSION","BaseComponent","super","_element","_config","DATA_KEY","dispose","EVENT_KEY","propertyName","getOwnPropertyNames","_queueCallback","isAnimated","static","getInstance","enableDismissTrigger","method","clickEvent","tagName","getOrCreateInstance","NAME$f","EVENT_KEY$b","EVENT_CLOSE","EVENT_CLOSED","CLASS_NAME_FADE$5","CLASS_NAME_SHOW$8","Alert","close","_destroyElement","each","NAME$e","CLASS_NAME_ACTIVE$3","SELECTOR_DATA_TOGGLE$5","EVENT_CLICK_DATA_API$6","Button","button","SelectorEngine","concat","Element","findOne","child","matches","parents","ancestor","prev","previous","previousElementSibling","next","nextElementSibling","focusableChildren","focusables","join","el","NAME$d","EVENT_KEY$9","EVENT_TOUCHSTART","EVENT_TOUCHMOVE","EVENT_TOUCHEND","EVENT_POINTERDOWN","EVENT_POINTERUP","POINTER_TYPE_TOUCH","POINTER_TYPE_PEN","CLASS_NAME_POINTER_EVENT","SWIPE_THRESHOLD","Default$c","endCallback","leftCallback","rightCallback","DefaultType$c","Swipe","isSupported","_deltaX","_supportPointerEvents","PointerEvent","_initEvents","_start","_eventIsPointerPenTouch","clientX","touches","_end","_handleSwipe","_move","absDeltaX","abs","direction","pointerType","navigator","maxTouchPoints","NAME$c","EVENT_KEY$8","DATA_API_KEY$5","TOUCHEVENT_COMPAT_WAIT","ORDER_NEXT","ORDER_PREV","DIRECTION_LEFT","DIRECTION_RIGHT","EVENT_SLIDE","EVENT_SLID","EVENT_KEYDOWN$1","EVENT_MOUSEENTER$1","EVENT_MOUSELEAVE$1","EVENT_DRAG_START","EVENT_LOAD_DATA_API$3","EVENT_CLICK_DATA_API$5","CLASS_NAME_CAROUSEL","CLASS_NAME_ACTIVE$2","CLASS_NAME_SLIDE","CLASS_NAME_END","CLASS_NAME_START","CLASS_NAME_NEXT","CLASS_NAME_PREV","SELECTOR_ACTIVE","SELECTOR_ITEM","SELECTOR_ACTIVE_ITEM","SELECTOR_ITEM_IMG","SELECTOR_INDICATORS","SELECTOR_DATA_SLIDE","SELECTOR_DATA_RIDE","KEY_TO_DIRECTION","ArrowLeft","ArrowRight","Default$b","interval","keyboard","pause","ride","touch","wrap","DefaultType$b","Carousel","_interval","_activeElement","_isSliding","touchTimeout","_swipeHelper","_indicatorsElement","_addEventListeners","cycle","_slide","nextWhenVisible","hidden","_clearInterval","_updateInterval","setInterval","_maybeEnableCycle","to","items","_getItems","activeIndex","_getItemIndex","_getActive","order","defaultInterval","_keydown","_addTouchEventListeners","img","swipeConfig","_directionToOrder","clearTimeout","_setActiveIndicatorElement","activeIndicator","newActiveIndicator","elementInterval","parseInt","isNext","nextElement","nextElementIndex","triggerEvent","eventName","_orderToDirection","isCycling","directionalClassName","orderClassName","completeCallBack","_isAnimated","clearInterval","carousel","slideIndex","carousels","NAME$b","EVENT_KEY$7","EVENT_SHOW$6","EVENT_SHOWN$6","EVENT_HIDE$6","EVENT_HIDDEN$6","EVENT_CLICK_DATA_API$4","CLASS_NAME_SHOW$7","CLASS_NAME_COLLAPSE","CLASS_NAME_COLLAPSING","CLASS_NAME_COLLAPSED","CLASS_NAME_DEEPER_CHILDREN","CLASS_NAME_HORIZONTAL","WIDTH","HEIGHT","SELECTOR_ACTIVES","SELECTOR_DATA_TOGGLE$4","Default$a","parent","DefaultType$a","Collapse","_isTransitioning","_triggerArray","toggleList","elem","filterElement","foundElement","_initializeChildren","_addAriaAndCollapsedClass","_isShown","hide","show","activeChildren","_getFirstLevelChildren","activeInstance","dimension","_getDimension","style","complete","scrollSize","getBoundingClientRect","triggerArray","isOpen","selectorElements","top","bottom","right","left","auto","basePlacements","start","end","clippingParents","viewport","popper","reference","variationPlacements","reduce","acc","placement","placements","beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite","modifierPhases","getNodeName","getWindow","ownerDocument","defaultView","isElement","isHTMLElement","HTMLElement","isShadowRoot","applyStyles","_ref","state","elements","styles","effect$2","_ref2","initialStyles","position","strategy","margin","arrow","hasOwnProperty","applyStyles$1","enabled","phase","effect","requires","getBasePlacement","round","getUAString","uaData","userAgentData","brands","item","brand","version","userAgent","isLayoutViewport","includeScale","isFixedStrategy","clientRect","scaleX","scaleY","offsetWidth","width","height","visualViewport","addVisualOffsets","x","offsetLeft","y","offsetTop","getLayoutRect","rootNode","isSameNode","host","getComputedStyle$1","isTableElement","getDocumentElement","getParentNode","assignedSlot","getTrueOffsetParent","offsetParent","getContainingBlock","isFirefox","currentNode","css","transform","perspective","contain","willChange","getOffsetParent","getMainAxisFromPlacement","within","min$1","max$1","withinMaxClamp","v","getFreshSideObject","mergePaddingObject","paddingObject","expandToHashMap","hashMap","toPaddingObject","padding","rects","_state$modifiersData$","arrowElement","popperOffsets","modifiersData","basePlacement","axis","arrowRect","minProp","maxProp","endDiff","startDiff","arrowOffsetParent","clientSize","clientHeight","clientWidth","centerToReference","center","offset","axisProp","centerOffset","effect$1","_options$element","arrow$1","requiresIfExists","getVariation","unsetSides","roundOffsetsByDPR","dpr","devicePixelRatio","mapToStyles","_Object$assign2","popperRect","variation","offsets","gpuAcceleration","adaptive","roundOffsets","isFixed","_offsets$x","_offsets$y","_ref3","hasX","hasY","sideX","sideY","win","heightProp","widthProp","_Object$assign","commonStyles","_ref4","computeStyles","_ref5","_options$gpuAccelerat","_options$adaptive","_options$roundOffsets","computeStyles$1","passive","_options$scroll","scroll","_options$resize","resize","scrollParents","scrollParent","eventListeners","hash$1","getOppositePlacement","matched","hash","getOppositeVariationPlacement","getWindowScroll","scrollLeft","pageXOffset","scrollTop","pageYOffset","getWindowScrollBarX","getViewportRect","layoutViewport","getDocumentRect","_element$ownerDocumen","winScroll","scrollWidth","scrollHeight","isScrollParent","_getComputedStyle","overflow","overflowX","overflowY","getScrollParent","listScrollParents","isBody","updatedList","rectToClientRect","rect","getInnerBoundingClientRect","clientTop","clientLeft","getClientRectFromMixedType","clippingParent","getClippingParents","clipperElement","getClippingRect","boundary","rootBoundary","mainClippingParents","firstClippingParent","clippingRect","accRect","computeOffsets","commonX","commonY","mainAxis","detectOverflow","_options","_options$placement","_options$strategy","_options$boundary","_options$rootBoundary","_options$elementConte","elementContext","_options$altBoundary","altBoundary","_options$padding","altContext","clippingClientRect","contextElement","referenceClientRect","popperClientRect","elementClientRect","overflowOffsets","offsetData","multiply","computeAutoPlacement","flipVariations","_options$allowedAutoP","allowedAutoPlacements","placements$1","allowedPlacements","overflows","sort","getExpandedFallbackPlacements","oppositePlacement","flip","_skip","_options$mainAxis","checkMainAxis","_options$altAxis","altAxis","checkAltAxis","specifiedFallbackPlacements","fallbackPlacements","_options$flipVariatio","preferredPlacement","referenceRect","checksMap","makeFallbackChecks","firstFittingPlacement","_basePlacement","isStartVariation","isVertical","mainVariationSide","altVariationSide","checks","every","check","_loop","_i","fittingPlacement","reset","flip$1","getSideOffsets","preventedOffsets","isAnySideFullyClipped","some","side","preventOverflow","referenceOverflow","popperAltOverflow","referenceClippingOffsets","popperEscapeOffsets","isReferenceHidden","hasPopperEscaped","hide$1","distanceAndSkiddingToXY","invertDistance","skidding","distance","_options$offset","_data$state$placement","offset$1","popperOffsets$1","getAltAxis","_options$tether","tether","_options$tetherOffset","tetherOffset","isBasePlacement","tetherOffsetValue","normalizedTetherOffsetValue","offsetModifierState","_offsetModifierState$","mainSide","altSide","additive","minLen","maxLen","arrowPaddingObject","arrowPaddingMin","arrowPaddingMax","arrowLen","minOffset","maxOffset","clientOffset","offsetModifierValue","tetherMax","preventedOffset","_offsetModifierState$2","_mainSide","_altSide","_offset","_len","_min","_max","isOriginSide","_offsetModifierValue","_tetherMin","_tetherMax","_preventedOffset","preventOverflow$1","getHTMLElementScroll","getNodeScroll","isElementScaled","getCompositeRect","elementOrVirtualElement","isOffsetParentAnElement","offsetParentIsScaled","modifiers","visited","result","modifier","dep","depModifier","orderModifiers","orderedModifiers","debounce","pending","mergeByName","current","existing","DEFAULT_OPTIONS","areValidElements","arguments","_key","popperGenerator","generatorOptions","_generatorOptions","_generatorOptions$def","defaultModifiers","_generatorOptions$def2","defaultOptions","effectCleanupFns","isDestroyed","setOptions","setOptionsAction","cleanupModifierEffects","runModifierEffects","forceUpdate","_state$elements","_state$orderedModifie","_state$orderedModifie2","destroy","_ref3$options","cleanupFn","noopFn","onFirstUpdate","createPopper$2","createPopper$1","createPopper","Popper","freeze","__proto__","createPopperBase","createPopperLite","Symbol","toStringTag","NAME$a","EVENT_KEY$6","DATA_API_KEY$3","ESCAPE_KEY$2","TAB_KEY$1","ARROW_UP_KEY$1","ARROW_DOWN_KEY$1","RIGHT_MOUSE_BUTTON","EVENT_HIDE$5","EVENT_HIDDEN$5","EVENT_SHOW$5","EVENT_SHOWN$5","EVENT_CLICK_DATA_API$3","EVENT_KEYDOWN_DATA_API","EVENT_KEYUP_DATA_API","CLASS_NAME_SHOW$6","CLASS_NAME_DROPUP","CLASS_NAME_DROPEND","CLASS_NAME_DROPSTART","CLASS_NAME_DROPUP_CENTER","CLASS_NAME_DROPDOWN_CENTER","SELECTOR_DATA_TOGGLE$3","SELECTOR_DATA_TOGGLE_SHOWN","SELECTOR_MENU","SELECTOR_NAVBAR","SELECTOR_NAVBAR_NAV","SELECTOR_VISIBLE_ITEMS","PLACEMENT_TOP","PLACEMENT_TOPEND","PLACEMENT_BOTTOM","PLACEMENT_BOTTOMEND","PLACEMENT_RIGHT","PLACEMENT_LEFT","PLACEMENT_TOPCENTER","PLACEMENT_BOTTOMCENTER","Default$9","autoClose","display","popperConfig","DefaultType$9","Dropdown","_popper","_parent","_menu","_inNavbar","_detectNavbar","_createPopper","focus","_completeHide","referenceElement","_getPopperConfig","_getPlacement","parentDropdown","isEnd","_getOffset","popperData","defaultBsPopperConfig","_selectMenuItem","openToggles","composedPath","isMenuTarget","isInput","isEscapeEvent","isUpOrDownEvent","getToggleButton","dataApiKeydownHandler","clearMenus","SELECTOR_FIXED_CONTENT","SELECTOR_STICKY_CONTENT","PROPERTY_PADDING","PROPERTY_MARGIN","ScrollBarHelper","getWidth","documentWidth","innerWidth","_disableOverFlow","_setElementAttributes","calculatedValue","_resetElementAttributes","isOverflowing","_saveInitialAttribute","styleProperty","scrollbarWidth","manipulationCallBack","setProperty","_applyManipulationCallback","actualValue","removeProperty","callBack","sel","NAME$9","CLASS_NAME_FADE$4","CLASS_NAME_SHOW$5","EVENT_MOUSEDOWN","Default$8","className","clickCallback","rootElement","DefaultType$8","Backdrop","_isAppended","_append","_getElement","_emulateAnimation","backdrop","NAME$8","EVENT_KEY$5","EVENT_FOCUSIN$2","EVENT_KEYDOWN_TAB","TAB_KEY","TAB_NAV_FORWARD","TAB_NAV_BACKWARD","Default$7","autofocus","trapElement","DefaultType$7","FocusTrap","_isActive","_lastTabNavDirection","activate","_handleFocusin","_handleKeydown","deactivate","shiftKey","NAME$7","EVENT_KEY$4","ESCAPE_KEY$1","EVENT_HIDE$4","EVENT_HIDE_PREVENTED$1","EVENT_HIDDEN$4","EVENT_SHOW$4","EVENT_SHOWN$4","EVENT_RESIZE$1","EVENT_CLICK_DISMISS","EVENT_MOUSEDOWN_DISMISS","EVENT_KEYDOWN_DISMISS$1","EVENT_CLICK_DATA_API$2","CLASS_NAME_OPEN","CLASS_NAME_FADE$3","CLASS_NAME_SHOW$4","CLASS_NAME_STATIC","OPEN_SELECTOR$1","SELECTOR_DIALOG","SELECTOR_MODAL_BODY","SELECTOR_DATA_TOGGLE$2","Default$6","DefaultType$6","Modal","_dialog","_backdrop","_initializeBackDrop","_focustrap","_initializeFocusTrap","_scrollBar","_adjustDialog","_showElement","_hideModal","htmlElement","handleUpdate","modalBody","transitionComplete","_triggerBackdropTransition","event2","_resetAdjustments","isModalOverflowing","initialOverflowY","isBodyOverflowing","paddingLeft","paddingRight","showEvent","alreadyOpen","NAME$6","EVENT_KEY$3","DATA_API_KEY$1","EVENT_LOAD_DATA_API$2","ESCAPE_KEY","CLASS_NAME_SHOW$3","CLASS_NAME_SHOWING$1","CLASS_NAME_HIDING","CLASS_NAME_BACKDROP","OPEN_SELECTOR","EVENT_SHOW$3","EVENT_SHOWN$3","EVENT_HIDE$3","EVENT_HIDE_PREVENTED","EVENT_HIDDEN$3","EVENT_RESIZE","EVENT_CLICK_DATA_API$1","EVENT_KEYDOWN_DISMISS","SELECTOR_DATA_TOGGLE$1","Default$5","DefaultType$5","Offcanvas","blur","completeCallback","uriAttributes","SAFE_URL_PATTERN","DATA_URL_PATTERN","allowedAttribute","allowedAttributeList","attributeName","nodeValue","attributeRegex","regex","DefaultAllowlist","area","br","col","code","div","em","hr","h1","h2","h3","h4","h5","h6","li","ol","pre","s","small","span","sub","sup","strong","u","ul","sanitizeHtml","unsafeHtml","allowList","sanitizeFunction","createdDocument","DOMParser","parseFromString","elementName","attributeList","allowedAttributes","NAME$5","Default$4","content","extraClass","sanitize","sanitizeFn","template","DefaultType$4","DefaultContentType","entry","TemplateFactory","getContent","_resolvePossibleFunction","hasContent","changeContent","_checkContent","toHtml","templateWrapper","_maybeSanitize","_setContent","arg","templateElement","_putElementInTemplate","textContent","NAME$4","DISALLOWED_ATTRIBUTES","CLASS_NAME_FADE$2","CLASS_NAME_SHOW$2","SELECTOR_TOOLTIP_INNER","SELECTOR_MODAL","EVENT_MODAL_HIDE","TRIGGER_HOVER","TRIGGER_FOCUS","TRIGGER_CLICK","TRIGGER_MANUAL","EVENT_HIDE$2","EVENT_HIDDEN$2","EVENT_SHOW$2","EVENT_SHOWN$2","EVENT_INSERTED","EVENT_CLICK$1","EVENT_FOCUSIN$1","EVENT_FOCUSOUT$1","EVENT_MOUSEENTER","EVENT_MOUSELEAVE","AttachmentMap","AUTO","TOP","RIGHT","BOTTOM","LEFT","Default$3","animation","container","customClass","delay","title","DefaultType$3","Tooltip","_isEnabled","_timeout","_isHovered","_activeTrigger","_templateFactory","_newContent","tip","_setListeners","enable","disable","toggleEnabled","_initializeOnDelegatedTarget","click","_isWithActiveTrigger","_enter","_leave","_hideModalHandler","originalTitle","_disposePopper","_isWithContent","isInTheDom","_getTipElement","_getTitle","_createTipElement","_getContentForTemplate","_getTemplateFactory","tipId","setContent","_getDelegateConfig","attachment","triggers","eventIn","eventOut","_fixTitle","_setTimeout","timeout","dataAttributes","dataAttribute","NAME$3","SELECTOR_TITLE","SELECTOR_CONTENT","Default$2","DefaultType$2","Popover","_getContent","NAME$2","EVENT_KEY$2","EVENT_ACTIVATE","EVENT_CLICK","EVENT_LOAD_DATA_API$1","CLASS_NAME_DROPDOWN_ITEM","CLASS_NAME_ACTIVE$1","SELECTOR_DATA_SPY","SELECTOR_TARGET_LINKS","SELECTOR_NAV_LIST_GROUP","SELECTOR_NAV_LINKS","SELECTOR_LINK_ITEMS","SELECTOR_DROPDOWN","SELECTOR_DROPDOWN_TOGGLE$1","Default$1","rootMargin","smoothScroll","threshold","DefaultType$1","ScrollSpy","_targetLinks","_observableSections","_rootElement","_activeTarget","_observer","_previousScrollData","visibleEntryTop","parentScrollTop","refresh","_initializeTargetsAndObservables","_maybeEnableSmoothScroll","disconnect","_getNewObserver","section","observe","observableSection","scrollTo","behavior","IntersectionObserver","_observerCallback","targetElement","id","_process","userScrollsDown","isIntersecting","_clearActiveClass","entryIsLowerThanPrevious","targetLinks","_activateParents","listGroup","activeNodes","spy","NAME$1","EVENT_KEY$1","EVENT_HIDE$1","EVENT_HIDDEN$1","EVENT_SHOW$1","EVENT_SHOWN$1","EVENT_CLICK_DATA_API","EVENT_KEYDOWN","EVENT_LOAD_DATA_API","ARROW_LEFT_KEY","ARROW_RIGHT_KEY","ARROW_UP_KEY","ARROW_DOWN_KEY","CLASS_NAME_ACTIVE","CLASS_NAME_FADE$1","CLASS_NAME_SHOW$1","CLASS_DROPDOWN","SELECTOR_DROPDOWN_TOGGLE","SELECTOR_DROPDOWN_MENU","SELECTOR_DROPDOWN_ITEM","NOT_SELECTOR_DROPDOWN_TOGGLE","SELECTOR_TAB_PANEL","SELECTOR_OUTER","SELECTOR_DATA_TOGGLE","SELECTOR_INNER_ELEM","SELECTOR_DATA_TOGGLE_ACTIVE","Tab","_setInitialAttributes","_getChildren","innerElem","_elemIsActive","active","_getActiveElem","hideEvent","_deactivate","_activate","relatedElem","_toggleDropDown","nextActiveElement","_setAttributeIfNotExists","_setInitialAttributesOnChild","_getInnerElement","isActive","outerElem","_getOuterElement","_setInitialAttributesOnTargetPanel","open","EVENT_MOUSEOVER","EVENT_MOUSEOUT","EVENT_FOCUSIN","EVENT_FOCUSOUT","EVENT_HIDE","EVENT_HIDDEN","EVENT_SHOW","EVENT_SHOWN","CLASS_NAME_FADE","CLASS_NAME_HIDE","CLASS_NAME_SHOW","CLASS_NAME_SHOWING","autohide","Toast","_hasMouseInteraction","_hasKeyboardInteraction","_clearTimeout","_maybeScheduleHide","isShown","_onInteraction","isInteracting","factory","subscriber_queue","writable","stop","subscribers","new_value","run_queue","subscriber","invalidate","map_store","results_store","last_api_request_url_store","error_store","page","default_pagename","Nominatim_Config","Reverse_Only","pagenames","refresh_page","pagename","params","location","pathname","URLSearchParams","search","param_str","new_url","protocol","history","pushState","tab","footer","api_request_progress","status","loading_el","async","fetch_from_api","endpoint_name","api_url","dedupe","params2","param_names","extend_parameters","Nominatim_API_Endpoint_Params","generate_nominatim_endpoint_url","val","clean_up_parameters","encodeURIComponent","generate_nominatim_api_url","tmp_params","fetch","headers","Nominatim_API_Endpoint_Headers","response","json","err","statusText","message","fetch_content_cache","fetch_content_into_element","dom_element","conf_endpoint","Nominatim_API_Endpoint","update_html_title","Page_Title","params_hash","extra_classes","lat","lon","zoom","new_params","$$invalidate","EN_US","ZH_CN","Locales","register","locale","func","SEC_ARRAY","toDate","Date","isNaN","format","date","opts","sec","relativeDate","diffSec","diff","localeFunc","agoIn","totalSec","idx","formatDiff","getLocale","a0","a1","t1_value","timeago.format","abbr","t1","create_if_block_1","create_if_block","div5","div1","div4","div2","div3","last_updated_date","last_api_request_url","fetch_running","URL","origin","searchParams","data_updated","unit","error_message","pagelink_changes","header","nav","div0","ul0","li0","li1","ul1","li2","section0","section1","reverselink_changes","pagelink1_changes","pagelink2_changes","map_lat","map_lon","getCenter","lng","view","$page","page_title","reverse_only","form","allow_submit","field","pattern","checkValidity","validate_field","alert","checked","serialize_form","q","input1","input1_value_value","input2","input2_value_value","input3","input3_value_value","bounded","countrycodes","input5","limit","polygon_threshold","input0","input4","input6","input7","input0_value_value","street","city","county","country","postalcode","input6_value_value","input7_value_value","input8","input8_value_value","input10","div6","input9","input11","input12","input4_value_value","input5_value_value","input0_checked_value","viewbox","input1_checked_value","input2_checked_value","details","label0","li3","label1","li4","label2","li5","label3","li6","label4","li7","label5","li8","label6","set_bounded","set_dedupe","set_api_param","apiParam","sViewBox","bStructuredSearch","api_request_params","set_viewbox","use_viewbox","bounds","getBounds","west","getWest","east","getEast","L","latLng","toFixed","getNorth","getSouth","map_viewbox_as_string","update_reverse_link","center_lat_lng","wrapLatLng","matchHtmlRegExp","escapeHtml_1","string","escape","str","exec","lastIndex","charCodeAt","substring","formatOSMType_1","formatOSMType","osmLink_1","aPlace","osm_type","sOSMType","osm_id","formatLabel_1","label","capitalize","class","wikipediaLink_1","calculated_wikipedia","parts","sTitle","escapeHtml","sLanguage","sArticle","coverageType_1","isarea","isAdminBoundary_1","category","formatAddressRank_1","iRank","formatPlaceType_1","sOut","place_type","formatAdminLevel_1","iLevel","formatDistance_1","fDistance","bInMeters","sFormatted","formatKeywordToken_1","sToken","zoomLevels_1","require$$0","sType","bExcludeExternal","feature","url_params","place_id","img_src_value","sIcon","Images_Base_Url","create_if_block_3","if_block","each_blocks","display_name","t3_value","formatLabel","t5_value","t7_value","important","span0","span1","t3","t5","t7","aSearchResults","iHighlightNum","sMoreURL","reverse_search","current_result","search_params","aResults","aExcludePlaceIds","parsed_url","result_el","parentElement","pos","extend","dest","j","create$2","F","proto","lastId","stamp","_leaflet_id","throttle","time","lock","wrapperFn","later","wrapNum","range","includeMax","falseFn","formatNum","num","precision","pow","splitWords","getParamString","existingUrl","uppercase","templateRe","isArray","array","emptyImageUrl","getPrefixed","lastTime","timeoutDefer","timeToCall","requestFn","requestAnimationFrame","cancelFn","cancelAnimationFrame","requestAnimFrame","immediate","cancelAnimFrame","Util","Class","NewClass","initialize","callInitHooks","parentProto","__super__","statics","Mixin","Events","warn","stack","checkDeprecatedMixinEvents","_initHooks","_initHooksCalled","include","parentOptions","mergeOptions","addInitHook","types","_on","_off","removeAll","_events","_once","_listens","newListener","once","listeners","listener","_firingCount","fire","propagate","listens","sourceTarget","_propagateEvent","_fn","_eventParents","addEventParent","removeEventParent","layer","propagatedFrom","clearAllEventListeners","addOneTimeEventListener","fireEvent","hasEventListeners","Evented","Point","trunc","ceil","toPoint","Bounds","points","toBounds","LatLngBounds","corner1","corner2","latlngs","toLatLngBounds","LatLng","alt","toLatLng","clone","point","_add","subtract","_subtract","divideBy","_divideBy","multiplyBy","_multiplyBy","scaleBy","unscaleBy","_round","_floor","_ceil","_trunc","distanceTo","sqrt","equals","min2","max2","getBottomLeft","getTopRight","getTopLeft","getBottomRight","getSize","intersects","xIntersects","yIntersects","overlaps","xOverlaps","yOverlaps","isValid","pad","bufferRatio","heightBuffer","widthBuffer","sw2","ne2","sw","_southWest","ne","_northEast","getSouthWest","getNorthEast","getNorthWest","getSouthEast","latIntersects","lngIntersects","latOverlaps","lngOverlaps","toBBoxString","maxMargin","other","Earth","sizeInMeters","latAccuracy","lngAccuracy","cos","PI","CRS","latLngToPoint","latlng","projectedPoint","projection","project","scale","transformation","_transform","pointToLatLng","untransformedPoint","untransform","unproject","log","LN2","getProjectedBounds","infinite","wrapLng","wrapLat","wrapLatLngBounds","newCenter","latShift","lngShift","R","latlng1","latlng2","rad","lat1","lat2","sinDLat","sin","sinDLon","atan2","earthRadius","SphericalMercator","MAX_LATITUDE","atan","exp","Transformation","_a","_b","_c","_d","toTransformation","EPSG3857","EPSG900913","svgCreate","pointsToPath","rings","closed","len2","Browser","svg","ie","ielt9","edge","webkit","userAgentContains","android","android23","webkitVer","androidStock","opera","chrome","gecko","safari","phantom","opera12","platform","ie3d","webkit3d","WebKitCSSMatrix","gecko3d","any3d","L_DISABLE_3D","mobile","orientation","mobileWebkit","mobileWebkit3d","msPointer","MSPointerEvent","pointer","touchNative","TouchEvent","L_NO_TOUCH","mobileOpera","mobileGecko","retina","screen","deviceXDPI","logicalXDPI","passiveEvents","supportsPassiveOption","canvas$1","getContext","svg$1","createSVGRect","inlineSvg","firstChild","namespaceURI","vml","shape","adj","canvas","mac","linux","POINTER_DOWN","POINTER_MOVE","POINTER_UP","POINTER_CANCEL","pEvent","touchstart","touchmove","touchend","touchcancel","handle","MSPOINTER_TYPE_TOUCH","_handlePointer","_pointers","_pointerDocListener","addPointerListener","_globalPointerDown","_globalPointerMove","_globalPointerUp","pointerId","MSPOINTER_TYPE_MOUSE","changedTouches","disableTextSelection","enableTextSelection","_userSelect","_outlineElement","_outlineStyle","TRANSFORM","testProp","TRANSITION","getStyle","currentStyle","create$1","toFront","lastChild","toBack","hasClass","getClass","addClass","classes","setClass","removeClass","baseVal","correspondingElement","setOpacity","opacity","filterName","filters","Enabled","Opacity","_setOpacityIE","setTransform","setPosition","_leaflet_pos","getPosition","userSelectProperty","disableImageDrag","enableImageDrag","preventOutline","tabIndex","restoreOutline","outline","getSizedParentNode","getScale","boundingClientRect","DomUtil","addOne","eventsKey","batchRemove","removeOne","filterFn","mouseSubst","wheel","originalHandler","detail","last","simDblclick","sourceCapabilities","firesTouchEvents","path","getPropagationPath","HTMLLabelElement","for","HTMLInputElement","HTMLSelectElement","now","prop","newEvent","isTrusted","_simulated","makeDblclick","dblclick","addDoubleTapListener","isExternalTarget","attachEvent","removePointerListener","removeDoubleTapListener","detachEvent","originalEvent","_stopped","cancelBubble","disableScrollPropagation","disableClickPropagation","returnValue","ev","getMousePosition","clientY","wheelPxFactor","getWheelDelta","wheelDeltaY","deltaY","deltaMode","deltaX","deltaZ","wheelDelta","related","DomEvent","addListener","removeListener","PosAnimation","newPos","duration","easeLinearity","_el","_inProgress","_duration","_easeOutPower","_startPos","_startTime","_animate","_step","_complete","_animId","elapsed","_runFrame","_easeOut","progress","crs","minZoom","maxZoom","layers","maxBounds","renderer","zoomAnimation","zoomAnimationThreshold","fadeAnimation","markerZoomAnimation","transform3DLimit","zoomSnap","zoomDelta","trackResize","_handlers","_layers","_zoomBoundLayers","_sizeChanged","_initContainer","_initLayout","_onResize","setMaxBounds","_zoom","_limitZoom","setView","_zoomAnimated","_createAnimProxy","_proxy","_catchTransitionEnd","_addLayers","_limitCenter","_stop","_loaded","animate","pan","_tryAnimatedZoom","_tryAnimatedPan","_sizeTimer","_resetView","noMoveStart","setZoom","zoomIn","delta","zoomOut","setZoomAround","getZoomScale","viewHalf","latLngToContainerPoint","containerPointToLatLng","_getBoundsCenterZoom","paddingTL","paddingTopLeft","paddingBR","paddingBottomRight","getBoundsZoom","Infinity","paddingOffset","swPoint","nePoint","fitBounds","fitWorld","panTo","panBy","getZoom","_panAnim","step","_onPanTransitionStep","_onPanTransitionEnd","_mapPane","_getMapPanePos","_rawPanBy","flyTo","targetCenter","targetZoom","startZoom","w0","w1","u1","rho","rho2","sq","sinh","cosh","r0","S","_moveStart","frame","easeOut","_flyToFrame","getScaleZoom","w","_moveEnd","flyToBounds","_panInsideMaxBounds","setMinZoom","oldZoom","setMaxZoom","panInsideBounds","_enforcingBounds","panInside","pixelCenter","pixelPoint","pixelBounds","getPixelBounds","paddedBounds","paddedSize","invalidateSize","oldSize","_lastCenter","newSize","oldCenter","debounceMoveend","locate","_locateOptions","watch","_handleGeolocationError","onResponse","_handleGeolocationResponse","onError","_locationWatchId","geolocation","watchPosition","getCurrentPosition","stopLocate","clearWatch","_container","coords","latitude","longitude","accuracy","timestamp","HandlerClass","_containerId","_clearControlPos","_resizeRequest","_clearHandlers","_panes","_renderer","createPane","pane","_checkIfLoaded","_moved","layerPointToLatLng","_getCenterLayerPoint","getMinZoom","_layersMinZoom","getMaxZoom","_layersMaxZoom","inside","nw","se","boundsSize","snap","scalex","scaley","_size","topLeftPoint","_getTopLeftPoint","getPixelOrigin","_pixelOrigin","getPixelWorldBounds","getPane","getPanes","getContainer","toZoom","fromZoom","latLngToLayerPoint","containerPointToLayerPoint","layerPointToContainerPoint","layerPoint","mouseEventToContainerPoint","mouseEventToLayerPoint","mouseEventToLatLng","_onScroll","_fadeAnimated","_initPanes","_initControlPos","panes","_paneRenderers","markerPane","shadowPane","loading","zoomChanged","supressEvent","_getNewPixelOrigin","pinch","_getZoomSpan","_targets","onOff","_handleDOMEvent","_onMoveEnd","_findEventTargets","targets","isHover","srcElement","dragging","_draggableMoved","_isClickDisabled","_fireDOMEvent","_mouseEvents","canvasTargets","synth","filtered","isMarker","getLatLng","_radius","containerPoint","bubblingMouseEvents","moved","boxZoom","whenReady","_latLngToNewLayerPoint","topLeft","_latLngBoundsToNewLayerBounds","latLngBounds","_getCenterOffset","centerPoint","viewBounds","_getBoundsOffset","_limitOffset","newBounds","pxBounds","projectedMaxBounds","_rebound","proxy","mapPane","_animatingZoom","_onZoomTransitionEnd","_animMoveEnd","_destroyAnimProxy","z","_nothingToAnimate","getElementsByClassName","_animateZoom","startAnim","noUpdate","_animateToCenter","_animateToZoom","_tempFireZoomEvent","createMap","Control","_map","removeControl","addControl","addTo","onAdd","corner","_controlCorners","onRemove","_refocusOnMap","screenX","screenY","control","Map$2","corners","_controlContainer","createCorner","vSide","hSide","Layers","collapsed","autoZIndex","hideSingleBase","sortLayers","sortFunction","layerA","layerB","nameA","nameB","baseLayers","overlays","_layerControlInputs","_lastZIndex","_handlingClick","_addLayer","_update","_checkDisabledLayers","_onLayerChange","_expandIfNotCollapsed","addBaseLayer","addOverlay","removeLayer","_getLayer","expand","_section","acceptableHeight","collapse","link","_layersLink","_baseLayersList","_separator","_overlaysList","overlay","setZIndex","baseLayersPresent","overlaysPresent","baseLayersCount","_addItem","_createRadioElement","radioHtml","radioFragment","hasLayer","defaultChecked","layerId","_onInputClick","holder","inputs","addedLayers","removedLayers","addLayer","Zoom","zoomInText","zoomInTitle","zoomOutText","zoomOutTitle","zoomName","_zoomInButton","_createButton","_zoomIn","_zoomOutButton","_zoomOut","_updateDisabled","_disabled","zoomControl","Scale","maxWidth","metric","imperial","_addScales","updateWhenIdle","_mScale","_iScale","maxMeters","_updateScales","_updateMetric","_updateImperial","meters","_getRoundNum","_updateScale","maxMiles","miles","feet","maxFeet","ratio","pow10","Attribution","ukrainianFlag","_attributions","attributionControl","getAttribution","addAttribution","_addAttribution","removeAttribution","setPrefix","attribs","prefixAndAttribs","attribution","Handler","_enabled","addHooks","removeHooks","_lastCode","START","Draggable","clickTolerance","dragStartTarget","_dragStartTarget","_preventOutline","_onDown","_dragging","finishDrag","which","_moving","first","sizedParent","_startPoint","_parentScale","mouseevent","_onMove","_onUp","_lastTarget","SVGElementInstance","correspondingUseElement","_newPos","_lastEvent","_updatePosition","noInertia","simplify","tolerance","sqTolerance","reducedPoints","_sqDist","_reducePoints","markers","Uint8Array","_simplifyDPStep","newPoints","_simplifyDP","pointToSegmentDistance","p1","p2","_sqClosestPointOnSegment","sqDist","maxSqDist","clipSegment","useLastCode","codeOut","newCode","codeA","_getBitCode","codeB","_getEdgeIntersection","dx","dy","dot","isFlat","_flat","polylineCenter","halfDist","segDist","dist","LineUtil","closestPointOnSegment","clipPolygon","clippedPoints","edges","_code","polygonCenter","f","PolyUtil","LonLat","Mercator","R_MINOR","tmp","con","ts","tan","phi","dphi","EPSG3395","EPSG4326","Simple","Layer","removeFrom","_mapToAdd","addInteractiveTarget","targetEl","removeInteractiveTarget","_layerAdd","getEvents","beforeAdd","eachLayer","_addZoomLimit","_updateZoomLevels","_removeZoomLimit","oldZoomSpan","LayerGroup","getLayerId","clearLayers","invoke","methodName","getLayer","getLayers","zIndex","layerGroup","FeatureGroup","setStyle","bringToFront","bringToBack","featureGroup","Icon","popupAnchor","tooltipAnchor","crossOrigin","createIcon","oldIcon","_createIcon","createShadow","_getIconUrl","_createImg","_setIconStyles","sizeOption","shadowAnchor","iconAnchor","marginLeft","marginTop","icon","IconDefault","iconUrl","iconRetinaUrl","shadowUrl","iconSize","shadowSize","imagePath","_detectIconPath","_stripUrl","strip","re","MarkerDrag","marker","_marker","_icon","_draggable","dragstart","_onDragStart","predrag","_onPreDrag","drag","_onDrag","dragend","_onDragEnd","_adjustPan","speed","autoPanSpeed","autoPanPadding","iconPos","panBounds","movement","_panRequest","_oldLatLng","closePopup","autoPan","shadow","_shadow","_latlng","oldLatLng","Marker","interactive","zIndexOffset","riseOnHover","riseOffset","autoPanOnFocus","draggable","_initIcon","_removeIcon","_removeShadow","viewreset","setLatLng","setZIndexOffset","getIcon","setIcon","_popup","bindPopup","_setPos","classToAdd","addIcon","mouseover","_bringToFront","mouseout","_resetZIndex","_panOnFocus","newShadow","addShadow","_updateOpacity","_initInteraction","_zIndex","_updateZIndex","opt","iconOpts","_getPopupAnchor","_getTooltipAnchor","Path","stroke","color","weight","lineCap","lineJoin","dashArray","dashOffset","fillColor","fillOpacity","fillRule","getRenderer","_initPath","_reset","_addPath","_removePath","redraw","_updatePath","_updateStyle","_updateBounds","_bringToBack","_path","_project","_clickTolerance","CircleMarker","radius","setRadius","getRadius","_point","r2","_radiusY","_pxBounds","_updateCircle","_empty","_bounds","_containsPoint","circleMarker","Circle","legacyOptions","_mRadius","half","latR","lngR","acos","circle","Polyline","smoothFactor","noClip","_setLatLngs","getLatLngs","_latlngs","setLatLngs","isEmpty","closestLayerPoint","minDistance","minPoint","jLen","_parts","_defaultShape","addLatLng","_convertLatLngs","flat","_rings","_projectLatlngs","_rawPxBounds","projectedBounds","ring","_clipPoints","segment","_simplifyPoints","_updatePoly","part","polyline","Polygon","clipped","polygon","GeoJSON","geojson","addData","features","geometries","geometry","coordinates","geometryToLayer","asFeature","resetStyle","onEachFeature","_setLayerStyle","pointToLayer","_coordsToLatLng","coordsToLatLng","_pointToLayer","coordsToLatLngs","geoLayer","properties","featureLayer","pointToLayerFn","markersInheritOptions","levelsDeep","latLngToCoords","latLngsToCoords","getFeature","newGeometry","PointToGeoJSON","toGeoJSON","geoJSON","multi","holes","toMultiPoint","isGeometryCollection","jsons","geoJson","ImageOverlay","errorOverlayUrl","_url","_image","_initImage","styleOpts","setUrl","setBounds","zoomanim","wasElementSupplied","onselectstart","onmousemove","onload","onerror","_overlayOnError","image","errorUrl","imageOverlay","VideoOverlay","autoplay","loop","keepAspectRatio","muted","playsInline","vid","onloadeddata","sourceElements","getElementsByTagName","sources","source","videoOverlay","video","SVGOverlay","svgOverlay","DivOverlay","_source","_content","openOn","_prepareOpen","_removeTimeout","visibility","_updateContent","_updateLayout","_contentNode","hasChildNodes","_getAnchor","_containerBottom","_containerLeft","_containerWidth","_initOverlay","OverlayClass","old","Popup","minWidth","maxHeight","autoPanPaddingTopLeft","autoPanPaddingBottomRight","keepInView","closeButton","closeOnEscapeKey","popup","closeOnClick","closePopupOnClick","preclick","moveend","wrapper","_wrapper","_tipContainer","_tip","_closeButton","whiteSpace","scrolledClass","marginBottom","containerHeight","containerWidth","layerPos","containerPos","openPopup","_popupHandlersAdded","_openPopup","keypress","_onKeyPress","move","_movePopup","unbindPopup","togglePopup","isPopupOpen","setPopupContent","getPopup","keyCode","permanent","sticky","tooltip","_setPosition","subX","subY","tooltipPoint","tooltipWidth","tooltipHeight","openTooltip","closeTooltip","bindTooltip","_tooltip","isTooltipOpen","unbindTooltip","_initTooltipInteractions","_tooltipHandlersAdded","_moveTooltip","_openTooltip","_addFocusListeners","mousemove","_setAriaDescribedByOnLayer","toggleTooltip","setTooltipContent","getTooltip","_addFocusListenersOnLayer","moving","DivIcon","bgPos","backgroundPosition","divIcon","GridLayer","tileSize","updateWhenZooming","updateInterval","maxNativeZoom","minNativeZoom","noWrap","keepBuffer","_levels","_tiles","_removeAllTiles","_tileZoom","_setAutoZIndex","isLoading","_loading","tileZoom","_clampZoom","_updateLevels","viewprereset","_invalidateAll","createTile","getTileSize","compare","edgeZIndex","isFinite","nextFrame","willPrune","tile","loaded","fade","_onOpaqueTile","_noPrune","_pruneTiles","_fadeFrame","_onUpdateLevel","_removeTilesAtZoom","_onRemoveLevel","level","_setZoomTransform","_onCreateLevel","_level","retain","_retainParent","_retainChildren","_removeTile","x2","y2","z2","coords2","_tileCoordsToKey","animating","_setView","noPrune","tileZoomChanged","_abortLoading","_resetGrid","_setZoomTransforms","translate","_tileSize","_globalTileRange","_pxBoundsToTileRange","_wrapX","_wrapY","_getTiledPixelBounds","mapZoom","halfSize","tileRange","tileCenter","queue","noPruneRange","_isValidTile","createDocumentFragment","_addTile","tileBounds","_tileCoordsToBounds","_keyToBounds","_keyToTileCoords","_tileCoordsToNwSe","nwPoint","sePoint","bp","_initTile","tilePos","_getTilePos","_wrapCoords","_tileReady","_noTilesToLoad","newCoords","gridLayer","TileLayer","subdomains","errorTileUrl","zoomOffset","tms","zoomReverse","detectRetina","referrerPolicy","_onTileRemove","noRedraw","done","_tileOnLoad","_tileOnError","getTileUrl","_getSubdomain","_getZoomForUrl","invertedY","tilePoint","tileLayer","TileLayerWMS","defaultWmsParams","service","request","transparent","wmsParams","realRetina","_crs","_wmsVersion","projectionKey","bbox","setParams","WMS","wms","Renderer","_updatePaths","_destroyContainer","_onZoom","zoomend","_onZoomEnd","_onAnimZoom","_updateTransform","currentCenterPoint","_center","topLeftOffset","Canvas","_onViewPreReset","_postponeUpdatePaths","_draw","_onMouseMove","_onClick","_handleMouseOut","_ctx","_redrawRequest","_redrawBounds","_redraw","_updateDashArray","_order","_drawLast","_drawFirst","_requestRedraw","_extendRedrawBounds","dashValue","_dashArray","_clear","clearRect","save","restore","beginPath","clip","_drawing","closePath","_fillStroke","arc","globalAlpha","fillStyle","setLineDash","lineWidth","strokeStyle","clickedLayer","_fireEvent","_handleMouseHover","_hoveredLayer","_mouseHoverThrottled","candidateHoveredLayer","vmlCreate","namespaces","vmlMixin","coordsize","_stroke","_fill","stroked","filled","dashStyle","endcap","joinstyle","_setPath","SVG","_rootGroup","_svgSize","_getPaneRenderer","_createRenderer","preferCanvas","Rectangle","_boundsToLatLngs","rectangle","BoxZoom","_pane","overlayPane","_resetStateTimeout","_destroy","_onMouseDown","_resetState","_clearDeferredResetState","contextmenu","mouseup","_onMouseUp","keydown","_onKeyDown","_box","_finish","boxZoomBounds","doubleClickZoom","DoubleClickZoom","_onDoubleClick","inertia","inertiaDeceleration","inertiaMaxSpeed","worldCopyJump","maxBoundsViscosity","Drag","_onPreDragLimit","_onPreDragWrap","_positions","_times","_offsetLimit","_viscosity","_lastTime","_lastPos","_absPos","_prunePositions","shift","pxCenter","pxWorldCenter","_initialWorldOffset","_worldWidth","_viscousLimit","worldWidth","halfWidth","newX1","newX2","newX","ease","speedVector","limitedSpeed","limitedSpeedVector","decelerationDuration","keyboardPanDelta","Keyboard","keyCodes","down","up","_setPanDelta","_setZoomDelta","_onFocus","_onBlur","mousedown","_addHooks","_removeHooks","_focused","docEl","panDelta","_panKeys","codes","_zoomKeys","altKey","ctrlKey","metaKey","scrollWheelZoom","wheelDebounceTime","wheelPxPerZoomLevel","ScrollWheelZoom","_onWheelScroll","_delta","_lastMousePos","_timer","_performZoom","d2","d3","d4","tapHold","tapTolerance","TapHold","_holdTimeout","_cancel","_isTapValid","_cancelClickPrevent","_simulateEvent","cancelClickPrevent","simulatedEvent","MouseEvent","touchZoom","bounceAtZoomLimits","TouchZoom","_onTouchStart","_zooming","_centerPoint","_startLatLng","_pinchStartLatLng","_startDist","_startZoom","_onTouchMove","_onTouchEnd","_animRequest","moveFn","globalL","Projection","globalObject","globalThis","self","global","getGlobalObject","oldL","br0","br1","br2","br3","handleHideClick","last_click_latlng","map_center","map_zoom","map_viewbox","view_on_osm_link","last_click","mouse_position","display_map_position","mouse_lat_lng","map_link_to_osm","module","exports","MiniMap","minimap","toggleDisplay","zoomLevelOffset","zoomLevelFixed","centerFixed","autoToggleDisplay","minimized","collapsedWidth","collapsedHeight","aimingRectOptions","clickable","shadowRectOptions","strings","hideText","showText","mapOptions","_layer","_mainMap","_isZoomLevelFixed","_miniMap","_mainMapMoving","_miniMapMoving","_userToggledDisplay","_minimized","_addToggleButton","_aimingRect","_shadowRect","_onMainMapMoved","_onMainMapMoving","_onMiniMapMoveStarted","_onMiniMapMoving","_onMiniMapMoved","_decideZoom","_setDisplay","changeLayer","_toggleDisplayButton","_toggleButtonInitialTitleText","_toggleDisplayButtonClicked","_restore","_minimize","minimize","_onToggle","_decideMinimized","lastAimingRect","_lastAimingRectPosition","_isDefined","_isInteger","fromMaintoMini","toRet","currentDiff","proposedZoom","_lastMiniMapZoom","_fireToggleEvents","miniMapControl","action_result","show_map_position_click","display_minimap","position_marker","dataLayers","setMapData","aFeature","resetMapData","cm","L.circleMarker","L.rectangle","L.latLngBounds","centroid","geojson_layer","L.geoJson","Map_Tile_Attribution","L.map","Map_Default_Lat","Map_Default_Lon","Map_Default_Zoom","L.control","L.tileLayer","Map_Tile_URL","osm2","L.TileLayer","L.Control","MapPositionControl","pageinfo","polygon_geojson","Search_AreaPolygons","exclude_place_ids","anyStructuredFieldsSet","loaddata","zoomLevels","div7","maybeSplitLatitude","coords_split","gotoCoordinates","newlat","newlon","newzoom","selected_option","select_value","levels","updates","to_null_out","accounted_for","spread_props","Reverse_Default_Search_Zoom","input_value_value","osmtype","osmid","type_and_id_match","t_value","localname","formatPlaceType","raw0_value","osmLink","t4_value","rank_address","formatAdminLevel","admin_level","raw1_value","formatDistance","show_if","tr","td0","td1","td2","td3","td4","td5","td6","t4","t6","t6_value","addressLine","bDistanceInMeters","bMarkUnusedLines","bAddressLineUsed","isaddress","a2","openHint","closeHint","postcode","overpass_query","t0_value","t0","t2","t2_value","isAdminBoundary","if_block1","calculated_importance","create_if_block_14","if_block2","create_if_block_13","if_block3","address","create_if_block_11","if_block4","linked_places","create_if_block_10","create_if_block_4","hierarchy","table0","tbody0","div8","h20","table1","thead","tbody1","tr1","names","inforowlist_changes","indexed_date","rank_search","formatAddressRank","importance","create_if_block_15","coverageType","raw_value","html_tag","wikipediaLink","calculated_postcode","detailspostcodehint_changes","create_if_block_12","addresstags","extratags","each_value_5","each_value_4","keywords","create_if_block_5","td","aThisPlace","create_if_block_7","formatKeywordToken","token","create_if_block_9","create_if_block_8","each_value","base_url","api_request_finished","addressdetails","group_hierarchy","country_code","t11_value","errormessage","t13_value","updated","a_href_value","td7","td8","t9","t9_value","t11","t13","table","tbody","aPolygons","t8_value","t10_value","t8","t10","software_version","database_version","dl","dt0","dd0","dt1","dd1","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AA,EAAAv7B,IAAAu6G,KAAAA,EAAA76G,KAAYk7G,iBAAgB,KAAAr3G,EAAAk3G,EAAAF,KAG5Bh/E,GAAA,EAAAv7B,IAAAw6G,KAAAA,EAAA96G,KAAYoiD,aAAY,KAAAv+C,EAAAm3G,EAAAF,6HA7B/Bc,EAAW,CAAA,EACXC,EAAgB5/D,wBAQpBt2C,cALE23C,GAAe,SAAQ,CAAI8C,OAAQ,kBAAoB59C,GACrDi9C,EAAA,EAAAm8D,EAAcp5G,MAEhBy8C,GAAkB,6QCFtBt9C,EAA6CH,EAAA4pC,EAAAxpC,qIAN3C+D,GAAO,KACLk5C,GAA2B,wBAAyBhgD,SAAS6M,eAAe,cAAY,k1CCiBvF,MAAS,WAAT1L,KAAiB,EAEH,YAATA,KAAkB,EAET,YAATA,KAAkB,EAET,cAATA,KAAoB,EAEX,aAATA,KAAmB,EAEV,WAATA,KAAiB,EAER,UAATA,KAAgB,sfAlBxBo8C,2CAFGqD,EAAA,EAAAgE,EAAOC,EAAM1G,eAMgBZ,MCnBtB,oEAAQ,CAClB56C,OAAQ3C,SAAS8P"}
\ No newline at end of file
+{"version":3,"file":"bundle.js","sources":["../../node_modules/svelte/internal/index.mjs","../../node_modules/bootstrap/dist/js/bootstrap.bundle.js","../../node_modules/svelte/store/index.mjs","../../node_modules/escape-html/index.js","../../src/lib/helpers.js","../../src/lib/stores.js","../../src/components/Footer.svelte","../../src/lib/api_utils.js","../../src/components/PageLink.svelte","../../src/components/ReverseLink.svelte","../../node_modules/timeago.js/esm/lang/en_US.js","../../node_modules/timeago.js/esm/lang/zh_CN.js","../../node_modules/timeago.js/esm/register.js","../../node_modules/timeago.js/esm/utils/date.js","../../node_modules/timeago.js/esm/format.js","../../src/components/LastUpdated.svelte","../../node_modules/timeago.js/esm/index.js","../../src/components/Error.svelte","../../src/components/Header.svelte","../../src/components/UrlSubmitForm.svelte","../../src/components/SearchSection.svelte","../../src/components/DetailsLink.svelte","../../src/components/Welcome.svelte","../../src/components/MapIcon.svelte","../../src/components/ResultsList.svelte","../../node_modules/leaflet/dist/leaflet-src.js","../../src/components/MapPosition.svelte","../../node_modules/leaflet-minimap/dist/Control.MiniMap.min.js","../../src/components/Map.svelte","../../src/pages/SearchPage.svelte","../../src/components/SearchSectionReverse.svelte","../../src/pages/ReversePage.svelte","../../src/components/SearchSectionDetails.svelte","../../src/components/DetailsOneRow.svelte","../../src/components/DetailsPostcodeHint.svelte","../../src/components/DetailsInfoRow.svelte","../../src/components/DetailsInfoRowList.svelte","../../src/pages/DetailsPage.svelte","../../src/pages/PolygonsPage.svelte","../../src/pages/DeletablePage.svelte","../../src/pages/StatusPage.svelte","../../src/pages/AboutPage.svelte","../../src/App.svelte","../../src/main.js"],"sourcesContent":["function noop() { }\nconst identity = x => x;\nfunction assign(tar, src) {\n // @ts-ignore\n for (const k in src)\n tar[k] = src[k];\n return tar;\n}\nfunction is_promise(value) {\n return value && typeof value === 'object' && typeof value.then === 'function';\n}\nfunction add_location(element, file, line, column, char) {\n element.__svelte_meta = {\n loc: { file, line, column, char }\n };\n}\nfunction run(fn) {\n return fn();\n}\nfunction blank_object() {\n return Object.create(null);\n}\nfunction run_all(fns) {\n fns.forEach(run);\n}\nfunction is_function(thing) {\n return typeof thing === 'function';\n}\nfunction safe_not_equal(a, b) {\n return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');\n}\nlet src_url_equal_anchor;\nfunction src_url_equal(element_src, url) {\n if (!src_url_equal_anchor) {\n src_url_equal_anchor = document.createElement('a');\n }\n src_url_equal_anchor.href = url;\n return element_src === src_url_equal_anchor.href;\n}\nfunction not_equal(a, b) {\n return a != a ? b == b : a !== b;\n}\nfunction is_empty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction validate_store(store, name) {\n if (store != null && typeof store.subscribe !== 'function') {\n throw new Error(`'${name}' is not a store with a 'subscribe' method`);\n }\n}\nfunction subscribe(store, ...callbacks) {\n if (store == null) {\n return noop;\n }\n const unsub = store.subscribe(...callbacks);\n return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\nfunction get_store_value(store) {\n let value;\n subscribe(store, _ => value = _)();\n return value;\n}\nfunction component_subscribe(component, store, callback) {\n component.$$.on_destroy.push(subscribe(store, callback));\n}\nfunction create_slot(definition, ctx, $$scope, fn) {\n if (definition) {\n const slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n return definition[0](slot_ctx);\n }\n}\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n return definition[1] && fn\n ? assign($$scope.ctx.slice(), definition[1](fn(ctx)))\n : $$scope.ctx;\n}\nfunction get_slot_changes(definition, $$scope, dirty, fn) {\n if (definition[2] && fn) {\n const lets = definition[2](fn(dirty));\n if ($$scope.dirty === undefined) {\n return lets;\n }\n if (typeof lets === 'object') {\n const merged = [];\n const len = Math.max($$scope.dirty.length, lets.length);\n for (let i = 0; i < len; i += 1) {\n merged[i] = $$scope.dirty[i] | lets[i];\n }\n return merged;\n }\n return $$scope.dirty | lets;\n }\n return $$scope.dirty;\n}\nfunction update_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn) {\n if (slot_changes) {\n const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n slot.p(slot_context, slot_changes);\n }\n}\nfunction update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n update_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn);\n}\nfunction get_all_dirty_from_scope($$scope) {\n if ($$scope.ctx.length > 32) {\n const dirty = [];\n const length = $$scope.ctx.length / 32;\n for (let i = 0; i < length; i++) {\n dirty[i] = -1;\n }\n return dirty;\n }\n return -1;\n}\nfunction exclude_internal_props(props) {\n const result = {};\n for (const k in props)\n if (k[0] !== '$')\n result[k] = props[k];\n return result;\n}\nfunction compute_rest_props(props, keys) {\n const rest = {};\n keys = new Set(keys);\n for (const k in props)\n if (!keys.has(k) && k[0] !== '$')\n rest[k] = props[k];\n return rest;\n}\nfunction compute_slots(slots) {\n const result = {};\n for (const key in slots) {\n result[key] = true;\n }\n return result;\n}\nfunction once(fn) {\n let ran = false;\n return function (...args) {\n if (ran)\n return;\n ran = true;\n fn.call(this, ...args);\n };\n}\nfunction null_to_empty(value) {\n return value == null ? '' : value;\n}\nfunction set_store_value(store, ret, value) {\n store.set(value);\n return ret;\n}\nconst has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\nfunction action_destroyer(action_result) {\n return action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\n\nconst is_client = typeof window !== 'undefined';\nlet now = is_client\n ? () => window.performance.now()\n : () => Date.now();\nlet raf = is_client ? cb => requestAnimationFrame(cb) : noop;\n// used internally for testing\nfunction set_now(fn) {\n now = fn;\n}\nfunction set_raf(fn) {\n raf = fn;\n}\n\nconst tasks = new Set();\nfunction run_tasks(now) {\n tasks.forEach(task => {\n if (!task.c(now)) {\n tasks.delete(task);\n task.f();\n }\n });\n if (tasks.size !== 0)\n raf(run_tasks);\n}\n/**\n * For testing purposes only!\n */\nfunction clear_loops() {\n tasks.clear();\n}\n/**\n * Creates a new task that runs on each raf frame\n * until it returns a falsy value or is aborted\n */\nfunction loop(callback) {\n let task;\n if (tasks.size === 0)\n raf(run_tasks);\n return {\n promise: new Promise(fulfill => {\n tasks.add(task = { c: callback, f: fulfill });\n }),\n abort() {\n tasks.delete(task);\n }\n };\n}\n\n// Track which nodes are claimed during hydration. Unclaimed nodes can then be removed from the DOM\n// at the end of hydration without touching the remaining nodes.\nlet is_hydrating = false;\nfunction start_hydrating() {\n is_hydrating = true;\n}\nfunction end_hydrating() {\n is_hydrating = false;\n}\nfunction upper_bound(low, high, key, value) {\n // Return first index of value larger than input value in the range [low, high)\n while (low < high) {\n const mid = low + ((high - low) >> 1);\n if (key(mid) <= value) {\n low = mid + 1;\n }\n else {\n high = mid;\n }\n }\n return low;\n}\nfunction init_hydrate(target) {\n if (target.hydrate_init)\n return;\n target.hydrate_init = true;\n // We know that all children have claim_order values since the unclaimed have been detached if target is not <head>\n let children = target.childNodes;\n // If target is <head>, there may be children without claim_order\n if (target.nodeName === 'HEAD') {\n const myChildren = [];\n for (let i = 0; i < children.length; i++) {\n const node = children[i];\n if (node.claim_order !== undefined) {\n myChildren.push(node);\n }\n }\n children = myChildren;\n }\n /*\n * Reorder claimed children optimally.\n * We can reorder claimed children optimally by finding the longest subsequence of\n * nodes that are already claimed in order and only moving the rest. The longest\n * subsequence of nodes that are claimed in order can be found by\n * computing the longest increasing subsequence of .claim_order values.\n *\n * This algorithm is optimal in generating the least amount of reorder operations\n * possible.\n *\n * Proof:\n * We know that, given a set of reordering operations, the nodes that do not move\n * always form an increasing subsequence, since they do not move among each other\n * meaning that they must be already ordered among each other. Thus, the maximal\n * set of nodes that do not move form a longest increasing subsequence.\n */\n // Compute longest increasing subsequence\n // m: subsequence length j => index k of smallest value that ends an increasing subsequence of length j\n const m = new Int32Array(children.length + 1);\n // Predecessor indices + 1\n const p = new Int32Array(children.length);\n m[0] = -1;\n let longest = 0;\n for (let i = 0; i < children.length; i++) {\n const current = children[i].claim_order;\n // Find the largest subsequence length such that it ends in a value less than our current value\n // upper_bound returns first greater value, so we subtract one\n // with fast path for when we are on the current longest subsequence\n const seqLen = ((longest > 0 && children[m[longest]].claim_order <= current) ? longest + 1 : upper_bound(1, longest, idx => children[m[idx]].claim_order, current)) - 1;\n p[i] = m[seqLen] + 1;\n const newLen = seqLen + 1;\n // We can guarantee that current is the smallest value. Otherwise, we would have generated a longer sequence.\n m[newLen] = i;\n longest = Math.max(newLen, longest);\n }\n // The longest increasing subsequence of nodes (initially reversed)\n const lis = [];\n // The rest of the nodes, nodes that will be moved\n const toMove = [];\n let last = children.length - 1;\n for (let cur = m[longest] + 1; cur != 0; cur = p[cur - 1]) {\n lis.push(children[cur - 1]);\n for (; last >= cur; last--) {\n toMove.push(children[last]);\n }\n last--;\n }\n for (; last >= 0; last--) {\n toMove.push(children[last]);\n }\n lis.reverse();\n // We sort the nodes being moved to guarantee that their insertion order matches the claim order\n toMove.sort((a, b) => a.claim_order - b.claim_order);\n // Finally, we move the nodes\n for (let i = 0, j = 0; i < toMove.length; i++) {\n while (j < lis.length && toMove[i].claim_order >= lis[j].claim_order) {\n j++;\n }\n const anchor = j < lis.length ? lis[j] : null;\n target.insertBefore(toMove[i], anchor);\n }\n}\nfunction append(target, node) {\n target.appendChild(node);\n}\nfunction append_styles(target, style_sheet_id, styles) {\n const append_styles_to = get_root_for_style(target);\n if (!append_styles_to.getElementById(style_sheet_id)) {\n const style = element('style');\n style.id = style_sheet_id;\n style.textContent = styles;\n append_stylesheet(append_styles_to, style);\n }\n}\nfunction get_root_for_style(node) {\n if (!node)\n return document;\n const root = node.getRootNode ? node.getRootNode() : node.ownerDocument;\n if (root && root.host) {\n return root;\n }\n return node.ownerDocument;\n}\nfunction append_empty_stylesheet(node) {\n const style_element = element('style');\n append_stylesheet(get_root_for_style(node), style_element);\n return style_element.sheet;\n}\nfunction append_stylesheet(node, style) {\n append(node.head || node, style);\n return style.sheet;\n}\nfunction append_hydration(target, node) {\n if (is_hydrating) {\n init_hydrate(target);\n if ((target.actual_end_child === undefined) || ((target.actual_end_child !== null) && (target.actual_end_child.parentNode !== target))) {\n target.actual_end_child = target.firstChild;\n }\n // Skip nodes of undefined ordering\n while ((target.actual_end_child !== null) && (target.actual_end_child.claim_order === undefined)) {\n target.actual_end_child = target.actual_end_child.nextSibling;\n }\n if (node !== target.actual_end_child) {\n // We only insert if the ordering of this node should be modified or the parent node is not target\n if (node.claim_order !== undefined || node.parentNode !== target) {\n target.insertBefore(node, target.actual_end_child);\n }\n }\n else {\n target.actual_end_child = node.nextSibling;\n }\n }\n else if (node.parentNode !== target || node.nextSibling !== null) {\n target.appendChild(node);\n }\n}\nfunction insert(target, node, anchor) {\n target.insertBefore(node, anchor || null);\n}\nfunction insert_hydration(target, node, anchor) {\n if (is_hydrating && !anchor) {\n append_hydration(target, node);\n }\n else if (node.parentNode !== target || node.nextSibling != anchor) {\n target.insertBefore(node, anchor || null);\n }\n}\nfunction detach(node) {\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n}\nfunction destroy_each(iterations, detaching) {\n for (let i = 0; i < iterations.length; i += 1) {\n if (iterations[i])\n iterations[i].d(detaching);\n }\n}\nfunction element(name) {\n return document.createElement(name);\n}\nfunction element_is(name, is) {\n return document.createElement(name, { is });\n}\nfunction object_without_properties(obj, exclude) {\n const target = {};\n for (const k in obj) {\n if (has_prop(obj, k)\n // @ts-ignore\n && exclude.indexOf(k) === -1) {\n // @ts-ignore\n target[k] = obj[k];\n }\n }\n return target;\n}\nfunction svg_element(name) {\n return document.createElementNS('http://www.w3.org/2000/svg', name);\n}\nfunction text(data) {\n return document.createTextNode(data);\n}\nfunction space() {\n return text(' ');\n}\nfunction empty() {\n return text('');\n}\nfunction listen(node, event, handler, options) {\n node.addEventListener(event, handler, options);\n return () => node.removeEventListener(event, handler, options);\n}\nfunction prevent_default(fn) {\n return function (event) {\n event.preventDefault();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction stop_propagation(fn) {\n return function (event) {\n event.stopPropagation();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction self(fn) {\n return function (event) {\n // @ts-ignore\n if (event.target === this)\n fn.call(this, event);\n };\n}\nfunction trusted(fn) {\n return function (event) {\n // @ts-ignore\n if (event.isTrusted)\n fn.call(this, event);\n };\n}\nfunction attr(node, attribute, value) {\n if (value == null)\n node.removeAttribute(attribute);\n else if (node.getAttribute(attribute) !== value)\n node.setAttribute(attribute, value);\n}\nfunction set_attributes(node, attributes) {\n // @ts-ignore\n const descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n for (const key in attributes) {\n if (attributes[key] == null) {\n node.removeAttribute(key);\n }\n else if (key === 'style') {\n node.style.cssText = attributes[key];\n }\n else if (key === '__value') {\n node.value = node[key] = attributes[key];\n }\n else if (descriptors[key] && descriptors[key].set) {\n node[key] = attributes[key];\n }\n else {\n attr(node, key, attributes[key]);\n }\n }\n}\nfunction set_svg_attributes(node, attributes) {\n for (const key in attributes) {\n attr(node, key, attributes[key]);\n }\n}\nfunction set_custom_element_data_map(node, data_map) {\n Object.keys(data_map).forEach((key) => {\n set_custom_element_data(node, key, data_map[key]);\n });\n}\nfunction set_custom_element_data(node, prop, value) {\n if (prop in node) {\n node[prop] = typeof node[prop] === 'boolean' && value === '' ? true : value;\n }\n else {\n attr(node, prop, value);\n }\n}\nfunction xlink_attr(node, attribute, value) {\n node.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\nfunction get_binding_group_value(group, __value, checked) {\n const value = new Set();\n for (let i = 0; i < group.length; i += 1) {\n if (group[i].checked)\n value.add(group[i].__value);\n }\n if (!checked) {\n value.delete(__value);\n }\n return Array.from(value);\n}\nfunction to_number(value) {\n return value === '' ? null : +value;\n}\nfunction time_ranges_to_array(ranges) {\n const array = [];\n for (let i = 0; i < ranges.length; i += 1) {\n array.push({ start: ranges.start(i), end: ranges.end(i) });\n }\n return array;\n}\nfunction children(element) {\n return Array.from(element.childNodes);\n}\nfunction init_claim_info(nodes) {\n if (nodes.claim_info === undefined) {\n nodes.claim_info = { last_index: 0, total_claimed: 0 };\n }\n}\nfunction claim_node(nodes, predicate, processNode, createNode, dontUpdateLastIndex = false) {\n // Try to find nodes in an order such that we lengthen the longest increasing subsequence\n init_claim_info(nodes);\n const resultNode = (() => {\n // We first try to find an element after the previous one\n for (let i = nodes.claim_info.last_index; i < nodes.length; i++) {\n const node = nodes[i];\n if (predicate(node)) {\n const replacement = processNode(node);\n if (replacement === undefined) {\n nodes.splice(i, 1);\n }\n else {\n nodes[i] = replacement;\n }\n if (!dontUpdateLastIndex) {\n nodes.claim_info.last_index = i;\n }\n return node;\n }\n }\n // Otherwise, we try to find one before\n // We iterate in reverse so that we don't go too far back\n for (let i = nodes.claim_info.last_index - 1; i >= 0; i--) {\n const node = nodes[i];\n if (predicate(node)) {\n const replacement = processNode(node);\n if (replacement === undefined) {\n nodes.splice(i, 1);\n }\n else {\n nodes[i] = replacement;\n }\n if (!dontUpdateLastIndex) {\n nodes.claim_info.last_index = i;\n }\n else if (replacement === undefined) {\n // Since we spliced before the last_index, we decrease it\n nodes.claim_info.last_index--;\n }\n return node;\n }\n }\n // If we can't find any matching node, we create a new one\n return createNode();\n })();\n resultNode.claim_order = nodes.claim_info.total_claimed;\n nodes.claim_info.total_claimed += 1;\n return resultNode;\n}\nfunction claim_element_base(nodes, name, attributes, create_element) {\n return claim_node(nodes, (node) => node.nodeName === name, (node) => {\n const remove = [];\n for (let j = 0; j < node.attributes.length; j++) {\n const attribute = node.attributes[j];\n if (!attributes[attribute.name]) {\n remove.push(attribute.name);\n }\n }\n remove.forEach(v => node.removeAttribute(v));\n return undefined;\n }, () => create_element(name));\n}\nfunction claim_element(nodes, name, attributes) {\n return claim_element_base(nodes, name, attributes, element);\n}\nfunction claim_svg_element(nodes, name, attributes) {\n return claim_element_base(nodes, name, attributes, svg_element);\n}\nfunction claim_text(nodes, data) {\n return claim_node(nodes, (node) => node.nodeType === 3, (node) => {\n const dataStr = '' + data;\n if (node.data.startsWith(dataStr)) {\n if (node.data.length !== dataStr.length) {\n return node.splitText(dataStr.length);\n }\n }\n else {\n node.data = dataStr;\n }\n }, () => text(data), true // Text nodes should not update last index since it is likely not worth it to eliminate an increasing subsequence of actual elements\n );\n}\nfunction claim_space(nodes) {\n return claim_text(nodes, ' ');\n}\nfunction find_comment(nodes, text, start) {\n for (let i = start; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeType === 8 /* comment node */ && node.textContent.trim() === text) {\n return i;\n }\n }\n return nodes.length;\n}\nfunction claim_html_tag(nodes, is_svg) {\n // find html opening tag\n const start_index = find_comment(nodes, 'HTML_TAG_START', 0);\n const end_index = find_comment(nodes, 'HTML_TAG_END', start_index);\n if (start_index === end_index) {\n return new HtmlTagHydration(undefined, is_svg);\n }\n init_claim_info(nodes);\n const html_tag_nodes = nodes.splice(start_index, end_index - start_index + 1);\n detach(html_tag_nodes[0]);\n detach(html_tag_nodes[html_tag_nodes.length - 1]);\n const claimed_nodes = html_tag_nodes.slice(1, html_tag_nodes.length - 1);\n for (const n of claimed_nodes) {\n n.claim_order = nodes.claim_info.total_claimed;\n nodes.claim_info.total_claimed += 1;\n }\n return new HtmlTagHydration(claimed_nodes, is_svg);\n}\nfunction set_data(text, data) {\n data = '' + data;\n if (text.wholeText !== data)\n text.data = data;\n}\nfunction set_input_value(input, value) {\n input.value = value == null ? '' : value;\n}\nfunction set_input_type(input, type) {\n try {\n input.type = type;\n }\n catch (e) {\n // do nothing\n }\n}\nfunction set_style(node, key, value, important) {\n if (value === null) {\n node.style.removeProperty(key);\n }\n else {\n node.style.setProperty(key, value, important ? 'important' : '');\n }\n}\nfunction select_option(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n if (option.__value === value) {\n option.selected = true;\n return;\n }\n }\n select.selectedIndex = -1; // no option should be selected\n}\nfunction select_options(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n option.selected = ~value.indexOf(option.__value);\n }\n}\nfunction select_value(select) {\n const selected_option = select.querySelector(':checked') || select.options[0];\n return selected_option && selected_option.__value;\n}\nfunction select_multiple_value(select) {\n return [].map.call(select.querySelectorAll(':checked'), option => option.__value);\n}\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\nlet crossorigin;\nfunction is_crossorigin() {\n if (crossorigin === undefined) {\n crossorigin = false;\n try {\n if (typeof window !== 'undefined' && window.parent) {\n void window.parent.document;\n }\n }\n catch (error) {\n crossorigin = true;\n }\n }\n return crossorigin;\n}\nfunction add_resize_listener(node, fn) {\n const computed_style = getComputedStyle(node);\n if (computed_style.position === 'static') {\n node.style.position = 'relative';\n }\n const iframe = element('iframe');\n iframe.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ' +\n 'overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;');\n iframe.setAttribute('aria-hidden', 'true');\n iframe.tabIndex = -1;\n const crossorigin = is_crossorigin();\n let unsubscribe;\n if (crossorigin) {\n iframe.src = \"data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}</script>\";\n unsubscribe = listen(window, 'message', (event) => {\n if (event.source === iframe.contentWindow)\n fn();\n });\n }\n else {\n iframe.src = 'about:blank';\n iframe.onload = () => {\n unsubscribe = listen(iframe.contentWindow, 'resize', fn);\n };\n }\n append(node, iframe);\n return () => {\n if (crossorigin) {\n unsubscribe();\n }\n else if (unsubscribe && iframe.contentWindow) {\n unsubscribe();\n }\n detach(iframe);\n };\n}\nfunction toggle_class(element, name, toggle) {\n element.classList[toggle ? 'add' : 'remove'](name);\n}\nfunction custom_event(type, detail, { bubbles = false, cancelable = false } = {}) {\n const e = document.createEvent('CustomEvent');\n e.initCustomEvent(type, bubbles, cancelable, detail);\n return e;\n}\nfunction query_selector_all(selector, parent = document.body) {\n return Array.from(parent.querySelectorAll(selector));\n}\nfunction head_selector(nodeId, head) {\n const result = [];\n let started = 0;\n for (const node of head.childNodes) {\n if (node.nodeType === 8 /* comment node */) {\n const comment = node.textContent.trim();\n if (comment === `HEAD_${nodeId}_END`) {\n started -= 1;\n result.push(node);\n }\n else if (comment === `HEAD_${nodeId}_START`) {\n started += 1;\n result.push(node);\n }\n }\n else if (started > 0) {\n result.push(node);\n }\n }\n return result;\n}\nclass HtmlTag {\n constructor(is_svg = false) {\n this.is_svg = false;\n this.is_svg = is_svg;\n this.e = this.n = null;\n }\n c(html) {\n this.h(html);\n }\n m(html, target, anchor = null) {\n if (!this.e) {\n if (this.is_svg)\n this.e = svg_element(target.nodeName);\n else\n this.e = element(target.nodeName);\n this.t = target;\n this.c(html);\n }\n this.i(anchor);\n }\n h(html) {\n this.e.innerHTML = html;\n this.n = Array.from(this.e.childNodes);\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert(this.t, this.n[i], anchor);\n }\n }\n p(html) {\n this.d();\n this.h(html);\n this.i(this.a);\n }\n d() {\n this.n.forEach(detach);\n }\n}\nclass HtmlTagHydration extends HtmlTag {\n constructor(claimed_nodes, is_svg = false) {\n super(is_svg);\n this.e = this.n = null;\n this.l = claimed_nodes;\n }\n c(html) {\n if (this.l) {\n this.n = this.l;\n }\n else {\n super.c(html);\n }\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert_hydration(this.t, this.n[i], anchor);\n }\n }\n}\nfunction attribute_to_object(attributes) {\n const result = {};\n for (const attribute of attributes) {\n result[attribute.name] = attribute.value;\n }\n return result;\n}\nfunction get_custom_elements_slots(element) {\n const result = {};\n element.childNodes.forEach((node) => {\n result[node.slot || 'default'] = true;\n });\n return result;\n}\nfunction construct_svelte_component(component, props) {\n return new component(props);\n}\n\n// we need to store the information for multiple documents because a Svelte application could also contain iframes\n// https://github.com/sveltejs/svelte/issues/3624\nconst managed_styles = new Map();\nlet active = 0;\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\nfunction hash(str) {\n let hash = 5381;\n let i = str.length;\n while (i--)\n hash = ((hash << 5) - hash) ^ str.charCodeAt(i);\n return hash >>> 0;\n}\nfunction create_style_information(doc, node) {\n const info = { stylesheet: append_empty_stylesheet(node), rules: {} };\n managed_styles.set(doc, info);\n return info;\n}\nfunction create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {\n const step = 16.666 / duration;\n let keyframes = '{\\n';\n for (let p = 0; p <= 1; p += step) {\n const t = a + (b - a) * ease(p);\n keyframes += p * 100 + `%{${fn(t, 1 - t)}}\\n`;\n }\n const rule = keyframes + `100% {${fn(b, 1 - b)}}\\n}`;\n const name = `__svelte_${hash(rule)}_${uid}`;\n const doc = get_root_for_style(node);\n const { stylesheet, rules } = managed_styles.get(doc) || create_style_information(doc, node);\n if (!rules[name]) {\n rules[name] = true;\n stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);\n }\n const animation = node.style.animation || '';\n node.style.animation = `${animation ? `${animation}, ` : ''}${name} ${duration}ms linear ${delay}ms 1 both`;\n active += 1;\n return name;\n}\nfunction delete_rule(node, name) {\n const previous = (node.style.animation || '').split(', ');\n const next = previous.filter(name\n ? anim => anim.indexOf(name) < 0 // remove specific animation\n : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n );\n const deleted = previous.length - next.length;\n if (deleted) {\n node.style.animation = next.join(', ');\n active -= deleted;\n if (!active)\n clear_rules();\n }\n}\nfunction clear_rules() {\n raf(() => {\n if (active)\n return;\n managed_styles.forEach(info => {\n const { ownerNode } = info.stylesheet;\n // there is no ownerNode if it runs on jsdom.\n if (ownerNode)\n detach(ownerNode);\n });\n managed_styles.clear();\n });\n}\n\nfunction create_animation(node, from, fn, params) {\n if (!from)\n return noop;\n const to = node.getBoundingClientRect();\n if (from.left === to.left && from.right === to.right && from.top === to.top && from.bottom === to.bottom)\n return noop;\n const { delay = 0, duration = 300, easing = identity, \n // @ts-ignore todo: should this be separated from destructuring? Or start/end added to public api and documentation?\n start: start_time = now() + delay, \n // @ts-ignore todo:\n end = start_time + duration, tick = noop, css } = fn(node, { from, to }, params);\n let running = true;\n let started = false;\n let name;\n function start() {\n if (css) {\n name = create_rule(node, 0, 1, duration, delay, easing, css);\n }\n if (!delay) {\n started = true;\n }\n }\n function stop() {\n if (css)\n delete_rule(node, name);\n running = false;\n }\n loop(now => {\n if (!started && now >= start_time) {\n started = true;\n }\n if (started && now >= end) {\n tick(1, 0);\n stop();\n }\n if (!running) {\n return false;\n }\n if (started) {\n const p = now - start_time;\n const t = 0 + 1 * easing(p / duration);\n tick(t, 1 - t);\n }\n return true;\n });\n start();\n tick(0, 1);\n return stop;\n}\nfunction fix_position(node) {\n const style = getComputedStyle(node);\n if (style.position !== 'absolute' && style.position !== 'fixed') {\n const { width, height } = style;\n const a = node.getBoundingClientRect();\n node.style.position = 'absolute';\n node.style.width = width;\n node.style.height = height;\n add_transform(node, a);\n }\n}\nfunction add_transform(node, a) {\n const b = node.getBoundingClientRect();\n if (a.left !== b.left || a.top !== b.top) {\n const style = getComputedStyle(node);\n const transform = style.transform === 'none' ? '' : style.transform;\n node.style.transform = `${transform} translate(${a.left - b.left}px, ${a.top - b.top}px)`;\n }\n}\n\nlet current_component;\nfunction set_current_component(component) {\n current_component = component;\n}\nfunction get_current_component() {\n if (!current_component)\n throw new Error('Function called outside component initialization');\n return current_component;\n}\n/**\n * Schedules a callback to run immediately before the component is updated after any state change.\n *\n * The first time the callback runs will be before the initial `onMount`\n *\n * https://svelte.dev/docs#run-time-svelte-beforeupdate\n */\nfunction beforeUpdate(fn) {\n get_current_component().$$.before_update.push(fn);\n}\n/**\n * The `onMount` function schedules a callback to run as soon as the component has been mounted to the DOM.\n * It must be called during the component's initialisation (but doesn't need to live *inside* the component;\n * it can be called from an external module).\n *\n * `onMount` does not run inside a [server-side component](/docs#run-time-server-side-component-api).\n *\n * https://svelte.dev/docs#run-time-svelte-onmount\n */\nfunction onMount(fn) {\n get_current_component().$$.on_mount.push(fn);\n}\n/**\n * Schedules a callback to run immediately after the component has been updated.\n *\n * The first time the callback runs will be after the initial `onMount`\n */\nfunction afterUpdate(fn) {\n get_current_component().$$.after_update.push(fn);\n}\n/**\n * Schedules a callback to run immediately before the component is unmounted.\n *\n * Out of `onMount`, `beforeUpdate`, `afterUpdate` and `onDestroy`, this is the\n * only one that runs inside a server-side component.\n *\n * https://svelte.dev/docs#run-time-svelte-ondestroy\n */\nfunction onDestroy(fn) {\n get_current_component().$$.on_destroy.push(fn);\n}\n/**\n * Creates an event dispatcher that can be used to dispatch [component events](/docs#template-syntax-component-directives-on-eventname).\n * Event dispatchers are functions that can take two arguments: `name` and `detail`.\n *\n * Component events created with `createEventDispatcher` create a\n * [CustomEvent](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent).\n * These events do not [bubble](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Events#Event_bubbling_and_capture).\n * The `detail` argument corresponds to the [CustomEvent.detail](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/detail)\n * property and can contain any type of data.\n *\n * https://svelte.dev/docs#run-time-svelte-createeventdispatcher\n */\nfunction createEventDispatcher() {\n const component = get_current_component();\n return (type, detail, { cancelable = false } = {}) => {\n const callbacks = component.$$.callbacks[type];\n if (callbacks) {\n // TODO are there situations where events could be dispatched\n // in a server (non-DOM) environment?\n const event = custom_event(type, detail, { cancelable });\n callbacks.slice().forEach(fn => {\n fn.call(component, event);\n });\n return !event.defaultPrevented;\n }\n return true;\n };\n}\n/**\n * Associates an arbitrary `context` object with the current component and the specified `key`\n * and returns that object. The context is then available to children of the component\n * (including slotted content) with `getContext`.\n *\n * Like lifecycle functions, this must be called during component initialisation.\n *\n * https://svelte.dev/docs#run-time-svelte-setcontext\n */\nfunction setContext(key, context) {\n get_current_component().$$.context.set(key, context);\n return context;\n}\n/**\n * Retrieves the context that belongs to the closest parent component with the specified `key`.\n * Must be called during component initialisation.\n *\n * https://svelte.dev/docs#run-time-svelte-getcontext\n */\nfunction getContext(key) {\n return get_current_component().$$.context.get(key);\n}\n/**\n * Retrieves the whole context map that belongs to the closest parent component.\n * Must be called during component initialisation. Useful, for example, if you\n * programmatically create a component and want to pass the existing context to it.\n *\n * https://svelte.dev/docs#run-time-svelte-getallcontexts\n */\nfunction getAllContexts() {\n return get_current_component().$$.context;\n}\n/**\n * Checks whether a given `key` has been set in the context of a parent component.\n * Must be called during component initialisation.\n *\n * https://svelte.dev/docs#run-time-svelte-hascontext\n */\nfunction hasContext(key) {\n return get_current_component().$$.context.has(key);\n}\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\nfunction bubble(component, event) {\n const callbacks = component.$$.callbacks[event.type];\n if (callbacks) {\n // @ts-ignore\n callbacks.slice().forEach(fn => fn.call(this, event));\n }\n}\n\nconst dirty_components = [];\nconst intros = { enabled: false };\nconst binding_callbacks = [];\nconst render_callbacks = [];\nconst flush_callbacks = [];\nconst resolved_promise = Promise.resolve();\nlet update_scheduled = false;\nfunction schedule_update() {\n if (!update_scheduled) {\n update_scheduled = true;\n resolved_promise.then(flush);\n }\n}\nfunction tick() {\n schedule_update();\n return resolved_promise;\n}\nfunction add_render_callback(fn) {\n render_callbacks.push(fn);\n}\nfunction add_flush_callback(fn) {\n flush_callbacks.push(fn);\n}\n// flush() calls callbacks in this order:\n// 1. All beforeUpdate callbacks, in order: parents before children\n// 2. All bind:this callbacks, in reverse order: children before parents.\n// 3. All afterUpdate callbacks, in order: parents before children. EXCEPT\n// for afterUpdates called during the initial onMount, which are called in\n// reverse order: children before parents.\n// Since callbacks might update component values, which could trigger another\n// call to flush(), the following steps guard against this:\n// 1. During beforeUpdate, any updated components will be added to the\n// dirty_components array and will cause a reentrant call to flush(). Because\n// the flush index is kept outside the function, the reentrant call will pick\n// up where the earlier call left off and go through all dirty components. The\n// current_component value is saved and restored so that the reentrant call will\n// not interfere with the \"parent\" flush() call.\n// 2. bind:this callbacks cannot trigger new flush() calls.\n// 3. During afterUpdate, any updated components will NOT have their afterUpdate\n// callback called a second time; the seen_callbacks set, outside the flush()\n// function, guarantees this behavior.\nconst seen_callbacks = new Set();\nlet flushidx = 0; // Do *not* move this inside the flush() function\nfunction flush() {\n const saved_component = current_component;\n do {\n // first, call beforeUpdate functions\n // and update components\n while (flushidx < dirty_components.length) {\n const component = dirty_components[flushidx];\n flushidx++;\n set_current_component(component);\n update(component.$$);\n }\n set_current_component(null);\n dirty_components.length = 0;\n flushidx = 0;\n while (binding_callbacks.length)\n binding_callbacks.pop()();\n // then, once components are updated, call\n // afterUpdate functions. This may cause\n // subsequent updates...\n for (let i = 0; i < render_callbacks.length; i += 1) {\n const callback = render_callbacks[i];\n if (!seen_callbacks.has(callback)) {\n // ...so guard against infinite loops\n seen_callbacks.add(callback);\n callback();\n }\n }\n render_callbacks.length = 0;\n } while (dirty_components.length);\n while (flush_callbacks.length) {\n flush_callbacks.pop()();\n }\n update_scheduled = false;\n seen_callbacks.clear();\n set_current_component(saved_component);\n}\nfunction update($$) {\n if ($$.fragment !== null) {\n $$.update();\n run_all($$.before_update);\n const dirty = $$.dirty;\n $$.dirty = [-1];\n $$.fragment && $$.fragment.p($$.ctx, dirty);\n $$.after_update.forEach(add_render_callback);\n }\n}\n\nlet promise;\nfunction wait() {\n if (!promise) {\n promise = Promise.resolve();\n promise.then(() => {\n promise = null;\n });\n }\n return promise;\n}\nfunction dispatch(node, direction, kind) {\n node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\nconst outroing = new Set();\nlet outros;\nfunction group_outros() {\n outros = {\n r: 0,\n c: [],\n p: outros // parent group\n };\n}\nfunction check_outros() {\n if (!outros.r) {\n run_all(outros.c);\n }\n outros = outros.p;\n}\nfunction transition_in(block, local) {\n if (block && block.i) {\n outroing.delete(block);\n block.i(local);\n }\n}\nfunction transition_out(block, local, detach, callback) {\n if (block && block.o) {\n if (outroing.has(block))\n return;\n outroing.add(block);\n outros.c.push(() => {\n outroing.delete(block);\n if (callback) {\n if (detach)\n block.d(1);\n callback();\n }\n });\n block.o(local);\n }\n else if (callback) {\n callback();\n }\n}\nconst null_transition = { duration: 0 };\nfunction create_in_transition(node, fn, params) {\n const options = { direction: 'in' };\n let config = fn(node, params, options);\n let running = false;\n let animation_name;\n let task;\n let uid = 0;\n function cleanup() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);\n tick(0, 1);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n if (task)\n task.abort();\n running = true;\n add_render_callback(() => dispatch(node, true, 'start'));\n task = loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(1, 0);\n dispatch(node, true, 'end');\n cleanup();\n return running = false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(t, 1 - t);\n }\n }\n return running;\n });\n }\n let started = false;\n return {\n start() {\n if (started)\n return;\n started = true;\n delete_rule(node);\n if (is_function(config)) {\n config = config(options);\n wait().then(go);\n }\n else {\n go();\n }\n },\n invalidate() {\n started = false;\n },\n end() {\n if (running) {\n cleanup();\n running = false;\n }\n }\n };\n}\nfunction create_out_transition(node, fn, params) {\n const options = { direction: 'out' };\n let config = fn(node, params, options);\n let running = true;\n let animation_name;\n const group = outros;\n group.r += 1;\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n add_render_callback(() => dispatch(node, false, 'start'));\n loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(0, 1);\n dispatch(node, false, 'end');\n if (!--group.r) {\n // this will result in `end()` being called,\n // so we don't need to clean up here\n run_all(group.c);\n }\n return false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(1 - t, t);\n }\n }\n return running;\n });\n }\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config(options);\n go();\n });\n }\n else {\n go();\n }\n return {\n end(reset) {\n if (reset && config.tick) {\n config.tick(1, 0);\n }\n if (running) {\n if (animation_name)\n delete_rule(node, animation_name);\n running = false;\n }\n }\n };\n}\nfunction create_bidirectional_transition(node, fn, params, intro) {\n const options = { direction: 'both' };\n let config = fn(node, params, options);\n let t = intro ? 0 : 1;\n let running_program = null;\n let pending_program = null;\n let animation_name = null;\n function clear_animation() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function init(program, duration) {\n const d = (program.b - t);\n duration *= Math.abs(d);\n return {\n a: t,\n b: program.b,\n d,\n duration,\n start: program.start,\n end: program.start + duration,\n group: program.group\n };\n }\n function go(b) {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n const program = {\n start: now() + delay,\n b\n };\n if (!b) {\n // @ts-ignore todo: improve typings\n program.group = outros;\n outros.r += 1;\n }\n if (running_program || pending_program) {\n pending_program = program;\n }\n else {\n // if this is an intro, and there's a delay, we need to do\n // an initial tick and/or apply CSS animation immediately\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, b, duration, delay, easing, css);\n }\n if (b)\n tick(0, 1);\n running_program = init(program, duration);\n add_render_callback(() => dispatch(node, b, 'start'));\n loop(now => {\n if (pending_program && now > pending_program.start) {\n running_program = init(pending_program, duration);\n pending_program = null;\n dispatch(node, running_program.b, 'start');\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);\n }\n }\n if (running_program) {\n if (now >= running_program.end) {\n tick(t = running_program.b, 1 - t);\n dispatch(node, running_program.b, 'end');\n if (!pending_program) {\n // we're done\n if (running_program.b) {\n // intro — we can tidy up immediately\n clear_animation();\n }\n else {\n // outro — needs to be coordinated\n if (!--running_program.group.r)\n run_all(running_program.group.c);\n }\n }\n running_program = null;\n }\n else if (now >= running_program.start) {\n const p = now - running_program.start;\n t = running_program.a + running_program.d * easing(p / running_program.duration);\n tick(t, 1 - t);\n }\n }\n return !!(running_program || pending_program);\n });\n }\n }\n return {\n run(b) {\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config(options);\n go(b);\n });\n }\n else {\n go(b);\n }\n },\n end() {\n clear_animation();\n running_program = pending_program = null;\n }\n };\n}\n\nfunction handle_promise(promise, info) {\n const token = info.token = {};\n function update(type, index, key, value) {\n if (info.token !== token)\n return;\n info.resolved = value;\n let child_ctx = info.ctx;\n if (key !== undefined) {\n child_ctx = child_ctx.slice();\n child_ctx[key] = value;\n }\n const block = type && (info.current = type)(child_ctx);\n let needs_flush = false;\n if (info.block) {\n if (info.blocks) {\n info.blocks.forEach((block, i) => {\n if (i !== index && block) {\n group_outros();\n transition_out(block, 1, 1, () => {\n if (info.blocks[i] === block) {\n info.blocks[i] = null;\n }\n });\n check_outros();\n }\n });\n }\n else {\n info.block.d(1);\n }\n block.c();\n transition_in(block, 1);\n block.m(info.mount(), info.anchor);\n needs_flush = true;\n }\n info.block = block;\n if (info.blocks)\n info.blocks[index] = block;\n if (needs_flush) {\n flush();\n }\n }\n if (is_promise(promise)) {\n const current_component = get_current_component();\n promise.then(value => {\n set_current_component(current_component);\n update(info.then, 1, info.value, value);\n set_current_component(null);\n }, error => {\n set_current_component(current_component);\n update(info.catch, 2, info.error, error);\n set_current_component(null);\n if (!info.hasCatch) {\n throw error;\n }\n });\n // if we previously had a then/catch block, destroy it\n if (info.current !== info.pending) {\n update(info.pending, 0);\n return true;\n }\n }\n else {\n if (info.current !== info.then) {\n update(info.then, 1, info.value, promise);\n return true;\n }\n info.resolved = promise;\n }\n}\nfunction update_await_block_branch(info, ctx, dirty) {\n const child_ctx = ctx.slice();\n const { resolved } = info;\n if (info.current === info.then) {\n child_ctx[info.value] = resolved;\n }\n if (info.current === info.catch) {\n child_ctx[info.error] = resolved;\n }\n info.block.p(child_ctx, dirty);\n}\n\nconst globals = (typeof window !== 'undefined'\n ? window\n : typeof globalThis !== 'undefined'\n ? globalThis\n : global);\n\nfunction destroy_block(block, lookup) {\n block.d(1);\n lookup.delete(block.key);\n}\nfunction outro_and_destroy_block(block, lookup) {\n transition_out(block, 1, 1, () => {\n lookup.delete(block.key);\n });\n}\nfunction fix_and_destroy_block(block, lookup) {\n block.f();\n destroy_block(block, lookup);\n}\nfunction fix_and_outro_and_destroy_block(block, lookup) {\n block.f();\n outro_and_destroy_block(block, lookup);\n}\nfunction update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) {\n let o = old_blocks.length;\n let n = list.length;\n let i = o;\n const old_indexes = {};\n while (i--)\n old_indexes[old_blocks[i].key] = i;\n const new_blocks = [];\n const new_lookup = new Map();\n const deltas = new Map();\n i = n;\n while (i--) {\n const child_ctx = get_context(ctx, list, i);\n const key = get_key(child_ctx);\n let block = lookup.get(key);\n if (!block) {\n block = create_each_block(key, child_ctx);\n block.c();\n }\n else if (dynamic) {\n block.p(child_ctx, dirty);\n }\n new_lookup.set(key, new_blocks[i] = block);\n if (key in old_indexes)\n deltas.set(key, Math.abs(i - old_indexes[key]));\n }\n const will_move = new Set();\n const did_move = new Set();\n function insert(block) {\n transition_in(block, 1);\n block.m(node, next);\n lookup.set(block.key, block);\n next = block.first;\n n--;\n }\n while (o && n) {\n const new_block = new_blocks[n - 1];\n const old_block = old_blocks[o - 1];\n const new_key = new_block.key;\n const old_key = old_block.key;\n if (new_block === old_block) {\n // do nothing\n next = new_block.first;\n o--;\n n--;\n }\n else if (!new_lookup.has(old_key)) {\n // remove old block\n destroy(old_block, lookup);\n o--;\n }\n else if (!lookup.has(new_key) || will_move.has(new_key)) {\n insert(new_block);\n }\n else if (did_move.has(old_key)) {\n o--;\n }\n else if (deltas.get(new_key) > deltas.get(old_key)) {\n did_move.add(new_key);\n insert(new_block);\n }\n else {\n will_move.add(old_key);\n o--;\n }\n }\n while (o--) {\n const old_block = old_blocks[o];\n if (!new_lookup.has(old_block.key))\n destroy(old_block, lookup);\n }\n while (n)\n insert(new_blocks[n - 1]);\n return new_blocks;\n}\nfunction validate_each_keys(ctx, list, get_context, get_key) {\n const keys = new Set();\n for (let i = 0; i < list.length; i++) {\n const key = get_key(get_context(ctx, list, i));\n if (keys.has(key)) {\n throw new Error('Cannot have duplicate keys in a keyed each');\n }\n keys.add(key);\n }\n}\n\nfunction get_spread_update(levels, updates) {\n const update = {};\n const to_null_out = {};\n const accounted_for = { $$scope: 1 };\n let i = levels.length;\n while (i--) {\n const o = levels[i];\n const n = updates[i];\n if (n) {\n for (const key in o) {\n if (!(key in n))\n to_null_out[key] = 1;\n }\n for (const key in n) {\n if (!accounted_for[key]) {\n update[key] = n[key];\n accounted_for[key] = 1;\n }\n }\n levels[i] = n;\n }\n else {\n for (const key in o) {\n accounted_for[key] = 1;\n }\n }\n }\n for (const key in to_null_out) {\n if (!(key in update))\n update[key] = undefined;\n }\n return update;\n}\nfunction get_spread_object(spread_props) {\n return typeof spread_props === 'object' && spread_props !== null ? spread_props : {};\n}\n\n// source: https://html.spec.whatwg.org/multipage/indices.html\nconst boolean_attributes = new Set([\n 'allowfullscreen',\n 'allowpaymentrequest',\n 'async',\n 'autofocus',\n 'autoplay',\n 'checked',\n 'controls',\n 'default',\n 'defer',\n 'disabled',\n 'formnovalidate',\n 'hidden',\n 'inert',\n 'ismap',\n 'itemscope',\n 'loop',\n 'multiple',\n 'muted',\n 'nomodule',\n 'novalidate',\n 'open',\n 'playsinline',\n 'readonly',\n 'required',\n 'reversed',\n 'selected'\n]);\n\n/** regex of all html void element names */\nconst void_element_names = /^(?:area|base|br|col|command|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)$/;\nfunction is_void(name) {\n return void_element_names.test(name) || name.toLowerCase() === '!doctype';\n}\n\nconst invalid_attribute_name_character = /[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]/u;\n// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n// https://infra.spec.whatwg.org/#noncharacter\nfunction spread(args, attrs_to_add) {\n const attributes = Object.assign({}, ...args);\n if (attrs_to_add) {\n const classes_to_add = attrs_to_add.classes;\n const styles_to_add = attrs_to_add.styles;\n if (classes_to_add) {\n if (attributes.class == null) {\n attributes.class = classes_to_add;\n }\n else {\n attributes.class += ' ' + classes_to_add;\n }\n }\n if (styles_to_add) {\n if (attributes.style == null) {\n attributes.style = style_object_to_string(styles_to_add);\n }\n else {\n attributes.style = style_object_to_string(merge_ssr_styles(attributes.style, styles_to_add));\n }\n }\n }\n let str = '';\n Object.keys(attributes).forEach(name => {\n if (invalid_attribute_name_character.test(name))\n return;\n const value = attributes[name];\n if (value === true)\n str += ' ' + name;\n else if (boolean_attributes.has(name.toLowerCase())) {\n if (value)\n str += ' ' + name;\n }\n else if (value != null) {\n str += ` ${name}=\"${value}\"`;\n }\n });\n return str;\n}\nfunction merge_ssr_styles(style_attribute, style_directive) {\n const style_object = {};\n for (const individual_style of style_attribute.split(';')) {\n const colon_index = individual_style.indexOf(':');\n const name = individual_style.slice(0, colon_index).trim();\n const value = individual_style.slice(colon_index + 1).trim();\n if (!name)\n continue;\n style_object[name] = value;\n }\n for (const name in style_directive) {\n const value = style_directive[name];\n if (value) {\n style_object[name] = value;\n }\n else {\n delete style_object[name];\n }\n }\n return style_object;\n}\nconst ATTR_REGEX = /[&\"]/g;\nconst CONTENT_REGEX = /[&<]/g;\n/**\n * Note: this method is performance sensitive and has been optimized\n * https://github.com/sveltejs/svelte/pull/5701\n */\nfunction escape(value, is_attr = false) {\n const str = String(value);\n const pattern = is_attr ? ATTR_REGEX : CONTENT_REGEX;\n pattern.lastIndex = 0;\n let escaped = '';\n let last = 0;\n while (pattern.test(str)) {\n const i = pattern.lastIndex - 1;\n const ch = str[i];\n escaped += str.substring(last, i) + (ch === '&' ? '&' : (ch === '\"' ? '"' : '<'));\n last = i + 1;\n }\n return escaped + str.substring(last);\n}\nfunction escape_attribute_value(value) {\n // keep booleans, null, and undefined for the sake of `spread`\n const should_escape = typeof value === 'string' || (value && typeof value === 'object');\n return should_escape ? escape(value, true) : value;\n}\nfunction escape_object(obj) {\n const result = {};\n for (const key in obj) {\n result[key] = escape_attribute_value(obj[key]);\n }\n return result;\n}\nfunction each(items, fn) {\n let str = '';\n for (let i = 0; i < items.length; i += 1) {\n str += fn(items[i], i);\n }\n return str;\n}\nconst missing_component = {\n $$render: () => ''\n};\nfunction validate_component(component, name) {\n if (!component || !component.$$render) {\n if (name === 'svelte:component')\n name += ' this={...}';\n throw new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules. Otherwise you may need to fix a <${name}>.`);\n }\n return component;\n}\nfunction debug(file, line, column, values) {\n console.log(`{@debug} ${file ? file + ' ' : ''}(${line}:${column})`); // eslint-disable-line no-console\n console.log(values); // eslint-disable-line no-console\n return '';\n}\nlet on_destroy;\nfunction create_ssr_component(fn) {\n function $$render(result, props, bindings, slots, context) {\n const parent_component = current_component;\n const $$ = {\n on_destroy,\n context: new Map(context || (parent_component ? parent_component.$$.context : [])),\n // these will be immediately discarded\n on_mount: [],\n before_update: [],\n after_update: [],\n callbacks: blank_object()\n };\n set_current_component({ $$ });\n const html = fn(result, props, bindings, slots);\n set_current_component(parent_component);\n return html;\n }\n return {\n render: (props = {}, { $$slots = {}, context = new Map() } = {}) => {\n on_destroy = [];\n const result = { title: '', head: '', css: new Set() };\n const html = $$render(result, props, {}, $$slots, context);\n run_all(on_destroy);\n return {\n html,\n css: {\n code: Array.from(result.css).map(css => css.code).join('\\n'),\n map: null // TODO\n },\n head: result.title + result.head\n };\n },\n $$render\n };\n}\nfunction add_attribute(name, value, boolean) {\n if (value == null || (boolean && !value))\n return '';\n const assignment = (boolean && value === true) ? '' : `=\"${escape(value, true)}\"`;\n return ` ${name}${assignment}`;\n}\nfunction add_classes(classes) {\n return classes ? ` class=\"${classes}\"` : '';\n}\nfunction style_object_to_string(style_object) {\n return Object.keys(style_object)\n .filter(key => style_object[key])\n .map(key => `${key}: ${escape_attribute_value(style_object[key])};`)\n .join(' ');\n}\nfunction add_styles(style_object) {\n const styles = style_object_to_string(style_object);\n return styles ? ` style=\"${styles}\"` : '';\n}\n\nfunction bind(component, name, callback, value) {\n const index = component.$$.props[name];\n if (index !== undefined) {\n component.$$.bound[index] = callback;\n if (value === undefined) {\n callback(component.$$.ctx[index]);\n }\n }\n}\nfunction create_component(block) {\n block && block.c();\n}\nfunction claim_component(block, parent_nodes) {\n block && block.l(parent_nodes);\n}\nfunction mount_component(component, target, anchor, customElement) {\n const { fragment, after_update } = component.$$;\n fragment && fragment.m(target, anchor);\n if (!customElement) {\n // onMount happens before the initial afterUpdate\n add_render_callback(() => {\n const new_on_destroy = component.$$.on_mount.map(run).filter(is_function);\n // if the component was destroyed immediately\n // it will update the `$$.on_destroy` reference to `null`.\n // the destructured on_destroy may still reference to the old array\n if (component.$$.on_destroy) {\n component.$$.on_destroy.push(...new_on_destroy);\n }\n else {\n // Edge case - component was destroyed immediately,\n // most likely as a result of a binding initialising\n run_all(new_on_destroy);\n }\n component.$$.on_mount = [];\n });\n }\n after_update.forEach(add_render_callback);\n}\nfunction destroy_component(component, detaching) {\n const $$ = component.$$;\n if ($$.fragment !== null) {\n run_all($$.on_destroy);\n $$.fragment && $$.fragment.d(detaching);\n // TODO null out other refs, including component.$$ (but need to\n // preserve final state?)\n $$.on_destroy = $$.fragment = null;\n $$.ctx = [];\n }\n}\nfunction make_dirty(component, i) {\n if (component.$$.dirty[0] === -1) {\n dirty_components.push(component);\n schedule_update();\n component.$$.dirty.fill(0);\n }\n component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));\n}\nfunction init(component, options, instance, create_fragment, not_equal, props, append_styles, dirty = [-1]) {\n const parent_component = current_component;\n set_current_component(component);\n const $$ = component.$$ = {\n fragment: null,\n ctx: [],\n // state\n props,\n update: noop,\n not_equal,\n bound: blank_object(),\n // lifecycle\n on_mount: [],\n on_destroy: [],\n on_disconnect: [],\n before_update: [],\n after_update: [],\n context: new Map(options.context || (parent_component ? parent_component.$$.context : [])),\n // everything else\n callbacks: blank_object(),\n dirty,\n skip_bound: false,\n root: options.target || parent_component.$$.root\n };\n append_styles && append_styles($$.root);\n let ready = false;\n $$.ctx = instance\n ? instance(component, options.props || {}, (i, ret, ...rest) => {\n const value = rest.length ? rest[0] : ret;\n if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {\n if (!$$.skip_bound && $$.bound[i])\n $$.bound[i](value);\n if (ready)\n make_dirty(component, i);\n }\n return ret;\n })\n : [];\n $$.update();\n ready = true;\n run_all($$.before_update);\n // `false` as a special case of no DOM component\n $$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n if (options.target) {\n if (options.hydrate) {\n start_hydrating();\n const nodes = children(options.target);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.l(nodes);\n nodes.forEach(detach);\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.c();\n }\n if (options.intro)\n transition_in(component.$$.fragment);\n mount_component(component, options.target, options.anchor, options.customElement);\n end_hydrating();\n flush();\n }\n set_current_component(parent_component);\n}\nlet SvelteElement;\nif (typeof HTMLElement === 'function') {\n SvelteElement = class extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n }\n connectedCallback() {\n const { on_mount } = this.$$;\n this.$$.on_disconnect = on_mount.map(run).filter(is_function);\n // @ts-ignore todo: improve typings\n for (const key in this.$$.slotted) {\n // @ts-ignore todo: improve typings\n this.appendChild(this.$$.slotted[key]);\n }\n }\n attributeChangedCallback(attr, _oldValue, newValue) {\n this[attr] = newValue;\n }\n disconnectedCallback() {\n run_all(this.$$.on_disconnect);\n }\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n // TODO should this delegate to addEventListener?\n if (!is_function(callback)) {\n return noop;\n }\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n };\n}\n/**\n * Base class for Svelte components. Used when dev=false.\n */\nclass SvelteComponent {\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n if (!is_function(callback)) {\n return noop;\n }\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n}\n\nfunction dispatch_dev(type, detail) {\n document.dispatchEvent(custom_event(type, Object.assign({ version: '3.54.0' }, detail), { bubbles: true }));\n}\nfunction append_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append(target, node);\n}\nfunction append_hydration_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append_hydration(target, node);\n}\nfunction insert_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert(target, node, anchor);\n}\nfunction insert_hydration_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert_hydration(target, node, anchor);\n}\nfunction detach_dev(node) {\n dispatch_dev('SvelteDOMRemove', { node });\n detach(node);\n}\nfunction detach_between_dev(before, after) {\n while (before.nextSibling && before.nextSibling !== after) {\n detach_dev(before.nextSibling);\n }\n}\nfunction detach_before_dev(after) {\n while (after.previousSibling) {\n detach_dev(after.previousSibling);\n }\n}\nfunction detach_after_dev(before) {\n while (before.nextSibling) {\n detach_dev(before.nextSibling);\n }\n}\nfunction listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {\n const modifiers = options === true ? ['capture'] : options ? Array.from(Object.keys(options)) : [];\n if (has_prevent_default)\n modifiers.push('preventDefault');\n if (has_stop_propagation)\n modifiers.push('stopPropagation');\n dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });\n const dispose = listen(node, event, handler, options);\n return () => {\n dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });\n dispose();\n };\n}\nfunction attr_dev(node, attribute, value) {\n attr(node, attribute, value);\n if (value == null)\n dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });\n else\n dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });\n}\nfunction prop_dev(node, property, value) {\n node[property] = value;\n dispatch_dev('SvelteDOMSetProperty', { node, property, value });\n}\nfunction dataset_dev(node, property, value) {\n node.dataset[property] = value;\n dispatch_dev('SvelteDOMSetDataset', { node, property, value });\n}\nfunction set_data_dev(text, data) {\n data = '' + data;\n if (text.wholeText === data)\n return;\n dispatch_dev('SvelteDOMSetData', { node: text, data });\n text.data = data;\n}\nfunction validate_each_argument(arg) {\n if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {\n let msg = '{#each} only iterates over array-like objects.';\n if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {\n msg += ' You can use a spread to convert this iterable into an array.';\n }\n throw new Error(msg);\n }\n}\nfunction validate_slots(name, slot, keys) {\n for (const slot_key of Object.keys(slot)) {\n if (!~keys.indexOf(slot_key)) {\n console.warn(`<${name}> received an unexpected slot \"${slot_key}\".`);\n }\n }\n}\nfunction validate_dynamic_element(tag) {\n const is_string = typeof tag === 'string';\n if (tag && !is_string) {\n throw new Error('<svelte:element> expects \"this\" attribute to be a string.');\n }\n}\nfunction validate_void_dynamic_element(tag) {\n if (tag && is_void(tag)) {\n console.warn(`<svelte:element this=\"${tag}\"> is self-closing and cannot have content.`);\n }\n}\nfunction construct_svelte_component_dev(component, props) {\n const error_message = 'this={...} of <svelte:component> should specify a Svelte component.';\n try {\n const instance = new component(props);\n if (!instance.$$ || !instance.$set || !instance.$on || !instance.$destroy) {\n throw new Error(error_message);\n }\n return instance;\n }\n catch (err) {\n const { message } = err;\n if (typeof message === 'string' && message.indexOf('is not a constructor') !== -1) {\n throw new Error(error_message);\n }\n else {\n throw err;\n }\n }\n}\n/**\n * Base class for Svelte components with some minor dev-enhancements. Used when dev=true.\n */\nclass SvelteComponentDev extends SvelteComponent {\n constructor(options) {\n if (!options || (!options.target && !options.$$inline)) {\n throw new Error(\"'target' is a required option\");\n }\n super();\n }\n $destroy() {\n super.$destroy();\n this.$destroy = () => {\n console.warn('Component was already destroyed'); // eslint-disable-line no-console\n };\n }\n $capture_state() { }\n $inject_state() { }\n}\n/**\n * Base class to create strongly typed Svelte components.\n * This only exists for typing purposes and should be used in `.d.ts` files.\n *\n * ### Example:\n *\n * You have component library on npm called `component-library`, from which\n * you export a component called `MyComponent`. For Svelte+TypeScript users,\n * you want to provide typings. Therefore you create a `index.d.ts`:\n * ```ts\n * import { SvelteComponentTyped } from \"svelte\";\n * export class MyComponent extends SvelteComponentTyped<{foo: string}> {}\n * ```\n * Typing this makes it possible for IDEs like VS Code with the Svelte extension\n * to provide intellisense and to use the component like this in a Svelte file\n * with TypeScript:\n * ```svelte\n * <script lang=\"ts\">\n * \timport { MyComponent } from \"component-library\";\n * </script>\n * <MyComponent foo={'bar'} />\n * ```\n *\n * #### Why not make this part of `SvelteComponent(Dev)`?\n * Because\n * ```ts\n * class ASubclassOfSvelteComponent extends SvelteComponent<{foo: string}> {}\n * const component: typeof SvelteComponent = ASubclassOfSvelteComponent;\n * ```\n * will throw a type error, so we need to separate the more strictly typed class.\n */\nclass SvelteComponentTyped extends SvelteComponentDev {\n constructor(options) {\n super(options);\n }\n}\nfunction loop_guard(timeout) {\n const start = Date.now();\n return () => {\n if (Date.now() - start > timeout) {\n throw new Error('Infinite loop detected');\n }\n };\n}\n\nexport { HtmlTag, HtmlTagHydration, SvelteComponent, SvelteComponentDev, SvelteComponentTyped, SvelteElement, action_destroyer, add_attribute, add_classes, add_flush_callback, add_location, add_render_callback, add_resize_listener, add_styles, add_transform, afterUpdate, append, append_dev, append_empty_stylesheet, append_hydration, append_hydration_dev, append_styles, assign, attr, attr_dev, attribute_to_object, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_component, claim_element, claim_html_tag, claim_space, claim_svg_element, claim_text, clear_loops, component_subscribe, compute_rest_props, compute_slots, construct_svelte_component, construct_svelte_component_dev, createEventDispatcher, create_animation, create_bidirectional_transition, create_component, create_in_transition, create_out_transition, create_slot, create_ssr_component, current_component, custom_event, dataset_dev, debug, destroy_block, destroy_component, destroy_each, detach, detach_after_dev, detach_before_dev, detach_between_dev, detach_dev, dirty_components, dispatch_dev, each, element, element_is, empty, end_hydrating, escape, escape_attribute_value, escape_object, exclude_internal_props, fix_and_destroy_block, fix_and_outro_and_destroy_block, fix_position, flush, getAllContexts, getContext, get_all_dirty_from_scope, get_binding_group_value, get_current_component, get_custom_elements_slots, get_root_for_style, get_slot_changes, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, hasContext, has_prop, head_selector, identity, init, insert, insert_dev, insert_hydration, insert_hydration_dev, intros, invalid_attribute_name_character, is_client, is_crossorigin, is_empty, is_function, is_promise, is_void, listen, listen_dev, loop, loop_guard, merge_ssr_styles, missing_component, mount_component, noop, not_equal, now, null_to_empty, object_without_properties, onDestroy, onMount, once, outro_and_destroy_block, prevent_default, prop_dev, query_selector_all, raf, run, run_all, safe_not_equal, schedule_update, select_multiple_value, select_option, select_options, select_value, self, setContext, set_attributes, set_current_component, set_custom_element_data, set_custom_element_data_map, set_data, set_data_dev, set_input_type, set_input_value, set_now, set_raf, set_store_value, set_style, set_svg_attributes, space, spread, src_url_equal, start_hydrating, stop_propagation, subscribe, svg_element, text, tick, time_ranges_to_array, to_number, toggle_class, transition_in, transition_out, trusted, update_await_block_branch, update_keyed_each, update_slot, update_slot_base, validate_component, validate_dynamic_element, validate_each_argument, validate_each_keys, validate_slots, validate_store, validate_void_dynamic_element, xlink_attr };\n","/*!\n * Bootstrap v5.2.3 (https://getbootstrap.com/)\n * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.bootstrap = factory());\n})(this, (function () { 'use strict';\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n const MAX_UID = 1000000;\n const MILLISECONDS_MULTIPLIER = 1000;\n const TRANSITION_END = 'transitionend'; // Shout-out Angus Croll (https://goo.gl/pxwQGp)\n\n const toType = object => {\n if (object === null || object === undefined) {\n return `${object}`;\n }\n\n return Object.prototype.toString.call(object).match(/\\s([a-z]+)/i)[1].toLowerCase();\n };\n /**\n * Public Util API\n */\n\n\n const getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID);\n } while (document.getElementById(prefix));\n\n return prefix;\n };\n\n const getSelector = element => {\n let selector = element.getAttribute('data-bs-target');\n\n if (!selector || selector === '#') {\n let hrefAttribute = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n\n if (!hrefAttribute || !hrefAttribute.includes('#') && !hrefAttribute.startsWith('.')) {\n return null;\n } // Just in case some CMS puts out a full URL with the anchor appended\n\n\n if (hrefAttribute.includes('#') && !hrefAttribute.startsWith('#')) {\n hrefAttribute = `#${hrefAttribute.split('#')[1]}`;\n }\n\n selector = hrefAttribute && hrefAttribute !== '#' ? hrefAttribute.trim() : null;\n }\n\n return selector;\n };\n\n const getSelectorFromElement = element => {\n const selector = getSelector(element);\n\n if (selector) {\n return document.querySelector(selector) ? selector : null;\n }\n\n return null;\n };\n\n const getElementFromSelector = element => {\n const selector = getSelector(element);\n return selector ? document.querySelector(selector) : null;\n };\n\n const getTransitionDurationFromElement = element => {\n if (!element) {\n return 0;\n } // Get transition-duration of the element\n\n\n let {\n transitionDuration,\n transitionDelay\n } = window.getComputedStyle(element);\n const floatTransitionDuration = Number.parseFloat(transitionDuration);\n const floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found\n\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0;\n } // If multiple durations are defined, take the first\n\n\n transitionDuration = transitionDuration.split(',')[0];\n transitionDelay = transitionDelay.split(',')[0];\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;\n };\n\n const triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END));\n };\n\n const isElement$1 = object => {\n if (!object || typeof object !== 'object') {\n return false;\n }\n\n if (typeof object.jquery !== 'undefined') {\n object = object[0];\n }\n\n return typeof object.nodeType !== 'undefined';\n };\n\n const getElement = object => {\n // it's a jQuery object or a node element\n if (isElement$1(object)) {\n return object.jquery ? object[0] : object;\n }\n\n if (typeof object === 'string' && object.length > 0) {\n return document.querySelector(object);\n }\n\n return null;\n };\n\n const isVisible = element => {\n if (!isElement$1(element) || element.getClientRects().length === 0) {\n return false;\n }\n\n const elementIsVisible = getComputedStyle(element).getPropertyValue('visibility') === 'visible'; // Handle `details` element as its content may falsie appear visible when it is closed\n\n const closedDetails = element.closest('details:not([open])');\n\n if (!closedDetails) {\n return elementIsVisible;\n }\n\n if (closedDetails !== element) {\n const summary = element.closest('summary');\n\n if (summary && summary.parentNode !== closedDetails) {\n return false;\n }\n\n if (summary === null) {\n return false;\n }\n }\n\n return elementIsVisible;\n };\n\n const isDisabled = element => {\n if (!element || element.nodeType !== Node.ELEMENT_NODE) {\n return true;\n }\n\n if (element.classList.contains('disabled')) {\n return true;\n }\n\n if (typeof element.disabled !== 'undefined') {\n return element.disabled;\n }\n\n return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false';\n };\n\n const findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null;\n } // Can find the shadow root otherwise it'll return the document\n\n\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode();\n return root instanceof ShadowRoot ? root : null;\n }\n\n if (element instanceof ShadowRoot) {\n return element;\n } // when we don't find a shadow root\n\n\n if (!element.parentNode) {\n return null;\n }\n\n return findShadowRoot(element.parentNode);\n };\n\n const noop = () => {};\n /**\n * Trick to restart an element's animation\n *\n * @param {HTMLElement} element\n * @return void\n *\n * @see https://www.charistheo.io/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation\n */\n\n\n const reflow = element => {\n element.offsetHeight; // eslint-disable-line no-unused-expressions\n };\n\n const getjQuery = () => {\n if (window.jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return window.jQuery;\n }\n\n return null;\n };\n\n const DOMContentLoadedCallbacks = [];\n\n const onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n // add listener on the first call when the document is in loading state\n if (!DOMContentLoadedCallbacks.length) {\n document.addEventListener('DOMContentLoaded', () => {\n for (const callback of DOMContentLoadedCallbacks) {\n callback();\n }\n });\n }\n\n DOMContentLoadedCallbacks.push(callback);\n } else {\n callback();\n }\n };\n\n const isRTL = () => document.documentElement.dir === 'rtl';\n\n const defineJQueryPlugin = plugin => {\n onDOMContentLoaded(() => {\n const $ = getjQuery();\n /* istanbul ignore if */\n\n if ($) {\n const name = plugin.NAME;\n const JQUERY_NO_CONFLICT = $.fn[name];\n $.fn[name] = plugin.jQueryInterface;\n $.fn[name].Constructor = plugin;\n\n $.fn[name].noConflict = () => {\n $.fn[name] = JQUERY_NO_CONFLICT;\n return plugin.jQueryInterface;\n };\n }\n });\n };\n\n const execute = callback => {\n if (typeof callback === 'function') {\n callback();\n }\n };\n\n const executeAfterTransition = (callback, transitionElement, waitForTransition = true) => {\n if (!waitForTransition) {\n execute(callback);\n return;\n }\n\n const durationPadding = 5;\n const emulatedDuration = getTransitionDurationFromElement(transitionElement) + durationPadding;\n let called = false;\n\n const handler = ({\n target\n }) => {\n if (target !== transitionElement) {\n return;\n }\n\n called = true;\n transitionElement.removeEventListener(TRANSITION_END, handler);\n execute(callback);\n };\n\n transitionElement.addEventListener(TRANSITION_END, handler);\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(transitionElement);\n }\n }, emulatedDuration);\n };\n /**\n * Return the previous/next element of a list.\n *\n * @param {array} list The list of elements\n * @param activeElement The active element\n * @param shouldGetNext Choose to get next or previous element\n * @param isCycleAllowed\n * @return {Element|elem} The proper element\n */\n\n\n const getNextActiveElement = (list, activeElement, shouldGetNext, isCycleAllowed) => {\n const listLength = list.length;\n let index = list.indexOf(activeElement); // if the element does not exist in the list return an element\n // depending on the direction and if cycle is allowed\n\n if (index === -1) {\n return !shouldGetNext && isCycleAllowed ? list[listLength - 1] : list[0];\n }\n\n index += shouldGetNext ? 1 : -1;\n\n if (isCycleAllowed) {\n index = (index + listLength) % listLength;\n }\n\n return list[Math.max(0, Math.min(index, listLength - 1))];\n };\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): dom/event-handler.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const namespaceRegex = /[^.]*(?=\\..*)\\.|.*/;\n const stripNameRegex = /\\..*/;\n const stripUidRegex = /::\\d+$/;\n const eventRegistry = {}; // Events storage\n\n let uidEvent = 1;\n const customEvents = {\n mouseenter: 'mouseover',\n mouseleave: 'mouseout'\n };\n const nativeEvents = new Set(['click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', 'mousewheel', 'DOMMouseScroll', 'mouseover', 'mouseout', 'mousemove', 'selectstart', 'selectend', 'keydown', 'keypress', 'keyup', 'orientationchange', 'touchstart', 'touchmove', 'touchend', 'touchcancel', 'pointerdown', 'pointermove', 'pointerup', 'pointerleave', 'pointercancel', 'gesturestart', 'gesturechange', 'gestureend', 'focus', 'blur', 'change', 'reset', 'select', 'submit', 'focusin', 'focusout', 'load', 'unload', 'beforeunload', 'resize', 'move', 'DOMContentLoaded', 'readystatechange', 'error', 'abort', 'scroll']);\n /**\n * Private methods\n */\n\n function makeEventUid(element, uid) {\n return uid && `${uid}::${uidEvent++}` || element.uidEvent || uidEvent++;\n }\n\n function getElementEvents(element) {\n const uid = makeEventUid(element);\n element.uidEvent = uid;\n eventRegistry[uid] = eventRegistry[uid] || {};\n return eventRegistry[uid];\n }\n\n function bootstrapHandler(element, fn) {\n return function handler(event) {\n hydrateObj(event, {\n delegateTarget: element\n });\n\n if (handler.oneOff) {\n EventHandler.off(element, event.type, fn);\n }\n\n return fn.apply(element, [event]);\n };\n }\n\n function bootstrapDelegationHandler(element, selector, fn) {\n return function handler(event) {\n const domElements = element.querySelectorAll(selector);\n\n for (let {\n target\n } = event; target && target !== this; target = target.parentNode) {\n for (const domElement of domElements) {\n if (domElement !== target) {\n continue;\n }\n\n hydrateObj(event, {\n delegateTarget: target\n });\n\n if (handler.oneOff) {\n EventHandler.off(element, event.type, selector, fn);\n }\n\n return fn.apply(target, [event]);\n }\n }\n };\n }\n\n function findHandler(events, callable, delegationSelector = null) {\n return Object.values(events).find(event => event.callable === callable && event.delegationSelector === delegationSelector);\n }\n\n function normalizeParameters(originalTypeEvent, handler, delegationFunction) {\n const isDelegated = typeof handler === 'string'; // todo: tooltip passes `false` instead of selector, so we need to check\n\n const callable = isDelegated ? delegationFunction : handler || delegationFunction;\n let typeEvent = getTypeEvent(originalTypeEvent);\n\n if (!nativeEvents.has(typeEvent)) {\n typeEvent = originalTypeEvent;\n }\n\n return [isDelegated, callable, typeEvent];\n }\n\n function addHandler(element, originalTypeEvent, handler, delegationFunction, oneOff) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return;\n }\n\n let [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction); // in case of mouseenter or mouseleave wrap the handler within a function that checks for its DOM position\n // this prevents the handler from being dispatched the same way as mouseover or mouseout does\n\n if (originalTypeEvent in customEvents) {\n const wrapFunction = fn => {\n return function (event) {\n if (!event.relatedTarget || event.relatedTarget !== event.delegateTarget && !event.delegateTarget.contains(event.relatedTarget)) {\n return fn.call(this, event);\n }\n };\n };\n\n callable = wrapFunction(callable);\n }\n\n const events = getElementEvents(element);\n const handlers = events[typeEvent] || (events[typeEvent] = {});\n const previousFunction = findHandler(handlers, callable, isDelegated ? handler : null);\n\n if (previousFunction) {\n previousFunction.oneOff = previousFunction.oneOff && oneOff;\n return;\n }\n\n const uid = makeEventUid(callable, originalTypeEvent.replace(namespaceRegex, ''));\n const fn = isDelegated ? bootstrapDelegationHandler(element, handler, callable) : bootstrapHandler(element, callable);\n fn.delegationSelector = isDelegated ? handler : null;\n fn.callable = callable;\n fn.oneOff = oneOff;\n fn.uidEvent = uid;\n handlers[uid] = fn;\n element.addEventListener(typeEvent, fn, isDelegated);\n }\n\n function removeHandler(element, events, typeEvent, handler, delegationSelector) {\n const fn = findHandler(events[typeEvent], handler, delegationSelector);\n\n if (!fn) {\n return;\n }\n\n element.removeEventListener(typeEvent, fn, Boolean(delegationSelector));\n delete events[typeEvent][fn.uidEvent];\n }\n\n function removeNamespacedHandlers(element, events, typeEvent, namespace) {\n const storeElementEvent = events[typeEvent] || {};\n\n for (const handlerKey of Object.keys(storeElementEvent)) {\n if (handlerKey.includes(namespace)) {\n const event = storeElementEvent[handlerKey];\n removeHandler(element, events, typeEvent, event.callable, event.delegationSelector);\n }\n }\n }\n\n function getTypeEvent(event) {\n // allow to get the native events from namespaced events ('click.bs.button' --> 'click')\n event = event.replace(stripNameRegex, '');\n return customEvents[event] || event;\n }\n\n const EventHandler = {\n on(element, event, handler, delegationFunction) {\n addHandler(element, event, handler, delegationFunction, false);\n },\n\n one(element, event, handler, delegationFunction) {\n addHandler(element, event, handler, delegationFunction, true);\n },\n\n off(element, originalTypeEvent, handler, delegationFunction) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return;\n }\n\n const [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction);\n const inNamespace = typeEvent !== originalTypeEvent;\n const events = getElementEvents(element);\n const storeElementEvent = events[typeEvent] || {};\n const isNamespace = originalTypeEvent.startsWith('.');\n\n if (typeof callable !== 'undefined') {\n // Simplest case: handler is passed, remove that listener ONLY.\n if (!Object.keys(storeElementEvent).length) {\n return;\n }\n\n removeHandler(element, events, typeEvent, callable, isDelegated ? handler : null);\n return;\n }\n\n if (isNamespace) {\n for (const elementEvent of Object.keys(events)) {\n removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1));\n }\n }\n\n for (const keyHandlers of Object.keys(storeElementEvent)) {\n const handlerKey = keyHandlers.replace(stripUidRegex, '');\n\n if (!inNamespace || originalTypeEvent.includes(handlerKey)) {\n const event = storeElementEvent[keyHandlers];\n removeHandler(element, events, typeEvent, event.callable, event.delegationSelector);\n }\n }\n },\n\n trigger(element, event, args) {\n if (typeof event !== 'string' || !element) {\n return null;\n }\n\n const $ = getjQuery();\n const typeEvent = getTypeEvent(event);\n const inNamespace = event !== typeEvent;\n let jQueryEvent = null;\n let bubbles = true;\n let nativeDispatch = true;\n let defaultPrevented = false;\n\n if (inNamespace && $) {\n jQueryEvent = $.Event(event, args);\n $(element).trigger(jQueryEvent);\n bubbles = !jQueryEvent.isPropagationStopped();\n nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();\n defaultPrevented = jQueryEvent.isDefaultPrevented();\n }\n\n let evt = new Event(event, {\n bubbles,\n cancelable: true\n });\n evt = hydrateObj(evt, args);\n\n if (defaultPrevented) {\n evt.preventDefault();\n }\n\n if (nativeDispatch) {\n element.dispatchEvent(evt);\n }\n\n if (evt.defaultPrevented && jQueryEvent) {\n jQueryEvent.preventDefault();\n }\n\n return evt;\n }\n\n };\n\n function hydrateObj(obj, meta) {\n for (const [key, value] of Object.entries(meta || {})) {\n try {\n obj[key] = value;\n } catch (_unused) {\n Object.defineProperty(obj, key, {\n configurable: true,\n\n get() {\n return value;\n }\n\n });\n }\n }\n\n return obj;\n }\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): dom/data.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n /**\n * Constants\n */\n const elementMap = new Map();\n const Data = {\n set(element, key, instance) {\n if (!elementMap.has(element)) {\n elementMap.set(element, new Map());\n }\n\n const instanceMap = elementMap.get(element); // make it clear we only want one instance per element\n // can be removed later when multiple key/instances are fine to be used\n\n if (!instanceMap.has(key) && instanceMap.size !== 0) {\n // eslint-disable-next-line no-console\n console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`);\n return;\n }\n\n instanceMap.set(key, instance);\n },\n\n get(element, key) {\n if (elementMap.has(element)) {\n return elementMap.get(element).get(key) || null;\n }\n\n return null;\n },\n\n remove(element, key) {\n if (!elementMap.has(element)) {\n return;\n }\n\n const instanceMap = elementMap.get(element);\n instanceMap.delete(key); // free up element references if there are no instances left for an element\n\n if (instanceMap.size === 0) {\n elementMap.delete(element);\n }\n }\n\n };\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): dom/manipulator.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n function normalizeData(value) {\n if (value === 'true') {\n return true;\n }\n\n if (value === 'false') {\n return false;\n }\n\n if (value === Number(value).toString()) {\n return Number(value);\n }\n\n if (value === '' || value === 'null') {\n return null;\n }\n\n if (typeof value !== 'string') {\n return value;\n }\n\n try {\n return JSON.parse(decodeURIComponent(value));\n } catch (_unused) {\n return value;\n }\n }\n\n function normalizeDataKey(key) {\n return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`);\n }\n\n const Manipulator = {\n setDataAttribute(element, key, value) {\n element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value);\n },\n\n removeDataAttribute(element, key) {\n element.removeAttribute(`data-bs-${normalizeDataKey(key)}`);\n },\n\n getDataAttributes(element) {\n if (!element) {\n return {};\n }\n\n const attributes = {};\n const bsKeys = Object.keys(element.dataset).filter(key => key.startsWith('bs') && !key.startsWith('bsConfig'));\n\n for (const key of bsKeys) {\n let pureKey = key.replace(/^bs/, '');\n pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length);\n attributes[pureKey] = normalizeData(element.dataset[key]);\n }\n\n return attributes;\n },\n\n getDataAttribute(element, key) {\n return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`));\n }\n\n };\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): util/config.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Class definition\n */\n\n class Config {\n // Getters\n static get Default() {\n return {};\n }\n\n static get DefaultType() {\n return {};\n }\n\n static get NAME() {\n throw new Error('You have to implement the static method \"NAME\", for each component!');\n }\n\n _getConfig(config) {\n config = this._mergeConfigObj(config);\n config = this._configAfterMerge(config);\n\n this._typeCheckConfig(config);\n\n return config;\n }\n\n _configAfterMerge(config) {\n return config;\n }\n\n _mergeConfigObj(config, element) {\n const jsonConfig = isElement$1(element) ? Manipulator.getDataAttribute(element, 'config') : {}; // try to parse\n\n return { ...this.constructor.Default,\n ...(typeof jsonConfig === 'object' ? jsonConfig : {}),\n ...(isElement$1(element) ? Manipulator.getDataAttributes(element) : {}),\n ...(typeof config === 'object' ? config : {})\n };\n }\n\n _typeCheckConfig(config, configTypes = this.constructor.DefaultType) {\n for (const property of Object.keys(configTypes)) {\n const expectedTypes = configTypes[property];\n const value = config[property];\n const valueType = isElement$1(value) ? 'element' : toType(value);\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option \"${property}\" provided type \"${valueType}\" but expected type \"${expectedTypes}\".`);\n }\n }\n }\n\n }\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): base-component.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const VERSION = '5.2.3';\n /**\n * Class definition\n */\n\n class BaseComponent extends Config {\n constructor(element, config) {\n super();\n element = getElement(element);\n\n if (!element) {\n return;\n }\n\n this._element = element;\n this._config = this._getConfig(config);\n Data.set(this._element, this.constructor.DATA_KEY, this);\n } // Public\n\n\n dispose() {\n Data.remove(this._element, this.constructor.DATA_KEY);\n EventHandler.off(this._element, this.constructor.EVENT_KEY);\n\n for (const propertyName of Object.getOwnPropertyNames(this)) {\n this[propertyName] = null;\n }\n }\n\n _queueCallback(callback, element, isAnimated = true) {\n executeAfterTransition(callback, element, isAnimated);\n }\n\n _getConfig(config) {\n config = this._mergeConfigObj(config, this._element);\n config = this._configAfterMerge(config);\n\n this._typeCheckConfig(config);\n\n return config;\n } // Static\n\n\n static getInstance(element) {\n return Data.get(getElement(element), this.DATA_KEY);\n }\n\n static getOrCreateInstance(element, config = {}) {\n return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null);\n }\n\n static get VERSION() {\n return VERSION;\n }\n\n static get DATA_KEY() {\n return `bs.${this.NAME}`;\n }\n\n static get EVENT_KEY() {\n return `.${this.DATA_KEY}`;\n }\n\n static eventName(name) {\n return `${name}${this.EVENT_KEY}`;\n }\n\n }\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): util/component-functions.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n const enableDismissTrigger = (component, method = 'hide') => {\n const clickEvent = `click.dismiss${component.EVENT_KEY}`;\n const name = component.NAME;\n EventHandler.on(document, clickEvent, `[data-bs-dismiss=\"${name}\"]`, function (event) {\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault();\n }\n\n if (isDisabled(this)) {\n return;\n }\n\n const target = getElementFromSelector(this) || this.closest(`.${name}`);\n const instance = component.getOrCreateInstance(target); // Method argument is left, for Alert and only, as it doesn't implement the 'hide' method\n\n instance[method]();\n });\n };\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): alert.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$f = 'alert';\n const DATA_KEY$a = 'bs.alert';\n const EVENT_KEY$b = `.${DATA_KEY$a}`;\n const EVENT_CLOSE = `close${EVENT_KEY$b}`;\n const EVENT_CLOSED = `closed${EVENT_KEY$b}`;\n const CLASS_NAME_FADE$5 = 'fade';\n const CLASS_NAME_SHOW$8 = 'show';\n /**\n * Class definition\n */\n\n class Alert extends BaseComponent {\n // Getters\n static get NAME() {\n return NAME$f;\n } // Public\n\n\n close() {\n const closeEvent = EventHandler.trigger(this._element, EVENT_CLOSE);\n\n if (closeEvent.defaultPrevented) {\n return;\n }\n\n this._element.classList.remove(CLASS_NAME_SHOW$8);\n\n const isAnimated = this._element.classList.contains(CLASS_NAME_FADE$5);\n\n this._queueCallback(() => this._destroyElement(), this._element, isAnimated);\n } // Private\n\n\n _destroyElement() {\n this._element.remove();\n\n EventHandler.trigger(this._element, EVENT_CLOSED);\n this.dispose();\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Alert.getOrCreateInstance(this);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config](this);\n });\n }\n\n }\n /**\n * Data API implementation\n */\n\n\n enableDismissTrigger(Alert, 'close');\n /**\n * jQuery\n */\n\n defineJQueryPlugin(Alert);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): button.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$e = 'button';\n const DATA_KEY$9 = 'bs.button';\n const EVENT_KEY$a = `.${DATA_KEY$9}`;\n const DATA_API_KEY$6 = '.data-api';\n const CLASS_NAME_ACTIVE$3 = 'active';\n const SELECTOR_DATA_TOGGLE$5 = '[data-bs-toggle=\"button\"]';\n const EVENT_CLICK_DATA_API$6 = `click${EVENT_KEY$a}${DATA_API_KEY$6}`;\n /**\n * Class definition\n */\n\n class Button extends BaseComponent {\n // Getters\n static get NAME() {\n return NAME$e;\n } // Public\n\n\n toggle() {\n // Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method\n this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE$3));\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Button.getOrCreateInstance(this);\n\n if (config === 'toggle') {\n data[config]();\n }\n });\n }\n\n }\n /**\n * Data API implementation\n */\n\n\n EventHandler.on(document, EVENT_CLICK_DATA_API$6, SELECTOR_DATA_TOGGLE$5, event => {\n event.preventDefault();\n const button = event.target.closest(SELECTOR_DATA_TOGGLE$5);\n const data = Button.getOrCreateInstance(button);\n data.toggle();\n });\n /**\n * jQuery\n */\n\n defineJQueryPlugin(Button);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): dom/selector-engine.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const SelectorEngine = {\n find(selector, element = document.documentElement) {\n return [].concat(...Element.prototype.querySelectorAll.call(element, selector));\n },\n\n findOne(selector, element = document.documentElement) {\n return Element.prototype.querySelector.call(element, selector);\n },\n\n children(element, selector) {\n return [].concat(...element.children).filter(child => child.matches(selector));\n },\n\n parents(element, selector) {\n const parents = [];\n let ancestor = element.parentNode.closest(selector);\n\n while (ancestor) {\n parents.push(ancestor);\n ancestor = ancestor.parentNode.closest(selector);\n }\n\n return parents;\n },\n\n prev(element, selector) {\n let previous = element.previousElementSibling;\n\n while (previous) {\n if (previous.matches(selector)) {\n return [previous];\n }\n\n previous = previous.previousElementSibling;\n }\n\n return [];\n },\n\n // TODO: this is now unused; remove later along with prev()\n next(element, selector) {\n let next = element.nextElementSibling;\n\n while (next) {\n if (next.matches(selector)) {\n return [next];\n }\n\n next = next.nextElementSibling;\n }\n\n return [];\n },\n\n focusableChildren(element) {\n const focusables = ['a', 'button', 'input', 'textarea', 'select', 'details', '[tabindex]', '[contenteditable=\"true\"]'].map(selector => `${selector}:not([tabindex^=\"-\"])`).join(',');\n return this.find(focusables, element).filter(el => !isDisabled(el) && isVisible(el));\n }\n\n };\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): util/swipe.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$d = 'swipe';\n const EVENT_KEY$9 = '.bs.swipe';\n const EVENT_TOUCHSTART = `touchstart${EVENT_KEY$9}`;\n const EVENT_TOUCHMOVE = `touchmove${EVENT_KEY$9}`;\n const EVENT_TOUCHEND = `touchend${EVENT_KEY$9}`;\n const EVENT_POINTERDOWN = `pointerdown${EVENT_KEY$9}`;\n const EVENT_POINTERUP = `pointerup${EVENT_KEY$9}`;\n const POINTER_TYPE_TOUCH = 'touch';\n const POINTER_TYPE_PEN = 'pen';\n const CLASS_NAME_POINTER_EVENT = 'pointer-event';\n const SWIPE_THRESHOLD = 40;\n const Default$c = {\n endCallback: null,\n leftCallback: null,\n rightCallback: null\n };\n const DefaultType$c = {\n endCallback: '(function|null)',\n leftCallback: '(function|null)',\n rightCallback: '(function|null)'\n };\n /**\n * Class definition\n */\n\n class Swipe extends Config {\n constructor(element, config) {\n super();\n this._element = element;\n\n if (!element || !Swipe.isSupported()) {\n return;\n }\n\n this._config = this._getConfig(config);\n this._deltaX = 0;\n this._supportPointerEvents = Boolean(window.PointerEvent);\n\n this._initEvents();\n } // Getters\n\n\n static get Default() {\n return Default$c;\n }\n\n static get DefaultType() {\n return DefaultType$c;\n }\n\n static get NAME() {\n return NAME$d;\n } // Public\n\n\n dispose() {\n EventHandler.off(this._element, EVENT_KEY$9);\n } // Private\n\n\n _start(event) {\n if (!this._supportPointerEvents) {\n this._deltaX = event.touches[0].clientX;\n return;\n }\n\n if (this._eventIsPointerPenTouch(event)) {\n this._deltaX = event.clientX;\n }\n }\n\n _end(event) {\n if (this._eventIsPointerPenTouch(event)) {\n this._deltaX = event.clientX - this._deltaX;\n }\n\n this._handleSwipe();\n\n execute(this._config.endCallback);\n }\n\n _move(event) {\n this._deltaX = event.touches && event.touches.length > 1 ? 0 : event.touches[0].clientX - this._deltaX;\n }\n\n _handleSwipe() {\n const absDeltaX = Math.abs(this._deltaX);\n\n if (absDeltaX <= SWIPE_THRESHOLD) {\n return;\n }\n\n const direction = absDeltaX / this._deltaX;\n this._deltaX = 0;\n\n if (!direction) {\n return;\n }\n\n execute(direction > 0 ? this._config.rightCallback : this._config.leftCallback);\n }\n\n _initEvents() {\n if (this._supportPointerEvents) {\n EventHandler.on(this._element, EVENT_POINTERDOWN, event => this._start(event));\n EventHandler.on(this._element, EVENT_POINTERUP, event => this._end(event));\n\n this._element.classList.add(CLASS_NAME_POINTER_EVENT);\n } else {\n EventHandler.on(this._element, EVENT_TOUCHSTART, event => this._start(event));\n EventHandler.on(this._element, EVENT_TOUCHMOVE, event => this._move(event));\n EventHandler.on(this._element, EVENT_TOUCHEND, event => this._end(event));\n }\n }\n\n _eventIsPointerPenTouch(event) {\n return this._supportPointerEvents && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH);\n } // Static\n\n\n static isSupported() {\n return 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;\n }\n\n }\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): carousel.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$c = 'carousel';\n const DATA_KEY$8 = 'bs.carousel';\n const EVENT_KEY$8 = `.${DATA_KEY$8}`;\n const DATA_API_KEY$5 = '.data-api';\n const ARROW_LEFT_KEY$1 = 'ArrowLeft';\n const ARROW_RIGHT_KEY$1 = 'ArrowRight';\n const TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch\n\n const ORDER_NEXT = 'next';\n const ORDER_PREV = 'prev';\n const DIRECTION_LEFT = 'left';\n const DIRECTION_RIGHT = 'right';\n const EVENT_SLIDE = `slide${EVENT_KEY$8}`;\n const EVENT_SLID = `slid${EVENT_KEY$8}`;\n const EVENT_KEYDOWN$1 = `keydown${EVENT_KEY$8}`;\n const EVENT_MOUSEENTER$1 = `mouseenter${EVENT_KEY$8}`;\n const EVENT_MOUSELEAVE$1 = `mouseleave${EVENT_KEY$8}`;\n const EVENT_DRAG_START = `dragstart${EVENT_KEY$8}`;\n const EVENT_LOAD_DATA_API$3 = `load${EVENT_KEY$8}${DATA_API_KEY$5}`;\n const EVENT_CLICK_DATA_API$5 = `click${EVENT_KEY$8}${DATA_API_KEY$5}`;\n const CLASS_NAME_CAROUSEL = 'carousel';\n const CLASS_NAME_ACTIVE$2 = 'active';\n const CLASS_NAME_SLIDE = 'slide';\n const CLASS_NAME_END = 'carousel-item-end';\n const CLASS_NAME_START = 'carousel-item-start';\n const CLASS_NAME_NEXT = 'carousel-item-next';\n const CLASS_NAME_PREV = 'carousel-item-prev';\n const SELECTOR_ACTIVE = '.active';\n const SELECTOR_ITEM = '.carousel-item';\n const SELECTOR_ACTIVE_ITEM = SELECTOR_ACTIVE + SELECTOR_ITEM;\n const SELECTOR_ITEM_IMG = '.carousel-item img';\n const SELECTOR_INDICATORS = '.carousel-indicators';\n const SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]';\n const SELECTOR_DATA_RIDE = '[data-bs-ride=\"carousel\"]';\n const KEY_TO_DIRECTION = {\n [ARROW_LEFT_KEY$1]: DIRECTION_RIGHT,\n [ARROW_RIGHT_KEY$1]: DIRECTION_LEFT\n };\n const Default$b = {\n interval: 5000,\n keyboard: true,\n pause: 'hover',\n ride: false,\n touch: true,\n wrap: true\n };\n const DefaultType$b = {\n interval: '(number|boolean)',\n // TODO:v6 remove boolean support\n keyboard: 'boolean',\n pause: '(string|boolean)',\n ride: '(boolean|string)',\n touch: 'boolean',\n wrap: 'boolean'\n };\n /**\n * Class definition\n */\n\n class Carousel extends BaseComponent {\n constructor(element, config) {\n super(element, config);\n this._interval = null;\n this._activeElement = null;\n this._isSliding = false;\n this.touchTimeout = null;\n this._swipeHelper = null;\n this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, this._element);\n\n this._addEventListeners();\n\n if (this._config.ride === CLASS_NAME_CAROUSEL) {\n this.cycle();\n }\n } // Getters\n\n\n static get Default() {\n return Default$b;\n }\n\n static get DefaultType() {\n return DefaultType$b;\n }\n\n static get NAME() {\n return NAME$c;\n } // Public\n\n\n next() {\n this._slide(ORDER_NEXT);\n }\n\n nextWhenVisible() {\n // FIXME TODO use `document.visibilityState`\n // Don't call next when the page isn't visible\n // or the carousel or its parent isn't visible\n if (!document.hidden && isVisible(this._element)) {\n this.next();\n }\n }\n\n prev() {\n this._slide(ORDER_PREV);\n }\n\n pause() {\n if (this._isSliding) {\n triggerTransitionEnd(this._element);\n }\n\n this._clearInterval();\n }\n\n cycle() {\n this._clearInterval();\n\n this._updateInterval();\n\n this._interval = setInterval(() => this.nextWhenVisible(), this._config.interval);\n }\n\n _maybeEnableCycle() {\n if (!this._config.ride) {\n return;\n }\n\n if (this._isSliding) {\n EventHandler.one(this._element, EVENT_SLID, () => this.cycle());\n return;\n }\n\n this.cycle();\n }\n\n to(index) {\n const items = this._getItems();\n\n if (index > items.length - 1 || index < 0) {\n return;\n }\n\n if (this._isSliding) {\n EventHandler.one(this._element, EVENT_SLID, () => this.to(index));\n return;\n }\n\n const activeIndex = this._getItemIndex(this._getActive());\n\n if (activeIndex === index) {\n return;\n }\n\n const order = index > activeIndex ? ORDER_NEXT : ORDER_PREV;\n\n this._slide(order, items[index]);\n }\n\n dispose() {\n if (this._swipeHelper) {\n this._swipeHelper.dispose();\n }\n\n super.dispose();\n } // Private\n\n\n _configAfterMerge(config) {\n config.defaultInterval = config.interval;\n return config;\n }\n\n _addEventListeners() {\n if (this._config.keyboard) {\n EventHandler.on(this._element, EVENT_KEYDOWN$1, event => this._keydown(event));\n }\n\n if (this._config.pause === 'hover') {\n EventHandler.on(this._element, EVENT_MOUSEENTER$1, () => this.pause());\n EventHandler.on(this._element, EVENT_MOUSELEAVE$1, () => this._maybeEnableCycle());\n }\n\n if (this._config.touch && Swipe.isSupported()) {\n this._addTouchEventListeners();\n }\n }\n\n _addTouchEventListeners() {\n for (const img of SelectorEngine.find(SELECTOR_ITEM_IMG, this._element)) {\n EventHandler.on(img, EVENT_DRAG_START, event => event.preventDefault());\n }\n\n const endCallBack = () => {\n if (this._config.pause !== 'hover') {\n return;\n } // If it's a touch-enabled device, mouseenter/leave are fired as\n // part of the mouse compatibility events on first tap - the carousel\n // would stop cycling until user tapped out of it;\n // here, we listen for touchend, explicitly pause the carousel\n // (as if it's the second time we tap on it, mouseenter compat event\n // is NOT fired) and after a timeout (to allow for mouse compatibility\n // events to fire) we explicitly restart cycling\n\n\n this.pause();\n\n if (this.touchTimeout) {\n clearTimeout(this.touchTimeout);\n }\n\n this.touchTimeout = setTimeout(() => this._maybeEnableCycle(), TOUCHEVENT_COMPAT_WAIT + this._config.interval);\n };\n\n const swipeConfig = {\n leftCallback: () => this._slide(this._directionToOrder(DIRECTION_LEFT)),\n rightCallback: () => this._slide(this._directionToOrder(DIRECTION_RIGHT)),\n endCallback: endCallBack\n };\n this._swipeHelper = new Swipe(this._element, swipeConfig);\n }\n\n _keydown(event) {\n if (/input|textarea/i.test(event.target.tagName)) {\n return;\n }\n\n const direction = KEY_TO_DIRECTION[event.key];\n\n if (direction) {\n event.preventDefault();\n\n this._slide(this._directionToOrder(direction));\n }\n }\n\n _getItemIndex(element) {\n return this._getItems().indexOf(element);\n }\n\n _setActiveIndicatorElement(index) {\n if (!this._indicatorsElement) {\n return;\n }\n\n const activeIndicator = SelectorEngine.findOne(SELECTOR_ACTIVE, this._indicatorsElement);\n activeIndicator.classList.remove(CLASS_NAME_ACTIVE$2);\n activeIndicator.removeAttribute('aria-current');\n const newActiveIndicator = SelectorEngine.findOne(`[data-bs-slide-to=\"${index}\"]`, this._indicatorsElement);\n\n if (newActiveIndicator) {\n newActiveIndicator.classList.add(CLASS_NAME_ACTIVE$2);\n newActiveIndicator.setAttribute('aria-current', 'true');\n }\n }\n\n _updateInterval() {\n const element = this._activeElement || this._getActive();\n\n if (!element) {\n return;\n }\n\n const elementInterval = Number.parseInt(element.getAttribute('data-bs-interval'), 10);\n this._config.interval = elementInterval || this._config.defaultInterval;\n }\n\n _slide(order, element = null) {\n if (this._isSliding) {\n return;\n }\n\n const activeElement = this._getActive();\n\n const isNext = order === ORDER_NEXT;\n const nextElement = element || getNextActiveElement(this._getItems(), activeElement, isNext, this._config.wrap);\n\n if (nextElement === activeElement) {\n return;\n }\n\n const nextElementIndex = this._getItemIndex(nextElement);\n\n const triggerEvent = eventName => {\n return EventHandler.trigger(this._element, eventName, {\n relatedTarget: nextElement,\n direction: this._orderToDirection(order),\n from: this._getItemIndex(activeElement),\n to: nextElementIndex\n });\n };\n\n const slideEvent = triggerEvent(EVENT_SLIDE);\n\n if (slideEvent.defaultPrevented) {\n return;\n }\n\n if (!activeElement || !nextElement) {\n // Some weirdness is happening, so we bail\n // todo: change tests that use empty divs to avoid this check\n return;\n }\n\n const isCycling = Boolean(this._interval);\n this.pause();\n this._isSliding = true;\n\n this._setActiveIndicatorElement(nextElementIndex);\n\n this._activeElement = nextElement;\n const directionalClassName = isNext ? CLASS_NAME_START : CLASS_NAME_END;\n const orderClassName = isNext ? CLASS_NAME_NEXT : CLASS_NAME_PREV;\n nextElement.classList.add(orderClassName);\n reflow(nextElement);\n activeElement.classList.add(directionalClassName);\n nextElement.classList.add(directionalClassName);\n\n const completeCallBack = () => {\n nextElement.classList.remove(directionalClassName, orderClassName);\n nextElement.classList.add(CLASS_NAME_ACTIVE$2);\n activeElement.classList.remove(CLASS_NAME_ACTIVE$2, orderClassName, directionalClassName);\n this._isSliding = false;\n triggerEvent(EVENT_SLID);\n };\n\n this._queueCallback(completeCallBack, activeElement, this._isAnimated());\n\n if (isCycling) {\n this.cycle();\n }\n }\n\n _isAnimated() {\n return this._element.classList.contains(CLASS_NAME_SLIDE);\n }\n\n _getActive() {\n return SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);\n }\n\n _getItems() {\n return SelectorEngine.find(SELECTOR_ITEM, this._element);\n }\n\n _clearInterval() {\n if (this._interval) {\n clearInterval(this._interval);\n this._interval = null;\n }\n }\n\n _directionToOrder(direction) {\n if (isRTL()) {\n return direction === DIRECTION_LEFT ? ORDER_PREV : ORDER_NEXT;\n }\n\n return direction === DIRECTION_LEFT ? ORDER_NEXT : ORDER_PREV;\n }\n\n _orderToDirection(order) {\n if (isRTL()) {\n return order === ORDER_PREV ? DIRECTION_LEFT : DIRECTION_RIGHT;\n }\n\n return order === ORDER_PREV ? DIRECTION_RIGHT : DIRECTION_LEFT;\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Carousel.getOrCreateInstance(this, config);\n\n if (typeof config === 'number') {\n data.to(config);\n return;\n }\n\n if (typeof config === 'string') {\n if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n }\n });\n }\n\n }\n /**\n * Data API implementation\n */\n\n\n EventHandler.on(document, EVENT_CLICK_DATA_API$5, SELECTOR_DATA_SLIDE, function (event) {\n const target = getElementFromSelector(this);\n\n if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {\n return;\n }\n\n event.preventDefault();\n const carousel = Carousel.getOrCreateInstance(target);\n const slideIndex = this.getAttribute('data-bs-slide-to');\n\n if (slideIndex) {\n carousel.to(slideIndex);\n\n carousel._maybeEnableCycle();\n\n return;\n }\n\n if (Manipulator.getDataAttribute(this, 'slide') === 'next') {\n carousel.next();\n\n carousel._maybeEnableCycle();\n\n return;\n }\n\n carousel.prev();\n\n carousel._maybeEnableCycle();\n });\n EventHandler.on(window, EVENT_LOAD_DATA_API$3, () => {\n const carousels = SelectorEngine.find(SELECTOR_DATA_RIDE);\n\n for (const carousel of carousels) {\n Carousel.getOrCreateInstance(carousel);\n }\n });\n /**\n * jQuery\n */\n\n defineJQueryPlugin(Carousel);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): collapse.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$b = 'collapse';\n const DATA_KEY$7 = 'bs.collapse';\n const EVENT_KEY$7 = `.${DATA_KEY$7}`;\n const DATA_API_KEY$4 = '.data-api';\n const EVENT_SHOW$6 = `show${EVENT_KEY$7}`;\n const EVENT_SHOWN$6 = `shown${EVENT_KEY$7}`;\n const EVENT_HIDE$6 = `hide${EVENT_KEY$7}`;\n const EVENT_HIDDEN$6 = `hidden${EVENT_KEY$7}`;\n const EVENT_CLICK_DATA_API$4 = `click${EVENT_KEY$7}${DATA_API_KEY$4}`;\n const CLASS_NAME_SHOW$7 = 'show';\n const CLASS_NAME_COLLAPSE = 'collapse';\n const CLASS_NAME_COLLAPSING = 'collapsing';\n const CLASS_NAME_COLLAPSED = 'collapsed';\n const CLASS_NAME_DEEPER_CHILDREN = `:scope .${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`;\n const CLASS_NAME_HORIZONTAL = 'collapse-horizontal';\n const WIDTH = 'width';\n const HEIGHT = 'height';\n const SELECTOR_ACTIVES = '.collapse.show, .collapse.collapsing';\n const SELECTOR_DATA_TOGGLE$4 = '[data-bs-toggle=\"collapse\"]';\n const Default$a = {\n parent: null,\n toggle: true\n };\n const DefaultType$a = {\n parent: '(null|element)',\n toggle: 'boolean'\n };\n /**\n * Class definition\n */\n\n class Collapse extends BaseComponent {\n constructor(element, config) {\n super(element, config);\n this._isTransitioning = false;\n this._triggerArray = [];\n const toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE$4);\n\n for (const elem of toggleList) {\n const selector = getSelectorFromElement(elem);\n const filterElement = SelectorEngine.find(selector).filter(foundElement => foundElement === this._element);\n\n if (selector !== null && filterElement.length) {\n this._triggerArray.push(elem);\n }\n }\n\n this._initializeChildren();\n\n if (!this._config.parent) {\n this._addAriaAndCollapsedClass(this._triggerArray, this._isShown());\n }\n\n if (this._config.toggle) {\n this.toggle();\n }\n } // Getters\n\n\n static get Default() {\n return Default$a;\n }\n\n static get DefaultType() {\n return DefaultType$a;\n }\n\n static get NAME() {\n return NAME$b;\n } // Public\n\n\n toggle() {\n if (this._isShown()) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n show() {\n if (this._isTransitioning || this._isShown()) {\n return;\n }\n\n let activeChildren = []; // find active children\n\n if (this._config.parent) {\n activeChildren = this._getFirstLevelChildren(SELECTOR_ACTIVES).filter(element => element !== this._element).map(element => Collapse.getOrCreateInstance(element, {\n toggle: false\n }));\n }\n\n if (activeChildren.length && activeChildren[0]._isTransitioning) {\n return;\n }\n\n const startEvent = EventHandler.trigger(this._element, EVENT_SHOW$6);\n\n if (startEvent.defaultPrevented) {\n return;\n }\n\n for (const activeInstance of activeChildren) {\n activeInstance.hide();\n }\n\n const dimension = this._getDimension();\n\n this._element.classList.remove(CLASS_NAME_COLLAPSE);\n\n this._element.classList.add(CLASS_NAME_COLLAPSING);\n\n this._element.style[dimension] = 0;\n\n this._addAriaAndCollapsedClass(this._triggerArray, true);\n\n this._isTransitioning = true;\n\n const complete = () => {\n this._isTransitioning = false;\n\n this._element.classList.remove(CLASS_NAME_COLLAPSING);\n\n this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7);\n\n this._element.style[dimension] = '';\n EventHandler.trigger(this._element, EVENT_SHOWN$6);\n };\n\n const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);\n const scrollSize = `scroll${capitalizedDimension}`;\n\n this._queueCallback(complete, this._element, true);\n\n this._element.style[dimension] = `${this._element[scrollSize]}px`;\n }\n\n hide() {\n if (this._isTransitioning || !this._isShown()) {\n return;\n }\n\n const startEvent = EventHandler.trigger(this._element, EVENT_HIDE$6);\n\n if (startEvent.defaultPrevented) {\n return;\n }\n\n const dimension = this._getDimension();\n\n this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`;\n reflow(this._element);\n\n this._element.classList.add(CLASS_NAME_COLLAPSING);\n\n this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7);\n\n for (const trigger of this._triggerArray) {\n const element = getElementFromSelector(trigger);\n\n if (element && !this._isShown(element)) {\n this._addAriaAndCollapsedClass([trigger], false);\n }\n }\n\n this._isTransitioning = true;\n\n const complete = () => {\n this._isTransitioning = false;\n\n this._element.classList.remove(CLASS_NAME_COLLAPSING);\n\n this._element.classList.add(CLASS_NAME_COLLAPSE);\n\n EventHandler.trigger(this._element, EVENT_HIDDEN$6);\n };\n\n this._element.style[dimension] = '';\n\n this._queueCallback(complete, this._element, true);\n }\n\n _isShown(element = this._element) {\n return element.classList.contains(CLASS_NAME_SHOW$7);\n } // Private\n\n\n _configAfterMerge(config) {\n config.toggle = Boolean(config.toggle); // Coerce string values\n\n config.parent = getElement(config.parent);\n return config;\n }\n\n _getDimension() {\n return this._element.classList.contains(CLASS_NAME_HORIZONTAL) ? WIDTH : HEIGHT;\n }\n\n _initializeChildren() {\n if (!this._config.parent) {\n return;\n }\n\n const children = this._getFirstLevelChildren(SELECTOR_DATA_TOGGLE$4);\n\n for (const element of children) {\n const selected = getElementFromSelector(element);\n\n if (selected) {\n this._addAriaAndCollapsedClass([element], this._isShown(selected));\n }\n }\n }\n\n _getFirstLevelChildren(selector) {\n const children = SelectorEngine.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent); // remove children if greater depth\n\n return SelectorEngine.find(selector, this._config.parent).filter(element => !children.includes(element));\n }\n\n _addAriaAndCollapsedClass(triggerArray, isOpen) {\n if (!triggerArray.length) {\n return;\n }\n\n for (const element of triggerArray) {\n element.classList.toggle(CLASS_NAME_COLLAPSED, !isOpen);\n element.setAttribute('aria-expanded', isOpen);\n }\n } // Static\n\n\n static jQueryInterface(config) {\n const _config = {};\n\n if (typeof config === 'string' && /show|hide/.test(config)) {\n _config.toggle = false;\n }\n\n return this.each(function () {\n const data = Collapse.getOrCreateInstance(this, _config);\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n }\n });\n }\n\n }\n /**\n * Data API implementation\n */\n\n\n EventHandler.on(document, EVENT_CLICK_DATA_API$4, SELECTOR_DATA_TOGGLE$4, function (event) {\n // preventDefault only for <a> elements (which change the URL) not inside the collapsible element\n if (event.target.tagName === 'A' || event.delegateTarget && event.delegateTarget.tagName === 'A') {\n event.preventDefault();\n }\n\n const selector = getSelectorFromElement(this);\n const selectorElements = SelectorEngine.find(selector);\n\n for (const element of selectorElements) {\n Collapse.getOrCreateInstance(element, {\n toggle: false\n }).toggle();\n }\n });\n /**\n * jQuery\n */\n\n defineJQueryPlugin(Collapse);\n\n var top = 'top';\n var bottom = 'bottom';\n var right = 'right';\n var left = 'left';\n var auto = 'auto';\n var basePlacements = [top, bottom, right, left];\n var start = 'start';\n var end = 'end';\n var clippingParents = 'clippingParents';\n var viewport = 'viewport';\n var popper = 'popper';\n var reference = 'reference';\n var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n }, []);\n var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n }, []); // modifiers that need to read the DOM\n\n var beforeRead = 'beforeRead';\n var read = 'read';\n var afterRead = 'afterRead'; // pure-logic modifiers\n\n var beforeMain = 'beforeMain';\n var main = 'main';\n var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\n var beforeWrite = 'beforeWrite';\n var write = 'write';\n var afterWrite = 'afterWrite';\n var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];\n\n function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n }\n\n function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n }\n\n function isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n }\n\n function isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n }\n\n function isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n }\n\n // and applies them to the HTMLElements such as popper and arrow\n\n function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n }\n\n function effect$2(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const applyStyles$1 = {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect$2,\n requires: ['computeStyles']\n };\n\n function getBasePlacement(placement) {\n return placement.split('-')[0];\n }\n\n var max = Math.max;\n var min = Math.min;\n var round = Math.round;\n\n function getUAString() {\n var uaData = navigator.userAgentData;\n\n if (uaData != null && uaData.brands) {\n return uaData.brands.map(function (item) {\n return item.brand + \"/\" + item.version;\n }).join(' ');\n }\n\n return navigator.userAgent;\n }\n\n function isLayoutViewport() {\n return !/^((?!chrome|android).)*safari/i.test(getUAString());\n }\n\n function getBoundingClientRect(element, includeScale, isFixedStrategy) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n\n var clientRect = element.getBoundingClientRect();\n var scaleX = 1;\n var scaleY = 1;\n\n if (includeScale && isHTMLElement(element)) {\n scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n }\n\n var _ref = isElement(element) ? getWindow(element) : window,\n visualViewport = _ref.visualViewport;\n\n var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n var width = clientRect.width / scaleX;\n var height = clientRect.height / scaleY;\n return {\n width: width,\n height: height,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x,\n x: x,\n y: y\n };\n }\n\n // means it doesn't take into account transforms.\n\n function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n }\n\n function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n }\n\n function getComputedStyle$1(element) {\n return getWindow(element).getComputedStyle(element);\n }\n\n function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n }\n\n function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n }\n\n function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n }\n\n function getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle$1(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n } // `.offsetParent` reports `null` for fixed elements, while absolute elements\n // return the containing block\n\n\n function getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle$1(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle$1(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n } // Gets the closest ancestor positioned element. Handles some edge cases,\n // such as table ancestors and cross browser bugs.\n\n\n function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle$1(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n }\n\n function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n }\n\n function within(min$1, value, max$1) {\n return max(min$1, min(value, max$1));\n }\n function withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n }\n\n function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n }\n\n function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n }\n\n function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n }\n\n var toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n };\n\n function arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n }\n\n function effect$1(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n\n return;\n }\n\n state.elements.arrow = arrowElement;\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const arrow$1 = {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect$1,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n };\n\n function getVariation(placement) {\n return placement.split('-')[1];\n }\n\n var unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n }; // Round the offsets to the nearest suitable subpixel based on the DPR.\n // Zooming can change the DPR, but it seems to report a value that will\n // cleanly divide the values into the appropriate subpixels.\n\n function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n }\n\n function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets,\n isFixed = _ref2.isFixed;\n var _offsets$x = offsets.x,\n x = _offsets$x === void 0 ? 0 : _offsets$x,\n _offsets$y = offsets.y,\n y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref3.x;\n y = _ref3.y;\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle$1(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom;\n var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n offsetParent[heightProp];\n y -= offsetY - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right;\n var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n offsetParent[widthProp];\n x -= offsetX - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref4.x;\n y = _ref4.y;\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n }\n\n function computeStyles(_ref5) {\n var state = _ref5.state,\n options = _ref5.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration,\n isFixed: state.options.strategy === 'fixed'\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const computeStyles$1 = {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n };\n\n var passive = {\n passive: true\n };\n\n function effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const eventListeners = {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n };\n\n var hash$1 = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n };\n function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash$1[matched];\n });\n }\n\n var hash = {\n start: 'end',\n end: 'start'\n };\n function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n }\n\n function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n }\n\n function getWindowScrollBarX(element) {\n // If <html> has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on <html>\n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n }\n\n function getViewportRect(element, strategy) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0;\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n var layoutViewport = isLayoutViewport();\n\n if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n }\n\n // of the `<html>` and `<body>` rect bounds if horizontally scrollable\n\n function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle$1(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n }\n\n function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle$1(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n }\n\n function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n }\n\n /*\n given a DOM element, return the list of all scroll parents, up the list of ancesors\n until we get to the top window object. This list is what we attach scroll listeners\n to, because if any of these parent elements scroll, we'll need to re-calculate the\n reference element's position.\n */\n\n function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n }\n\n function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n }\n\n function getInnerBoundingClientRect(element, strategy) {\n var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n }\n\n function getClientRectFromMixedType(element, clippingParent, strategy) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n } // A \"clipping parent\" is an overflowable container with the characteristic of\n // clipping (or hiding) overflowing elements with a position different from\n // `initial`\n\n\n function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle$1(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n } // Gets the maximum area that the element is visible in due to any number of\n // clipping parents\n\n\n function getClippingRect(element, boundary, rootBoundary, strategy) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n }\n\n function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n }\n }\n\n return offsets;\n }\n\n function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$strategy = _options.strategy,\n strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n }\n\n function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements$1 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements$1.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements$1;\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n }\n\n function getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n }\n\n function flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const flip$1 = {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n };\n\n function getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n }\n\n function isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n }\n\n function hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const hide$1 = {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n };\n\n function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n }\n\n function offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const offset$1 = {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n };\n\n function popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const popperOffsets$1 = {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n };\n\n function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n }\n\n function preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n mainAxis: tetherOffsetValue,\n altAxis: tetherOffsetValue\n } : Object.assign({\n mainAxis: 0,\n altAxis: 0\n }, tetherOffsetValue);\n var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var _offsetModifierState$;\n\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min$1 = offset + overflow[mainSide];\n var max$1 = offset - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = offset + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _offsetModifierState$2;\n\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _len = altAxis === 'y' ? 'height' : 'width';\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const preventOverflow$1 = {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n };\n\n function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n\n function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n }\n\n function isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = round(rect.width) / element.offsetWidth || 1;\n var scaleY = round(rect.height) / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n } // Returns the composite rect of an element relative to its offsetParent.\n // Composite means it takes into account transforms as well as layout.\n\n\n function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n }\n\n function order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n }\n\n function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n }\n\n function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n }\n\n function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n }\n\n var DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n };\n\n function areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n }\n\n function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n }); // Validate the provided modifiers so that the consumer will get warned\n\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n }\n var createPopper$2 = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\n var defaultModifiers$1 = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1];\n var createPopper$1 = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers$1\n }); // eslint-disable-next-line import/no-unused-modules\n\n var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1, offset$1, flip$1, preventOverflow$1, arrow$1, hide$1];\n var createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n }); // eslint-disable-next-line import/no-unused-modules\n\n const Popper = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({\n __proto__: null,\n popperGenerator,\n detectOverflow,\n createPopperBase: createPopper$2,\n createPopper,\n createPopperLite: createPopper$1,\n top,\n bottom,\n right,\n left,\n auto,\n basePlacements,\n start,\n end,\n clippingParents,\n viewport,\n popper,\n reference,\n variationPlacements,\n placements,\n beforeRead,\n read,\n afterRead,\n beforeMain,\n main,\n afterMain,\n beforeWrite,\n write,\n afterWrite,\n modifierPhases,\n applyStyles: applyStyles$1,\n arrow: arrow$1,\n computeStyles: computeStyles$1,\n eventListeners,\n flip: flip$1,\n hide: hide$1,\n offset: offset$1,\n popperOffsets: popperOffsets$1,\n preventOverflow: preventOverflow$1\n }, Symbol.toStringTag, { value: 'Module' }));\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): dropdown.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$a = 'dropdown';\n const DATA_KEY$6 = 'bs.dropdown';\n const EVENT_KEY$6 = `.${DATA_KEY$6}`;\n const DATA_API_KEY$3 = '.data-api';\n const ESCAPE_KEY$2 = 'Escape';\n const TAB_KEY$1 = 'Tab';\n const ARROW_UP_KEY$1 = 'ArrowUp';\n const ARROW_DOWN_KEY$1 = 'ArrowDown';\n const RIGHT_MOUSE_BUTTON = 2; // MouseEvent.button value for the secondary button, usually the right button\n\n const EVENT_HIDE$5 = `hide${EVENT_KEY$6}`;\n const EVENT_HIDDEN$5 = `hidden${EVENT_KEY$6}`;\n const EVENT_SHOW$5 = `show${EVENT_KEY$6}`;\n const EVENT_SHOWN$5 = `shown${EVENT_KEY$6}`;\n const EVENT_CLICK_DATA_API$3 = `click${EVENT_KEY$6}${DATA_API_KEY$3}`;\n const EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY$6}${DATA_API_KEY$3}`;\n const EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY$6}${DATA_API_KEY$3}`;\n const CLASS_NAME_SHOW$6 = 'show';\n const CLASS_NAME_DROPUP = 'dropup';\n const CLASS_NAME_DROPEND = 'dropend';\n const CLASS_NAME_DROPSTART = 'dropstart';\n const CLASS_NAME_DROPUP_CENTER = 'dropup-center';\n const CLASS_NAME_DROPDOWN_CENTER = 'dropdown-center';\n const SELECTOR_DATA_TOGGLE$3 = '[data-bs-toggle=\"dropdown\"]:not(.disabled):not(:disabled)';\n const SELECTOR_DATA_TOGGLE_SHOWN = `${SELECTOR_DATA_TOGGLE$3}.${CLASS_NAME_SHOW$6}`;\n const SELECTOR_MENU = '.dropdown-menu';\n const SELECTOR_NAVBAR = '.navbar';\n const SELECTOR_NAVBAR_NAV = '.navbar-nav';\n const SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)';\n const PLACEMENT_TOP = isRTL() ? 'top-end' : 'top-start';\n const PLACEMENT_TOPEND = isRTL() ? 'top-start' : 'top-end';\n const PLACEMENT_BOTTOM = isRTL() ? 'bottom-end' : 'bottom-start';\n const PLACEMENT_BOTTOMEND = isRTL() ? 'bottom-start' : 'bottom-end';\n const PLACEMENT_RIGHT = isRTL() ? 'left-start' : 'right-start';\n const PLACEMENT_LEFT = isRTL() ? 'right-start' : 'left-start';\n const PLACEMENT_TOPCENTER = 'top';\n const PLACEMENT_BOTTOMCENTER = 'bottom';\n const Default$9 = {\n autoClose: true,\n boundary: 'clippingParents',\n display: 'dynamic',\n offset: [0, 2],\n popperConfig: null,\n reference: 'toggle'\n };\n const DefaultType$9 = {\n autoClose: '(boolean|string)',\n boundary: '(string|element)',\n display: 'string',\n offset: '(array|string|function)',\n popperConfig: '(null|object|function)',\n reference: '(string|element|object)'\n };\n /**\n * Class definition\n */\n\n class Dropdown extends BaseComponent {\n constructor(element, config) {\n super(element, config);\n this._popper = null;\n this._parent = this._element.parentNode; // dropdown wrapper\n // todo: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.2/forms/input-group/\n\n this._menu = SelectorEngine.next(this._element, SELECTOR_MENU)[0] || SelectorEngine.prev(this._element, SELECTOR_MENU)[0] || SelectorEngine.findOne(SELECTOR_MENU, this._parent);\n this._inNavbar = this._detectNavbar();\n } // Getters\n\n\n static get Default() {\n return Default$9;\n }\n\n static get DefaultType() {\n return DefaultType$9;\n }\n\n static get NAME() {\n return NAME$a;\n } // Public\n\n\n toggle() {\n return this._isShown() ? this.hide() : this.show();\n }\n\n show() {\n if (isDisabled(this._element) || this._isShown()) {\n return;\n }\n\n const relatedTarget = {\n relatedTarget: this._element\n };\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$5, relatedTarget);\n\n if (showEvent.defaultPrevented) {\n return;\n }\n\n this._createPopper(); // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n\n\n if ('ontouchstart' in document.documentElement && !this._parent.closest(SELECTOR_NAVBAR_NAV)) {\n for (const element of [].concat(...document.body.children)) {\n EventHandler.on(element, 'mouseover', noop);\n }\n }\n\n this._element.focus();\n\n this._element.setAttribute('aria-expanded', true);\n\n this._menu.classList.add(CLASS_NAME_SHOW$6);\n\n this._element.classList.add(CLASS_NAME_SHOW$6);\n\n EventHandler.trigger(this._element, EVENT_SHOWN$5, relatedTarget);\n }\n\n hide() {\n if (isDisabled(this._element) || !this._isShown()) {\n return;\n }\n\n const relatedTarget = {\n relatedTarget: this._element\n };\n\n this._completeHide(relatedTarget);\n }\n\n dispose() {\n if (this._popper) {\n this._popper.destroy();\n }\n\n super.dispose();\n }\n\n update() {\n this._inNavbar = this._detectNavbar();\n\n if (this._popper) {\n this._popper.update();\n }\n } // Private\n\n\n _completeHide(relatedTarget) {\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$5, relatedTarget);\n\n if (hideEvent.defaultPrevented) {\n return;\n } // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n\n\n if ('ontouchstart' in document.documentElement) {\n for (const element of [].concat(...document.body.children)) {\n EventHandler.off(element, 'mouseover', noop);\n }\n }\n\n if (this._popper) {\n this._popper.destroy();\n }\n\n this._menu.classList.remove(CLASS_NAME_SHOW$6);\n\n this._element.classList.remove(CLASS_NAME_SHOW$6);\n\n this._element.setAttribute('aria-expanded', 'false');\n\n Manipulator.removeDataAttribute(this._menu, 'popper');\n EventHandler.trigger(this._element, EVENT_HIDDEN$5, relatedTarget);\n }\n\n _getConfig(config) {\n config = super._getConfig(config);\n\n if (typeof config.reference === 'object' && !isElement$1(config.reference) && typeof config.reference.getBoundingClientRect !== 'function') {\n // Popper virtual elements require a getBoundingClientRect method\n throw new TypeError(`${NAME$a.toUpperCase()}: Option \"reference\" provided type \"object\" without a required \"getBoundingClientRect\" method.`);\n }\n\n return config;\n }\n\n _createPopper() {\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap\\'s dropdowns require Popper (https://popper.js.org)');\n }\n\n let referenceElement = this._element;\n\n if (this._config.reference === 'parent') {\n referenceElement = this._parent;\n } else if (isElement$1(this._config.reference)) {\n referenceElement = getElement(this._config.reference);\n } else if (typeof this._config.reference === 'object') {\n referenceElement = this._config.reference;\n }\n\n const popperConfig = this._getPopperConfig();\n\n this._popper = createPopper(referenceElement, this._menu, popperConfig);\n }\n\n _isShown() {\n return this._menu.classList.contains(CLASS_NAME_SHOW$6);\n }\n\n _getPlacement() {\n const parentDropdown = this._parent;\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPEND)) {\n return PLACEMENT_RIGHT;\n }\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPSTART)) {\n return PLACEMENT_LEFT;\n }\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPUP_CENTER)) {\n return PLACEMENT_TOPCENTER;\n }\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPDOWN_CENTER)) {\n return PLACEMENT_BOTTOMCENTER;\n } // We need to trim the value because custom properties can also include spaces\n\n\n const isEnd = getComputedStyle(this._menu).getPropertyValue('--bs-position').trim() === 'end';\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {\n return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP;\n }\n\n return isEnd ? PLACEMENT_BOTTOMEND : PLACEMENT_BOTTOM;\n }\n\n _detectNavbar() {\n return this._element.closest(SELECTOR_NAVBAR) !== null;\n }\n\n _getOffset() {\n const {\n offset\n } = this._config;\n\n if (typeof offset === 'string') {\n return offset.split(',').map(value => Number.parseInt(value, 10));\n }\n\n if (typeof offset === 'function') {\n return popperData => offset(popperData, this._element);\n }\n\n return offset;\n }\n\n _getPopperConfig() {\n const defaultBsPopperConfig = {\n placement: this._getPlacement(),\n modifiers: [{\n name: 'preventOverflow',\n options: {\n boundary: this._config.boundary\n }\n }, {\n name: 'offset',\n options: {\n offset: this._getOffset()\n }\n }]\n }; // Disable Popper if we have a static display or Dropdown is in Navbar\n\n if (this._inNavbar || this._config.display === 'static') {\n Manipulator.setDataAttribute(this._menu, 'popper', 'static'); // todo:v6 remove\n\n defaultBsPopperConfig.modifiers = [{\n name: 'applyStyles',\n enabled: false\n }];\n }\n\n return { ...defaultBsPopperConfig,\n ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)\n };\n }\n\n _selectMenuItem({\n key,\n target\n }) {\n const items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, this._menu).filter(element => isVisible(element));\n\n if (!items.length) {\n return;\n } // if target isn't included in items (e.g. when expanding the dropdown)\n // allow cycling to get the last item in case key equals ARROW_UP_KEY\n\n\n getNextActiveElement(items, target, key === ARROW_DOWN_KEY$1, !items.includes(target)).focus();\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Dropdown.getOrCreateInstance(this, config);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n });\n }\n\n static clearMenus(event) {\n if (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY$1) {\n return;\n }\n\n const openToggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE_SHOWN);\n\n for (const toggle of openToggles) {\n const context = Dropdown.getInstance(toggle);\n\n if (!context || context._config.autoClose === false) {\n continue;\n }\n\n const composedPath = event.composedPath();\n const isMenuTarget = composedPath.includes(context._menu);\n\n if (composedPath.includes(context._element) || context._config.autoClose === 'inside' && !isMenuTarget || context._config.autoClose === 'outside' && isMenuTarget) {\n continue;\n } // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu\n\n\n if (context._menu.contains(event.target) && (event.type === 'keyup' && event.key === TAB_KEY$1 || /input|select|option|textarea|form/i.test(event.target.tagName))) {\n continue;\n }\n\n const relatedTarget = {\n relatedTarget: context._element\n };\n\n if (event.type === 'click') {\n relatedTarget.clickEvent = event;\n }\n\n context._completeHide(relatedTarget);\n }\n }\n\n static dataApiKeydownHandler(event) {\n // If not an UP | DOWN | ESCAPE key => not a dropdown command\n // If input/textarea && if key is other than ESCAPE => not a dropdown command\n const isInput = /input|textarea/i.test(event.target.tagName);\n const isEscapeEvent = event.key === ESCAPE_KEY$2;\n const isUpOrDownEvent = [ARROW_UP_KEY$1, ARROW_DOWN_KEY$1].includes(event.key);\n\n if (!isUpOrDownEvent && !isEscapeEvent) {\n return;\n }\n\n if (isInput && !isEscapeEvent) {\n return;\n }\n\n event.preventDefault(); // todo: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.2/forms/input-group/\n\n const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0] || SelectorEngine.next(this, SELECTOR_DATA_TOGGLE$3)[0] || SelectorEngine.findOne(SELECTOR_DATA_TOGGLE$3, event.delegateTarget.parentNode);\n const instance = Dropdown.getOrCreateInstance(getToggleButton);\n\n if (isUpOrDownEvent) {\n event.stopPropagation();\n instance.show();\n\n instance._selectMenuItem(event);\n\n return;\n }\n\n if (instance._isShown()) {\n // else is escape and we check if it is shown\n event.stopPropagation();\n instance.hide();\n getToggleButton.focus();\n }\n }\n\n }\n /**\n * Data API implementation\n */\n\n\n EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE$3, Dropdown.dataApiKeydownHandler);\n EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler);\n EventHandler.on(document, EVENT_CLICK_DATA_API$3, Dropdown.clearMenus);\n EventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus);\n EventHandler.on(document, EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$3, function (event) {\n event.preventDefault();\n Dropdown.getOrCreateInstance(this).toggle();\n });\n /**\n * jQuery\n */\n\n defineJQueryPlugin(Dropdown);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): util/scrollBar.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';\n const SELECTOR_STICKY_CONTENT = '.sticky-top';\n const PROPERTY_PADDING = 'padding-right';\n const PROPERTY_MARGIN = 'margin-right';\n /**\n * Class definition\n */\n\n class ScrollBarHelper {\n constructor() {\n this._element = document.body;\n } // Public\n\n\n getWidth() {\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes\n const documentWidth = document.documentElement.clientWidth;\n return Math.abs(window.innerWidth - documentWidth);\n }\n\n hide() {\n const width = this.getWidth();\n\n this._disableOverFlow(); // give padding to element to balance the hidden scrollbar width\n\n\n this._setElementAttributes(this._element, PROPERTY_PADDING, calculatedValue => calculatedValue + width); // trick: We adjust positive paddingRight and negative marginRight to sticky-top elements to keep showing fullwidth\n\n\n this._setElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING, calculatedValue => calculatedValue + width);\n\n this._setElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN, calculatedValue => calculatedValue - width);\n }\n\n reset() {\n this._resetElementAttributes(this._element, 'overflow');\n\n this._resetElementAttributes(this._element, PROPERTY_PADDING);\n\n this._resetElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING);\n\n this._resetElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN);\n }\n\n isOverflowing() {\n return this.getWidth() > 0;\n } // Private\n\n\n _disableOverFlow() {\n this._saveInitialAttribute(this._element, 'overflow');\n\n this._element.style.overflow = 'hidden';\n }\n\n _setElementAttributes(selector, styleProperty, callback) {\n const scrollbarWidth = this.getWidth();\n\n const manipulationCallBack = element => {\n if (element !== this._element && window.innerWidth > element.clientWidth + scrollbarWidth) {\n return;\n }\n\n this._saveInitialAttribute(element, styleProperty);\n\n const calculatedValue = window.getComputedStyle(element).getPropertyValue(styleProperty);\n element.style.setProperty(styleProperty, `${callback(Number.parseFloat(calculatedValue))}px`);\n };\n\n this._applyManipulationCallback(selector, manipulationCallBack);\n }\n\n _saveInitialAttribute(element, styleProperty) {\n const actualValue = element.style.getPropertyValue(styleProperty);\n\n if (actualValue) {\n Manipulator.setDataAttribute(element, styleProperty, actualValue);\n }\n }\n\n _resetElementAttributes(selector, styleProperty) {\n const manipulationCallBack = element => {\n const value = Manipulator.getDataAttribute(element, styleProperty); // We only want to remove the property if the value is `null`; the value can also be zero\n\n if (value === null) {\n element.style.removeProperty(styleProperty);\n return;\n }\n\n Manipulator.removeDataAttribute(element, styleProperty);\n element.style.setProperty(styleProperty, value);\n };\n\n this._applyManipulationCallback(selector, manipulationCallBack);\n }\n\n _applyManipulationCallback(selector, callBack) {\n if (isElement$1(selector)) {\n callBack(selector);\n return;\n }\n\n for (const sel of SelectorEngine.find(selector, this._element)) {\n callBack(sel);\n }\n }\n\n }\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): util/backdrop.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$9 = 'backdrop';\n const CLASS_NAME_FADE$4 = 'fade';\n const CLASS_NAME_SHOW$5 = 'show';\n const EVENT_MOUSEDOWN = `mousedown.bs.${NAME$9}`;\n const Default$8 = {\n className: 'modal-backdrop',\n clickCallback: null,\n isAnimated: false,\n isVisible: true,\n // if false, we use the backdrop helper without adding any element to the dom\n rootElement: 'body' // give the choice to place backdrop under different elements\n\n };\n const DefaultType$8 = {\n className: 'string',\n clickCallback: '(function|null)',\n isAnimated: 'boolean',\n isVisible: 'boolean',\n rootElement: '(element|string)'\n };\n /**\n * Class definition\n */\n\n class Backdrop extends Config {\n constructor(config) {\n super();\n this._config = this._getConfig(config);\n this._isAppended = false;\n this._element = null;\n } // Getters\n\n\n static get Default() {\n return Default$8;\n }\n\n static get DefaultType() {\n return DefaultType$8;\n }\n\n static get NAME() {\n return NAME$9;\n } // Public\n\n\n show(callback) {\n if (!this._config.isVisible) {\n execute(callback);\n return;\n }\n\n this._append();\n\n const element = this._getElement();\n\n if (this._config.isAnimated) {\n reflow(element);\n }\n\n element.classList.add(CLASS_NAME_SHOW$5);\n\n this._emulateAnimation(() => {\n execute(callback);\n });\n }\n\n hide(callback) {\n if (!this._config.isVisible) {\n execute(callback);\n return;\n }\n\n this._getElement().classList.remove(CLASS_NAME_SHOW$5);\n\n this._emulateAnimation(() => {\n this.dispose();\n execute(callback);\n });\n }\n\n dispose() {\n if (!this._isAppended) {\n return;\n }\n\n EventHandler.off(this._element, EVENT_MOUSEDOWN);\n\n this._element.remove();\n\n this._isAppended = false;\n } // Private\n\n\n _getElement() {\n if (!this._element) {\n const backdrop = document.createElement('div');\n backdrop.className = this._config.className;\n\n if (this._config.isAnimated) {\n backdrop.classList.add(CLASS_NAME_FADE$4);\n }\n\n this._element = backdrop;\n }\n\n return this._element;\n }\n\n _configAfterMerge(config) {\n // use getElement() with the default \"body\" to get a fresh Element on each instantiation\n config.rootElement = getElement(config.rootElement);\n return config;\n }\n\n _append() {\n if (this._isAppended) {\n return;\n }\n\n const element = this._getElement();\n\n this._config.rootElement.append(element);\n\n EventHandler.on(element, EVENT_MOUSEDOWN, () => {\n execute(this._config.clickCallback);\n });\n this._isAppended = true;\n }\n\n _emulateAnimation(callback) {\n executeAfterTransition(callback, this._getElement(), this._config.isAnimated);\n }\n\n }\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): util/focustrap.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$8 = 'focustrap';\n const DATA_KEY$5 = 'bs.focustrap';\n const EVENT_KEY$5 = `.${DATA_KEY$5}`;\n const EVENT_FOCUSIN$2 = `focusin${EVENT_KEY$5}`;\n const EVENT_KEYDOWN_TAB = `keydown.tab${EVENT_KEY$5}`;\n const TAB_KEY = 'Tab';\n const TAB_NAV_FORWARD = 'forward';\n const TAB_NAV_BACKWARD = 'backward';\n const Default$7 = {\n autofocus: true,\n trapElement: null // The element to trap focus inside of\n\n };\n const DefaultType$7 = {\n autofocus: 'boolean',\n trapElement: 'element'\n };\n /**\n * Class definition\n */\n\n class FocusTrap extends Config {\n constructor(config) {\n super();\n this._config = this._getConfig(config);\n this._isActive = false;\n this._lastTabNavDirection = null;\n } // Getters\n\n\n static get Default() {\n return Default$7;\n }\n\n static get DefaultType() {\n return DefaultType$7;\n }\n\n static get NAME() {\n return NAME$8;\n } // Public\n\n\n activate() {\n if (this._isActive) {\n return;\n }\n\n if (this._config.autofocus) {\n this._config.trapElement.focus();\n }\n\n EventHandler.off(document, EVENT_KEY$5); // guard against infinite focus loop\n\n EventHandler.on(document, EVENT_FOCUSIN$2, event => this._handleFocusin(event));\n EventHandler.on(document, EVENT_KEYDOWN_TAB, event => this._handleKeydown(event));\n this._isActive = true;\n }\n\n deactivate() {\n if (!this._isActive) {\n return;\n }\n\n this._isActive = false;\n EventHandler.off(document, EVENT_KEY$5);\n } // Private\n\n\n _handleFocusin(event) {\n const {\n trapElement\n } = this._config;\n\n if (event.target === document || event.target === trapElement || trapElement.contains(event.target)) {\n return;\n }\n\n const elements = SelectorEngine.focusableChildren(trapElement);\n\n if (elements.length === 0) {\n trapElement.focus();\n } else if (this._lastTabNavDirection === TAB_NAV_BACKWARD) {\n elements[elements.length - 1].focus();\n } else {\n elements[0].focus();\n }\n }\n\n _handleKeydown(event) {\n if (event.key !== TAB_KEY) {\n return;\n }\n\n this._lastTabNavDirection = event.shiftKey ? TAB_NAV_BACKWARD : TAB_NAV_FORWARD;\n }\n\n }\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): modal.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$7 = 'modal';\n const DATA_KEY$4 = 'bs.modal';\n const EVENT_KEY$4 = `.${DATA_KEY$4}`;\n const DATA_API_KEY$2 = '.data-api';\n const ESCAPE_KEY$1 = 'Escape';\n const EVENT_HIDE$4 = `hide${EVENT_KEY$4}`;\n const EVENT_HIDE_PREVENTED$1 = `hidePrevented${EVENT_KEY$4}`;\n const EVENT_HIDDEN$4 = `hidden${EVENT_KEY$4}`;\n const EVENT_SHOW$4 = `show${EVENT_KEY$4}`;\n const EVENT_SHOWN$4 = `shown${EVENT_KEY$4}`;\n const EVENT_RESIZE$1 = `resize${EVENT_KEY$4}`;\n const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY$4}`;\n const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY$4}`;\n const EVENT_KEYDOWN_DISMISS$1 = `keydown.dismiss${EVENT_KEY$4}`;\n const EVENT_CLICK_DATA_API$2 = `click${EVENT_KEY$4}${DATA_API_KEY$2}`;\n const CLASS_NAME_OPEN = 'modal-open';\n const CLASS_NAME_FADE$3 = 'fade';\n const CLASS_NAME_SHOW$4 = 'show';\n const CLASS_NAME_STATIC = 'modal-static';\n const OPEN_SELECTOR$1 = '.modal.show';\n const SELECTOR_DIALOG = '.modal-dialog';\n const SELECTOR_MODAL_BODY = '.modal-body';\n const SELECTOR_DATA_TOGGLE$2 = '[data-bs-toggle=\"modal\"]';\n const Default$6 = {\n backdrop: true,\n focus: true,\n keyboard: true\n };\n const DefaultType$6 = {\n backdrop: '(boolean|string)',\n focus: 'boolean',\n keyboard: 'boolean'\n };\n /**\n * Class definition\n */\n\n class Modal extends BaseComponent {\n constructor(element, config) {\n super(element, config);\n this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, this._element);\n this._backdrop = this._initializeBackDrop();\n this._focustrap = this._initializeFocusTrap();\n this._isShown = false;\n this._isTransitioning = false;\n this._scrollBar = new ScrollBarHelper();\n\n this._addEventListeners();\n } // Getters\n\n\n static get Default() {\n return Default$6;\n }\n\n static get DefaultType() {\n return DefaultType$6;\n }\n\n static get NAME() {\n return NAME$7;\n } // Public\n\n\n toggle(relatedTarget) {\n return this._isShown ? this.hide() : this.show(relatedTarget);\n }\n\n show(relatedTarget) {\n if (this._isShown || this._isTransitioning) {\n return;\n }\n\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$4, {\n relatedTarget\n });\n\n if (showEvent.defaultPrevented) {\n return;\n }\n\n this._isShown = true;\n this._isTransitioning = true;\n\n this._scrollBar.hide();\n\n document.body.classList.add(CLASS_NAME_OPEN);\n\n this._adjustDialog();\n\n this._backdrop.show(() => this._showElement(relatedTarget));\n }\n\n hide() {\n if (!this._isShown || this._isTransitioning) {\n return;\n }\n\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$4);\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n this._isShown = false;\n this._isTransitioning = true;\n\n this._focustrap.deactivate();\n\n this._element.classList.remove(CLASS_NAME_SHOW$4);\n\n this._queueCallback(() => this._hideModal(), this._element, this._isAnimated());\n }\n\n dispose() {\n for (const htmlElement of [window, this._dialog]) {\n EventHandler.off(htmlElement, EVENT_KEY$4);\n }\n\n this._backdrop.dispose();\n\n this._focustrap.deactivate();\n\n super.dispose();\n }\n\n handleUpdate() {\n this._adjustDialog();\n } // Private\n\n\n _initializeBackDrop() {\n return new Backdrop({\n isVisible: Boolean(this._config.backdrop),\n // 'static' option will be translated to true, and booleans will keep their value,\n isAnimated: this._isAnimated()\n });\n }\n\n _initializeFocusTrap() {\n return new FocusTrap({\n trapElement: this._element\n });\n }\n\n _showElement(relatedTarget) {\n // try to append dynamic modal\n if (!document.body.contains(this._element)) {\n document.body.append(this._element);\n }\n\n this._element.style.display = 'block';\n\n this._element.removeAttribute('aria-hidden');\n\n this._element.setAttribute('aria-modal', true);\n\n this._element.setAttribute('role', 'dialog');\n\n this._element.scrollTop = 0;\n const modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog);\n\n if (modalBody) {\n modalBody.scrollTop = 0;\n }\n\n reflow(this._element);\n\n this._element.classList.add(CLASS_NAME_SHOW$4);\n\n const transitionComplete = () => {\n if (this._config.focus) {\n this._focustrap.activate();\n }\n\n this._isTransitioning = false;\n EventHandler.trigger(this._element, EVENT_SHOWN$4, {\n relatedTarget\n });\n };\n\n this._queueCallback(transitionComplete, this._dialog, this._isAnimated());\n }\n\n _addEventListeners() {\n EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS$1, event => {\n if (event.key !== ESCAPE_KEY$1) {\n return;\n }\n\n if (this._config.keyboard) {\n event.preventDefault();\n this.hide();\n return;\n }\n\n this._triggerBackdropTransition();\n });\n EventHandler.on(window, EVENT_RESIZE$1, () => {\n if (this._isShown && !this._isTransitioning) {\n this._adjustDialog();\n }\n });\n EventHandler.on(this._element, EVENT_MOUSEDOWN_DISMISS, event => {\n // a bad trick to segregate clicks that may start inside dialog but end outside, and avoid listen to scrollbar clicks\n EventHandler.one(this._element, EVENT_CLICK_DISMISS, event2 => {\n if (this._element !== event.target || this._element !== event2.target) {\n return;\n }\n\n if (this._config.backdrop === 'static') {\n this._triggerBackdropTransition();\n\n return;\n }\n\n if (this._config.backdrop) {\n this.hide();\n }\n });\n });\n }\n\n _hideModal() {\n this._element.style.display = 'none';\n\n this._element.setAttribute('aria-hidden', true);\n\n this._element.removeAttribute('aria-modal');\n\n this._element.removeAttribute('role');\n\n this._isTransitioning = false;\n\n this._backdrop.hide(() => {\n document.body.classList.remove(CLASS_NAME_OPEN);\n\n this._resetAdjustments();\n\n this._scrollBar.reset();\n\n EventHandler.trigger(this._element, EVENT_HIDDEN$4);\n });\n }\n\n _isAnimated() {\n return this._element.classList.contains(CLASS_NAME_FADE$3);\n }\n\n _triggerBackdropTransition() {\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED$1);\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;\n const initialOverflowY = this._element.style.overflowY; // return if the following background transition hasn't yet completed\n\n if (initialOverflowY === 'hidden' || this._element.classList.contains(CLASS_NAME_STATIC)) {\n return;\n }\n\n if (!isModalOverflowing) {\n this._element.style.overflowY = 'hidden';\n }\n\n this._element.classList.add(CLASS_NAME_STATIC);\n\n this._queueCallback(() => {\n this._element.classList.remove(CLASS_NAME_STATIC);\n\n this._queueCallback(() => {\n this._element.style.overflowY = initialOverflowY;\n }, this._dialog);\n }, this._dialog);\n\n this._element.focus();\n }\n /**\n * The following methods are used to handle overflowing modals\n */\n\n\n _adjustDialog() {\n const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;\n\n const scrollbarWidth = this._scrollBar.getWidth();\n\n const isBodyOverflowing = scrollbarWidth > 0;\n\n if (isBodyOverflowing && !isModalOverflowing) {\n const property = isRTL() ? 'paddingLeft' : 'paddingRight';\n this._element.style[property] = `${scrollbarWidth}px`;\n }\n\n if (!isBodyOverflowing && isModalOverflowing) {\n const property = isRTL() ? 'paddingRight' : 'paddingLeft';\n this._element.style[property] = `${scrollbarWidth}px`;\n }\n }\n\n _resetAdjustments() {\n this._element.style.paddingLeft = '';\n this._element.style.paddingRight = '';\n } // Static\n\n\n static jQueryInterface(config, relatedTarget) {\n return this.each(function () {\n const data = Modal.getOrCreateInstance(this, config);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config](relatedTarget);\n });\n }\n\n }\n /**\n * Data API implementation\n */\n\n\n EventHandler.on(document, EVENT_CLICK_DATA_API$2, SELECTOR_DATA_TOGGLE$2, function (event) {\n const target = getElementFromSelector(this);\n\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault();\n }\n\n EventHandler.one(target, EVENT_SHOW$4, showEvent => {\n if (showEvent.defaultPrevented) {\n // only register focus restorer if modal will actually get shown\n return;\n }\n\n EventHandler.one(target, EVENT_HIDDEN$4, () => {\n if (isVisible(this)) {\n this.focus();\n }\n });\n }); // avoid conflict when clicking modal toggler while another one is open\n\n const alreadyOpen = SelectorEngine.findOne(OPEN_SELECTOR$1);\n\n if (alreadyOpen) {\n Modal.getInstance(alreadyOpen).hide();\n }\n\n const data = Modal.getOrCreateInstance(target);\n data.toggle(this);\n });\n enableDismissTrigger(Modal);\n /**\n * jQuery\n */\n\n defineJQueryPlugin(Modal);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): offcanvas.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$6 = 'offcanvas';\n const DATA_KEY$3 = 'bs.offcanvas';\n const EVENT_KEY$3 = `.${DATA_KEY$3}`;\n const DATA_API_KEY$1 = '.data-api';\n const EVENT_LOAD_DATA_API$2 = `load${EVENT_KEY$3}${DATA_API_KEY$1}`;\n const ESCAPE_KEY = 'Escape';\n const CLASS_NAME_SHOW$3 = 'show';\n const CLASS_NAME_SHOWING$1 = 'showing';\n const CLASS_NAME_HIDING = 'hiding';\n const CLASS_NAME_BACKDROP = 'offcanvas-backdrop';\n const OPEN_SELECTOR = '.offcanvas.show';\n const EVENT_SHOW$3 = `show${EVENT_KEY$3}`;\n const EVENT_SHOWN$3 = `shown${EVENT_KEY$3}`;\n const EVENT_HIDE$3 = `hide${EVENT_KEY$3}`;\n const EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY$3}`;\n const EVENT_HIDDEN$3 = `hidden${EVENT_KEY$3}`;\n const EVENT_RESIZE = `resize${EVENT_KEY$3}`;\n const EVENT_CLICK_DATA_API$1 = `click${EVENT_KEY$3}${DATA_API_KEY$1}`;\n const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY$3}`;\n const SELECTOR_DATA_TOGGLE$1 = '[data-bs-toggle=\"offcanvas\"]';\n const Default$5 = {\n backdrop: true,\n keyboard: true,\n scroll: false\n };\n const DefaultType$5 = {\n backdrop: '(boolean|string)',\n keyboard: 'boolean',\n scroll: 'boolean'\n };\n /**\n * Class definition\n */\n\n class Offcanvas extends BaseComponent {\n constructor(element, config) {\n super(element, config);\n this._isShown = false;\n this._backdrop = this._initializeBackDrop();\n this._focustrap = this._initializeFocusTrap();\n\n this._addEventListeners();\n } // Getters\n\n\n static get Default() {\n return Default$5;\n }\n\n static get DefaultType() {\n return DefaultType$5;\n }\n\n static get NAME() {\n return NAME$6;\n } // Public\n\n\n toggle(relatedTarget) {\n return this._isShown ? this.hide() : this.show(relatedTarget);\n }\n\n show(relatedTarget) {\n if (this._isShown) {\n return;\n }\n\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$3, {\n relatedTarget\n });\n\n if (showEvent.defaultPrevented) {\n return;\n }\n\n this._isShown = true;\n\n this._backdrop.show();\n\n if (!this._config.scroll) {\n new ScrollBarHelper().hide();\n }\n\n this._element.setAttribute('aria-modal', true);\n\n this._element.setAttribute('role', 'dialog');\n\n this._element.classList.add(CLASS_NAME_SHOWING$1);\n\n const completeCallBack = () => {\n if (!this._config.scroll || this._config.backdrop) {\n this._focustrap.activate();\n }\n\n this._element.classList.add(CLASS_NAME_SHOW$3);\n\n this._element.classList.remove(CLASS_NAME_SHOWING$1);\n\n EventHandler.trigger(this._element, EVENT_SHOWN$3, {\n relatedTarget\n });\n };\n\n this._queueCallback(completeCallBack, this._element, true);\n }\n\n hide() {\n if (!this._isShown) {\n return;\n }\n\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$3);\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n this._focustrap.deactivate();\n\n this._element.blur();\n\n this._isShown = false;\n\n this._element.classList.add(CLASS_NAME_HIDING);\n\n this._backdrop.hide();\n\n const completeCallback = () => {\n this._element.classList.remove(CLASS_NAME_SHOW$3, CLASS_NAME_HIDING);\n\n this._element.removeAttribute('aria-modal');\n\n this._element.removeAttribute('role');\n\n if (!this._config.scroll) {\n new ScrollBarHelper().reset();\n }\n\n EventHandler.trigger(this._element, EVENT_HIDDEN$3);\n };\n\n this._queueCallback(completeCallback, this._element, true);\n }\n\n dispose() {\n this._backdrop.dispose();\n\n this._focustrap.deactivate();\n\n super.dispose();\n } // Private\n\n\n _initializeBackDrop() {\n const clickCallback = () => {\n if (this._config.backdrop === 'static') {\n EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);\n return;\n }\n\n this.hide();\n }; // 'static' option will be translated to true, and booleans will keep their value\n\n\n const isVisible = Boolean(this._config.backdrop);\n return new Backdrop({\n className: CLASS_NAME_BACKDROP,\n isVisible,\n isAnimated: true,\n rootElement: this._element.parentNode,\n clickCallback: isVisible ? clickCallback : null\n });\n }\n\n _initializeFocusTrap() {\n return new FocusTrap({\n trapElement: this._element\n });\n }\n\n _addEventListeners() {\n EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => {\n if (event.key !== ESCAPE_KEY) {\n return;\n }\n\n if (!this._config.keyboard) {\n EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);\n return;\n }\n\n this.hide();\n });\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Offcanvas.getOrCreateInstance(this, config);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config](this);\n });\n }\n\n }\n /**\n * Data API implementation\n */\n\n\n EventHandler.on(document, EVENT_CLICK_DATA_API$1, SELECTOR_DATA_TOGGLE$1, function (event) {\n const target = getElementFromSelector(this);\n\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault();\n }\n\n if (isDisabled(this)) {\n return;\n }\n\n EventHandler.one(target, EVENT_HIDDEN$3, () => {\n // focus on trigger when it is closed\n if (isVisible(this)) {\n this.focus();\n }\n }); // avoid conflict when clicking a toggler of an offcanvas, while another is open\n\n const alreadyOpen = SelectorEngine.findOne(OPEN_SELECTOR);\n\n if (alreadyOpen && alreadyOpen !== target) {\n Offcanvas.getInstance(alreadyOpen).hide();\n }\n\n const data = Offcanvas.getOrCreateInstance(target);\n data.toggle(this);\n });\n EventHandler.on(window, EVENT_LOAD_DATA_API$2, () => {\n for (const selector of SelectorEngine.find(OPEN_SELECTOR)) {\n Offcanvas.getOrCreateInstance(selector).show();\n }\n });\n EventHandler.on(window, EVENT_RESIZE, () => {\n for (const element of SelectorEngine.find('[aria-modal][class*=show][class*=offcanvas-]')) {\n if (getComputedStyle(element).position !== 'fixed') {\n Offcanvas.getOrCreateInstance(element).hide();\n }\n }\n });\n enableDismissTrigger(Offcanvas);\n /**\n * jQuery\n */\n\n defineJQueryPlugin(Offcanvas);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): util/sanitizer.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n const uriAttributes = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']);\n const ARIA_ATTRIBUTE_PATTERN = /^aria-[\\w-]*$/i;\n /**\n * A pattern that recognizes a commonly useful subset of URLs that are safe.\n *\n * Shout-out to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts\n */\n\n const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i;\n /**\n * A pattern that matches safe data URLs. Only matches image, video and audio types.\n *\n * Shout-out to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts\n */\n\n const DATA_URL_PATTERN = /^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[\\d+/a-z]+=*$/i;\n\n const allowedAttribute = (attribute, allowedAttributeList) => {\n const attributeName = attribute.nodeName.toLowerCase();\n\n if (allowedAttributeList.includes(attributeName)) {\n if (uriAttributes.has(attributeName)) {\n return Boolean(SAFE_URL_PATTERN.test(attribute.nodeValue) || DATA_URL_PATTERN.test(attribute.nodeValue));\n }\n\n return true;\n } // Check if a regular expression validates the attribute.\n\n\n return allowedAttributeList.filter(attributeRegex => attributeRegex instanceof RegExp).some(regex => regex.test(attributeName));\n };\n\n const DefaultAllowlist = {\n // Global attributes allowed on any supplied element below.\n '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],\n a: ['target', 'href', 'title', 'rel'],\n area: [],\n b: [],\n br: [],\n col: [],\n code: [],\n div: [],\n em: [],\n hr: [],\n h1: [],\n h2: [],\n h3: [],\n h4: [],\n h5: [],\n h6: [],\n i: [],\n img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],\n li: [],\n ol: [],\n p: [],\n pre: [],\n s: [],\n small: [],\n span: [],\n sub: [],\n sup: [],\n strong: [],\n u: [],\n ul: []\n };\n function sanitizeHtml(unsafeHtml, allowList, sanitizeFunction) {\n if (!unsafeHtml.length) {\n return unsafeHtml;\n }\n\n if (sanitizeFunction && typeof sanitizeFunction === 'function') {\n return sanitizeFunction(unsafeHtml);\n }\n\n const domParser = new window.DOMParser();\n const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');\n const elements = [].concat(...createdDocument.body.querySelectorAll('*'));\n\n for (const element of elements) {\n const elementName = element.nodeName.toLowerCase();\n\n if (!Object.keys(allowList).includes(elementName)) {\n element.remove();\n continue;\n }\n\n const attributeList = [].concat(...element.attributes);\n const allowedAttributes = [].concat(allowList['*'] || [], allowList[elementName] || []);\n\n for (const attribute of attributeList) {\n if (!allowedAttribute(attribute, allowedAttributes)) {\n element.removeAttribute(attribute.nodeName);\n }\n }\n }\n\n return createdDocument.body.innerHTML;\n }\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): util/template-factory.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$5 = 'TemplateFactory';\n const Default$4 = {\n allowList: DefaultAllowlist,\n content: {},\n // { selector : text , selector2 : text2 , }\n extraClass: '',\n html: false,\n sanitize: true,\n sanitizeFn: null,\n template: '<div></div>'\n };\n const DefaultType$4 = {\n allowList: 'object',\n content: 'object',\n extraClass: '(string|function)',\n html: 'boolean',\n sanitize: 'boolean',\n sanitizeFn: '(null|function)',\n template: 'string'\n };\n const DefaultContentType = {\n entry: '(string|element|function|null)',\n selector: '(string|element)'\n };\n /**\n * Class definition\n */\n\n class TemplateFactory extends Config {\n constructor(config) {\n super();\n this._config = this._getConfig(config);\n } // Getters\n\n\n static get Default() {\n return Default$4;\n }\n\n static get DefaultType() {\n return DefaultType$4;\n }\n\n static get NAME() {\n return NAME$5;\n } // Public\n\n\n getContent() {\n return Object.values(this._config.content).map(config => this._resolvePossibleFunction(config)).filter(Boolean);\n }\n\n hasContent() {\n return this.getContent().length > 0;\n }\n\n changeContent(content) {\n this._checkContent(content);\n\n this._config.content = { ...this._config.content,\n ...content\n };\n return this;\n }\n\n toHtml() {\n const templateWrapper = document.createElement('div');\n templateWrapper.innerHTML = this._maybeSanitize(this._config.template);\n\n for (const [selector, text] of Object.entries(this._config.content)) {\n this._setContent(templateWrapper, text, selector);\n }\n\n const template = templateWrapper.children[0];\n\n const extraClass = this._resolvePossibleFunction(this._config.extraClass);\n\n if (extraClass) {\n template.classList.add(...extraClass.split(' '));\n }\n\n return template;\n } // Private\n\n\n _typeCheckConfig(config) {\n super._typeCheckConfig(config);\n\n this._checkContent(config.content);\n }\n\n _checkContent(arg) {\n for (const [selector, content] of Object.entries(arg)) {\n super._typeCheckConfig({\n selector,\n entry: content\n }, DefaultContentType);\n }\n }\n\n _setContent(template, content, selector) {\n const templateElement = SelectorEngine.findOne(selector, template);\n\n if (!templateElement) {\n return;\n }\n\n content = this._resolvePossibleFunction(content);\n\n if (!content) {\n templateElement.remove();\n return;\n }\n\n if (isElement$1(content)) {\n this._putElementInTemplate(getElement(content), templateElement);\n\n return;\n }\n\n if (this._config.html) {\n templateElement.innerHTML = this._maybeSanitize(content);\n return;\n }\n\n templateElement.textContent = content;\n }\n\n _maybeSanitize(arg) {\n return this._config.sanitize ? sanitizeHtml(arg, this._config.allowList, this._config.sanitizeFn) : arg;\n }\n\n _resolvePossibleFunction(arg) {\n return typeof arg === 'function' ? arg(this) : arg;\n }\n\n _putElementInTemplate(element, templateElement) {\n if (this._config.html) {\n templateElement.innerHTML = '';\n templateElement.append(element);\n return;\n }\n\n templateElement.textContent = element.textContent;\n }\n\n }\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): tooltip.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$4 = 'tooltip';\n const DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn']);\n const CLASS_NAME_FADE$2 = 'fade';\n const CLASS_NAME_MODAL = 'modal';\n const CLASS_NAME_SHOW$2 = 'show';\n const SELECTOR_TOOLTIP_INNER = '.tooltip-inner';\n const SELECTOR_MODAL = `.${CLASS_NAME_MODAL}`;\n const EVENT_MODAL_HIDE = 'hide.bs.modal';\n const TRIGGER_HOVER = 'hover';\n const TRIGGER_FOCUS = 'focus';\n const TRIGGER_CLICK = 'click';\n const TRIGGER_MANUAL = 'manual';\n const EVENT_HIDE$2 = 'hide';\n const EVENT_HIDDEN$2 = 'hidden';\n const EVENT_SHOW$2 = 'show';\n const EVENT_SHOWN$2 = 'shown';\n const EVENT_INSERTED = 'inserted';\n const EVENT_CLICK$1 = 'click';\n const EVENT_FOCUSIN$1 = 'focusin';\n const EVENT_FOCUSOUT$1 = 'focusout';\n const EVENT_MOUSEENTER = 'mouseenter';\n const EVENT_MOUSELEAVE = 'mouseleave';\n const AttachmentMap = {\n AUTO: 'auto',\n TOP: 'top',\n RIGHT: isRTL() ? 'left' : 'right',\n BOTTOM: 'bottom',\n LEFT: isRTL() ? 'right' : 'left'\n };\n const Default$3 = {\n allowList: DefaultAllowlist,\n animation: true,\n boundary: 'clippingParents',\n container: false,\n customClass: '',\n delay: 0,\n fallbackPlacements: ['top', 'right', 'bottom', 'left'],\n html: false,\n offset: [0, 0],\n placement: 'top',\n popperConfig: null,\n sanitize: true,\n sanitizeFn: null,\n selector: false,\n template: '<div class=\"tooltip\" role=\"tooltip\">' + '<div class=\"tooltip-arrow\"></div>' + '<div class=\"tooltip-inner\"></div>' + '</div>',\n title: '',\n trigger: 'hover focus'\n };\n const DefaultType$3 = {\n allowList: 'object',\n animation: 'boolean',\n boundary: '(string|element)',\n container: '(string|element|boolean)',\n customClass: '(string|function)',\n delay: '(number|object)',\n fallbackPlacements: 'array',\n html: 'boolean',\n offset: '(array|string|function)',\n placement: '(string|function)',\n popperConfig: '(null|object|function)',\n sanitize: 'boolean',\n sanitizeFn: '(null|function)',\n selector: '(string|boolean)',\n template: 'string',\n title: '(string|element|function)',\n trigger: 'string'\n };\n /**\n * Class definition\n */\n\n class Tooltip extends BaseComponent {\n constructor(element, config) {\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap\\'s tooltips require Popper (https://popper.js.org)');\n }\n\n super(element, config); // Private\n\n this._isEnabled = true;\n this._timeout = 0;\n this._isHovered = null;\n this._activeTrigger = {};\n this._popper = null;\n this._templateFactory = null;\n this._newContent = null; // Protected\n\n this.tip = null;\n\n this._setListeners();\n\n if (!this._config.selector) {\n this._fixTitle();\n }\n } // Getters\n\n\n static get Default() {\n return Default$3;\n }\n\n static get DefaultType() {\n return DefaultType$3;\n }\n\n static get NAME() {\n return NAME$4;\n } // Public\n\n\n enable() {\n this._isEnabled = true;\n }\n\n disable() {\n this._isEnabled = false;\n }\n\n toggleEnabled() {\n this._isEnabled = !this._isEnabled;\n }\n\n toggle() {\n if (!this._isEnabled) {\n return;\n }\n\n this._activeTrigger.click = !this._activeTrigger.click;\n\n if (this._isShown()) {\n this._leave();\n\n return;\n }\n\n this._enter();\n }\n\n dispose() {\n clearTimeout(this._timeout);\n EventHandler.off(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);\n\n if (this._element.getAttribute('data-bs-original-title')) {\n this._element.setAttribute('title', this._element.getAttribute('data-bs-original-title'));\n }\n\n this._disposePopper();\n\n super.dispose();\n }\n\n show() {\n if (this._element.style.display === 'none') {\n throw new Error('Please use show on visible elements');\n }\n\n if (!(this._isWithContent() && this._isEnabled)) {\n return;\n }\n\n const showEvent = EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOW$2));\n const shadowRoot = findShadowRoot(this._element);\n\n const isInTheDom = (shadowRoot || this._element.ownerDocument.documentElement).contains(this._element);\n\n if (showEvent.defaultPrevented || !isInTheDom) {\n return;\n } // todo v6 remove this OR make it optional\n\n\n this._disposePopper();\n\n const tip = this._getTipElement();\n\n this._element.setAttribute('aria-describedby', tip.getAttribute('id'));\n\n const {\n container\n } = this._config;\n\n if (!this._element.ownerDocument.documentElement.contains(this.tip)) {\n container.append(tip);\n EventHandler.trigger(this._element, this.constructor.eventName(EVENT_INSERTED));\n }\n\n this._popper = this._createPopper(tip);\n tip.classList.add(CLASS_NAME_SHOW$2); // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n\n if ('ontouchstart' in document.documentElement) {\n for (const element of [].concat(...document.body.children)) {\n EventHandler.on(element, 'mouseover', noop);\n }\n }\n\n const complete = () => {\n EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOWN$2));\n\n if (this._isHovered === false) {\n this._leave();\n }\n\n this._isHovered = false;\n };\n\n this._queueCallback(complete, this.tip, this._isAnimated());\n }\n\n hide() {\n if (!this._isShown()) {\n return;\n }\n\n const hideEvent = EventHandler.trigger(this._element, this.constructor.eventName(EVENT_HIDE$2));\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n const tip = this._getTipElement();\n\n tip.classList.remove(CLASS_NAME_SHOW$2); // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n\n if ('ontouchstart' in document.documentElement) {\n for (const element of [].concat(...document.body.children)) {\n EventHandler.off(element, 'mouseover', noop);\n }\n }\n\n this._activeTrigger[TRIGGER_CLICK] = false;\n this._activeTrigger[TRIGGER_FOCUS] = false;\n this._activeTrigger[TRIGGER_HOVER] = false;\n this._isHovered = null; // it is a trick to support manual triggering\n\n const complete = () => {\n if (this._isWithActiveTrigger()) {\n return;\n }\n\n if (!this._isHovered) {\n this._disposePopper();\n }\n\n this._element.removeAttribute('aria-describedby');\n\n EventHandler.trigger(this._element, this.constructor.eventName(EVENT_HIDDEN$2));\n };\n\n this._queueCallback(complete, this.tip, this._isAnimated());\n }\n\n update() {\n if (this._popper) {\n this._popper.update();\n }\n } // Protected\n\n\n _isWithContent() {\n return Boolean(this._getTitle());\n }\n\n _getTipElement() {\n if (!this.tip) {\n this.tip = this._createTipElement(this._newContent || this._getContentForTemplate());\n }\n\n return this.tip;\n }\n\n _createTipElement(content) {\n const tip = this._getTemplateFactory(content).toHtml(); // todo: remove this check on v6\n\n\n if (!tip) {\n return null;\n }\n\n tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$2); // todo: on v6 the following can be achieved with CSS only\n\n tip.classList.add(`bs-${this.constructor.NAME}-auto`);\n const tipId = getUID(this.constructor.NAME).toString();\n tip.setAttribute('id', tipId);\n\n if (this._isAnimated()) {\n tip.classList.add(CLASS_NAME_FADE$2);\n }\n\n return tip;\n }\n\n setContent(content) {\n this._newContent = content;\n\n if (this._isShown()) {\n this._disposePopper();\n\n this.show();\n }\n }\n\n _getTemplateFactory(content) {\n if (this._templateFactory) {\n this._templateFactory.changeContent(content);\n } else {\n this._templateFactory = new TemplateFactory({ ...this._config,\n // the `content` var has to be after `this._config`\n // to override config.content in case of popover\n content,\n extraClass: this._resolvePossibleFunction(this._config.customClass)\n });\n }\n\n return this._templateFactory;\n }\n\n _getContentForTemplate() {\n return {\n [SELECTOR_TOOLTIP_INNER]: this._getTitle()\n };\n }\n\n _getTitle() {\n return this._resolvePossibleFunction(this._config.title) || this._element.getAttribute('data-bs-original-title');\n } // Private\n\n\n _initializeOnDelegatedTarget(event) {\n return this.constructor.getOrCreateInstance(event.delegateTarget, this._getDelegateConfig());\n }\n\n _isAnimated() {\n return this._config.animation || this.tip && this.tip.classList.contains(CLASS_NAME_FADE$2);\n }\n\n _isShown() {\n return this.tip && this.tip.classList.contains(CLASS_NAME_SHOW$2);\n }\n\n _createPopper(tip) {\n const placement = typeof this._config.placement === 'function' ? this._config.placement.call(this, tip, this._element) : this._config.placement;\n const attachment = AttachmentMap[placement.toUpperCase()];\n return createPopper(this._element, tip, this._getPopperConfig(attachment));\n }\n\n _getOffset() {\n const {\n offset\n } = this._config;\n\n if (typeof offset === 'string') {\n return offset.split(',').map(value => Number.parseInt(value, 10));\n }\n\n if (typeof offset === 'function') {\n return popperData => offset(popperData, this._element);\n }\n\n return offset;\n }\n\n _resolvePossibleFunction(arg) {\n return typeof arg === 'function' ? arg.call(this._element) : arg;\n }\n\n _getPopperConfig(attachment) {\n const defaultBsPopperConfig = {\n placement: attachment,\n modifiers: [{\n name: 'flip',\n options: {\n fallbackPlacements: this._config.fallbackPlacements\n }\n }, {\n name: 'offset',\n options: {\n offset: this._getOffset()\n }\n }, {\n name: 'preventOverflow',\n options: {\n boundary: this._config.boundary\n }\n }, {\n name: 'arrow',\n options: {\n element: `.${this.constructor.NAME}-arrow`\n }\n }, {\n name: 'preSetPlacement',\n enabled: true,\n phase: 'beforeMain',\n fn: data => {\n // Pre-set Popper's placement attribute in order to read the arrow sizes properly.\n // Otherwise, Popper mixes up the width and height dimensions since the initial arrow style is for top placement\n this._getTipElement().setAttribute('data-popper-placement', data.state.placement);\n }\n }]\n };\n return { ...defaultBsPopperConfig,\n ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)\n };\n }\n\n _setListeners() {\n const triggers = this._config.trigger.split(' ');\n\n for (const trigger of triggers) {\n if (trigger === 'click') {\n EventHandler.on(this._element, this.constructor.eventName(EVENT_CLICK$1), this._config.selector, event => {\n const context = this._initializeOnDelegatedTarget(event);\n\n context.toggle();\n });\n } else if (trigger !== TRIGGER_MANUAL) {\n const eventIn = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSEENTER) : this.constructor.eventName(EVENT_FOCUSIN$1);\n const eventOut = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSELEAVE) : this.constructor.eventName(EVENT_FOCUSOUT$1);\n EventHandler.on(this._element, eventIn, this._config.selector, event => {\n const context = this._initializeOnDelegatedTarget(event);\n\n context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;\n\n context._enter();\n });\n EventHandler.on(this._element, eventOut, this._config.selector, event => {\n const context = this._initializeOnDelegatedTarget(event);\n\n context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = context._element.contains(event.relatedTarget);\n\n context._leave();\n });\n }\n }\n\n this._hideModalHandler = () => {\n if (this._element) {\n this.hide();\n }\n };\n\n EventHandler.on(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);\n }\n\n _fixTitle() {\n const title = this._element.getAttribute('title');\n\n if (!title) {\n return;\n }\n\n if (!this._element.getAttribute('aria-label') && !this._element.textContent.trim()) {\n this._element.setAttribute('aria-label', title);\n }\n\n this._element.setAttribute('data-bs-original-title', title); // DO NOT USE IT. Is only for backwards compatibility\n\n\n this._element.removeAttribute('title');\n }\n\n _enter() {\n if (this._isShown() || this._isHovered) {\n this._isHovered = true;\n return;\n }\n\n this._isHovered = true;\n\n this._setTimeout(() => {\n if (this._isHovered) {\n this.show();\n }\n }, this._config.delay.show);\n }\n\n _leave() {\n if (this._isWithActiveTrigger()) {\n return;\n }\n\n this._isHovered = false;\n\n this._setTimeout(() => {\n if (!this._isHovered) {\n this.hide();\n }\n }, this._config.delay.hide);\n }\n\n _setTimeout(handler, timeout) {\n clearTimeout(this._timeout);\n this._timeout = setTimeout(handler, timeout);\n }\n\n _isWithActiveTrigger() {\n return Object.values(this._activeTrigger).includes(true);\n }\n\n _getConfig(config) {\n const dataAttributes = Manipulator.getDataAttributes(this._element);\n\n for (const dataAttribute of Object.keys(dataAttributes)) {\n if (DISALLOWED_ATTRIBUTES.has(dataAttribute)) {\n delete dataAttributes[dataAttribute];\n }\n }\n\n config = { ...dataAttributes,\n ...(typeof config === 'object' && config ? config : {})\n };\n config = this._mergeConfigObj(config);\n config = this._configAfterMerge(config);\n\n this._typeCheckConfig(config);\n\n return config;\n }\n\n _configAfterMerge(config) {\n config.container = config.container === false ? document.body : getElement(config.container);\n\n if (typeof config.delay === 'number') {\n config.delay = {\n show: config.delay,\n hide: config.delay\n };\n }\n\n if (typeof config.title === 'number') {\n config.title = config.title.toString();\n }\n\n if (typeof config.content === 'number') {\n config.content = config.content.toString();\n }\n\n return config;\n }\n\n _getDelegateConfig() {\n const config = {};\n\n for (const key in this._config) {\n if (this.constructor.Default[key] !== this._config[key]) {\n config[key] = this._config[key];\n }\n }\n\n config.selector = false;\n config.trigger = 'manual'; // In the future can be replaced with:\n // const keysWithDifferentValues = Object.entries(this._config).filter(entry => this.constructor.Default[entry[0]] !== this._config[entry[0]])\n // `Object.fromEntries(keysWithDifferentValues)`\n\n return config;\n }\n\n _disposePopper() {\n if (this._popper) {\n this._popper.destroy();\n\n this._popper = null;\n }\n\n if (this.tip) {\n this.tip.remove();\n this.tip = null;\n }\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Tooltip.getOrCreateInstance(this, config);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n });\n }\n\n }\n /**\n * jQuery\n */\n\n\n defineJQueryPlugin(Tooltip);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): popover.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$3 = 'popover';\n const SELECTOR_TITLE = '.popover-header';\n const SELECTOR_CONTENT = '.popover-body';\n const Default$2 = { ...Tooltip.Default,\n content: '',\n offset: [0, 8],\n placement: 'right',\n template: '<div class=\"popover\" role=\"tooltip\">' + '<div class=\"popover-arrow\"></div>' + '<h3 class=\"popover-header\"></h3>' + '<div class=\"popover-body\"></div>' + '</div>',\n trigger: 'click'\n };\n const DefaultType$2 = { ...Tooltip.DefaultType,\n content: '(null|string|element|function)'\n };\n /**\n * Class definition\n */\n\n class Popover extends Tooltip {\n // Getters\n static get Default() {\n return Default$2;\n }\n\n static get DefaultType() {\n return DefaultType$2;\n }\n\n static get NAME() {\n return NAME$3;\n } // Overrides\n\n\n _isWithContent() {\n return this._getTitle() || this._getContent();\n } // Private\n\n\n _getContentForTemplate() {\n return {\n [SELECTOR_TITLE]: this._getTitle(),\n [SELECTOR_CONTENT]: this._getContent()\n };\n }\n\n _getContent() {\n return this._resolvePossibleFunction(this._config.content);\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Popover.getOrCreateInstance(this, config);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n });\n }\n\n }\n /**\n * jQuery\n */\n\n\n defineJQueryPlugin(Popover);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): scrollspy.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$2 = 'scrollspy';\n const DATA_KEY$2 = 'bs.scrollspy';\n const EVENT_KEY$2 = `.${DATA_KEY$2}`;\n const DATA_API_KEY = '.data-api';\n const EVENT_ACTIVATE = `activate${EVENT_KEY$2}`;\n const EVENT_CLICK = `click${EVENT_KEY$2}`;\n const EVENT_LOAD_DATA_API$1 = `load${EVENT_KEY$2}${DATA_API_KEY}`;\n const CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item';\n const CLASS_NAME_ACTIVE$1 = 'active';\n const SELECTOR_DATA_SPY = '[data-bs-spy=\"scroll\"]';\n const SELECTOR_TARGET_LINKS = '[href]';\n const SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';\n const SELECTOR_NAV_LINKS = '.nav-link';\n const SELECTOR_NAV_ITEMS = '.nav-item';\n const SELECTOR_LIST_ITEMS = '.list-group-item';\n const SELECTOR_LINK_ITEMS = `${SELECTOR_NAV_LINKS}, ${SELECTOR_NAV_ITEMS} > ${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}`;\n const SELECTOR_DROPDOWN = '.dropdown';\n const SELECTOR_DROPDOWN_TOGGLE$1 = '.dropdown-toggle';\n const Default$1 = {\n offset: null,\n // TODO: v6 @deprecated, keep it for backwards compatibility reasons\n rootMargin: '0px 0px -25%',\n smoothScroll: false,\n target: null,\n threshold: [0.1, 0.5, 1]\n };\n const DefaultType$1 = {\n offset: '(number|null)',\n // TODO v6 @deprecated, keep it for backwards compatibility reasons\n rootMargin: 'string',\n smoothScroll: 'boolean',\n target: 'element',\n threshold: 'array'\n };\n /**\n * Class definition\n */\n\n class ScrollSpy extends BaseComponent {\n constructor(element, config) {\n super(element, config); // this._element is the observablesContainer and config.target the menu links wrapper\n\n this._targetLinks = new Map();\n this._observableSections = new Map();\n this._rootElement = getComputedStyle(this._element).overflowY === 'visible' ? null : this._element;\n this._activeTarget = null;\n this._observer = null;\n this._previousScrollData = {\n visibleEntryTop: 0,\n parentScrollTop: 0\n };\n this.refresh(); // initialize\n } // Getters\n\n\n static get Default() {\n return Default$1;\n }\n\n static get DefaultType() {\n return DefaultType$1;\n }\n\n static get NAME() {\n return NAME$2;\n } // Public\n\n\n refresh() {\n this._initializeTargetsAndObservables();\n\n this._maybeEnableSmoothScroll();\n\n if (this._observer) {\n this._observer.disconnect();\n } else {\n this._observer = this._getNewObserver();\n }\n\n for (const section of this._observableSections.values()) {\n this._observer.observe(section);\n }\n }\n\n dispose() {\n this._observer.disconnect();\n\n super.dispose();\n } // Private\n\n\n _configAfterMerge(config) {\n // TODO: on v6 target should be given explicitly & remove the {target: 'ss-target'} case\n config.target = getElement(config.target) || document.body; // TODO: v6 Only for backwards compatibility reasons. Use rootMargin only\n\n config.rootMargin = config.offset ? `${config.offset}px 0px -30%` : config.rootMargin;\n\n if (typeof config.threshold === 'string') {\n config.threshold = config.threshold.split(',').map(value => Number.parseFloat(value));\n }\n\n return config;\n }\n\n _maybeEnableSmoothScroll() {\n if (!this._config.smoothScroll) {\n return;\n } // unregister any previous listeners\n\n\n EventHandler.off(this._config.target, EVENT_CLICK);\n EventHandler.on(this._config.target, EVENT_CLICK, SELECTOR_TARGET_LINKS, event => {\n const observableSection = this._observableSections.get(event.target.hash);\n\n if (observableSection) {\n event.preventDefault();\n const root = this._rootElement || window;\n const height = observableSection.offsetTop - this._element.offsetTop;\n\n if (root.scrollTo) {\n root.scrollTo({\n top: height,\n behavior: 'smooth'\n });\n return;\n } // Chrome 60 doesn't support `scrollTo`\n\n\n root.scrollTop = height;\n }\n });\n }\n\n _getNewObserver() {\n const options = {\n root: this._rootElement,\n threshold: this._config.threshold,\n rootMargin: this._config.rootMargin\n };\n return new IntersectionObserver(entries => this._observerCallback(entries), options);\n } // The logic of selection\n\n\n _observerCallback(entries) {\n const targetElement = entry => this._targetLinks.get(`#${entry.target.id}`);\n\n const activate = entry => {\n this._previousScrollData.visibleEntryTop = entry.target.offsetTop;\n\n this._process(targetElement(entry));\n };\n\n const parentScrollTop = (this._rootElement || document.documentElement).scrollTop;\n const userScrollsDown = parentScrollTop >= this._previousScrollData.parentScrollTop;\n this._previousScrollData.parentScrollTop = parentScrollTop;\n\n for (const entry of entries) {\n if (!entry.isIntersecting) {\n this._activeTarget = null;\n\n this._clearActiveClass(targetElement(entry));\n\n continue;\n }\n\n const entryIsLowerThanPrevious = entry.target.offsetTop >= this._previousScrollData.visibleEntryTop; // if we are scrolling down, pick the bigger offsetTop\n\n if (userScrollsDown && entryIsLowerThanPrevious) {\n activate(entry); // if parent isn't scrolled, let's keep the first visible item, breaking the iteration\n\n if (!parentScrollTop) {\n return;\n }\n\n continue;\n } // if we are scrolling up, pick the smallest offsetTop\n\n\n if (!userScrollsDown && !entryIsLowerThanPrevious) {\n activate(entry);\n }\n }\n }\n\n _initializeTargetsAndObservables() {\n this._targetLinks = new Map();\n this._observableSections = new Map();\n const targetLinks = SelectorEngine.find(SELECTOR_TARGET_LINKS, this._config.target);\n\n for (const anchor of targetLinks) {\n // ensure that the anchor has an id and is not disabled\n if (!anchor.hash || isDisabled(anchor)) {\n continue;\n }\n\n const observableSection = SelectorEngine.findOne(anchor.hash, this._element); // ensure that the observableSection exists & is visible\n\n if (isVisible(observableSection)) {\n this._targetLinks.set(anchor.hash, anchor);\n\n this._observableSections.set(anchor.hash, observableSection);\n }\n }\n }\n\n _process(target) {\n if (this._activeTarget === target) {\n return;\n }\n\n this._clearActiveClass(this._config.target);\n\n this._activeTarget = target;\n target.classList.add(CLASS_NAME_ACTIVE$1);\n\n this._activateParents(target);\n\n EventHandler.trigger(this._element, EVENT_ACTIVATE, {\n relatedTarget: target\n });\n }\n\n _activateParents(target) {\n // Activate dropdown parents\n if (target.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {\n SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE$1, target.closest(SELECTOR_DROPDOWN)).classList.add(CLASS_NAME_ACTIVE$1);\n return;\n }\n\n for (const listGroup of SelectorEngine.parents(target, SELECTOR_NAV_LIST_GROUP)) {\n // Set triggered links parents as active\n // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor\n for (const item of SelectorEngine.prev(listGroup, SELECTOR_LINK_ITEMS)) {\n item.classList.add(CLASS_NAME_ACTIVE$1);\n }\n }\n }\n\n _clearActiveClass(parent) {\n parent.classList.remove(CLASS_NAME_ACTIVE$1);\n const activeNodes = SelectorEngine.find(`${SELECTOR_TARGET_LINKS}.${CLASS_NAME_ACTIVE$1}`, parent);\n\n for (const node of activeNodes) {\n node.classList.remove(CLASS_NAME_ACTIVE$1);\n }\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = ScrollSpy.getOrCreateInstance(this, config);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n });\n }\n\n }\n /**\n * Data API implementation\n */\n\n\n EventHandler.on(window, EVENT_LOAD_DATA_API$1, () => {\n for (const spy of SelectorEngine.find(SELECTOR_DATA_SPY)) {\n ScrollSpy.getOrCreateInstance(spy);\n }\n });\n /**\n * jQuery\n */\n\n defineJQueryPlugin(ScrollSpy);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): tab.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$1 = 'tab';\n const DATA_KEY$1 = 'bs.tab';\n const EVENT_KEY$1 = `.${DATA_KEY$1}`;\n const EVENT_HIDE$1 = `hide${EVENT_KEY$1}`;\n const EVENT_HIDDEN$1 = `hidden${EVENT_KEY$1}`;\n const EVENT_SHOW$1 = `show${EVENT_KEY$1}`;\n const EVENT_SHOWN$1 = `shown${EVENT_KEY$1}`;\n const EVENT_CLICK_DATA_API = `click${EVENT_KEY$1}`;\n const EVENT_KEYDOWN = `keydown${EVENT_KEY$1}`;\n const EVENT_LOAD_DATA_API = `load${EVENT_KEY$1}`;\n const ARROW_LEFT_KEY = 'ArrowLeft';\n const ARROW_RIGHT_KEY = 'ArrowRight';\n const ARROW_UP_KEY = 'ArrowUp';\n const ARROW_DOWN_KEY = 'ArrowDown';\n const CLASS_NAME_ACTIVE = 'active';\n const CLASS_NAME_FADE$1 = 'fade';\n const CLASS_NAME_SHOW$1 = 'show';\n const CLASS_DROPDOWN = 'dropdown';\n const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';\n const SELECTOR_DROPDOWN_MENU = '.dropdown-menu';\n const NOT_SELECTOR_DROPDOWN_TOGGLE = ':not(.dropdown-toggle)';\n const SELECTOR_TAB_PANEL = '.list-group, .nav, [role=\"tablist\"]';\n const SELECTOR_OUTER = '.nav-item, .list-group-item';\n const SELECTOR_INNER = `.nav-link${NOT_SELECTOR_DROPDOWN_TOGGLE}, .list-group-item${NOT_SELECTOR_DROPDOWN_TOGGLE}, [role=\"tab\"]${NOT_SELECTOR_DROPDOWN_TOGGLE}`;\n const SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"tab\"], [data-bs-toggle=\"pill\"], [data-bs-toggle=\"list\"]'; // todo:v6: could be only `tab`\n\n const SELECTOR_INNER_ELEM = `${SELECTOR_INNER}, ${SELECTOR_DATA_TOGGLE}`;\n const SELECTOR_DATA_TOGGLE_ACTIVE = `.${CLASS_NAME_ACTIVE}[data-bs-toggle=\"tab\"], .${CLASS_NAME_ACTIVE}[data-bs-toggle=\"pill\"], .${CLASS_NAME_ACTIVE}[data-bs-toggle=\"list\"]`;\n /**\n * Class definition\n */\n\n class Tab extends BaseComponent {\n constructor(element) {\n super(element);\n this._parent = this._element.closest(SELECTOR_TAB_PANEL);\n\n if (!this._parent) {\n return; // todo: should Throw exception on v6\n // throw new TypeError(`${element.outerHTML} has not a valid parent ${SELECTOR_INNER_ELEM}`)\n } // Set up initial aria attributes\n\n\n this._setInitialAttributes(this._parent, this._getChildren());\n\n EventHandler.on(this._element, EVENT_KEYDOWN, event => this._keydown(event));\n } // Getters\n\n\n static get NAME() {\n return NAME$1;\n } // Public\n\n\n show() {\n // Shows this elem and deactivate the active sibling if exists\n const innerElem = this._element;\n\n if (this._elemIsActive(innerElem)) {\n return;\n } // Search for active tab on same parent to deactivate it\n\n\n const active = this._getActiveElem();\n\n const hideEvent = active ? EventHandler.trigger(active, EVENT_HIDE$1, {\n relatedTarget: innerElem\n }) : null;\n const showEvent = EventHandler.trigger(innerElem, EVENT_SHOW$1, {\n relatedTarget: active\n });\n\n if (showEvent.defaultPrevented || hideEvent && hideEvent.defaultPrevented) {\n return;\n }\n\n this._deactivate(active, innerElem);\n\n this._activate(innerElem, active);\n } // Private\n\n\n _activate(element, relatedElem) {\n if (!element) {\n return;\n }\n\n element.classList.add(CLASS_NAME_ACTIVE);\n\n this._activate(getElementFromSelector(element)); // Search and activate/show the proper section\n\n\n const complete = () => {\n if (element.getAttribute('role') !== 'tab') {\n element.classList.add(CLASS_NAME_SHOW$1);\n return;\n }\n\n element.removeAttribute('tabindex');\n element.setAttribute('aria-selected', true);\n\n this._toggleDropDown(element, true);\n\n EventHandler.trigger(element, EVENT_SHOWN$1, {\n relatedTarget: relatedElem\n });\n };\n\n this._queueCallback(complete, element, element.classList.contains(CLASS_NAME_FADE$1));\n }\n\n _deactivate(element, relatedElem) {\n if (!element) {\n return;\n }\n\n element.classList.remove(CLASS_NAME_ACTIVE);\n element.blur();\n\n this._deactivate(getElementFromSelector(element)); // Search and deactivate the shown section too\n\n\n const complete = () => {\n if (element.getAttribute('role') !== 'tab') {\n element.classList.remove(CLASS_NAME_SHOW$1);\n return;\n }\n\n element.setAttribute('aria-selected', false);\n element.setAttribute('tabindex', '-1');\n\n this._toggleDropDown(element, false);\n\n EventHandler.trigger(element, EVENT_HIDDEN$1, {\n relatedTarget: relatedElem\n });\n };\n\n this._queueCallback(complete, element, element.classList.contains(CLASS_NAME_FADE$1));\n }\n\n _keydown(event) {\n if (![ARROW_LEFT_KEY, ARROW_RIGHT_KEY, ARROW_UP_KEY, ARROW_DOWN_KEY].includes(event.key)) {\n return;\n }\n\n event.stopPropagation(); // stopPropagation/preventDefault both added to support up/down keys without scrolling the page\n\n event.preventDefault();\n const isNext = [ARROW_RIGHT_KEY, ARROW_DOWN_KEY].includes(event.key);\n const nextActiveElement = getNextActiveElement(this._getChildren().filter(element => !isDisabled(element)), event.target, isNext, true);\n\n if (nextActiveElement) {\n nextActiveElement.focus({\n preventScroll: true\n });\n Tab.getOrCreateInstance(nextActiveElement).show();\n }\n }\n\n _getChildren() {\n // collection of inner elements\n return SelectorEngine.find(SELECTOR_INNER_ELEM, this._parent);\n }\n\n _getActiveElem() {\n return this._getChildren().find(child => this._elemIsActive(child)) || null;\n }\n\n _setInitialAttributes(parent, children) {\n this._setAttributeIfNotExists(parent, 'role', 'tablist');\n\n for (const child of children) {\n this._setInitialAttributesOnChild(child);\n }\n }\n\n _setInitialAttributesOnChild(child) {\n child = this._getInnerElement(child);\n\n const isActive = this._elemIsActive(child);\n\n const outerElem = this._getOuterElement(child);\n\n child.setAttribute('aria-selected', isActive);\n\n if (outerElem !== child) {\n this._setAttributeIfNotExists(outerElem, 'role', 'presentation');\n }\n\n if (!isActive) {\n child.setAttribute('tabindex', '-1');\n }\n\n this._setAttributeIfNotExists(child, 'role', 'tab'); // set attributes to the related panel too\n\n\n this._setInitialAttributesOnTargetPanel(child);\n }\n\n _setInitialAttributesOnTargetPanel(child) {\n const target = getElementFromSelector(child);\n\n if (!target) {\n return;\n }\n\n this._setAttributeIfNotExists(target, 'role', 'tabpanel');\n\n if (child.id) {\n this._setAttributeIfNotExists(target, 'aria-labelledby', `#${child.id}`);\n }\n }\n\n _toggleDropDown(element, open) {\n const outerElem = this._getOuterElement(element);\n\n if (!outerElem.classList.contains(CLASS_DROPDOWN)) {\n return;\n }\n\n const toggle = (selector, className) => {\n const element = SelectorEngine.findOne(selector, outerElem);\n\n if (element) {\n element.classList.toggle(className, open);\n }\n };\n\n toggle(SELECTOR_DROPDOWN_TOGGLE, CLASS_NAME_ACTIVE);\n toggle(SELECTOR_DROPDOWN_MENU, CLASS_NAME_SHOW$1);\n outerElem.setAttribute('aria-expanded', open);\n }\n\n _setAttributeIfNotExists(element, attribute, value) {\n if (!element.hasAttribute(attribute)) {\n element.setAttribute(attribute, value);\n }\n }\n\n _elemIsActive(elem) {\n return elem.classList.contains(CLASS_NAME_ACTIVE);\n } // Try to get the inner element (usually the .nav-link)\n\n\n _getInnerElement(elem) {\n return elem.matches(SELECTOR_INNER_ELEM) ? elem : SelectorEngine.findOne(SELECTOR_INNER_ELEM, elem);\n } // Try to get the outer element (usually the .nav-item)\n\n\n _getOuterElement(elem) {\n return elem.closest(SELECTOR_OUTER) || elem;\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Tab.getOrCreateInstance(this);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n });\n }\n\n }\n /**\n * Data API implementation\n */\n\n\n EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault();\n }\n\n if (isDisabled(this)) {\n return;\n }\n\n Tab.getOrCreateInstance(this).show();\n });\n /**\n * Initialize on focus\n */\n\n EventHandler.on(window, EVENT_LOAD_DATA_API, () => {\n for (const element of SelectorEngine.find(SELECTOR_DATA_TOGGLE_ACTIVE)) {\n Tab.getOrCreateInstance(element);\n }\n });\n /**\n * jQuery\n */\n\n defineJQueryPlugin(Tab);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): toast.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME = 'toast';\n const DATA_KEY = 'bs.toast';\n const EVENT_KEY = `.${DATA_KEY}`;\n const EVENT_MOUSEOVER = `mouseover${EVENT_KEY}`;\n const EVENT_MOUSEOUT = `mouseout${EVENT_KEY}`;\n const EVENT_FOCUSIN = `focusin${EVENT_KEY}`;\n const EVENT_FOCUSOUT = `focusout${EVENT_KEY}`;\n const EVENT_HIDE = `hide${EVENT_KEY}`;\n const EVENT_HIDDEN = `hidden${EVENT_KEY}`;\n const EVENT_SHOW = `show${EVENT_KEY}`;\n const EVENT_SHOWN = `shown${EVENT_KEY}`;\n const CLASS_NAME_FADE = 'fade';\n const CLASS_NAME_HIDE = 'hide'; // @deprecated - kept here only for backwards compatibility\n\n const CLASS_NAME_SHOW = 'show';\n const CLASS_NAME_SHOWING = 'showing';\n const DefaultType = {\n animation: 'boolean',\n autohide: 'boolean',\n delay: 'number'\n };\n const Default = {\n animation: true,\n autohide: true,\n delay: 5000\n };\n /**\n * Class definition\n */\n\n class Toast extends BaseComponent {\n constructor(element, config) {\n super(element, config);\n this._timeout = null;\n this._hasMouseInteraction = false;\n this._hasKeyboardInteraction = false;\n\n this._setListeners();\n } // Getters\n\n\n static get Default() {\n return Default;\n }\n\n static get DefaultType() {\n return DefaultType;\n }\n\n static get NAME() {\n return NAME;\n } // Public\n\n\n show() {\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW);\n\n if (showEvent.defaultPrevented) {\n return;\n }\n\n this._clearTimeout();\n\n if (this._config.animation) {\n this._element.classList.add(CLASS_NAME_FADE);\n }\n\n const complete = () => {\n this._element.classList.remove(CLASS_NAME_SHOWING);\n\n EventHandler.trigger(this._element, EVENT_SHOWN);\n\n this._maybeScheduleHide();\n };\n\n this._element.classList.remove(CLASS_NAME_HIDE); // @deprecated\n\n\n reflow(this._element);\n\n this._element.classList.add(CLASS_NAME_SHOW, CLASS_NAME_SHOWING);\n\n this._queueCallback(complete, this._element, this._config.animation);\n }\n\n hide() {\n if (!this.isShown()) {\n return;\n }\n\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE);\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n const complete = () => {\n this._element.classList.add(CLASS_NAME_HIDE); // @deprecated\n\n\n this._element.classList.remove(CLASS_NAME_SHOWING, CLASS_NAME_SHOW);\n\n EventHandler.trigger(this._element, EVENT_HIDDEN);\n };\n\n this._element.classList.add(CLASS_NAME_SHOWING);\n\n this._queueCallback(complete, this._element, this._config.animation);\n }\n\n dispose() {\n this._clearTimeout();\n\n if (this.isShown()) {\n this._element.classList.remove(CLASS_NAME_SHOW);\n }\n\n super.dispose();\n }\n\n isShown() {\n return this._element.classList.contains(CLASS_NAME_SHOW);\n } // Private\n\n\n _maybeScheduleHide() {\n if (!this._config.autohide) {\n return;\n }\n\n if (this._hasMouseInteraction || this._hasKeyboardInteraction) {\n return;\n }\n\n this._timeout = setTimeout(() => {\n this.hide();\n }, this._config.delay);\n }\n\n _onInteraction(event, isInteracting) {\n switch (event.type) {\n case 'mouseover':\n case 'mouseout':\n {\n this._hasMouseInteraction = isInteracting;\n break;\n }\n\n case 'focusin':\n case 'focusout':\n {\n this._hasKeyboardInteraction = isInteracting;\n break;\n }\n }\n\n if (isInteracting) {\n this._clearTimeout();\n\n return;\n }\n\n const nextElement = event.relatedTarget;\n\n if (this._element === nextElement || this._element.contains(nextElement)) {\n return;\n }\n\n this._maybeScheduleHide();\n }\n\n _setListeners() {\n EventHandler.on(this._element, EVENT_MOUSEOVER, event => this._onInteraction(event, true));\n EventHandler.on(this._element, EVENT_MOUSEOUT, event => this._onInteraction(event, false));\n EventHandler.on(this._element, EVENT_FOCUSIN, event => this._onInteraction(event, true));\n EventHandler.on(this._element, EVENT_FOCUSOUT, event => this._onInteraction(event, false));\n }\n\n _clearTimeout() {\n clearTimeout(this._timeout);\n this._timeout = null;\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Toast.getOrCreateInstance(this, config);\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config](this);\n }\n });\n }\n\n }\n /**\n * Data API implementation\n */\n\n\n enableDismissTrigger(Toast);\n /**\n * jQuery\n */\n\n defineJQueryPlugin(Toast);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): index.umd.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n const index_umd = {\n Alert,\n Button,\n Carousel,\n Collapse,\n Dropdown,\n Modal,\n Offcanvas,\n Popover,\n ScrollSpy,\n Tab,\n Toast,\n Tooltip\n };\n\n return index_umd;\n\n}));\n//# sourceMappingURL=bootstrap.bundle.js.map\n","import { noop, safe_not_equal, subscribe, run_all, is_function } from '../internal/index.mjs';\nexport { get_store_value as get } from '../internal/index.mjs';\n\nconst subscriber_queue = [];\n/**\n * Creates a `Readable` store that allows reading by subscription.\n * @param value initial value\n * @param {StartStopNotifier}start start and stop notifications for subscriptions\n */\nfunction readable(value, start) {\n return {\n subscribe: writable(value, start).subscribe\n };\n}\n/**\n * Create a `Writable` store that allows both updating and reading by subscription.\n * @param {*=}value initial value\n * @param {StartStopNotifier=}start start and stop notifications for subscriptions\n */\nfunction writable(value, start = noop) {\n let stop;\n const subscribers = new Set();\n function set(new_value) {\n if (safe_not_equal(value, new_value)) {\n value = new_value;\n if (stop) { // store is ready\n const run_queue = !subscriber_queue.length;\n for (const subscriber of subscribers) {\n subscriber[1]();\n subscriber_queue.push(subscriber, value);\n }\n if (run_queue) {\n for (let i = 0; i < subscriber_queue.length; i += 2) {\n subscriber_queue[i][0](subscriber_queue[i + 1]);\n }\n subscriber_queue.length = 0;\n }\n }\n }\n }\n function update(fn) {\n set(fn(value));\n }\n function subscribe(run, invalidate = noop) {\n const subscriber = [run, invalidate];\n subscribers.add(subscriber);\n if (subscribers.size === 1) {\n stop = start(set) || noop;\n }\n run(value);\n return () => {\n subscribers.delete(subscriber);\n if (subscribers.size === 0) {\n stop();\n stop = null;\n }\n };\n }\n return { set, update, subscribe };\n}\nfunction derived(stores, fn, initial_value) {\n const single = !Array.isArray(stores);\n const stores_array = single\n ? [stores]\n : stores;\n const auto = fn.length < 2;\n return readable(initial_value, (set) => {\n let inited = false;\n const values = [];\n let pending = 0;\n let cleanup = noop;\n const sync = () => {\n if (pending) {\n return;\n }\n cleanup();\n const result = fn(single ? values[0] : values, set);\n if (auto) {\n set(result);\n }\n else {\n cleanup = is_function(result) ? result : noop;\n }\n };\n const unsubscribers = stores_array.map((store, i) => subscribe(store, (value) => {\n values[i] = value;\n pending &= ~(1 << i);\n if (inited) {\n sync();\n }\n }, () => {\n pending |= (1 << i);\n }));\n inited = true;\n sync();\n return function stop() {\n run_all(unsubscribers);\n cleanup();\n };\n });\n}\n\nexport { derived, readable, writable };\n","/*!\n * escape-html\n * Copyright(c) 2012-2013 TJ Holowaychuk\n * Copyright(c) 2015 Andreas Lubbe\n * Copyright(c) 2015 Tiancheng \"Timothy\" Gu\n * MIT Licensed\n */\n\n'use strict';\n\n/**\n * Module variables.\n * @private\n */\n\nvar matchHtmlRegExp = /[\"'&<>]/;\n\n/**\n * Module exports.\n * @public\n */\n\nmodule.exports = escapeHtml;\n\n/**\n * Escape special characters in the given string of html.\n *\n * @param {string} string The string to escape for inserting into HTML\n * @return {string}\n * @public\n */\n\nfunction escapeHtml(string) {\n var str = '' + string;\n var match = matchHtmlRegExp.exec(str);\n\n if (!match) {\n return str;\n }\n\n var escape;\n var html = '';\n var index = 0;\n var lastIndex = 0;\n\n for (index = match.index; index < str.length; index++) {\n switch (str.charCodeAt(index)) {\n case 34: // \"\n escape = '"';\n break;\n case 38: // &\n escape = '&';\n break;\n case 39: // '\n escape = ''';\n break;\n case 60: // <\n escape = '<';\n break;\n case 62: // >\n escape = '>';\n break;\n default:\n continue;\n }\n\n if (lastIndex !== index) {\n html += str.substring(lastIndex, index);\n }\n\n lastIndex = index + 1;\n html += escape;\n }\n\n return lastIndex !== index\n ? html + str.substring(lastIndex, index)\n : html;\n}\n","import escapeHtml from 'escape-html';\n\nexport function formatOSMType(sType, bExcludeExternal) {\n if (sType === 'N') return 'node';\n if (sType === 'W') return 'way';\n if (sType === 'R') return 'relation';\n\n if (!bExcludeExternal) return '';\n\n if (sType === 'T') return 'way';\n if (sType === 'I') return 'way';\n\n return '';\n}\n\n// https://www.openstreetmap.org/relation/123 => ['R', 123]\n// w123 => ['W', 123]\nexport function identifyLinkInQuery(query) {\n if (!query) return undefined;\n const m = query.match(/\\/(relation|way|node)\\/(\\d+)/) || query.match(/^([nwr])(\\d+)$/i);\n if (!m) return undefined;\n return [m[1][0].toUpperCase(), Number(m[2])];\n}\n\nexport function osmLink(aPlace) {\n if (!aPlace.osm_type) return '';\n var sOSMType = formatOSMType(aPlace.osm_type, false);\n if (!sOSMType) return '';\n\n return '<a href=\"https://www.openstreetmap.org/' + sOSMType + '/' + aPlace.osm_id + '\">' + sOSMType + ' ' + aPlace.osm_id + '</a>';\n}\n\nexport function formatLabel(aPlace) {\n if (aPlace.label) return aPlace.label;\n\n function capitalize(s) {\n return s && s[0].toUpperCase() + s.slice(1);\n }\n\n if (aPlace.type && aPlace.type === 'yes' && aPlace.category) {\n return capitalize(aPlace.category.replace(/_/g, ' '));\n }\n if (aPlace.type) {\n return capitalize(aPlace.type.replace(/_/g, ' '));\n }\n return '';\n}\n\n/* en:London_Borough_of_Redbridge => https://en.wikipedia.org/wiki/London_Borough_of_Redbridge */\nexport function wikipediaLink(aPlace) {\n if (!aPlace.calculated_wikipedia) return '';\n\n var parts = aPlace.calculated_wikipedia.split(':', 2);\n\n var sTitle = escapeHtml(aPlace.calculated_wikipedia);\n var sLanguage = escapeHtml(parts[0]);\n var sArticle = escapeHtml(parts[1]);\n\n return '<a href=\"https://' + sLanguage + '.wikipedia.org/wiki/' + sArticle + '\" target=\"_blank\">' + sTitle + '</a>';\n}\n\nexport function coverageType(aPlace) {\n return (aPlace.isarea ? 'Polygon' : 'Point');\n}\n\nexport function isAdminBoundary(aPlace) {\n return aPlace.category === 'boundary' && aPlace.type === 'administrative';\n}\n\nexport function formatAddressRank(iRank) {\n if (iRank < 4) return 'other';\n if (iRank < 6) return 'country';\n if (iRank < 8) return 'region';\n if (iRank < 10) return 'state';\n if (iRank < 12) return 'state district';\n if (iRank < 14) return 'county';\n if (iRank < 16) return 'municipality';\n if (iRank < 18) return 'city / town / village';\n if (iRank < 20) return 'city / village district';\n if (iRank < 22) return 'suburb / hamlet';\n if (iRank < 24) return 'neighbourhood';\n if (iRank < 26) return 'city block / square';\n if (iRank === 26) return 'major street';\n if (iRank === 27) return 'minory street / path';\n if (iRank <= 30) return 'house / building';\n return 'other';\n}\n\nexport function formatPlaceType(aPlace) {\n var sOut = aPlace.class + ':' + aPlace.type;\n if (aPlace.type && aPlace.type === 'administrative' && aPlace.place_type) {\n sOut = sOut + ' (' + aPlace.place_type + ')';\n }\n return escapeHtml(sOut);\n}\n\n// Any over 15 are invalid data in OSM anyway\nexport function formatAdminLevel(iLevel) {\n return (iLevel && iLevel < 15 ? iLevel : '');\n}\n\nexport function formatDistance(fDistance, bInMeters) {\n if (bInMeters) {\n if (fDistance < 1) return '0';\n var sFormatted = (fDistance >= 1000)\n ? Math.round(fDistance / 1000, 1) + ' km'\n : Math.round(fDistance, 0) + ' m';\n\n return '<abbr class=\"distance\" title=\"' + fDistance + ' meters\">~' + sFormatted + '</abbr>';\n }\n\n // spheric distance, http://postgis.net/docs/ST_Distance_Spheroid.html\n if (fDistance === 0) return '0';\n\n return '<abbr class=\"distance\" title=\"spheric distance ' + fDistance + '\">~'\n + (Math.round(fDistance * 1000, 4) / 1000)\n + '</abbr>';\n}\n\n// mark partial tokens (those starting with a space) with a star for readability\nexport function formatKeywordToken(sToken) {\n return (sToken[0] === ' ' ? '*' : '') + escapeHtml(sToken);\n}\n\nexport function zoomLevels() {\n const aZoomLevels = [\n /* 0 */ 'Continent / Sea',\n /* 1 */ '',\n /* 2 */ '',\n /* 3 */ 'Country',\n /* 4 */ '',\n /* 5 */ 'State',\n /* 6 */ 'Region',\n /* 7 */ '',\n /* 8 */ 'County',\n /* 9 */ '',\n /* 10 */ 'City',\n /* 11 */ '',\n /* 12 */ 'Town / Village',\n /* 13 */ '',\n /* 14 */ 'Suburb',\n /* 15 */ '',\n /* 16 */ 'Street',\n /* 17 */ '',\n /* 18 */ 'Building',\n /* 19 */ '',\n /* 20 */ '',\n /* 21 */ ''\n ];\n return aZoomLevels;\n}\n","import { writable } from 'svelte/store';\nimport { identifyLinkInQuery } from './helpers.js';\n\nexport const map_store = writable();\nexport const results_store = writable();\nexport const last_api_request_url_store = writable();\nexport const error_store = writable();\nexport const page = writable();\n\n/**\n * Update the global page state.\n *\n * When called without a parameter, then the current window.location is\n * parsed and the page state is set accordingly. Otherwise the page state\n * is set from the parameters. 'pagename' is the overall subpage (without\n * .html extension). 'params' must be an URLSearchParams object and contain\n * the requested query parameters. It may also be omitted completely for a\n * link without query parameters.\n */\nconst default_pagename = Nominatim_Config.Reverse_Only ? 'reverse' : 'search';\nconst pagenames = [\n default_pagename,\n 'reverse',\n 'details',\n 'deletable',\n 'polygons',\n 'status',\n 'about'\n];\n\nexport function refresh_page(pagename, params) {\n if (typeof pagename === 'undefined') {\n pagename = window.location.pathname.replace('.html', '').replace(/^.*\\//, '');\n\n if (!pagenames.includes(pagename)) pagename = default_pagename;\n\n params = new URLSearchParams(window.location.search);\n } else {\n if (!pagenames.includes(pagename)) pagename = default_pagename;\n\n if (typeof params === 'undefined') {\n params = new URLSearchParams();\n }\n\n let param_str = params.toString();\n if (param_str) {\n param_str = '?' + param_str;\n }\n let new_url = pagename + '.html' + param_str;\n\n if (window.location.protocol.match(/^http/)) {\n window.history.pushState([], '', new_url);\n } else {\n window.location.href = new_url;\n }\n }\n\n if (pagename === 'search' && params.has('q')) {\n const arrTypeAndId = identifyLinkInQuery(params.get('q'));\n if (arrTypeAndId instanceof Array) {\n pagename = 'details';\n params = new URLSearchParams();\n params.set('osmtype', arrTypeAndId[0]);\n params.set('osmid', arrTypeAndId[1]);\n }\n }\n\n page.set({ tab: pagename, params: params });\n last_api_request_url_store.set(null);\n error_store.set(null);\n}\n","<style>\n footer {\n clear: both;\n font-size: 0.8em;\n text-align: center;\n }\n footer p {\n margin: 1em;\n }\n</style>\n\n<footer>\n <p class=\"disclaimer\">\n Addresses and postcodes are approximate\n </p>\n <p class=\"copyright\">\n © <a href=\"https://osm.org/copyright\">OpenStreetMap</a> contributors\n </p>\n</footer>\n","import { last_api_request_url_store, error_store } from './stores.js';\n\nfunction api_request_progress(status) {\n var loading_el = document.getElementById('loading');\n if (!loading_el) return; // might not be on page yet\n\n loading_el.style.display = (status === 'start') ? 'block' : null;\n}\n\nexport async function fetch_from_api(endpoint_name, params, callback) {\n var api_url = generate_nominatim_api_url(endpoint_name, params);\n\n // For the test suite:\n // If httpbin_status URL parameter is set we call https://httpbin.org/#/Status_codes\n var tmp_params = new URLSearchParams(window.location.search);\n if (tmp_params && tmp_params.get('httpbin_status')) {\n api_url = 'https://httpbin.org/status/' + parseInt(tmp_params.get('httpbin_status'), 10);\n }\n\n api_request_progress('start');\n if (endpoint_name !== 'status') last_api_request_url_store.set(null);\n\n try {\n await fetch(api_url, { headers: Nominatim_Config.Nominatim_API_Endpoint_Headers || {} })\n .then(async (response) => {\n if (!((response.status >= 200 && response.status < 300) || response.status === 404)) {\n error_store.set(`Error fetching data from ${api_url} (${response.statusText})`);\n return undefined;\n }\n\n // Parse JSON here instead of returning a promise so we can catch possible\n // errors.\n var data;\n try {\n data = await response.json();\n } catch (err) {\n // e.g. 'JSON.parse: unexpected non-whitespace character after JSON data at line 1'\n error_store.set(`Error parsing JSON data from ${api_url} (${err})`);\n return undefined;\n }\n return data;\n })\n .then((data) => {\n if (data) {\n if (data.error) {\n error_store.set(data.error.message);\n }\n callback(data);\n }\n api_request_progress('finish');\n });\n } catch (error) {\n error_store.set(`Error fetching data from ${api_url} (${error})`);\n api_request_progress('finish');\n }\n\n if (endpoint_name !== 'status') last_api_request_url_store.set(api_url);\n}\n\nvar fetch_content_cache = {};\nexport async function fetch_content_into_element(url, dom_element) {\n if (!window.location.protocol.match(/^http/)) {\n dom_element.innerHTML = `Cannot display data from ${url} here. `\n + 'Browser security prevents loading content from file:// URLs.';\n return;\n }\n\n if (fetch_content_cache[url]) {\n dom_element.innerHTML = fetch_content_cache[url];\n return;\n }\n try {\n await fetch(url)\n .then(response => response.text())\n .then(html => {\n html = html.replace('Nominatim_API_Endpoint', generate_nominatim_endpoint_url());\n dom_element.innerHTML = html;\n fetch_content_cache[url] = html;\n });\n } catch (error) {\n dom_element.innerHTML = `Error fetching content from ${url} (${error})`;\n }\n}\n\nfunction generate_nominatim_endpoint_url(endpoint_name) {\n var conf_endpoint = Nominatim_Config.Nominatim_API_Endpoint;\n\n if (typeof conf_endpoint === 'function') {\n return conf_endpoint(endpoint_name);\n }\n\n if (!endpoint_name) return conf_endpoint;\n\n return conf_endpoint + endpoint_name + '.php';\n}\n\nfunction generate_nominatim_api_url(endpoint_name, params) {\n // default value for /search\n if (params.dedupe === 1) delete params.dedupe;\n\n extend_parameters(params, Nominatim_Config.Nominatim_API_Endpoint_Params);\n return generate_nominatim_endpoint_url(endpoint_name)\n + '?'\n + Object.keys(clean_up_parameters(params)).map((k) => {\n return encodeURIComponent(k) + '=' + encodeURIComponent(params[k]);\n }).join('&');\n}\n\nfunction extend_parameters(params, params2) {\n var param_names = Object.keys(params2);\n for (var i = 0; i < param_names.length; i += 1) {\n params[param_names[i]] = params2[param_names[i]];\n }\n}\n\nfunction clean_up_parameters(params) {\n // `&a=&b=&c=1` => '&c=1'\n var param_names = Object.keys(params);\n for (var i = 0; i < param_names.length; i += 1) {\n var val = params[param_names[i]];\n if (typeof (val) === 'undefined' || val === '' || val === null) {\n delete params[param_names[i]];\n }\n }\n return params;\n}\n\nexport function update_html_title(title) {\n document.title = [title, Nominatim_Config.Page_Title]\n .filter((val) => val && val.length > 1)\n .join(' | ');\n}\n\n","<script>\n import { refresh_page } from '../lib/stores.js';\n\n export let page;\n export let params_hash = {};\n export let extra_classes = '';\n let href = page + '.html';\n\n function handleClick() {\n refresh_page(page, new URLSearchParams(params_hash));\n }\n\n $: {\n let param_str = new URLSearchParams(params_hash).toString();\n href = page + '.html' + (param_str ? '?' : '') + param_str;\n }\n</script>\n\n<a on:click|preventDefault|stopPropagation={handleClick} href={href} class={extra_classes}><slot></slot></a>\n","<script>\nimport { refresh_page } from '../lib/stores.js';\n\nexport let lat = null;\nexport let lon = null;\nexport let zoom = null;\nexport let extra_classes = '';\n\nlet params = new URLSearchParams();\nlet href = 'reverse.html';\n\n$: {\n let new_params = new URLSearchParams();\n\n if (lat && lon) {\n new_params.set('lat', lat);\n new_params.set('lon', lon);\n\n if (zoom) {\n new_params.set('zoom', zoom);\n }\n }\n\n params = new_params;\n}\n\n$: {\n let param_str = params.toString();\n href = 'reverse.html' + (param_str ? '?' : '') + param_str;\n}\n</script>\n\n<a on:click|preventDefault|stopPropagation={() => refresh_page('reverse', params)} href={href} class={extra_classes}><slot></slot></a>\n","var EN_US = ['second', 'minute', 'hour', 'day', 'week', 'month', 'year'];\nexport default function (diff, idx) {\n if (idx === 0)\n return ['just now', 'right now'];\n var unit = EN_US[Math.floor(idx / 2)];\n if (diff > 1)\n unit += 's';\n return [diff + \" \" + unit + \" ago\", \"in \" + diff + \" \" + unit];\n}\n//# sourceMappingURL=en_US.js.map","var ZH_CN = ['秒', '分钟', '小时', '天', '周', '个月', '年'];\nexport default function (diff, idx) {\n if (idx === 0)\n return ['刚刚', '片刻后'];\n var unit = ZH_CN[~~(idx / 2)];\n return [diff + \" \" + unit + \"\\u524D\", diff + \" \" + unit + \"\\u540E\"];\n}\n//# sourceMappingURL=zh_CN.js.map","/**\n * Created by hustcc on 18/5/20.\n * Contract: i@hust.cc\n */\n/**\n * All supported locales\n */\nvar Locales = {};\n/**\n * register a locale\n * @param locale\n * @param func\n */\nexport var register = function (locale, func) {\n Locales[locale] = func;\n};\n/**\n * get a locale, default is en_US\n * @param locale\n * @returns {*}\n */\nexport var getLocale = function (locale) {\n return Locales[locale] || Locales['en_US'];\n};\n//# sourceMappingURL=register.js.map","/**\n * Created by hustcc on 18/5/20.\n * Contract: i@hust.cc\n */\nvar SEC_ARRAY = [\n 60,\n 60,\n 24,\n 7,\n 365 / 7 / 12,\n 12,\n];\n/**\n * format Date / string / timestamp to timestamp\n * @param input\n * @returns {*}\n */\nexport function toDate(input) {\n if (input instanceof Date)\n return input;\n // @ts-ignore\n if (!isNaN(input) || /^\\d+$/.test(input))\n return new Date(parseInt(input));\n input = (input || '')\n // @ts-ignore\n .trim()\n .replace(/\\.\\d+/, '') // remove milliseconds\n .replace(/-/, '/')\n .replace(/-/, '/')\n .replace(/(\\d)T(\\d)/, '$1 $2')\n .replace(/Z/, ' UTC') // 2017-2-5T3:57:52Z -> 2017-2-5 3:57:52UTC\n .replace(/([+-]\\d\\d):?(\\d\\d)/, ' $1$2'); // -04:00 -> -0400\n return new Date(input);\n}\n/**\n * format the diff second to *** time ago, with setting locale\n * @param diff\n * @param localeFunc\n * @returns\n */\nexport function formatDiff(diff, localeFunc) {\n /**\n * if locale is not exist, use defaultLocale.\n * if defaultLocale is not exist, use build-in `en`.\n * be sure of no error when locale is not exist.\n *\n * If `time in`, then 1\n * If `time ago`, then 0\n */\n var agoIn = diff < 0 ? 1 : 0;\n /**\n * Get absolute value of number (|diff| is non-negative) value of x\n * |diff| = diff if diff is positive\n * |diff| = -diff if diff is negative\n * |0| = 0\n */\n diff = Math.abs(diff);\n /**\n * Time in seconds\n */\n var totalSec = diff;\n /**\n * Unit of time\n */\n var idx = 0;\n for (; diff >= SEC_ARRAY[idx] && idx < SEC_ARRAY.length; idx++) {\n diff /= SEC_ARRAY[idx];\n }\n /**\n * Math.floor() is alternative of ~~\n *\n * The differences and bugs:\n * Math.floor(3.7) -> 4 but ~~3.7 -> 3\n * Math.floor(1559125440000.6) -> 1559125440000 but ~~1559125440000.6 -> 52311552\n *\n * More information about the performance of algebraic:\n * https://www.youtube.com/watch?v=65-RbBwZQdU\n */\n diff = Math.floor(diff);\n idx *= 2;\n if (diff > (idx === 0 ? 9 : 1))\n idx += 1;\n return localeFunc(diff, idx, totalSec)[agoIn].replace('%s', diff.toString());\n}\n/**\n * calculate the diff second between date to be formatted an now date.\n * @param date\n * @param relativeDate\n * @returns {number}\n */\nexport function diffSec(date, relativeDate) {\n var relDate = relativeDate ? toDate(relativeDate) : new Date();\n return (+relDate - +toDate(date)) / 1000;\n}\n/**\n * nextInterval: calculate the next interval time.\n * - diff: the diff sec between now and date to be formatted.\n *\n * What's the meaning?\n * diff = 61 then return 59\n * diff = 3601 (an hour + 1 second), then return 3599\n * make the interval with high performance.\n **/\nexport function nextInterval(diff) {\n var rst = 1, i = 0, d = Math.abs(diff);\n for (; diff >= SEC_ARRAY[i] && i < SEC_ARRAY.length; i++) {\n diff /= SEC_ARRAY[i];\n rst *= SEC_ARRAY[i];\n }\n d = d % rst;\n d = d ? rst - d : rst;\n return Math.ceil(d);\n}\n//# sourceMappingURL=date.js.map","import { formatDiff, diffSec } from './utils/date';\nimport { getLocale } from './register';\n/**\n * format a TDate into string\n * @param date\n * @param locale\n * @param opts\n */\nexport var format = function (date, locale, opts) {\n // diff seconds\n var sec = diffSec(date, opts && opts.relativeDate);\n // format it with locale\n return formatDiff(sec, getLocale(locale));\n};\n//# sourceMappingURL=format.js.map","<script>\n import PageLink from './PageLink.svelte';\n import * as timeago from 'timeago.js';\n import { last_api_request_url_store } from '../lib/stores.js';\n import { fetch_from_api } from '../lib/api_utils.js';\n\n let last_updated_date;\n let last_api_request_url;\n let fetch_running = false; // prevent multiple parallel fetch runs\n\n last_api_request_url_store.subscribe(url => {\n last_api_request_url = url;\n\n if (last_api_request_url) {\n last_api_request_url = new URL(last_api_request_url, window.location.origin);\n last_api_request_url.searchParams.delete('polygon_geojson');\n last_api_request_url = last_api_request_url.toString();\n }\n\n if (fetch_running || last_updated_date) return;\n\n fetch_running = true;\n\n fetch_from_api('status', { format: 'json' }, function (data) {\n last_updated_date = data.data_updated;\n fetch_running = false;\n });\n });\n</script>\n\n<style>\n #last-updated {\n position: relative;\n font-size: 0.8rem;\n font-style: italic;\n }\n #loading {\n display: none;\n position: absolute;\n padding: 0.5em 1em;\n top: 0;\n left: 0;\n width: 100%;\n background-color: #eee;\n z-index: 100;\n }\n</style>\n\n<div id=\"last-updated\" class=\"container-fluid py-2 px-4 mb-3\">\n <div id=\"loading\" class=\"py-2 px-4\">\n <div class=\"spinner-border spinner-border-sm text-primary me-1\" role=\"status\"></div>\n Loading data from API ...\n </div>\n <div class=\"row\">\n <div class=\"col-sm-6\">\n {#if last_api_request_url}\n <div id=\"api-request\">\n Data from <a href=\"{last_api_request_url}\">API request</a>\n <span id=\"api-request-debug\">\n (<a href=\"{last_api_request_url}&debug=1\">debug output</a>)\n </span>\n </div>\n {/if}\n </div>\n <div class=\"col-sm-6 text-end\">\n {#if last_updated_date}\n Data last updated:\n <abbr id=\"data-date\" title=\"{last_updated_date} (UTC timezone)\">{timeago.format(new Date(last_updated_date))}</abbr>\n {/if}\n (<PageLink page=\"status\">Details</PageLink>)\n </div>\n </div>\n</div>\n","/**\n * Created by hustcc on 18/5/20.\n * Contract: i@hust.cc\n */\nimport en_US from './lang/en_US';\nimport zh_CN from './lang/zh_CN';\nimport { register } from './register';\nregister('en_US', en_US);\nregister('zh_CN', zh_CN);\nexport { format } from './format';\nexport { render, cancel } from './realtime';\nexport { register };\n//# sourceMappingURL=index.js.map","<script>\n import { error_store } from '../lib/stores.js';\n\n let error_message;\n\n error_store.subscribe(text => { error_message = text; });\n\n function dismiss_message() {\n error_store.set(null);\n }\n</script>\n\n{#if error_message}\n <div id=\"error\" class=\"container-fluid alert-danger py-3 px-4\">\n {error_message}\n\n <button type=\"button\" class=\"btn-close float-end\" aria-label=\"dismiss\" on:click={dismiss_message}></button>\n </div>\n{/if}\n","<script>\n import PageLink from './PageLink.svelte';\n import ReverseLink from './ReverseLink.svelte';\n import LastUpdated from './LastUpdated.svelte';\n import Error from './Error.svelte';\n\n import { map_store, page } from '../lib/stores.js';\n\n $: view = $page.tab;\n $: page_title = Nominatim_Config.Page_Title;\n $: reverse_only = Nominatim_Config.Reverse_Only;\n\n let map_lat;\n let map_lon;\n\n map_store.subscribe(map => {\n if (!map) return;\n\n map.on('move', function () {\n map_lat = map.getCenter().lat;\n map_lon = map.getCenter().lng;\n });\n });\n</script>\n\n<style>\n .navbar-brand :global(a:hover) {\n text-decoration: none;\n }\n\n .navbar-brand h1 {\n display: inline;\n font-size: 1.2em;\n color: #333;\n }\n\n .navbar-brand img {\n display: inline-block;\n margin-right: 5px;\n margin-top: -5px;\n }\n\n .nav-item {\n white-space: nowrap;\n }\n\n .page-title-section {\n display: none;\n text-align: center;\n padding: 1em;\n }\n @media (max-width: 600px) {\n .page-title-section {\n display: block;\n }\n }\n\n .search-section {\n padding: 1em 30px;\n background-color: #f5f5f5;\n border-top: 2px solid #ddd;\n border-bottom: 2px solid #ddd;\n }\n</style>\n\n<header class=\"container-fluid\">\n <nav class=\"navbar navbar-expand-sm navbar-light\">\n <div class=\"container-fluid\">\n <!-- Brand -->\n <div class=\"navbar-brand\">\n <PageLink page={reverse_only ? 'reverse' : 'search'}>\n <img alt=\"logo\" id=\"theme-logo\" src=\"theme/logo.png\" />\n <h1>{page_title}</h1>\n </PageLink>\n </div>\n <!-- Toggler (hamburger button) -->\n <button class=\"navbar-toggler\" type=\"button\" data-bs-toggle=\"collapse\" data-bs-target=\"#navbarSupportedContent\" aria-controls=\"navbarSupportedContent\" aria-expanded=\"false\" aria-label=\"Toggle navigation\">\n <span class=\"navbar-toggler-icon\"></span>\n </button>\n <div class=\"collapse navbar-collapse\" id=\"navbarSupportedContent\">\n <!-- Left-aligned links -->\n <ul class=\"navbar-nav me-auto\">\n {#if !reverse_only}\n <li class=\"nav-item\">\n <PageLink page=\"search\" extra_classes=\"nav-link {view === 'search' ? 'active' : ''}\">Search</PageLink>\n </li>\n {/if}\n <li class=\"nav-item\">\n <ReverseLink lat={map_lat} lon={map_lon} extra_classes=\"nav-link {view === 'reverse' ? 'active' : ''}\">Reverse</ReverseLink>\n </li>\n <li class=\"nav-item\">\n <PageLink page=\"details\" extra_classes=\"nav-link {view === 'details' ? 'active' : ''}\">Search By ID</PageLink>\n </li>\n </ul>\n </div>\n <!-- Right aligned links -->\n <ul class=\"navbar-nav\">\n <li class=\"nav-item\">\n <PageLink page=\"about\" extra_classes=\"nav-link {view === 'about' ? 'active' : ''}\">About & Help</PageLink>\n </li>\n </ul>\n </div>\n </nav>\n</header>\n<section class=\"page-title-section\">\n <h2>{view}</h2>\n</section>\n<section class=\"search-section\">\n <slot/>\n</section>\n<Error/>\n<LastUpdated/>\n","<script>\n import { refresh_page } from '../lib/stores.js';\n\n export let page;\n\n function serialize_form(form) {\n var params = new URLSearchParams();\n\n Array.prototype.slice.call(form.elements).forEach(function (field) {\n if (!field.name || field.disabled || ['submit', 'button'].indexOf(field.type) > -1) return;\n\n if (['checkbox', 'radio'].indexOf(field.type) > -1 && !field.checked) return;\n if (typeof field.value === 'undefined' || field.value === '') return;\n\n // Default value for /search endpoint\n if (field.name === 'dedupe' && (field.value === 1 || field.value === '1')) return;\n\n params.set(field.name, field.value);\n });\n\n return params;\n }\n\n // https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation\n // doesn't support hidden fields, so we check those in an extra step\n function validate_field(field) {\n if (field.type === 'hidden') {\n if (field.value.length) {\n if (field.pattern && !field.value.match(field.pattern)) return false;\n }\n }\n return field.checkValidity(); // for hidden field always true\n }\n\n function handle_submit(event) {\n let form = event.target;\n\n let allow_submit = true;\n\n Array.prototype.slice.call(form.elements).forEach(function (field) {\n if (!validate_field(field)) {\n alert('Invalid input in ' + field.name);\n allow_submit = false;\n }\n });\n\n if (allow_submit) refresh_page(page, serialize_form(form));\n }\n</script>\n\n<form on:submit|preventDefault={handle_submit} class=\"form-inline\" role=\"search\" accept-charset=\"UTF-8\" action=\"\">\n <div class=\"row g-2\">\n <slot></slot>\n </div>\n</form>\n","<script>\n import UrlSubmitForm from '../components/UrlSubmitForm.svelte';\n\n import { map_store } from '../lib/stores.js';\n import { get } from 'svelte/store';\n\n export let bStructuredSearch = false;\n export let api_request_params = {};\n let sViewBox;\n let lat;\n let lon;\n\n function map_viewbox_as_string(map) {\n var bounds = map.getBounds();\n var west = bounds.getWest();\n var east = bounds.getEast();\n\n if ((east - west) >= 360) { // covers more than whole planet\n west = map.getCenter().lng - 179.999;\n east = map.getCenter().lng + 179.999;\n }\n east = L.latLng(77, east).wrap().lng;\n west = L.latLng(77, west).wrap().lng;\n\n return [\n west.toFixed(5), // left\n bounds.getNorth().toFixed(5), // top\n east.toFixed(5), // right\n bounds.getSouth().toFixed(5) // bottom\n ].join(',');\n }\n\n function set_viewbox(map) {\n let use_viewbox = document.getElementById('use_viewbox');\n if (use_viewbox && use_viewbox.checked) {\n sViewBox = map_viewbox_as_string(map);\n } else {\n sViewBox = '';\n }\n }\n\n function update_reverse_link(map) {\n let center_lat_lng = map.wrapLatLng(map.getCenter());\n lat = center_lat_lng.lat.toFixed(5);\n lon = center_lat_lng.lng.toFixed(5);\n }\n\n map_store.subscribe(map => {\n if (!map) { return; }\n\n map.on('move', function () {\n set_viewbox(map);\n update_reverse_link(map);\n });\n\n map.on('load', function () {\n set_viewbox(map);\n update_reverse_link(map);\n });\n });\n\n function reset_viewbox() {\n let map = get(map_store);\n if (map) { set_viewbox(map); }\n }\n\n function set_bounded(e) {\n document.querySelector('input[name=bounded]').value = e.target.checked ? 1 : '';\n }\n\n function set_dedupe(e) {\n document.querySelector('input[name=dedupe]').value = e.target.checked ? 1 : 0;\n }\n\n function set_api_param(e) {\n document.querySelector('input[name=' + e.target.dataset.apiParam + ']').value = e.target.value;\n }\n</script>\n\n<ul class=\"nav nav-tabs\">\n <li class=\"nav-item\">\n <a class=\"nav-link\" class:active={!bStructuredSearch} data-bs-toggle=\"tab\" href=\"#simple\">Simple</a>\n </li>\n <li class=\"nav-item\">\n <a class=\"nav-link\" class:active={bStructuredSearch} data-bs-toggle=\"tab\" href=\"#structured\">Structured</a>\n </li>\n</ul>\n\n<div class=\"tab-content py-2\">\n <div class=\"tab-pane\" class:active={!bStructuredSearch} id=\"simple\" role=\"tabpanel\">\n <UrlSubmitForm page=\"search\">\n <div class=\"col-auto\">\n <input id=\"q\"\n name=\"q\"\n type=\"text\"\n class=\"form-control form-control-sm\"\n placeholder=\"Search\"\n value=\"{api_request_params.q || ''}\"\n autofocus />\n </div>\n <div class=\"col-auto\">\n <button type=\"submit\" class=\"btn btn-primary btn-sm mx-1\">Search</button>\n <input type=\"hidden\" name=\"viewbox\" value=\"{sViewBox || ''}\" />\n <input type=\"hidden\" name=\"dedupe\" value=\"{api_request_params.dedupe === 0 ? 0 : 1}\" />\n <input type=\"hidden\" name=\"bounded\" value=\"{api_request_params.bounded ? 1 : ''}\" />\n <input type=\"hidden\" name=\"accept-language\" value=\"{api_request_params['accept-language'] || ''}\" />\n <input type=\"hidden\" name=\"countrycodes\" value=\"{api_request_params.countrycodes || ''}\"\n pattern=\"^[a-zA-Z]{'{2}'}(,[a-zA-Z]{'{2}'})*$\" />\n <input type=\"hidden\" name=\"limit\" value=\"{api_request_params.limit || ''}\" />\n <input type=\"hidden\" name=\"polygon_threshold\" value=\"{api_request_params.polygon_threshold || ''}\" />\n </div>\n </UrlSubmitForm>\n </div>\n <div class=\"tab-pane\" class:active={bStructuredSearch} id=\"structured\" role=\"tabpanel\">\n <UrlSubmitForm page=\"search\">\n <div class=\"col-auto\">\n <input name=\"street\" type=\"text\" class=\"form-control form-control-sm me-1\"\n placeholder=\"House number/Street\"\n value=\"{api_request_params.street || ''}\" />\n </div>\n <div class=\"col-auto\">\n <input name=\"city\" type=\"text\" class=\"form-control form-control-sm me-1\"\n placeholder=\"City\"\n value=\"{api_request_params.city || ''}\" />\n </div>\n <div class=\"col-auto\">\n <input id=\"county\" name=\"county\" type=\"text\" class=\"form-control form-control-sm me-1\"\n placeholder=\"County\"\n value=\"{api_request_params.county || ''}\" />\n </div>\n <div class=\"col-auto\">\n <input name=\"state\" type=\"text\" class=\"form-control form-control-sm me-1\"\n placeholder=\"State\"\n value=\"{api_request_params.state || ''}\" />\n </div>\n <div class=\"col-auto\">\n <input name=\"country\" type=\"text\" class=\"form-control form-control-sm me-1\"\n placeholder=\"Country\"\n value=\"{api_request_params.country || ''}\" />\n </div>\n <div class=\"col-auto\">\n <input name=\"postalcode\" type=\"text\" class=\"form-control form-control-sm me-1\"\n placeholder=\"Postal Code\"\n value=\"{api_request_params.postalcode || ''}\" />\n </div>\n <div class=\"col-auto\">\n <button type=\"submit\" class=\"btn btn-primary btn-sm\">Search</button>\n <input type=\"hidden\" name=\"viewbox\" value=\"{sViewBox || ''}\" />\n <input type=\"hidden\" name=\"dedupe\" value=\"{api_request_params.dedupe === 0 ? 0 : 1}\" />\n <input type=\"hidden\" name=\"bounded\" value=\"{api_request_params.bounded ? 1 : ''}\" />\n <input type=\"hidden\" name=\"accept-language\" value=\"{api_request_params['accept-language'] || ''}\" />\n <input type=\"hidden\" name=\"countrycodes\" value=\"{api_request_params.countrycodes || ''}\"\n pattern=\"^[a-zA-Z]{'{2}'}(,[a-zA-Z]{'{2}'})*$\" />\n <input type=\"hidden\" name=\"limit\" value=\"{api_request_params.limit || ''}\" />\n <input type=\"hidden\" name=\"polygon_threshold\" value=\"{api_request_params.polygon_threshold || ''}\" />\n </div>\n </UrlSubmitForm>\n </div>\n</div> <!-- /tab-content -->\n\n<!-- Additional options -->\n<details id=\"searchAdvancedOptions\">\n <summary><small>Advanced options</small></summary>\n <ul>\n <li>\n <div class=\"form-check form-check-inline\">\n <label class=\"form-check-label\" for=\"use_viewbox\">apply viewbox</label>\n <input type=\"checkbox\" class=\"form-check-input api-param-setting\"\n id=\"use_viewbox\" checked={api_request_params.viewbox} on:change={reset_viewbox}>\n </div>\n </li>\n\n <li>\n <div class=\"form-check form-check-inline\">\n <label class=\"form-check-label\" for=\"option_bounded\">bounded to viewbox</label>\n <input type=\"checkbox\" class=\"form-check-input api-param-setting\"\n id=\"option_bounded\" checked={!!api_request_params.bounded} on:change={set_bounded}>\n </div>\n </li>\n\n <li>\n <div class=\"form-check form-check-inline\">\n <label class=\"form-check-label\" for=\"option_dedupe\">deduplicate results</label>\n <input type=\"checkbox\" class=\"form-check-input api-param-setting\"\n id=\"option_dedupe\" checked={api_request_params.dedupe === 0 ? 0 : 1} on:change={set_dedupe}>\n </div>\n </li>\n\n <li>\n <label for=\"option_limit\">Maximum number of results</label>\n <input type=\"number\" class=\"form-control form-control-sm d-inline w-auto api-param-setting\"\n data-api-param=\"limit\" id=\"option_limit\" min=\"1\" max=\"50\"\n value=\"{api_request_params.limit || ''}\"\n on:change={set_api_param}>\n </li>\n\n <li>\n <label for=\"option_polygon_threshold\">Polygon simplification</label>\n <input type=\"number\" class=\"form-control form-control-sm d-inline w-auto api-param-setting\"\n data-api-param=\"polygon_threshold\" id=\"option_polygon_threshold\" min=\"0.0\" max=\"1.0\" step=\"0.001\"\n value=\"{api_request_params.polygon_threshold || ''}\"\n on:change={set_api_param}>\n </li>\n\n <li>\n <label for=\"accept_lang\">Languages</label>\n <input type=\"text\" placeholder=\"e.g. en,zh-Hant\" class=\"form-control form-control-sm d-inline w-auto api-param-setting\"\n data-api-param=\"accept-language\" id=\"accept_lang\" size=\"15\"\n value=\"{api_request_params['accept-language'] || ''}\"\n on:change={set_api_param}>\n </li>\n\n <li>\n <label for=\"option_ccode\">Country Codes</label>\n <input type=\"text\" placeholder=\"e.g. de,gb\" class=\"form-control form-control-sm d-inline w-auto api-param-setting\"\n data-api-param=\"countrycodes\" id=\"option_ccode\" size=\"15\"\n value=\"{api_request_params.countrycodes || ''}\"\n pattern=\"^[a-zA-Z]{'{2}'}(,[a-zA-Z]{'{2}'})*$\"\n on:change={set_api_param}>\n </li>\n </ul>\n</details>\n\n<style>\n .nav-tabs {\n font-size: 0.8em;\n margin-top: -1em;\n }\n\n .nav-link {\n padding: 0.1rem 1rem;\n }\n\n #q {\n width: 500px;\n max-width: 100%;\n }\n\n #searchAdvancedOptions ul {\n list-style-type: none;\n padding: 0;\n font-size: 0.85rem;\n }\n\n #searchAdvancedOptions li {\n display: inline-block;\n padding: 4px 10px;\n border-radius: 5px;\n border: 1px dotted #ccc;\n margin-right: 1em;\n }\n\n #searchAdvancedOptions label {\n margin-right: 0.5em;\n }\n\n</style>\n","<script>\n import { refresh_page } from '../lib/stores.js';\n\n export let extra_classes = '';\n export let feature = null;\n\n let url_params = new URLSearchParams();\n let href = 'details.html';\n\n function formatShortOSMType(sType) {\n if (sType === 'node') return 'N';\n if (sType === 'way') return 'W';\n if (sType === 'relation') return 'R';\n return '';\n }\n\n function handleClick() {\n refresh_page('details', url_params);\n }\n\n $: {\n let new_params = new URLSearchParams();\n\n if (feature !== null) {\n if (feature.osm_type) {\n if (feature.osm_type.length === 1) {\n new_params.set('osmtype', feature.osm_type);\n } else {\n new_params.set('osmtype', formatShortOSMType(feature.osm_type));\n }\n\n new_params.set('osmid', feature.osm_id);\n\n if (feature.class) {\n new_params.set('class', feature.class);\n } else if (feature.category) {\n new_params.set('class', feature.category);\n }\n } else if (feature.place_id) {\n new_params.set('place_id', feature.place_id);\n }\n }\n url_params = new_params;\n }\n\n $: {\n let param_str = url_params.toString();\n href = 'details.html' + (param_str ? '?' : '') + param_str;\n }\n</script>\n\n<a on:click|preventDefault|stopPropagation={handleClick} href={href} class={extra_classes}><slot></slot></a>\n","<script>\n import { onMount } from 'svelte';\n import { fetch_content_into_element } from '../lib/api_utils.js';\n\n onMount(() => {\n fetch_content_into_element('theme/welcome.html', document.getElementById('welcome'));\n });\n</script>\n\n<div id=\"welcome\"></div>\n","<script>\n\n export let aPlace;\n\n $: sIcon = getIcon(aPlace.category, aPlace.type);\n $: title = 'icon for ' + aPlace.category + ' ' + aPlace.type;\n $: url = Nominatim_Config.Images_Base_Url + sIcon + '.p.20.png';\n\n function getIcon(category, type) {\n // equivalent to PHP Nominatim::ClassTypes::getIcon\n // covers 83 of 214 available icon filenames, e.g. transport_roundabout_anticlockwise\n // transport_rental_bicycle or place_of_worship_christian would need more data from\n // the place.\n var aIcons = {\n 'boundary:administrative': 'poi_boundary_administrative',\n 'place:city': 'poi_place_city',\n 'place:town': 'poi_place_town',\n 'place:village': 'poi_place_village',\n 'place:hamlet': 'poi_place_village',\n 'place:suburb': 'poi_place_village',\n 'place:locality': 'poi_place_village',\n 'place:airport': 'transport_airport2',\n 'aeroway:aerodrome': 'transport_airport2',\n 'railway:station': 'transport_train_station2',\n 'amenity:place_of_worship': 'place_of_worship_unknown3',\n 'amenity:pub': 'food_pub',\n 'amenity:bar': 'food_bar',\n 'amenity:university': 'education_university',\n 'tourism:museum': 'tourist_museum',\n 'amenity:arts_centre': 'tourist_art_gallery2',\n 'tourism:zoo': 'tourist_zoo',\n 'tourism:theme_park': 'poi_point_of_interest',\n 'tourism:attraction': 'poi_point_of_interest',\n 'leisure:golf_course': 'sport_golf',\n 'historic:castle': 'tourist_castle',\n 'amenity:hospital': 'health_hospital',\n 'amenity:school': 'education_school',\n 'amenity:theatre': 'tourist_theatre',\n 'amenity:library': 'amenity_library',\n 'amenity:fire_station': 'amenity_firestation3',\n 'amenity:police': 'amenity_police2',\n 'amenity:bank': 'money_bank2',\n 'amenity:post_office': 'amenity_post_office',\n 'tourism:hotel': 'accommodation_hotel2',\n 'amenity:cinema': 'tourist_cinema',\n 'tourism:artwork': 'tourist_art_gallery2',\n 'historic:archaeological_site': 'tourist_archaeological2',\n 'amenity:doctors': 'health_doctors',\n 'leisure:sports_centre': 'sport_leisure_centre',\n 'leisure:swimming_pool': 'sport_swimming_outdoor',\n 'shop:supermarket': 'shopping_supermarket',\n 'shop:convenience': 'shopping_convenience',\n 'amenity:restaurant': 'food_restaurant',\n 'amenity:fast_food': 'food_fastfood',\n 'amenity:cafe': 'food_cafe',\n 'tourism:guest_house': 'accommodation_bed_and_breakfast',\n 'amenity:pharmacy': 'health_pharmacy_dispensing',\n 'amenity:fuel': 'transport_fuel',\n 'natural:peak': 'poi_peak',\n 'natural:wood': 'landuse_coniferous_and_deciduous',\n 'shop:bicycle': 'shopping_bicycle',\n 'shop:clothes': 'shopping_clothes',\n 'shop:hairdresser': 'shopping_hairdresser',\n 'shop:doityourself': 'shopping_diy',\n 'shop:estate_agent': 'shopping_estateagent2',\n 'shop:car': 'shopping_car',\n 'shop:garden_centre': 'shopping_garden_centre',\n 'shop:car_repair': 'shopping_car_repair',\n 'shop:bakery': 'shopping_bakery',\n 'shop:butcher': 'shopping_butcher',\n 'shop:apparel': 'shopping_clothes',\n 'shop:laundry': 'shopping_laundrette',\n 'shop:beverages': 'shopping_alcohol',\n 'shop:alcohol': 'shopping_alcohol',\n 'shop:optician': 'health_opticians',\n 'shop:chemist': 'health_pharmacy',\n 'shop:gallery': 'tourist_art_gallery2',\n 'shop:jewelry': 'shopping_jewelry',\n 'tourism:information': 'amenity_information',\n 'historic:ruins': 'tourist_ruin',\n 'amenity:college': 'education_school',\n 'historic:monument': 'tourist_monument',\n 'historic:memorial': 'tourist_monument',\n 'historic:mine': 'poi_mine',\n 'tourism:caravan_site': 'accommodation_caravan_park',\n 'amenity:bus_station': 'transport_bus_station',\n 'amenity:atm': 'money_atm2',\n 'tourism:viewpoint': 'tourist_view_point',\n 'tourism:guesthouse': 'accommodation_bed_and_breakfast',\n 'railway:tram': 'transport_tram_stop',\n 'amenity:courthouse': 'amenity_court',\n 'amenity:recycling': 'amenity_recycling',\n 'amenity:dentist': 'health_dentist',\n 'natural:beach': 'tourist_beach',\n 'railway:tram_stop': 'transport_tram_stop',\n 'amenity:prison': 'amenity_prison',\n 'highway:bus_stop': 'transport_bus_stop2'\n };\n\n return aIcons[category + ':' + type];\n }\n\n</script>\n\n{#if sIcon}\n <img class=\"mapicon\" src={url} alt={title} />\n{/if}\n\n<style>\n .mapicon {\n margin: 10px 0;\n }\n</style>\n","<script>\n import { results_store } from '../lib/stores.js';\n import { formatLabel } from '../lib/helpers.js';\n\n import DetailsLink from './DetailsLink.svelte';\n import Welcome from './Welcome.svelte';\n import MapIcon from './MapIcon.svelte';\n\n export let reverse_search = false;\n export let current_result = null;\n\n let aSearchResults;\n let iHighlightNum;\n let sMoreURL;\n\n results_store.subscribe(data => {\n if (!data) { return; }\n aSearchResults = data;\n iHighlightNum = 0;\n current_result = aSearchResults[0];\n\n\n let search_params = new URLSearchParams(window.location.search);\n\n let aResults = data;\n // lonvia wrote: https://github.com/osm-search/nominatim-ui/issues/24\n // I would suggest to remove the guessing and always show the link. Nominatim only returns\n // one or two results when it believes the result to be a good enough match.\n // if (aResults.length >= 10) {\n var aExcludePlaceIds = [];\n if (search_params.has('exclude_place_ids')) {\n aExcludePlaceIds = search_params.get('exclude_place_ids').split(',');\n }\n for (var i = 0; i < aResults.length; i += 1) {\n aExcludePlaceIds.push(aResults[i].place_id);\n }\n var parsed_url = new URLSearchParams(window.location.search);\n parsed_url.set('exclude_place_ids', aExcludePlaceIds.join(','));\n sMoreURL = '?' + parsed_url.toString();\n });\n\n function handleClick(e) {\n let result_el = e.target;\n if (!result_el.className.match('result')) {\n result_el = result_el.parentElement;\n }\n let pos = Number(result_el.dataset.position);\n\n current_result = aSearchResults[pos];\n iHighlightNum = pos;\n }\n\n</script>\n\n{#if aSearchResults && aSearchResults.length > 0}\n <div id=\"searchresults\">\n\n {#each aSearchResults as aResult, iResNum}\n <div class=\"result\" class:highlight={iResNum === iHighlightNum} data-position=\"{iResNum}\" on:click|stopPropagation={handleClick}>\n <div style=\"float:right\">\n <MapIcon aPlace={aResult} />\n </div>\n <span class=\"name\">{aResult.display_name}</span>\n <span class=\"type\">{formatLabel(aResult)}</span>\n <p class=\"coords\">{aResult.lat},{aResult.lon}</p>\n\n <DetailsLink extra_classes=\"btn btn-outline-secondary btn-sm\" feature={aResult}>details</DetailsLink>\n </div>\n {/each}\n\n {#if sMoreURL && !reverse_search}\n <div class=\"more\">\n <a class=\"btn btn-primary\" href=\"{sMoreURL}\">\n Search for more results\n </a>\n </div>\n {/if}\n </div>\n{:else if aSearchResults}\n {#if reverse_search}\n <div id=\"intro\" class=\"sidebar\">Search for coordinates or click anywhere on the map.</div>\n {:else}\n <div class=\"noresults\">No search results found</div>\n {/if}\n{:else}\n <Welcome/>\n{/if}\n\n<style>\n .result {\n font-size: 0.8em;\n margin: 5px;\n margin-top:0px;\n padding: 4px 8px;\n border-radius: 2px;\n background:#F0F7FF;\n border: 2px solid #D7E7FF;\n cursor:pointer;\n min-height: 5em;\n }\n\n .result.highlight {\n background-color: #D9E7F7;\n border-color: #9DB9E4;\n }\n .result.highlight :global(a) {\n margin: 10px auto;\n display: block;\n max-width: 10em;\n padding: 1px;\n background-color: white;\n }\n .result .type{\n color: gray;\n font-size: 0.8em;\n }\n .result :global(a) {\n display: none;\n }\n\n .result .coords {\n display: none; \n }\n\n .noresults{\n text-align: center;\n padding: 1em;\n }\n\n .more{\n text-align:center;\n margin-top: 1em;\n }\n\n .result.highlight :global(a):hover {\n color: #111;\n }\n</style>\n","/* @preserve\n * Leaflet 1.9.3, a JS library for interactive maps. https://leafletjs.com\n * (c) 2010-2022 Vladimir Agafonkin, (c) 2010-2011 CloudMade\n */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n typeof define === 'function' && define.amd ? define(['exports'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.leaflet = {}));\n})(this, (function (exports) { 'use strict';\n\n var version = \"1.9.3\";\n\n /*\r\n * @namespace Util\r\n *\r\n * Various utility functions, used by Leaflet internally.\r\n */\r\n\r\n // @function extend(dest: Object, src?: Object): Object\r\n // Merges the properties of the `src` object (or multiple objects) into `dest` object and returns the latter. Has an `L.extend` shortcut.\r\n function extend(dest) {\r\n \tvar i, j, len, src;\r\n\r\n \tfor (j = 1, len = arguments.length; j < len; j++) {\r\n \t\tsrc = arguments[j];\r\n \t\tfor (i in src) {\r\n \t\t\tdest[i] = src[i];\r\n \t\t}\r\n \t}\r\n \treturn dest;\r\n }\r\n\r\n // @function create(proto: Object, properties?: Object): Object\r\n // Compatibility polyfill for [Object.create](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/create)\r\n var create$2 = Object.create || (function () {\r\n \tfunction F() {}\r\n \treturn function (proto) {\r\n \t\tF.prototype = proto;\r\n \t\treturn new F();\r\n \t};\r\n })();\r\n\r\n // @function bind(fn: Function, …): Function\r\n // Returns a new function bound to the arguments passed, like [Function.prototype.bind](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/bind).\r\n // Has a `L.bind()` shortcut.\r\n function bind(fn, obj) {\r\n \tvar slice = Array.prototype.slice;\r\n\r\n \tif (fn.bind) {\r\n \t\treturn fn.bind.apply(fn, slice.call(arguments, 1));\r\n \t}\r\n\r\n \tvar args = slice.call(arguments, 2);\r\n\r\n \treturn function () {\r\n \t\treturn fn.apply(obj, args.length ? args.concat(slice.call(arguments)) : arguments);\r\n \t};\r\n }\r\n\r\n // @property lastId: Number\r\n // Last unique ID used by [`stamp()`](#util-stamp)\r\n var lastId = 0;\r\n\r\n // @function stamp(obj: Object): Number\r\n // Returns the unique ID of an object, assigning it one if it doesn't have it.\r\n function stamp(obj) {\r\n \tif (!('_leaflet_id' in obj)) {\r\n \t\tobj['_leaflet_id'] = ++lastId;\r\n \t}\r\n \treturn obj._leaflet_id;\r\n }\r\n\r\n // @function throttle(fn: Function, time: Number, context: Object): Function\r\n // Returns a function which executes function `fn` with the given scope `context`\r\n // (so that the `this` keyword refers to `context` inside `fn`'s code). The function\r\n // `fn` will be called no more than one time per given amount of `time`. The arguments\r\n // received by the bound function will be any arguments passed when binding the\r\n // function, followed by any arguments passed when invoking the bound function.\r\n // Has an `L.throttle` shortcut.\r\n function throttle(fn, time, context) {\r\n \tvar lock, args, wrapperFn, later;\r\n\r\n \tlater = function () {\r\n \t\t// reset lock and call if queued\r\n \t\tlock = false;\r\n \t\tif (args) {\r\n \t\t\twrapperFn.apply(context, args);\r\n \t\t\targs = false;\r\n \t\t}\r\n \t};\r\n\r\n \twrapperFn = function () {\r\n \t\tif (lock) {\r\n \t\t\t// called too soon, queue to call later\r\n \t\t\targs = arguments;\r\n\r\n \t\t} else {\r\n \t\t\t// call and lock until later\r\n \t\t\tfn.apply(context, arguments);\r\n \t\t\tsetTimeout(later, time);\r\n \t\t\tlock = true;\r\n \t\t}\r\n \t};\r\n\r\n \treturn wrapperFn;\r\n }\r\n\r\n // @function wrapNum(num: Number, range: Number[], includeMax?: Boolean): Number\r\n // Returns the number `num` modulo `range` in such a way so it lies within\r\n // `range[0]` and `range[1]`. The returned value will be always smaller than\r\n // `range[1]` unless `includeMax` is set to `true`.\r\n function wrapNum(x, range, includeMax) {\r\n \tvar max = range[1],\r\n \t min = range[0],\r\n \t d = max - min;\r\n \treturn x === max && includeMax ? x : ((x - min) % d + d) % d + min;\r\n }\r\n\r\n // @function falseFn(): Function\r\n // Returns a function which always returns `false`.\r\n function falseFn() { return false; }\r\n\r\n // @function formatNum(num: Number, precision?: Number|false): Number\r\n // Returns the number `num` rounded with specified `precision`.\r\n // The default `precision` value is 6 decimal places.\r\n // `false` can be passed to skip any processing (can be useful to avoid round-off errors).\r\n function formatNum(num, precision) {\r\n \tif (precision === false) { return num; }\r\n \tvar pow = Math.pow(10, precision === undefined ? 6 : precision);\r\n \treturn Math.round(num * pow) / pow;\r\n }\r\n\r\n // @function trim(str: String): String\r\n // Compatibility polyfill for [String.prototype.trim](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/Trim)\r\n function trim(str) {\r\n \treturn str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g, '');\r\n }\r\n\r\n // @function splitWords(str: String): String[]\r\n // Trims and splits the string on whitespace and returns the array of parts.\r\n function splitWords(str) {\r\n \treturn trim(str).split(/\\s+/);\r\n }\r\n\r\n // @function setOptions(obj: Object, options: Object): Object\r\n // Merges the given properties to the `options` of the `obj` object, returning the resulting options. See `Class options`. Has an `L.setOptions` shortcut.\r\n function setOptions(obj, options) {\r\n \tif (!Object.prototype.hasOwnProperty.call(obj, 'options')) {\r\n \t\tobj.options = obj.options ? create$2(obj.options) : {};\r\n \t}\r\n \tfor (var i in options) {\r\n \t\tobj.options[i] = options[i];\r\n \t}\r\n \treturn obj.options;\r\n }\r\n\r\n // @function getParamString(obj: Object, existingUrl?: String, uppercase?: Boolean): String\r\n // Converts an object into a parameter URL string, e.g. `{a: \"foo\", b: \"bar\"}`\r\n // translates to `'?a=foo&b=bar'`. If `existingUrl` is set, the parameters will\r\n // be appended at the end. If `uppercase` is `true`, the parameter names will\r\n // be uppercased (e.g. `'?A=foo&B=bar'`)\r\n function getParamString(obj, existingUrl, uppercase) {\r\n \tvar params = [];\r\n \tfor (var i in obj) {\r\n \t\tparams.push(encodeURIComponent(uppercase ? i.toUpperCase() : i) + '=' + encodeURIComponent(obj[i]));\r\n \t}\r\n \treturn ((!existingUrl || existingUrl.indexOf('?') === -1) ? '?' : '&') + params.join('&');\r\n }\r\n\r\n var templateRe = /\\{ *([\\w_ -]+) *\\}/g;\r\n\r\n // @function template(str: String, data: Object): String\r\n // Simple templating facility, accepts a template string of the form `'Hello {a}, {b}'`\r\n // and a data object like `{a: 'foo', b: 'bar'}`, returns evaluated string\r\n // `('Hello foo, bar')`. You can also specify functions instead of strings for\r\n // data values — they will be evaluated passing `data` as an argument.\r\n function template(str, data) {\r\n \treturn str.replace(templateRe, function (str, key) {\r\n \t\tvar value = data[key];\r\n\r\n \t\tif (value === undefined) {\r\n \t\t\tthrow new Error('No value provided for variable ' + str);\r\n\r\n \t\t} else if (typeof value === 'function') {\r\n \t\t\tvalue = value(data);\r\n \t\t}\r\n \t\treturn value;\r\n \t});\r\n }\r\n\r\n // @function isArray(obj): Boolean\r\n // Compatibility polyfill for [Array.isArray](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray)\r\n var isArray = Array.isArray || function (obj) {\r\n \treturn (Object.prototype.toString.call(obj) === '[object Array]');\r\n };\r\n\r\n // @function indexOf(array: Array, el: Object): Number\r\n // Compatibility polyfill for [Array.prototype.indexOf](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf)\r\n function indexOf(array, el) {\r\n \tfor (var i = 0; i < array.length; i++) {\r\n \t\tif (array[i] === el) { return i; }\r\n \t}\r\n \treturn -1;\r\n }\r\n\r\n // @property emptyImageUrl: String\r\n // Data URI string containing a base64-encoded empty GIF image.\r\n // Used as a hack to free memory from unused images on WebKit-powered\r\n // mobile devices (by setting image `src` to this string).\r\n var emptyImageUrl = 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=';\r\n\r\n // inspired by https://paulirish.com/2011/requestanimationframe-for-smart-animating/\r\n\r\n function getPrefixed(name) {\r\n \treturn window['webkit' + name] || window['moz' + name] || window['ms' + name];\r\n }\r\n\r\n var lastTime = 0;\r\n\r\n // fallback for IE 7-8\r\n function timeoutDefer(fn) {\r\n \tvar time = +new Date(),\r\n \t timeToCall = Math.max(0, 16 - (time - lastTime));\r\n\r\n \tlastTime = time + timeToCall;\r\n \treturn window.setTimeout(fn, timeToCall);\r\n }\r\n\r\n var requestFn = window.requestAnimationFrame || getPrefixed('RequestAnimationFrame') || timeoutDefer;\r\n var cancelFn = window.cancelAnimationFrame || getPrefixed('CancelAnimationFrame') ||\r\n \t\tgetPrefixed('CancelRequestAnimationFrame') || function (id) { window.clearTimeout(id); };\r\n\r\n // @function requestAnimFrame(fn: Function, context?: Object, immediate?: Boolean): Number\r\n // Schedules `fn` to be executed when the browser repaints. `fn` is bound to\r\n // `context` if given. When `immediate` is set, `fn` is called immediately if\r\n // the browser doesn't have native support for\r\n // [`window.requestAnimationFrame`](https://developer.mozilla.org/docs/Web/API/window/requestAnimationFrame),\r\n // otherwise it's delayed. Returns a request ID that can be used to cancel the request.\r\n function requestAnimFrame(fn, context, immediate) {\r\n \tif (immediate && requestFn === timeoutDefer) {\r\n \t\tfn.call(context);\r\n \t} else {\r\n \t\treturn requestFn.call(window, bind(fn, context));\r\n \t}\r\n }\r\n\r\n // @function cancelAnimFrame(id: Number): undefined\r\n // Cancels a previous `requestAnimFrame`. See also [window.cancelAnimationFrame](https://developer.mozilla.org/docs/Web/API/window/cancelAnimationFrame).\r\n function cancelAnimFrame(id) {\r\n \tif (id) {\r\n \t\tcancelFn.call(window, id);\r\n \t}\r\n }\n\n var Util = {\n __proto__: null,\n extend: extend,\n create: create$2,\n bind: bind,\n get lastId () { return lastId; },\n stamp: stamp,\n throttle: throttle,\n wrapNum: wrapNum,\n falseFn: falseFn,\n formatNum: formatNum,\n trim: trim,\n splitWords: splitWords,\n setOptions: setOptions,\n getParamString: getParamString,\n template: template,\n isArray: isArray,\n indexOf: indexOf,\n emptyImageUrl: emptyImageUrl,\n requestFn: requestFn,\n cancelFn: cancelFn,\n requestAnimFrame: requestAnimFrame,\n cancelAnimFrame: cancelAnimFrame\n };\n\n // @class Class\r\n // @aka L.Class\r\n\r\n // @section\r\n // @uninheritable\r\n\r\n // Thanks to John Resig and Dean Edwards for inspiration!\r\n\r\n function Class() {}\r\n\r\n Class.extend = function (props) {\r\n\r\n \t// @function extend(props: Object): Function\r\n \t// [Extends the current class](#class-inheritance) given the properties to be included.\r\n \t// Returns a Javascript function that is a class constructor (to be called with `new`).\r\n \tvar NewClass = function () {\r\n\r\n \t\tsetOptions(this);\r\n\r\n \t\t// call the constructor\r\n \t\tif (this.initialize) {\r\n \t\t\tthis.initialize.apply(this, arguments);\r\n \t\t}\r\n\r\n \t\t// call all constructor hooks\r\n \t\tthis.callInitHooks();\r\n \t};\r\n\r\n \tvar parentProto = NewClass.__super__ = this.prototype;\r\n\r\n \tvar proto = create$2(parentProto);\r\n \tproto.constructor = NewClass;\r\n\r\n \tNewClass.prototype = proto;\r\n\r\n \t// inherit parent's statics\r\n \tfor (var i in this) {\r\n \t\tif (Object.prototype.hasOwnProperty.call(this, i) && i !== 'prototype' && i !== '__super__') {\r\n \t\t\tNewClass[i] = this[i];\r\n \t\t}\r\n \t}\r\n\r\n \t// mix static properties into the class\r\n \tif (props.statics) {\r\n \t\textend(NewClass, props.statics);\r\n \t}\r\n\r\n \t// mix includes into the prototype\r\n \tif (props.includes) {\r\n \t\tcheckDeprecatedMixinEvents(props.includes);\r\n \t\textend.apply(null, [proto].concat(props.includes));\r\n \t}\r\n\r\n \t// mix given properties into the prototype\r\n \textend(proto, props);\r\n \tdelete proto.statics;\r\n \tdelete proto.includes;\r\n\r\n \t// merge options\r\n \tif (proto.options) {\r\n \t\tproto.options = parentProto.options ? create$2(parentProto.options) : {};\r\n \t\textend(proto.options, props.options);\r\n \t}\r\n\r\n \tproto._initHooks = [];\r\n\r\n \t// add method for calling all hooks\r\n \tproto.callInitHooks = function () {\r\n\r\n \t\tif (this._initHooksCalled) { return; }\r\n\r\n \t\tif (parentProto.callInitHooks) {\r\n \t\t\tparentProto.callInitHooks.call(this);\r\n \t\t}\r\n\r\n \t\tthis._initHooksCalled = true;\r\n\r\n \t\tfor (var i = 0, len = proto._initHooks.length; i < len; i++) {\r\n \t\t\tproto._initHooks[i].call(this);\r\n \t\t}\r\n \t};\r\n\r\n \treturn NewClass;\r\n };\r\n\r\n\r\n // @function include(properties: Object): this\r\n // [Includes a mixin](#class-includes) into the current class.\r\n Class.include = function (props) {\r\n \tvar parentOptions = this.prototype.options;\r\n \textend(this.prototype, props);\r\n \tif (props.options) {\r\n \t\tthis.prototype.options = parentOptions;\r\n \t\tthis.mergeOptions(props.options);\r\n \t}\r\n \treturn this;\r\n };\r\n\r\n // @function mergeOptions(options: Object): this\r\n // [Merges `options`](#class-options) into the defaults of the class.\r\n Class.mergeOptions = function (options) {\r\n \textend(this.prototype.options, options);\r\n \treturn this;\r\n };\r\n\r\n // @function addInitHook(fn: Function): this\r\n // Adds a [constructor hook](#class-constructor-hooks) to the class.\r\n Class.addInitHook = function (fn) { // (Function) || (String, args...)\r\n \tvar args = Array.prototype.slice.call(arguments, 1);\r\n\r\n \tvar init = typeof fn === 'function' ? fn : function () {\r\n \t\tthis[fn].apply(this, args);\r\n \t};\r\n\r\n \tthis.prototype._initHooks = this.prototype._initHooks || [];\r\n \tthis.prototype._initHooks.push(init);\r\n \treturn this;\r\n };\r\n\r\n function checkDeprecatedMixinEvents(includes) {\r\n \t/* global L: true */\r\n \tif (typeof L === 'undefined' || !L || !L.Mixin) { return; }\r\n\r\n \tincludes = isArray(includes) ? includes : [includes];\r\n\r\n \tfor (var i = 0; i < includes.length; i++) {\r\n \t\tif (includes[i] === L.Mixin.Events) {\r\n \t\t\tconsole.warn('Deprecated include of L.Mixin.Events: ' +\r\n \t\t\t\t'this property will be removed in future releases, ' +\r\n \t\t\t\t'please inherit from L.Evented instead.', new Error().stack);\r\n \t\t}\r\n \t}\r\n }\n\n /*\r\n * @class Evented\r\n * @aka L.Evented\r\n * @inherits Class\r\n *\r\n * A set of methods shared between event-powered classes (like `Map` and `Marker`). Generally, events allow you to execute some function when something happens with an object (e.g. the user clicks on the map, causing the map to fire `'click'` event).\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * map.on('click', function(e) {\r\n * \talert(e.latlng);\r\n * } );\r\n * ```\r\n *\r\n * Leaflet deals with event listeners by reference, so if you want to add a listener and then remove it, define it as a function:\r\n *\r\n * ```js\r\n * function onClick(e) { ... }\r\n *\r\n * map.on('click', onClick);\r\n * map.off('click', onClick);\r\n * ```\r\n */\r\n\r\n var Events = {\r\n \t/* @method on(type: String, fn: Function, context?: Object): this\r\n \t * Adds a listener function (`fn`) to a particular event type of the object. You can optionally specify the context of the listener (object the this keyword will point to). You can also pass several space-separated types (e.g. `'click dblclick'`).\r\n \t *\r\n \t * @alternative\r\n \t * @method on(eventMap: Object): this\r\n \t * Adds a set of type/listener pairs, e.g. `{click: onClick, mousemove: onMouseMove}`\r\n \t */\r\n \ton: function (types, fn, context) {\r\n\r\n \t\t// types can be a map of types/handlers\r\n \t\tif (typeof types === 'object') {\r\n \t\t\tfor (var type in types) {\r\n \t\t\t\t// we don't process space-separated events here for performance;\r\n \t\t\t\t// it's a hot path since Layer uses the on(obj) syntax\r\n \t\t\t\tthis._on(type, types[type], fn);\r\n \t\t\t}\r\n\r\n \t\t} else {\r\n \t\t\t// types can be a string of space-separated words\r\n \t\t\ttypes = splitWords(types);\r\n\r\n \t\t\tfor (var i = 0, len = types.length; i < len; i++) {\r\n \t\t\t\tthis._on(types[i], fn, context);\r\n \t\t\t}\r\n \t\t}\r\n\r\n \t\treturn this;\r\n \t},\r\n\r\n \t/* @method off(type: String, fn?: Function, context?: Object): this\r\n \t * Removes a previously added listener function. If no function is specified, it will remove all the listeners of that particular event from the object. Note that if you passed a custom context to `on`, you must pass the same context to `off` in order to remove the listener.\r\n \t *\r\n \t * @alternative\r\n \t * @method off(eventMap: Object): this\r\n \t * Removes a set of type/listener pairs.\r\n \t *\r\n \t * @alternative\r\n \t * @method off: this\r\n \t * Removes all listeners to all events on the object. This includes implicitly attached events.\r\n \t */\r\n \toff: function (types, fn, context) {\r\n\r\n \t\tif (!arguments.length) {\r\n \t\t\t// clear all listeners if called without arguments\r\n \t\t\tdelete this._events;\r\n\r\n \t\t} else if (typeof types === 'object') {\r\n \t\t\tfor (var type in types) {\r\n \t\t\t\tthis._off(type, types[type], fn);\r\n \t\t\t}\r\n\r\n \t\t} else {\r\n \t\t\ttypes = splitWords(types);\r\n\r\n \t\t\tvar removeAll = arguments.length === 1;\r\n \t\t\tfor (var i = 0, len = types.length; i < len; i++) {\r\n \t\t\t\tif (removeAll) {\r\n \t\t\t\t\tthis._off(types[i]);\r\n \t\t\t\t} else {\r\n \t\t\t\t\tthis._off(types[i], fn, context);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// attach listener (without syntactic sugar now)\r\n \t_on: function (type, fn, context, _once) {\r\n \t\tif (typeof fn !== 'function') {\r\n \t\t\tconsole.warn('wrong listener type: ' + typeof fn);\r\n \t\t\treturn;\r\n \t\t}\r\n\r\n \t\t// check if fn already there\r\n \t\tif (this._listens(type, fn, context) !== false) {\r\n \t\t\treturn;\r\n \t\t}\r\n\r\n \t\tif (context === this) {\r\n \t\t\t// Less memory footprint.\r\n \t\t\tcontext = undefined;\r\n \t\t}\r\n\r\n \t\tvar newListener = {fn: fn, ctx: context};\r\n \t\tif (_once) {\r\n \t\t\tnewListener.once = true;\r\n \t\t}\r\n\r\n \t\tthis._events = this._events || {};\r\n \t\tthis._events[type] = this._events[type] || [];\r\n \t\tthis._events[type].push(newListener);\r\n \t},\r\n\r\n \t_off: function (type, fn, context) {\r\n \t\tvar listeners,\r\n \t\t i,\r\n \t\t len;\r\n\r\n \t\tif (!this._events) {\r\n \t\t\treturn;\r\n \t\t}\r\n\r\n \t\tlisteners = this._events[type];\r\n \t\tif (!listeners) {\r\n \t\t\treturn;\r\n \t\t}\r\n\r\n \t\tif (arguments.length === 1) { // remove all\r\n \t\t\tif (this._firingCount) {\r\n \t\t\t\t// Set all removed listeners to noop\r\n \t\t\t\t// so they are not called if remove happens in fire\r\n \t\t\t\tfor (i = 0, len = listeners.length; i < len; i++) {\r\n \t\t\t\t\tlisteners[i].fn = falseFn;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\t// clear all listeners for a type if function isn't specified\r\n \t\t\tdelete this._events[type];\r\n \t\t\treturn;\r\n \t\t}\r\n\r\n \t\tif (typeof fn !== 'function') {\r\n \t\t\tconsole.warn('wrong listener type: ' + typeof fn);\r\n \t\t\treturn;\r\n \t\t}\r\n\r\n \t\t// find fn and remove it\r\n \t\tvar index = this._listens(type, fn, context);\r\n \t\tif (index !== false) {\r\n \t\t\tvar listener = listeners[index];\r\n \t\t\tif (this._firingCount) {\r\n \t\t\t\t// set the removed listener to noop so that's not called if remove happens in fire\r\n \t\t\t\tlistener.fn = falseFn;\r\n\r\n \t\t\t\t/* copy array in case events are being fired */\r\n \t\t\t\tthis._events[type] = listeners = listeners.slice();\r\n \t\t\t}\r\n \t\t\tlisteners.splice(index, 1);\r\n \t\t}\r\n \t},\r\n\r\n \t// @method fire(type: String, data?: Object, propagate?: Boolean): this\r\n \t// Fires an event of the specified type. You can optionally provide a data\r\n \t// object — the first argument of the listener function will contain its\r\n \t// properties. The event can optionally be propagated to event parents.\r\n \tfire: function (type, data, propagate) {\r\n \t\tif (!this.listens(type, propagate)) { return this; }\r\n\r\n \t\tvar event = extend({}, data, {\r\n \t\t\ttype: type,\r\n \t\t\ttarget: this,\r\n \t\t\tsourceTarget: data && data.sourceTarget || this\r\n \t\t});\r\n\r\n \t\tif (this._events) {\r\n \t\t\tvar listeners = this._events[type];\r\n \t\t\tif (listeners) {\r\n \t\t\t\tthis._firingCount = (this._firingCount + 1) || 1;\r\n \t\t\t\tfor (var i = 0, len = listeners.length; i < len; i++) {\r\n \t\t\t\t\tvar l = listeners[i];\r\n \t\t\t\t\t// off overwrites l.fn, so we need to copy fn to a var\r\n \t\t\t\t\tvar fn = l.fn;\r\n \t\t\t\t\tif (l.once) {\r\n \t\t\t\t\t\tthis.off(type, fn, l.ctx);\r\n \t\t\t\t\t}\r\n \t\t\t\t\tfn.call(l.ctx || this, event);\r\n \t\t\t\t}\r\n\r\n \t\t\t\tthis._firingCount--;\r\n \t\t\t}\r\n \t\t}\r\n\r\n \t\tif (propagate) {\r\n \t\t\t// propagate the event to parents (set with addEventParent)\r\n \t\t\tthis._propagateEvent(event);\r\n \t\t}\r\n\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method listens(type: String, propagate?: Boolean): Boolean\r\n \t// @method listens(type: String, fn: Function, context?: Object, propagate?: Boolean): Boolean\r\n \t// Returns `true` if a particular event type has any listeners attached to it.\r\n \t// The verification can optionally be propagated, it will return `true` if parents have the listener attached to it.\r\n \tlistens: function (type, fn, context, propagate) {\r\n \t\tif (typeof type !== 'string') {\r\n \t\t\tconsole.warn('\"string\" type argument expected');\r\n \t\t}\r\n\r\n \t\t// we don't overwrite the input `fn` value, because we need to use it for propagation\r\n \t\tvar _fn = fn;\r\n \t\tif (typeof fn !== 'function') {\r\n \t\t\tpropagate = !!fn;\r\n \t\t\t_fn = undefined;\r\n \t\t\tcontext = undefined;\r\n \t\t}\r\n\r\n \t\tvar listeners = this._events && this._events[type];\r\n \t\tif (listeners && listeners.length) {\r\n \t\t\tif (this._listens(type, _fn, context) !== false) {\r\n \t\t\t\treturn true;\r\n \t\t\t}\r\n \t\t}\r\n\r\n \t\tif (propagate) {\r\n \t\t\t// also check parents for listeners if event propagates\r\n \t\t\tfor (var id in this._eventParents) {\r\n \t\t\t\tif (this._eventParents[id].listens(type, fn, context, propagate)) { return true; }\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn false;\r\n \t},\r\n\r\n \t// returns the index (number) or false\r\n \t_listens: function (type, fn, context) {\r\n \t\tif (!this._events) {\r\n \t\t\treturn false;\r\n \t\t}\r\n\r\n \t\tvar listeners = this._events[type] || [];\r\n \t\tif (!fn) {\r\n \t\t\treturn !!listeners.length;\r\n \t\t}\r\n\r\n \t\tif (context === this) {\r\n \t\t\t// Less memory footprint.\r\n \t\t\tcontext = undefined;\r\n \t\t}\r\n\r\n \t\tfor (var i = 0, len = listeners.length; i < len; i++) {\r\n \t\t\tif (listeners[i].fn === fn && listeners[i].ctx === context) {\r\n \t\t\t\treturn i;\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn false;\r\n\r\n \t},\r\n\r\n \t// @method once(…): this\r\n \t// Behaves as [`on(…)`](#evented-on), except the listener will only get fired once and then removed.\r\n \tonce: function (types, fn, context) {\r\n\r\n \t\t// types can be a map of types/handlers\r\n \t\tif (typeof types === 'object') {\r\n \t\t\tfor (var type in types) {\r\n \t\t\t\t// we don't process space-separated events here for performance;\r\n \t\t\t\t// it's a hot path since Layer uses the on(obj) syntax\r\n \t\t\t\tthis._on(type, types[type], fn, true);\r\n \t\t\t}\r\n\r\n \t\t} else {\r\n \t\t\t// types can be a string of space-separated words\r\n \t\t\ttypes = splitWords(types);\r\n\r\n \t\t\tfor (var i = 0, len = types.length; i < len; i++) {\r\n \t\t\t\tthis._on(types[i], fn, context, true);\r\n \t\t\t}\r\n \t\t}\r\n\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method addEventParent(obj: Evented): this\r\n \t// Adds an event parent - an `Evented` that will receive propagated events\r\n \taddEventParent: function (obj) {\r\n \t\tthis._eventParents = this._eventParents || {};\r\n \t\tthis._eventParents[stamp(obj)] = obj;\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method removeEventParent(obj: Evented): this\r\n \t// Removes an event parent, so it will stop receiving propagated events\r\n \tremoveEventParent: function (obj) {\r\n \t\tif (this._eventParents) {\r\n \t\t\tdelete this._eventParents[stamp(obj)];\r\n \t\t}\r\n \t\treturn this;\r\n \t},\r\n\r\n \t_propagateEvent: function (e) {\r\n \t\tfor (var id in this._eventParents) {\r\n \t\t\tthis._eventParents[id].fire(e.type, extend({\r\n \t\t\t\tlayer: e.target,\r\n \t\t\t\tpropagatedFrom: e.target\r\n \t\t\t}, e), true);\r\n \t\t}\r\n \t}\r\n };\r\n\r\n // aliases; we should ditch those eventually\r\n\r\n // @method addEventListener(…): this\r\n // Alias to [`on(…)`](#evented-on)\r\n Events.addEventListener = Events.on;\r\n\r\n // @method removeEventListener(…): this\r\n // Alias to [`off(…)`](#evented-off)\r\n\r\n // @method clearAllEventListeners(…): this\r\n // Alias to [`off()`](#evented-off)\r\n Events.removeEventListener = Events.clearAllEventListeners = Events.off;\r\n\r\n // @method addOneTimeEventListener(…): this\r\n // Alias to [`once(…)`](#evented-once)\r\n Events.addOneTimeEventListener = Events.once;\r\n\r\n // @method fireEvent(…): this\r\n // Alias to [`fire(…)`](#evented-fire)\r\n Events.fireEvent = Events.fire;\r\n\r\n // @method hasEventListeners(…): Boolean\r\n // Alias to [`listens(…)`](#evented-listens)\r\n Events.hasEventListeners = Events.listens;\r\n\r\n var Evented = Class.extend(Events);\n\n /*\r\n * @class Point\r\n * @aka L.Point\r\n *\r\n * Represents a point with `x` and `y` coordinates in pixels.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var point = L.point(200, 300);\r\n * ```\r\n *\r\n * All Leaflet methods and options that accept `Point` objects also accept them in a simple Array form (unless noted otherwise), so these lines are equivalent:\r\n *\r\n * ```js\r\n * map.panBy([200, 300]);\r\n * map.panBy(L.point(200, 300));\r\n * ```\r\n *\r\n * Note that `Point` does not inherit from Leaflet's `Class` object,\r\n * which means new classes can't inherit from it, and new methods\r\n * can't be added to it with the `include` function.\r\n */\r\n\r\n function Point(x, y, round) {\r\n \t// @property x: Number; The `x` coordinate of the point\r\n \tthis.x = (round ? Math.round(x) : x);\r\n \t// @property y: Number; The `y` coordinate of the point\r\n \tthis.y = (round ? Math.round(y) : y);\r\n }\r\n\r\n var trunc = Math.trunc || function (v) {\r\n \treturn v > 0 ? Math.floor(v) : Math.ceil(v);\r\n };\r\n\r\n Point.prototype = {\r\n\r\n \t// @method clone(): Point\r\n \t// Returns a copy of the current point.\r\n \tclone: function () {\r\n \t\treturn new Point(this.x, this.y);\r\n \t},\r\n\r\n \t// @method add(otherPoint: Point): Point\r\n \t// Returns the result of addition of the current and the given points.\r\n \tadd: function (point) {\r\n \t\t// non-destructive, returns a new point\r\n \t\treturn this.clone()._add(toPoint(point));\r\n \t},\r\n\r\n \t_add: function (point) {\r\n \t\t// destructive, used directly for performance in situations where it's safe to modify existing point\r\n \t\tthis.x += point.x;\r\n \t\tthis.y += point.y;\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method subtract(otherPoint: Point): Point\r\n \t// Returns the result of subtraction of the given point from the current.\r\n \tsubtract: function (point) {\r\n \t\treturn this.clone()._subtract(toPoint(point));\r\n \t},\r\n\r\n \t_subtract: function (point) {\r\n \t\tthis.x -= point.x;\r\n \t\tthis.y -= point.y;\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method divideBy(num: Number): Point\r\n \t// Returns the result of division of the current point by the given number.\r\n \tdivideBy: function (num) {\r\n \t\treturn this.clone()._divideBy(num);\r\n \t},\r\n\r\n \t_divideBy: function (num) {\r\n \t\tthis.x /= num;\r\n \t\tthis.y /= num;\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method multiplyBy(num: Number): Point\r\n \t// Returns the result of multiplication of the current point by the given number.\r\n \tmultiplyBy: function (num) {\r\n \t\treturn this.clone()._multiplyBy(num);\r\n \t},\r\n\r\n \t_multiplyBy: function (num) {\r\n \t\tthis.x *= num;\r\n \t\tthis.y *= num;\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method scaleBy(scale: Point): Point\r\n \t// Multiply each coordinate of the current point by each coordinate of\r\n \t// `scale`. In linear algebra terms, multiply the point by the\r\n \t// [scaling matrix](https://en.wikipedia.org/wiki/Scaling_%28geometry%29#Matrix_representation)\r\n \t// defined by `scale`.\r\n \tscaleBy: function (point) {\r\n \t\treturn new Point(this.x * point.x, this.y * point.y);\r\n \t},\r\n\r\n \t// @method unscaleBy(scale: Point): Point\r\n \t// Inverse of `scaleBy`. Divide each coordinate of the current point by\r\n \t// each coordinate of `scale`.\r\n \tunscaleBy: function (point) {\r\n \t\treturn new Point(this.x / point.x, this.y / point.y);\r\n \t},\r\n\r\n \t// @method round(): Point\r\n \t// Returns a copy of the current point with rounded coordinates.\r\n \tround: function () {\r\n \t\treturn this.clone()._round();\r\n \t},\r\n\r\n \t_round: function () {\r\n \t\tthis.x = Math.round(this.x);\r\n \t\tthis.y = Math.round(this.y);\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method floor(): Point\r\n \t// Returns a copy of the current point with floored coordinates (rounded down).\r\n \tfloor: function () {\r\n \t\treturn this.clone()._floor();\r\n \t},\r\n\r\n \t_floor: function () {\r\n \t\tthis.x = Math.floor(this.x);\r\n \t\tthis.y = Math.floor(this.y);\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method ceil(): Point\r\n \t// Returns a copy of the current point with ceiled coordinates (rounded up).\r\n \tceil: function () {\r\n \t\treturn this.clone()._ceil();\r\n \t},\r\n\r\n \t_ceil: function () {\r\n \t\tthis.x = Math.ceil(this.x);\r\n \t\tthis.y = Math.ceil(this.y);\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method trunc(): Point\r\n \t// Returns a copy of the current point with truncated coordinates (rounded towards zero).\r\n \ttrunc: function () {\r\n \t\treturn this.clone()._trunc();\r\n \t},\r\n\r\n \t_trunc: function () {\r\n \t\tthis.x = trunc(this.x);\r\n \t\tthis.y = trunc(this.y);\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method distanceTo(otherPoint: Point): Number\r\n \t// Returns the cartesian distance between the current and the given points.\r\n \tdistanceTo: function (point) {\r\n \t\tpoint = toPoint(point);\r\n\r\n \t\tvar x = point.x - this.x,\r\n \t\t y = point.y - this.y;\r\n\r\n \t\treturn Math.sqrt(x * x + y * y);\r\n \t},\r\n\r\n \t// @method equals(otherPoint: Point): Boolean\r\n \t// Returns `true` if the given point has the same coordinates.\r\n \tequals: function (point) {\r\n \t\tpoint = toPoint(point);\r\n\r\n \t\treturn point.x === this.x &&\r\n \t\t point.y === this.y;\r\n \t},\r\n\r\n \t// @method contains(otherPoint: Point): Boolean\r\n \t// Returns `true` if both coordinates of the given point are less than the corresponding current point coordinates (in absolute values).\r\n \tcontains: function (point) {\r\n \t\tpoint = toPoint(point);\r\n\r\n \t\treturn Math.abs(point.x) <= Math.abs(this.x) &&\r\n \t\t Math.abs(point.y) <= Math.abs(this.y);\r\n \t},\r\n\r\n \t// @method toString(): String\r\n \t// Returns a string representation of the point for debugging purposes.\r\n \ttoString: function () {\r\n \t\treturn 'Point(' +\r\n \t\t formatNum(this.x) + ', ' +\r\n \t\t formatNum(this.y) + ')';\r\n \t}\r\n };\r\n\r\n // @factory L.point(x: Number, y: Number, round?: Boolean)\r\n // Creates a Point object with the given `x` and `y` coordinates. If optional `round` is set to true, rounds the `x` and `y` values.\r\n\r\n // @alternative\r\n // @factory L.point(coords: Number[])\r\n // Expects an array of the form `[x, y]` instead.\r\n\r\n // @alternative\r\n // @factory L.point(coords: Object)\r\n // Expects a plain object of the form `{x: Number, y: Number}` instead.\r\n function toPoint(x, y, round) {\r\n \tif (x instanceof Point) {\r\n \t\treturn x;\r\n \t}\r\n \tif (isArray(x)) {\r\n \t\treturn new Point(x[0], x[1]);\r\n \t}\r\n \tif (x === undefined || x === null) {\r\n \t\treturn x;\r\n \t}\r\n \tif (typeof x === 'object' && 'x' in x && 'y' in x) {\r\n \t\treturn new Point(x.x, x.y);\r\n \t}\r\n \treturn new Point(x, y, round);\r\n }\n\n /*\r\n * @class Bounds\r\n * @aka L.Bounds\r\n *\r\n * Represents a rectangular area in pixel coordinates.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var p1 = L.point(10, 10),\r\n * p2 = L.point(40, 60),\r\n * bounds = L.bounds(p1, p2);\r\n * ```\r\n *\r\n * All Leaflet methods that accept `Bounds` objects also accept them in a simple Array form (unless noted otherwise), so the bounds example above can be passed like this:\r\n *\r\n * ```js\r\n * otherBounds.intersects([[10, 10], [40, 60]]);\r\n * ```\r\n *\r\n * Note that `Bounds` does not inherit from Leaflet's `Class` object,\r\n * which means new classes can't inherit from it, and new methods\r\n * can't be added to it with the `include` function.\r\n */\r\n\r\n function Bounds(a, b) {\r\n \tif (!a) { return; }\r\n\r\n \tvar points = b ? [a, b] : a;\r\n\r\n \tfor (var i = 0, len = points.length; i < len; i++) {\r\n \t\tthis.extend(points[i]);\r\n \t}\r\n }\r\n\r\n Bounds.prototype = {\r\n \t// @method extend(point: Point): this\r\n \t// Extends the bounds to contain the given point.\r\n\r\n \t// @alternative\r\n \t// @method extend(otherBounds: Bounds): this\r\n \t// Extend the bounds to contain the given bounds\r\n \textend: function (obj) {\r\n \t\tvar min2, max2;\r\n \t\tif (!obj) { return this; }\r\n\r\n \t\tif (obj instanceof Point || typeof obj[0] === 'number' || 'x' in obj) {\r\n \t\t\tmin2 = max2 = toPoint(obj);\r\n \t\t} else {\r\n \t\t\tobj = toBounds(obj);\r\n \t\t\tmin2 = obj.min;\r\n \t\t\tmax2 = obj.max;\r\n\r\n \t\t\tif (!min2 || !max2) { return this; }\r\n \t\t}\r\n\r\n \t\t// @property min: Point\r\n \t\t// The top left corner of the rectangle.\r\n \t\t// @property max: Point\r\n \t\t// The bottom right corner of the rectangle.\r\n \t\tif (!this.min && !this.max) {\r\n \t\t\tthis.min = min2.clone();\r\n \t\t\tthis.max = max2.clone();\r\n \t\t} else {\r\n \t\t\tthis.min.x = Math.min(min2.x, this.min.x);\r\n \t\t\tthis.max.x = Math.max(max2.x, this.max.x);\r\n \t\t\tthis.min.y = Math.min(min2.y, this.min.y);\r\n \t\t\tthis.max.y = Math.max(max2.y, this.max.y);\r\n \t\t}\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method getCenter(round?: Boolean): Point\r\n \t// Returns the center point of the bounds.\r\n \tgetCenter: function (round) {\r\n \t\treturn toPoint(\r\n \t\t (this.min.x + this.max.x) / 2,\r\n \t\t (this.min.y + this.max.y) / 2, round);\r\n \t},\r\n\r\n \t// @method getBottomLeft(): Point\r\n \t// Returns the bottom-left point of the bounds.\r\n \tgetBottomLeft: function () {\r\n \t\treturn toPoint(this.min.x, this.max.y);\r\n \t},\r\n\r\n \t// @method getTopRight(): Point\r\n \t// Returns the top-right point of the bounds.\r\n \tgetTopRight: function () { // -> Point\r\n \t\treturn toPoint(this.max.x, this.min.y);\r\n \t},\r\n\r\n \t// @method getTopLeft(): Point\r\n \t// Returns the top-left point of the bounds (i.e. [`this.min`](#bounds-min)).\r\n \tgetTopLeft: function () {\r\n \t\treturn this.min; // left, top\r\n \t},\r\n\r\n \t// @method getBottomRight(): Point\r\n \t// Returns the bottom-right point of the bounds (i.e. [`this.max`](#bounds-max)).\r\n \tgetBottomRight: function () {\r\n \t\treturn this.max; // right, bottom\r\n \t},\r\n\r\n \t// @method getSize(): Point\r\n \t// Returns the size of the given bounds\r\n \tgetSize: function () {\r\n \t\treturn this.max.subtract(this.min);\r\n \t},\r\n\r\n \t// @method contains(otherBounds: Bounds): Boolean\r\n \t// Returns `true` if the rectangle contains the given one.\r\n \t// @alternative\r\n \t// @method contains(point: Point): Boolean\r\n \t// Returns `true` if the rectangle contains the given point.\r\n \tcontains: function (obj) {\r\n \t\tvar min, max;\r\n\r\n \t\tif (typeof obj[0] === 'number' || obj instanceof Point) {\r\n \t\t\tobj = toPoint(obj);\r\n \t\t} else {\r\n \t\t\tobj = toBounds(obj);\r\n \t\t}\r\n\r\n \t\tif (obj instanceof Bounds) {\r\n \t\t\tmin = obj.min;\r\n \t\t\tmax = obj.max;\r\n \t\t} else {\r\n \t\t\tmin = max = obj;\r\n \t\t}\r\n\r\n \t\treturn (min.x >= this.min.x) &&\r\n \t\t (max.x <= this.max.x) &&\r\n \t\t (min.y >= this.min.y) &&\r\n \t\t (max.y <= this.max.y);\r\n \t},\r\n\r\n \t// @method intersects(otherBounds: Bounds): Boolean\r\n \t// Returns `true` if the rectangle intersects the given bounds. Two bounds\r\n \t// intersect if they have at least one point in common.\r\n \tintersects: function (bounds) { // (Bounds) -> Boolean\r\n \t\tbounds = toBounds(bounds);\r\n\r\n \t\tvar min = this.min,\r\n \t\t max = this.max,\r\n \t\t min2 = bounds.min,\r\n \t\t max2 = bounds.max,\r\n \t\t xIntersects = (max2.x >= min.x) && (min2.x <= max.x),\r\n \t\t yIntersects = (max2.y >= min.y) && (min2.y <= max.y);\r\n\r\n \t\treturn xIntersects && yIntersects;\r\n \t},\r\n\r\n \t// @method overlaps(otherBounds: Bounds): Boolean\r\n \t// Returns `true` if the rectangle overlaps the given bounds. Two bounds\r\n \t// overlap if their intersection is an area.\r\n \toverlaps: function (bounds) { // (Bounds) -> Boolean\r\n \t\tbounds = toBounds(bounds);\r\n\r\n \t\tvar min = this.min,\r\n \t\t max = this.max,\r\n \t\t min2 = bounds.min,\r\n \t\t max2 = bounds.max,\r\n \t\t xOverlaps = (max2.x > min.x) && (min2.x < max.x),\r\n \t\t yOverlaps = (max2.y > min.y) && (min2.y < max.y);\r\n\r\n \t\treturn xOverlaps && yOverlaps;\r\n \t},\r\n\r\n \t// @method isValid(): Boolean\r\n \t// Returns `true` if the bounds are properly initialized.\r\n \tisValid: function () {\r\n \t\treturn !!(this.min && this.max);\r\n \t},\r\n\r\n\r\n \t// @method pad(bufferRatio: Number): Bounds\r\n \t// Returns bounds created by extending or retracting the current bounds by a given ratio in each direction.\r\n \t// For example, a ratio of 0.5 extends the bounds by 50% in each direction.\r\n \t// Negative values will retract the bounds.\r\n \tpad: function (bufferRatio) {\r\n \t\tvar min = this.min,\r\n \t\tmax = this.max,\r\n \t\theightBuffer = Math.abs(min.x - max.x) * bufferRatio,\r\n \t\twidthBuffer = Math.abs(min.y - max.y) * bufferRatio;\r\n\r\n\r\n \t\treturn toBounds(\r\n \t\t\ttoPoint(min.x - heightBuffer, min.y - widthBuffer),\r\n \t\t\ttoPoint(max.x + heightBuffer, max.y + widthBuffer));\r\n \t},\r\n\r\n\r\n \t// @method equals(otherBounds: Bounds): Boolean\r\n \t// Returns `true` if the rectangle is equivalent to the given bounds.\r\n \tequals: function (bounds) {\r\n \t\tif (!bounds) { return false; }\r\n\r\n \t\tbounds = toBounds(bounds);\r\n\r\n \t\treturn this.min.equals(bounds.getTopLeft()) &&\r\n \t\t\tthis.max.equals(bounds.getBottomRight());\r\n \t},\r\n };\r\n\r\n\r\n // @factory L.bounds(corner1: Point, corner2: Point)\r\n // Creates a Bounds object from two corners coordinate pairs.\r\n // @alternative\r\n // @factory L.bounds(points: Point[])\r\n // Creates a Bounds object from the given array of points.\r\n function toBounds(a, b) {\r\n \tif (!a || a instanceof Bounds) {\r\n \t\treturn a;\r\n \t}\r\n \treturn new Bounds(a, b);\r\n }\n\n /*\r\n * @class LatLngBounds\r\n * @aka L.LatLngBounds\r\n *\r\n * Represents a rectangular geographical area on a map.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var corner1 = L.latLng(40.712, -74.227),\r\n * corner2 = L.latLng(40.774, -74.125),\r\n * bounds = L.latLngBounds(corner1, corner2);\r\n * ```\r\n *\r\n * All Leaflet methods that accept LatLngBounds objects also accept them in a simple Array form (unless noted otherwise), so the bounds example above can be passed like this:\r\n *\r\n * ```js\r\n * map.fitBounds([\r\n * \t[40.712, -74.227],\r\n * \t[40.774, -74.125]\r\n * ]);\r\n * ```\r\n *\r\n * Caution: if the area crosses the antimeridian (often confused with the International Date Line), you must specify corners _outside_ the [-180, 180] degrees longitude range.\r\n *\r\n * Note that `LatLngBounds` does not inherit from Leaflet's `Class` object,\r\n * which means new classes can't inherit from it, and new methods\r\n * can't be added to it with the `include` function.\r\n */\r\n\r\n function LatLngBounds(corner1, corner2) { // (LatLng, LatLng) or (LatLng[])\r\n \tif (!corner1) { return; }\r\n\r\n \tvar latlngs = corner2 ? [corner1, corner2] : corner1;\r\n\r\n \tfor (var i = 0, len = latlngs.length; i < len; i++) {\r\n \t\tthis.extend(latlngs[i]);\r\n \t}\r\n }\r\n\r\n LatLngBounds.prototype = {\r\n\r\n \t// @method extend(latlng: LatLng): this\r\n \t// Extend the bounds to contain the given point\r\n\r\n \t// @alternative\r\n \t// @method extend(otherBounds: LatLngBounds): this\r\n \t// Extend the bounds to contain the given bounds\r\n \textend: function (obj) {\r\n \t\tvar sw = this._southWest,\r\n \t\t ne = this._northEast,\r\n \t\t sw2, ne2;\r\n\r\n \t\tif (obj instanceof LatLng) {\r\n \t\t\tsw2 = obj;\r\n \t\t\tne2 = obj;\r\n\r\n \t\t} else if (obj instanceof LatLngBounds) {\r\n \t\t\tsw2 = obj._southWest;\r\n \t\t\tne2 = obj._northEast;\r\n\r\n \t\t\tif (!sw2 || !ne2) { return this; }\r\n\r\n \t\t} else {\r\n \t\t\treturn obj ? this.extend(toLatLng(obj) || toLatLngBounds(obj)) : this;\r\n \t\t}\r\n\r\n \t\tif (!sw && !ne) {\r\n \t\t\tthis._southWest = new LatLng(sw2.lat, sw2.lng);\r\n \t\t\tthis._northEast = new LatLng(ne2.lat, ne2.lng);\r\n \t\t} else {\r\n \t\t\tsw.lat = Math.min(sw2.lat, sw.lat);\r\n \t\t\tsw.lng = Math.min(sw2.lng, sw.lng);\r\n \t\t\tne.lat = Math.max(ne2.lat, ne.lat);\r\n \t\t\tne.lng = Math.max(ne2.lng, ne.lng);\r\n \t\t}\r\n\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method pad(bufferRatio: Number): LatLngBounds\r\n \t// Returns bounds created by extending or retracting the current bounds by a given ratio in each direction.\r\n \t// For example, a ratio of 0.5 extends the bounds by 50% in each direction.\r\n \t// Negative values will retract the bounds.\r\n \tpad: function (bufferRatio) {\r\n \t\tvar sw = this._southWest,\r\n \t\t ne = this._northEast,\r\n \t\t heightBuffer = Math.abs(sw.lat - ne.lat) * bufferRatio,\r\n \t\t widthBuffer = Math.abs(sw.lng - ne.lng) * bufferRatio;\r\n\r\n \t\treturn new LatLngBounds(\r\n \t\t new LatLng(sw.lat - heightBuffer, sw.lng - widthBuffer),\r\n \t\t new LatLng(ne.lat + heightBuffer, ne.lng + widthBuffer));\r\n \t},\r\n\r\n \t// @method getCenter(): LatLng\r\n \t// Returns the center point of the bounds.\r\n \tgetCenter: function () {\r\n \t\treturn new LatLng(\r\n \t\t (this._southWest.lat + this._northEast.lat) / 2,\r\n \t\t (this._southWest.lng + this._northEast.lng) / 2);\r\n \t},\r\n\r\n \t// @method getSouthWest(): LatLng\r\n \t// Returns the south-west point of the bounds.\r\n \tgetSouthWest: function () {\r\n \t\treturn this._southWest;\r\n \t},\r\n\r\n \t// @method getNorthEast(): LatLng\r\n \t// Returns the north-east point of the bounds.\r\n \tgetNorthEast: function () {\r\n \t\treturn this._northEast;\r\n \t},\r\n\r\n \t// @method getNorthWest(): LatLng\r\n \t// Returns the north-west point of the bounds.\r\n \tgetNorthWest: function () {\r\n \t\treturn new LatLng(this.getNorth(), this.getWest());\r\n \t},\r\n\r\n \t// @method getSouthEast(): LatLng\r\n \t// Returns the south-east point of the bounds.\r\n \tgetSouthEast: function () {\r\n \t\treturn new LatLng(this.getSouth(), this.getEast());\r\n \t},\r\n\r\n \t// @method getWest(): Number\r\n \t// Returns the west longitude of the bounds\r\n \tgetWest: function () {\r\n \t\treturn this._southWest.lng;\r\n \t},\r\n\r\n \t// @method getSouth(): Number\r\n \t// Returns the south latitude of the bounds\r\n \tgetSouth: function () {\r\n \t\treturn this._southWest.lat;\r\n \t},\r\n\r\n \t// @method getEast(): Number\r\n \t// Returns the east longitude of the bounds\r\n \tgetEast: function () {\r\n \t\treturn this._northEast.lng;\r\n \t},\r\n\r\n \t// @method getNorth(): Number\r\n \t// Returns the north latitude of the bounds\r\n \tgetNorth: function () {\r\n \t\treturn this._northEast.lat;\r\n \t},\r\n\r\n \t// @method contains(otherBounds: LatLngBounds): Boolean\r\n \t// Returns `true` if the rectangle contains the given one.\r\n\r\n \t// @alternative\r\n \t// @method contains (latlng: LatLng): Boolean\r\n \t// Returns `true` if the rectangle contains the given point.\r\n \tcontains: function (obj) { // (LatLngBounds) or (LatLng) -> Boolean\r\n \t\tif (typeof obj[0] === 'number' || obj instanceof LatLng || 'lat' in obj) {\r\n \t\t\tobj = toLatLng(obj);\r\n \t\t} else {\r\n \t\t\tobj = toLatLngBounds(obj);\r\n \t\t}\r\n\r\n \t\tvar sw = this._southWest,\r\n \t\t ne = this._northEast,\r\n \t\t sw2, ne2;\r\n\r\n \t\tif (obj instanceof LatLngBounds) {\r\n \t\t\tsw2 = obj.getSouthWest();\r\n \t\t\tne2 = obj.getNorthEast();\r\n \t\t} else {\r\n \t\t\tsw2 = ne2 = obj;\r\n \t\t}\r\n\r\n \t\treturn (sw2.lat >= sw.lat) && (ne2.lat <= ne.lat) &&\r\n \t\t (sw2.lng >= sw.lng) && (ne2.lng <= ne.lng);\r\n \t},\r\n\r\n \t// @method intersects(otherBounds: LatLngBounds): Boolean\r\n \t// Returns `true` if the rectangle intersects the given bounds. Two bounds intersect if they have at least one point in common.\r\n \tintersects: function (bounds) {\r\n \t\tbounds = toLatLngBounds(bounds);\r\n\r\n \t\tvar sw = this._southWest,\r\n \t\t ne = this._northEast,\r\n \t\t sw2 = bounds.getSouthWest(),\r\n \t\t ne2 = bounds.getNorthEast(),\r\n\r\n \t\t latIntersects = (ne2.lat >= sw.lat) && (sw2.lat <= ne.lat),\r\n \t\t lngIntersects = (ne2.lng >= sw.lng) && (sw2.lng <= ne.lng);\r\n\r\n \t\treturn latIntersects && lngIntersects;\r\n \t},\r\n\r\n \t// @method overlaps(otherBounds: LatLngBounds): Boolean\r\n \t// Returns `true` if the rectangle overlaps the given bounds. Two bounds overlap if their intersection is an area.\r\n \toverlaps: function (bounds) {\r\n \t\tbounds = toLatLngBounds(bounds);\r\n\r\n \t\tvar sw = this._southWest,\r\n \t\t ne = this._northEast,\r\n \t\t sw2 = bounds.getSouthWest(),\r\n \t\t ne2 = bounds.getNorthEast(),\r\n\r\n \t\t latOverlaps = (ne2.lat > sw.lat) && (sw2.lat < ne.lat),\r\n \t\t lngOverlaps = (ne2.lng > sw.lng) && (sw2.lng < ne.lng);\r\n\r\n \t\treturn latOverlaps && lngOverlaps;\r\n \t},\r\n\r\n \t// @method toBBoxString(): String\r\n \t// Returns a string with bounding box coordinates in a 'southwest_lng,southwest_lat,northeast_lng,northeast_lat' format. Useful for sending requests to web services that return geo data.\r\n \ttoBBoxString: function () {\r\n \t\treturn [this.getWest(), this.getSouth(), this.getEast(), this.getNorth()].join(',');\r\n \t},\r\n\r\n \t// @method equals(otherBounds: LatLngBounds, maxMargin?: Number): Boolean\r\n \t// Returns `true` if the rectangle is equivalent (within a small margin of error) to the given bounds. The margin of error can be overridden by setting `maxMargin` to a small number.\r\n \tequals: function (bounds, maxMargin) {\r\n \t\tif (!bounds) { return false; }\r\n\r\n \t\tbounds = toLatLngBounds(bounds);\r\n\r\n \t\treturn this._southWest.equals(bounds.getSouthWest(), maxMargin) &&\r\n \t\t this._northEast.equals(bounds.getNorthEast(), maxMargin);\r\n \t},\r\n\r\n \t// @method isValid(): Boolean\r\n \t// Returns `true` if the bounds are properly initialized.\r\n \tisValid: function () {\r\n \t\treturn !!(this._southWest && this._northEast);\r\n \t}\r\n };\r\n\r\n // TODO International date line?\r\n\r\n // @factory L.latLngBounds(corner1: LatLng, corner2: LatLng)\r\n // Creates a `LatLngBounds` object by defining two diagonally opposite corners of the rectangle.\r\n\r\n // @alternative\r\n // @factory L.latLngBounds(latlngs: LatLng[])\r\n // Creates a `LatLngBounds` object defined by the geographical points it contains. Very useful for zooming the map to fit a particular set of locations with [`fitBounds`](#map-fitbounds).\r\n function toLatLngBounds(a, b) {\r\n \tif (a instanceof LatLngBounds) {\r\n \t\treturn a;\r\n \t}\r\n \treturn new LatLngBounds(a, b);\r\n }\n\n /* @class LatLng\r\n * @aka L.LatLng\r\n *\r\n * Represents a geographical point with a certain latitude and longitude.\r\n *\r\n * @example\r\n *\r\n * ```\r\n * var latlng = L.latLng(50.5, 30.5);\r\n * ```\r\n *\r\n * All Leaflet methods that accept LatLng objects also accept them in a simple Array form and simple object form (unless noted otherwise), so these lines are equivalent:\r\n *\r\n * ```\r\n * map.panTo([50, 30]);\r\n * map.panTo({lon: 30, lat: 50});\r\n * map.panTo({lat: 50, lng: 30});\r\n * map.panTo(L.latLng(50, 30));\r\n * ```\r\n *\r\n * Note that `LatLng` does not inherit from Leaflet's `Class` object,\r\n * which means new classes can't inherit from it, and new methods\r\n * can't be added to it with the `include` function.\r\n */\r\n\r\n function LatLng(lat, lng, alt) {\r\n \tif (isNaN(lat) || isNaN(lng)) {\r\n \t\tthrow new Error('Invalid LatLng object: (' + lat + ', ' + lng + ')');\r\n \t}\r\n\r\n \t// @property lat: Number\r\n \t// Latitude in degrees\r\n \tthis.lat = +lat;\r\n\r\n \t// @property lng: Number\r\n \t// Longitude in degrees\r\n \tthis.lng = +lng;\r\n\r\n \t// @property alt: Number\r\n \t// Altitude in meters (optional)\r\n \tif (alt !== undefined) {\r\n \t\tthis.alt = +alt;\r\n \t}\r\n }\r\n\r\n LatLng.prototype = {\r\n \t// @method equals(otherLatLng: LatLng, maxMargin?: Number): Boolean\r\n \t// Returns `true` if the given `LatLng` point is at the same position (within a small margin of error). The margin of error can be overridden by setting `maxMargin` to a small number.\r\n \tequals: function (obj, maxMargin) {\r\n \t\tif (!obj) { return false; }\r\n\r\n \t\tobj = toLatLng(obj);\r\n\r\n \t\tvar margin = Math.max(\r\n \t\t Math.abs(this.lat - obj.lat),\r\n \t\t Math.abs(this.lng - obj.lng));\r\n\r\n \t\treturn margin <= (maxMargin === undefined ? 1.0E-9 : maxMargin);\r\n \t},\r\n\r\n \t// @method toString(): String\r\n \t// Returns a string representation of the point (for debugging purposes).\r\n \ttoString: function (precision) {\r\n \t\treturn 'LatLng(' +\r\n \t\t formatNum(this.lat, precision) + ', ' +\r\n \t\t formatNum(this.lng, precision) + ')';\r\n \t},\r\n\r\n \t// @method distanceTo(otherLatLng: LatLng): Number\r\n \t// Returns the distance (in meters) to the given `LatLng` calculated using the [Spherical Law of Cosines](https://en.wikipedia.org/wiki/Spherical_law_of_cosines).\r\n \tdistanceTo: function (other) {\r\n \t\treturn Earth.distance(this, toLatLng(other));\r\n \t},\r\n\r\n \t// @method wrap(): LatLng\r\n \t// Returns a new `LatLng` object with the longitude wrapped so it's always between -180 and +180 degrees.\r\n \twrap: function () {\r\n \t\treturn Earth.wrapLatLng(this);\r\n \t},\r\n\r\n \t// @method toBounds(sizeInMeters: Number): LatLngBounds\r\n \t// Returns a new `LatLngBounds` object in which each boundary is `sizeInMeters/2` meters apart from the `LatLng`.\r\n \ttoBounds: function (sizeInMeters) {\r\n \t\tvar latAccuracy = 180 * sizeInMeters / 40075017,\r\n \t\t lngAccuracy = latAccuracy / Math.cos((Math.PI / 180) * this.lat);\r\n\r\n \t\treturn toLatLngBounds(\r\n \t\t [this.lat - latAccuracy, this.lng - lngAccuracy],\r\n \t\t [this.lat + latAccuracy, this.lng + lngAccuracy]);\r\n \t},\r\n\r\n \tclone: function () {\r\n \t\treturn new LatLng(this.lat, this.lng, this.alt);\r\n \t}\r\n };\r\n\r\n\r\n\r\n // @factory L.latLng(latitude: Number, longitude: Number, altitude?: Number): LatLng\r\n // Creates an object representing a geographical point with the given latitude and longitude (and optionally altitude).\r\n\r\n // @alternative\r\n // @factory L.latLng(coords: Array): LatLng\r\n // Expects an array of the form `[Number, Number]` or `[Number, Number, Number]` instead.\r\n\r\n // @alternative\r\n // @factory L.latLng(coords: Object): LatLng\r\n // Expects an plain object of the form `{lat: Number, lng: Number}` or `{lat: Number, lng: Number, alt: Number}` instead.\r\n\r\n function toLatLng(a, b, c) {\r\n \tif (a instanceof LatLng) {\r\n \t\treturn a;\r\n \t}\r\n \tif (isArray(a) && typeof a[0] !== 'object') {\r\n \t\tif (a.length === 3) {\r\n \t\t\treturn new LatLng(a[0], a[1], a[2]);\r\n \t\t}\r\n \t\tif (a.length === 2) {\r\n \t\t\treturn new LatLng(a[0], a[1]);\r\n \t\t}\r\n \t\treturn null;\r\n \t}\r\n \tif (a === undefined || a === null) {\r\n \t\treturn a;\r\n \t}\r\n \tif (typeof a === 'object' && 'lat' in a) {\r\n \t\treturn new LatLng(a.lat, 'lng' in a ? a.lng : a.lon, a.alt);\r\n \t}\r\n \tif (b === undefined) {\r\n \t\treturn null;\r\n \t}\r\n \treturn new LatLng(a, b, c);\r\n }\n\n /*\r\n * @namespace CRS\r\n * @crs L.CRS.Base\r\n * Object that defines coordinate reference systems for projecting\r\n * geographical points into pixel (screen) coordinates and back (and to\r\n * coordinates in other units for [WMS](https://en.wikipedia.org/wiki/Web_Map_Service) services). See\r\n * [spatial reference system](https://en.wikipedia.org/wiki/Spatial_reference_system).\r\n *\r\n * Leaflet defines the most usual CRSs by default. If you want to use a\r\n * CRS not defined by default, take a look at the\r\n * [Proj4Leaflet](https://github.com/kartena/Proj4Leaflet) plugin.\r\n *\r\n * Note that the CRS instances do not inherit from Leaflet's `Class` object,\r\n * and can't be instantiated. Also, new classes can't inherit from them,\r\n * and methods can't be added to them with the `include` function.\r\n */\r\n\r\n var CRS = {\r\n \t// @method latLngToPoint(latlng: LatLng, zoom: Number): Point\r\n \t// Projects geographical coordinates into pixel coordinates for a given zoom.\r\n \tlatLngToPoint: function (latlng, zoom) {\r\n \t\tvar projectedPoint = this.projection.project(latlng),\r\n \t\t scale = this.scale(zoom);\r\n\r\n \t\treturn this.transformation._transform(projectedPoint, scale);\r\n \t},\r\n\r\n \t// @method pointToLatLng(point: Point, zoom: Number): LatLng\r\n \t// The inverse of `latLngToPoint`. Projects pixel coordinates on a given\r\n \t// zoom into geographical coordinates.\r\n \tpointToLatLng: function (point, zoom) {\r\n \t\tvar scale = this.scale(zoom),\r\n \t\t untransformedPoint = this.transformation.untransform(point, scale);\r\n\r\n \t\treturn this.projection.unproject(untransformedPoint);\r\n \t},\r\n\r\n \t// @method project(latlng: LatLng): Point\r\n \t// Projects geographical coordinates into coordinates in units accepted for\r\n \t// this CRS (e.g. meters for EPSG:3857, for passing it to WMS services).\r\n \tproject: function (latlng) {\r\n \t\treturn this.projection.project(latlng);\r\n \t},\r\n\r\n \t// @method unproject(point: Point): LatLng\r\n \t// Given a projected coordinate returns the corresponding LatLng.\r\n \t// The inverse of `project`.\r\n \tunproject: function (point) {\r\n \t\treturn this.projection.unproject(point);\r\n \t},\r\n\r\n \t// @method scale(zoom: Number): Number\r\n \t// Returns the scale used when transforming projected coordinates into\r\n \t// pixel coordinates for a particular zoom. For example, it returns\r\n \t// `256 * 2^zoom` for Mercator-based CRS.\r\n \tscale: function (zoom) {\r\n \t\treturn 256 * Math.pow(2, zoom);\r\n \t},\r\n\r\n \t// @method zoom(scale: Number): Number\r\n \t// Inverse of `scale()`, returns the zoom level corresponding to a scale\r\n \t// factor of `scale`.\r\n \tzoom: function (scale) {\r\n \t\treturn Math.log(scale / 256) / Math.LN2;\r\n \t},\r\n\r\n \t// @method getProjectedBounds(zoom: Number): Bounds\r\n \t// Returns the projection's bounds scaled and transformed for the provided `zoom`.\r\n \tgetProjectedBounds: function (zoom) {\r\n \t\tif (this.infinite) { return null; }\r\n\r\n \t\tvar b = this.projection.bounds,\r\n \t\t s = this.scale(zoom),\r\n \t\t min = this.transformation.transform(b.min, s),\r\n \t\t max = this.transformation.transform(b.max, s);\r\n\r\n \t\treturn new Bounds(min, max);\r\n \t},\r\n\r\n \t// @method distance(latlng1: LatLng, latlng2: LatLng): Number\r\n \t// Returns the distance between two geographical coordinates.\r\n\r\n \t// @property code: String\r\n \t// Standard code name of the CRS passed into WMS services (e.g. `'EPSG:3857'`)\r\n \t//\r\n \t// @property wrapLng: Number[]\r\n \t// An array of two numbers defining whether the longitude (horizontal) coordinate\r\n \t// axis wraps around a given range and how. Defaults to `[-180, 180]` in most\r\n \t// geographical CRSs. If `undefined`, the longitude axis does not wrap around.\r\n \t//\r\n \t// @property wrapLat: Number[]\r\n \t// Like `wrapLng`, but for the latitude (vertical) axis.\r\n\r\n \t// wrapLng: [min, max],\r\n \t// wrapLat: [min, max],\r\n\r\n \t// @property infinite: Boolean\r\n \t// If true, the coordinate space will be unbounded (infinite in both axes)\r\n \tinfinite: false,\r\n\r\n \t// @method wrapLatLng(latlng: LatLng): LatLng\r\n \t// Returns a `LatLng` where lat and lng has been wrapped according to the\r\n \t// CRS's `wrapLat` and `wrapLng` properties, if they are outside the CRS's bounds.\r\n \twrapLatLng: function (latlng) {\r\n \t\tvar lng = this.wrapLng ? wrapNum(latlng.lng, this.wrapLng, true) : latlng.lng,\r\n \t\t lat = this.wrapLat ? wrapNum(latlng.lat, this.wrapLat, true) : latlng.lat,\r\n \t\t alt = latlng.alt;\r\n\r\n \t\treturn new LatLng(lat, lng, alt);\r\n \t},\r\n\r\n \t// @method wrapLatLngBounds(bounds: LatLngBounds): LatLngBounds\r\n \t// Returns a `LatLngBounds` with the same size as the given one, ensuring\r\n \t// that its center is within the CRS's bounds.\r\n \t// Only accepts actual `L.LatLngBounds` instances, not arrays.\r\n \twrapLatLngBounds: function (bounds) {\r\n \t\tvar center = bounds.getCenter(),\r\n \t\t newCenter = this.wrapLatLng(center),\r\n \t\t latShift = center.lat - newCenter.lat,\r\n \t\t lngShift = center.lng - newCenter.lng;\r\n\r\n \t\tif (latShift === 0 && lngShift === 0) {\r\n \t\t\treturn bounds;\r\n \t\t}\r\n\r\n \t\tvar sw = bounds.getSouthWest(),\r\n \t\t ne = bounds.getNorthEast(),\r\n \t\t newSw = new LatLng(sw.lat - latShift, sw.lng - lngShift),\r\n \t\t newNe = new LatLng(ne.lat - latShift, ne.lng - lngShift);\r\n\r\n \t\treturn new LatLngBounds(newSw, newNe);\r\n \t}\r\n };\n\n /*\n * @namespace CRS\n * @crs L.CRS.Earth\n *\n * Serves as the base for CRS that are global such that they cover the earth.\n * Can only be used as the base for other CRS and cannot be used directly,\n * since it does not have a `code`, `projection` or `transformation`. `distance()` returns\n * meters.\n */\n\n var Earth = extend({}, CRS, {\n \twrapLng: [-180, 180],\n\n \t// Mean Earth Radius, as recommended for use by\n \t// the International Union of Geodesy and Geophysics,\n \t// see https://rosettacode.org/wiki/Haversine_formula\n \tR: 6371000,\n\n \t// distance between two geographical points using spherical law of cosines approximation\n \tdistance: function (latlng1, latlng2) {\n \t\tvar rad = Math.PI / 180,\n \t\t lat1 = latlng1.lat * rad,\n \t\t lat2 = latlng2.lat * rad,\n \t\t sinDLat = Math.sin((latlng2.lat - latlng1.lat) * rad / 2),\n \t\t sinDLon = Math.sin((latlng2.lng - latlng1.lng) * rad / 2),\n \t\t a = sinDLat * sinDLat + Math.cos(lat1) * Math.cos(lat2) * sinDLon * sinDLon,\n \t\t c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n \t\treturn this.R * c;\n \t}\n });\n\n /*\r\n * @namespace Projection\r\n * @projection L.Projection.SphericalMercator\r\n *\r\n * Spherical Mercator projection — the most common projection for online maps,\r\n * used by almost all free and commercial tile providers. Assumes that Earth is\r\n * a sphere. Used by the `EPSG:3857` CRS.\r\n */\r\n\r\n var earthRadius = 6378137;\r\n\r\n var SphericalMercator = {\r\n\r\n \tR: earthRadius,\r\n \tMAX_LATITUDE: 85.0511287798,\r\n\r\n \tproject: function (latlng) {\r\n \t\tvar d = Math.PI / 180,\r\n \t\t max = this.MAX_LATITUDE,\r\n \t\t lat = Math.max(Math.min(max, latlng.lat), -max),\r\n \t\t sin = Math.sin(lat * d);\r\n\r\n \t\treturn new Point(\r\n \t\t\tthis.R * latlng.lng * d,\r\n \t\t\tthis.R * Math.log((1 + sin) / (1 - sin)) / 2);\r\n \t},\r\n\r\n \tunproject: function (point) {\r\n \t\tvar d = 180 / Math.PI;\r\n\r\n \t\treturn new LatLng(\r\n \t\t\t(2 * Math.atan(Math.exp(point.y / this.R)) - (Math.PI / 2)) * d,\r\n \t\t\tpoint.x * d / this.R);\r\n \t},\r\n\r\n \tbounds: (function () {\r\n \t\tvar d = earthRadius * Math.PI;\r\n \t\treturn new Bounds([-d, -d], [d, d]);\r\n \t})()\r\n };\n\n /*\r\n * @class Transformation\r\n * @aka L.Transformation\r\n *\r\n * Represents an affine transformation: a set of coefficients `a`, `b`, `c`, `d`\r\n * for transforming a point of a form `(x, y)` into `(a*x + b, c*y + d)` and doing\r\n * the reverse. Used by Leaflet in its projections code.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var transformation = L.transformation(2, 5, -1, 10),\r\n * \tp = L.point(1, 2),\r\n * \tp2 = transformation.transform(p), // L.point(7, 8)\r\n * \tp3 = transformation.untransform(p2); // L.point(1, 2)\r\n * ```\r\n */\r\n\r\n\r\n // factory new L.Transformation(a: Number, b: Number, c: Number, d: Number)\r\n // Creates a `Transformation` object with the given coefficients.\r\n function Transformation(a, b, c, d) {\r\n \tif (isArray(a)) {\r\n \t\t// use array properties\r\n \t\tthis._a = a[0];\r\n \t\tthis._b = a[1];\r\n \t\tthis._c = a[2];\r\n \t\tthis._d = a[3];\r\n \t\treturn;\r\n \t}\r\n \tthis._a = a;\r\n \tthis._b = b;\r\n \tthis._c = c;\r\n \tthis._d = d;\r\n }\r\n\r\n Transformation.prototype = {\r\n \t// @method transform(point: Point, scale?: Number): Point\r\n \t// Returns a transformed point, optionally multiplied by the given scale.\r\n \t// Only accepts actual `L.Point` instances, not arrays.\r\n \ttransform: function (point, scale) { // (Point, Number) -> Point\r\n \t\treturn this._transform(point.clone(), scale);\r\n \t},\r\n\r\n \t// destructive transform (faster)\r\n \t_transform: function (point, scale) {\r\n \t\tscale = scale || 1;\r\n \t\tpoint.x = scale * (this._a * point.x + this._b);\r\n \t\tpoint.y = scale * (this._c * point.y + this._d);\r\n \t\treturn point;\r\n \t},\r\n\r\n \t// @method untransform(point: Point, scale?: Number): Point\r\n \t// Returns the reverse transformation of the given point, optionally divided\r\n \t// by the given scale. Only accepts actual `L.Point` instances, not arrays.\r\n \tuntransform: function (point, scale) {\r\n \t\tscale = scale || 1;\r\n \t\treturn new Point(\r\n \t\t (point.x / scale - this._b) / this._a,\r\n \t\t (point.y / scale - this._d) / this._c);\r\n \t}\r\n };\r\n\r\n // factory L.transformation(a: Number, b: Number, c: Number, d: Number)\r\n\r\n // @factory L.transformation(a: Number, b: Number, c: Number, d: Number)\r\n // Instantiates a Transformation object with the given coefficients.\r\n\r\n // @alternative\r\n // @factory L.transformation(coefficients: Array): Transformation\r\n // Expects an coefficients array of the form\r\n // `[a: Number, b: Number, c: Number, d: Number]`.\r\n\r\n function toTransformation(a, b, c, d) {\r\n \treturn new Transformation(a, b, c, d);\r\n }\n\n /*\r\n * @namespace CRS\r\n * @crs L.CRS.EPSG3857\r\n *\r\n * The most common CRS for online maps, used by almost all free and commercial\r\n * tile providers. Uses Spherical Mercator projection. Set in by default in\r\n * Map's `crs` option.\r\n */\r\n\r\n var EPSG3857 = extend({}, Earth, {\r\n \tcode: 'EPSG:3857',\r\n \tprojection: SphericalMercator,\r\n\r\n \ttransformation: (function () {\r\n \t\tvar scale = 0.5 / (Math.PI * SphericalMercator.R);\r\n \t\treturn toTransformation(scale, 0.5, -scale, 0.5);\r\n \t}())\r\n });\r\n\r\n var EPSG900913 = extend({}, EPSG3857, {\r\n \tcode: 'EPSG:900913'\r\n });\n\n // @namespace SVG; @section\n // There are several static functions which can be called without instantiating L.SVG:\n\n // @function create(name: String): SVGElement\n // Returns a instance of [SVGElement](https://developer.mozilla.org/docs/Web/API/SVGElement),\n // corresponding to the class name passed. For example, using 'line' will return\n // an instance of [SVGLineElement](https://developer.mozilla.org/docs/Web/API/SVGLineElement).\n function svgCreate(name) {\n \treturn document.createElementNS('http://www.w3.org/2000/svg', name);\n }\n\n // @function pointsToPath(rings: Point[], closed: Boolean): String\n // Generates a SVG path string for multiple rings, with each ring turning\n // into \"M..L..L..\" instructions\n function pointsToPath(rings, closed) {\n \tvar str = '',\n \ti, j, len, len2, points, p;\n\n \tfor (i = 0, len = rings.length; i < len; i++) {\n \t\tpoints = rings[i];\n\n \t\tfor (j = 0, len2 = points.length; j < len2; j++) {\n \t\t\tp = points[j];\n \t\t\tstr += (j ? 'L' : 'M') + p.x + ' ' + p.y;\n \t\t}\n\n \t\t// closes the ring for polygons; \"x\" is VML syntax\n \t\tstr += closed ? (Browser.svg ? 'z' : 'x') : '';\n \t}\n\n \t// SVG complains about empty path strings\n \treturn str || 'M0 0';\n }\n\n /*\r\n * @namespace Browser\r\n * @aka L.Browser\r\n *\r\n * A namespace with static properties for browser/feature detection used by Leaflet internally.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * if (L.Browser.ielt9) {\r\n * alert('Upgrade your browser, dude!');\r\n * }\r\n * ```\r\n */\r\n\r\n var style = document.documentElement.style;\r\n\r\n // @property ie: Boolean; `true` for all Internet Explorer versions (not Edge).\r\n var ie = 'ActiveXObject' in window;\r\n\r\n // @property ielt9: Boolean; `true` for Internet Explorer versions less than 9.\r\n var ielt9 = ie && !document.addEventListener;\r\n\r\n // @property edge: Boolean; `true` for the Edge web browser.\r\n var edge = 'msLaunchUri' in navigator && !('documentMode' in document);\r\n\r\n // @property webkit: Boolean;\r\n // `true` for webkit-based browsers like Chrome and Safari (including mobile versions).\r\n var webkit = userAgentContains('webkit');\r\n\r\n // @property android: Boolean\r\n // **Deprecated.** `true` for any browser running on an Android platform.\r\n var android = userAgentContains('android');\r\n\r\n // @property android23: Boolean; **Deprecated.** `true` for browsers running on Android 2 or Android 3.\r\n var android23 = userAgentContains('android 2') || userAgentContains('android 3');\r\n\r\n /* See https://stackoverflow.com/a/17961266 for details on detecting stock Android */\r\n var webkitVer = parseInt(/WebKit\\/([0-9]+)|$/.exec(navigator.userAgent)[1], 10); // also matches AppleWebKit\r\n // @property androidStock: Boolean; **Deprecated.** `true` for the Android stock browser (i.e. not Chrome)\r\n var androidStock = android && userAgentContains('Google') && webkitVer < 537 && !('AudioNode' in window);\r\n\r\n // @property opera: Boolean; `true` for the Opera browser\r\n var opera = !!window.opera;\r\n\r\n // @property chrome: Boolean; `true` for the Chrome browser.\r\n var chrome = !edge && userAgentContains('chrome');\r\n\r\n // @property gecko: Boolean; `true` for gecko-based browsers like Firefox.\r\n var gecko = userAgentContains('gecko') && !webkit && !opera && !ie;\r\n\r\n // @property safari: Boolean; `true` for the Safari browser.\r\n var safari = !chrome && userAgentContains('safari');\r\n\r\n var phantom = userAgentContains('phantom');\r\n\r\n // @property opera12: Boolean\r\n // `true` for the Opera browser supporting CSS transforms (version 12 or later).\r\n var opera12 = 'OTransition' in style;\r\n\r\n // @property win: Boolean; `true` when the browser is running in a Windows platform\r\n var win = navigator.platform.indexOf('Win') === 0;\r\n\r\n // @property ie3d: Boolean; `true` for all Internet Explorer versions supporting CSS transforms.\r\n var ie3d = ie && ('transition' in style);\r\n\r\n // @property webkit3d: Boolean; `true` for webkit-based browsers supporting CSS transforms.\r\n var webkit3d = ('WebKitCSSMatrix' in window) && ('m11' in new window.WebKitCSSMatrix()) && !android23;\r\n\r\n // @property gecko3d: Boolean; `true` for gecko-based browsers supporting CSS transforms.\r\n var gecko3d = 'MozPerspective' in style;\r\n\r\n // @property any3d: Boolean\r\n // `true` for all browsers supporting CSS transforms.\r\n var any3d = !window.L_DISABLE_3D && (ie3d || webkit3d || gecko3d) && !opera12 && !phantom;\r\n\r\n // @property mobile: Boolean; `true` for all browsers running in a mobile device.\r\n var mobile = typeof orientation !== 'undefined' || userAgentContains('mobile');\r\n\r\n // @property mobileWebkit: Boolean; `true` for all webkit-based browsers in a mobile device.\r\n var mobileWebkit = mobile && webkit;\r\n\r\n // @property mobileWebkit3d: Boolean\r\n // `true` for all webkit-based browsers in a mobile device supporting CSS transforms.\r\n var mobileWebkit3d = mobile && webkit3d;\r\n\r\n // @property msPointer: Boolean\r\n // `true` for browsers implementing the Microsoft touch events model (notably IE10).\r\n var msPointer = !window.PointerEvent && window.MSPointerEvent;\r\n\r\n // @property pointer: Boolean\r\n // `true` for all browsers supporting [pointer events](https://msdn.microsoft.com/en-us/library/dn433244%28v=vs.85%29.aspx).\r\n var pointer = !!(window.PointerEvent || msPointer);\r\n\r\n // @property touchNative: Boolean\r\n // `true` for all browsers supporting [touch events](https://developer.mozilla.org/docs/Web/API/Touch_events).\r\n // **This does not necessarily mean** that the browser is running in a computer with\r\n // a touchscreen, it only means that the browser is capable of understanding\r\n // touch events.\r\n var touchNative = 'ontouchstart' in window || !!window.TouchEvent;\r\n\r\n // @property touch: Boolean\r\n // `true` for all browsers supporting either [touch](#browser-touch) or [pointer](#browser-pointer) events.\r\n // Note: pointer events will be preferred (if available), and processed for all `touch*` listeners.\r\n var touch = !window.L_NO_TOUCH && (touchNative || pointer);\r\n\r\n // @property mobileOpera: Boolean; `true` for the Opera browser in a mobile device.\r\n var mobileOpera = mobile && opera;\r\n\r\n // @property mobileGecko: Boolean\r\n // `true` for gecko-based browsers running in a mobile device.\r\n var mobileGecko = mobile && gecko;\r\n\r\n // @property retina: Boolean\r\n // `true` for browsers on a high-resolution \"retina\" screen or on any screen when browser's display zoom is more than 100%.\r\n var retina = (window.devicePixelRatio || (window.screen.deviceXDPI / window.screen.logicalXDPI)) > 1;\r\n\r\n // @property passiveEvents: Boolean\r\n // `true` for browsers that support passive events.\r\n var passiveEvents = (function () {\r\n \tvar supportsPassiveOption = false;\r\n \ttry {\r\n \t\tvar opts = Object.defineProperty({}, 'passive', {\r\n \t\t\tget: function () { // eslint-disable-line getter-return\r\n \t\t\t\tsupportsPassiveOption = true;\r\n \t\t\t}\r\n \t\t});\r\n \t\twindow.addEventListener('testPassiveEventSupport', falseFn, opts);\r\n \t\twindow.removeEventListener('testPassiveEventSupport', falseFn, opts);\r\n \t} catch (e) {\r\n \t\t// Errors can safely be ignored since this is only a browser support test.\r\n \t}\r\n \treturn supportsPassiveOption;\r\n }());\r\n\r\n // @property canvas: Boolean\r\n // `true` when the browser supports [`<canvas>`](https://developer.mozilla.org/docs/Web/API/Canvas_API).\r\n var canvas$1 = (function () {\r\n \treturn !!document.createElement('canvas').getContext;\r\n }());\r\n\r\n // @property svg: Boolean\r\n // `true` when the browser supports [SVG](https://developer.mozilla.org/docs/Web/SVG).\r\n var svg$1 = !!(document.createElementNS && svgCreate('svg').createSVGRect);\r\n\r\n var inlineSvg = !!svg$1 && (function () {\r\n \tvar div = document.createElement('div');\r\n \tdiv.innerHTML = '<svg/>';\r\n \treturn (div.firstChild && div.firstChild.namespaceURI) === 'http://www.w3.org/2000/svg';\r\n })();\r\n\r\n // @property vml: Boolean\r\n // `true` if the browser supports [VML](https://en.wikipedia.org/wiki/Vector_Markup_Language).\r\n var vml = !svg$1 && (function () {\r\n \ttry {\r\n \t\tvar div = document.createElement('div');\r\n \t\tdiv.innerHTML = '<v:shape adj=\"1\"/>';\r\n\r\n \t\tvar shape = div.firstChild;\r\n \t\tshape.style.behavior = 'url(#default#VML)';\r\n\r\n \t\treturn shape && (typeof shape.adj === 'object');\r\n\r\n \t} catch (e) {\r\n \t\treturn false;\r\n \t}\r\n }());\r\n\r\n\r\n // @property mac: Boolean; `true` when the browser is running in a Mac platform\r\n var mac = navigator.platform.indexOf('Mac') === 0;\r\n\r\n // @property mac: Boolean; `true` when the browser is running in a Linux platform\r\n var linux = navigator.platform.indexOf('Linux') === 0;\r\n\r\n function userAgentContains(str) {\r\n \treturn navigator.userAgent.toLowerCase().indexOf(str) >= 0;\r\n }\r\n\r\n\r\n var Browser = {\r\n \tie: ie,\r\n \tielt9: ielt9,\r\n \tedge: edge,\r\n \twebkit: webkit,\r\n \tandroid: android,\r\n \tandroid23: android23,\r\n \tandroidStock: androidStock,\r\n \topera: opera,\r\n \tchrome: chrome,\r\n \tgecko: gecko,\r\n \tsafari: safari,\r\n \tphantom: phantom,\r\n \topera12: opera12,\r\n \twin: win,\r\n \tie3d: ie3d,\r\n \twebkit3d: webkit3d,\r\n \tgecko3d: gecko3d,\r\n \tany3d: any3d,\r\n \tmobile: mobile,\r\n \tmobileWebkit: mobileWebkit,\r\n \tmobileWebkit3d: mobileWebkit3d,\r\n \tmsPointer: msPointer,\r\n \tpointer: pointer,\r\n \ttouch: touch,\r\n \ttouchNative: touchNative,\r\n \tmobileOpera: mobileOpera,\r\n \tmobileGecko: mobileGecko,\r\n \tretina: retina,\r\n \tpassiveEvents: passiveEvents,\r\n \tcanvas: canvas$1,\r\n \tsvg: svg$1,\r\n \tvml: vml,\r\n \tinlineSvg: inlineSvg,\r\n \tmac: mac,\r\n \tlinux: linux\r\n };\n\n /*\n * Extends L.DomEvent to provide touch support for Internet Explorer and Windows-based devices.\n */\n\n var POINTER_DOWN = Browser.msPointer ? 'MSPointerDown' : 'pointerdown';\n var POINTER_MOVE = Browser.msPointer ? 'MSPointerMove' : 'pointermove';\n var POINTER_UP = Browser.msPointer ? 'MSPointerUp' : 'pointerup';\n var POINTER_CANCEL = Browser.msPointer ? 'MSPointerCancel' : 'pointercancel';\n var pEvent = {\n \ttouchstart : POINTER_DOWN,\n \ttouchmove : POINTER_MOVE,\n \ttouchend : POINTER_UP,\n \ttouchcancel : POINTER_CANCEL\n };\n var handle = {\n \ttouchstart : _onPointerStart,\n \ttouchmove : _handlePointer,\n \ttouchend : _handlePointer,\n \ttouchcancel : _handlePointer\n };\n var _pointers = {};\n var _pointerDocListener = false;\n\n // Provides a touch events wrapper for (ms)pointer events.\n // ref https://www.w3.org/TR/pointerevents/ https://www.w3.org/Bugs/Public/show_bug.cgi?id=22890\n\n function addPointerListener(obj, type, handler) {\n \tif (type === 'touchstart') {\n \t\t_addPointerDocListener();\n \t}\n \tif (!handle[type]) {\n \t\tconsole.warn('wrong event specified:', type);\n \t\treturn falseFn;\n \t}\n \thandler = handle[type].bind(this, handler);\n \tobj.addEventListener(pEvent[type], handler, false);\n \treturn handler;\n }\n\n function removePointerListener(obj, type, handler) {\n \tif (!pEvent[type]) {\n \t\tconsole.warn('wrong event specified:', type);\n \t\treturn;\n \t}\n \tobj.removeEventListener(pEvent[type], handler, false);\n }\n\n function _globalPointerDown(e) {\n \t_pointers[e.pointerId] = e;\n }\n\n function _globalPointerMove(e) {\n \tif (_pointers[e.pointerId]) {\n \t\t_pointers[e.pointerId] = e;\n \t}\n }\n\n function _globalPointerUp(e) {\n \tdelete _pointers[e.pointerId];\n }\n\n function _addPointerDocListener() {\n \t// need to keep track of what pointers and how many are active to provide e.touches emulation\n \tif (!_pointerDocListener) {\n \t\t// we listen document as any drags that end by moving the touch off the screen get fired there\n \t\tdocument.addEventListener(POINTER_DOWN, _globalPointerDown, true);\n \t\tdocument.addEventListener(POINTER_MOVE, _globalPointerMove, true);\n \t\tdocument.addEventListener(POINTER_UP, _globalPointerUp, true);\n \t\tdocument.addEventListener(POINTER_CANCEL, _globalPointerUp, true);\n\n \t\t_pointerDocListener = true;\n \t}\n }\n\n function _handlePointer(handler, e) {\n \tif (e.pointerType === (e.MSPOINTER_TYPE_MOUSE || 'mouse')) { return; }\n\n \te.touches = [];\n \tfor (var i in _pointers) {\n \t\te.touches.push(_pointers[i]);\n \t}\n \te.changedTouches = [e];\n\n \thandler(e);\n }\n\n function _onPointerStart(handler, e) {\n \t// IE10 specific: MsTouch needs preventDefault. See #2000\n \tif (e.MSPOINTER_TYPE_TOUCH && e.pointerType === e.MSPOINTER_TYPE_TOUCH) {\n \t\tpreventDefault(e);\n \t}\n \t_handlePointer(handler, e);\n }\n\n /*\r\n * Extends the event handling code with double tap support for mobile browsers.\r\n *\r\n * Note: currently most browsers fire native dblclick, with only a few exceptions\r\n * (see https://github.com/Leaflet/Leaflet/issues/7012#issuecomment-595087386)\r\n */\r\n\r\n function makeDblclick(event) {\r\n \t// in modern browsers `type` cannot be just overridden:\r\n \t// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Getter_only\r\n \tvar newEvent = {},\r\n \t prop, i;\r\n \tfor (i in event) {\r\n \t\tprop = event[i];\r\n \t\tnewEvent[i] = prop && prop.bind ? prop.bind(event) : prop;\r\n \t}\r\n \tevent = newEvent;\r\n \tnewEvent.type = 'dblclick';\r\n \tnewEvent.detail = 2;\r\n \tnewEvent.isTrusted = false;\r\n \tnewEvent._simulated = true; // for debug purposes\r\n \treturn newEvent;\r\n }\r\n\r\n var delay = 200;\r\n function addDoubleTapListener(obj, handler) {\r\n \t// Most browsers handle double tap natively\r\n \tobj.addEventListener('dblclick', handler);\r\n\r\n \t// On some platforms the browser doesn't fire native dblclicks for touch events.\r\n \t// It seems that in all such cases `detail` property of `click` event is always `1`.\r\n \t// So here we rely on that fact to avoid excessive 'dblclick' simulation when not needed.\r\n \tvar last = 0,\r\n \t detail;\r\n \tfunction simDblclick(e) {\r\n \t\tif (e.detail !== 1) {\r\n \t\t\tdetail = e.detail; // keep in sync to avoid false dblclick in some cases\r\n \t\t\treturn;\r\n \t\t}\r\n\r\n \t\tif (e.pointerType === 'mouse' ||\r\n \t\t\t(e.sourceCapabilities && !e.sourceCapabilities.firesTouchEvents)) {\r\n\r\n \t\t\treturn;\r\n \t\t}\r\n\r\n \t\t// When clicking on an <input>, the browser generates a click on its\r\n \t\t// <label> (and vice versa) triggering two clicks in quick succession.\r\n \t\t// This ignores clicks on elements which are a label with a 'for'\r\n \t\t// attribute (or children of such a label), but not children of\r\n \t\t// a <input>.\r\n \t\tvar path = getPropagationPath(e);\r\n \t\tif (path.some(function (el) {\r\n \t\t\treturn el instanceof HTMLLabelElement && el.attributes.for;\r\n \t\t}) &&\r\n \t\t\t!path.some(function (el) {\r\n \t\t\t\treturn (\r\n \t\t\t\t\tel instanceof HTMLInputElement ||\r\n \t\t\t\t\tel instanceof HTMLSelectElement\r\n \t\t\t\t);\r\n \t\t\t})\r\n \t\t) {\r\n \t\t\treturn;\r\n \t\t}\r\n\r\n \t\tvar now = Date.now();\r\n \t\tif (now - last <= delay) {\r\n \t\t\tdetail++;\r\n \t\t\tif (detail === 2) {\r\n \t\t\t\thandler(makeDblclick(e));\r\n \t\t\t}\r\n \t\t} else {\r\n \t\t\tdetail = 1;\r\n \t\t}\r\n \t\tlast = now;\r\n \t}\r\n\r\n \tobj.addEventListener('click', simDblclick);\r\n\r\n \treturn {\r\n \t\tdblclick: handler,\r\n \t\tsimDblclick: simDblclick\r\n \t};\r\n }\r\n\r\n function removeDoubleTapListener(obj, handlers) {\r\n \tobj.removeEventListener('dblclick', handlers.dblclick);\r\n \tobj.removeEventListener('click', handlers.simDblclick);\r\n }\n\n /*\r\n * @namespace DomUtil\r\n *\r\n * Utility functions to work with the [DOM](https://developer.mozilla.org/docs/Web/API/Document_Object_Model)\r\n * tree, used by Leaflet internally.\r\n *\r\n * Most functions expecting or returning a `HTMLElement` also work for\r\n * SVG elements. The only difference is that classes refer to CSS classes\r\n * in HTML and SVG classes in SVG.\r\n */\r\n\r\n\r\n // @property TRANSFORM: String\r\n // Vendor-prefixed transform style name (e.g. `'webkitTransform'` for WebKit).\r\n var TRANSFORM = testProp(\r\n \t['transform', 'webkitTransform', 'OTransform', 'MozTransform', 'msTransform']);\r\n\r\n // webkitTransition comes first because some browser versions that drop vendor prefix don't do\r\n // the same for the transitionend event, in particular the Android 4.1 stock browser\r\n\r\n // @property TRANSITION: String\r\n // Vendor-prefixed transition style name.\r\n var TRANSITION = testProp(\r\n \t['webkitTransition', 'transition', 'OTransition', 'MozTransition', 'msTransition']);\r\n\r\n // @property TRANSITION_END: String\r\n // Vendor-prefixed transitionend event name.\r\n var TRANSITION_END =\r\n \tTRANSITION === 'webkitTransition' || TRANSITION === 'OTransition' ? TRANSITION + 'End' : 'transitionend';\r\n\r\n\r\n // @function get(id: String|HTMLElement): HTMLElement\r\n // Returns an element given its DOM id, or returns the element itself\r\n // if it was passed directly.\r\n function get(id) {\r\n \treturn typeof id === 'string' ? document.getElementById(id) : id;\r\n }\r\n\r\n // @function getStyle(el: HTMLElement, styleAttrib: String): String\r\n // Returns the value for a certain style attribute on an element,\r\n // including computed values or values set through CSS.\r\n function getStyle(el, style) {\r\n \tvar value = el.style[style] || (el.currentStyle && el.currentStyle[style]);\r\n\r\n \tif ((!value || value === 'auto') && document.defaultView) {\r\n \t\tvar css = document.defaultView.getComputedStyle(el, null);\r\n \t\tvalue = css ? css[style] : null;\r\n \t}\r\n \treturn value === 'auto' ? null : value;\r\n }\r\n\r\n // @function create(tagName: String, className?: String, container?: HTMLElement): HTMLElement\r\n // Creates an HTML element with `tagName`, sets its class to `className`, and optionally appends it to `container` element.\r\n function create$1(tagName, className, container) {\r\n \tvar el = document.createElement(tagName);\r\n \tel.className = className || '';\r\n\r\n \tif (container) {\r\n \t\tcontainer.appendChild(el);\r\n \t}\r\n \treturn el;\r\n }\r\n\r\n // @function remove(el: HTMLElement)\r\n // Removes `el` from its parent element\r\n function remove(el) {\r\n \tvar parent = el.parentNode;\r\n \tif (parent) {\r\n \t\tparent.removeChild(el);\r\n \t}\r\n }\r\n\r\n // @function empty(el: HTMLElement)\r\n // Removes all of `el`'s children elements from `el`\r\n function empty(el) {\r\n \twhile (el.firstChild) {\r\n \t\tel.removeChild(el.firstChild);\r\n \t}\r\n }\r\n\r\n // @function toFront(el: HTMLElement)\r\n // Makes `el` the last child of its parent, so it renders in front of the other children.\r\n function toFront(el) {\r\n \tvar parent = el.parentNode;\r\n \tif (parent && parent.lastChild !== el) {\r\n \t\tparent.appendChild(el);\r\n \t}\r\n }\r\n\r\n // @function toBack(el: HTMLElement)\r\n // Makes `el` the first child of its parent, so it renders behind the other children.\r\n function toBack(el) {\r\n \tvar parent = el.parentNode;\r\n \tif (parent && parent.firstChild !== el) {\r\n \t\tparent.insertBefore(el, parent.firstChild);\r\n \t}\r\n }\r\n\r\n // @function hasClass(el: HTMLElement, name: String): Boolean\r\n // Returns `true` if the element's class attribute contains `name`.\r\n function hasClass(el, name) {\r\n \tif (el.classList !== undefined) {\r\n \t\treturn el.classList.contains(name);\r\n \t}\r\n \tvar className = getClass(el);\r\n \treturn className.length > 0 && new RegExp('(^|\\\\s)' + name + '(\\\\s|$)').test(className);\r\n }\r\n\r\n // @function addClass(el: HTMLElement, name: String)\r\n // Adds `name` to the element's class attribute.\r\n function addClass(el, name) {\r\n \tif (el.classList !== undefined) {\r\n \t\tvar classes = splitWords(name);\r\n \t\tfor (var i = 0, len = classes.length; i < len; i++) {\r\n \t\t\tel.classList.add(classes[i]);\r\n \t\t}\r\n \t} else if (!hasClass(el, name)) {\r\n \t\tvar className = getClass(el);\r\n \t\tsetClass(el, (className ? className + ' ' : '') + name);\r\n \t}\r\n }\r\n\r\n // @function removeClass(el: HTMLElement, name: String)\r\n // Removes `name` from the element's class attribute.\r\n function removeClass(el, name) {\r\n \tif (el.classList !== undefined) {\r\n \t\tel.classList.remove(name);\r\n \t} else {\r\n \t\tsetClass(el, trim((' ' + getClass(el) + ' ').replace(' ' + name + ' ', ' ')));\r\n \t}\r\n }\r\n\r\n // @function setClass(el: HTMLElement, name: String)\r\n // Sets the element's class.\r\n function setClass(el, name) {\r\n \tif (el.className.baseVal === undefined) {\r\n \t\tel.className = name;\r\n \t} else {\r\n \t\t// in case of SVG element\r\n \t\tel.className.baseVal = name;\r\n \t}\r\n }\r\n\r\n // @function getClass(el: HTMLElement): String\r\n // Returns the element's class.\r\n function getClass(el) {\r\n \t// Check if the element is an SVGElementInstance and use the correspondingElement instead\r\n \t// (Required for linked SVG elements in IE11.)\r\n \tif (el.correspondingElement) {\r\n \t\tel = el.correspondingElement;\r\n \t}\r\n \treturn el.className.baseVal === undefined ? el.className : el.className.baseVal;\r\n }\r\n\r\n // @function setOpacity(el: HTMLElement, opacity: Number)\r\n // Set the opacity of an element (including old IE support).\r\n // `opacity` must be a number from `0` to `1`.\r\n function setOpacity(el, value) {\r\n \tif ('opacity' in el.style) {\r\n \t\tel.style.opacity = value;\r\n \t} else if ('filter' in el.style) {\r\n \t\t_setOpacityIE(el, value);\r\n \t}\r\n }\r\n\r\n function _setOpacityIE(el, value) {\r\n \tvar filter = false,\r\n \t filterName = 'DXImageTransform.Microsoft.Alpha';\r\n\r\n \t// filters collection throws an error if we try to retrieve a filter that doesn't exist\r\n \ttry {\r\n \t\tfilter = el.filters.item(filterName);\r\n \t} catch (e) {\r\n \t\t// don't set opacity to 1 if we haven't already set an opacity,\r\n \t\t// it isn't needed and breaks transparent pngs.\r\n \t\tif (value === 1) { return; }\r\n \t}\r\n\r\n \tvalue = Math.round(value * 100);\r\n\r\n \tif (filter) {\r\n \t\tfilter.Enabled = (value !== 100);\r\n \t\tfilter.Opacity = value;\r\n \t} else {\r\n \t\tel.style.filter += ' progid:' + filterName + '(opacity=' + value + ')';\r\n \t}\r\n }\r\n\r\n // @function testProp(props: String[]): String|false\r\n // Goes through the array of style names and returns the first name\r\n // that is a valid style name for an element. If no such name is found,\r\n // it returns false. Useful for vendor-prefixed styles like `transform`.\r\n function testProp(props) {\r\n \tvar style = document.documentElement.style;\r\n\r\n \tfor (var i = 0; i < props.length; i++) {\r\n \t\tif (props[i] in style) {\r\n \t\t\treturn props[i];\r\n \t\t}\r\n \t}\r\n \treturn false;\r\n }\r\n\r\n // @function setTransform(el: HTMLElement, offset: Point, scale?: Number)\r\n // Resets the 3D CSS transform of `el` so it is translated by `offset` pixels\r\n // and optionally scaled by `scale`. Does not have an effect if the\r\n // browser doesn't support 3D CSS transforms.\r\n function setTransform(el, offset, scale) {\r\n \tvar pos = offset || new Point(0, 0);\r\n\r\n \tel.style[TRANSFORM] =\r\n \t\t(Browser.ie3d ?\r\n \t\t\t'translate(' + pos.x + 'px,' + pos.y + 'px)' :\r\n \t\t\t'translate3d(' + pos.x + 'px,' + pos.y + 'px,0)') +\r\n \t\t(scale ? ' scale(' + scale + ')' : '');\r\n }\r\n\r\n // @function setPosition(el: HTMLElement, position: Point)\r\n // Sets the position of `el` to coordinates specified by `position`,\r\n // using CSS translate or top/left positioning depending on the browser\r\n // (used by Leaflet internally to position its layers).\r\n function setPosition(el, point) {\r\n\r\n \t/*eslint-disable */\r\n \tel._leaflet_pos = point;\r\n \t/* eslint-enable */\r\n\r\n \tif (Browser.any3d) {\r\n \t\tsetTransform(el, point);\r\n \t} else {\r\n \t\tel.style.left = point.x + 'px';\r\n \t\tel.style.top = point.y + 'px';\r\n \t}\r\n }\r\n\r\n // @function getPosition(el: HTMLElement): Point\r\n // Returns the coordinates of an element previously positioned with setPosition.\r\n function getPosition(el) {\r\n \t// this method is only used for elements previously positioned using setPosition,\r\n \t// so it's safe to cache the position for performance\r\n\r\n \treturn el._leaflet_pos || new Point(0, 0);\r\n }\r\n\r\n // @function disableTextSelection()\r\n // Prevents the user from generating `selectstart` DOM events, usually generated\r\n // when the user drags the mouse through a page with text. Used internally\r\n // by Leaflet to override the behaviour of any click-and-drag interaction on\r\n // the map. Affects drag interactions on the whole document.\r\n\r\n // @function enableTextSelection()\r\n // Cancels the effects of a previous [`L.DomUtil.disableTextSelection`](#domutil-disabletextselection).\r\n var disableTextSelection;\r\n var enableTextSelection;\r\n var _userSelect;\r\n if ('onselectstart' in document) {\r\n \tdisableTextSelection = function () {\r\n \t\ton(window, 'selectstart', preventDefault);\r\n \t};\r\n \tenableTextSelection = function () {\r\n \t\toff(window, 'selectstart', preventDefault);\r\n \t};\r\n } else {\r\n \tvar userSelectProperty = testProp(\r\n \t\t['userSelect', 'WebkitUserSelect', 'OUserSelect', 'MozUserSelect', 'msUserSelect']);\r\n\r\n \tdisableTextSelection = function () {\r\n \t\tif (userSelectProperty) {\r\n \t\t\tvar style = document.documentElement.style;\r\n \t\t\t_userSelect = style[userSelectProperty];\r\n \t\t\tstyle[userSelectProperty] = 'none';\r\n \t\t}\r\n \t};\r\n \tenableTextSelection = function () {\r\n \t\tif (userSelectProperty) {\r\n \t\t\tdocument.documentElement.style[userSelectProperty] = _userSelect;\r\n \t\t\t_userSelect = undefined;\r\n \t\t}\r\n \t};\r\n }\r\n\r\n // @function disableImageDrag()\r\n // As [`L.DomUtil.disableTextSelection`](#domutil-disabletextselection), but\r\n // for `dragstart` DOM events, usually generated when the user drags an image.\r\n function disableImageDrag() {\r\n \ton(window, 'dragstart', preventDefault);\r\n }\r\n\r\n // @function enableImageDrag()\r\n // Cancels the effects of a previous [`L.DomUtil.disableImageDrag`](#domutil-disabletextselection).\r\n function enableImageDrag() {\r\n \toff(window, 'dragstart', preventDefault);\r\n }\r\n\r\n var _outlineElement, _outlineStyle;\r\n // @function preventOutline(el: HTMLElement)\r\n // Makes the [outline](https://developer.mozilla.org/docs/Web/CSS/outline)\r\n // of the element `el` invisible. Used internally by Leaflet to prevent\r\n // focusable elements from displaying an outline when the user performs a\r\n // drag interaction on them.\r\n function preventOutline(element) {\r\n \twhile (element.tabIndex === -1) {\r\n \t\telement = element.parentNode;\r\n \t}\r\n \tif (!element.style) { return; }\r\n \trestoreOutline();\r\n \t_outlineElement = element;\r\n \t_outlineStyle = element.style.outline;\r\n \telement.style.outline = 'none';\r\n \ton(window, 'keydown', restoreOutline);\r\n }\r\n\r\n // @function restoreOutline()\r\n // Cancels the effects of a previous [`L.DomUtil.preventOutline`]().\r\n function restoreOutline() {\r\n \tif (!_outlineElement) { return; }\r\n \t_outlineElement.style.outline = _outlineStyle;\r\n \t_outlineElement = undefined;\r\n \t_outlineStyle = undefined;\r\n \toff(window, 'keydown', restoreOutline);\r\n }\r\n\r\n // @function getSizedParentNode(el: HTMLElement): HTMLElement\r\n // Finds the closest parent node which size (width and height) is not null.\r\n function getSizedParentNode(element) {\r\n \tdo {\r\n \t\telement = element.parentNode;\r\n \t} while ((!element.offsetWidth || !element.offsetHeight) && element !== document.body);\r\n \treturn element;\r\n }\r\n\r\n // @function getScale(el: HTMLElement): Object\r\n // Computes the CSS scale currently applied on the element.\r\n // Returns an object with `x` and `y` members as horizontal and vertical scales respectively,\r\n // and `boundingClientRect` as the result of [`getBoundingClientRect()`](https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect).\r\n function getScale(element) {\r\n \tvar rect = element.getBoundingClientRect(); // Read-only in old browsers.\r\n\r\n \treturn {\r\n \t\tx: rect.width / element.offsetWidth || 1,\r\n \t\ty: rect.height / element.offsetHeight || 1,\r\n \t\tboundingClientRect: rect\r\n \t};\r\n }\n\n var DomUtil = {\n __proto__: null,\n TRANSFORM: TRANSFORM,\n TRANSITION: TRANSITION,\n TRANSITION_END: TRANSITION_END,\n get: get,\n getStyle: getStyle,\n create: create$1,\n remove: remove,\n empty: empty,\n toFront: toFront,\n toBack: toBack,\n hasClass: hasClass,\n addClass: addClass,\n removeClass: removeClass,\n setClass: setClass,\n getClass: getClass,\n setOpacity: setOpacity,\n testProp: testProp,\n setTransform: setTransform,\n setPosition: setPosition,\n getPosition: getPosition,\n get disableTextSelection () { return disableTextSelection; },\n get enableTextSelection () { return enableTextSelection; },\n disableImageDrag: disableImageDrag,\n enableImageDrag: enableImageDrag,\n preventOutline: preventOutline,\n restoreOutline: restoreOutline,\n getSizedParentNode: getSizedParentNode,\n getScale: getScale\n };\n\n /*\r\n * @namespace DomEvent\r\n * Utility functions to work with the [DOM events](https://developer.mozilla.org/docs/Web/API/Event), used by Leaflet internally.\r\n */\r\n\r\n // Inspired by John Resig, Dean Edwards and YUI addEvent implementations.\r\n\r\n // @function on(el: HTMLElement, types: String, fn: Function, context?: Object): this\r\n // Adds a listener function (`fn`) to a particular DOM event type of the\r\n // element `el`. You can optionally specify the context of the listener\r\n // (object the `this` keyword will point to). You can also pass several\r\n // space-separated types (e.g. `'click dblclick'`).\r\n\r\n // @alternative\r\n // @function on(el: HTMLElement, eventMap: Object, context?: Object): this\r\n // Adds a set of type/listener pairs, e.g. `{click: onClick, mousemove: onMouseMove}`\r\n function on(obj, types, fn, context) {\r\n\r\n \tif (types && typeof types === 'object') {\r\n \t\tfor (var type in types) {\r\n \t\t\taddOne(obj, type, types[type], fn);\r\n \t\t}\r\n \t} else {\r\n \t\ttypes = splitWords(types);\r\n\r\n \t\tfor (var i = 0, len = types.length; i < len; i++) {\r\n \t\t\taddOne(obj, types[i], fn, context);\r\n \t\t}\r\n \t}\r\n\r\n \treturn this;\r\n }\r\n\r\n var eventsKey = '_leaflet_events';\r\n\r\n // @function off(el: HTMLElement, types: String, fn: Function, context?: Object): this\r\n // Removes a previously added listener function.\r\n // Note that if you passed a custom context to on, you must pass the same\r\n // context to `off` in order to remove the listener.\r\n\r\n // @alternative\r\n // @function off(el: HTMLElement, eventMap: Object, context?: Object): this\r\n // Removes a set of type/listener pairs, e.g. `{click: onClick, mousemove: onMouseMove}`\r\n\r\n // @alternative\r\n // @function off(el: HTMLElement, types: String): this\r\n // Removes all previously added listeners of given types.\r\n\r\n // @alternative\r\n // @function off(el: HTMLElement): this\r\n // Removes all previously added listeners from given HTMLElement\r\n function off(obj, types, fn, context) {\r\n\r\n \tif (arguments.length === 1) {\r\n \t\tbatchRemove(obj);\r\n \t\tdelete obj[eventsKey];\r\n\r\n \t} else if (types && typeof types === 'object') {\r\n \t\tfor (var type in types) {\r\n \t\t\tremoveOne(obj, type, types[type], fn);\r\n \t\t}\r\n\r\n \t} else {\r\n \t\ttypes = splitWords(types);\r\n\r\n \t\tif (arguments.length === 2) {\r\n \t\t\tbatchRemove(obj, function (type) {\r\n \t\t\t\treturn indexOf(types, type) !== -1;\r\n \t\t\t});\r\n \t\t} else {\r\n \t\t\tfor (var i = 0, len = types.length; i < len; i++) {\r\n \t\t\t\tremoveOne(obj, types[i], fn, context);\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n\r\n \treturn this;\r\n }\r\n\r\n function batchRemove(obj, filterFn) {\r\n \tfor (var id in obj[eventsKey]) {\r\n \t\tvar type = id.split(/\\d/)[0];\r\n \t\tif (!filterFn || filterFn(type)) {\r\n \t\t\tremoveOne(obj, type, null, null, id);\r\n \t\t}\r\n \t}\r\n }\r\n\r\n var mouseSubst = {\r\n \tmouseenter: 'mouseover',\r\n \tmouseleave: 'mouseout',\r\n \twheel: !('onwheel' in window) && 'mousewheel'\r\n };\r\n\r\n function addOne(obj, type, fn, context) {\r\n \tvar id = type + stamp(fn) + (context ? '_' + stamp(context) : '');\r\n\r\n \tif (obj[eventsKey] && obj[eventsKey][id]) { return this; }\r\n\r\n \tvar handler = function (e) {\r\n \t\treturn fn.call(context || obj, e || window.event);\r\n \t};\r\n\r\n \tvar originalHandler = handler;\r\n\r\n \tif (!Browser.touchNative && Browser.pointer && type.indexOf('touch') === 0) {\r\n \t\t// Needs DomEvent.Pointer.js\r\n \t\thandler = addPointerListener(obj, type, handler);\r\n\r\n \t} else if (Browser.touch && (type === 'dblclick')) {\r\n \t\thandler = addDoubleTapListener(obj, handler);\r\n\r\n \t} else if ('addEventListener' in obj) {\r\n\r\n \t\tif (type === 'touchstart' || type === 'touchmove' || type === 'wheel' || type === 'mousewheel') {\r\n \t\t\tobj.addEventListener(mouseSubst[type] || type, handler, Browser.passiveEvents ? {passive: false} : false);\r\n\r\n \t\t} else if (type === 'mouseenter' || type === 'mouseleave') {\r\n \t\t\thandler = function (e) {\r\n \t\t\t\te = e || window.event;\r\n \t\t\t\tif (isExternalTarget(obj, e)) {\r\n \t\t\t\t\toriginalHandler(e);\r\n \t\t\t\t}\r\n \t\t\t};\r\n \t\t\tobj.addEventListener(mouseSubst[type], handler, false);\r\n\r\n \t\t} else {\r\n \t\t\tobj.addEventListener(type, originalHandler, false);\r\n \t\t}\r\n\r\n \t} else {\r\n \t\tobj.attachEvent('on' + type, handler);\r\n \t}\r\n\r\n \tobj[eventsKey] = obj[eventsKey] || {};\r\n \tobj[eventsKey][id] = handler;\r\n }\r\n\r\n function removeOne(obj, type, fn, context, id) {\r\n \tid = id || type + stamp(fn) + (context ? '_' + stamp(context) : '');\r\n \tvar handler = obj[eventsKey] && obj[eventsKey][id];\r\n\r\n \tif (!handler) { return this; }\r\n\r\n \tif (!Browser.touchNative && Browser.pointer && type.indexOf('touch') === 0) {\r\n \t\tremovePointerListener(obj, type, handler);\r\n\r\n \t} else if (Browser.touch && (type === 'dblclick')) {\r\n \t\tremoveDoubleTapListener(obj, handler);\r\n\r\n \t} else if ('removeEventListener' in obj) {\r\n\r\n \t\tobj.removeEventListener(mouseSubst[type] || type, handler, false);\r\n\r\n \t} else {\r\n \t\tobj.detachEvent('on' + type, handler);\r\n \t}\r\n\r\n \tobj[eventsKey][id] = null;\r\n }\r\n\r\n // @function stopPropagation(ev: DOMEvent): this\r\n // Stop the given event from propagation to parent elements. Used inside the listener functions:\r\n // ```js\r\n // L.DomEvent.on(div, 'click', function (ev) {\r\n // \tL.DomEvent.stopPropagation(ev);\r\n // });\r\n // ```\r\n function stopPropagation(e) {\r\n\r\n \tif (e.stopPropagation) {\r\n \t\te.stopPropagation();\r\n \t} else if (e.originalEvent) { // In case of Leaflet event.\r\n \t\te.originalEvent._stopped = true;\r\n \t} else {\r\n \t\te.cancelBubble = true;\r\n \t}\r\n\r\n \treturn this;\r\n }\r\n\r\n // @function disableScrollPropagation(el: HTMLElement): this\r\n // Adds `stopPropagation` to the element's `'wheel'` events (plus browser variants).\r\n function disableScrollPropagation(el) {\r\n \taddOne(el, 'wheel', stopPropagation);\r\n \treturn this;\r\n }\r\n\r\n // @function disableClickPropagation(el: HTMLElement): this\r\n // Adds `stopPropagation` to the element's `'click'`, `'dblclick'`, `'contextmenu'`,\r\n // `'mousedown'` and `'touchstart'` events (plus browser variants).\r\n function disableClickPropagation(el) {\r\n \ton(el, 'mousedown touchstart dblclick contextmenu', stopPropagation);\r\n \tel['_leaflet_disable_click'] = true;\r\n \treturn this;\r\n }\r\n\r\n // @function preventDefault(ev: DOMEvent): this\r\n // Prevents the default action of the DOM Event `ev` from happening (such as\r\n // following a link in the href of the a element, or doing a POST request\r\n // with page reload when a `<form>` is submitted).\r\n // Use it inside listener functions.\r\n function preventDefault(e) {\r\n \tif (e.preventDefault) {\r\n \t\te.preventDefault();\r\n \t} else {\r\n \t\te.returnValue = false;\r\n \t}\r\n \treturn this;\r\n }\r\n\r\n // @function stop(ev: DOMEvent): this\r\n // Does `stopPropagation` and `preventDefault` at the same time.\r\n function stop(e) {\r\n \tpreventDefault(e);\r\n \tstopPropagation(e);\r\n \treturn this;\r\n }\r\n\r\n // @function getPropagationPath(ev: DOMEvent): Array\r\n // Compatibility polyfill for [`Event.composedPath()`](https://developer.mozilla.org/en-US/docs/Web/API/Event/composedPath).\r\n // Returns an array containing the `HTMLElement`s that the given DOM event\r\n // should propagate to (if not stopped).\r\n function getPropagationPath(ev) {\r\n \tif (ev.composedPath) {\r\n \t\treturn ev.composedPath();\r\n \t}\r\n\r\n \tvar path = [];\r\n \tvar el = ev.target;\r\n\r\n \twhile (el) {\r\n \t\tpath.push(el);\r\n \t\tel = el.parentNode;\r\n \t}\r\n \treturn path;\r\n }\r\n\r\n\r\n // @function getMousePosition(ev: DOMEvent, container?: HTMLElement): Point\r\n // Gets normalized mouse position from a DOM event relative to the\r\n // `container` (border excluded) or to the whole page if not specified.\r\n function getMousePosition(e, container) {\r\n \tif (!container) {\r\n \t\treturn new Point(e.clientX, e.clientY);\r\n \t}\r\n\r\n \tvar scale = getScale(container),\r\n \t offset = scale.boundingClientRect; // left and top values are in page scale (like the event clientX/Y)\r\n\r\n \treturn new Point(\r\n \t\t// offset.left/top values are in page scale (like clientX/Y),\r\n \t\t// whereas clientLeft/Top (border width) values are the original values (before CSS scale applies).\r\n \t\t(e.clientX - offset.left) / scale.x - container.clientLeft,\r\n \t\t(e.clientY - offset.top) / scale.y - container.clientTop\r\n \t);\r\n }\r\n\r\n\r\n // except , Safari and\r\n // We need double the scroll pixels (see #7403 and #4538) for all Browsers\r\n // except OSX (Mac) -> 3x, Chrome running on Linux 1x\r\n\r\n var wheelPxFactor =\r\n \t(Browser.linux && Browser.chrome) ? window.devicePixelRatio :\r\n \tBrowser.mac ? window.devicePixelRatio * 3 :\r\n \twindow.devicePixelRatio > 0 ? 2 * window.devicePixelRatio : 1;\r\n // @function getWheelDelta(ev: DOMEvent): Number\r\n // Gets normalized wheel delta from a wheel DOM event, in vertical\r\n // pixels scrolled (negative if scrolling down).\r\n // Events from pointing devices without precise scrolling are mapped to\r\n // a best guess of 60 pixels.\r\n function getWheelDelta(e) {\r\n \treturn (Browser.edge) ? e.wheelDeltaY / 2 : // Don't trust window-geometry-based delta\r\n \t (e.deltaY && e.deltaMode === 0) ? -e.deltaY / wheelPxFactor : // Pixels\r\n \t (e.deltaY && e.deltaMode === 1) ? -e.deltaY * 20 : // Lines\r\n \t (e.deltaY && e.deltaMode === 2) ? -e.deltaY * 60 : // Pages\r\n \t (e.deltaX || e.deltaZ) ? 0 :\t// Skip horizontal/depth wheel events\r\n \t e.wheelDelta ? (e.wheelDeltaY || e.wheelDelta) / 2 : // Legacy IE pixels\r\n \t (e.detail && Math.abs(e.detail) < 32765) ? -e.detail * 20 : // Legacy Moz lines\r\n \t e.detail ? e.detail / -32765 * 60 : // Legacy Moz pages\r\n \t 0;\r\n }\r\n\r\n // check if element really left/entered the event target (for mouseenter/mouseleave)\r\n function isExternalTarget(el, e) {\r\n\r\n \tvar related = e.relatedTarget;\r\n\r\n \tif (!related) { return true; }\r\n\r\n \ttry {\r\n \t\twhile (related && (related !== el)) {\r\n \t\t\trelated = related.parentNode;\r\n \t\t}\r\n \t} catch (err) {\r\n \t\treturn false;\r\n \t}\r\n \treturn (related !== el);\r\n }\n\n var DomEvent = {\n __proto__: null,\n on: on,\n off: off,\n stopPropagation: stopPropagation,\n disableScrollPropagation: disableScrollPropagation,\n disableClickPropagation: disableClickPropagation,\n preventDefault: preventDefault,\n stop: stop,\n getPropagationPath: getPropagationPath,\n getMousePosition: getMousePosition,\n getWheelDelta: getWheelDelta,\n isExternalTarget: isExternalTarget,\n addListener: on,\n removeListener: off\n };\n\n /*\n * @class PosAnimation\n * @aka L.PosAnimation\n * @inherits Evented\n * Used internally for panning animations, utilizing CSS3 Transitions for modern browsers and a timer fallback for IE6-9.\n *\n * @example\n * ```js\n * var myPositionMarker = L.marker([48.864716, 2.294694]).addTo(map);\n *\n * myPositionMarker.on(\"click\", function() {\n * \tvar pos = map.latLngToLayerPoint(myPositionMarker.getLatLng());\n * \tpos.y -= 25;\n * \tvar fx = new L.PosAnimation();\n *\n * \tfx.once('end',function() {\n * \t\tpos.y += 25;\n * \t\tfx.run(myPositionMarker._icon, pos, 0.8);\n * \t});\n *\n * \tfx.run(myPositionMarker._icon, pos, 0.3);\n * });\n *\n * ```\n *\n * @constructor L.PosAnimation()\n * Creates a `PosAnimation` object.\n *\n */\n\n var PosAnimation = Evented.extend({\n\n \t// @method run(el: HTMLElement, newPos: Point, duration?: Number, easeLinearity?: Number)\n \t// Run an animation of a given element to a new position, optionally setting\n \t// duration in seconds (`0.25` by default) and easing linearity factor (3rd\n \t// argument of the [cubic bezier curve](https://cubic-bezier.com/#0,0,.5,1),\n \t// `0.5` by default).\n \trun: function (el, newPos, duration, easeLinearity) {\n \t\tthis.stop();\n\n \t\tthis._el = el;\n \t\tthis._inProgress = true;\n \t\tthis._duration = duration || 0.25;\n \t\tthis._easeOutPower = 1 / Math.max(easeLinearity || 0.5, 0.2);\n\n \t\tthis._startPos = getPosition(el);\n \t\tthis._offset = newPos.subtract(this._startPos);\n \t\tthis._startTime = +new Date();\n\n \t\t// @event start: Event\n \t\t// Fired when the animation starts\n \t\tthis.fire('start');\n\n \t\tthis._animate();\n \t},\n\n \t// @method stop()\n \t// Stops the animation (if currently running).\n \tstop: function () {\n \t\tif (!this._inProgress) { return; }\n\n \t\tthis._step(true);\n \t\tthis._complete();\n \t},\n\n \t_animate: function () {\n \t\t// animation loop\n \t\tthis._animId = requestAnimFrame(this._animate, this);\n \t\tthis._step();\n \t},\n\n \t_step: function (round) {\n \t\tvar elapsed = (+new Date()) - this._startTime,\n \t\t duration = this._duration * 1000;\n\n \t\tif (elapsed < duration) {\n \t\t\tthis._runFrame(this._easeOut(elapsed / duration), round);\n \t\t} else {\n \t\t\tthis._runFrame(1);\n \t\t\tthis._complete();\n \t\t}\n \t},\n\n \t_runFrame: function (progress, round) {\n \t\tvar pos = this._startPos.add(this._offset.multiplyBy(progress));\n \t\tif (round) {\n \t\t\tpos._round();\n \t\t}\n \t\tsetPosition(this._el, pos);\n\n \t\t// @event step: Event\n \t\t// Fired continuously during the animation.\n \t\tthis.fire('step');\n \t},\n\n \t_complete: function () {\n \t\tcancelAnimFrame(this._animId);\n\n \t\tthis._inProgress = false;\n \t\t// @event end: Event\n \t\t// Fired when the animation ends.\n \t\tthis.fire('end');\n \t},\n\n \t_easeOut: function (t) {\n \t\treturn 1 - Math.pow(1 - t, this._easeOutPower);\n \t}\n });\n\n /*\r\n * @class Map\r\n * @aka L.Map\r\n * @inherits Evented\r\n *\r\n * The central class of the API — it is used to create a map on a page and manipulate it.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * // initialize the map on the \"map\" div with a given center and zoom\r\n * var map = L.map('map', {\r\n * \tcenter: [51.505, -0.09],\r\n * \tzoom: 13\r\n * });\r\n * ```\r\n *\r\n */\r\n\r\n var Map = Evented.extend({\r\n\r\n \toptions: {\r\n \t\t// @section Map State Options\r\n \t\t// @option crs: CRS = L.CRS.EPSG3857\r\n \t\t// The [Coordinate Reference System](#crs) to use. Don't change this if you're not\r\n \t\t// sure what it means.\r\n \t\tcrs: EPSG3857,\r\n\r\n \t\t// @option center: LatLng = undefined\r\n \t\t// Initial geographic center of the map\r\n \t\tcenter: undefined,\r\n\r\n \t\t// @option zoom: Number = undefined\r\n \t\t// Initial map zoom level\r\n \t\tzoom: undefined,\r\n\r\n \t\t// @option minZoom: Number = *\r\n \t\t// Minimum zoom level of the map.\r\n \t\t// If not specified and at least one `GridLayer` or `TileLayer` is in the map,\r\n \t\t// the lowest of their `minZoom` options will be used instead.\r\n \t\tminZoom: undefined,\r\n\r\n \t\t// @option maxZoom: Number = *\r\n \t\t// Maximum zoom level of the map.\r\n \t\t// If not specified and at least one `GridLayer` or `TileLayer` is in the map,\r\n \t\t// the highest of their `maxZoom` options will be used instead.\r\n \t\tmaxZoom: undefined,\r\n\r\n \t\t// @option layers: Layer[] = []\r\n \t\t// Array of layers that will be added to the map initially\r\n \t\tlayers: [],\r\n\r\n \t\t// @option maxBounds: LatLngBounds = null\r\n \t\t// When this option is set, the map restricts the view to the given\r\n \t\t// geographical bounds, bouncing the user back if the user tries to pan\r\n \t\t// outside the view. To set the restriction dynamically, use\r\n \t\t// [`setMaxBounds`](#map-setmaxbounds) method.\r\n \t\tmaxBounds: undefined,\r\n\r\n \t\t// @option renderer: Renderer = *\r\n \t\t// The default method for drawing vector layers on the map. `L.SVG`\r\n \t\t// or `L.Canvas` by default depending on browser support.\r\n \t\trenderer: undefined,\r\n\r\n\r\n \t\t// @section Animation Options\r\n \t\t// @option zoomAnimation: Boolean = true\r\n \t\t// Whether the map zoom animation is enabled. By default it's enabled\r\n \t\t// in all browsers that support CSS3 Transitions except Android.\r\n \t\tzoomAnimation: true,\r\n\r\n \t\t// @option zoomAnimationThreshold: Number = 4\r\n \t\t// Won't animate zoom if the zoom difference exceeds this value.\r\n \t\tzoomAnimationThreshold: 4,\r\n\r\n \t\t// @option fadeAnimation: Boolean = true\r\n \t\t// Whether the tile fade animation is enabled. By default it's enabled\r\n \t\t// in all browsers that support CSS3 Transitions except Android.\r\n \t\tfadeAnimation: true,\r\n\r\n \t\t// @option markerZoomAnimation: Boolean = true\r\n \t\t// Whether markers animate their zoom with the zoom animation, if disabled\r\n \t\t// they will disappear for the length of the animation. By default it's\r\n \t\t// enabled in all browsers that support CSS3 Transitions except Android.\r\n \t\tmarkerZoomAnimation: true,\r\n\r\n \t\t// @option transform3DLimit: Number = 2^23\r\n \t\t// Defines the maximum size of a CSS translation transform. The default\r\n \t\t// value should not be changed unless a web browser positions layers in\r\n \t\t// the wrong place after doing a large `panBy`.\r\n \t\ttransform3DLimit: 8388608, // Precision limit of a 32-bit float\r\n\r\n \t\t// @section Interaction Options\r\n \t\t// @option zoomSnap: Number = 1\r\n \t\t// Forces the map's zoom level to always be a multiple of this, particularly\r\n \t\t// right after a [`fitBounds()`](#map-fitbounds) or a pinch-zoom.\r\n \t\t// By default, the zoom level snaps to the nearest integer; lower values\r\n \t\t// (e.g. `0.5` or `0.1`) allow for greater granularity. A value of `0`\r\n \t\t// means the zoom level will not be snapped after `fitBounds` or a pinch-zoom.\r\n \t\tzoomSnap: 1,\r\n\r\n \t\t// @option zoomDelta: Number = 1\r\n \t\t// Controls how much the map's zoom level will change after a\r\n \t\t// [`zoomIn()`](#map-zoomin), [`zoomOut()`](#map-zoomout), pressing `+`\r\n \t\t// or `-` on the keyboard, or using the [zoom controls](#control-zoom).\r\n \t\t// Values smaller than `1` (e.g. `0.5`) allow for greater granularity.\r\n \t\tzoomDelta: 1,\r\n\r\n \t\t// @option trackResize: Boolean = true\r\n \t\t// Whether the map automatically handles browser window resize to update itself.\r\n \t\ttrackResize: true\r\n \t},\r\n\r\n \tinitialize: function (id, options) { // (HTMLElement or String, Object)\r\n \t\toptions = setOptions(this, options);\r\n\r\n \t\t// Make sure to assign internal flags at the beginning,\r\n \t\t// to avoid inconsistent state in some edge cases.\r\n \t\tthis._handlers = [];\r\n \t\tthis._layers = {};\r\n \t\tthis._zoomBoundLayers = {};\r\n \t\tthis._sizeChanged = true;\r\n\r\n \t\tthis._initContainer(id);\r\n \t\tthis._initLayout();\r\n\r\n \t\t// hack for https://github.com/Leaflet/Leaflet/issues/1980\r\n \t\tthis._onResize = bind(this._onResize, this);\r\n\r\n \t\tthis._initEvents();\r\n\r\n \t\tif (options.maxBounds) {\r\n \t\t\tthis.setMaxBounds(options.maxBounds);\r\n \t\t}\r\n\r\n \t\tif (options.zoom !== undefined) {\r\n \t\t\tthis._zoom = this._limitZoom(options.zoom);\r\n \t\t}\r\n\r\n \t\tif (options.center && options.zoom !== undefined) {\r\n \t\t\tthis.setView(toLatLng(options.center), options.zoom, {reset: true});\r\n \t\t}\r\n\r\n \t\tthis.callInitHooks();\r\n\r\n \t\t// don't animate on browsers without hardware-accelerated transitions or old Android/Opera\r\n \t\tthis._zoomAnimated = TRANSITION && Browser.any3d && !Browser.mobileOpera &&\r\n \t\t\t\tthis.options.zoomAnimation;\r\n\r\n \t\t// zoom transitions run with the same duration for all layers, so if one of transitionend events\r\n \t\t// happens after starting zoom animation (propagating to the map pane), we know that it ended globally\r\n \t\tif (this._zoomAnimated) {\r\n \t\t\tthis._createAnimProxy();\r\n \t\t\ton(this._proxy, TRANSITION_END, this._catchTransitionEnd, this);\r\n \t\t}\r\n\r\n \t\tthis._addLayers(this.options.layers);\r\n \t},\r\n\r\n\r\n \t// @section Methods for modifying map state\r\n\r\n \t// @method setView(center: LatLng, zoom: Number, options?: Zoom/pan options): this\r\n \t// Sets the view of the map (geographical center and zoom) with the given\r\n \t// animation options.\r\n \tsetView: function (center, zoom, options) {\r\n\r\n \t\tzoom = zoom === undefined ? this._zoom : this._limitZoom(zoom);\r\n \t\tcenter = this._limitCenter(toLatLng(center), zoom, this.options.maxBounds);\r\n \t\toptions = options || {};\r\n\r\n \t\tthis._stop();\r\n\r\n \t\tif (this._loaded && !options.reset && options !== true) {\r\n\r\n \t\t\tif (options.animate !== undefined) {\r\n \t\t\t\toptions.zoom = extend({animate: options.animate}, options.zoom);\r\n \t\t\t\toptions.pan = extend({animate: options.animate, duration: options.duration}, options.pan);\r\n \t\t\t}\r\n\r\n \t\t\t// try animating pan or zoom\r\n \t\t\tvar moved = (this._zoom !== zoom) ?\r\n \t\t\t\tthis._tryAnimatedZoom && this._tryAnimatedZoom(center, zoom, options.zoom) :\r\n \t\t\t\tthis._tryAnimatedPan(center, options.pan);\r\n\r\n \t\t\tif (moved) {\r\n \t\t\t\t// prevent resize handler call, the view will refresh after animation anyway\r\n \t\t\t\tclearTimeout(this._sizeTimer);\r\n \t\t\t\treturn this;\r\n \t\t\t}\r\n \t\t}\r\n\r\n \t\t// animation didn't start, just reset the map view\r\n \t\tthis._resetView(center, zoom, options.pan && options.pan.noMoveStart);\r\n\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method setZoom(zoom: Number, options?: Zoom/pan options): this\r\n \t// Sets the zoom of the map.\r\n \tsetZoom: function (zoom, options) {\r\n \t\tif (!this._loaded) {\r\n \t\t\tthis._zoom = zoom;\r\n \t\t\treturn this;\r\n \t\t}\r\n \t\treturn this.setView(this.getCenter(), zoom, {zoom: options});\r\n \t},\r\n\r\n \t// @method zoomIn(delta?: Number, options?: Zoom options): this\r\n \t// Increases the zoom of the map by `delta` ([`zoomDelta`](#map-zoomdelta) by default).\r\n \tzoomIn: function (delta, options) {\r\n \t\tdelta = delta || (Browser.any3d ? this.options.zoomDelta : 1);\r\n \t\treturn this.setZoom(this._zoom + delta, options);\r\n \t},\r\n\r\n \t// @method zoomOut(delta?: Number, options?: Zoom options): this\r\n \t// Decreases the zoom of the map by `delta` ([`zoomDelta`](#map-zoomdelta) by default).\r\n \tzoomOut: function (delta, options) {\r\n \t\tdelta = delta || (Browser.any3d ? this.options.zoomDelta : 1);\r\n \t\treturn this.setZoom(this._zoom - delta, options);\r\n \t},\r\n\r\n \t// @method setZoomAround(latlng: LatLng, zoom: Number, options: Zoom options): this\r\n \t// Zooms the map while keeping a specified geographical point on the map\r\n \t// stationary (e.g. used internally for scroll zoom and double-click zoom).\r\n \t// @alternative\r\n \t// @method setZoomAround(offset: Point, zoom: Number, options: Zoom options): this\r\n \t// Zooms the map while keeping a specified pixel on the map (relative to the top-left corner) stationary.\r\n \tsetZoomAround: function (latlng, zoom, options) {\r\n \t\tvar scale = this.getZoomScale(zoom),\r\n \t\t viewHalf = this.getSize().divideBy(2),\r\n \t\t containerPoint = latlng instanceof Point ? latlng : this.latLngToContainerPoint(latlng),\r\n\r\n \t\t centerOffset = containerPoint.subtract(viewHalf).multiplyBy(1 - 1 / scale),\r\n \t\t newCenter = this.containerPointToLatLng(viewHalf.add(centerOffset));\r\n\r\n \t\treturn this.setView(newCenter, zoom, {zoom: options});\r\n \t},\r\n\r\n \t_getBoundsCenterZoom: function (bounds, options) {\r\n\r\n \t\toptions = options || {};\r\n \t\tbounds = bounds.getBounds ? bounds.getBounds() : toLatLngBounds(bounds);\r\n\r\n \t\tvar paddingTL = toPoint(options.paddingTopLeft || options.padding || [0, 0]),\r\n \t\t paddingBR = toPoint(options.paddingBottomRight || options.padding || [0, 0]),\r\n\r\n \t\t zoom = this.getBoundsZoom(bounds, false, paddingTL.add(paddingBR));\r\n\r\n \t\tzoom = (typeof options.maxZoom === 'number') ? Math.min(options.maxZoom, zoom) : zoom;\r\n\r\n \t\tif (zoom === Infinity) {\r\n \t\t\treturn {\r\n \t\t\t\tcenter: bounds.getCenter(),\r\n \t\t\t\tzoom: zoom\r\n \t\t\t};\r\n \t\t}\r\n\r\n \t\tvar paddingOffset = paddingBR.subtract(paddingTL).divideBy(2),\r\n\r\n \t\t swPoint = this.project(bounds.getSouthWest(), zoom),\r\n \t\t nePoint = this.project(bounds.getNorthEast(), zoom),\r\n \t\t center = this.unproject(swPoint.add(nePoint).divideBy(2).add(paddingOffset), zoom);\r\n\r\n \t\treturn {\r\n \t\t\tcenter: center,\r\n \t\t\tzoom: zoom\r\n \t\t};\r\n \t},\r\n\r\n \t// @method fitBounds(bounds: LatLngBounds, options?: fitBounds options): this\r\n \t// Sets a map view that contains the given geographical bounds with the\r\n \t// maximum zoom level possible.\r\n \tfitBounds: function (bounds, options) {\r\n\r\n \t\tbounds = toLatLngBounds(bounds);\r\n\r\n \t\tif (!bounds.isValid()) {\r\n \t\t\tthrow new Error('Bounds are not valid.');\r\n \t\t}\r\n\r\n \t\tvar target = this._getBoundsCenterZoom(bounds, options);\r\n \t\treturn this.setView(target.center, target.zoom, options);\r\n \t},\r\n\r\n \t// @method fitWorld(options?: fitBounds options): this\r\n \t// Sets a map view that mostly contains the whole world with the maximum\r\n \t// zoom level possible.\r\n \tfitWorld: function (options) {\r\n \t\treturn this.fitBounds([[-90, -180], [90, 180]], options);\r\n \t},\r\n\r\n \t// @method panTo(latlng: LatLng, options?: Pan options): this\r\n \t// Pans the map to a given center.\r\n \tpanTo: function (center, options) { // (LatLng)\r\n \t\treturn this.setView(center, this._zoom, {pan: options});\r\n \t},\r\n\r\n \t// @method panBy(offset: Point, options?: Pan options): this\r\n \t// Pans the map by a given number of pixels (animated).\r\n \tpanBy: function (offset, options) {\r\n \t\toffset = toPoint(offset).round();\r\n \t\toptions = options || {};\r\n\r\n \t\tif (!offset.x && !offset.y) {\r\n \t\t\treturn this.fire('moveend');\r\n \t\t}\r\n \t\t// If we pan too far, Chrome gets issues with tiles\r\n \t\t// and makes them disappear or appear in the wrong place (slightly offset) #2602\r\n \t\tif (options.animate !== true && !this.getSize().contains(offset)) {\r\n \t\t\tthis._resetView(this.unproject(this.project(this.getCenter()).add(offset)), this.getZoom());\r\n \t\t\treturn this;\r\n \t\t}\r\n\r\n \t\tif (!this._panAnim) {\r\n \t\t\tthis._panAnim = new PosAnimation();\r\n\r\n \t\t\tthis._panAnim.on({\r\n \t\t\t\t'step': this._onPanTransitionStep,\r\n \t\t\t\t'end': this._onPanTransitionEnd\r\n \t\t\t}, this);\r\n \t\t}\r\n\r\n \t\t// don't fire movestart if animating inertia\r\n \t\tif (!options.noMoveStart) {\r\n \t\t\tthis.fire('movestart');\r\n \t\t}\r\n\r\n \t\t// animate pan unless animate: false specified\r\n \t\tif (options.animate !== false) {\r\n \t\t\taddClass(this._mapPane, 'leaflet-pan-anim');\r\n\r\n \t\t\tvar newPos = this._getMapPanePos().subtract(offset).round();\r\n \t\t\tthis._panAnim.run(this._mapPane, newPos, options.duration || 0.25, options.easeLinearity);\r\n \t\t} else {\r\n \t\t\tthis._rawPanBy(offset);\r\n \t\t\tthis.fire('move').fire('moveend');\r\n \t\t}\r\n\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method flyTo(latlng: LatLng, zoom?: Number, options?: Zoom/pan options): this\r\n \t// Sets the view of the map (geographical center and zoom) performing a smooth\r\n \t// pan-zoom animation.\r\n \tflyTo: function (targetCenter, targetZoom, options) {\r\n\r\n \t\toptions = options || {};\r\n \t\tif (options.animate === false || !Browser.any3d) {\r\n \t\t\treturn this.setView(targetCenter, targetZoom, options);\r\n \t\t}\r\n\r\n \t\tthis._stop();\r\n\r\n \t\tvar from = this.project(this.getCenter()),\r\n \t\t to = this.project(targetCenter),\r\n \t\t size = this.getSize(),\r\n \t\t startZoom = this._zoom;\r\n\r\n \t\ttargetCenter = toLatLng(targetCenter);\r\n \t\ttargetZoom = targetZoom === undefined ? startZoom : targetZoom;\r\n\r\n \t\tvar w0 = Math.max(size.x, size.y),\r\n \t\t w1 = w0 * this.getZoomScale(startZoom, targetZoom),\r\n \t\t u1 = (to.distanceTo(from)) || 1,\r\n \t\t rho = 1.42,\r\n \t\t rho2 = rho * rho;\r\n\r\n \t\tfunction r(i) {\r\n \t\t\tvar s1 = i ? -1 : 1,\r\n \t\t\t s2 = i ? w1 : w0,\r\n \t\t\t t1 = w1 * w1 - w0 * w0 + s1 * rho2 * rho2 * u1 * u1,\r\n \t\t\t b1 = 2 * s2 * rho2 * u1,\r\n \t\t\t b = t1 / b1,\r\n \t\t\t sq = Math.sqrt(b * b + 1) - b;\r\n\r\n \t\t\t // workaround for floating point precision bug when sq = 0, log = -Infinite,\r\n \t\t\t // thus triggering an infinite loop in flyTo\r\n \t\t\t var log = sq < 0.000000001 ? -18 : Math.log(sq);\r\n\r\n \t\t\treturn log;\r\n \t\t}\r\n\r\n \t\tfunction sinh(n) { return (Math.exp(n) - Math.exp(-n)) / 2; }\r\n \t\tfunction cosh(n) { return (Math.exp(n) + Math.exp(-n)) / 2; }\r\n \t\tfunction tanh(n) { return sinh(n) / cosh(n); }\r\n\r\n \t\tvar r0 = r(0);\r\n\r\n \t\tfunction w(s) { return w0 * (cosh(r0) / cosh(r0 + rho * s)); }\r\n \t\tfunction u(s) { return w0 * (cosh(r0) * tanh(r0 + rho * s) - sinh(r0)) / rho2; }\r\n\r\n \t\tfunction easeOut(t) { return 1 - Math.pow(1 - t, 1.5); }\r\n\r\n \t\tvar start = Date.now(),\r\n \t\t S = (r(1) - r0) / rho,\r\n \t\t duration = options.duration ? 1000 * options.duration : 1000 * S * 0.8;\r\n\r\n \t\tfunction frame() {\r\n \t\t\tvar t = (Date.now() - start) / duration,\r\n \t\t\t s = easeOut(t) * S;\r\n\r\n \t\t\tif (t <= 1) {\r\n \t\t\t\tthis._flyToFrame = requestAnimFrame(frame, this);\r\n\r\n \t\t\t\tthis._move(\r\n \t\t\t\t\tthis.unproject(from.add(to.subtract(from).multiplyBy(u(s) / u1)), startZoom),\r\n \t\t\t\t\tthis.getScaleZoom(w0 / w(s), startZoom),\r\n \t\t\t\t\t{flyTo: true});\r\n\r\n \t\t\t} else {\r\n \t\t\t\tthis\r\n \t\t\t\t\t._move(targetCenter, targetZoom)\r\n \t\t\t\t\t._moveEnd(true);\r\n \t\t\t}\r\n \t\t}\r\n\r\n \t\tthis._moveStart(true, options.noMoveStart);\r\n\r\n \t\tframe.call(this);\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method flyToBounds(bounds: LatLngBounds, options?: fitBounds options): this\r\n \t// Sets the view of the map with a smooth animation like [`flyTo`](#map-flyto),\r\n \t// but takes a bounds parameter like [`fitBounds`](#map-fitbounds).\r\n \tflyToBounds: function (bounds, options) {\r\n \t\tvar target = this._getBoundsCenterZoom(bounds, options);\r\n \t\treturn this.flyTo(target.center, target.zoom, options);\r\n \t},\r\n\r\n \t// @method setMaxBounds(bounds: LatLngBounds): this\r\n \t// Restricts the map view to the given bounds (see the [maxBounds](#map-maxbounds) option).\r\n \tsetMaxBounds: function (bounds) {\r\n \t\tbounds = toLatLngBounds(bounds);\r\n\r\n \t\tif (this.listens('moveend', this._panInsideMaxBounds)) {\r\n \t\t\tthis.off('moveend', this._panInsideMaxBounds);\r\n \t\t}\r\n\r\n \t\tif (!bounds.isValid()) {\r\n \t\t\tthis.options.maxBounds = null;\r\n \t\t\treturn this;\r\n \t\t}\r\n\r\n \t\tthis.options.maxBounds = bounds;\r\n\r\n \t\tif (this._loaded) {\r\n \t\t\tthis._panInsideMaxBounds();\r\n \t\t}\r\n\r\n \t\treturn this.on('moveend', this._panInsideMaxBounds);\r\n \t},\r\n\r\n \t// @method setMinZoom(zoom: Number): this\r\n \t// Sets the lower limit for the available zoom levels (see the [minZoom](#map-minzoom) option).\r\n \tsetMinZoom: function (zoom) {\r\n \t\tvar oldZoom = this.options.minZoom;\r\n \t\tthis.options.minZoom = zoom;\r\n\r\n \t\tif (this._loaded && oldZoom !== zoom) {\r\n \t\t\tthis.fire('zoomlevelschange');\r\n\r\n \t\t\tif (this.getZoom() < this.options.minZoom) {\r\n \t\t\t\treturn this.setZoom(zoom);\r\n \t\t\t}\r\n \t\t}\r\n\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method setMaxZoom(zoom: Number): this\r\n \t// Sets the upper limit for the available zoom levels (see the [maxZoom](#map-maxzoom) option).\r\n \tsetMaxZoom: function (zoom) {\r\n \t\tvar oldZoom = this.options.maxZoom;\r\n \t\tthis.options.maxZoom = zoom;\r\n\r\n \t\tif (this._loaded && oldZoom !== zoom) {\r\n \t\t\tthis.fire('zoomlevelschange');\r\n\r\n \t\t\tif (this.getZoom() > this.options.maxZoom) {\r\n \t\t\t\treturn this.setZoom(zoom);\r\n \t\t\t}\r\n \t\t}\r\n\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method panInsideBounds(bounds: LatLngBounds, options?: Pan options): this\r\n \t// Pans the map to the closest view that would lie inside the given bounds (if it's not already), controlling the animation using the options specific, if any.\r\n \tpanInsideBounds: function (bounds, options) {\r\n \t\tthis._enforcingBounds = true;\r\n \t\tvar center = this.getCenter(),\r\n \t\t newCenter = this._limitCenter(center, this._zoom, toLatLngBounds(bounds));\r\n\r\n \t\tif (!center.equals(newCenter)) {\r\n \t\t\tthis.panTo(newCenter, options);\r\n \t\t}\r\n\r\n \t\tthis._enforcingBounds = false;\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method panInside(latlng: LatLng, options?: padding options): this\r\n \t// Pans the map the minimum amount to make the `latlng` visible. Use\r\n \t// padding options to fit the display to more restricted bounds.\r\n \t// If `latlng` is already within the (optionally padded) display bounds,\r\n \t// the map will not be panned.\r\n \tpanInside: function (latlng, options) {\r\n \t\toptions = options || {};\r\n\r\n \t\tvar paddingTL = toPoint(options.paddingTopLeft || options.padding || [0, 0]),\r\n \t\t paddingBR = toPoint(options.paddingBottomRight || options.padding || [0, 0]),\r\n \t\t pixelCenter = this.project(this.getCenter()),\r\n \t\t pixelPoint = this.project(latlng),\r\n \t\t pixelBounds = this.getPixelBounds(),\r\n \t\t paddedBounds = toBounds([pixelBounds.min.add(paddingTL), pixelBounds.max.subtract(paddingBR)]),\r\n \t\t paddedSize = paddedBounds.getSize();\r\n\r\n \t\tif (!paddedBounds.contains(pixelPoint)) {\r\n \t\t\tthis._enforcingBounds = true;\r\n \t\t\tvar centerOffset = pixelPoint.subtract(paddedBounds.getCenter());\r\n \t\t\tvar offset = paddedBounds.extend(pixelPoint).getSize().subtract(paddedSize);\r\n \t\t\tpixelCenter.x += centerOffset.x < 0 ? -offset.x : offset.x;\r\n \t\t\tpixelCenter.y += centerOffset.y < 0 ? -offset.y : offset.y;\r\n \t\t\tthis.panTo(this.unproject(pixelCenter), options);\r\n \t\t\tthis._enforcingBounds = false;\r\n \t\t}\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method invalidateSize(options: Zoom/pan options): this\r\n \t// Checks if the map container size changed and updates the map if so —\r\n \t// call it after you've changed the map size dynamically, also animating\r\n \t// pan by default. If `options.pan` is `false`, panning will not occur.\r\n \t// If `options.debounceMoveend` is `true`, it will delay `moveend` event so\r\n \t// that it doesn't happen often even if the method is called many\r\n \t// times in a row.\r\n\r\n \t// @alternative\r\n \t// @method invalidateSize(animate: Boolean): this\r\n \t// Checks if the map container size changed and updates the map if so —\r\n \t// call it after you've changed the map size dynamically, also animating\r\n \t// pan by default.\r\n \tinvalidateSize: function (options) {\r\n \t\tif (!this._loaded) { return this; }\r\n\r\n \t\toptions = extend({\r\n \t\t\tanimate: false,\r\n \t\t\tpan: true\r\n \t\t}, options === true ? {animate: true} : options);\r\n\r\n \t\tvar oldSize = this.getSize();\r\n \t\tthis._sizeChanged = true;\r\n \t\tthis._lastCenter = null;\r\n\r\n \t\tvar newSize = this.getSize(),\r\n \t\t oldCenter = oldSize.divideBy(2).round(),\r\n \t\t newCenter = newSize.divideBy(2).round(),\r\n \t\t offset = oldCenter.subtract(newCenter);\r\n\r\n \t\tif (!offset.x && !offset.y) { return this; }\r\n\r\n \t\tif (options.animate && options.pan) {\r\n \t\t\tthis.panBy(offset);\r\n\r\n \t\t} else {\r\n \t\t\tif (options.pan) {\r\n \t\t\t\tthis._rawPanBy(offset);\r\n \t\t\t}\r\n\r\n \t\t\tthis.fire('move');\r\n\r\n \t\t\tif (options.debounceMoveend) {\r\n \t\t\t\tclearTimeout(this._sizeTimer);\r\n \t\t\t\tthis._sizeTimer = setTimeout(bind(this.fire, this, 'moveend'), 200);\r\n \t\t\t} else {\r\n \t\t\t\tthis.fire('moveend');\r\n \t\t\t}\r\n \t\t}\r\n\r\n \t\t// @section Map state change events\r\n \t\t// @event resize: ResizeEvent\r\n \t\t// Fired when the map is resized.\r\n \t\treturn this.fire('resize', {\r\n \t\t\toldSize: oldSize,\r\n \t\t\tnewSize: newSize\r\n \t\t});\r\n \t},\r\n\r\n \t// @section Methods for modifying map state\r\n \t// @method stop(): this\r\n \t// Stops the currently running `panTo` or `flyTo` animation, if any.\r\n \tstop: function () {\r\n \t\tthis.setZoom(this._limitZoom(this._zoom));\r\n \t\tif (!this.options.zoomSnap) {\r\n \t\t\tthis.fire('viewreset');\r\n \t\t}\r\n \t\treturn this._stop();\r\n \t},\r\n\r\n \t// @section Geolocation methods\r\n \t// @method locate(options?: Locate options): this\r\n \t// Tries to locate the user using the Geolocation API, firing a [`locationfound`](#map-locationfound)\r\n \t// event with location data on success or a [`locationerror`](#map-locationerror) event on failure,\r\n \t// and optionally sets the map view to the user's location with respect to\r\n \t// detection accuracy (or to the world view if geolocation failed).\r\n \t// Note that, if your page doesn't use HTTPS, this method will fail in\r\n \t// modern browsers ([Chrome 50 and newer](https://sites.google.com/a/chromium.org/dev/Home/chromium-security/deprecating-powerful-features-on-insecure-origins))\r\n \t// See `Locate options` for more details.\r\n \tlocate: function (options) {\r\n\r\n \t\toptions = this._locateOptions = extend({\r\n \t\t\ttimeout: 10000,\r\n \t\t\twatch: false\r\n \t\t\t// setView: false\r\n \t\t\t// maxZoom: <Number>\r\n \t\t\t// maximumAge: 0\r\n \t\t\t// enableHighAccuracy: false\r\n \t\t}, options);\r\n\r\n \t\tif (!('geolocation' in navigator)) {\r\n \t\t\tthis._handleGeolocationError({\r\n \t\t\t\tcode: 0,\r\n \t\t\t\tmessage: 'Geolocation not supported.'\r\n \t\t\t});\r\n \t\t\treturn this;\r\n \t\t}\r\n\r\n \t\tvar onResponse = bind(this._handleGeolocationResponse, this),\r\n \t\t onError = bind(this._handleGeolocationError, this);\r\n\r\n \t\tif (options.watch) {\r\n \t\t\tthis._locationWatchId =\r\n \t\t\t navigator.geolocation.watchPosition(onResponse, onError, options);\r\n \t\t} else {\r\n \t\t\tnavigator.geolocation.getCurrentPosition(onResponse, onError, options);\r\n \t\t}\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method stopLocate(): this\r\n \t// Stops watching location previously initiated by `map.locate({watch: true})`\r\n \t// and aborts resetting the map view if map.locate was called with\r\n \t// `{setView: true}`.\r\n \tstopLocate: function () {\r\n \t\tif (navigator.geolocation && navigator.geolocation.clearWatch) {\r\n \t\t\tnavigator.geolocation.clearWatch(this._locationWatchId);\r\n \t\t}\r\n \t\tif (this._locateOptions) {\r\n \t\t\tthis._locateOptions.setView = false;\r\n \t\t}\r\n \t\treturn this;\r\n \t},\r\n\r\n \t_handleGeolocationError: function (error) {\r\n \t\tif (!this._container._leaflet_id) { return; }\r\n\r\n \t\tvar c = error.code,\r\n \t\t message = error.message ||\r\n \t\t (c === 1 ? 'permission denied' :\r\n \t\t (c === 2 ? 'position unavailable' : 'timeout'));\r\n\r\n \t\tif (this._locateOptions.setView && !this._loaded) {\r\n \t\t\tthis.fitWorld();\r\n \t\t}\r\n\r\n \t\t// @section Location events\r\n \t\t// @event locationerror: ErrorEvent\r\n \t\t// Fired when geolocation (using the [`locate`](#map-locate) method) failed.\r\n \t\tthis.fire('locationerror', {\r\n \t\t\tcode: c,\r\n \t\t\tmessage: 'Geolocation error: ' + message + '.'\r\n \t\t});\r\n \t},\r\n\r\n \t_handleGeolocationResponse: function (pos) {\r\n \t\tif (!this._container._leaflet_id) { return; }\r\n\r\n \t\tvar lat = pos.coords.latitude,\r\n \t\t lng = pos.coords.longitude,\r\n \t\t latlng = new LatLng(lat, lng),\r\n \t\t bounds = latlng.toBounds(pos.coords.accuracy * 2),\r\n \t\t options = this._locateOptions;\r\n\r\n \t\tif (options.setView) {\r\n \t\t\tvar zoom = this.getBoundsZoom(bounds);\r\n \t\t\tthis.setView(latlng, options.maxZoom ? Math.min(zoom, options.maxZoom) : zoom);\r\n \t\t}\r\n\r\n \t\tvar data = {\r\n \t\t\tlatlng: latlng,\r\n \t\t\tbounds: bounds,\r\n \t\t\ttimestamp: pos.timestamp\r\n \t\t};\r\n\r\n \t\tfor (var i in pos.coords) {\r\n \t\t\tif (typeof pos.coords[i] === 'number') {\r\n \t\t\t\tdata[i] = pos.coords[i];\r\n \t\t\t}\r\n \t\t}\r\n\r\n \t\t// @event locationfound: LocationEvent\r\n \t\t// Fired when geolocation (using the [`locate`](#map-locate) method)\r\n \t\t// went successfully.\r\n \t\tthis.fire('locationfound', data);\r\n \t},\r\n\r\n \t// TODO Appropriate docs section?\r\n \t// @section Other Methods\r\n \t// @method addHandler(name: String, HandlerClass: Function): this\r\n \t// Adds a new `Handler` to the map, given its name and constructor function.\r\n \taddHandler: function (name, HandlerClass) {\r\n \t\tif (!HandlerClass) { return this; }\r\n\r\n \t\tvar handler = this[name] = new HandlerClass(this);\r\n\r\n \t\tthis._handlers.push(handler);\r\n\r\n \t\tif (this.options[name]) {\r\n \t\t\thandler.enable();\r\n \t\t}\r\n\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method remove(): this\r\n \t// Destroys the map and clears all related event listeners.\r\n \tremove: function () {\r\n\r\n \t\tthis._initEvents(true);\r\n \t\tif (this.options.maxBounds) { this.off('moveend', this._panInsideMaxBounds); }\r\n\r\n \t\tif (this._containerId !== this._container._leaflet_id) {\r\n \t\t\tthrow new Error('Map container is being reused by another instance');\r\n \t\t}\r\n\r\n \t\ttry {\r\n \t\t\t// throws error in IE6-8\r\n \t\t\tdelete this._container._leaflet_id;\r\n \t\t\tdelete this._containerId;\r\n \t\t} catch (e) {\r\n \t\t\t/*eslint-disable */\r\n \t\t\tthis._container._leaflet_id = undefined;\r\n \t\t\t/* eslint-enable */\r\n \t\t\tthis._containerId = undefined;\r\n \t\t}\r\n\r\n \t\tif (this._locationWatchId !== undefined) {\r\n \t\t\tthis.stopLocate();\r\n \t\t}\r\n\r\n \t\tthis._stop();\r\n\r\n \t\tremove(this._mapPane);\r\n\r\n \t\tif (this._clearControlPos) {\r\n \t\t\tthis._clearControlPos();\r\n \t\t}\r\n \t\tif (this._resizeRequest) {\r\n \t\t\tcancelAnimFrame(this._resizeRequest);\r\n \t\t\tthis._resizeRequest = null;\r\n \t\t}\r\n\r\n \t\tthis._clearHandlers();\r\n\r\n \t\tif (this._loaded) {\r\n \t\t\t// @section Map state change events\r\n \t\t\t// @event unload: Event\r\n \t\t\t// Fired when the map is destroyed with [remove](#map-remove) method.\r\n \t\t\tthis.fire('unload');\r\n \t\t}\r\n\r\n \t\tvar i;\r\n \t\tfor (i in this._layers) {\r\n \t\t\tthis._layers[i].remove();\r\n \t\t}\r\n \t\tfor (i in this._panes) {\r\n \t\t\tremove(this._panes[i]);\r\n \t\t}\r\n\r\n \t\tthis._layers = [];\r\n \t\tthis._panes = [];\r\n \t\tdelete this._mapPane;\r\n \t\tdelete this._renderer;\r\n\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @section Other Methods\r\n \t// @method createPane(name: String, container?: HTMLElement): HTMLElement\r\n \t// Creates a new [map pane](#map-pane) with the given name if it doesn't exist already,\r\n \t// then returns it. The pane is created as a child of `container`, or\r\n \t// as a child of the main map pane if not set.\r\n \tcreatePane: function (name, container) {\r\n \t\tvar className = 'leaflet-pane' + (name ? ' leaflet-' + name.replace('Pane', '') + '-pane' : ''),\r\n \t\t pane = create$1('div', className, container || this._mapPane);\r\n\r\n \t\tif (name) {\r\n \t\t\tthis._panes[name] = pane;\r\n \t\t}\r\n \t\treturn pane;\r\n \t},\r\n\r\n \t// @section Methods for Getting Map State\r\n\r\n \t// @method getCenter(): LatLng\r\n \t// Returns the geographical center of the map view\r\n \tgetCenter: function () {\r\n \t\tthis._checkIfLoaded();\r\n\r\n \t\tif (this._lastCenter && !this._moved()) {\r\n \t\t\treturn this._lastCenter.clone();\r\n \t\t}\r\n \t\treturn this.layerPointToLatLng(this._getCenterLayerPoint());\r\n \t},\r\n\r\n \t// @method getZoom(): Number\r\n \t// Returns the current zoom level of the map view\r\n \tgetZoom: function () {\r\n \t\treturn this._zoom;\r\n \t},\r\n\r\n \t// @method getBounds(): LatLngBounds\r\n \t// Returns the geographical bounds visible in the current map view\r\n \tgetBounds: function () {\r\n \t\tvar bounds = this.getPixelBounds(),\r\n \t\t sw = this.unproject(bounds.getBottomLeft()),\r\n \t\t ne = this.unproject(bounds.getTopRight());\r\n\r\n \t\treturn new LatLngBounds(sw, ne);\r\n \t},\r\n\r\n \t// @method getMinZoom(): Number\r\n \t// Returns the minimum zoom level of the map (if set in the `minZoom` option of the map or of any layers), or `0` by default.\r\n \tgetMinZoom: function () {\r\n \t\treturn this.options.minZoom === undefined ? this._layersMinZoom || 0 : this.options.minZoom;\r\n \t},\r\n\r\n \t// @method getMaxZoom(): Number\r\n \t// Returns the maximum zoom level of the map (if set in the `maxZoom` option of the map or of any layers).\r\n \tgetMaxZoom: function () {\r\n \t\treturn this.options.maxZoom === undefined ?\r\n \t\t\t(this._layersMaxZoom === undefined ? Infinity : this._layersMaxZoom) :\r\n \t\t\tthis.options.maxZoom;\r\n \t},\r\n\r\n \t// @method getBoundsZoom(bounds: LatLngBounds, inside?: Boolean, padding?: Point): Number\r\n \t// Returns the maximum zoom level on which the given bounds fit to the map\r\n \t// view in its entirety. If `inside` (optional) is set to `true`, the method\r\n \t// instead returns the minimum zoom level on which the map view fits into\r\n \t// the given bounds in its entirety.\r\n \tgetBoundsZoom: function (bounds, inside, padding) { // (LatLngBounds[, Boolean, Point]) -> Number\r\n \t\tbounds = toLatLngBounds(bounds);\r\n \t\tpadding = toPoint(padding || [0, 0]);\r\n\r\n \t\tvar zoom = this.getZoom() || 0,\r\n \t\t min = this.getMinZoom(),\r\n \t\t max = this.getMaxZoom(),\r\n \t\t nw = bounds.getNorthWest(),\r\n \t\t se = bounds.getSouthEast(),\r\n \t\t size = this.getSize().subtract(padding),\r\n \t\t boundsSize = toBounds(this.project(se, zoom), this.project(nw, zoom)).getSize(),\r\n \t\t snap = Browser.any3d ? this.options.zoomSnap : 1,\r\n \t\t scalex = size.x / boundsSize.x,\r\n \t\t scaley = size.y / boundsSize.y,\r\n \t\t scale = inside ? Math.max(scalex, scaley) : Math.min(scalex, scaley);\r\n\r\n \t\tzoom = this.getScaleZoom(scale, zoom);\r\n\r\n \t\tif (snap) {\r\n \t\t\tzoom = Math.round(zoom / (snap / 100)) * (snap / 100); // don't jump if within 1% of a snap level\r\n \t\t\tzoom = inside ? Math.ceil(zoom / snap) * snap : Math.floor(zoom / snap) * snap;\r\n \t\t}\r\n\r\n \t\treturn Math.max(min, Math.min(max, zoom));\r\n \t},\r\n\r\n \t// @method getSize(): Point\r\n \t// Returns the current size of the map container (in pixels).\r\n \tgetSize: function () {\r\n \t\tif (!this._size || this._sizeChanged) {\r\n \t\t\tthis._size = new Point(\r\n \t\t\t\tthis._container.clientWidth || 0,\r\n \t\t\t\tthis._container.clientHeight || 0);\r\n\r\n \t\t\tthis._sizeChanged = false;\r\n \t\t}\r\n \t\treturn this._size.clone();\r\n \t},\r\n\r\n \t// @method getPixelBounds(): Bounds\r\n \t// Returns the bounds of the current map view in projected pixel\r\n \t// coordinates (sometimes useful in layer and overlay implementations).\r\n \tgetPixelBounds: function (center, zoom) {\r\n \t\tvar topLeftPoint = this._getTopLeftPoint(center, zoom);\r\n \t\treturn new Bounds(topLeftPoint, topLeftPoint.add(this.getSize()));\r\n \t},\r\n\r\n \t// TODO: Check semantics - isn't the pixel origin the 0,0 coord relative to\r\n \t// the map pane? \"left point of the map layer\" can be confusing, specially\r\n \t// since there can be negative offsets.\r\n \t// @method getPixelOrigin(): Point\r\n \t// Returns the projected pixel coordinates of the top left point of\r\n \t// the map layer (useful in custom layer and overlay implementations).\r\n \tgetPixelOrigin: function () {\r\n \t\tthis._checkIfLoaded();\r\n \t\treturn this._pixelOrigin;\r\n \t},\r\n\r\n \t// @method getPixelWorldBounds(zoom?: Number): Bounds\r\n \t// Returns the world's bounds in pixel coordinates for zoom level `zoom`.\r\n \t// If `zoom` is omitted, the map's current zoom level is used.\r\n \tgetPixelWorldBounds: function (zoom) {\r\n \t\treturn this.options.crs.getProjectedBounds(zoom === undefined ? this.getZoom() : zoom);\r\n \t},\r\n\r\n \t// @section Other Methods\r\n\r\n \t// @method getPane(pane: String|HTMLElement): HTMLElement\r\n \t// Returns a [map pane](#map-pane), given its name or its HTML element (its identity).\r\n \tgetPane: function (pane) {\r\n \t\treturn typeof pane === 'string' ? this._panes[pane] : pane;\r\n \t},\r\n\r\n \t// @method getPanes(): Object\r\n \t// Returns a plain object containing the names of all [panes](#map-pane) as keys and\r\n \t// the panes as values.\r\n \tgetPanes: function () {\r\n \t\treturn this._panes;\r\n \t},\r\n\r\n \t// @method getContainer: HTMLElement\r\n \t// Returns the HTML element that contains the map.\r\n \tgetContainer: function () {\r\n \t\treturn this._container;\r\n \t},\r\n\r\n\r\n \t// @section Conversion Methods\r\n\r\n \t// @method getZoomScale(toZoom: Number, fromZoom: Number): Number\r\n \t// Returns the scale factor to be applied to a map transition from zoom level\r\n \t// `fromZoom` to `toZoom`. Used internally to help with zoom animations.\r\n \tgetZoomScale: function (toZoom, fromZoom) {\r\n \t\t// TODO replace with universal implementation after refactoring projections\r\n \t\tvar crs = this.options.crs;\r\n \t\tfromZoom = fromZoom === undefined ? this._zoom : fromZoom;\r\n \t\treturn crs.scale(toZoom) / crs.scale(fromZoom);\r\n \t},\r\n\r\n \t// @method getScaleZoom(scale: Number, fromZoom: Number): Number\r\n \t// Returns the zoom level that the map would end up at, if it is at `fromZoom`\r\n \t// level and everything is scaled by a factor of `scale`. Inverse of\r\n \t// [`getZoomScale`](#map-getZoomScale).\r\n \tgetScaleZoom: function (scale, fromZoom) {\r\n \t\tvar crs = this.options.crs;\r\n \t\tfromZoom = fromZoom === undefined ? this._zoom : fromZoom;\r\n \t\tvar zoom = crs.zoom(scale * crs.scale(fromZoom));\r\n \t\treturn isNaN(zoom) ? Infinity : zoom;\r\n \t},\r\n\r\n \t// @method project(latlng: LatLng, zoom: Number): Point\r\n \t// Projects a geographical coordinate `LatLng` according to the projection\r\n \t// of the map's CRS, then scales it according to `zoom` and the CRS's\r\n \t// `Transformation`. The result is pixel coordinate relative to\r\n \t// the CRS origin.\r\n \tproject: function (latlng, zoom) {\r\n \t\tzoom = zoom === undefined ? this._zoom : zoom;\r\n \t\treturn this.options.crs.latLngToPoint(toLatLng(latlng), zoom);\r\n \t},\r\n\r\n \t// @method unproject(point: Point, zoom: Number): LatLng\r\n \t// Inverse of [`project`](#map-project).\r\n \tunproject: function (point, zoom) {\r\n \t\tzoom = zoom === undefined ? this._zoom : zoom;\r\n \t\treturn this.options.crs.pointToLatLng(toPoint(point), zoom);\r\n \t},\r\n\r\n \t// @method layerPointToLatLng(point: Point): LatLng\r\n \t// Given a pixel coordinate relative to the [origin pixel](#map-getpixelorigin),\r\n \t// returns the corresponding geographical coordinate (for the current zoom level).\r\n \tlayerPointToLatLng: function (point) {\r\n \t\tvar projectedPoint = toPoint(point).add(this.getPixelOrigin());\r\n \t\treturn this.unproject(projectedPoint);\r\n \t},\r\n\r\n \t// @method latLngToLayerPoint(latlng: LatLng): Point\r\n \t// Given a geographical coordinate, returns the corresponding pixel coordinate\r\n \t// relative to the [origin pixel](#map-getpixelorigin).\r\n \tlatLngToLayerPoint: function (latlng) {\r\n \t\tvar projectedPoint = this.project(toLatLng(latlng))._round();\r\n \t\treturn projectedPoint._subtract(this.getPixelOrigin());\r\n \t},\r\n\r\n \t// @method wrapLatLng(latlng: LatLng): LatLng\r\n \t// Returns a `LatLng` where `lat` and `lng` has been wrapped according to the\r\n \t// map's CRS's `wrapLat` and `wrapLng` properties, if they are outside the\r\n \t// CRS's bounds.\r\n \t// By default this means longitude is wrapped around the dateline so its\r\n \t// value is between -180 and +180 degrees.\r\n \twrapLatLng: function (latlng) {\r\n \t\treturn this.options.crs.wrapLatLng(toLatLng(latlng));\r\n \t},\r\n\r\n \t// @method wrapLatLngBounds(bounds: LatLngBounds): LatLngBounds\r\n \t// Returns a `LatLngBounds` with the same size as the given one, ensuring that\r\n \t// its center is within the CRS's bounds.\r\n \t// By default this means the center longitude is wrapped around the dateline so its\r\n \t// value is between -180 and +180 degrees, and the majority of the bounds\r\n \t// overlaps the CRS's bounds.\r\n \twrapLatLngBounds: function (latlng) {\r\n \t\treturn this.options.crs.wrapLatLngBounds(toLatLngBounds(latlng));\r\n \t},\r\n\r\n \t// @method distance(latlng1: LatLng, latlng2: LatLng): Number\r\n \t// Returns the distance between two geographical coordinates according to\r\n \t// the map's CRS. By default this measures distance in meters.\r\n \tdistance: function (latlng1, latlng2) {\r\n \t\treturn this.options.crs.distance(toLatLng(latlng1), toLatLng(latlng2));\r\n \t},\r\n\r\n \t// @method containerPointToLayerPoint(point: Point): Point\r\n \t// Given a pixel coordinate relative to the map container, returns the corresponding\r\n \t// pixel coordinate relative to the [origin pixel](#map-getpixelorigin).\r\n \tcontainerPointToLayerPoint: function (point) { // (Point)\r\n \t\treturn toPoint(point).subtract(this._getMapPanePos());\r\n \t},\r\n\r\n \t// @method layerPointToContainerPoint(point: Point): Point\r\n \t// Given a pixel coordinate relative to the [origin pixel](#map-getpixelorigin),\r\n \t// returns the corresponding pixel coordinate relative to the map container.\r\n \tlayerPointToContainerPoint: function (point) { // (Point)\r\n \t\treturn toPoint(point).add(this._getMapPanePos());\r\n \t},\r\n\r\n \t// @method containerPointToLatLng(point: Point): LatLng\r\n \t// Given a pixel coordinate relative to the map container, returns\r\n \t// the corresponding geographical coordinate (for the current zoom level).\r\n \tcontainerPointToLatLng: function (point) {\r\n \t\tvar layerPoint = this.containerPointToLayerPoint(toPoint(point));\r\n \t\treturn this.layerPointToLatLng(layerPoint);\r\n \t},\r\n\r\n \t// @method latLngToContainerPoint(latlng: LatLng): Point\r\n \t// Given a geographical coordinate, returns the corresponding pixel coordinate\r\n \t// relative to the map container.\r\n \tlatLngToContainerPoint: function (latlng) {\r\n \t\treturn this.layerPointToContainerPoint(this.latLngToLayerPoint(toLatLng(latlng)));\r\n \t},\r\n\r\n \t// @method mouseEventToContainerPoint(ev: MouseEvent): Point\r\n \t// Given a MouseEvent object, returns the pixel coordinate relative to the\r\n \t// map container where the event took place.\r\n \tmouseEventToContainerPoint: function (e) {\r\n \t\treturn getMousePosition(e, this._container);\r\n \t},\r\n\r\n \t// @method mouseEventToLayerPoint(ev: MouseEvent): Point\r\n \t// Given a MouseEvent object, returns the pixel coordinate relative to\r\n \t// the [origin pixel](#map-getpixelorigin) where the event took place.\r\n \tmouseEventToLayerPoint: function (e) {\r\n \t\treturn this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e));\r\n \t},\r\n\r\n \t// @method mouseEventToLatLng(ev: MouseEvent): LatLng\r\n \t// Given a MouseEvent object, returns geographical coordinate where the\r\n \t// event took place.\r\n \tmouseEventToLatLng: function (e) { // (MouseEvent)\r\n \t\treturn this.layerPointToLatLng(this.mouseEventToLayerPoint(e));\r\n \t},\r\n\r\n\r\n \t// map initialization methods\r\n\r\n \t_initContainer: function (id) {\r\n \t\tvar container = this._container = get(id);\r\n\r\n \t\tif (!container) {\r\n \t\t\tthrow new Error('Map container not found.');\r\n \t\t} else if (container._leaflet_id) {\r\n \t\t\tthrow new Error('Map container is already initialized.');\r\n \t\t}\r\n\r\n \t\ton(container, 'scroll', this._onScroll, this);\r\n \t\tthis._containerId = stamp(container);\r\n \t},\r\n\r\n \t_initLayout: function () {\r\n \t\tvar container = this._container;\r\n\r\n \t\tthis._fadeAnimated = this.options.fadeAnimation && Browser.any3d;\r\n\r\n \t\taddClass(container, 'leaflet-container' +\r\n \t\t\t(Browser.touch ? ' leaflet-touch' : '') +\r\n \t\t\t(Browser.retina ? ' leaflet-retina' : '') +\r\n \t\t\t(Browser.ielt9 ? ' leaflet-oldie' : '') +\r\n \t\t\t(Browser.safari ? ' leaflet-safari' : '') +\r\n \t\t\t(this._fadeAnimated ? ' leaflet-fade-anim' : ''));\r\n\r\n \t\tvar position = getStyle(container, 'position');\r\n\r\n \t\tif (position !== 'absolute' && position !== 'relative' && position !== 'fixed' && position !== 'sticky') {\r\n \t\t\tcontainer.style.position = 'relative';\r\n \t\t}\r\n\r\n \t\tthis._initPanes();\r\n\r\n \t\tif (this._initControlPos) {\r\n \t\t\tthis._initControlPos();\r\n \t\t}\r\n \t},\r\n\r\n \t_initPanes: function () {\r\n \t\tvar panes = this._panes = {};\r\n \t\tthis._paneRenderers = {};\r\n\r\n \t\t// @section\r\n \t\t//\r\n \t\t// Panes are DOM elements used to control the ordering of layers on the map. You\r\n \t\t// can access panes with [`map.getPane`](#map-getpane) or\r\n \t\t// [`map.getPanes`](#map-getpanes) methods. New panes can be created with the\r\n \t\t// [`map.createPane`](#map-createpane) method.\r\n \t\t//\r\n \t\t// Every map has the following default panes that differ only in zIndex.\r\n \t\t//\r\n \t\t// @pane mapPane: HTMLElement = 'auto'\r\n \t\t// Pane that contains all other map panes\r\n\r\n \t\tthis._mapPane = this.createPane('mapPane', this._container);\r\n \t\tsetPosition(this._mapPane, new Point(0, 0));\r\n\r\n \t\t// @pane tilePane: HTMLElement = 200\r\n \t\t// Pane for `GridLayer`s and `TileLayer`s\r\n \t\tthis.createPane('tilePane');\r\n \t\t// @pane overlayPane: HTMLElement = 400\r\n \t\t// Pane for vectors (`Path`s, like `Polyline`s and `Polygon`s), `ImageOverlay`s and `VideoOverlay`s\r\n \t\tthis.createPane('overlayPane');\r\n \t\t// @pane shadowPane: HTMLElement = 500\r\n \t\t// Pane for overlay shadows (e.g. `Marker` shadows)\r\n \t\tthis.createPane('shadowPane');\r\n \t\t// @pane markerPane: HTMLElement = 600\r\n \t\t// Pane for `Icon`s of `Marker`s\r\n \t\tthis.createPane('markerPane');\r\n \t\t// @pane tooltipPane: HTMLElement = 650\r\n \t\t// Pane for `Tooltip`s.\r\n \t\tthis.createPane('tooltipPane');\r\n \t\t// @pane popupPane: HTMLElement = 700\r\n \t\t// Pane for `Popup`s.\r\n \t\tthis.createPane('popupPane');\r\n\r\n \t\tif (!this.options.markerZoomAnimation) {\r\n \t\t\taddClass(panes.markerPane, 'leaflet-zoom-hide');\r\n \t\t\taddClass(panes.shadowPane, 'leaflet-zoom-hide');\r\n \t\t}\r\n \t},\r\n\r\n\r\n \t// private methods that modify map state\r\n\r\n \t// @section Map state change events\r\n \t_resetView: function (center, zoom, noMoveStart) {\r\n \t\tsetPosition(this._mapPane, new Point(0, 0));\r\n\r\n \t\tvar loading = !this._loaded;\r\n \t\tthis._loaded = true;\r\n \t\tzoom = this._limitZoom(zoom);\r\n\r\n \t\tthis.fire('viewprereset');\r\n\r\n \t\tvar zoomChanged = this._zoom !== zoom;\r\n \t\tthis\r\n \t\t\t._moveStart(zoomChanged, noMoveStart)\r\n \t\t\t._move(center, zoom)\r\n \t\t\t._moveEnd(zoomChanged);\r\n\r\n \t\t// @event viewreset: Event\r\n \t\t// Fired when the map needs to redraw its content (this usually happens\r\n \t\t// on map zoom or load). Very useful for creating custom overlays.\r\n \t\tthis.fire('viewreset');\r\n\r\n \t\t// @event load: Event\r\n \t\t// Fired when the map is initialized (when its center and zoom are set\r\n \t\t// for the first time).\r\n \t\tif (loading) {\r\n \t\t\tthis.fire('load');\r\n \t\t}\r\n \t},\r\n\r\n \t_moveStart: function (zoomChanged, noMoveStart) {\r\n \t\t// @event zoomstart: Event\r\n \t\t// Fired when the map zoom is about to change (e.g. before zoom animation).\r\n \t\t// @event movestart: Event\r\n \t\t// Fired when the view of the map starts changing (e.g. user starts dragging the map).\r\n \t\tif (zoomChanged) {\r\n \t\t\tthis.fire('zoomstart');\r\n \t\t}\r\n \t\tif (!noMoveStart) {\r\n \t\t\tthis.fire('movestart');\r\n \t\t}\r\n \t\treturn this;\r\n \t},\r\n\r\n \t_move: function (center, zoom, data, supressEvent) {\r\n \t\tif (zoom === undefined) {\r\n \t\t\tzoom = this._zoom;\r\n \t\t}\r\n \t\tvar zoomChanged = this._zoom !== zoom;\r\n\r\n \t\tthis._zoom = zoom;\r\n \t\tthis._lastCenter = center;\r\n \t\tthis._pixelOrigin = this._getNewPixelOrigin(center);\r\n\r\n \t\tif (!supressEvent) {\r\n \t\t\t// @event zoom: Event\r\n \t\t\t// Fired repeatedly during any change in zoom level,\r\n \t\t\t// including zoom and fly animations.\r\n \t\t\tif (zoomChanged || (data && data.pinch)) {\t// Always fire 'zoom' if pinching because #3530\r\n \t\t\t\tthis.fire('zoom', data);\r\n \t\t\t}\r\n\r\n \t\t\t// @event move: Event\r\n \t\t\t// Fired repeatedly during any movement of the map,\r\n \t\t\t// including pan and fly animations.\r\n \t\t\tthis.fire('move', data);\r\n \t\t} else if (data && data.pinch) {\t// Always fire 'zoom' if pinching because #3530\r\n \t\t\tthis.fire('zoom', data);\r\n \t\t}\r\n \t\treturn this;\r\n \t},\r\n\r\n \t_moveEnd: function (zoomChanged) {\r\n \t\t// @event zoomend: Event\r\n \t\t// Fired when the map zoom changed, after any animations.\r\n \t\tif (zoomChanged) {\r\n \t\t\tthis.fire('zoomend');\r\n \t\t}\r\n\r\n \t\t// @event moveend: Event\r\n \t\t// Fired when the center of the map stops changing\r\n \t\t// (e.g. user stopped dragging the map or after non-centered zoom).\r\n \t\treturn this.fire('moveend');\r\n \t},\r\n\r\n \t_stop: function () {\r\n \t\tcancelAnimFrame(this._flyToFrame);\r\n \t\tif (this._panAnim) {\r\n \t\t\tthis._panAnim.stop();\r\n \t\t}\r\n \t\treturn this;\r\n \t},\r\n\r\n \t_rawPanBy: function (offset) {\r\n \t\tsetPosition(this._mapPane, this._getMapPanePos().subtract(offset));\r\n \t},\r\n\r\n \t_getZoomSpan: function () {\r\n \t\treturn this.getMaxZoom() - this.getMinZoom();\r\n \t},\r\n\r\n \t_panInsideMaxBounds: function () {\r\n \t\tif (!this._enforcingBounds) {\r\n \t\t\tthis.panInsideBounds(this.options.maxBounds);\r\n \t\t}\r\n \t},\r\n\r\n \t_checkIfLoaded: function () {\r\n \t\tif (!this._loaded) {\r\n \t\t\tthrow new Error('Set map center and zoom first.');\r\n \t\t}\r\n \t},\r\n\r\n \t// DOM event handling\r\n\r\n \t// @section Interaction events\r\n \t_initEvents: function (remove) {\r\n \t\tthis._targets = {};\r\n \t\tthis._targets[stamp(this._container)] = this;\r\n\r\n \t\tvar onOff = remove ? off : on;\r\n\r\n \t\t// @event click: MouseEvent\r\n \t\t// Fired when the user clicks (or taps) the map.\r\n \t\t// @event dblclick: MouseEvent\r\n \t\t// Fired when the user double-clicks (or double-taps) the map.\r\n \t\t// @event mousedown: MouseEvent\r\n \t\t// Fired when the user pushes the mouse button on the map.\r\n \t\t// @event mouseup: MouseEvent\r\n \t\t// Fired when the user releases the mouse button on the map.\r\n \t\t// @event mouseover: MouseEvent\r\n \t\t// Fired when the mouse enters the map.\r\n \t\t// @event mouseout: MouseEvent\r\n \t\t// Fired when the mouse leaves the map.\r\n \t\t// @event mousemove: MouseEvent\r\n \t\t// Fired while the mouse moves over the map.\r\n \t\t// @event contextmenu: MouseEvent\r\n \t\t// Fired when the user pushes the right mouse button on the map, prevents\r\n \t\t// default browser context menu from showing if there are listeners on\r\n \t\t// this event. Also fired on mobile when the user holds a single touch\r\n \t\t// for a second (also called long press).\r\n \t\t// @event keypress: KeyboardEvent\r\n \t\t// Fired when the user presses a key from the keyboard that produces a character value while the map is focused.\r\n \t\t// @event keydown: KeyboardEvent\r\n \t\t// Fired when the user presses a key from the keyboard while the map is focused. Unlike the `keypress` event,\r\n \t\t// the `keydown` event is fired for keys that produce a character value and for keys\r\n \t\t// that do not produce a character value.\r\n \t\t// @event keyup: KeyboardEvent\r\n \t\t// Fired when the user releases a key from the keyboard while the map is focused.\r\n \t\tonOff(this._container, 'click dblclick mousedown mouseup ' +\r\n \t\t\t'mouseover mouseout mousemove contextmenu keypress keydown keyup', this._handleDOMEvent, this);\r\n\r\n \t\tif (this.options.trackResize) {\r\n \t\t\tonOff(window, 'resize', this._onResize, this);\r\n \t\t}\r\n\r\n \t\tif (Browser.any3d && this.options.transform3DLimit) {\r\n \t\t\t(remove ? this.off : this.on).call(this, 'moveend', this._onMoveEnd);\r\n \t\t}\r\n \t},\r\n\r\n \t_onResize: function () {\r\n \t\tcancelAnimFrame(this._resizeRequest);\r\n \t\tthis._resizeRequest = requestAnimFrame(\r\n \t\t function () { this.invalidateSize({debounceMoveend: true}); }, this);\r\n \t},\r\n\r\n \t_onScroll: function () {\r\n \t\tthis._container.scrollTop = 0;\r\n \t\tthis._container.scrollLeft = 0;\r\n \t},\r\n\r\n \t_onMoveEnd: function () {\r\n \t\tvar pos = this._getMapPanePos();\r\n \t\tif (Math.max(Math.abs(pos.x), Math.abs(pos.y)) >= this.options.transform3DLimit) {\r\n \t\t\t// https://bugzilla.mozilla.org/show_bug.cgi?id=1203873 but Webkit also have\r\n \t\t\t// a pixel offset on very high values, see: https://jsfiddle.net/dg6r5hhb/\r\n \t\t\tthis._resetView(this.getCenter(), this.getZoom());\r\n \t\t}\r\n \t},\r\n\r\n \t_findEventTargets: function (e, type) {\r\n \t\tvar targets = [],\r\n \t\t target,\r\n \t\t isHover = type === 'mouseout' || type === 'mouseover',\r\n \t\t src = e.target || e.srcElement,\r\n \t\t dragging = false;\r\n\r\n \t\twhile (src) {\r\n \t\t\ttarget = this._targets[stamp(src)];\r\n \t\t\tif (target && (type === 'click' || type === 'preclick') && this._draggableMoved(target)) {\r\n \t\t\t\t// Prevent firing click after you just dragged an object.\r\n \t\t\t\tdragging = true;\r\n \t\t\t\tbreak;\r\n \t\t\t}\r\n \t\t\tif (target && target.listens(type, true)) {\r\n \t\t\t\tif (isHover && !isExternalTarget(src, e)) { break; }\r\n \t\t\t\ttargets.push(target);\r\n \t\t\t\tif (isHover) { break; }\r\n \t\t\t}\r\n \t\t\tif (src === this._container) { break; }\r\n \t\t\tsrc = src.parentNode;\r\n \t\t}\r\n \t\tif (!targets.length && !dragging && !isHover && this.listens(type, true)) {\r\n \t\t\ttargets = [this];\r\n \t\t}\r\n \t\treturn targets;\r\n \t},\r\n\r\n \t_isClickDisabled: function (el) {\r\n \t\twhile (el && el !== this._container) {\r\n \t\t\tif (el['_leaflet_disable_click']) { return true; }\r\n \t\t\tel = el.parentNode;\r\n \t\t}\r\n \t},\r\n\r\n \t_handleDOMEvent: function (e) {\r\n \t\tvar el = (e.target || e.srcElement);\r\n \t\tif (!this._loaded || el['_leaflet_disable_events'] || e.type === 'click' && this._isClickDisabled(el)) {\r\n \t\t\treturn;\r\n \t\t}\r\n\r\n \t\tvar type = e.type;\r\n\r\n \t\tif (type === 'mousedown') {\r\n \t\t\t// prevents outline when clicking on keyboard-focusable element\r\n \t\t\tpreventOutline(el);\r\n \t\t}\r\n\r\n \t\tthis._fireDOMEvent(e, type);\r\n \t},\r\n\r\n \t_mouseEvents: ['click', 'dblclick', 'mouseover', 'mouseout', 'contextmenu'],\r\n\r\n \t_fireDOMEvent: function (e, type, canvasTargets) {\r\n\r\n \t\tif (e.type === 'click') {\r\n \t\t\t// Fire a synthetic 'preclick' event which propagates up (mainly for closing popups).\r\n \t\t\t// @event preclick: MouseEvent\r\n \t\t\t// Fired before mouse click on the map (sometimes useful when you\r\n \t\t\t// want something to happen on click before any existing click\r\n \t\t\t// handlers start running).\r\n \t\t\tvar synth = extend({}, e);\r\n \t\t\tsynth.type = 'preclick';\r\n \t\t\tthis._fireDOMEvent(synth, synth.type, canvasTargets);\r\n \t\t}\r\n\r\n \t\t// Find the layer the event is propagating from and its parents.\r\n \t\tvar targets = this._findEventTargets(e, type);\r\n\r\n \t\tif (canvasTargets) {\r\n \t\t\tvar filtered = []; // pick only targets with listeners\r\n \t\t\tfor (var i = 0; i < canvasTargets.length; i++) {\r\n \t\t\t\tif (canvasTargets[i].listens(type, true)) {\r\n \t\t\t\t\tfiltered.push(canvasTargets[i]);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\ttargets = filtered.concat(targets);\r\n \t\t}\r\n\r\n \t\tif (!targets.length) { return; }\r\n\r\n \t\tif (type === 'contextmenu') {\r\n \t\t\tpreventDefault(e);\r\n \t\t}\r\n\r\n \t\tvar target = targets[0];\r\n \t\tvar data = {\r\n \t\t\toriginalEvent: e\r\n \t\t};\r\n\r\n \t\tif (e.type !== 'keypress' && e.type !== 'keydown' && e.type !== 'keyup') {\r\n \t\t\tvar isMarker = target.getLatLng && (!target._radius || target._radius <= 10);\r\n \t\t\tdata.containerPoint = isMarker ?\r\n \t\t\t\tthis.latLngToContainerPoint(target.getLatLng()) : this.mouseEventToContainerPoint(e);\r\n \t\t\tdata.layerPoint = this.containerPointToLayerPoint(data.containerPoint);\r\n \t\t\tdata.latlng = isMarker ? target.getLatLng() : this.layerPointToLatLng(data.layerPoint);\r\n \t\t}\r\n\r\n \t\tfor (i = 0; i < targets.length; i++) {\r\n \t\t\ttargets[i].fire(type, data, true);\r\n \t\t\tif (data.originalEvent._stopped ||\r\n \t\t\t\t(targets[i].options.bubblingMouseEvents === false && indexOf(this._mouseEvents, type) !== -1)) { return; }\r\n \t\t}\r\n \t},\r\n\r\n \t_draggableMoved: function (obj) {\r\n \t\tobj = obj.dragging && obj.dragging.enabled() ? obj : this;\r\n \t\treturn (obj.dragging && obj.dragging.moved()) || (this.boxZoom && this.boxZoom.moved());\r\n \t},\r\n\r\n \t_clearHandlers: function () {\r\n \t\tfor (var i = 0, len = this._handlers.length; i < len; i++) {\r\n \t\t\tthis._handlers[i].disable();\r\n \t\t}\r\n \t},\r\n\r\n \t// @section Other Methods\r\n\r\n \t// @method whenReady(fn: Function, context?: Object): this\r\n \t// Runs the given function `fn` when the map gets initialized with\r\n \t// a view (center and zoom) and at least one layer, or immediately\r\n \t// if it's already initialized, optionally passing a function context.\r\n \twhenReady: function (callback, context) {\r\n \t\tif (this._loaded) {\r\n \t\t\tcallback.call(context || this, {target: this});\r\n \t\t} else {\r\n \t\t\tthis.on('load', callback, context);\r\n \t\t}\r\n \t\treturn this;\r\n \t},\r\n\r\n\r\n \t// private methods for getting map state\r\n\r\n \t_getMapPanePos: function () {\r\n \t\treturn getPosition(this._mapPane) || new Point(0, 0);\r\n \t},\r\n\r\n \t_moved: function () {\r\n \t\tvar pos = this._getMapPanePos();\r\n \t\treturn pos && !pos.equals([0, 0]);\r\n \t},\r\n\r\n \t_getTopLeftPoint: function (center, zoom) {\r\n \t\tvar pixelOrigin = center && zoom !== undefined ?\r\n \t\t\tthis._getNewPixelOrigin(center, zoom) :\r\n \t\t\tthis.getPixelOrigin();\r\n \t\treturn pixelOrigin.subtract(this._getMapPanePos());\r\n \t},\r\n\r\n \t_getNewPixelOrigin: function (center, zoom) {\r\n \t\tvar viewHalf = this.getSize()._divideBy(2);\r\n \t\treturn this.project(center, zoom)._subtract(viewHalf)._add(this._getMapPanePos())._round();\r\n \t},\r\n\r\n \t_latLngToNewLayerPoint: function (latlng, zoom, center) {\r\n \t\tvar topLeft = this._getNewPixelOrigin(center, zoom);\r\n \t\treturn this.project(latlng, zoom)._subtract(topLeft);\r\n \t},\r\n\r\n \t_latLngBoundsToNewLayerBounds: function (latLngBounds, zoom, center) {\r\n \t\tvar topLeft = this._getNewPixelOrigin(center, zoom);\r\n \t\treturn toBounds([\r\n \t\t\tthis.project(latLngBounds.getSouthWest(), zoom)._subtract(topLeft),\r\n \t\t\tthis.project(latLngBounds.getNorthWest(), zoom)._subtract(topLeft),\r\n \t\t\tthis.project(latLngBounds.getSouthEast(), zoom)._subtract(topLeft),\r\n \t\t\tthis.project(latLngBounds.getNorthEast(), zoom)._subtract(topLeft)\r\n \t\t]);\r\n \t},\r\n\r\n \t// layer point of the current center\r\n \t_getCenterLayerPoint: function () {\r\n \t\treturn this.containerPointToLayerPoint(this.getSize()._divideBy(2));\r\n \t},\r\n\r\n \t// offset of the specified place to the current center in pixels\r\n \t_getCenterOffset: function (latlng) {\r\n \t\treturn this.latLngToLayerPoint(latlng).subtract(this._getCenterLayerPoint());\r\n \t},\r\n\r\n \t// adjust center for view to get inside bounds\r\n \t_limitCenter: function (center, zoom, bounds) {\r\n\r\n \t\tif (!bounds) { return center; }\r\n\r\n \t\tvar centerPoint = this.project(center, zoom),\r\n \t\t viewHalf = this.getSize().divideBy(2),\r\n \t\t viewBounds = new Bounds(centerPoint.subtract(viewHalf), centerPoint.add(viewHalf)),\r\n \t\t offset = this._getBoundsOffset(viewBounds, bounds, zoom);\r\n\r\n \t\t// If offset is less than a pixel, ignore.\r\n \t\t// This prevents unstable projections from getting into\r\n \t\t// an infinite loop of tiny offsets.\r\n \t\tif (Math.abs(offset.x) <= 1 && Math.abs(offset.y) <= 1) {\r\n \t\t\treturn center;\r\n \t\t}\r\n\r\n \t\treturn this.unproject(centerPoint.add(offset), zoom);\r\n \t},\r\n\r\n \t// adjust offset for view to get inside bounds\r\n \t_limitOffset: function (offset, bounds) {\r\n \t\tif (!bounds) { return offset; }\r\n\r\n \t\tvar viewBounds = this.getPixelBounds(),\r\n \t\t newBounds = new Bounds(viewBounds.min.add(offset), viewBounds.max.add(offset));\r\n\r\n \t\treturn offset.add(this._getBoundsOffset(newBounds, bounds));\r\n \t},\r\n\r\n \t// returns offset needed for pxBounds to get inside maxBounds at a specified zoom\r\n \t_getBoundsOffset: function (pxBounds, maxBounds, zoom) {\r\n \t\tvar projectedMaxBounds = toBounds(\r\n \t\t this.project(maxBounds.getNorthEast(), zoom),\r\n \t\t this.project(maxBounds.getSouthWest(), zoom)\r\n \t\t ),\r\n \t\t minOffset = projectedMaxBounds.min.subtract(pxBounds.min),\r\n \t\t maxOffset = projectedMaxBounds.max.subtract(pxBounds.max),\r\n\r\n \t\t dx = this._rebound(minOffset.x, -maxOffset.x),\r\n \t\t dy = this._rebound(minOffset.y, -maxOffset.y);\r\n\r\n \t\treturn new Point(dx, dy);\r\n \t},\r\n\r\n \t_rebound: function (left, right) {\r\n \t\treturn left + right > 0 ?\r\n \t\t\tMath.round(left - right) / 2 :\r\n \t\t\tMath.max(0, Math.ceil(left)) - Math.max(0, Math.floor(right));\r\n \t},\r\n\r\n \t_limitZoom: function (zoom) {\r\n \t\tvar min = this.getMinZoom(),\r\n \t\t max = this.getMaxZoom(),\r\n \t\t snap = Browser.any3d ? this.options.zoomSnap : 1;\r\n \t\tif (snap) {\r\n \t\t\tzoom = Math.round(zoom / snap) * snap;\r\n \t\t}\r\n \t\treturn Math.max(min, Math.min(max, zoom));\r\n \t},\r\n\r\n \t_onPanTransitionStep: function () {\r\n \t\tthis.fire('move');\r\n \t},\r\n\r\n \t_onPanTransitionEnd: function () {\r\n \t\tremoveClass(this._mapPane, 'leaflet-pan-anim');\r\n \t\tthis.fire('moveend');\r\n \t},\r\n\r\n \t_tryAnimatedPan: function (center, options) {\r\n \t\t// difference between the new and current centers in pixels\r\n \t\tvar offset = this._getCenterOffset(center)._trunc();\r\n\r\n \t\t// don't animate too far unless animate: true specified in options\r\n \t\tif ((options && options.animate) !== true && !this.getSize().contains(offset)) { return false; }\r\n\r\n \t\tthis.panBy(offset, options);\r\n\r\n \t\treturn true;\r\n \t},\r\n\r\n \t_createAnimProxy: function () {\r\n\r\n \t\tvar proxy = this._proxy = create$1('div', 'leaflet-proxy leaflet-zoom-animated');\r\n \t\tthis._panes.mapPane.appendChild(proxy);\r\n\r\n \t\tthis.on('zoomanim', function (e) {\r\n \t\t\tvar prop = TRANSFORM,\r\n \t\t\t transform = this._proxy.style[prop];\r\n\r\n \t\t\tsetTransform(this._proxy, this.project(e.center, e.zoom), this.getZoomScale(e.zoom, 1));\r\n\r\n \t\t\t// workaround for case when transform is the same and so transitionend event is not fired\r\n \t\t\tif (transform === this._proxy.style[prop] && this._animatingZoom) {\r\n \t\t\t\tthis._onZoomTransitionEnd();\r\n \t\t\t}\r\n \t\t}, this);\r\n\r\n \t\tthis.on('load moveend', this._animMoveEnd, this);\r\n\r\n \t\tthis._on('unload', this._destroyAnimProxy, this);\r\n \t},\r\n\r\n \t_destroyAnimProxy: function () {\r\n \t\tremove(this._proxy);\r\n \t\tthis.off('load moveend', this._animMoveEnd, this);\r\n \t\tdelete this._proxy;\r\n \t},\r\n\r\n \t_animMoveEnd: function () {\r\n \t\tvar c = this.getCenter(),\r\n \t\t z = this.getZoom();\r\n \t\tsetTransform(this._proxy, this.project(c, z), this.getZoomScale(z, 1));\r\n \t},\r\n\r\n \t_catchTransitionEnd: function (e) {\r\n \t\tif (this._animatingZoom && e.propertyName.indexOf('transform') >= 0) {\r\n \t\t\tthis._onZoomTransitionEnd();\r\n \t\t}\r\n \t},\r\n\r\n \t_nothingToAnimate: function () {\r\n \t\treturn !this._container.getElementsByClassName('leaflet-zoom-animated').length;\r\n \t},\r\n\r\n \t_tryAnimatedZoom: function (center, zoom, options) {\r\n\r\n \t\tif (this._animatingZoom) { return true; }\r\n\r\n \t\toptions = options || {};\r\n\r\n \t\t// don't animate if disabled, not supported or zoom difference is too large\r\n \t\tif (!this._zoomAnimated || options.animate === false || this._nothingToAnimate() ||\r\n \t\t Math.abs(zoom - this._zoom) > this.options.zoomAnimationThreshold) { return false; }\r\n\r\n \t\t// offset is the pixel coords of the zoom origin relative to the current center\r\n \t\tvar scale = this.getZoomScale(zoom),\r\n \t\t offset = this._getCenterOffset(center)._divideBy(1 - 1 / scale);\r\n\r\n \t\t// don't animate if the zoom origin isn't within one screen from the current center, unless forced\r\n \t\tif (options.animate !== true && !this.getSize().contains(offset)) { return false; }\r\n\r\n \t\trequestAnimFrame(function () {\r\n \t\t\tthis\r\n \t\t\t ._moveStart(true, false)\r\n \t\t\t ._animateZoom(center, zoom, true);\r\n \t\t}, this);\r\n\r\n \t\treturn true;\r\n \t},\r\n\r\n \t_animateZoom: function (center, zoom, startAnim, noUpdate) {\r\n \t\tif (!this._mapPane) { return; }\r\n\r\n \t\tif (startAnim) {\r\n \t\t\tthis._animatingZoom = true;\r\n\r\n \t\t\t// remember what center/zoom to set after animation\r\n \t\t\tthis._animateToCenter = center;\r\n \t\t\tthis._animateToZoom = zoom;\r\n\r\n \t\t\taddClass(this._mapPane, 'leaflet-zoom-anim');\r\n \t\t}\r\n\r\n \t\t// @section Other Events\r\n \t\t// @event zoomanim: ZoomAnimEvent\r\n \t\t// Fired at least once per zoom animation. For continuous zoom, like pinch zooming, fired once per frame during zoom.\r\n \t\tthis.fire('zoomanim', {\r\n \t\t\tcenter: center,\r\n \t\t\tzoom: zoom,\r\n \t\t\tnoUpdate: noUpdate\r\n \t\t});\r\n\r\n \t\tif (!this._tempFireZoomEvent) {\r\n \t\t\tthis._tempFireZoomEvent = this._zoom !== this._animateToZoom;\r\n \t\t}\r\n\r\n \t\tthis._move(this._animateToCenter, this._animateToZoom, undefined, true);\r\n\r\n \t\t// Work around webkit not firing 'transitionend', see https://github.com/Leaflet/Leaflet/issues/3689, 2693\r\n \t\tsetTimeout(bind(this._onZoomTransitionEnd, this), 250);\r\n \t},\r\n\r\n \t_onZoomTransitionEnd: function () {\r\n \t\tif (!this._animatingZoom) { return; }\r\n\r\n \t\tif (this._mapPane) {\r\n \t\t\tremoveClass(this._mapPane, 'leaflet-zoom-anim');\r\n \t\t}\r\n\r\n \t\tthis._animatingZoom = false;\r\n\r\n \t\tthis._move(this._animateToCenter, this._animateToZoom, undefined, true);\r\n\r\n \t\tif (this._tempFireZoomEvent) {\r\n \t\t\tthis.fire('zoom');\r\n \t\t}\r\n \t\tdelete this._tempFireZoomEvent;\r\n\r\n \t\tthis.fire('move');\r\n\r\n \t\tthis._moveEnd(true);\r\n \t}\r\n });\r\n\r\n // @section\r\n\r\n // @factory L.map(id: String, options?: Map options)\r\n // Instantiates a map object given the DOM ID of a `<div>` element\r\n // and optionally an object literal with `Map options`.\r\n //\r\n // @alternative\r\n // @factory L.map(el: HTMLElement, options?: Map options)\r\n // Instantiates a map object given an instance of a `<div>` HTML element\r\n // and optionally an object literal with `Map options`.\r\n function createMap(id, options) {\r\n \treturn new Map(id, options);\r\n }\n\n /*\r\n * @class Control\r\n * @aka L.Control\r\n * @inherits Class\r\n *\r\n * L.Control is a base class for implementing map controls. Handles positioning.\r\n * All other controls extend from this class.\r\n */\r\n\r\n var Control = Class.extend({\r\n \t// @section\r\n \t// @aka Control Options\r\n \toptions: {\r\n \t\t// @option position: String = 'topright'\r\n \t\t// The position of the control (one of the map corners). Possible values are `'topleft'`,\r\n \t\t// `'topright'`, `'bottomleft'` or `'bottomright'`\r\n \t\tposition: 'topright'\r\n \t},\r\n\r\n \tinitialize: function (options) {\r\n \t\tsetOptions(this, options);\r\n \t},\r\n\r\n \t/* @section\r\n \t * Classes extending L.Control will inherit the following methods:\r\n \t *\r\n \t * @method getPosition: string\r\n \t * Returns the position of the control.\r\n \t */\r\n \tgetPosition: function () {\r\n \t\treturn this.options.position;\r\n \t},\r\n\r\n \t// @method setPosition(position: string): this\r\n \t// Sets the position of the control.\r\n \tsetPosition: function (position) {\r\n \t\tvar map = this._map;\r\n\r\n \t\tif (map) {\r\n \t\t\tmap.removeControl(this);\r\n \t\t}\r\n\r\n \t\tthis.options.position = position;\r\n\r\n \t\tif (map) {\r\n \t\t\tmap.addControl(this);\r\n \t\t}\r\n\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method getContainer: HTMLElement\r\n \t// Returns the HTMLElement that contains the control.\r\n \tgetContainer: function () {\r\n \t\treturn this._container;\r\n \t},\r\n\r\n \t// @method addTo(map: Map): this\r\n \t// Adds the control to the given map.\r\n \taddTo: function (map) {\r\n \t\tthis.remove();\r\n \t\tthis._map = map;\r\n\r\n \t\tvar container = this._container = this.onAdd(map),\r\n \t\t pos = this.getPosition(),\r\n \t\t corner = map._controlCorners[pos];\r\n\r\n \t\taddClass(container, 'leaflet-control');\r\n\r\n \t\tif (pos.indexOf('bottom') !== -1) {\r\n \t\t\tcorner.insertBefore(container, corner.firstChild);\r\n \t\t} else {\r\n \t\t\tcorner.appendChild(container);\r\n \t\t}\r\n\r\n \t\tthis._map.on('unload', this.remove, this);\r\n\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method remove: this\r\n \t// Removes the control from the map it is currently active on.\r\n \tremove: function () {\r\n \t\tif (!this._map) {\r\n \t\t\treturn this;\r\n \t\t}\r\n\r\n \t\tremove(this._container);\r\n\r\n \t\tif (this.onRemove) {\r\n \t\t\tthis.onRemove(this._map);\r\n \t\t}\r\n\r\n \t\tthis._map.off('unload', this.remove, this);\r\n \t\tthis._map = null;\r\n\r\n \t\treturn this;\r\n \t},\r\n\r\n \t_refocusOnMap: function (e) {\r\n \t\t// if map exists and event is not a keyboard event\r\n \t\tif (this._map && e && e.screenX > 0 && e.screenY > 0) {\r\n \t\t\tthis._map.getContainer().focus();\r\n \t\t}\r\n \t}\r\n });\r\n\r\n var control = function (options) {\r\n \treturn new Control(options);\r\n };\r\n\r\n /* @section Extension methods\r\n * @uninheritable\r\n *\r\n * Every control should extend from `L.Control` and (re-)implement the following methods.\r\n *\r\n * @method onAdd(map: Map): HTMLElement\r\n * Should return the container DOM element for the control and add listeners on relevant map events. Called on [`control.addTo(map)`](#control-addTo).\r\n *\r\n * @method onRemove(map: Map)\r\n * Optional method. Should contain all clean up code that removes the listeners previously added in [`onAdd`](#control-onadd). Called on [`control.remove()`](#control-remove).\r\n */\r\n\r\n /* @namespace Map\r\n * @section Methods for Layers and Controls\r\n */\r\n Map.include({\r\n \t// @method addControl(control: Control): this\r\n \t// Adds the given control to the map\r\n \taddControl: function (control) {\r\n \t\tcontrol.addTo(this);\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method removeControl(control: Control): this\r\n \t// Removes the given control from the map\r\n \tremoveControl: function (control) {\r\n \t\tcontrol.remove();\r\n \t\treturn this;\r\n \t},\r\n\r\n \t_initControlPos: function () {\r\n \t\tvar corners = this._controlCorners = {},\r\n \t\t l = 'leaflet-',\r\n \t\t container = this._controlContainer =\r\n \t\t create$1('div', l + 'control-container', this._container);\r\n\r\n \t\tfunction createCorner(vSide, hSide) {\r\n \t\t\tvar className = l + vSide + ' ' + l + hSide;\r\n\r\n \t\t\tcorners[vSide + hSide] = create$1('div', className, container);\r\n \t\t}\r\n\r\n \t\tcreateCorner('top', 'left');\r\n \t\tcreateCorner('top', 'right');\r\n \t\tcreateCorner('bottom', 'left');\r\n \t\tcreateCorner('bottom', 'right');\r\n \t},\r\n\r\n \t_clearControlPos: function () {\r\n \t\tfor (var i in this._controlCorners) {\r\n \t\t\tremove(this._controlCorners[i]);\r\n \t\t}\r\n \t\tremove(this._controlContainer);\r\n \t\tdelete this._controlCorners;\r\n \t\tdelete this._controlContainer;\r\n \t}\r\n });\n\n /*\r\n * @class Control.Layers\r\n * @aka L.Control.Layers\r\n * @inherits Control\r\n *\r\n * The layers control gives users the ability to switch between different base layers and switch overlays on/off (check out the [detailed example](https://leafletjs.com/examples/layers-control/)). Extends `Control`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var baseLayers = {\r\n * \t\"Mapbox\": mapbox,\r\n * \t\"OpenStreetMap\": osm\r\n * };\r\n *\r\n * var overlays = {\r\n * \t\"Marker\": marker,\r\n * \t\"Roads\": roadsLayer\r\n * };\r\n *\r\n * L.control.layers(baseLayers, overlays).addTo(map);\r\n * ```\r\n *\r\n * The `baseLayers` and `overlays` parameters are object literals with layer names as keys and `Layer` objects as values:\r\n *\r\n * ```js\r\n * {\r\n * \"<someName1>\": layer1,\r\n * \"<someName2>\": layer2\r\n * }\r\n * ```\r\n *\r\n * The layer names can contain HTML, which allows you to add additional styling to the items:\r\n *\r\n * ```js\r\n * {\"<img src='my-layer-icon' /> <span class='my-layer-item'>My Layer</span>\": myLayer}\r\n * ```\r\n */\r\n\r\n var Layers = Control.extend({\r\n \t// @section\r\n \t// @aka Control.Layers options\r\n \toptions: {\r\n \t\t// @option collapsed: Boolean = true\r\n \t\t// If `true`, the control will be collapsed into an icon and expanded on mouse hover, touch, or keyboard activation.\r\n \t\tcollapsed: true,\r\n \t\tposition: 'topright',\r\n\r\n \t\t// @option autoZIndex: Boolean = true\r\n \t\t// If `true`, the control will assign zIndexes in increasing order to all of its layers so that the order is preserved when switching them on/off.\r\n \t\tautoZIndex: true,\r\n\r\n \t\t// @option hideSingleBase: Boolean = false\r\n \t\t// If `true`, the base layers in the control will be hidden when there is only one.\r\n \t\thideSingleBase: false,\r\n\r\n \t\t// @option sortLayers: Boolean = false\r\n \t\t// Whether to sort the layers. When `false`, layers will keep the order\r\n \t\t// in which they were added to the control.\r\n \t\tsortLayers: false,\r\n\r\n \t\t// @option sortFunction: Function = *\r\n \t\t// A [compare function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/sort)\r\n \t\t// that will be used for sorting the layers, when `sortLayers` is `true`.\r\n \t\t// The function receives both the `L.Layer` instances and their names, as in\r\n \t\t// `sortFunction(layerA, layerB, nameA, nameB)`.\r\n \t\t// By default, it sorts layers alphabetically by their name.\r\n \t\tsortFunction: function (layerA, layerB, nameA, nameB) {\r\n \t\t\treturn nameA < nameB ? -1 : (nameB < nameA ? 1 : 0);\r\n \t\t}\r\n \t},\r\n\r\n \tinitialize: function (baseLayers, overlays, options) {\r\n \t\tsetOptions(this, options);\r\n\r\n \t\tthis._layerControlInputs = [];\r\n \t\tthis._layers = [];\r\n \t\tthis._lastZIndex = 0;\r\n \t\tthis._handlingClick = false;\r\n\r\n \t\tfor (var i in baseLayers) {\r\n \t\t\tthis._addLayer(baseLayers[i], i);\r\n \t\t}\r\n\r\n \t\tfor (i in overlays) {\r\n \t\t\tthis._addLayer(overlays[i], i, true);\r\n \t\t}\r\n \t},\r\n\r\n \tonAdd: function (map) {\r\n \t\tthis._initLayout();\r\n \t\tthis._update();\r\n\r\n \t\tthis._map = map;\r\n \t\tmap.on('zoomend', this._checkDisabledLayers, this);\r\n\r\n \t\tfor (var i = 0; i < this._layers.length; i++) {\r\n \t\t\tthis._layers[i].layer.on('add remove', this._onLayerChange, this);\r\n \t\t}\r\n\r\n \t\treturn this._container;\r\n \t},\r\n\r\n \taddTo: function (map) {\r\n \t\tControl.prototype.addTo.call(this, map);\r\n \t\t// Trigger expand after Layers Control has been inserted into DOM so that is now has an actual height.\r\n \t\treturn this._expandIfNotCollapsed();\r\n \t},\r\n\r\n \tonRemove: function () {\r\n \t\tthis._map.off('zoomend', this._checkDisabledLayers, this);\r\n\r\n \t\tfor (var i = 0; i < this._layers.length; i++) {\r\n \t\t\tthis._layers[i].layer.off('add remove', this._onLayerChange, this);\r\n \t\t}\r\n \t},\r\n\r\n \t// @method addBaseLayer(layer: Layer, name: String): this\r\n \t// Adds a base layer (radio button entry) with the given name to the control.\r\n \taddBaseLayer: function (layer, name) {\r\n \t\tthis._addLayer(layer, name);\r\n \t\treturn (this._map) ? this._update() : this;\r\n \t},\r\n\r\n \t// @method addOverlay(layer: Layer, name: String): this\r\n \t// Adds an overlay (checkbox entry) with the given name to the control.\r\n \taddOverlay: function (layer, name) {\r\n \t\tthis._addLayer(layer, name, true);\r\n \t\treturn (this._map) ? this._update() : this;\r\n \t},\r\n\r\n \t// @method removeLayer(layer: Layer): this\r\n \t// Remove the given layer from the control.\r\n \tremoveLayer: function (layer) {\r\n \t\tlayer.off('add remove', this._onLayerChange, this);\r\n\r\n \t\tvar obj = this._getLayer(stamp(layer));\r\n \t\tif (obj) {\r\n \t\t\tthis._layers.splice(this._layers.indexOf(obj), 1);\r\n \t\t}\r\n \t\treturn (this._map) ? this._update() : this;\r\n \t},\r\n\r\n \t// @method expand(): this\r\n \t// Expand the control container if collapsed.\r\n \texpand: function () {\r\n \t\taddClass(this._container, 'leaflet-control-layers-expanded');\r\n \t\tthis._section.style.height = null;\r\n \t\tvar acceptableHeight = this._map.getSize().y - (this._container.offsetTop + 50);\r\n \t\tif (acceptableHeight < this._section.clientHeight) {\r\n \t\t\taddClass(this._section, 'leaflet-control-layers-scrollbar');\r\n \t\t\tthis._section.style.height = acceptableHeight + 'px';\r\n \t\t} else {\r\n \t\t\tremoveClass(this._section, 'leaflet-control-layers-scrollbar');\r\n \t\t}\r\n \t\tthis._checkDisabledLayers();\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method collapse(): this\r\n \t// Collapse the control container if expanded.\r\n \tcollapse: function () {\r\n \t\tremoveClass(this._container, 'leaflet-control-layers-expanded');\r\n \t\treturn this;\r\n \t},\r\n\r\n \t_initLayout: function () {\r\n \t\tvar className = 'leaflet-control-layers',\r\n \t\t container = this._container = create$1('div', className),\r\n \t\t collapsed = this.options.collapsed;\r\n\r\n \t\t// makes this work on IE touch devices by stopping it from firing a mouseout event when the touch is released\r\n \t\tcontainer.setAttribute('aria-haspopup', true);\r\n\r\n \t\tdisableClickPropagation(container);\r\n \t\tdisableScrollPropagation(container);\r\n\r\n \t\tvar section = this._section = create$1('section', className + '-list');\r\n\r\n \t\tif (collapsed) {\r\n \t\t\tthis._map.on('click', this.collapse, this);\r\n\r\n \t\t\ton(container, {\r\n \t\t\t\tmouseenter: this._expandSafely,\r\n \t\t\t\tmouseleave: this.collapse\r\n \t\t\t}, this);\r\n \t\t}\r\n\r\n \t\tvar link = this._layersLink = create$1('a', className + '-toggle', container);\r\n \t\tlink.href = '#';\r\n \t\tlink.title = 'Layers';\r\n \t\tlink.setAttribute('role', 'button');\r\n\r\n \t\ton(link, {\r\n \t\t\tkeydown: function (e) {\r\n \t\t\t\tif (e.keyCode === 13) {\r\n \t\t\t\t\tthis._expandSafely();\r\n \t\t\t\t}\r\n \t\t\t},\r\n \t\t\t// Certain screen readers intercept the key event and instead send a click event\r\n \t\t\tclick: function (e) {\r\n \t\t\t\tpreventDefault(e);\r\n \t\t\t\tthis._expandSafely();\r\n \t\t\t}\r\n \t\t}, this);\r\n\r\n \t\tif (!collapsed) {\r\n \t\t\tthis.expand();\r\n \t\t}\r\n\r\n \t\tthis._baseLayersList = create$1('div', className + '-base', section);\r\n \t\tthis._separator = create$1('div', className + '-separator', section);\r\n \t\tthis._overlaysList = create$1('div', className + '-overlays', section);\r\n\r\n \t\tcontainer.appendChild(section);\r\n \t},\r\n\r\n \t_getLayer: function (id) {\r\n \t\tfor (var i = 0; i < this._layers.length; i++) {\r\n\r\n \t\t\tif (this._layers[i] && stamp(this._layers[i].layer) === id) {\r\n \t\t\t\treturn this._layers[i];\r\n \t\t\t}\r\n \t\t}\r\n \t},\r\n\r\n \t_addLayer: function (layer, name, overlay) {\r\n \t\tif (this._map) {\r\n \t\t\tlayer.on('add remove', this._onLayerChange, this);\r\n \t\t}\r\n\r\n \t\tthis._layers.push({\r\n \t\t\tlayer: layer,\r\n \t\t\tname: name,\r\n \t\t\toverlay: overlay\r\n \t\t});\r\n\r\n \t\tif (this.options.sortLayers) {\r\n \t\t\tthis._layers.sort(bind(function (a, b) {\r\n \t\t\t\treturn this.options.sortFunction(a.layer, b.layer, a.name, b.name);\r\n \t\t\t}, this));\r\n \t\t}\r\n\r\n \t\tif (this.options.autoZIndex && layer.setZIndex) {\r\n \t\t\tthis._lastZIndex++;\r\n \t\t\tlayer.setZIndex(this._lastZIndex);\r\n \t\t}\r\n\r\n \t\tthis._expandIfNotCollapsed();\r\n \t},\r\n\r\n \t_update: function () {\r\n \t\tif (!this._container) { return this; }\r\n\r\n \t\tempty(this._baseLayersList);\r\n \t\tempty(this._overlaysList);\r\n\r\n \t\tthis._layerControlInputs = [];\r\n \t\tvar baseLayersPresent, overlaysPresent, i, obj, baseLayersCount = 0;\r\n\r\n \t\tfor (i = 0; i < this._layers.length; i++) {\r\n \t\t\tobj = this._layers[i];\r\n \t\t\tthis._addItem(obj);\r\n \t\t\toverlaysPresent = overlaysPresent || obj.overlay;\r\n \t\t\tbaseLayersPresent = baseLayersPresent || !obj.overlay;\r\n \t\t\tbaseLayersCount += !obj.overlay ? 1 : 0;\r\n \t\t}\r\n\r\n \t\t// Hide base layers section if there's only one layer.\r\n \t\tif (this.options.hideSingleBase) {\r\n \t\t\tbaseLayersPresent = baseLayersPresent && baseLayersCount > 1;\r\n \t\t\tthis._baseLayersList.style.display = baseLayersPresent ? '' : 'none';\r\n \t\t}\r\n\r\n \t\tthis._separator.style.display = overlaysPresent && baseLayersPresent ? '' : 'none';\r\n\r\n \t\treturn this;\r\n \t},\r\n\r\n \t_onLayerChange: function (e) {\r\n \t\tif (!this._handlingClick) {\r\n \t\t\tthis._update();\r\n \t\t}\r\n\r\n \t\tvar obj = this._getLayer(stamp(e.target));\r\n\r\n \t\t// @namespace Map\r\n \t\t// @section Layer events\r\n \t\t// @event baselayerchange: LayersControlEvent\r\n \t\t// Fired when the base layer is changed through the [layers control](#control-layers).\r\n \t\t// @event overlayadd: LayersControlEvent\r\n \t\t// Fired when an overlay is selected through the [layers control](#control-layers).\r\n \t\t// @event overlayremove: LayersControlEvent\r\n \t\t// Fired when an overlay is deselected through the [layers control](#control-layers).\r\n \t\t// @namespace Control.Layers\r\n \t\tvar type = obj.overlay ?\r\n \t\t\t(e.type === 'add' ? 'overlayadd' : 'overlayremove') :\r\n \t\t\t(e.type === 'add' ? 'baselayerchange' : null);\r\n\r\n \t\tif (type) {\r\n \t\t\tthis._map.fire(type, obj);\r\n \t\t}\r\n \t},\r\n\r\n \t// IE7 bugs out if you create a radio dynamically, so you have to do it this hacky way (see https://stackoverflow.com/a/119079)\r\n \t_createRadioElement: function (name, checked) {\r\n\r\n \t\tvar radioHtml = '<input type=\"radio\" class=\"leaflet-control-layers-selector\" name=\"' +\r\n \t\t\t\tname + '\"' + (checked ? ' checked=\"checked\"' : '') + '/>';\r\n\r\n \t\tvar radioFragment = document.createElement('div');\r\n \t\tradioFragment.innerHTML = radioHtml;\r\n\r\n \t\treturn radioFragment.firstChild;\r\n \t},\r\n\r\n \t_addItem: function (obj) {\r\n \t\tvar label = document.createElement('label'),\r\n \t\t checked = this._map.hasLayer(obj.layer),\r\n \t\t input;\r\n\r\n \t\tif (obj.overlay) {\r\n \t\t\tinput = document.createElement('input');\r\n \t\t\tinput.type = 'checkbox';\r\n \t\t\tinput.className = 'leaflet-control-layers-selector';\r\n \t\t\tinput.defaultChecked = checked;\r\n \t\t} else {\r\n \t\t\tinput = this._createRadioElement('leaflet-base-layers_' + stamp(this), checked);\r\n \t\t}\r\n\r\n \t\tthis._layerControlInputs.push(input);\r\n \t\tinput.layerId = stamp(obj.layer);\r\n\r\n \t\ton(input, 'click', this._onInputClick, this);\r\n\r\n \t\tvar name = document.createElement('span');\r\n \t\tname.innerHTML = ' ' + obj.name;\r\n\r\n \t\t// Helps from preventing layer control flicker when checkboxes are disabled\r\n \t\t// https://github.com/Leaflet/Leaflet/issues/2771\r\n \t\tvar holder = document.createElement('span');\r\n\r\n \t\tlabel.appendChild(holder);\r\n \t\tholder.appendChild(input);\r\n \t\tholder.appendChild(name);\r\n\r\n \t\tvar container = obj.overlay ? this._overlaysList : this._baseLayersList;\r\n \t\tcontainer.appendChild(label);\r\n\r\n \t\tthis._checkDisabledLayers();\r\n \t\treturn label;\r\n \t},\r\n\r\n \t_onInputClick: function () {\r\n \t\tvar inputs = this._layerControlInputs,\r\n \t\t input, layer;\r\n \t\tvar addedLayers = [],\r\n \t\t removedLayers = [];\r\n\r\n \t\tthis._handlingClick = true;\r\n\r\n \t\tfor (var i = inputs.length - 1; i >= 0; i--) {\r\n \t\t\tinput = inputs[i];\r\n \t\t\tlayer = this._getLayer(input.layerId).layer;\r\n\r\n \t\t\tif (input.checked) {\r\n \t\t\t\taddedLayers.push(layer);\r\n \t\t\t} else if (!input.checked) {\r\n \t\t\t\tremovedLayers.push(layer);\r\n \t\t\t}\r\n \t\t}\r\n\r\n \t\t// Bugfix issue 2318: Should remove all old layers before readding new ones\r\n \t\tfor (i = 0; i < removedLayers.length; i++) {\r\n \t\t\tif (this._map.hasLayer(removedLayers[i])) {\r\n \t\t\t\tthis._map.removeLayer(removedLayers[i]);\r\n \t\t\t}\r\n \t\t}\r\n \t\tfor (i = 0; i < addedLayers.length; i++) {\r\n \t\t\tif (!this._map.hasLayer(addedLayers[i])) {\r\n \t\t\t\tthis._map.addLayer(addedLayers[i]);\r\n \t\t\t}\r\n \t\t}\r\n\r\n \t\tthis._handlingClick = false;\r\n\r\n \t\tthis._refocusOnMap();\r\n \t},\r\n\r\n \t_checkDisabledLayers: function () {\r\n \t\tvar inputs = this._layerControlInputs,\r\n \t\t input,\r\n \t\t layer,\r\n \t\t zoom = this._map.getZoom();\r\n\r\n \t\tfor (var i = inputs.length - 1; i >= 0; i--) {\r\n \t\t\tinput = inputs[i];\r\n \t\t\tlayer = this._getLayer(input.layerId).layer;\r\n \t\t\tinput.disabled = (layer.options.minZoom !== undefined && zoom < layer.options.minZoom) ||\r\n \t\t\t (layer.options.maxZoom !== undefined && zoom > layer.options.maxZoom);\r\n\r\n \t\t}\r\n \t},\r\n\r\n \t_expandIfNotCollapsed: function () {\r\n \t\tif (this._map && !this.options.collapsed) {\r\n \t\t\tthis.expand();\r\n \t\t}\r\n \t\treturn this;\r\n \t},\r\n\r\n \t_expandSafely: function () {\r\n \t\tvar section = this._section;\r\n \t\ton(section, 'click', preventDefault);\r\n \t\tthis.expand();\r\n \t\tsetTimeout(function () {\r\n \t\t\toff(section, 'click', preventDefault);\r\n \t\t});\r\n \t}\r\n\r\n });\r\n\r\n\r\n // @factory L.control.layers(baselayers?: Object, overlays?: Object, options?: Control.Layers options)\r\n // Creates a layers control with the given layers. Base layers will be switched with radio buttons, while overlays will be switched with checkboxes. Note that all base layers should be passed in the base layers object, but only one should be added to the map during map instantiation.\r\n var layers = function (baseLayers, overlays, options) {\r\n \treturn new Layers(baseLayers, overlays, options);\r\n };\n\n /*\r\n * @class Control.Zoom\r\n * @aka L.Control.Zoom\r\n * @inherits Control\r\n *\r\n * A basic zoom control with two buttons (zoom in and zoom out). It is put on the map by default unless you set its [`zoomControl` option](#map-zoomcontrol) to `false`. Extends `Control`.\r\n */\r\n\r\n var Zoom = Control.extend({\r\n \t// @section\r\n \t// @aka Control.Zoom options\r\n \toptions: {\r\n \t\tposition: 'topleft',\r\n\r\n \t\t// @option zoomInText: String = '<span aria-hidden=\"true\">+</span>'\r\n \t\t// The text set on the 'zoom in' button.\r\n \t\tzoomInText: '<span aria-hidden=\"true\">+</span>',\r\n\r\n \t\t// @option zoomInTitle: String = 'Zoom in'\r\n \t\t// The title set on the 'zoom in' button.\r\n \t\tzoomInTitle: 'Zoom in',\r\n\r\n \t\t// @option zoomOutText: String = '<span aria-hidden=\"true\">−</span>'\r\n \t\t// The text set on the 'zoom out' button.\r\n \t\tzoomOutText: '<span aria-hidden=\"true\">−</span>',\r\n\r\n \t\t// @option zoomOutTitle: String = 'Zoom out'\r\n \t\t// The title set on the 'zoom out' button.\r\n \t\tzoomOutTitle: 'Zoom out'\r\n \t},\r\n\r\n \tonAdd: function (map) {\r\n \t\tvar zoomName = 'leaflet-control-zoom',\r\n \t\t container = create$1('div', zoomName + ' leaflet-bar'),\r\n \t\t options = this.options;\r\n\r\n \t\tthis._zoomInButton = this._createButton(options.zoomInText, options.zoomInTitle,\r\n \t\t zoomName + '-in', container, this._zoomIn);\r\n \t\tthis._zoomOutButton = this._createButton(options.zoomOutText, options.zoomOutTitle,\r\n \t\t zoomName + '-out', container, this._zoomOut);\r\n\r\n \t\tthis._updateDisabled();\r\n \t\tmap.on('zoomend zoomlevelschange', this._updateDisabled, this);\r\n\r\n \t\treturn container;\r\n \t},\r\n\r\n \tonRemove: function (map) {\r\n \t\tmap.off('zoomend zoomlevelschange', this._updateDisabled, this);\r\n \t},\r\n\r\n \tdisable: function () {\r\n \t\tthis._disabled = true;\r\n \t\tthis._updateDisabled();\r\n \t\treturn this;\r\n \t},\r\n\r\n \tenable: function () {\r\n \t\tthis._disabled = false;\r\n \t\tthis._updateDisabled();\r\n \t\treturn this;\r\n \t},\r\n\r\n \t_zoomIn: function (e) {\r\n \t\tif (!this._disabled && this._map._zoom < this._map.getMaxZoom()) {\r\n \t\t\tthis._map.zoomIn(this._map.options.zoomDelta * (e.shiftKey ? 3 : 1));\r\n \t\t}\r\n \t},\r\n\r\n \t_zoomOut: function (e) {\r\n \t\tif (!this._disabled && this._map._zoom > this._map.getMinZoom()) {\r\n \t\t\tthis._map.zoomOut(this._map.options.zoomDelta * (e.shiftKey ? 3 : 1));\r\n \t\t}\r\n \t},\r\n\r\n \t_createButton: function (html, title, className, container, fn) {\r\n \t\tvar link = create$1('a', className, container);\r\n \t\tlink.innerHTML = html;\r\n \t\tlink.href = '#';\r\n \t\tlink.title = title;\r\n\r\n \t\t/*\r\n \t\t * Will force screen readers like VoiceOver to read this as \"Zoom in - button\"\r\n \t\t */\r\n \t\tlink.setAttribute('role', 'button');\r\n \t\tlink.setAttribute('aria-label', title);\r\n\r\n \t\tdisableClickPropagation(link);\r\n \t\ton(link, 'click', stop);\r\n \t\ton(link, 'click', fn, this);\r\n \t\ton(link, 'click', this._refocusOnMap, this);\r\n\r\n \t\treturn link;\r\n \t},\r\n\r\n \t_updateDisabled: function () {\r\n \t\tvar map = this._map,\r\n \t\t className = 'leaflet-disabled';\r\n\r\n \t\tremoveClass(this._zoomInButton, className);\r\n \t\tremoveClass(this._zoomOutButton, className);\r\n \t\tthis._zoomInButton.setAttribute('aria-disabled', 'false');\r\n \t\tthis._zoomOutButton.setAttribute('aria-disabled', 'false');\r\n\r\n \t\tif (this._disabled || map._zoom === map.getMinZoom()) {\r\n \t\t\taddClass(this._zoomOutButton, className);\r\n \t\t\tthis._zoomOutButton.setAttribute('aria-disabled', 'true');\r\n \t\t}\r\n \t\tif (this._disabled || map._zoom === map.getMaxZoom()) {\r\n \t\t\taddClass(this._zoomInButton, className);\r\n \t\t\tthis._zoomInButton.setAttribute('aria-disabled', 'true');\r\n \t\t}\r\n \t}\r\n });\r\n\r\n // @namespace Map\r\n // @section Control options\r\n // @option zoomControl: Boolean = true\r\n // Whether a [zoom control](#control-zoom) is added to the map by default.\r\n Map.mergeOptions({\r\n \tzoomControl: true\r\n });\r\n\r\n Map.addInitHook(function () {\r\n \tif (this.options.zoomControl) {\r\n \t\t// @section Controls\r\n \t\t// @property zoomControl: Control.Zoom\r\n \t\t// The default zoom control (only available if the\r\n \t\t// [`zoomControl` option](#map-zoomcontrol) was `true` when creating the map).\r\n \t\tthis.zoomControl = new Zoom();\r\n \t\tthis.addControl(this.zoomControl);\r\n \t}\r\n });\r\n\r\n // @namespace Control.Zoom\r\n // @factory L.control.zoom(options: Control.Zoom options)\r\n // Creates a zoom control\r\n var zoom = function (options) {\r\n \treturn new Zoom(options);\r\n };\n\n /*\n * @class Control.Scale\n * @aka L.Control.Scale\n * @inherits Control\n *\n * A simple scale control that shows the scale of the current center of screen in metric (m/km) and imperial (mi/ft) systems. Extends `Control`.\n *\n * @example\n *\n * ```js\n * L.control.scale().addTo(map);\n * ```\n */\n\n var Scale = Control.extend({\n \t// @section\n \t// @aka Control.Scale options\n \toptions: {\n \t\tposition: 'bottomleft',\n\n \t\t// @option maxWidth: Number = 100\n \t\t// Maximum width of the control in pixels. The width is set dynamically to show round values (e.g. 100, 200, 500).\n \t\tmaxWidth: 100,\n\n \t\t// @option metric: Boolean = True\n \t\t// Whether to show the metric scale line (m/km).\n \t\tmetric: true,\n\n \t\t// @option imperial: Boolean = True\n \t\t// Whether to show the imperial scale line (mi/ft).\n \t\timperial: true\n\n \t\t// @option updateWhenIdle: Boolean = false\n \t\t// If `true`, the control is updated on [`moveend`](#map-moveend), otherwise it's always up-to-date (updated on [`move`](#map-move)).\n \t},\n\n \tonAdd: function (map) {\n \t\tvar className = 'leaflet-control-scale',\n \t\t container = create$1('div', className),\n \t\t options = this.options;\n\n \t\tthis._addScales(options, className + '-line', container);\n\n \t\tmap.on(options.updateWhenIdle ? 'moveend' : 'move', this._update, this);\n \t\tmap.whenReady(this._update, this);\n\n \t\treturn container;\n \t},\n\n \tonRemove: function (map) {\n \t\tmap.off(this.options.updateWhenIdle ? 'moveend' : 'move', this._update, this);\n \t},\n\n \t_addScales: function (options, className, container) {\n \t\tif (options.metric) {\n \t\t\tthis._mScale = create$1('div', className, container);\n \t\t}\n \t\tif (options.imperial) {\n \t\t\tthis._iScale = create$1('div', className, container);\n \t\t}\n \t},\n\n \t_update: function () {\n \t\tvar map = this._map,\n \t\t y = map.getSize().y / 2;\n\n \t\tvar maxMeters = map.distance(\n \t\t\tmap.containerPointToLatLng([0, y]),\n \t\t\tmap.containerPointToLatLng([this.options.maxWidth, y]));\n\n \t\tthis._updateScales(maxMeters);\n \t},\n\n \t_updateScales: function (maxMeters) {\n \t\tif (this.options.metric && maxMeters) {\n \t\t\tthis._updateMetric(maxMeters);\n \t\t}\n \t\tif (this.options.imperial && maxMeters) {\n \t\t\tthis._updateImperial(maxMeters);\n \t\t}\n \t},\n\n \t_updateMetric: function (maxMeters) {\n \t\tvar meters = this._getRoundNum(maxMeters),\n \t\t label = meters < 1000 ? meters + ' m' : (meters / 1000) + ' km';\n\n \t\tthis._updateScale(this._mScale, label, meters / maxMeters);\n \t},\n\n \t_updateImperial: function (maxMeters) {\n \t\tvar maxFeet = maxMeters * 3.2808399,\n \t\t maxMiles, miles, feet;\n\n \t\tif (maxFeet > 5280) {\n \t\t\tmaxMiles = maxFeet / 5280;\n \t\t\tmiles = this._getRoundNum(maxMiles);\n \t\t\tthis._updateScale(this._iScale, miles + ' mi', miles / maxMiles);\n\n \t\t} else {\n \t\t\tfeet = this._getRoundNum(maxFeet);\n \t\t\tthis._updateScale(this._iScale, feet + ' ft', feet / maxFeet);\n \t\t}\n \t},\n\n \t_updateScale: function (scale, text, ratio) {\n \t\tscale.style.width = Math.round(this.options.maxWidth * ratio) + 'px';\n \t\tscale.innerHTML = text;\n \t},\n\n \t_getRoundNum: function (num) {\n \t\tvar pow10 = Math.pow(10, (Math.floor(num) + '').length - 1),\n \t\t d = num / pow10;\n\n \t\td = d >= 10 ? 10 :\n \t\t d >= 5 ? 5 :\n \t\t d >= 3 ? 3 :\n \t\t d >= 2 ? 2 : 1;\n\n \t\treturn pow10 * d;\n \t}\n });\n\n\n // @factory L.control.scale(options?: Control.Scale options)\n // Creates an scale control with the given options.\n var scale = function (options) {\n \treturn new Scale(options);\n };\n\n var ukrainianFlag = '<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>';\r\n\r\n\r\n /*\r\n * @class Control.Attribution\r\n * @aka L.Control.Attribution\r\n * @inherits Control\r\n *\r\n * The attribution control allows you to display attribution data in a small text box on a map. It is put on the map by default unless you set its [`attributionControl` option](#map-attributioncontrol) to `false`, and it fetches attribution texts from layers with the [`getAttribution` method](#layer-getattribution) automatically. Extends Control.\r\n */\r\n\r\n var Attribution = Control.extend({\r\n \t// @section\r\n \t// @aka Control.Attribution options\r\n \toptions: {\r\n \t\tposition: 'bottomright',\r\n\r\n \t\t// @option prefix: String|false = 'Leaflet'\r\n \t\t// The HTML text shown before the attributions. Pass `false` to disable.\r\n \t\tprefix: '<a href=\"https://leafletjs.com\" title=\"A JavaScript library for interactive maps\">' + (Browser.inlineSvg ? ukrainianFlag + ' ' : '') + 'Leaflet</a>'\r\n \t},\r\n\r\n \tinitialize: function (options) {\r\n \t\tsetOptions(this, options);\r\n\r\n \t\tthis._attributions = {};\r\n \t},\r\n\r\n \tonAdd: function (map) {\r\n \t\tmap.attributionControl = this;\r\n \t\tthis._container = create$1('div', 'leaflet-control-attribution');\r\n \t\tdisableClickPropagation(this._container);\r\n\r\n \t\t// TODO ugly, refactor\r\n \t\tfor (var i in map._layers) {\r\n \t\t\tif (map._layers[i].getAttribution) {\r\n \t\t\t\tthis.addAttribution(map._layers[i].getAttribution());\r\n \t\t\t}\r\n \t\t}\r\n\r\n \t\tthis._update();\r\n\r\n \t\tmap.on('layeradd', this._addAttribution, this);\r\n\r\n \t\treturn this._container;\r\n \t},\r\n\r\n \tonRemove: function (map) {\r\n \t\tmap.off('layeradd', this._addAttribution, this);\r\n \t},\r\n\r\n \t_addAttribution: function (ev) {\r\n \t\tif (ev.layer.getAttribution) {\r\n \t\t\tthis.addAttribution(ev.layer.getAttribution());\r\n \t\t\tev.layer.once('remove', function () {\r\n \t\t\t\tthis.removeAttribution(ev.layer.getAttribution());\r\n \t\t\t}, this);\r\n \t\t}\r\n \t},\r\n\r\n \t// @method setPrefix(prefix: String|false): this\r\n \t// The HTML text shown before the attributions. Pass `false` to disable.\r\n \tsetPrefix: function (prefix) {\r\n \t\tthis.options.prefix = prefix;\r\n \t\tthis._update();\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method addAttribution(text: String): this\r\n \t// Adds an attribution text (e.g. `'© OpenStreetMap contributors'`).\r\n \taddAttribution: function (text) {\r\n \t\tif (!text) { return this; }\r\n\r\n \t\tif (!this._attributions[text]) {\r\n \t\t\tthis._attributions[text] = 0;\r\n \t\t}\r\n \t\tthis._attributions[text]++;\r\n\r\n \t\tthis._update();\r\n\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method removeAttribution(text: String): this\r\n \t// Removes an attribution text.\r\n \tremoveAttribution: function (text) {\r\n \t\tif (!text) { return this; }\r\n\r\n \t\tif (this._attributions[text]) {\r\n \t\t\tthis._attributions[text]--;\r\n \t\t\tthis._update();\r\n \t\t}\r\n\r\n \t\treturn this;\r\n \t},\r\n\r\n \t_update: function () {\r\n \t\tif (!this._map) { return; }\r\n\r\n \t\tvar attribs = [];\r\n\r\n \t\tfor (var i in this._attributions) {\r\n \t\t\tif (this._attributions[i]) {\r\n \t\t\t\tattribs.push(i);\r\n \t\t\t}\r\n \t\t}\r\n\r\n \t\tvar prefixAndAttribs = [];\r\n\r\n \t\tif (this.options.prefix) {\r\n \t\t\tprefixAndAttribs.push(this.options.prefix);\r\n \t\t}\r\n \t\tif (attribs.length) {\r\n \t\t\tprefixAndAttribs.push(attribs.join(', '));\r\n \t\t}\r\n\r\n \t\tthis._container.innerHTML = prefixAndAttribs.join(' <span aria-hidden=\"true\">|</span> ');\r\n \t}\r\n });\r\n\r\n // @namespace Map\r\n // @section Control options\r\n // @option attributionControl: Boolean = true\r\n // Whether a [attribution control](#control-attribution) is added to the map by default.\r\n Map.mergeOptions({\r\n \tattributionControl: true\r\n });\r\n\r\n Map.addInitHook(function () {\r\n \tif (this.options.attributionControl) {\r\n \t\tnew Attribution().addTo(this);\r\n \t}\r\n });\r\n\r\n // @namespace Control.Attribution\r\n // @factory L.control.attribution(options: Control.Attribution options)\r\n // Creates an attribution control.\r\n var attribution = function (options) {\r\n \treturn new Attribution(options);\r\n };\n\n Control.Layers = Layers;\n Control.Zoom = Zoom;\n Control.Scale = Scale;\n Control.Attribution = Attribution;\n\n control.layers = layers;\n control.zoom = zoom;\n control.scale = scale;\n control.attribution = attribution;\n\n /*\n \tL.Handler is a base class for handler classes that are used internally to inject\n \tinteraction features like dragging to classes like Map and Marker.\n */\n\n // @class Handler\n // @aka L.Handler\n // Abstract class for map interaction handlers\n\n var Handler = Class.extend({\n \tinitialize: function (map) {\n \t\tthis._map = map;\n \t},\n\n \t// @method enable(): this\n \t// Enables the handler\n \tenable: function () {\n \t\tif (this._enabled) { return this; }\n\n \t\tthis._enabled = true;\n \t\tthis.addHooks();\n \t\treturn this;\n \t},\n\n \t// @method disable(): this\n \t// Disables the handler\n \tdisable: function () {\n \t\tif (!this._enabled) { return this; }\n\n \t\tthis._enabled = false;\n \t\tthis.removeHooks();\n \t\treturn this;\n \t},\n\n \t// @method enabled(): Boolean\n \t// Returns `true` if the handler is enabled\n \tenabled: function () {\n \t\treturn !!this._enabled;\n \t}\n\n \t// @section Extension methods\n \t// Classes inheriting from `Handler` must implement the two following methods:\n \t// @method addHooks()\n \t// Called when the handler is enabled, should add event hooks.\n \t// @method removeHooks()\n \t// Called when the handler is disabled, should remove the event hooks added previously.\n });\n\n // @section There is static function which can be called without instantiating L.Handler:\n // @function addTo(map: Map, name: String): this\n // Adds a new Handler to the given map with the given name.\n Handler.addTo = function (map, name) {\n \tmap.addHandler(name, this);\n \treturn this;\n };\n\n var Mixin = {Events: Events};\n\n /*\r\n * @class Draggable\r\n * @aka L.Draggable\r\n * @inherits Evented\r\n *\r\n * A class for making DOM elements draggable (including touch support).\r\n * Used internally for map and marker dragging. Only works for elements\r\n * that were positioned with [`L.DomUtil.setPosition`](#domutil-setposition).\r\n *\r\n * @example\r\n * ```js\r\n * var draggable = new L.Draggable(elementToDrag);\r\n * draggable.enable();\r\n * ```\r\n */\r\n\r\n var START = Browser.touch ? 'touchstart mousedown' : 'mousedown';\r\n\r\n var Draggable = Evented.extend({\r\n\r\n \toptions: {\r\n \t\t// @section\r\n \t\t// @aka Draggable options\r\n \t\t// @option clickTolerance: Number = 3\r\n \t\t// The max number of pixels a user can shift the mouse pointer during a click\r\n \t\t// for it to be considered a valid click (as opposed to a mouse drag).\r\n \t\tclickTolerance: 3\r\n \t},\r\n\r\n \t// @constructor L.Draggable(el: HTMLElement, dragHandle?: HTMLElement, preventOutline?: Boolean, options?: Draggable options)\r\n \t// Creates a `Draggable` object for moving `el` when you start dragging the `dragHandle` element (equals `el` itself by default).\r\n \tinitialize: function (element, dragStartTarget, preventOutline, options) {\r\n \t\tsetOptions(this, options);\r\n\r\n \t\tthis._element = element;\r\n \t\tthis._dragStartTarget = dragStartTarget || element;\r\n \t\tthis._preventOutline = preventOutline;\r\n \t},\r\n\r\n \t// @method enable()\r\n \t// Enables the dragging ability\r\n \tenable: function () {\r\n \t\tif (this._enabled) { return; }\r\n\r\n \t\ton(this._dragStartTarget, START, this._onDown, this);\r\n\r\n \t\tthis._enabled = true;\r\n \t},\r\n\r\n \t// @method disable()\r\n \t// Disables the dragging ability\r\n \tdisable: function () {\r\n \t\tif (!this._enabled) { return; }\r\n\r\n \t\t// If we're currently dragging this draggable,\r\n \t\t// disabling it counts as first ending the drag.\r\n \t\tif (Draggable._dragging === this) {\r\n \t\t\tthis.finishDrag(true);\r\n \t\t}\r\n\r\n \t\toff(this._dragStartTarget, START, this._onDown, this);\r\n\r\n \t\tthis._enabled = false;\r\n \t\tthis._moved = false;\r\n \t},\r\n\r\n \t_onDown: function (e) {\r\n \t\t// Ignore the event if disabled; this happens in IE11\r\n \t\t// under some circumstances, see #3666.\r\n \t\tif (!this._enabled) { return; }\r\n\r\n \t\tthis._moved = false;\r\n\r\n \t\tif (hasClass(this._element, 'leaflet-zoom-anim')) { return; }\r\n\r\n \t\tif (e.touches && e.touches.length !== 1) {\r\n \t\t\t// Finish dragging to avoid conflict with touchZoom\r\n \t\t\tif (Draggable._dragging === this) {\r\n \t\t\t\tthis.finishDrag();\r\n \t\t\t}\r\n \t\t\treturn;\r\n \t\t}\r\n\r\n \t\tif (Draggable._dragging || e.shiftKey || ((e.which !== 1) && (e.button !== 1) && !e.touches)) { return; }\r\n \t\tDraggable._dragging = this; // Prevent dragging multiple objects at once.\r\n\r\n \t\tif (this._preventOutline) {\r\n \t\t\tpreventOutline(this._element);\r\n \t\t}\r\n\r\n \t\tdisableImageDrag();\r\n \t\tdisableTextSelection();\r\n\r\n \t\tif (this._moving) { return; }\r\n\r\n \t\t// @event down: Event\r\n \t\t// Fired when a drag is about to start.\r\n \t\tthis.fire('down');\r\n\r\n \t\tvar first = e.touches ? e.touches[0] : e,\r\n \t\t sizedParent = getSizedParentNode(this._element);\r\n\r\n \t\tthis._startPoint = new Point(first.clientX, first.clientY);\r\n \t\tthis._startPos = getPosition(this._element);\r\n\r\n \t\t// Cache the scale, so that we can continuously compensate for it during drag (_onMove).\r\n \t\tthis._parentScale = getScale(sizedParent);\r\n\r\n \t\tvar mouseevent = e.type === 'mousedown';\r\n \t\ton(document, mouseevent ? 'mousemove' : 'touchmove', this._onMove, this);\r\n \t\ton(document, mouseevent ? 'mouseup' : 'touchend touchcancel', this._onUp, this);\r\n \t},\r\n\r\n \t_onMove: function (e) {\r\n \t\t// Ignore the event if disabled; this happens in IE11\r\n \t\t// under some circumstances, see #3666.\r\n \t\tif (!this._enabled) { return; }\r\n\r\n \t\tif (e.touches && e.touches.length > 1) {\r\n \t\t\tthis._moved = true;\r\n \t\t\treturn;\r\n \t\t}\r\n\r\n \t\tvar first = (e.touches && e.touches.length === 1 ? e.touches[0] : e),\r\n \t\t offset = new Point(first.clientX, first.clientY)._subtract(this._startPoint);\r\n\r\n \t\tif (!offset.x && !offset.y) { return; }\r\n \t\tif (Math.abs(offset.x) + Math.abs(offset.y) < this.options.clickTolerance) { return; }\r\n\r\n \t\t// We assume that the parent container's position, border and scale do not change for the duration of the drag.\r\n \t\t// Therefore there is no need to account for the position and border (they are eliminated by the subtraction)\r\n \t\t// and we can use the cached value for the scale.\r\n \t\toffset.x /= this._parentScale.x;\r\n \t\toffset.y /= this._parentScale.y;\r\n\r\n \t\tpreventDefault(e);\r\n\r\n \t\tif (!this._moved) {\r\n \t\t\t// @event dragstart: Event\r\n \t\t\t// Fired when a drag starts\r\n \t\t\tthis.fire('dragstart');\r\n\r\n \t\t\tthis._moved = true;\r\n\r\n \t\t\taddClass(document.body, 'leaflet-dragging');\r\n\r\n \t\t\tthis._lastTarget = e.target || e.srcElement;\r\n \t\t\t// IE and Edge do not give the <use> element, so fetch it\r\n \t\t\t// if necessary\r\n \t\t\tif (window.SVGElementInstance && this._lastTarget instanceof window.SVGElementInstance) {\r\n \t\t\t\tthis._lastTarget = this._lastTarget.correspondingUseElement;\r\n \t\t\t}\r\n \t\t\taddClass(this._lastTarget, 'leaflet-drag-target');\r\n \t\t}\r\n\r\n \t\tthis._newPos = this._startPos.add(offset);\r\n \t\tthis._moving = true;\r\n\r\n \t\tthis._lastEvent = e;\r\n \t\tthis._updatePosition();\r\n \t},\r\n\r\n \t_updatePosition: function () {\r\n \t\tvar e = {originalEvent: this._lastEvent};\r\n\r\n \t\t// @event predrag: Event\r\n \t\t// Fired continuously during dragging *before* each corresponding\r\n \t\t// update of the element's position.\r\n \t\tthis.fire('predrag', e);\r\n \t\tsetPosition(this._element, this._newPos);\r\n\r\n \t\t// @event drag: Event\r\n \t\t// Fired continuously during dragging.\r\n \t\tthis.fire('drag', e);\r\n \t},\r\n\r\n \t_onUp: function () {\r\n \t\t// Ignore the event if disabled; this happens in IE11\r\n \t\t// under some circumstances, see #3666.\r\n \t\tif (!this._enabled) { return; }\r\n \t\tthis.finishDrag();\r\n \t},\r\n\r\n \tfinishDrag: function (noInertia) {\r\n \t\tremoveClass(document.body, 'leaflet-dragging');\r\n\r\n \t\tif (this._lastTarget) {\r\n \t\t\tremoveClass(this._lastTarget, 'leaflet-drag-target');\r\n \t\t\tthis._lastTarget = null;\r\n \t\t}\r\n\r\n \t\toff(document, 'mousemove touchmove', this._onMove, this);\r\n \t\toff(document, 'mouseup touchend touchcancel', this._onUp, this);\r\n\r\n \t\tenableImageDrag();\r\n \t\tenableTextSelection();\r\n\r\n \t\tif (this._moved && this._moving) {\r\n\r\n \t\t\t// @event dragend: DragEndEvent\r\n \t\t\t// Fired when the drag ends.\r\n \t\t\tthis.fire('dragend', {\r\n \t\t\t\tnoInertia: noInertia,\r\n \t\t\t\tdistance: this._newPos.distanceTo(this._startPos)\r\n \t\t\t});\r\n \t\t}\r\n\r\n \t\tthis._moving = false;\r\n \t\tDraggable._dragging = false;\r\n \t}\r\n\r\n });\n\n /*\r\n * @namespace LineUtil\r\n *\r\n * Various utility functions for polyline points processing, used by Leaflet internally to make polylines lightning-fast.\r\n */\r\n\r\n // Simplify polyline with vertex reduction and Douglas-Peucker simplification.\r\n // Improves rendering performance dramatically by lessening the number of points to draw.\r\n\r\n // @function simplify(points: Point[], tolerance: Number): Point[]\r\n // Dramatically reduces the number of points in a polyline while retaining\r\n // its shape and returns a new array of simplified points, using the\r\n // [Ramer-Douglas-Peucker algorithm](https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm).\r\n // Used for a huge performance boost when processing/displaying Leaflet polylines for\r\n // each zoom level and also reducing visual noise. tolerance affects the amount of\r\n // simplification (lesser value means higher quality but slower and with more points).\r\n // Also released as a separated micro-library [Simplify.js](https://mourner.github.io/simplify-js/).\r\n function simplify(points, tolerance) {\r\n \tif (!tolerance || !points.length) {\r\n \t\treturn points.slice();\r\n \t}\r\n\r\n \tvar sqTolerance = tolerance * tolerance;\r\n\r\n \t // stage 1: vertex reduction\r\n \t points = _reducePoints(points, sqTolerance);\r\n\r\n \t // stage 2: Douglas-Peucker simplification\r\n \t points = _simplifyDP(points, sqTolerance);\r\n\r\n \treturn points;\r\n }\r\n\r\n // @function pointToSegmentDistance(p: Point, p1: Point, p2: Point): Number\r\n // Returns the distance between point `p` and segment `p1` to `p2`.\r\n function pointToSegmentDistance(p, p1, p2) {\r\n \treturn Math.sqrt(_sqClosestPointOnSegment(p, p1, p2, true));\r\n }\r\n\r\n // @function closestPointOnSegment(p: Point, p1: Point, p2: Point): Number\r\n // Returns the closest point from a point `p` on a segment `p1` to `p2`.\r\n function closestPointOnSegment(p, p1, p2) {\r\n \treturn _sqClosestPointOnSegment(p, p1, p2);\r\n }\r\n\r\n // Ramer-Douglas-Peucker simplification, see https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm\r\n function _simplifyDP(points, sqTolerance) {\r\n\r\n \tvar len = points.length,\r\n \t ArrayConstructor = typeof Uint8Array !== undefined + '' ? Uint8Array : Array,\r\n \t markers = new ArrayConstructor(len);\r\n\r\n \t markers[0] = markers[len - 1] = 1;\r\n\r\n \t_simplifyDPStep(points, markers, sqTolerance, 0, len - 1);\r\n\r\n \tvar i,\r\n \t newPoints = [];\r\n\r\n \tfor (i = 0; i < len; i++) {\r\n \t\tif (markers[i]) {\r\n \t\t\tnewPoints.push(points[i]);\r\n \t\t}\r\n \t}\r\n\r\n \treturn newPoints;\r\n }\r\n\r\n function _simplifyDPStep(points, markers, sqTolerance, first, last) {\r\n\r\n \tvar maxSqDist = 0,\r\n \tindex, i, sqDist;\r\n\r\n \tfor (i = first + 1; i <= last - 1; i++) {\r\n \t\tsqDist = _sqClosestPointOnSegment(points[i], points[first], points[last], true);\r\n\r\n \t\tif (sqDist > maxSqDist) {\r\n \t\t\tindex = i;\r\n \t\t\tmaxSqDist = sqDist;\r\n \t\t}\r\n \t}\r\n\r\n \tif (maxSqDist > sqTolerance) {\r\n \t\tmarkers[index] = 1;\r\n\r\n \t\t_simplifyDPStep(points, markers, sqTolerance, first, index);\r\n \t\t_simplifyDPStep(points, markers, sqTolerance, index, last);\r\n \t}\r\n }\r\n\r\n // reduce points that are too close to each other to a single point\r\n function _reducePoints(points, sqTolerance) {\r\n \tvar reducedPoints = [points[0]];\r\n\r\n \tfor (var i = 1, prev = 0, len = points.length; i < len; i++) {\r\n \t\tif (_sqDist(points[i], points[prev]) > sqTolerance) {\r\n \t\t\treducedPoints.push(points[i]);\r\n \t\t\tprev = i;\r\n \t\t}\r\n \t}\r\n \tif (prev < len - 1) {\r\n \t\treducedPoints.push(points[len - 1]);\r\n \t}\r\n \treturn reducedPoints;\r\n }\r\n\r\n var _lastCode;\r\n\r\n // @function clipSegment(a: Point, b: Point, bounds: Bounds, useLastCode?: Boolean, round?: Boolean): Point[]|Boolean\r\n // Clips the segment a to b by rectangular bounds with the\r\n // [Cohen-Sutherland algorithm](https://en.wikipedia.org/wiki/Cohen%E2%80%93Sutherland_algorithm)\r\n // (modifying the segment points directly!). Used by Leaflet to only show polyline\r\n // points that are on the screen or near, increasing performance.\r\n function clipSegment(a, b, bounds, useLastCode, round) {\r\n \tvar codeA = useLastCode ? _lastCode : _getBitCode(a, bounds),\r\n \t codeB = _getBitCode(b, bounds),\r\n\r\n \t codeOut, p, newCode;\r\n\r\n \t // save 2nd code to avoid calculating it on the next segment\r\n \t _lastCode = codeB;\r\n\r\n \twhile (true) {\r\n \t\t// if a,b is inside the clip window (trivial accept)\r\n \t\tif (!(codeA | codeB)) {\r\n \t\t\treturn [a, b];\r\n \t\t}\r\n\r\n \t\t// if a,b is outside the clip window (trivial reject)\r\n \t\tif (codeA & codeB) {\r\n \t\t\treturn false;\r\n \t\t}\r\n\r\n \t\t// other cases\r\n \t\tcodeOut = codeA || codeB;\r\n \t\tp = _getEdgeIntersection(a, b, codeOut, bounds, round);\r\n \t\tnewCode = _getBitCode(p, bounds);\r\n\r\n \t\tif (codeOut === codeA) {\r\n \t\t\ta = p;\r\n \t\t\tcodeA = newCode;\r\n \t\t} else {\r\n \t\t\tb = p;\r\n \t\t\tcodeB = newCode;\r\n \t\t}\r\n \t}\r\n }\r\n\r\n function _getEdgeIntersection(a, b, code, bounds, round) {\r\n \tvar dx = b.x - a.x,\r\n \t dy = b.y - a.y,\r\n \t min = bounds.min,\r\n \t max = bounds.max,\r\n \t x, y;\r\n\r\n \tif (code & 8) { // top\r\n \t\tx = a.x + dx * (max.y - a.y) / dy;\r\n \t\ty = max.y;\r\n\r\n \t} else if (code & 4) { // bottom\r\n \t\tx = a.x + dx * (min.y - a.y) / dy;\r\n \t\ty = min.y;\r\n\r\n \t} else if (code & 2) { // right\r\n \t\tx = max.x;\r\n \t\ty = a.y + dy * (max.x - a.x) / dx;\r\n\r\n \t} else if (code & 1) { // left\r\n \t\tx = min.x;\r\n \t\ty = a.y + dy * (min.x - a.x) / dx;\r\n \t}\r\n\r\n \treturn new Point(x, y, round);\r\n }\r\n\r\n function _getBitCode(p, bounds) {\r\n \tvar code = 0;\r\n\r\n \tif (p.x < bounds.min.x) { // left\r\n \t\tcode |= 1;\r\n \t} else if (p.x > bounds.max.x) { // right\r\n \t\tcode |= 2;\r\n \t}\r\n\r\n \tif (p.y < bounds.min.y) { // bottom\r\n \t\tcode |= 4;\r\n \t} else if (p.y > bounds.max.y) { // top\r\n \t\tcode |= 8;\r\n \t}\r\n\r\n \treturn code;\r\n }\r\n\r\n // square distance (to avoid unnecessary Math.sqrt calls)\r\n function _sqDist(p1, p2) {\r\n \tvar dx = p2.x - p1.x,\r\n \t dy = p2.y - p1.y;\r\n \treturn dx * dx + dy * dy;\r\n }\r\n\r\n // return closest point on segment or distance to that point\r\n function _sqClosestPointOnSegment(p, p1, p2, sqDist) {\r\n \tvar x = p1.x,\r\n \t y = p1.y,\r\n \t dx = p2.x - x,\r\n \t dy = p2.y - y,\r\n \t dot = dx * dx + dy * dy,\r\n \t t;\r\n\r\n \tif (dot > 0) {\r\n \t\tt = ((p.x - x) * dx + (p.y - y) * dy) / dot;\r\n\r\n \t\tif (t > 1) {\r\n \t\t\tx = p2.x;\r\n \t\t\ty = p2.y;\r\n \t\t} else if (t > 0) {\r\n \t\t\tx += dx * t;\r\n \t\t\ty += dy * t;\r\n \t\t}\r\n \t}\r\n\r\n \tdx = p.x - x;\r\n \tdy = p.y - y;\r\n\r\n \treturn sqDist ? dx * dx + dy * dy : new Point(x, y);\r\n }\r\n\r\n\r\n // @function isFlat(latlngs: LatLng[]): Boolean\r\n // Returns true if `latlngs` is a flat array, false is nested.\r\n function isFlat(latlngs) {\r\n \treturn !isArray(latlngs[0]) || (typeof latlngs[0][0] !== 'object' && typeof latlngs[0][0] !== 'undefined');\r\n }\r\n\r\n function _flat(latlngs) {\r\n \tconsole.warn('Deprecated use of _flat, please use L.LineUtil.isFlat instead.');\r\n \treturn isFlat(latlngs);\r\n }\r\n\r\n /* @function polylineCenter(latlngs: LatLng[], crs: CRS): LatLng\r\n * Returns the center ([centroid](http://en.wikipedia.org/wiki/Centroid)) of the passed LatLngs (first ring) from a polyline.\r\n */\r\n function polylineCenter(latlngs, crs) {\r\n \tvar i, halfDist, segDist, dist, p1, p2, ratio, center;\r\n\r\n \tif (!latlngs || latlngs.length === 0) {\r\n \t\tthrow new Error('latlngs not passed');\r\n \t}\r\n\r\n \tif (!isFlat(latlngs)) {\r\n \t\tconsole.warn('latlngs are not flat! Only the first ring will be used');\r\n \t\tlatlngs = latlngs[0];\r\n \t}\r\n\r\n \tvar points = [];\r\n \tfor (var j in latlngs) {\r\n \t\tpoints.push(crs.project(toLatLng(latlngs[j])));\r\n \t}\r\n\r\n \tvar len = points.length;\r\n\r\n \tfor (i = 0, halfDist = 0; i < len - 1; i++) {\r\n \t\thalfDist += points[i].distanceTo(points[i + 1]) / 2;\r\n \t}\r\n\r\n \t// The line is so small in the current view that all points are on the same pixel.\r\n \tif (halfDist === 0) {\r\n \t\tcenter = points[0];\r\n \t} else {\r\n \t\tfor (i = 0, dist = 0; i < len - 1; i++) {\r\n \t\t\tp1 = points[i];\r\n \t\t\tp2 = points[i + 1];\r\n \t\t\tsegDist = p1.distanceTo(p2);\r\n \t\t\tdist += segDist;\r\n\r\n \t\t\tif (dist > halfDist) {\r\n \t\t\t\tratio = (dist - halfDist) / segDist;\r\n \t\t\t\tcenter = [\r\n \t\t\t\t\tp2.x - ratio * (p2.x - p1.x),\r\n \t\t\t\t\tp2.y - ratio * (p2.y - p1.y)\r\n \t\t\t\t];\r\n \t\t\t\tbreak;\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \treturn crs.unproject(toPoint(center));\r\n }\n\n var LineUtil = {\n __proto__: null,\n simplify: simplify,\n pointToSegmentDistance: pointToSegmentDistance,\n closestPointOnSegment: closestPointOnSegment,\n clipSegment: clipSegment,\n _getEdgeIntersection: _getEdgeIntersection,\n _getBitCode: _getBitCode,\n _sqClosestPointOnSegment: _sqClosestPointOnSegment,\n isFlat: isFlat,\n _flat: _flat,\n polylineCenter: polylineCenter\n };\n\n /*\r\n * @namespace PolyUtil\r\n * Various utility functions for polygon geometries.\r\n */\r\n\r\n /* @function clipPolygon(points: Point[], bounds: Bounds, round?: Boolean): Point[]\r\n * Clips the polygon geometry defined by the given `points` by the given bounds (using the [Sutherland-Hodgman algorithm](https://en.wikipedia.org/wiki/Sutherland%E2%80%93Hodgman_algorithm)).\r\n * Used by Leaflet to only show polygon points that are on the screen or near, increasing\r\n * performance. Note that polygon points needs different algorithm for clipping\r\n * than polyline, so there's a separate method for it.\r\n */\r\n function clipPolygon(points, bounds, round) {\r\n \tvar clippedPoints,\r\n \t edges = [1, 4, 2, 8],\r\n \t i, j, k,\r\n \t a, b,\r\n \t len, edge, p;\r\n\r\n \tfor (i = 0, len = points.length; i < len; i++) {\r\n \t\tpoints[i]._code = _getBitCode(points[i], bounds);\r\n \t}\r\n\r\n \t// for each edge (left, bottom, right, top)\r\n \tfor (k = 0; k < 4; k++) {\r\n \t\tedge = edges[k];\r\n \t\tclippedPoints = [];\r\n\r\n \t\tfor (i = 0, len = points.length, j = len - 1; i < len; j = i++) {\r\n \t\t\ta = points[i];\r\n \t\t\tb = points[j];\r\n\r\n \t\t\t// if a is inside the clip window\r\n \t\t\tif (!(a._code & edge)) {\r\n \t\t\t\t// if b is outside the clip window (a->b goes out of screen)\r\n \t\t\t\tif (b._code & edge) {\r\n \t\t\t\t\tp = _getEdgeIntersection(b, a, edge, bounds, round);\r\n \t\t\t\t\tp._code = _getBitCode(p, bounds);\r\n \t\t\t\t\tclippedPoints.push(p);\r\n \t\t\t\t}\r\n \t\t\t\tclippedPoints.push(a);\r\n\r\n \t\t\t// else if b is inside the clip window (a->b enters the screen)\r\n \t\t\t} else if (!(b._code & edge)) {\r\n \t\t\t\tp = _getEdgeIntersection(b, a, edge, bounds, round);\r\n \t\t\t\tp._code = _getBitCode(p, bounds);\r\n \t\t\t\tclippedPoints.push(p);\r\n \t\t\t}\r\n \t\t}\r\n \t\tpoints = clippedPoints;\r\n \t}\r\n\r\n \treturn points;\r\n }\r\n\r\n /* @function polygonCenter(latlngs: LatLng[] crs: CRS): LatLng\r\n * Returns the center ([centroid](http://en.wikipedia.org/wiki/Centroid)) of the passed LatLngs (first ring) from a polygon.\r\n */\r\n function polygonCenter(latlngs, crs) {\r\n \tvar i, j, p1, p2, f, area, x, y, center;\r\n\r\n \tif (!latlngs || latlngs.length === 0) {\r\n \t\tthrow new Error('latlngs not passed');\r\n \t}\r\n\r\n \tif (!isFlat(latlngs)) {\r\n \t\tconsole.warn('latlngs are not flat! Only the first ring will be used');\r\n \t\tlatlngs = latlngs[0];\r\n \t}\r\n\r\n \tvar points = [];\r\n \tfor (var k in latlngs) {\r\n \t\tpoints.push(crs.project(toLatLng(latlngs[k])));\r\n \t}\r\n\r\n \tvar len = points.length;\r\n \tarea = x = y = 0;\r\n\r\n \t// polygon centroid algorithm;\r\n \tfor (i = 0, j = len - 1; i < len; j = i++) {\r\n \t\tp1 = points[i];\r\n \t\tp2 = points[j];\r\n\r\n \t\tf = p1.y * p2.x - p2.y * p1.x;\r\n \t\tx += (p1.x + p2.x) * f;\r\n \t\ty += (p1.y + p2.y) * f;\r\n \t\tarea += f * 3;\r\n \t}\r\n\r\n \tif (area === 0) {\r\n \t\t// Polygon is so small that all points are on same pixel.\r\n \t\tcenter = points[0];\r\n \t} else {\r\n \t\tcenter = [x / area, y / area];\r\n \t}\r\n \treturn crs.unproject(toPoint(center));\r\n }\n\n var PolyUtil = {\n __proto__: null,\n clipPolygon: clipPolygon,\n polygonCenter: polygonCenter\n };\n\n /*\r\n * @namespace Projection\r\n * @section\r\n * Leaflet comes with a set of already defined Projections out of the box:\r\n *\r\n * @projection L.Projection.LonLat\r\n *\r\n * Equirectangular, or Plate Carree projection — the most simple projection,\r\n * mostly used by GIS enthusiasts. Directly maps `x` as longitude, and `y` as\r\n * latitude. Also suitable for flat worlds, e.g. game maps. Used by the\r\n * `EPSG:4326` and `Simple` CRS.\r\n */\r\n\r\n var LonLat = {\r\n \tproject: function (latlng) {\r\n \t\treturn new Point(latlng.lng, latlng.lat);\r\n \t},\r\n\r\n \tunproject: function (point) {\r\n \t\treturn new LatLng(point.y, point.x);\r\n \t},\r\n\r\n \tbounds: new Bounds([-180, -90], [180, 90])\r\n };\n\n /*\r\n * @namespace Projection\r\n * @projection L.Projection.Mercator\r\n *\r\n * Elliptical Mercator projection — more complex than Spherical Mercator. Assumes that Earth is an ellipsoid. Used by the EPSG:3395 CRS.\r\n */\r\n\r\n var Mercator = {\r\n \tR: 6378137,\r\n \tR_MINOR: 6356752.314245179,\r\n\r\n \tbounds: new Bounds([-20037508.34279, -15496570.73972], [20037508.34279, 18764656.23138]),\r\n\r\n \tproject: function (latlng) {\r\n \t\tvar d = Math.PI / 180,\r\n \t\t r = this.R,\r\n \t\t y = latlng.lat * d,\r\n \t\t tmp = this.R_MINOR / r,\r\n \t\t e = Math.sqrt(1 - tmp * tmp),\r\n \t\t con = e * Math.sin(y);\r\n\r\n \t\tvar ts = Math.tan(Math.PI / 4 - y / 2) / Math.pow((1 - con) / (1 + con), e / 2);\r\n \t\ty = -r * Math.log(Math.max(ts, 1E-10));\r\n\r\n \t\treturn new Point(latlng.lng * d * r, y);\r\n \t},\r\n\r\n \tunproject: function (point) {\r\n \t\tvar d = 180 / Math.PI,\r\n \t\t r = this.R,\r\n \t\t tmp = this.R_MINOR / r,\r\n \t\t e = Math.sqrt(1 - tmp * tmp),\r\n \t\t ts = Math.exp(-point.y / r),\r\n \t\t phi = Math.PI / 2 - 2 * Math.atan(ts);\r\n\r\n \t\tfor (var i = 0, dphi = 0.1, con; i < 15 && Math.abs(dphi) > 1e-7; i++) {\r\n \t\t\tcon = e * Math.sin(phi);\r\n \t\t\tcon = Math.pow((1 - con) / (1 + con), e / 2);\r\n \t\t\tdphi = Math.PI / 2 - 2 * Math.atan(ts * con) - phi;\r\n \t\t\tphi += dphi;\r\n \t\t}\r\n\r\n \t\treturn new LatLng(phi * d, point.x * d / r);\r\n \t}\r\n };\n\n /*\n * @class Projection\n\n * An object with methods for projecting geographical coordinates of the world onto\n * a flat surface (and back). See [Map projection](https://en.wikipedia.org/wiki/Map_projection).\n\n * @property bounds: Bounds\n * The bounds (specified in CRS units) where the projection is valid\n\n * @method project(latlng: LatLng): Point\n * Projects geographical coordinates into a 2D point.\n * Only accepts actual `L.LatLng` instances, not arrays.\n\n * @method unproject(point: Point): LatLng\n * The inverse of `project`. Projects a 2D point into a geographical location.\n * Only accepts actual `L.Point` instances, not arrays.\n\n * Note that the projection instances do not inherit from Leaflet's `Class` object,\n * and can't be instantiated. Also, new classes can't inherit from them,\n * and methods can't be added to them with the `include` function.\n\n */\n\n var index = {\n __proto__: null,\n LonLat: LonLat,\n Mercator: Mercator,\n SphericalMercator: SphericalMercator\n };\n\n /*\r\n * @namespace CRS\r\n * @crs L.CRS.EPSG3395\r\n *\r\n * Rarely used by some commercial tile providers. Uses Elliptical Mercator projection.\r\n */\r\n var EPSG3395 = extend({}, Earth, {\r\n \tcode: 'EPSG:3395',\r\n \tprojection: Mercator,\r\n\r\n \ttransformation: (function () {\r\n \t\tvar scale = 0.5 / (Math.PI * Mercator.R);\r\n \t\treturn toTransformation(scale, 0.5, -scale, 0.5);\r\n \t}())\r\n });\n\n /*\r\n * @namespace CRS\r\n * @crs L.CRS.EPSG4326\r\n *\r\n * A common CRS among GIS enthusiasts. Uses simple Equirectangular projection.\r\n *\r\n * Leaflet 1.0.x complies with the [TMS coordinate scheme for EPSG:4326](https://wiki.osgeo.org/wiki/Tile_Map_Service_Specification#global-geodetic),\r\n * which is a breaking change from 0.7.x behaviour. If you are using a `TileLayer`\r\n * with this CRS, ensure that there are two 256x256 pixel tiles covering the\r\n * whole earth at zoom level zero, and that the tile coordinate origin is (-180,+90),\r\n * or (-180,-90) for `TileLayer`s with [the `tms` option](#tilelayer-tms) set.\r\n */\r\n\r\n var EPSG4326 = extend({}, Earth, {\r\n \tcode: 'EPSG:4326',\r\n \tprojection: LonLat,\r\n \ttransformation: toTransformation(1 / 180, 1, -1 / 180, 0.5)\r\n });\n\n /*\n * @namespace CRS\n * @crs L.CRS.Simple\n *\n * A simple CRS that maps longitude and latitude into `x` and `y` directly.\n * May be used for maps of flat surfaces (e.g. game maps). Note that the `y`\n * axis should still be inverted (going from bottom to top). `distance()` returns\n * simple euclidean distance.\n */\n\n var Simple = extend({}, CRS, {\n \tprojection: LonLat,\n \ttransformation: toTransformation(1, 0, -1, 0),\n\n \tscale: function (zoom) {\n \t\treturn Math.pow(2, zoom);\n \t},\n\n \tzoom: function (scale) {\n \t\treturn Math.log(scale) / Math.LN2;\n \t},\n\n \tdistance: function (latlng1, latlng2) {\n \t\tvar dx = latlng2.lng - latlng1.lng,\n \t\t dy = latlng2.lat - latlng1.lat;\n\n \t\treturn Math.sqrt(dx * dx + dy * dy);\n \t},\n\n \tinfinite: true\n });\n\n CRS.Earth = Earth;\n CRS.EPSG3395 = EPSG3395;\n CRS.EPSG3857 = EPSG3857;\n CRS.EPSG900913 = EPSG900913;\n CRS.EPSG4326 = EPSG4326;\n CRS.Simple = Simple;\n\n /*\n * @class Layer\n * @inherits Evented\n * @aka L.Layer\n * @aka ILayer\n *\n * A set of methods from the Layer base class that all Leaflet layers use.\n * Inherits all methods, options and events from `L.Evented`.\n *\n * @example\n *\n * ```js\n * var layer = L.marker(latlng).addTo(map);\n * layer.addTo(map);\n * layer.remove();\n * ```\n *\n * @event add: Event\n * Fired after the layer is added to a map\n *\n * @event remove: Event\n * Fired after the layer is removed from a map\n */\n\n\n var Layer = Evented.extend({\n\n \t// Classes extending `L.Layer` will inherit the following options:\n \toptions: {\n \t\t// @option pane: String = 'overlayPane'\n \t\t// By default the layer will be added to the map's [overlay pane](#map-overlaypane). Overriding this option will cause the layer to be placed on another pane by default.\n \t\tpane: 'overlayPane',\n\n \t\t// @option attribution: String = null\n \t\t// String to be shown in the attribution control, e.g. \"© OpenStreetMap contributors\". It describes the layer data and is often a legal obligation towards copyright holders and tile providers.\n \t\tattribution: null,\n\n \t\tbubblingMouseEvents: true\n \t},\n\n \t/* @section\n \t * Classes extending `L.Layer` will inherit the following methods:\n \t *\n \t * @method addTo(map: Map|LayerGroup): this\n \t * Adds the layer to the given map or layer group.\n \t */\n \taddTo: function (map) {\n \t\tmap.addLayer(this);\n \t\treturn this;\n \t},\n\n \t// @method remove: this\n \t// Removes the layer from the map it is currently active on.\n \tremove: function () {\n \t\treturn this.removeFrom(this._map || this._mapToAdd);\n \t},\n\n \t// @method removeFrom(map: Map): this\n \t// Removes the layer from the given map\n \t//\n \t// @alternative\n \t// @method removeFrom(group: LayerGroup): this\n \t// Removes the layer from the given `LayerGroup`\n \tremoveFrom: function (obj) {\n \t\tif (obj) {\n \t\t\tobj.removeLayer(this);\n \t\t}\n \t\treturn this;\n \t},\n\n \t// @method getPane(name? : String): HTMLElement\n \t// Returns the `HTMLElement` representing the named pane on the map. If `name` is omitted, returns the pane for this layer.\n \tgetPane: function (name) {\n \t\treturn this._map.getPane(name ? (this.options[name] || name) : this.options.pane);\n \t},\n\n \taddInteractiveTarget: function (targetEl) {\n \t\tthis._map._targets[stamp(targetEl)] = this;\n \t\treturn this;\n \t},\n\n \tremoveInteractiveTarget: function (targetEl) {\n \t\tdelete this._map._targets[stamp(targetEl)];\n \t\treturn this;\n \t},\n\n \t// @method getAttribution: String\n \t// Used by the `attribution control`, returns the [attribution option](#gridlayer-attribution).\n \tgetAttribution: function () {\n \t\treturn this.options.attribution;\n \t},\n\n \t_layerAdd: function (e) {\n \t\tvar map = e.target;\n\n \t\t// check in case layer gets added and then removed before the map is ready\n \t\tif (!map.hasLayer(this)) { return; }\n\n \t\tthis._map = map;\n \t\tthis._zoomAnimated = map._zoomAnimated;\n\n \t\tif (this.getEvents) {\n \t\t\tvar events = this.getEvents();\n \t\t\tmap.on(events, this);\n \t\t\tthis.once('remove', function () {\n \t\t\t\tmap.off(events, this);\n \t\t\t}, this);\n \t\t}\n\n \t\tthis.onAdd(map);\n\n \t\tthis.fire('add');\n \t\tmap.fire('layeradd', {layer: this});\n \t}\n });\n\n /* @section Extension methods\n * @uninheritable\n *\n * Every layer should extend from `L.Layer` and (re-)implement the following methods.\n *\n * @method onAdd(map: Map): this\n * Should contain code that creates DOM elements for the layer, adds them to `map panes` where they should belong and puts listeners on relevant map events. Called on [`map.addLayer(layer)`](#map-addlayer).\n *\n * @method onRemove(map: Map): this\n * Should contain all clean up code that removes the layer's elements from the DOM and removes listeners previously added in [`onAdd`](#layer-onadd). Called on [`map.removeLayer(layer)`](#map-removelayer).\n *\n * @method getEvents(): Object\n * This optional method should return an object like `{ viewreset: this._reset }` for [`addEventListener`](#evented-addeventlistener). The event handlers in this object will be automatically added and removed from the map with your layer.\n *\n * @method getAttribution(): String\n * This optional method should return a string containing HTML to be shown on the `Attribution control` whenever the layer is visible.\n *\n * @method beforeAdd(map: Map): this\n * Optional method. Called on [`map.addLayer(layer)`](#map-addlayer), before the layer is added to the map, before events are initialized, without waiting until the map is in a usable state. Use for early initialization only.\n */\n\n\n /* @namespace Map\n * @section Layer events\n *\n * @event layeradd: LayerEvent\n * Fired when a new layer is added to the map.\n *\n * @event layerremove: LayerEvent\n * Fired when some layer is removed from the map\n *\n * @section Methods for Layers and Controls\n */\n Map.include({\n \t// @method addLayer(layer: Layer): this\n \t// Adds the given layer to the map\n \taddLayer: function (layer) {\n \t\tif (!layer._layerAdd) {\n \t\t\tthrow new Error('The provided object is not a Layer.');\n \t\t}\n\n \t\tvar id = stamp(layer);\n \t\tif (this._layers[id]) { return this; }\n \t\tthis._layers[id] = layer;\n\n \t\tlayer._mapToAdd = this;\n\n \t\tif (layer.beforeAdd) {\n \t\t\tlayer.beforeAdd(this);\n \t\t}\n\n \t\tthis.whenReady(layer._layerAdd, layer);\n\n \t\treturn this;\n \t},\n\n \t// @method removeLayer(layer: Layer): this\n \t// Removes the given layer from the map.\n \tremoveLayer: function (layer) {\n \t\tvar id = stamp(layer);\n\n \t\tif (!this._layers[id]) { return this; }\n\n \t\tif (this._loaded) {\n \t\t\tlayer.onRemove(this);\n \t\t}\n\n \t\tdelete this._layers[id];\n\n \t\tif (this._loaded) {\n \t\t\tthis.fire('layerremove', {layer: layer});\n \t\t\tlayer.fire('remove');\n \t\t}\n\n \t\tlayer._map = layer._mapToAdd = null;\n\n \t\treturn this;\n \t},\n\n \t// @method hasLayer(layer: Layer): Boolean\n \t// Returns `true` if the given layer is currently added to the map\n \thasLayer: function (layer) {\n \t\treturn stamp(layer) in this._layers;\n \t},\n\n \t/* @method eachLayer(fn: Function, context?: Object): this\n \t * Iterates over the layers of the map, optionally specifying context of the iterator function.\n \t * ```\n \t * map.eachLayer(function(layer){\n \t * layer.bindPopup('Hello');\n \t * });\n \t * ```\n \t */\n \teachLayer: function (method, context) {\n \t\tfor (var i in this._layers) {\n \t\t\tmethod.call(context, this._layers[i]);\n \t\t}\n \t\treturn this;\n \t},\n\n \t_addLayers: function (layers) {\n \t\tlayers = layers ? (isArray(layers) ? layers : [layers]) : [];\n\n \t\tfor (var i = 0, len = layers.length; i < len; i++) {\n \t\t\tthis.addLayer(layers[i]);\n \t\t}\n \t},\n\n \t_addZoomLimit: function (layer) {\n \t\tif (!isNaN(layer.options.maxZoom) || !isNaN(layer.options.minZoom)) {\n \t\t\tthis._zoomBoundLayers[stamp(layer)] = layer;\n \t\t\tthis._updateZoomLevels();\n \t\t}\n \t},\n\n \t_removeZoomLimit: function (layer) {\n \t\tvar id = stamp(layer);\n\n \t\tif (this._zoomBoundLayers[id]) {\n \t\t\tdelete this._zoomBoundLayers[id];\n \t\t\tthis._updateZoomLevels();\n \t\t}\n \t},\n\n \t_updateZoomLevels: function () {\n \t\tvar minZoom = Infinity,\n \t\t maxZoom = -Infinity,\n \t\t oldZoomSpan = this._getZoomSpan();\n\n \t\tfor (var i in this._zoomBoundLayers) {\n \t\t\tvar options = this._zoomBoundLayers[i].options;\n\n \t\t\tminZoom = options.minZoom === undefined ? minZoom : Math.min(minZoom, options.minZoom);\n \t\t\tmaxZoom = options.maxZoom === undefined ? maxZoom : Math.max(maxZoom, options.maxZoom);\n \t\t}\n\n \t\tthis._layersMaxZoom = maxZoom === -Infinity ? undefined : maxZoom;\n \t\tthis._layersMinZoom = minZoom === Infinity ? undefined : minZoom;\n\n \t\t// @section Map state change events\n \t\t// @event zoomlevelschange: Event\n \t\t// Fired when the number of zoomlevels on the map is changed due\n \t\t// to adding or removing a layer.\n \t\tif (oldZoomSpan !== this._getZoomSpan()) {\n \t\t\tthis.fire('zoomlevelschange');\n \t\t}\n\n \t\tif (this.options.maxZoom === undefined && this._layersMaxZoom && this.getZoom() > this._layersMaxZoom) {\n \t\t\tthis.setZoom(this._layersMaxZoom);\n \t\t}\n \t\tif (this.options.minZoom === undefined && this._layersMinZoom && this.getZoom() < this._layersMinZoom) {\n \t\t\tthis.setZoom(this._layersMinZoom);\n \t\t}\n \t}\n });\n\n /*\r\n * @class LayerGroup\r\n * @aka L.LayerGroup\r\n * @inherits Interactive layer\r\n *\r\n * Used to group several layers and handle them as one. If you add it to the map,\r\n * any layers added or removed from the group will be added/removed on the map as\r\n * well. Extends `Layer`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * L.layerGroup([marker1, marker2])\r\n * \t.addLayer(polyline)\r\n * \t.addTo(map);\r\n * ```\r\n */\r\n\r\n var LayerGroup = Layer.extend({\r\n\r\n \tinitialize: function (layers, options) {\r\n \t\tsetOptions(this, options);\r\n\r\n \t\tthis._layers = {};\r\n\r\n \t\tvar i, len;\r\n\r\n \t\tif (layers) {\r\n \t\t\tfor (i = 0, len = layers.length; i < len; i++) {\r\n \t\t\t\tthis.addLayer(layers[i]);\r\n \t\t\t}\r\n \t\t}\r\n \t},\r\n\r\n \t// @method addLayer(layer: Layer): this\r\n \t// Adds the given layer to the group.\r\n \taddLayer: function (layer) {\r\n \t\tvar id = this.getLayerId(layer);\r\n\r\n \t\tthis._layers[id] = layer;\r\n\r\n \t\tif (this._map) {\r\n \t\t\tthis._map.addLayer(layer);\r\n \t\t}\r\n\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method removeLayer(layer: Layer): this\r\n \t// Removes the given layer from the group.\r\n \t// @alternative\r\n \t// @method removeLayer(id: Number): this\r\n \t// Removes the layer with the given internal ID from the group.\r\n \tremoveLayer: function (layer) {\r\n \t\tvar id = layer in this._layers ? layer : this.getLayerId(layer);\r\n\r\n \t\tif (this._map && this._layers[id]) {\r\n \t\t\tthis._map.removeLayer(this._layers[id]);\r\n \t\t}\r\n\r\n \t\tdelete this._layers[id];\r\n\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method hasLayer(layer: Layer): Boolean\r\n \t// Returns `true` if the given layer is currently added to the group.\r\n \t// @alternative\r\n \t// @method hasLayer(id: Number): Boolean\r\n \t// Returns `true` if the given internal ID is currently added to the group.\r\n \thasLayer: function (layer) {\r\n \t\tvar layerId = typeof layer === 'number' ? layer : this.getLayerId(layer);\r\n \t\treturn layerId in this._layers;\r\n \t},\r\n\r\n \t// @method clearLayers(): this\r\n \t// Removes all the layers from the group.\r\n \tclearLayers: function () {\r\n \t\treturn this.eachLayer(this.removeLayer, this);\r\n \t},\r\n\r\n \t// @method invoke(methodName: String, …): this\r\n \t// Calls `methodName` on every layer contained in this group, passing any\r\n \t// additional parameters. Has no effect if the layers contained do not\r\n \t// implement `methodName`.\r\n \tinvoke: function (methodName) {\r\n \t\tvar args = Array.prototype.slice.call(arguments, 1),\r\n \t\t i, layer;\r\n\r\n \t\tfor (i in this._layers) {\r\n \t\t\tlayer = this._layers[i];\r\n\r\n \t\t\tif (layer[methodName]) {\r\n \t\t\t\tlayer[methodName].apply(layer, args);\r\n \t\t\t}\r\n \t\t}\r\n\r\n \t\treturn this;\r\n \t},\r\n\r\n \tonAdd: function (map) {\r\n \t\tthis.eachLayer(map.addLayer, map);\r\n \t},\r\n\r\n \tonRemove: function (map) {\r\n \t\tthis.eachLayer(map.removeLayer, map);\r\n \t},\r\n\r\n \t// @method eachLayer(fn: Function, context?: Object): this\r\n \t// Iterates over the layers of the group, optionally specifying context of the iterator function.\r\n \t// ```js\r\n \t// group.eachLayer(function (layer) {\r\n \t// \tlayer.bindPopup('Hello');\r\n \t// });\r\n \t// ```\r\n \teachLayer: function (method, context) {\r\n \t\tfor (var i in this._layers) {\r\n \t\t\tmethod.call(context, this._layers[i]);\r\n \t\t}\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method getLayer(id: Number): Layer\r\n \t// Returns the layer with the given internal ID.\r\n \tgetLayer: function (id) {\r\n \t\treturn this._layers[id];\r\n \t},\r\n\r\n \t// @method getLayers(): Layer[]\r\n \t// Returns an array of all the layers added to the group.\r\n \tgetLayers: function () {\r\n \t\tvar layers = [];\r\n \t\tthis.eachLayer(layers.push, layers);\r\n \t\treturn layers;\r\n \t},\r\n\r\n \t// @method setZIndex(zIndex: Number): this\r\n \t// Calls `setZIndex` on every layer contained in this group, passing the z-index.\r\n \tsetZIndex: function (zIndex) {\r\n \t\treturn this.invoke('setZIndex', zIndex);\r\n \t},\r\n\r\n \t// @method getLayerId(layer: Layer): Number\r\n \t// Returns the internal ID for a layer\r\n \tgetLayerId: function (layer) {\r\n \t\treturn stamp(layer);\r\n \t}\r\n });\r\n\r\n\r\n // @factory L.layerGroup(layers?: Layer[], options?: Object)\r\n // Create a layer group, optionally given an initial set of layers and an `options` object.\r\n var layerGroup = function (layers, options) {\r\n \treturn new LayerGroup(layers, options);\r\n };\n\n /*\r\n * @class FeatureGroup\r\n * @aka L.FeatureGroup\r\n * @inherits LayerGroup\r\n *\r\n * Extended `LayerGroup` that makes it easier to do the same thing to all its member layers:\r\n * * [`bindPopup`](#layer-bindpopup) binds a popup to all of the layers at once (likewise with [`bindTooltip`](#layer-bindtooltip))\r\n * * Events are propagated to the `FeatureGroup`, so if the group has an event\r\n * handler, it will handle events from any of the layers. This includes mouse events\r\n * and custom events.\r\n * * Has `layeradd` and `layerremove` events\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * L.featureGroup([marker1, marker2, polyline])\r\n * \t.bindPopup('Hello world!')\r\n * \t.on('click', function() { alert('Clicked on a member of the group!'); })\r\n * \t.addTo(map);\r\n * ```\r\n */\r\n\r\n var FeatureGroup = LayerGroup.extend({\r\n\r\n \taddLayer: function (layer) {\r\n \t\tif (this.hasLayer(layer)) {\r\n \t\t\treturn this;\r\n \t\t}\r\n\r\n \t\tlayer.addEventParent(this);\r\n\r\n \t\tLayerGroup.prototype.addLayer.call(this, layer);\r\n\r\n \t\t// @event layeradd: LayerEvent\r\n \t\t// Fired when a layer is added to this `FeatureGroup`\r\n \t\treturn this.fire('layeradd', {layer: layer});\r\n \t},\r\n\r\n \tremoveLayer: function (layer) {\r\n \t\tif (!this.hasLayer(layer)) {\r\n \t\t\treturn this;\r\n \t\t}\r\n \t\tif (layer in this._layers) {\r\n \t\t\tlayer = this._layers[layer];\r\n \t\t}\r\n\r\n \t\tlayer.removeEventParent(this);\r\n\r\n \t\tLayerGroup.prototype.removeLayer.call(this, layer);\r\n\r\n \t\t// @event layerremove: LayerEvent\r\n \t\t// Fired when a layer is removed from this `FeatureGroup`\r\n \t\treturn this.fire('layerremove', {layer: layer});\r\n \t},\r\n\r\n \t// @method setStyle(style: Path options): this\r\n \t// Sets the given path options to each layer of the group that has a `setStyle` method.\r\n \tsetStyle: function (style) {\r\n \t\treturn this.invoke('setStyle', style);\r\n \t},\r\n\r\n \t// @method bringToFront(): this\r\n \t// Brings the layer group to the top of all other layers\r\n \tbringToFront: function () {\r\n \t\treturn this.invoke('bringToFront');\r\n \t},\r\n\r\n \t// @method bringToBack(): this\r\n \t// Brings the layer group to the back of all other layers\r\n \tbringToBack: function () {\r\n \t\treturn this.invoke('bringToBack');\r\n \t},\r\n\r\n \t// @method getBounds(): LatLngBounds\r\n \t// Returns the LatLngBounds of the Feature Group (created from bounds and coordinates of its children).\r\n \tgetBounds: function () {\r\n \t\tvar bounds = new LatLngBounds();\r\n\r\n \t\tfor (var id in this._layers) {\r\n \t\t\tvar layer = this._layers[id];\r\n \t\t\tbounds.extend(layer.getBounds ? layer.getBounds() : layer.getLatLng());\r\n \t\t}\r\n \t\treturn bounds;\r\n \t}\r\n });\r\n\r\n // @factory L.featureGroup(layers?: Layer[], options?: Object)\r\n // Create a feature group, optionally given an initial set of layers and an `options` object.\r\n var featureGroup = function (layers, options) {\r\n \treturn new FeatureGroup(layers, options);\r\n };\n\n /*\r\n * @class Icon\r\n * @aka L.Icon\r\n *\r\n * Represents an icon to provide when creating a marker.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var myIcon = L.icon({\r\n * iconUrl: 'my-icon.png',\r\n * iconRetinaUrl: 'my-icon@2x.png',\r\n * iconSize: [38, 95],\r\n * iconAnchor: [22, 94],\r\n * popupAnchor: [-3, -76],\r\n * shadowUrl: 'my-icon-shadow.png',\r\n * shadowRetinaUrl: 'my-icon-shadow@2x.png',\r\n * shadowSize: [68, 95],\r\n * shadowAnchor: [22, 94]\r\n * });\r\n *\r\n * L.marker([50.505, 30.57], {icon: myIcon}).addTo(map);\r\n * ```\r\n *\r\n * `L.Icon.Default` extends `L.Icon` and is the blue icon Leaflet uses for markers by default.\r\n *\r\n */\r\n\r\n var Icon = Class.extend({\r\n\r\n \t/* @section\r\n \t * @aka Icon options\r\n \t *\r\n \t * @option iconUrl: String = null\r\n \t * **(required)** The URL to the icon image (absolute or relative to your script path).\r\n \t *\r\n \t * @option iconRetinaUrl: String = null\r\n \t * The URL to a retina sized version of the icon image (absolute or relative to your\r\n \t * script path). Used for Retina screen devices.\r\n \t *\r\n \t * @option iconSize: Point = null\r\n \t * Size of the icon image in pixels.\r\n \t *\r\n \t * @option iconAnchor: Point = null\r\n \t * The coordinates of the \"tip\" of the icon (relative to its top left corner). The icon\r\n \t * will be aligned so that this point is at the marker's geographical location. Centered\r\n \t * by default if size is specified, also can be set in CSS with negative margins.\r\n \t *\r\n \t * @option popupAnchor: Point = [0, 0]\r\n \t * The coordinates of the point from which popups will \"open\", relative to the icon anchor.\r\n \t *\r\n \t * @option tooltipAnchor: Point = [0, 0]\r\n \t * The coordinates of the point from which tooltips will \"open\", relative to the icon anchor.\r\n \t *\r\n \t * @option shadowUrl: String = null\r\n \t * The URL to the icon shadow image. If not specified, no shadow image will be created.\r\n \t *\r\n \t * @option shadowRetinaUrl: String = null\r\n \t *\r\n \t * @option shadowSize: Point = null\r\n \t * Size of the shadow image in pixels.\r\n \t *\r\n \t * @option shadowAnchor: Point = null\r\n \t * The coordinates of the \"tip\" of the shadow (relative to its top left corner) (the same\r\n \t * as iconAnchor if not specified).\r\n \t *\r\n \t * @option className: String = ''\r\n \t * A custom class name to assign to both icon and shadow images. Empty by default.\r\n \t */\r\n\r\n \toptions: {\r\n \t\tpopupAnchor: [0, 0],\r\n \t\ttooltipAnchor: [0, 0],\r\n\r\n \t\t// @option crossOrigin: Boolean|String = false\r\n \t\t// Whether the crossOrigin attribute will be added to the tiles.\r\n \t\t// If a String is provided, all tiles will have their crossOrigin attribute set to the String provided. This is needed if you want to access tile pixel data.\r\n \t\t// Refer to [CORS Settings](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for valid String values.\r\n \t\tcrossOrigin: false\r\n \t},\r\n\r\n \tinitialize: function (options) {\r\n \t\tsetOptions(this, options);\r\n \t},\r\n\r\n \t// @method createIcon(oldIcon?: HTMLElement): HTMLElement\r\n \t// Called internally when the icon has to be shown, returns a `<img>` HTML element\r\n \t// styled according to the options.\r\n \tcreateIcon: function (oldIcon) {\r\n \t\treturn this._createIcon('icon', oldIcon);\r\n \t},\r\n\r\n \t// @method createShadow(oldIcon?: HTMLElement): HTMLElement\r\n \t// As `createIcon`, but for the shadow beneath it.\r\n \tcreateShadow: function (oldIcon) {\r\n \t\treturn this._createIcon('shadow', oldIcon);\r\n \t},\r\n\r\n \t_createIcon: function (name, oldIcon) {\r\n \t\tvar src = this._getIconUrl(name);\r\n\r\n \t\tif (!src) {\r\n \t\t\tif (name === 'icon') {\r\n \t\t\t\tthrow new Error('iconUrl not set in Icon options (see the docs).');\r\n \t\t\t}\r\n \t\t\treturn null;\r\n \t\t}\r\n\r\n \t\tvar img = this._createImg(src, oldIcon && oldIcon.tagName === 'IMG' ? oldIcon : null);\r\n \t\tthis._setIconStyles(img, name);\r\n\r\n \t\tif (this.options.crossOrigin || this.options.crossOrigin === '') {\r\n \t\t\timg.crossOrigin = this.options.crossOrigin === true ? '' : this.options.crossOrigin;\r\n \t\t}\r\n\r\n \t\treturn img;\r\n \t},\r\n\r\n \t_setIconStyles: function (img, name) {\r\n \t\tvar options = this.options;\r\n \t\tvar sizeOption = options[name + 'Size'];\r\n\r\n \t\tif (typeof sizeOption === 'number') {\r\n \t\t\tsizeOption = [sizeOption, sizeOption];\r\n \t\t}\r\n\r\n \t\tvar size = toPoint(sizeOption),\r\n \t\t anchor = toPoint(name === 'shadow' && options.shadowAnchor || options.iconAnchor ||\r\n \t\t size && size.divideBy(2, true));\r\n\r\n \t\timg.className = 'leaflet-marker-' + name + ' ' + (options.className || '');\r\n\r\n \t\tif (anchor) {\r\n \t\t\timg.style.marginLeft = (-anchor.x) + 'px';\r\n \t\t\timg.style.marginTop = (-anchor.y) + 'px';\r\n \t\t}\r\n\r\n \t\tif (size) {\r\n \t\t\timg.style.width = size.x + 'px';\r\n \t\t\timg.style.height = size.y + 'px';\r\n \t\t}\r\n \t},\r\n\r\n \t_createImg: function (src, el) {\r\n \t\tel = el || document.createElement('img');\r\n \t\tel.src = src;\r\n \t\treturn el;\r\n \t},\r\n\r\n \t_getIconUrl: function (name) {\r\n \t\treturn Browser.retina && this.options[name + 'RetinaUrl'] || this.options[name + 'Url'];\r\n \t}\r\n });\r\n\r\n\r\n // @factory L.icon(options: Icon options)\r\n // Creates an icon instance with the given options.\r\n function icon(options) {\r\n \treturn new Icon(options);\r\n }\n\n /*\n * @miniclass Icon.Default (Icon)\n * @aka L.Icon.Default\n * @section\n *\n * A trivial subclass of `Icon`, represents the icon to use in `Marker`s when\n * no icon is specified. Points to the blue marker image distributed with Leaflet\n * releases.\n *\n * In order to customize the default icon, just change the properties of `L.Icon.Default.prototype.options`\n * (which is a set of `Icon options`).\n *\n * If you want to _completely_ replace the default icon, override the\n * `L.Marker.prototype.options.icon` with your own icon instead.\n */\n\n var IconDefault = Icon.extend({\n\n \toptions: {\n \t\ticonUrl: 'marker-icon.png',\n \t\ticonRetinaUrl: 'marker-icon-2x.png',\n \t\tshadowUrl: 'marker-shadow.png',\n \t\ticonSize: [25, 41],\n \t\ticonAnchor: [12, 41],\n \t\tpopupAnchor: [1, -34],\n \t\ttooltipAnchor: [16, -28],\n \t\tshadowSize: [41, 41]\n \t},\n\n \t_getIconUrl: function (name) {\n \t\tif (typeof IconDefault.imagePath !== 'string') {\t// Deprecated, backwards-compatibility only\n \t\t\tIconDefault.imagePath = this._detectIconPath();\n \t\t}\n\n \t\t// @option imagePath: String\n \t\t// `Icon.Default` will try to auto-detect the location of the\n \t\t// blue icon images. If you are placing these images in a non-standard\n \t\t// way, set this option to point to the right path.\n \t\treturn (this.options.imagePath || IconDefault.imagePath) + Icon.prototype._getIconUrl.call(this, name);\n \t},\n\n \t_stripUrl: function (path) {\t// separate function to use in tests\n \t\tvar strip = function (str, re, idx) {\n \t\t\tvar match = re.exec(str);\n \t\t\treturn match && match[idx];\n \t\t};\n \t\tpath = strip(path, /^url\\((['\"])?(.+)\\1\\)$/, 2);\n \t\treturn path && strip(path, /^(.*)marker-icon\\.png$/, 1);\n \t},\n\n \t_detectIconPath: function () {\n \t\tvar el = create$1('div', 'leaflet-default-icon-path', document.body);\n \t\tvar path = getStyle(el, 'background-image') ||\n \t\t getStyle(el, 'backgroundImage');\t// IE8\n\n \t\tdocument.body.removeChild(el);\n \t\tpath = this._stripUrl(path);\n \t\tif (path) { return path; }\n \t\tvar link = document.querySelector('link[href$=\"leaflet.css\"]');\n \t\tif (!link) { return ''; }\n \t\treturn link.href.substring(0, link.href.length - 'leaflet.css'.length - 1);\n \t}\n });\n\n /*\n * L.Handler.MarkerDrag is used internally by L.Marker to make the markers draggable.\n */\n\n\n /* @namespace Marker\n * @section Interaction handlers\n *\n * Interaction handlers are properties of a marker instance that allow you to control interaction behavior in runtime, enabling or disabling certain features such as dragging (see `Handler` methods). Example:\n *\n * ```js\n * marker.dragging.disable();\n * ```\n *\n * @property dragging: Handler\n * Marker dragging handler (by both mouse and touch). Only valid when the marker is on the map (Otherwise set [`marker.options.draggable`](#marker-draggable)).\n */\n\n var MarkerDrag = Handler.extend({\n \tinitialize: function (marker) {\n \t\tthis._marker = marker;\n \t},\n\n \taddHooks: function () {\n \t\tvar icon = this._marker._icon;\n\n \t\tif (!this._draggable) {\n \t\t\tthis._draggable = new Draggable(icon, icon, true);\n \t\t}\n\n \t\tthis._draggable.on({\n \t\t\tdragstart: this._onDragStart,\n \t\t\tpredrag: this._onPreDrag,\n \t\t\tdrag: this._onDrag,\n \t\t\tdragend: this._onDragEnd\n \t\t}, this).enable();\n\n \t\taddClass(icon, 'leaflet-marker-draggable');\n \t},\n\n \tremoveHooks: function () {\n \t\tthis._draggable.off({\n \t\t\tdragstart: this._onDragStart,\n \t\t\tpredrag: this._onPreDrag,\n \t\t\tdrag: this._onDrag,\n \t\t\tdragend: this._onDragEnd\n \t\t}, this).disable();\n\n \t\tif (this._marker._icon) {\n \t\t\tremoveClass(this._marker._icon, 'leaflet-marker-draggable');\n \t\t}\n \t},\n\n \tmoved: function () {\n \t\treturn this._draggable && this._draggable._moved;\n \t},\n\n \t_adjustPan: function (e) {\n \t\tvar marker = this._marker,\n \t\t map = marker._map,\n \t\t speed = this._marker.options.autoPanSpeed,\n \t\t padding = this._marker.options.autoPanPadding,\n \t\t iconPos = getPosition(marker._icon),\n \t\t bounds = map.getPixelBounds(),\n \t\t origin = map.getPixelOrigin();\n\n \t\tvar panBounds = toBounds(\n \t\t\tbounds.min._subtract(origin).add(padding),\n \t\t\tbounds.max._subtract(origin).subtract(padding)\n \t\t);\n\n \t\tif (!panBounds.contains(iconPos)) {\n \t\t\t// Compute incremental movement\n \t\t\tvar movement = toPoint(\n \t\t\t\t(Math.max(panBounds.max.x, iconPos.x) - panBounds.max.x) / (bounds.max.x - panBounds.max.x) -\n \t\t\t\t(Math.min(panBounds.min.x, iconPos.x) - panBounds.min.x) / (bounds.min.x - panBounds.min.x),\n\n \t\t\t\t(Math.max(panBounds.max.y, iconPos.y) - panBounds.max.y) / (bounds.max.y - panBounds.max.y) -\n \t\t\t\t(Math.min(panBounds.min.y, iconPos.y) - panBounds.min.y) / (bounds.min.y - panBounds.min.y)\n \t\t\t).multiplyBy(speed);\n\n \t\t\tmap.panBy(movement, {animate: false});\n\n \t\t\tthis._draggable._newPos._add(movement);\n \t\t\tthis._draggable._startPos._add(movement);\n\n \t\t\tsetPosition(marker._icon, this._draggable._newPos);\n \t\t\tthis._onDrag(e);\n\n \t\t\tthis._panRequest = requestAnimFrame(this._adjustPan.bind(this, e));\n \t\t}\n \t},\n\n \t_onDragStart: function () {\n \t\t// @section Dragging events\n \t\t// @event dragstart: Event\n \t\t// Fired when the user starts dragging the marker.\n\n \t\t// @event movestart: Event\n \t\t// Fired when the marker starts moving (because of dragging).\n\n \t\tthis._oldLatLng = this._marker.getLatLng();\n\n \t\t// When using ES6 imports it could not be set when `Popup` was not imported as well\n \t\tthis._marker.closePopup && this._marker.closePopup();\n\n \t\tthis._marker\n \t\t\t.fire('movestart')\n \t\t\t.fire('dragstart');\n \t},\n\n \t_onPreDrag: function (e) {\n \t\tif (this._marker.options.autoPan) {\n \t\t\tcancelAnimFrame(this._panRequest);\n \t\t\tthis._panRequest = requestAnimFrame(this._adjustPan.bind(this, e));\n \t\t}\n \t},\n\n \t_onDrag: function (e) {\n \t\tvar marker = this._marker,\n \t\t shadow = marker._shadow,\n \t\t iconPos = getPosition(marker._icon),\n \t\t latlng = marker._map.layerPointToLatLng(iconPos);\n\n \t\t// update shadow position\n \t\tif (shadow) {\n \t\t\tsetPosition(shadow, iconPos);\n \t\t}\n\n \t\tmarker._latlng = latlng;\n \t\te.latlng = latlng;\n \t\te.oldLatLng = this._oldLatLng;\n\n \t\t// @event drag: Event\n \t\t// Fired repeatedly while the user drags the marker.\n \t\tmarker\n \t\t .fire('move', e)\n \t\t .fire('drag', e);\n \t},\n\n \t_onDragEnd: function (e) {\n \t\t// @event dragend: DragEndEvent\n \t\t// Fired when the user stops dragging the marker.\n\n \t\t cancelAnimFrame(this._panRequest);\n\n \t\t// @event moveend: Event\n \t\t// Fired when the marker stops moving (because of dragging).\n \t\tdelete this._oldLatLng;\n \t\tthis._marker\n \t\t .fire('moveend')\n \t\t .fire('dragend', e);\n \t}\n });\n\n /*\r\n * @class Marker\r\n * @inherits Interactive layer\r\n * @aka L.Marker\r\n * L.Marker is used to display clickable/draggable icons on the map. Extends `Layer`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * L.marker([50.5, 30.5]).addTo(map);\r\n * ```\r\n */\r\n\r\n var Marker = Layer.extend({\r\n\r\n \t// @section\r\n \t// @aka Marker options\r\n \toptions: {\r\n \t\t// @option icon: Icon = *\r\n \t\t// Icon instance to use for rendering the marker.\r\n \t\t// See [Icon documentation](#L.Icon) for details on how to customize the marker icon.\r\n \t\t// If not specified, a common instance of `L.Icon.Default` is used.\r\n \t\ticon: new IconDefault(),\r\n\r\n \t\t// Option inherited from \"Interactive layer\" abstract class\r\n \t\tinteractive: true,\r\n\r\n \t\t// @option keyboard: Boolean = true\r\n \t\t// Whether the marker can be tabbed to with a keyboard and clicked by pressing enter.\r\n \t\tkeyboard: true,\r\n\r\n \t\t// @option title: String = ''\r\n \t\t// Text for the browser tooltip that appear on marker hover (no tooltip by default).\r\n \t\t// [Useful for accessibility](https://leafletjs.com/examples/accessibility/#markers-must-be-labelled).\r\n \t\ttitle: '',\r\n\r\n \t\t// @option alt: String = 'Marker'\r\n \t\t// Text for the `alt` attribute of the icon image.\r\n \t\t// [Useful for accessibility](https://leafletjs.com/examples/accessibility/#markers-must-be-labelled).\r\n \t\talt: 'Marker',\r\n\r\n \t\t// @option zIndexOffset: Number = 0\r\n \t\t// By default, marker images zIndex is set automatically based on its latitude. Use this option if you want to put the marker on top of all others (or below), specifying a high value like `1000` (or high negative value, respectively).\r\n \t\tzIndexOffset: 0,\r\n\r\n \t\t// @option opacity: Number = 1.0\r\n \t\t// The opacity of the marker.\r\n \t\topacity: 1,\r\n\r\n \t\t// @option riseOnHover: Boolean = false\r\n \t\t// If `true`, the marker will get on top of others when you hover the mouse over it.\r\n \t\triseOnHover: false,\r\n\r\n \t\t// @option riseOffset: Number = 250\r\n \t\t// The z-index offset used for the `riseOnHover` feature.\r\n \t\triseOffset: 250,\r\n\r\n \t\t// @option pane: String = 'markerPane'\r\n \t\t// `Map pane` where the markers icon will be added.\r\n \t\tpane: 'markerPane',\r\n\r\n \t\t// @option shadowPane: String = 'shadowPane'\r\n \t\t// `Map pane` where the markers shadow will be added.\r\n \t\tshadowPane: 'shadowPane',\r\n\r\n \t\t// @option bubblingMouseEvents: Boolean = false\r\n \t\t// When `true`, a mouse event on this marker will trigger the same event on the map\r\n \t\t// (unless [`L.DomEvent.stopPropagation`](#domevent-stoppropagation) is used).\r\n \t\tbubblingMouseEvents: false,\r\n\r\n \t\t// @option autoPanOnFocus: Boolean = true\r\n \t\t// When `true`, the map will pan whenever the marker is focused (via\r\n \t\t// e.g. pressing `tab` on the keyboard) to ensure the marker is\r\n \t\t// visible within the map's bounds\r\n \t\tautoPanOnFocus: true,\r\n\r\n \t\t// @section Draggable marker options\r\n \t\t// @option draggable: Boolean = false\r\n \t\t// Whether the marker is draggable with mouse/touch or not.\r\n \t\tdraggable: false,\r\n\r\n \t\t// @option autoPan: Boolean = false\r\n \t\t// Whether to pan the map when dragging this marker near its edge or not.\r\n \t\tautoPan: false,\r\n\r\n \t\t// @option autoPanPadding: Point = Point(50, 50)\r\n \t\t// Distance (in pixels to the left/right and to the top/bottom) of the\r\n \t\t// map edge to start panning the map.\r\n \t\tautoPanPadding: [50, 50],\r\n\r\n \t\t// @option autoPanSpeed: Number = 10\r\n \t\t// Number of pixels the map should pan by.\r\n \t\tautoPanSpeed: 10\r\n \t},\r\n\r\n \t/* @section\r\n \t *\r\n \t * In addition to [shared layer methods](#Layer) like `addTo()` and `remove()` and [popup methods](#Popup) like bindPopup() you can also use the following methods:\r\n \t */\r\n\r\n \tinitialize: function (latlng, options) {\r\n \t\tsetOptions(this, options);\r\n \t\tthis._latlng = toLatLng(latlng);\r\n \t},\r\n\r\n \tonAdd: function (map) {\r\n \t\tthis._zoomAnimated = this._zoomAnimated && map.options.markerZoomAnimation;\r\n\r\n \t\tif (this._zoomAnimated) {\r\n \t\t\tmap.on('zoomanim', this._animateZoom, this);\r\n \t\t}\r\n\r\n \t\tthis._initIcon();\r\n \t\tthis.update();\r\n \t},\r\n\r\n \tonRemove: function (map) {\r\n \t\tif (this.dragging && this.dragging.enabled()) {\r\n \t\t\tthis.options.draggable = true;\r\n \t\t\tthis.dragging.removeHooks();\r\n \t\t}\r\n \t\tdelete this.dragging;\r\n\r\n \t\tif (this._zoomAnimated) {\r\n \t\t\tmap.off('zoomanim', this._animateZoom, this);\r\n \t\t}\r\n\r\n \t\tthis._removeIcon();\r\n \t\tthis._removeShadow();\r\n \t},\r\n\r\n \tgetEvents: function () {\r\n \t\treturn {\r\n \t\t\tzoom: this.update,\r\n \t\t\tviewreset: this.update\r\n \t\t};\r\n \t},\r\n\r\n \t// @method getLatLng: LatLng\r\n \t// Returns the current geographical position of the marker.\r\n \tgetLatLng: function () {\r\n \t\treturn this._latlng;\r\n \t},\r\n\r\n \t// @method setLatLng(latlng: LatLng): this\r\n \t// Changes the marker position to the given point.\r\n \tsetLatLng: function (latlng) {\r\n \t\tvar oldLatLng = this._latlng;\r\n \t\tthis._latlng = toLatLng(latlng);\r\n \t\tthis.update();\r\n\r\n \t\t// @event move: Event\r\n \t\t// Fired when the marker is moved via [`setLatLng`](#marker-setlatlng) or by [dragging](#marker-dragging). Old and new coordinates are included in event arguments as `oldLatLng`, `latlng`.\r\n \t\treturn this.fire('move', {oldLatLng: oldLatLng, latlng: this._latlng});\r\n \t},\r\n\r\n \t// @method setZIndexOffset(offset: Number): this\r\n \t// Changes the [zIndex offset](#marker-zindexoffset) of the marker.\r\n \tsetZIndexOffset: function (offset) {\r\n \t\tthis.options.zIndexOffset = offset;\r\n \t\treturn this.update();\r\n \t},\r\n\r\n \t// @method getIcon: Icon\r\n \t// Returns the current icon used by the marker\r\n \tgetIcon: function () {\r\n \t\treturn this.options.icon;\r\n \t},\r\n\r\n \t// @method setIcon(icon: Icon): this\r\n \t// Changes the marker icon.\r\n \tsetIcon: function (icon) {\r\n\r\n \t\tthis.options.icon = icon;\r\n\r\n \t\tif (this._map) {\r\n \t\t\tthis._initIcon();\r\n \t\t\tthis.update();\r\n \t\t}\r\n\r\n \t\tif (this._popup) {\r\n \t\t\tthis.bindPopup(this._popup, this._popup.options);\r\n \t\t}\r\n\r\n \t\treturn this;\r\n \t},\r\n\r\n \tgetElement: function () {\r\n \t\treturn this._icon;\r\n \t},\r\n\r\n \tupdate: function () {\r\n\r\n \t\tif (this._icon && this._map) {\r\n \t\t\tvar pos = this._map.latLngToLayerPoint(this._latlng).round();\r\n \t\t\tthis._setPos(pos);\r\n \t\t}\r\n\r\n \t\treturn this;\r\n \t},\r\n\r\n \t_initIcon: function () {\r\n \t\tvar options = this.options,\r\n \t\t classToAdd = 'leaflet-zoom-' + (this._zoomAnimated ? 'animated' : 'hide');\r\n\r\n \t\tvar icon = options.icon.createIcon(this._icon),\r\n \t\t addIcon = false;\r\n\r\n \t\t// if we're not reusing the icon, remove the old one and init new one\r\n \t\tif (icon !== this._icon) {\r\n \t\t\tif (this._icon) {\r\n \t\t\t\tthis._removeIcon();\r\n \t\t\t}\r\n \t\t\taddIcon = true;\r\n\r\n \t\t\tif (options.title) {\r\n \t\t\t\ticon.title = options.title;\r\n \t\t\t}\r\n\r\n \t\t\tif (icon.tagName === 'IMG') {\r\n \t\t\t\ticon.alt = options.alt || '';\r\n \t\t\t}\r\n \t\t}\r\n\r\n \t\taddClass(icon, classToAdd);\r\n\r\n \t\tif (options.keyboard) {\r\n \t\t\ticon.tabIndex = '0';\r\n \t\t\ticon.setAttribute('role', 'button');\r\n \t\t}\r\n\r\n \t\tthis._icon = icon;\r\n\r\n \t\tif (options.riseOnHover) {\r\n \t\t\tthis.on({\r\n \t\t\t\tmouseover: this._bringToFront,\r\n \t\t\t\tmouseout: this._resetZIndex\r\n \t\t\t});\r\n \t\t}\r\n\r\n \t\tif (this.options.autoPanOnFocus) {\r\n \t\t\ton(icon, 'focus', this._panOnFocus, this);\r\n \t\t}\r\n\r\n \t\tvar newShadow = options.icon.createShadow(this._shadow),\r\n \t\t addShadow = false;\r\n\r\n \t\tif (newShadow !== this._shadow) {\r\n \t\t\tthis._removeShadow();\r\n \t\t\taddShadow = true;\r\n \t\t}\r\n\r\n \t\tif (newShadow) {\r\n \t\t\taddClass(newShadow, classToAdd);\r\n \t\t\tnewShadow.alt = '';\r\n \t\t}\r\n \t\tthis._shadow = newShadow;\r\n\r\n\r\n \t\tif (options.opacity < 1) {\r\n \t\t\tthis._updateOpacity();\r\n \t\t}\r\n\r\n\r\n \t\tif (addIcon) {\r\n \t\t\tthis.getPane().appendChild(this._icon);\r\n \t\t}\r\n \t\tthis._initInteraction();\r\n \t\tif (newShadow && addShadow) {\r\n \t\t\tthis.getPane(options.shadowPane).appendChild(this._shadow);\r\n \t\t}\r\n \t},\r\n\r\n \t_removeIcon: function () {\r\n \t\tif (this.options.riseOnHover) {\r\n \t\t\tthis.off({\r\n \t\t\t\tmouseover: this._bringToFront,\r\n \t\t\t\tmouseout: this._resetZIndex\r\n \t\t\t});\r\n \t\t}\r\n\r\n \t\tif (this.options.autoPanOnFocus) {\r\n \t\t\toff(this._icon, 'focus', this._panOnFocus, this);\r\n \t\t}\r\n\r\n \t\tremove(this._icon);\r\n \t\tthis.removeInteractiveTarget(this._icon);\r\n\r\n \t\tthis._icon = null;\r\n \t},\r\n\r\n \t_removeShadow: function () {\r\n \t\tif (this._shadow) {\r\n \t\t\tremove(this._shadow);\r\n \t\t}\r\n \t\tthis._shadow = null;\r\n \t},\r\n\r\n \t_setPos: function (pos) {\r\n\r\n \t\tif (this._icon) {\r\n \t\t\tsetPosition(this._icon, pos);\r\n \t\t}\r\n\r\n \t\tif (this._shadow) {\r\n \t\t\tsetPosition(this._shadow, pos);\r\n \t\t}\r\n\r\n \t\tthis._zIndex = pos.y + this.options.zIndexOffset;\r\n\r\n \t\tthis._resetZIndex();\r\n \t},\r\n\r\n \t_updateZIndex: function (offset) {\r\n \t\tif (this._icon) {\r\n \t\t\tthis._icon.style.zIndex = this._zIndex + offset;\r\n \t\t}\r\n \t},\r\n\r\n \t_animateZoom: function (opt) {\r\n \t\tvar pos = this._map._latLngToNewLayerPoint(this._latlng, opt.zoom, opt.center).round();\r\n\r\n \t\tthis._setPos(pos);\r\n \t},\r\n\r\n \t_initInteraction: function () {\r\n\r\n \t\tif (!this.options.interactive) { return; }\r\n\r\n \t\taddClass(this._icon, 'leaflet-interactive');\r\n\r\n \t\tthis.addInteractiveTarget(this._icon);\r\n\r\n \t\tif (MarkerDrag) {\r\n \t\t\tvar draggable = this.options.draggable;\r\n \t\t\tif (this.dragging) {\r\n \t\t\t\tdraggable = this.dragging.enabled();\r\n \t\t\t\tthis.dragging.disable();\r\n \t\t\t}\r\n\r\n \t\t\tthis.dragging = new MarkerDrag(this);\r\n\r\n \t\t\tif (draggable) {\r\n \t\t\t\tthis.dragging.enable();\r\n \t\t\t}\r\n \t\t}\r\n \t},\r\n\r\n \t// @method setOpacity(opacity: Number): this\r\n \t// Changes the opacity of the marker.\r\n \tsetOpacity: function (opacity) {\r\n \t\tthis.options.opacity = opacity;\r\n \t\tif (this._map) {\r\n \t\t\tthis._updateOpacity();\r\n \t\t}\r\n\r\n \t\treturn this;\r\n \t},\r\n\r\n \t_updateOpacity: function () {\r\n \t\tvar opacity = this.options.opacity;\r\n\r\n \t\tif (this._icon) {\r\n \t\t\tsetOpacity(this._icon, opacity);\r\n \t\t}\r\n\r\n \t\tif (this._shadow) {\r\n \t\t\tsetOpacity(this._shadow, opacity);\r\n \t\t}\r\n \t},\r\n\r\n \t_bringToFront: function () {\r\n \t\tthis._updateZIndex(this.options.riseOffset);\r\n \t},\r\n\r\n \t_resetZIndex: function () {\r\n \t\tthis._updateZIndex(0);\r\n \t},\r\n\r\n \t_panOnFocus: function () {\r\n \t\tvar map = this._map;\r\n \t\tif (!map) { return; }\r\n\r\n \t\tvar iconOpts = this.options.icon.options;\r\n \t\tvar size = iconOpts.iconSize ? toPoint(iconOpts.iconSize) : toPoint(0, 0);\r\n \t\tvar anchor = iconOpts.iconAnchor ? toPoint(iconOpts.iconAnchor) : toPoint(0, 0);\r\n\r\n \t\tmap.panInside(this._latlng, {\r\n \t\t\tpaddingTopLeft: anchor,\r\n \t\t\tpaddingBottomRight: size.subtract(anchor)\r\n \t\t});\r\n \t},\r\n\r\n \t_getPopupAnchor: function () {\r\n \t\treturn this.options.icon.options.popupAnchor;\r\n \t},\r\n\r\n \t_getTooltipAnchor: function () {\r\n \t\treturn this.options.icon.options.tooltipAnchor;\r\n \t}\r\n });\r\n\r\n\r\n // factory L.marker(latlng: LatLng, options? : Marker options)\r\n\r\n // @factory L.marker(latlng: LatLng, options? : Marker options)\r\n // Instantiates a Marker object given a geographical point and optionally an options object.\r\n function marker(latlng, options) {\r\n \treturn new Marker(latlng, options);\r\n }\n\n /*\n * @class Path\n * @aka L.Path\n * @inherits Interactive layer\n *\n * An abstract class that contains options and constants shared between vector\n * overlays (Polygon, Polyline, Circle). Do not use it directly. Extends `Layer`.\n */\n\n var Path = Layer.extend({\n\n \t// @section\n \t// @aka Path options\n \toptions: {\n \t\t// @option stroke: Boolean = true\n \t\t// Whether to draw stroke along the path. Set it to `false` to disable borders on polygons or circles.\n \t\tstroke: true,\n\n \t\t// @option color: String = '#3388ff'\n \t\t// Stroke color\n \t\tcolor: '#3388ff',\n\n \t\t// @option weight: Number = 3\n \t\t// Stroke width in pixels\n \t\tweight: 3,\n\n \t\t// @option opacity: Number = 1.0\n \t\t// Stroke opacity\n \t\topacity: 1,\n\n \t\t// @option lineCap: String= 'round'\n \t\t// A string that defines [shape to be used at the end](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-linecap) of the stroke.\n \t\tlineCap: 'round',\n\n \t\t// @option lineJoin: String = 'round'\n \t\t// A string that defines [shape to be used at the corners](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-linejoin) of the stroke.\n \t\tlineJoin: 'round',\n\n \t\t// @option dashArray: String = null\n \t\t// A string that defines the stroke [dash pattern](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-dasharray). Doesn't work on `Canvas`-powered layers in [some old browsers](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setLineDash#Browser_compatibility).\n \t\tdashArray: null,\n\n \t\t// @option dashOffset: String = null\n \t\t// A string that defines the [distance into the dash pattern to start the dash](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-dashoffset). Doesn't work on `Canvas`-powered layers in [some old browsers](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setLineDash#Browser_compatibility).\n \t\tdashOffset: null,\n\n \t\t// @option fill: Boolean = depends\n \t\t// Whether to fill the path with color. Set it to `false` to disable filling on polygons or circles.\n \t\tfill: false,\n\n \t\t// @option fillColor: String = *\n \t\t// Fill color. Defaults to the value of the [`color`](#path-color) option\n \t\tfillColor: null,\n\n \t\t// @option fillOpacity: Number = 0.2\n \t\t// Fill opacity.\n \t\tfillOpacity: 0.2,\n\n \t\t// @option fillRule: String = 'evenodd'\n \t\t// A string that defines [how the inside of a shape](https://developer.mozilla.org/docs/Web/SVG/Attribute/fill-rule) is determined.\n \t\tfillRule: 'evenodd',\n\n \t\t// className: '',\n\n \t\t// Option inherited from \"Interactive layer\" abstract class\n \t\tinteractive: true,\n\n \t\t// @option bubblingMouseEvents: Boolean = true\n \t\t// When `true`, a mouse event on this path will trigger the same event on the map\n \t\t// (unless [`L.DomEvent.stopPropagation`](#domevent-stoppropagation) is used).\n \t\tbubblingMouseEvents: true\n \t},\n\n \tbeforeAdd: function (map) {\n \t\t// Renderer is set here because we need to call renderer.getEvents\n \t\t// before this.getEvents.\n \t\tthis._renderer = map.getRenderer(this);\n \t},\n\n \tonAdd: function () {\n \t\tthis._renderer._initPath(this);\n \t\tthis._reset();\n \t\tthis._renderer._addPath(this);\n \t},\n\n \tonRemove: function () {\n \t\tthis._renderer._removePath(this);\n \t},\n\n \t// @method redraw(): this\n \t// Redraws the layer. Sometimes useful after you changed the coordinates that the path uses.\n \tredraw: function () {\n \t\tif (this._map) {\n \t\t\tthis._renderer._updatePath(this);\n \t\t}\n \t\treturn this;\n \t},\n\n \t// @method setStyle(style: Path options): this\n \t// Changes the appearance of a Path based on the options in the `Path options` object.\n \tsetStyle: function (style) {\n \t\tsetOptions(this, style);\n \t\tif (this._renderer) {\n \t\t\tthis._renderer._updateStyle(this);\n \t\t\tif (this.options.stroke && style && Object.prototype.hasOwnProperty.call(style, 'weight')) {\n \t\t\t\tthis._updateBounds();\n \t\t\t}\n \t\t}\n \t\treturn this;\n \t},\n\n \t// @method bringToFront(): this\n \t// Brings the layer to the top of all path layers.\n \tbringToFront: function () {\n \t\tif (this._renderer) {\n \t\t\tthis._renderer._bringToFront(this);\n \t\t}\n \t\treturn this;\n \t},\n\n \t// @method bringToBack(): this\n \t// Brings the layer to the bottom of all path layers.\n \tbringToBack: function () {\n \t\tif (this._renderer) {\n \t\t\tthis._renderer._bringToBack(this);\n \t\t}\n \t\treturn this;\n \t},\n\n \tgetElement: function () {\n \t\treturn this._path;\n \t},\n\n \t_reset: function () {\n \t\t// defined in child classes\n \t\tthis._project();\n \t\tthis._update();\n \t},\n\n \t_clickTolerance: function () {\n \t\t// used when doing hit detection for Canvas layers\n \t\treturn (this.options.stroke ? this.options.weight / 2 : 0) +\n \t\t (this._renderer.options.tolerance || 0);\n \t}\n });\n\n /*\n * @class CircleMarker\n * @aka L.CircleMarker\n * @inherits Path\n *\n * A circle of a fixed size with radius specified in pixels. Extends `Path`.\n */\n\n var CircleMarker = Path.extend({\n\n \t// @section\n \t// @aka CircleMarker options\n \toptions: {\n \t\tfill: true,\n\n \t\t// @option radius: Number = 10\n \t\t// Radius of the circle marker, in pixels\n \t\tradius: 10\n \t},\n\n \tinitialize: function (latlng, options) {\n \t\tsetOptions(this, options);\n \t\tthis._latlng = toLatLng(latlng);\n \t\tthis._radius = this.options.radius;\n \t},\n\n \t// @method setLatLng(latLng: LatLng): this\n \t// Sets the position of a circle marker to a new location.\n \tsetLatLng: function (latlng) {\n \t\tvar oldLatLng = this._latlng;\n \t\tthis._latlng = toLatLng(latlng);\n \t\tthis.redraw();\n\n \t\t// @event move: Event\n \t\t// Fired when the marker is moved via [`setLatLng`](#circlemarker-setlatlng). Old and new coordinates are included in event arguments as `oldLatLng`, `latlng`.\n \t\treturn this.fire('move', {oldLatLng: oldLatLng, latlng: this._latlng});\n \t},\n\n \t// @method getLatLng(): LatLng\n \t// Returns the current geographical position of the circle marker\n \tgetLatLng: function () {\n \t\treturn this._latlng;\n \t},\n\n \t// @method setRadius(radius: Number): this\n \t// Sets the radius of a circle marker. Units are in pixels.\n \tsetRadius: function (radius) {\n \t\tthis.options.radius = this._radius = radius;\n \t\treturn this.redraw();\n \t},\n\n \t// @method getRadius(): Number\n \t// Returns the current radius of the circle\n \tgetRadius: function () {\n \t\treturn this._radius;\n \t},\n\n \tsetStyle : function (options) {\n \t\tvar radius = options && options.radius || this._radius;\n \t\tPath.prototype.setStyle.call(this, options);\n \t\tthis.setRadius(radius);\n \t\treturn this;\n \t},\n\n \t_project: function () {\n \t\tthis._point = this._map.latLngToLayerPoint(this._latlng);\n \t\tthis._updateBounds();\n \t},\n\n \t_updateBounds: function () {\n \t\tvar r = this._radius,\n \t\t r2 = this._radiusY || r,\n \t\t w = this._clickTolerance(),\n \t\t p = [r + w, r2 + w];\n \t\tthis._pxBounds = new Bounds(this._point.subtract(p), this._point.add(p));\n \t},\n\n \t_update: function () {\n \t\tif (this._map) {\n \t\t\tthis._updatePath();\n \t\t}\n \t},\n\n \t_updatePath: function () {\n \t\tthis._renderer._updateCircle(this);\n \t},\n\n \t_empty: function () {\n \t\treturn this._radius && !this._renderer._bounds.intersects(this._pxBounds);\n \t},\n\n \t// Needed by the `Canvas` renderer for interactivity\n \t_containsPoint: function (p) {\n \t\treturn p.distanceTo(this._point) <= this._radius + this._clickTolerance();\n \t}\n });\n\n\n // @factory L.circleMarker(latlng: LatLng, options?: CircleMarker options)\n // Instantiates a circle marker object given a geographical point, and an optional options object.\n function circleMarker(latlng, options) {\n \treturn new CircleMarker(latlng, options);\n }\n\n /*\n * @class Circle\n * @aka L.Circle\n * @inherits CircleMarker\n *\n * A class for drawing circle overlays on a map. Extends `CircleMarker`.\n *\n * It's an approximation and starts to diverge from a real circle closer to poles (due to projection distortion).\n *\n * @example\n *\n * ```js\n * L.circle([50.5, 30.5], {radius: 200}).addTo(map);\n * ```\n */\n\n var Circle = CircleMarker.extend({\n\n \tinitialize: function (latlng, options, legacyOptions) {\n \t\tif (typeof options === 'number') {\n \t\t\t// Backwards compatibility with 0.7.x factory (latlng, radius, options?)\n \t\t\toptions = extend({}, legacyOptions, {radius: options});\n \t\t}\n \t\tsetOptions(this, options);\n \t\tthis._latlng = toLatLng(latlng);\n\n \t\tif (isNaN(this.options.radius)) { throw new Error('Circle radius cannot be NaN'); }\n\n \t\t// @section\n \t\t// @aka Circle options\n \t\t// @option radius: Number; Radius of the circle, in meters.\n \t\tthis._mRadius = this.options.radius;\n \t},\n\n \t// @method setRadius(radius: Number): this\n \t// Sets the radius of a circle. Units are in meters.\n \tsetRadius: function (radius) {\n \t\tthis._mRadius = radius;\n \t\treturn this.redraw();\n \t},\n\n \t// @method getRadius(): Number\n \t// Returns the current radius of a circle. Units are in meters.\n \tgetRadius: function () {\n \t\treturn this._mRadius;\n \t},\n\n \t// @method getBounds(): LatLngBounds\n \t// Returns the `LatLngBounds` of the path.\n \tgetBounds: function () {\n \t\tvar half = [this._radius, this._radiusY || this._radius];\n\n \t\treturn new LatLngBounds(\n \t\t\tthis._map.layerPointToLatLng(this._point.subtract(half)),\n \t\t\tthis._map.layerPointToLatLng(this._point.add(half)));\n \t},\n\n \tsetStyle: Path.prototype.setStyle,\n\n \t_project: function () {\n\n \t\tvar lng = this._latlng.lng,\n \t\t lat = this._latlng.lat,\n \t\t map = this._map,\n \t\t crs = map.options.crs;\n\n \t\tif (crs.distance === Earth.distance) {\n \t\t\tvar d = Math.PI / 180,\n \t\t\t latR = (this._mRadius / Earth.R) / d,\n \t\t\t top = map.project([lat + latR, lng]),\n \t\t\t bottom = map.project([lat - latR, lng]),\n \t\t\t p = top.add(bottom).divideBy(2),\n \t\t\t lat2 = map.unproject(p).lat,\n \t\t\t lngR = Math.acos((Math.cos(latR * d) - Math.sin(lat * d) * Math.sin(lat2 * d)) /\n \t\t\t (Math.cos(lat * d) * Math.cos(lat2 * d))) / d;\n\n \t\t\tif (isNaN(lngR) || lngR === 0) {\n \t\t\t\tlngR = latR / Math.cos(Math.PI / 180 * lat); // Fallback for edge case, #2425\n \t\t\t}\n\n \t\t\tthis._point = p.subtract(map.getPixelOrigin());\n \t\t\tthis._radius = isNaN(lngR) ? 0 : p.x - map.project([lat2, lng - lngR]).x;\n \t\t\tthis._radiusY = p.y - top.y;\n\n \t\t} else {\n \t\t\tvar latlng2 = crs.unproject(crs.project(this._latlng).subtract([this._mRadius, 0]));\n\n \t\t\tthis._point = map.latLngToLayerPoint(this._latlng);\n \t\t\tthis._radius = this._point.x - map.latLngToLayerPoint(latlng2).x;\n \t\t}\n\n \t\tthis._updateBounds();\n \t}\n });\n\n // @factory L.circle(latlng: LatLng, options?: Circle options)\n // Instantiates a circle object given a geographical point, and an options object\n // which contains the circle radius.\n // @alternative\n // @factory L.circle(latlng: LatLng, radius: Number, options?: Circle options)\n // Obsolete way of instantiating a circle, for compatibility with 0.7.x code.\n // Do not use in new applications or plugins.\n function circle(latlng, options, legacyOptions) {\n \treturn new Circle(latlng, options, legacyOptions);\n }\n\n /*\n * @class Polyline\n * @aka L.Polyline\n * @inherits Path\n *\n * A class for drawing polyline overlays on a map. Extends `Path`.\n *\n * @example\n *\n * ```js\n * // create a red polyline from an array of LatLng points\n * var latlngs = [\n * \t[45.51, -122.68],\n * \t[37.77, -122.43],\n * \t[34.04, -118.2]\n * ];\n *\n * var polyline = L.polyline(latlngs, {color: 'red'}).addTo(map);\n *\n * // zoom the map to the polyline\n * map.fitBounds(polyline.getBounds());\n * ```\n *\n * You can also pass a multi-dimensional array to represent a `MultiPolyline` shape:\n *\n * ```js\n * // create a red polyline from an array of arrays of LatLng points\n * var latlngs = [\n * \t[[45.51, -122.68],\n * \t [37.77, -122.43],\n * \t [34.04, -118.2]],\n * \t[[40.78, -73.91],\n * \t [41.83, -87.62],\n * \t [32.76, -96.72]]\n * ];\n * ```\n */\n\n\n var Polyline = Path.extend({\n\n \t// @section\n \t// @aka Polyline options\n \toptions: {\n \t\t// @option smoothFactor: Number = 1.0\n \t\t// How much to simplify the polyline on each zoom level. More means\n \t\t// better performance and smoother look, and less means more accurate representation.\n \t\tsmoothFactor: 1.0,\n\n \t\t// @option noClip: Boolean = false\n \t\t// Disable polyline clipping.\n \t\tnoClip: false\n \t},\n\n \tinitialize: function (latlngs, options) {\n \t\tsetOptions(this, options);\n \t\tthis._setLatLngs(latlngs);\n \t},\n\n \t// @method getLatLngs(): LatLng[]\n \t// Returns an array of the points in the path, or nested arrays of points in case of multi-polyline.\n \tgetLatLngs: function () {\n \t\treturn this._latlngs;\n \t},\n\n \t// @method setLatLngs(latlngs: LatLng[]): this\n \t// Replaces all the points in the polyline with the given array of geographical points.\n \tsetLatLngs: function (latlngs) {\n \t\tthis._setLatLngs(latlngs);\n \t\treturn this.redraw();\n \t},\n\n \t// @method isEmpty(): Boolean\n \t// Returns `true` if the Polyline has no LatLngs.\n \tisEmpty: function () {\n \t\treturn !this._latlngs.length;\n \t},\n\n \t// @method closestLayerPoint(p: Point): Point\n \t// Returns the point closest to `p` on the Polyline.\n \tclosestLayerPoint: function (p) {\n \t\tvar minDistance = Infinity,\n \t\t minPoint = null,\n \t\t closest = _sqClosestPointOnSegment,\n \t\t p1, p2;\n\n \t\tfor (var j = 0, jLen = this._parts.length; j < jLen; j++) {\n \t\t\tvar points = this._parts[j];\n\n \t\t\tfor (var i = 1, len = points.length; i < len; i++) {\n \t\t\t\tp1 = points[i - 1];\n \t\t\t\tp2 = points[i];\n\n \t\t\t\tvar sqDist = closest(p, p1, p2, true);\n\n \t\t\t\tif (sqDist < minDistance) {\n \t\t\t\t\tminDistance = sqDist;\n \t\t\t\t\tminPoint = closest(p, p1, p2);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\tif (minPoint) {\n \t\t\tminPoint.distance = Math.sqrt(minDistance);\n \t\t}\n \t\treturn minPoint;\n \t},\n\n \t// @method getCenter(): LatLng\n \t// Returns the center ([centroid](https://en.wikipedia.org/wiki/Centroid)) of the polyline.\n \tgetCenter: function () {\n \t\t// throws error when not yet added to map as this center calculation requires projected coordinates\n \t\tif (!this._map) {\n \t\t\tthrow new Error('Must add layer to map before using getCenter()');\n \t\t}\n \t\treturn polylineCenter(this._defaultShape(), this._map.options.crs);\n \t},\n\n \t// @method getBounds(): LatLngBounds\n \t// Returns the `LatLngBounds` of the path.\n \tgetBounds: function () {\n \t\treturn this._bounds;\n \t},\n\n \t// @method addLatLng(latlng: LatLng, latlngs?: LatLng[]): this\n \t// Adds a given point to the polyline. By default, adds to the first ring of\n \t// the polyline in case of a multi-polyline, but can be overridden by passing\n \t// a specific ring as a LatLng array (that you can earlier access with [`getLatLngs`](#polyline-getlatlngs)).\n \taddLatLng: function (latlng, latlngs) {\n \t\tlatlngs = latlngs || this._defaultShape();\n \t\tlatlng = toLatLng(latlng);\n \t\tlatlngs.push(latlng);\n \t\tthis._bounds.extend(latlng);\n \t\treturn this.redraw();\n \t},\n\n \t_setLatLngs: function (latlngs) {\n \t\tthis._bounds = new LatLngBounds();\n \t\tthis._latlngs = this._convertLatLngs(latlngs);\n \t},\n\n \t_defaultShape: function () {\n \t\treturn isFlat(this._latlngs) ? this._latlngs : this._latlngs[0];\n \t},\n\n \t// recursively convert latlngs input into actual LatLng instances; calculate bounds along the way\n \t_convertLatLngs: function (latlngs) {\n \t\tvar result = [],\n \t\t flat = isFlat(latlngs);\n\n \t\tfor (var i = 0, len = latlngs.length; i < len; i++) {\n \t\t\tif (flat) {\n \t\t\t\tresult[i] = toLatLng(latlngs[i]);\n \t\t\t\tthis._bounds.extend(result[i]);\n \t\t\t} else {\n \t\t\t\tresult[i] = this._convertLatLngs(latlngs[i]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t},\n\n \t_project: function () {\n \t\tvar pxBounds = new Bounds();\n \t\tthis._rings = [];\n \t\tthis._projectLatlngs(this._latlngs, this._rings, pxBounds);\n\n \t\tif (this._bounds.isValid() && pxBounds.isValid()) {\n \t\t\tthis._rawPxBounds = pxBounds;\n \t\t\tthis._updateBounds();\n \t\t}\n \t},\n\n \t_updateBounds: function () {\n \t\tvar w = this._clickTolerance(),\n \t\t p = new Point(w, w);\n\n \t\tif (!this._rawPxBounds) {\n \t\t\treturn;\n \t\t}\n\n \t\tthis._pxBounds = new Bounds([\n \t\t\tthis._rawPxBounds.min.subtract(p),\n \t\t\tthis._rawPxBounds.max.add(p)\n \t\t]);\n \t},\n\n \t// recursively turns latlngs into a set of rings with projected coordinates\n \t_projectLatlngs: function (latlngs, result, projectedBounds) {\n \t\tvar flat = latlngs[0] instanceof LatLng,\n \t\t len = latlngs.length,\n \t\t i, ring;\n\n \t\tif (flat) {\n \t\t\tring = [];\n \t\t\tfor (i = 0; i < len; i++) {\n \t\t\t\tring[i] = this._map.latLngToLayerPoint(latlngs[i]);\n \t\t\t\tprojectedBounds.extend(ring[i]);\n \t\t\t}\n \t\t\tresult.push(ring);\n \t\t} else {\n \t\t\tfor (i = 0; i < len; i++) {\n \t\t\t\tthis._projectLatlngs(latlngs[i], result, projectedBounds);\n \t\t\t}\n \t\t}\n \t},\n\n \t// clip polyline by renderer bounds so that we have less to render for performance\n \t_clipPoints: function () {\n \t\tvar bounds = this._renderer._bounds;\n\n \t\tthis._parts = [];\n \t\tif (!this._pxBounds || !this._pxBounds.intersects(bounds)) {\n \t\t\treturn;\n \t\t}\n\n \t\tif (this.options.noClip) {\n \t\t\tthis._parts = this._rings;\n \t\t\treturn;\n \t\t}\n\n \t\tvar parts = this._parts,\n \t\t i, j, k, len, len2, segment, points;\n\n \t\tfor (i = 0, k = 0, len = this._rings.length; i < len; i++) {\n \t\t\tpoints = this._rings[i];\n\n \t\t\tfor (j = 0, len2 = points.length; j < len2 - 1; j++) {\n \t\t\t\tsegment = clipSegment(points[j], points[j + 1], bounds, j, true);\n\n \t\t\t\tif (!segment) { continue; }\n\n \t\t\t\tparts[k] = parts[k] || [];\n \t\t\t\tparts[k].push(segment[0]);\n\n \t\t\t\t// if segment goes out of screen, or it's the last one, it's the end of the line part\n \t\t\t\tif ((segment[1] !== points[j + 1]) || (j === len2 - 2)) {\n \t\t\t\t\tparts[k].push(segment[1]);\n \t\t\t\t\tk++;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t},\n\n \t// simplify each clipped part of the polyline for performance\n \t_simplifyPoints: function () {\n \t\tvar parts = this._parts,\n \t\t tolerance = this.options.smoothFactor;\n\n \t\tfor (var i = 0, len = parts.length; i < len; i++) {\n \t\t\tparts[i] = simplify(parts[i], tolerance);\n \t\t}\n \t},\n\n \t_update: function () {\n \t\tif (!this._map) { return; }\n\n \t\tthis._clipPoints();\n \t\tthis._simplifyPoints();\n \t\tthis._updatePath();\n \t},\n\n \t_updatePath: function () {\n \t\tthis._renderer._updatePoly(this);\n \t},\n\n \t// Needed by the `Canvas` renderer for interactivity\n \t_containsPoint: function (p, closed) {\n \t\tvar i, j, k, len, len2, part,\n \t\t w = this._clickTolerance();\n\n \t\tif (!this._pxBounds || !this._pxBounds.contains(p)) { return false; }\n\n \t\t// hit detection for polylines\n \t\tfor (i = 0, len = this._parts.length; i < len; i++) {\n \t\t\tpart = this._parts[i];\n\n \t\t\tfor (j = 0, len2 = part.length, k = len2 - 1; j < len2; k = j++) {\n \t\t\t\tif (!closed && (j === 0)) { continue; }\n\n \t\t\t\tif (pointToSegmentDistance(p, part[k], part[j]) <= w) {\n \t\t\t\t\treturn true;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\treturn false;\n \t}\n });\n\n // @factory L.polyline(latlngs: LatLng[], options?: Polyline options)\n // Instantiates a polyline object given an array of geographical points and\n // optionally an options object. You can create a `Polyline` object with\n // multiple separate lines (`MultiPolyline`) by passing an array of arrays\n // of geographic points.\n function polyline(latlngs, options) {\n \treturn new Polyline(latlngs, options);\n }\n\n // Retrocompat. Allow plugins to support Leaflet versions before and after 1.1.\n Polyline._flat = _flat;\n\n /*\n * @class Polygon\n * @aka L.Polygon\n * @inherits Polyline\n *\n * A class for drawing polygon overlays on a map. Extends `Polyline`.\n *\n * Note that points you pass when creating a polygon shouldn't have an additional last point equal to the first one — it's better to filter out such points.\n *\n *\n * @example\n *\n * ```js\n * // create a red polygon from an array of LatLng points\n * var latlngs = [[37, -109.05],[41, -109.03],[41, -102.05],[37, -102.04]];\n *\n * var polygon = L.polygon(latlngs, {color: 'red'}).addTo(map);\n *\n * // zoom the map to the polygon\n * map.fitBounds(polygon.getBounds());\n * ```\n *\n * You can also pass an array of arrays of latlngs, with the first array representing the outer shape and the other arrays representing holes in the outer shape:\n *\n * ```js\n * var latlngs = [\n * [[37, -109.05],[41, -109.03],[41, -102.05],[37, -102.04]], // outer ring\n * [[37.29, -108.58],[40.71, -108.58],[40.71, -102.50],[37.29, -102.50]] // hole\n * ];\n * ```\n *\n * Additionally, you can pass a multi-dimensional array to represent a MultiPolygon shape.\n *\n * ```js\n * var latlngs = [\n * [ // first polygon\n * [[37, -109.05],[41, -109.03],[41, -102.05],[37, -102.04]], // outer ring\n * [[37.29, -108.58],[40.71, -108.58],[40.71, -102.50],[37.29, -102.50]] // hole\n * ],\n * [ // second polygon\n * [[41, -111.03],[45, -111.04],[45, -104.05],[41, -104.05]]\n * ]\n * ];\n * ```\n */\n\n var Polygon = Polyline.extend({\n\n \toptions: {\n \t\tfill: true\n \t},\n\n \tisEmpty: function () {\n \t\treturn !this._latlngs.length || !this._latlngs[0].length;\n \t},\n\n \t// @method getCenter(): LatLng\n \t// Returns the center ([centroid](http://en.wikipedia.org/wiki/Centroid)) of the Polygon.\n \tgetCenter: function () {\n \t\t// throws error when not yet added to map as this center calculation requires projected coordinates\n \t\tif (!this._map) {\n \t\t\tthrow new Error('Must add layer to map before using getCenter()');\n \t\t}\n \t\treturn polygonCenter(this._defaultShape(), this._map.options.crs);\n \t},\n\n \t_convertLatLngs: function (latlngs) {\n \t\tvar result = Polyline.prototype._convertLatLngs.call(this, latlngs),\n \t\t len = result.length;\n\n \t\t// remove last point if it equals first one\n \t\tif (len >= 2 && result[0] instanceof LatLng && result[0].equals(result[len - 1])) {\n \t\t\tresult.pop();\n \t\t}\n \t\treturn result;\n \t},\n\n \t_setLatLngs: function (latlngs) {\n \t\tPolyline.prototype._setLatLngs.call(this, latlngs);\n \t\tif (isFlat(this._latlngs)) {\n \t\t\tthis._latlngs = [this._latlngs];\n \t\t}\n \t},\n\n \t_defaultShape: function () {\n \t\treturn isFlat(this._latlngs[0]) ? this._latlngs[0] : this._latlngs[0][0];\n \t},\n\n \t_clipPoints: function () {\n \t\t// polygons need a different clipping algorithm so we redefine that\n\n \t\tvar bounds = this._renderer._bounds,\n \t\t w = this.options.weight,\n \t\t p = new Point(w, w);\n\n \t\t// increase clip padding by stroke width to avoid stroke on clip edges\n \t\tbounds = new Bounds(bounds.min.subtract(p), bounds.max.add(p));\n\n \t\tthis._parts = [];\n \t\tif (!this._pxBounds || !this._pxBounds.intersects(bounds)) {\n \t\t\treturn;\n \t\t}\n\n \t\tif (this.options.noClip) {\n \t\t\tthis._parts = this._rings;\n \t\t\treturn;\n \t\t}\n\n \t\tfor (var i = 0, len = this._rings.length, clipped; i < len; i++) {\n \t\t\tclipped = clipPolygon(this._rings[i], bounds, true);\n \t\t\tif (clipped.length) {\n \t\t\t\tthis._parts.push(clipped);\n \t\t\t}\n \t\t}\n \t},\n\n \t_updatePath: function () {\n \t\tthis._renderer._updatePoly(this, true);\n \t},\n\n \t// Needed by the `Canvas` renderer for interactivity\n \t_containsPoint: function (p) {\n \t\tvar inside = false,\n \t\t part, p1, p2, i, j, k, len, len2;\n\n \t\tif (!this._pxBounds || !this._pxBounds.contains(p)) { return false; }\n\n \t\t// ray casting algorithm for detecting if point is in polygon\n \t\tfor (i = 0, len = this._parts.length; i < len; i++) {\n \t\t\tpart = this._parts[i];\n\n \t\t\tfor (j = 0, len2 = part.length, k = len2 - 1; j < len2; k = j++) {\n \t\t\t\tp1 = part[j];\n \t\t\t\tp2 = part[k];\n\n \t\t\t\tif (((p1.y > p.y) !== (p2.y > p.y)) && (p.x < (p2.x - p1.x) * (p.y - p1.y) / (p2.y - p1.y) + p1.x)) {\n \t\t\t\t\tinside = !inside;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n\n \t\t// also check if it's on polygon stroke\n \t\treturn inside || Polyline.prototype._containsPoint.call(this, p, true);\n \t}\n\n });\n\n\n // @factory L.polygon(latlngs: LatLng[], options?: Polyline options)\n function polygon(latlngs, options) {\n \treturn new Polygon(latlngs, options);\n }\n\n /*\r\n * @class GeoJSON\r\n * @aka L.GeoJSON\r\n * @inherits FeatureGroup\r\n *\r\n * Represents a GeoJSON object or an array of GeoJSON objects. Allows you to parse\r\n * GeoJSON data and display it on the map. Extends `FeatureGroup`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * L.geoJSON(data, {\r\n * \tstyle: function (feature) {\r\n * \t\treturn {color: feature.properties.color};\r\n * \t}\r\n * }).bindPopup(function (layer) {\r\n * \treturn layer.feature.properties.description;\r\n * }).addTo(map);\r\n * ```\r\n */\r\n\r\n var GeoJSON = FeatureGroup.extend({\r\n\r\n \t/* @section\r\n \t * @aka GeoJSON options\r\n \t *\r\n \t * @option pointToLayer: Function = *\r\n \t * A `Function` defining how GeoJSON points spawn Leaflet layers. It is internally\r\n \t * called when data is added, passing the GeoJSON point feature and its `LatLng`.\r\n \t * The default is to spawn a default `Marker`:\r\n \t * ```js\r\n \t * function(geoJsonPoint, latlng) {\r\n \t * \treturn L.marker(latlng);\r\n \t * }\r\n \t * ```\r\n \t *\r\n \t * @option style: Function = *\r\n \t * A `Function` defining the `Path options` for styling GeoJSON lines and polygons,\r\n \t * called internally when data is added.\r\n \t * The default value is to not override any defaults:\r\n \t * ```js\r\n \t * function (geoJsonFeature) {\r\n \t * \treturn {}\r\n \t * }\r\n \t * ```\r\n \t *\r\n \t * @option onEachFeature: Function = *\r\n \t * A `Function` that will be called once for each created `Feature`, after it has\r\n \t * been created and styled. Useful for attaching events and popups to features.\r\n \t * The default is to do nothing with the newly created layers:\r\n \t * ```js\r\n \t * function (feature, layer) {}\r\n \t * ```\r\n \t *\r\n \t * @option filter: Function = *\r\n \t * A `Function` that will be used to decide whether to include a feature or not.\r\n \t * The default is to include all features:\r\n \t * ```js\r\n \t * function (geoJsonFeature) {\r\n \t * \treturn true;\r\n \t * }\r\n \t * ```\r\n \t * Note: dynamically changing the `filter` option will have effect only on newly\r\n \t * added data. It will _not_ re-evaluate already included features.\r\n \t *\r\n \t * @option coordsToLatLng: Function = *\r\n \t * A `Function` that will be used for converting GeoJSON coordinates to `LatLng`s.\r\n \t * The default is the `coordsToLatLng` static method.\r\n \t *\r\n \t * @option markersInheritOptions: Boolean = false\r\n \t * Whether default Markers for \"Point\" type Features inherit from group options.\r\n \t */\r\n\r\n \tinitialize: function (geojson, options) {\r\n \t\tsetOptions(this, options);\r\n\r\n \t\tthis._layers = {};\r\n\r\n \t\tif (geojson) {\r\n \t\t\tthis.addData(geojson);\r\n \t\t}\r\n \t},\r\n\r\n \t// @method addData( <GeoJSON> data ): this\r\n \t// Adds a GeoJSON object to the layer.\r\n \taddData: function (geojson) {\r\n \t\tvar features = isArray(geojson) ? geojson : geojson.features,\r\n \t\t i, len, feature;\r\n\r\n \t\tif (features) {\r\n \t\t\tfor (i = 0, len = features.length; i < len; i++) {\r\n \t\t\t\t// only add this if geometry or geometries are set and not null\r\n \t\t\t\tfeature = features[i];\r\n \t\t\t\tif (feature.geometries || feature.geometry || feature.features || feature.coordinates) {\r\n \t\t\t\t\tthis.addData(feature);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\treturn this;\r\n \t\t}\r\n\r\n \t\tvar options = this.options;\r\n\r\n \t\tif (options.filter && !options.filter(geojson)) { return this; }\r\n\r\n \t\tvar layer = geometryToLayer(geojson, options);\r\n \t\tif (!layer) {\r\n \t\t\treturn this;\r\n \t\t}\r\n \t\tlayer.feature = asFeature(geojson);\r\n\r\n \t\tlayer.defaultOptions = layer.options;\r\n \t\tthis.resetStyle(layer);\r\n\r\n \t\tif (options.onEachFeature) {\r\n \t\t\toptions.onEachFeature(geojson, layer);\r\n \t\t}\r\n\r\n \t\treturn this.addLayer(layer);\r\n \t},\r\n\r\n \t// @method resetStyle( <Path> layer? ): this\r\n \t// Resets the given vector layer's style to the original GeoJSON style, useful for resetting style after hover events.\r\n \t// If `layer` is omitted, the style of all features in the current layer is reset.\r\n \tresetStyle: function (layer) {\r\n \t\tif (layer === undefined) {\r\n \t\t\treturn this.eachLayer(this.resetStyle, this);\r\n \t\t}\r\n \t\t// reset any custom styles\r\n \t\tlayer.options = extend({}, layer.defaultOptions);\r\n \t\tthis._setLayerStyle(layer, this.options.style);\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method setStyle( <Function> style ): this\r\n \t// Changes styles of GeoJSON vector layers with the given style function.\r\n \tsetStyle: function (style) {\r\n \t\treturn this.eachLayer(function (layer) {\r\n \t\t\tthis._setLayerStyle(layer, style);\r\n \t\t}, this);\r\n \t},\r\n\r\n \t_setLayerStyle: function (layer, style) {\r\n \t\tif (layer.setStyle) {\r\n \t\t\tif (typeof style === 'function') {\r\n \t\t\t\tstyle = style(layer.feature);\r\n \t\t\t}\r\n \t\t\tlayer.setStyle(style);\r\n \t\t}\r\n \t}\r\n });\r\n\r\n // @section\r\n // There are several static functions which can be called without instantiating L.GeoJSON:\r\n\r\n // @function geometryToLayer(featureData: Object, options?: GeoJSON options): Layer\r\n // Creates a `Layer` from a given GeoJSON feature. Can use a custom\r\n // [`pointToLayer`](#geojson-pointtolayer) and/or [`coordsToLatLng`](#geojson-coordstolatlng)\r\n // functions if provided as options.\r\n function geometryToLayer(geojson, options) {\r\n\r\n \tvar geometry = geojson.type === 'Feature' ? geojson.geometry : geojson,\r\n \t coords = geometry ? geometry.coordinates : null,\r\n \t layers = [],\r\n \t pointToLayer = options && options.pointToLayer,\r\n \t _coordsToLatLng = options && options.coordsToLatLng || coordsToLatLng,\r\n \t latlng, latlngs, i, len;\r\n\r\n \tif (!coords && !geometry) {\r\n \t\treturn null;\r\n \t}\r\n\r\n \tswitch (geometry.type) {\r\n \tcase 'Point':\r\n \t\tlatlng = _coordsToLatLng(coords);\r\n \t\treturn _pointToLayer(pointToLayer, geojson, latlng, options);\r\n\r\n \tcase 'MultiPoint':\r\n \t\tfor (i = 0, len = coords.length; i < len; i++) {\r\n \t\t\tlatlng = _coordsToLatLng(coords[i]);\r\n \t\t\tlayers.push(_pointToLayer(pointToLayer, geojson, latlng, options));\r\n \t\t}\r\n \t\treturn new FeatureGroup(layers);\r\n\r\n \tcase 'LineString':\r\n \tcase 'MultiLineString':\r\n \t\tlatlngs = coordsToLatLngs(coords, geometry.type === 'LineString' ? 0 : 1, _coordsToLatLng);\r\n \t\treturn new Polyline(latlngs, options);\r\n\r\n \tcase 'Polygon':\r\n \tcase 'MultiPolygon':\r\n \t\tlatlngs = coordsToLatLngs(coords, geometry.type === 'Polygon' ? 1 : 2, _coordsToLatLng);\r\n \t\treturn new Polygon(latlngs, options);\r\n\r\n \tcase 'GeometryCollection':\r\n \t\tfor (i = 0, len = geometry.geometries.length; i < len; i++) {\r\n \t\t\tvar geoLayer = geometryToLayer({\r\n \t\t\t\tgeometry: geometry.geometries[i],\r\n \t\t\t\ttype: 'Feature',\r\n \t\t\t\tproperties: geojson.properties\r\n \t\t\t}, options);\r\n\r\n \t\t\tif (geoLayer) {\r\n \t\t\t\tlayers.push(geoLayer);\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn new FeatureGroup(layers);\r\n\r\n \tcase 'FeatureCollection':\r\n \t\tfor (i = 0, len = geometry.features.length; i < len; i++) {\r\n \t\t\tvar featureLayer = geometryToLayer(geometry.features[i], options);\r\n\r\n \t\t\tif (featureLayer) {\r\n \t\t\t\tlayers.push(featureLayer);\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn new FeatureGroup(layers);\r\n\r\n \tdefault:\r\n \t\tthrow new Error('Invalid GeoJSON object.');\r\n \t}\r\n }\r\n\r\n function _pointToLayer(pointToLayerFn, geojson, latlng, options) {\r\n \treturn pointToLayerFn ?\r\n \t\tpointToLayerFn(geojson, latlng) :\r\n \t\tnew Marker(latlng, options && options.markersInheritOptions && options);\r\n }\r\n\r\n // @function coordsToLatLng(coords: Array): LatLng\r\n // Creates a `LatLng` object from an array of 2 numbers (longitude, latitude)\r\n // or 3 numbers (longitude, latitude, altitude) used in GeoJSON for points.\r\n function coordsToLatLng(coords) {\r\n \treturn new LatLng(coords[1], coords[0], coords[2]);\r\n }\r\n\r\n // @function coordsToLatLngs(coords: Array, levelsDeep?: Number, coordsToLatLng?: Function): Array\r\n // Creates a multidimensional array of `LatLng`s from a GeoJSON coordinates array.\r\n // `levelsDeep` specifies the nesting level (0 is for an array of points, 1 for an array of arrays of points, etc., 0 by default).\r\n // Can use a custom [`coordsToLatLng`](#geojson-coordstolatlng) function.\r\n function coordsToLatLngs(coords, levelsDeep, _coordsToLatLng) {\r\n \tvar latlngs = [];\r\n\r\n \tfor (var i = 0, len = coords.length, latlng; i < len; i++) {\r\n \t\tlatlng = levelsDeep ?\r\n \t\t\tcoordsToLatLngs(coords[i], levelsDeep - 1, _coordsToLatLng) :\r\n \t\t\t(_coordsToLatLng || coordsToLatLng)(coords[i]);\r\n\r\n \t\tlatlngs.push(latlng);\r\n \t}\r\n\r\n \treturn latlngs;\r\n }\r\n\r\n // @function latLngToCoords(latlng: LatLng, precision?: Number|false): Array\r\n // Reverse of [`coordsToLatLng`](#geojson-coordstolatlng)\r\n // Coordinates values are rounded with [`formatNum`](#util-formatnum) function.\r\n function latLngToCoords(latlng, precision) {\r\n \tlatlng = toLatLng(latlng);\r\n \treturn latlng.alt !== undefined ?\r\n \t\t[formatNum(latlng.lng, precision), formatNum(latlng.lat, precision), formatNum(latlng.alt, precision)] :\r\n \t\t[formatNum(latlng.lng, precision), formatNum(latlng.lat, precision)];\r\n }\r\n\r\n // @function latLngsToCoords(latlngs: Array, levelsDeep?: Number, closed?: Boolean, precision?: Number|false): Array\r\n // Reverse of [`coordsToLatLngs`](#geojson-coordstolatlngs)\r\n // `closed` determines whether the first point should be appended to the end of the array to close the feature, only used when `levelsDeep` is 0. False by default.\r\n // Coordinates values are rounded with [`formatNum`](#util-formatnum) function.\r\n function latLngsToCoords(latlngs, levelsDeep, closed, precision) {\r\n \tvar coords = [];\r\n\r\n \tfor (var i = 0, len = latlngs.length; i < len; i++) {\r\n \t\t// Check for flat arrays required to ensure unbalanced arrays are correctly converted in recursion\r\n \t\tcoords.push(levelsDeep ?\r\n \t\t\tlatLngsToCoords(latlngs[i], isFlat(latlngs[i]) ? 0 : levelsDeep - 1, closed, precision) :\r\n \t\t\tlatLngToCoords(latlngs[i], precision));\r\n \t}\r\n\r\n \tif (!levelsDeep && closed) {\r\n \t\tcoords.push(coords[0].slice());\r\n \t}\r\n\r\n \treturn coords;\r\n }\r\n\r\n function getFeature(layer, newGeometry) {\r\n \treturn layer.feature ?\r\n \t\textend({}, layer.feature, {geometry: newGeometry}) :\r\n \t\tasFeature(newGeometry);\r\n }\r\n\r\n // @function asFeature(geojson: Object): Object\r\n // Normalize GeoJSON geometries/features into GeoJSON features.\r\n function asFeature(geojson) {\r\n \tif (geojson.type === 'Feature' || geojson.type === 'FeatureCollection') {\r\n \t\treturn geojson;\r\n \t}\r\n\r\n \treturn {\r\n \t\ttype: 'Feature',\r\n \t\tproperties: {},\r\n \t\tgeometry: geojson\r\n \t};\r\n }\r\n\r\n var PointToGeoJSON = {\r\n \ttoGeoJSON: function (precision) {\r\n \t\treturn getFeature(this, {\r\n \t\t\ttype: 'Point',\r\n \t\t\tcoordinates: latLngToCoords(this.getLatLng(), precision)\r\n \t\t});\r\n \t}\r\n };\r\n\r\n // @namespace Marker\r\n // @section Other methods\r\n // @method toGeoJSON(precision?: Number|false): Object\r\n // Coordinates values are rounded with [`formatNum`](#util-formatnum) function with given `precision`.\r\n // Returns a [`GeoJSON`](https://en.wikipedia.org/wiki/GeoJSON) representation of the marker (as a GeoJSON `Point` Feature).\r\n Marker.include(PointToGeoJSON);\r\n\r\n // @namespace CircleMarker\r\n // @method toGeoJSON(precision?: Number|false): Object\r\n // Coordinates values are rounded with [`formatNum`](#util-formatnum) function with given `precision`.\r\n // Returns a [`GeoJSON`](https://en.wikipedia.org/wiki/GeoJSON) representation of the circle marker (as a GeoJSON `Point` Feature).\r\n Circle.include(PointToGeoJSON);\r\n CircleMarker.include(PointToGeoJSON);\r\n\r\n\r\n // @namespace Polyline\r\n // @method toGeoJSON(precision?: Number|false): Object\r\n // Coordinates values are rounded with [`formatNum`](#util-formatnum) function with given `precision`.\r\n // Returns a [`GeoJSON`](https://en.wikipedia.org/wiki/GeoJSON) representation of the polyline (as a GeoJSON `LineString` or `MultiLineString` Feature).\r\n Polyline.include({\r\n \ttoGeoJSON: function (precision) {\r\n \t\tvar multi = !isFlat(this._latlngs);\r\n\r\n \t\tvar coords = latLngsToCoords(this._latlngs, multi ? 1 : 0, false, precision);\r\n\r\n \t\treturn getFeature(this, {\r\n \t\t\ttype: (multi ? 'Multi' : '') + 'LineString',\r\n \t\t\tcoordinates: coords\r\n \t\t});\r\n \t}\r\n });\r\n\r\n // @namespace Polygon\r\n // @method toGeoJSON(precision?: Number|false): Object\r\n // Coordinates values are rounded with [`formatNum`](#util-formatnum) function with given `precision`.\r\n // Returns a [`GeoJSON`](https://en.wikipedia.org/wiki/GeoJSON) representation of the polygon (as a GeoJSON `Polygon` or `MultiPolygon` Feature).\r\n Polygon.include({\r\n \ttoGeoJSON: function (precision) {\r\n \t\tvar holes = !isFlat(this._latlngs),\r\n \t\t multi = holes && !isFlat(this._latlngs[0]);\r\n\r\n \t\tvar coords = latLngsToCoords(this._latlngs, multi ? 2 : holes ? 1 : 0, true, precision);\r\n\r\n \t\tif (!holes) {\r\n \t\t\tcoords = [coords];\r\n \t\t}\r\n\r\n \t\treturn getFeature(this, {\r\n \t\t\ttype: (multi ? 'Multi' : '') + 'Polygon',\r\n \t\t\tcoordinates: coords\r\n \t\t});\r\n \t}\r\n });\r\n\r\n\r\n // @namespace LayerGroup\r\n LayerGroup.include({\r\n \ttoMultiPoint: function (precision) {\r\n \t\tvar coords = [];\r\n\r\n \t\tthis.eachLayer(function (layer) {\r\n \t\t\tcoords.push(layer.toGeoJSON(precision).geometry.coordinates);\r\n \t\t});\r\n\r\n \t\treturn getFeature(this, {\r\n \t\t\ttype: 'MultiPoint',\r\n \t\t\tcoordinates: coords\r\n \t\t});\r\n \t},\r\n\r\n \t// @method toGeoJSON(precision?: Number|false): Object\r\n \t// Coordinates values are rounded with [`formatNum`](#util-formatnum) function with given `precision`.\r\n \t// Returns a [`GeoJSON`](https://en.wikipedia.org/wiki/GeoJSON) representation of the layer group (as a GeoJSON `FeatureCollection`, `GeometryCollection`, or `MultiPoint`).\r\n \ttoGeoJSON: function (precision) {\r\n\r\n \t\tvar type = this.feature && this.feature.geometry && this.feature.geometry.type;\r\n\r\n \t\tif (type === 'MultiPoint') {\r\n \t\t\treturn this.toMultiPoint(precision);\r\n \t\t}\r\n\r\n \t\tvar isGeometryCollection = type === 'GeometryCollection',\r\n \t\t jsons = [];\r\n\r\n \t\tthis.eachLayer(function (layer) {\r\n \t\t\tif (layer.toGeoJSON) {\r\n \t\t\t\tvar json = layer.toGeoJSON(precision);\r\n \t\t\t\tif (isGeometryCollection) {\r\n \t\t\t\t\tjsons.push(json.geometry);\r\n \t\t\t\t} else {\r\n \t\t\t\t\tvar feature = asFeature(json);\r\n \t\t\t\t\t// Squash nested feature collections\r\n \t\t\t\t\tif (feature.type === 'FeatureCollection') {\r\n \t\t\t\t\t\tjsons.push.apply(jsons, feature.features);\r\n \t\t\t\t\t} else {\r\n \t\t\t\t\t\tjsons.push(feature);\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t});\r\n\r\n \t\tif (isGeometryCollection) {\r\n \t\t\treturn getFeature(this, {\r\n \t\t\t\tgeometries: jsons,\r\n \t\t\t\ttype: 'GeometryCollection'\r\n \t\t\t});\r\n \t\t}\r\n\r\n \t\treturn {\r\n \t\t\ttype: 'FeatureCollection',\r\n \t\t\tfeatures: jsons\r\n \t\t};\r\n \t}\r\n });\r\n\r\n // @namespace GeoJSON\r\n // @factory L.geoJSON(geojson?: Object, options?: GeoJSON options)\r\n // Creates a GeoJSON layer. Optionally accepts an object in\r\n // [GeoJSON format](https://tools.ietf.org/html/rfc7946) to display on the map\r\n // (you can alternatively add it later with `addData` method) and an `options` object.\r\n function geoJSON(geojson, options) {\r\n \treturn new GeoJSON(geojson, options);\r\n }\r\n\r\n // Backward compatibility.\r\n var geoJson = geoJSON;\n\n /*\r\n * @class ImageOverlay\r\n * @aka L.ImageOverlay\r\n * @inherits Interactive layer\r\n *\r\n * Used to load and display a single image over specific bounds of the map. Extends `Layer`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var imageUrl = 'https://maps.lib.utexas.edu/maps/historical/newark_nj_1922.jpg',\r\n * \timageBounds = [[40.712216, -74.22655], [40.773941, -74.12544]];\r\n * L.imageOverlay(imageUrl, imageBounds).addTo(map);\r\n * ```\r\n */\r\n\r\n var ImageOverlay = Layer.extend({\r\n\r\n \t// @section\r\n \t// @aka ImageOverlay options\r\n \toptions: {\r\n \t\t// @option opacity: Number = 1.0\r\n \t\t// The opacity of the image overlay.\r\n \t\topacity: 1,\r\n\r\n \t\t// @option alt: String = ''\r\n \t\t// Text for the `alt` attribute of the image (useful for accessibility).\r\n \t\talt: '',\r\n\r\n \t\t// @option interactive: Boolean = false\r\n \t\t// If `true`, the image overlay will emit [mouse events](#interactive-layer) when clicked or hovered.\r\n \t\tinteractive: false,\r\n\r\n \t\t// @option crossOrigin: Boolean|String = false\r\n \t\t// Whether the crossOrigin attribute will be added to the image.\r\n \t\t// If a String is provided, the image will have its crossOrigin attribute set to the String provided. This is needed if you want to access image pixel data.\r\n \t\t// Refer to [CORS Settings](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for valid String values.\r\n \t\tcrossOrigin: false,\r\n\r\n \t\t// @option errorOverlayUrl: String = ''\r\n \t\t// URL to the overlay image to show in place of the overlay that failed to load.\r\n \t\terrorOverlayUrl: '',\r\n\r\n \t\t// @option zIndex: Number = 1\r\n \t\t// The explicit [zIndex](https://developer.mozilla.org/docs/Web/CSS/CSS_Positioning/Understanding_z_index) of the overlay layer.\r\n \t\tzIndex: 1,\r\n\r\n \t\t// @option className: String = ''\r\n \t\t// A custom class name to assign to the image. Empty by default.\r\n \t\tclassName: ''\r\n \t},\r\n\r\n \tinitialize: function (url, bounds, options) { // (String, LatLngBounds, Object)\r\n \t\tthis._url = url;\r\n \t\tthis._bounds = toLatLngBounds(bounds);\r\n\r\n \t\tsetOptions(this, options);\r\n \t},\r\n\r\n \tonAdd: function () {\r\n \t\tif (!this._image) {\r\n \t\t\tthis._initImage();\r\n\r\n \t\t\tif (this.options.opacity < 1) {\r\n \t\t\t\tthis._updateOpacity();\r\n \t\t\t}\r\n \t\t}\r\n\r\n \t\tif (this.options.interactive) {\r\n \t\t\taddClass(this._image, 'leaflet-interactive');\r\n \t\t\tthis.addInteractiveTarget(this._image);\r\n \t\t}\r\n\r\n \t\tthis.getPane().appendChild(this._image);\r\n \t\tthis._reset();\r\n \t},\r\n\r\n \tonRemove: function () {\r\n \t\tremove(this._image);\r\n \t\tif (this.options.interactive) {\r\n \t\t\tthis.removeInteractiveTarget(this._image);\r\n \t\t}\r\n \t},\r\n\r\n \t// @method setOpacity(opacity: Number): this\r\n \t// Sets the opacity of the overlay.\r\n \tsetOpacity: function (opacity) {\r\n \t\tthis.options.opacity = opacity;\r\n\r\n \t\tif (this._image) {\r\n \t\t\tthis._updateOpacity();\r\n \t\t}\r\n \t\treturn this;\r\n \t},\r\n\r\n \tsetStyle: function (styleOpts) {\r\n \t\tif (styleOpts.opacity) {\r\n \t\t\tthis.setOpacity(styleOpts.opacity);\r\n \t\t}\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method bringToFront(): this\r\n \t// Brings the layer to the top of all overlays.\r\n \tbringToFront: function () {\r\n \t\tif (this._map) {\r\n \t\t\ttoFront(this._image);\r\n \t\t}\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method bringToBack(): this\r\n \t// Brings the layer to the bottom of all overlays.\r\n \tbringToBack: function () {\r\n \t\tif (this._map) {\r\n \t\t\ttoBack(this._image);\r\n \t\t}\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method setUrl(url: String): this\r\n \t// Changes the URL of the image.\r\n \tsetUrl: function (url) {\r\n \t\tthis._url = url;\r\n\r\n \t\tif (this._image) {\r\n \t\t\tthis._image.src = url;\r\n \t\t}\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method setBounds(bounds: LatLngBounds): this\r\n \t// Update the bounds that this ImageOverlay covers\r\n \tsetBounds: function (bounds) {\r\n \t\tthis._bounds = toLatLngBounds(bounds);\r\n\r\n \t\tif (this._map) {\r\n \t\t\tthis._reset();\r\n \t\t}\r\n \t\treturn this;\r\n \t},\r\n\r\n \tgetEvents: function () {\r\n \t\tvar events = {\r\n \t\t\tzoom: this._reset,\r\n \t\t\tviewreset: this._reset\r\n \t\t};\r\n\r\n \t\tif (this._zoomAnimated) {\r\n \t\t\tevents.zoomanim = this._animateZoom;\r\n \t\t}\r\n\r\n \t\treturn events;\r\n \t},\r\n\r\n \t// @method setZIndex(value: Number): this\r\n \t// Changes the [zIndex](#imageoverlay-zindex) of the image overlay.\r\n \tsetZIndex: function (value) {\r\n \t\tthis.options.zIndex = value;\r\n \t\tthis._updateZIndex();\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method getBounds(): LatLngBounds\r\n \t// Get the bounds that this ImageOverlay covers\r\n \tgetBounds: function () {\r\n \t\treturn this._bounds;\r\n \t},\r\n\r\n \t// @method getElement(): HTMLElement\r\n \t// Returns the instance of [`HTMLImageElement`](https://developer.mozilla.org/docs/Web/API/HTMLImageElement)\r\n \t// used by this overlay.\r\n \tgetElement: function () {\r\n \t\treturn this._image;\r\n \t},\r\n\r\n \t_initImage: function () {\r\n \t\tvar wasElementSupplied = this._url.tagName === 'IMG';\r\n \t\tvar img = this._image = wasElementSupplied ? this._url : create$1('img');\r\n\r\n \t\taddClass(img, 'leaflet-image-layer');\r\n \t\tif (this._zoomAnimated) { addClass(img, 'leaflet-zoom-animated'); }\r\n \t\tif (this.options.className) { addClass(img, this.options.className); }\r\n\r\n \t\timg.onselectstart = falseFn;\r\n \t\timg.onmousemove = falseFn;\r\n\r\n \t\t// @event load: Event\r\n \t\t// Fired when the ImageOverlay layer has loaded its image\r\n \t\timg.onload = bind(this.fire, this, 'load');\r\n \t\timg.onerror = bind(this._overlayOnError, this, 'error');\r\n\r\n \t\tif (this.options.crossOrigin || this.options.crossOrigin === '') {\r\n \t\t\timg.crossOrigin = this.options.crossOrigin === true ? '' : this.options.crossOrigin;\r\n \t\t}\r\n\r\n \t\tif (this.options.zIndex) {\r\n \t\t\tthis._updateZIndex();\r\n \t\t}\r\n\r\n \t\tif (wasElementSupplied) {\r\n \t\t\tthis._url = img.src;\r\n \t\t\treturn;\r\n \t\t}\r\n\r\n \t\timg.src = this._url;\r\n \t\timg.alt = this.options.alt;\r\n \t},\r\n\r\n \t_animateZoom: function (e) {\r\n \t\tvar scale = this._map.getZoomScale(e.zoom),\r\n \t\t offset = this._map._latLngBoundsToNewLayerBounds(this._bounds, e.zoom, e.center).min;\r\n\r\n \t\tsetTransform(this._image, offset, scale);\r\n \t},\r\n\r\n \t_reset: function () {\r\n \t\tvar image = this._image,\r\n \t\t bounds = new Bounds(\r\n \t\t this._map.latLngToLayerPoint(this._bounds.getNorthWest()),\r\n \t\t this._map.latLngToLayerPoint(this._bounds.getSouthEast())),\r\n \t\t size = bounds.getSize();\r\n\r\n \t\tsetPosition(image, bounds.min);\r\n\r\n \t\timage.style.width = size.x + 'px';\r\n \t\timage.style.height = size.y + 'px';\r\n \t},\r\n\r\n \t_updateOpacity: function () {\r\n \t\tsetOpacity(this._image, this.options.opacity);\r\n \t},\r\n\r\n \t_updateZIndex: function () {\r\n \t\tif (this._image && this.options.zIndex !== undefined && this.options.zIndex !== null) {\r\n \t\t\tthis._image.style.zIndex = this.options.zIndex;\r\n \t\t}\r\n \t},\r\n\r\n \t_overlayOnError: function () {\r\n \t\t// @event error: Event\r\n \t\t// Fired when the ImageOverlay layer fails to load its image\r\n \t\tthis.fire('error');\r\n\r\n \t\tvar errorUrl = this.options.errorOverlayUrl;\r\n \t\tif (errorUrl && this._url !== errorUrl) {\r\n \t\t\tthis._url = errorUrl;\r\n \t\t\tthis._image.src = errorUrl;\r\n \t\t}\r\n \t},\r\n\r\n \t// @method getCenter(): LatLng\r\n \t// Returns the center of the ImageOverlay.\r\n \tgetCenter: function () {\r\n \t\treturn this._bounds.getCenter();\r\n \t}\r\n });\r\n\r\n // @factory L.imageOverlay(imageUrl: String, bounds: LatLngBounds, options?: ImageOverlay options)\r\n // Instantiates an image overlay object given the URL of the image and the\r\n // geographical bounds it is tied to.\r\n var imageOverlay = function (url, bounds, options) {\r\n \treturn new ImageOverlay(url, bounds, options);\r\n };\n\n /*\r\n * @class VideoOverlay\r\n * @aka L.VideoOverlay\r\n * @inherits ImageOverlay\r\n *\r\n * Used to load and display a video player over specific bounds of the map. Extends `ImageOverlay`.\r\n *\r\n * A video overlay uses the [`<video>`](https://developer.mozilla.org/docs/Web/HTML/Element/video)\r\n * HTML5 element.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var videoUrl = 'https://www.mapbox.com/bites/00188/patricia_nasa.webm',\r\n * \tvideoBounds = [[ 32, -130], [ 13, -100]];\r\n * L.videoOverlay(videoUrl, videoBounds ).addTo(map);\r\n * ```\r\n */\r\n\r\n var VideoOverlay = ImageOverlay.extend({\r\n\r\n \t// @section\r\n \t// @aka VideoOverlay options\r\n \toptions: {\r\n \t\t// @option autoplay: Boolean = true\r\n \t\t// Whether the video starts playing automatically when loaded.\r\n \t\t// On some browsers autoplay will only work with `muted: true`\r\n \t\tautoplay: true,\r\n\r\n \t\t// @option loop: Boolean = true\r\n \t\t// Whether the video will loop back to the beginning when played.\r\n \t\tloop: true,\r\n\r\n \t\t// @option keepAspectRatio: Boolean = true\r\n \t\t// Whether the video will save aspect ratio after the projection.\r\n \t\t// Relevant for supported browsers. See [browser compatibility](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit)\r\n \t\tkeepAspectRatio: true,\r\n\r\n \t\t// @option muted: Boolean = false\r\n \t\t// Whether the video starts on mute when loaded.\r\n \t\tmuted: false,\r\n\r\n \t\t// @option playsInline: Boolean = true\r\n \t\t// Mobile browsers will play the video right where it is instead of open it up in fullscreen mode.\r\n \t\tplaysInline: true\r\n \t},\r\n\r\n \t_initImage: function () {\r\n \t\tvar wasElementSupplied = this._url.tagName === 'VIDEO';\r\n \t\tvar vid = this._image = wasElementSupplied ? this._url : create$1('video');\r\n\r\n \t\taddClass(vid, 'leaflet-image-layer');\r\n \t\tif (this._zoomAnimated) { addClass(vid, 'leaflet-zoom-animated'); }\r\n \t\tif (this.options.className) { addClass(vid, this.options.className); }\r\n\r\n \t\tvid.onselectstart = falseFn;\r\n \t\tvid.onmousemove = falseFn;\r\n\r\n \t\t// @event load: Event\r\n \t\t// Fired when the video has finished loading the first frame\r\n \t\tvid.onloadeddata = bind(this.fire, this, 'load');\r\n\r\n \t\tif (wasElementSupplied) {\r\n \t\t\tvar sourceElements = vid.getElementsByTagName('source');\r\n \t\t\tvar sources = [];\r\n \t\t\tfor (var j = 0; j < sourceElements.length; j++) {\r\n \t\t\t\tsources.push(sourceElements[j].src);\r\n \t\t\t}\r\n\r\n \t\t\tthis._url = (sourceElements.length > 0) ? sources : [vid.src];\r\n \t\t\treturn;\r\n \t\t}\r\n\r\n \t\tif (!isArray(this._url)) { this._url = [this._url]; }\r\n\r\n \t\tif (!this.options.keepAspectRatio && Object.prototype.hasOwnProperty.call(vid.style, 'objectFit')) {\r\n \t\t\tvid.style['objectFit'] = 'fill';\r\n \t\t}\r\n \t\tvid.autoplay = !!this.options.autoplay;\r\n \t\tvid.loop = !!this.options.loop;\r\n \t\tvid.muted = !!this.options.muted;\r\n \t\tvid.playsInline = !!this.options.playsInline;\r\n \t\tfor (var i = 0; i < this._url.length; i++) {\r\n \t\t\tvar source = create$1('source');\r\n \t\t\tsource.src = this._url[i];\r\n \t\t\tvid.appendChild(source);\r\n \t\t}\r\n \t}\r\n\r\n \t// @method getElement(): HTMLVideoElement\r\n \t// Returns the instance of [`HTMLVideoElement`](https://developer.mozilla.org/docs/Web/API/HTMLVideoElement)\r\n \t// used by this overlay.\r\n });\r\n\r\n\r\n // @factory L.videoOverlay(video: String|Array|HTMLVideoElement, bounds: LatLngBounds, options?: VideoOverlay options)\r\n // Instantiates an image overlay object given the URL of the video (or array of URLs, or even a video element) and the\r\n // geographical bounds it is tied to.\r\n\r\n function videoOverlay(video, bounds, options) {\r\n \treturn new VideoOverlay(video, bounds, options);\r\n }\n\n /*\n * @class SVGOverlay\n * @aka L.SVGOverlay\n * @inherits ImageOverlay\n *\n * Used to load, display and provide DOM access to an SVG file over specific bounds of the map. Extends `ImageOverlay`.\n *\n * An SVG overlay uses the [`<svg>`](https://developer.mozilla.org/docs/Web/SVG/Element/svg) element.\n *\n * @example\n *\n * ```js\n * var svgElement = document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\");\n * svgElement.setAttribute('xmlns', \"http://www.w3.org/2000/svg\");\n * svgElement.setAttribute('viewBox', \"0 0 200 200\");\n * svgElement.innerHTML = '<rect width=\"200\" height=\"200\"/><rect x=\"75\" y=\"23\" width=\"50\" height=\"50\" style=\"fill:red\"/><rect x=\"75\" y=\"123\" width=\"50\" height=\"50\" style=\"fill:#0013ff\"/>';\n * var svgElementBounds = [ [ 32, -130 ], [ 13, -100 ] ];\n * L.svgOverlay(svgElement, svgElementBounds).addTo(map);\n * ```\n */\n\n var SVGOverlay = ImageOverlay.extend({\n \t_initImage: function () {\n \t\tvar el = this._image = this._url;\n\n \t\taddClass(el, 'leaflet-image-layer');\n \t\tif (this._zoomAnimated) { addClass(el, 'leaflet-zoom-animated'); }\n \t\tif (this.options.className) { addClass(el, this.options.className); }\n\n \t\tel.onselectstart = falseFn;\n \t\tel.onmousemove = falseFn;\n \t}\n\n \t// @method getElement(): SVGElement\n \t// Returns the instance of [`SVGElement`](https://developer.mozilla.org/docs/Web/API/SVGElement)\n \t// used by this overlay.\n });\n\n\n // @factory L.svgOverlay(svg: String|SVGElement, bounds: LatLngBounds, options?: SVGOverlay options)\n // Instantiates an image overlay object given an SVG element and the geographical bounds it is tied to.\n // A viewBox attribute is required on the SVG element to zoom in and out properly.\n\n function svgOverlay(el, bounds, options) {\n \treturn new SVGOverlay(el, bounds, options);\n }\n\n /*\r\n * @class DivOverlay\r\n * @inherits Interactive layer\r\n * @aka L.DivOverlay\r\n * Base model for L.Popup and L.Tooltip. Inherit from it for custom overlays like plugins.\r\n */\r\n\r\n // @namespace DivOverlay\r\n var DivOverlay = Layer.extend({\r\n\r\n \t// @section\r\n \t// @aka DivOverlay options\r\n \toptions: {\r\n \t\t// @option interactive: Boolean = false\r\n \t\t// If true, the popup/tooltip will listen to the mouse events.\r\n \t\tinteractive: false,\r\n\r\n \t\t// @option offset: Point = Point(0, 0)\r\n \t\t// The offset of the overlay position.\r\n \t\toffset: [0, 0],\r\n\r\n \t\t// @option className: String = ''\r\n \t\t// A custom CSS class name to assign to the overlay.\r\n \t\tclassName: '',\r\n\r\n \t\t// @option pane: String = undefined\r\n \t\t// `Map pane` where the overlay will be added.\r\n \t\tpane: undefined,\r\n\r\n \t\t// @option content: String|HTMLElement|Function = ''\r\n \t\t// Sets the HTML content of the overlay while initializing. If a function is passed the source layer will be\r\n \t\t// passed to the function. The function should return a `String` or `HTMLElement` to be used in the overlay.\r\n \t\tcontent: ''\r\n \t},\r\n\r\n \tinitialize: function (options, source) {\r\n \t\tif (options && (options instanceof LatLng || isArray(options))) {\r\n \t\t\tthis._latlng = toLatLng(options);\r\n \t\t\tsetOptions(this, source);\r\n \t\t} else {\r\n \t\t\tsetOptions(this, options);\r\n \t\t\tthis._source = source;\r\n \t\t}\r\n \t\tif (this.options.content) {\r\n \t\t\tthis._content = this.options.content;\r\n \t\t}\r\n \t},\r\n\r\n \t// @method openOn(map: Map): this\r\n \t// Adds the overlay to the map.\r\n \t// Alternative to `map.openPopup(popup)`/`.openTooltip(tooltip)`.\r\n \topenOn: function (map) {\r\n \t\tmap = arguments.length ? map : this._source._map; // experimental, not the part of public api\r\n \t\tif (!map.hasLayer(this)) {\r\n \t\t\tmap.addLayer(this);\r\n \t\t}\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method close(): this\r\n \t// Closes the overlay.\r\n \t// Alternative to `map.closePopup(popup)`/`.closeTooltip(tooltip)`\r\n \t// and `layer.closePopup()`/`.closeTooltip()`.\r\n \tclose: function () {\r\n \t\tif (this._map) {\r\n \t\t\tthis._map.removeLayer(this);\r\n \t\t}\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method toggle(layer?: Layer): this\r\n \t// Opens or closes the overlay bound to layer depending on its current state.\r\n \t// Argument may be omitted only for overlay bound to layer.\r\n \t// Alternative to `layer.togglePopup()`/`.toggleTooltip()`.\r\n \ttoggle: function (layer) {\r\n \t\tif (this._map) {\r\n \t\t\tthis.close();\r\n \t\t} else {\r\n \t\t\tif (arguments.length) {\r\n \t\t\t\tthis._source = layer;\r\n \t\t\t} else {\r\n \t\t\t\tlayer = this._source;\r\n \t\t\t}\r\n \t\t\tthis._prepareOpen();\r\n\r\n \t\t\t// open the overlay on the map\r\n \t\t\tthis.openOn(layer._map);\r\n \t\t}\r\n \t\treturn this;\r\n \t},\r\n\r\n \tonAdd: function (map) {\r\n \t\tthis._zoomAnimated = map._zoomAnimated;\r\n\r\n \t\tif (!this._container) {\r\n \t\t\tthis._initLayout();\r\n \t\t}\r\n\r\n \t\tif (map._fadeAnimated) {\r\n \t\t\tsetOpacity(this._container, 0);\r\n \t\t}\r\n\r\n \t\tclearTimeout(this._removeTimeout);\r\n \t\tthis.getPane().appendChild(this._container);\r\n \t\tthis.update();\r\n\r\n \t\tif (map._fadeAnimated) {\r\n \t\t\tsetOpacity(this._container, 1);\r\n \t\t}\r\n\r\n \t\tthis.bringToFront();\r\n\r\n \t\tif (this.options.interactive) {\r\n \t\t\taddClass(this._container, 'leaflet-interactive');\r\n \t\t\tthis.addInteractiveTarget(this._container);\r\n \t\t}\r\n \t},\r\n\r\n \tonRemove: function (map) {\r\n \t\tif (map._fadeAnimated) {\r\n \t\t\tsetOpacity(this._container, 0);\r\n \t\t\tthis._removeTimeout = setTimeout(bind(remove, undefined, this._container), 200);\r\n \t\t} else {\r\n \t\t\tremove(this._container);\r\n \t\t}\r\n\r\n \t\tif (this.options.interactive) {\r\n \t\t\tremoveClass(this._container, 'leaflet-interactive');\r\n \t\t\tthis.removeInteractiveTarget(this._container);\r\n \t\t}\r\n \t},\r\n\r\n \t// @namespace DivOverlay\r\n \t// @method getLatLng: LatLng\r\n \t// Returns the geographical point of the overlay.\r\n \tgetLatLng: function () {\r\n \t\treturn this._latlng;\r\n \t},\r\n\r\n \t// @method setLatLng(latlng: LatLng): this\r\n \t// Sets the geographical point where the overlay will open.\r\n \tsetLatLng: function (latlng) {\r\n \t\tthis._latlng = toLatLng(latlng);\r\n \t\tif (this._map) {\r\n \t\t\tthis._updatePosition();\r\n \t\t\tthis._adjustPan();\r\n \t\t}\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method getContent: String|HTMLElement\r\n \t// Returns the content of the overlay.\r\n \tgetContent: function () {\r\n \t\treturn this._content;\r\n \t},\r\n\r\n \t// @method setContent(htmlContent: String|HTMLElement|Function): this\r\n \t// Sets the HTML content of the overlay. If a function is passed the source layer will be passed to the function.\r\n \t// The function should return a `String` or `HTMLElement` to be used in the overlay.\r\n \tsetContent: function (content) {\r\n \t\tthis._content = content;\r\n \t\tthis.update();\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method getElement: String|HTMLElement\r\n \t// Returns the HTML container of the overlay.\r\n \tgetElement: function () {\r\n \t\treturn this._container;\r\n \t},\r\n\r\n \t// @method update: null\r\n \t// Updates the overlay content, layout and position. Useful for updating the overlay after something inside changed, e.g. image loaded.\r\n \tupdate: function () {\r\n \t\tif (!this._map) { return; }\r\n\r\n \t\tthis._container.style.visibility = 'hidden';\r\n\r\n \t\tthis._updateContent();\r\n \t\tthis._updateLayout();\r\n \t\tthis._updatePosition();\r\n\r\n \t\tthis._container.style.visibility = '';\r\n\r\n \t\tthis._adjustPan();\r\n \t},\r\n\r\n \tgetEvents: function () {\r\n \t\tvar events = {\r\n \t\t\tzoom: this._updatePosition,\r\n \t\t\tviewreset: this._updatePosition\r\n \t\t};\r\n\r\n \t\tif (this._zoomAnimated) {\r\n \t\t\tevents.zoomanim = this._animateZoom;\r\n \t\t}\r\n \t\treturn events;\r\n \t},\r\n\r\n \t// @method isOpen: Boolean\r\n \t// Returns `true` when the overlay is visible on the map.\r\n \tisOpen: function () {\r\n \t\treturn !!this._map && this._map.hasLayer(this);\r\n \t},\r\n\r\n \t// @method bringToFront: this\r\n \t// Brings this overlay in front of other overlays (in the same map pane).\r\n \tbringToFront: function () {\r\n \t\tif (this._map) {\r\n \t\t\ttoFront(this._container);\r\n \t\t}\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method bringToBack: this\r\n \t// Brings this overlay to the back of other overlays (in the same map pane).\r\n \tbringToBack: function () {\r\n \t\tif (this._map) {\r\n \t\t\ttoBack(this._container);\r\n \t\t}\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// prepare bound overlay to open: update latlng pos / content source (for FeatureGroup)\r\n \t_prepareOpen: function (latlng) {\r\n \t\tvar source = this._source;\r\n \t\tif (!source._map) { return false; }\r\n\r\n \t\tif (source instanceof FeatureGroup) {\r\n \t\t\tsource = null;\r\n \t\t\tvar layers = this._source._layers;\r\n \t\t\tfor (var id in layers) {\r\n \t\t\t\tif (layers[id]._map) {\r\n \t\t\t\t\tsource = layers[id];\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tif (!source) { return false; } // Unable to get source layer.\r\n\r\n \t\t\t// set overlay source to this layer\r\n \t\t\tthis._source = source;\r\n \t\t}\r\n\r\n \t\tif (!latlng) {\r\n \t\t\tif (source.getCenter) {\r\n \t\t\t\tlatlng = source.getCenter();\r\n \t\t\t} else if (source.getLatLng) {\r\n \t\t\t\tlatlng = source.getLatLng();\r\n \t\t\t} else if (source.getBounds) {\r\n \t\t\t\tlatlng = source.getBounds().getCenter();\r\n \t\t\t} else {\r\n \t\t\t\tthrow new Error('Unable to get source layer LatLng.');\r\n \t\t\t}\r\n \t\t}\r\n \t\tthis.setLatLng(latlng);\r\n\r\n \t\tif (this._map) {\r\n \t\t\t// update the overlay (content, layout, etc...)\r\n \t\t\tthis.update();\r\n \t\t}\r\n\r\n \t\treturn true;\r\n \t},\r\n\r\n \t_updateContent: function () {\r\n \t\tif (!this._content) { return; }\r\n\r\n \t\tvar node = this._contentNode;\r\n \t\tvar content = (typeof this._content === 'function') ? this._content(this._source || this) : this._content;\r\n\r\n \t\tif (typeof content === 'string') {\r\n \t\t\tnode.innerHTML = content;\r\n \t\t} else {\r\n \t\t\twhile (node.hasChildNodes()) {\r\n \t\t\t\tnode.removeChild(node.firstChild);\r\n \t\t\t}\r\n \t\t\tnode.appendChild(content);\r\n \t\t}\r\n\r\n \t\t// @namespace DivOverlay\r\n \t\t// @section DivOverlay events\r\n \t\t// @event contentupdate: Event\r\n \t\t// Fired when the content of the overlay is updated\r\n \t\tthis.fire('contentupdate');\r\n \t},\r\n\r\n \t_updatePosition: function () {\r\n \t\tif (!this._map) { return; }\r\n\r\n \t\tvar pos = this._map.latLngToLayerPoint(this._latlng),\r\n \t\t offset = toPoint(this.options.offset),\r\n \t\t anchor = this._getAnchor();\r\n\r\n \t\tif (this._zoomAnimated) {\r\n \t\t\tsetPosition(this._container, pos.add(anchor));\r\n \t\t} else {\r\n \t\t\toffset = offset.add(pos).add(anchor);\r\n \t\t}\r\n\r\n \t\tvar bottom = this._containerBottom = -offset.y,\r\n \t\t left = this._containerLeft = -Math.round(this._containerWidth / 2) + offset.x;\r\n\r\n \t\t// bottom position the overlay in case the height of the overlay changes (images loading etc)\r\n \t\tthis._container.style.bottom = bottom + 'px';\r\n \t\tthis._container.style.left = left + 'px';\r\n \t},\r\n\r\n \t_getAnchor: function () {\r\n \t\treturn [0, 0];\r\n \t}\r\n\r\n });\r\n\r\n Map.include({\r\n \t_initOverlay: function (OverlayClass, content, latlng, options) {\r\n \t\tvar overlay = content;\r\n \t\tif (!(overlay instanceof OverlayClass)) {\r\n \t\t\toverlay = new OverlayClass(options).setContent(content);\r\n \t\t}\r\n \t\tif (latlng) {\r\n \t\t\toverlay.setLatLng(latlng);\r\n \t\t}\r\n \t\treturn overlay;\r\n \t}\r\n });\r\n\r\n\r\n Layer.include({\r\n \t_initOverlay: function (OverlayClass, old, content, options) {\r\n \t\tvar overlay = content;\r\n \t\tif (overlay instanceof OverlayClass) {\r\n \t\t\tsetOptions(overlay, options);\r\n \t\t\toverlay._source = this;\r\n \t\t} else {\r\n \t\t\toverlay = (old && !options) ? old : new OverlayClass(options, this);\r\n \t\t\toverlay.setContent(content);\r\n \t\t}\r\n \t\treturn overlay;\r\n \t}\r\n });\n\n /*\r\n * @class Popup\r\n * @inherits DivOverlay\r\n * @aka L.Popup\r\n * Used to open popups in certain places of the map. Use [Map.openPopup](#map-openpopup) to\r\n * open popups while making sure that only one popup is open at one time\r\n * (recommended for usability), or use [Map.addLayer](#map-addlayer) to open as many as you want.\r\n *\r\n * @example\r\n *\r\n * If you want to just bind a popup to marker click and then open it, it's really easy:\r\n *\r\n * ```js\r\n * marker.bindPopup(popupContent).openPopup();\r\n * ```\r\n * Path overlays like polylines also have a `bindPopup` method.\r\n *\r\n * A popup can be also standalone:\r\n *\r\n * ```js\r\n * var popup = L.popup()\r\n * \t.setLatLng(latlng)\r\n * \t.setContent('<p>Hello world!<br />This is a nice popup.</p>')\r\n * \t.openOn(map);\r\n * ```\r\n * or\r\n * ```js\r\n * var popup = L.popup(latlng, {content: '<p>Hello world!<br />This is a nice popup.</p>')\r\n * \t.openOn(map);\r\n * ```\r\n */\r\n\r\n\r\n // @namespace Popup\r\n var Popup = DivOverlay.extend({\r\n\r\n \t// @section\r\n \t// @aka Popup options\r\n \toptions: {\r\n \t\t// @option pane: String = 'popupPane'\r\n \t\t// `Map pane` where the popup will be added.\r\n \t\tpane: 'popupPane',\r\n\r\n \t\t// @option offset: Point = Point(0, 7)\r\n \t\t// The offset of the popup position.\r\n \t\toffset: [0, 7],\r\n\r\n \t\t// @option maxWidth: Number = 300\r\n \t\t// Max width of the popup, in pixels.\r\n \t\tmaxWidth: 300,\r\n\r\n \t\t// @option minWidth: Number = 50\r\n \t\t// Min width of the popup, in pixels.\r\n \t\tminWidth: 50,\r\n\r\n \t\t// @option maxHeight: Number = null\r\n \t\t// If set, creates a scrollable container of the given height\r\n \t\t// inside a popup if its content exceeds it.\r\n \t\t// The scrollable container can be styled using the\r\n \t\t// `leaflet-popup-scrolled` CSS class selector.\r\n \t\tmaxHeight: null,\r\n\r\n \t\t// @option autoPan: Boolean = true\r\n \t\t// Set it to `false` if you don't want the map to do panning animation\r\n \t\t// to fit the opened popup.\r\n \t\tautoPan: true,\r\n\r\n \t\t// @option autoPanPaddingTopLeft: Point = null\r\n \t\t// The margin between the popup and the top left corner of the map\r\n \t\t// view after autopanning was performed.\r\n \t\tautoPanPaddingTopLeft: null,\r\n\r\n \t\t// @option autoPanPaddingBottomRight: Point = null\r\n \t\t// The margin between the popup and the bottom right corner of the map\r\n \t\t// view after autopanning was performed.\r\n \t\tautoPanPaddingBottomRight: null,\r\n\r\n \t\t// @option autoPanPadding: Point = Point(5, 5)\r\n \t\t// Equivalent of setting both top left and bottom right autopan padding to the same value.\r\n \t\tautoPanPadding: [5, 5],\r\n\r\n \t\t// @option keepInView: Boolean = false\r\n \t\t// Set it to `true` if you want to prevent users from panning the popup\r\n \t\t// off of the screen while it is open.\r\n \t\tkeepInView: false,\r\n\r\n \t\t// @option closeButton: Boolean = true\r\n \t\t// Controls the presence of a close button in the popup.\r\n \t\tcloseButton: true,\r\n\r\n \t\t// @option autoClose: Boolean = true\r\n \t\t// Set it to `false` if you want to override the default behavior of\r\n \t\t// the popup closing when another popup is opened.\r\n \t\tautoClose: true,\r\n\r\n \t\t// @option closeOnEscapeKey: Boolean = true\r\n \t\t// Set it to `false` if you want to override the default behavior of\r\n \t\t// the ESC key for closing of the popup.\r\n \t\tcloseOnEscapeKey: true,\r\n\r\n \t\t// @option closeOnClick: Boolean = *\r\n \t\t// Set it if you want to override the default behavior of the popup closing when user clicks\r\n \t\t// on the map. Defaults to the map's [`closePopupOnClick`](#map-closepopuponclick) option.\r\n\r\n \t\t// @option className: String = ''\r\n \t\t// A custom CSS class name to assign to the popup.\r\n \t\tclassName: ''\r\n \t},\r\n\r\n \t// @namespace Popup\r\n \t// @method openOn(map: Map): this\r\n \t// Alternative to `map.openPopup(popup)`.\r\n \t// Adds the popup to the map and closes the previous one.\r\n \topenOn: function (map) {\r\n \t\tmap = arguments.length ? map : this._source._map; // experimental, not the part of public api\r\n\r\n \t\tif (!map.hasLayer(this) && map._popup && map._popup.options.autoClose) {\r\n \t\t\tmap.removeLayer(map._popup);\r\n \t\t}\r\n \t\tmap._popup = this;\r\n\r\n \t\treturn DivOverlay.prototype.openOn.call(this, map);\r\n \t},\r\n\r\n \tonAdd: function (map) {\r\n \t\tDivOverlay.prototype.onAdd.call(this, map);\r\n\r\n \t\t// @namespace Map\r\n \t\t// @section Popup events\r\n \t\t// @event popupopen: PopupEvent\r\n \t\t// Fired when a popup is opened in the map\r\n \t\tmap.fire('popupopen', {popup: this});\r\n\r\n \t\tif (this._source) {\r\n \t\t\t// @namespace Layer\r\n \t\t\t// @section Popup events\r\n \t\t\t// @event popupopen: PopupEvent\r\n \t\t\t// Fired when a popup bound to this layer is opened\r\n \t\t\tthis._source.fire('popupopen', {popup: this}, true);\r\n \t\t\t// For non-path layers, we toggle the popup when clicking\r\n \t\t\t// again the layer, so prevent the map to reopen it.\r\n \t\t\tif (!(this._source instanceof Path)) {\r\n \t\t\t\tthis._source.on('preclick', stopPropagation);\r\n \t\t\t}\r\n \t\t}\r\n \t},\r\n\r\n \tonRemove: function (map) {\r\n \t\tDivOverlay.prototype.onRemove.call(this, map);\r\n\r\n \t\t// @namespace Map\r\n \t\t// @section Popup events\r\n \t\t// @event popupclose: PopupEvent\r\n \t\t// Fired when a popup in the map is closed\r\n \t\tmap.fire('popupclose', {popup: this});\r\n\r\n \t\tif (this._source) {\r\n \t\t\t// @namespace Layer\r\n \t\t\t// @section Popup events\r\n \t\t\t// @event popupclose: PopupEvent\r\n \t\t\t// Fired when a popup bound to this layer is closed\r\n \t\t\tthis._source.fire('popupclose', {popup: this}, true);\r\n \t\t\tif (!(this._source instanceof Path)) {\r\n \t\t\t\tthis._source.off('preclick', stopPropagation);\r\n \t\t\t}\r\n \t\t}\r\n \t},\r\n\r\n \tgetEvents: function () {\r\n \t\tvar events = DivOverlay.prototype.getEvents.call(this);\r\n\r\n \t\tif (this.options.closeOnClick !== undefined ? this.options.closeOnClick : this._map.options.closePopupOnClick) {\r\n \t\t\tevents.preclick = this.close;\r\n \t\t}\r\n\r\n \t\tif (this.options.keepInView) {\r\n \t\t\tevents.moveend = this._adjustPan;\r\n \t\t}\r\n\r\n \t\treturn events;\r\n \t},\r\n\r\n \t_initLayout: function () {\r\n \t\tvar prefix = 'leaflet-popup',\r\n \t\t container = this._container = create$1('div',\r\n \t\t\tprefix + ' ' + (this.options.className || '') +\r\n \t\t\t' leaflet-zoom-animated');\r\n\r\n \t\tvar wrapper = this._wrapper = create$1('div', prefix + '-content-wrapper', container);\r\n \t\tthis._contentNode = create$1('div', prefix + '-content', wrapper);\r\n\r\n \t\tdisableClickPropagation(container);\r\n \t\tdisableScrollPropagation(this._contentNode);\r\n \t\ton(container, 'contextmenu', stopPropagation);\r\n\r\n \t\tthis._tipContainer = create$1('div', prefix + '-tip-container', container);\r\n \t\tthis._tip = create$1('div', prefix + '-tip', this._tipContainer);\r\n\r\n \t\tif (this.options.closeButton) {\r\n \t\t\tvar closeButton = this._closeButton = create$1('a', prefix + '-close-button', container);\r\n \t\t\tcloseButton.setAttribute('role', 'button'); // overrides the implicit role=link of <a> elements #7399\r\n \t\t\tcloseButton.setAttribute('aria-label', 'Close popup');\r\n \t\t\tcloseButton.href = '#close';\r\n \t\t\tcloseButton.innerHTML = '<span aria-hidden=\"true\">×</span>';\r\n\r\n \t\t\ton(closeButton, 'click', function (ev) {\r\n \t\t\t\tpreventDefault(ev);\r\n \t\t\t\tthis.close();\r\n \t\t\t}, this);\r\n \t\t}\r\n \t},\r\n\r\n \t_updateLayout: function () {\r\n \t\tvar container = this._contentNode,\r\n \t\t style = container.style;\r\n\r\n \t\tstyle.width = '';\r\n \t\tstyle.whiteSpace = 'nowrap';\r\n\r\n \t\tvar width = container.offsetWidth;\r\n \t\twidth = Math.min(width, this.options.maxWidth);\r\n \t\twidth = Math.max(width, this.options.minWidth);\r\n\r\n \t\tstyle.width = (width + 1) + 'px';\r\n \t\tstyle.whiteSpace = '';\r\n\r\n \t\tstyle.height = '';\r\n\r\n \t\tvar height = container.offsetHeight,\r\n \t\t maxHeight = this.options.maxHeight,\r\n \t\t scrolledClass = 'leaflet-popup-scrolled';\r\n\r\n \t\tif (maxHeight && height > maxHeight) {\r\n \t\t\tstyle.height = maxHeight + 'px';\r\n \t\t\taddClass(container, scrolledClass);\r\n \t\t} else {\r\n \t\t\tremoveClass(container, scrolledClass);\r\n \t\t}\r\n\r\n \t\tthis._containerWidth = this._container.offsetWidth;\r\n \t},\r\n\r\n \t_animateZoom: function (e) {\r\n \t\tvar pos = this._map._latLngToNewLayerPoint(this._latlng, e.zoom, e.center),\r\n \t\t anchor = this._getAnchor();\r\n \t\tsetPosition(this._container, pos.add(anchor));\r\n \t},\r\n\r\n \t_adjustPan: function () {\r\n \t\tif (!this.options.autoPan) { return; }\r\n \t\tif (this._map._panAnim) { this._map._panAnim.stop(); }\r\n\r\n \t\t// We can endlessly recurse if keepInView is set and the view resets.\r\n \t\t// Let's guard against that by exiting early if we're responding to our own autopan.\r\n \t\tif (this._autopanning) {\r\n \t\t\tthis._autopanning = false;\r\n \t\t\treturn;\r\n \t\t}\r\n\r\n \t\tvar map = this._map,\r\n \t\t marginBottom = parseInt(getStyle(this._container, 'marginBottom'), 10) || 0,\r\n \t\t containerHeight = this._container.offsetHeight + marginBottom,\r\n \t\t containerWidth = this._containerWidth,\r\n \t\t layerPos = new Point(this._containerLeft, -containerHeight - this._containerBottom);\r\n\r\n \t\tlayerPos._add(getPosition(this._container));\r\n\r\n \t\tvar containerPos = map.layerPointToContainerPoint(layerPos),\r\n \t\t padding = toPoint(this.options.autoPanPadding),\r\n \t\t paddingTL = toPoint(this.options.autoPanPaddingTopLeft || padding),\r\n \t\t paddingBR = toPoint(this.options.autoPanPaddingBottomRight || padding),\r\n \t\t size = map.getSize(),\r\n \t\t dx = 0,\r\n \t\t dy = 0;\r\n\r\n \t\tif (containerPos.x + containerWidth + paddingBR.x > size.x) { // right\r\n \t\t\tdx = containerPos.x + containerWidth - size.x + paddingBR.x;\r\n \t\t}\r\n \t\tif (containerPos.x - dx - paddingTL.x < 0) { // left\r\n \t\t\tdx = containerPos.x - paddingTL.x;\r\n \t\t}\r\n \t\tif (containerPos.y + containerHeight + paddingBR.y > size.y) { // bottom\r\n \t\t\tdy = containerPos.y + containerHeight - size.y + paddingBR.y;\r\n \t\t}\r\n \t\tif (containerPos.y - dy - paddingTL.y < 0) { // top\r\n \t\t\tdy = containerPos.y - paddingTL.y;\r\n \t\t}\r\n\r\n \t\t// @namespace Map\r\n \t\t// @section Popup events\r\n \t\t// @event autopanstart: Event\r\n \t\t// Fired when the map starts autopanning when opening a popup.\r\n \t\tif (dx || dy) {\r\n \t\t\t// Track that we're autopanning, as this function will be re-ran on moveend\r\n \t\t\tif (this.options.keepInView) {\r\n \t\t\t\tthis._autopanning = true;\r\n \t\t\t}\r\n\r\n \t\t\tmap\r\n \t\t\t .fire('autopanstart')\r\n \t\t\t .panBy([dx, dy]);\r\n \t\t}\r\n \t},\r\n\r\n \t_getAnchor: function () {\r\n \t\t// Where should we anchor the popup on the source layer?\r\n \t\treturn toPoint(this._source && this._source._getPopupAnchor ? this._source._getPopupAnchor() : [0, 0]);\r\n \t}\r\n\r\n });\r\n\r\n // @namespace Popup\r\n // @factory L.popup(options?: Popup options, source?: Layer)\r\n // Instantiates a `Popup` object given an optional `options` object that describes its appearance and location and an optional `source` object that is used to tag the popup with a reference to the Layer to which it refers.\r\n // @alternative\r\n // @factory L.popup(latlng: LatLng, options?: Popup options)\r\n // Instantiates a `Popup` object given `latlng` where the popup will open and an optional `options` object that describes its appearance and location.\r\n var popup = function (options, source) {\r\n \treturn new Popup(options, source);\r\n };\r\n\r\n\r\n /* @namespace Map\r\n * @section Interaction Options\r\n * @option closePopupOnClick: Boolean = true\r\n * Set it to `false` if you don't want popups to close when user clicks the map.\r\n */\r\n Map.mergeOptions({\r\n \tclosePopupOnClick: true\r\n });\r\n\r\n\r\n // @namespace Map\r\n // @section Methods for Layers and Controls\r\n Map.include({\r\n \t// @method openPopup(popup: Popup): this\r\n \t// Opens the specified popup while closing the previously opened (to make sure only one is opened at one time for usability).\r\n \t// @alternative\r\n \t// @method openPopup(content: String|HTMLElement, latlng: LatLng, options?: Popup options): this\r\n \t// Creates a popup with the specified content and options and opens it in the given point on a map.\r\n \topenPopup: function (popup, latlng, options) {\r\n \t\tthis._initOverlay(Popup, popup, latlng, options)\r\n \t\t .openOn(this);\r\n\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method closePopup(popup?: Popup): this\r\n \t// Closes the popup previously opened with [openPopup](#map-openpopup) (or the given one).\r\n \tclosePopup: function (popup) {\r\n \t\tpopup = arguments.length ? popup : this._popup;\r\n \t\tif (popup) {\r\n \t\t\tpopup.close();\r\n \t\t}\r\n \t\treturn this;\r\n \t}\r\n });\r\n\r\n /*\r\n * @namespace Layer\r\n * @section Popup methods example\r\n *\r\n * All layers share a set of methods convenient for binding popups to it.\r\n *\r\n * ```js\r\n * var layer = L.Polygon(latlngs).bindPopup('Hi There!').addTo(map);\r\n * layer.openPopup();\r\n * layer.closePopup();\r\n * ```\r\n *\r\n * Popups will also be automatically opened when the layer is clicked on and closed when the layer is removed from the map or another popup is opened.\r\n */\r\n\r\n // @section Popup methods\r\n Layer.include({\r\n\r\n \t// @method bindPopup(content: String|HTMLElement|Function|Popup, options?: Popup options): this\r\n \t// Binds a popup to the layer with the passed `content` and sets up the\r\n \t// necessary event listeners. If a `Function` is passed it will receive\r\n \t// the layer as the first argument and should return a `String` or `HTMLElement`.\r\n \tbindPopup: function (content, options) {\r\n \t\tthis._popup = this._initOverlay(Popup, this._popup, content, options);\r\n \t\tif (!this._popupHandlersAdded) {\r\n \t\t\tthis.on({\r\n \t\t\t\tclick: this._openPopup,\r\n \t\t\t\tkeypress: this._onKeyPress,\r\n \t\t\t\tremove: this.closePopup,\r\n \t\t\t\tmove: this._movePopup\r\n \t\t\t});\r\n \t\t\tthis._popupHandlersAdded = true;\r\n \t\t}\r\n\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method unbindPopup(): this\r\n \t// Removes the popup previously bound with `bindPopup`.\r\n \tunbindPopup: function () {\r\n \t\tif (this._popup) {\r\n \t\t\tthis.off({\r\n \t\t\t\tclick: this._openPopup,\r\n \t\t\t\tkeypress: this._onKeyPress,\r\n \t\t\t\tremove: this.closePopup,\r\n \t\t\t\tmove: this._movePopup\r\n \t\t\t});\r\n \t\t\tthis._popupHandlersAdded = false;\r\n \t\t\tthis._popup = null;\r\n \t\t}\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method openPopup(latlng?: LatLng): this\r\n \t// Opens the bound popup at the specified `latlng` or at the default popup anchor if no `latlng` is passed.\r\n \topenPopup: function (latlng) {\r\n \t\tif (this._popup) {\r\n \t\t\tif (!(this instanceof FeatureGroup)) {\r\n \t\t\t\tthis._popup._source = this;\r\n \t\t\t}\r\n \t\t\tif (this._popup._prepareOpen(latlng || this._latlng)) {\r\n \t\t\t\t// open the popup on the map\r\n \t\t\t\tthis._popup.openOn(this._map);\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method closePopup(): this\r\n \t// Closes the popup bound to this layer if it is open.\r\n \tclosePopup: function () {\r\n \t\tif (this._popup) {\r\n \t\t\tthis._popup.close();\r\n \t\t}\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method togglePopup(): this\r\n \t// Opens or closes the popup bound to this layer depending on its current state.\r\n \ttogglePopup: function () {\r\n \t\tif (this._popup) {\r\n \t\t\tthis._popup.toggle(this);\r\n \t\t}\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method isPopupOpen(): boolean\r\n \t// Returns `true` if the popup bound to this layer is currently open.\r\n \tisPopupOpen: function () {\r\n \t\treturn (this._popup ? this._popup.isOpen() : false);\r\n \t},\r\n\r\n \t// @method setPopupContent(content: String|HTMLElement|Popup): this\r\n \t// Sets the content of the popup bound to this layer.\r\n \tsetPopupContent: function (content) {\r\n \t\tif (this._popup) {\r\n \t\t\tthis._popup.setContent(content);\r\n \t\t}\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method getPopup(): Popup\r\n \t// Returns the popup bound to this layer.\r\n \tgetPopup: function () {\r\n \t\treturn this._popup;\r\n \t},\r\n\r\n \t_openPopup: function (e) {\r\n \t\tif (!this._popup || !this._map) {\r\n \t\t\treturn;\r\n \t\t}\r\n \t\t// prevent map click\r\n \t\tstop(e);\r\n\r\n \t\tvar target = e.layer || e.target;\r\n \t\tif (this._popup._source === target && !(target instanceof Path)) {\r\n \t\t\t// treat it like a marker and figure out\r\n \t\t\t// if we should toggle it open/closed\r\n \t\t\tif (this._map.hasLayer(this._popup)) {\r\n \t\t\t\tthis.closePopup();\r\n \t\t\t} else {\r\n \t\t\t\tthis.openPopup(e.latlng);\r\n \t\t\t}\r\n \t\t\treturn;\r\n \t\t}\r\n \t\tthis._popup._source = target;\r\n \t\tthis.openPopup(e.latlng);\r\n \t},\r\n\r\n \t_movePopup: function (e) {\r\n \t\tthis._popup.setLatLng(e.latlng);\r\n \t},\r\n\r\n \t_onKeyPress: function (e) {\r\n \t\tif (e.originalEvent.keyCode === 13) {\r\n \t\t\tthis._openPopup(e);\r\n \t\t}\r\n \t}\r\n });\n\n /*\n * @class Tooltip\n * @inherits DivOverlay\n * @aka L.Tooltip\n * Used to display small texts on top of map layers.\n *\n * @example\n * If you want to just bind a tooltip to marker:\n *\n * ```js\n * marker.bindTooltip(\"my tooltip text\").openTooltip();\n * ```\n * Path overlays like polylines also have a `bindTooltip` method.\n *\n * A tooltip can be also standalone:\n *\n * ```js\n * var tooltip = L.tooltip()\n * \t.setLatLng(latlng)\n * \t.setContent('Hello world!<br />This is a nice tooltip.')\n * \t.addTo(map);\n * ```\n * or\n * ```js\n * var tooltip = L.tooltip(latlng, {content: 'Hello world!<br />This is a nice tooltip.'})\n * \t.addTo(map);\n * ```\n *\n *\n * Note about tooltip offset. Leaflet takes two options in consideration\n * for computing tooltip offsetting:\n * - the `offset` Tooltip option: it defaults to [0, 0], and it's specific to one tooltip.\n * Add a positive x offset to move the tooltip to the right, and a positive y offset to\n * move it to the bottom. Negatives will move to the left and top.\n * - the `tooltipAnchor` Icon option: this will only be considered for Marker. You\n * should adapt this value if you use a custom icon.\n */\n\n\n // @namespace Tooltip\n var Tooltip = DivOverlay.extend({\n\n \t// @section\n \t// @aka Tooltip options\n \toptions: {\n \t\t// @option pane: String = 'tooltipPane'\n \t\t// `Map pane` where the tooltip will be added.\n \t\tpane: 'tooltipPane',\n\n \t\t// @option offset: Point = Point(0, 0)\n \t\t// Optional offset of the tooltip position.\n \t\toffset: [0, 0],\n\n \t\t// @option direction: String = 'auto'\n \t\t// Direction where to open the tooltip. Possible values are: `right`, `left`,\n \t\t// `top`, `bottom`, `center`, `auto`.\n \t\t// `auto` will dynamically switch between `right` and `left` according to the tooltip\n \t\t// position on the map.\n \t\tdirection: 'auto',\n\n \t\t// @option permanent: Boolean = false\n \t\t// Whether to open the tooltip permanently or only on mouseover.\n \t\tpermanent: false,\n\n \t\t// @option sticky: Boolean = false\n \t\t// If true, the tooltip will follow the mouse instead of being fixed at the feature center.\n \t\tsticky: false,\n\n \t\t// @option opacity: Number = 0.9\n \t\t// Tooltip container opacity.\n \t\topacity: 0.9\n \t},\n\n \tonAdd: function (map) {\n \t\tDivOverlay.prototype.onAdd.call(this, map);\n \t\tthis.setOpacity(this.options.opacity);\n\n \t\t// @namespace Map\n \t\t// @section Tooltip events\n \t\t// @event tooltipopen: TooltipEvent\n \t\t// Fired when a tooltip is opened in the map.\n \t\tmap.fire('tooltipopen', {tooltip: this});\n\n \t\tif (this._source) {\n \t\t\tthis.addEventParent(this._source);\n\n \t\t\t// @namespace Layer\n \t\t\t// @section Tooltip events\n \t\t\t// @event tooltipopen: TooltipEvent\n \t\t\t// Fired when a tooltip bound to this layer is opened.\n \t\t\tthis._source.fire('tooltipopen', {tooltip: this}, true);\n \t\t}\n \t},\n\n \tonRemove: function (map) {\n \t\tDivOverlay.prototype.onRemove.call(this, map);\n\n \t\t// @namespace Map\n \t\t// @section Tooltip events\n \t\t// @event tooltipclose: TooltipEvent\n \t\t// Fired when a tooltip in the map is closed.\n \t\tmap.fire('tooltipclose', {tooltip: this});\n\n \t\tif (this._source) {\n \t\t\tthis.removeEventParent(this._source);\n\n \t\t\t// @namespace Layer\n \t\t\t// @section Tooltip events\n \t\t\t// @event tooltipclose: TooltipEvent\n \t\t\t// Fired when a tooltip bound to this layer is closed.\n \t\t\tthis._source.fire('tooltipclose', {tooltip: this}, true);\n \t\t}\n \t},\n\n \tgetEvents: function () {\n \t\tvar events = DivOverlay.prototype.getEvents.call(this);\n\n \t\tif (!this.options.permanent) {\n \t\t\tevents.preclick = this.close;\n \t\t}\n\n \t\treturn events;\n \t},\n\n \t_initLayout: function () {\n \t\tvar prefix = 'leaflet-tooltip',\n \t\t className = prefix + ' ' + (this.options.className || '') + ' leaflet-zoom-' + (this._zoomAnimated ? 'animated' : 'hide');\n\n \t\tthis._contentNode = this._container = create$1('div', className);\n\n \t\tthis._container.setAttribute('role', 'tooltip');\n \t\tthis._container.setAttribute('id', 'leaflet-tooltip-' + stamp(this));\n \t},\n\n \t_updateLayout: function () {},\n\n \t_adjustPan: function () {},\n\n \t_setPosition: function (pos) {\n \t\tvar subX, subY,\n \t\t map = this._map,\n \t\t container = this._container,\n \t\t centerPoint = map.latLngToContainerPoint(map.getCenter()),\n \t\t tooltipPoint = map.layerPointToContainerPoint(pos),\n \t\t direction = this.options.direction,\n \t\t tooltipWidth = container.offsetWidth,\n \t\t tooltipHeight = container.offsetHeight,\n \t\t offset = toPoint(this.options.offset),\n \t\t anchor = this._getAnchor();\n\n \t\tif (direction === 'top') {\n \t\t\tsubX = tooltipWidth / 2;\n \t\t\tsubY = tooltipHeight;\n \t\t} else if (direction === 'bottom') {\n \t\t\tsubX = tooltipWidth / 2;\n \t\t\tsubY = 0;\n \t\t} else if (direction === 'center') {\n \t\t\tsubX = tooltipWidth / 2;\n \t\t\tsubY = tooltipHeight / 2;\n \t\t} else if (direction === 'right') {\n \t\t\tsubX = 0;\n \t\t\tsubY = tooltipHeight / 2;\n \t\t} else if (direction === 'left') {\n \t\t\tsubX = tooltipWidth;\n \t\t\tsubY = tooltipHeight / 2;\n \t\t} else if (tooltipPoint.x < centerPoint.x) {\n \t\t\tdirection = 'right';\n \t\t\tsubX = 0;\n \t\t\tsubY = tooltipHeight / 2;\n \t\t} else {\n \t\t\tdirection = 'left';\n \t\t\tsubX = tooltipWidth + (offset.x + anchor.x) * 2;\n \t\t\tsubY = tooltipHeight / 2;\n \t\t}\n\n \t\tpos = pos.subtract(toPoint(subX, subY, true)).add(offset).add(anchor);\n\n \t\tremoveClass(container, 'leaflet-tooltip-right');\n \t\tremoveClass(container, 'leaflet-tooltip-left');\n \t\tremoveClass(container, 'leaflet-tooltip-top');\n \t\tremoveClass(container, 'leaflet-tooltip-bottom');\n \t\taddClass(container, 'leaflet-tooltip-' + direction);\n \t\tsetPosition(container, pos);\n \t},\n\n \t_updatePosition: function () {\n \t\tvar pos = this._map.latLngToLayerPoint(this._latlng);\n \t\tthis._setPosition(pos);\n \t},\n\n \tsetOpacity: function (opacity) {\n \t\tthis.options.opacity = opacity;\n\n \t\tif (this._container) {\n \t\t\tsetOpacity(this._container, opacity);\n \t\t}\n \t},\n\n \t_animateZoom: function (e) {\n \t\tvar pos = this._map._latLngToNewLayerPoint(this._latlng, e.zoom, e.center);\n \t\tthis._setPosition(pos);\n \t},\n\n \t_getAnchor: function () {\n \t\t// Where should we anchor the tooltip on the source layer?\n \t\treturn toPoint(this._source && this._source._getTooltipAnchor && !this.options.sticky ? this._source._getTooltipAnchor() : [0, 0]);\n \t}\n\n });\n\n // @namespace Tooltip\n // @factory L.tooltip(options?: Tooltip options, source?: Layer)\n // Instantiates a `Tooltip` object given an optional `options` object that describes its appearance and location and an optional `source` object that is used to tag the tooltip with a reference to the Layer to which it refers.\n // @alternative\n // @factory L.tooltip(latlng: LatLng, options?: Tooltip options)\n // Instantiates a `Tooltip` object given `latlng` where the tooltip will open and an optional `options` object that describes its appearance and location.\n var tooltip = function (options, source) {\n \treturn new Tooltip(options, source);\n };\n\n // @namespace Map\n // @section Methods for Layers and Controls\n Map.include({\n\n \t// @method openTooltip(tooltip: Tooltip): this\n \t// Opens the specified tooltip.\n \t// @alternative\n \t// @method openTooltip(content: String|HTMLElement, latlng: LatLng, options?: Tooltip options): this\n \t// Creates a tooltip with the specified content and options and open it.\n \topenTooltip: function (tooltip, latlng, options) {\n \t\tthis._initOverlay(Tooltip, tooltip, latlng, options)\n \t\t .openOn(this);\n\n \t\treturn this;\n \t},\n\n \t// @method closeTooltip(tooltip: Tooltip): this\n \t// Closes the tooltip given as parameter.\n \tcloseTooltip: function (tooltip) {\n \t\ttooltip.close();\n \t\treturn this;\n \t}\n\n });\n\n /*\n * @namespace Layer\n * @section Tooltip methods example\n *\n * All layers share a set of methods convenient for binding tooltips to it.\n *\n * ```js\n * var layer = L.Polygon(latlngs).bindTooltip('Hi There!').addTo(map);\n * layer.openTooltip();\n * layer.closeTooltip();\n * ```\n */\n\n // @section Tooltip methods\n Layer.include({\n\n \t// @method bindTooltip(content: String|HTMLElement|Function|Tooltip, options?: Tooltip options): this\n \t// Binds a tooltip to the layer with the passed `content` and sets up the\n \t// necessary event listeners. If a `Function` is passed it will receive\n \t// the layer as the first argument and should return a `String` or `HTMLElement`.\n \tbindTooltip: function (content, options) {\n\n \t\tif (this._tooltip && this.isTooltipOpen()) {\n \t\t\tthis.unbindTooltip();\n \t\t}\n\n \t\tthis._tooltip = this._initOverlay(Tooltip, this._tooltip, content, options);\n \t\tthis._initTooltipInteractions();\n\n \t\tif (this._tooltip.options.permanent && this._map && this._map.hasLayer(this)) {\n \t\t\tthis.openTooltip();\n \t\t}\n\n \t\treturn this;\n \t},\n\n \t// @method unbindTooltip(): this\n \t// Removes the tooltip previously bound with `bindTooltip`.\n \tunbindTooltip: function () {\n \t\tif (this._tooltip) {\n \t\t\tthis._initTooltipInteractions(true);\n \t\t\tthis.closeTooltip();\n \t\t\tthis._tooltip = null;\n \t\t}\n \t\treturn this;\n \t},\n\n \t_initTooltipInteractions: function (remove) {\n \t\tif (!remove && this._tooltipHandlersAdded) { return; }\n \t\tvar onOff = remove ? 'off' : 'on',\n \t\t events = {\n \t\t\tremove: this.closeTooltip,\n \t\t\tmove: this._moveTooltip\n \t\t };\n \t\tif (!this._tooltip.options.permanent) {\n \t\t\tevents.mouseover = this._openTooltip;\n \t\t\tevents.mouseout = this.closeTooltip;\n \t\t\tevents.click = this._openTooltip;\n \t\t\tif (this._map) {\n \t\t\t\tthis._addFocusListeners();\n \t\t\t} else {\n \t\t\t\tevents.add = this._addFocusListeners;\n \t\t\t}\n \t\t} else {\n \t\t\tevents.add = this._openTooltip;\n \t\t}\n \t\tif (this._tooltip.options.sticky) {\n \t\t\tevents.mousemove = this._moveTooltip;\n \t\t}\n \t\tthis[onOff](events);\n \t\tthis._tooltipHandlersAdded = !remove;\n \t},\n\n \t// @method openTooltip(latlng?: LatLng): this\n \t// Opens the bound tooltip at the specified `latlng` or at the default tooltip anchor if no `latlng` is passed.\n \topenTooltip: function (latlng) {\n \t\tif (this._tooltip) {\n \t\t\tif (!(this instanceof FeatureGroup)) {\n \t\t\t\tthis._tooltip._source = this;\n \t\t\t}\n \t\t\tif (this._tooltip._prepareOpen(latlng)) {\n \t\t\t\t// open the tooltip on the map\n \t\t\t\tthis._tooltip.openOn(this._map);\n\n \t\t\t\tif (this.getElement) {\n \t\t\t\t\tthis._setAriaDescribedByOnLayer(this);\n \t\t\t\t} else if (this.eachLayer) {\n \t\t\t\t\tthis.eachLayer(this._setAriaDescribedByOnLayer, this);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\treturn this;\n \t},\n\n \t// @method closeTooltip(): this\n \t// Closes the tooltip bound to this layer if it is open.\n \tcloseTooltip: function () {\n \t\tif (this._tooltip) {\n \t\t\treturn this._tooltip.close();\n \t\t}\n \t},\n\n \t// @method toggleTooltip(): this\n \t// Opens or closes the tooltip bound to this layer depending on its current state.\n \ttoggleTooltip: function () {\n \t\tif (this._tooltip) {\n \t\t\tthis._tooltip.toggle(this);\n \t\t}\n \t\treturn this;\n \t},\n\n \t// @method isTooltipOpen(): boolean\n \t// Returns `true` if the tooltip bound to this layer is currently open.\n \tisTooltipOpen: function () {\n \t\treturn this._tooltip.isOpen();\n \t},\n\n \t// @method setTooltipContent(content: String|HTMLElement|Tooltip): this\n \t// Sets the content of the tooltip bound to this layer.\n \tsetTooltipContent: function (content) {\n \t\tif (this._tooltip) {\n \t\t\tthis._tooltip.setContent(content);\n \t\t}\n \t\treturn this;\n \t},\n\n \t// @method getTooltip(): Tooltip\n \t// Returns the tooltip bound to this layer.\n \tgetTooltip: function () {\n \t\treturn this._tooltip;\n \t},\n\n \t_addFocusListeners: function () {\n \t\tif (this.getElement) {\n \t\t\tthis._addFocusListenersOnLayer(this);\n \t\t} else if (this.eachLayer) {\n \t\t\tthis.eachLayer(this._addFocusListenersOnLayer, this);\n \t\t}\n \t},\n\n \t_addFocusListenersOnLayer: function (layer) {\n \t\tvar el = layer.getElement();\n \t\tif (el) {\n \t\t\ton(el, 'focus', function () {\n \t\t\t\tthis._tooltip._source = layer;\n \t\t\t\tthis.openTooltip();\n \t\t\t}, this);\n \t\t\ton(el, 'blur', this.closeTooltip, this);\n \t\t}\n \t},\n\n \t_setAriaDescribedByOnLayer: function (layer) {\n \t\tvar el = layer.getElement();\n \t\tif (el) {\n \t\t\tel.setAttribute('aria-describedby', this._tooltip._container.id);\n \t\t}\n \t},\n\n\n \t_openTooltip: function (e) {\n \t\tif (!this._tooltip || !this._map || (this._map.dragging && this._map.dragging.moving())) {\n \t\t\treturn;\n \t\t}\n \t\tthis._tooltip._source = e.layer || e.target;\n\n \t\tthis.openTooltip(this._tooltip.options.sticky ? e.latlng : undefined);\n \t},\n\n \t_moveTooltip: function (e) {\n \t\tvar latlng = e.latlng, containerPoint, layerPoint;\n \t\tif (this._tooltip.options.sticky && e.originalEvent) {\n \t\t\tcontainerPoint = this._map.mouseEventToContainerPoint(e.originalEvent);\n \t\t\tlayerPoint = this._map.containerPointToLayerPoint(containerPoint);\n \t\t\tlatlng = this._map.layerPointToLatLng(layerPoint);\n \t\t}\n \t\tthis._tooltip.setLatLng(latlng);\n \t}\n });\n\n /*\n * @class DivIcon\n * @aka L.DivIcon\n * @inherits Icon\n *\n * Represents a lightweight icon for markers that uses a simple `<div>`\n * element instead of an image. Inherits from `Icon` but ignores the `iconUrl` and shadow options.\n *\n * @example\n * ```js\n * var myIcon = L.divIcon({className: 'my-div-icon'});\n * // you can set .my-div-icon styles in CSS\n *\n * L.marker([50.505, 30.57], {icon: myIcon}).addTo(map);\n * ```\n *\n * By default, it has a 'leaflet-div-icon' CSS class and is styled as a little white square with a shadow.\n */\n\n var DivIcon = Icon.extend({\n \toptions: {\n \t\t// @section\n \t\t// @aka DivIcon options\n \t\ticonSize: [12, 12], // also can be set through CSS\n\n \t\t// iconAnchor: (Point),\n \t\t// popupAnchor: (Point),\n\n \t\t// @option html: String|HTMLElement = ''\n \t\t// Custom HTML code to put inside the div element, empty by default. Alternatively,\n \t\t// an instance of `HTMLElement`.\n \t\thtml: false,\n\n \t\t// @option bgPos: Point = [0, 0]\n \t\t// Optional relative position of the background, in pixels\n \t\tbgPos: null,\n\n \t\tclassName: 'leaflet-div-icon'\n \t},\n\n \tcreateIcon: function (oldIcon) {\n \t\tvar div = (oldIcon && oldIcon.tagName === 'DIV') ? oldIcon : document.createElement('div'),\n \t\t options = this.options;\n\n \t\tif (options.html instanceof Element) {\n \t\t\tempty(div);\n \t\t\tdiv.appendChild(options.html);\n \t\t} else {\n \t\t\tdiv.innerHTML = options.html !== false ? options.html : '';\n \t\t}\n\n \t\tif (options.bgPos) {\n \t\t\tvar bgPos = toPoint(options.bgPos);\n \t\t\tdiv.style.backgroundPosition = (-bgPos.x) + 'px ' + (-bgPos.y) + 'px';\n \t\t}\n \t\tthis._setIconStyles(div, 'icon');\n\n \t\treturn div;\n \t},\n\n \tcreateShadow: function () {\n \t\treturn null;\n \t}\n });\n\n // @factory L.divIcon(options: DivIcon options)\n // Creates a `DivIcon` instance with the given options.\n function divIcon(options) {\n \treturn new DivIcon(options);\n }\n\n Icon.Default = IconDefault;\n\n /*\n * @class GridLayer\n * @inherits Layer\n * @aka L.GridLayer\n *\n * Generic class for handling a tiled grid of HTML elements. This is the base class for all tile layers and replaces `TileLayer.Canvas`.\n * GridLayer can be extended to create a tiled grid of HTML elements like `<canvas>`, `<img>` or `<div>`. GridLayer will handle creating and animating these DOM elements for you.\n *\n *\n * @section Synchronous usage\n * @example\n *\n * To create a custom layer, extend GridLayer and implement the `createTile()` method, which will be passed a `Point` object with the `x`, `y`, and `z` (zoom level) coordinates to draw your tile.\n *\n * ```js\n * var CanvasLayer = L.GridLayer.extend({\n * createTile: function(coords){\n * // create a <canvas> element for drawing\n * var tile = L.DomUtil.create('canvas', 'leaflet-tile');\n *\n * // setup tile width and height according to the options\n * var size = this.getTileSize();\n * tile.width = size.x;\n * tile.height = size.y;\n *\n * // get a canvas context and draw something on it using coords.x, coords.y and coords.z\n * var ctx = tile.getContext('2d');\n *\n * // return the tile so it can be rendered on screen\n * return tile;\n * }\n * });\n * ```\n *\n * @section Asynchronous usage\n * @example\n *\n * Tile creation can also be asynchronous, this is useful when using a third-party drawing library. Once the tile is finished drawing it can be passed to the `done()` callback.\n *\n * ```js\n * var CanvasLayer = L.GridLayer.extend({\n * createTile: function(coords, done){\n * var error;\n *\n * // create a <canvas> element for drawing\n * var tile = L.DomUtil.create('canvas', 'leaflet-tile');\n *\n * // setup tile width and height according to the options\n * var size = this.getTileSize();\n * tile.width = size.x;\n * tile.height = size.y;\n *\n * // draw something asynchronously and pass the tile to the done() callback\n * setTimeout(function() {\n * done(error, tile);\n * }, 1000);\n *\n * return tile;\n * }\n * });\n * ```\n *\n * @section\n */\n\n\n var GridLayer = Layer.extend({\n\n \t// @section\n \t// @aka GridLayer options\n \toptions: {\n \t\t// @option tileSize: Number|Point = 256\n \t\t// Width and height of tiles in the grid. Use a number if width and height are equal, or `L.point(width, height)` otherwise.\n \t\ttileSize: 256,\n\n \t\t// @option opacity: Number = 1.0\n \t\t// Opacity of the tiles. Can be used in the `createTile()` function.\n \t\topacity: 1,\n\n \t\t// @option updateWhenIdle: Boolean = (depends)\n \t\t// Load new tiles only when panning ends.\n \t\t// `true` by default on mobile browsers, in order to avoid too many requests and keep smooth navigation.\n \t\t// `false` otherwise in order to display new tiles _during_ panning, since it is easy to pan outside the\n \t\t// [`keepBuffer`](#gridlayer-keepbuffer) option in desktop browsers.\n \t\tupdateWhenIdle: Browser.mobile,\n\n \t\t// @option updateWhenZooming: Boolean = true\n \t\t// By default, a smooth zoom animation (during a [touch zoom](#map-touchzoom) or a [`flyTo()`](#map-flyto)) will update grid layers every integer zoom level. Setting this option to `false` will update the grid layer only when the smooth animation ends.\n \t\tupdateWhenZooming: true,\n\n \t\t// @option updateInterval: Number = 200\n \t\t// Tiles will not update more than once every `updateInterval` milliseconds when panning.\n \t\tupdateInterval: 200,\n\n \t\t// @option zIndex: Number = 1\n \t\t// The explicit zIndex of the tile layer.\n \t\tzIndex: 1,\n\n \t\t// @option bounds: LatLngBounds = undefined\n \t\t// If set, tiles will only be loaded inside the set `LatLngBounds`.\n \t\tbounds: null,\n\n \t\t// @option minZoom: Number = 0\n \t\t// The minimum zoom level down to which this layer will be displayed (inclusive).\n \t\tminZoom: 0,\n\n \t\t// @option maxZoom: Number = undefined\n \t\t// The maximum zoom level up to which this layer will be displayed (inclusive).\n \t\tmaxZoom: undefined,\n\n \t\t// @option maxNativeZoom: Number = undefined\n \t\t// Maximum zoom number the tile source has available. If it is specified,\n \t\t// the tiles on all zoom levels higher than `maxNativeZoom` will be loaded\n \t\t// from `maxNativeZoom` level and auto-scaled.\n \t\tmaxNativeZoom: undefined,\n\n \t\t// @option minNativeZoom: Number = undefined\n \t\t// Minimum zoom number the tile source has available. If it is specified,\n \t\t// the tiles on all zoom levels lower than `minNativeZoom` will be loaded\n \t\t// from `minNativeZoom` level and auto-scaled.\n \t\tminNativeZoom: undefined,\n\n \t\t// @option noWrap: Boolean = false\n \t\t// Whether the layer is wrapped around the antimeridian. If `true`, the\n \t\t// GridLayer will only be displayed once at low zoom levels. Has no\n \t\t// effect when the [map CRS](#map-crs) doesn't wrap around. Can be used\n \t\t// in combination with [`bounds`](#gridlayer-bounds) to prevent requesting\n \t\t// tiles outside the CRS limits.\n \t\tnoWrap: false,\n\n \t\t// @option pane: String = 'tilePane'\n \t\t// `Map pane` where the grid layer will be added.\n \t\tpane: 'tilePane',\n\n \t\t// @option className: String = ''\n \t\t// A custom class name to assign to the tile layer. Empty by default.\n \t\tclassName: '',\n\n \t\t// @option keepBuffer: Number = 2\n \t\t// When panning the map, keep this many rows and columns of tiles before unloading them.\n \t\tkeepBuffer: 2\n \t},\n\n \tinitialize: function (options) {\n \t\tsetOptions(this, options);\n \t},\n\n \tonAdd: function () {\n \t\tthis._initContainer();\n\n \t\tthis._levels = {};\n \t\tthis._tiles = {};\n\n \t\tthis._resetView(); // implicit _update() call\n \t},\n\n \tbeforeAdd: function (map) {\n \t\tmap._addZoomLimit(this);\n \t},\n\n \tonRemove: function (map) {\n \t\tthis._removeAllTiles();\n \t\tremove(this._container);\n \t\tmap._removeZoomLimit(this);\n \t\tthis._container = null;\n \t\tthis._tileZoom = undefined;\n \t},\n\n \t// @method bringToFront: this\n \t// Brings the tile layer to the top of all tile layers.\n \tbringToFront: function () {\n \t\tif (this._map) {\n \t\t\ttoFront(this._container);\n \t\t\tthis._setAutoZIndex(Math.max);\n \t\t}\n \t\treturn this;\n \t},\n\n \t// @method bringToBack: this\n \t// Brings the tile layer to the bottom of all tile layers.\n \tbringToBack: function () {\n \t\tif (this._map) {\n \t\t\ttoBack(this._container);\n \t\t\tthis._setAutoZIndex(Math.min);\n \t\t}\n \t\treturn this;\n \t},\n\n \t// @method getContainer: HTMLElement\n \t// Returns the HTML element that contains the tiles for this layer.\n \tgetContainer: function () {\n \t\treturn this._container;\n \t},\n\n \t// @method setOpacity(opacity: Number): this\n \t// Changes the [opacity](#gridlayer-opacity) of the grid layer.\n \tsetOpacity: function (opacity) {\n \t\tthis.options.opacity = opacity;\n \t\tthis._updateOpacity();\n \t\treturn this;\n \t},\n\n \t// @method setZIndex(zIndex: Number): this\n \t// Changes the [zIndex](#gridlayer-zindex) of the grid layer.\n \tsetZIndex: function (zIndex) {\n \t\tthis.options.zIndex = zIndex;\n \t\tthis._updateZIndex();\n\n \t\treturn this;\n \t},\n\n \t// @method isLoading: Boolean\n \t// Returns `true` if any tile in the grid layer has not finished loading.\n \tisLoading: function () {\n \t\treturn this._loading;\n \t},\n\n \t// @method redraw: this\n \t// Causes the layer to clear all the tiles and request them again.\n \tredraw: function () {\n \t\tif (this._map) {\n \t\t\tthis._removeAllTiles();\n \t\t\tvar tileZoom = this._clampZoom(this._map.getZoom());\n \t\t\tif (tileZoom !== this._tileZoom) {\n \t\t\t\tthis._tileZoom = tileZoom;\n \t\t\t\tthis._updateLevels();\n \t\t\t}\n \t\t\tthis._update();\n \t\t}\n \t\treturn this;\n \t},\n\n \tgetEvents: function () {\n \t\tvar events = {\n \t\t\tviewprereset: this._invalidateAll,\n \t\t\tviewreset: this._resetView,\n \t\t\tzoom: this._resetView,\n \t\t\tmoveend: this._onMoveEnd\n \t\t};\n\n \t\tif (!this.options.updateWhenIdle) {\n \t\t\t// update tiles on move, but not more often than once per given interval\n \t\t\tif (!this._onMove) {\n \t\t\t\tthis._onMove = throttle(this._onMoveEnd, this.options.updateInterval, this);\n \t\t\t}\n\n \t\t\tevents.move = this._onMove;\n \t\t}\n\n \t\tif (this._zoomAnimated) {\n \t\t\tevents.zoomanim = this._animateZoom;\n \t\t}\n\n \t\treturn events;\n \t},\n\n \t// @section Extension methods\n \t// Layers extending `GridLayer` shall reimplement the following method.\n \t// @method createTile(coords: Object, done?: Function): HTMLElement\n \t// Called only internally, must be overridden by classes extending `GridLayer`.\n \t// Returns the `HTMLElement` corresponding to the given `coords`. If the `done` callback\n \t// is specified, it must be called when the tile has finished loading and drawing.\n \tcreateTile: function () {\n \t\treturn document.createElement('div');\n \t},\n\n \t// @section\n \t// @method getTileSize: Point\n \t// Normalizes the [tileSize option](#gridlayer-tilesize) into a point. Used by the `createTile()` method.\n \tgetTileSize: function () {\n \t\tvar s = this.options.tileSize;\n \t\treturn s instanceof Point ? s : new Point(s, s);\n \t},\n\n \t_updateZIndex: function () {\n \t\tif (this._container && this.options.zIndex !== undefined && this.options.zIndex !== null) {\n \t\t\tthis._container.style.zIndex = this.options.zIndex;\n \t\t}\n \t},\n\n \t_setAutoZIndex: function (compare) {\n \t\t// go through all other layers of the same pane, set zIndex to max + 1 (front) or min - 1 (back)\n\n \t\tvar layers = this.getPane().children,\n \t\t edgeZIndex = -compare(-Infinity, Infinity); // -Infinity for max, Infinity for min\n\n \t\tfor (var i = 0, len = layers.length, zIndex; i < len; i++) {\n\n \t\t\tzIndex = layers[i].style.zIndex;\n\n \t\t\tif (layers[i] !== this._container && zIndex) {\n \t\t\t\tedgeZIndex = compare(edgeZIndex, +zIndex);\n \t\t\t}\n \t\t}\n\n \t\tif (isFinite(edgeZIndex)) {\n \t\t\tthis.options.zIndex = edgeZIndex + compare(-1, 1);\n \t\t\tthis._updateZIndex();\n \t\t}\n \t},\n\n \t_updateOpacity: function () {\n \t\tif (!this._map) { return; }\n\n \t\t// IE doesn't inherit filter opacity properly, so we're forced to set it on tiles\n \t\tif (Browser.ielt9) { return; }\n\n \t\tsetOpacity(this._container, this.options.opacity);\n\n \t\tvar now = +new Date(),\n \t\t nextFrame = false,\n \t\t willPrune = false;\n\n \t\tfor (var key in this._tiles) {\n \t\t\tvar tile = this._tiles[key];\n \t\t\tif (!tile.current || !tile.loaded) { continue; }\n\n \t\t\tvar fade = Math.min(1, (now - tile.loaded) / 200);\n\n \t\t\tsetOpacity(tile.el, fade);\n \t\t\tif (fade < 1) {\n \t\t\t\tnextFrame = true;\n \t\t\t} else {\n \t\t\t\tif (tile.active) {\n \t\t\t\t\twillPrune = true;\n \t\t\t\t} else {\n \t\t\t\t\tthis._onOpaqueTile(tile);\n \t\t\t\t}\n \t\t\t\ttile.active = true;\n \t\t\t}\n \t\t}\n\n \t\tif (willPrune && !this._noPrune) { this._pruneTiles(); }\n\n \t\tif (nextFrame) {\n \t\t\tcancelAnimFrame(this._fadeFrame);\n \t\t\tthis._fadeFrame = requestAnimFrame(this._updateOpacity, this);\n \t\t}\n \t},\n\n \t_onOpaqueTile: falseFn,\n\n \t_initContainer: function () {\n \t\tif (this._container) { return; }\n\n \t\tthis._container = create$1('div', 'leaflet-layer ' + (this.options.className || ''));\n \t\tthis._updateZIndex();\n\n \t\tif (this.options.opacity < 1) {\n \t\t\tthis._updateOpacity();\n \t\t}\n\n \t\tthis.getPane().appendChild(this._container);\n \t},\n\n \t_updateLevels: function () {\n\n \t\tvar zoom = this._tileZoom,\n \t\t maxZoom = this.options.maxZoom;\n\n \t\tif (zoom === undefined) { return undefined; }\n\n \t\tfor (var z in this._levels) {\n \t\t\tz = Number(z);\n \t\t\tif (this._levels[z].el.children.length || z === zoom) {\n \t\t\t\tthis._levels[z].el.style.zIndex = maxZoom - Math.abs(zoom - z);\n \t\t\t\tthis._onUpdateLevel(z);\n \t\t\t} else {\n \t\t\t\tremove(this._levels[z].el);\n \t\t\t\tthis._removeTilesAtZoom(z);\n \t\t\t\tthis._onRemoveLevel(z);\n \t\t\t\tdelete this._levels[z];\n \t\t\t}\n \t\t}\n\n \t\tvar level = this._levels[zoom],\n \t\t map = this._map;\n\n \t\tif (!level) {\n \t\t\tlevel = this._levels[zoom] = {};\n\n \t\t\tlevel.el = create$1('div', 'leaflet-tile-container leaflet-zoom-animated', this._container);\n \t\t\tlevel.el.style.zIndex = maxZoom;\n\n \t\t\tlevel.origin = map.project(map.unproject(map.getPixelOrigin()), zoom).round();\n \t\t\tlevel.zoom = zoom;\n\n \t\t\tthis._setZoomTransform(level, map.getCenter(), map.getZoom());\n\n \t\t\t// force the browser to consider the newly added element for transition\n \t\t\tfalseFn(level.el.offsetWidth);\n\n \t\t\tthis._onCreateLevel(level);\n \t\t}\n\n \t\tthis._level = level;\n\n \t\treturn level;\n \t},\n\n \t_onUpdateLevel: falseFn,\n\n \t_onRemoveLevel: falseFn,\n\n \t_onCreateLevel: falseFn,\n\n \t_pruneTiles: function () {\n \t\tif (!this._map) {\n \t\t\treturn;\n \t\t}\n\n \t\tvar key, tile;\n\n \t\tvar zoom = this._map.getZoom();\n \t\tif (zoom > this.options.maxZoom ||\n \t\t\tzoom < this.options.minZoom) {\n \t\t\tthis._removeAllTiles();\n \t\t\treturn;\n \t\t}\n\n \t\tfor (key in this._tiles) {\n \t\t\ttile = this._tiles[key];\n \t\t\ttile.retain = tile.current;\n \t\t}\n\n \t\tfor (key in this._tiles) {\n \t\t\ttile = this._tiles[key];\n \t\t\tif (tile.current && !tile.active) {\n \t\t\t\tvar coords = tile.coords;\n \t\t\t\tif (!this._retainParent(coords.x, coords.y, coords.z, coords.z - 5)) {\n \t\t\t\t\tthis._retainChildren(coords.x, coords.y, coords.z, coords.z + 2);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n\n \t\tfor (key in this._tiles) {\n \t\t\tif (!this._tiles[key].retain) {\n \t\t\t\tthis._removeTile(key);\n \t\t\t}\n \t\t}\n \t},\n\n \t_removeTilesAtZoom: function (zoom) {\n \t\tfor (var key in this._tiles) {\n \t\t\tif (this._tiles[key].coords.z !== zoom) {\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\tthis._removeTile(key);\n \t\t}\n \t},\n\n \t_removeAllTiles: function () {\n \t\tfor (var key in this._tiles) {\n \t\t\tthis._removeTile(key);\n \t\t}\n \t},\n\n \t_invalidateAll: function () {\n \t\tfor (var z in this._levels) {\n \t\t\tremove(this._levels[z].el);\n \t\t\tthis._onRemoveLevel(Number(z));\n \t\t\tdelete this._levels[z];\n \t\t}\n \t\tthis._removeAllTiles();\n\n \t\tthis._tileZoom = undefined;\n \t},\n\n \t_retainParent: function (x, y, z, minZoom) {\n \t\tvar x2 = Math.floor(x / 2),\n \t\t y2 = Math.floor(y / 2),\n \t\t z2 = z - 1,\n \t\t coords2 = new Point(+x2, +y2);\n \t\tcoords2.z = +z2;\n\n \t\tvar key = this._tileCoordsToKey(coords2),\n \t\t tile = this._tiles[key];\n\n \t\tif (tile && tile.active) {\n \t\t\ttile.retain = true;\n \t\t\treturn true;\n\n \t\t} else if (tile && tile.loaded) {\n \t\t\ttile.retain = true;\n \t\t}\n\n \t\tif (z2 > minZoom) {\n \t\t\treturn this._retainParent(x2, y2, z2, minZoom);\n \t\t}\n\n \t\treturn false;\n \t},\n\n \t_retainChildren: function (x, y, z, maxZoom) {\n\n \t\tfor (var i = 2 * x; i < 2 * x + 2; i++) {\n \t\t\tfor (var j = 2 * y; j < 2 * y + 2; j++) {\n\n \t\t\t\tvar coords = new Point(i, j);\n \t\t\t\tcoords.z = z + 1;\n\n \t\t\t\tvar key = this._tileCoordsToKey(coords),\n \t\t\t\t tile = this._tiles[key];\n\n \t\t\t\tif (tile && tile.active) {\n \t\t\t\t\ttile.retain = true;\n \t\t\t\t\tcontinue;\n\n \t\t\t\t} else if (tile && tile.loaded) {\n \t\t\t\t\ttile.retain = true;\n \t\t\t\t}\n\n \t\t\t\tif (z + 1 < maxZoom) {\n \t\t\t\t\tthis._retainChildren(i, j, z + 1, maxZoom);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t},\n\n \t_resetView: function (e) {\n \t\tvar animating = e && (e.pinch || e.flyTo);\n \t\tthis._setView(this._map.getCenter(), this._map.getZoom(), animating, animating);\n \t},\n\n \t_animateZoom: function (e) {\n \t\tthis._setView(e.center, e.zoom, true, e.noUpdate);\n \t},\n\n \t_clampZoom: function (zoom) {\n \t\tvar options = this.options;\n\n \t\tif (undefined !== options.minNativeZoom && zoom < options.minNativeZoom) {\n \t\t\treturn options.minNativeZoom;\n \t\t}\n\n \t\tif (undefined !== options.maxNativeZoom && options.maxNativeZoom < zoom) {\n \t\t\treturn options.maxNativeZoom;\n \t\t}\n\n \t\treturn zoom;\n \t},\n\n \t_setView: function (center, zoom, noPrune, noUpdate) {\n \t\tvar tileZoom = Math.round(zoom);\n \t\tif ((this.options.maxZoom !== undefined && tileZoom > this.options.maxZoom) ||\n \t\t (this.options.minZoom !== undefined && tileZoom < this.options.minZoom)) {\n \t\t\ttileZoom = undefined;\n \t\t} else {\n \t\t\ttileZoom = this._clampZoom(tileZoom);\n \t\t}\n\n \t\tvar tileZoomChanged = this.options.updateWhenZooming && (tileZoom !== this._tileZoom);\n\n \t\tif (!noUpdate || tileZoomChanged) {\n\n \t\t\tthis._tileZoom = tileZoom;\n\n \t\t\tif (this._abortLoading) {\n \t\t\t\tthis._abortLoading();\n \t\t\t}\n\n \t\t\tthis._updateLevels();\n \t\t\tthis._resetGrid();\n\n \t\t\tif (tileZoom !== undefined) {\n \t\t\t\tthis._update(center);\n \t\t\t}\n\n \t\t\tif (!noPrune) {\n \t\t\t\tthis._pruneTiles();\n \t\t\t}\n\n \t\t\t// Flag to prevent _updateOpacity from pruning tiles during\n \t\t\t// a zoom anim or a pinch gesture\n \t\t\tthis._noPrune = !!noPrune;\n \t\t}\n\n \t\tthis._setZoomTransforms(center, zoom);\n \t},\n\n \t_setZoomTransforms: function (center, zoom) {\n \t\tfor (var i in this._levels) {\n \t\t\tthis._setZoomTransform(this._levels[i], center, zoom);\n \t\t}\n \t},\n\n \t_setZoomTransform: function (level, center, zoom) {\n \t\tvar scale = this._map.getZoomScale(zoom, level.zoom),\n \t\t translate = level.origin.multiplyBy(scale)\n \t\t .subtract(this._map._getNewPixelOrigin(center, zoom)).round();\n\n \t\tif (Browser.any3d) {\n \t\t\tsetTransform(level.el, translate, scale);\n \t\t} else {\n \t\t\tsetPosition(level.el, translate);\n \t\t}\n \t},\n\n \t_resetGrid: function () {\n \t\tvar map = this._map,\n \t\t crs = map.options.crs,\n \t\t tileSize = this._tileSize = this.getTileSize(),\n \t\t tileZoom = this._tileZoom;\n\n \t\tvar bounds = this._map.getPixelWorldBounds(this._tileZoom);\n \t\tif (bounds) {\n \t\t\tthis._globalTileRange = this._pxBoundsToTileRange(bounds);\n \t\t}\n\n \t\tthis._wrapX = crs.wrapLng && !this.options.noWrap && [\n \t\t\tMath.floor(map.project([0, crs.wrapLng[0]], tileZoom).x / tileSize.x),\n \t\t\tMath.ceil(map.project([0, crs.wrapLng[1]], tileZoom).x / tileSize.y)\n \t\t];\n \t\tthis._wrapY = crs.wrapLat && !this.options.noWrap && [\n \t\t\tMath.floor(map.project([crs.wrapLat[0], 0], tileZoom).y / tileSize.x),\n \t\t\tMath.ceil(map.project([crs.wrapLat[1], 0], tileZoom).y / tileSize.y)\n \t\t];\n \t},\n\n \t_onMoveEnd: function () {\n \t\tif (!this._map || this._map._animatingZoom) { return; }\n\n \t\tthis._update();\n \t},\n\n \t_getTiledPixelBounds: function (center) {\n \t\tvar map = this._map,\n \t\t mapZoom = map._animatingZoom ? Math.max(map._animateToZoom, map.getZoom()) : map.getZoom(),\n \t\t scale = map.getZoomScale(mapZoom, this._tileZoom),\n \t\t pixelCenter = map.project(center, this._tileZoom).floor(),\n \t\t halfSize = map.getSize().divideBy(scale * 2);\n\n \t\treturn new Bounds(pixelCenter.subtract(halfSize), pixelCenter.add(halfSize));\n \t},\n\n \t// Private method to load tiles in the grid's active zoom level according to map bounds\n \t_update: function (center) {\n \t\tvar map = this._map;\n \t\tif (!map) { return; }\n \t\tvar zoom = this._clampZoom(map.getZoom());\n\n \t\tif (center === undefined) { center = map.getCenter(); }\n \t\tif (this._tileZoom === undefined) { return; }\t// if out of minzoom/maxzoom\n\n \t\tvar pixelBounds = this._getTiledPixelBounds(center),\n \t\t tileRange = this._pxBoundsToTileRange(pixelBounds),\n \t\t tileCenter = tileRange.getCenter(),\n \t\t queue = [],\n \t\t margin = this.options.keepBuffer,\n \t\t noPruneRange = new Bounds(tileRange.getBottomLeft().subtract([margin, -margin]),\n \t\t tileRange.getTopRight().add([margin, -margin]));\n\n \t\t// Sanity check: panic if the tile range contains Infinity somewhere.\n \t\tif (!(isFinite(tileRange.min.x) &&\n \t\t isFinite(tileRange.min.y) &&\n \t\t isFinite(tileRange.max.x) &&\n \t\t isFinite(tileRange.max.y))) { throw new Error('Attempted to load an infinite number of tiles'); }\n\n \t\tfor (var key in this._tiles) {\n \t\t\tvar c = this._tiles[key].coords;\n \t\t\tif (c.z !== this._tileZoom || !noPruneRange.contains(new Point(c.x, c.y))) {\n \t\t\t\tthis._tiles[key].current = false;\n \t\t\t}\n \t\t}\n\n \t\t// _update just loads more tiles. If the tile zoom level differs too much\n \t\t// from the map's, let _setView reset levels and prune old tiles.\n \t\tif (Math.abs(zoom - this._tileZoom) > 1) { this._setView(center, zoom); return; }\n\n \t\t// create a queue of coordinates to load tiles from\n \t\tfor (var j = tileRange.min.y; j <= tileRange.max.y; j++) {\n \t\t\tfor (var i = tileRange.min.x; i <= tileRange.max.x; i++) {\n \t\t\t\tvar coords = new Point(i, j);\n \t\t\t\tcoords.z = this._tileZoom;\n\n \t\t\t\tif (!this._isValidTile(coords)) { continue; }\n\n \t\t\t\tvar tile = this._tiles[this._tileCoordsToKey(coords)];\n \t\t\t\tif (tile) {\n \t\t\t\t\ttile.current = true;\n \t\t\t\t} else {\n \t\t\t\t\tqueue.push(coords);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n\n \t\t// sort tile queue to load tiles in order of their distance to center\n \t\tqueue.sort(function (a, b) {\n \t\t\treturn a.distanceTo(tileCenter) - b.distanceTo(tileCenter);\n \t\t});\n\n \t\tif (queue.length !== 0) {\n \t\t\t// if it's the first batch of tiles to load\n \t\t\tif (!this._loading) {\n \t\t\t\tthis._loading = true;\n \t\t\t\t// @event loading: Event\n \t\t\t\t// Fired when the grid layer starts loading tiles.\n \t\t\t\tthis.fire('loading');\n \t\t\t}\n\n \t\t\t// create DOM fragment to append tiles in one batch\n \t\t\tvar fragment = document.createDocumentFragment();\n\n \t\t\tfor (i = 0; i < queue.length; i++) {\n \t\t\t\tthis._addTile(queue[i], fragment);\n \t\t\t}\n\n \t\t\tthis._level.el.appendChild(fragment);\n \t\t}\n \t},\n\n \t_isValidTile: function (coords) {\n \t\tvar crs = this._map.options.crs;\n\n \t\tif (!crs.infinite) {\n \t\t\t// don't load tile if it's out of bounds and not wrapped\n \t\t\tvar bounds = this._globalTileRange;\n \t\t\tif ((!crs.wrapLng && (coords.x < bounds.min.x || coords.x > bounds.max.x)) ||\n \t\t\t (!crs.wrapLat && (coords.y < bounds.min.y || coords.y > bounds.max.y))) { return false; }\n \t\t}\n\n \t\tif (!this.options.bounds) { return true; }\n\n \t\t// don't load tile if it doesn't intersect the bounds in options\n \t\tvar tileBounds = this._tileCoordsToBounds(coords);\n \t\treturn toLatLngBounds(this.options.bounds).overlaps(tileBounds);\n \t},\n\n \t_keyToBounds: function (key) {\n \t\treturn this._tileCoordsToBounds(this._keyToTileCoords(key));\n \t},\n\n \t_tileCoordsToNwSe: function (coords) {\n \t\tvar map = this._map,\n \t\t tileSize = this.getTileSize(),\n \t\t nwPoint = coords.scaleBy(tileSize),\n \t\t sePoint = nwPoint.add(tileSize),\n \t\t nw = map.unproject(nwPoint, coords.z),\n \t\t se = map.unproject(sePoint, coords.z);\n \t\treturn [nw, se];\n \t},\n\n \t// converts tile coordinates to its geographical bounds\n \t_tileCoordsToBounds: function (coords) {\n \t\tvar bp = this._tileCoordsToNwSe(coords),\n \t\t bounds = new LatLngBounds(bp[0], bp[1]);\n\n \t\tif (!this.options.noWrap) {\n \t\t\tbounds = this._map.wrapLatLngBounds(bounds);\n \t\t}\n \t\treturn bounds;\n \t},\n \t// converts tile coordinates to key for the tile cache\n \t_tileCoordsToKey: function (coords) {\n \t\treturn coords.x + ':' + coords.y + ':' + coords.z;\n \t},\n\n \t// converts tile cache key to coordinates\n \t_keyToTileCoords: function (key) {\n \t\tvar k = key.split(':'),\n \t\t coords = new Point(+k[0], +k[1]);\n \t\tcoords.z = +k[2];\n \t\treturn coords;\n \t},\n\n \t_removeTile: function (key) {\n \t\tvar tile = this._tiles[key];\n \t\tif (!tile) { return; }\n\n \t\tremove(tile.el);\n\n \t\tdelete this._tiles[key];\n\n \t\t// @event tileunload: TileEvent\n \t\t// Fired when a tile is removed (e.g. when a tile goes off the screen).\n \t\tthis.fire('tileunload', {\n \t\t\ttile: tile.el,\n \t\t\tcoords: this._keyToTileCoords(key)\n \t\t});\n \t},\n\n \t_initTile: function (tile) {\n \t\taddClass(tile, 'leaflet-tile');\n\n \t\tvar tileSize = this.getTileSize();\n \t\ttile.style.width = tileSize.x + 'px';\n \t\ttile.style.height = tileSize.y + 'px';\n\n \t\ttile.onselectstart = falseFn;\n \t\ttile.onmousemove = falseFn;\n\n \t\t// update opacity on tiles in IE7-8 because of filter inheritance problems\n \t\tif (Browser.ielt9 && this.options.opacity < 1) {\n \t\t\tsetOpacity(tile, this.options.opacity);\n \t\t}\n \t},\n\n \t_addTile: function (coords, container) {\n \t\tvar tilePos = this._getTilePos(coords),\n \t\t key = this._tileCoordsToKey(coords);\n\n \t\tvar tile = this.createTile(this._wrapCoords(coords), bind(this._tileReady, this, coords));\n\n \t\tthis._initTile(tile);\n\n \t\t// if createTile is defined with a second argument (\"done\" callback),\n \t\t// we know that tile is async and will be ready later; otherwise\n \t\tif (this.createTile.length < 2) {\n \t\t\t// mark tile as ready, but delay one frame for opacity animation to happen\n \t\t\trequestAnimFrame(bind(this._tileReady, this, coords, null, tile));\n \t\t}\n\n \t\tsetPosition(tile, tilePos);\n\n \t\t// save tile in cache\n \t\tthis._tiles[key] = {\n \t\t\tel: tile,\n \t\t\tcoords: coords,\n \t\t\tcurrent: true\n \t\t};\n\n \t\tcontainer.appendChild(tile);\n \t\t// @event tileloadstart: TileEvent\n \t\t// Fired when a tile is requested and starts loading.\n \t\tthis.fire('tileloadstart', {\n \t\t\ttile: tile,\n \t\t\tcoords: coords\n \t\t});\n \t},\n\n \t_tileReady: function (coords, err, tile) {\n \t\tif (err) {\n \t\t\t// @event tileerror: TileErrorEvent\n \t\t\t// Fired when there is an error loading a tile.\n \t\t\tthis.fire('tileerror', {\n \t\t\t\terror: err,\n \t\t\t\ttile: tile,\n \t\t\t\tcoords: coords\n \t\t\t});\n \t\t}\n\n \t\tvar key = this._tileCoordsToKey(coords);\n\n \t\ttile = this._tiles[key];\n \t\tif (!tile) { return; }\n\n \t\ttile.loaded = +new Date();\n \t\tif (this._map._fadeAnimated) {\n \t\t\tsetOpacity(tile.el, 0);\n \t\t\tcancelAnimFrame(this._fadeFrame);\n \t\t\tthis._fadeFrame = requestAnimFrame(this._updateOpacity, this);\n \t\t} else {\n \t\t\ttile.active = true;\n \t\t\tthis._pruneTiles();\n \t\t}\n\n \t\tif (!err) {\n \t\t\taddClass(tile.el, 'leaflet-tile-loaded');\n\n \t\t\t// @event tileload: TileEvent\n \t\t\t// Fired when a tile loads.\n \t\t\tthis.fire('tileload', {\n \t\t\t\ttile: tile.el,\n \t\t\t\tcoords: coords\n \t\t\t});\n \t\t}\n\n \t\tif (this._noTilesToLoad()) {\n \t\t\tthis._loading = false;\n \t\t\t// @event load: Event\n \t\t\t// Fired when the grid layer loaded all visible tiles.\n \t\t\tthis.fire('load');\n\n \t\t\tif (Browser.ielt9 || !this._map._fadeAnimated) {\n \t\t\t\trequestAnimFrame(this._pruneTiles, this);\n \t\t\t} else {\n \t\t\t\t// Wait a bit more than 0.2 secs (the duration of the tile fade-in)\n \t\t\t\t// to trigger a pruning.\n \t\t\t\tsetTimeout(bind(this._pruneTiles, this), 250);\n \t\t\t}\n \t\t}\n \t},\n\n \t_getTilePos: function (coords) {\n \t\treturn coords.scaleBy(this.getTileSize()).subtract(this._level.origin);\n \t},\n\n \t_wrapCoords: function (coords) {\n \t\tvar newCoords = new Point(\n \t\t\tthis._wrapX ? wrapNum(coords.x, this._wrapX) : coords.x,\n \t\t\tthis._wrapY ? wrapNum(coords.y, this._wrapY) : coords.y);\n \t\tnewCoords.z = coords.z;\n \t\treturn newCoords;\n \t},\n\n \t_pxBoundsToTileRange: function (bounds) {\n \t\tvar tileSize = this.getTileSize();\n \t\treturn new Bounds(\n \t\t\tbounds.min.unscaleBy(tileSize).floor(),\n \t\t\tbounds.max.unscaleBy(tileSize).ceil().subtract([1, 1]));\n \t},\n\n \t_noTilesToLoad: function () {\n \t\tfor (var key in this._tiles) {\n \t\t\tif (!this._tiles[key].loaded) { return false; }\n \t\t}\n \t\treturn true;\n \t}\n });\n\n // @factory L.gridLayer(options?: GridLayer options)\n // Creates a new instance of GridLayer with the supplied options.\n function gridLayer(options) {\n \treturn new GridLayer(options);\n }\n\n /*\r\n * @class TileLayer\r\n * @inherits GridLayer\r\n * @aka L.TileLayer\r\n * Used to load and display tile layers on the map. Note that most tile servers require attribution, which you can set under `Layer`. Extends `GridLayer`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png?{foo}', {foo: 'bar', attribution: '© <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> contributors'}).addTo(map);\n * ```\r\n *\r\n * @section URL template\r\n * @example\r\n *\r\n * A string of the following form:\r\n *\r\n * ```\r\n * 'https://{s}.somedomain.com/blabla/{z}/{x}/{y}{r}.png'\r\n * ```\r\n *\r\n * `{s}` means one of the available subdomains (used sequentially to help with browser parallel requests per domain limitation; subdomain values are specified in options; `a`, `b` or `c` by default, can be omitted), `{z}` — zoom level, `{x}` and `{y}` — tile coordinates. `{r}` can be used to add \"@2x\" to the URL to load retina tiles.\r\n *\r\n * You can use custom keys in the template, which will be [evaluated](#util-template) from TileLayer options, like this:\r\n *\r\n * ```\r\n * L.tileLayer('https://{s}.somedomain.com/{foo}/{z}/{x}/{y}.png', {foo: 'bar'});\r\n * ```\r\n */\r\n\r\n\r\n var TileLayer = GridLayer.extend({\r\n\r\n \t// @section\r\n \t// @aka TileLayer options\r\n \toptions: {\r\n \t\t// @option minZoom: Number = 0\r\n \t\t// The minimum zoom level down to which this layer will be displayed (inclusive).\r\n \t\tminZoom: 0,\r\n\r\n \t\t// @option maxZoom: Number = 18\r\n \t\t// The maximum zoom level up to which this layer will be displayed (inclusive).\r\n \t\tmaxZoom: 18,\r\n\r\n \t\t// @option subdomains: String|String[] = 'abc'\r\n \t\t// Subdomains of the tile service. Can be passed in the form of one string (where each letter is a subdomain name) or an array of strings.\r\n \t\tsubdomains: 'abc',\r\n\r\n \t\t// @option errorTileUrl: String = ''\r\n \t\t// URL to the tile image to show in place of the tile that failed to load.\r\n \t\terrorTileUrl: '',\r\n\r\n \t\t// @option zoomOffset: Number = 0\r\n \t\t// The zoom number used in tile URLs will be offset with this value.\r\n \t\tzoomOffset: 0,\r\n\r\n \t\t// @option tms: Boolean = false\r\n \t\t// If `true`, inverses Y axis numbering for tiles (turn this on for [TMS](https://en.wikipedia.org/wiki/Tile_Map_Service) services).\r\n \t\ttms: false,\r\n\r\n \t\t// @option zoomReverse: Boolean = false\r\n \t\t// If set to true, the zoom number used in tile URLs will be reversed (`maxZoom - zoom` instead of `zoom`)\r\n \t\tzoomReverse: false,\r\n\r\n \t\t// @option detectRetina: Boolean = false\r\n \t\t// If `true` and user is on a retina display, it will request four tiles of half the specified size and a bigger zoom level in place of one to utilize the high resolution.\r\n \t\tdetectRetina: false,\r\n\r\n \t\t// @option crossOrigin: Boolean|String = false\r\n \t\t// Whether the crossOrigin attribute will be added to the tiles.\r\n \t\t// If a String is provided, all tiles will have their crossOrigin attribute set to the String provided. This is needed if you want to access tile pixel data.\r\n \t\t// Refer to [CORS Settings](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for valid String values.\r\n \t\tcrossOrigin: false,\r\n\r\n \t\t// @option referrerPolicy: Boolean|String = false\r\n \t\t// Whether the referrerPolicy attribute will be added to the tiles.\r\n \t\t// If a String is provided, all tiles will have their referrerPolicy attribute set to the String provided.\r\n \t\t// This may be needed if your map's rendering context has a strict default but your tile provider expects a valid referrer\r\n \t\t// (e.g. to validate an API token).\r\n \t\t// Refer to [HTMLImageElement.referrerPolicy](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/referrerPolicy) for valid String values.\r\n \t\treferrerPolicy: false\r\n \t},\r\n\r\n \tinitialize: function (url, options) {\r\n\r\n \t\tthis._url = url;\r\n\r\n \t\toptions = setOptions(this, options);\r\n\r\n \t\t// detecting retina displays, adjusting tileSize and zoom levels\r\n \t\tif (options.detectRetina && Browser.retina && options.maxZoom > 0) {\r\n\r\n \t\t\toptions.tileSize = Math.floor(options.tileSize / 2);\r\n\r\n \t\t\tif (!options.zoomReverse) {\r\n \t\t\t\toptions.zoomOffset++;\r\n \t\t\t\toptions.maxZoom = Math.max(options.minZoom, options.maxZoom - 1);\r\n \t\t\t} else {\r\n \t\t\t\toptions.zoomOffset--;\r\n \t\t\t\toptions.minZoom = Math.min(options.maxZoom, options.minZoom + 1);\r\n \t\t\t}\r\n\r\n \t\t\toptions.minZoom = Math.max(0, options.minZoom);\r\n \t\t} else if (!options.zoomReverse) {\r\n \t\t\t// make sure maxZoom is gte minZoom\r\n \t\t\toptions.maxZoom = Math.max(options.minZoom, options.maxZoom);\r\n \t\t} else {\r\n \t\t\t// make sure minZoom is lte maxZoom\r\n \t\t\toptions.minZoom = Math.min(options.maxZoom, options.minZoom);\r\n \t\t}\r\n\r\n \t\tif (typeof options.subdomains === 'string') {\r\n \t\t\toptions.subdomains = options.subdomains.split('');\r\n \t\t}\r\n\r\n \t\tthis.on('tileunload', this._onTileRemove);\r\n \t},\r\n\r\n \t// @method setUrl(url: String, noRedraw?: Boolean): this\r\n \t// Updates the layer's URL template and redraws it (unless `noRedraw` is set to `true`).\r\n \t// If the URL does not change, the layer will not be redrawn unless\r\n \t// the noRedraw parameter is set to false.\r\n \tsetUrl: function (url, noRedraw) {\r\n \t\tif (this._url === url && noRedraw === undefined) {\r\n \t\t\tnoRedraw = true;\r\n \t\t}\r\n\r\n \t\tthis._url = url;\r\n\r\n \t\tif (!noRedraw) {\r\n \t\t\tthis.redraw();\r\n \t\t}\r\n \t\treturn this;\r\n \t},\r\n\r\n \t// @method createTile(coords: Object, done?: Function): HTMLElement\r\n \t// Called only internally, overrides GridLayer's [`createTile()`](#gridlayer-createtile)\r\n \t// to return an `<img>` HTML element with the appropriate image URL given `coords`. The `done`\r\n \t// callback is called when the tile has been loaded.\r\n \tcreateTile: function (coords, done) {\r\n \t\tvar tile = document.createElement('img');\r\n\r\n \t\ton(tile, 'load', bind(this._tileOnLoad, this, done, tile));\r\n \t\ton(tile, 'error', bind(this._tileOnError, this, done, tile));\r\n\r\n \t\tif (this.options.crossOrigin || this.options.crossOrigin === '') {\r\n \t\t\ttile.crossOrigin = this.options.crossOrigin === true ? '' : this.options.crossOrigin;\r\n \t\t}\r\n\r\n \t\t// for this new option we follow the documented behavior\r\n \t\t// more closely by only setting the property when string\r\n \t\tif (typeof this.options.referrerPolicy === 'string') {\r\n \t\t\ttile.referrerPolicy = this.options.referrerPolicy;\r\n \t\t}\r\n\r\n \t\t// The alt attribute is set to the empty string,\r\n \t\t// allowing screen readers to ignore the decorative image tiles.\r\n \t\t// https://www.w3.org/WAI/tutorials/images/decorative/\r\n \t\t// https://www.w3.org/TR/html-aria/#el-img-empty-alt\r\n \t\ttile.alt = '';\r\n\r\n \t\ttile.src = this.getTileUrl(coords);\r\n\r\n \t\treturn tile;\r\n \t},\r\n\r\n \t// @section Extension methods\r\n \t// @uninheritable\r\n \t// Layers extending `TileLayer` might reimplement the following method.\r\n \t// @method getTileUrl(coords: Object): String\r\n \t// Called only internally, returns the URL for a tile given its coordinates.\r\n \t// Classes extending `TileLayer` can override this function to provide custom tile URL naming schemes.\r\n \tgetTileUrl: function (coords) {\r\n \t\tvar data = {\r\n \t\t\tr: Browser.retina ? '@2x' : '',\r\n \t\t\ts: this._getSubdomain(coords),\r\n \t\t\tx: coords.x,\r\n \t\t\ty: coords.y,\r\n \t\t\tz: this._getZoomForUrl()\r\n \t\t};\r\n \t\tif (this._map && !this._map.options.crs.infinite) {\r\n \t\t\tvar invertedY = this._globalTileRange.max.y - coords.y;\r\n \t\t\tif (this.options.tms) {\r\n \t\t\t\tdata['y'] = invertedY;\r\n \t\t\t}\r\n \t\t\tdata['-y'] = invertedY;\r\n \t\t}\r\n\r\n \t\treturn template(this._url, extend(data, this.options));\r\n \t},\r\n\r\n \t_tileOnLoad: function (done, tile) {\r\n \t\t// For https://github.com/Leaflet/Leaflet/issues/3332\r\n \t\tif (Browser.ielt9) {\r\n \t\t\tsetTimeout(bind(done, this, null, tile), 0);\r\n \t\t} else {\r\n \t\t\tdone(null, tile);\r\n \t\t}\r\n \t},\r\n\r\n \t_tileOnError: function (done, tile, e) {\r\n \t\tvar errorUrl = this.options.errorTileUrl;\r\n \t\tif (errorUrl && tile.getAttribute('src') !== errorUrl) {\r\n \t\t\ttile.src = errorUrl;\r\n \t\t}\r\n \t\tdone(e, tile);\r\n \t},\r\n\r\n \t_onTileRemove: function (e) {\r\n \t\te.tile.onload = null;\r\n \t},\r\n\r\n \t_getZoomForUrl: function () {\r\n \t\tvar zoom = this._tileZoom,\r\n \t\tmaxZoom = this.options.maxZoom,\r\n \t\tzoomReverse = this.options.zoomReverse,\r\n \t\tzoomOffset = this.options.zoomOffset;\r\n\r\n \t\tif (zoomReverse) {\r\n \t\t\tzoom = maxZoom - zoom;\r\n \t\t}\r\n\r\n \t\treturn zoom + zoomOffset;\r\n \t},\r\n\r\n \t_getSubdomain: function (tilePoint) {\r\n \t\tvar index = Math.abs(tilePoint.x + tilePoint.y) % this.options.subdomains.length;\r\n \t\treturn this.options.subdomains[index];\r\n \t},\r\n\r\n \t// stops loading all tiles in the background layer\r\n \t_abortLoading: function () {\r\n \t\tvar i, tile;\r\n \t\tfor (i in this._tiles) {\r\n \t\t\tif (this._tiles[i].coords.z !== this._tileZoom) {\r\n \t\t\t\ttile = this._tiles[i].el;\r\n\r\n \t\t\t\ttile.onload = falseFn;\r\n \t\t\t\ttile.onerror = falseFn;\r\n\r\n \t\t\t\tif (!tile.complete) {\r\n \t\t\t\t\ttile.src = emptyImageUrl;\r\n \t\t\t\t\tvar coords = this._tiles[i].coords;\r\n \t\t\t\t\tremove(tile);\r\n \t\t\t\t\tdelete this._tiles[i];\r\n \t\t\t\t\t// @event tileabort: TileEvent\r\n \t\t\t\t\t// Fired when a tile was loading but is now not wanted.\r\n \t\t\t\t\tthis.fire('tileabort', {\r\n \t\t\t\t\t\ttile: tile,\r\n \t\t\t\t\t\tcoords: coords\r\n \t\t\t\t\t});\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t},\r\n\r\n \t_removeTile: function (key) {\r\n \t\tvar tile = this._tiles[key];\r\n \t\tif (!tile) { return; }\r\n\r\n \t\t// Cancels any pending http requests associated with the tile\r\n \t\ttile.el.setAttribute('src', emptyImageUrl);\r\n\r\n \t\treturn GridLayer.prototype._removeTile.call(this, key);\r\n \t},\r\n\r\n \t_tileReady: function (coords, err, tile) {\r\n \t\tif (!this._map || (tile && tile.getAttribute('src') === emptyImageUrl)) {\r\n \t\t\treturn;\r\n \t\t}\r\n\r\n \t\treturn GridLayer.prototype._tileReady.call(this, coords, err, tile);\r\n \t}\r\n });\r\n\r\n\r\n // @factory L.tilelayer(urlTemplate: String, options?: TileLayer options)\r\n // Instantiates a tile layer object given a `URL template` and optionally an options object.\r\n\r\n function tileLayer(url, options) {\r\n \treturn new TileLayer(url, options);\r\n }\n\n /*\r\n * @class TileLayer.WMS\r\n * @inherits TileLayer\r\n * @aka L.TileLayer.WMS\r\n * Used to display [WMS](https://en.wikipedia.org/wiki/Web_Map_Service) services as tile layers on the map. Extends `TileLayer`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var nexrad = L.tileLayer.wms(\"http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi\", {\r\n * \tlayers: 'nexrad-n0r-900913',\r\n * \tformat: 'image/png',\r\n * \ttransparent: true,\r\n * \tattribution: \"Weather data © 2012 IEM Nexrad\"\r\n * });\r\n * ```\r\n */\r\n\r\n var TileLayerWMS = TileLayer.extend({\r\n\r\n \t// @section\r\n \t// @aka TileLayer.WMS options\r\n \t// If any custom options not documented here are used, they will be sent to the\r\n \t// WMS server as extra parameters in each request URL. This can be useful for\r\n \t// [non-standard vendor WMS parameters](https://docs.geoserver.org/stable/en/user/services/wms/vendor.html).\r\n \tdefaultWmsParams: {\r\n \t\tservice: 'WMS',\r\n \t\trequest: 'GetMap',\r\n\r\n \t\t// @option layers: String = ''\r\n \t\t// **(required)** Comma-separated list of WMS layers to show.\r\n \t\tlayers: '',\r\n\r\n \t\t// @option styles: String = ''\r\n \t\t// Comma-separated list of WMS styles.\r\n \t\tstyles: '',\r\n\r\n \t\t// @option format: String = 'image/jpeg'\r\n \t\t// WMS image format (use `'image/png'` for layers with transparency).\r\n \t\tformat: 'image/jpeg',\r\n\r\n \t\t// @option transparent: Boolean = false\r\n \t\t// If `true`, the WMS service will return images with transparency.\r\n \t\ttransparent: false,\r\n\r\n \t\t// @option version: String = '1.1.1'\r\n \t\t// Version of the WMS service to use\r\n \t\tversion: '1.1.1'\r\n \t},\r\n\r\n \toptions: {\r\n \t\t// @option crs: CRS = null\r\n \t\t// Coordinate Reference System to use for the WMS requests, defaults to\r\n \t\t// map CRS. Don't change this if you're not sure what it means.\r\n \t\tcrs: null,\r\n\r\n \t\t// @option uppercase: Boolean = false\r\n \t\t// If `true`, WMS request parameter keys will be uppercase.\r\n \t\tuppercase: false\r\n \t},\r\n\r\n \tinitialize: function (url, options) {\r\n\r\n \t\tthis._url = url;\r\n\r\n \t\tvar wmsParams = extend({}, this.defaultWmsParams);\r\n\r\n \t\t// all keys that are not TileLayer options go to WMS params\r\n \t\tfor (var i in options) {\r\n \t\t\tif (!(i in this.options)) {\r\n \t\t\t\twmsParams[i] = options[i];\r\n \t\t\t}\r\n \t\t}\r\n\r\n \t\toptions = setOptions(this, options);\r\n\r\n \t\tvar realRetina = options.detectRetina && Browser.retina ? 2 : 1;\r\n \t\tvar tileSize = this.getTileSize();\r\n \t\twmsParams.width = tileSize.x * realRetina;\r\n \t\twmsParams.height = tileSize.y * realRetina;\r\n\r\n \t\tthis.wmsParams = wmsParams;\r\n \t},\r\n\r\n \tonAdd: function (map) {\r\n\r\n \t\tthis._crs = this.options.crs || map.options.crs;\r\n \t\tthis._wmsVersion = parseFloat(this.wmsParams.version);\r\n\r\n \t\tvar projectionKey = this._wmsVersion >= 1.3 ? 'crs' : 'srs';\r\n \t\tthis.wmsParams[projectionKey] = this._crs.code;\r\n\r\n \t\tTileLayer.prototype.onAdd.call(this, map);\r\n \t},\r\n\r\n \tgetTileUrl: function (coords) {\r\n\r\n \t\tvar tileBounds = this._tileCoordsToNwSe(coords),\r\n \t\t crs = this._crs,\r\n \t\t bounds = toBounds(crs.project(tileBounds[0]), crs.project(tileBounds[1])),\r\n \t\t min = bounds.min,\r\n \t\t max = bounds.max,\r\n \t\t bbox = (this._wmsVersion >= 1.3 && this._crs === EPSG4326 ?\r\n \t\t [min.y, min.x, max.y, max.x] :\r\n \t\t [min.x, min.y, max.x, max.y]).join(','),\r\n \t\t url = TileLayer.prototype.getTileUrl.call(this, coords);\r\n \t\treturn url +\r\n \t\t\tgetParamString(this.wmsParams, url, this.options.uppercase) +\r\n \t\t\t(this.options.uppercase ? '&BBOX=' : '&bbox=') + bbox;\r\n \t},\r\n\r\n \t// @method setParams(params: Object, noRedraw?: Boolean): this\r\n \t// Merges an object with the new parameters and re-requests tiles on the current screen (unless `noRedraw` was set to true).\r\n \tsetParams: function (params, noRedraw) {\r\n\r\n \t\textend(this.wmsParams, params);\r\n\r\n \t\tif (!noRedraw) {\r\n \t\t\tthis.redraw();\r\n \t\t}\r\n\r\n \t\treturn this;\r\n \t}\r\n });\r\n\r\n\r\n // @factory L.tileLayer.wms(baseUrl: String, options: TileLayer.WMS options)\r\n // Instantiates a WMS tile layer object given a base URL of the WMS service and a WMS parameters/options object.\r\n function tileLayerWMS(url, options) {\r\n \treturn new TileLayerWMS(url, options);\r\n }\n\n TileLayer.WMS = TileLayerWMS;\n tileLayer.wms = tileLayerWMS;\n\n /*\n * @class Renderer\n * @inherits Layer\n * @aka L.Renderer\n *\n * Base class for vector renderer implementations (`SVG`, `Canvas`). Handles the\n * DOM container of the renderer, its bounds, and its zoom animation.\n *\n * A `Renderer` works as an implicit layer group for all `Path`s - the renderer\n * itself can be added or removed to the map. All paths use a renderer, which can\n * be implicit (the map will decide the type of renderer and use it automatically)\n * or explicit (using the [`renderer`](#path-renderer) option of the path).\n *\n * Do not use this class directly, use `SVG` and `Canvas` instead.\n *\n * @event update: Event\n * Fired when the renderer updates its bounds, center and zoom, for example when\n * its map has moved\n */\n\n var Renderer = Layer.extend({\n\n \t// @section\n \t// @aka Renderer options\n \toptions: {\n \t\t// @option padding: Number = 0.1\n \t\t// How much to extend the clip area around the map view (relative to its size)\n \t\t// e.g. 0.1 would be 10% of map view in each direction\n \t\tpadding: 0.1\n \t},\n\n \tinitialize: function (options) {\n \t\tsetOptions(this, options);\n \t\tstamp(this);\n \t\tthis._layers = this._layers || {};\n \t},\n\n \tonAdd: function () {\n \t\tif (!this._container) {\n \t\t\tthis._initContainer(); // defined by renderer implementations\n\n \t\t\tif (this._zoomAnimated) {\n \t\t\t\taddClass(this._container, 'leaflet-zoom-animated');\n \t\t\t}\n \t\t}\n\n \t\tthis.getPane().appendChild(this._container);\n \t\tthis._update();\n \t\tthis.on('update', this._updatePaths, this);\n \t},\n\n \tonRemove: function () {\n \t\tthis.off('update', this._updatePaths, this);\n \t\tthis._destroyContainer();\n \t},\n\n \tgetEvents: function () {\n \t\tvar events = {\n \t\t\tviewreset: this._reset,\n \t\t\tzoom: this._onZoom,\n \t\t\tmoveend: this._update,\n \t\t\tzoomend: this._onZoomEnd\n \t\t};\n \t\tif (this._zoomAnimated) {\n \t\t\tevents.zoomanim = this._onAnimZoom;\n \t\t}\n \t\treturn events;\n \t},\n\n \t_onAnimZoom: function (ev) {\n \t\tthis._updateTransform(ev.center, ev.zoom);\n \t},\n\n \t_onZoom: function () {\n \t\tthis._updateTransform(this._map.getCenter(), this._map.getZoom());\n \t},\n\n \t_updateTransform: function (center, zoom) {\n \t\tvar scale = this._map.getZoomScale(zoom, this._zoom),\n \t\t viewHalf = this._map.getSize().multiplyBy(0.5 + this.options.padding),\n \t\t currentCenterPoint = this._map.project(this._center, zoom),\n\n \t\t topLeftOffset = viewHalf.multiplyBy(-scale).add(currentCenterPoint)\n \t\t\t\t .subtract(this._map._getNewPixelOrigin(center, zoom));\n\n \t\tif (Browser.any3d) {\n \t\t\tsetTransform(this._container, topLeftOffset, scale);\n \t\t} else {\n \t\t\tsetPosition(this._container, topLeftOffset);\n \t\t}\n \t},\n\n \t_reset: function () {\n \t\tthis._update();\n \t\tthis._updateTransform(this._center, this._zoom);\n\n \t\tfor (var id in this._layers) {\n \t\t\tthis._layers[id]._reset();\n \t\t}\n \t},\n\n \t_onZoomEnd: function () {\n \t\tfor (var id in this._layers) {\n \t\t\tthis._layers[id]._project();\n \t\t}\n \t},\n\n \t_updatePaths: function () {\n \t\tfor (var id in this._layers) {\n \t\t\tthis._layers[id]._update();\n \t\t}\n \t},\n\n \t_update: function () {\n \t\t// Update pixel bounds of renderer container (for positioning/sizing/clipping later)\n \t\t// Subclasses are responsible of firing the 'update' event.\n \t\tvar p = this.options.padding,\n \t\t size = this._map.getSize(),\n \t\t min = this._map.containerPointToLayerPoint(size.multiplyBy(-p)).round();\n\n \t\tthis._bounds = new Bounds(min, min.add(size.multiplyBy(1 + p * 2)).round());\n\n \t\tthis._center = this._map.getCenter();\n \t\tthis._zoom = this._map.getZoom();\n \t}\n });\n\n /*\n * @class Canvas\n * @inherits Renderer\n * @aka L.Canvas\n *\n * Allows vector layers to be displayed with [`<canvas>`](https://developer.mozilla.org/docs/Web/API/Canvas_API).\n * Inherits `Renderer`.\n *\n * Due to [technical limitations](https://caniuse.com/canvas), Canvas is not\n * available in all web browsers, notably IE8, and overlapping geometries might\n * not display properly in some edge cases.\n *\n * @example\n *\n * Use Canvas by default for all paths in the map:\n *\n * ```js\n * var map = L.map('map', {\n * \trenderer: L.canvas()\n * });\n * ```\n *\n * Use a Canvas renderer with extra padding for specific vector geometries:\n *\n * ```js\n * var map = L.map('map');\n * var myRenderer = L.canvas({ padding: 0.5 });\n * var line = L.polyline( coordinates, { renderer: myRenderer } );\n * var circle = L.circle( center, { renderer: myRenderer } );\n * ```\n */\n\n var Canvas = Renderer.extend({\n\n \t// @section\n \t// @aka Canvas options\n \toptions: {\n \t\t// @option tolerance: Number = 0\n \t\t// How much to extend the click tolerance around a path/object on the map.\n \t\ttolerance: 0\n \t},\n\n \tgetEvents: function () {\n \t\tvar events = Renderer.prototype.getEvents.call(this);\n \t\tevents.viewprereset = this._onViewPreReset;\n \t\treturn events;\n \t},\n\n \t_onViewPreReset: function () {\n \t\t// Set a flag so that a viewprereset+moveend+viewreset only updates&redraws once\n \t\tthis._postponeUpdatePaths = true;\n \t},\n\n \tonAdd: function () {\n \t\tRenderer.prototype.onAdd.call(this);\n\n \t\t// Redraw vectors since canvas is cleared upon removal,\n \t\t// in case of removing the renderer itself from the map.\n \t\tthis._draw();\n \t},\n\n \t_initContainer: function () {\n \t\tvar container = this._container = document.createElement('canvas');\n\n \t\ton(container, 'mousemove', this._onMouseMove, this);\n \t\ton(container, 'click dblclick mousedown mouseup contextmenu', this._onClick, this);\n \t\ton(container, 'mouseout', this._handleMouseOut, this);\n \t\tcontainer['_leaflet_disable_events'] = true;\n\n \t\tthis._ctx = container.getContext('2d');\n \t},\n\n \t_destroyContainer: function () {\n \t\tcancelAnimFrame(this._redrawRequest);\n \t\tdelete this._ctx;\n \t\tremove(this._container);\n \t\toff(this._container);\n \t\tdelete this._container;\n \t},\n\n \t_updatePaths: function () {\n \t\tif (this._postponeUpdatePaths) { return; }\n\n \t\tvar layer;\n \t\tthis._redrawBounds = null;\n \t\tfor (var id in this._layers) {\n \t\t\tlayer = this._layers[id];\n \t\t\tlayer._update();\n \t\t}\n \t\tthis._redraw();\n \t},\n\n \t_update: function () {\n \t\tif (this._map._animatingZoom && this._bounds) { return; }\n\n \t\tRenderer.prototype._update.call(this);\n\n \t\tvar b = this._bounds,\n \t\t container = this._container,\n \t\t size = b.getSize(),\n \t\t m = Browser.retina ? 2 : 1;\n\n \t\tsetPosition(container, b.min);\n\n \t\t// set canvas size (also clearing it); use double size on retina\n \t\tcontainer.width = m * size.x;\n \t\tcontainer.height = m * size.y;\n \t\tcontainer.style.width = size.x + 'px';\n \t\tcontainer.style.height = size.y + 'px';\n\n \t\tif (Browser.retina) {\n \t\t\tthis._ctx.scale(2, 2);\n \t\t}\n\n \t\t// translate so we use the same path coordinates after canvas element moves\n \t\tthis._ctx.translate(-b.min.x, -b.min.y);\n\n \t\t// Tell paths to redraw themselves\n \t\tthis.fire('update');\n \t},\n\n \t_reset: function () {\n \t\tRenderer.prototype._reset.call(this);\n\n \t\tif (this._postponeUpdatePaths) {\n \t\t\tthis._postponeUpdatePaths = false;\n \t\t\tthis._updatePaths();\n \t\t}\n \t},\n\n \t_initPath: function (layer) {\n \t\tthis._updateDashArray(layer);\n \t\tthis._layers[stamp(layer)] = layer;\n\n \t\tvar order = layer._order = {\n \t\t\tlayer: layer,\n \t\t\tprev: this._drawLast,\n \t\t\tnext: null\n \t\t};\n \t\tif (this._drawLast) { this._drawLast.next = order; }\n \t\tthis._drawLast = order;\n \t\tthis._drawFirst = this._drawFirst || this._drawLast;\n \t},\n\n \t_addPath: function (layer) {\n \t\tthis._requestRedraw(layer);\n \t},\n\n \t_removePath: function (layer) {\n \t\tvar order = layer._order;\n \t\tvar next = order.next;\n \t\tvar prev = order.prev;\n\n \t\tif (next) {\n \t\t\tnext.prev = prev;\n \t\t} else {\n \t\t\tthis._drawLast = prev;\n \t\t}\n \t\tif (prev) {\n \t\t\tprev.next = next;\n \t\t} else {\n \t\t\tthis._drawFirst = next;\n \t\t}\n\n \t\tdelete layer._order;\n\n \t\tdelete this._layers[stamp(layer)];\n\n \t\tthis._requestRedraw(layer);\n \t},\n\n \t_updatePath: function (layer) {\n \t\t// Redraw the union of the layer's old pixel\n \t\t// bounds and the new pixel bounds.\n \t\tthis._extendRedrawBounds(layer);\n \t\tlayer._project();\n \t\tlayer._update();\n \t\t// The redraw will extend the redraw bounds\n \t\t// with the new pixel bounds.\n \t\tthis._requestRedraw(layer);\n \t},\n\n \t_updateStyle: function (layer) {\n \t\tthis._updateDashArray(layer);\n \t\tthis._requestRedraw(layer);\n \t},\n\n \t_updateDashArray: function (layer) {\n \t\tif (typeof layer.options.dashArray === 'string') {\n \t\t\tvar parts = layer.options.dashArray.split(/[, ]+/),\n \t\t\t dashArray = [],\n \t\t\t dashValue,\n \t\t\t i;\n \t\t\tfor (i = 0; i < parts.length; i++) {\n \t\t\t\tdashValue = Number(parts[i]);\n \t\t\t\t// Ignore dash array containing invalid lengths\n \t\t\t\tif (isNaN(dashValue)) { return; }\n \t\t\t\tdashArray.push(dashValue);\n \t\t\t}\n \t\t\tlayer.options._dashArray = dashArray;\n \t\t} else {\n \t\t\tlayer.options._dashArray = layer.options.dashArray;\n \t\t}\n \t},\n\n \t_requestRedraw: function (layer) {\n \t\tif (!this._map) { return; }\n\n \t\tthis._extendRedrawBounds(layer);\n \t\tthis._redrawRequest = this._redrawRequest || requestAnimFrame(this._redraw, this);\n \t},\n\n \t_extendRedrawBounds: function (layer) {\n \t\tif (layer._pxBounds) {\n \t\t\tvar padding = (layer.options.weight || 0) + 1;\n \t\t\tthis._redrawBounds = this._redrawBounds || new Bounds();\n \t\t\tthis._redrawBounds.extend(layer._pxBounds.min.subtract([padding, padding]));\n \t\t\tthis._redrawBounds.extend(layer._pxBounds.max.add([padding, padding]));\n \t\t}\n \t},\n\n \t_redraw: function () {\n \t\tthis._redrawRequest = null;\n\n \t\tif (this._redrawBounds) {\n \t\t\tthis._redrawBounds.min._floor();\n \t\t\tthis._redrawBounds.max._ceil();\n \t\t}\n\n \t\tthis._clear(); // clear layers in redraw bounds\n \t\tthis._draw(); // draw layers\n\n \t\tthis._redrawBounds = null;\n \t},\n\n \t_clear: function () {\n \t\tvar bounds = this._redrawBounds;\n \t\tif (bounds) {\n \t\t\tvar size = bounds.getSize();\n \t\t\tthis._ctx.clearRect(bounds.min.x, bounds.min.y, size.x, size.y);\n \t\t} else {\n \t\t\tthis._ctx.save();\n \t\t\tthis._ctx.setTransform(1, 0, 0, 1, 0, 0);\n \t\t\tthis._ctx.clearRect(0, 0, this._container.width, this._container.height);\n \t\t\tthis._ctx.restore();\n \t\t}\n \t},\n\n \t_draw: function () {\n \t\tvar layer, bounds = this._redrawBounds;\n \t\tthis._ctx.save();\n \t\tif (bounds) {\n \t\t\tvar size = bounds.getSize();\n \t\t\tthis._ctx.beginPath();\n \t\t\tthis._ctx.rect(bounds.min.x, bounds.min.y, size.x, size.y);\n \t\t\tthis._ctx.clip();\n \t\t}\n\n \t\tthis._drawing = true;\n\n \t\tfor (var order = this._drawFirst; order; order = order.next) {\n \t\t\tlayer = order.layer;\n \t\t\tif (!bounds || (layer._pxBounds && layer._pxBounds.intersects(bounds))) {\n \t\t\t\tlayer._updatePath();\n \t\t\t}\n \t\t}\n\n \t\tthis._drawing = false;\n\n \t\tthis._ctx.restore(); // Restore state before clipping.\n \t},\n\n \t_updatePoly: function (layer, closed) {\n \t\tif (!this._drawing) { return; }\n\n \t\tvar i, j, len2, p,\n \t\t parts = layer._parts,\n \t\t len = parts.length,\n \t\t ctx = this._ctx;\n\n \t\tif (!len) { return; }\n\n \t\tctx.beginPath();\n\n \t\tfor (i = 0; i < len; i++) {\n \t\t\tfor (j = 0, len2 = parts[i].length; j < len2; j++) {\n \t\t\t\tp = parts[i][j];\n \t\t\t\tctx[j ? 'lineTo' : 'moveTo'](p.x, p.y);\n \t\t\t}\n \t\t\tif (closed) {\n \t\t\t\tctx.closePath();\n \t\t\t}\n \t\t}\n\n \t\tthis._fillStroke(ctx, layer);\n\n \t\t// TODO optimization: 1 fill/stroke for all features with equal style instead of 1 for each feature\n \t},\n\n \t_updateCircle: function (layer) {\n\n \t\tif (!this._drawing || layer._empty()) { return; }\n\n \t\tvar p = layer._point,\n \t\t ctx = this._ctx,\n \t\t r = Math.max(Math.round(layer._radius), 1),\n \t\t s = (Math.max(Math.round(layer._radiusY), 1) || r) / r;\n\n \t\tif (s !== 1) {\n \t\t\tctx.save();\n \t\t\tctx.scale(1, s);\n \t\t}\n\n \t\tctx.beginPath();\n \t\tctx.arc(p.x, p.y / s, r, 0, Math.PI * 2, false);\n\n \t\tif (s !== 1) {\n \t\t\tctx.restore();\n \t\t}\n\n \t\tthis._fillStroke(ctx, layer);\n \t},\n\n \t_fillStroke: function (ctx, layer) {\n \t\tvar options = layer.options;\n\n \t\tif (options.fill) {\n \t\t\tctx.globalAlpha = options.fillOpacity;\n \t\t\tctx.fillStyle = options.fillColor || options.color;\n \t\t\tctx.fill(options.fillRule || 'evenodd');\n \t\t}\n\n \t\tif (options.stroke && options.weight !== 0) {\n \t\t\tif (ctx.setLineDash) {\n \t\t\t\tctx.setLineDash(layer.options && layer.options._dashArray || []);\n \t\t\t}\n \t\t\tctx.globalAlpha = options.opacity;\n \t\t\tctx.lineWidth = options.weight;\n \t\t\tctx.strokeStyle = options.color;\n \t\t\tctx.lineCap = options.lineCap;\n \t\t\tctx.lineJoin = options.lineJoin;\n \t\t\tctx.stroke();\n \t\t}\n \t},\n\n \t// Canvas obviously doesn't have mouse events for individual drawn objects,\n \t// so we emulate that by calculating what's under the mouse on mousemove/click manually\n\n \t_onClick: function (e) {\n \t\tvar point = this._map.mouseEventToLayerPoint(e), layer, clickedLayer;\n\n \t\tfor (var order = this._drawFirst; order; order = order.next) {\n \t\t\tlayer = order.layer;\n \t\t\tif (layer.options.interactive && layer._containsPoint(point)) {\n \t\t\t\tif (!(e.type === 'click' || e.type === 'preclick') || !this._map._draggableMoved(layer)) {\n \t\t\t\t\tclickedLayer = layer;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\tthis._fireEvent(clickedLayer ? [clickedLayer] : false, e);\n \t},\n\n \t_onMouseMove: function (e) {\n \t\tif (!this._map || this._map.dragging.moving() || this._map._animatingZoom) { return; }\n\n \t\tvar point = this._map.mouseEventToLayerPoint(e);\n \t\tthis._handleMouseHover(e, point);\n \t},\n\n\n \t_handleMouseOut: function (e) {\n \t\tvar layer = this._hoveredLayer;\n \t\tif (layer) {\n \t\t\t// if we're leaving the layer, fire mouseout\n \t\t\tremoveClass(this._container, 'leaflet-interactive');\n \t\t\tthis._fireEvent([layer], e, 'mouseout');\n \t\t\tthis._hoveredLayer = null;\n \t\t\tthis._mouseHoverThrottled = false;\n \t\t}\n \t},\n\n \t_handleMouseHover: function (e, point) {\n \t\tif (this._mouseHoverThrottled) {\n \t\t\treturn;\n \t\t}\n\n \t\tvar layer, candidateHoveredLayer;\n\n \t\tfor (var order = this._drawFirst; order; order = order.next) {\n \t\t\tlayer = order.layer;\n \t\t\tif (layer.options.interactive && layer._containsPoint(point)) {\n \t\t\t\tcandidateHoveredLayer = layer;\n \t\t\t}\n \t\t}\n\n \t\tif (candidateHoveredLayer !== this._hoveredLayer) {\n \t\t\tthis._handleMouseOut(e);\n\n \t\t\tif (candidateHoveredLayer) {\n \t\t\t\taddClass(this._container, 'leaflet-interactive'); // change cursor\n \t\t\t\tthis._fireEvent([candidateHoveredLayer], e, 'mouseover');\n \t\t\t\tthis._hoveredLayer = candidateHoveredLayer;\n \t\t\t}\n \t\t}\n\n \t\tthis._fireEvent(this._hoveredLayer ? [this._hoveredLayer] : false, e);\n\n \t\tthis._mouseHoverThrottled = true;\n \t\tsetTimeout(bind(function () {\n \t\t\tthis._mouseHoverThrottled = false;\n \t\t}, this), 32);\n \t},\n\n \t_fireEvent: function (layers, e, type) {\n \t\tthis._map._fireDOMEvent(e, type || e.type, layers);\n \t},\n\n \t_bringToFront: function (layer) {\n \t\tvar order = layer._order;\n\n \t\tif (!order) { return; }\n\n \t\tvar next = order.next;\n \t\tvar prev = order.prev;\n\n \t\tif (next) {\n \t\t\tnext.prev = prev;\n \t\t} else {\n \t\t\t// Already last\n \t\t\treturn;\n \t\t}\n \t\tif (prev) {\n \t\t\tprev.next = next;\n \t\t} else if (next) {\n \t\t\t// Update first entry unless this is the\n \t\t\t// single entry\n \t\t\tthis._drawFirst = next;\n \t\t}\n\n \t\torder.prev = this._drawLast;\n \t\tthis._drawLast.next = order;\n\n \t\torder.next = null;\n \t\tthis._drawLast = order;\n\n \t\tthis._requestRedraw(layer);\n \t},\n\n \t_bringToBack: function (layer) {\n \t\tvar order = layer._order;\n\n \t\tif (!order) { return; }\n\n \t\tvar next = order.next;\n \t\tvar prev = order.prev;\n\n \t\tif (prev) {\n \t\t\tprev.next = next;\n \t\t} else {\n \t\t\t// Already first\n \t\t\treturn;\n \t\t}\n \t\tif (next) {\n \t\t\tnext.prev = prev;\n \t\t} else if (prev) {\n \t\t\t// Update last entry unless this is the\n \t\t\t// single entry\n \t\t\tthis._drawLast = prev;\n \t\t}\n\n \t\torder.prev = null;\n\n \t\torder.next = this._drawFirst;\n \t\tthis._drawFirst.prev = order;\n \t\tthis._drawFirst = order;\n\n \t\tthis._requestRedraw(layer);\n \t}\n });\n\n // @factory L.canvas(options?: Renderer options)\n // Creates a Canvas renderer with the given options.\n function canvas(options) {\n \treturn Browser.canvas ? new Canvas(options) : null;\n }\n\n /*\n * Thanks to Dmitry Baranovsky and his Raphael library for inspiration!\n */\n\n\n var vmlCreate = (function () {\n \ttry {\n \t\tdocument.namespaces.add('lvml', 'urn:schemas-microsoft-com:vml');\n \t\treturn function (name) {\n \t\t\treturn document.createElement('<lvml:' + name + ' class=\"lvml\">');\n \t\t};\n \t} catch (e) {\n \t\t// Do not return fn from catch block so `e` can be garbage collected\n \t\t// See https://github.com/Leaflet/Leaflet/pull/7279\n \t}\n \treturn function (name) {\n \t\treturn document.createElement('<' + name + ' xmlns=\"urn:schemas-microsoft.com:vml\" class=\"lvml\">');\n \t};\n })();\n\n\n /*\n * @class SVG\n *\n *\n * VML was deprecated in 2012, which means VML functionality exists only for backwards compatibility\n * with old versions of Internet Explorer.\n */\n\n // mixin to redefine some SVG methods to handle VML syntax which is similar but with some differences\n var vmlMixin = {\n\n \t_initContainer: function () {\n \t\tthis._container = create$1('div', 'leaflet-vml-container');\n \t},\n\n \t_update: function () {\n \t\tif (this._map._animatingZoom) { return; }\n \t\tRenderer.prototype._update.call(this);\n \t\tthis.fire('update');\n \t},\n\n \t_initPath: function (layer) {\n \t\tvar container = layer._container = vmlCreate('shape');\n\n \t\taddClass(container, 'leaflet-vml-shape ' + (this.options.className || ''));\n\n \t\tcontainer.coordsize = '1 1';\n\n \t\tlayer._path = vmlCreate('path');\n \t\tcontainer.appendChild(layer._path);\n\n \t\tthis._updateStyle(layer);\n \t\tthis._layers[stamp(layer)] = layer;\n \t},\n\n \t_addPath: function (layer) {\n \t\tvar container = layer._container;\n \t\tthis._container.appendChild(container);\n\n \t\tif (layer.options.interactive) {\n \t\t\tlayer.addInteractiveTarget(container);\n \t\t}\n \t},\n\n \t_removePath: function (layer) {\n \t\tvar container = layer._container;\n \t\tremove(container);\n \t\tlayer.removeInteractiveTarget(container);\n \t\tdelete this._layers[stamp(layer)];\n \t},\n\n \t_updateStyle: function (layer) {\n \t\tvar stroke = layer._stroke,\n \t\t fill = layer._fill,\n \t\t options = layer.options,\n \t\t container = layer._container;\n\n \t\tcontainer.stroked = !!options.stroke;\n \t\tcontainer.filled = !!options.fill;\n\n \t\tif (options.stroke) {\n \t\t\tif (!stroke) {\n \t\t\t\tstroke = layer._stroke = vmlCreate('stroke');\n \t\t\t}\n \t\t\tcontainer.appendChild(stroke);\n \t\t\tstroke.weight = options.weight + 'px';\n \t\t\tstroke.color = options.color;\n \t\t\tstroke.opacity = options.opacity;\n\n \t\t\tif (options.dashArray) {\n \t\t\t\tstroke.dashStyle = isArray(options.dashArray) ?\n \t\t\t\t options.dashArray.join(' ') :\n \t\t\t\t options.dashArray.replace(/( *, *)/g, ' ');\n \t\t\t} else {\n \t\t\t\tstroke.dashStyle = '';\n \t\t\t}\n \t\t\tstroke.endcap = options.lineCap.replace('butt', 'flat');\n \t\t\tstroke.joinstyle = options.lineJoin;\n\n \t\t} else if (stroke) {\n \t\t\tcontainer.removeChild(stroke);\n \t\t\tlayer._stroke = null;\n \t\t}\n\n \t\tif (options.fill) {\n \t\t\tif (!fill) {\n \t\t\t\tfill = layer._fill = vmlCreate('fill');\n \t\t\t}\n \t\t\tcontainer.appendChild(fill);\n \t\t\tfill.color = options.fillColor || options.color;\n \t\t\tfill.opacity = options.fillOpacity;\n\n \t\t} else if (fill) {\n \t\t\tcontainer.removeChild(fill);\n \t\t\tlayer._fill = null;\n \t\t}\n \t},\n\n \t_updateCircle: function (layer) {\n \t\tvar p = layer._point.round(),\n \t\t r = Math.round(layer._radius),\n \t\t r2 = Math.round(layer._radiusY || r);\n\n \t\tthis._setPath(layer, layer._empty() ? 'M0 0' :\n \t\t\t'AL ' + p.x + ',' + p.y + ' ' + r + ',' + r2 + ' 0,' + (65535 * 360));\n \t},\n\n \t_setPath: function (layer, path) {\n \t\tlayer._path.v = path;\n \t},\n\n \t_bringToFront: function (layer) {\n \t\ttoFront(layer._container);\n \t},\n\n \t_bringToBack: function (layer) {\n \t\ttoBack(layer._container);\n \t}\n };\n\n var create = Browser.vml ? vmlCreate : svgCreate;\n\n /*\n * @class SVG\n * @inherits Renderer\n * @aka L.SVG\n *\n * Allows vector layers to be displayed with [SVG](https://developer.mozilla.org/docs/Web/SVG).\n * Inherits `Renderer`.\n *\n * Due to [technical limitations](https://caniuse.com/svg), SVG is not\n * available in all web browsers, notably Android 2.x and 3.x.\n *\n * Although SVG is not available on IE7 and IE8, these browsers support\n * [VML](https://en.wikipedia.org/wiki/Vector_Markup_Language)\n * (a now deprecated technology), and the SVG renderer will fall back to VML in\n * this case.\n *\n * @example\n *\n * Use SVG by default for all paths in the map:\n *\n * ```js\n * var map = L.map('map', {\n * \trenderer: L.svg()\n * });\n * ```\n *\n * Use a SVG renderer with extra padding for specific vector geometries:\n *\n * ```js\n * var map = L.map('map');\n * var myRenderer = L.svg({ padding: 0.5 });\n * var line = L.polyline( coordinates, { renderer: myRenderer } );\n * var circle = L.circle( center, { renderer: myRenderer } );\n * ```\n */\n\n var SVG = Renderer.extend({\n\n \t_initContainer: function () {\n \t\tthis._container = create('svg');\n\n \t\t// makes it possible to click through svg root; we'll reset it back in individual paths\n \t\tthis._container.setAttribute('pointer-events', 'none');\n\n \t\tthis._rootGroup = create('g');\n \t\tthis._container.appendChild(this._rootGroup);\n \t},\n\n \t_destroyContainer: function () {\n \t\tremove(this._container);\n \t\toff(this._container);\n \t\tdelete this._container;\n \t\tdelete this._rootGroup;\n \t\tdelete this._svgSize;\n \t},\n\n \t_update: function () {\n \t\tif (this._map._animatingZoom && this._bounds) { return; }\n\n \t\tRenderer.prototype._update.call(this);\n\n \t\tvar b = this._bounds,\n \t\t size = b.getSize(),\n \t\t container = this._container;\n\n \t\t// set size of svg-container if changed\n \t\tif (!this._svgSize || !this._svgSize.equals(size)) {\n \t\t\tthis._svgSize = size;\n \t\t\tcontainer.setAttribute('width', size.x);\n \t\t\tcontainer.setAttribute('height', size.y);\n \t\t}\n\n \t\t// movement: update container viewBox so that we don't have to change coordinates of individual layers\n \t\tsetPosition(container, b.min);\n \t\tcontainer.setAttribute('viewBox', [b.min.x, b.min.y, size.x, size.y].join(' '));\n\n \t\tthis.fire('update');\n \t},\n\n \t// methods below are called by vector layers implementations\n\n \t_initPath: function (layer) {\n \t\tvar path = layer._path = create('path');\n\n \t\t// @namespace Path\n \t\t// @option className: String = null\n \t\t// Custom class name set on an element. Only for SVG renderer.\n \t\tif (layer.options.className) {\n \t\t\taddClass(path, layer.options.className);\n \t\t}\n\n \t\tif (layer.options.interactive) {\n \t\t\taddClass(path, 'leaflet-interactive');\n \t\t}\n\n \t\tthis._updateStyle(layer);\n \t\tthis._layers[stamp(layer)] = layer;\n \t},\n\n \t_addPath: function (layer) {\n \t\tif (!this._rootGroup) { this._initContainer(); }\n \t\tthis._rootGroup.appendChild(layer._path);\n \t\tlayer.addInteractiveTarget(layer._path);\n \t},\n\n \t_removePath: function (layer) {\n \t\tremove(layer._path);\n \t\tlayer.removeInteractiveTarget(layer._path);\n \t\tdelete this._layers[stamp(layer)];\n \t},\n\n \t_updatePath: function (layer) {\n \t\tlayer._project();\n \t\tlayer._update();\n \t},\n\n \t_updateStyle: function (layer) {\n \t\tvar path = layer._path,\n \t\t options = layer.options;\n\n \t\tif (!path) { return; }\n\n \t\tif (options.stroke) {\n \t\t\tpath.setAttribute('stroke', options.color);\n \t\t\tpath.setAttribute('stroke-opacity', options.opacity);\n \t\t\tpath.setAttribute('stroke-width', options.weight);\n \t\t\tpath.setAttribute('stroke-linecap', options.lineCap);\n \t\t\tpath.setAttribute('stroke-linejoin', options.lineJoin);\n\n \t\t\tif (options.dashArray) {\n \t\t\t\tpath.setAttribute('stroke-dasharray', options.dashArray);\n \t\t\t} else {\n \t\t\t\tpath.removeAttribute('stroke-dasharray');\n \t\t\t}\n\n \t\t\tif (options.dashOffset) {\n \t\t\t\tpath.setAttribute('stroke-dashoffset', options.dashOffset);\n \t\t\t} else {\n \t\t\t\tpath.removeAttribute('stroke-dashoffset');\n \t\t\t}\n \t\t} else {\n \t\t\tpath.setAttribute('stroke', 'none');\n \t\t}\n\n \t\tif (options.fill) {\n \t\t\tpath.setAttribute('fill', options.fillColor || options.color);\n \t\t\tpath.setAttribute('fill-opacity', options.fillOpacity);\n \t\t\tpath.setAttribute('fill-rule', options.fillRule || 'evenodd');\n \t\t} else {\n \t\t\tpath.setAttribute('fill', 'none');\n \t\t}\n \t},\n\n \t_updatePoly: function (layer, closed) {\n \t\tthis._setPath(layer, pointsToPath(layer._parts, closed));\n \t},\n\n \t_updateCircle: function (layer) {\n \t\tvar p = layer._point,\n \t\t r = Math.max(Math.round(layer._radius), 1),\n \t\t r2 = Math.max(Math.round(layer._radiusY), 1) || r,\n \t\t arc = 'a' + r + ',' + r2 + ' 0 1,0 ';\n\n \t\t// drawing a circle with two half-arcs\n \t\tvar d = layer._empty() ? 'M0 0' :\n \t\t\t'M' + (p.x - r) + ',' + p.y +\n \t\t\tarc + (r * 2) + ',0 ' +\n \t\t\tarc + (-r * 2) + ',0 ';\n\n \t\tthis._setPath(layer, d);\n \t},\n\n \t_setPath: function (layer, path) {\n \t\tlayer._path.setAttribute('d', path);\n \t},\n\n \t// SVG does not have the concept of zIndex so we resort to changing the DOM order of elements\n \t_bringToFront: function (layer) {\n \t\ttoFront(layer._path);\n \t},\n\n \t_bringToBack: function (layer) {\n \t\ttoBack(layer._path);\n \t}\n });\n\n if (Browser.vml) {\n \tSVG.include(vmlMixin);\n }\n\n // @namespace SVG\n // @factory L.svg(options?: Renderer options)\n // Creates a SVG renderer with the given options.\n function svg(options) {\n \treturn Browser.svg || Browser.vml ? new SVG(options) : null;\n }\n\n Map.include({\n \t// @namespace Map; @method getRenderer(layer: Path): Renderer\n \t// Returns the instance of `Renderer` that should be used to render the given\n \t// `Path`. It will ensure that the `renderer` options of the map and paths\n \t// are respected, and that the renderers do exist on the map.\n \tgetRenderer: function (layer) {\n \t\t// @namespace Path; @option renderer: Renderer\n \t\t// Use this specific instance of `Renderer` for this path. Takes\n \t\t// precedence over the map's [default renderer](#map-renderer).\n \t\tvar renderer = layer.options.renderer || this._getPaneRenderer(layer.options.pane) || this.options.renderer || this._renderer;\n\n \t\tif (!renderer) {\n \t\t\trenderer = this._renderer = this._createRenderer();\n \t\t}\n\n \t\tif (!this.hasLayer(renderer)) {\n \t\t\tthis.addLayer(renderer);\n \t\t}\n \t\treturn renderer;\n \t},\n\n \t_getPaneRenderer: function (name) {\n \t\tif (name === 'overlayPane' || name === undefined) {\n \t\t\treturn false;\n \t\t}\n\n \t\tvar renderer = this._paneRenderers[name];\n \t\tif (renderer === undefined) {\n \t\t\trenderer = this._createRenderer({pane: name});\n \t\t\tthis._paneRenderers[name] = renderer;\n \t\t}\n \t\treturn renderer;\n \t},\n\n \t_createRenderer: function (options) {\n \t\t// @namespace Map; @option preferCanvas: Boolean = false\n \t\t// Whether `Path`s should be rendered on a `Canvas` renderer.\n \t\t// By default, all `Path`s are rendered in a `SVG` renderer.\n \t\treturn (this.options.preferCanvas && canvas(options)) || svg(options);\n \t}\n });\n\n /*\n * L.Rectangle extends Polygon and creates a rectangle when passed a LatLngBounds object.\n */\n\n /*\n * @class Rectangle\n * @aka L.Rectangle\n * @inherits Polygon\n *\n * A class for drawing rectangle overlays on a map. Extends `Polygon`.\n *\n * @example\n *\n * ```js\n * // define rectangle geographical bounds\n * var bounds = [[54.559322, -5.767822], [56.1210604, -3.021240]];\n *\n * // create an orange rectangle\n * L.rectangle(bounds, {color: \"#ff7800\", weight: 1}).addTo(map);\n *\n * // zoom the map to the rectangle bounds\n * map.fitBounds(bounds);\n * ```\n *\n */\n\n\n var Rectangle = Polygon.extend({\n \tinitialize: function (latLngBounds, options) {\n \t\tPolygon.prototype.initialize.call(this, this._boundsToLatLngs(latLngBounds), options);\n \t},\n\n \t// @method setBounds(latLngBounds: LatLngBounds): this\n \t// Redraws the rectangle with the passed bounds.\n \tsetBounds: function (latLngBounds) {\n \t\treturn this.setLatLngs(this._boundsToLatLngs(latLngBounds));\n \t},\n\n \t_boundsToLatLngs: function (latLngBounds) {\n \t\tlatLngBounds = toLatLngBounds(latLngBounds);\n \t\treturn [\n \t\t\tlatLngBounds.getSouthWest(),\n \t\t\tlatLngBounds.getNorthWest(),\n \t\t\tlatLngBounds.getNorthEast(),\n \t\t\tlatLngBounds.getSouthEast()\n \t\t];\n \t}\n });\n\n\n // @factory L.rectangle(latLngBounds: LatLngBounds, options?: Polyline options)\n function rectangle(latLngBounds, options) {\n \treturn new Rectangle(latLngBounds, options);\n }\n\n SVG.create = create;\n SVG.pointsToPath = pointsToPath;\n\n GeoJSON.geometryToLayer = geometryToLayer;\n GeoJSON.coordsToLatLng = coordsToLatLng;\n GeoJSON.coordsToLatLngs = coordsToLatLngs;\n GeoJSON.latLngToCoords = latLngToCoords;\n GeoJSON.latLngsToCoords = latLngsToCoords;\n GeoJSON.getFeature = getFeature;\n GeoJSON.asFeature = asFeature;\n\n /*\n * L.Handler.BoxZoom is used to add shift-drag zoom interaction to the map\n * (zoom to a selected bounding box), enabled by default.\n */\n\n // @namespace Map\n // @section Interaction Options\n Map.mergeOptions({\n \t// @option boxZoom: Boolean = true\n \t// Whether the map can be zoomed to a rectangular area specified by\n \t// dragging the mouse while pressing the shift key.\n \tboxZoom: true\n });\n\n var BoxZoom = Handler.extend({\n \tinitialize: function (map) {\n \t\tthis._map = map;\n \t\tthis._container = map._container;\n \t\tthis._pane = map._panes.overlayPane;\n \t\tthis._resetStateTimeout = 0;\n \t\tmap.on('unload', this._destroy, this);\n \t},\n\n \taddHooks: function () {\n \t\ton(this._container, 'mousedown', this._onMouseDown, this);\n \t},\n\n \tremoveHooks: function () {\n \t\toff(this._container, 'mousedown', this._onMouseDown, this);\n \t},\n\n \tmoved: function () {\n \t\treturn this._moved;\n \t},\n\n \t_destroy: function () {\n \t\tremove(this._pane);\n \t\tdelete this._pane;\n \t},\n\n \t_resetState: function () {\n \t\tthis._resetStateTimeout = 0;\n \t\tthis._moved = false;\n \t},\n\n \t_clearDeferredResetState: function () {\n \t\tif (this._resetStateTimeout !== 0) {\n \t\t\tclearTimeout(this._resetStateTimeout);\n \t\t\tthis._resetStateTimeout = 0;\n \t\t}\n \t},\n\n \t_onMouseDown: function (e) {\n \t\tif (!e.shiftKey || ((e.which !== 1) && (e.button !== 1))) { return false; }\n\n \t\t// Clear the deferred resetState if it hasn't executed yet, otherwise it\n \t\t// will interrupt the interaction and orphan a box element in the container.\n \t\tthis._clearDeferredResetState();\n \t\tthis._resetState();\n\n \t\tdisableTextSelection();\n \t\tdisableImageDrag();\n\n \t\tthis._startPoint = this._map.mouseEventToContainerPoint(e);\n\n \t\ton(document, {\n \t\t\tcontextmenu: stop,\n \t\t\tmousemove: this._onMouseMove,\n \t\t\tmouseup: this._onMouseUp,\n \t\t\tkeydown: this._onKeyDown\n \t\t}, this);\n \t},\n\n \t_onMouseMove: function (e) {\n \t\tif (!this._moved) {\n \t\t\tthis._moved = true;\n\n \t\t\tthis._box = create$1('div', 'leaflet-zoom-box', this._container);\n \t\t\taddClass(this._container, 'leaflet-crosshair');\n\n \t\t\tthis._map.fire('boxzoomstart');\n \t\t}\n\n \t\tthis._point = this._map.mouseEventToContainerPoint(e);\n\n \t\tvar bounds = new Bounds(this._point, this._startPoint),\n \t\t size = bounds.getSize();\n\n \t\tsetPosition(this._box, bounds.min);\n\n \t\tthis._box.style.width = size.x + 'px';\n \t\tthis._box.style.height = size.y + 'px';\n \t},\n\n \t_finish: function () {\n \t\tif (this._moved) {\n \t\t\tremove(this._box);\n \t\t\tremoveClass(this._container, 'leaflet-crosshair');\n \t\t}\n\n \t\tenableTextSelection();\n \t\tenableImageDrag();\n\n \t\toff(document, {\n \t\t\tcontextmenu: stop,\n \t\t\tmousemove: this._onMouseMove,\n \t\t\tmouseup: this._onMouseUp,\n \t\t\tkeydown: this._onKeyDown\n \t\t}, this);\n \t},\n\n \t_onMouseUp: function (e) {\n \t\tif ((e.which !== 1) && (e.button !== 1)) { return; }\n\n \t\tthis._finish();\n\n \t\tif (!this._moved) { return; }\n \t\t// Postpone to next JS tick so internal click event handling\n \t\t// still see it as \"moved\".\n \t\tthis._clearDeferredResetState();\n \t\tthis._resetStateTimeout = setTimeout(bind(this._resetState, this), 0);\n\n \t\tvar bounds = new LatLngBounds(\n \t\t this._map.containerPointToLatLng(this._startPoint),\n \t\t this._map.containerPointToLatLng(this._point));\n\n \t\tthis._map\n \t\t\t.fitBounds(bounds)\n \t\t\t.fire('boxzoomend', {boxZoomBounds: bounds});\n \t},\n\n \t_onKeyDown: function (e) {\n \t\tif (e.keyCode === 27) {\n \t\t\tthis._finish();\n \t\t\tthis._clearDeferredResetState();\n \t\t\tthis._resetState();\n \t\t}\n \t}\n });\n\n // @section Handlers\n // @property boxZoom: Handler\n // Box (shift-drag with mouse) zoom handler.\n Map.addInitHook('addHandler', 'boxZoom', BoxZoom);\n\n /*\n * L.Handler.DoubleClickZoom is used to handle double-click zoom on the map, enabled by default.\n */\n\n // @namespace Map\n // @section Interaction Options\n\n Map.mergeOptions({\n \t// @option doubleClickZoom: Boolean|String = true\n \t// Whether the map can be zoomed in by double clicking on it and\n \t// zoomed out by double clicking while holding shift. If passed\n \t// `'center'`, double-click zoom will zoom to the center of the\n \t// view regardless of where the mouse was.\n \tdoubleClickZoom: true\n });\n\n var DoubleClickZoom = Handler.extend({\n \taddHooks: function () {\n \t\tthis._map.on('dblclick', this._onDoubleClick, this);\n \t},\n\n \tremoveHooks: function () {\n \t\tthis._map.off('dblclick', this._onDoubleClick, this);\n \t},\n\n \t_onDoubleClick: function (e) {\n \t\tvar map = this._map,\n \t\t oldZoom = map.getZoom(),\n \t\t delta = map.options.zoomDelta,\n \t\t zoom = e.originalEvent.shiftKey ? oldZoom - delta : oldZoom + delta;\n\n \t\tif (map.options.doubleClickZoom === 'center') {\n \t\t\tmap.setZoom(zoom);\n \t\t} else {\n \t\t\tmap.setZoomAround(e.containerPoint, zoom);\n \t\t}\n \t}\n });\n\n // @section Handlers\n //\n // Map properties include interaction handlers that allow you to control\n // interaction behavior in runtime, enabling or disabling certain features such\n // as dragging or touch zoom (see `Handler` methods). For example:\n //\n // ```js\n // map.doubleClickZoom.disable();\n // ```\n //\n // @property doubleClickZoom: Handler\n // Double click zoom handler.\n Map.addInitHook('addHandler', 'doubleClickZoom', DoubleClickZoom);\n\n /*\n * L.Handler.MapDrag is used to make the map draggable (with panning inertia), enabled by default.\n */\n\n // @namespace Map\n // @section Interaction Options\n Map.mergeOptions({\n \t// @option dragging: Boolean = true\n \t// Whether the map is draggable with mouse/touch or not.\n \tdragging: true,\n\n \t// @section Panning Inertia Options\n \t// @option inertia: Boolean = *\n \t// If enabled, panning of the map will have an inertia effect where\n \t// the map builds momentum while dragging and continues moving in\n \t// the same direction for some time. Feels especially nice on touch\n \t// devices. Enabled by default.\n \tinertia: true,\n\n \t// @option inertiaDeceleration: Number = 3000\n \t// The rate with which the inertial movement slows down, in pixels/second².\n \tinertiaDeceleration: 3400, // px/s^2\n\n \t// @option inertiaMaxSpeed: Number = Infinity\n \t// Max speed of the inertial movement, in pixels/second.\n \tinertiaMaxSpeed: Infinity, // px/s\n\n \t// @option easeLinearity: Number = 0.2\n \teaseLinearity: 0.2,\n\n \t// TODO refactor, move to CRS\n \t// @option worldCopyJump: Boolean = false\n \t// With this option enabled, the map tracks when you pan to another \"copy\"\n \t// of the world and seamlessly jumps to the original one so that all overlays\n \t// like markers and vector layers are still visible.\n \tworldCopyJump: false,\n\n \t// @option maxBoundsViscosity: Number = 0.0\n \t// If `maxBounds` is set, this option will control how solid the bounds\n \t// are when dragging the map around. The default value of `0.0` allows the\n \t// user to drag outside the bounds at normal speed, higher values will\n \t// slow down map dragging outside bounds, and `1.0` makes the bounds fully\n \t// solid, preventing the user from dragging outside the bounds.\n \tmaxBoundsViscosity: 0.0\n });\n\n var Drag = Handler.extend({\n \taddHooks: function () {\n \t\tif (!this._draggable) {\n \t\t\tvar map = this._map;\n\n \t\t\tthis._draggable = new Draggable(map._mapPane, map._container);\n\n \t\t\tthis._draggable.on({\n \t\t\t\tdragstart: this._onDragStart,\n \t\t\t\tdrag: this._onDrag,\n \t\t\t\tdragend: this._onDragEnd\n \t\t\t}, this);\n\n \t\t\tthis._draggable.on('predrag', this._onPreDragLimit, this);\n \t\t\tif (map.options.worldCopyJump) {\n \t\t\t\tthis._draggable.on('predrag', this._onPreDragWrap, this);\n \t\t\t\tmap.on('zoomend', this._onZoomEnd, this);\n\n \t\t\t\tmap.whenReady(this._onZoomEnd, this);\n \t\t\t}\n \t\t}\n \t\taddClass(this._map._container, 'leaflet-grab leaflet-touch-drag');\n \t\tthis._draggable.enable();\n \t\tthis._positions = [];\n \t\tthis._times = [];\n \t},\n\n \tremoveHooks: function () {\n \t\tremoveClass(this._map._container, 'leaflet-grab');\n \t\tremoveClass(this._map._container, 'leaflet-touch-drag');\n \t\tthis._draggable.disable();\n \t},\n\n \tmoved: function () {\n \t\treturn this._draggable && this._draggable._moved;\n \t},\n\n \tmoving: function () {\n \t\treturn this._draggable && this._draggable._moving;\n \t},\n\n \t_onDragStart: function () {\n \t\tvar map = this._map;\n\n \t\tmap._stop();\n \t\tif (this._map.options.maxBounds && this._map.options.maxBoundsViscosity) {\n \t\t\tvar bounds = toLatLngBounds(this._map.options.maxBounds);\n\n \t\t\tthis._offsetLimit = toBounds(\n \t\t\t\tthis._map.latLngToContainerPoint(bounds.getNorthWest()).multiplyBy(-1),\n \t\t\t\tthis._map.latLngToContainerPoint(bounds.getSouthEast()).multiplyBy(-1)\n \t\t\t\t\t.add(this._map.getSize()));\n\n \t\t\tthis._viscosity = Math.min(1.0, Math.max(0.0, this._map.options.maxBoundsViscosity));\n \t\t} else {\n \t\t\tthis._offsetLimit = null;\n \t\t}\n\n \t\tmap\n \t\t .fire('movestart')\n \t\t .fire('dragstart');\n\n \t\tif (map.options.inertia) {\n \t\t\tthis._positions = [];\n \t\t\tthis._times = [];\n \t\t}\n \t},\n\n \t_onDrag: function (e) {\n \t\tif (this._map.options.inertia) {\n \t\t\tvar time = this._lastTime = +new Date(),\n \t\t\t pos = this._lastPos = this._draggable._absPos || this._draggable._newPos;\n\n \t\t\tthis._positions.push(pos);\n \t\t\tthis._times.push(time);\n\n \t\t\tthis._prunePositions(time);\n \t\t}\n\n \t\tthis._map\n \t\t .fire('move', e)\n \t\t .fire('drag', e);\n \t},\n\n \t_prunePositions: function (time) {\n \t\twhile (this._positions.length > 1 && time - this._times[0] > 50) {\n \t\t\tthis._positions.shift();\n \t\t\tthis._times.shift();\n \t\t}\n \t},\n\n \t_onZoomEnd: function () {\n \t\tvar pxCenter = this._map.getSize().divideBy(2),\n \t\t pxWorldCenter = this._map.latLngToLayerPoint([0, 0]);\n\n \t\tthis._initialWorldOffset = pxWorldCenter.subtract(pxCenter).x;\n \t\tthis._worldWidth = this._map.getPixelWorldBounds().getSize().x;\n \t},\n\n \t_viscousLimit: function (value, threshold) {\n \t\treturn value - (value - threshold) * this._viscosity;\n \t},\n\n \t_onPreDragLimit: function () {\n \t\tif (!this._viscosity || !this._offsetLimit) { return; }\n\n \t\tvar offset = this._draggable._newPos.subtract(this._draggable._startPos);\n\n \t\tvar limit = this._offsetLimit;\n \t\tif (offset.x < limit.min.x) { offset.x = this._viscousLimit(offset.x, limit.min.x); }\n \t\tif (offset.y < limit.min.y) { offset.y = this._viscousLimit(offset.y, limit.min.y); }\n \t\tif (offset.x > limit.max.x) { offset.x = this._viscousLimit(offset.x, limit.max.x); }\n \t\tif (offset.y > limit.max.y) { offset.y = this._viscousLimit(offset.y, limit.max.y); }\n\n \t\tthis._draggable._newPos = this._draggable._startPos.add(offset);\n \t},\n\n \t_onPreDragWrap: function () {\n \t\t// TODO refactor to be able to adjust map pane position after zoom\n \t\tvar worldWidth = this._worldWidth,\n \t\t halfWidth = Math.round(worldWidth / 2),\n \t\t dx = this._initialWorldOffset,\n \t\t x = this._draggable._newPos.x,\n \t\t newX1 = (x - halfWidth + dx) % worldWidth + halfWidth - dx,\n \t\t newX2 = (x + halfWidth + dx) % worldWidth - halfWidth - dx,\n \t\t newX = Math.abs(newX1 + dx) < Math.abs(newX2 + dx) ? newX1 : newX2;\n\n \t\tthis._draggable._absPos = this._draggable._newPos.clone();\n \t\tthis._draggable._newPos.x = newX;\n \t},\n\n \t_onDragEnd: function (e) {\n \t\tvar map = this._map,\n \t\t options = map.options,\n\n \t\t noInertia = !options.inertia || e.noInertia || this._times.length < 2;\n\n \t\tmap.fire('dragend', e);\n\n \t\tif (noInertia) {\n \t\t\tmap.fire('moveend');\n\n \t\t} else {\n \t\t\tthis._prunePositions(+new Date());\n\n \t\t\tvar direction = this._lastPos.subtract(this._positions[0]),\n \t\t\t duration = (this._lastTime - this._times[0]) / 1000,\n \t\t\t ease = options.easeLinearity,\n\n \t\t\t speedVector = direction.multiplyBy(ease / duration),\n \t\t\t speed = speedVector.distanceTo([0, 0]),\n\n \t\t\t limitedSpeed = Math.min(options.inertiaMaxSpeed, speed),\n \t\t\t limitedSpeedVector = speedVector.multiplyBy(limitedSpeed / speed),\n\n \t\t\t decelerationDuration = limitedSpeed / (options.inertiaDeceleration * ease),\n \t\t\t offset = limitedSpeedVector.multiplyBy(-decelerationDuration / 2).round();\n\n \t\t\tif (!offset.x && !offset.y) {\n \t\t\t\tmap.fire('moveend');\n\n \t\t\t} else {\n \t\t\t\toffset = map._limitOffset(offset, map.options.maxBounds);\n\n \t\t\t\trequestAnimFrame(function () {\n \t\t\t\t\tmap.panBy(offset, {\n \t\t\t\t\t\tduration: decelerationDuration,\n \t\t\t\t\t\teaseLinearity: ease,\n \t\t\t\t\t\tnoMoveStart: true,\n \t\t\t\t\t\tanimate: true\n \t\t\t\t\t});\n \t\t\t\t});\n \t\t\t}\n \t\t}\n \t}\n });\n\n // @section Handlers\n // @property dragging: Handler\n // Map dragging handler (by both mouse and touch).\n Map.addInitHook('addHandler', 'dragging', Drag);\n\n /*\n * L.Map.Keyboard is handling keyboard interaction with the map, enabled by default.\n */\n\n // @namespace Map\n // @section Keyboard Navigation Options\n Map.mergeOptions({\n \t// @option keyboard: Boolean = true\n \t// Makes the map focusable and allows users to navigate the map with keyboard\n \t// arrows and `+`/`-` keys.\n \tkeyboard: true,\n\n \t// @option keyboardPanDelta: Number = 80\n \t// Amount of pixels to pan when pressing an arrow key.\n \tkeyboardPanDelta: 80\n });\n\n var Keyboard = Handler.extend({\n\n \tkeyCodes: {\n \t\tleft: [37],\n \t\tright: [39],\n \t\tdown: [40],\n \t\tup: [38],\n \t\tzoomIn: [187, 107, 61, 171],\n \t\tzoomOut: [189, 109, 54, 173]\n \t},\n\n \tinitialize: function (map) {\n \t\tthis._map = map;\n\n \t\tthis._setPanDelta(map.options.keyboardPanDelta);\n \t\tthis._setZoomDelta(map.options.zoomDelta);\n \t},\n\n \taddHooks: function () {\n \t\tvar container = this._map._container;\n\n \t\t// make the container focusable by tabbing\n \t\tif (container.tabIndex <= 0) {\n \t\t\tcontainer.tabIndex = '0';\n \t\t}\n\n \t\ton(container, {\n \t\t\tfocus: this._onFocus,\n \t\t\tblur: this._onBlur,\n \t\t\tmousedown: this._onMouseDown\n \t\t}, this);\n\n \t\tthis._map.on({\n \t\t\tfocus: this._addHooks,\n \t\t\tblur: this._removeHooks\n \t\t}, this);\n \t},\n\n \tremoveHooks: function () {\n \t\tthis._removeHooks();\n\n \t\toff(this._map._container, {\n \t\t\tfocus: this._onFocus,\n \t\t\tblur: this._onBlur,\n \t\t\tmousedown: this._onMouseDown\n \t\t}, this);\n\n \t\tthis._map.off({\n \t\t\tfocus: this._addHooks,\n \t\t\tblur: this._removeHooks\n \t\t}, this);\n \t},\n\n \t_onMouseDown: function () {\n \t\tif (this._focused) { return; }\n\n \t\tvar body = document.body,\n \t\t docEl = document.documentElement,\n \t\t top = body.scrollTop || docEl.scrollTop,\n \t\t left = body.scrollLeft || docEl.scrollLeft;\n\n \t\tthis._map._container.focus();\n\n \t\twindow.scrollTo(left, top);\n \t},\n\n \t_onFocus: function () {\n \t\tthis._focused = true;\n \t\tthis._map.fire('focus');\n \t},\n\n \t_onBlur: function () {\n \t\tthis._focused = false;\n \t\tthis._map.fire('blur');\n \t},\n\n \t_setPanDelta: function (panDelta) {\n \t\tvar keys = this._panKeys = {},\n \t\t codes = this.keyCodes,\n \t\t i, len;\n\n \t\tfor (i = 0, len = codes.left.length; i < len; i++) {\n \t\t\tkeys[codes.left[i]] = [-1 * panDelta, 0];\n \t\t}\n \t\tfor (i = 0, len = codes.right.length; i < len; i++) {\n \t\t\tkeys[codes.right[i]] = [panDelta, 0];\n \t\t}\n \t\tfor (i = 0, len = codes.down.length; i < len; i++) {\n \t\t\tkeys[codes.down[i]] = [0, panDelta];\n \t\t}\n \t\tfor (i = 0, len = codes.up.length; i < len; i++) {\n \t\t\tkeys[codes.up[i]] = [0, -1 * panDelta];\n \t\t}\n \t},\n\n \t_setZoomDelta: function (zoomDelta) {\n \t\tvar keys = this._zoomKeys = {},\n \t\t codes = this.keyCodes,\n \t\t i, len;\n\n \t\tfor (i = 0, len = codes.zoomIn.length; i < len; i++) {\n \t\t\tkeys[codes.zoomIn[i]] = zoomDelta;\n \t\t}\n \t\tfor (i = 0, len = codes.zoomOut.length; i < len; i++) {\n \t\t\tkeys[codes.zoomOut[i]] = -zoomDelta;\n \t\t}\n \t},\n\n \t_addHooks: function () {\n \t\ton(document, 'keydown', this._onKeyDown, this);\n \t},\n\n \t_removeHooks: function () {\n \t\toff(document, 'keydown', this._onKeyDown, this);\n \t},\n\n \t_onKeyDown: function (e) {\n \t\tif (e.altKey || e.ctrlKey || e.metaKey) { return; }\n\n \t\tvar key = e.keyCode,\n \t\t map = this._map,\n \t\t offset;\n\n \t\tif (key in this._panKeys) {\n \t\t\tif (!map._panAnim || !map._panAnim._inProgress) {\n \t\t\t\toffset = this._panKeys[key];\n \t\t\t\tif (e.shiftKey) {\n \t\t\t\t\toffset = toPoint(offset).multiplyBy(3);\n \t\t\t\t}\n\n \t\t\t\tif (map.options.maxBounds) {\n \t\t\t\t\toffset = map._limitOffset(toPoint(offset), map.options.maxBounds);\n \t\t\t\t}\n\n \t\t\t\tif (map.options.worldCopyJump) {\n \t\t\t\t\tvar newLatLng = map.wrapLatLng(map.unproject(map.project(map.getCenter()).add(offset)));\n \t\t\t\t\tmap.panTo(newLatLng);\n \t\t\t\t} else {\n \t\t\t\t\tmap.panBy(offset);\n \t\t\t\t}\n \t\t\t}\n \t\t} else if (key in this._zoomKeys) {\n \t\t\tmap.setZoom(map.getZoom() + (e.shiftKey ? 3 : 1) * this._zoomKeys[key]);\n\n \t\t} else if (key === 27 && map._popup && map._popup.options.closeOnEscapeKey) {\n \t\t\tmap.closePopup();\n\n \t\t} else {\n \t\t\treturn;\n \t\t}\n\n \t\tstop(e);\n \t}\n });\n\n // @section Handlers\n // @section Handlers\n // @property keyboard: Handler\n // Keyboard navigation handler.\n Map.addInitHook('addHandler', 'keyboard', Keyboard);\n\n /*\n * L.Handler.ScrollWheelZoom is used by L.Map to enable mouse scroll wheel zoom on the map.\n */\n\n // @namespace Map\n // @section Interaction Options\n Map.mergeOptions({\n \t// @section Mouse wheel options\n \t// @option scrollWheelZoom: Boolean|String = true\n \t// Whether the map can be zoomed by using the mouse wheel. If passed `'center'`,\n \t// it will zoom to the center of the view regardless of where the mouse was.\n \tscrollWheelZoom: true,\n\n \t// @option wheelDebounceTime: Number = 40\n \t// Limits the rate at which a wheel can fire (in milliseconds). By default\n \t// user can't zoom via wheel more often than once per 40 ms.\n \twheelDebounceTime: 40,\n\n \t// @option wheelPxPerZoomLevel: Number = 60\n \t// How many scroll pixels (as reported by [L.DomEvent.getWheelDelta](#domevent-getwheeldelta))\n \t// mean a change of one full zoom level. Smaller values will make wheel-zooming\n \t// faster (and vice versa).\n \twheelPxPerZoomLevel: 60\n });\n\n var ScrollWheelZoom = Handler.extend({\n \taddHooks: function () {\n \t\ton(this._map._container, 'wheel', this._onWheelScroll, this);\n\n \t\tthis._delta = 0;\n \t},\n\n \tremoveHooks: function () {\n \t\toff(this._map._container, 'wheel', this._onWheelScroll, this);\n \t},\n\n \t_onWheelScroll: function (e) {\n \t\tvar delta = getWheelDelta(e);\n\n \t\tvar debounce = this._map.options.wheelDebounceTime;\n\n \t\tthis._delta += delta;\n \t\tthis._lastMousePos = this._map.mouseEventToContainerPoint(e);\n\n \t\tif (!this._startTime) {\n \t\t\tthis._startTime = +new Date();\n \t\t}\n\n \t\tvar left = Math.max(debounce - (+new Date() - this._startTime), 0);\n\n \t\tclearTimeout(this._timer);\n \t\tthis._timer = setTimeout(bind(this._performZoom, this), left);\n\n \t\tstop(e);\n \t},\n\n \t_performZoom: function () {\n \t\tvar map = this._map,\n \t\t zoom = map.getZoom(),\n \t\t snap = this._map.options.zoomSnap || 0;\n\n \t\tmap._stop(); // stop panning and fly animations if any\n\n \t\t// map the delta with a sigmoid function to -4..4 range leaning on -1..1\n \t\tvar d2 = this._delta / (this._map.options.wheelPxPerZoomLevel * 4),\n \t\t d3 = 4 * Math.log(2 / (1 + Math.exp(-Math.abs(d2)))) / Math.LN2,\n \t\t d4 = snap ? Math.ceil(d3 / snap) * snap : d3,\n \t\t delta = map._limitZoom(zoom + (this._delta > 0 ? d4 : -d4)) - zoom;\n\n \t\tthis._delta = 0;\n \t\tthis._startTime = null;\n\n \t\tif (!delta) { return; }\n\n \t\tif (map.options.scrollWheelZoom === 'center') {\n \t\t\tmap.setZoom(zoom + delta);\n \t\t} else {\n \t\t\tmap.setZoomAround(this._lastMousePos, zoom + delta);\n \t\t}\n \t}\n });\n\n // @section Handlers\n // @property scrollWheelZoom: Handler\n // Scroll wheel zoom handler.\n Map.addInitHook('addHandler', 'scrollWheelZoom', ScrollWheelZoom);\n\n /*\n * L.Map.TapHold is used to simulate `contextmenu` event on long hold,\n * which otherwise is not fired by mobile Safari.\n */\n\n var tapHoldDelay = 600;\n\n // @namespace Map\n // @section Interaction Options\n Map.mergeOptions({\n \t// @section Touch interaction options\n \t// @option tapHold: Boolean\n \t// Enables simulation of `contextmenu` event, default is `true` for mobile Safari.\n \ttapHold: Browser.touchNative && Browser.safari && Browser.mobile,\n\n \t// @option tapTolerance: Number = 15\n \t// The max number of pixels a user can shift his finger during touch\n \t// for it to be considered a valid tap.\n \ttapTolerance: 15\n });\n\n var TapHold = Handler.extend({\n \taddHooks: function () {\n \t\ton(this._map._container, 'touchstart', this._onDown, this);\n \t},\n\n \tremoveHooks: function () {\n \t\toff(this._map._container, 'touchstart', this._onDown, this);\n \t},\n\n \t_onDown: function (e) {\n \t\tclearTimeout(this._holdTimeout);\n \t\tif (e.touches.length !== 1) { return; }\n\n \t\tvar first = e.touches[0];\n \t\tthis._startPos = this._newPos = new Point(first.clientX, first.clientY);\n\n \t\tthis._holdTimeout = setTimeout(bind(function () {\n \t\t\tthis._cancel();\n \t\t\tif (!this._isTapValid()) { return; }\n\n \t\t\t// prevent simulated mouse events https://w3c.github.io/touch-events/#mouse-events\n \t\t\ton(document, 'touchend', preventDefault);\n \t\t\ton(document, 'touchend touchcancel', this._cancelClickPrevent);\n \t\t\tthis._simulateEvent('contextmenu', first);\n \t\t}, this), tapHoldDelay);\n\n \t\ton(document, 'touchend touchcancel contextmenu', this._cancel, this);\n \t\ton(document, 'touchmove', this._onMove, this);\n \t},\n\n \t_cancelClickPrevent: function cancelClickPrevent() {\n \t\toff(document, 'touchend', preventDefault);\n \t\toff(document, 'touchend touchcancel', cancelClickPrevent);\n \t},\n\n \t_cancel: function () {\n \t\tclearTimeout(this._holdTimeout);\n \t\toff(document, 'touchend touchcancel contextmenu', this._cancel, this);\n \t\toff(document, 'touchmove', this._onMove, this);\n \t},\n\n \t_onMove: function (e) {\n \t\tvar first = e.touches[0];\n \t\tthis._newPos = new Point(first.clientX, first.clientY);\n \t},\n\n \t_isTapValid: function () {\n \t\treturn this._newPos.distanceTo(this._startPos) <= this._map.options.tapTolerance;\n \t},\n\n \t_simulateEvent: function (type, e) {\n \t\tvar simulatedEvent = new MouseEvent(type, {\n \t\t\tbubbles: true,\n \t\t\tcancelable: true,\n \t\t\tview: window,\n \t\t\t// detail: 1,\n \t\t\tscreenX: e.screenX,\n \t\t\tscreenY: e.screenY,\n \t\t\tclientX: e.clientX,\n \t\t\tclientY: e.clientY,\n \t\t\t// button: 2,\n \t\t\t// buttons: 2\n \t\t});\n\n \t\tsimulatedEvent._simulated = true;\n\n \t\te.target.dispatchEvent(simulatedEvent);\n \t}\n });\n\n // @section Handlers\n // @property tapHold: Handler\n // Long tap handler to simulate `contextmenu` event (useful in mobile Safari).\n Map.addInitHook('addHandler', 'tapHold', TapHold);\n\n /*\n * L.Handler.TouchZoom is used by L.Map to add pinch zoom on supported mobile browsers.\n */\n\n // @namespace Map\n // @section Interaction Options\n Map.mergeOptions({\n \t// @section Touch interaction options\n \t// @option touchZoom: Boolean|String = *\n \t// Whether the map can be zoomed by touch-dragging with two fingers. If\n \t// passed `'center'`, it will zoom to the center of the view regardless of\n \t// where the touch events (fingers) were. Enabled for touch-capable web\n \t// browsers.\n \ttouchZoom: Browser.touch,\n\n \t// @option bounceAtZoomLimits: Boolean = true\n \t// Set it to false if you don't want the map to zoom beyond min/max zoom\n \t// and then bounce back when pinch-zooming.\n \tbounceAtZoomLimits: true\n });\n\n var TouchZoom = Handler.extend({\n \taddHooks: function () {\n \t\taddClass(this._map._container, 'leaflet-touch-zoom');\n \t\ton(this._map._container, 'touchstart', this._onTouchStart, this);\n \t},\n\n \tremoveHooks: function () {\n \t\tremoveClass(this._map._container, 'leaflet-touch-zoom');\n \t\toff(this._map._container, 'touchstart', this._onTouchStart, this);\n \t},\n\n \t_onTouchStart: function (e) {\n \t\tvar map = this._map;\n \t\tif (!e.touches || e.touches.length !== 2 || map._animatingZoom || this._zooming) { return; }\n\n \t\tvar p1 = map.mouseEventToContainerPoint(e.touches[0]),\n \t\t p2 = map.mouseEventToContainerPoint(e.touches[1]);\n\n \t\tthis._centerPoint = map.getSize()._divideBy(2);\n \t\tthis._startLatLng = map.containerPointToLatLng(this._centerPoint);\n \t\tif (map.options.touchZoom !== 'center') {\n \t\t\tthis._pinchStartLatLng = map.containerPointToLatLng(p1.add(p2)._divideBy(2));\n \t\t}\n\n \t\tthis._startDist = p1.distanceTo(p2);\n \t\tthis._startZoom = map.getZoom();\n\n \t\tthis._moved = false;\n \t\tthis._zooming = true;\n\n \t\tmap._stop();\n\n \t\ton(document, 'touchmove', this._onTouchMove, this);\n \t\ton(document, 'touchend touchcancel', this._onTouchEnd, this);\n\n \t\tpreventDefault(e);\n \t},\n\n \t_onTouchMove: function (e) {\n \t\tif (!e.touches || e.touches.length !== 2 || !this._zooming) { return; }\n\n \t\tvar map = this._map,\n \t\t p1 = map.mouseEventToContainerPoint(e.touches[0]),\n \t\t p2 = map.mouseEventToContainerPoint(e.touches[1]),\n \t\t scale = p1.distanceTo(p2) / this._startDist;\n\n \t\tthis._zoom = map.getScaleZoom(scale, this._startZoom);\n\n \t\tif (!map.options.bounceAtZoomLimits && (\n \t\t\t(this._zoom < map.getMinZoom() && scale < 1) ||\n \t\t\t(this._zoom > map.getMaxZoom() && scale > 1))) {\n \t\t\tthis._zoom = map._limitZoom(this._zoom);\n \t\t}\n\n \t\tif (map.options.touchZoom === 'center') {\n \t\t\tthis._center = this._startLatLng;\n \t\t\tif (scale === 1) { return; }\n \t\t} else {\n \t\t\t// Get delta from pinch to center, so centerLatLng is delta applied to initial pinchLatLng\n \t\t\tvar delta = p1._add(p2)._divideBy(2)._subtract(this._centerPoint);\n \t\t\tif (scale === 1 && delta.x === 0 && delta.y === 0) { return; }\n \t\t\tthis._center = map.unproject(map.project(this._pinchStartLatLng, this._zoom).subtract(delta), this._zoom);\n \t\t}\n\n \t\tif (!this._moved) {\n \t\t\tmap._moveStart(true, false);\n \t\t\tthis._moved = true;\n \t\t}\n\n \t\tcancelAnimFrame(this._animRequest);\n\n \t\tvar moveFn = bind(map._move, map, this._center, this._zoom, {pinch: true, round: false}, undefined);\n \t\tthis._animRequest = requestAnimFrame(moveFn, this, true);\n\n \t\tpreventDefault(e);\n \t},\n\n \t_onTouchEnd: function () {\n \t\tif (!this._moved || !this._zooming) {\n \t\t\tthis._zooming = false;\n \t\t\treturn;\n \t\t}\n\n \t\tthis._zooming = false;\n \t\tcancelAnimFrame(this._animRequest);\n\n \t\toff(document, 'touchmove', this._onTouchMove, this);\n \t\toff(document, 'touchend touchcancel', this._onTouchEnd, this);\n\n \t\t// Pinch updates GridLayers' levels only when zoomSnap is off, so zoomSnap becomes noUpdate.\n \t\tif (this._map.options.zoomAnimation) {\n \t\t\tthis._map._animateZoom(this._center, this._map._limitZoom(this._zoom), true, this._map.options.zoomSnap);\n \t\t} else {\n \t\t\tthis._map._resetView(this._center, this._map._limitZoom(this._zoom));\n \t\t}\n \t}\n });\n\n // @section Handlers\n // @property touchZoom: Handler\n // Touch zoom handler.\n Map.addInitHook('addHandler', 'touchZoom', TouchZoom);\n\n Map.BoxZoom = BoxZoom;\n Map.DoubleClickZoom = DoubleClickZoom;\n Map.Drag = Drag;\n Map.Keyboard = Keyboard;\n Map.ScrollWheelZoom = ScrollWheelZoom;\n Map.TapHold = TapHold;\n Map.TouchZoom = TouchZoom;\n\n exports.Bounds = Bounds;\n exports.Browser = Browser;\n exports.CRS = CRS;\n exports.Canvas = Canvas;\n exports.Circle = Circle;\n exports.CircleMarker = CircleMarker;\n exports.Class = Class;\n exports.Control = Control;\n exports.DivIcon = DivIcon;\n exports.DivOverlay = DivOverlay;\n exports.DomEvent = DomEvent;\n exports.DomUtil = DomUtil;\n exports.Draggable = Draggable;\n exports.Evented = Evented;\n exports.FeatureGroup = FeatureGroup;\n exports.GeoJSON = GeoJSON;\n exports.GridLayer = GridLayer;\n exports.Handler = Handler;\n exports.Icon = Icon;\n exports.ImageOverlay = ImageOverlay;\n exports.LatLng = LatLng;\n exports.LatLngBounds = LatLngBounds;\n exports.Layer = Layer;\n exports.LayerGroup = LayerGroup;\n exports.LineUtil = LineUtil;\n exports.Map = Map;\n exports.Marker = Marker;\n exports.Mixin = Mixin;\n exports.Path = Path;\n exports.Point = Point;\n exports.PolyUtil = PolyUtil;\n exports.Polygon = Polygon;\n exports.Polyline = Polyline;\n exports.Popup = Popup;\n exports.PosAnimation = PosAnimation;\n exports.Projection = index;\n exports.Rectangle = Rectangle;\n exports.Renderer = Renderer;\n exports.SVG = SVG;\n exports.SVGOverlay = SVGOverlay;\n exports.TileLayer = TileLayer;\n exports.Tooltip = Tooltip;\n exports.Transformation = Transformation;\n exports.Util = Util;\n exports.VideoOverlay = VideoOverlay;\n exports.bind = bind;\n exports.bounds = toBounds;\n exports.canvas = canvas;\n exports.circle = circle;\n exports.circleMarker = circleMarker;\n exports.control = control;\n exports.divIcon = divIcon;\n exports.extend = extend;\n exports.featureGroup = featureGroup;\n exports.geoJSON = geoJSON;\n exports.geoJson = geoJson;\n exports.gridLayer = gridLayer;\n exports.icon = icon;\n exports.imageOverlay = imageOverlay;\n exports.latLng = toLatLng;\n exports.latLngBounds = toLatLngBounds;\n exports.layerGroup = layerGroup;\n exports.map = createMap;\n exports.marker = marker;\n exports.point = toPoint;\n exports.polygon = polygon;\n exports.polyline = polyline;\n exports.popup = popup;\n exports.rectangle = rectangle;\n exports.setOptions = setOptions;\n exports.stamp = stamp;\n exports.svg = svg;\n exports.svgOverlay = svgOverlay;\n exports.tileLayer = tileLayer;\n exports.tooltip = tooltip;\n exports.transformation = toTransformation;\n exports.version = version;\n exports.videoOverlay = videoOverlay;\n\n var oldL = window.L;\n exports.noConflict = function() {\n \twindow.L = oldL;\n \treturn this;\n }\n // Always export us to window global (see #2364)\n window.L = exports;\n\n}));\n//# sourceMappingURL=leaflet-src.js.map\n","<script>\n\n import { map_store } from '../lib/stores.js';\n let last_click_latlng;\n\n let map_center;\n let map_zoom;\n let map_viewbox;\n let view_on_osm_link;\n let last_click;\n let mouse_position;\n\n function map_link_to_osm(map) {\n var zoom = map.getZoom();\n var lat = map.getCenter().lat.toFixed(5);\n var lng = map.getCenter().lng.toFixed(5);\n return 'https://openstreetmap.org/#map=' + zoom + '/' + lat + '/' + lng;\n }\n\n function map_viewbox_as_string(map) {\n var bounds = map.getBounds();\n var west = bounds.getWest();\n var east = bounds.getEast();\n\n if ((east - west) >= 360) { // covers more than whole planet\n west = map.getCenter().lng - 179.999;\n east = map.getCenter().lng + 179.999;\n }\n east = L.latLng(77, east).wrap().lng;\n west = L.latLng(77, west).wrap().lng;\n\n return [\n west.toFixed(5), // left\n bounds.getNorth().toFixed(5), // top\n east.toFixed(5), // right\n bounds.getSouth().toFixed(5) // bottom\n ].join(',');\n }\n\n function display_map_position(map, mouse_lat_lng) {\n map_center = map.getCenter().lat.toFixed(5) + ',' + map.getCenter().lng.toFixed(5);\n view_on_osm_link = map_link_to_osm(map);\n map_zoom = map.getZoom();\n map_viewbox = map_viewbox_as_string(map);\n mouse_position = '-';\n if (mouse_lat_lng) {\n mouse_position = [mouse_lat_lng.lat.toFixed(5), mouse_lat_lng.lng.toFixed(5)].join(',');\n }\n if (last_click_latlng) {\n last_click = [last_click_latlng.lat.toFixed(5), last_click_latlng.lng.toFixed(5)].join(',');\n }\n }\n\n\n map_store.subscribe(map => {\n if (!map) return;\n\n map.on('move', function () {\n display_map_position(map);\n // update_viewbox_field();\n });\n\n map.on('mousemove', function (e) {\n display_map_position(map, e.latlng);\n });\n\n map.on('click', function (e) {\n last_click_latlng = e.latlng;\n display_map_position(map);\n });\n\n map.on('load', function () {\n display_map_position(map);\n });\n });\n\n function handleHideClick() {\n document.getElementById('map-position').style.display = 'none';\n document.getElementById('show-map-position').style.display = 'block';\n }\n\n</script>\n\n<div id=\"map-position\">\n <div id=\"map-position-inner\">\n map center: {map_center}\n <a target=\"_blank\" rel=\"noreferrer\" href=\"{view_on_osm_link}\">view on osm.org</a>\n <br>\n map zoom: {map_zoom}\n <br>\n viewbox: {map_viewbox}\n <br>\n last click: {last_click}\n <br>\n mouse position: {mouse_position}\n </div>\n <div id=\"map-position-close\"><a href=\"#hide\" on:click={handleHideClick}>hide</a></div>\n</div>\n\n\n<style>\n #map-position {\n display: none;\n position: absolute;\n top: 0;\n right: 20px;\n padding: 0 5px;\n color: #333;\n font-size: 11px;\n background-color: rgba(255, 255, 255, 0.7);\n z-index: 1000;\n }\n\n #map-position-close {\n text-align: right;\n }\n\n \n \n\n @media (max-width: 768px) {\n #map-position {\n top: 20px;\n right: 20px;\n }\n }\n</style>\n","(function(factory,window){if(typeof define===\"function\"&&define.amd){define([\"leaflet\"],factory)}else if(typeof exports===\"object\"){module.exports=factory(require(\"leaflet\"))}if(typeof window!==\"undefined\"&&window.L){window.L.Control.MiniMap=factory(L);window.L.control.minimap=function(layer,options){return new window.L.Control.MiniMap(layer,options)}}})(function(L){var MiniMap=L.Control.extend({includes:L.Evented?L.Evented.prototype:L.Mixin.Events,options:{position:\"bottomright\",toggleDisplay:false,zoomLevelOffset:-5,zoomLevelFixed:false,centerFixed:false,zoomAnimation:false,autoToggleDisplay:false,minimized:false,width:150,height:150,collapsedWidth:19,collapsedHeight:19,aimingRectOptions:{color:\"#ff7800\",weight:1,clickable:false},shadowRectOptions:{color:\"#000000\",weight:1,clickable:false,opacity:0,fillOpacity:0},strings:{hideText:\"Hide MiniMap\",showText:\"Show MiniMap\"},mapOptions:{}},initialize:function(layer,options){L.Util.setOptions(this,options);this.options.aimingRectOptions.clickable=false;this.options.shadowRectOptions.clickable=false;this._layer=layer},onAdd:function(map){this._mainMap=map;this._container=L.DomUtil.create(\"div\",\"leaflet-control-minimap\");this._container.style.width=this.options.width+\"px\";this._container.style.height=this.options.height+\"px\";L.DomEvent.disableClickPropagation(this._container);L.DomEvent.on(this._container,\"mousewheel\",L.DomEvent.stopPropagation);var mapOptions={attributionControl:false,dragging:!this.options.centerFixed,zoomControl:false,zoomAnimation:this.options.zoomAnimation,autoToggleDisplay:this.options.autoToggleDisplay,touchZoom:this.options.centerFixed?\"center\":!this._isZoomLevelFixed(),scrollWheelZoom:this.options.centerFixed?\"center\":!this._isZoomLevelFixed(),doubleClickZoom:this.options.centerFixed?\"center\":!this._isZoomLevelFixed(),boxZoom:!this._isZoomLevelFixed(),crs:map.options.crs};mapOptions=L.Util.extend(this.options.mapOptions,mapOptions);this._miniMap=new L.Map(this._container,mapOptions);this._miniMap.addLayer(this._layer);this._mainMapMoving=false;this._miniMapMoving=false;this._userToggledDisplay=false;this._minimized=false;if(this.options.toggleDisplay){this._addToggleButton()}this._miniMap.whenReady(L.Util.bind(function(){this._aimingRect=L.rectangle(this._mainMap.getBounds(),this.options.aimingRectOptions).addTo(this._miniMap);this._shadowRect=L.rectangle(this._mainMap.getBounds(),this.options.shadowRectOptions).addTo(this._miniMap);this._mainMap.on(\"moveend\",this._onMainMapMoved,this);this._mainMap.on(\"move\",this._onMainMapMoving,this);this._miniMap.on(\"movestart\",this._onMiniMapMoveStarted,this);this._miniMap.on(\"move\",this._onMiniMapMoving,this);this._miniMap.on(\"moveend\",this._onMiniMapMoved,this)},this));return this._container},addTo:function(map){L.Control.prototype.addTo.call(this,map);var center=this.options.centerFixed||this._mainMap.getCenter();this._miniMap.setView(center,this._decideZoom(true));this._setDisplay(this.options.minimized);return this},onRemove:function(map){this._mainMap.off(\"moveend\",this._onMainMapMoved,this);this._mainMap.off(\"move\",this._onMainMapMoving,this);this._miniMap.off(\"moveend\",this._onMiniMapMoved,this);this._miniMap.removeLayer(this._layer)},changeLayer:function(layer){this._miniMap.removeLayer(this._layer);this._layer=layer;this._miniMap.addLayer(this._layer)},_addToggleButton:function(){this._toggleDisplayButton=this.options.toggleDisplay?this._createButton(\"\",this._toggleButtonInitialTitleText(),\"leaflet-control-minimap-toggle-display leaflet-control-minimap-toggle-display-\"+this.options.position,this._container,this._toggleDisplayButtonClicked,this):undefined;this._toggleDisplayButton.style.width=this.options.collapsedWidth+\"px\";this._toggleDisplayButton.style.height=this.options.collapsedHeight+\"px\"},_toggleButtonInitialTitleText:function(){if(this.options.minimized){return this.options.strings.showText}else{return this.options.strings.hideText}},_createButton:function(html,title,className,container,fn,context){var link=L.DomUtil.create(\"a\",className,container);link.innerHTML=html;link.href=\"#\";link.title=title;var stop=L.DomEvent.stopPropagation;L.DomEvent.on(link,\"click\",stop).on(link,\"mousedown\",stop).on(link,\"dblclick\",stop).on(link,\"click\",L.DomEvent.preventDefault).on(link,\"click\",fn,context);return link},_toggleDisplayButtonClicked:function(){this._userToggledDisplay=true;if(!this._minimized){this._minimize()}else{this._restore()}},_setDisplay:function(minimize){if(minimize!==this._minimized){if(!this._minimized){this._minimize()}else{this._restore()}}},_minimize:function(){if(this.options.toggleDisplay){this._container.style.width=this.options.collapsedWidth+\"px\";this._container.style.height=this.options.collapsedHeight+\"px\";this._toggleDisplayButton.className+=\" minimized-\"+this.options.position;this._toggleDisplayButton.title=this.options.strings.showText}else{this._container.style.display=\"none\"}this._minimized=true;this._onToggle()},_restore:function(){if(this.options.toggleDisplay){this._container.style.width=this.options.width+\"px\";this._container.style.height=this.options.height+\"px\";this._toggleDisplayButton.className=this._toggleDisplayButton.className.replace(\"minimized-\"+this.options.position,\"\");this._toggleDisplayButton.title=this.options.strings.hideText}else{this._container.style.display=\"block\"}this._minimized=false;this._onToggle()},_onMainMapMoved:function(e){if(!this._miniMapMoving){var center=this.options.centerFixed||this._mainMap.getCenter();this._mainMapMoving=true;this._miniMap.setView(center,this._decideZoom(true));this._setDisplay(this._decideMinimized())}else{this._miniMapMoving=false}this._aimingRect.setBounds(this._mainMap.getBounds())},_onMainMapMoving:function(e){this._aimingRect.setBounds(this._mainMap.getBounds())},_onMiniMapMoveStarted:function(e){if(!this.options.centerFixed){var lastAimingRect=this._aimingRect.getBounds();var sw=this._miniMap.latLngToContainerPoint(lastAimingRect.getSouthWest());var ne=this._miniMap.latLngToContainerPoint(lastAimingRect.getNorthEast());this._lastAimingRectPosition={sw:sw,ne:ne}}},_onMiniMapMoving:function(e){if(!this.options.centerFixed){if(!this._mainMapMoving&&this._lastAimingRectPosition){this._shadowRect.setBounds(new L.LatLngBounds(this._miniMap.containerPointToLatLng(this._lastAimingRectPosition.sw),this._miniMap.containerPointToLatLng(this._lastAimingRectPosition.ne)));this._shadowRect.setStyle({opacity:1,fillOpacity:.3})}}},_onMiniMapMoved:function(e){if(!this._mainMapMoving){this._miniMapMoving=true;this._mainMap.setView(this._miniMap.getCenter(),this._decideZoom(false));this._shadowRect.setStyle({opacity:0,fillOpacity:0})}else{this._mainMapMoving=false}},_isZoomLevelFixed:function(){var zoomLevelFixed=this.options.zoomLevelFixed;return this._isDefined(zoomLevelFixed)&&this._isInteger(zoomLevelFixed)},_decideZoom:function(fromMaintoMini){if(!this._isZoomLevelFixed()){if(fromMaintoMini){return this._mainMap.getZoom()+this.options.zoomLevelOffset}else{var currentDiff=this._miniMap.getZoom()-this._mainMap.getZoom();var proposedZoom=this._miniMap.getZoom()-this.options.zoomLevelOffset;var toRet;if(currentDiff>this.options.zoomLevelOffset&&this._mainMap.getZoom()<this._miniMap.getMinZoom()-this.options.zoomLevelOffset){if(this._miniMap.getZoom()>this._lastMiniMapZoom){toRet=this._mainMap.getZoom()+1;this._miniMap.setZoom(this._miniMap.getZoom()-1)}else{toRet=this._mainMap.getZoom()}}else{toRet=proposedZoom}this._lastMiniMapZoom=this._miniMap.getZoom();return toRet}}else{if(fromMaintoMini){return this.options.zoomLevelFixed}else{return this._mainMap.getZoom()}}},_decideMinimized:function(){if(this._userToggledDisplay){return this._minimized}if(this.options.autoToggleDisplay){if(this._mainMap.getBounds().contains(this._miniMap.getBounds())){return true}return false}return this._minimized},_isInteger:function(value){return typeof value===\"number\"},_isDefined:function(value){return typeof value!==\"undefined\"},_onToggle:function(){L.Util.requestAnimFrame(function(){L.DomEvent.on(this._container,\"transitionend\",this._fireToggleEvents,this);if(!L.Browser.any3d){L.Util.requestAnimFrame(this._fireToggleEvents,this)}},this)},_fireToggleEvents:function(){L.DomEvent.off(this._container,\"transitionend\",this._fireToggleEvents,this);var data={minimized:this._minimized};this.fire(this._minimized?\"minimize\":\"restore\",data);this.fire(\"toggle\",data)}});L.Map.mergeOptions({miniMapControl:false});L.Map.addInitHook(function(){if(this.options.miniMapControl){this.miniMapControl=(new MiniMap).addTo(this)}});return MiniMap},window);","\n<script>\n import * as L from 'leaflet';\n import 'leaflet-minimap';\n import 'leaflet/dist/leaflet.css';\n import 'leaflet-minimap/dist/Control.MiniMap.min.css';\n\n import { get } from 'svelte/store';\n import { map_store } from '../lib/stores.js';\n import MapPosition from '../components/MapPosition.svelte';\n\n export let display_minimap = false;\n export let current_result = null;\n export let position_marker = null;\n\n let dataLayers = [];\n\n function createMap(container) {\n const attribution = Nominatim_Config.Map_Tile_Attribution;\n\n let map = new L.map(container, {\n attributionControl: false,\n scrollWheelZoom: true, // !L.Browser.touch,\n touchZoom: false,\n center: [\n Nominatim_Config.Map_Default_Lat,\n Nominatim_Config.Map_Default_Lon\n ],\n zoom: Nominatim_Config.Map_Default_Zoom\n });\n\n if (attribution && attribution.length) {\n L.control.attribution({ prefix: '<a href=\"https://leafletjs.com/\">Leaflet</a>' }).addTo(map);\n }\n\n L.tileLayer(Nominatim_Config.Map_Tile_URL, {\n attribution: attribution\n }).addTo(map);\n\n if (display_minimap) {\n let osm2 = new L.TileLayer(Nominatim_Config.Map_Tile_URL, {\n minZoom: 0,\n maxZoom: 13,\n attribution: attribution\n });\n new L.Control.MiniMap(osm2, { toggleDisplay: true }).addTo(map);\n }\n\n const MapPositionControl = L.Control.extend({\n options: { position: 'topright' },\n onAdd: () => { return document.getElementById('show-map-position'); }\n });\n map.addControl(new MapPositionControl());\n\n return map;\n }\n\n function mapAction(container) {\n let map = createMap(container);\n map_store.set(map);\n setMapData(current_result);\n\n return {\n destroy: () => {\n map_store.set(null);\n map.remove();\n }\n };\n }\n\n function parse_and_normalize_geojson_string(part) {\n // normalize places the geometry into a featurecollection, similar to\n // https://github.com/mapbox/geojson-normalize\n var parsed_geojson = {\n type: 'FeatureCollection',\n features: [\n {\n type: 'Feature',\n geometry: part,\n properties: {}\n }\n ]\n };\n return parsed_geojson;\n }\n\n function resetMapData() {\n let map = get(map_store);\n if (!map) { return; }\n\n dataLayers.forEach(function (layer) {\n map.removeLayer(layer);\n });\n }\n\n function setMapData(aFeature) {\n let map = get(map_store);\n if (!map) { return; }\n\n resetMapData();\n\n if (position_marker) {\n // We don't need a marker, but L.circle would change radius when you zoom in/out\n let cm = L.circleMarker(\n position_marker,\n {\n radius: 5,\n weight: 2,\n fillColor: '#ff7800',\n color: 'red',\n opacity: 0.75,\n zIndexOffset: 100,\n clickable: false\n }\n );\n cm.bindTooltip(`Search (${position_marker[0]},${position_marker[1]})`).openTooltip();\n cm.addTo(map);\n dataLayers.push(cm);\n }\n\n var search_params = new URLSearchParams(window.location.search);\n var viewbox = search_params.get('viewbox');\n if (viewbox) {\n let coords = viewbox.split(','); // <x1>,<y1>,<x2>,<y2>\n let bounds = L.latLngBounds([coords[1], coords[0]], [coords[3], coords[2]]);\n L.rectangle(bounds, {\n color: '#69d53e',\n weight: 3,\n dashArray: '5 5',\n opacity: 0.8,\n fill: false\n }).addTo(map);\n }\n\n if (!aFeature) return;\n\n let lat = aFeature.centroid ? aFeature.centroid.coordinates[1] : aFeature.lat;\n let lon = aFeature.centroid ? aFeature.centroid.coordinates[0] : aFeature.lon;\n let geojson = aFeature.geometry || aFeature.geojson;\n\n if (lat && lon) {\n let circle = L.circleMarker([lat, lon], {\n radius: 10, weight: 2, fillColor: '#ff7800', color: 'blue', opacity: 0.75\n });\n if (position_marker) { // reverse result\n circle.bindTooltip('Result').openTooltip();\n }\n map.addLayer(circle);\n dataLayers.push(circle);\n }\n\n\n if (geojson) {\n var geojson_layer = L.geoJson(\n // https://leafletjs.com/reference-1.7.1.html#path-option\n parse_and_normalize_geojson_string(geojson),\n {\n style: function () {\n return { interactive: false, color: 'blue' };\n }\n }\n );\n map.addLayer(geojson_layer);\n dataLayers.push(geojson_layer);\n map.fitBounds(geojson_layer.getBounds());\n } else if (lat && lon && position_marker) {\n map.fitBounds([[lat, lon], position_marker], { padding: [50, 50] });\n } else if (lat && lon) {\n map.setView([lat, lon], 10);\n }\n }\n\n $: setMapData(current_result);\n\n function show_map_position_click(e) {\n e.target.style.display = 'none';\n document.getElementById('map-position').style.display = 'block';\n }\n</script>\n\n<MapPosition />\n<div id=\"map\" use:mapAction />\n<div id=\"show-map-position\" class=\"leaflet-bar btn btn-sm btn-outline-secondary\"\n on:click|stopPropagation={show_map_position_click}\n>show map bounds</div>\n\n<style>\n #map {\n height: 100%;\n background:#eee;\n }\n\n .btn-outline-secondary {\n background-color: white;\n }\n\n .btn-outline-secondary:hover {\n color: #111;\n }\n\n @media (max-width: 768px) {\n #map {\n height: 300px;\n }\n }\n\n</style>\n","<script>\n import { page, results_store } from '../lib/stores.js';\n import { fetch_from_api, update_html_title } from '../lib/api_utils.js';\n\n import Header from '../components/Header.svelte';\n import SearchSection from '../components/SearchSection.svelte';\n import ResultsList from '../components/ResultsList.svelte';\n import Map from '../components/Map.svelte';\n\n let api_request_params;\n let bStructuredSearch;\n let current_result;\n\n function loaddata(search_params) {\n update_html_title();\n\n api_request_params = {\n q: search_params.get('q'),\n street: search_params.get('street'),\n city: search_params.get('city'),\n county: search_params.get('county'),\n state: search_params.get('state'),\n country: search_params.get('country'),\n postalcode: search_params.get('postalcode'),\n polygon_geojson: Nominatim_Config.Search_AreaPolygons ? 1 : 0,\n viewbox: search_params.get('viewbox'),\n bounded: search_params.get('bounded'),\n dedupe: (!search_params.has('dedupe') || search_params.get('dedupe') === '1') ? 1 : 0,\n 'accept-language': search_params.get('accept-language'),\n countrycodes: search_params.get('countrycodes'),\n limit: search_params.get('limit'),\n polygon_threshold: search_params.get('polygon_threshold'),\n exclude_place_ids: search_params.get('exclude_place_ids'),\n format: 'jsonv2'\n };\n\n let anyStructuredFieldsSet = (api_request_params.street\n || api_request_params.city\n || api_request_params.county\n || api_request_params.state\n || api_request_params.country\n || api_request_params.postalcode);\n\n if (api_request_params.q || anyStructuredFieldsSet) {\n fetch_from_api('search', api_request_params, function (data) {\n results_store.set(data);\n\n update_html_title('Result for ' + api_request_params.q);\n\n if (anyStructuredFieldsSet) {\n document.querySelector(\".nav-tabs a[href='#structured']\").click();\n document.querySelector('input[name=street]').focus();\n } else {\n document.querySelector('input[name=q]').focus();\n }\n });\n } else {\n results_store.set(undefined);\n }\n }\n\n $: {\n let pageinfo = $page;\n if (pageinfo.tab === 'search') {\n loaddata(pageinfo.params);\n }\n }\n</script>\n\n<Header>\n <SearchSection api_request_params={api_request_params} bStructuredSearch={bStructuredSearch} />\n</Header>\n\n<div id=\"content\">\n <div class=\"sidebar\">\n <ResultsList bind:current_result reverse_search={false} />\n </div>\n <div id=\"map-wrapper\">\n <Map {current_result} display_minimap={true} />\n </div>\n</div>\n\n\n<style>\n .sidebar {\n width: 25%;\n min-width: 200px;\n padding: 15px;\n padding-top: 0;\n display: block;\n float: left;\n }\n\n #map-wrapper {\n position: relative;\n height: calc(100vh - 250pt);\n min-height: 300px;\n width: 75%;\n padding-right: 20px;\n display: block;\n float: left;\n }\n\n @media (max-width: 768px) {\n #content {\n top: 0;\n position: relative;\n }\n .sidebar {\n width: 100%;\n }\n #map-wrapper {\n width: 100%;\n height: 300px;\n padding-left: 20px;\n }\n }\n</style>\n","<script>\n import UrlSubmitForm from '../components/UrlSubmitForm.svelte';\n\n import { zoomLevels } from '../lib/helpers.js';\n import { map_store, refresh_page } from '../lib/stores.js';\n\n export let lat = '';\n export let lon = '';\n export let zoom = '';\n\n function gotoCoordinates(newlat, newlon, newzoom) {\n if (newlat === null || newlon === null) return;\n\n let params = new URLSearchParams();\n params.set('lat', newlat);\n params.set('lon', newlon);\n params.set('zoom', newzoom || zoom);\n refresh_page('reverse', params);\n }\n\n map_store.subscribe(map => {\n if (map) {\n map.on('click', (e) => {\n let coords = e.latlng.wrap();\n gotoCoordinates(coords.lat.toFixed(5), coords.lng.toFixed(5));\n });\n }\n });\n\n // common mistake is to copy&paste latitude and longitude into the 'lat' search box\n function maybeSplitLatitude(e) {\n var coords_split = e.target.value.split(/,|%2C/);\n if (coords_split.length === 2) {\n document.querySelector('input[name=lat]').value = L.Util.trim(coords_split[0]);\n document.querySelector('input[name=lon]').value = L.Util.trim(coords_split[1]);\n }\n }\n\n</script>\n\n<UrlSubmitForm page=\"reverse\">\n <div class=\"col-auto\">\n <label for=\"reverse-lat\">lat</label>\n </div>\n <div class=\"col-auto\">\n <input id=\"reverse-lat\"\n name=\"lat\"\n type=\"text\"\n class=\"form-control form-control-sm d-inline\"\n placeholder=\"latitude\"\n pattern=\"^-?\\d+(\\.\\d+)?$\"\n autofocus\n bind:value={lat}\n on:change={maybeSplitLatitude} />\n </div>\n <div class=\"col-auto\">\n <a id=\"switch-coords\"\n on:click|preventDefault|stopPropagation={() => gotoCoordinates(lon, lat)}\n class=\"btn btn-outline-secondary btn-sm\"\n title=\"switch lat and lon\"><></a>\n </div>\n <div class=\"col-auto\">\n <label for=\"reverse-lon\">lon</label>\n </div>\n <div class=\"col-auto\">\n <input id=\"reverse-lon\"\n name=\"lon\"\n type=\"text\"\n class=\"form-control form-control-sm\"\n placeholder=\"longitude\"\n pattern=\"^-?\\d+(\\.\\d+)?$\"\n bind:value={lon} />\n </div>\n <div class=\"col-auto\">\n <label for=\"reverse-zoom\">max zoom</label>\n </div>\n <div class=\"col-auto\">\n <select id=\"reverse-zoom\" name=\"zoom\" class=\"form-select form-select-sm\" bind:value={zoom}>\n <option value=\"\">---</option>\n {#each zoomLevels() as zoomTitle, i}\n <option value=\"{i}\">{i} - {zoomTitle}</option>\n {/each}\n </select>\n </div>\n <div class=\"col-auto\">\n <button type=\"submit\" class=\"btn btn-primary btn-sm mx-1\">Search</button>\n </div>\n</UrlSubmitForm>\n\n<style>\n label {\n font-size: 0.9rem;\n margin-top: 0.3rem;\n }\n\n #switch-coords {\n font-size: 0.6rem;\n font-weight: bold;\n cursor: pointer;\n padding: 2px;\n margin: 5px;\n }\n\n @media (max-width: 850px) {\n #reverse-lon, #reverse-lat, #reverse-zoom {\n width: 8em;\n }\n }\n</style>\n","<script>\n import { page, results_store } from '../lib/stores.js';\n import { fetch_from_api, update_html_title } from '../lib/api_utils.js';\n\n import Header from '../components/Header.svelte';\n import SearchSectionReverse from '../components/SearchSectionReverse.svelte';\n import ResultsList from '../components/ResultsList.svelte';\n import Map from '../components/Map.svelte';\n\n let api_request_params;\n let current_result;\n let position_marker; // what the user searched for\n\n function loaddata(search_params) {\n update_html_title();\n\n api_request_params = {\n lat: search_params.get('lat'),\n lon: search_params.get('lon'),\n zoom: (search_params.get('zoom') > 1\n ? Number(search_params.get('zoom'))\n : Number(Nominatim_Config.Reverse_Default_Search_Zoom)),\n format: 'jsonv2'\n };\n\n if (api_request_params.lat || api_request_params.lat) {\n\n fetch_from_api('reverse', api_request_params, function (data) {\n if (data && !data.error) {\n position_marker = [api_request_params.lat, api_request_params.lon];\n results_store.set([data]);\n } else {\n results_store.set([]);\n }\n\n update_html_title('Reverse result for '\n + api_request_params.lat\n + ','\n + api_request_params.lon);\n document.querySelector('input[name=lat]').focus();\n });\n } else {\n results_store.set(undefined);\n }\n }\n\n $: {\n let pageinfo = $page;\n if (pageinfo.tab === 'reverse') {\n loaddata(pageinfo.params);\n }\n }\n</script>\n\n<Header>\n <SearchSectionReverse {...api_request_params} />\n</Header>\n\n<div id=\"content\">\n <div class=\"sidebar\">\n <ResultsList bind:current_result reverse_search={true} />\n </div>\n <div id=\"map-wrapper\">\n <Map {current_result} {position_marker} display_minimap={true} />\n </div>\n</div>\n\n\n<style>\n .sidebar {\n width: 25%;\n min-width: 200px;\n padding: 15px;\n padding-top: 0;\n display: block;\n float: left;\n }\n\n #map-wrapper {\n position: relative;\n height: calc(100vh - 250pt);\n min-height: 300px;\n width: 75%;\n padding-right: 20px;\n display: block;\n float: left;\n }\n\n @media (max-width: 768px) {\n #content {\n top: 0;\n position: relative;\n }\n .sidebar {\n width: 100%;\n }\n #map-wrapper {\n width: 100%;\n height: 300px;\n padding-left: 20px;\n }\n }\n</style>\n","<script>\n import { refresh_page } from '../lib/stores.js';\n\n export let api_request_params = {};\n\n function handleFormSubmit(event) {\n let form_el = event.target;\n let val = form_el.querySelector('input[type=edit]').value.trim();\n let type_and_id_match = val.match(/^\\s*([NWR])(\\d+)\\s*$/i)\n || val.match(/\\/(relation|way|node)\\/(\\d+)\\s*$/);\n\n var params = new URLSearchParams();\n if (type_and_id_match) {\n params.set('osmtype', type_and_id_match[1].charAt(0).toUpperCase());\n params.set('osmid', type_and_id_match[2]);\n } else if (val.match(/^\\d+$/)) {\n params.set('place_id', val);\n } else {\n alert('invalid input');\n return;\n }\n\n refresh_page('details', params);\n }\n</script>\n\n<form on:submit|preventDefault={handleFormSubmit} class=\"form-inline\" action=\"details.html\">\n <div class=\"row g-1\">\n <div class=\"col-auto\">\n <input type=\"edit\"\n class=\"form-control form-control-sm me-1\"\n pattern=\"^[NWRnwr]?[0-9]+$|.*openstreetmap.*\"\n value=\"{api_request_params.osmtype || ''}{api_request_params.osmid || ''}{api_request_params.place_id || ''}\"\n autofocus />\n </div>\n <div class=\"col-auto\">\n <button type=\"submit\" class=\"btn btn-primary btn-sm\">Show</button>\n </div>\n </div>\n</form>\n<small class=\"form-text text-muted\">\n OSM type+id (<em>N123</em>, <em>n123</em>, <em>W123</em>, <em>w123</em>, <em>R123</em>, <em>r123</em>),\n Place id (<em>1234</em>) or\n URL (<em>https://openstreetmap.org/way/123</em>)\n</small>\n\n<style>\n form .form-control{\n width: 500px;\n max-width: 100%;\n }\n .form-text em {\n font-family: monospace;\n font-style: normal;\n }\n</style>\n","<script>\n import DetailsLink from '../components/DetailsLink.svelte';\n import PageLink from '../components/PageLink.svelte';\n import {\n formatPlaceType, osmLink, formatAdminLevel, formatDistance\n } from '../lib/helpers.js';\n\n export let addressLine;\n export let bDistanceInMeters;\n export let bMarkUnusedLines = false;\n\n $: bAddressLineUsed = addressLine.isaddress;\n $: reverse_only = Nominatim_Config.Reverse_Only;\n</script>\n\n<tr class:notused={bMarkUnusedLines && !bAddressLineUsed}>\n <td class=\"name fw-bold\">\n {#if addressLine.localname}\n {addressLine.localname}\n {:else}\n <span class=\"noname\">No Name</span>\n {/if}\n </td>\n <td>{formatPlaceType(addressLine)}</td>\n <td>{@html osmLink(addressLine)}</td>\n <td>{addressLine.rank_address}</td>\n <td>{formatAdminLevel(addressLine.admin_level)}</td>\n <td>{@html formatDistance(addressLine.distance, bDistanceInMeters)}</td>\n <td>\n {#if addressLine.osm_id}\n <DetailsLink feature={addressLine}>details</DetailsLink>\n {:else if !reverse_only && addressLine.type.match(/^country/)}\n <PageLink page='search' params_hash={{ country: addressLine.localname }}>search by name</PageLink>\n {:else if !reverse_only && addressLine.type === 'postcode'}\n <PageLink page='search' params_hash={{ postalcode: addressLine.localname }}>search by name</PageLink>\n {/if}\n </td>\n</tr>\n\n<style>\n .notused td {\n color: #ccc;\n }\n\n td {\n padding: 2px 8px;\n font-size: 0.9em;\n }\n</style>\n","<script>\n export let postcode;\n export let lat;\n export let lon;\n\n let overpass_query = `\n // Based on the map bounds, you can zoom out and rerun the query\n\n [timeout:30]; // in seconds\n\n // we define a shortcut\n // https://wiki.openstreetmap.org/wiki/Overpass_turbo/Extended_Overpass_Turbo_Queries\n {{postcode=${postcode}}}\n\n (\n node[\"addr:postcode\"=\"{{postcode}}\"]({{bbox}});\n way[\"addr:postcode\"=\"{{postcode}}\"]({{bbox}});\n relation[\"addr:postcode\"=\"{{postcode}}\"]({{bbox}});\n\n node[\"postal_code\"=\"{{postcode}}\"]({{bbox}});\n way[\"postal_code\"=\"{{postcode}}\"]({{bbox}});\n relation[\"postal_code\"=\"{{postcode}}\"]({{bbox}});\n );\n\n out body;\n >;\n out skel qt;\n `.replace(/^ {4}/gm, '');\n\n // https://wiki.openstreetmap.org/wiki/Overpass_turbo/Development#URL_Parameters\n // Q: the query\n // C: map position\n // R: run the query\n let url = 'https://overpass-turbo.eu/'\n + '?Q=' + encodeURIComponent(overpass_query)\n + '&C=' + encodeURIComponent([lat, lon, 15].join(';'))\n + '&R';\n\n function openHint() {\n document.getElementById('postcode-hint').style.display = 'block';\n }\n function closeHint() {\n document.getElementById('postcode-hint').style.display = 'none';\n }\n</script>\n\n(<a href=\"#openHint\" on:click|preventDefault|stopPropagation={openHint}>how?</a>)\n\n<div id=\"postcode-hint\" class=\"my-2 p-2\">\n <button type=\"button\" class=\"close\" aria-label=\"Close\" on:click|stopPropagation={closeHint}>\n <span aria-hidden=\"true\">×</span>\n </button>\n\n Nightly calculated from nearby places having this postcode.\n <a href=\"https://nominatim.org/release-docs/latest/develop/Postcodes/\">Documentation</a>.\n You can search for those with an <a href={url} target=\"_blank\" rel=\"noreferrer\">Overpass Turbo query</a>.\n</div>\n\n<style>\n #postcode-hint {\n font-size: 0.9em;\n background-color: #ededff;\n display: none;\n }\n .close {\n font-size: 1rem;\n }\n</style>","<script>\n export let title;\n</script>\n\n<style>\n td {\n padding: 2px 8px;\n font-size: 0.9em;\n }\n</style>\n\n<tr>\n <td>{title}</td>\n <td><slot></slot></td>\n</tr>\n","<script>\n export let items;\n</script>\n\n<style>\n .name {\n font-weight: bold;\n overflow-wrap: anywhere;\n }\n</style>\n\n{#each Object.keys(items) as name}\n <div class=\"line\">\n <span class=\"name\">{items[name]}</span> ({name})\n </div>\n{/each}\n","<script>\n import { fetch_from_api, update_html_title } from '../lib/api_utils.js';\n import { page } from '../lib/stores.js';\n\n import {\n osmLink, wikipediaLink, coverageType, isAdminBoundary,\n formatAddressRank, formatKeywordToken, formatOSMType\n } from '../lib/helpers.js';\n import Header from '../components/Header.svelte';\n import MapIcon from '../components/MapIcon.svelte';\n import SearchSectionDetails from '../components/SearchSectionDetails.svelte';\n import DetailsOneRow from '../components/DetailsOneRow.svelte';\n import DetailsLink from '../components/DetailsLink.svelte';\n import DetailsPostcodeHint from '../components/DetailsPostcodeHint.svelte';\n import InfoRow from '../components/DetailsInfoRow.svelte';\n import InfoRowList from '../components/DetailsInfoRowList.svelte';\n import Map from '../components/Map.svelte';\n\n let aPlace;\n let base_url;\n let api_request_params;\n let api_request_finished = false;\n\n function loaddata(search_params) {\n api_request_params = {\n place_id: search_params.get('place_id'),\n osmtype: search_params.get('osmtype'),\n osmid: search_params.get('osmid'),\n class: search_params.get('class'),\n keywords: search_params.get('keywords'),\n addressdetails: 1,\n hierarchy: (search_params.get('hierarchy') === '1' ? 1 : 0),\n group_hierarchy: 1,\n polygon_geojson: 1,\n format: 'json'\n };\n api_request_finished = false;\n\n if (api_request_params.place_id || (api_request_params.osmtype && api_request_params.osmid)) {\n\n if (api_request_params.place_id) {\n update_html_title('Details for ' + api_request_params.place_id);\n } else {\n update_html_title('Details for ' + api_request_params.osmtype + api_request_params.osmid);\n }\n\n fetch_from_api('details', api_request_params, function (data) {\n window.scrollTo(0, 0);\n api_request_finished = true;\n aPlace = (data && !data.error) ? data : undefined;\n });\n } else {\n aPlace = undefined;\n }\n }\n\n function place_has_keywords(aThisPlace) {\n // Return false if Nominatim API sends 'keywords: { name: [], address: [] }'\n return (\n aThisPlace.keywords && aThisPlace.keywords.name && aThisPlace.keywords.address\n && (aThisPlace.keywords.name.length > 0 || aThisPlace.keywords.address.length > 0)\n );\n }\n\n $: {\n let pageinfo = $page;\n if (pageinfo.tab === 'details') {\n loaddata(pageinfo.params);\n base_url = window.location.search;\n }\n }\n $: reverse_only = Nominatim_Config.Reverse_Only;\n</script>\n\n<Header>\n <SearchSectionDetails api_request_params={api_request_params}/>\n</Header>\n\n<div class=\"container\">\n {#if aPlace}\n <div class=\"row\">\n <div class=\"col-sm-10\">\n <h1>\n {aPlace.localname || `${formatOSMType(aPlace.osm_type)} ${aPlace.osm_id}` }\n <small><DetailsLink feature={aPlace}>link to this page</DetailsLink></small>\n </h1>\n </div>\n <div class=\"col-sm-2 text-end\">\n <MapIcon aPlace={aPlace} />\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-6\">\n <table id=\"locationdetails\" class=\"table table-striped table-responsive\">\n <tbody>\n <InfoRow title=\"Name\">\n {#if (Array.isArray(aPlace.names)) }\n <span class=\"noname fw-bold\">No Name</span>\n {:else}\n <InfoRowList items={aPlace.names} />\n {/if}\n </InfoRow>\n <InfoRow title=\"Type\">{aPlace.category}:{aPlace.type}</InfoRow>\n <InfoRow title=\"Last Updated\">{aPlace.indexed_date}</InfoRow>\n {#if (isAdminBoundary(aPlace)) }\n <InfoRow title=\"Admin Level\">{aPlace.admin_level}</InfoRow>\n {/if}\n <InfoRow title=\"Search Rank\">{aPlace.rank_search}</InfoRow>\n <InfoRow title=\"Address Rank\">{aPlace.rank_address} ({formatAddressRank(aPlace.rank_address)})</InfoRow>\n {#if aPlace.calculated_importance}\n <InfoRow title=\"Importance\">\n {aPlace.calculated_importance}\n {#if !aPlace.importance} (estimated){/if}\n </InfoRow>\n {/if}\n <InfoRow title=\"Coverage\">{coverageType(aPlace)}</InfoRow>\n <InfoRow title=\"Centre Point (lat,lon)\">\n {aPlace.centroid.coordinates[1]},{aPlace.centroid.coordinates[0]}\n </InfoRow>\n <InfoRow title=\"OSM\">{@html osmLink(aPlace)}</InfoRow>\n <InfoRow title=\"Place Id\">\n {aPlace.place_id}\n (<a href=\"https://nominatim.org/release-docs/develop/api/Output/#place_id-is-not-a-persistent-id\">on this server</a>)\n </InfoRow>\n {#if aPlace.calculated_wikipedia}\n <InfoRow title=\"Wikipedia Calculated\">{@html wikipediaLink(aPlace)}</InfoRow>\n {/if}\n <InfoRow title=\"Computed Postcode\">\n {#if aPlace.calculated_postcode}\n {aPlace.calculated_postcode}\n <DetailsPostcodeHint postcode={aPlace.calculated_postcode} lat={aPlace.centroid.coordinates[1]} lon={aPlace.centroid.coordinates[0]} />\n {/if}\n </InfoRow>\n <InfoRow title=\"Address Tags\"><InfoRowList items={aPlace.addresstags} /></InfoRow>\n <InfoRow title=\"Extra Tags\"><InfoRowList items={aPlace.extratags} /></InfoRow>\n </tbody>\n </table>\n </div>\n <div class=\"col-md-6\">\n <div id=\"map-wrapper\">\n <Map current_result={aPlace} />\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-12\">\n <h2>Address</h2>\n <table id=\"address\" class=\"table table-striped table-small\">\n <thead>\n <tr>\n <th>Local name</th>\n <th>Type</th>\n <th>OSM</th>\n <th>Address rank</th>\n <th>Admin level</th>\n <th>Distance</th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n {#if aPlace.address}\n {#each aPlace.address as addressLine}\n <DetailsOneRow addressLine={addressLine} bMarkUnusedLines={true} bDistanceInMeters={false} />\n {/each}\n {/if}\n\n {#if aPlace.linked_places}\n <tr class=\"all-columns\"><td colspan=\"7\"><h2>Linked Places</h2></td></tr>\n {#each aPlace.linked_places as addressLine}\n <DetailsOneRow addressLine={addressLine} bMarkUnusedLines={true} bDistanceInMeters={true} />\n {/each}\n {/if}\n\n {#if !reverse_only}\n <tr class=\"all-columns\"><td colspan=\"7\"><h2>Keywords</h2></td></tr>\n {#if api_request_params.keywords}\n\n {#if place_has_keywords(aPlace)}\n <tr class=\"all-columns\"><td colspan=\"7\"><h3>Name Keywords</h3></td></tr>\n {#each aPlace.keywords.name as keyword}\n <tr>\n <td>{formatKeywordToken(keyword.token)}</td>\n {#if keyword.id}\n <td>word id: {keyword.id}</td>\n {/if}\n </tr>\n {/each}\n\n {#if aPlace.keywords.address}\n <tr class=\"all-columns\"><td colspan=\"7\"><h3>Address Keywords</h3></td></tr>\n {#each aPlace.keywords.address as keyword}\n <tr>\n <td>{formatKeywordToken(keyword.token)}</td>\n {#if keyword.id}\n <td>word id: {keyword.id}</td>\n {/if}\n </tr>\n {/each}\n {/if}\n {:else}\n <tr><td>Place has no keywords</td></tr>\n {/if}\n {:else}\n <tr>\n <td>\n <a class=\"btn btn-outline-secondary btn-sm\"\n href=\"{base_url}&keywords=1\">display keywords</a>\n </td>\n </tr>\n {/if}\n {/if}\n\n <tr class=\"all-columns\"><td colspan=\"7\"><h2>Parent Of</h2></td></tr>\n {#if api_request_params.hierarchy}\n {#if aPlace.hierarchy && typeof (aPlace.hierarchy) === 'object' && Object.keys(aPlace.hierarchy).length}\n {#each Object.keys(aPlace.hierarchy) as type}\n <tr class=\"all-columns\"><td colspan=\"7\"><h3>{type}</h3></td></tr>\n {#each aPlace.hierarchy[type] as line}\n <DetailsOneRow addressLine={line} bDistanceInMeters={true} />\n {/each}\n {/each}\n\n {#if Object.keys(aPlace.hierarchy) > 500}\n <p>There are more child objects which are not shown.</p>\n {/if}\n {:else}\n <tr><td>Place is not parent of other places</td></tr>\n {/if}\n {:else}\n <tr>\n <td>\n <a class=\"btn btn-outline-secondary btn-sm\"\n href=\"{base_url}&hierarchy=1\">display child places</a>\n </td>\n </tr>\n {/if}\n </tbody>\n </table>\n </div>\n </div>\n {:else if (window.location.search !== '' && api_request_finished)}\n No such place found.\n {/if}\n</div>\n\n\n\n<style>\n h1 {\n margin: 10px 0;\n padding-left: 8px;\n }\n\n h1 small :global(a) {\n font-size: 0.5em;\n white-space: nowrap;\n }\n\n h2 {\n font-size: 2em;\n padding-left: 8px;\n background-color: white;\n }\n h3 {\n font-size: 1.5em;\n padding-left: 8px;\n }\n\n tr.all-columns {\n background-color: white !important; \n border: none;\n }\n tr.all-columns td {\n border-top: none !important;\n padding-left: 0 !important;\n }\n :global(span.noname){\n color:#800;\n }\n\n #map-wrapper {\n position: relative;\n width:100%;\n min-height: auto;\n height:300px;\n border: 1px solid #666;\n }\n</style>\n","<script>\n import { onMount } from 'svelte';\n import { fetch_from_api, update_html_title } from '../lib/api_utils.js';\n import { formatOSMType, osmLink } from '../lib/helpers.js';\n\n import Header from '../components/Header.svelte';\n\n let aPolygons = [];\n\n function loaddata() {\n fetch_from_api('polygons', { format: 'json' }, function (data) {\n aPolygons = data;\n });\n update_html_title('Broken polygons');\n }\n onMount(loaddata);\n</script>\n\n<Header/>\n<div class=\"container\">\n <div class=\"row\">\n <div class=\"col-sm-12\">\n <h1>Broken polygons</h1>\n\n <p>\n Total number of broken polygons: {aPolygons.length}.\n </p>\n\n <table class=\"table table-striped table-hover\">\n <thead>\n <th>OSM type</th>\n <th>OSM id</th>\n <th>Class</th>\n <th>Type</th>\n <th>Name</th>\n <th>Country Code</th>\n <th>Error message</th>\n <th>Updated</th>\n <th></th>\n </thead>\n <tbody>\n {#each aPolygons as polygon}\n <tr>\n <td>{polygon.osm_type}</td>\n <td>{@html osmLink(polygon)}</td>\n <td>{polygon.class}</td>\n <td>{polygon.type}</td>\n <td>{polygon.name}</td>\n <td>{polygon.country_code || ''}</td>\n <td>{polygon.errormessage}</td>\n <td>{polygon.updated}</td>\n <td>\n <a href=\"http://localhost:8111/import?url=https://www.openstreetmap.org/api/0.6/{formatOSMType(polygon.osm_type)}/{polygon.osm_id}/full\" target=\"josm\">josm</a>\n </td>\n </tr>\n {/each}\n </tbody>\n </table>\n </div>\n </div>\n</div>\n","<script>\n import { onMount } from 'svelte';\n import { fetch_from_api, update_html_title } from '../lib/api_utils.js';\n import { osmLink } from '../lib/helpers.js';\n\n import Header from '../components/Header.svelte';\n import DetailsLink from '../components/DetailsLink.svelte';\n\n let aPolygons = [];\n\n function loaddata() {\n fetch_from_api('deletable', { format: 'json' }, function (data) {\n aPolygons = data;\n });\n update_html_title('Deletable objects');\n }\n onMount(loaddata);\n</script>\n\n<Header/>\n<div class=\"container\">\n <div class=\"row\">\n <div class=\"col-sm-12\">\n <h1>Deletable</h1>\n\n <p>\n {aPolygons.length} objects have been deleted in OSM but are still in the Nominatim database.\n </p>\n\n <table class=\"table table-striped table-hover\">\n <thead>\n <th>Place id</th>\n <th>Country Code</th>\n <th>Name</th>\n <th>OSM id</th>\n <th>OSM type</th>\n <th>Class</th>\n <th>Type</th>\n </thead>\n <tbody>\n {#each aPolygons as polygon}\n <tr>\n <td><DetailsLink feature={polygon}>{polygon.place_id}</DetailsLink></td>\n <td>{polygon.country_code}</td>\n <td>{polygon.name}</td>\n <td>{@html osmLink(polygon)}</td>\n <td>{polygon.osm_type}</td>\n <td>{polygon.class}</td>\n <td>{polygon.type}</td>\n </tr>\n {/each}\n </tbody>\n </table>\n\n </div>\n </div>\n</div>\n\n","<script>\n import { onMount } from 'svelte';\n import { fetch_from_api, update_html_title } from '../lib/api_utils.js';\n\n import Header from '../components/Header.svelte';\n\n let aStatusData = {};\n let configuration = Nominatim_Config;\n\n function loaddata() {\n fetch_from_api('status', { format: 'json' }, function (data) {\n aStatusData = data;\n });\n update_html_title('Server status');\n }\n onMount(loaddata);\n</script>\n\n<Header/>\n<div class=\"container\">\n <div class=\"row\">\n <div class=\"col-sm-12\">\n <h1>Server status</h1>\n\n <dl>\n <dt>API Endpoint</dt>\n <dd><a href={configuration.Nominatim_API_Endpoint}>{configuration.Nominatim_API_Endpoint}</a></dd>\n\n <dt>Software version</dt>\n <dd>{aStatusData.software_version}</dd>\n\n <dt>Database version</dt>\n <dd>{aStatusData.database_version}</dd>\n\n <dt>Data last updated</dt>\n <dd>{aStatusData.data_updated}</dd>\n </dl>\n </div>\n </div>\n</div>\n","<script>\n import Header from '../components/Header.svelte';\n import { onMount } from 'svelte';\n import { fetch_content_into_element } from '../lib/api_utils.js';\n\n onMount(() => {\n fetch_content_into_element('theme/about-help.html', document.getElementById('about-help'));\n });\n</script>\n\n<Header />\n<div id=\"about-help\" class=\"container\"></div>\n\n<style>\n #about-help {\n max-width: 800px;\n padding: 4em;\n }\n</style>","<script>\n import 'bootstrap/dist/css/bootstrap.css';\n import 'bootstrap/dist/js/bootstrap.bundle.js';\n\n import { page, refresh_page } from './lib/stores.js';\n\n import Footer from './components/Footer.svelte';\n import SearchPage from './pages/SearchPage.svelte';\n import ReversePage from './pages/ReversePage.svelte';\n import DetailsPage from './pages/DetailsPage.svelte';\n import PolygonsPage from './pages/PolygonsPage.svelte';\n import DeletablePage from './pages/DeletablePage.svelte';\n import StatusPage from './pages/StatusPage.svelte';\n import AboutPage from './pages/AboutPage.svelte';\n\n $: view = $page.tab;\n\n refresh_page();\n</script>\n\n<!-- deal with back-button and other user action -->\n<svelte:window on:popstate={() => refresh_page()} />\n\n{#if view === 'search'}\n<SearchPage />\n{:else if view === 'reverse'}\n<ReversePage />\n{:else if view === 'details'}\n<DetailsPage />\n{:else if view === 'deletable'}\n<DeletablePage />\n{:else if view === 'polygons'}\n<PolygonsPage />\n{:else if view === 'status'}\n<StatusPage />\n{:else if view === 'about'}\n<AboutPage />\n{/if}\n<Footer/>\n","import App from './App.svelte';\n\nconst app = new App({ // eslint-disable-line no-unused-vars\n target: document.body\n});\n"],"names":["noop","assign","tar","src","k","run","fn","blank_object","Object","create","run_all","fns","forEach","is_function","thing","safe_not_equal","a","b","src_url_equal_anchor","current_component","src_url_equal","element_src","url","document","createElement","href","subscribe","store","callbacks","unsub","unsubscribe","get_store_value","value","_","component_subscribe","component","callback","$$","on_destroy","push","create_slot","definition","ctx","$$scope","slot_ctx","get_slot_context","slice","get_slot_changes","dirty","lets","undefined","merged","len","Math","max","length","i","update_slot_base","slot","slot_definition","slot_changes","get_slot_context_fn","slot_context","p","get_all_dirty_from_scope","append","target","node","appendChild","insert","anchor","insertBefore","detach","parentNode","removeChild","destroy_each","iterations","detaching","d","element","name","text","data","createTextNode","space","empty","listen","event","handler","options","addEventListener","removeEventListener","prevent_default","preventDefault","call","this","stop_propagation","stopPropagation","attr","attribute","removeAttribute","getAttribute","setAttribute","set_data","wholeText","set_input_value","input","select_option","select","option","__value","selected","selectedIndex","toggle_class","toggle","classList","HtmlTag","constructor","is_svg","e","n","c","html","h","m","nodeName","createElementNS","t","innerHTML","Array","from","childNodes","set_current_component","onMount","Error","get_current_component","on_mount","dirty_components","binding_callbacks","render_callbacks","flush_callbacks","resolved_promise","Promise","resolve","update_scheduled","add_render_callback","add_flush_callback","seen_callbacks","Set","flushidx","flush","saved_component","update","pop","has","add","clear","fragment","before_update","after_update","outroing","outros","group_outros","r","check_outros","transition_in","block","local","delete","transition_out","o","bind","index","props","bound","create_component","mount_component","customElement","new_on_destroy","map","filter","destroy_component","make_dirty","then","fill","init","instance","create_fragment","not_equal","append_styles","parent_component","on_disconnect","context","Map","skip_bound","root","ready","ret","rest","hydrate","nodes","children","l","intro","SvelteComponent","$destroy","$on","type","indexOf","splice","$set","$$props","obj","$$set","keys","MAX_UID","MILLISECONDS_MULTIPLIER","TRANSITION_END","toType","object","prototype","toString","match","toLowerCase","getUID","prefix","floor","random","getElementById","getSelector","selector","hrefAttribute","includes","startsWith","split","trim","getSelectorFromElement","querySelector","getElementFromSelector","getTransitionDurationFromElement","transitionDuration","transitionDelay","window","getComputedStyle","floatTransitionDuration","Number","parseFloat","floatTransitionDelay","triggerTransitionEnd","dispatchEvent","Event","isElement$1","jquery","nodeType","getElement","isVisible","getClientRects","elementIsVisible","getPropertyValue","closedDetails","closest","summary","isDisabled","Node","ELEMENT_NODE","contains","disabled","hasAttribute","findShadowRoot","documentElement","attachShadow","getRootNode","ShadowRoot","reflow","offsetHeight","getjQuery","jQuery","body","DOMContentLoadedCallbacks","onDOMContentLoaded","readyState","isRTL","dir","defineJQueryPlugin","plugin","$","NAME","JQUERY_NO_CONFLICT","jQueryInterface","Constructor","noConflict","execute","executeAfterTransition","transitionElement","waitForTransition","durationPadding","emulatedDuration","called","setTimeout","getNextActiveElement","list","activeElement","shouldGetNext","isCycleAllowed","listLength","min","namespaceRegex","stripNameRegex","stripUidRegex","eventRegistry","uidEvent","customEvents","mouseenter","mouseleave","nativeEvents","makeEventUid","uid","getElementEvents","bootstrapHandler","hydrateObj","delegateTarget","oneOff","EventHandler","off","apply","bootstrapDelegationHandler","domElements","querySelectorAll","domElement","findHandler","events","callable","delegationSelector","values","find","normalizeParameters","originalTypeEvent","delegationFunction","isDelegated","typeEvent","getTypeEvent","addHandler","wrapFunction","relatedTarget","handlers","previousFunction","replace","removeHandler","Boolean","removeNamespacedHandlers","namespace","storeElementEvent","handlerKey","on","one","inNamespace","isNamespace","elementEvent","keyHandlers","trigger","args","jQueryEvent","bubbles","nativeDispatch","defaultPrevented","isPropagationStopped","isImmediatePropagationStopped","isDefaultPrevented","evt","cancelable","meta","key","entries","_unused","defineProperty","configurable","get","elementMap","Data","set","instanceMap","size","console","error","remove","normalizeData","JSON","parse","decodeURIComponent","normalizeDataKey","chr","Manipulator","setDataAttribute","removeDataAttribute","getDataAttributes","attributes","bsKeys","dataset","pureKey","charAt","getDataAttribute","Config","Default","DefaultType","_getConfig","config","_mergeConfigObj","_configAfterMerge","_typeCheckConfig","jsonConfig","configTypes","property","expectedTypes","valueType","RegExp","test","TypeError","toUpperCase","VERSION","BaseComponent","super","_element","_config","DATA_KEY","dispose","EVENT_KEY","propertyName","getOwnPropertyNames","_queueCallback","isAnimated","static","getInstance","enableDismissTrigger","method","clickEvent","tagName","getOrCreateInstance","NAME$f","EVENT_KEY$b","EVENT_CLOSE","EVENT_CLOSED","CLASS_NAME_FADE$5","CLASS_NAME_SHOW$8","Alert","close","_destroyElement","each","NAME$e","CLASS_NAME_ACTIVE$3","SELECTOR_DATA_TOGGLE$5","EVENT_CLICK_DATA_API$6","Button","button","SelectorEngine","concat","Element","findOne","child","matches","parents","ancestor","prev","previous","previousElementSibling","next","nextElementSibling","focusableChildren","focusables","join","el","NAME$d","EVENT_KEY$9","EVENT_TOUCHSTART","EVENT_TOUCHMOVE","EVENT_TOUCHEND","EVENT_POINTERDOWN","EVENT_POINTERUP","POINTER_TYPE_TOUCH","POINTER_TYPE_PEN","CLASS_NAME_POINTER_EVENT","SWIPE_THRESHOLD","Default$c","endCallback","leftCallback","rightCallback","DefaultType$c","Swipe","isSupported","_deltaX","_supportPointerEvents","PointerEvent","_initEvents","_start","_eventIsPointerPenTouch","clientX","touches","_end","_handleSwipe","_move","absDeltaX","abs","direction","pointerType","navigator","maxTouchPoints","NAME$c","EVENT_KEY$8","DATA_API_KEY$5","TOUCHEVENT_COMPAT_WAIT","ORDER_NEXT","ORDER_PREV","DIRECTION_LEFT","DIRECTION_RIGHT","EVENT_SLIDE","EVENT_SLID","EVENT_KEYDOWN$1","EVENT_MOUSEENTER$1","EVENT_MOUSELEAVE$1","EVENT_DRAG_START","EVENT_LOAD_DATA_API$3","EVENT_CLICK_DATA_API$5","CLASS_NAME_CAROUSEL","CLASS_NAME_ACTIVE$2","CLASS_NAME_SLIDE","CLASS_NAME_END","CLASS_NAME_START","CLASS_NAME_NEXT","CLASS_NAME_PREV","SELECTOR_ACTIVE","SELECTOR_ITEM","SELECTOR_ACTIVE_ITEM","SELECTOR_ITEM_IMG","SELECTOR_INDICATORS","SELECTOR_DATA_SLIDE","SELECTOR_DATA_RIDE","KEY_TO_DIRECTION","ArrowLeft","ArrowRight","Default$b","interval","keyboard","pause","ride","touch","wrap","DefaultType$b","Carousel","_interval","_activeElement","_isSliding","touchTimeout","_swipeHelper","_indicatorsElement","_addEventListeners","cycle","_slide","nextWhenVisible","hidden","_clearInterval","_updateInterval","setInterval","_maybeEnableCycle","to","items","_getItems","activeIndex","_getItemIndex","_getActive","order","defaultInterval","_keydown","_addTouchEventListeners","img","swipeConfig","_directionToOrder","clearTimeout","_setActiveIndicatorElement","activeIndicator","newActiveIndicator","elementInterval","parseInt","isNext","nextElement","nextElementIndex","triggerEvent","eventName","_orderToDirection","isCycling","directionalClassName","orderClassName","completeCallBack","_isAnimated","clearInterval","carousel","slideIndex","carousels","NAME$b","EVENT_KEY$7","EVENT_SHOW$6","EVENT_SHOWN$6","EVENT_HIDE$6","EVENT_HIDDEN$6","EVENT_CLICK_DATA_API$4","CLASS_NAME_SHOW$7","CLASS_NAME_COLLAPSE","CLASS_NAME_COLLAPSING","CLASS_NAME_COLLAPSED","CLASS_NAME_DEEPER_CHILDREN","CLASS_NAME_HORIZONTAL","WIDTH","HEIGHT","SELECTOR_ACTIVES","SELECTOR_DATA_TOGGLE$4","Default$a","parent","DefaultType$a","Collapse","_isTransitioning","_triggerArray","toggleList","elem","filterElement","foundElement","_initializeChildren","_addAriaAndCollapsedClass","_isShown","hide","show","activeChildren","_getFirstLevelChildren","activeInstance","dimension","_getDimension","style","complete","scrollSize","getBoundingClientRect","triggerArray","isOpen","selectorElements","top","bottom","right","left","auto","basePlacements","start","end","clippingParents","viewport","popper","reference","variationPlacements","reduce","acc","placement","placements","beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite","modifierPhases","getNodeName","getWindow","ownerDocument","defaultView","isElement","isHTMLElement","HTMLElement","isShadowRoot","applyStyles","_ref","state","elements","styles","effect$2","_ref2","initialStyles","position","strategy","margin","arrow","hasOwnProperty","applyStyles$1","enabled","phase","effect","requires","getBasePlacement","round","getUAString","uaData","userAgentData","brands","item","brand","version","userAgent","isLayoutViewport","includeScale","isFixedStrategy","clientRect","scaleX","scaleY","offsetWidth","width","height","visualViewport","addVisualOffsets","x","offsetLeft","y","offsetTop","getLayoutRect","rootNode","isSameNode","host","getComputedStyle$1","isTableElement","getDocumentElement","getParentNode","assignedSlot","getTrueOffsetParent","offsetParent","getContainingBlock","isFirefox","currentNode","css","transform","perspective","contain","willChange","getOffsetParent","getMainAxisFromPlacement","within","min$1","max$1","withinMaxClamp","v","getFreshSideObject","mergePaddingObject","paddingObject","expandToHashMap","hashMap","toPaddingObject","padding","rects","_state$modifiersData$","arrowElement","popperOffsets","modifiersData","basePlacement","axis","arrowRect","minProp","maxProp","endDiff","startDiff","arrowOffsetParent","clientSize","clientHeight","clientWidth","centerToReference","center","offset","axisProp","centerOffset","effect$1","_options$element","arrow$1","requiresIfExists","getVariation","unsetSides","roundOffsetsByDPR","dpr","devicePixelRatio","mapToStyles","_Object$assign2","popperRect","variation","offsets","gpuAcceleration","adaptive","roundOffsets","isFixed","_offsets$x","_offsets$y","_ref3","hasX","hasY","sideX","sideY","win","heightProp","widthProp","_Object$assign","commonStyles","_ref4","computeStyles","_ref5","_options$gpuAccelerat","_options$adaptive","_options$roundOffsets","computeStyles$1","passive","_options$scroll","scroll","_options$resize","resize","scrollParents","scrollParent","eventListeners","hash$1","getOppositePlacement","matched","hash","getOppositeVariationPlacement","getWindowScroll","scrollLeft","pageXOffset","scrollTop","pageYOffset","getWindowScrollBarX","getViewportRect","layoutViewport","getDocumentRect","_element$ownerDocumen","winScroll","scrollWidth","scrollHeight","isScrollParent","_getComputedStyle","overflow","overflowX","overflowY","getScrollParent","listScrollParents","isBody","updatedList","rectToClientRect","rect","getInnerBoundingClientRect","clientTop","clientLeft","getClientRectFromMixedType","clippingParent","getClippingParents","clipperElement","getClippingRect","boundary","rootBoundary","mainClippingParents","firstClippingParent","clippingRect","accRect","computeOffsets","commonX","commonY","mainAxis","detectOverflow","_options","_options$placement","_options$strategy","_options$boundary","_options$rootBoundary","_options$elementConte","elementContext","_options$altBoundary","altBoundary","_options$padding","altContext","clippingClientRect","contextElement","referenceClientRect","popperClientRect","elementClientRect","overflowOffsets","offsetData","multiply","computeAutoPlacement","flipVariations","_options$allowedAutoP","allowedAutoPlacements","placements$1","allowedPlacements","overflows","sort","getExpandedFallbackPlacements","oppositePlacement","flip","_skip","_options$mainAxis","checkMainAxis","_options$altAxis","altAxis","checkAltAxis","specifiedFallbackPlacements","fallbackPlacements","_options$flipVariatio","preferredPlacement","referenceRect","checksMap","makeFallbackChecks","firstFittingPlacement","_basePlacement","isStartVariation","isVertical","mainVariationSide","altVariationSide","checks","every","check","_loop","_i","fittingPlacement","reset","flip$1","getSideOffsets","preventedOffsets","isAnySideFullyClipped","some","side","preventOverflow","referenceOverflow","popperAltOverflow","referenceClippingOffsets","popperEscapeOffsets","isReferenceHidden","hasPopperEscaped","hide$1","distanceAndSkiddingToXY","invertDistance","skidding","distance","_options$offset","_data$state$placement","offset$1","popperOffsets$1","getAltAxis","_options$tether","tether","_options$tetherOffset","tetherOffset","isBasePlacement","tetherOffsetValue","normalizedTetherOffsetValue","offsetModifierState","_offsetModifierState$","mainSide","altSide","additive","minLen","maxLen","arrowPaddingObject","arrowPaddingMin","arrowPaddingMax","arrowLen","minOffset","maxOffset","clientOffset","offsetModifierValue","tetherMax","preventedOffset","_offsetModifierState$2","_mainSide","_altSide","_offset","_len","_min","_max","isOriginSide","_offsetModifierValue","_tetherMin","_tetherMax","_preventedOffset","preventOverflow$1","getHTMLElementScroll","getNodeScroll","isElementScaled","getCompositeRect","elementOrVirtualElement","isOffsetParentAnElement","offsetParentIsScaled","modifiers","visited","result","modifier","dep","depModifier","orderModifiers","orderedModifiers","debounce","pending","mergeByName","current","existing","DEFAULT_OPTIONS","areValidElements","arguments","_key","popperGenerator","generatorOptions","_generatorOptions","_generatorOptions$def","defaultModifiers","_generatorOptions$def2","defaultOptions","effectCleanupFns","isDestroyed","setOptions","setOptionsAction","cleanupModifierEffects","runModifierEffects","forceUpdate","_state$elements","_state$orderedModifie","_state$orderedModifie2","destroy","_ref3$options","cleanupFn","noopFn","onFirstUpdate","createPopper$2","createPopper$1","createPopper","Popper","freeze","__proto__","createPopperBase","createPopperLite","Symbol","toStringTag","NAME$a","EVENT_KEY$6","DATA_API_KEY$3","ESCAPE_KEY$2","TAB_KEY$1","ARROW_UP_KEY$1","ARROW_DOWN_KEY$1","RIGHT_MOUSE_BUTTON","EVENT_HIDE$5","EVENT_HIDDEN$5","EVENT_SHOW$5","EVENT_SHOWN$5","EVENT_CLICK_DATA_API$3","EVENT_KEYDOWN_DATA_API","EVENT_KEYUP_DATA_API","CLASS_NAME_SHOW$6","CLASS_NAME_DROPUP","CLASS_NAME_DROPEND","CLASS_NAME_DROPSTART","CLASS_NAME_DROPUP_CENTER","CLASS_NAME_DROPDOWN_CENTER","SELECTOR_DATA_TOGGLE$3","SELECTOR_DATA_TOGGLE_SHOWN","SELECTOR_MENU","SELECTOR_NAVBAR","SELECTOR_NAVBAR_NAV","SELECTOR_VISIBLE_ITEMS","PLACEMENT_TOP","PLACEMENT_TOPEND","PLACEMENT_BOTTOM","PLACEMENT_BOTTOMEND","PLACEMENT_RIGHT","PLACEMENT_LEFT","PLACEMENT_TOPCENTER","PLACEMENT_BOTTOMCENTER","Default$9","autoClose","display","popperConfig","DefaultType$9","Dropdown","_popper","_parent","_menu","_inNavbar","_detectNavbar","_createPopper","focus","_completeHide","referenceElement","_getPopperConfig","_getPlacement","parentDropdown","isEnd","_getOffset","popperData","defaultBsPopperConfig","_selectMenuItem","openToggles","composedPath","isMenuTarget","isInput","isEscapeEvent","isUpOrDownEvent","getToggleButton","dataApiKeydownHandler","clearMenus","SELECTOR_FIXED_CONTENT","SELECTOR_STICKY_CONTENT","PROPERTY_PADDING","PROPERTY_MARGIN","ScrollBarHelper","getWidth","documentWidth","innerWidth","_disableOverFlow","_setElementAttributes","calculatedValue","_resetElementAttributes","isOverflowing","_saveInitialAttribute","styleProperty","scrollbarWidth","manipulationCallBack","setProperty","_applyManipulationCallback","actualValue","removeProperty","callBack","sel","NAME$9","CLASS_NAME_FADE$4","CLASS_NAME_SHOW$5","EVENT_MOUSEDOWN","Default$8","className","clickCallback","rootElement","DefaultType$8","Backdrop","_isAppended","_append","_getElement","_emulateAnimation","backdrop","NAME$8","EVENT_KEY$5","EVENT_FOCUSIN$2","EVENT_KEYDOWN_TAB","TAB_KEY","TAB_NAV_FORWARD","TAB_NAV_BACKWARD","Default$7","autofocus","trapElement","DefaultType$7","FocusTrap","_isActive","_lastTabNavDirection","activate","_handleFocusin","_handleKeydown","deactivate","shiftKey","NAME$7","EVENT_KEY$4","ESCAPE_KEY$1","EVENT_HIDE$4","EVENT_HIDE_PREVENTED$1","EVENT_HIDDEN$4","EVENT_SHOW$4","EVENT_SHOWN$4","EVENT_RESIZE$1","EVENT_CLICK_DISMISS","EVENT_MOUSEDOWN_DISMISS","EVENT_KEYDOWN_DISMISS$1","EVENT_CLICK_DATA_API$2","CLASS_NAME_OPEN","CLASS_NAME_FADE$3","CLASS_NAME_SHOW$4","CLASS_NAME_STATIC","OPEN_SELECTOR$1","SELECTOR_DIALOG","SELECTOR_MODAL_BODY","SELECTOR_DATA_TOGGLE$2","Default$6","DefaultType$6","Modal","_dialog","_backdrop","_initializeBackDrop","_focustrap","_initializeFocusTrap","_scrollBar","_adjustDialog","_showElement","_hideModal","htmlElement","handleUpdate","modalBody","transitionComplete","_triggerBackdropTransition","event2","_resetAdjustments","isModalOverflowing","initialOverflowY","isBodyOverflowing","paddingLeft","paddingRight","showEvent","alreadyOpen","NAME$6","EVENT_KEY$3","DATA_API_KEY$1","EVENT_LOAD_DATA_API$2","ESCAPE_KEY","CLASS_NAME_SHOW$3","CLASS_NAME_SHOWING$1","CLASS_NAME_HIDING","CLASS_NAME_BACKDROP","OPEN_SELECTOR","EVENT_SHOW$3","EVENT_SHOWN$3","EVENT_HIDE$3","EVENT_HIDE_PREVENTED","EVENT_HIDDEN$3","EVENT_RESIZE","EVENT_CLICK_DATA_API$1","EVENT_KEYDOWN_DISMISS","SELECTOR_DATA_TOGGLE$1","Default$5","DefaultType$5","Offcanvas","blur","completeCallback","uriAttributes","SAFE_URL_PATTERN","DATA_URL_PATTERN","allowedAttribute","allowedAttributeList","attributeName","nodeValue","attributeRegex","regex","DefaultAllowlist","area","br","col","code","div","em","hr","h1","h2","h3","h4","h5","h6","li","ol","pre","s","small","span","sub","sup","strong","u","ul","sanitizeHtml","unsafeHtml","allowList","sanitizeFunction","createdDocument","DOMParser","parseFromString","elementName","attributeList","allowedAttributes","NAME$5","Default$4","content","extraClass","sanitize","sanitizeFn","template","DefaultType$4","DefaultContentType","entry","TemplateFactory","getContent","_resolvePossibleFunction","hasContent","changeContent","_checkContent","toHtml","templateWrapper","_maybeSanitize","_setContent","arg","templateElement","_putElementInTemplate","textContent","NAME$4","DISALLOWED_ATTRIBUTES","CLASS_NAME_FADE$2","CLASS_NAME_SHOW$2","SELECTOR_TOOLTIP_INNER","SELECTOR_MODAL","EVENT_MODAL_HIDE","TRIGGER_HOVER","TRIGGER_FOCUS","TRIGGER_CLICK","TRIGGER_MANUAL","EVENT_HIDE$2","EVENT_HIDDEN$2","EVENT_SHOW$2","EVENT_SHOWN$2","EVENT_INSERTED","EVENT_CLICK$1","EVENT_FOCUSIN$1","EVENT_FOCUSOUT$1","EVENT_MOUSEENTER","EVENT_MOUSELEAVE","AttachmentMap","AUTO","TOP","RIGHT","BOTTOM","LEFT","Default$3","animation","container","customClass","delay","title","DefaultType$3","Tooltip","_isEnabled","_timeout","_isHovered","_activeTrigger","_templateFactory","_newContent","tip","_setListeners","_fixTitle","enable","disable","toggleEnabled","click","_leave","_enter","_hideModalHandler","_disposePopper","_isWithContent","isInTheDom","_getTipElement","_isWithActiveTrigger","_getTitle","_createTipElement","_getContentForTemplate","_getTemplateFactory","tipId","setContent","_initializeOnDelegatedTarget","_getDelegateConfig","attachment","triggers","eventIn","eventOut","_setTimeout","timeout","dataAttributes","dataAttribute","NAME$3","SELECTOR_TITLE","SELECTOR_CONTENT","Default$2","DefaultType$2","Popover","_getContent","NAME$2","EVENT_KEY$2","EVENT_ACTIVATE","EVENT_CLICK","EVENT_LOAD_DATA_API$1","CLASS_NAME_DROPDOWN_ITEM","CLASS_NAME_ACTIVE$1","SELECTOR_DATA_SPY","SELECTOR_TARGET_LINKS","SELECTOR_NAV_LIST_GROUP","SELECTOR_NAV_LINKS","SELECTOR_LINK_ITEMS","SELECTOR_DROPDOWN","SELECTOR_DROPDOWN_TOGGLE$1","Default$1","rootMargin","smoothScroll","threshold","DefaultType$1","ScrollSpy","_targetLinks","_observableSections","_rootElement","_activeTarget","_observer","_previousScrollData","visibleEntryTop","parentScrollTop","refresh","_initializeTargetsAndObservables","_maybeEnableSmoothScroll","disconnect","_getNewObserver","section","observe","observableSection","scrollTo","behavior","IntersectionObserver","_observerCallback","targetElement","id","_process","userScrollsDown","isIntersecting","_clearActiveClass","entryIsLowerThanPrevious","targetLinks","_activateParents","listGroup","activeNodes","spy","NAME$1","EVENT_KEY$1","EVENT_HIDE$1","EVENT_HIDDEN$1","EVENT_SHOW$1","EVENT_SHOWN$1","EVENT_CLICK_DATA_API","EVENT_KEYDOWN","EVENT_LOAD_DATA_API","ARROW_LEFT_KEY","ARROW_RIGHT_KEY","ARROW_UP_KEY","ARROW_DOWN_KEY","CLASS_NAME_ACTIVE","CLASS_NAME_FADE$1","CLASS_NAME_SHOW$1","CLASS_DROPDOWN","SELECTOR_DROPDOWN_TOGGLE","SELECTOR_DROPDOWN_MENU","NOT_SELECTOR_DROPDOWN_TOGGLE","SELECTOR_TAB_PANEL","SELECTOR_OUTER","SELECTOR_DATA_TOGGLE","SELECTOR_INNER_ELEM","SELECTOR_DATA_TOGGLE_ACTIVE","Tab","_setInitialAttributes","_getChildren","innerElem","_elemIsActive","active","_getActiveElem","hideEvent","_deactivate","_activate","relatedElem","_toggleDropDown","nextActiveElement","preventScroll","_setAttributeIfNotExists","_setInitialAttributesOnChild","_getInnerElement","isActive","outerElem","_getOuterElement","_setInitialAttributesOnTargetPanel","open","EVENT_MOUSEOVER","EVENT_MOUSEOUT","EVENT_FOCUSIN","EVENT_FOCUSOUT","EVENT_HIDE","EVENT_HIDDEN","EVENT_SHOW","EVENT_SHOWN","CLASS_NAME_FADE","CLASS_NAME_HIDE","CLASS_NAME_SHOW","CLASS_NAME_SHOWING","autohide","Toast","_hasMouseInteraction","_hasKeyboardInteraction","_clearTimeout","_maybeScheduleHide","isShown","_onInteraction","isInteracting","factory","subscriber_queue","writable","stop","subscribers","new_value","run_queue","subscriber","invalidate","matchHtmlRegExp","escapeHtml_1","string","escape","str","exec","lastIndex","charCodeAt","substring","formatOSMType","sType","bExcludeExternal","osmLink","aPlace","osm_type","sOSMType","osm_id","formatLabel","label","capitalize","category","wikipediaLink","calculated_wikipedia","parts","sTitle","escapeHtml","coverageType","isarea","isAdminBoundary","formatAddressRank","iRank","formatPlaceType","sOut","class","place_type","formatAdminLevel","iLevel","formatDistance","fDistance","bInMeters","formatKeywordToken","sToken","map_store","results_store","last_api_request_url_store","error_store","page","default_pagename","Nominatim_Config","Reverse_Only","pagenames","refresh_page","pagename","params","location","pathname","URLSearchParams","search","param_str","new_url","protocol","history","pushState","arrTypeAndId","query","identifyLinkInQuery","tab","footer","api_request_progress","status","loading_el","async","fetch_from_api","endpoint_name","api_url","dedupe","params2","param_names","extend_parameters","Nominatim_API_Endpoint_Params","generate_nominatim_endpoint_url","val","clean_up_parameters","encodeURIComponent","generate_nominatim_api_url","tmp_params","fetch","headers","Nominatim_API_Endpoint_Headers","response","json","err","statusText","message","fetch_content_cache","fetch_content_into_element","dom_element","conf_endpoint","Nominatim_API_Endpoint","update_html_title","Page_Title","params_hash","extra_classes","lat","lon","zoom","new_params","$$invalidate","EN_US","ZH_CN","Locales","register","locale","func","SEC_ARRAY","toDate","Date","isNaN","format","date","opts","sec","relativeDate","diffSec","diff","localeFunc","agoIn","totalSec","idx","formatDiff","getLocale","a0","a1","t1_value","timeago.format","abbr","t1","create_if_block_1","create_if_block","div5","div1","div4","div2","div3","last_updated_date","last_api_request_url","fetch_running","URL","origin","searchParams","data_updated","unit","error_message","pagelink_changes","header","nav","div0","ul0","li0","li1","ul1","li2","section0","section1","reverselink_changes","pagelink1_changes","pagelink2_changes","map_lat","map_lon","getCenter","lng","view","$page","page_title","reverse_only","form","allow_submit","field","pattern","checkValidity","validate_field","alert","checked","serialize_form","q","input1","input1_value_value","input2","input2_value_value","input3","input3_value_value","bounded","countrycodes","input5","limit","polygon_threshold","input0","input4","input6","input7","input0_value_value","street","city","county","country","postalcode","input6_value_value","input7_value_value","input8","input8_value_value","input10","div6","input9","input11","input12","input4_value_value","input5_value_value","input0_checked_value","viewbox","input1_checked_value","input2_checked_value","details","label0","li3","label1","li4","label2","li5","label3","li6","label4","li7","label5","li8","label6","set_bounded","set_dedupe","set_api_param","apiParam","sViewBox","bStructuredSearch","api_request_params","set_viewbox","use_viewbox","bounds","getBounds","west","getWest","east","getEast","L","latLng","toFixed","getNorth","getSouth","map_viewbox_as_string","update_reverse_link","center_lat_lng","wrapLatLng","feature","url_params","place_id","img_src_value","sIcon","Images_Base_Url","create_if_block_3","if_block","each_blocks","display_name","t3_value","t5_value","t7_value","important","span0","span1","t3","t5","t7","aSearchResults","iHighlightNum","sMoreURL","reverse_search","current_result","search_params","aResults","aExcludePlaceIds","parsed_url","result_el","parentElement","pos","exports","extend","dest","j","create$2","F","proto","lastId","stamp","_leaflet_id","throttle","time","lock","wrapperFn","later","wrapNum","range","includeMax","falseFn","formatNum","num","precision","pow","splitWords","getParamString","existingUrl","uppercase","templateRe","isArray","array","emptyImageUrl","getPrefixed","lastTime","timeoutDefer","timeToCall","requestFn","requestAnimationFrame","cancelFn","cancelAnimationFrame","requestAnimFrame","immediate","cancelAnimFrame","Util","Class","checkDeprecatedMixinEvents","Mixin","Events","warn","stack","NewClass","initialize","callInitHooks","parentProto","__super__","statics","_initHooks","_initHooksCalled","include","parentOptions","mergeOptions","addInitHook","types","_on","_off","removeAll","_events","_once","_listens","newListener","once","listeners","listener","_firingCount","fire","propagate","listens","sourceTarget","_propagateEvent","_fn","_eventParents","addEventParent","removeEventParent","layer","propagatedFrom","clearAllEventListeners","addOneTimeEventListener","fireEvent","hasEventListeners","Evented","Point","trunc","ceil","toPoint","Bounds","points","toBounds","LatLngBounds","corner1","corner2","latlngs","toLatLngBounds","LatLng","alt","toLatLng","clone","point","_add","subtract","_subtract","divideBy","_divideBy","multiplyBy","_multiplyBy","scaleBy","unscaleBy","_round","_floor","_ceil","_trunc","distanceTo","sqrt","equals","min2","max2","getBottomLeft","getTopRight","getTopLeft","getBottomRight","getSize","intersects","xIntersects","yIntersects","overlaps","xOverlaps","yOverlaps","isValid","pad","bufferRatio","heightBuffer","widthBuffer","sw2","ne2","sw","_southWest","ne","_northEast","getSouthWest","getNorthEast","getNorthWest","getSouthEast","latIntersects","lngIntersects","latOverlaps","lngOverlaps","toBBoxString","maxMargin","other","Earth","sizeInMeters","latAccuracy","lngAccuracy","cos","PI","CRS","latLngToPoint","latlng","projectedPoint","projection","project","scale","transformation","_transform","pointToLatLng","untransformedPoint","untransform","unproject","log","LN2","getProjectedBounds","infinite","wrapLng","wrapLat","wrapLatLngBounds","newCenter","latShift","lngShift","R","latlng1","latlng2","rad","lat1","lat2","sinDLat","sin","sinDLon","atan2","earthRadius","SphericalMercator","MAX_LATITUDE","atan","exp","Transformation","_a","_b","_c","_d","toTransformation","EPSG3857","EPSG900913","svgCreate","pointsToPath","rings","closed","len2","Browser","svg","ie","ielt9","edge","webkit","userAgentContains","android","android23","webkitVer","androidStock","opera","chrome","gecko","safari","phantom","opera12","platform","ie3d","webkit3d","WebKitCSSMatrix","gecko3d","any3d","L_DISABLE_3D","mobile","orientation","mobileWebkit","mobileWebkit3d","msPointer","MSPointerEvent","pointer","touchNative","TouchEvent","L_NO_TOUCH","mobileOpera","mobileGecko","retina","screen","deviceXDPI","logicalXDPI","passiveEvents","supportsPassiveOption","canvas$1","getContext","svg$1","createSVGRect","inlineSvg","firstChild","namespaceURI","vml","shape","adj","mac","linux","canvas","POINTER_DOWN","POINTER_MOVE","POINTER_UP","POINTER_CANCEL","pEvent","touchstart","touchmove","touchend","touchcancel","handle","_onPointerStart","_handlePointer","_pointers","_pointerDocListener","addPointerListener","_addPointerDocListener","removePointerListener","_globalPointerDown","pointerId","_globalPointerMove","_globalPointerUp","MSPOINTER_TYPE_MOUSE","changedTouches","MSPOINTER_TYPE_TOUCH","makeDblclick","prop","newEvent","detail","isTrusted","_simulated","addDoubleTapListener","last","simDblclick","sourceCapabilities","firesTouchEvents","path","getPropagationPath","HTMLLabelElement","for","HTMLInputElement","HTMLSelectElement","now","dblclick","removeDoubleTapListener","disableTextSelection","enableTextSelection","_userSelect","_outlineElement","_outlineStyle","TRANSFORM","testProp","TRANSITION","getStyle","currentStyle","create$1","toFront","lastChild","toBack","hasClass","getClass","addClass","classes","setClass","removeClass","baseVal","correspondingElement","setOpacity","opacity","_setOpacityIE","filterName","filters","Enabled","Opacity","setTransform","setPosition","_leaflet_pos","getPosition","userSelectProperty","disableImageDrag","enableImageDrag","preventOutline","tabIndex","restoreOutline","outline","getSizedParentNode","getScale","boundingClientRect","DomUtil","addOne","eventsKey","batchRemove","removeOne","filterFn","mouseSubst","wheel","originalHandler","isExternalTarget","attachEvent","detachEvent","originalEvent","_stopped","cancelBubble","disableScrollPropagation","disableClickPropagation","returnValue","ev","getMousePosition","clientY","wheelPxFactor","getWheelDelta","wheelDeltaY","deltaY","deltaMode","deltaX","deltaZ","wheelDelta","related","DomEvent","addListener","removeListener","PosAnimation","newPos","duration","easeLinearity","_el","_inProgress","_duration","_easeOutPower","_startPos","_startTime","_animate","_step","_complete","_animId","elapsed","_runFrame","_easeOut","progress","crs","minZoom","maxZoom","layers","maxBounds","renderer","zoomAnimation","zoomAnimationThreshold","fadeAnimation","markerZoomAnimation","transform3DLimit","zoomSnap","zoomDelta","trackResize","_handlers","_layers","_zoomBoundLayers","_sizeChanged","_initContainer","_initLayout","_onResize","setMaxBounds","_zoom","_limitZoom","setView","_zoomAnimated","_createAnimProxy","_proxy","_catchTransitionEnd","_addLayers","_limitCenter","_stop","_loaded","animate","pan","_tryAnimatedZoom","_tryAnimatedPan","_sizeTimer","_resetView","noMoveStart","setZoom","zoomIn","delta","zoomOut","setZoomAround","getZoomScale","viewHalf","latLngToContainerPoint","containerPointToLatLng","_getBoundsCenterZoom","paddingTL","paddingTopLeft","paddingBR","paddingBottomRight","getBoundsZoom","Infinity","paddingOffset","swPoint","nePoint","fitBounds","fitWorld","panTo","panBy","getZoom","_panAnim","step","_onPanTransitionStep","_onPanTransitionEnd","_mapPane","_getMapPanePos","_rawPanBy","flyTo","targetCenter","targetZoom","startZoom","w0","w1","u1","rho","rho2","sq","sinh","cosh","tanh","r0","w","easeOut","S","frame","_flyToFrame","getScaleZoom","_moveEnd","_moveStart","flyToBounds","_panInsideMaxBounds","setMinZoom","oldZoom","setMaxZoom","panInsideBounds","_enforcingBounds","panInside","pixelCenter","pixelPoint","pixelBounds","getPixelBounds","paddedBounds","paddedSize","invalidateSize","oldSize","_lastCenter","newSize","oldCenter","debounceMoveend","locate","_locateOptions","watch","_handleGeolocationError","onResponse","_handleGeolocationResponse","onError","_locationWatchId","geolocation","watchPosition","getCurrentPosition","stopLocate","clearWatch","_container","coords","latitude","longitude","accuracy","timestamp","HandlerClass","_containerId","_clearControlPos","_resizeRequest","_clearHandlers","_panes","_renderer","createPane","pane","_checkIfLoaded","_moved","layerPointToLatLng","_getCenterLayerPoint","getMinZoom","_layersMinZoom","getMaxZoom","_layersMaxZoom","inside","nw","se","boundsSize","snap","scalex","scaley","_size","topLeftPoint","_getTopLeftPoint","getPixelOrigin","_pixelOrigin","getPixelWorldBounds","getPane","getPanes","getContainer","toZoom","fromZoom","latLngToLayerPoint","containerPointToLayerPoint","layerPointToContainerPoint","layerPoint","mouseEventToContainerPoint","mouseEventToLayerPoint","mouseEventToLatLng","_onScroll","_fadeAnimated","_initPanes","_initControlPos","panes","_paneRenderers","markerPane","shadowPane","loading","zoomChanged","supressEvent","_getNewPixelOrigin","pinch","_getZoomSpan","_targets","onOff","_handleDOMEvent","_onMoveEnd","_findEventTargets","targets","isHover","srcElement","dragging","_draggableMoved","_isClickDisabled","_fireDOMEvent","_mouseEvents","canvasTargets","synth","filtered","isMarker","getLatLng","_radius","containerPoint","bubblingMouseEvents","moved","boxZoom","whenReady","_latLngToNewLayerPoint","topLeft","_latLngBoundsToNewLayerBounds","latLngBounds","_getCenterOffset","centerPoint","viewBounds","_getBoundsOffset","_limitOffset","newBounds","pxBounds","projectedMaxBounds","_rebound","proxy","mapPane","_animatingZoom","_onZoomTransitionEnd","_animMoveEnd","_destroyAnimProxy","z","_nothingToAnimate","getElementsByClassName","_animateZoom","startAnim","noUpdate","_animateToCenter","_animateToZoom","_tempFireZoomEvent","createMap","Control","_map","removeControl","addControl","addTo","onAdd","corner","_controlCorners","onRemove","_refocusOnMap","screenX","screenY","control","corners","_controlContainer","createCorner","vSide","hSide","Layers","collapsed","autoZIndex","hideSingleBase","sortLayers","sortFunction","layerA","layerB","nameA","nameB","baseLayers","overlays","_layerControlInputs","_lastZIndex","_handlingClick","_addLayer","_update","_checkDisabledLayers","_onLayerChange","_expandIfNotCollapsed","addBaseLayer","addOverlay","removeLayer","_getLayer","expand","_section","acceptableHeight","collapse","_expandSafely","link","_layersLink","keydown","keyCode","_baseLayersList","_separator","_overlaysList","overlay","setZIndex","baseLayersPresent","overlaysPresent","baseLayersCount","_addItem","_createRadioElement","radioHtml","radioFragment","hasLayer","defaultChecked","layerId","_onInputClick","holder","inputs","addedLayers","removedLayers","addLayer","Zoom","zoomInText","zoomInTitle","zoomOutText","zoomOutTitle","zoomName","_zoomInButton","_createButton","_zoomIn","_zoomOutButton","_zoomOut","_updateDisabled","_disabled","zoomControl","Scale","maxWidth","metric","imperial","_addScales","updateWhenIdle","_mScale","_iScale","maxMeters","_updateScales","_updateMetric","_updateImperial","meters","_getRoundNum","_updateScale","maxMiles","miles","feet","maxFeet","ratio","pow10","ukrainianFlag","Attribution","_attributions","attributionControl","getAttribution","addAttribution","_addAttribution","removeAttribution","setPrefix","attribs","prefixAndAttribs","attribution","Handler","_enabled","addHooks","removeHooks","_lastCode","START","Draggable","clickTolerance","dragStartTarget","_dragStartTarget","_preventOutline","_onDown","_dragging","finishDrag","which","_moving","first","sizedParent","_startPoint","_parentScale","mouseevent","_onMove","_onUp","_lastTarget","SVGElementInstance","correspondingUseElement","_newPos","_lastEvent","_updatePosition","noInertia","simplify","tolerance","sqTolerance","_simplifyDP","_reducePoints","pointToSegmentDistance","p1","p2","_sqClosestPointOnSegment","closestPointOnSegment","markers","Uint8Array","_simplifyDPStep","newPoints","sqDist","maxSqDist","reducedPoints","_sqDist","clipSegment","useLastCode","codeOut","newCode","codeA","_getBitCode","codeB","_getEdgeIntersection","dx","dy","dot","isFlat","_flat","polylineCenter","halfDist","segDist","dist","LineUtil","clipPolygon","clippedPoints","edges","_code","polygonCenter","f","PolyUtil","LonLat","Mercator","R_MINOR","tmp","con","ts","tan","phi","dphi","EPSG3395","EPSG4326","Simple","Layer","removeFrom","_mapToAdd","addInteractiveTarget","targetEl","removeInteractiveTarget","_layerAdd","getEvents","beforeAdd","eachLayer","_addZoomLimit","_updateZoomLevels","_removeZoomLimit","oldZoomSpan","LayerGroup","getLayerId","clearLayers","invoke","methodName","getLayer","getLayers","zIndex","layerGroup","FeatureGroup","setStyle","bringToFront","bringToBack","featureGroup","Icon","popupAnchor","tooltipAnchor","crossOrigin","createIcon","oldIcon","_createIcon","createShadow","_getIconUrl","_createImg","_setIconStyles","sizeOption","shadowAnchor","iconAnchor","marginLeft","marginTop","icon","IconDefault","iconUrl","iconRetinaUrl","shadowUrl","iconSize","shadowSize","imagePath","_detectIconPath","_stripUrl","strip","re","MarkerDrag","marker","_marker","_icon","_draggable","dragstart","_onDragStart","predrag","_onPreDrag","drag","_onDrag","dragend","_onDragEnd","_adjustPan","speed","autoPanSpeed","autoPanPadding","iconPos","panBounds","movement","_panRequest","_oldLatLng","closePopup","autoPan","shadow","_shadow","_latlng","oldLatLng","Marker","interactive","zIndexOffset","riseOnHover","riseOffset","autoPanOnFocus","draggable","_initIcon","_removeIcon","_removeShadow","viewreset","setLatLng","setZIndexOffset","getIcon","setIcon","_popup","bindPopup","_setPos","classToAdd","addIcon","mouseover","_bringToFront","mouseout","_resetZIndex","_panOnFocus","newShadow","addShadow","_updateOpacity","_initInteraction","_zIndex","_updateZIndex","opt","iconOpts","_getPopupAnchor","_getTooltipAnchor","Path","stroke","color","weight","lineCap","lineJoin","dashArray","dashOffset","fillColor","fillOpacity","fillRule","getRenderer","_initPath","_reset","_addPath","_removePath","redraw","_updatePath","_updateStyle","_updateBounds","_bringToBack","_path","_project","_clickTolerance","CircleMarker","radius","setRadius","getRadius","_point","r2","_radiusY","_pxBounds","_updateCircle","_empty","_bounds","_containsPoint","circleMarker","Circle","legacyOptions","_mRadius","half","latR","lngR","acos","circle","Polyline","smoothFactor","noClip","_setLatLngs","getLatLngs","_latlngs","setLatLngs","isEmpty","closestLayerPoint","minDistance","minPoint","jLen","_parts","_defaultShape","addLatLng","_convertLatLngs","flat","_rings","_projectLatlngs","_rawPxBounds","projectedBounds","ring","_clipPoints","segment","_simplifyPoints","_updatePoly","part","polyline","Polygon","clipped","polygon","GeoJSON","geojson","addData","features","geometries","geometry","coordinates","geometryToLayer","asFeature","resetStyle","onEachFeature","_setLayerStyle","pointToLayer","_coordsToLatLng","coordsToLatLng","_pointToLayer","coordsToLatLngs","geoLayer","properties","featureLayer","pointToLayerFn","markersInheritOptions","levelsDeep","latLngToCoords","latLngsToCoords","getFeature","newGeometry","PointToGeoJSON","toGeoJSON","geoJSON","multi","holes","toMultiPoint","isGeometryCollection","jsons","geoJson","ImageOverlay","errorOverlayUrl","_url","_image","_initImage","styleOpts","setUrl","setBounds","zoomanim","wasElementSupplied","onselectstart","onmousemove","onload","onerror","_overlayOnError","image","errorUrl","imageOverlay","VideoOverlay","autoplay","loop","keepAspectRatio","muted","playsInline","vid","onloadeddata","sourceElements","getElementsByTagName","sources","source","videoOverlay","video","SVGOverlay","svgOverlay","DivOverlay","_source","_content","openOn","_prepareOpen","_removeTimeout","visibility","_updateContent","_updateLayout","_contentNode","hasChildNodes","_getAnchor","_containerBottom","_containerLeft","_containerWidth","_initOverlay","OverlayClass","old","Popup","minWidth","maxHeight","autoPanPaddingTopLeft","autoPanPaddingBottomRight","keepInView","closeButton","closeOnEscapeKey","popup","closeOnClick","closePopupOnClick","preclick","moveend","wrapper","_wrapper","_tipContainer","_tip","_closeButton","whiteSpace","scrolledClass","_autopanning","marginBottom","containerHeight","containerWidth","layerPos","containerPos","openPopup","_popupHandlersAdded","_openPopup","keypress","_onKeyPress","move","_movePopup","unbindPopup","togglePopup","isPopupOpen","setPopupContent","getPopup","permanent","sticky","tooltip","_setPosition","subX","subY","tooltipPoint","tooltipWidth","tooltipHeight","openTooltip","closeTooltip","bindTooltip","_tooltip","isTooltipOpen","unbindTooltip","_initTooltipInteractions","_tooltipHandlersAdded","_moveTooltip","_openTooltip","_addFocusListeners","mousemove","_setAriaDescribedByOnLayer","toggleTooltip","setTooltipContent","getTooltip","_addFocusListenersOnLayer","moving","DivIcon","bgPos","backgroundPosition","divIcon","GridLayer","tileSize","updateWhenZooming","updateInterval","maxNativeZoom","minNativeZoom","noWrap","keepBuffer","_levels","_tiles","_removeAllTiles","_tileZoom","_setAutoZIndex","isLoading","_loading","tileZoom","_clampZoom","_updateLevels","viewprereset","_invalidateAll","createTile","getTileSize","compare","edgeZIndex","isFinite","nextFrame","willPrune","tile","loaded","fade","_onOpaqueTile","_noPrune","_pruneTiles","_fadeFrame","_onUpdateLevel","_removeTilesAtZoom","_onRemoveLevel","level","_setZoomTransform","_onCreateLevel","_level","retain","_retainParent","_retainChildren","_removeTile","x2","y2","z2","coords2","_tileCoordsToKey","animating","_setView","noPrune","tileZoomChanged","_abortLoading","_resetGrid","_setZoomTransforms","translate","_tileSize","_globalTileRange","_pxBoundsToTileRange","_wrapX","_wrapY","_getTiledPixelBounds","mapZoom","halfSize","tileRange","tileCenter","queue","noPruneRange","_isValidTile","createDocumentFragment","_addTile","tileBounds","_tileCoordsToBounds","_keyToBounds","_keyToTileCoords","_tileCoordsToNwSe","nwPoint","sePoint","bp","_initTile","tilePos","_getTilePos","_wrapCoords","_tileReady","_noTilesToLoad","newCoords","gridLayer","TileLayer","subdomains","errorTileUrl","zoomOffset","tms","zoomReverse","detectRetina","referrerPolicy","_onTileRemove","noRedraw","done","_tileOnLoad","_tileOnError","getTileUrl","_getSubdomain","_getZoomForUrl","invertedY","tilePoint","tileLayer","TileLayerWMS","defaultWmsParams","service","request","transparent","wmsParams","realRetina","_crs","_wmsVersion","projectionKey","bbox","setParams","tileLayerWMS","WMS","wms","Renderer","_updatePaths","_destroyContainer","_onZoom","zoomend","_onZoomEnd","_onAnimZoom","_updateTransform","currentCenterPoint","_center","topLeftOffset","Canvas","_onViewPreReset","_postponeUpdatePaths","_draw","_onMouseMove","_onClick","_handleMouseOut","_ctx","_redrawRequest","_redrawBounds","_redraw","_updateDashArray","_order","_drawLast","_drawFirst","_requestRedraw","_extendRedrawBounds","dashValue","_dashArray","_clear","clearRect","save","restore","beginPath","clip","_drawing","closePath","_fillStroke","arc","globalAlpha","fillStyle","setLineDash","lineWidth","strokeStyle","clickedLayer","_fireEvent","_handleMouseHover","_hoveredLayer","_mouseHoverThrottled","candidateHoveredLayer","vmlCreate","namespaces","vmlMixin","coordsize","_stroke","_fill","stroked","filled","dashStyle","endcap","joinstyle","_setPath","SVG","_rootGroup","_svgSize","_getPaneRenderer","_createRenderer","preferCanvas","Rectangle","_boundsToLatLngs","rectangle","BoxZoom","_pane","overlayPane","_resetStateTimeout","_destroy","_onMouseDown","_resetState","_clearDeferredResetState","contextmenu","mouseup","_onMouseUp","_onKeyDown","_box","_finish","boxZoomBounds","doubleClickZoom","DoubleClickZoom","_onDoubleClick","inertia","inertiaDeceleration","inertiaMaxSpeed","worldCopyJump","maxBoundsViscosity","Drag","_onPreDragLimit","_onPreDragWrap","_positions","_times","_offsetLimit","_viscosity","_lastTime","_lastPos","_absPos","_prunePositions","shift","pxCenter","pxWorldCenter","_initialWorldOffset","_worldWidth","_viscousLimit","worldWidth","halfWidth","newX1","newX2","newX","ease","speedVector","limitedSpeed","limitedSpeedVector","decelerationDuration","keyboardPanDelta","Keyboard","keyCodes","down","up","_setPanDelta","_setZoomDelta","_onFocus","_onBlur","mousedown","_addHooks","_removeHooks","_focused","docEl","panDelta","_panKeys","codes","_zoomKeys","altKey","ctrlKey","metaKey","newLatLng","scrollWheelZoom","wheelDebounceTime","wheelPxPerZoomLevel","ScrollWheelZoom","_onWheelScroll","_delta","_lastMousePos","_timer","_performZoom","d2","d3","d4","tapHoldDelay","tapHold","tapTolerance","TapHold","_holdTimeout","_cancel","_isTapValid","_cancelClickPrevent","_simulateEvent","cancelClickPrevent","simulatedEvent","MouseEvent","touchZoom","bounceAtZoomLimits","TouchZoom","_onTouchStart","_zooming","_centerPoint","_startLatLng","_pinchStartLatLng","_startDist","_startZoom","_onTouchMove","_onTouchEnd","_animRequest","moveFn","Projection","oldL","br0","br1","br2","br3","handleHideClick","last_click_latlng","map_center","map_zoom","map_viewbox","view_on_osm_link","last_click","mouse_position","display_map_position","mouse_lat_lng","map_link_to_osm","module","require$$0","MiniMap","minimap","toggleDisplay","zoomLevelOffset","zoomLevelFixed","centerFixed","autoToggleDisplay","minimized","collapsedWidth","collapsedHeight","aimingRectOptions","clickable","shadowRectOptions","strings","hideText","showText","mapOptions","_layer","_mainMap","_isZoomLevelFixed","_miniMap","_mainMapMoving","_miniMapMoving","_userToggledDisplay","_minimized","_addToggleButton","_aimingRect","_shadowRect","_onMainMapMoved","_onMainMapMoving","_onMiniMapMoveStarted","_onMiniMapMoving","_onMiniMapMoved","_decideZoom","_setDisplay","changeLayer","_toggleDisplayButton","_toggleButtonInitialTitleText","_toggleDisplayButtonClicked","_restore","_minimize","minimize","_onToggle","_decideMinimized","lastAimingRect","_lastAimingRectPosition","_isDefined","_isInteger","fromMaintoMini","toRet","currentDiff","proposedZoom","_lastMiniMapZoom","_fireToggleEvents","miniMapControl","action_result","show_map_position_click","display_minimap","position_marker","dataLayers","setMapData","aFeature","resetMapData","cm","L.circleMarker","L.latLngBounds","L.rectangle","centroid","geojson_layer","L.geoJson","Map_Tile_Attribution","L.map","Map_Default_Lat","Map_Default_Lon","Map_Default_Zoom","L.control","L.tileLayer","Map_Tile_URL","osm2","L.TileLayer","L.Control","MapPositionControl","pageinfo","polygon_geojson","Search_AreaPolygons","exclude_place_ids","anyStructuredFieldsSet","loaddata","div7","maybeSplitLatitude","coords_split","gotoCoordinates","newlat","newlon","newzoom","selected_option","select_value","levels","updates","to_null_out","accounted_for","spread_props","Reverse_Default_Search_Zoom","input_value_value","osmtype","osmid","type_and_id_match","t_value","localname","raw0_value","t4_value","rank_address","admin_level","raw1_value","show_if","tr","td0","td1","td2","td3","td4","td5","td6","t4","t6","t6_value","addressLine","bDistanceInMeters","bMarkUnusedLines","bAddressLineUsed","isaddress","a2","openHint","closeHint","postcode","overpass_query","t0_value","t0","t2","t2_value","if_block1","calculated_importance","create_if_block_14","if_block2","create_if_block_13","if_block3","address","create_if_block_11","if_block4","linked_places","create_if_block_10","create_if_block_4","hierarchy","table0","tbody0","div8","h20","table1","thead","tbody1","tr1","names","inforowlist_changes","indexed_date","rank_search","importance","create_if_block_15","raw_value","html_tag","calculated_postcode","detailspostcodehint_changes","create_if_block_12","addresstags","extratags","each_value_5","each_value_4","keywords","create_if_block_5","td","aThisPlace","create_if_block_7","token","create_if_block_9","create_if_block_8","each_value","base_url","api_request_finished","addressdetails","group_hierarchy","country_code","t11_value","errormessage","t13_value","updated","a_href_value","td7","td8","t9","t9_value","t11","t13","table","tbody","aPolygons","t8_value","t10_value","t8","t10","software_version","database_version","dl","dt0","dd0","dt1","dd1","dt2","dd2","dt3","dd3","aStatusData","configuration"],"mappings":"yBAAA,SAASA,IAAU,CAEnB,SAASC,EAAOC,EAAKC,GAEjB,IAAK,MAAMC,KAAKD,EACZD,EAAIE,GAAKD,EAAIC,GAC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