]> git.openstreetmap.org Git - nominatim-ui.git/blobdiff - dist/build/bundle.js
Add eslint linter (#52)
[nominatim-ui.git] / dist / build / bundle.js
index dcc88157444c31ee3c83a83a8ac7b7655c6bf918..d9994ed364cf45e36658ae7ed7f12f8be4b9b0a6 100644 (file)
@@ -52,22 +52,22 @@ function(t){var e,n,i,o,r,s,a,l,u,c,h,d,f,p,m,g,_,v,y,b="sizzle"+1*new Date,w=t.
        * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        * SOFTWARE.
        */
        * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        * SOFTWARE.
        */
-var de="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,fe=function(){for(var t=["Edge","Trident","Firefox"],e=0;e<t.length;e+=1)if(de&&navigator.userAgent.indexOf(t[e])>=0)return 1;return 0}();function pe(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then((function(){e=!1,t()})))}}function me(t){var e=!1;return function(){e||(e=!0,setTimeout((function(){e=!1,t()}),fe))}}var ge=de&&window.Promise?pe:me;function _e(t){return t&&"[object Function]"==={}.toString.call(t)}function ve(t,e){if(1!==t.nodeType)return[];var n=t.ownerDocument.defaultView.getComputedStyle(t,null);return e?n[e]:n}function ye(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function be(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=ve(t),n=e.overflow,i=e.overflowX,o=e.overflowY;return/(auto|scroll|overlay)/.test(n+o+i)?t:be(ye(t))}function we(t){return t&&t.referenceNode?t.referenceNode:t}var xe=de&&!(!window.MSInputMethodContext||!document.documentMode),Te=de&&/MSIE 10/.test(navigator.userAgent);function Ce(t){return 11===t?xe:10===t?Te:xe||Te}function Ee(t){if(!t)return document.documentElement;for(var e=Ce(10)?document.body:null,n=t.offsetParent||null;n===e&&t.nextElementSibling;)n=(t=t.nextElementSibling).offsetParent;var i=n&&n.nodeName;return i&&"BODY"!==i&&"HTML"!==i?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===ve(n,"position")?Ee(n):n:t?t.ownerDocument.documentElement:document.documentElement}function Le(t){var e=t.nodeName;return"BODY"!==e&&("HTML"===e||Ee(t.firstElementChild)===t)}function ke(t){return null!==t.parentNode?ke(t.parentNode):t}function Pe(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var n=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,i=n?t:e,o=n?e:t,r=document.createRange();r.setStart(i,0),r.setEnd(o,0);var s=r.commonAncestorContainer;if(t!==s&&e!==s||i.contains(o))return Le(s)?s:Ee(s);var a=ke(t);return a.host?Pe(a.host,e):Pe(t,ke(e).host)}function Se(t){var e="top"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top")?"scrollTop":"scrollLeft",n=t.nodeName;if("BODY"===n||"HTML"===n){var i=t.ownerDocument.documentElement;return(t.ownerDocument.scrollingElement||i)[e]}return t[e]}function Me(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=Se(e,"top"),o=Se(e,"left"),r=n?-1:1;return t.top+=i*r,t.bottom+=i*r,t.left+=o*r,t.right+=o*r,t}function Ae(t,e){var n="x"===e?"Left":"Top",i="Left"===n?"Right":"Bottom";return parseFloat(t["border"+n+"Width"])+parseFloat(t["border"+i+"Width"])}function ze(t,e,n,i){return Math.max(e["offset"+t],e["scroll"+t],n["client"+t],n["offset"+t],n["scroll"+t],Ce(10)?parseInt(n["offset"+t])+parseInt(i["margin"+("Height"===t?"Top":"Left")])+parseInt(i["margin"+("Height"===t?"Bottom":"Right")]):0)}function Ne(t){var e=t.body,n=t.documentElement,i=Ce(10)&&getComputedStyle(n);return{height:ze("Height",e,n,i),width:ze("Width",e,n,i)}}var De=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},je=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),Oe=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},Ie=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};function Be(t){return Ie({},t,{right:t.left+t.width,bottom:t.top+t.height})}function Re(t){var e={};try{if(Ce(10)){e=t.getBoundingClientRect();var n=Se(t,"top"),i=Se(t,"left");e.top+=n,e.left+=i,e.bottom+=n,e.right+=i}else e=t.getBoundingClientRect()}catch(t){}var o={left:e.left,top:e.top,width:e.right-e.left,height:e.bottom-e.top},r="HTML"===t.nodeName?Ne(t.ownerDocument):{},s=r.width||t.clientWidth||o.width,a=r.height||t.clientHeight||o.height,l=t.offsetWidth-s,u=t.offsetHeight-a;if(l||u){var c=ve(t);l-=Ae(c,"x"),u-=Ae(c,"y"),o.width-=l,o.height-=u}return Be(o)}function Ze(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=Ce(10),o="HTML"===e.nodeName,r=Re(t),s=Re(e),a=be(t),l=ve(e),u=parseFloat(l.borderTopWidth),c=parseFloat(l.borderLeftWidth);n&&o&&(s.top=Math.max(s.top,0),s.left=Math.max(s.left,0));var h=Be({top:r.top-s.top-u,left:r.left-s.left-c,width:r.width,height:r.height});if(h.marginTop=0,h.marginLeft=0,!i&&o){var d=parseFloat(l.marginTop),f=parseFloat(l.marginLeft);h.top-=u-d,h.bottom-=u-d,h.left-=c-f,h.right-=c-f,h.marginTop=d,h.marginLeft=f}return(i&&!n?e.contains(a):e===a&&"BODY"!==a.nodeName)&&(h=Me(h,e)),h}function $e(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.ownerDocument.documentElement,i=Ze(t,n),o=Math.max(n.clientWidth,window.innerWidth||0),r=Math.max(n.clientHeight,window.innerHeight||0),s=e?0:Se(n),a=e?0:Se(n,"left");return Be({top:s-i.top+i.marginTop,left:a-i.left+i.marginLeft,width:o,height:r})}function He(t){var e=t.nodeName;if("BODY"===e||"HTML"===e)return!1;if("fixed"===ve(t,"position"))return!0;var n=ye(t);return!!n&&He(n)}function qe(t){if(!t||!t.parentElement||Ce())return document.documentElement;for(var e=t.parentElement;e&&"none"===ve(e,"transform");)e=e.parentElement;return e||document.documentElement}function Fe(t,e,n,i){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],r={top:0,left:0},s=o?qe(t):Pe(t,we(e));if("viewport"===i)r=$e(s,o);else{var a=void 0;"scrollParent"===i?"BODY"===(a=be(ye(e))).nodeName&&(a=t.ownerDocument.documentElement):a="window"===i?t.ownerDocument.documentElement:i;var l=Ze(a,s,o);if("HTML"!==a.nodeName||He(s))r=l;else{var u=Ne(t.ownerDocument),c=u.height,h=u.width;r.top+=l.top-l.marginTop,r.bottom=c+l.top,r.left+=l.left-l.marginLeft,r.right=h+l.left}}var d="number"==typeof(n=n||0);return r.left+=d?n:n.left||0,r.top+=d?n:n.top||0,r.right-=d?n:n.right||0,r.bottom-=d?n:n.bottom||0,r}function We(t){return t.width*t.height}function Ue(t,e,n,i,o){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var s=Fe(n,i,r,o),a={top:{width:s.width,height:e.top-s.top},right:{width:s.right-e.right,height:s.height},bottom:{width:s.width,height:s.bottom-e.bottom},left:{width:e.left-s.left,height:s.height}},l=Object.keys(a).map((function(t){return Ie({key:t},a[t],{area:We(a[t])})})).sort((function(t,e){return e.area-t.area})),u=l.filter((function(t){var e=t.width,i=t.height;return e>=n.clientWidth&&i>=n.clientHeight})),c=u.length>0?u[0].key:l[0].key,h=t.split("-")[1];return c+(h?"-"+h:"")}function Ve(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return Ze(n,i?qe(e):Pe(e,we(n)),i)}function Ge(t){var e=t.ownerDocument.defaultView.getComputedStyle(t),n=parseFloat(e.marginTop||0)+parseFloat(e.marginBottom||0),i=parseFloat(e.marginLeft||0)+parseFloat(e.marginRight||0);return{width:t.offsetWidth+i,height:t.offsetHeight+n}}function Ke(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,(function(t){return e[t]}))}function Ye(t,e,n){n=n.split("-")[0];var i=Ge(t),o={width:i.width,height:i.height},r=-1!==["right","left"].indexOf(n),s=r?"top":"left",a=r?"left":"top",l=r?"height":"width",u=r?"width":"height";return o[s]=e[s]+e[l]/2-i[l]/2,o[a]=n===a?e[a]-i[u]:e[Ke(a)],o}function Xe(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function Qe(t,e,n){if(Array.prototype.findIndex)return t.findIndex((function(t){return t[e]===n}));var i=Xe(t,(function(t){return t[e]===n}));return t.indexOf(i)}function Je(t,e,n){return(void 0===n?t:t.slice(0,Qe(t,"name",n))).forEach((function(t){t.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=t.function||t.fn;t.enabled&&_e(n)&&(e.offsets.popper=Be(e.offsets.popper),e.offsets.reference=Be(e.offsets.reference),e=n(e,t))})),e}function tn(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=Ve(this.state,this.popper,this.reference,this.options.positionFixed),t.placement=Ue(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.positionFixed=this.options.positionFixed,t.offsets.popper=Ye(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",t=Je(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}function en(t,e){return t.some((function(t){var n=t.name;return t.enabled&&n===e}))}function nn(t){for(var e=[!1,"ms","Webkit","Moz","O"],n=t.charAt(0).toUpperCase()+t.slice(1),i=0;i<e.length;i++){var o=e[i],r=o?""+o+n:t;if(void 0!==document.body.style[r])return r}return null}function on(){return this.state.isDestroyed=!0,en(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[nn("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function rn(t){var e=t.ownerDocument;return e?e.defaultView:window}function sn(t,e,n,i){var o="BODY"===t.nodeName,r=o?t.ownerDocument.defaultView:t;r.addEventListener(e,n,{passive:!0}),o||sn(be(r.parentNode),e,n,i),i.push(r)}function an(t,e,n,i){n.updateBound=i,rn(t).addEventListener("resize",n.updateBound,{passive:!0});var o=be(t);return sn(o,"scroll",n.updateBound,n.scrollParents),n.scrollElement=o,n.eventsEnabled=!0,n}function ln(){this.state.eventsEnabled||(this.state=an(this.reference,this.options,this.state,this.scheduleUpdate))}function un(t,e){return rn(t).removeEventListener("resize",e.updateBound),e.scrollParents.forEach((function(t){t.removeEventListener("scroll",e.updateBound)})),e.updateBound=null,e.scrollParents=[],e.scrollElement=null,e.eventsEnabled=!1,e}function cn(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=un(this.reference,this.state))}function hn(t){return""!==t&&!isNaN(parseFloat(t))&&isFinite(t)}function dn(t,e){Object.keys(e).forEach((function(n){var i="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&hn(e[n])&&(i="px"),t.style[n]=e[n]+i}))}function fn(t,e){Object.keys(e).forEach((function(n){!1!==e[n]?t.setAttribute(n,e[n]):t.removeAttribute(n)}))}function pn(t){return dn(t.instance.popper,t.styles),fn(t.instance.popper,t.attributes),t.arrowElement&&Object.keys(t.arrowStyles).length&&dn(t.arrowElement,t.arrowStyles),t}function mn(t,e,n,i,o){var r=Ve(o,e,t,n.positionFixed),s=Ue(n.placement,r,e,t,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return e.setAttribute("x-placement",s),dn(e,{position:n.positionFixed?"fixed":"absolute"}),n}function gn(t,e){var n=t.offsets,i=n.popper,o=n.reference,r=Math.round,s=Math.floor,a=function(t){return t},l=r(o.width),u=r(i.width),c=-1!==["left","right"].indexOf(t.placement),h=-1!==t.placement.indexOf("-"),d=e?c||h||l%2==u%2?r:s:a,f=e?r:a;return{left:d(l%2==1&&u%2==1&&!h&&e?i.left-1:i.left),top:f(i.top),bottom:f(i.bottom),right:d(i.right)}}var _n=de&&/Firefox/i.test(navigator.userAgent);function vn(t,e){var n=e.x,i=e.y,o=t.offsets.popper,r=Xe(t.instance.modifiers,(function(t){return"applyStyle"===t.name})).gpuAcceleration;void 0!==r&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var s=void 0!==r?r:e.gpuAcceleration,a=Ee(t.instance.popper),l=Re(a),u={position:o.position},c=gn(t,window.devicePixelRatio<2||!_n),h="bottom"===n?"top":"bottom",d="right"===i?"left":"right",f=nn("transform"),p=void 0,m=void 0;if(m="bottom"===h?"HTML"===a.nodeName?-a.clientHeight+c.bottom:-l.height+c.bottom:c.top,p="right"===d?"HTML"===a.nodeName?-a.clientWidth+c.right:-l.width+c.right:c.left,s&&f)u[f]="translate3d("+p+"px, "+m+"px, 0)",u[h]=0,u[d]=0,u.willChange="transform";else{var g="bottom"===h?-1:1,_="right"===d?-1:1;u[h]=m*g,u[d]=p*_,u.willChange=h+", "+d}var v={"x-placement":t.placement};return t.attributes=Ie({},v,t.attributes),t.styles=Ie({},u,t.styles),t.arrowStyles=Ie({},t.offsets.arrow,t.arrowStyles),t}function yn(t,e,n){var i=Xe(t,(function(t){return t.name===e})),o=!!i&&t.some((function(t){return t.name===n&&t.enabled&&t.order<i.order}));if(!o){var r="`"+e+"`",s="`"+n+"`";console.warn(s+" modifier is required by "+r+" modifier in order to work, be sure to include it before "+r+"!")}return o}function bn(t,e){var n;if(!yn(t.instance.modifiers,"arrow","keepTogether"))return t;var i=e.element;if("string"==typeof i){if(!(i=t.instance.popper.querySelector(i)))return t}else if(!t.instance.popper.contains(i))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var o=t.placement.split("-")[0],r=t.offsets,s=r.popper,a=r.reference,l=-1!==["left","right"].indexOf(o),u=l?"height":"width",c=l?"Top":"Left",h=c.toLowerCase(),d=l?"left":"top",f=l?"bottom":"right",p=Ge(i)[u];a[f]-p<s[h]&&(t.offsets.popper[h]-=s[h]-(a[f]-p)),a[h]+p>s[f]&&(t.offsets.popper[h]+=a[h]+p-s[f]),t.offsets.popper=Be(t.offsets.popper);var m=a[h]+a[u]/2-p/2,g=ve(t.instance.popper),_=parseFloat(g["margin"+c]),v=parseFloat(g["border"+c+"Width"]),y=m-t.offsets.popper[h]-_-v;return y=Math.max(Math.min(s[u]-p,y),0),t.arrowElement=i,t.offsets.arrow=(Oe(n={},h,Math.round(y)),Oe(n,d,""),n),t}function wn(t){return"end"===t?"start":"start"===t?"end":t}var xn=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],Tn=xn.slice(3);function Cn(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Tn.indexOf(t),i=Tn.slice(n+1).concat(Tn.slice(0,n));return e?i.reverse():i}var En={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function Ln(t,e){if(en(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var n=Fe(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement,t.positionFixed),i=t.placement.split("-")[0],o=Ke(i),r=t.placement.split("-")[1]||"",s=[];switch(e.behavior){case En.FLIP:s=[i,o];break;case En.CLOCKWISE:s=Cn(i);break;case En.COUNTERCLOCKWISE:s=Cn(i,!0);break;default:s=e.behavior}return s.forEach((function(a,l){if(i!==a||s.length===l+1)return t;i=t.placement.split("-")[0],o=Ke(i);var u=t.offsets.popper,c=t.offsets.reference,h=Math.floor,d="left"===i&&h(u.right)>h(c.left)||"right"===i&&h(u.left)<h(c.right)||"top"===i&&h(u.bottom)>h(c.top)||"bottom"===i&&h(u.top)<h(c.bottom),f=h(u.left)<h(n.left),p=h(u.right)>h(n.right),m=h(u.top)<h(n.top),g=h(u.bottom)>h(n.bottom),_="left"===i&&f||"right"===i&&p||"top"===i&&m||"bottom"===i&&g,v=-1!==["top","bottom"].indexOf(i),y=!!e.flipVariations&&(v&&"start"===r&&f||v&&"end"===r&&p||!v&&"start"===r&&m||!v&&"end"===r&&g),b=!!e.flipVariationsByContent&&(v&&"start"===r&&p||v&&"end"===r&&f||!v&&"start"===r&&g||!v&&"end"===r&&m),w=y||b;(d||_||w)&&(t.flipped=!0,(d||_)&&(i=s[l+1]),w&&(r=wn(r)),t.placement=i+(r?"-"+r:""),t.offsets.popper=Ie({},t.offsets.popper,Ye(t.instance.popper,t.offsets.reference,t.placement)),t=Je(t.instance.modifiers,t,"flip"))})),t}function kn(t){var e=t.offsets,n=e.popper,i=e.reference,o=t.placement.split("-")[0],r=Math.floor,s=-1!==["top","bottom"].indexOf(o),a=s?"right":"bottom",l=s?"left":"top",u=s?"width":"height";return n[a]<r(i[l])&&(t.offsets.popper[l]=r(i[l])-n[u]),n[l]>r(i[a])&&(t.offsets.popper[l]=r(i[a])),t}function Pn(t,e,n,i){var o=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),r=+o[1],s=o[2];if(!r)return t;if(0===s.indexOf("%")){var a=void 0;switch(s){case"%p":a=n;break;case"%":case"%r":default:a=i}return Be(a)[e]/100*r}return"vh"===s||"vw"===s?("vh"===s?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*r:r}function Sn(t,e,n,i){var o=[0,0],r=-1!==["right","left"].indexOf(i),s=t.split(/(\+|\-)/).map((function(t){return t.trim()})),a=s.indexOf(Xe(s,(function(t){return-1!==t.search(/,|\s/)})));s[a]&&-1===s[a].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,u=-1!==a?[s.slice(0,a).concat([s[a].split(l)[0]]),[s[a].split(l)[1]].concat(s.slice(a+1))]:[s];return(u=u.map((function(t,i){var o=(1===i?!r:r)?"height":"width",s=!1;return t.reduce((function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,s=!0,t):s?(t[t.length-1]+=e,s=!1,t):t.concat(e)}),[]).map((function(t){return Pn(t,o,e,n)}))}))).forEach((function(t,e){t.forEach((function(n,i){hn(n)&&(o[e]+=n*("-"===t[i-1]?-1:1))}))})),o}function Mn(t,e){var n=e.offset,i=t.placement,o=t.offsets,r=o.popper,s=o.reference,a=i.split("-")[0],l=void 0;return l=hn(+n)?[+n,0]:Sn(n,r,s,a),"left"===a?(r.top+=l[0],r.left-=l[1]):"right"===a?(r.top+=l[0],r.left+=l[1]):"top"===a?(r.left+=l[0],r.top-=l[1]):"bottom"===a&&(r.left+=l[0],r.top+=l[1]),t.popper=r,t}function An(t,e){var n=e.boundariesElement||Ee(t.instance.popper);t.instance.reference===n&&(n=Ee(n));var i=nn("transform"),o=t.instance.popper.style,r=o.top,s=o.left,a=o[i];o.top="",o.left="",o[i]="";var l=Fe(t.instance.popper,t.instance.reference,e.padding,n,t.positionFixed);o.top=r,o.left=s,o[i]=a,e.boundaries=l;var u=e.priority,c=t.offsets.popper,h={primary:function(t){var n=c[t];return c[t]<l[t]&&!e.escapeWithReference&&(n=Math.max(c[t],l[t])),Oe({},t,n)},secondary:function(t){var n="right"===t?"left":"top",i=c[n];return c[t]>l[t]&&!e.escapeWithReference&&(i=Math.min(c[n],l[t]-("right"===t?c.width:c.height))),Oe({},n,i)}};return u.forEach((function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";c=Ie({},c,h[e](t))})),t.offsets.popper=c,t}function zn(t){var e=t.placement,n=e.split("-")[0],i=e.split("-")[1];if(i){var o=t.offsets,r=o.reference,s=o.popper,a=-1!==["bottom","top"].indexOf(n),l=a?"left":"top",u=a?"width":"height",c={start:Oe({},l,r[l]),end:Oe({},l,r[l]+r[u]-s[u])};t.offsets.popper=Ie({},s,c[i])}return t}function Nn(t){if(!yn(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,n=Xe(t.instance.modifiers,(function(t){return"preventOverflow"===t.name})).boundaries;if(e.bottom<n.top||e.left>n.right||e.top>n.bottom||e.right<n.left){if(!0===t.hide)return t;t.hide=!0,t.attributes["x-out-of-boundaries"]=""}else{if(!1===t.hide)return t;t.hide=!1,t.attributes["x-out-of-boundaries"]=!1}return t}function Dn(t){var e=t.placement,n=e.split("-")[0],i=t.offsets,o=i.popper,r=i.reference,s=-1!==["left","right"].indexOf(n),a=-1===["top","left"].indexOf(n);return o[s?"left":"top"]=r[n]-(a?o[s?"width":"height"]:0),t.placement=Ke(e),t.offsets.popper=Be(o),t}var jn={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:zn},offset:{order:200,enabled:!0,fn:Mn,offset:0},preventOverflow:{order:300,enabled:!0,fn:An,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:kn},arrow:{order:500,enabled:!0,fn:bn,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:Ln,behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:Dn},hide:{order:800,enabled:!0,fn:Nn},computeStyle:{order:850,enabled:!0,fn:vn,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:pn,onLoad:mn,gpuAcceleration:void 0}}},On=function(){function t(e,n){var i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};De(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(i.update)},this.update=ge(this.update.bind(this)),this.options=Ie({},t.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(Ie({},t.Defaults.modifiers,o.modifiers)).forEach((function(e){i.options.modifiers[e]=Ie({},t.Defaults.modifiers[e]||{},o.modifiers?o.modifiers[e]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(t){return Ie({name:t},i.options.modifiers[t])})).sort((function(t,e){return t.order-e.order})),this.modifiers.forEach((function(t){t.enabled&&_e(t.onLoad)&&t.onLoad(i.reference,i.popper,i.options,t,i.state)})),this.update();var r=this.options.eventsEnabled;r&&this.enableEventListeners(),this.state.eventsEnabled=r}return je(t,[{key:"update",value:function(){return tn.call(this)}},{key:"destroy",value:function(){return on.call(this)}},{key:"enableEventListeners",value:function(){return ln.call(this)}},{key:"disableEventListeners",value:function(){return cn.call(this)}}]),t}();On.Utils=("undefined"!=typeof window?window:J).PopperUtils,On.placements=xn,On.Defaults=jn;var In="dropdown",Bn="4.6.0",Rn="bs.dropdown",Zn="."+Rn,$n=".data-api",Hn=i.default.fn[In],qn=27,Fn=32,Wn=9,Un=38,Vn=40,Gn=3,Kn=new RegExp(Un+"|"+Vn+"|"+qn),Yn="hide"+Zn,Xn="hidden"+Zn,Qn="show"+Zn,Jn="shown"+Zn,ti="click"+Zn,ei="click"+Zn+$n,ni="keydown"+Zn+$n,ii="keyup"+Zn+$n,oi="disabled",ri="show",si="dropup",ai="dropright",li="dropleft",ui="dropdown-menu-right",ci="position-static",hi='[data-toggle="dropdown"]',di=".dropdown form",fi=".dropdown-menu",pi=".navbar-nav",mi=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",gi="top-start",_i="top-end",vi="bottom-start",yi="bottom-end",bi="right-start",wi="left-start",xi={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic",popperConfig:null},Ti={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string",popperConfig:"(null|object)"},Ci=function(){function t(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var e=t.prototype;return e.toggle=function(){if(!this._element.disabled&&!i.default(this._element).hasClass(oi)){var e=i.default(this._menu).hasClass(ri);t._clearMenus(),e||this.show(!0)}},e.show=function(e){if(void 0===e&&(e=!1),!(this._element.disabled||i.default(this._element).hasClass(oi)||i.default(this._menu).hasClass(ri))){var n={relatedTarget:this._element},o=i.default.Event(Qn,n),r=t._getParentFromElement(this._element);if(i.default(r).trigger(o),!o.isDefaultPrevented()){if(!this._inNavbar&&e){if(void 0===On)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");var s=this._element;"parent"===this._config.reference?s=r:m.isElement(this._config.reference)&&(s=this._config.reference,void 0!==this._config.reference.jquery&&(s=this._config.reference[0])),"scrollParent"!==this._config.boundary&&i.default(r).addClass(ci),this._popper=new On(s,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===i.default(r).closest(pi).length&&i.default(document.body).children().on("mouseover",null,i.default.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),i.default(this._menu).toggleClass(ri),i.default(r).toggleClass(ri).trigger(i.default.Event(Jn,n))}}},e.hide=function(){if(!this._element.disabled&&!i.default(this._element).hasClass(oi)&&i.default(this._menu).hasClass(ri)){var e={relatedTarget:this._element},n=i.default.Event(Yn,e),o=t._getParentFromElement(this._element);i.default(o).trigger(n),n.isDefaultPrevented()||(this._popper&&this._popper.destroy(),i.default(this._menu).toggleClass(ri),i.default(o).toggleClass(ri).trigger(i.default.Event(Xn,e)))}},e.dispose=function(){i.default.removeData(this._element,Rn),i.default(this._element).off(Zn),this._element=null,this._menu=null,null!==this._popper&&(this._popper.destroy(),this._popper=null)},e.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},e._addEventListeners=function(){var t=this;i.default(this._element).on(ti,(function(e){e.preventDefault(),e.stopPropagation(),t.toggle()}))},e._getConfig=function(t){return t=s({},this.constructor.Default,i.default(this._element).data(),t),m.typeCheckConfig(In,t,this.constructor.DefaultType),t},e._getMenuElement=function(){if(!this._menu){var e=t._getParentFromElement(this._element);e&&(this._menu=e.querySelector(fi))}return this._menu},e._getPlacement=function(){var t=i.default(this._element.parentNode),e=vi;return t.hasClass(si)?e=i.default(this._menu).hasClass(ui)?_i:gi:t.hasClass(ai)?e=bi:t.hasClass(li)?e=wi:i.default(this._menu).hasClass(ui)&&(e=yi),e},e._detectNavbar=function(){return i.default(this._element).closest(".navbar").length>0},e._getOffset=function(){var t=this,e={};return"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=s({},e.offsets,t._config.offset(e.offsets,t._element)||{}),e}:e.offset=this._config.offset,e},e._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(t.modifiers.applyStyle={enabled:!1}),s({},t,this._config.popperConfig)},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this).data(Rn);if(n||(n=new t(this,"object"==typeof e?e:null),i.default(this).data(Rn,n)),"string"==typeof e){if(void 0===n[e])throw new TypeError('No method named "'+e+'"');n[e]()}}))},t._clearMenus=function(e){if(!e||e.which!==Gn&&("keyup"!==e.type||e.which===Wn))for(var n=[].slice.call(document.querySelectorAll(hi)),o=0,r=n.length;o<r;o++){var s=t._getParentFromElement(n[o]),a=i.default(n[o]).data(Rn),l={relatedTarget:n[o]};if(e&&"click"===e.type&&(l.clickEvent=e),a){var u=a._menu;if(i.default(s).hasClass(ri)&&!(e&&("click"===e.type&&/input|textarea/i.test(e.target.tagName)||"keyup"===e.type&&e.which===Wn)&&i.default.contains(s,e.target))){var c=i.default.Event(Yn,l);i.default(s).trigger(c),c.isDefaultPrevented()||("ontouchstart"in document.documentElement&&i.default(document.body).children().off("mouseover",null,i.default.noop),n[o].setAttribute("aria-expanded","false"),a._popper&&a._popper.destroy(),i.default(u).removeClass(ri),i.default(s).removeClass(ri).trigger(i.default.Event(Xn,l)))}}}},t._getParentFromElement=function(t){var e,n=m.getSelectorFromElement(t);return n&&(e=document.querySelector(n)),e||t.parentNode},t._dataApiKeydownHandler=function(e){if(!(/input|textarea/i.test(e.target.tagName)?e.which===Fn||e.which!==qn&&(e.which!==Vn&&e.which!==Un||i.default(e.target).closest(fi).length):!Kn.test(e.which))&&!this.disabled&&!i.default(this).hasClass(oi)){var n=t._getParentFromElement(this),o=i.default(n).hasClass(ri);if(o||e.which!==qn){if(e.preventDefault(),e.stopPropagation(),!o||e.which===qn||e.which===Fn)return e.which===qn&&i.default(n.querySelector(hi)).trigger("focus"),void i.default(this).trigger("click");var r=[].slice.call(n.querySelectorAll(mi)).filter((function(t){return i.default(t).is(":visible")}));if(0!==r.length){var s=r.indexOf(e.target);e.which===Un&&s>0&&s--,e.which===Vn&&s<r.length-1&&s++,s<0&&(s=0),r[s].focus()}}}},r(t,null,[{key:"VERSION",get:function(){return Bn}},{key:"Default",get:function(){return xi}},{key:"DefaultType",get:function(){return Ti}}]),t}();i.default(document).on(ni,hi,Ci._dataApiKeydownHandler).on(ni,fi,Ci._dataApiKeydownHandler).on(ei+" "+ii,Ci._clearMenus).on(ei,hi,(function(t){t.preventDefault(),t.stopPropagation(),Ci._jQueryInterface.call(i.default(this),"toggle")})).on(ei,di,(function(t){t.stopPropagation()})),i.default.fn[In]=Ci._jQueryInterface,i.default.fn[In].Constructor=Ci,i.default.fn[In].noConflict=function(){return i.default.fn[In]=Hn,Ci._jQueryInterface};var Ei="modal",Li="4.6.0",ki="bs.modal",Pi="."+ki,Si=".data-api",Mi=i.default.fn[Ei],Ai=27,zi={backdrop:!0,keyboard:!0,focus:!0,show:!0},Ni={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},Di="hide"+Pi,ji="hidePrevented"+Pi,Oi="hidden"+Pi,Ii="show"+Pi,Bi="shown"+Pi,Ri="focusin"+Pi,Zi="resize"+Pi,$i="click.dismiss"+Pi,Hi="keydown.dismiss"+Pi,qi="mouseup.dismiss"+Pi,Fi="mousedown.dismiss"+Pi,Wi="click"+Pi+Si,Ui="modal-dialog-scrollable",Vi="modal-scrollbar-measure",Gi="modal-backdrop",Ki="modal-open",Yi="fade",Xi="show",Qi="modal-static",Ji=".modal-dialog",to=".modal-body",eo='[data-toggle="modal"]',no='[data-dismiss="modal"]',io=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",oo=".sticky-top",ro=function(){function t(t,e){this._config=this._getConfig(e),this._element=t,this._dialog=t.querySelector(Ji),this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollbarWidth=0}var e=t.prototype;return e.toggle=function(t){return this._isShown?this.hide():this.show(t)},e.show=function(t){var e=this;if(!this._isShown&&!this._isTransitioning){i.default(this._element).hasClass(Yi)&&(this._isTransitioning=!0);var n=i.default.Event(Ii,{relatedTarget:t});i.default(this._element).trigger(n),this._isShown||n.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),i.default(this._element).on($i,no,(function(t){return e.hide(t)})),i.default(this._dialog).on(Fi,(function(){i.default(e._element).one(qi,(function(t){i.default(t.target).is(e._element)&&(e._ignoreBackdropClick=!0)}))})),this._showBackdrop((function(){return e._showElement(t)})))}},e.hide=function(t){var e=this;if(t&&t.preventDefault(),this._isShown&&!this._isTransitioning){var n=i.default.Event(Di);if(i.default(this._element).trigger(n),this._isShown&&!n.isDefaultPrevented()){this._isShown=!1;var o=i.default(this._element).hasClass(Yi);if(o&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),i.default(document).off(Ri),i.default(this._element).removeClass(Xi),i.default(this._element).off($i),i.default(this._dialog).off(Fi),o){var r=m.getTransitionDurationFromElement(this._element);i.default(this._element).one(m.TRANSITION_END,(function(t){return e._hideModal(t)})).emulateTransitionEnd(r)}else this._hideModal()}}},e.dispose=function(){[window,this._element,this._dialog].forEach((function(t){return i.default(t).off(Pi)})),i.default(document).off(Ri),i.default.removeData(this._element,ki),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._isTransitioning=null,this._scrollbarWidth=null},e.handleUpdate=function(){this._adjustDialog()},e._getConfig=function(t){return t=s({},zi,t),m.typeCheckConfig(Ei,t,Ni),t},e._triggerBackdropTransition=function(){var t=this,e=i.default.Event(ji);if(i.default(this._element).trigger(e),!e.isDefaultPrevented()){var n=this._element.scrollHeight>document.documentElement.clientHeight;n||(this._element.style.overflowY="hidden"),this._element.classList.add(Qi);var o=m.getTransitionDurationFromElement(this._dialog);i.default(this._element).off(m.TRANSITION_END),i.default(this._element).one(m.TRANSITION_END,(function(){t._element.classList.remove(Qi),n||i.default(t._element).one(m.TRANSITION_END,(function(){t._element.style.overflowY=""})).emulateTransitionEnd(t._element,o)})).emulateTransitionEnd(o),this._element.focus()}},e._showElement=function(t){var e=this,n=i.default(this._element).hasClass(Yi),o=this._dialog?this._dialog.querySelector(to):null;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),i.default(this._dialog).hasClass(Ui)&&o?o.scrollTop=0:this._element.scrollTop=0,n&&m.reflow(this._element),i.default(this._element).addClass(Xi),this._config.focus&&this._enforceFocus();var r=i.default.Event(Bi,{relatedTarget:t}),s=function(){e._config.focus&&e._element.focus(),e._isTransitioning=!1,i.default(e._element).trigger(r)};if(n){var a=m.getTransitionDurationFromElement(this._dialog);i.default(this._dialog).one(m.TRANSITION_END,s).emulateTransitionEnd(a)}else s()},e._enforceFocus=function(){var t=this;i.default(document).off(Ri).on(Ri,(function(e){document!==e.target&&t._element!==e.target&&0===i.default(t._element).has(e.target).length&&t._element.focus()}))},e._setEscapeEvent=function(){var t=this;this._isShown?i.default(this._element).on(Hi,(function(e){t._config.keyboard&&e.which===Ai?(e.preventDefault(),t.hide()):t._config.keyboard||e.which!==Ai||t._triggerBackdropTransition()})):this._isShown||i.default(this._element).off(Hi)},e._setResizeEvent=function(){var t=this;this._isShown?i.default(window).on(Zi,(function(e){return t.handleUpdate(e)})):i.default(window).off(Zi)},e._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._showBackdrop((function(){i.default(document.body).removeClass(Ki),t._resetAdjustments(),t._resetScrollbar(),i.default(t._element).trigger(Oi)}))},e._removeBackdrop=function(){this._backdrop&&(i.default(this._backdrop).remove(),this._backdrop=null)},e._showBackdrop=function(t){var e=this,n=i.default(this._element).hasClass(Yi)?Yi:"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className=Gi,n&&this._backdrop.classList.add(n),i.default(this._backdrop).appendTo(document.body),i.default(this._element).on($i,(function(t){e._ignoreBackdropClick?e._ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"===e._config.backdrop?e._triggerBackdropTransition():e.hide())})),n&&m.reflow(this._backdrop),i.default(this._backdrop).addClass(Xi),!t)return;if(!n)return void t();var o=m.getTransitionDurationFromElement(this._backdrop);i.default(this._backdrop).one(m.TRANSITION_END,t).emulateTransitionEnd(o)}else if(!this._isShown&&this._backdrop){i.default(this._backdrop).removeClass(Xi);var r=function(){e._removeBackdrop(),t&&t()};if(i.default(this._element).hasClass(Yi)){var s=m.getTransitionDurationFromElement(this._backdrop);i.default(this._backdrop).one(m.TRANSITION_END,r).emulateTransitionEnd(s)}else r()}else t&&t()},e._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},e._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},e._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(t.left+t.right)<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},e._setScrollbar=function(){var t=this;if(this._isBodyOverflowing){var e=[].slice.call(document.querySelectorAll(io)),n=[].slice.call(document.querySelectorAll(oo));i.default(e).each((function(e,n){var o=n.style.paddingRight,r=i.default(n).css("padding-right");i.default(n).data("padding-right",o).css("padding-right",parseFloat(r)+t._scrollbarWidth+"px")})),i.default(n).each((function(e,n){var o=n.style.marginRight,r=i.default(n).css("margin-right");i.default(n).data("margin-right",o).css("margin-right",parseFloat(r)-t._scrollbarWidth+"px")}));var o=document.body.style.paddingRight,r=i.default(document.body).css("padding-right");i.default(document.body).data("padding-right",o).css("padding-right",parseFloat(r)+this._scrollbarWidth+"px")}i.default(document.body).addClass(Ki)},e._resetScrollbar=function(){var t=[].slice.call(document.querySelectorAll(io));i.default(t).each((function(t,e){var n=i.default(e).data("padding-right");i.default(e).removeData("padding-right"),e.style.paddingRight=n||""}));var e=[].slice.call(document.querySelectorAll(""+oo));i.default(e).each((function(t,e){var n=i.default(e).data("margin-right");void 0!==n&&i.default(e).css("margin-right",n).removeData("margin-right")}));var n=i.default(document.body).data("padding-right");i.default(document.body).removeData("padding-right"),document.body.style.paddingRight=n||""},e._getScrollbarWidth=function(){var t=document.createElement("div");t.className=Vi,document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},t._jQueryInterface=function(e,n){return this.each((function(){var o=i.default(this).data(ki),r=s({},zi,i.default(this).data(),"object"==typeof e&&e?e:{});if(o||(o=new t(this,r),i.default(this).data(ki,o)),"string"==typeof e){if(void 0===o[e])throw new TypeError('No method named "'+e+'"');o[e](n)}else r.show&&o.show(n)}))},r(t,null,[{key:"VERSION",get:function(){return Li}},{key:"Default",get:function(){return zi}}]),t}();i.default(document).on(Wi,eo,(function(t){var e,n=this,o=m.getSelectorFromElement(this);o&&(e=document.querySelector(o));var r=i.default(e).data(ki)?"toggle":s({},i.default(e).data(),i.default(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||t.preventDefault();var a=i.default(e).one(Ii,(function(t){t.isDefaultPrevented()||a.one(Oi,(function(){i.default(n).is(":visible")&&n.focus()}))}));ro._jQueryInterface.call(i.default(e),r,this)})),i.default.fn[Ei]=ro._jQueryInterface,i.default.fn[Ei].Constructor=ro,i.default.fn[Ei].noConflict=function(){return i.default.fn[Ei]=Mi,ro._jQueryInterface};var so=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],ao={"*":["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:[]},lo=/^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi,uo=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;function co(t,e){var n=t.nodeName.toLowerCase();if(-1!==e.indexOf(n))return-1===so.indexOf(n)||Boolean(t.nodeValue.match(lo)||t.nodeValue.match(uo));for(var i=e.filter((function(t){return t instanceof RegExp})),o=0,r=i.length;o<r;o++)if(n.match(i[o]))return!0;return!1}function ho(t,e,n){if(0===t.length)return t;if(n&&"function"==typeof n)return n(t);for(var i=(new window.DOMParser).parseFromString(t,"text/html"),o=Object.keys(e),r=[].slice.call(i.body.querySelectorAll("*")),s=function(t,n){var i=r[t],s=i.nodeName.toLowerCase();if(-1===o.indexOf(i.nodeName.toLowerCase()))return i.parentNode.removeChild(i),"continue";var a=[].slice.call(i.attributes),l=[].concat(e["*"]||[],e[s]||[]);a.forEach((function(t){co(t,l)||i.removeAttribute(t.nodeName)}))},a=0,l=r.length;a<l;a++)s(a);return i.body.innerHTML}var fo="tooltip",po="4.6.0",mo="bs.tooltip",go="."+mo,_o=i.default.fn[fo],vo="bs-tooltip",yo=new RegExp("(^|\\s)"+vo+"\\S+","g"),bo=["sanitize","whiteList","sanitizeFn"],wo={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object",popperConfig:"(null|object)"},xo={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},To={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",customClass:"",sanitize:!0,sanitizeFn:null,whiteList:ao,popperConfig:null},Co="show",Eo="out",Lo={HIDE:"hide"+go,HIDDEN:"hidden"+go,SHOW:"show"+go,SHOWN:"shown"+go,INSERTED:"inserted"+go,CLICK:"click"+go,FOCUSIN:"focusin"+go,FOCUSOUT:"focusout"+go,MOUSEENTER:"mouseenter"+go,MOUSELEAVE:"mouseleave"+go},ko="fade",Po="show",So=".tooltip-inner",Mo=".arrow",Ao="hover",zo="focus",No="click",Do="manual",jo=function(){function t(t,e){if(void 0===On)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var e=t.prototype;return e.enable=function(){this._isEnabled=!0},e.disable=function(){this._isEnabled=!1},e.toggleEnabled=function(){this._isEnabled=!this._isEnabled},e.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,n=i.default(t.currentTarget).data(e);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),i.default(t.currentTarget).data(e,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(i.default(this.getTipElement()).hasClass(Po))return void this._leave(null,this);this._enter(null,this)}},e.dispose=function(){clearTimeout(this._timeout),i.default.removeData(this.element,this.constructor.DATA_KEY),i.default(this.element).off(this.constructor.EVENT_KEY),i.default(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&i.default(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},e.show=function(){var t=this;if("none"===i.default(this.element).css("display"))throw new Error("Please use show on visible elements");var e=i.default.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){i.default(this.element).trigger(e);var n=m.findShadowRoot(this.element),o=i.default.contains(null!==n?n:this.element.ownerDocument.documentElement,this.element);if(e.isDefaultPrevented()||!o)return;var r=this.getTipElement(),s=m.getUID(this.constructor.NAME);r.setAttribute("id",s),this.element.setAttribute("aria-describedby",s),this.setContent(),this.config.animation&&i.default(r).addClass(ko);var a="function"==typeof this.config.placement?this.config.placement.call(this,r,this.element):this.config.placement,l=this._getAttachment(a);this.addAttachmentClass(l);var u=this._getContainer();i.default(r).data(this.constructor.DATA_KEY,this),i.default.contains(this.element.ownerDocument.documentElement,this.tip)||i.default(r).appendTo(u),i.default(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new On(this.element,r,this._getPopperConfig(l)),i.default(r).addClass(Po),i.default(r).addClass(this.config.customClass),"ontouchstart"in document.documentElement&&i.default(document.body).children().on("mouseover",null,i.default.noop);var c=function(){t.config.animation&&t._fixTransition();var e=t._hoverState;t._hoverState=null,i.default(t.element).trigger(t.constructor.Event.SHOWN),e===Eo&&t._leave(null,t)};if(i.default(this.tip).hasClass(ko)){var h=m.getTransitionDurationFromElement(this.tip);i.default(this.tip).one(m.TRANSITION_END,c).emulateTransitionEnd(h)}else c()}},e.hide=function(t){var e=this,n=this.getTipElement(),o=i.default.Event(this.constructor.Event.HIDE),r=function(){e._hoverState!==Co&&n.parentNode&&n.parentNode.removeChild(n),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),i.default(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),t&&t()};if(i.default(this.element).trigger(o),!o.isDefaultPrevented()){if(i.default(n).removeClass(Po),"ontouchstart"in document.documentElement&&i.default(document.body).children().off("mouseover",null,i.default.noop),this._activeTrigger[No]=!1,this._activeTrigger[zo]=!1,this._activeTrigger[Ao]=!1,i.default(this.tip).hasClass(ko)){var s=m.getTransitionDurationFromElement(n);i.default(n).one(m.TRANSITION_END,r).emulateTransitionEnd(s)}else r();this._hoverState=""}},e.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},e.isWithContent=function(){return Boolean(this.getTitle())},e.addAttachmentClass=function(t){i.default(this.getTipElement()).addClass(vo+"-"+t)},e.getTipElement=function(){return this.tip=this.tip||i.default(this.config.template)[0],this.tip},e.setContent=function(){var t=this.getTipElement();this.setElementContent(i.default(t.querySelectorAll(So)),this.getTitle()),i.default(t).removeClass(ko+" "+Po)},e.setElementContent=function(t,e){"object"!=typeof e||!e.nodeType&&!e.jquery?this.config.html?(this.config.sanitize&&(e=ho(e,this.config.whiteList,this.config.sanitizeFn)),t.html(e)):t.text(e):this.config.html?i.default(e).parent().is(t)||t.empty().append(e):t.text(i.default(e).text())},e.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},e._getPopperConfig=function(t){var e=this;return s({},{placement:t,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:Mo},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}},this.config.popperConfig)},e._getOffset=function(){var t=this,e={};return"function"==typeof this.config.offset?e.fn=function(e){return e.offsets=s({},e.offsets,t.config.offset(e.offsets,t.element)||{}),e}:e.offset=this.config.offset,e},e._getContainer=function(){return!1===this.config.container?document.body:m.isElement(this.config.container)?i.default(this.config.container):i.default(document).find(this.config.container)},e._getAttachment=function(t){return xo[t.toUpperCase()]},e._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach((function(e){if("click"===e)i.default(t.element).on(t.constructor.Event.CLICK,t.config.selector,(function(e){return t.toggle(e)}));else if(e!==Do){var n=e===Ao?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,o=e===Ao?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;i.default(t.element).on(n,t.config.selector,(function(e){return t._enter(e)})).on(o,t.config.selector,(function(e){return t._leave(e)}))}})),this._hideModalHandler=function(){t.element&&t.hide()},i.default(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=s({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},e._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},e._enter=function(t,e){var n=this.constructor.DATA_KEY;(e=e||i.default(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),i.default(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusin"===t.type?zo:Ao]=!0),i.default(e.getTipElement()).hasClass(Po)||e._hoverState===Co?e._hoverState=Co:(clearTimeout(e._timeout),e._hoverState=Co,e.config.delay&&e.config.delay.show?e._timeout=setTimeout((function(){e._hoverState===Co&&e.show()}),e.config.delay.show):e.show())},e._leave=function(t,e){var n=this.constructor.DATA_KEY;(e=e||i.default(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),i.default(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusout"===t.type?zo:Ao]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=Eo,e.config.delay&&e.config.delay.hide?e._timeout=setTimeout((function(){e._hoverState===Eo&&e.hide()}),e.config.delay.hide):e.hide())},e._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},e._getConfig=function(t){var e=i.default(this.element).data();return Object.keys(e).forEach((function(t){-1!==bo.indexOf(t)&&delete e[t]})),"number"==typeof(t=s({},this.constructor.Default,e,"object"==typeof t&&t?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()),m.typeCheckConfig(fo,t,this.constructor.DefaultType),t.sanitize&&(t.template=ho(t.template,t.whiteList,t.sanitizeFn)),t},e._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},e._cleanTipClass=function(){var t=i.default(this.getTipElement()),e=t.attr("class").match(yo);null!==e&&e.length&&t.removeClass(e.join(""))},e._handlePopperPlacementChange=function(t){this.tip=t.instance.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},e._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(i.default(t).removeClass(ko),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this),o=n.data(mo),r="object"==typeof e&&e;if((o||!/dispose|hide/.test(e))&&(o||(o=new t(this,r),n.data(mo,o)),"string"==typeof e)){if(void 0===o[e])throw new TypeError('No method named "'+e+'"');o[e]()}}))},r(t,null,[{key:"VERSION",get:function(){return po}},{key:"Default",get:function(){return To}},{key:"NAME",get:function(){return fo}},{key:"DATA_KEY",get:function(){return mo}},{key:"Event",get:function(){return Lo}},{key:"EVENT_KEY",get:function(){return go}},{key:"DefaultType",get:function(){return wo}}]),t}();i.default.fn[fo]=jo._jQueryInterface,i.default.fn[fo].Constructor=jo,i.default.fn[fo].noConflict=function(){return i.default.fn[fo]=_o,jo._jQueryInterface};var Oo="popover",Io="4.6.0",Bo="bs.popover",Ro="."+Bo,Zo=i.default.fn[Oo],$o="bs-popover",Ho=new RegExp("(^|\\s)"+$o+"\\S+","g"),qo=s({},jo.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),Fo=s({},jo.DefaultType,{content:"(string|element|function)"}),Wo="fade",Uo="show",Vo=".popover-header",Go=".popover-body",Ko={HIDE:"hide"+Ro,HIDDEN:"hidden"+Ro,SHOW:"show"+Ro,SHOWN:"shown"+Ro,INSERTED:"inserted"+Ro,CLICK:"click"+Ro,FOCUSIN:"focusin"+Ro,FOCUSOUT:"focusout"+Ro,MOUSEENTER:"mouseenter"+Ro,MOUSELEAVE:"mouseleave"+Ro},Yo=function(t){function e(){return t.apply(this,arguments)||this}a(e,t);var n=e.prototype;return n.isWithContent=function(){return this.getTitle()||this._getContent()},n.addAttachmentClass=function(t){i.default(this.getTipElement()).addClass($o+"-"+t)},n.getTipElement=function(){return this.tip=this.tip||i.default(this.config.template)[0],this.tip},n.setContent=function(){var t=i.default(this.getTipElement());this.setElementContent(t.find(Vo),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(Go),e),t.removeClass(Wo+" "+Uo)},n._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},n._cleanTipClass=function(){var t=i.default(this.getTipElement()),e=t.attr("class").match(Ho);null!==e&&e.length>0&&t.removeClass(e.join(""))},e._jQueryInterface=function(t){return this.each((function(){var n=i.default(this).data(Bo),o="object"==typeof t?t:null;if((n||!/dispose|hide/.test(t))&&(n||(n=new e(this,o),i.default(this).data(Bo,n)),"string"==typeof t)){if(void 0===n[t])throw new TypeError('No method named "'+t+'"');n[t]()}}))},r(e,null,[{key:"VERSION",get:function(){return Io}},{key:"Default",get:function(){return qo}},{key:"NAME",get:function(){return Oo}},{key:"DATA_KEY",get:function(){return Bo}},{key:"Event",get:function(){return Ko}},{key:"EVENT_KEY",get:function(){return Ro}},{key:"DefaultType",get:function(){return Fo}}]),e}(jo);i.default.fn[Oo]=Yo._jQueryInterface,i.default.fn[Oo].Constructor=Yo,i.default.fn[Oo].noConflict=function(){return i.default.fn[Oo]=Zo,Yo._jQueryInterface};var Xo="scrollspy",Qo="4.6.0",Jo="bs.scrollspy",tr="."+Jo,er=".data-api",nr=i.default.fn[Xo],ir={offset:10,method:"auto",target:""},or={offset:"number",method:"string",target:"(string|element)"},rr="activate"+tr,sr="scroll"+tr,ar="load"+tr+er,lr="dropdown-item",ur="active",cr='[data-spy="scroll"]',hr=".nav, .list-group",dr=".nav-link",fr=".nav-item",pr=".list-group-item",mr=".dropdown",gr=".dropdown-item",_r=".dropdown-toggle",vr="offset",yr="position",br=function(){function t(t,e){var n=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(e),this._selector=this._config.target+" "+dr+","+this._config.target+" "+pr+","+this._config.target+" "+gr,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,i.default(this._scrollElement).on(sr,(function(t){return n._process(t)})),this.refresh(),this._process()}var e=t.prototype;return e.refresh=function(){var t=this,e=this._scrollElement===this._scrollElement.window?vr:yr,n="auto"===this._config.method?e:this._config.method,o=n===yr?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map((function(t){var e,r=m.getSelectorFromElement(t);if(r&&(e=document.querySelector(r)),e){var s=e.getBoundingClientRect();if(s.width||s.height)return[i.default(e)[n]().top+o,r]}return null})).filter((function(t){return t})).sort((function(t,e){return t[0]-e[0]})).forEach((function(e){t._offsets.push(e[0]),t._targets.push(e[1])}))},e.dispose=function(){i.default.removeData(this._element,Jo),i.default(this._scrollElement).off(tr),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},e._getConfig=function(t){if("string"!=typeof(t=s({},ir,"object"==typeof t&&t?t:{})).target&&m.isElement(t.target)){var e=i.default(t.target).attr("id");e||(e=m.getUID(Xo),i.default(t.target).attr("id",e)),t.target="#"+e}return m.typeCheckConfig(Xo,t,or),t},e._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},e._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},e._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},e._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;)this._activeTarget!==this._targets[o]&&t>=this._offsets[o]&&(void 0===this._offsets[o+1]||t<this._offsets[o+1])&&this._activate(this._targets[o])}},e._activate=function(t){this._activeTarget=t,this._clear();var e=this._selector.split(",").map((function(e){return e+'[data-target="'+t+'"],'+e+'[href="'+t+'"]'})),n=i.default([].slice.call(document.querySelectorAll(e.join(","))));n.hasClass(lr)?(n.closest(mr).find(_r).addClass(ur),n.addClass(ur)):(n.addClass(ur),n.parents(hr).prev(dr+", "+pr).addClass(ur),n.parents(hr).prev(fr).children(dr).addClass(ur)),i.default(this._scrollElement).trigger(rr,{relatedTarget:t})},e._clear=function(){[].slice.call(document.querySelectorAll(this._selector)).filter((function(t){return t.classList.contains(ur)})).forEach((function(t){return t.classList.remove(ur)}))},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this).data(Jo);if(n||(n=new t(this,"object"==typeof e&&e),i.default(this).data(Jo,n)),"string"==typeof e){if(void 0===n[e])throw new TypeError('No method named "'+e+'"');n[e]()}}))},r(t,null,[{key:"VERSION",get:function(){return Qo}},{key:"Default",get:function(){return ir}}]),t}();i.default(window).on(ar,(function(){for(var t=[].slice.call(document.querySelectorAll(cr)),e=t.length;e--;){var n=i.default(t[e]);br._jQueryInterface.call(n,n.data())}})),i.default.fn[Xo]=br._jQueryInterface,i.default.fn[Xo].Constructor=br,i.default.fn[Xo].noConflict=function(){return i.default.fn[Xo]=nr,br._jQueryInterface};var wr="tab",xr="4.6.0",Tr="bs.tab",Cr="."+Tr,Er=".data-api",Lr=i.default.fn[wr],kr="hide"+Cr,Pr="hidden"+Cr,Sr="show"+Cr,Mr="shown"+Cr,Ar="click"+Cr+Er,zr="dropdown-menu",Nr="active",Dr="disabled",jr="fade",Or="show",Ir=".dropdown",Br=".nav, .list-group",Rr=".active",Zr="> li > .active",$r='[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',Hr=".dropdown-toggle",qr="> .dropdown-menu .active",Fr=function(){function t(t){this._element=t}var e=t.prototype;return e.show=function(){var t=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&i.default(this._element).hasClass(Nr)||i.default(this._element).hasClass(Dr))){var e,n,o=i.default(this._element).closest(Br)[0],r=m.getSelectorFromElement(this._element);if(o){var s="UL"===o.nodeName||"OL"===o.nodeName?Zr:Rr;n=(n=i.default.makeArray(i.default(o).find(s)))[n.length-1]}var a=i.default.Event(kr,{relatedTarget:this._element}),l=i.default.Event(Sr,{relatedTarget:n});if(n&&i.default(n).trigger(a),i.default(this._element).trigger(l),!l.isDefaultPrevented()&&!a.isDefaultPrevented()){r&&(e=document.querySelector(r)),this._activate(this._element,o);var u=function(){var e=i.default.Event(Pr,{relatedTarget:t._element}),o=i.default.Event(Mr,{relatedTarget:n});i.default(n).trigger(e),i.default(t._element).trigger(o)};e?this._activate(e,e.parentNode,u):u()}}},e.dispose=function(){i.default.removeData(this._element,Tr),this._element=null},e._activate=function(t,e,n){var o=this,r=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?i.default(e).children(Rr):i.default(e).find(Zr))[0],s=n&&r&&i.default(r).hasClass(jr),a=function(){return o._transitionComplete(t,r,n)};if(r&&s){var l=m.getTransitionDurationFromElement(r);i.default(r).removeClass(Or).one(m.TRANSITION_END,a).emulateTransitionEnd(l)}else a()},e._transitionComplete=function(t,e,n){if(e){i.default(e).removeClass(Nr);var o=i.default(e.parentNode).find(qr)[0];o&&i.default(o).removeClass(Nr),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}if(i.default(t).addClass(Nr),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),m.reflow(t),t.classList.contains(jr)&&t.classList.add(Or),t.parentNode&&i.default(t.parentNode).hasClass(zr)){var r=i.default(t).closest(Ir)[0];if(r){var s=[].slice.call(r.querySelectorAll(Hr));i.default(s).addClass(Nr)}t.setAttribute("aria-expanded",!0)}n&&n()},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this),o=n.data(Tr);if(o||(o=new t(this),n.data(Tr,o)),"string"==typeof e){if(void 0===o[e])throw new TypeError('No method named "'+e+'"');o[e]()}}))},r(t,null,[{key:"VERSION",get:function(){return xr}}]),t}();i.default(document).on(Ar,$r,(function(t){t.preventDefault(),Fr._jQueryInterface.call(i.default(this),"show")})),i.default.fn[wr]=Fr._jQueryInterface,i.default.fn[wr].Constructor=Fr,i.default.fn[wr].noConflict=function(){return i.default.fn[wr]=Lr,Fr._jQueryInterface};var Wr="toast",Ur="4.6.0",Vr="bs.toast",Gr="."+Vr,Kr=i.default.fn[Wr],Yr="click.dismiss"+Gr,Xr="hide"+Gr,Qr="hidden"+Gr,Jr="show"+Gr,ts="shown"+Gr,es="fade",ns="hide",is="show",os="showing",rs={animation:"boolean",autohide:"boolean",delay:"number"},ss={animation:!0,autohide:!0,delay:500},as='[data-dismiss="toast"]',ls=function(){function t(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners()}var e=t.prototype;return e.show=function(){var t=this,e=i.default.Event(Jr);if(i.default(this._element).trigger(e),!e.isDefaultPrevented()){this._clearTimeout(),this._config.animation&&this._element.classList.add(es);var n=function(){t._element.classList.remove(os),t._element.classList.add(is),i.default(t._element).trigger(ts),t._config.autohide&&(t._timeout=setTimeout((function(){t.hide()}),t._config.delay))};if(this._element.classList.remove(ns),m.reflow(this._element),this._element.classList.add(os),this._config.animation){var o=m.getTransitionDurationFromElement(this._element);i.default(this._element).one(m.TRANSITION_END,n).emulateTransitionEnd(o)}else n()}},e.hide=function(){if(this._element.classList.contains(is)){var t=i.default.Event(Xr);i.default(this._element).trigger(t),t.isDefaultPrevented()||this._close()}},e.dispose=function(){this._clearTimeout(),this._element.classList.contains(is)&&this._element.classList.remove(is),i.default(this._element).off(Yr),i.default.removeData(this._element,Vr),this._element=null,this._config=null},e._getConfig=function(t){return t=s({},ss,i.default(this._element).data(),"object"==typeof t&&t?t:{}),m.typeCheckConfig(Wr,t,this.constructor.DefaultType),t},e._setListeners=function(){var t=this;i.default(this._element).on(Yr,as,(function(){return t.hide()}))},e._close=function(){var t=this,e=function(){t._element.classList.add(ns),i.default(t._element).trigger(Qr)};if(this._element.classList.remove(is),this._config.animation){var n=m.getTransitionDurationFromElement(this._element);i.default(this._element).one(m.TRANSITION_END,e).emulateTransitionEnd(n)}else e()},e._clearTimeout=function(){clearTimeout(this._timeout),this._timeout=null},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this),o=n.data(Vr);if(o||(o=new t(this,"object"==typeof e&&e),n.data(Vr,o)),"string"==typeof e){if(void 0===o[e])throw new TypeError('No method named "'+e+'"');o[e](this)}}))},r(t,null,[{key:"VERSION",get:function(){return Ur}},{key:"DefaultType",get:function(){return rs}},{key:"Default",get:function(){return ss}}]),t}();i.default.fn[Wr]=ls._jQueryInterface,i.default.fn[Wr].Constructor=ls,i.default.fn[Wr].noConflict=function(){return i.default.fn[Wr]=Kr,ls._jQueryInterface},t.Alert=S,t.Button=K,t.Carousel=qt,t.Collapse=he,t.Dropdown=Ci,t.Modal=ro,t.Popover=Yo,t.Scrollspy=br,t.Tab=Fr,t.Toast=ls,t.Tooltip=jo,t.Util=m,Object.defineProperty(t,"__esModule",{value:!0})}(e,et)}));const nt=[];function it(e,n=t){let i;const o=[];function s(t){if(r(e,t)&&(e=t,i)){const t=!nt.length;for(let t=0;t<o.length;t+=1){const n=o[t];n[1](),nt.push(n,e)}if(t){for(let t=0;t<nt.length;t+=2)nt[t][0](nt[t+1]);nt.length=0}}}return{set:s,update:function(t){s(t(e))},subscribe:function(r,a=t){const l=[r,a];return o.push(l),1===o.length&&(i=n(s)||t),r(e),()=>{const t=o.indexOf(l);-1!==t&&o.splice(t,1),0===o.length&&(i(),i=null)}}}}const ot=it(),rt=it(),st=it(),at=it(),lt=it(),ut=it({count:0});function ct(){let t=window.location.pathname.replace(".html","").replace(/^.*\//,"");-1==["search","reverse","details","deletable","polygons"].indexOf(t)&&(t="search"),ut.update((function(e){return{tab:t,count:e.count+1}}))}function ht(t){let e,n,i,o,r,s,a,l,u,f,_,v,y,b,T,C=t[0].date+"";return{c(){e=p("div"),n=m("Data from "),i=p("a"),o=m("API request"),s=g(),a=p("span"),l=m("("),u=p("a"),f=m("debug output"),v=m(")"),y=m("\n          Data last updated: "),b=p("span"),T=m(C),w(i,"href",r=t[0].api_request_url),w(i,"class","svelte-1hjkg8o"),w(u,"href",_=t[0].api_request_url_debug),w(u,"class","svelte-1hjkg8o"),w(a,"id","api-request-debug"),w(e,"id","api-request"),w(b,"id","data-date")},m(t,r){h(t,e,r),c(e,n),c(e,i),c(i,o),c(e,s),c(e,a),c(a,l),c(a,u),c(u,f),c(a,v),h(t,y,r),h(t,b,r),c(b,T)},p(t,e){1&e&&r!==(r=t[0].api_request_url)&&w(i,"href",r),1&e&&_!==(_=t[0].api_request_url_debug)&&w(u,"href",_),1&e&&C!==(C=t[0].date+"")&&x(T,C)},d(t){t&&d(e),t&&d(y),t&&d(b)}}}function dt(e){let n,i,o,r,s,a,l,u,f,m,_=e[0]&&ht(e);return{c(){n=p("header"),i=p("div"),o=p("div"),o.innerHTML='<div class="brand svelte-1hjkg8o"><a href="search.html" class="svelte-1hjkg8o"><img alt="logo" src="images/osm_logo.120px.png" width="30" height="30" class="svelte-1hjkg8o"/> \n          <h1 class="svelte-1hjkg8o">Nominatim</h1></a></div>',r=g(),s=p("div"),a=p("div"),l=p("div"),l.textContent="loading...",u=g(),_&&_.c(),f=g(),m=p("div"),m.innerHTML='<div class="dropdown"><button class="dropdown-toggle btn btn-sm btn-outline-secondary" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">About &amp; Help</button> \n        <div class="dropdown-menu dropdown-menu-right svelte-1hjkg8o"><a class="dropdown-item svelte-1hjkg8o" href="https://nominatim.org/release-docs/develop/api/Overview/" target="_blank">API Reference</a> \n          <a class="dropdown-item svelte-1hjkg8o" href="https://nominatim.org/release-docs/develop/api/Faq/" target="_blank">FAQ</a> \n          <a class="dropdown-item svelte-1hjkg8o" href="https://help.openstreetmap.org/tags/nominatim/">OpenStreetMap Help</a> \n          <a class="dropdown-item svelte-1hjkg8o" href="https://github.com/osm-search/Nominatim">Nominatim on Github</a> \n          <a class="dropdown-item svelte-1hjkg8o" href="https://github.com/osm-search/nominatim-ui">This frontend on Github</a> \n          <div class="dropdown-divider"></div> \n          <a class="dropdown-item svelte-1hjkg8o" href="#report-issue" data-toggle="modal" data-target="#report-modal">Report problem with results</a></div></div>',w(o,"class","col-4"),w(l,"id","loading"),w(l,"class","svelte-1hjkg8o"),w(a,"id","last-updated"),w(a,"class","text-center svelte-1hjkg8o"),w(s,"class","col-4"),w(m,"class","col-4 text-right"),w(i,"class","row"),w(n,"class","container-fluid svelte-1hjkg8o")},m(t,e){h(t,n,e),c(n,i),c(i,o),c(i,r),c(i,s),c(s,a),c(a,l),c(a,u),_&&_.m(a,null),c(i,f),c(i,m)},p(t,[e]){t[0]?_?_.p(t,e):(_=ht(t),_.c(),_.m(a,null)):_&&(_.d(1),_=null)},i:t,o:t,d(t){t&&d(n),_&&_.d()}}}function ft(t,e,n){let i;return lt.subscribe((t=>{t&&n(0,i=t)})),[i]}class pt extends Q{constructor(t){super(),X(this,t,ft,dt,r,{})}}function mt(e){let n;return{c(){n=p("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>',w(n,"class","svelte-1f2bd8l")},m(t,e){h(t,n,e)},p:t,i:t,o:t,d(t){t&&d(n)}}}class gt extends Q{constructor(t){super(),X(this,t,null,mt,r,{})}}function _t(e){let n;return{c(){n=p("div"),n.innerHTML='<div class="modal-dialog"><div class="modal-content"><div class="modal-header"><h4 class="modal-title">Report a problem</h4> \n        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button></div> \n      <div class="modal-body"><p>Before reporting problems please read the <a target="_blank" href="https://nominatim.org/release-docs/develop/api/Overview/">user documentation</a>\n          and\n          <a target="_blank" href="https://nominatim.org/release-docs/develop/api/Faq/">FAQ</a>.\n\n          If your problem relates to the address of a particular search result please use the &#39;details&#39; link \n          to check how the address was generated before reporting a problem.</p> \n        <p>Use <a target="_blank" href="https://github.com/osm-search/Nominatim/issues">Nominatim issues on github</a>\n          to report problems.</p> \n        <p>Please ensure that you include a full description of the problem, including the search\n          query that you used, the problem with the result and, if the problem relates to missing data,\n          the osm type (node, way, relation) and id of the item that is missing.</p> \n        <p>Problems that contain enough detail are likely to get looked at before ones that require\n          significant research.</p></div> \n      <div class="modal-footer"><button type="button" class="btn btn-outline-secondary" data-dismiss="modal">OK</button></div></div></div>',w(n,"class","modal fade"),w(n,"id","report-modal")},m(t,e){h(t,n,e)},p:t,i:t,o:t,d(t){t&&d(n)}}}class vt extends Q{constructor(t){super(),X(this,t,null,_t,r,{})}}var yt=function(t,e){var n="undefined"!=typeof Nominatim_Config&&void 0!==Nominatim_Config[t]?Nominatim_Config[t]:bt[t];return void 0!==n?n:e};const bt={Nominatim_API_Endpoint:"http://localhost/nominatim/",Images_Base_Url:"mapicons/",Search_AreaPolygons:1,Reverse_Default_Search_Zoom:18,Map_Default_Lat:20,Map_Default_Lon:0,Map_Default_Zoom:2,Map_Tile_URL:"https://{s}.tile.osm.org/{z}/{x}/{y}.png",Map_Tile_Attribution:'<a href="https://osm.org/copyright">OpenStreetMap contributors</a>'};async function wt(t,e,n){var i=xt(t,e);document.getElementById("loading").style.display="block",await fetch(i).then((t=>t.json())).then((t=>{n(t),document.getElementById("loading").style.display="none"})),fetch(xt("status",{format:"json"})).then((t=>t.json())).then((t=>{let e={api_request_url:i,api_request_url_debug:i+"&debug=1",date:t.data_updated};lt.set(e)}))}function xt(t,e){return yt("Nominatim_API_Endpoint")+t+".php?"+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("&")}
+var de="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,fe=function(){for(var t=["Edge","Trident","Firefox"],e=0;e<t.length;e+=1)if(de&&navigator.userAgent.indexOf(t[e])>=0)return 1;return 0}();function pe(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then((function(){e=!1,t()})))}}function me(t){var e=!1;return function(){e||(e=!0,setTimeout((function(){e=!1,t()}),fe))}}var ge=de&&window.Promise?pe:me;function _e(t){return t&&"[object Function]"==={}.toString.call(t)}function ve(t,e){if(1!==t.nodeType)return[];var n=t.ownerDocument.defaultView.getComputedStyle(t,null);return e?n[e]:n}function ye(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function be(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=ve(t),n=e.overflow,i=e.overflowX,o=e.overflowY;return/(auto|scroll|overlay)/.test(n+o+i)?t:be(ye(t))}function we(t){return t&&t.referenceNode?t.referenceNode:t}var xe=de&&!(!window.MSInputMethodContext||!document.documentMode),Te=de&&/MSIE 10/.test(navigator.userAgent);function Ce(t){return 11===t?xe:10===t?Te:xe||Te}function Ee(t){if(!t)return document.documentElement;for(var e=Ce(10)?document.body:null,n=t.offsetParent||null;n===e&&t.nextElementSibling;)n=(t=t.nextElementSibling).offsetParent;var i=n&&n.nodeName;return i&&"BODY"!==i&&"HTML"!==i?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===ve(n,"position")?Ee(n):n:t?t.ownerDocument.documentElement:document.documentElement}function Le(t){var e=t.nodeName;return"BODY"!==e&&("HTML"===e||Ee(t.firstElementChild)===t)}function ke(t){return null!==t.parentNode?ke(t.parentNode):t}function Pe(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var n=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,i=n?t:e,o=n?e:t,r=document.createRange();r.setStart(i,0),r.setEnd(o,0);var s=r.commonAncestorContainer;if(t!==s&&e!==s||i.contains(o))return Le(s)?s:Ee(s);var a=ke(t);return a.host?Pe(a.host,e):Pe(t,ke(e).host)}function Se(t){var e="top"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top")?"scrollTop":"scrollLeft",n=t.nodeName;if("BODY"===n||"HTML"===n){var i=t.ownerDocument.documentElement;return(t.ownerDocument.scrollingElement||i)[e]}return t[e]}function Me(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=Se(e,"top"),o=Se(e,"left"),r=n?-1:1;return t.top+=i*r,t.bottom+=i*r,t.left+=o*r,t.right+=o*r,t}function Ae(t,e){var n="x"===e?"Left":"Top",i="Left"===n?"Right":"Bottom";return parseFloat(t["border"+n+"Width"])+parseFloat(t["border"+i+"Width"])}function ze(t,e,n,i){return Math.max(e["offset"+t],e["scroll"+t],n["client"+t],n["offset"+t],n["scroll"+t],Ce(10)?parseInt(n["offset"+t])+parseInt(i["margin"+("Height"===t?"Top":"Left")])+parseInt(i["margin"+("Height"===t?"Bottom":"Right")]):0)}function Ne(t){var e=t.body,n=t.documentElement,i=Ce(10)&&getComputedStyle(n);return{height:ze("Height",e,n,i),width:ze("Width",e,n,i)}}var De=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},je=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),Oe=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},Ie=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};function Be(t){return Ie({},t,{right:t.left+t.width,bottom:t.top+t.height})}function Re(t){var e={};try{if(Ce(10)){e=t.getBoundingClientRect();var n=Se(t,"top"),i=Se(t,"left");e.top+=n,e.left+=i,e.bottom+=n,e.right+=i}else e=t.getBoundingClientRect()}catch(t){}var o={left:e.left,top:e.top,width:e.right-e.left,height:e.bottom-e.top},r="HTML"===t.nodeName?Ne(t.ownerDocument):{},s=r.width||t.clientWidth||o.width,a=r.height||t.clientHeight||o.height,l=t.offsetWidth-s,u=t.offsetHeight-a;if(l||u){var c=ve(t);l-=Ae(c,"x"),u-=Ae(c,"y"),o.width-=l,o.height-=u}return Be(o)}function Ze(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=Ce(10),o="HTML"===e.nodeName,r=Re(t),s=Re(e),a=be(t),l=ve(e),u=parseFloat(l.borderTopWidth),c=parseFloat(l.borderLeftWidth);n&&o&&(s.top=Math.max(s.top,0),s.left=Math.max(s.left,0));var h=Be({top:r.top-s.top-u,left:r.left-s.left-c,width:r.width,height:r.height});if(h.marginTop=0,h.marginLeft=0,!i&&o){var d=parseFloat(l.marginTop),f=parseFloat(l.marginLeft);h.top-=u-d,h.bottom-=u-d,h.left-=c-f,h.right-=c-f,h.marginTop=d,h.marginLeft=f}return(i&&!n?e.contains(a):e===a&&"BODY"!==a.nodeName)&&(h=Me(h,e)),h}function $e(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.ownerDocument.documentElement,i=Ze(t,n),o=Math.max(n.clientWidth,window.innerWidth||0),r=Math.max(n.clientHeight,window.innerHeight||0),s=e?0:Se(n),a=e?0:Se(n,"left");return Be({top:s-i.top+i.marginTop,left:a-i.left+i.marginLeft,width:o,height:r})}function He(t){var e=t.nodeName;if("BODY"===e||"HTML"===e)return!1;if("fixed"===ve(t,"position"))return!0;var n=ye(t);return!!n&&He(n)}function qe(t){if(!t||!t.parentElement||Ce())return document.documentElement;for(var e=t.parentElement;e&&"none"===ve(e,"transform");)e=e.parentElement;return e||document.documentElement}function Fe(t,e,n,i){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],r={top:0,left:0},s=o?qe(t):Pe(t,we(e));if("viewport"===i)r=$e(s,o);else{var a=void 0;"scrollParent"===i?"BODY"===(a=be(ye(e))).nodeName&&(a=t.ownerDocument.documentElement):a="window"===i?t.ownerDocument.documentElement:i;var l=Ze(a,s,o);if("HTML"!==a.nodeName||He(s))r=l;else{var u=Ne(t.ownerDocument),c=u.height,h=u.width;r.top+=l.top-l.marginTop,r.bottom=c+l.top,r.left+=l.left-l.marginLeft,r.right=h+l.left}}var d="number"==typeof(n=n||0);return r.left+=d?n:n.left||0,r.top+=d?n:n.top||0,r.right-=d?n:n.right||0,r.bottom-=d?n:n.bottom||0,r}function We(t){return t.width*t.height}function Ue(t,e,n,i,o){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var s=Fe(n,i,r,o),a={top:{width:s.width,height:e.top-s.top},right:{width:s.right-e.right,height:s.height},bottom:{width:s.width,height:s.bottom-e.bottom},left:{width:e.left-s.left,height:s.height}},l=Object.keys(a).map((function(t){return Ie({key:t},a[t],{area:We(a[t])})})).sort((function(t,e){return e.area-t.area})),u=l.filter((function(t){var e=t.width,i=t.height;return e>=n.clientWidth&&i>=n.clientHeight})),c=u.length>0?u[0].key:l[0].key,h=t.split("-")[1];return c+(h?"-"+h:"")}function Ve(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return Ze(n,i?qe(e):Pe(e,we(n)),i)}function Ge(t){var e=t.ownerDocument.defaultView.getComputedStyle(t),n=parseFloat(e.marginTop||0)+parseFloat(e.marginBottom||0),i=parseFloat(e.marginLeft||0)+parseFloat(e.marginRight||0);return{width:t.offsetWidth+i,height:t.offsetHeight+n}}function Ke(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,(function(t){return e[t]}))}function Ye(t,e,n){n=n.split("-")[0];var i=Ge(t),o={width:i.width,height:i.height},r=-1!==["right","left"].indexOf(n),s=r?"top":"left",a=r?"left":"top",l=r?"height":"width",u=r?"width":"height";return o[s]=e[s]+e[l]/2-i[l]/2,o[a]=n===a?e[a]-i[u]:e[Ke(a)],o}function Xe(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function Qe(t,e,n){if(Array.prototype.findIndex)return t.findIndex((function(t){return t[e]===n}));var i=Xe(t,(function(t){return t[e]===n}));return t.indexOf(i)}function Je(t,e,n){return(void 0===n?t:t.slice(0,Qe(t,"name",n))).forEach((function(t){t.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=t.function||t.fn;t.enabled&&_e(n)&&(e.offsets.popper=Be(e.offsets.popper),e.offsets.reference=Be(e.offsets.reference),e=n(e,t))})),e}function tn(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=Ve(this.state,this.popper,this.reference,this.options.positionFixed),t.placement=Ue(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.positionFixed=this.options.positionFixed,t.offsets.popper=Ye(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",t=Je(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}function en(t,e){return t.some((function(t){var n=t.name;return t.enabled&&n===e}))}function nn(t){for(var e=[!1,"ms","Webkit","Moz","O"],n=t.charAt(0).toUpperCase()+t.slice(1),i=0;i<e.length;i++){var o=e[i],r=o?""+o+n:t;if(void 0!==document.body.style[r])return r}return null}function on(){return this.state.isDestroyed=!0,en(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[nn("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function rn(t){var e=t.ownerDocument;return e?e.defaultView:window}function sn(t,e,n,i){var o="BODY"===t.nodeName,r=o?t.ownerDocument.defaultView:t;r.addEventListener(e,n,{passive:!0}),o||sn(be(r.parentNode),e,n,i),i.push(r)}function an(t,e,n,i){n.updateBound=i,rn(t).addEventListener("resize",n.updateBound,{passive:!0});var o=be(t);return sn(o,"scroll",n.updateBound,n.scrollParents),n.scrollElement=o,n.eventsEnabled=!0,n}function ln(){this.state.eventsEnabled||(this.state=an(this.reference,this.options,this.state,this.scheduleUpdate))}function un(t,e){return rn(t).removeEventListener("resize",e.updateBound),e.scrollParents.forEach((function(t){t.removeEventListener("scroll",e.updateBound)})),e.updateBound=null,e.scrollParents=[],e.scrollElement=null,e.eventsEnabled=!1,e}function cn(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=un(this.reference,this.state))}function hn(t){return""!==t&&!isNaN(parseFloat(t))&&isFinite(t)}function dn(t,e){Object.keys(e).forEach((function(n){var i="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&hn(e[n])&&(i="px"),t.style[n]=e[n]+i}))}function fn(t,e){Object.keys(e).forEach((function(n){!1!==e[n]?t.setAttribute(n,e[n]):t.removeAttribute(n)}))}function pn(t){return dn(t.instance.popper,t.styles),fn(t.instance.popper,t.attributes),t.arrowElement&&Object.keys(t.arrowStyles).length&&dn(t.arrowElement,t.arrowStyles),t}function mn(t,e,n,i,o){var r=Ve(o,e,t,n.positionFixed),s=Ue(n.placement,r,e,t,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return e.setAttribute("x-placement",s),dn(e,{position:n.positionFixed?"fixed":"absolute"}),n}function gn(t,e){var n=t.offsets,i=n.popper,o=n.reference,r=Math.round,s=Math.floor,a=function(t){return t},l=r(o.width),u=r(i.width),c=-1!==["left","right"].indexOf(t.placement),h=-1!==t.placement.indexOf("-"),d=e?c||h||l%2==u%2?r:s:a,f=e?r:a;return{left:d(l%2==1&&u%2==1&&!h&&e?i.left-1:i.left),top:f(i.top),bottom:f(i.bottom),right:d(i.right)}}var _n=de&&/Firefox/i.test(navigator.userAgent);function vn(t,e){var n=e.x,i=e.y,o=t.offsets.popper,r=Xe(t.instance.modifiers,(function(t){return"applyStyle"===t.name})).gpuAcceleration;void 0!==r&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var s=void 0!==r?r:e.gpuAcceleration,a=Ee(t.instance.popper),l=Re(a),u={position:o.position},c=gn(t,window.devicePixelRatio<2||!_n),h="bottom"===n?"top":"bottom",d="right"===i?"left":"right",f=nn("transform"),p=void 0,m=void 0;if(m="bottom"===h?"HTML"===a.nodeName?-a.clientHeight+c.bottom:-l.height+c.bottom:c.top,p="right"===d?"HTML"===a.nodeName?-a.clientWidth+c.right:-l.width+c.right:c.left,s&&f)u[f]="translate3d("+p+"px, "+m+"px, 0)",u[h]=0,u[d]=0,u.willChange="transform";else{var g="bottom"===h?-1:1,_="right"===d?-1:1;u[h]=m*g,u[d]=p*_,u.willChange=h+", "+d}var v={"x-placement":t.placement};return t.attributes=Ie({},v,t.attributes),t.styles=Ie({},u,t.styles),t.arrowStyles=Ie({},t.offsets.arrow,t.arrowStyles),t}function yn(t,e,n){var i=Xe(t,(function(t){return t.name===e})),o=!!i&&t.some((function(t){return t.name===n&&t.enabled&&t.order<i.order}));if(!o){var r="`"+e+"`",s="`"+n+"`";console.warn(s+" modifier is required by "+r+" modifier in order to work, be sure to include it before "+r+"!")}return o}function bn(t,e){var n;if(!yn(t.instance.modifiers,"arrow","keepTogether"))return t;var i=e.element;if("string"==typeof i){if(!(i=t.instance.popper.querySelector(i)))return t}else if(!t.instance.popper.contains(i))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var o=t.placement.split("-")[0],r=t.offsets,s=r.popper,a=r.reference,l=-1!==["left","right"].indexOf(o),u=l?"height":"width",c=l?"Top":"Left",h=c.toLowerCase(),d=l?"left":"top",f=l?"bottom":"right",p=Ge(i)[u];a[f]-p<s[h]&&(t.offsets.popper[h]-=s[h]-(a[f]-p)),a[h]+p>s[f]&&(t.offsets.popper[h]+=a[h]+p-s[f]),t.offsets.popper=Be(t.offsets.popper);var m=a[h]+a[u]/2-p/2,g=ve(t.instance.popper),_=parseFloat(g["margin"+c]),v=parseFloat(g["border"+c+"Width"]),y=m-t.offsets.popper[h]-_-v;return y=Math.max(Math.min(s[u]-p,y),0),t.arrowElement=i,t.offsets.arrow=(Oe(n={},h,Math.round(y)),Oe(n,d,""),n),t}function wn(t){return"end"===t?"start":"start"===t?"end":t}var xn=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],Tn=xn.slice(3);function Cn(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Tn.indexOf(t),i=Tn.slice(n+1).concat(Tn.slice(0,n));return e?i.reverse():i}var En={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function Ln(t,e){if(en(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var n=Fe(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement,t.positionFixed),i=t.placement.split("-")[0],o=Ke(i),r=t.placement.split("-")[1]||"",s=[];switch(e.behavior){case En.FLIP:s=[i,o];break;case En.CLOCKWISE:s=Cn(i);break;case En.COUNTERCLOCKWISE:s=Cn(i,!0);break;default:s=e.behavior}return s.forEach((function(a,l){if(i!==a||s.length===l+1)return t;i=t.placement.split("-")[0],o=Ke(i);var u=t.offsets.popper,c=t.offsets.reference,h=Math.floor,d="left"===i&&h(u.right)>h(c.left)||"right"===i&&h(u.left)<h(c.right)||"top"===i&&h(u.bottom)>h(c.top)||"bottom"===i&&h(u.top)<h(c.bottom),f=h(u.left)<h(n.left),p=h(u.right)>h(n.right),m=h(u.top)<h(n.top),g=h(u.bottom)>h(n.bottom),_="left"===i&&f||"right"===i&&p||"top"===i&&m||"bottom"===i&&g,v=-1!==["top","bottom"].indexOf(i),y=!!e.flipVariations&&(v&&"start"===r&&f||v&&"end"===r&&p||!v&&"start"===r&&m||!v&&"end"===r&&g),b=!!e.flipVariationsByContent&&(v&&"start"===r&&p||v&&"end"===r&&f||!v&&"start"===r&&g||!v&&"end"===r&&m),w=y||b;(d||_||w)&&(t.flipped=!0,(d||_)&&(i=s[l+1]),w&&(r=wn(r)),t.placement=i+(r?"-"+r:""),t.offsets.popper=Ie({},t.offsets.popper,Ye(t.instance.popper,t.offsets.reference,t.placement)),t=Je(t.instance.modifiers,t,"flip"))})),t}function kn(t){var e=t.offsets,n=e.popper,i=e.reference,o=t.placement.split("-")[0],r=Math.floor,s=-1!==["top","bottom"].indexOf(o),a=s?"right":"bottom",l=s?"left":"top",u=s?"width":"height";return n[a]<r(i[l])&&(t.offsets.popper[l]=r(i[l])-n[u]),n[l]>r(i[a])&&(t.offsets.popper[l]=r(i[a])),t}function Pn(t,e,n,i){var o=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),r=+o[1],s=o[2];if(!r)return t;if(0===s.indexOf("%")){var a=void 0;switch(s){case"%p":a=n;break;case"%":case"%r":default:a=i}return Be(a)[e]/100*r}return"vh"===s||"vw"===s?("vh"===s?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*r:r}function Sn(t,e,n,i){var o=[0,0],r=-1!==["right","left"].indexOf(i),s=t.split(/(\+|\-)/).map((function(t){return t.trim()})),a=s.indexOf(Xe(s,(function(t){return-1!==t.search(/,|\s/)})));s[a]&&-1===s[a].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,u=-1!==a?[s.slice(0,a).concat([s[a].split(l)[0]]),[s[a].split(l)[1]].concat(s.slice(a+1))]:[s];return(u=u.map((function(t,i){var o=(1===i?!r:r)?"height":"width",s=!1;return t.reduce((function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,s=!0,t):s?(t[t.length-1]+=e,s=!1,t):t.concat(e)}),[]).map((function(t){return Pn(t,o,e,n)}))}))).forEach((function(t,e){t.forEach((function(n,i){hn(n)&&(o[e]+=n*("-"===t[i-1]?-1:1))}))})),o}function Mn(t,e){var n=e.offset,i=t.placement,o=t.offsets,r=o.popper,s=o.reference,a=i.split("-")[0],l=void 0;return l=hn(+n)?[+n,0]:Sn(n,r,s,a),"left"===a?(r.top+=l[0],r.left-=l[1]):"right"===a?(r.top+=l[0],r.left+=l[1]):"top"===a?(r.left+=l[0],r.top-=l[1]):"bottom"===a&&(r.left+=l[0],r.top+=l[1]),t.popper=r,t}function An(t,e){var n=e.boundariesElement||Ee(t.instance.popper);t.instance.reference===n&&(n=Ee(n));var i=nn("transform"),o=t.instance.popper.style,r=o.top,s=o.left,a=o[i];o.top="",o.left="",o[i]="";var l=Fe(t.instance.popper,t.instance.reference,e.padding,n,t.positionFixed);o.top=r,o.left=s,o[i]=a,e.boundaries=l;var u=e.priority,c=t.offsets.popper,h={primary:function(t){var n=c[t];return c[t]<l[t]&&!e.escapeWithReference&&(n=Math.max(c[t],l[t])),Oe({},t,n)},secondary:function(t){var n="right"===t?"left":"top",i=c[n];return c[t]>l[t]&&!e.escapeWithReference&&(i=Math.min(c[n],l[t]-("right"===t?c.width:c.height))),Oe({},n,i)}};return u.forEach((function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";c=Ie({},c,h[e](t))})),t.offsets.popper=c,t}function zn(t){var e=t.placement,n=e.split("-")[0],i=e.split("-")[1];if(i){var o=t.offsets,r=o.reference,s=o.popper,a=-1!==["bottom","top"].indexOf(n),l=a?"left":"top",u=a?"width":"height",c={start:Oe({},l,r[l]),end:Oe({},l,r[l]+r[u]-s[u])};t.offsets.popper=Ie({},s,c[i])}return t}function Nn(t){if(!yn(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,n=Xe(t.instance.modifiers,(function(t){return"preventOverflow"===t.name})).boundaries;if(e.bottom<n.top||e.left>n.right||e.top>n.bottom||e.right<n.left){if(!0===t.hide)return t;t.hide=!0,t.attributes["x-out-of-boundaries"]=""}else{if(!1===t.hide)return t;t.hide=!1,t.attributes["x-out-of-boundaries"]=!1}return t}function Dn(t){var e=t.placement,n=e.split("-")[0],i=t.offsets,o=i.popper,r=i.reference,s=-1!==["left","right"].indexOf(n),a=-1===["top","left"].indexOf(n);return o[s?"left":"top"]=r[n]-(a?o[s?"width":"height"]:0),t.placement=Ke(e),t.offsets.popper=Be(o),t}var jn={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:zn},offset:{order:200,enabled:!0,fn:Mn,offset:0},preventOverflow:{order:300,enabled:!0,fn:An,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:kn},arrow:{order:500,enabled:!0,fn:bn,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:Ln,behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:Dn},hide:{order:800,enabled:!0,fn:Nn},computeStyle:{order:850,enabled:!0,fn:vn,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:pn,onLoad:mn,gpuAcceleration:void 0}}},On=function(){function t(e,n){var i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};De(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(i.update)},this.update=ge(this.update.bind(this)),this.options=Ie({},t.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(Ie({},t.Defaults.modifiers,o.modifiers)).forEach((function(e){i.options.modifiers[e]=Ie({},t.Defaults.modifiers[e]||{},o.modifiers?o.modifiers[e]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(t){return Ie({name:t},i.options.modifiers[t])})).sort((function(t,e){return t.order-e.order})),this.modifiers.forEach((function(t){t.enabled&&_e(t.onLoad)&&t.onLoad(i.reference,i.popper,i.options,t,i.state)})),this.update();var r=this.options.eventsEnabled;r&&this.enableEventListeners(),this.state.eventsEnabled=r}return je(t,[{key:"update",value:function(){return tn.call(this)}},{key:"destroy",value:function(){return on.call(this)}},{key:"enableEventListeners",value:function(){return ln.call(this)}},{key:"disableEventListeners",value:function(){return cn.call(this)}}]),t}();On.Utils=("undefined"!=typeof window?window:J).PopperUtils,On.placements=xn,On.Defaults=jn;var In="dropdown",Bn="4.6.0",Rn="bs.dropdown",Zn="."+Rn,$n=".data-api",Hn=i.default.fn[In],qn=27,Fn=32,Wn=9,Un=38,Vn=40,Gn=3,Kn=new RegExp(Un+"|"+Vn+"|"+qn),Yn="hide"+Zn,Xn="hidden"+Zn,Qn="show"+Zn,Jn="shown"+Zn,ti="click"+Zn,ei="click"+Zn+$n,ni="keydown"+Zn+$n,ii="keyup"+Zn+$n,oi="disabled",ri="show",si="dropup",ai="dropright",li="dropleft",ui="dropdown-menu-right",ci="position-static",hi='[data-toggle="dropdown"]',di=".dropdown form",fi=".dropdown-menu",pi=".navbar-nav",mi=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",gi="top-start",_i="top-end",vi="bottom-start",yi="bottom-end",bi="right-start",wi="left-start",xi={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic",popperConfig:null},Ti={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string",popperConfig:"(null|object)"},Ci=function(){function t(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var e=t.prototype;return e.toggle=function(){if(!this._element.disabled&&!i.default(this._element).hasClass(oi)){var e=i.default(this._menu).hasClass(ri);t._clearMenus(),e||this.show(!0)}},e.show=function(e){if(void 0===e&&(e=!1),!(this._element.disabled||i.default(this._element).hasClass(oi)||i.default(this._menu).hasClass(ri))){var n={relatedTarget:this._element},o=i.default.Event(Qn,n),r=t._getParentFromElement(this._element);if(i.default(r).trigger(o),!o.isDefaultPrevented()){if(!this._inNavbar&&e){if(void 0===On)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");var s=this._element;"parent"===this._config.reference?s=r:m.isElement(this._config.reference)&&(s=this._config.reference,void 0!==this._config.reference.jquery&&(s=this._config.reference[0])),"scrollParent"!==this._config.boundary&&i.default(r).addClass(ci),this._popper=new On(s,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===i.default(r).closest(pi).length&&i.default(document.body).children().on("mouseover",null,i.default.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),i.default(this._menu).toggleClass(ri),i.default(r).toggleClass(ri).trigger(i.default.Event(Jn,n))}}},e.hide=function(){if(!this._element.disabled&&!i.default(this._element).hasClass(oi)&&i.default(this._menu).hasClass(ri)){var e={relatedTarget:this._element},n=i.default.Event(Yn,e),o=t._getParentFromElement(this._element);i.default(o).trigger(n),n.isDefaultPrevented()||(this._popper&&this._popper.destroy(),i.default(this._menu).toggleClass(ri),i.default(o).toggleClass(ri).trigger(i.default.Event(Xn,e)))}},e.dispose=function(){i.default.removeData(this._element,Rn),i.default(this._element).off(Zn),this._element=null,this._menu=null,null!==this._popper&&(this._popper.destroy(),this._popper=null)},e.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},e._addEventListeners=function(){var t=this;i.default(this._element).on(ti,(function(e){e.preventDefault(),e.stopPropagation(),t.toggle()}))},e._getConfig=function(t){return t=s({},this.constructor.Default,i.default(this._element).data(),t),m.typeCheckConfig(In,t,this.constructor.DefaultType),t},e._getMenuElement=function(){if(!this._menu){var e=t._getParentFromElement(this._element);e&&(this._menu=e.querySelector(fi))}return this._menu},e._getPlacement=function(){var t=i.default(this._element.parentNode),e=vi;return t.hasClass(si)?e=i.default(this._menu).hasClass(ui)?_i:gi:t.hasClass(ai)?e=bi:t.hasClass(li)?e=wi:i.default(this._menu).hasClass(ui)&&(e=yi),e},e._detectNavbar=function(){return i.default(this._element).closest(".navbar").length>0},e._getOffset=function(){var t=this,e={};return"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=s({},e.offsets,t._config.offset(e.offsets,t._element)||{}),e}:e.offset=this._config.offset,e},e._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(t.modifiers.applyStyle={enabled:!1}),s({},t,this._config.popperConfig)},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this).data(Rn);if(n||(n=new t(this,"object"==typeof e?e:null),i.default(this).data(Rn,n)),"string"==typeof e){if(void 0===n[e])throw new TypeError('No method named "'+e+'"');n[e]()}}))},t._clearMenus=function(e){if(!e||e.which!==Gn&&("keyup"!==e.type||e.which===Wn))for(var n=[].slice.call(document.querySelectorAll(hi)),o=0,r=n.length;o<r;o++){var s=t._getParentFromElement(n[o]),a=i.default(n[o]).data(Rn),l={relatedTarget:n[o]};if(e&&"click"===e.type&&(l.clickEvent=e),a){var u=a._menu;if(i.default(s).hasClass(ri)&&!(e&&("click"===e.type&&/input|textarea/i.test(e.target.tagName)||"keyup"===e.type&&e.which===Wn)&&i.default.contains(s,e.target))){var c=i.default.Event(Yn,l);i.default(s).trigger(c),c.isDefaultPrevented()||("ontouchstart"in document.documentElement&&i.default(document.body).children().off("mouseover",null,i.default.noop),n[o].setAttribute("aria-expanded","false"),a._popper&&a._popper.destroy(),i.default(u).removeClass(ri),i.default(s).removeClass(ri).trigger(i.default.Event(Xn,l)))}}}},t._getParentFromElement=function(t){var e,n=m.getSelectorFromElement(t);return n&&(e=document.querySelector(n)),e||t.parentNode},t._dataApiKeydownHandler=function(e){if(!(/input|textarea/i.test(e.target.tagName)?e.which===Fn||e.which!==qn&&(e.which!==Vn&&e.which!==Un||i.default(e.target).closest(fi).length):!Kn.test(e.which))&&!this.disabled&&!i.default(this).hasClass(oi)){var n=t._getParentFromElement(this),o=i.default(n).hasClass(ri);if(o||e.which!==qn){if(e.preventDefault(),e.stopPropagation(),!o||e.which===qn||e.which===Fn)return e.which===qn&&i.default(n.querySelector(hi)).trigger("focus"),void i.default(this).trigger("click");var r=[].slice.call(n.querySelectorAll(mi)).filter((function(t){return i.default(t).is(":visible")}));if(0!==r.length){var s=r.indexOf(e.target);e.which===Un&&s>0&&s--,e.which===Vn&&s<r.length-1&&s++,s<0&&(s=0),r[s].focus()}}}},r(t,null,[{key:"VERSION",get:function(){return Bn}},{key:"Default",get:function(){return xi}},{key:"DefaultType",get:function(){return Ti}}]),t}();i.default(document).on(ni,hi,Ci._dataApiKeydownHandler).on(ni,fi,Ci._dataApiKeydownHandler).on(ei+" "+ii,Ci._clearMenus).on(ei,hi,(function(t){t.preventDefault(),t.stopPropagation(),Ci._jQueryInterface.call(i.default(this),"toggle")})).on(ei,di,(function(t){t.stopPropagation()})),i.default.fn[In]=Ci._jQueryInterface,i.default.fn[In].Constructor=Ci,i.default.fn[In].noConflict=function(){return i.default.fn[In]=Hn,Ci._jQueryInterface};var Ei="modal",Li="4.6.0",ki="bs.modal",Pi="."+ki,Si=".data-api",Mi=i.default.fn[Ei],Ai=27,zi={backdrop:!0,keyboard:!0,focus:!0,show:!0},Ni={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},Di="hide"+Pi,ji="hidePrevented"+Pi,Oi="hidden"+Pi,Ii="show"+Pi,Bi="shown"+Pi,Ri="focusin"+Pi,Zi="resize"+Pi,$i="click.dismiss"+Pi,Hi="keydown.dismiss"+Pi,qi="mouseup.dismiss"+Pi,Fi="mousedown.dismiss"+Pi,Wi="click"+Pi+Si,Ui="modal-dialog-scrollable",Vi="modal-scrollbar-measure",Gi="modal-backdrop",Ki="modal-open",Yi="fade",Xi="show",Qi="modal-static",Ji=".modal-dialog",to=".modal-body",eo='[data-toggle="modal"]',no='[data-dismiss="modal"]',io=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",oo=".sticky-top",ro=function(){function t(t,e){this._config=this._getConfig(e),this._element=t,this._dialog=t.querySelector(Ji),this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollbarWidth=0}var e=t.prototype;return e.toggle=function(t){return this._isShown?this.hide():this.show(t)},e.show=function(t){var e=this;if(!this._isShown&&!this._isTransitioning){i.default(this._element).hasClass(Yi)&&(this._isTransitioning=!0);var n=i.default.Event(Ii,{relatedTarget:t});i.default(this._element).trigger(n),this._isShown||n.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),i.default(this._element).on($i,no,(function(t){return e.hide(t)})),i.default(this._dialog).on(Fi,(function(){i.default(e._element).one(qi,(function(t){i.default(t.target).is(e._element)&&(e._ignoreBackdropClick=!0)}))})),this._showBackdrop((function(){return e._showElement(t)})))}},e.hide=function(t){var e=this;if(t&&t.preventDefault(),this._isShown&&!this._isTransitioning){var n=i.default.Event(Di);if(i.default(this._element).trigger(n),this._isShown&&!n.isDefaultPrevented()){this._isShown=!1;var o=i.default(this._element).hasClass(Yi);if(o&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),i.default(document).off(Ri),i.default(this._element).removeClass(Xi),i.default(this._element).off($i),i.default(this._dialog).off(Fi),o){var r=m.getTransitionDurationFromElement(this._element);i.default(this._element).one(m.TRANSITION_END,(function(t){return e._hideModal(t)})).emulateTransitionEnd(r)}else this._hideModal()}}},e.dispose=function(){[window,this._element,this._dialog].forEach((function(t){return i.default(t).off(Pi)})),i.default(document).off(Ri),i.default.removeData(this._element,ki),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._isTransitioning=null,this._scrollbarWidth=null},e.handleUpdate=function(){this._adjustDialog()},e._getConfig=function(t){return t=s({},zi,t),m.typeCheckConfig(Ei,t,Ni),t},e._triggerBackdropTransition=function(){var t=this,e=i.default.Event(ji);if(i.default(this._element).trigger(e),!e.isDefaultPrevented()){var n=this._element.scrollHeight>document.documentElement.clientHeight;n||(this._element.style.overflowY="hidden"),this._element.classList.add(Qi);var o=m.getTransitionDurationFromElement(this._dialog);i.default(this._element).off(m.TRANSITION_END),i.default(this._element).one(m.TRANSITION_END,(function(){t._element.classList.remove(Qi),n||i.default(t._element).one(m.TRANSITION_END,(function(){t._element.style.overflowY=""})).emulateTransitionEnd(t._element,o)})).emulateTransitionEnd(o),this._element.focus()}},e._showElement=function(t){var e=this,n=i.default(this._element).hasClass(Yi),o=this._dialog?this._dialog.querySelector(to):null;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),i.default(this._dialog).hasClass(Ui)&&o?o.scrollTop=0:this._element.scrollTop=0,n&&m.reflow(this._element),i.default(this._element).addClass(Xi),this._config.focus&&this._enforceFocus();var r=i.default.Event(Bi,{relatedTarget:t}),s=function(){e._config.focus&&e._element.focus(),e._isTransitioning=!1,i.default(e._element).trigger(r)};if(n){var a=m.getTransitionDurationFromElement(this._dialog);i.default(this._dialog).one(m.TRANSITION_END,s).emulateTransitionEnd(a)}else s()},e._enforceFocus=function(){var t=this;i.default(document).off(Ri).on(Ri,(function(e){document!==e.target&&t._element!==e.target&&0===i.default(t._element).has(e.target).length&&t._element.focus()}))},e._setEscapeEvent=function(){var t=this;this._isShown?i.default(this._element).on(Hi,(function(e){t._config.keyboard&&e.which===Ai?(e.preventDefault(),t.hide()):t._config.keyboard||e.which!==Ai||t._triggerBackdropTransition()})):this._isShown||i.default(this._element).off(Hi)},e._setResizeEvent=function(){var t=this;this._isShown?i.default(window).on(Zi,(function(e){return t.handleUpdate(e)})):i.default(window).off(Zi)},e._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._showBackdrop((function(){i.default(document.body).removeClass(Ki),t._resetAdjustments(),t._resetScrollbar(),i.default(t._element).trigger(Oi)}))},e._removeBackdrop=function(){this._backdrop&&(i.default(this._backdrop).remove(),this._backdrop=null)},e._showBackdrop=function(t){var e=this,n=i.default(this._element).hasClass(Yi)?Yi:"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className=Gi,n&&this._backdrop.classList.add(n),i.default(this._backdrop).appendTo(document.body),i.default(this._element).on($i,(function(t){e._ignoreBackdropClick?e._ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"===e._config.backdrop?e._triggerBackdropTransition():e.hide())})),n&&m.reflow(this._backdrop),i.default(this._backdrop).addClass(Xi),!t)return;if(!n)return void t();var o=m.getTransitionDurationFromElement(this._backdrop);i.default(this._backdrop).one(m.TRANSITION_END,t).emulateTransitionEnd(o)}else if(!this._isShown&&this._backdrop){i.default(this._backdrop).removeClass(Xi);var r=function(){e._removeBackdrop(),t&&t()};if(i.default(this._element).hasClass(Yi)){var s=m.getTransitionDurationFromElement(this._backdrop);i.default(this._backdrop).one(m.TRANSITION_END,r).emulateTransitionEnd(s)}else r()}else t&&t()},e._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},e._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},e._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(t.left+t.right)<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},e._setScrollbar=function(){var t=this;if(this._isBodyOverflowing){var e=[].slice.call(document.querySelectorAll(io)),n=[].slice.call(document.querySelectorAll(oo));i.default(e).each((function(e,n){var o=n.style.paddingRight,r=i.default(n).css("padding-right");i.default(n).data("padding-right",o).css("padding-right",parseFloat(r)+t._scrollbarWidth+"px")})),i.default(n).each((function(e,n){var o=n.style.marginRight,r=i.default(n).css("margin-right");i.default(n).data("margin-right",o).css("margin-right",parseFloat(r)-t._scrollbarWidth+"px")}));var o=document.body.style.paddingRight,r=i.default(document.body).css("padding-right");i.default(document.body).data("padding-right",o).css("padding-right",parseFloat(r)+this._scrollbarWidth+"px")}i.default(document.body).addClass(Ki)},e._resetScrollbar=function(){var t=[].slice.call(document.querySelectorAll(io));i.default(t).each((function(t,e){var n=i.default(e).data("padding-right");i.default(e).removeData("padding-right"),e.style.paddingRight=n||""}));var e=[].slice.call(document.querySelectorAll(""+oo));i.default(e).each((function(t,e){var n=i.default(e).data("margin-right");void 0!==n&&i.default(e).css("margin-right",n).removeData("margin-right")}));var n=i.default(document.body).data("padding-right");i.default(document.body).removeData("padding-right"),document.body.style.paddingRight=n||""},e._getScrollbarWidth=function(){var t=document.createElement("div");t.className=Vi,document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},t._jQueryInterface=function(e,n){return this.each((function(){var o=i.default(this).data(ki),r=s({},zi,i.default(this).data(),"object"==typeof e&&e?e:{});if(o||(o=new t(this,r),i.default(this).data(ki,o)),"string"==typeof e){if(void 0===o[e])throw new TypeError('No method named "'+e+'"');o[e](n)}else r.show&&o.show(n)}))},r(t,null,[{key:"VERSION",get:function(){return Li}},{key:"Default",get:function(){return zi}}]),t}();i.default(document).on(Wi,eo,(function(t){var e,n=this,o=m.getSelectorFromElement(this);o&&(e=document.querySelector(o));var r=i.default(e).data(ki)?"toggle":s({},i.default(e).data(),i.default(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||t.preventDefault();var a=i.default(e).one(Ii,(function(t){t.isDefaultPrevented()||a.one(Oi,(function(){i.default(n).is(":visible")&&n.focus()}))}));ro._jQueryInterface.call(i.default(e),r,this)})),i.default.fn[Ei]=ro._jQueryInterface,i.default.fn[Ei].Constructor=ro,i.default.fn[Ei].noConflict=function(){return i.default.fn[Ei]=Mi,ro._jQueryInterface};var so=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],ao={"*":["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:[]},lo=/^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi,uo=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;function co(t,e){var n=t.nodeName.toLowerCase();if(-1!==e.indexOf(n))return-1===so.indexOf(n)||Boolean(t.nodeValue.match(lo)||t.nodeValue.match(uo));for(var i=e.filter((function(t){return t instanceof RegExp})),o=0,r=i.length;o<r;o++)if(n.match(i[o]))return!0;return!1}function ho(t,e,n){if(0===t.length)return t;if(n&&"function"==typeof n)return n(t);for(var i=(new window.DOMParser).parseFromString(t,"text/html"),o=Object.keys(e),r=[].slice.call(i.body.querySelectorAll("*")),s=function(t,n){var i=r[t],s=i.nodeName.toLowerCase();if(-1===o.indexOf(i.nodeName.toLowerCase()))return i.parentNode.removeChild(i),"continue";var a=[].slice.call(i.attributes),l=[].concat(e["*"]||[],e[s]||[]);a.forEach((function(t){co(t,l)||i.removeAttribute(t.nodeName)}))},a=0,l=r.length;a<l;a++)s(a);return i.body.innerHTML}var fo="tooltip",po="4.6.0",mo="bs.tooltip",go="."+mo,_o=i.default.fn[fo],vo="bs-tooltip",yo=new RegExp("(^|\\s)"+vo+"\\S+","g"),bo=["sanitize","whiteList","sanitizeFn"],wo={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object",popperConfig:"(null|object)"},xo={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},To={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",customClass:"",sanitize:!0,sanitizeFn:null,whiteList:ao,popperConfig:null},Co="show",Eo="out",Lo={HIDE:"hide"+go,HIDDEN:"hidden"+go,SHOW:"show"+go,SHOWN:"shown"+go,INSERTED:"inserted"+go,CLICK:"click"+go,FOCUSIN:"focusin"+go,FOCUSOUT:"focusout"+go,MOUSEENTER:"mouseenter"+go,MOUSELEAVE:"mouseleave"+go},ko="fade",Po="show",So=".tooltip-inner",Mo=".arrow",Ao="hover",zo="focus",No="click",Do="manual",jo=function(){function t(t,e){if(void 0===On)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var e=t.prototype;return e.enable=function(){this._isEnabled=!0},e.disable=function(){this._isEnabled=!1},e.toggleEnabled=function(){this._isEnabled=!this._isEnabled},e.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,n=i.default(t.currentTarget).data(e);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),i.default(t.currentTarget).data(e,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(i.default(this.getTipElement()).hasClass(Po))return void this._leave(null,this);this._enter(null,this)}},e.dispose=function(){clearTimeout(this._timeout),i.default.removeData(this.element,this.constructor.DATA_KEY),i.default(this.element).off(this.constructor.EVENT_KEY),i.default(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&i.default(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},e.show=function(){var t=this;if("none"===i.default(this.element).css("display"))throw new Error("Please use show on visible elements");var e=i.default.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){i.default(this.element).trigger(e);var n=m.findShadowRoot(this.element),o=i.default.contains(null!==n?n:this.element.ownerDocument.documentElement,this.element);if(e.isDefaultPrevented()||!o)return;var r=this.getTipElement(),s=m.getUID(this.constructor.NAME);r.setAttribute("id",s),this.element.setAttribute("aria-describedby",s),this.setContent(),this.config.animation&&i.default(r).addClass(ko);var a="function"==typeof this.config.placement?this.config.placement.call(this,r,this.element):this.config.placement,l=this._getAttachment(a);this.addAttachmentClass(l);var u=this._getContainer();i.default(r).data(this.constructor.DATA_KEY,this),i.default.contains(this.element.ownerDocument.documentElement,this.tip)||i.default(r).appendTo(u),i.default(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new On(this.element,r,this._getPopperConfig(l)),i.default(r).addClass(Po),i.default(r).addClass(this.config.customClass),"ontouchstart"in document.documentElement&&i.default(document.body).children().on("mouseover",null,i.default.noop);var c=function(){t.config.animation&&t._fixTransition();var e=t._hoverState;t._hoverState=null,i.default(t.element).trigger(t.constructor.Event.SHOWN),e===Eo&&t._leave(null,t)};if(i.default(this.tip).hasClass(ko)){var h=m.getTransitionDurationFromElement(this.tip);i.default(this.tip).one(m.TRANSITION_END,c).emulateTransitionEnd(h)}else c()}},e.hide=function(t){var e=this,n=this.getTipElement(),o=i.default.Event(this.constructor.Event.HIDE),r=function(){e._hoverState!==Co&&n.parentNode&&n.parentNode.removeChild(n),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),i.default(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),t&&t()};if(i.default(this.element).trigger(o),!o.isDefaultPrevented()){if(i.default(n).removeClass(Po),"ontouchstart"in document.documentElement&&i.default(document.body).children().off("mouseover",null,i.default.noop),this._activeTrigger[No]=!1,this._activeTrigger[zo]=!1,this._activeTrigger[Ao]=!1,i.default(this.tip).hasClass(ko)){var s=m.getTransitionDurationFromElement(n);i.default(n).one(m.TRANSITION_END,r).emulateTransitionEnd(s)}else r();this._hoverState=""}},e.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},e.isWithContent=function(){return Boolean(this.getTitle())},e.addAttachmentClass=function(t){i.default(this.getTipElement()).addClass(vo+"-"+t)},e.getTipElement=function(){return this.tip=this.tip||i.default(this.config.template)[0],this.tip},e.setContent=function(){var t=this.getTipElement();this.setElementContent(i.default(t.querySelectorAll(So)),this.getTitle()),i.default(t).removeClass(ko+" "+Po)},e.setElementContent=function(t,e){"object"!=typeof e||!e.nodeType&&!e.jquery?this.config.html?(this.config.sanitize&&(e=ho(e,this.config.whiteList,this.config.sanitizeFn)),t.html(e)):t.text(e):this.config.html?i.default(e).parent().is(t)||t.empty().append(e):t.text(i.default(e).text())},e.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},e._getPopperConfig=function(t){var e=this;return s({},{placement:t,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:Mo},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}},this.config.popperConfig)},e._getOffset=function(){var t=this,e={};return"function"==typeof this.config.offset?e.fn=function(e){return e.offsets=s({},e.offsets,t.config.offset(e.offsets,t.element)||{}),e}:e.offset=this.config.offset,e},e._getContainer=function(){return!1===this.config.container?document.body:m.isElement(this.config.container)?i.default(this.config.container):i.default(document).find(this.config.container)},e._getAttachment=function(t){return xo[t.toUpperCase()]},e._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach((function(e){if("click"===e)i.default(t.element).on(t.constructor.Event.CLICK,t.config.selector,(function(e){return t.toggle(e)}));else if(e!==Do){var n=e===Ao?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,o=e===Ao?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;i.default(t.element).on(n,t.config.selector,(function(e){return t._enter(e)})).on(o,t.config.selector,(function(e){return t._leave(e)}))}})),this._hideModalHandler=function(){t.element&&t.hide()},i.default(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=s({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},e._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},e._enter=function(t,e){var n=this.constructor.DATA_KEY;(e=e||i.default(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),i.default(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusin"===t.type?zo:Ao]=!0),i.default(e.getTipElement()).hasClass(Po)||e._hoverState===Co?e._hoverState=Co:(clearTimeout(e._timeout),e._hoverState=Co,e.config.delay&&e.config.delay.show?e._timeout=setTimeout((function(){e._hoverState===Co&&e.show()}),e.config.delay.show):e.show())},e._leave=function(t,e){var n=this.constructor.DATA_KEY;(e=e||i.default(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),i.default(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusout"===t.type?zo:Ao]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=Eo,e.config.delay&&e.config.delay.hide?e._timeout=setTimeout((function(){e._hoverState===Eo&&e.hide()}),e.config.delay.hide):e.hide())},e._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},e._getConfig=function(t){var e=i.default(this.element).data();return Object.keys(e).forEach((function(t){-1!==bo.indexOf(t)&&delete e[t]})),"number"==typeof(t=s({},this.constructor.Default,e,"object"==typeof t&&t?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()),m.typeCheckConfig(fo,t,this.constructor.DefaultType),t.sanitize&&(t.template=ho(t.template,t.whiteList,t.sanitizeFn)),t},e._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},e._cleanTipClass=function(){var t=i.default(this.getTipElement()),e=t.attr("class").match(yo);null!==e&&e.length&&t.removeClass(e.join(""))},e._handlePopperPlacementChange=function(t){this.tip=t.instance.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},e._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(i.default(t).removeClass(ko),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this),o=n.data(mo),r="object"==typeof e&&e;if((o||!/dispose|hide/.test(e))&&(o||(o=new t(this,r),n.data(mo,o)),"string"==typeof e)){if(void 0===o[e])throw new TypeError('No method named "'+e+'"');o[e]()}}))},r(t,null,[{key:"VERSION",get:function(){return po}},{key:"Default",get:function(){return To}},{key:"NAME",get:function(){return fo}},{key:"DATA_KEY",get:function(){return mo}},{key:"Event",get:function(){return Lo}},{key:"EVENT_KEY",get:function(){return go}},{key:"DefaultType",get:function(){return wo}}]),t}();i.default.fn[fo]=jo._jQueryInterface,i.default.fn[fo].Constructor=jo,i.default.fn[fo].noConflict=function(){return i.default.fn[fo]=_o,jo._jQueryInterface};var Oo="popover",Io="4.6.0",Bo="bs.popover",Ro="."+Bo,Zo=i.default.fn[Oo],$o="bs-popover",Ho=new RegExp("(^|\\s)"+$o+"\\S+","g"),qo=s({},jo.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),Fo=s({},jo.DefaultType,{content:"(string|element|function)"}),Wo="fade",Uo="show",Vo=".popover-header",Go=".popover-body",Ko={HIDE:"hide"+Ro,HIDDEN:"hidden"+Ro,SHOW:"show"+Ro,SHOWN:"shown"+Ro,INSERTED:"inserted"+Ro,CLICK:"click"+Ro,FOCUSIN:"focusin"+Ro,FOCUSOUT:"focusout"+Ro,MOUSEENTER:"mouseenter"+Ro,MOUSELEAVE:"mouseleave"+Ro},Yo=function(t){function e(){return t.apply(this,arguments)||this}a(e,t);var n=e.prototype;return n.isWithContent=function(){return this.getTitle()||this._getContent()},n.addAttachmentClass=function(t){i.default(this.getTipElement()).addClass($o+"-"+t)},n.getTipElement=function(){return this.tip=this.tip||i.default(this.config.template)[0],this.tip},n.setContent=function(){var t=i.default(this.getTipElement());this.setElementContent(t.find(Vo),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(Go),e),t.removeClass(Wo+" "+Uo)},n._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},n._cleanTipClass=function(){var t=i.default(this.getTipElement()),e=t.attr("class").match(Ho);null!==e&&e.length>0&&t.removeClass(e.join(""))},e._jQueryInterface=function(t){return this.each((function(){var n=i.default(this).data(Bo),o="object"==typeof t?t:null;if((n||!/dispose|hide/.test(t))&&(n||(n=new e(this,o),i.default(this).data(Bo,n)),"string"==typeof t)){if(void 0===n[t])throw new TypeError('No method named "'+t+'"');n[t]()}}))},r(e,null,[{key:"VERSION",get:function(){return Io}},{key:"Default",get:function(){return qo}},{key:"NAME",get:function(){return Oo}},{key:"DATA_KEY",get:function(){return Bo}},{key:"Event",get:function(){return Ko}},{key:"EVENT_KEY",get:function(){return Ro}},{key:"DefaultType",get:function(){return Fo}}]),e}(jo);i.default.fn[Oo]=Yo._jQueryInterface,i.default.fn[Oo].Constructor=Yo,i.default.fn[Oo].noConflict=function(){return i.default.fn[Oo]=Zo,Yo._jQueryInterface};var Xo="scrollspy",Qo="4.6.0",Jo="bs.scrollspy",tr="."+Jo,er=".data-api",nr=i.default.fn[Xo],ir={offset:10,method:"auto",target:""},or={offset:"number",method:"string",target:"(string|element)"},rr="activate"+tr,sr="scroll"+tr,ar="load"+tr+er,lr="dropdown-item",ur="active",cr='[data-spy="scroll"]',hr=".nav, .list-group",dr=".nav-link",fr=".nav-item",pr=".list-group-item",mr=".dropdown",gr=".dropdown-item",_r=".dropdown-toggle",vr="offset",yr="position",br=function(){function t(t,e){var n=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(e),this._selector=this._config.target+" "+dr+","+this._config.target+" "+pr+","+this._config.target+" "+gr,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,i.default(this._scrollElement).on(sr,(function(t){return n._process(t)})),this.refresh(),this._process()}var e=t.prototype;return e.refresh=function(){var t=this,e=this._scrollElement===this._scrollElement.window?vr:yr,n="auto"===this._config.method?e:this._config.method,o=n===yr?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map((function(t){var e,r=m.getSelectorFromElement(t);if(r&&(e=document.querySelector(r)),e){var s=e.getBoundingClientRect();if(s.width||s.height)return[i.default(e)[n]().top+o,r]}return null})).filter((function(t){return t})).sort((function(t,e){return t[0]-e[0]})).forEach((function(e){t._offsets.push(e[0]),t._targets.push(e[1])}))},e.dispose=function(){i.default.removeData(this._element,Jo),i.default(this._scrollElement).off(tr),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},e._getConfig=function(t){if("string"!=typeof(t=s({},ir,"object"==typeof t&&t?t:{})).target&&m.isElement(t.target)){var e=i.default(t.target).attr("id");e||(e=m.getUID(Xo),i.default(t.target).attr("id",e)),t.target="#"+e}return m.typeCheckConfig(Xo,t,or),t},e._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},e._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},e._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},e._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;)this._activeTarget!==this._targets[o]&&t>=this._offsets[o]&&(void 0===this._offsets[o+1]||t<this._offsets[o+1])&&this._activate(this._targets[o])}},e._activate=function(t){this._activeTarget=t,this._clear();var e=this._selector.split(",").map((function(e){return e+'[data-target="'+t+'"],'+e+'[href="'+t+'"]'})),n=i.default([].slice.call(document.querySelectorAll(e.join(","))));n.hasClass(lr)?(n.closest(mr).find(_r).addClass(ur),n.addClass(ur)):(n.addClass(ur),n.parents(hr).prev(dr+", "+pr).addClass(ur),n.parents(hr).prev(fr).children(dr).addClass(ur)),i.default(this._scrollElement).trigger(rr,{relatedTarget:t})},e._clear=function(){[].slice.call(document.querySelectorAll(this._selector)).filter((function(t){return t.classList.contains(ur)})).forEach((function(t){return t.classList.remove(ur)}))},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this).data(Jo);if(n||(n=new t(this,"object"==typeof e&&e),i.default(this).data(Jo,n)),"string"==typeof e){if(void 0===n[e])throw new TypeError('No method named "'+e+'"');n[e]()}}))},r(t,null,[{key:"VERSION",get:function(){return Qo}},{key:"Default",get:function(){return ir}}]),t}();i.default(window).on(ar,(function(){for(var t=[].slice.call(document.querySelectorAll(cr)),e=t.length;e--;){var n=i.default(t[e]);br._jQueryInterface.call(n,n.data())}})),i.default.fn[Xo]=br._jQueryInterface,i.default.fn[Xo].Constructor=br,i.default.fn[Xo].noConflict=function(){return i.default.fn[Xo]=nr,br._jQueryInterface};var wr="tab",xr="4.6.0",Tr="bs.tab",Cr="."+Tr,Er=".data-api",Lr=i.default.fn[wr],kr="hide"+Cr,Pr="hidden"+Cr,Sr="show"+Cr,Mr="shown"+Cr,Ar="click"+Cr+Er,zr="dropdown-menu",Nr="active",Dr="disabled",jr="fade",Or="show",Ir=".dropdown",Br=".nav, .list-group",Rr=".active",Zr="> li > .active",$r='[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',Hr=".dropdown-toggle",qr="> .dropdown-menu .active",Fr=function(){function t(t){this._element=t}var e=t.prototype;return e.show=function(){var t=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&i.default(this._element).hasClass(Nr)||i.default(this._element).hasClass(Dr))){var e,n,o=i.default(this._element).closest(Br)[0],r=m.getSelectorFromElement(this._element);if(o){var s="UL"===o.nodeName||"OL"===o.nodeName?Zr:Rr;n=(n=i.default.makeArray(i.default(o).find(s)))[n.length-1]}var a=i.default.Event(kr,{relatedTarget:this._element}),l=i.default.Event(Sr,{relatedTarget:n});if(n&&i.default(n).trigger(a),i.default(this._element).trigger(l),!l.isDefaultPrevented()&&!a.isDefaultPrevented()){r&&(e=document.querySelector(r)),this._activate(this._element,o);var u=function(){var e=i.default.Event(Pr,{relatedTarget:t._element}),o=i.default.Event(Mr,{relatedTarget:n});i.default(n).trigger(e),i.default(t._element).trigger(o)};e?this._activate(e,e.parentNode,u):u()}}},e.dispose=function(){i.default.removeData(this._element,Tr),this._element=null},e._activate=function(t,e,n){var o=this,r=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?i.default(e).children(Rr):i.default(e).find(Zr))[0],s=n&&r&&i.default(r).hasClass(jr),a=function(){return o._transitionComplete(t,r,n)};if(r&&s){var l=m.getTransitionDurationFromElement(r);i.default(r).removeClass(Or).one(m.TRANSITION_END,a).emulateTransitionEnd(l)}else a()},e._transitionComplete=function(t,e,n){if(e){i.default(e).removeClass(Nr);var o=i.default(e.parentNode).find(qr)[0];o&&i.default(o).removeClass(Nr),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}if(i.default(t).addClass(Nr),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),m.reflow(t),t.classList.contains(jr)&&t.classList.add(Or),t.parentNode&&i.default(t.parentNode).hasClass(zr)){var r=i.default(t).closest(Ir)[0];if(r){var s=[].slice.call(r.querySelectorAll(Hr));i.default(s).addClass(Nr)}t.setAttribute("aria-expanded",!0)}n&&n()},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this),o=n.data(Tr);if(o||(o=new t(this),n.data(Tr,o)),"string"==typeof e){if(void 0===o[e])throw new TypeError('No method named "'+e+'"');o[e]()}}))},r(t,null,[{key:"VERSION",get:function(){return xr}}]),t}();i.default(document).on(Ar,$r,(function(t){t.preventDefault(),Fr._jQueryInterface.call(i.default(this),"show")})),i.default.fn[wr]=Fr._jQueryInterface,i.default.fn[wr].Constructor=Fr,i.default.fn[wr].noConflict=function(){return i.default.fn[wr]=Lr,Fr._jQueryInterface};var Wr="toast",Ur="4.6.0",Vr="bs.toast",Gr="."+Vr,Kr=i.default.fn[Wr],Yr="click.dismiss"+Gr,Xr="hide"+Gr,Qr="hidden"+Gr,Jr="show"+Gr,ts="shown"+Gr,es="fade",ns="hide",is="show",os="showing",rs={animation:"boolean",autohide:"boolean",delay:"number"},ss={animation:!0,autohide:!0,delay:500},as='[data-dismiss="toast"]',ls=function(){function t(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners()}var e=t.prototype;return e.show=function(){var t=this,e=i.default.Event(Jr);if(i.default(this._element).trigger(e),!e.isDefaultPrevented()){this._clearTimeout(),this._config.animation&&this._element.classList.add(es);var n=function(){t._element.classList.remove(os),t._element.classList.add(is),i.default(t._element).trigger(ts),t._config.autohide&&(t._timeout=setTimeout((function(){t.hide()}),t._config.delay))};if(this._element.classList.remove(ns),m.reflow(this._element),this._element.classList.add(os),this._config.animation){var o=m.getTransitionDurationFromElement(this._element);i.default(this._element).one(m.TRANSITION_END,n).emulateTransitionEnd(o)}else n()}},e.hide=function(){if(this._element.classList.contains(is)){var t=i.default.Event(Xr);i.default(this._element).trigger(t),t.isDefaultPrevented()||this._close()}},e.dispose=function(){this._clearTimeout(),this._element.classList.contains(is)&&this._element.classList.remove(is),i.default(this._element).off(Yr),i.default.removeData(this._element,Vr),this._element=null,this._config=null},e._getConfig=function(t){return t=s({},ss,i.default(this._element).data(),"object"==typeof t&&t?t:{}),m.typeCheckConfig(Wr,t,this.constructor.DefaultType),t},e._setListeners=function(){var t=this;i.default(this._element).on(Yr,as,(function(){return t.hide()}))},e._close=function(){var t=this,e=function(){t._element.classList.add(ns),i.default(t._element).trigger(Qr)};if(this._element.classList.remove(is),this._config.animation){var n=m.getTransitionDurationFromElement(this._element);i.default(this._element).one(m.TRANSITION_END,e).emulateTransitionEnd(n)}else e()},e._clearTimeout=function(){clearTimeout(this._timeout),this._timeout=null},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this),o=n.data(Vr);if(o||(o=new t(this,"object"==typeof e&&e),n.data(Vr,o)),"string"==typeof e){if(void 0===o[e])throw new TypeError('No method named "'+e+'"');o[e](this)}}))},r(t,null,[{key:"VERSION",get:function(){return Ur}},{key:"DefaultType",get:function(){return rs}},{key:"Default",get:function(){return ss}}]),t}();i.default.fn[Wr]=ls._jQueryInterface,i.default.fn[Wr].Constructor=ls,i.default.fn[Wr].noConflict=function(){return i.default.fn[Wr]=Kr,ls._jQueryInterface},t.Alert=S,t.Button=K,t.Carousel=qt,t.Collapse=he,t.Dropdown=Ci,t.Modal=ro,t.Popover=Yo,t.Scrollspy=br,t.Tab=Fr,t.Toast=ls,t.Tooltip=jo,t.Util=m,Object.defineProperty(t,"__esModule",{value:!0})}(e,et)}));const nt=[];function it(e,n=t){let i;const o=[];function s(t){if(r(e,t)&&(e=t,i)){const t=!nt.length;for(let t=0;t<o.length;t+=1){const n=o[t];n[1](),nt.push(n,e)}if(t){for(let t=0;t<nt.length;t+=2)nt[t][0](nt[t+1]);nt.length=0}}}return{set:s,update:function(t){s(t(e))},subscribe:function(r,a=t){const l=[r,a];return o.push(l),1===o.length&&(i=n(s)||t),r(e),()=>{const t=o.indexOf(l);-1!==t&&o.splice(t,1),0===o.length&&(i(),i=null)}}}}const ot=it(),rt=it(),st=it(),at=it(),lt=it(),ut=it({count:0});function ct(){let t=window.location.pathname.replace(".html","").replace(/^.*\//,"");-1===["search","reverse","details","deletable","polygons"].indexOf(t)&&(t="search"),ut.update((function(e){return{tab:t,count:e.count+1}}))}function ht(t){let e,n,i,o,r,s,a,l,u,f,_,v,y,b,T,C=t[0].date+"";return{c(){e=p("div"),n=m("Data from "),i=p("a"),o=m("API request"),s=g(),a=p("span"),l=m("("),u=p("a"),f=m("debug output"),v=m(")"),y=m("\n          Data last updated: "),b=p("span"),T=m(C),w(i,"href",r=t[0].api_request_url),w(i,"class","svelte-1hjkg8o"),w(u,"href",_=t[0].api_request_url_debug),w(u,"class","svelte-1hjkg8o"),w(a,"id","api-request-debug"),w(e,"id","api-request"),w(b,"id","data-date")},m(t,r){h(t,e,r),c(e,n),c(e,i),c(i,o),c(e,s),c(e,a),c(a,l),c(a,u),c(u,f),c(a,v),h(t,y,r),h(t,b,r),c(b,T)},p(t,e){1&e&&r!==(r=t[0].api_request_url)&&w(i,"href",r),1&e&&_!==(_=t[0].api_request_url_debug)&&w(u,"href",_),1&e&&C!==(C=t[0].date+"")&&x(T,C)},d(t){t&&d(e),t&&d(y),t&&d(b)}}}function dt(e){let n,i,o,r,s,a,l,u,f,m,_=e[0]&&ht(e);return{c(){n=p("header"),i=p("div"),o=p("div"),o.innerHTML='<div class="brand svelte-1hjkg8o"><a href="search.html" class="svelte-1hjkg8o"><img alt="logo" src="images/osm_logo.120px.png" width="30" height="30" class="svelte-1hjkg8o"/> \n          <h1 class="svelte-1hjkg8o">Nominatim</h1></a></div>',r=g(),s=p("div"),a=p("div"),l=p("div"),l.textContent="loading...",u=g(),_&&_.c(),f=g(),m=p("div"),m.innerHTML='<div class="dropdown"><button class="dropdown-toggle btn btn-sm btn-outline-secondary" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">About &amp; Help</button> \n        <div class="dropdown-menu dropdown-menu-right svelte-1hjkg8o"><a class="dropdown-item svelte-1hjkg8o" href="https://nominatim.org/release-docs/develop/api/Overview/" target="_blank">API Reference</a> \n          <a class="dropdown-item svelte-1hjkg8o" href="https://nominatim.org/release-docs/develop/api/Faq/" target="_blank">FAQ</a> \n          <a class="dropdown-item svelte-1hjkg8o" href="https://help.openstreetmap.org/tags/nominatim/">OpenStreetMap Help</a> \n          <a class="dropdown-item svelte-1hjkg8o" href="https://github.com/osm-search/Nominatim">Nominatim on Github</a> \n          <a class="dropdown-item svelte-1hjkg8o" href="https://github.com/osm-search/nominatim-ui">This frontend on Github</a> \n          <div class="dropdown-divider"></div> \n          <a class="dropdown-item svelte-1hjkg8o" href="#report-issue" data-toggle="modal" data-target="#report-modal">Report problem with results</a></div></div>',w(o,"class","col-4"),w(l,"id","loading"),w(l,"class","svelte-1hjkg8o"),w(a,"id","last-updated"),w(a,"class","text-center svelte-1hjkg8o"),w(s,"class","col-4"),w(m,"class","col-4 text-right"),w(i,"class","row"),w(n,"class","container-fluid svelte-1hjkg8o")},m(t,e){h(t,n,e),c(n,i),c(i,o),c(i,r),c(i,s),c(s,a),c(a,l),c(a,u),_&&_.m(a,null),c(i,f),c(i,m)},p(t,[e]){t[0]?_?_.p(t,e):(_=ht(t),_.c(),_.m(a,null)):_&&(_.d(1),_=null)},i:t,o:t,d(t){t&&d(n),_&&_.d()}}}function ft(t,e,n){let i;return lt.subscribe((t=>{t&&n(0,i=t)})),[i]}class pt extends Q{constructor(t){super(),X(this,t,ft,dt,r,{})}}function mt(e){let n;return{c(){n=p("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>',w(n,"class","svelte-1f2bd8l")},m(t,e){h(t,n,e)},p:t,i:t,o:t,d(t){t&&d(n)}}}class gt extends Q{constructor(t){super(),X(this,t,null,mt,r,{})}}function _t(e){let n;return{c(){n=p("div"),n.innerHTML='<div class="modal-dialog"><div class="modal-content"><div class="modal-header"><h4 class="modal-title">Report a problem</h4> \n        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button></div> \n      <div class="modal-body"><p>Before reporting problems please read the <a target="_blank" href="https://nominatim.org/release-docs/develop/api/Overview/">user documentation</a>\n          and\n          <a target="_blank" href="https://nominatim.org/release-docs/develop/api/Faq/">FAQ</a>.\n\n          If your problem relates to the address of a particular search result please use the &#39;details&#39; link \n          to check how the address was generated before reporting a problem.</p> \n        <p>Use <a target="_blank" href="https://github.com/osm-search/Nominatim/issues">Nominatim issues on github</a>\n          to report problems.</p> \n        <p>Please ensure that you include a full description of the problem, including the search\n          query that you used, the problem with the result and, if the problem relates to missing data,\n          the osm type (node, way, relation) and id of the item that is missing.</p> \n        <p>Problems that contain enough detail are likely to get looked at before ones that require\n          significant research.</p></div> \n      <div class="modal-footer"><button type="button" class="btn btn-outline-secondary" data-dismiss="modal">OK</button></div></div></div>',w(n,"class","modal fade"),w(n,"id","report-modal")},m(t,e){h(t,n,e)},p:t,i:t,o:t,d(t){t&&d(n)}}}class vt extends Q{constructor(t){super(),X(this,t,null,_t,r,{})}}var yt=function(t,e){var n="undefined"!=typeof Nominatim_Config&&void 0!==Nominatim_Config[t]?Nominatim_Config[t]:bt[t];return void 0!==n?n:e};const bt={Nominatim_API_Endpoint:"http://localhost/nominatim/",Images_Base_Url:"mapicons/",Search_AreaPolygons:1,Reverse_Default_Search_Zoom:18,Map_Default_Lat:20,Map_Default_Lon:0,Map_Default_Zoom:2,Map_Tile_URL:"https://{s}.tile.osm.org/{z}/{x}/{y}.png",Map_Tile_Attribution:'<a href="https://osm.org/copyright">OpenStreetMap contributors</a>'};async function wt(t,e,n){var i=xt(t,e);document.getElementById("loading").style.display="block",await fetch(i).then((t=>t.json())).then((t=>{n(t),document.getElementById("loading").style.display="none"})),fetch(xt("status",{format:"json"})).then((t=>t.json())).then((t=>{let e={api_request_url:i,api_request_url_debug:i+"&debug=1",date:t.data_updated};lt.set(e)}))}function xt(t,e){return yt("Nominatim_API_Endpoint")+t+".php?"+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("&")}
 /*!
      * Serialize all form data into a SearchParams string
      * (c) 2020 Chris Ferdinandi, MIT License, https://gomakethings.com
      * @param  {Node}   form The form to serialize
      * @return {String}      The serialized form data
 /*!
      * Serialize all form data into a SearchParams string
      * (c) 2020 Chris Ferdinandi, MIT License, https://gomakethings.com
      * @param  {Node}   form The form to serialize
      * @return {String}      The serialized form data
-     */function Tt(t){document.title=[t,"OpenStreetMap Nominatim"].filter((t=>t&&t.length>1)).join(" | ")}function Ct(t){let e,n,i,o;const r=t[2].default,s=function(t,e,n,i){if(t){const o=l(t,e,n,i);return t[0](o)}}(r,t,t[1],null);return{c(){e=p("form"),s&&s.c(),w(e,"class","form-inline"),w(e,"role","search"),w(e,"accept-charset","UTF-8"),w(e,"action","")},m(r,a){h(r,e,a),s&&s.m(e,null),n=!0,i||(o=v(e,"submit",t[0]),i=!0)},p(t,[e]){s&&s.p&&2&e&&u(s,r,t,t[1],e,null,null)},i(t){n||(W(s,t),n=!0)},o(t){U(s,t),n=!1},d(t){t&&d(e),s&&s.d(t),i=!1,o()}}}function Et(t,e,n){let{$$slots:i={},$$scope:o}=e;return t.$$set=t=>{"$$scope"in t&&n(1,o=t.$$scope)},[function(t){t.preventDefault();var e,n,i=(e=t.target,n=[],Array.prototype.slice.call(e.elements).forEach((function(t){!t.name||t.disabled||["file","reset","submit","button"].indexOf(t.type)>-1||["checkbox","radio"].indexOf(t.type)>-1&&!t.checked||void 0!==t.value&&n.push(encodeURIComponent(t.name)+"="+encodeURIComponent(t.value))})),n.join("&"));i=function(t){var e=new URLSearchParams(t),n=[];e.forEach((function(t,e){""===t&&n.push(e)}));for(var i=0;i<n.length;i+=1)e.delete(n[i]);return e.toString()}(i),window.history.pushState({},"","?"+i),ct()},o,i]}class Lt extends Q{constructor(t){super(),X(this,t,Et,Ct,r,{})}}
+     */function Tt(t){document.title=[t,"OpenStreetMap Nominatim"].filter((t=>t&&t.length>1)).join(" | ")}function Ct(t){let e,n,i,o;const r=t[2].default,s=function(t,e,n,i){if(t){const o=l(t,e,n,i);return t[0](o)}}(r,t,t[1],null);return{c(){e=p("form"),s&&s.c(),w(e,"class","form-inline"),w(e,"role","search"),w(e,"accept-charset","UTF-8"),w(e,"action","")},m(r,a){h(r,e,a),s&&s.m(e,null),n=!0,i||(o=v(e,"submit",t[0]),i=!0)},p(t,[e]){s&&s.p&&2&e&&u(s,r,t,t[1],e,null,null)},i(t){n||(W(s,t),n=!0)},o(t){U(s,t),n=!1},d(t){t&&d(e),s&&s.d(t),i=!1,o()}}}function Et(t,e,n){let{$$slots:i={},$$scope:o}=e;return t.$$set=t=>{"$$scope"in t&&n(1,o=t.$$scope)},[function(t){t.preventDefault();var e,n,i=(e=t.target,n=[],Array.prototype.slice.call(e.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&&n.push(encodeURIComponent(t.name)+"="+encodeURIComponent(t.value))})),n.join("&"));i=function(t){var e=new URLSearchParams(t),n=[];e.forEach((function(t,e){""===t&&n.push(e)}));for(var i=0;i<n.length;i+=1)e.delete(n[i]);return e.toString()}(i),window.history.pushState({},"","?"+i),ct()},o,i]}class Lt extends Q{constructor(t){super(),X(this,t,Et,Ct,r,{})}}
 /*!
      * escape-html
      * Copyright(c) 2012-2013 TJ Holowaychuk
      * Copyright(c) 2015 Andreas Lubbe
      * Copyright(c) 2015 Tiancheng "Timothy" Gu
      * MIT Licensed
 /*!
      * escape-html
      * Copyright(c) 2012-2013 TJ Holowaychuk
      * Copyright(c) 2015 Andreas Lubbe
      * Copyright(c) 2015 Tiancheng "Timothy" Gu
      * MIT Licensed
-     */var kt=/["'&<>]/,Pt=function(t){var e,n=""+t,i=kt.exec(n);if(!i)return n;var o="",r=0,s=0;for(r=i.index;r<n.length;r++){switch(n.charCodeAt(r)){case 34:e="&quot;";break;case 38:e="&amp;";break;case 39:e="&#39;";break;case 60:e="&lt;";break;case 62:e="&gt;";break;default:continue}s!==r&&(o+=n.substring(s,r)),s=r+1,o+=e}return s!==r?o+n.substring(s,r):o};var St=Ht,Mt=function(t){if(!t.osm_type)return"";var e=Ht(t.osm_type,!1);return e?'<a href="https://www.openstreetmap.org/'+e+"/"+t.osm_id+'">'+e+" "+t.osm_id+"</a>":""},At=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""},zt=function(t){if(!t)return"";var e=t.osm_type;e&&1!==e.length&&(n=t.osm_type,e="node"===n?"N":"way"===n?"W":"relation"===n?"R":"");var n;if(!e)return"";var i="details.html?osmtype="+e+"&osmid="+t.osm_id;t.class?i=i+"&class="+encodeURIComponent(t.class):t.category&&(i=i+"&class="+encodeURIComponent(t.category));return i},Nt=function(t){if(!t.calculated_wikipedia)return"";var e=t.calculated_wikipedia.split(":",2),n=Pt(t.calculated_wikipedia),i=Pt(e[0]),o=Pt(e[1]);return'<a href="https://'+i+".wikipedia.org/wiki/"+o+'" target="_blank">'+n+"</a>"},Dt=function(t){return t.isarea?"Polygon":"Point"},jt=function(t){return"boundary"===t.category&&"administrative"===t.type},Ot=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"},It=function(t){var e=t.class+":"+t.type;t.type&&"administrative"===t.type&&t.place_type&&(e=e+" ("+t.place_type+")");return Pt(e)},Bt=function(t){return t<15?t:""},Rt=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>"},Zt=function(t){return(" "===t[0]?"*":"")+Pt(t)},$t=function(){return["Continent / Sea","","","Country","","State","Region","","County","","City","","Town / Village","","Suburb","","Street","","Building","","",""]};function Ht(t,e){return"N"===t?"node":"W"===t?"way":"R"===t?"relation":e&&("T"===t||"I"===t)?"way":""}function qt(t,e,n){const i=t.slice();return i[6]=e[n],i[8]=n,i}function Ft(t){let e,n,o,r,s,a,l,u,f,m,_,y,b,x,T,E,L,k,P,S,M,A,z,N,D,j,O,I,B,R,Z,$,H,q,F,Y,X,Q,J,tt,et,nt,it,ot,rt,st,at,lt,ut,ct,ht,dt,ft,pt,mt,gt,_t,vt,yt,bt,wt,xt,Tt,Ct,Et,kt,Pt,St;return b=new Lt({props:{$$slots:{default:[Ut]},$$scope:{ctx:t}}}),E=new Lt({props:{$$slots:{default:[Vt]},$$scope:{ctx:t}}}),{c(){e=p("div"),n=p("ul"),o=p("li"),r=p("a"),r.textContent="simple",s=g(),a=p("li"),l=p("a"),l.textContent="structured",u=g(),f=p("div"),f.innerHTML='<a href="details.html" class="mr-2">search by id</a> \n        <a id="switch-to-reverse" href="reverse.html">reverse search</a>',m=g(),_=p("div"),y=p("div"),V(b.$$.fragment),x=g(),T=p("div"),V(E.$$.fragment),L=g(),k=p("a"),k.textContent="Advanced options",P=g(),S=p("div"),M=p("div"),A=p("div"),z=p("span"),N=p("input"),j=g(),O=p("label"),O.textContent="apply viewbox",I=g(),B=p("span"),R=p("input"),$=g(),H=p("label"),H.textContent="bounded to viewbox",q=g(),F=p("span"),Y=p("input"),Q=g(),J=p("label"),J.textContent="deduplicate results",tt=g(),et=p("div"),nt=p("span"),it=p("label"),it.textContent="Maximum number of results:",ot=g(),rt=p("input"),at=g(),lt=p("span"),ut=p("label"),ut.textContent="Polygon simplification:",ct=g(),ht=p("input"),ft=g(),pt=p("div"),mt=p("span"),gt=p("label"),gt.textContent="Languages:",_t=g(),vt=p("input"),bt=g(),wt=p("span"),xt=p("label"),xt.textContent="Countries:",Tt=g(),Ct=p("input"),w(r,"class","nav-link"),w(r,"data-toggle","tab"),w(r,"href","#simple"),C(r,"active",!t[0]),w(o,"class","nav-item"),w(l,"class","nav-link"),w(l,"data-toggle","tab"),w(l,"href","#structured"),C(l,"active",t[0]),w(a,"class","nav-item"),w(f,"class","search-type-link svelte-g03ov5"),w(n,"class","nav nav-tabs"),w(y,"class","tab-pane"),w(y,"id","simple"),w(y,"role","tabpanel"),C(y,"active",!t[0]),w(T,"class","tab-pane"),w(T,"id","structured"),w(T,"role","tabpanel"),C(T,"active",t[0]),w(k,"href","#advanced"),w(k,"class","btn btn-outline-secondary btn-sm"),w(k,"data-toggle","collapse"),w(k,"data-target","#searchAdvancedOptions"),w(k,"role","button"),w(k,"aria-expanded","false"),w(k,"aria-controls","collapseAdvancedOptions"),w(N,"type","checkbox"),w(N,"class","form-check-input api-param-setting"),w(N,"id","use_viewbox"),N.checked=D=t[2].viewbox,w(O,"class","form-check-label svelte-g03ov5"),w(O,"for","use_viewbox"),w(z,"class","svelte-g03ov5"),w(R,"type","checkbox"),w(R,"class","form-check-input api-param-setting"),w(R,"id","option_bounded"),R.checked=Z=!!t[2].bounded,w(H,"class","form-check-label svelte-g03ov5"),w(H,"for","option_bounded"),w(B,"class","svelte-g03ov5"),w(Y,"type","checkbox"),w(Y,"class","form-check-input api-param-setting"),w(Y,"id","option_dedupe"),Y.checked=X=!!t[2].dedupe,w(J,"class","form-check-label svelte-g03ov5"),w(J,"for","option_dedupe"),w(F,"class","svelte-g03ov5"),w(A,"class","form-check form-check-inline"),w(it,"class","form-check-label svelte-g03ov5"),w(it,"for","option_limit"),w(rt,"type","number"),w(rt,"class","form-check-input api-param-setting"),w(rt,"data-api-param","limit"),w(rt,"id","option_limit"),w(rt,"size","5"),w(rt,"min","1"),w(rt,"max","50"),rt.value=st=t[2].limit||"",w(nt,"class","svelte-g03ov5"),w(ut,"class","form-check-label svelte-g03ov5"),w(ut,"for","option_polygon_threashold"),w(ht,"type","number"),w(ht,"class","form-check-input api-param-setting"),w(ht,"data-api-param","polygon_threshold"),w(ht,"id","option_polygon_threshold"),w(ht,"size","5"),w(ht,"min","0.0"),w(ht,"step","0.01"),ht.value=dt=t[2].polygon_threshold||"",w(lt,"class","svelte-g03ov5"),w(et,"class","form-check form-check-inline"),w(gt,"class","form-check-label svelte-g03ov5"),w(gt,"for","accept_lang"),w(vt,"type","text"),w(vt,"placeholder","e.g. en,zh-Hant"),w(vt,"class","form-check-input api-param-setting"),w(vt,"data-api-param","accept-language"),w(vt,"id","accept_lang"),w(vt,"size","15"),vt.value=yt=t[2]["accept-language"]||"",w(mt,"class","svelte-g03ov5"),w(xt,"class","form-check-label svelte-g03ov5"),w(xt,"for","option_ccode"),w(Ct,"type","text"),w(Ct,"placeholder","e.g. de,gb"),w(Ct,"class","form-check-input api-param-setting"),w(Ct,"data-api-param","countrycodes"),w(Ct,"id","option_ccode"),w(Ct,"size","15"),Ct.value=Et=t[2].countrycodes||"",w(wt,"class","svelte-g03ov5"),w(pt,"class","form-check form-check-inline"),w(M,"id","searchAdvancedOptionsContent"),w(M,"class","svelte-g03ov5"),w(S,"class","collapse"),w(S,"id","searchAdvancedOptions"),w(_,"class","tab-content p-2 svelte-g03ov5"),w(e,"class","top-bar svelte-g03ov5")},m(i,d){h(i,e,d),c(e,n),c(n,o),c(o,r),c(n,s),c(n,a),c(a,l),c(n,u),c(n,f),c(e,m),c(e,_),c(_,y),G(b,y,null),c(_,x),c(_,T),G(E,T,null),c(_,L),c(_,k),c(_,P),c(_,S),c(S,M),c(M,A),c(A,z),c(z,N),c(z,j),c(z,O),c(A,I),c(A,B),c(B,R),c(B,$),c(B,H),c(A,q),c(A,F),c(F,Y),c(F,Q),c(F,J),c(M,tt),c(M,et),c(et,nt),c(nt,it),c(nt,ot),c(nt,rt),c(et,at),c(et,lt),c(lt,ut),c(lt,ct),c(lt,ht),c(M,ft),c(M,pt),c(pt,mt),c(mt,gt),c(mt,_t),c(mt,vt),c(pt,bt),c(pt,wt),c(wt,xt),c(wt,Tt),c(wt,Ct),kt=!0,Pt||(St=[v(N,"change",t[4]),v(R,"change",Qt),v(Y,"change",Jt),v(rt,"change",te),v(ht,"change",te),v(vt,"change",te),v(Ct,"change",te)],Pt=!0)},p(t,e){1&e&&C(r,"active",!t[0]),1&e&&C(l,"active",t[0]);const n={};524&e&&(n.$$scope={dirty:e,ctx:t}),b.$set(n),1&e&&C(y,"active",!t[0]);const i={};524&e&&(i.$$scope={dirty:e,ctx:t}),E.$set(i),1&e&&C(T,"active",t[0]),(!kt||4&e&&D!==(D=t[2].viewbox))&&(N.checked=D),(!kt||4&e&&Z!==(Z=!!t[2].bounded))&&(R.checked=Z),(!kt||4&e&&X!==(X=!!t[2].dedupe))&&(Y.checked=X),(!kt||4&e&&st!==(st=t[2].limit||""))&&(rt.value=st),(!kt||4&e&&dt!==(dt=t[2].polygon_threshold||""))&&(ht.value=dt),(!kt||4&e&&yt!==(yt=t[2]["accept-language"]||"")&&vt.value!==yt)&&(vt.value=yt),(!kt||4&e&&Et!==(Et=t[2].countrycodes||"")&&Ct.value!==Et)&&(Ct.value=Et)},i(t){kt||(W(b.$$.fragment,t),W(E.$$.fragment,t),kt=!0)},o(t){U(b.$$.fragment,t),U(E.$$.fragment,t),kt=!1},d(t){t&&d(e),K(b),K(E),Pt=!1,i(St)}}}function Wt(t){let e,n,i;return n=new Lt({props:{$$slots:{default:[Kt]},$$scope:{ctx:t}}}),{c(){e=p("div"),V(n.$$.fragment),w(e,"class","top-bar svelte-g03ov5")},m(t,o){h(t,e,o),G(n,e,null),i=!0},p(t,e){const i={};516&e&&(i.$$scope={dirty:e,ctx:t}),n.$set(i)},i(t){i||(W(n.$$.fragment,t),i=!0)},o(t){U(n.$$.fragment,t),i=!1},d(t){t&&d(e),K(n)}}}function Ut(t){let e,n,i,o,r,s,a,l,u,f,m,_,v,y,b,x,T,C,E,L,k,P,S,M,A,z;return{c(){e=p("input"),i=g(),o=p("div"),r=p("button"),r.textContent="Search",s=g(),a=p("input"),u=g(),f=p("input"),_=g(),v=p("input"),b=g(),x=p("input"),C=g(),E=p("input"),k=g(),P=p("input"),M=g(),A=p("input"),w(e,"id","q"),w(e,"name","q"),w(e,"type","text"),w(e,"class","form-control form-control-sm svelte-g03ov5"),w(e,"placeholder","Search"),e.value=n=t[2].q||"",w(r,"type","submit"),w(r,"class","btn btn-primary btn-sm mx-1"),w(a,"type","hidden"),w(a,"name","viewbox"),a.value=l=t[3]||"",w(f,"type","hidden"),w(f,"name","dedupe"),f.value=m=t[2].dedupe?1:"",w(v,"type","hidden"),w(v,"name","bounded"),v.value=y=t[2].bounded?1:"",w(x,"type","hidden"),w(x,"name","accept-language"),x.value=T=t[2]["accept-language"]||"",w(E,"type","hidden"),w(E,"name","countrycodes"),E.value=L=t[2].countrycodes||"",w(P,"type","hidden"),w(P,"name","limit"),P.value=S=t[2].limit||"",w(A,"type","hidden"),w(A,"name","polygon_threshold"),A.value=z=t[2].polygon_threshold||"",w(o,"class","form-group search-button-group svelte-g03ov5")},m(t,n){h(t,e,n),h(t,i,n),h(t,o,n),c(o,r),c(o,s),c(o,a),c(o,u),c(o,f),c(o,_),c(o,v),c(o,b),c(o,x),c(o,C),c(o,E),c(o,k),c(o,P),c(o,M),c(o,A)},p(t,i){4&i&&n!==(n=t[2].q||"")&&e.value!==n&&(e.value=n),8&i&&l!==(l=t[3]||"")&&(a.value=l),4&i&&m!==(m=t[2].dedupe?1:"")&&(f.value=m),4&i&&y!==(y=t[2].bounded?1:"")&&(v.value=y),4&i&&T!==(T=t[2]["accept-language"]||"")&&(x.value=T),4&i&&L!==(L=t[2].countrycodes||"")&&(E.value=L),4&i&&S!==(S=t[2].limit||"")&&(P.value=S),4&i&&z!==(z=t[2].polygon_threshold||"")&&(A.value=z)},d(t){t&&d(e),t&&d(i),t&&d(o)}}}function Vt(t){let e,n,i,o,r,s,a,l,u,f,m,_,v,y,b,x,T,C,E,L,k,P,S,M,A,z,N,D,j,O,I,B,R,Z,$,H,q,F,W,U,V;return{c(){e=p("input"),i=g(),o=p("input"),s=g(),a=p("input"),u=g(),f=p("input"),_=g(),v=p("input"),b=g(),x=p("input"),C=g(),E=p("div"),L=p("button"),L.textContent="Search",k=g(),P=p("input"),M=g(),A=p("input"),N=g(),D=p("input"),O=g(),I=p("input"),R=g(),Z=p("input"),H=g(),q=p("input"),W=g(),U=p("input"),w(e,"name","street"),w(e,"type","text"),w(e,"class","form-control form-control-sm mr-1"),w(e,"placeholder","House number/Street"),e.value=n=t[2].street||"",w(o,"name","city"),w(o,"type","text"),w(o,"class","form-control form-control-sm mr-1"),w(o,"placeholder","City"),o.value=r=t[2].city||"",w(a,"id","county"),w(a,"name","county"),w(a,"type","text"),w(a,"class","form-control form-control-sm mr-1"),w(a,"placeholder","County"),a.value=l=t[2].county||"",w(f,"name","state"),w(f,"type","text"),w(f,"class","form-control form-control-sm mr-1"),w(f,"placeholder","State"),f.value=m=t[2].state||"",w(v,"name","country"),w(v,"type","text"),w(v,"class","form-control form-control-sm mr-1"),w(v,"placeholder","Country"),v.value=y=t[2].country||"",w(x,"name","postalcode"),w(x,"type","text"),w(x,"class","form-control form-control-sm mr-1"),w(x,"placeholder","Postal Code"),x.value=T=t[2].postalcode||"",w(L,"type","submit"),w(L,"class","btn btn-primary btn-sm mx-1"),w(P,"type","hidden"),w(P,"name","viewbox"),P.value=S=t[3]||"",w(A,"type","hidden"),w(A,"name","dedupe"),A.value=z=t[2].dedupe?1:"",w(D,"type","hidden"),w(D,"name","bounded"),D.value=j=t[2].bounded?1:"",w(I,"type","hidden"),w(I,"name","accept-language"),I.value=B=t[2]["accept-language"]||"",w(Z,"type","hidden"),w(Z,"name","countrycodes"),Z.value=$=t[2].countrycodes||"",w(q,"type","hidden"),w(q,"name","limit"),q.value=F=t[2].limit||"",w(U,"type","hidden"),w(U,"name","polygon_threshold"),U.value=V=t[2].polygon_threshold||"",w(E,"class","form-group search-button-group svelte-g03ov5")},m(t,n){h(t,e,n),h(t,i,n),h(t,o,n),h(t,s,n),h(t,a,n),h(t,u,n),h(t,f,n),h(t,_,n),h(t,v,n),h(t,b,n),h(t,x,n),h(t,C,n),h(t,E,n),c(E,L),c(E,k),c(E,P),c(E,M),c(E,A),c(E,N),c(E,D),c(E,O),c(E,I),c(E,R),c(E,Z),c(E,H),c(E,q),c(E,W),c(E,U)},p(t,i){4&i&&n!==(n=t[2].street||"")&&e.value!==n&&(e.value=n),4&i&&r!==(r=t[2].city||"")&&o.value!==r&&(o.value=r),4&i&&l!==(l=t[2].county||"")&&a.value!==l&&(a.value=l),4&i&&m!==(m=t[2].state||"")&&f.value!==m&&(f.value=m),4&i&&y!==(y=t[2].country||"")&&v.value!==y&&(v.value=y),4&i&&T!==(T=t[2].postalcode||"")&&x.value!==T&&(x.value=T),8&i&&S!==(S=t[3]||"")&&(P.value=S),4&i&&z!==(z=t[2].dedupe?1:"")&&(A.value=z),4&i&&j!==(j=t[2].bounded?1:"")&&(D.value=j),4&i&&B!==(B=t[2]["accept-language"]||"")&&(I.value=B),4&i&&$!==($=t[2].countrycodes||"")&&(Z.value=$),4&i&&F!==(F=t[2].limit||"")&&(q.value=F),4&i&&V!==(V=t[2].polygon_threshold||"")&&(U.value=V)},d(t){t&&d(e),t&&d(i),t&&d(o),t&&d(s),t&&d(a),t&&d(u),t&&d(f),t&&d(_),t&&d(v),t&&d(b),t&&d(x),t&&d(C),t&&d(E)}}}function Gt(t){let e,n,i,o,r,s=t[6]+"";return{c(){e=p("option"),n=m(t[8]),i=m(" - "),o=m(s),e.__value=t[8],e.value=e.__value,e.selected=r=t[8]===t[2].zoom},m(t,r){h(t,e,r),c(e,n),c(e,i),c(e,o)},p(t,n){4&n&&r!==(r=t[8]===t[2].zoom)&&(e.selected=r)},d(t){t&&d(e)}}}function Kt(t){let e,n,i,o,r,s,a,l,u,_,x,C,E,L,k,P,S,M,A,z,N,D,j,O,I,B,R,Z,$=$t(),H=[];for(let e=0;e<$.length;e+=1)H[e]=Gt(qt(t,$,e));return{c(){e=p("div"),n=p("input"),i=g(),o=p("label"),o.textContent="lat",r=g(),s=p("input"),l=g(),u=p("a"),u.textContent="<>",_=g(),x=p("label"),x.textContent="lon",C=g(),E=p("input"),k=g(),P=p("label"),P.textContent="max zoom",S=g(),M=p("select"),A=p("option"),z=m("---");for(let t=0;t<H.length;t+=1)H[t].c();j=g(),O=p("button"),O.textContent="Search",I=g(),B=p("div"),B.innerHTML='<a href="details.html" class="mr-2">search by id</a> \n        <a href="search.html">forward search</a>',w(n,"name","format"),w(n,"type","hidden"),n.value="html",w(o,"for","reverse-lat"),w(o,"class","svelte-g03ov5"),w(s,"id","reverse-lat"),w(s,"name","lat"),w(s,"type","text"),w(s,"class","form-control form-control-sm"),w(s,"placeholder","latitude"),s.value=a=t[2].lat||"",w(u,"id","switch-coords"),w(u,"class","btn btn-outline-secondary btn-sm svelte-g03ov5"),w(u,"title","switch lat and lon"),w(x,"for","reverse-lon"),w(x,"class","svelte-g03ov5"),w(E,"id","reverse-lon"),w(E,"name","lon"),w(E,"type","text"),w(E,"class","form-control form-control-sm"),w(E,"placeholder","longitude"),E.value=L=t[2].lon||"",w(P,"for","reverse-zoom"),w(P,"class","svelte-g03ov5"),A.__value="",A.value=A.__value,A.selected=N=!t[2].zoom,w(M,"id","reverse-zoom"),w(M,"name","zoom"),w(M,"class","form-control form-control-sm"),w(O,"type","submit"),w(O,"class","btn btn-primary btn-sm mx-1"),w(e,"class","form-group"),w(B,"class","search-type-link svelte-g03ov5")},m(a,d){h(a,e,d),c(e,n),c(e,i),c(e,o),c(e,r),c(e,s),c(e,l),c(e,u),c(e,_),c(e,x),c(e,C),c(e,E),c(e,k),c(e,P),c(e,S),c(e,M),c(M,A),c(A,z);for(let t=0;t<H.length;t+=1)H[t].m(M,null);T(M,t[2].zoom),c(e,j),c(e,O),h(a,I,d),h(a,B,d),R||(Z=v(u,"click",b(y(ee))),R=!0)},p(t,e){if(4&e&&a!==(a=t[2].lat||"")&&s.value!==a&&(s.value=a),4&e&&L!==(L=t[2].lon||"")&&E.value!==L&&(E.value=L),4&e&&N!==(N=!t[2].zoom)&&(A.selected=N),4&e){let n;for($=$t(),n=0;n<$.length;n+=1){const i=qt(t,$,n);H[n]?H[n].p(i,e):(H[n]=Gt(i),H[n].c(),H[n].m(M,null))}for(;n<H.length;n+=1)H[n].d(1);H.length=$.length}4&e&&D!==(D=t[2].zoom)&&T(M,t[2].zoom)},d(t){t&&d(e),f(H,t),t&&d(I),t&&d(B),R=!1,Z()}}}function Yt(t){let e,n,i,o;const r=[Wt,Ft],s=[];function a(t,e){return t[1]?0:1}return e=a(t),n=s[e]=r[e](t),{c(){n.c(),i=_()},m(t,n){s[e].m(t,n),h(t,i,n),o=!0},p(t,[o]){let l=e;e=a(t),e===l?s[e].p(t,o):(q(),U(s[l],1,1,(()=>{s[l]=null})),F(),n=s[e],n?n.p(t,o):(n=s[e]=r[e](t),n.c()),W(n,1),n.m(i.parentNode,i))},i(t){o||(W(n),o=!0)},o(t){U(n),o=!1},d(t){s[e].d(t),t&&d(i)}}}function Xt(t){let e=document.getElementById("switch-to-reverse");if(e){let n=t.wrapLatLng(t.getCenter());e.href="reverse.html?lat="+n.lat.toFixed(5)+"&lon="+n.lng.toFixed(5)}}function Qt(t){console.log("setting",t.target),document.querySelector("input[name=bounded]").value=t.target.checked?1:""}function Jt(t){document.querySelector("input[name=dedupe]").value=t.target.checked?1:""}function te(t){document.querySelector("input[name="+t.target.dataset.apiParam+"]").value=t.target.value}function ee(){let t=document.querySelector("input[name=lat]").value,e=document.querySelector("input[name=lon]").value;document.querySelector("input[name=lat]").value=e,document.querySelector("input[name=lon]").value=t,document.querySelector("form").submit()}function ne(t,e,n){let i,{bStructuredSearch:o=!1}=e,{reverse_search:r=!1}=e,{api_request_params:s={}}=e;function l(t){let e=document.getElementById("use_viewbox");e&&e.checked?n(3,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(3,i="")}return ot.subscribe((t=>{t&&(t.on("move",(function(){l(t),Xt(t)})),t.on("load",(function(){l(t),Xt(t)})),t.on("click",(function(t){r&&(document.querySelector("input[name=lat]").value=t.latlng.lat.toFixed(5),document.querySelector("input[name=lon]").value=t.latlng.wrap().lng.toFixed(5),document.querySelector("form").submit())})))})),t.$$set=t=>{"bStructuredSearch"in t&&n(0,o=t.bStructuredSearch),"reverse_search"in t&&n(1,r=t.reverse_search),"api_request_params"in t&&n(2,s=t.api_request_params)},[o,r,s,i,function(){let t=a(ot);t&&l(t)}]}class ie extends Q{constructor(t){super(),X(this,t,ne,Yt,r,{bStructuredSearch:0,reverse_search:1,api_request_params:2})}}function oe(e){let n;return{c(){n=p("div"),n.innerHTML='<h2>Welcome to Nominatim</h2> \n\n  <p>Nominatim is a search engine for\n    <a href="https://www.openstreetmap.org">OpenStreetMap</a> data. This\n    is the debugging interface. You may search for a name or address\n    (forward search) or look up data by its geographic coordinate (reverse\n    search). Each result comes with a link to a details page where you\n    can inspect what data about the object is saved in the database and\n    investigate how the address of the object has been computed.</p>\n\n  For more information visit the\n  <a href="https://nominatim.org">Nominatim home page</a>.',w(n,"id","welcome")},m(t,e){h(t,n,e)},p:t,i:t,o:t,d(t){t&&d(n)}}}class re extends Q{constructor(t){super(),X(this,t,null,oe,r,{})}}function se(e){let n,i=e[0]&&function(e){let n,i;return{c(){n=p("img"),w(n,"class","mapicon svelte-180cawe"),n.src!==(i=e[2])&&w(n,"src",i),w(n,"alt",e[1])},m(t,e){h(t,n,e)},p:t,d(t){t&&d(n)}}}(e);return{c(){i&&i.c(),n=_()},m(t,e){i&&i.m(t,e),h(t,n,e)},p(t,[e]){t[0]&&i.p(t,e)},i:t,o:t,d(t){i&&i.d(t),t&&d(n)}}}function ae(t,e,n){let{aPlace:i}=e,o=function(t){return{"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"}[t.category+":"+t.type]}(i),r="icon for "+i.category+" "+i.type,s=yt("Images_Base_Url")+o+".p.20.png";return t.$$set=t=>{"aPlace"in t&&n(3,i=t.aPlace)},[o,r,s,i]}class le extends Q{constructor(t){super(),X(this,t,ae,se,r,{aPlace:3})}}function ue(t,e,n){const i=t.slice();return i[5]=e[n],i[7]=n,i}function ce(e){let n,i;return n=new re({}),{c(){V(n.$$.fragment)},m(t,e){G(n,t,e),i=!0},p:t,i(t){i||(W(n.$$.fragment,t),i=!0)},o(t){U(n.$$.fragment,t),i=!1},d(t){K(n,t)}}}function he(e){let n;function i(t,e){return t[0]?pe:fe}let o=i(e),r=o(e);return{c(){r.c(),n=_()},m(t,e){r.m(t,e),h(t,n,e)},p(t,e){o!==(o=i(t))&&(r.d(1),r=o(t),r&&(r.c(),r.m(n.parentNode,n)))},i:t,o:t,d(t){r.d(t),t&&d(n)}}}function de(t){let e,n,i,o=t[1],r=[];for(let e=0;e<o.length;e+=1)r[e]=me(ue(t,o,e));const s=t=>U(r[t],1,1,(()=>{r[t]=null}));let a=t[3]&&!t[0]&&ge(t);return{c(){e=p("div");for(let t=0;t<r.length;t+=1)r[t].c();n=g(),a&&a.c(),w(e,"id","searchresults")},m(t,o){h(t,e,o);for(let t=0;t<r.length;t+=1)r[t].m(e,null);c(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 s=ue(t,o,a);r[a]?(r[a].p(s,i),W(r[a],1)):(r[a]=me(s),r[a].c(),W(r[a],1),r[a].m(e,n))}for(q(),a=o.length;a<r.length;a+=1)s(a);F()}t[3]&&!t[0]?a?a.p(t,i):(a=ge(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)W(r[t]);i=!0}},o(t){r=r.filter(Boolean);for(let t=0;t<r.length;t+=1)U(r[t]);i=!1},d(t){t&&d(e),f(r,t),a&&a.d()}}}function fe(t){let e;return{c(){e=p("div"),e.textContent="No search results found",w(e,"class","noresults svelte-d36c6n")},m(t,n){h(t,e,n)},d(t){t&&d(e)}}}function pe(t){let e;return{c(){e=p("div"),e.textContent="Search for coordinates or click anywhere on the map.",w(e,"id","intro"),w(e,"class","sidebar")},m(t,n){h(t,e,n)},d(t){t&&d(e)}}}function me(t){let e,n,i,o,r,s,a,l,u,f,_,y,T,E,L,k,P,S,M,A,z,N=t[5].display_name+"",D=At(t[5])+"",j=t[5].lat+"",O=t[5].lon+"";return i=new le({props:{aPlace:t[5]}}),{c(){var c,h,d;e=p("div"),n=p("div"),V(i.$$.fragment),o=g(),r=p("span"),s=m(N),a=g(),l=p("span"),u=m(D),f=g(),_=p("p"),y=m(j),T=m(","),E=m(O),L=g(),k=p("a"),P=m("details"),c="float",h="right",n.style.setProperty(c,h,d?"important":""),w(r,"class","name"),w(l,"class","type svelte-d36c6n"),w(_,"class","coords svelte-d36c6n"),w(k,"class","details btn btn-outline-secondary btn-sm svelte-d36c6n"),w(k,"href",S=zt(t[5])),w(e,"class","result svelte-d36c6n"),w(e,"data-position",t[7]),C(e,"highlight",t[7]===t[2])},m(d,p){h(d,e,p),c(e,n),G(i,n,null),c(e,o),c(e,r),c(r,s),c(e,a),c(e,l),c(l,u),c(e,f),c(e,_),c(_,y),c(_,T),c(_,E),c(e,L),c(e,k),c(k,P),M=!0,A||(z=v(e,"click",b(t[4])),A=!0)},p(t,n){const o={};2&n&&(o.aPlace=t[5]),i.$set(o),(!M||2&n)&&N!==(N=t[5].display_name+"")&&x(s,N),(!M||2&n)&&D!==(D=At(t[5])+"")&&x(u,D),(!M||2&n)&&j!==(j=t[5].lat+"")&&x(y,j),(!M||2&n)&&O!==(O=t[5].lon+"")&&x(E,O),(!M||2&n&&S!==(S=zt(t[5])))&&w(k,"href",S),4&n&&C(e,"highlight",t[7]===t[2])},i(t){M||(W(i.$$.fragment,t),M=!0)},o(t){U(i.$$.fragment,t),M=!1},d(t){t&&d(e),K(i),A=!1,z()}}}function ge(t){let e,n,i;return{c(){e=p("div"),n=p("a"),i=m("Search for more results"),w(n,"class","btn btn-primary"),w(n,"href",t[3]),w(e,"class","more svelte-d36c6n")},m(t,o){h(t,e,o),c(e,n),c(n,i)},p(t,e){8&e&&w(n,"href",t[3])},d(t){t&&d(e)}}}function _e(t){let e,n,i,o;const r=[de,he,ce],s=[];function a(t,e){return t[1]&&t[1].length>0?0:t[1]?1:2}return e=a(t),n=s[e]=r[e](t),{c(){n.c(),i=_()},m(t,n){s[e].m(t,n),h(t,i,n),o=!0},p(t,[o]){let l=e;e=a(t),e===l?s[e].p(t,o):(q(),U(s[l],1,1,(()=>{s[l]=null})),F(),n=s[e],n?n.p(t,o):(n=s[e]=r[e](t),n.c()),W(n,1),n.m(i.parentNode,i))},i(t){o||(W(n),o=!0)},o(t){U(n),o=!1},d(t){s[e].d(t),t&&d(i)}}}function ve(t,e,n){let i,o,r,{reverse_search:s=!1}=e;return rt.subscribe((t=>{if(!t)return;n(1,i=t),n(2,o=0),st.set(i[0]);let e=new URLSearchParams(window.location.search),s=t;var a=[];e.has("exclude_place_ids")&&(a=e.get("exclude_place_ids").split(","));for(var l=0;l<s.length;l+=1)a.push(s[l].place_id);var u=new URLSearchParams(window.location.search);u.set("exclude_place_ids",a.join(",")),n(3,r="?"+u.toString())})),t.$$set=t=>{"reverse_search"in t&&n(0,s=t.reverse_search)},[s,i,o,r,function(t){let e=t.target;e.className.match("result")||(e=e.parentElement);let r=Number(e.dataset.position);st.set(i[r]),n(2,o=r)}]}class ye extends Q{constructor(t){super(),X(this,t,ve,_e,r,{reverse_search:0})}}
+     */var kt=/["'&<>]/,Pt=function(t){var e,n=""+t,i=kt.exec(n);if(!i)return n;var o="",r=0,s=0;for(r=i.index;r<n.length;r++){switch(n.charCodeAt(r)){case 34:e="&quot;";break;case 38:e="&amp;";break;case 39:e="&#39;";break;case 60:e="&lt;";break;case 62:e="&gt;";break;default:continue}s!==r&&(o+=n.substring(s,r)),s=r+1,o+=e}return s!==r?o+n.substring(s,r):o};var St=Ht,Mt=function(t){if(!t.osm_type)return"";var e=Ht(t.osm_type,!1);return e?'<a href="https://www.openstreetmap.org/'+e+"/"+t.osm_id+'">'+e+" "+t.osm_id+"</a>":""},At=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""},zt=function(t){if(!t)return"";var e=t.osm_type;e&&1!==e.length&&(n=t.osm_type,e="node"===n?"N":"way"===n?"W":"relation"===n?"R":"");var n;if(!e)return"";var i="details.html?osmtype="+e+"&osmid="+t.osm_id;t.class?i=i+"&class="+encodeURIComponent(t.class):t.category&&(i=i+"&class="+encodeURIComponent(t.category));return i},Nt=function(t){if(!t.calculated_wikipedia)return"";var e=t.calculated_wikipedia.split(":",2),n=Pt(t.calculated_wikipedia),i=Pt(e[0]),o=Pt(e[1]);return'<a href="https://'+i+".wikipedia.org/wiki/"+o+'" target="_blank">'+n+"</a>"},Dt=function(t){return t.isarea?"Polygon":"Point"},jt=function(t){return"boundary"===t.category&&"administrative"===t.type},Ot=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"},It=function(t){var e=t.class+":"+t.type;t.type&&"administrative"===t.type&&t.place_type&&(e=e+" ("+t.place_type+")");return Pt(e)},Bt=function(t){return t<15?t:""},Rt=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>"},Zt=function(t){return(" "===t[0]?"*":"")+Pt(t)},$t=function(){return["Continent / Sea","","","Country","","State","Region","","County","","City","","Town / Village","","Suburb","","Street","","Building","","",""]};function Ht(t,e){return"N"===t?"node":"W"===t?"way":"R"===t?"relation":e&&("T"===t||"I"===t)?"way":""}function qt(t,e,n){const i=t.slice();return i[6]=e[n],i[8]=n,i}function Ft(t){let e,n,o,r,s,a,l,u,f,m,_,y,b,x,T,E,L,k,P,S,M,A,z,N,D,j,O,I,B,R,Z,$,H,q,F,Y,X,Q,J,tt,et,nt,it,ot,rt,st,at,lt,ut,ct,ht,dt,ft,pt,mt,gt,_t,vt,yt,bt,wt,xt,Tt,Ct,Et,kt,Pt,St;return b=new Lt({props:{$$slots:{default:[Ut]},$$scope:{ctx:t}}}),E=new Lt({props:{$$slots:{default:[Vt]},$$scope:{ctx:t}}}),{c(){e=p("div"),n=p("ul"),o=p("li"),r=p("a"),r.textContent="simple",s=g(),a=p("li"),l=p("a"),l.textContent="structured",u=g(),f=p("div"),f.innerHTML='<a href="details.html" class="mr-2">search by id</a> \n        <a id="switch-to-reverse" href="reverse.html">reverse search</a>',m=g(),_=p("div"),y=p("div"),V(b.$$.fragment),x=g(),T=p("div"),V(E.$$.fragment),L=g(),k=p("a"),k.textContent="Advanced options",P=g(),S=p("div"),M=p("div"),A=p("div"),z=p("span"),N=p("input"),j=g(),O=p("label"),O.textContent="apply viewbox",I=g(),B=p("span"),R=p("input"),$=g(),H=p("label"),H.textContent="bounded to viewbox",q=g(),F=p("span"),Y=p("input"),Q=g(),J=p("label"),J.textContent="deduplicate results",tt=g(),et=p("div"),nt=p("span"),it=p("label"),it.textContent="Maximum number of results:",ot=g(),rt=p("input"),at=g(),lt=p("span"),ut=p("label"),ut.textContent="Polygon simplification:",ct=g(),ht=p("input"),ft=g(),pt=p("div"),mt=p("span"),gt=p("label"),gt.textContent="Languages:",_t=g(),vt=p("input"),bt=g(),wt=p("span"),xt=p("label"),xt.textContent="Countries:",Tt=g(),Ct=p("input"),w(r,"class","nav-link"),w(r,"data-toggle","tab"),w(r,"href","#simple"),C(r,"active",!t[0]),w(o,"class","nav-item"),w(l,"class","nav-link"),w(l,"data-toggle","tab"),w(l,"href","#structured"),C(l,"active",t[0]),w(a,"class","nav-item"),w(f,"class","search-type-link svelte-g03ov5"),w(n,"class","nav nav-tabs"),w(y,"class","tab-pane"),w(y,"id","simple"),w(y,"role","tabpanel"),C(y,"active",!t[0]),w(T,"class","tab-pane"),w(T,"id","structured"),w(T,"role","tabpanel"),C(T,"active",t[0]),w(k,"href","#advanced"),w(k,"class","btn btn-outline-secondary btn-sm"),w(k,"data-toggle","collapse"),w(k,"data-target","#searchAdvancedOptions"),w(k,"role","button"),w(k,"aria-expanded","false"),w(k,"aria-controls","collapseAdvancedOptions"),w(N,"type","checkbox"),w(N,"class","form-check-input api-param-setting"),w(N,"id","use_viewbox"),N.checked=D=t[2].viewbox,w(O,"class","form-check-label svelte-g03ov5"),w(O,"for","use_viewbox"),w(z,"class","svelte-g03ov5"),w(R,"type","checkbox"),w(R,"class","form-check-input api-param-setting"),w(R,"id","option_bounded"),R.checked=Z=!!t[2].bounded,w(H,"class","form-check-label svelte-g03ov5"),w(H,"for","option_bounded"),w(B,"class","svelte-g03ov5"),w(Y,"type","checkbox"),w(Y,"class","form-check-input api-param-setting"),w(Y,"id","option_dedupe"),Y.checked=X=!!t[2].dedupe,w(J,"class","form-check-label svelte-g03ov5"),w(J,"for","option_dedupe"),w(F,"class","svelte-g03ov5"),w(A,"class","form-check form-check-inline"),w(it,"class","form-check-label svelte-g03ov5"),w(it,"for","option_limit"),w(rt,"type","number"),w(rt,"class","form-check-input api-param-setting"),w(rt,"data-api-param","limit"),w(rt,"id","option_limit"),w(rt,"size","5"),w(rt,"min","1"),w(rt,"max","50"),rt.value=st=t[2].limit||"",w(nt,"class","svelte-g03ov5"),w(ut,"class","form-check-label svelte-g03ov5"),w(ut,"for","option_polygon_threashold"),w(ht,"type","number"),w(ht,"class","form-check-input api-param-setting"),w(ht,"data-api-param","polygon_threshold"),w(ht,"id","option_polygon_threshold"),w(ht,"size","5"),w(ht,"min","0.0"),w(ht,"step","0.01"),ht.value=dt=t[2].polygon_threshold||"",w(lt,"class","svelte-g03ov5"),w(et,"class","form-check form-check-inline"),w(gt,"class","form-check-label svelte-g03ov5"),w(gt,"for","accept_lang"),w(vt,"type","text"),w(vt,"placeholder","e.g. en,zh-Hant"),w(vt,"class","form-check-input api-param-setting"),w(vt,"data-api-param","accept-language"),w(vt,"id","accept_lang"),w(vt,"size","15"),vt.value=yt=t[2]["accept-language"]||"",w(mt,"class","svelte-g03ov5"),w(xt,"class","form-check-label svelte-g03ov5"),w(xt,"for","option_ccode"),w(Ct,"type","text"),w(Ct,"placeholder","e.g. de,gb"),w(Ct,"class","form-check-input api-param-setting"),w(Ct,"data-api-param","countrycodes"),w(Ct,"id","option_ccode"),w(Ct,"size","15"),Ct.value=Et=t[2].countrycodes||"",w(wt,"class","svelte-g03ov5"),w(pt,"class","form-check form-check-inline"),w(M,"id","searchAdvancedOptionsContent"),w(M,"class","svelte-g03ov5"),w(S,"class","collapse"),w(S,"id","searchAdvancedOptions"),w(_,"class","tab-content p-2 svelte-g03ov5"),w(e,"class","top-bar svelte-g03ov5")},m(i,d){h(i,e,d),c(e,n),c(n,o),c(o,r),c(n,s),c(n,a),c(a,l),c(n,u),c(n,f),c(e,m),c(e,_),c(_,y),G(b,y,null),c(_,x),c(_,T),G(E,T,null),c(_,L),c(_,k),c(_,P),c(_,S),c(S,M),c(M,A),c(A,z),c(z,N),c(z,j),c(z,O),c(A,I),c(A,B),c(B,R),c(B,$),c(B,H),c(A,q),c(A,F),c(F,Y),c(F,Q),c(F,J),c(M,tt),c(M,et),c(et,nt),c(nt,it),c(nt,ot),c(nt,rt),c(et,at),c(et,lt),c(lt,ut),c(lt,ct),c(lt,ht),c(M,ft),c(M,pt),c(pt,mt),c(mt,gt),c(mt,_t),c(mt,vt),c(pt,bt),c(pt,wt),c(wt,xt),c(wt,Tt),c(wt,Ct),kt=!0,Pt||(St=[v(N,"change",t[4]),v(R,"change",Qt),v(Y,"change",Jt),v(rt,"change",te),v(ht,"change",te),v(vt,"change",te),v(Ct,"change",te)],Pt=!0)},p(t,e){1&e&&C(r,"active",!t[0]),1&e&&C(l,"active",t[0]);const n={};524&e&&(n.$$scope={dirty:e,ctx:t}),b.$set(n),1&e&&C(y,"active",!t[0]);const i={};524&e&&(i.$$scope={dirty:e,ctx:t}),E.$set(i),1&e&&C(T,"active",t[0]),(!kt||4&e&&D!==(D=t[2].viewbox))&&(N.checked=D),(!kt||4&e&&Z!==(Z=!!t[2].bounded))&&(R.checked=Z),(!kt||4&e&&X!==(X=!!t[2].dedupe))&&(Y.checked=X),(!kt||4&e&&st!==(st=t[2].limit||""))&&(rt.value=st),(!kt||4&e&&dt!==(dt=t[2].polygon_threshold||""))&&(ht.value=dt),(!kt||4&e&&yt!==(yt=t[2]["accept-language"]||"")&&vt.value!==yt)&&(vt.value=yt),(!kt||4&e&&Et!==(Et=t[2].countrycodes||"")&&Ct.value!==Et)&&(Ct.value=Et)},i(t){kt||(W(b.$$.fragment,t),W(E.$$.fragment,t),kt=!0)},o(t){U(b.$$.fragment,t),U(E.$$.fragment,t),kt=!1},d(t){t&&d(e),K(b),K(E),Pt=!1,i(St)}}}function Wt(t){let e,n,i;return n=new Lt({props:{$$slots:{default:[Kt]},$$scope:{ctx:t}}}),{c(){e=p("div"),V(n.$$.fragment),w(e,"class","top-bar svelte-g03ov5")},m(t,o){h(t,e,o),G(n,e,null),i=!0},p(t,e){const i={};516&e&&(i.$$scope={dirty:e,ctx:t}),n.$set(i)},i(t){i||(W(n.$$.fragment,t),i=!0)},o(t){U(n.$$.fragment,t),i=!1},d(t){t&&d(e),K(n)}}}function Ut(t){let e,n,i,o,r,s,a,l,u,f,m,_,v,y,b,x,T,C,E,L,k,P,S,M,A,z;return{c(){e=p("input"),i=g(),o=p("div"),r=p("button"),r.textContent="Search",s=g(),a=p("input"),u=g(),f=p("input"),_=g(),v=p("input"),b=g(),x=p("input"),C=g(),E=p("input"),k=g(),P=p("input"),M=g(),A=p("input"),w(e,"id","q"),w(e,"name","q"),w(e,"type","text"),w(e,"class","form-control form-control-sm svelte-g03ov5"),w(e,"placeholder","Search"),e.value=n=t[2].q||"",w(r,"type","submit"),w(r,"class","btn btn-primary btn-sm mx-1"),w(a,"type","hidden"),w(a,"name","viewbox"),a.value=l=t[3]||"",w(f,"type","hidden"),w(f,"name","dedupe"),f.value=m=t[2].dedupe?1:"",w(v,"type","hidden"),w(v,"name","bounded"),v.value=y=t[2].bounded?1:"",w(x,"type","hidden"),w(x,"name","accept-language"),x.value=T=t[2]["accept-language"]||"",w(E,"type","hidden"),w(E,"name","countrycodes"),E.value=L=t[2].countrycodes||"",w(P,"type","hidden"),w(P,"name","limit"),P.value=S=t[2].limit||"",w(A,"type","hidden"),w(A,"name","polygon_threshold"),A.value=z=t[2].polygon_threshold||"",w(o,"class","form-group search-button-group svelte-g03ov5")},m(t,n){h(t,e,n),h(t,i,n),h(t,o,n),c(o,r),c(o,s),c(o,a),c(o,u),c(o,f),c(o,_),c(o,v),c(o,b),c(o,x),c(o,C),c(o,E),c(o,k),c(o,P),c(o,M),c(o,A)},p(t,i){4&i&&n!==(n=t[2].q||"")&&e.value!==n&&(e.value=n),8&i&&l!==(l=t[3]||"")&&(a.value=l),4&i&&m!==(m=t[2].dedupe?1:"")&&(f.value=m),4&i&&y!==(y=t[2].bounded?1:"")&&(v.value=y),4&i&&T!==(T=t[2]["accept-language"]||"")&&(x.value=T),4&i&&L!==(L=t[2].countrycodes||"")&&(E.value=L),4&i&&S!==(S=t[2].limit||"")&&(P.value=S),4&i&&z!==(z=t[2].polygon_threshold||"")&&(A.value=z)},d(t){t&&d(e),t&&d(i),t&&d(o)}}}function Vt(t){let e,n,i,o,r,s,a,l,u,f,m,_,v,y,b,x,T,C,E,L,k,P,S,M,A,z,N,D,j,O,I,B,R,Z,$,H,q,F,W,U,V;return{c(){e=p("input"),i=g(),o=p("input"),s=g(),a=p("input"),u=g(),f=p("input"),_=g(),v=p("input"),b=g(),x=p("input"),C=g(),E=p("div"),L=p("button"),L.textContent="Search",k=g(),P=p("input"),M=g(),A=p("input"),N=g(),D=p("input"),O=g(),I=p("input"),R=g(),Z=p("input"),H=g(),q=p("input"),W=g(),U=p("input"),w(e,"name","street"),w(e,"type","text"),w(e,"class","form-control form-control-sm mr-1"),w(e,"placeholder","House number/Street"),e.value=n=t[2].street||"",w(o,"name","city"),w(o,"type","text"),w(o,"class","form-control form-control-sm mr-1"),w(o,"placeholder","City"),o.value=r=t[2].city||"",w(a,"id","county"),w(a,"name","county"),w(a,"type","text"),w(a,"class","form-control form-control-sm mr-1"),w(a,"placeholder","County"),a.value=l=t[2].county||"",w(f,"name","state"),w(f,"type","text"),w(f,"class","form-control form-control-sm mr-1"),w(f,"placeholder","State"),f.value=m=t[2].state||"",w(v,"name","country"),w(v,"type","text"),w(v,"class","form-control form-control-sm mr-1"),w(v,"placeholder","Country"),v.value=y=t[2].country||"",w(x,"name","postalcode"),w(x,"type","text"),w(x,"class","form-control form-control-sm mr-1"),w(x,"placeholder","Postal Code"),x.value=T=t[2].postalcode||"",w(L,"type","submit"),w(L,"class","btn btn-primary btn-sm mx-1"),w(P,"type","hidden"),w(P,"name","viewbox"),P.value=S=t[3]||"",w(A,"type","hidden"),w(A,"name","dedupe"),A.value=z=t[2].dedupe?1:"",w(D,"type","hidden"),w(D,"name","bounded"),D.value=j=t[2].bounded?1:"",w(I,"type","hidden"),w(I,"name","accept-language"),I.value=B=t[2]["accept-language"]||"",w(Z,"type","hidden"),w(Z,"name","countrycodes"),Z.value=$=t[2].countrycodes||"",w(q,"type","hidden"),w(q,"name","limit"),q.value=F=t[2].limit||"",w(U,"type","hidden"),w(U,"name","polygon_threshold"),U.value=V=t[2].polygon_threshold||"",w(E,"class","form-group search-button-group svelte-g03ov5")},m(t,n){h(t,e,n),h(t,i,n),h(t,o,n),h(t,s,n),h(t,a,n),h(t,u,n),h(t,f,n),h(t,_,n),h(t,v,n),h(t,b,n),h(t,x,n),h(t,C,n),h(t,E,n),c(E,L),c(E,k),c(E,P),c(E,M),c(E,A),c(E,N),c(E,D),c(E,O),c(E,I),c(E,R),c(E,Z),c(E,H),c(E,q),c(E,W),c(E,U)},p(t,i){4&i&&n!==(n=t[2].street||"")&&e.value!==n&&(e.value=n),4&i&&r!==(r=t[2].city||"")&&o.value!==r&&(o.value=r),4&i&&l!==(l=t[2].county||"")&&a.value!==l&&(a.value=l),4&i&&m!==(m=t[2].state||"")&&f.value!==m&&(f.value=m),4&i&&y!==(y=t[2].country||"")&&v.value!==y&&(v.value=y),4&i&&T!==(T=t[2].postalcode||"")&&x.value!==T&&(x.value=T),8&i&&S!==(S=t[3]||"")&&(P.value=S),4&i&&z!==(z=t[2].dedupe?1:"")&&(A.value=z),4&i&&j!==(j=t[2].bounded?1:"")&&(D.value=j),4&i&&B!==(B=t[2]["accept-language"]||"")&&(I.value=B),4&i&&$!==($=t[2].countrycodes||"")&&(Z.value=$),4&i&&F!==(F=t[2].limit||"")&&(q.value=F),4&i&&V!==(V=t[2].polygon_threshold||"")&&(U.value=V)},d(t){t&&d(e),t&&d(i),t&&d(o),t&&d(s),t&&d(a),t&&d(u),t&&d(f),t&&d(_),t&&d(v),t&&d(b),t&&d(x),t&&d(C),t&&d(E)}}}function Gt(t){let e,n,i,o,r,s=t[6]+"";return{c(){e=p("option"),n=m(t[8]),i=m(" - "),o=m(s),e.__value=t[8],e.value=e.__value,e.selected=r=t[8]===t[2].zoom},m(t,r){h(t,e,r),c(e,n),c(e,i),c(e,o)},p(t,n){4&n&&r!==(r=t[8]===t[2].zoom)&&(e.selected=r)},d(t){t&&d(e)}}}function Kt(t){let e,n,i,o,r,s,a,l,u,_,x,C,E,L,k,P,S,M,A,z,N,D,j,O,I,B,R,Z,$=$t(),H=[];for(let e=0;e<$.length;e+=1)H[e]=Gt(qt(t,$,e));return{c(){e=p("div"),n=p("input"),i=g(),o=p("label"),o.textContent="lat",r=g(),s=p("input"),l=g(),u=p("a"),u.textContent="<>",_=g(),x=p("label"),x.textContent="lon",C=g(),E=p("input"),k=g(),P=p("label"),P.textContent="max zoom",S=g(),M=p("select"),A=p("option"),z=m("---");for(let t=0;t<H.length;t+=1)H[t].c();j=g(),O=p("button"),O.textContent="Search",I=g(),B=p("div"),B.innerHTML='<a href="details.html" class="mr-2">search by id</a> \n        <a href="search.html">forward search</a>',w(n,"name","format"),w(n,"type","hidden"),n.value="html",w(o,"for","reverse-lat"),w(o,"class","svelte-g03ov5"),w(s,"id","reverse-lat"),w(s,"name","lat"),w(s,"type","text"),w(s,"class","form-control form-control-sm"),w(s,"placeholder","latitude"),s.value=a=t[2].lat||"",w(u,"id","switch-coords"),w(u,"class","btn btn-outline-secondary btn-sm svelte-g03ov5"),w(u,"title","switch lat and lon"),w(x,"for","reverse-lon"),w(x,"class","svelte-g03ov5"),w(E,"id","reverse-lon"),w(E,"name","lon"),w(E,"type","text"),w(E,"class","form-control form-control-sm"),w(E,"placeholder","longitude"),E.value=L=t[2].lon||"",w(P,"for","reverse-zoom"),w(P,"class","svelte-g03ov5"),A.__value="",A.value=A.__value,A.selected=N=!t[2].zoom,w(M,"id","reverse-zoom"),w(M,"name","zoom"),w(M,"class","form-control form-control-sm"),w(O,"type","submit"),w(O,"class","btn btn-primary btn-sm mx-1"),w(e,"class","form-group"),w(B,"class","search-type-link svelte-g03ov5")},m(a,d){h(a,e,d),c(e,n),c(e,i),c(e,o),c(e,r),c(e,s),c(e,l),c(e,u),c(e,_),c(e,x),c(e,C),c(e,E),c(e,k),c(e,P),c(e,S),c(e,M),c(M,A),c(A,z);for(let t=0;t<H.length;t+=1)H[t].m(M,null);T(M,t[2].zoom),c(e,j),c(e,O),h(a,I,d),h(a,B,d),R||(Z=v(u,"click",b(y(ee))),R=!0)},p(t,e){if(4&e&&a!==(a=t[2].lat||"")&&s.value!==a&&(s.value=a),4&e&&L!==(L=t[2].lon||"")&&E.value!==L&&(E.value=L),4&e&&N!==(N=!t[2].zoom)&&(A.selected=N),4&e){let n;for($=$t(),n=0;n<$.length;n+=1){const i=qt(t,$,n);H[n]?H[n].p(i,e):(H[n]=Gt(i),H[n].c(),H[n].m(M,null))}for(;n<H.length;n+=1)H[n].d(1);H.length=$.length}4&e&&D!==(D=t[2].zoom)&&T(M,t[2].zoom)},d(t){t&&d(e),f(H,t),t&&d(I),t&&d(B),R=!1,Z()}}}function Yt(t){let e,n,i,o;const r=[Wt,Ft],s=[];function a(t,e){return t[1]?0:1}return e=a(t),n=s[e]=r[e](t),{c(){n.c(),i=_()},m(t,n){s[e].m(t,n),h(t,i,n),o=!0},p(t,[o]){let l=e;e=a(t),e===l?s[e].p(t,o):(q(),U(s[l],1,1,(()=>{s[l]=null})),F(),n=s[e],n?n.p(t,o):(n=s[e]=r[e](t),n.c()),W(n,1),n.m(i.parentNode,i))},i(t){o||(W(n),o=!0)},o(t){U(n),o=!1},d(t){s[e].d(t),t&&d(i)}}}function Xt(t){let e=document.getElementById("switch-to-reverse");if(e){let n=t.wrapLatLng(t.getCenter());e.href="reverse.html?lat="+n.lat.toFixed(5)+"&lon="+n.lng.toFixed(5)}}function Qt(t){console.log("setting",t.target),document.querySelector("input[name=bounded]").value=t.target.checked?1:""}function Jt(t){document.querySelector("input[name=dedupe]").value=t.target.checked?1:""}function te(t){document.querySelector("input[name="+t.target.dataset.apiParam+"]").value=t.target.value}function ee(){let t=document.querySelector("input[name=lat]").value,e=document.querySelector("input[name=lon]").value;document.querySelector("input[name=lat]").value=e,document.querySelector("input[name=lon]").value=t,document.querySelector("form").submit()}function ne(t,e,n){let i,{bStructuredSearch:o=!1}=e,{reverse_search:r=!1}=e,{api_request_params:s={}}=e;function l(t){let e=document.getElementById("use_viewbox");e&&e.checked?n(3,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(3,i="")}return ot.subscribe((t=>{t&&(t.on("move",(function(){l(t),Xt(t)})),t.on("load",(function(){l(t),Xt(t)})),t.on("click",(function(t){r&&(document.querySelector("input[name=lat]").value=t.latlng.lat.toFixed(5),document.querySelector("input[name=lon]").value=t.latlng.wrap().lng.toFixed(5),document.querySelector("form").submit())})))})),t.$$set=t=>{"bStructuredSearch"in t&&n(0,o=t.bStructuredSearch),"reverse_search"in t&&n(1,r=t.reverse_search),"api_request_params"in t&&n(2,s=t.api_request_params)},[o,r,s,i,function(){let t=a(ot);t&&l(t)}]}class ie extends Q{constructor(t){super(),X(this,t,ne,Yt,r,{bStructuredSearch:0,reverse_search:1,api_request_params:2})}}function oe(e){let n;return{c(){n=p("div"),n.innerHTML='<h2>Welcome to Nominatim</h2> \n\n  <p>Nominatim is a search engine for\n    <a href="https://www.openstreetmap.org">OpenStreetMap</a> data. This\n    is the debugging interface. You may search for a name or address\n    (forward search) or look up data by its geographic coordinate (reverse\n    search). Each result comes with a link to a details page where you\n    can inspect what data about the object is saved in the database and\n    investigate how the address of the object has been computed.</p>\n\n  For more information visit the\n  <a href="https://nominatim.org">Nominatim home page</a>.',w(n,"id","welcome")},m(t,e){h(t,n,e)},p:t,i:t,o:t,d(t){t&&d(n)}}}class re extends Q{constructor(t){super(),X(this,t,null,oe,r,{})}}function se(e){let n,i=e[0]&&function(e){let n,i;return{c(){n=p("img"),w(n,"class","mapicon svelte-180cawe"),n.src!==(i=e[2])&&w(n,"src",i),w(n,"alt",e[1])},m(t,e){h(t,n,e)},p:t,d(t){t&&d(n)}}}(e);return{c(){i&&i.c(),n=_()},m(t,e){i&&i.m(t,e),h(t,n,e)},p(t,[e]){t[0]&&i.p(t,e)},i:t,o:t,d(t){i&&i.d(t),t&&d(n)}}}function ae(t,e,n){let{aPlace:i}=e,o=(r=i.category,s=i.type,{"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"}[r+":"+s]);var r,s;let a="icon for "+i.category+" "+i.type,l=yt("Images_Base_Url")+o+".p.20.png";return t.$$set=t=>{"aPlace"in t&&n(3,i=t.aPlace)},[o,a,l,i]}class le extends Q{constructor(t){super(),X(this,t,ae,se,r,{aPlace:3})}}function ue(t,e,n){const i=t.slice();return i[5]=e[n],i[7]=n,i}function ce(e){let n,i;return n=new re({}),{c(){V(n.$$.fragment)},m(t,e){G(n,t,e),i=!0},p:t,i(t){i||(W(n.$$.fragment,t),i=!0)},o(t){U(n.$$.fragment,t),i=!1},d(t){K(n,t)}}}function he(e){let n;function i(t,e){return t[0]?pe:fe}let o=i(e),r=o(e);return{c(){r.c(),n=_()},m(t,e){r.m(t,e),h(t,n,e)},p(t,e){o!==(o=i(t))&&(r.d(1),r=o(t),r&&(r.c(),r.m(n.parentNode,n)))},i:t,o:t,d(t){r.d(t),t&&d(n)}}}function de(t){let e,n,i,o=t[1],r=[];for(let e=0;e<o.length;e+=1)r[e]=me(ue(t,o,e));const s=t=>U(r[t],1,1,(()=>{r[t]=null}));let a=t[3]&&!t[0]&&ge(t);return{c(){e=p("div");for(let t=0;t<r.length;t+=1)r[t].c();n=g(),a&&a.c(),w(e,"id","searchresults")},m(t,o){h(t,e,o);for(let t=0;t<r.length;t+=1)r[t].m(e,null);c(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 s=ue(t,o,a);r[a]?(r[a].p(s,i),W(r[a],1)):(r[a]=me(s),r[a].c(),W(r[a],1),r[a].m(e,n))}for(q(),a=o.length;a<r.length;a+=1)s(a);F()}t[3]&&!t[0]?a?a.p(t,i):(a=ge(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)W(r[t]);i=!0}},o(t){r=r.filter(Boolean);for(let t=0;t<r.length;t+=1)U(r[t]);i=!1},d(t){t&&d(e),f(r,t),a&&a.d()}}}function fe(t){let e;return{c(){e=p("div"),e.textContent="No search results found",w(e,"class","noresults svelte-d36c6n")},m(t,n){h(t,e,n)},d(t){t&&d(e)}}}function pe(t){let e;return{c(){e=p("div"),e.textContent="Search for coordinates or click anywhere on the map.",w(e,"id","intro"),w(e,"class","sidebar")},m(t,n){h(t,e,n)},d(t){t&&d(e)}}}function me(t){let e,n,i,o,r,s,a,l,u,f,_,y,T,E,L,k,P,S,M,A,z,N=t[5].display_name+"",D=At(t[5])+"",j=t[5].lat+"",O=t[5].lon+"";return i=new le({props:{aPlace:t[5]}}),{c(){var c,h,d;e=p("div"),n=p("div"),V(i.$$.fragment),o=g(),r=p("span"),s=m(N),a=g(),l=p("span"),u=m(D),f=g(),_=p("p"),y=m(j),T=m(","),E=m(O),L=g(),k=p("a"),P=m("details"),c="float",h="right",n.style.setProperty(c,h,d?"important":""),w(r,"class","name"),w(l,"class","type svelte-d36c6n"),w(_,"class","coords svelte-d36c6n"),w(k,"class","details btn btn-outline-secondary btn-sm svelte-d36c6n"),w(k,"href",S=zt(t[5])),w(e,"class","result svelte-d36c6n"),w(e,"data-position",t[7]),C(e,"highlight",t[7]===t[2])},m(d,p){h(d,e,p),c(e,n),G(i,n,null),c(e,o),c(e,r),c(r,s),c(e,a),c(e,l),c(l,u),c(e,f),c(e,_),c(_,y),c(_,T),c(_,E),c(e,L),c(e,k),c(k,P),M=!0,A||(z=v(e,"click",b(t[4])),A=!0)},p(t,n){const o={};2&n&&(o.aPlace=t[5]),i.$set(o),(!M||2&n)&&N!==(N=t[5].display_name+"")&&x(s,N),(!M||2&n)&&D!==(D=At(t[5])+"")&&x(u,D),(!M||2&n)&&j!==(j=t[5].lat+"")&&x(y,j),(!M||2&n)&&O!==(O=t[5].lon+"")&&x(E,O),(!M||2&n&&S!==(S=zt(t[5])))&&w(k,"href",S),4&n&&C(e,"highlight",t[7]===t[2])},i(t){M||(W(i.$$.fragment,t),M=!0)},o(t){U(i.$$.fragment,t),M=!1},d(t){t&&d(e),K(i),A=!1,z()}}}function ge(t){let e,n,i;return{c(){e=p("div"),n=p("a"),i=m("Search for more results"),w(n,"class","btn btn-primary"),w(n,"href",t[3]),w(e,"class","more svelte-d36c6n")},m(t,o){h(t,e,o),c(e,n),c(n,i)},p(t,e){8&e&&w(n,"href",t[3])},d(t){t&&d(e)}}}function _e(t){let e,n,i,o;const r=[de,he,ce],s=[];function a(t,e){return t[1]&&t[1].length>0?0:t[1]?1:2}return e=a(t),n=s[e]=r[e](t),{c(){n.c(),i=_()},m(t,n){s[e].m(t,n),h(t,i,n),o=!0},p(t,[o]){let l=e;e=a(t),e===l?s[e].p(t,o):(q(),U(s[l],1,1,(()=>{s[l]=null})),F(),n=s[e],n?n.p(t,o):(n=s[e]=r[e](t),n.c()),W(n,1),n.m(i.parentNode,i))},i(t){o||(W(n),o=!0)},o(t){U(n),o=!1},d(t){s[e].d(t),t&&d(i)}}}function ve(t,e,n){let i,o,r,{reverse_search:s=!1}=e;return rt.subscribe((t=>{if(!t)return;n(1,i=t),n(2,o=0),st.set(i[0]);let e=new URLSearchParams(window.location.search),s=t;var a=[];e.has("exclude_place_ids")&&(a=e.get("exclude_place_ids").split(","));for(var l=0;l<s.length;l+=1)a.push(s[l].place_id);var u=new URLSearchParams(window.location.search);u.set("exclude_place_ids",a.join(",")),n(3,r="?"+u.toString())})),t.$$set=t=>{"reverse_search"in t&&n(0,s=t.reverse_search)},[s,i,o,r,function(t){let e=t.target;e.className.match("result")||(e=e.parentElement);let r=Number(e.dataset.position);st.set(i[r]),n(2,o=r)}]}class ye extends Q{constructor(t){super(),X(this,t,ve,_e,r,{reverse_search:0})}}
 /* @preserve
      * Leaflet 1.7.1, a JS library for interactive maps. http://leafletjs.com
      * (c) 2010-2019 Vladimir Agafonkin, (c) 2010-2011 CloudMade
 /* @preserve
      * Leaflet 1.7.1, a JS library for interactive maps. http://leafletjs.com
      * (c) 2010-2019 Vladimir Agafonkin, (c) 2010-2011 CloudMade
-     */var be=tt((function(t,e){!function(t){var e="1.7.1";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 r=0;function s(t){return t._leaflet_id=t._leaflet_id||++r,t._leaflet_id}function a(t,e,n){var i,o,r,s;return s=function(){i=!1,o&&(r.apply(n,o),o=!1)},r=function(){i?o=arguments:(t.apply(n,arguments),setTimeout(s,e),i=!0)}}function l(t,e,n){var i=e[1],o=e[0],r=i-o;return t===i&&n?t:((t-o)%r+r)%r+o}function u(){return!1}function c(t,e){var n=Math.pow(10,void 0===e?6:e);return Math.round(t*n)/n}function h(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function d(t){return h(t).split(/\s+/)}function f(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 p(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 m=/\{ *([\w_-]+) *\}/g;function g(t,e){return t.replace(m,(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 _=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 T=window.requestAnimationFrame||b("RequestAnimationFrame")||x,C=window.cancelAnimationFrame||b("CancelAnimationFrame")||b("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function E(t,e,n){if(!n||T!==x)return T.call(window,o(t,e));t.call(e)}function k(t){t&&C.call(window,t)}var P={extend:n,create:i,bind:o,lastId:r,stamp:s,throttle:a,wrapNum:l,falseFn:u,formatNum:c,trim:h,splitWords:d,setOptions:f,getParamString:p,template:g,isArray:_,indexOf:v,emptyImageUrl:y,requestFn:T,cancelFn:C,requestAnimFrame:E,cancelAnimFrame:k};function S(){}function M(t){if("undefined"!=typeof L&&L&&L.Mixin){t=_(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)}}S.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},o=e.__super__=this.prototype,r=i(o);for(var s in r.constructor=e,e.prototype=r,this)Object.prototype.hasOwnProperty.call(this,s)&&"prototype"!==s&&"__super__"!==s&&(e[s]=this[s]);return t.statics&&(n(e,t.statics),delete t.statics),t.includes&&(M(t.includes),n.apply(null,[r].concat(t.includes)),delete t.includes),r.options&&(t.options=n(i(r.options),t.options)),n(r,t),r._initHooks=[],r.callInitHooks=function(){if(!this._initHooksCalled){o.callInitHooks&&o.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=r._initHooks.length;t<e;t++)r._initHooks[t].call(this)}},e},S.include=function(t){return n(this.prototype,t),this},S.mergeOptions=function(t){return n(this.prototype.options,t),this},S.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,r=(t=d(t)).length;o<r;o++)this._on(t[o],e,n);return this},off:function(t,e,n){if(t)if("object"==typeof t)for(var i in t)this._off(i,t[i],e);else for(var o=0,r=(t=d(t)).length;o<r;o++)this._off(t[o],e,n);else delete this._events;return this},_on:function(t,e,n){this._events=this._events||{};var i=this._events[t];i||(i=[],this._events[t]=i),n===this&&(n=void 0);for(var o={fn:e,ctx:n},r=i,s=0,a=r.length;s<a;s++)if(r[s].fn===e&&r[s].ctx===n)return;r.push(o)},_off:function(t,e,n){var i,o,r;if(this._events&&(i=this._events[t]))if(e){if(n===this&&(n=void 0),i)for(o=0,r=i.length;o<r;o++){var s=i[o];if(s.ctx===n&&s.fn===e)return s.fn=u,this._firingCount&&(this._events[t]=i=i.slice()),void i.splice(o,1)}}else{for(o=0,r=i.length;o<r;o++)i[o].fn=u;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 r=this._events[t];if(r){this._firingCount=this._firingCount+1||1;for(var s=0,a=r.length;s<a;s++){var l=r[s];l.fn.call(l.ctx||this,o)}this._firingCount--}}return i&&this._propagateEvent(o),this},listens:function(t,e){var n=this._events&&this._events[t];if(n&&n.length)return!0;if(e)for(var i in this._eventParents)if(this._eventParents[i].listens(t,e))return!0;return!1},once:function(t,e,n){if("object"==typeof t){for(var i in t)this.once(i,t[i],e);return this}var r=o((function(){this.off(t,e,n).off(t,r,n)}),this);return this.on(t,e,n).on(t,r,n)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[s(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[s(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 z=S.extend(A);function N(t,e,n){this.x=n?Math.round(t):t,this.y=n?Math.round(e):e}var D=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function j(t,e,n){return t instanceof N?t:_(t)?new N(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new N(t.x,t.y):new N(t,e,n)}function O(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i<o;i++)this.extend(n[i])}function I(t,e){return!t||t instanceof O?t:new O(t,e)}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 R(t,e){return t instanceof B?t:new B(t,e)}function Z(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 $(t,e,n){return t instanceof Z?t:_(t)&&"object"!=typeof t[0]?3===t.length?new Z(t[0],t[1],t[2]):2===t.length?new Z(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new Z(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new Z(t,e,n)}N.prototype={clone:function(){return new N(this.x,this.y)},add:function(t){return this.clone()._add(j(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(j(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 N(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new N(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=D(this.x),this.y=D(this.y),this},distanceTo:function(t){var e=(t=j(t)).x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},equals:function(t){return(t=j(t)).x===this.x&&t.y===this.y},contains:function(t){return t=j(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+c(this.x)+", "+c(this.y)+")"}},O.prototype={extend:function(t){return t=j(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new N((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new N(this.min.x,this.max.y)},getTopRight:function(){return new N(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 N?j(t):I(t))instanceof O?(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=I(t);var e=this.min,n=this.max,i=t.min,o=t.max,r=o.x>=e.x&&i.x<=n.x,s=o.y>=e.y&&i.y<=n.y;return r&&s},overlaps:function(t){t=I(t);var e=this.min,n=this.max,i=t.min,o=t.max,r=o.x>e.x&&i.x<n.x,s=o.y>e.y&&i.y<n.y;return r&&s},isValid:function(){return!(!this.min||!this.max)}},B.prototype={extend:function(t){var e,n,i=this._southWest,o=this._northEast;if(t instanceof Z)e=t,n=t;else{if(!(t instanceof B))return t?this.extend($(t)||R(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 Z(e.lat,e.lng),this._northEast=new Z(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 B(new Z(e.lat-i,e.lng-o),new Z(n.lat+i,n.lng+o))},getCenter:function(){return new Z((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 Z(this.getNorth(),this.getWest())},getSouthEast:function(){return new Z(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 Z||"lat"in t?$(t):R(t);var e,n,i=this._southWest,o=this._northEast;return t instanceof B?(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=R(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>=e.lat&&i.lat<=n.lat,s=o.lng>=e.lng&&i.lng<=n.lng;return r&&s},overlaps:function(t){t=R(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>e.lat&&i.lat<n.lat,s=o.lng>e.lng&&i.lng<n.lng;return r&&s},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=R(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},Z.prototype={equals:function(t,e){return!!t&&(t=$(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("+c(this.lat,t)+", "+c(this.lng,t)+")"},distanceTo:function(t){return F.distance(this,$(t))},wrap:function(){return F.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,n=e/Math.cos(Math.PI/180*this.lat);return R([this.lat-e,this.lng-n],[this.lat+e,this.lng+n])},clone:function(){return new Z(this.lat,this.lng,this.alt)}};var H,q={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 O(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 Z(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 r=t.getSouthWest(),s=t.getNorthEast();return new B(new Z(r.lat-i,r.lng-o),new Z(s.lat-i,s.lng-o))}},F=n({},q,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var n=Math.PI/180,i=t.lat*n,o=e.lat*n,r=Math.sin((e.lat-t.lat)*n/2),s=Math.sin((e.lng-t.lng)*n/2),a=r*r+Math.cos(i)*Math.cos(o)*s*s,l=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*l}}),W=6378137,U={R:W,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 N(this.R*t.lng*e,this.R*Math.log((1+o)/(1-o))/2)},unproject:function(t){var e=180/Math.PI;return new Z((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(H=W*Math.PI,new O([-H,-H],[H,H]))};function V(t,e,n,i){if(_(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 G(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 N((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var K=n({},F,{code:"EPSG:3857",projection:U,transformation:function(){var t=.5/(Math.PI*U.R);return G(t,.5,-t,.5)}()}),Y=n({},K,{code:"EPSG:900913"});function X(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Q(t,e){var n,i,o,r,s,a,l="";for(n=0,o=t.length;n<o;n++){for(i=0,r=(s=t[n]).length;i<r;i++)l+=(i?"L":"M")+(a=s[i]).x+" "+a.y;l+=e?Mt?"z":"x":""}return l||"M0 0"}var J=document.documentElement.style,tt="ActiveXObject"in window,et=tt&&!document.addEventListener,nt="msLaunchUri"in navigator&&!("documentMode"in document),it=zt("webkit"),ot=zt("android"),rt=zt("android 2")||zt("android 3"),st=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),at=ot&&zt("Google")&&st<537&&!("AudioNode"in window),lt=!!window.opera,ut=!nt&&zt("chrome"),ct=zt("gecko")&&!it&&!lt&&!tt,ht=!ut&&zt("safari"),dt=zt("phantom"),ft="OTransition"in J,pt=0===navigator.platform.indexOf("Win"),mt=tt&&"transition"in J,gt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!rt,_t="MozPerspective"in J,vt=!window.L_DISABLE_3D&&(mt||gt||_t)&&!ft&&!dt,yt="undefined"!=typeof orientation||zt("mobile"),bt=yt&&it,wt=yt&&gt,xt=!window.PointerEvent&&window.MSPointerEvent,Tt=!(!window.PointerEvent&&!xt),Ct=!window.L_NO_TOUCH&&(Tt||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),Et=yt&&lt,Lt=yt&&ct,kt=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Pt=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",u,e),window.removeEventListener("testPassiveEventSupport",u,e)}catch(t){}return t}(),St=!!document.createElement("canvas").getContext,Mt=!(!document.createElementNS||!X("svg").createSVGRect),At=!Mt&&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 zt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Nt={ie:tt,ielt9:et,edge:nt,webkit:it,android:ot,android23:rt,androidStock:at,opera:lt,chrome:ut,gecko:ct,safari:ht,phantom:dt,opera12:ft,win:pt,ie3d:mt,webkit3d:gt,gecko3d:_t,any3d:vt,mobile:yt,mobileWebkit:bt,mobileWebkit3d:wt,msPointer:xt,pointer:Tt,touch:Ct,mobileOpera:Et,mobileGecko:Lt,retina:kt,passiveEvents:Pt,canvas:St,svg:Mt,vml:At},Dt=xt?"MSPointerDown":"pointerdown",jt=xt?"MSPointerMove":"pointermove",Ot=xt?"MSPointerUp":"pointerup",It=xt?"MSPointerCancel":"pointercancel",Bt={},Rt=!1;function Zt(t,e,n,i){return"touchstart"===e?Ht(t,n,i):"touchmove"===e?Vt(t,n,i):"touchend"===e&&Gt(t,n,i),this}function $t(t,e,n){var i=t["_leaflet_"+e+n];return"touchstart"===e?t.removeEventListener(Dt,i,!1):"touchmove"===e?t.removeEventListener(jt,i,!1):"touchend"===e&&(t.removeEventListener(Ot,i,!1),t.removeEventListener(It,i,!1)),this}function Ht(t,e,n){var i=o((function(t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&Fe(t),Ut(t,e)}));t["_leaflet_touchstart"+n]=i,t.addEventListener(Dt,i,!1),Rt||(document.addEventListener(Dt,qt,!0),document.addEventListener(jt,Ft,!0),document.addEventListener(Ot,Wt,!0),document.addEventListener(It,Wt,!0),Rt=!0)}function qt(t){Bt[t.pointerId]=t}function Ft(t){Bt[t.pointerId]&&(Bt[t.pointerId]=t)}function Wt(t){delete Bt[t.pointerId]}function Ut(t,e){for(var n in t.touches=[],Bt)t.touches.push(Bt[n]);t.changedTouches=[t],e(t)}function Vt(t,e,n){var i=function(t){t.pointerType===(t.MSPOINTER_TYPE_MOUSE||"mouse")&&0===t.buttons||Ut(t,e)};t["_leaflet_touchmove"+n]=i,t.addEventListener(jt,i,!1)}function Gt(t,e,n){var i=function(t){Ut(t,e)};t["_leaflet_touchend"+n]=i,t.addEventListener(Ot,i,!1),t.addEventListener(It,i,!1)}var Kt=xt?"MSPointerDown":Tt?"pointerdown":"touchstart",Yt=xt?"MSPointerUp":Tt?"pointerup":"touchend",Xt="_leaflet_";function Qt(t,e,n){var i,o,r=!1,s=250;function a(t){if(Tt){if(!t.isPrimary)return;if("mouse"===t.pointerType)return}else if(t.touches.length>1)return;var e=Date.now(),n=e-(i||e);o=t.touches?t.touches[0]:t,r=n>0&&n<=s,i=e}function l(t){if(r&&!o.cancelBubble){if(Tt){if("mouse"===t.pointerType)return;var n,s,a={};for(s in o)n=o[s],a[s]=n&&n.bind?n.bind(o):n;o=a}o.type="dblclick",o.button=0,e(o),i=null}}return t[Xt+Kt+n]=a,t[Xt+Yt+n]=l,t[Xt+"dblclick"+n]=e,t.addEventListener(Kt,a,!!Pt&&{passive:!1}),t.addEventListener(Yt,l,!!Pt&&{passive:!1}),t.addEventListener("dblclick",e,!1),this}function Jt(t,e){var n=t[Xt+Kt+e],i=t[Xt+Yt+e],o=t[Xt+"dblclick"+e];return t.removeEventListener(Kt,n,!!Pt&&{passive:!1}),t.removeEventListener(Yt,i,!!Pt&&{passive:!1}),t.removeEventListener("dblclick",o,!1),this}var te,ee,ne,ie,oe,re=xe(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),se=xe(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ae="webkitTransition"===se||"OTransition"===se?se+"End":"transitionend";function le(t){return"string"==typeof t?document.getElementById(t):t}function ue(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 ce(t,e,n){var i=document.createElement(t);return i.className=e||"",n&&n.appendChild(i),i}function he(t){var e=t.parentNode;e&&e.removeChild(t)}function de(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function fe(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function pe(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function me(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=ye(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function ge(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(!me(t,e)){var r=ye(t);ve(t,(r?r+" ":"")+e)}}function _e(t,e){void 0!==t.classList?t.classList.remove(e):ve(t,h((" "+ye(t)+" ").replace(" "+e+" "," ")))}function ve(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function ye(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function be(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&we(t,e)}function we(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 xe(t){for(var e=document.documentElement.style,n=0;n<t.length;n++)if(t[n]in e)return t[n];return!1}function Te(t,e,n){var i=e||new N(0,0);t.style[re]=(mt?"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,vt?Te(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function Ee(t){return t._leaflet_pos||new N(0,0)}if("onselectstart"in document)te=function(){De(window,"selectstart",Fe)},ee=function(){Oe(window,"selectstart",Fe)};else{var Le=xe(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);te=function(){if(Le){var t=document.documentElement.style;ne=t[Le],t[Le]="none"}},ee=function(){Le&&(document.documentElement.style[Le]=ne,ne=void 0)}}function ke(){De(window,"dragstart",Fe)}function Pe(){Oe(window,"dragstart",Fe)}function Se(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Me(),ie=t,oe=t.style.outline,t.style.outline="none",De(window,"keydown",Me))}function Me(){ie&&(ie.style.outline=oe,ie=void 0,oe=void 0,Oe(window,"keydown",Me))}function Ae(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function ze(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Ne={TRANSFORM:re,TRANSITION:se,TRANSITION_END:ae,get:le,getStyle:ue,create:ce,remove:he,empty:de,toFront:fe,toBack:pe,hasClass:me,addClass:ge,removeClass:_e,setClass:ve,getClass:ye,setOpacity:be,testProp:xe,setTransform:Te,setPosition:Ce,getPosition:Ee,disableTextSelection:te,enableTextSelection:ee,disableImageDrag:ke,enableImageDrag:Pe,preventOutline:Se,restoreOutline:Me,getSizedParentNode:Ae,getScale:ze};function De(t,e,n,i){if("object"==typeof e)for(var o in e)Re(t,o,e[o],n);else for(var r=0,s=(e=d(e)).length;r<s;r++)Re(t,e[r],n,i);return this}var je="_leaflet_events";function Oe(t,e,n,i){if("object"==typeof e)for(var o in e)Ze(t,o,e[o],n);else if(e)for(var r=0,s=(e=d(e)).length;r<s;r++)Ze(t,e[r],n,i);else{for(var a in t[je])Ze(t,a,t[je][a]);delete t[je]}return this}function Ie(){if(Tt)return!(nt||ht)}var Be={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Re(t,e,n,i){var o=e+s(n)+(i?"_"+s(i):"");if(t[je]&&t[je][o])return this;var r=function(e){return n.call(i||t,e||window.event)},a=r;Tt&&0===e.indexOf("touch")?Zt(t,e,r,o):Ct&&"dblclick"===e&&!Ie()?Qt(t,r,o):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(Be[e]||e,r,!!Pt&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?(r=function(e){e=e||window.event,Qe(t,e)&&a(e)},t.addEventListener(Be[e],r,!1)):t.addEventListener(e,a,!1):"attachEvent"in t&&t.attachEvent("on"+e,r),t[je]=t[je]||{},t[je][o]=r}function Ze(t,e,n,i){var o=e+s(n)+(i?"_"+s(i):""),r=t[je]&&t[je][o];if(!r)return this;Tt&&0===e.indexOf("touch")?$t(t,e,o):Ct&&"dblclick"===e&&!Ie()?Jt(t,o):"removeEventListener"in t?t.removeEventListener(Be[e]||e,r,!1):"detachEvent"in t&&t.detachEvent("on"+e,r),t[je][o]=null}function $e(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,Xe(t),this}function He(t){return Re(t,"wheel",$e),this}function qe(t){return De(t,"mousedown touchstart dblclick",$e),Re(t,"click",Ye),this}function Fe(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function We(t){return Fe(t),$e(t),this}function Ue(t,e){if(!e)return new N(t.clientX,t.clientY);var n=ze(e),i=n.boundingClientRect;return new N((t.clientX-i.left)/n.x-e.clientLeft,(t.clientY-i.top)/n.y-e.clientTop)}var Ve=pt&&ut?2*window.devicePixelRatio:ct?window.devicePixelRatio:1;function Ge(t){return nt?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Ve: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}var Ke={};function Ye(t){Ke[t.type]=!0}function Xe(t){var e=Ke[t.type];return Ke[t.type]=!1,e}function Qe(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 Je={on:De,off:Oe,stopPropagation:$e,disableScrollPropagation:He,disableClickPropagation:qe,preventDefault:Fe,stop:We,getMousePosition:Ue,getWheelDelta:Ge,fakeStop:Ye,skipped:Xe,isExternalTarget:Qe,addListener:De,removeListener:Oe},tn=z.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=E(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(){k(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),en=z.extend({options:{crs:K,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=f(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($(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=se&&vt&&!Et&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),De(this._proxy,ae,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($(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),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||(vt?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(vt?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),r=(t instanceof N?t:this.latLngToContainerPoint(t)).subtract(o).multiplyBy(1-1/i),s=this.containerPointToLatLng(o.add(r));return this.setView(s,e,{zoom:n})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():R(t);var n=j(e.paddingTopLeft||e.padding||[0,0]),i=j(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 r=i.subtract(n).divideBy(2),s=this.project(t.getSouthWest(),o),a=this.project(t.getNorthEast(),o);return{center:this.unproject(s.add(a).divideBy(2).add(r),o),zoom:o}},fitBounds:function(t,e){if(!(t=R(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=j(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 tn,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){ge(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||!vt)return this.setView(t,e,n);this._stop();var i=this.project(this.getCenter()),o=this.project(t),r=this.getSize(),s=this._zoom;t=$(t),e=void 0===e?s:e;var a=Math.max(r.x,r.y),l=a*this.getZoomScale(s,e),u=o.distanceTo(i)||1,c=1.42,h=c*c;function d(t){var e=(l*l-a*a+(t?-1:1)*h*h*u*u)/(2*(t?l:a)*h*u),n=Math.sqrt(e*e+1)-e;return n<1e-9?-18:Math.log(n)}function f(t){return(Math.exp(t)-Math.exp(-t))/2}function p(t){return(Math.exp(t)+Math.exp(-t))/2}function m(t){return f(t)/p(t)}var g=d(0);function _(t){return a*(p(g)/p(g+c*t))}function v(t){return a*(p(g)*m(g+c*t)-f(g))/h}function y(t){return 1-Math.pow(1-t,1.5)}var b=Date.now(),w=(d(1)-g)/c,x=n.duration?1e3*n.duration:1e3*w*.8;function T(){var n=(Date.now()-b)/x,r=y(n)*w;n<=1?(this._flyToFrame=E(T,this),this._move(this.unproject(i.add(o.subtract(i).multiplyBy(v(r)/u)),s),this.getScaleZoom(a/_(r),s),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}return this._moveStart(!0,n.noMoveStart),T.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=R(t)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},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,R(t));return n.equals(i)||this.panTo(i,e),this._enforcingBounds=!1,this},panInside:function(t,e){var n=j((e=e||{}).paddingTopLeft||e.padding||[0,0]),i=j(e.paddingBottomRight||e.padding||[0,0]),o=this.getCenter(),r=this.project(o),s=this.project(t),a=this.getPixelBounds(),l=a.getSize().divideBy(2),u=I([a.min.add(n),a.max.subtract(i)]);if(!u.contains(s)){this._enforcingBounds=!0;var c=r.subtract(s),h=j(s.x+c.x,s.y+c.y);(s.x<u.min.x||s.x>u.max.x)&&(h.x=r.x-c.x,c.x>0?h.x+=l.x-n.x:h.x-=l.x-i.x),(s.y<u.min.y||s.y>u.max.y)&&(h.y=r.y-c.y,c.y>0?h.y+=l.y-n.y:h.y-=l.y-i.y),this.panTo(this.unproject(h),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(),r=e.divideBy(2).round(),s=i.divideBy(2).round(),a=r.subtract(s);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){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){var e=new Z(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 r={latlng:e,bounds:n,timestamp:t.timestamp};for(var s in t.coords)"number"==typeof t.coords[s]&&(r[s]=t.coords[s]);this.fire("locationfound",r)},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.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(),he(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(k(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)he(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n=ce("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:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new B(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=R(t),n=j(n||[0,0]);var i=this.getZoom()||0,o=this.getMinZoom(),r=this.getMaxZoom(),s=t.getNorthWest(),a=t.getSouthEast(),l=this.getSize().subtract(n),u=I(this.project(a,i),this.project(s,i)).getSize(),c=vt?this.options.zoomSnap:1,h=l.x/u.x,d=l.y/u.y,f=e?Math.max(h,d):Math.min(h,d);return i=this.getScaleZoom(f,i),c&&(i=Math.round(i/(c/100))*(c/100),i=e?Math.ceil(i/c)*c:Math.floor(i/c)*c),Math.max(o,Math.min(r,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new N(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 O(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($(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(j(t),e)},layerPointToLatLng:function(t){var e=j(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project($(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng($(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(R(t))},distance:function(t,e){return this.options.crs.distance($(t),$(e))},containerPointToLayerPoint:function(t){return j(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return j(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(j(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint($(t)))},mouseEventToContainerPoint:function(t){return Ue(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=le(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");De(e,"scroll",this._onScroll,this),this._containerId=s(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&vt,ge(t,"leaflet-container"+(Ct?" leaflet-touch":"")+(kt?" leaflet-retina":"")+(et?" leaflet-oldie":"")+(ht?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=ue(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),Ce(this._mapPane,new N(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ge(t.markerPane,"leaflet-zoom-hide"),ge(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){Ce(this._mapPane,new N(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var i=this._zoom!==e;this._moveStart(i,!1)._move(t,e)._moveEnd(i),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,n){void 0===e&&(e=this._zoom);var i=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(i||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return k(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[s(this._container)]=this;var e=t?Oe:De;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),vt&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){k(this._resizeRequest),this._resizeRequest=E((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,r=t.target||t.srcElement,a=!1;r;){if((n=this._targets[s(r)])&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(n)){a=!0;break}if(n&&n.listens(e,!0)){if(o&&!Qe(r,t))break;if(i.push(n),o)break}if(r===this._container)break;r=r.parentNode}return i.length||a||o||!Qe(r,t)||(i=[this]),i},_handleDOMEvent:function(t){if(this._loaded&&!Xe(t)){var e=t.type;"mousedown"!==e&&"keypress"!==e&&"keyup"!==e&&"keydown"!==e||Se(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_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)}if(!t._stopped&&(i=(i||[]).concat(this._findEventTargets(t,e))).length){var r=i[0];"contextmenu"===e&&r.listens(e,!0)&&Fe(t);var s={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var a=r.getLatLng&&(!r._radius||r._radius<=10);s.containerPoint=a?this.latLngToContainerPoint(r.getLatLng()):this.mouseEventToContainerPoint(t),s.layerPoint=this.containerPointToLayerPoint(s.containerPoint),s.latlng=a?r.getLatLng():this.layerPointToLatLng(s.layerPoint)}for(var l=0;l<i.length;l++)if(i[l].fire(e,s,!0),s.originalEvent._stopped||!1===i[l].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 N(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 I([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),r=new O(i.subtract(o),i.add(o)),s=this._getBoundsOffset(r,n,e);return s.round().equals([0,0])?t:this.unproject(i.add(s),e)},_limitOffset:function(t,e){if(!e)return t;var n=this.getPixelBounds(),i=new O(n.min.add(t),n.max.add(t));return t.add(this._getBoundsOffset(i,e))},_getBoundsOffset:function(t,e,n){var i=I(this.project(e.getNorthEast(),n),this.project(e.getSouthWest(),n)),o=i.min.subtract(t.min),r=i.max.subtract(t.max);return new N(this._rebound(o.x,-r.x),this._rebound(o.y,-r.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=vt?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(){_e(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=ce("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var e=re,n=this._proxy.style[e];Te(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(){he(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();Te(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)||(E((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,ge(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:i}),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&_e(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),E((function(){this._moveEnd(!0)}),this))}});function nn(t,e){return new en(t,e)}var on=S.extend({options:{position:"topright"},initialize:function(t){f(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 ge(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?(he(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()}}),rn=function(t){return new on(t)};en.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=ce("div",e+"control-container",this._container);function i(i,o){var r=e+i+" "+e+o;t[i+o]=ce("div",r,n)}i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)he(this._controlCorners[t]);he(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var sn=on.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 f(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 on.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(s(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){ge(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?(ge(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):_e(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return _e(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=ce("div",t),n=this.options.collapsed;e.setAttribute("aria-haspopup",!0),qe(e),He(e);var i=this._section=ce("section",t+"-list");n&&(this._map.on("click",this.collapse,this),ot||De(e,{mouseenter:this.expand,mouseleave:this.collapse},this));var o=this._layersLink=ce("a",t+"-toggle",e);o.href="#",o.title="Layers",Ct?(De(o,"click",We),De(o,"click",this.expand,this)):De(o,"focus",this.expand,this),n||this.expand(),this._baseLayersList=ce("div",t+"-base",i),this._separator=ce("div",t+"-separator",i),this._overlaysList=ce("div",t+"-overlays",i),e.appendChild(i)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&s(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;de(this._baseLayersList),de(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(s(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_"+s(this),i),this._layerControlInputs.push(e),e.layerId=s(t.layer),De(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var r=document.createElement("div");return n.appendChild(r),r.appendChild(e),r.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 r=n.length-1;r>=0;r--)t=n[r],e=this._getLayer(t.layerId).layer,t.checked?i.push(e):t.checked||o.push(e);for(r=0;r<o.length;r++)this._map.hasLayer(o[r])&&this._map.removeLayer(o[r]);for(r=0;r<i.length;r++)this._map.hasLayer(i[r])||this._map.addLayer(i[r]);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},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),an=function(t,e,n){return new sn(t,e,n)},ln=on.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"&#x2212;",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=ce("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 r=ce("a",n,i);return r.innerHTML=t,r.href="#",r.title=e,r.setAttribute("role","button"),r.setAttribute("aria-label",e),qe(r),De(r,"click",We),De(r,"click",o,this),De(r,"click",this._refocusOnMap,this),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";_e(this._zoomInButton,e),_e(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMinZoom())&&ge(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMaxZoom())&&ge(this._zoomInButton,e)}});en.mergeOptions({zoomControl:!0}),en.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new ln,this.addControl(this.zoomControl))}));var un=function(t){return new ln(t)},cn=on.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",n=ce("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=ce("div",e,n)),t.imperial&&(this._iScale=ce("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)}}),hn=function(t){return new cn(t)},dn=on.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){f(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=ce("div","leaflet-control-attribution"),qe(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},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(" | ")}}});en.mergeOptions({attributionControl:!0}),en.addInitHook((function(){this.options.attributionControl&&(new dn).addTo(this)}));var fn=function(t){return new dn(t)};on.Layers=sn,on.Zoom=ln,on.Scale=cn,on.Attribution=dn,rn.layers=an,rn.zoom=un,rn.scale=hn,rn.attribution=fn;var pn=S.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}});pn.addTo=function(t,e){return t.addHandler(e,this),this};var mn,gn={Events:A},_n=Ct?"touchstart mousedown":"mousedown",vn={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},yn={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},bn=z.extend({options:{clickTolerance:3},initialize:function(t,e,n,i){f(this,i),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(De(this._dragStartTarget,_n,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(bn._dragging===this&&this.finishDrag(),Oe(this._dragStartTarget,_n,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!me(this._element,"leaflet-zoom-anim")&&!(bn._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(bn._dragging=this,this._preventOutline&&Se(this._element),ke(),te(),this._moving)))){this.fire("down");var e=t.touches?t.touches[0]:t,n=Ae(this._element);this._startPoint=new N(e.clientX,e.clientY),this._parentScale=ze(n),De(document,yn[t.type],this._onMove,this),De(document,vn[t.type],this._onUp,this)}},_onMove:function(t){if(!t._simulated&&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 N(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,Fe(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=Ee(this._element).subtract(n),ge(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),ge(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,k(this._animRequest),this._lastEvent=t,this._animRequest=E(this._updatePosition,this,!0)))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),Ce(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){!t._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){for(var t in _e(document.body,"leaflet-dragging"),this._lastTarget&&(_e(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),yn)Oe(document,yn[t],this._onMove,this),Oe(document,vn[t],this._onUp,this);Pe(),ee(),this._moved&&this._moving&&(k(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,bn._dragging=!1}});function wn(t,e){if(!e||!t.length)return t.slice();var n=e*e;return t=Cn(t=Ln(t,n),n)}function xn(t,e,n){return Math.sqrt(An(t,e,n,!0))}function Tn(t,e,n){return An(t,e,n)}function Cn(t,e){var n=t.length,i=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(n);i[0]=i[n-1]=1,En(t,i,e,0,n-1);var o,r=[];for(o=0;o<n;o++)i[o]&&r.push(t[o]);return r}function En(t,e,n,i,o){var r,s,a,l=0;for(s=i+1;s<=o-1;s++)(a=An(t[s],t[i],t[o],!0))>l&&(r=s,l=a);l>n&&(e[r]=1,En(t,e,n,i,r),En(t,e,n,r,o))}function Ln(t,e){for(var n=[t[0]],i=1,o=0,r=t.length;i<r;i++)Mn(t[i],t[o])>e&&(n.push(t[i]),o=i);return o<r-1&&n.push(t[r-1]),n}function kn(t,e,n,i,o){var r,s,a,l=i?mn:Sn(t,n),u=Sn(e,n);for(mn=u;;){if(!(l|u))return[t,e];if(l&u)return!1;a=Sn(s=Pn(t,e,r=l||u,n,o),n),r===l?(t=s,l=a):(e=s,u=a)}}function Pn(t,e,n,i,o){var r,s,a=e.x-t.x,l=e.y-t.y,u=i.min,c=i.max;return 8&n?(r=t.x+a*(c.y-t.y)/l,s=c.y):4&n?(r=t.x+a*(u.y-t.y)/l,s=u.y):2&n?(r=c.x,s=t.y+l*(c.x-t.x)/a):1&n&&(r=u.x,s=t.y+l*(u.x-t.x)/a),new N(r,s,o)}function Sn(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 Mn(t,e){var n=e.x-t.x,i=e.y-t.y;return n*n+i*i}function An(t,e,n,i){var o,r=e.x,s=e.y,a=n.x-r,l=n.y-s,u=a*a+l*l;return u>0&&((o=((t.x-r)*a+(t.y-s)*l)/u)>1?(r=n.x,s=n.y):o>0&&(r+=a*o,s+=l*o)),a=t.x-r,l=t.y-s,i?a*a+l*l:new N(r,s)}function zn(t){return!_(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function Nn(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),zn(t)}var Dn={simplify:wn,pointToSegmentDistance:xn,closestPointOnSegment:Tn,clipSegment:kn,_getEdgeIntersection:Pn,_getBitCode:Sn,_sqClosestPointOnSegment:An,isFlat:zn,_flat:Nn};function jn(t,e,n){var i,o,r,s,a,l,u,c,h,d=[1,4,2,8];for(o=0,u=t.length;o<u;o++)t[o]._code=Sn(t[o],e);for(s=0;s<4;s++){for(c=d[s],i=[],o=0,r=(u=t.length)-1;o<u;r=o++)a=t[o],l=t[r],a._code&c?l._code&c||((h=Pn(l,a,c,e,n))._code=Sn(h,e),i.push(h)):(l._code&c&&((h=Pn(l,a,c,e,n))._code=Sn(h,e),i.push(h)),i.push(a));t=i}return t}var On={clipPolygon:jn},In={project:function(t){return new N(t.lng,t.lat)},unproject:function(t){return new Z(t.y,t.x)},bounds:new O([-180,-90],[180,90])},Bn={R:6378137,R_MINOR:6356752.314245179,bounds:new O([-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,r=Math.sqrt(1-o*o),s=r*Math.sin(i),a=Math.tan(Math.PI/4-i/2)/Math.pow((1-s)/(1+s),r/2);return i=-n*Math.log(Math.max(a,1e-10)),new N(t.lng*e*n,i)},unproject:function(t){for(var e,n=180/Math.PI,i=this.R,o=this.R_MINOR/i,r=Math.sqrt(1-o*o),s=Math.exp(-t.y/i),a=Math.PI/2-2*Math.atan(s),l=0,u=.1;l<15&&Math.abs(u)>1e-7;l++)e=r*Math.sin(a),e=Math.pow((1-e)/(1+e),r/2),a+=u=Math.PI/2-2*Math.atan(s*e)-a;return new Z(a*n,t.x*n/i)}},Rn={LonLat:In,Mercator:Bn,SphericalMercator:U},Zn=n({},F,{code:"EPSG:3395",projection:Bn,transformation:function(){var t=.5/(Math.PI*Bn.R);return G(t,.5,-t,.5)}()}),$n=n({},F,{code:"EPSG:4326",projection:In,transformation:G(1/180,1,-1/180,.5)}),Hn=n({},q,{projection:In,transformation:G(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});q.Earth=F,q.EPSG3395=Zn,q.EPSG3857=K,q.EPSG900913=Y,q.EPSG4326=$n,q.Simple=Hn;var qn=z.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[s(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[s(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.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this})}}});en.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=s(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=s(t);return this._layers[e]?(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),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!!t&&s(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?_(t)?t:[t]:[]).length;e<n;e++)this.addLayer(t[e])},_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[s(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=s(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 Fn=qn.extend({initialize:function(t,e){var n,i;if(f(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!!t&&("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 s(t)}}),Wn=function(t,e){return new Fn(t,e)},Un=Fn.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Fn.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),Fn.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 B;for(var e in this._layers){var n=this._layers[e];t.extend(n.getBounds?n.getBounds():n.getLatLng())}return t}}),Vn=function(t,e){return new Un(t,e)},Gn=S.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function(t){f(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),i},_setIconStyles:function(t,e){var n=this.options,i=n[e+"Size"];"number"==typeof i&&(i=[i,i]);var o=j(i),r=j("shadow"===e&&n.shadowAnchor||n.iconAnchor||o&&o.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(n.className||""),r&&(t.style.marginLeft=-r.x+"px",t.style.marginTop=-r.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 kt&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function Kn(t){return new Gn(t)}var Yn=Gn.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 Yn.imagePath||(Yn.imagePath=this._detectIconPath()),(this.options.imagePath||Yn.imagePath)+Gn.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=ce("div","leaflet-default-icon-path",document.body),e=ue(t,"background-image")||ue(t,"backgroundImage");return document.body.removeChild(t),e=null===e||0!==e.indexOf("url")?"":e.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),Xn=pn.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new bn(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),ge(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&&_e(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,r=Ee(e._icon),s=n.getPixelBounds(),a=n.getPixelOrigin(),l=I(s.min._subtract(a).add(o),s.max._subtract(a).subtract(o));if(!l.contains(r)){var u=j((Math.max(l.max.x,r.x)-l.max.x)/(s.max.x-l.max.x)-(Math.min(l.min.x,r.x)-l.min.x)/(s.min.x-l.min.x),(Math.max(l.max.y,r.y)-l.max.y)/(s.max.y-l.max.y)-(Math.min(l.min.y,r.y)-l.min.y)/(s.min.y-l.min.y)).multiplyBy(i);n.panBy(u,{animate:!1}),this._draggable._newPos._add(u),this._draggable._startPos._add(u),Ce(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=E(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&&(k(this._panRequest),this._panRequest=E(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){k(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Qn=qn.extend({options:{icon:new Yn,interactive:!0,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){f(this,e),this._latlng=$(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=$(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||"")),ge(n,e),t.keyboard&&(n.tabIndex="0"),this._icon=n,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var o=t.icon.createShadow(this._shadow),r=!1;o!==this._shadow&&(this._removeShadow(),r=!0),o&&(ge(o,e),o.alt=""),this._shadow=o,t.opacity<1&&this._updateOpacity(),i&&this.getPane().appendChild(this._icon),this._initInteraction(),o&&r&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),he(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&he(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&&(ge(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Xn)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Xn(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&&be(this._icon,t),this._shadow&&be(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function Jn(t,e){return new Qn(t,e)}var ti=qn.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 f(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}}),ei=ti.extend({options:{fill:!0,radius:10},initialize:function(t,e){f(this,e),this._latlng=$(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=$(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 ti.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 O(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 ni(t,e){return new ei(t,e)}var ii=ei.extend({initialize:function(t,e,i){if("number"==typeof e&&(e=n({},i,{radius:e})),f(this,e),this._latlng=$(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 B(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:ti.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,n=this._map,i=n.options.crs;if(i.distance===F.distance){var o=Math.PI/180,r=this._mRadius/F.R/o,s=n.project([e+r,t]),a=n.project([e-r,t]),l=s.add(a).divideBy(2),u=n.unproject(l).lat,c=Math.acos((Math.cos(r*o)-Math.sin(e*o)*Math.sin(u*o))/(Math.cos(e*o)*Math.cos(u*o)))/o;(isNaN(c)||0===c)&&(c=r/Math.cos(Math.PI/180*e)),this._point=l.subtract(n.getPixelOrigin()),this._radius=isNaN(c)?0:l.x-n.project([u,t-c]).x,this._radiusY=l.y-s.y}else{var h=i.unproject(i.project(this._latlng).subtract([this._mRadius,0]));this._point=n.latLngToLayerPoint(this._latlng),this._radius=this._point.x-n.latLngToLayerPoint(h).x}this._updateBounds()}});function oi(t,e,n){return new ii(t,e,n)}var ri=ti.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){f(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,r=An,s=0,a=this._parts.length;s<a;s++)for(var l=this._parts[s],u=1,c=l.length;u<c;u++){var h=r(t,e=l[u-1],n=l[u],!0);h<i&&(i=h,o=r(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()");var t,e,n,i,o,r,s,a=this._rings[0],l=a.length;if(!l)return null;for(t=0,e=0;t<l-1;t++)e+=a[t].distanceTo(a[t+1])/2;if(0===e)return this._map.layerPointToLatLng(a[0]);for(t=0,i=0;t<l-1;t++)if(o=a[t],r=a[t+1],(i+=n=o.distanceTo(r))>e)return s=(i-e)/n,this._map.layerPointToLatLng([r.x-s*(r.x-o.x),r.y-s*(r.y-o.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=$(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new B,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]=$(t[i]),this._bounds.extend(e[i])):e[i]=this._convertLatLngs(t[i]);return e},_project:function(){var t=new O;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 N(t,t);this._pxBounds=new O([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)])},_projectLatlngs:function(t,e,n){var i,o,r=t[0]instanceof Z,s=t.length;if(r){for(o=[],i=0;i<s;i++)o[i]=this._map.latLngToLayerPoint(t[i]),n.extend(o[i]);e.push(o)}else for(i=0;i<s;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,r,s,a,l=this._parts;for(e=0,i=0,o=this._rings.length;e<o;e++)for(n=0,r=(a=this._rings[e]).length;n<r-1;n++)(s=kn(a[n],a[n+1],t,n,!0))&&(l[i]=l[i]||[],l[i].push(s[0]),s[1]===a[n+1]&&n!==r-2||(l[i].push(s[1]),i++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,n=0,i=t.length;n<i;n++)t[n]=wn(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,r,s,a,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(n=0,r=this._parts.length;n<r;n++)for(i=0,o=(s=(a=this._parts[n]).length)-1;i<s;o=i++)if((e||0!==i)&&xn(t,a[o],a[i])<=l)return!0;return!1}});function si(t,e){return new ri(t,e)}ri._flat=Nn;var ai=ri.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()");var t,e,n,i,o,r,s,a,l,u=this._rings[0],c=u.length;if(!c)return null;for(r=s=a=0,t=0,e=c-1;t<c;e=t++)n=u[t],i=u[e],o=n.y*i.x-i.y*n.x,s+=(n.x+i.x)*o,a+=(n.y+i.y)*o,r+=3*o;return l=0===r?u[0]:[s/r,a/r],this._map.layerPointToLatLng(l)},_convertLatLngs:function(t){var e=ri.prototype._convertLatLngs.call(this,t),n=e.length;return n>=2&&e[0]instanceof Z&&e[0].equals(e[n-1])&&e.pop(),e},_setLatLngs:function(t){ri.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 N(e,e);if(t=new O(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,r=this._rings.length;o<r;o++)(i=jn(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,r,s,a,l,u=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(o=0,a=this._parts.length;o<a;o++)for(r=0,s=(l=(e=this._parts[o]).length)-1;r<l;s=r++)n=e[r],i=e[s],n.y>t.y!=i.y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(u=!u);return u||ri.prototype._containsPoint.call(this,t,!0)}});function li(t,e){return new ai(t,e)}var ui=Un.extend({initialize:function(t,e){f(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,i,o=_(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 r=this.options;if(r.filter&&!r.filter(t))return this;var s=ci(t,r);return s?(s.feature=_i(t),s.defaultOptions=s.options,this.resetStyle(s),r.onEachFeature&&r.onEachFeature(t,s),this.addLayer(s)):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 ci(t,e){var n,i,o,r,s="Feature"===t.type?t.geometry:t,a=s?s.coordinates:null,l=[],u=e&&e.pointToLayer,c=e&&e.coordsToLatLng||di;if(!a&&!s)return null;switch(s.type){case"Point":return hi(u,t,n=c(a),e);case"MultiPoint":for(o=0,r=a.length;o<r;o++)n=c(a[o]),l.push(hi(u,t,n,e));return new Un(l);case"LineString":case"MultiLineString":return i=fi(a,"LineString"===s.type?0:1,c),new ri(i,e);case"Polygon":case"MultiPolygon":return i=fi(a,"Polygon"===s.type?1:2,c),new ai(i,e);case"GeometryCollection":for(o=0,r=s.geometries.length;o<r;o++){var h=ci({geometry:s.geometries[o],type:"Feature",properties:t.properties},e);h&&l.push(h)}return new Un(l);default:throw new Error("Invalid GeoJSON object.")}}function hi(t,e,n,i){return t?t(e,n):new Qn(n,i&&i.markersInheritOptions&&i)}function di(t){return new Z(t[1],t[0],t[2])}function fi(t,e,n){for(var i,o=[],r=0,s=t.length;r<s;r++)i=e?fi(t[r],e-1,n):(n||di)(t[r]),o.push(i);return o}function pi(t,e){return e="number"==typeof e?e:6,void 0!==t.alt?[c(t.lng,e),c(t.lat,e),c(t.alt,e)]:[c(t.lng,e),c(t.lat,e)]}function mi(t,e,n,i){for(var o=[],r=0,s=t.length;r<s;r++)o.push(e?mi(t[r],e-1,n,i):pi(t[r],i));return!e&&n&&o.push(o[0]),o}function gi(t,e){return t.feature?n({},t.feature,{geometry:e}):_i(e)}function _i(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var vi={toGeoJSON:function(t){return gi(this,{type:"Point",coordinates:pi(this.getLatLng(),t)})}};function yi(t,e){return new ui(t,e)}Qn.include(vi),ii.include(vi),ei.include(vi),ri.include({toGeoJSON:function(t){var e=!zn(this._latlngs);return gi(this,{type:(e?"Multi":"")+"LineString",coordinates:mi(this._latlngs,e?1:0,!1,t)})}}),ai.include({toGeoJSON:function(t){var e=!zn(this._latlngs),n=e&&!zn(this._latlngs[0]),i=mi(this._latlngs,n?2:e?1:0,!0,t);return e||(i=[i]),gi(this,{type:(n?"Multi":"")+"Polygon",coordinates:i})}}),Fn.include({toMultiPoint:function(t){var e=[];return this.eachLayer((function(n){e.push(n.toGeoJSON(t).geometry.coordinates)})),gi(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 r=_i(o);"FeatureCollection"===r.type?i.push.apply(i,r.features):i.push(r)}}})),n?gi(this,{geometries:i,type:"GeometryCollection"}):{type:"FeatureCollection",features:i}}});var bi=yi,wi=qn.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,n){this._url=t,this._bounds=R(e),f(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ge(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){he(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&&fe(this._image),this},bringToBack:function(){return this._map&&pe(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=R(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:ce("img");ge(e,"leaflet-image-layer"),this._zoomAnimated&&ge(e,"leaflet-zoom-animated"),this.options.className&&ge(e,this.options.className),e.onselectstart=u,e.onmousemove=u,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;Te(this._image,n,e)},_reset:function(){var t=this._image,e=new O(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(){be(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)}}),xi=function(t,e,n){return new wi(t,e,n)},Ti=wi.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:ce("video");if(ge(e,"leaflet-image-layer"),this._zoomAnimated&&ge(e,"leaflet-zoom-animated"),this.options.className&&ge(e,this.options.className),e.onselectstart=u,e.onmousemove=u,e.onloadeddata=o(this.fire,this,"load"),t){for(var n=e.getElementsByTagName("source"),i=[],r=0;r<n.length;r++)i.push(n[r].src);this._url=n.length>0?i:[e.src]}else{_(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;for(var s=0;s<this._url.length;s++){var a=ce("source");a.src=this._url[s],e.appendChild(a)}}}});function Ci(t,e,n){return new Ti(t,e,n)}var Ei=wi.extend({_initImage:function(){var t=this._image=this._url;ge(t,"leaflet-image-layer"),this._zoomAnimated&&ge(t,"leaflet-zoom-animated"),this.options.className&&ge(t,this.options.className),t.onselectstart=u,t.onmousemove=u}});function Li(t,e,n){return new Ei(t,e,n)}var ki=qn.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,e){f(this,t),this._source=e},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&be(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&be(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(be(this._container,0),this._removeTimeout=setTimeout(o(he,void 0,this._container),200)):he(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=$(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&&fe(this._container),this},bringToBack:function(){return this._map&&pe(this._container),this},_prepareOpen:function(t,e,n){if(e instanceof qn||(n=e,e=t),e instanceof Un)for(var i in t._layers){e=t._layers[i];break}if(!n)if(e.getCenter)n=e.getCenter();else{if(!e.getLatLng)throw new Error("Unable to get source layer LatLng.");n=e.getLatLng()}return this._source=e,this.update(),n},_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=j(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]}}),Pi=ki.extend({options:{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.openPopup(this),this},onAdd:function(t){ki.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof ti||this._source.on("preclick",$e))},onRemove:function(t){ki.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof ti||this._source.off("preclick",$e))},getEvents:function(){var t=ki.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},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t="leaflet-popup",e=this._container=ce("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=ce("div",t+"-content-wrapper",e);if(this._contentNode=ce("div",t+"-content",n),qe(e),He(this._contentNode),De(e,"contextmenu",$e),this._tipContainer=ce("div",t+"-tip-container",e),this._tip=ce("div",t+"-tip",this._tipContainer),this.options.closeButton){var i=this._closeButton=ce("a",t+"-close-button",e);i.href="#close",i.innerHTML="&#215;",De(i,"click",this._onCloseButtonClick,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,r="leaflet-popup-scrolled";o&&i>o?(e.height=o+"px",ge(t,r)):_e(t,r),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){this._map._panAnim&&this._map._panAnim.stop();var t=this._map,e=parseInt(ue(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,i=this._containerWidth,o=new N(this._containerLeft,-n-this._containerBottom);o._add(Ee(this._container));var r=t.layerPointToContainerPoint(o),s=j(this.options.autoPanPadding),a=j(this.options.autoPanPaddingTopLeft||s),l=j(this.options.autoPanPaddingBottomRight||s),u=t.getSize(),c=0,h=0;r.x+i+l.x>u.x&&(c=r.x+i-u.x+l.x),r.x-c-a.x<0&&(c=r.x-a.x),r.y+n+l.y>u.y&&(h=r.y+n-u.y+l.y),r.y-h-a.y<0&&(h=r.y-a.y),(c||h)&&t.fire("autopanstart").panBy([c,h])}},_onCloseButtonClick:function(t){this._close(),We(t)},_getAnchor:function(){return j(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Si=function(t,e){return new Pi(t,e)};en.mergeOptions({closePopupOnClick:!0}),en.include({openPopup:function(t,e,n){return t instanceof Pi||(t=new Pi(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),qn.include({bindPopup:function(t,e){return t instanceof Pi?(f(t,e),this._popup=t,t._source=this):(this._popup&&!e||(this._popup=new Pi(e,this)),this._popup.setContent(t)),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,e){return this._popup&&this._map&&(e=this._popup._prepareOpen(this,t,e),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),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){var e=t.layer||t.target;this._popup&&this._map&&(We(t),e instanceof ti?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var Mi=ki.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){ki.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){ki.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=ki.prototype.getEvents.call(this);return Ct&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ce("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,n,i=this._map,o=this._container,r=i.latLngToContainerPoint(i.getCenter()),s=i.layerPointToContainerPoint(t),a=this.options.direction,l=o.offsetWidth,u=o.offsetHeight,c=j(this.options.offset),h=this._getAnchor();"top"===a?(e=l/2,n=u):"bottom"===a?(e=l/2,n=0):"center"===a?(e=l/2,n=u/2):"right"===a?(e=0,n=u/2):"left"===a?(e=l,n=u/2):s.x<r.x?(a="right",e=0,n=u/2):(a="left",e=l+2*(c.x+h.x),n=u/2),t=t.subtract(j(e,n,!0)).add(c).add(h),_e(o,"leaflet-tooltip-right"),_e(o,"leaflet-tooltip-left"),_e(o,"leaflet-tooltip-top"),_e(o,"leaflet-tooltip-bottom"),ge(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&&be(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return j(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),Ai=function(t,e){return new Mi(t,e)};en.include({openTooltip:function(t,e,n){return t instanceof Mi||(t=new Mi(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),qn.include({bindTooltip:function(t,e){return t instanceof Mi?(f(t,e),this._tooltip=t,t._source=this):(this._tooltip&&!e||(this._tooltip=new Mi(e,this)),this._tooltip.setContent(t)),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,this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),Ct&&(n.click=this._openTooltip)),this[e](n),this._tooltipHandlersAdded=!t}},openTooltip:function(t,e){return this._tooltip&&this._map&&(e=this._tooltip._prepareOpen(this,t,e),this._map.openTooltip(this._tooltip,e),this._tooltip.options.interactive&&this._tooltip._container&&(ge(this._tooltip._container,"leaflet-clickable"),this.addInteractiveTarget(this._tooltip._container))),this},closeTooltip:function(){return this._tooltip&&(this._tooltip._close(),this._tooltip.options.interactive&&this._tooltip._container&&(_e(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(t){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(t)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_openTooltip:function(t){var e=t.layer||t.target;this._tooltip&&this._map&&this.openTooltip(e,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 zi=Gn.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?(de(e),e.appendChild(n.html)):e.innerHTML=!1!==n.html?n.html:"",n.bgPos){var i=j(n.bgPos);e.style.backgroundPosition=-i.x+"px "+-i.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});function Ni(t){return new zi(t)}Gn.Default=Yn;var Di=qn.extend({options:{tileSize:256,opacity:1,updateWhenIdle:yt,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){f(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),he(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(fe(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(pe(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(){return this._map&&(this._removeAllTiles(),this._update()),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 N?t:new N(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,r=n.length;o<r;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&&!et){be(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 r=Math.min(1,(t-o.loaded)/200);be(o.el,r),r<1?e=!0:(o.active?n=!0:this._onOpaqueTile(o),o.active=!0)}}n&&!this._noPrune&&this._pruneTiles(),e&&(k(this._fadeFrame),this._fadeFrame=E(this._updateOpacity,this))}},_onOpaqueTile:u,_initContainer:function(){this._container||(this._container=ce("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)):(he(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=ce("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()),u(i.el.offsetWidth),this._onCreateLevel(i)),this._level=i,i}},_onUpdateLevel:u,_onRemoveLevel:u,_onCreateLevel:u,_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)he(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),r=Math.floor(e/2),s=n-1,a=new N(+o,+r);a.z=+s;var l=this._tileCoordsToKey(a),u=this._tiles[l];return u&&u.active?(u.retain=!0,!0):(u&&u.loaded&&(u.retain=!0),s>i&&this._retainParent(o,r,s,i))},_retainChildren:function(t,e,n,i){for(var o=2*t;o<2*t+2;o++)for(var r=2*e;r<2*e+2;r++){var s=new N(o,r);s.z=n+1;var a=this._tileCoordsToKey(s),l=this._tiles[a];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),n+1<i&&this._retainChildren(o,r,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 r=this.options.updateWhenZooming&&o!==this._tileZoom;i&&!r||(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();vt?Te(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(),r=e.getSize().divideBy(2*i);return new O(o.subtract(r),o.add(r))},_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),r=o.getCenter(),s=[],a=this.options.keepBuffer,l=new O(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 u in this._tiles){var c=this._tiles[u].coords;c.z===this._tileZoom&&l.contains(new N(c.x,c.y))||(this._tiles[u].current=!1)}if(Math.abs(n-this._tileZoom)>1)this._setView(t,n);else{for(var h=o.min.y;h<=o.max.y;h++)for(var d=o.min.x;d<=o.max.x;d++){var f=new N(d,h);if(f.z=this._tileZoom,this._isValidTile(f)){var p=this._tiles[this._tileCoordsToKey(f)];p?p.current=!0:s.push(f)}}if(s.sort((function(t,e){return t.distanceTo(r)-e.distanceTo(r)})),0!==s.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(d=0;d<s.length;d++)this._addTile(s[d],m);this._level.el.appendChild(m)}}}}},_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 R(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 B(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 N(+e[0],+e[1]);return n.z=+e[2],n},_removeTile:function(t){var e=this._tiles[t];e&&(he(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){ge(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=u,t.onmousemove=u,et&&this.options.opacity<1&&be(t,this.options.opacity),ot&&!rt&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var n=this._getTilePos(t),i=this._tileCoordsToKey(t),r=this.createTile(this._wrapCoords(t),o(this._tileReady,this,t));this._initTile(r),this.createTile.length<2&&E(o(this._tileReady,this,t,null,r)),Ce(r,n),this._tiles[i]={el:r,coords:t,current:!0},e.appendChild(r),this.fire("tileloadstart",{tile:r,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?(be(n.el,0),k(this._fadeFrame),this._fadeFrame=E(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(ge(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),et||!this._map._fadeAnimated?E(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 N(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 O(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 ji(t){return new Di(t)}var Oi=Di.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,(e=f(this,e)).detectRetina&&kt&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),ot||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 De(n,"load",o(this._tileOnLoad,this,e,n)),De(n,"error",o(this._tileOnError,this,e,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),n.alt="",n.setAttribute("role","presentation"),n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:kt?"@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 g(this._url,n(e,this.options))},_tileOnLoad:function(t,e){et?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)this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=u,e.onerror=u,e.complete||(e.src=y,he(e),delete this._tiles[t]))},_removeTile:function(t){var e=this._tiles[t];if(e)return at||e.el.setAttribute("src",y),Di.prototype._removeTile.call(this,t)},_tileReady:function(t,e,n){if(this._map&&(!n||n.getAttribute("src")!==y))return Di.prototype._tileReady.call(this,t,e,n)}});function Ii(t,e){return new Oi(t,e)}var Bi=Oi.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 r=(e=f(this,e)).detectRetina&&kt?2:1,s=this.getTileSize();i.width=s.x*r,i.height=s.y*r,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,Oi.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),n=this._crs,i=I(n.project(e[0]),n.project(e[1])),o=i.min,r=i.max,s=(this._wmsVersion>=1.3&&this._crs===$n?[o.y,o.x,r.y,r.x]:[o.x,o.y,r.x,r.y]).join(","),a=Oi.prototype.getTileUrl.call(this,t);return a+p(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+s},setParams:function(t,e){return n(this.wmsParams,t),e||this.redraw(),this}});function Ri(t,e){return new Bi(t,e)}Oi.WMS=Bi,Ii.wms=Ri;var Zi=qn.extend({options:{padding:.1,tolerance:0},initialize:function(t){f(this,t),s(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&ge(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=Ee(this._container),o=this._map.getSize().multiplyBy(.5+this.options.padding),r=this._map.project(this._center,e),s=this._map.project(t,e).subtract(r),a=o.multiplyBy(-n).add(i).add(o).subtract(s);vt?Te(this._container,a,n):Ce(this._container,a)},_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 O(n,n.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),$i=Zi.extend({getEvents:function(){var t=Zi.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Zi.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");De(t,"mousemove",this._onMouseMove,this),De(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),De(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){k(this._redrawRequest),delete this._ctx,he(this._container),Oe(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){Zi.prototype._update.call(this);var t=this._bounds,e=this._container,n=t.getSize(),i=kt?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",kt&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){Zi.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[s(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[s(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||E(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new O,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,r,s=t._parts,a=s.length,l=this._ctx;if(a){for(l.beginPath(),n=0;n<a;n++){for(i=0,o=s[n].length;i<o;i++)r=s[n][i],l[i?"lineTo":"moveTo"](r.x,r.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);n&&(Ye(t),this._fireEvent([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&&(_e(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,r=this._drawFirst;r;r=r.next)(n=r.layer).options.interactive&&n._containsPoint(e)&&(i=n);i!==this._hoveredLayer&&(this._handleMouseOut(t),i&&(ge(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseover"),this._hoveredLayer=i)),this._hoveredLayer&&this._fireEvent([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 Hi(t){return St?new $i(t):null}var qi=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">')}}}(),Fi={_initContainer:function(){this._container=ce("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Zi.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=qi("shape");ge(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=qi("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[s(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;he(e),t.removeInteractiveTarget(e),delete this._layers[s(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=qi("stroke")),o.appendChild(e),e.weight=i.weight+"px",e.color=i.color,e.opacity=i.opacity,i.dashArray?e.dashStyle=_(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=qi("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){fe(t._container)},_bringToBack:function(t){pe(t._container)}},Wi=At?qi:X,Ui=Zi.extend({getEvents:function(){var t=Zi.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=Wi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Wi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){he(this._container),Oe(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){Zi.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=Wi("path");t.options.className&&ge(e,t.options.className),t.options.interactive&&ge(e,"leaflet-interactive"),this._updateStyle(t),this._layers[s(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){he(t._path),t.removeInteractiveTarget(t._path),delete this._layers[s(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,Q(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){fe(t._path)},_bringToBack:function(t){pe(t._path)}});function Vi(t){return Mt||At?new Ui(t):null}At&&Ui.include(Fi),en.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&&Hi(t)||Vi(t)}});var Gi=ai.extend({initialize:function(t,e){ai.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=R(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function Ki(t,e){return new Gi(t,e)}Ui.create=Wi,Ui.pointsToPath=Q,ui.geometryToLayer=ci,ui.coordsToLatLng=di,ui.coordsToLatLngs=fi,ui.latLngToCoords=pi,ui.latLngsToCoords=mi,ui.getFeature=gi,ui.asFeature=_i,en.mergeOptions({boxZoom:!0});var Yi=pn.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(){De(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Oe(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){he(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(),te(),ke(),this._startPoint=this._map.mouseEventToContainerPoint(t),De(document,{contextmenu:We,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=ce("div","leaflet-zoom-box",this._container),ge(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new O(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&&(he(this._box),_e(this._container,"leaflet-crosshair")),ee(),Pe(),Oe(document,{contextmenu:We,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 B(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()}});en.addInitHook("addHandler","boxZoom",Yi),en.mergeOptions({doubleClickZoom:!0});var Xi=pn.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)}});en.addInitHook("addHandler","doubleClickZoom",Xi),en.mergeOptions({dragging:!0,inertia:!rt,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Qi=pn.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new bn(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))}ge(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){_e(this._map._container,"leaflet-grab"),_e(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=R(this._map.options.maxBounds);this._offsetLimit=I(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,r=(i+e+n)%t-e-n,s=Math.abs(o+n)<Math.abs(r+n)?o:r;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=s},_onDragEnd:function(t){var e=this._map,n=e.options,i=!n.inertia||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]),r=(this._lastTime-this._times[0])/1e3,s=n.easeLinearity,a=o.multiplyBy(s/r),l=a.distanceTo([0,0]),u=Math.min(n.inertiaMaxSpeed,l),c=a.multiplyBy(u/l),h=u/(n.inertiaDeceleration*s),d=c.multiplyBy(-h/2).round();d.x||d.y?(d=e._limitOffset(d,e.options.maxBounds),E((function(){e.panBy(d,{duration:h,easeLinearity:s,noMoveStart:!0,animate:!0})}))):e.fire("moveend")}}});en.addInitHook("addHandler","dragging",Qi),en.mergeOptions({keyboard:!0,keyboardPanDelta:80});var Ji=pn.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"),De(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(),Oe(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(){De(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Oe(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=j(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()}We(t)}}});en.addInitHook("addHandler","keyboard",Ji),en.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var to=pn.extend({addHooks:function(){De(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Oe(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=Ge(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),We(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,r=n?Math.ceil(o/n)*n:o,s=t._limitZoom(e+(this._delta>0?r:-r))-e;this._delta=0,this._startTime=null,s&&("center"===t.options.scrollWheelZoom?t.setZoom(e+s):t.setZoomAround(this._lastMousePos,e+s))}});en.addInitHook("addHandler","scrollWheelZoom",to),en.mergeOptions({tap:!0,tapTolerance:15});var eo=pn.extend({addHooks:function(){De(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Oe(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(Fe(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var e=t.touches[0],n=e.target;this._startPos=this._newPos=new N(e.clientX,e.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&ge(n,"leaflet-active"),this._holdTimeout=setTimeout(o((function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))}),this),1e3),this._simulateEvent("mousedown",e),De(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),Oe(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var e=t.changedTouches[0],n=e.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&_e(n,"leaflet-active"),this._simulateEvent("mouseup",e),this._isTapValid()&&this._simulateEvent("click",e)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new N(e.clientX,e.clientY),this._simulateEvent("mousemove",e)},_simulateEvent:function(t,e){var n=document.createEvent("MouseEvents");n._simulated=!0,e.target._simulatedClick=!0,n.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(n)}});!Ct||Tt&&!ht||en.addInitHook("addHandler","tap",eo),en.mergeOptions({touchZoom:Ct&&!rt,bounceAtZoomLimits:!0});var no=pn.extend({addHooks:function(){ge(this._map._container,"leaflet-touch-zoom"),De(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){_e(this._map._container,"leaflet-touch-zoom"),Oe(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(),De(document,"touchmove",this._onTouchMove,this),De(document,"touchend",this._onTouchEnd,this),Fe(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]),r=n.distanceTo(i)/this._startDist;if(this._zoom=e.getScaleZoom(r,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&r<1||this._zoom>e.getMaxZoom()&&r>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===r)return}else{var s=n._add(i)._divideBy(2)._subtract(this._centerPoint);if(1===r&&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),k(this._animRequest);var a=o(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=E(a,this,!0),Fe(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,k(this._animRequest),Oe(document,"touchmove",this._onTouchMove,this),Oe(document,"touchend",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}});en.addInitHook("addHandler","touchZoom",no),en.BoxZoom=Yi,en.DoubleClickZoom=Xi,en.Drag=Qi,en.Keyboard=Ji,en.ScrollWheelZoom=to,en.Tap=eo,en.TouchZoom=no,t.version=e,t.Control=on,t.control=rn,t.Browser=Nt,t.Evented=z,t.Mixin=gn,t.Util=P,t.Class=S,t.Handler=pn,t.extend=n,t.bind=o,t.stamp=s,t.setOptions=f,t.DomEvent=Je,t.DomUtil=Ne,t.PosAnimation=tn,t.Draggable=bn,t.LineUtil=Dn,t.PolyUtil=On,t.Point=N,t.point=j,t.Bounds=O,t.bounds=I,t.Transformation=V,t.transformation=G,t.Projection=Rn,t.LatLng=Z,t.latLng=$,t.LatLngBounds=B,t.latLngBounds=R,t.CRS=q,t.GeoJSON=ui,t.geoJSON=yi,t.geoJson=bi,t.Layer=qn,t.LayerGroup=Fn,t.layerGroup=Wn,t.FeatureGroup=Un,t.featureGroup=Vn,t.ImageOverlay=wi,t.imageOverlay=xi,t.VideoOverlay=Ti,t.videoOverlay=Ci,t.SVGOverlay=Ei,t.svgOverlay=Li,t.DivOverlay=ki,t.Popup=Pi,t.popup=Si,t.Tooltip=Mi,t.tooltip=Ai,t.Icon=Gn,t.icon=Kn,t.DivIcon=zi,t.divIcon=Ni,t.Marker=Qn,t.marker=Jn,t.TileLayer=Oi,t.tileLayer=Ii,t.GridLayer=Di,t.gridLayer=ji,t.SVG=Ui,t.svg=Vi,t.Renderer=Zi,t.Canvas=$i,t.canvas=Hi,t.Path=ti,t.CircleMarker=ei,t.circleMarker=ni,t.Circle=ii,t.circle=oi,t.Polyline=ri,t.polyline=si,t.Polygon=ai,t.polygon=li,t.Rectangle=Gi,t.rectangle=Ki,t.Map=en,t.map=nn;var io=window.L;t.noConflict=function(){return window.L=io,this},window.L=t}(e)}));function we(e){let n,i,o,r,s,a,l,u,f,_,y,b,T,C,E,L,k,P,S,M,A,z,N,D,j,O,I,B;return{c(){n=p("div"),i=p("div"),o=m("map center: "),r=m(e[0]),s=g(),a=p("a"),l=m("view on osm.org"),u=g(),f=p("br"),_=m("\n    map zoom: "),y=m(e[1]),b=g(),T=p("br"),C=m("\n    viewbox: "),E=m(e[2]),L=g(),k=p("br"),P=m("\n    last click: "),S=m(e[4]),M=g(),A=p("br"),z=m("\n    mouse position: "),N=m(e[5]),D=g(),j=p("div"),O=p("a"),O.textContent="hide",w(a,"target","_blank"),w(a,"href",e[3]),w(i,"id","map-position-inner"),w(O,"href","#hide"),w(j,"id","map-position-close"),w(j,"class","svelte-1b30dq3"),w(n,"id","map-position"),w(n,"class","svelte-1b30dq3")},m(t,e){h(t,n,e),c(n,i),c(i,o),c(i,r),c(i,s),c(i,a),c(a,l),c(i,u),c(i,f),c(i,_),c(i,y),c(i,b),c(i,T),c(i,C),c(i,E),c(i,L),c(i,k),c(i,P),c(i,S),c(i,M),c(i,A),c(i,z),c(i,N),c(n,D),c(n,j),c(j,O),I||(B=v(O,"click",xe),I=!0)},p(t,[e]){1&e&&x(r,t[0]),8&e&&w(a,"href",t[3]),2&e&&x(y,t[1]),4&e&&x(E,t[2]),16&e&&x(S,t[4]),32&e&&x(N,t[5])},i:t,o:t,d(t){t&&d(n),I=!1,B()}}}function xe(t){document.getElementById("map-position").style.display="none",document.getElementById("show-map-position").style.display="block"}function Te(t,e,n){let i,o,r,s,a,l,u;function c(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,r=t.getZoom()),n(2,s=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,u="-"),e&&n(5,u=[e.lat.toFixed(5),e.lng.toFixed(5)].join(",")),i&&n(4,l=[i.lat.toFixed(5),i.lng.toFixed(5)].join(","))}return ot.subscribe((t=>{t&&(t.on("move",(function(){c(t)})),t.on("mousemove",(function(e){c(t,e.latlng)})),t.on("click",(function(e){i=e.latlng,c(t)})),t.on("load",(function(){c(t)})))})),[o,r,s,a,l,u]}tt((function(t,e){!function(e,n){t.exports=e(be),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,r,s){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",r,s),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)}));class Ce extends Q{constructor(t){super(),X(this,t,Te,we,r,{})}}function Ee(e){let n,r,s,a,l,u,c,f;return n=new Ce({}),{c(){V(n.$$.fragment),r=g(),s=p("div"),a=g(),l=p("div"),l.textContent="show map bounds",w(s,"id","map"),w(s,"class","svelte-1vbvdrk"),w(l,"id","show-map-position"),w(l,"class","leaflet-bar btn btn-sm btn-outline-secondary svelte-1vbvdrk")},m(i,d){var p;G(n,i,d),h(i,r,d),h(i,s,d),h(i,a,d),h(i,l,d),u=!0,c||(f=[(p=e[0].call(null,s),p&&o(p.destroy)?p.destroy:t),v(l,"click",b(Le))],c=!0)},p:t,i(t){u||(W(n.$$.fragment,t),u=!0)},o(t){U(n.$$.fragment,t),u=!1},d(t){K(n,t),t&&d(r),t&&d(s),t&&d(a),t&&d(l),c=!1,i(f)}}}function Le(t){t.target.style.display="none",document.getElementById("map-position").style.display="block"}function ke(t,e,n){let{display_minimap:i=!1}=e,o=[];function r(t){let e=a(ot);if(!e)return;!function(){let t=a(ot);t&&o.forEach((function(e){t.removeLayer(e)}))}();let n=a(at);if(n){let t=be.circleMarker(n,{radius:5,weight:2,fillColor:"#ff7800",color:"red",opacity:.75,zIndexOffset:100,clickable:!1});t.addTo(e),o.push(t)}var i=new URLSearchParams(window.location.search).get("viewbox");if(i){let t=i.split(","),n=be.latLngBounds([t[1],t[0]],[t[3],t[2]]);be.rectangle(n,{color:"#69d53e",weight:3,dashArray:"5 5",opacity:.8,fill:!1}).addTo(e)}if(!t)return;let r=t.centroid?t.centroid.coordinates[1]:t.lat,s=t.centroid?t.centroid.coordinates[0]:t.lon,l=t.geometry||t.geojson;if(r&&s){let t=be.circleMarker([r,s],{radius:10,weight:2,fillColor:"#ff7800",color:"blue",opacity:.75});e.addLayer(t),o.push(t)}if(l){var u=be.geoJson({type:"FeatureCollection",features:[{type:"Feature",geometry:l,properties:{}}]},{style:()=>({interactive:!1,color:"blue"})});e.addLayer(u),o.push(u),e.fitBounds(u.getBounds())}else r&&s?e.setView([r,s],10):e.fitWorld()}return st.subscribe((t=>{r(t)})),t.$$set=t=>{"display_minimap"in t&&n(1,i=t.display_minimap)},[function(t){let e=function(t){const e=yt("Map_Tile_Attribution")||null;let n=new be.map(t,{attributionControl:e&&e.length,scrollWheelZoom:!0,touchZoom:!1,center:[yt("Map_Default_Lat"),yt("Map_Default_Lon")],zoom:yt("Map_Default_Zoom")});if(be.tileLayer(yt("Map_Tile_URL"),{attribution:e}).addTo(n),i){let t=new be.TileLayer(yt("Map_Tile_URL"),{minZoom:0,maxZoom:13,attribution:e});new be.Control.MiniMap(t,{toggleDisplay:!0}).addTo(n)}const o=be.Control.extend({options:{position:"topright"},onAdd:()=>document.getElementById("show-map-position")});return n.addControl(new o),n}(t);return ot.set(e),r(a(st)),{destroy:()=>{e.remove()}}},i]}class Pe extends Q{constructor(t){super(),X(this,t,ke,Ee,r,{display_minimap:1})}}function Se(t){let e,n,i,o,r,s,a,l,u;return e=new ie({props:{reverse_search:t[0],api_request_params:t[1],bStructuredSearch:t[2]}}),r=new ye({props:{reverse_search:t[0]}}),l=new Pe({props:{display_minimap:!0}}),{c(){V(e.$$.fragment),n=g(),i=p("div"),o=p("div"),V(r.$$.fragment),s=g(),a=p("div"),V(l.$$.fragment),w(o,"class","sidebar svelte-1wb4w3"),w(a,"id","map-wrapper"),w(a,"class","svelte-1wb4w3"),w(i,"id","content"),w(i,"class","svelte-1wb4w3")},m(t,d){G(e,t,d),h(t,n,d),h(t,i,d),c(i,o),G(r,o,null),c(i,s),c(i,a),G(l,a,null),u=!0},p(t,[n]){const i={};1&n&&(i.reverse_search=t[0]),2&n&&(i.api_request_params=t[1]),e.$set(i);const o={};1&n&&(o.reverse_search=t[0]),r.$set(o)},i(t){u||(W(e.$$.fragment,t),W(r.$$.fragment,t),W(l.$$.fragment,t),u=!0)},o(t){U(e.$$.fragment,t),U(r.$$.fragment,t),U(l.$$.fragment,t),u=!1},d(t){K(e,t),t&&d(n),t&&d(i),K(r),K(l)}}}function Me(t,e,n){let i,o,{reverse_search:r=!1}=e;function s(){let t=new URLSearchParams(window.location.search);if(Tt(),r)n(1,i={lat:t.get("lat"),lon:t.get("lon"),zoom:t.get("zoom")>1?Number(t.get("zoom")):Number(yt("Reverse_Default_Search_Zoom")),format:"jsonv2"}),(i.lat||i.lat)&&wt("reverse",i,(function(t){t&&!t.error?(at.set([i.lat,i.lon]),rt.set([t])):rt.set([]),Tt("Reverse result for "+i.lat+","+i.lon),document.querySelector("input[name=lat]").focus()}));else{n(1,i={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:yt("Search_AreaPolygons",!1)?1:0,viewbox:t.get("viewbox"),bounded:t.get("bounded"),dedupe:t.get("dedupe"),"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=i.street||i.city||i.county||i.state||i.country||i.postalcode;(i.q||e)&&wt("search",i,(function(t){rt.set(t),Tt("Result for "+i.q),document.querySelector("input[name=q]").focus()}))}}var a;return S((()=>{o=ut.subscribe(s)})),a=()=>{o()},P().$$.on_destroy.push(a),t.$$set=t=>{"reverse_search"in t&&n(0,r=t.reverse_search)},[r,i,undefined]}class Ae extends Q{constructor(t){super(),X(this,t,Me,Se,r,{reverse_search:0})}}function ze(e){let n,o,r,s,a,l,u,f,m,_,b,x,T,C,E,L,k,P;return{c(){n=p("div"),o=p("div"),r=p("div"),s=p("h1"),s.textContent="Show details for place",a=g(),l=p("div"),l.innerHTML='<h4 class="svelte-k5v90i">Search by place id</h4> \n\n        <form class="form-inline" action="details.html"><input type="edit" class="form-control form-control-sm svelte-k5v90i" pattern="^[0-9]+$" name="place_id" placeholder="12345"/> \n          <input type="submit" class="btn btn-primary btn-sm" value="Show"/></form>',u=g(),f=p("div"),m=p("h4"),m.textContent="Search by OSM type and OSM id",_=g(),b=p("form"),b.innerHTML='<input type="edit" class="form-control form-control-sm svelte-k5v90i" pattern="^[NWR][0-9]+$" placeholder="N123 or W123 or R123"/> \n          <input type="hidden" name="osmtype"/> \n          <input type="hidden" name="osmid"/> \n          <input type="submit" class="btn btn-primary btn-sm" value="Show"/>',x=g(),T=p("div"),C=p("h4"),C.textContent="Search by openstreetmap.org URL",E=g(),L=p("form"),L.innerHTML='<input type="edit" class="form-control form-control-sm svelte-k5v90i" pattern=".*openstreetmap.*" placeholder="https://www.openstreetmap.org/relation/123"/> \n          <input type="hidden" name="osmtype"/> \n          <input type="hidden" name="osmid"/> \n          <input type="submit" class="btn btn-primary btn-sm" value="Show"/>',w(l,"class","search-form svelte-k5v90i"),w(m,"class","svelte-k5v90i"),w(b,"id","form-by-type-and-id"),w(b,"class","form-inline"),w(b,"action","details.html"),w(f,"class","search-form svelte-k5v90i"),w(C,"class","svelte-k5v90i"),w(L,"id","form-by-osm-url"),w(L,"class","form-inline"),w(L,"action","details.html"),w(T,"class","search-form svelte-k5v90i"),w(r,"class","col-md-12"),w(o,"class","row"),w(n,"class","container"),w(n,"id","details-index-page")},m(t,e){h(t,n,e),c(n,o),c(o,r),c(r,s),c(r,a),c(r,l),c(r,u),c(r,f),c(f,m),c(f,_),c(f,b),c(r,x),c(r,T),c(T,C),c(T,E),c(T,L),k||(P=[v(b,"submit",y(Ne)),v(L,"submit",y(Ne))],k=!0)},p:t,i:t,o:t,d(t){t&&d(n),k=!1,i(P)}}}function Ne(t){let e=t.target,n=e.querySelector("input[type=edit]").value,i=n.match(/^\s*([NWR])(\d+)\s*$/i);i||(i=n.match(/\/(relation|way|node)\/(\d+)\s*$/)),i?(e.querySelector("input[name=osmtype]").setAttribute("value",i[1].charAt(0).toUpperCase()),e.querySelector("input[name=osmid]").setAttribute("value",i[2]),e.submit()):alert("invalid input")}class De extends Q{constructor(t){super(),X(this,t,null,ze,r,{})}}function je(e){let n;return{c(){n=p("span"),n.textContent="No Name",w(n,"class","noname svelte-rtfpp8")},m(t,e){h(t,n,e)},p:t,d(t){t&&d(n)}}}function Oe(t){let e,n=t[0].localname+"";return{c(){e=m(n)},m(t,n){h(t,e,n)},p(t,i){1&i&&n!==(n=t[0].localname+"")&&x(e,n)},d(t){t&&d(e)}}}function Ie(t){let e,n,i;return{c(){e=p("a"),n=m("details"),w(e,"href",i=zt(t[0]))},m(t,i){h(t,e,i),c(e,n)},p(t,n){1&n&&i!==(i=zt(t[0]))&&w(e,"href",i)},d(t){t&&d(e)}}}function Be(e){let n,i,o,r,s,a,l,u,f,_,v,y,b,T,E,L,k,P=It(e[0])+"",S=Mt(e[0])+"",M=e[0].rank_address+"",A=Bt(e[0].admin_level)+"",z=Rt(e[0].distance,e[1])+"";function N(t,e){return t[0].localname?Oe:je}let D=N(e),j=D(e),O=e[0].osm_id&&Ie(e);return{c(){n=p("tr"),i=p("td"),j.c(),o=g(),r=p("td"),s=m(P),a=g(),l=p("td"),u=g(),f=p("td"),_=m(M),v=g(),y=p("td"),b=m(A),T=g(),E=p("td"),L=g(),k=p("td"),O&&O.c(),w(i,"class","name svelte-rtfpp8"),w(n,"class","svelte-rtfpp8"),C(n,"notused",!e[2])},m(t,e){h(t,n,e),c(n,i),j.m(i,null),c(n,o),c(n,r),c(r,s),c(n,a),c(n,l),l.innerHTML=S,c(n,u),c(n,f),c(f,_),c(n,v),c(n,y),c(y,b),c(n,T),c(n,E),E.innerHTML=z,c(n,L),c(n,k),O&&O.m(k,null)},p(t,[e]){D===(D=N(t))&&j?j.p(t,e):(j.d(1),j=D(t),j&&(j.c(),j.m(i,null))),1&e&&P!==(P=It(t[0])+"")&&x(s,P),1&e&&S!==(S=Mt(t[0])+"")&&(l.innerHTML=S),1&e&&M!==(M=t[0].rank_address+"")&&x(_,M),1&e&&A!==(A=Bt(t[0].admin_level)+"")&&x(b,A),3&e&&z!==(z=Rt(t[0].distance,t[1])+"")&&(E.innerHTML=z),t[0].osm_id?O?O.p(t,e):(O=Ie(t),O.c(),O.m(k,null)):O&&(O.d(1),O=null),4&e&&C(n,"notused",!t[2])},i:t,o:t,d(t){t&&d(n),j.d(),O&&O.d()}}}function Re(t,e,n){let i,{addressLine:o}=e,{bDistanceInMeters:r}=e;return t.$$set=t=>{"addressLine"in t&&n(0,o=t.addressLine),"bDistanceInMeters"in t&&n(1,r=t.bDistanceInMeters)},t.$$.update=()=>{1&t.$$.dirty&&n(2,i=o.isaddress)},[o,r,i]}class Ze extends Q{constructor(t){super(),X(this,t,Re,Be,r,{addressLine:0,bDistanceInMeters:1})}}function $e(t,e,n){const i=t.slice();return i[3]=e[n],i}function He(t,e,n){const i=t.slice();return i[6]=e[n],i}function qe(t,e,n){const i=t.slice();return i[9]=e[n],i}function Fe(t,e,n){const i=t.slice();return i[9]=e[n],i}function We(t,e,n){const i=t.slice();return i[14]=e[n],i}function Ue(t,e,n){const i=t.slice();return i[14]=e[n],i}function Ve(t,e,n){const i=t.slice();return i[19]=e[n],i}function Ge(t,e,n){const i=t.slice();return i[19]=e[n],i}function Ke(t,e,n){const i=t.slice();return i[19]=e[n],i}function Ye(e){let n;return{c(){n=m("No such place found.")},m(t,e){h(t,n,e)},p:t,i:t,o:t,d(t){t&&d(n)}}}function Xe(e){let n,i;return n=new De({}),{c(){V(n.$$.fragment)},m(t,e){G(n,t,e),i=!0},p:t,i(t){i||(W(n.$$.fragment,t),i=!0)},o(t){U(n.$$.fragment,t),i=!1},d(t){K(n,t)}}}function Qe(t){let e,n,i,o,r,s,a,l,u,_,v,y,b,T,C,E,L,k,P,S,M,A,z,N,D,j,O,I,B,R,Z,$,H,Y,X,Q,J,tt,et,nt,it,ot,rt,st,at,lt,ut,ct,ht,dt,ft,pt,mt,gt,_t,vt,yt,bt,wt,xt,Tt,Ct,Et,Lt,kt,Pt,St,At,Nt,It,Bt,Rt,Zt,$t,Ht,qt,Ft,Wt,Ut,Vt,Gt,Kt,Yt,Xt,Qt,Jt,te,ee,ne,ie,oe,re,se,ae,ue,ce,he,de,fe,pe,me,ge,_e,ve,ye,be,we,xe,Te,Ce,Ee,Le,ke,Se,Me,Ae,ze,Ne,De=t[0].localname+"",je=t[0].category+"",Oe=t[0].type+"",Ie=t[0].indexed_date+"",Be=jt(t[0]),Re=t[0].rank_search+"",Ze=t[0].rank_address+"",$e=Ot(t[0].rank_address)+"",He=Dt(t[0])+"",qe=t[0].centroid.coordinates[1]+"",Fe=t[0].centroid.coordinates[0]+"",We=Mt(t[0])+"",Ue=t[0].place_id+"",Ye=t[0].calculated_postcode+"";b=new le({props:{aPlace:t[0]}});let Xe=Object.keys(t[0].names),Qe=[];for(let e=0;e<Xe.length;e+=1)Qe[e]=Je(Ke(t,Xe,e));let nn=Be&&tn(t),ln=t[0].calculated_importance&&en(t),cn=t[0].calculated_wikipedia&&on(t),fn=Object.keys(t[0].addresstags),pn=[];for(let e=0;e<fn.length;e+=1)pn[e]=rn(Ge(t,fn,e));let mn=Object.keys(t[0].extratags),gn=[];for(let e=0;e<mn.length;e+=1)gn[e]=sn(Ve(t,mn,e));fe=new Pe({});let yn=t[0].address&&an(t),bn=t[0].linked_places&&un(t);function wn(t,e){return t[0].keywords?dn:hn}let xn=wn(t),Tn=xn(t);const Cn=[vn,_n],En=[];function Ln(t,e){return t[0].hierarchy?0:1}return Ae=Ln(t),ze=En[Ae]=Cn[Ae](t),{c(){e=p("div"),n=p("div"),i=p("div"),o=p("h1"),r=m(De),s=g(),a=p("small"),l=p("a"),u=m("link to this page"),v=g(),y=p("div"),V(b.$$.fragment),T=g(),C=p("div"),E=p("div"),L=p("table"),k=p("tbody"),P=p("tr"),S=p("td"),S.textContent="Name",M=g(),A=p("td");for(let t=0;t<Qe.length;t+=1)Qe[t].c();z=g(),N=p("tr"),D=p("td"),D.textContent="Type",j=g(),O=p("td"),I=m(je),B=m(":"),R=m(Oe),Z=g(),$=p("tr"),H=p("td"),H.textContent="Last Updated",Y=g(),X=p("td"),Q=m(Ie),J=g(),nn&&nn.c(),tt=g(),et=p("tr"),nt=p("td"),nt.textContent="Search Rank",it=g(),ot=p("td"),rt=m(Re),st=g(),at=p("tr"),lt=p("td"),lt.textContent="Address Rank",ut=g(),ct=p("td"),ht=m(Ze),dt=m(" ("),ft=m($e),pt=m(")"),mt=g(),ln&&ln.c(),gt=g(),_t=p("tr"),vt=p("td"),vt.textContent="Coverage",yt=g(),bt=p("td"),wt=m(He),xt=g(),Tt=p("tr"),Ct=p("td"),Ct.textContent="Centre Point (lat,lon)",Et=g(),Lt=p("td"),kt=m(qe),Pt=m(","),St=m(Fe),At=g(),Nt=p("tr"),It=p("td"),It.textContent="OSM",Bt=g(),Rt=p("td"),Zt=g(),$t=p("tr"),Ht=p("td"),Ht.innerHTML='Place Id\n                (<a href="https://nominatim.org/release-docs/develop/api/Output/#place_id-is-not-a-persistent-id">on this server</a>)',qt=g(),Ft=p("td"),Wt=m(Ue),Ut=g(),cn&&cn.c(),Vt=g(),Gt=p("tr"),Kt=p("td"),Kt.textContent="Computed Postcode",Yt=g(),Xt=p("td"),Qt=m(Ye),Jt=g(),te=p("tr"),ee=p("td"),ee.textContent="Address Tags",ne=g(),ie=p("td");for(let t=0;t<pn.length;t+=1)pn[t].c();oe=g(),re=p("tr"),se=p("td"),se.textContent="Extra Tags",ae=g(),ue=p("td");for(let t=0;t<gn.length;t+=1)gn[t].c();ce=g(),he=p("div"),de=p("div"),V(fe.$$.fragment),pe=g(),me=p("div"),ge=p("div"),_e=p("h2"),_e.textContent="Address",ve=g(),ye=p("table"),be=p("thead"),be.innerHTML='<tr class="svelte-j6zgmy"><th class="svelte-j6zgmy">Local name</th> \n              <th class="svelte-j6zgmy">Type</th> \n              <th class="svelte-j6zgmy">OSM</th> \n              <th class="svelte-j6zgmy">Address rank</th> \n              <th class="svelte-j6zgmy">Admin level</th> \n              <th class="svelte-j6zgmy">Distance</th> \n              <th class="svelte-j6zgmy"></th></tr>',we=g(),xe=p("tbody"),yn&&yn.c(),Te=g(),bn&&bn.c(),Ce=g(),Ee=p("tr"),Ee.innerHTML='<td colspan="6" class="svelte-j6zgmy"><h2 class="svelte-j6zgmy">Keywords</h2></td>',Le=g(),Tn.c(),ke=g(),Se=p("tr"),Se.innerHTML='<td colspan="6" class="svelte-j6zgmy"><h2 class="svelte-j6zgmy">Parent Of</h2></td>',Me=g(),ze.c(),w(l,"href",_=zt(t[0])),w(l,"class","svelte-j6zgmy"),w(o,"class","svelte-j6zgmy"),w(i,"class","col-sm-10"),w(y,"class","col-sm-2 text-right"),w(n,"class","row"),w(S,"class","svelte-j6zgmy"),w(A,"class","svelte-j6zgmy"),w(P,"class","svelte-j6zgmy"),w(D,"class","svelte-j6zgmy"),w(O,"class","svelte-j6zgmy"),w(N,"class","svelte-j6zgmy"),w(H,"class","svelte-j6zgmy"),w(X,"class","svelte-j6zgmy"),w($,"class","svelte-j6zgmy"),w(nt,"class","svelte-j6zgmy"),w(ot,"class","svelte-j6zgmy"),w(et,"class","svelte-j6zgmy"),w(lt,"class","svelte-j6zgmy"),w(ct,"class","svelte-j6zgmy"),w(at,"class","svelte-j6zgmy"),w(vt,"class","svelte-j6zgmy"),w(bt,"class","svelte-j6zgmy"),w(_t,"class","svelte-j6zgmy"),w(Ct,"class","svelte-j6zgmy"),w(Lt,"class","svelte-j6zgmy"),w(Tt,"class","svelte-j6zgmy"),w(It,"class","svelte-j6zgmy"),w(Rt,"class","svelte-j6zgmy"),w(Nt,"class","svelte-j6zgmy"),w(Ht,"class","svelte-j6zgmy"),w(Ft,"class","svelte-j6zgmy"),w($t,"class","svelte-j6zgmy"),w(Kt,"class","svelte-j6zgmy"),w(Xt,"class","svelte-j6zgmy"),w(Gt,"class","svelte-j6zgmy"),w(ee,"class","svelte-j6zgmy"),w(ie,"class","svelte-j6zgmy"),w(te,"class","svelte-j6zgmy"),w(se,"class","svelte-j6zgmy"),w(ue,"class","svelte-j6zgmy"),w(re,"class","svelte-j6zgmy"),w(k,"class","svelte-j6zgmy"),w(L,"id","locationdetails"),w(L,"class","table table-striped svelte-j6zgmy"),w(E,"class","col-md-6"),w(de,"id","map-wrapper"),w(de,"class","svelte-j6zgmy"),w(he,"class","col-md-6"),w(C,"class","row"),w(_e,"class","svelte-j6zgmy"),w(be,"class","svelte-j6zgmy"),w(Ee,"class","all-columns svelte-j6zgmy"),w(Se,"class","all-columns svelte-j6zgmy"),w(xe,"class","svelte-j6zgmy"),w(ye,"id","address"),w(ye,"class","table table-striped table-small svelte-j6zgmy"),w(ge,"class","col-md-12"),w(me,"class","row"),w(e,"class","container")},m(t,d){h(t,e,d),c(e,n),c(n,i),c(i,o),c(o,r),c(o,s),c(o,a),c(a,l),c(l,u),c(n,v),c(n,y),G(b,y,null),c(e,T),c(e,C),c(C,E),c(E,L),c(L,k),c(k,P),c(P,S),c(P,M),c(P,A);for(let t=0;t<Qe.length;t+=1)Qe[t].m(A,null);c(k,z),c(k,N),c(N,D),c(N,j),c(N,O),c(O,I),c(O,B),c(O,R),c(k,Z),c(k,$),c($,H),c($,Y),c($,X),c(X,Q),c(k,J),nn&&nn.m(k,null),c(k,tt),c(k,et),c(et,nt),c(et,it),c(et,ot),c(ot,rt),c(k,st),c(k,at),c(at,lt),c(at,ut),c(at,ct),c(ct,ht),c(ct,dt),c(ct,ft),c(ct,pt),c(k,mt),ln&&ln.m(k,null),c(k,gt),c(k,_t),c(_t,vt),c(_t,yt),c(_t,bt),c(bt,wt),c(k,xt),c(k,Tt),c(Tt,Ct),c(Tt,Et),c(Tt,Lt),c(Lt,kt),c(Lt,Pt),c(Lt,St),c(k,At),c(k,Nt),c(Nt,It),c(Nt,Bt),c(Nt,Rt),Rt.innerHTML=We,c(k,Zt),c(k,$t),c($t,Ht),c($t,qt),c($t,Ft),c(Ft,Wt),c(k,Ut),cn&&cn.m(k,null),c(k,Vt),c(k,Gt),c(Gt,Kt),c(Gt,Yt),c(Gt,Xt),c(Xt,Qt),c(k,Jt),c(k,te),c(te,ee),c(te,ne),c(te,ie);for(let t=0;t<pn.length;t+=1)pn[t].m(ie,null);c(k,oe),c(k,re),c(re,se),c(re,ae),c(re,ue);for(let t=0;t<gn.length;t+=1)gn[t].m(ue,null);c(C,ce),c(C,he),c(he,de),G(fe,de,null),c(e,pe),c(e,me),c(me,ge),c(ge,_e),c(ge,ve),c(ge,ye),c(ye,be),c(ye,we),c(ye,xe),yn&&yn.m(xe,null),c(xe,Te),bn&&bn.m(xe,null),c(xe,Ce),c(xe,Ee),c(xe,Le),Tn.m(xe,null),c(xe,ke),c(xe,Se),c(xe,Me),En[Ae].m(xe,null),Ne=!0},p(t,e){(!Ne||1&e)&&De!==(De=t[0].localname+"")&&x(r,De),(!Ne||1&e&&_!==(_=zt(t[0])))&&w(l,"href",_);const n={};if(1&e&&(n.aPlace=t[0]),b.$set(n),1&e){let n;for(Xe=Object.keys(t[0].names),n=0;n<Xe.length;n+=1){const i=Ke(t,Xe,n);Qe[n]?Qe[n].p(i,e):(Qe[n]=Je(i),Qe[n].c(),Qe[n].m(A,null))}for(;n<Qe.length;n+=1)Qe[n].d(1);Qe.length=Xe.length}if((!Ne||1&e)&&je!==(je=t[0].category+"")&&x(I,je),(!Ne||1&e)&&Oe!==(Oe=t[0].type+"")&&x(R,Oe),(!Ne||1&e)&&Ie!==(Ie=t[0].indexed_date+"")&&x(Q,Ie),1&e&&(Be=jt(t[0])),Be?nn?nn.p(t,e):(nn=tn(t),nn.c(),nn.m(k,tt)):nn&&(nn.d(1),nn=null),(!Ne||1&e)&&Re!==(Re=t[0].rank_search+"")&&x(rt,Re),(!Ne||1&e)&&Ze!==(Ze=t[0].rank_address+"")&&x(ht,Ze),(!Ne||1&e)&&$e!==($e=Ot(t[0].rank_address)+"")&&x(ft,$e),t[0].calculated_importance?ln?ln.p(t,e):(ln=en(t),ln.c(),ln.m(k,gt)):ln&&(ln.d(1),ln=null),(!Ne||1&e)&&He!==(He=Dt(t[0])+"")&&x(wt,He),(!Ne||1&e)&&qe!==(qe=t[0].centroid.coordinates[1]+"")&&x(kt,qe),(!Ne||1&e)&&Fe!==(Fe=t[0].centroid.coordinates[0]+"")&&x(St,Fe),(!Ne||1&e)&&We!==(We=Mt(t[0])+"")&&(Rt.innerHTML=We),(!Ne||1&e)&&Ue!==(Ue=t[0].place_id+"")&&x(Wt,Ue),t[0].calculated_wikipedia?cn?cn.p(t,e):(cn=on(t),cn.c(),cn.m(k,Vt)):cn&&(cn.d(1),cn=null),(!Ne||1&e)&&Ye!==(Ye=t[0].calculated_postcode+"")&&x(Qt,Ye),1&e){let n;for(fn=Object.keys(t[0].addresstags),n=0;n<fn.length;n+=1){const i=Ge(t,fn,n);pn[n]?pn[n].p(i,e):(pn[n]=rn(i),pn[n].c(),pn[n].m(ie,null))}for(;n<pn.length;n+=1)pn[n].d(1);pn.length=fn.length}if(1&e){let n;for(mn=Object.keys(t[0].extratags),n=0;n<mn.length;n+=1){const i=Ve(t,mn,n);gn[n]?gn[n].p(i,e):(gn[n]=sn(i),gn[n].c(),gn[n].m(ue,null))}for(;n<gn.length;n+=1)gn[n].d(1);gn.length=mn.length}t[0].address?yn?(yn.p(t,e),1&e&&W(yn,1)):(yn=an(t),yn.c(),W(yn,1),yn.m(xe,Te)):yn&&(q(),U(yn,1,1,(()=>{yn=null})),F()),t[0].linked_places?bn?(bn.p(t,e),1&e&&W(bn,1)):(bn=un(t),bn.c(),W(bn,1),bn.m(xe,Ce)):bn&&(q(),U(bn,1,1,(()=>{bn=null})),F()),xn===(xn=wn(t))&&Tn?Tn.p(t,e):(Tn.d(1),Tn=xn(t),Tn&&(Tn.c(),Tn.m(xe,ke)));let i=Ae;Ae=Ln(t),Ae===i?En[Ae].p(t,e):(q(),U(En[i],1,1,(()=>{En[i]=null})),F(),ze=En[Ae],ze?ze.p(t,e):(ze=En[Ae]=Cn[Ae](t),ze.c()),W(ze,1),ze.m(xe,null))},i(t){Ne||(W(b.$$.fragment,t),W(fe.$$.fragment,t),W(yn),W(bn),W(ze),Ne=!0)},o(t){U(b.$$.fragment,t),U(fe.$$.fragment,t),U(yn),U(bn),U(ze),Ne=!1},d(t){t&&d(e),K(b),f(Qe,t),nn&&nn.d(),ln&&ln.d(),cn&&cn.d(),f(pn,t),f(gn,t),K(fe),yn&&yn.d(),bn&&bn.d(),Tn.d(),En[Ae].d()}}}function Je(t){let e,n,i,o,r,s,a=t[0].names[t[19]]+"",l=t[19]+"";return{c(){e=p("div"),n=p("span"),i=m(a),o=m(" ("),r=m(l),s=m(")\n                  "),w(n,"class","name svelte-j6zgmy"),w(e,"class","line")},m(t,a){h(t,e,a),c(e,n),c(n,i),c(e,o),c(e,r),c(e,s)},p(t,e){1&e&&a!==(a=t[0].names[t[19]]+"")&&x(i,a),1&e&&l!==(l=t[19]+"")&&x(r,l)},d(t){t&&d(e)}}}function tn(t){let e,n,i,o,r,s=t[0].admin_level+"";return{c(){e=p("tr"),n=p("td"),n.textContent="Admin Level",i=g(),o=p("td"),r=m(s),w(n,"class","svelte-j6zgmy"),w(o,"class","svelte-j6zgmy"),w(e,"class","svelte-j6zgmy")},m(t,s){h(t,e,s),c(e,n),c(e,i),c(e,o),c(o,r)},p(t,e){1&e&&s!==(s=t[0].admin_level+"")&&x(r,s)},d(t){t&&d(e)}}}function en(t){let e,n,i,o,r,s,a=t[0].calculated_importance+"",l=!t[0].importance&&nn();return{c(){e=p("tr"),n=p("td"),n.textContent="Importance",i=g(),o=p("td"),r=m(a),s=g(),l&&l.c(),w(n,"class","svelte-j6zgmy"),w(o,"class","svelte-j6zgmy"),w(e,"class","svelte-j6zgmy")},m(t,a){h(t,e,a),c(e,n),c(e,i),c(e,o),c(o,r),c(o,s),l&&l.m(o,null)},p(t,e){1&e&&a!==(a=t[0].calculated_importance+"")&&x(r,a),t[0].importance?l&&(l.d(1),l=null):l||(l=nn(),l.c(),l.m(o,null))},d(t){t&&d(e),l&&l.d()}}}function nn(t){let e;return{c(){e=m("(estimated)")},m(t,n){h(t,e,n)},d(t){t&&d(e)}}}function on(t){let e,n,i,o,r=Nt(t[0])+"";return{c(){e=p("tr"),n=p("td"),n.textContent="Wikipedia Calculated",i=g(),o=p("td"),w(n,"class","svelte-j6zgmy"),w(o,"class","svelte-j6zgmy"),w(e,"class","svelte-j6zgmy")},m(t,s){h(t,e,s),c(e,n),c(e,i),c(e,o),o.innerHTML=r},p(t,e){1&e&&r!==(r=Nt(t[0])+"")&&(o.innerHTML=r)},d(t){t&&d(e)}}}function rn(t){let e,n,i,o,r,s,a=t[0].addresstags[t[19]]+"",l=t[19]+"";return{c(){e=p("div"),n=p("span"),i=m(a),o=m(" ("),r=m(l),s=m(")\n                  "),w(n,"class","name svelte-j6zgmy"),w(e,"class","line")},m(t,a){h(t,e,a),c(e,n),c(n,i),c(e,o),c(e,r),c(e,s)},p(t,e){1&e&&a!==(a=t[0].addresstags[t[19]]+"")&&x(i,a),1&e&&l!==(l=t[19]+"")&&x(r,l)},d(t){t&&d(e)}}}function sn(t){let e,n,i,o,r,s,a=t[0].extratags[t[19]]+"",l=t[19]+"";return{c(){e=p("div"),n=p("span"),i=m(a),o=m(" ("),r=m(l),s=m(")\n                  "),w(n,"class","name svelte-j6zgmy"),w(e,"class","line")},m(t,a){h(t,e,a),c(e,n),c(n,i),c(e,o),c(e,r),c(e,s)},p(t,e){1&e&&a!==(a=t[0].extratags[t[19]]+"")&&x(i,a),1&e&&l!==(l=t[19]+"")&&x(r,l)},d(t){t&&d(e)}}}function an(t){let e,n,i=t[0].address,o=[];for(let e=0;e<i.length;e+=1)o[e]=ln(Ue(t,i,e));const r=t=>U(o[t],1,1,(()=>{o[t]=null}));return{c(){for(let t=0;t<o.length;t+=1)o[t].c();e=_()},m(t,i){for(let e=0;e<o.length;e+=1)o[e].m(t,i);h(t,e,i),n=!0},p(t,n){if(1&n){let s;for(i=t[0].address,s=0;s<i.length;s+=1){const r=Ue(t,i,s);o[s]?(o[s].p(r,n),W(o[s],1)):(o[s]=ln(r),o[s].c(),W(o[s],1),o[s].m(e.parentNode,e))}for(q(),s=i.length;s<o.length;s+=1)r(s);F()}},i(t){if(!n){for(let t=0;t<i.length;t+=1)W(o[t]);n=!0}},o(t){o=o.filter(Boolean);for(let t=0;t<o.length;t+=1)U(o[t]);n=!1},d(t){f(o,t),t&&d(e)}}}function ln(t){let e,n;return e=new Ze({props:{addressLine:t[14],bDistanceInMeters:"false"}}),{c(){V(e.$$.fragment)},m(t,i){G(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.addressLine=t[14]),e.$set(i)},i(t){n||(W(e.$$.fragment,t),n=!0)},o(t){U(e.$$.fragment,t),n=!1},d(t){K(e,t)}}}function un(t){let e,n,i,o,r=t[0].linked_places,s=[];for(let e=0;e<r.length;e+=1)s[e]=cn(We(t,r,e));const a=t=>U(s[t],1,1,(()=>{s[t]=null}));return{c(){e=p("tr"),e.innerHTML='<td colspan="6" class="svelte-j6zgmy"><h2 class="svelte-j6zgmy">Linked Places</h2></td>',n=g();for(let t=0;t<s.length;t+=1)s[t].c();i=_(),w(e,"class","all-columns svelte-j6zgmy")},m(t,r){h(t,e,r),h(t,n,r);for(let e=0;e<s.length;e+=1)s[e].m(t,r);h(t,i,r),o=!0},p(t,e){if(1&e){let n;for(r=t[0].linked_places,n=0;n<r.length;n+=1){const o=We(t,r,n);s[n]?(s[n].p(o,e),W(s[n],1)):(s[n]=cn(o),s[n].c(),W(s[n],1),s[n].m(i.parentNode,i))}for(q(),n=r.length;n<s.length;n+=1)a(n);F()}},i(t){if(!o){for(let t=0;t<r.length;t+=1)W(s[t]);o=!0}},o(t){s=s.filter(Boolean);for(let t=0;t<s.length;t+=1)U(s[t]);o=!1},d(t){t&&d(e),t&&d(n),f(s,t),t&&d(i)}}}function cn(t){let e,n;return e=new Ze({props:{addressLine:t[14],bDistanceInMeters:"true"}}),{c(){V(e.$$.fragment)},m(t,i){G(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.addressLine=t[14]),e.$set(i)},i(t){n||(W(e.$$.fragment,t),n=!0)},o(t){U(e.$$.fragment,t),n=!1},d(t){K(e,t)}}}function hn(e){let n,i,o,r;return{c(){n=p("tr"),i=p("td"),o=p("a"),r=m("display keywords"),w(o,"class","btn btn-outline-secondary btn-sm"),w(o,"href",e[1]+"&keywords=1"),w(i,"class","svelte-j6zgmy"),w(n,"class","svelte-j6zgmy")},m(t,e){h(t,n,e),c(n,i),c(i,o),c(o,r)},p:t,d(t){t&&d(n)}}}function dn(t){let e,n,i,o,r,s,a=t[0].keywords.name,l=[];for(let e=0;e<a.length;e+=1)l[e]=pn(Fe(t,a,e));let u=t[0].keywords.address,c=[];for(let e=0;e<u.length;e+=1)c[e]=gn(qe(t,u,e));return{c(){e=p("tr"),e.innerHTML='<td colspan="6" class="svelte-j6zgmy"><h3 class="svelte-j6zgmy">Name Keywords</h3></td>',n=g();for(let t=0;t<l.length;t+=1)l[t].c();i=g(),o=p("tr"),o.innerHTML='<td colspan="6" class="svelte-j6zgmy"><h3 class="svelte-j6zgmy">Address Keywords</h3></td>',r=g();for(let t=0;t<c.length;t+=1)c[t].c();s=_(),w(e,"class","all-columns svelte-j6zgmy"),w(o,"class","all-columns svelte-j6zgmy")},m(t,a){h(t,e,a),h(t,n,a);for(let e=0;e<l.length;e+=1)l[e].m(t,a);h(t,i,a),h(t,o,a),h(t,r,a);for(let e=0;e<c.length;e+=1)c[e].m(t,a);h(t,s,a)},p(t,e){if(1&e){let n;for(a=t[0].keywords.name,n=0;n<a.length;n+=1){const o=Fe(t,a,n);l[n]?l[n].p(o,e):(l[n]=pn(o),l[n].c(),l[n].m(i.parentNode,i))}for(;n<l.length;n+=1)l[n].d(1);l.length=a.length}if(1&e){let n;for(u=t[0].keywords.address,n=0;n<u.length;n+=1){const i=qe(t,u,n);c[n]?c[n].p(i,e):(c[n]=gn(i),c[n].c(),c[n].m(s.parentNode,s))}for(;n<c.length;n+=1)c[n].d(1);c.length=u.length}},d(t){t&&d(e),t&&d(n),f(l,t),t&&d(i),t&&d(o),t&&d(r),f(c,t),t&&d(s)}}}function fn(t){let e,n,i,o=t[9].id+"";return{c(){e=p("td"),n=m("word id: "),i=m(o),w(e,"class","svelte-j6zgmy")},m(t,o){h(t,e,o),c(e,n),c(e,i)},p(t,e){1&e&&o!==(o=t[9].id+"")&&x(i,o)},d(t){t&&d(e)}}}function pn(t){let e,n,i,o,r=Zt(t[9].token)+"",s=t[9].id&&fn(t);return{c(){e=p("tr"),n=p("td"),i=m(r),o=g(),s&&s.c(),w(n,"class","svelte-j6zgmy"),w(e,"class","svelte-j6zgmy")},m(t,r){h(t,e,r),c(e,n),c(n,i),c(e,o),s&&s.m(e,null)},p(t,n){1&n&&r!==(r=Zt(t[9].token)+"")&&x(i,r),t[9].id?s?s.p(t,n):(s=fn(t),s.c(),s.m(e,null)):s&&(s.d(1),s=null)},d(t){t&&d(e),s&&s.d()}}}function mn(t){let e,n,i,o=t[9].id+"";return{c(){e=p("td"),n=m("word id: "),i=m(o),w(e,"class","svelte-j6zgmy")},m(t,o){h(t,e,o),c(e,n),c(e,i)},p(t,e){1&e&&o!==(o=t[9].id+"")&&x(i,o)},d(t){t&&d(e)}}}function gn(t){let e,n,i,o,r,s=Zt(t[9].token)+"",a=t[9].id&&mn(t);return{c(){e=p("tr"),n=p("td"),i=m(s),o=g(),a&&a.c(),r=g(),w(n,"class","svelte-j6zgmy"),w(e,"class","svelte-j6zgmy")},m(t,s){h(t,e,s),c(e,n),c(n,i),c(e,o),a&&a.m(e,null),c(e,r)},p(t,n){1&n&&s!==(s=Zt(t[9].token)+"")&&x(i,s),t[9].id?a?a.p(t,n):(a=mn(t),a.c(),a.m(e,r)):a&&(a.d(1),a=null)},d(t){t&&d(e),a&&a.d()}}}function _n(e){let n,i,o,r;return{c(){n=p("tr"),i=p("td"),o=p("a"),r=m("display child places"),w(o,"class","btn btn-outline-secondary btn-sm"),w(o,"href",e[1]+"&hierarchy=1"),w(i,"class","svelte-j6zgmy"),w(n,"class","svelte-j6zgmy")},m(t,e){h(t,n,e),c(n,i),c(i,o),c(o,r)},p:t,i:t,o:t,d(t){t&&d(n)}}}function vn(t){let e,n,i,o=Object.keys(t[0].hierarchy)>500,r=Object.keys(t[0].hierarchy),s=[];for(let e=0;e<r.length;e+=1)s[e]=bn($e(t,r,e));const a=t=>U(s[t],1,1,(()=>{s[t]=null}));let l=o&&wn();return{c(){for(let t=0;t<s.length;t+=1)s[t].c();e=g(),l&&l.c(),n=_()},m(t,o){for(let e=0;e<s.length;e+=1)s[e].m(t,o);h(t,e,o),l&&l.m(t,o),h(t,n,o),i=!0},p(t,i){if(1&i){let n;for(r=Object.keys(t[0].hierarchy),n=0;n<r.length;n+=1){const o=$e(t,r,n);s[n]?(s[n].p(o,i),W(s[n],1)):(s[n]=bn(o),s[n].c(),W(s[n],1),s[n].m(e.parentNode,e))}for(q(),n=r.length;n<s.length;n+=1)a(n);F()}1&i&&(o=Object.keys(t[0].hierarchy)>500),o?l||(l=wn(),l.c(),l.m(n.parentNode,n)):l&&(l.d(1),l=null)},i(t){if(!i){for(let t=0;t<r.length;t+=1)W(s[t]);i=!0}},o(t){s=s.filter(Boolean);for(let t=0;t<s.length;t+=1)U(s[t]);i=!1},d(t){f(s,t),t&&d(e),l&&l.d(t),t&&d(n)}}}function yn(t){let e,n;return e=new Ze({props:{addressLine:t[6],bDistanceInMeters:"true"}}),{c(){V(e.$$.fragment)},m(t,i){G(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.addressLine=t[6]),e.$set(i)},i(t){n||(W(e.$$.fragment,t),n=!0)},o(t){U(e.$$.fragment,t),n=!1},d(t){K(e,t)}}}function bn(t){let e,n,i,o,r,s,a,l=t[3]+"",u=t[0].hierarchy[t[3]],v=[];for(let e=0;e<u.length;e+=1)v[e]=yn(He(t,u,e));const y=t=>U(v[t],1,1,(()=>{v[t]=null}));return{c(){e=p("tr"),n=p("td"),i=p("h3"),o=m(l),r=g();for(let t=0;t<v.length;t+=1)v[t].c();s=_(),w(i,"class","svelte-j6zgmy"),w(n,"colspan","6"),w(n,"class","svelte-j6zgmy"),w(e,"class","all-columns svelte-j6zgmy")},m(t,l){h(t,e,l),c(e,n),c(n,i),c(i,o),h(t,r,l);for(let e=0;e<v.length;e+=1)v[e].m(t,l);h(t,s,l),a=!0},p(t,e){if((!a||1&e)&&l!==(l=t[3]+"")&&x(o,l),1&e){let n;for(u=t[0].hierarchy[t[3]],n=0;n<u.length;n+=1){const i=He(t,u,n);v[n]?(v[n].p(i,e),W(v[n],1)):(v[n]=yn(i),v[n].c(),W(v[n],1),v[n].m(s.parentNode,s))}for(q(),n=u.length;n<v.length;n+=1)y(n);F()}},i(t){if(!a){for(let t=0;t<u.length;t+=1)W(v[t]);a=!0}},o(t){v=v.filter(Boolean);for(let t=0;t<v.length;t+=1)U(v[t]);a=!1},d(t){t&&d(e),t&&d(r),f(v,t),t&&d(s)}}}function wn(t){let e;return{c(){e=p("p"),e.textContent="There are more child objects which are not shown."},m(t,n){h(t,e,n)},d(t){t&&d(e)}}}function xn(t){let e,n,i,o;const r=[Qe,Xe,Ye],s=[];function a(t,e){return t[0]?0:""===location.search?1:2}return e=a(t),n=s[e]=r[e](t),{c(){n.c(),i=_()},m(t,n){s[e].m(t,n),h(t,i,n),o=!0},p(t,[o]){let l=e;e=a(t),e===l?s[e].p(t,o):(q(),U(s[l],1,1,(()=>{s[l]=null})),F(),n=s[e],n?n.p(t,o):(n=s[e]=r[e](t),n.c()),W(n,1),n.m(i.parentNode,i))},i(t){o||(W(n),o=!0)},o(t){U(n),o=!1},d(t){s[e].d(t),t&&d(i)}}}function Tn(t,e,n){let i,o=window.location.search;return S((function(){var t=new URLSearchParams(window.location.search),e={place_id:t.get("place_id"),osmtype:t.get("osmtype"),osmid:t.get("osmid"),class:t.get("class"),keywords:t.get("keywords"),addressdetails:1,hierarchy:"1"===t.get("hierarchy")?1:0,group_hierarchy:1,polygon_geojson:1,format:"json"};e.place_id||e.osmtype&&e.osmid?(Tt(e.place_id?"Details for "+e.place_id:"Details for "+e.osmtype+e.osmid),wt("details",e,(function(t){n(0,i=t),st.set(t)}))):n(0,i=void 0)})),[i,o]}class Cn extends Q{constructor(t){super(),X(this,t,Tn,xn,r,{})}}function En(t,e,n){const i=t.slice();return i[2]=e[n],i}function Ln(t){let e,n,i,o,r,s,a,l,u,f,_,v,y,b,T,C,E,L,k,P,S,M,A,z,N,D,j,O,I,B=t[2].osm_type+"",R=Mt(t[2])+"",Z=t[2].class+"",$=t[2].type+"",H=t[2].name+"",q=(t[2].country_code||"")+"",F=t[2].errormessage+"",W=t[2].updated+"";return{c(){e=p("tr"),n=p("td"),i=m(B),o=g(),r=p("td"),s=g(),a=p("td"),l=m(Z),u=g(),f=p("td"),_=m($),v=g(),y=p("td"),b=m(H),T=g(),C=p("td"),E=m(q),L=g(),k=p("td"),P=m(F),S=g(),M=p("td"),A=m(W),z=g(),N=p("td"),D=p("a"),j=m("josm"),I=g(),w(D,"href",O="http://localhost:8111/import?url=https://www.openstreetmap.org/api/0.6/"+St(t[2].osm_type)+"/"+t[2].osm_id+"/full"),w(D,"target","josm")},m(t,d){h(t,e,d),c(e,n),c(n,i),c(e,o),c(e,r),r.innerHTML=R,c(e,s),c(e,a),c(a,l),c(e,u),c(e,f),c(f,_),c(e,v),c(e,y),c(y,b),c(e,T),c(e,C),c(C,E),c(e,L),c(e,k),c(k,P),c(e,S),c(e,M),c(M,A),c(e,z),c(e,N),c(N,D),c(D,j),c(e,I)},p(t,e){1&e&&B!==(B=t[2].osm_type+"")&&x(i,B),1&e&&R!==(R=Mt(t[2])+"")&&(r.innerHTML=R),1&e&&Z!==(Z=t[2].class+"")&&x(l,Z),1&e&&$!==($=t[2].type+"")&&x(_,$),1&e&&H!==(H=t[2].name+"")&&x(b,H),1&e&&q!==(q=(t[2].country_code||"")+"")&&x(E,q),1&e&&F!==(F=t[2].errormessage+"")&&x(P,F),1&e&&W!==(W=t[2].updated+"")&&x(A,W),1&e&&O!==(O="http://localhost:8111/import?url=https://www.openstreetmap.org/api/0.6/"+St(t[2].osm_type)+"/"+t[2].osm_id+"/full")&&w(D,"href",O)},d(t){t&&d(e)}}}function kn(e){let n,i,o,r,s,a,l,u,_,v,y,b,T,C,E=e[0].length+"",L=e[0],k=[];for(let t=0;t<L.length;t+=1)k[t]=Ln(En(e,L,t));return{c(){n=p("div"),i=p("div"),o=p("div"),r=p("h1"),r.textContent="Broken polygons",s=g(),a=p("p"),l=m("Total number of broken polygons: "),u=m(E),_=m("."),v=g(),y=p("table"),b=p("thead"),b.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>",T=g(),C=p("tbody");for(let t=0;t<k.length;t+=1)k[t].c();w(y,"class","table table-striped table-hover"),w(o,"class","col-sm-12"),w(i,"class","row"),w(n,"class","container")},m(t,e){h(t,n,e),c(n,i),c(i,o),c(o,r),c(o,s),c(o,a),c(a,l),c(a,u),c(a,_),c(o,v),c(o,y),c(y,b),c(y,T),c(y,C);for(let t=0;t<k.length;t+=1)k[t].m(C,null)},p(t,[e]){if(1&e&&E!==(E=t[0].length+"")&&x(u,E),1&e){let n;for(L=t[0],n=0;n<L.length;n+=1){const i=En(t,L,n);k[n]?k[n].p(i,e):(k[n]=Ln(i),k[n].c(),k[n].m(C,null))}for(;n<k.length;n+=1)k[n].d(1);k.length=L.length}},i:t,o:t,d(t){t&&d(n),f(k,t)}}}function Pn(t,e,n){let i=[];return S((function(){wt("polygons",{format:"json"},(function(t){n(0,i=t)})),Tt("Broken polygons")})),[i]}class Sn extends Q{constructor(t){super(),X(this,t,Pn,kn,r,{})}}function Mn(t,e,n){const i=t.slice();return i[2]=e[n],i}function An(t){let e,n,i,o,r,s,a,l,u,f,_,v,y,b,T,C,E,L,k,P,S,M,A,z=t[2].place_id+"",N=t[2].country_code+"",D=t[2].name+"",j=Mt(t[2])+"",O=t[2].osm_type+"",I=t[2].class+"",B=t[2].type+"";return{c(){e=p("tr"),n=p("td"),i=p("a"),o=m(z),s=g(),a=p("td"),l=m(N),u=g(),f=p("td"),_=m(D),v=g(),y=p("td"),b=g(),T=p("td"),C=m(O),E=g(),L=p("td"),k=m(I),P=g(),S=p("td"),M=m(B),A=g(),w(i,"href",r=zt(t[2]))},m(t,r){h(t,e,r),c(e,n),c(n,i),c(i,o),c(e,s),c(e,a),c(a,l),c(e,u),c(e,f),c(f,_),c(e,v),c(e,y),y.innerHTML=j,c(e,b),c(e,T),c(T,C),c(e,E),c(e,L),c(L,k),c(e,P),c(e,S),c(S,M),c(e,A)},p(t,e){1&e&&z!==(z=t[2].place_id+"")&&x(o,z),1&e&&r!==(r=zt(t[2]))&&w(i,"href",r),1&e&&N!==(N=t[2].country_code+"")&&x(l,N),1&e&&D!==(D=t[2].name+"")&&x(_,D),1&e&&j!==(j=Mt(t[2])+"")&&(y.innerHTML=j),1&e&&O!==(O=t[2].osm_type+"")&&x(C,O),1&e&&I!==(I=t[2].class+"")&&x(k,I),1&e&&B!==(B=t[2].type+"")&&x(M,B)},d(t){t&&d(e)}}}function zn(e){let n,i,o,r,s,a,l,u,_,v,y,b,T,C=e[0].length+"",E=e[0],L=[];for(let t=0;t<E.length;t+=1)L[t]=An(Mn(e,E,t));return{c(){n=p("div"),i=p("div"),o=p("div"),r=p("h1"),r.textContent="Deletable",s=g(),a=p("p"),l=m(C),u=m(" objects have been deleted in OSM but are still in the Nominatim database."),_=g(),v=p("table"),y=p("thead"),y.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>",b=g(),T=p("tbody");for(let t=0;t<L.length;t+=1)L[t].c();w(v,"class","table table-striped table-hover"),w(o,"class","col-sm-12"),w(i,"class","row"),w(n,"class","container")},m(t,e){h(t,n,e),c(n,i),c(i,o),c(o,r),c(o,s),c(o,a),c(a,l),c(a,u),c(o,_),c(o,v),c(v,y),c(v,b),c(v,T);for(let t=0;t<L.length;t+=1)L[t].m(T,null)},p(t,[e]){if(1&e&&C!==(C=t[0].length+"")&&x(l,C),1&e){let n;for(E=t[0],n=0;n<E.length;n+=1){const i=Mn(t,E,n);L[n]?L[n].p(i,e):(L[n]=An(i),L[n].c(),L[n].m(T,null))}for(;n<L.length;n+=1)L[n].d(1);L.length=E.length}},i:t,o:t,d(t){t&&d(n),f(L,t)}}}function Nn(t,e,n){let i=[];return S((function(){wt("deletable",{format:"json"},(function(t){n(0,i=t)})),Tt("Deletable objects")})),[i]}class Dn extends Q{constructor(t){super(),X(this,t,Nn,zn,r,{})}}function jn(t){let e,n;return e=new Sn({}),{c(){V(e.$$.fragment)},m(t,i){G(e,t,i),n=!0},i(t){n||(W(e.$$.fragment,t),n=!0)},o(t){U(e.$$.fragment,t),n=!1},d(t){K(e,t)}}}function On(t){let e,n;return e=new Dn({}),{c(){V(e.$$.fragment)},m(t,i){G(e,t,i),n=!0},i(t){n||(W(e.$$.fragment,t),n=!0)},o(t){U(e.$$.fragment,t),n=!1},d(t){K(e,t)}}}function In(t){let e,n;return e=new Cn({}),{c(){V(e.$$.fragment)},m(t,i){G(e,t,i),n=!0},i(t){n||(W(e.$$.fragment,t),n=!0)},o(t){U(e.$$.fragment,t),n=!1},d(t){K(e,t)}}}function Bn(t){let e,n;return e=new Ae({props:{reverse_search:!0}}),{c(){V(e.$$.fragment)},m(t,i){G(e,t,i),n=!0},i(t){n||(W(e.$$.fragment,t),n=!0)},o(t){U(e.$$.fragment,t),n=!1},d(t){K(e,t)}}}function Rn(t){let e,n;return e=new Ae({props:{reverse_search:!1}}),{c(){V(e.$$.fragment)},m(t,i){G(e,t,i),n=!0},i(t){n||(W(e.$$.fragment,t),n=!0)},o(t){U(e.$$.fragment,t),n=!1},d(t){K(e,t)}}}function Zn(t){let e,n,i,o,r,s,a,l,u;e=new pt({});const c=[Rn,Bn,In,On,jn],f=[];function p(t,e){return"search"===t[0]?0:"reverse"===t[0]?1:"details"===t[0]?2:"deletable"===t[0]?3:"polygons"===t[0]?4:-1}return~(i=p(t))&&(o=f[i]=c[i](t)),s=new gt({}),l=new vt({}),{c(){V(e.$$.fragment),n=g(),o&&o.c(),r=g(),V(s.$$.fragment),a=g(),V(l.$$.fragment)},m(t,o){G(e,t,o),h(t,n,o),~i&&f[i].m(t,o),h(t,r,o),G(s,t,o),h(t,a,o),G(l,t,o),u=!0},p(t,[e]){let n=i;i=p(t),i!==n&&(o&&(q(),U(f[n],1,1,(()=>{f[n]=null})),F()),~i?(o=f[i],o||(o=f[i]=c[i](t),o.c()),W(o,1),o.m(r.parentNode,r)):o=null)},i(t){u||(W(e.$$.fragment,t),W(o),W(s.$$.fragment,t),W(l.$$.fragment,t),u=!0)},o(t){U(e.$$.fragment,t),U(o),U(s.$$.fragment,t),U(l.$$.fragment,t),u=!1},d(t){K(e,t),t&&d(n),~i&&f[i].d(t),t&&d(r),K(s,t),t&&d(a),K(l,t)}}}function $n(t,e,n){let i,o;var r,a;return r=ut,a=t=>n(1,o=t),t.$$.on_destroy.push(s(r,a)),ct(),t.$$.update=()=>{2&t.$$.dirty&&n(0,i=o.tab)},[i,o]}let Hn=[];new class extends Q{constructor(t){super(),X(this,t,$n,Zn,r,{})}}({target:document.body}),document.addEventListener("click",(function(t){for(var e=t.target;e&&e!=this;e=e.parentNode)if(e.matches("a")){var n=e.href;if(!(i=n)||0!==i.indexOf("?")&&0!==i.indexOf("/")&&(0===i.indexOf("#")||i.match(/^http/)||i.match(/\.html/)))return;t.preventDefault(),t.stopPropagation(),window.history.pushState(Hn,"",n),ct();break}var i})),window.onpopstate=function(){ct()}}();
+     */var be=tt((function(t,e){!function(t){var e="1.7.1";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 r=0;function s(t){return t._leaflet_id=t._leaflet_id||++r,t._leaflet_id}function a(t,e,n){var i,o,r,s;return s=function(){i=!1,o&&(r.apply(n,o),o=!1)},r=function(){i?o=arguments:(t.apply(n,arguments),setTimeout(s,e),i=!0)}}function l(t,e,n){var i=e[1],o=e[0],r=i-o;return t===i&&n?t:((t-o)%r+r)%r+o}function u(){return!1}function c(t,e){var n=Math.pow(10,void 0===e?6:e);return Math.round(t*n)/n}function h(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function d(t){return h(t).split(/\s+/)}function f(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 p(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 m=/\{ *([\w_-]+) *\}/g;function g(t,e){return t.replace(m,(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 _=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 T=window.requestAnimationFrame||b("RequestAnimationFrame")||x,C=window.cancelAnimationFrame||b("CancelAnimationFrame")||b("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function E(t,e,n){if(!n||T!==x)return T.call(window,o(t,e));t.call(e)}function k(t){t&&C.call(window,t)}var P={extend:n,create:i,bind:o,lastId:r,stamp:s,throttle:a,wrapNum:l,falseFn:u,formatNum:c,trim:h,splitWords:d,setOptions:f,getParamString:p,template:g,isArray:_,indexOf:v,emptyImageUrl:y,requestFn:T,cancelFn:C,requestAnimFrame:E,cancelAnimFrame:k};function S(){}function M(t){if("undefined"!=typeof L&&L&&L.Mixin){t=_(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)}}S.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},o=e.__super__=this.prototype,r=i(o);for(var s in r.constructor=e,e.prototype=r,this)Object.prototype.hasOwnProperty.call(this,s)&&"prototype"!==s&&"__super__"!==s&&(e[s]=this[s]);return t.statics&&(n(e,t.statics),delete t.statics),t.includes&&(M(t.includes),n.apply(null,[r].concat(t.includes)),delete t.includes),r.options&&(t.options=n(i(r.options),t.options)),n(r,t),r._initHooks=[],r.callInitHooks=function(){if(!this._initHooksCalled){o.callInitHooks&&o.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=r._initHooks.length;t<e;t++)r._initHooks[t].call(this)}},e},S.include=function(t){return n(this.prototype,t),this},S.mergeOptions=function(t){return n(this.prototype.options,t),this},S.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,r=(t=d(t)).length;o<r;o++)this._on(t[o],e,n);return this},off:function(t,e,n){if(t)if("object"==typeof t)for(var i in t)this._off(i,t[i],e);else for(var o=0,r=(t=d(t)).length;o<r;o++)this._off(t[o],e,n);else delete this._events;return this},_on:function(t,e,n){this._events=this._events||{};var i=this._events[t];i||(i=[],this._events[t]=i),n===this&&(n=void 0);for(var o={fn:e,ctx:n},r=i,s=0,a=r.length;s<a;s++)if(r[s].fn===e&&r[s].ctx===n)return;r.push(o)},_off:function(t,e,n){var i,o,r;if(this._events&&(i=this._events[t]))if(e){if(n===this&&(n=void 0),i)for(o=0,r=i.length;o<r;o++){var s=i[o];if(s.ctx===n&&s.fn===e)return s.fn=u,this._firingCount&&(this._events[t]=i=i.slice()),void i.splice(o,1)}}else{for(o=0,r=i.length;o<r;o++)i[o].fn=u;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 r=this._events[t];if(r){this._firingCount=this._firingCount+1||1;for(var s=0,a=r.length;s<a;s++){var l=r[s];l.fn.call(l.ctx||this,o)}this._firingCount--}}return i&&this._propagateEvent(o),this},listens:function(t,e){var n=this._events&&this._events[t];if(n&&n.length)return!0;if(e)for(var i in this._eventParents)if(this._eventParents[i].listens(t,e))return!0;return!1},once:function(t,e,n){if("object"==typeof t){for(var i in t)this.once(i,t[i],e);return this}var r=o((function(){this.off(t,e,n).off(t,r,n)}),this);return this.on(t,e,n).on(t,r,n)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[s(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[s(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 z=S.extend(A);function N(t,e,n){this.x=n?Math.round(t):t,this.y=n?Math.round(e):e}var D=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function j(t,e,n){return t instanceof N?t:_(t)?new N(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new N(t.x,t.y):new N(t,e,n)}function O(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i<o;i++)this.extend(n[i])}function I(t,e){return!t||t instanceof O?t:new O(t,e)}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 R(t,e){return t instanceof B?t:new B(t,e)}function Z(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 $(t,e,n){return t instanceof Z?t:_(t)&&"object"!=typeof t[0]?3===t.length?new Z(t[0],t[1],t[2]):2===t.length?new Z(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new Z(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new Z(t,e,n)}N.prototype={clone:function(){return new N(this.x,this.y)},add:function(t){return this.clone()._add(j(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(j(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 N(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new N(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=D(this.x),this.y=D(this.y),this},distanceTo:function(t){var e=(t=j(t)).x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},equals:function(t){return(t=j(t)).x===this.x&&t.y===this.y},contains:function(t){return t=j(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+c(this.x)+", "+c(this.y)+")"}},O.prototype={extend:function(t){return t=j(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new N((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new N(this.min.x,this.max.y)},getTopRight:function(){return new N(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 N?j(t):I(t))instanceof O?(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=I(t);var e=this.min,n=this.max,i=t.min,o=t.max,r=o.x>=e.x&&i.x<=n.x,s=o.y>=e.y&&i.y<=n.y;return r&&s},overlaps:function(t){t=I(t);var e=this.min,n=this.max,i=t.min,o=t.max,r=o.x>e.x&&i.x<n.x,s=o.y>e.y&&i.y<n.y;return r&&s},isValid:function(){return!(!this.min||!this.max)}},B.prototype={extend:function(t){var e,n,i=this._southWest,o=this._northEast;if(t instanceof Z)e=t,n=t;else{if(!(t instanceof B))return t?this.extend($(t)||R(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 Z(e.lat,e.lng),this._northEast=new Z(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 B(new Z(e.lat-i,e.lng-o),new Z(n.lat+i,n.lng+o))},getCenter:function(){return new Z((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 Z(this.getNorth(),this.getWest())},getSouthEast:function(){return new Z(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 Z||"lat"in t?$(t):R(t);var e,n,i=this._southWest,o=this._northEast;return t instanceof B?(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=R(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>=e.lat&&i.lat<=n.lat,s=o.lng>=e.lng&&i.lng<=n.lng;return r&&s},overlaps:function(t){t=R(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>e.lat&&i.lat<n.lat,s=o.lng>e.lng&&i.lng<n.lng;return r&&s},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=R(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},Z.prototype={equals:function(t,e){return!!t&&(t=$(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("+c(this.lat,t)+", "+c(this.lng,t)+")"},distanceTo:function(t){return F.distance(this,$(t))},wrap:function(){return F.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,n=e/Math.cos(Math.PI/180*this.lat);return R([this.lat-e,this.lng-n],[this.lat+e,this.lng+n])},clone:function(){return new Z(this.lat,this.lng,this.alt)}};var H,q={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 O(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 Z(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 r=t.getSouthWest(),s=t.getNorthEast();return new B(new Z(r.lat-i,r.lng-o),new Z(s.lat-i,s.lng-o))}},F=n({},q,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var n=Math.PI/180,i=t.lat*n,o=e.lat*n,r=Math.sin((e.lat-t.lat)*n/2),s=Math.sin((e.lng-t.lng)*n/2),a=r*r+Math.cos(i)*Math.cos(o)*s*s,l=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*l}}),W=6378137,U={R:W,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 N(this.R*t.lng*e,this.R*Math.log((1+o)/(1-o))/2)},unproject:function(t){var e=180/Math.PI;return new Z((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(H=W*Math.PI,new O([-H,-H],[H,H]))};function V(t,e,n,i){if(_(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 G(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 N((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var K=n({},F,{code:"EPSG:3857",projection:U,transformation:function(){var t=.5/(Math.PI*U.R);return G(t,.5,-t,.5)}()}),Y=n({},K,{code:"EPSG:900913"});function X(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Q(t,e){var n,i,o,r,s,a,l="";for(n=0,o=t.length;n<o;n++){for(i=0,r=(s=t[n]).length;i<r;i++)l+=(i?"L":"M")+(a=s[i]).x+" "+a.y;l+=e?Mt?"z":"x":""}return l||"M0 0"}var J=document.documentElement.style,tt="ActiveXObject"in window,et=tt&&!document.addEventListener,nt="msLaunchUri"in navigator&&!("documentMode"in document),it=zt("webkit"),ot=zt("android"),rt=zt("android 2")||zt("android 3"),st=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),at=ot&&zt("Google")&&st<537&&!("AudioNode"in window),lt=!!window.opera,ut=!nt&&zt("chrome"),ct=zt("gecko")&&!it&&!lt&&!tt,ht=!ut&&zt("safari"),dt=zt("phantom"),ft="OTransition"in J,pt=0===navigator.platform.indexOf("Win"),mt=tt&&"transition"in J,gt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!rt,_t="MozPerspective"in J,vt=!window.L_DISABLE_3D&&(mt||gt||_t)&&!ft&&!dt,yt="undefined"!=typeof orientation||zt("mobile"),bt=yt&&it,wt=yt&&gt,xt=!window.PointerEvent&&window.MSPointerEvent,Tt=!(!window.PointerEvent&&!xt),Ct=!window.L_NO_TOUCH&&(Tt||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),Et=yt&&lt,Lt=yt&&ct,kt=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Pt=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",u,e),window.removeEventListener("testPassiveEventSupport",u,e)}catch(t){}return t}(),St=!!document.createElement("canvas").getContext,Mt=!(!document.createElementNS||!X("svg").createSVGRect),At=!Mt&&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 zt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Nt={ie:tt,ielt9:et,edge:nt,webkit:it,android:ot,android23:rt,androidStock:at,opera:lt,chrome:ut,gecko:ct,safari:ht,phantom:dt,opera12:ft,win:pt,ie3d:mt,webkit3d:gt,gecko3d:_t,any3d:vt,mobile:yt,mobileWebkit:bt,mobileWebkit3d:wt,msPointer:xt,pointer:Tt,touch:Ct,mobileOpera:Et,mobileGecko:Lt,retina:kt,passiveEvents:Pt,canvas:St,svg:Mt,vml:At},Dt=xt?"MSPointerDown":"pointerdown",jt=xt?"MSPointerMove":"pointermove",Ot=xt?"MSPointerUp":"pointerup",It=xt?"MSPointerCancel":"pointercancel",Bt={},Rt=!1;function Zt(t,e,n,i){return"touchstart"===e?Ht(t,n,i):"touchmove"===e?Vt(t,n,i):"touchend"===e&&Gt(t,n,i),this}function $t(t,e,n){var i=t["_leaflet_"+e+n];return"touchstart"===e?t.removeEventListener(Dt,i,!1):"touchmove"===e?t.removeEventListener(jt,i,!1):"touchend"===e&&(t.removeEventListener(Ot,i,!1),t.removeEventListener(It,i,!1)),this}function Ht(t,e,n){var i=o((function(t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&Fe(t),Ut(t,e)}));t["_leaflet_touchstart"+n]=i,t.addEventListener(Dt,i,!1),Rt||(document.addEventListener(Dt,qt,!0),document.addEventListener(jt,Ft,!0),document.addEventListener(Ot,Wt,!0),document.addEventListener(It,Wt,!0),Rt=!0)}function qt(t){Bt[t.pointerId]=t}function Ft(t){Bt[t.pointerId]&&(Bt[t.pointerId]=t)}function Wt(t){delete Bt[t.pointerId]}function Ut(t,e){for(var n in t.touches=[],Bt)t.touches.push(Bt[n]);t.changedTouches=[t],e(t)}function Vt(t,e,n){var i=function(t){t.pointerType===(t.MSPOINTER_TYPE_MOUSE||"mouse")&&0===t.buttons||Ut(t,e)};t["_leaflet_touchmove"+n]=i,t.addEventListener(jt,i,!1)}function Gt(t,e,n){var i=function(t){Ut(t,e)};t["_leaflet_touchend"+n]=i,t.addEventListener(Ot,i,!1),t.addEventListener(It,i,!1)}var Kt=xt?"MSPointerDown":Tt?"pointerdown":"touchstart",Yt=xt?"MSPointerUp":Tt?"pointerup":"touchend",Xt="_leaflet_";function Qt(t,e,n){var i,o,r=!1,s=250;function a(t){if(Tt){if(!t.isPrimary)return;if("mouse"===t.pointerType)return}else if(t.touches.length>1)return;var e=Date.now(),n=e-(i||e);o=t.touches?t.touches[0]:t,r=n>0&&n<=s,i=e}function l(t){if(r&&!o.cancelBubble){if(Tt){if("mouse"===t.pointerType)return;var n,s,a={};for(s in o)n=o[s],a[s]=n&&n.bind?n.bind(o):n;o=a}o.type="dblclick",o.button=0,e(o),i=null}}return t[Xt+Kt+n]=a,t[Xt+Yt+n]=l,t[Xt+"dblclick"+n]=e,t.addEventListener(Kt,a,!!Pt&&{passive:!1}),t.addEventListener(Yt,l,!!Pt&&{passive:!1}),t.addEventListener("dblclick",e,!1),this}function Jt(t,e){var n=t[Xt+Kt+e],i=t[Xt+Yt+e],o=t[Xt+"dblclick"+e];return t.removeEventListener(Kt,n,!!Pt&&{passive:!1}),t.removeEventListener(Yt,i,!!Pt&&{passive:!1}),t.removeEventListener("dblclick",o,!1),this}var te,ee,ne,ie,oe,re=xe(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),se=xe(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ae="webkitTransition"===se||"OTransition"===se?se+"End":"transitionend";function le(t){return"string"==typeof t?document.getElementById(t):t}function ue(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 ce(t,e,n){var i=document.createElement(t);return i.className=e||"",n&&n.appendChild(i),i}function he(t){var e=t.parentNode;e&&e.removeChild(t)}function de(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function fe(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function pe(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function me(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=ye(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function ge(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(!me(t,e)){var r=ye(t);ve(t,(r?r+" ":"")+e)}}function _e(t,e){void 0!==t.classList?t.classList.remove(e):ve(t,h((" "+ye(t)+" ").replace(" "+e+" "," ")))}function ve(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function ye(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function be(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&we(t,e)}function we(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 xe(t){for(var e=document.documentElement.style,n=0;n<t.length;n++)if(t[n]in e)return t[n];return!1}function Te(t,e,n){var i=e||new N(0,0);t.style[re]=(mt?"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,vt?Te(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function Ee(t){return t._leaflet_pos||new N(0,0)}if("onselectstart"in document)te=function(){De(window,"selectstart",Fe)},ee=function(){Oe(window,"selectstart",Fe)};else{var Le=xe(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);te=function(){if(Le){var t=document.documentElement.style;ne=t[Le],t[Le]="none"}},ee=function(){Le&&(document.documentElement.style[Le]=ne,ne=void 0)}}function ke(){De(window,"dragstart",Fe)}function Pe(){Oe(window,"dragstart",Fe)}function Se(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Me(),ie=t,oe=t.style.outline,t.style.outline="none",De(window,"keydown",Me))}function Me(){ie&&(ie.style.outline=oe,ie=void 0,oe=void 0,Oe(window,"keydown",Me))}function Ae(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function ze(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Ne={TRANSFORM:re,TRANSITION:se,TRANSITION_END:ae,get:le,getStyle:ue,create:ce,remove:he,empty:de,toFront:fe,toBack:pe,hasClass:me,addClass:ge,removeClass:_e,setClass:ve,getClass:ye,setOpacity:be,testProp:xe,setTransform:Te,setPosition:Ce,getPosition:Ee,disableTextSelection:te,enableTextSelection:ee,disableImageDrag:ke,enableImageDrag:Pe,preventOutline:Se,restoreOutline:Me,getSizedParentNode:Ae,getScale:ze};function De(t,e,n,i){if("object"==typeof e)for(var o in e)Re(t,o,e[o],n);else for(var r=0,s=(e=d(e)).length;r<s;r++)Re(t,e[r],n,i);return this}var je="_leaflet_events";function Oe(t,e,n,i){if("object"==typeof e)for(var o in e)Ze(t,o,e[o],n);else if(e)for(var r=0,s=(e=d(e)).length;r<s;r++)Ze(t,e[r],n,i);else{for(var a in t[je])Ze(t,a,t[je][a]);delete t[je]}return this}function Ie(){if(Tt)return!(nt||ht)}var Be={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Re(t,e,n,i){var o=e+s(n)+(i?"_"+s(i):"");if(t[je]&&t[je][o])return this;var r=function(e){return n.call(i||t,e||window.event)},a=r;Tt&&0===e.indexOf("touch")?Zt(t,e,r,o):Ct&&"dblclick"===e&&!Ie()?Qt(t,r,o):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(Be[e]||e,r,!!Pt&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?(r=function(e){e=e||window.event,Qe(t,e)&&a(e)},t.addEventListener(Be[e],r,!1)):t.addEventListener(e,a,!1):"attachEvent"in t&&t.attachEvent("on"+e,r),t[je]=t[je]||{},t[je][o]=r}function Ze(t,e,n,i){var o=e+s(n)+(i?"_"+s(i):""),r=t[je]&&t[je][o];if(!r)return this;Tt&&0===e.indexOf("touch")?$t(t,e,o):Ct&&"dblclick"===e&&!Ie()?Jt(t,o):"removeEventListener"in t?t.removeEventListener(Be[e]||e,r,!1):"detachEvent"in t&&t.detachEvent("on"+e,r),t[je][o]=null}function $e(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,Xe(t),this}function He(t){return Re(t,"wheel",$e),this}function qe(t){return De(t,"mousedown touchstart dblclick",$e),Re(t,"click",Ye),this}function Fe(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function We(t){return Fe(t),$e(t),this}function Ue(t,e){if(!e)return new N(t.clientX,t.clientY);var n=ze(e),i=n.boundingClientRect;return new N((t.clientX-i.left)/n.x-e.clientLeft,(t.clientY-i.top)/n.y-e.clientTop)}var Ve=pt&&ut?2*window.devicePixelRatio:ct?window.devicePixelRatio:1;function Ge(t){return nt?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Ve: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}var Ke={};function Ye(t){Ke[t.type]=!0}function Xe(t){var e=Ke[t.type];return Ke[t.type]=!1,e}function Qe(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 Je={on:De,off:Oe,stopPropagation:$e,disableScrollPropagation:He,disableClickPropagation:qe,preventDefault:Fe,stop:We,getMousePosition:Ue,getWheelDelta:Ge,fakeStop:Ye,skipped:Xe,isExternalTarget:Qe,addListener:De,removeListener:Oe},tn=z.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=E(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(){k(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),en=z.extend({options:{crs:K,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=f(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($(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=se&&vt&&!Et&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),De(this._proxy,ae,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($(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),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||(vt?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(vt?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),r=(t instanceof N?t:this.latLngToContainerPoint(t)).subtract(o).multiplyBy(1-1/i),s=this.containerPointToLatLng(o.add(r));return this.setView(s,e,{zoom:n})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():R(t);var n=j(e.paddingTopLeft||e.padding||[0,0]),i=j(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 r=i.subtract(n).divideBy(2),s=this.project(t.getSouthWest(),o),a=this.project(t.getNorthEast(),o);return{center:this.unproject(s.add(a).divideBy(2).add(r),o),zoom:o}},fitBounds:function(t,e){if(!(t=R(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=j(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 tn,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){ge(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||!vt)return this.setView(t,e,n);this._stop();var i=this.project(this.getCenter()),o=this.project(t),r=this.getSize(),s=this._zoom;t=$(t),e=void 0===e?s:e;var a=Math.max(r.x,r.y),l=a*this.getZoomScale(s,e),u=o.distanceTo(i)||1,c=1.42,h=c*c;function d(t){var e=(l*l-a*a+(t?-1:1)*h*h*u*u)/(2*(t?l:a)*h*u),n=Math.sqrt(e*e+1)-e;return n<1e-9?-18:Math.log(n)}function f(t){return(Math.exp(t)-Math.exp(-t))/2}function p(t){return(Math.exp(t)+Math.exp(-t))/2}function m(t){return f(t)/p(t)}var g=d(0);function _(t){return a*(p(g)/p(g+c*t))}function v(t){return a*(p(g)*m(g+c*t)-f(g))/h}function y(t){return 1-Math.pow(1-t,1.5)}var b=Date.now(),w=(d(1)-g)/c,x=n.duration?1e3*n.duration:1e3*w*.8;function T(){var n=(Date.now()-b)/x,r=y(n)*w;n<=1?(this._flyToFrame=E(T,this),this._move(this.unproject(i.add(o.subtract(i).multiplyBy(v(r)/u)),s),this.getScaleZoom(a/_(r),s),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}return this._moveStart(!0,n.noMoveStart),T.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=R(t)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},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,R(t));return n.equals(i)||this.panTo(i,e),this._enforcingBounds=!1,this},panInside:function(t,e){var n=j((e=e||{}).paddingTopLeft||e.padding||[0,0]),i=j(e.paddingBottomRight||e.padding||[0,0]),o=this.getCenter(),r=this.project(o),s=this.project(t),a=this.getPixelBounds(),l=a.getSize().divideBy(2),u=I([a.min.add(n),a.max.subtract(i)]);if(!u.contains(s)){this._enforcingBounds=!0;var c=r.subtract(s),h=j(s.x+c.x,s.y+c.y);(s.x<u.min.x||s.x>u.max.x)&&(h.x=r.x-c.x,c.x>0?h.x+=l.x-n.x:h.x-=l.x-i.x),(s.y<u.min.y||s.y>u.max.y)&&(h.y=r.y-c.y,c.y>0?h.y+=l.y-n.y:h.y-=l.y-i.y),this.panTo(this.unproject(h),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(),r=e.divideBy(2).round(),s=i.divideBy(2).round(),a=r.subtract(s);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){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){var e=new Z(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 r={latlng:e,bounds:n,timestamp:t.timestamp};for(var s in t.coords)"number"==typeof t.coords[s]&&(r[s]=t.coords[s]);this.fire("locationfound",r)},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.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(),he(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(k(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)he(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n=ce("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:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new B(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=R(t),n=j(n||[0,0]);var i=this.getZoom()||0,o=this.getMinZoom(),r=this.getMaxZoom(),s=t.getNorthWest(),a=t.getSouthEast(),l=this.getSize().subtract(n),u=I(this.project(a,i),this.project(s,i)).getSize(),c=vt?this.options.zoomSnap:1,h=l.x/u.x,d=l.y/u.y,f=e?Math.max(h,d):Math.min(h,d);return i=this.getScaleZoom(f,i),c&&(i=Math.round(i/(c/100))*(c/100),i=e?Math.ceil(i/c)*c:Math.floor(i/c)*c),Math.max(o,Math.min(r,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new N(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 O(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($(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(j(t),e)},layerPointToLatLng:function(t){var e=j(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project($(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng($(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(R(t))},distance:function(t,e){return this.options.crs.distance($(t),$(e))},containerPointToLayerPoint:function(t){return j(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return j(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(j(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint($(t)))},mouseEventToContainerPoint:function(t){return Ue(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=le(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");De(e,"scroll",this._onScroll,this),this._containerId=s(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&vt,ge(t,"leaflet-container"+(Ct?" leaflet-touch":"")+(kt?" leaflet-retina":"")+(et?" leaflet-oldie":"")+(ht?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=ue(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),Ce(this._mapPane,new N(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ge(t.markerPane,"leaflet-zoom-hide"),ge(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){Ce(this._mapPane,new N(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var i=this._zoom!==e;this._moveStart(i,!1)._move(t,e)._moveEnd(i),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,n){void 0===e&&(e=this._zoom);var i=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(i||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return k(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[s(this._container)]=this;var e=t?Oe:De;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),vt&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){k(this._resizeRequest),this._resizeRequest=E((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,r=t.target||t.srcElement,a=!1;r;){if((n=this._targets[s(r)])&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(n)){a=!0;break}if(n&&n.listens(e,!0)){if(o&&!Qe(r,t))break;if(i.push(n),o)break}if(r===this._container)break;r=r.parentNode}return i.length||a||o||!Qe(r,t)||(i=[this]),i},_handleDOMEvent:function(t){if(this._loaded&&!Xe(t)){var e=t.type;"mousedown"!==e&&"keypress"!==e&&"keyup"!==e&&"keydown"!==e||Se(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_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)}if(!t._stopped&&(i=(i||[]).concat(this._findEventTargets(t,e))).length){var r=i[0];"contextmenu"===e&&r.listens(e,!0)&&Fe(t);var s={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var a=r.getLatLng&&(!r._radius||r._radius<=10);s.containerPoint=a?this.latLngToContainerPoint(r.getLatLng()):this.mouseEventToContainerPoint(t),s.layerPoint=this.containerPointToLayerPoint(s.containerPoint),s.latlng=a?r.getLatLng():this.layerPointToLatLng(s.layerPoint)}for(var l=0;l<i.length;l++)if(i[l].fire(e,s,!0),s.originalEvent._stopped||!1===i[l].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 N(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 I([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),r=new O(i.subtract(o),i.add(o)),s=this._getBoundsOffset(r,n,e);return s.round().equals([0,0])?t:this.unproject(i.add(s),e)},_limitOffset:function(t,e){if(!e)return t;var n=this.getPixelBounds(),i=new O(n.min.add(t),n.max.add(t));return t.add(this._getBoundsOffset(i,e))},_getBoundsOffset:function(t,e,n){var i=I(this.project(e.getNorthEast(),n),this.project(e.getSouthWest(),n)),o=i.min.subtract(t.min),r=i.max.subtract(t.max);return new N(this._rebound(o.x,-r.x),this._rebound(o.y,-r.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=vt?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(){_e(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=ce("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var e=re,n=this._proxy.style[e];Te(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(){he(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();Te(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)||(E((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,ge(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:i}),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&_e(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),E((function(){this._moveEnd(!0)}),this))}});function nn(t,e){return new en(t,e)}var on=S.extend({options:{position:"topright"},initialize:function(t){f(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 ge(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?(he(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()}}),rn=function(t){return new on(t)};en.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=ce("div",e+"control-container",this._container);function i(i,o){var r=e+i+" "+e+o;t[i+o]=ce("div",r,n)}i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)he(this._controlCorners[t]);he(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var sn=on.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 f(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 on.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(s(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){ge(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?(ge(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):_e(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return _e(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=ce("div",t),n=this.options.collapsed;e.setAttribute("aria-haspopup",!0),qe(e),He(e);var i=this._section=ce("section",t+"-list");n&&(this._map.on("click",this.collapse,this),ot||De(e,{mouseenter:this.expand,mouseleave:this.collapse},this));var o=this._layersLink=ce("a",t+"-toggle",e);o.href="#",o.title="Layers",Ct?(De(o,"click",We),De(o,"click",this.expand,this)):De(o,"focus",this.expand,this),n||this.expand(),this._baseLayersList=ce("div",t+"-base",i),this._separator=ce("div",t+"-separator",i),this._overlaysList=ce("div",t+"-overlays",i),e.appendChild(i)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&s(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;de(this._baseLayersList),de(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(s(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_"+s(this),i),this._layerControlInputs.push(e),e.layerId=s(t.layer),De(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var r=document.createElement("div");return n.appendChild(r),r.appendChild(e),r.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 r=n.length-1;r>=0;r--)t=n[r],e=this._getLayer(t.layerId).layer,t.checked?i.push(e):t.checked||o.push(e);for(r=0;r<o.length;r++)this._map.hasLayer(o[r])&&this._map.removeLayer(o[r]);for(r=0;r<i.length;r++)this._map.hasLayer(i[r])||this._map.addLayer(i[r]);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},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),an=function(t,e,n){return new sn(t,e,n)},ln=on.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"&#x2212;",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=ce("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 r=ce("a",n,i);return r.innerHTML=t,r.href="#",r.title=e,r.setAttribute("role","button"),r.setAttribute("aria-label",e),qe(r),De(r,"click",We),De(r,"click",o,this),De(r,"click",this._refocusOnMap,this),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";_e(this._zoomInButton,e),_e(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMinZoom())&&ge(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMaxZoom())&&ge(this._zoomInButton,e)}});en.mergeOptions({zoomControl:!0}),en.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new ln,this.addControl(this.zoomControl))}));var un=function(t){return new ln(t)},cn=on.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",n=ce("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=ce("div",e,n)),t.imperial&&(this._iScale=ce("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)}}),hn=function(t){return new cn(t)},dn=on.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){f(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=ce("div","leaflet-control-attribution"),qe(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},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(" | ")}}});en.mergeOptions({attributionControl:!0}),en.addInitHook((function(){this.options.attributionControl&&(new dn).addTo(this)}));var fn=function(t){return new dn(t)};on.Layers=sn,on.Zoom=ln,on.Scale=cn,on.Attribution=dn,rn.layers=an,rn.zoom=un,rn.scale=hn,rn.attribution=fn;var pn=S.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}});pn.addTo=function(t,e){return t.addHandler(e,this),this};var mn,gn={Events:A},_n=Ct?"touchstart mousedown":"mousedown",vn={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},yn={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},bn=z.extend({options:{clickTolerance:3},initialize:function(t,e,n,i){f(this,i),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(De(this._dragStartTarget,_n,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(bn._dragging===this&&this.finishDrag(),Oe(this._dragStartTarget,_n,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!me(this._element,"leaflet-zoom-anim")&&!(bn._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(bn._dragging=this,this._preventOutline&&Se(this._element),ke(),te(),this._moving)))){this.fire("down");var e=t.touches?t.touches[0]:t,n=Ae(this._element);this._startPoint=new N(e.clientX,e.clientY),this._parentScale=ze(n),De(document,yn[t.type],this._onMove,this),De(document,vn[t.type],this._onUp,this)}},_onMove:function(t){if(!t._simulated&&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 N(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,Fe(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=Ee(this._element).subtract(n),ge(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),ge(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,k(this._animRequest),this._lastEvent=t,this._animRequest=E(this._updatePosition,this,!0)))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),Ce(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){!t._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){for(var t in _e(document.body,"leaflet-dragging"),this._lastTarget&&(_e(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),yn)Oe(document,yn[t],this._onMove,this),Oe(document,vn[t],this._onUp,this);Pe(),ee(),this._moved&&this._moving&&(k(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,bn._dragging=!1}});function wn(t,e){if(!e||!t.length)return t.slice();var n=e*e;return t=Cn(t=Ln(t,n),n)}function xn(t,e,n){return Math.sqrt(An(t,e,n,!0))}function Tn(t,e,n){return An(t,e,n)}function Cn(t,e){var n=t.length,i=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(n);i[0]=i[n-1]=1,En(t,i,e,0,n-1);var o,r=[];for(o=0;o<n;o++)i[o]&&r.push(t[o]);return r}function En(t,e,n,i,o){var r,s,a,l=0;for(s=i+1;s<=o-1;s++)(a=An(t[s],t[i],t[o],!0))>l&&(r=s,l=a);l>n&&(e[r]=1,En(t,e,n,i,r),En(t,e,n,r,o))}function Ln(t,e){for(var n=[t[0]],i=1,o=0,r=t.length;i<r;i++)Mn(t[i],t[o])>e&&(n.push(t[i]),o=i);return o<r-1&&n.push(t[r-1]),n}function kn(t,e,n,i,o){var r,s,a,l=i?mn:Sn(t,n),u=Sn(e,n);for(mn=u;;){if(!(l|u))return[t,e];if(l&u)return!1;a=Sn(s=Pn(t,e,r=l||u,n,o),n),r===l?(t=s,l=a):(e=s,u=a)}}function Pn(t,e,n,i,o){var r,s,a=e.x-t.x,l=e.y-t.y,u=i.min,c=i.max;return 8&n?(r=t.x+a*(c.y-t.y)/l,s=c.y):4&n?(r=t.x+a*(u.y-t.y)/l,s=u.y):2&n?(r=c.x,s=t.y+l*(c.x-t.x)/a):1&n&&(r=u.x,s=t.y+l*(u.x-t.x)/a),new N(r,s,o)}function Sn(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 Mn(t,e){var n=e.x-t.x,i=e.y-t.y;return n*n+i*i}function An(t,e,n,i){var o,r=e.x,s=e.y,a=n.x-r,l=n.y-s,u=a*a+l*l;return u>0&&((o=((t.x-r)*a+(t.y-s)*l)/u)>1?(r=n.x,s=n.y):o>0&&(r+=a*o,s+=l*o)),a=t.x-r,l=t.y-s,i?a*a+l*l:new N(r,s)}function zn(t){return!_(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function Nn(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),zn(t)}var Dn={simplify:wn,pointToSegmentDistance:xn,closestPointOnSegment:Tn,clipSegment:kn,_getEdgeIntersection:Pn,_getBitCode:Sn,_sqClosestPointOnSegment:An,isFlat:zn,_flat:Nn};function jn(t,e,n){var i,o,r,s,a,l,u,c,h,d=[1,4,2,8];for(o=0,u=t.length;o<u;o++)t[o]._code=Sn(t[o],e);for(s=0;s<4;s++){for(c=d[s],i=[],o=0,r=(u=t.length)-1;o<u;r=o++)a=t[o],l=t[r],a._code&c?l._code&c||((h=Pn(l,a,c,e,n))._code=Sn(h,e),i.push(h)):(l._code&c&&((h=Pn(l,a,c,e,n))._code=Sn(h,e),i.push(h)),i.push(a));t=i}return t}var On={clipPolygon:jn},In={project:function(t){return new N(t.lng,t.lat)},unproject:function(t){return new Z(t.y,t.x)},bounds:new O([-180,-90],[180,90])},Bn={R:6378137,R_MINOR:6356752.314245179,bounds:new O([-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,r=Math.sqrt(1-o*o),s=r*Math.sin(i),a=Math.tan(Math.PI/4-i/2)/Math.pow((1-s)/(1+s),r/2);return i=-n*Math.log(Math.max(a,1e-10)),new N(t.lng*e*n,i)},unproject:function(t){for(var e,n=180/Math.PI,i=this.R,o=this.R_MINOR/i,r=Math.sqrt(1-o*o),s=Math.exp(-t.y/i),a=Math.PI/2-2*Math.atan(s),l=0,u=.1;l<15&&Math.abs(u)>1e-7;l++)e=r*Math.sin(a),e=Math.pow((1-e)/(1+e),r/2),a+=u=Math.PI/2-2*Math.atan(s*e)-a;return new Z(a*n,t.x*n/i)}},Rn={LonLat:In,Mercator:Bn,SphericalMercator:U},Zn=n({},F,{code:"EPSG:3395",projection:Bn,transformation:function(){var t=.5/(Math.PI*Bn.R);return G(t,.5,-t,.5)}()}),$n=n({},F,{code:"EPSG:4326",projection:In,transformation:G(1/180,1,-1/180,.5)}),Hn=n({},q,{projection:In,transformation:G(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});q.Earth=F,q.EPSG3395=Zn,q.EPSG3857=K,q.EPSG900913=Y,q.EPSG4326=$n,q.Simple=Hn;var qn=z.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[s(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[s(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.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this})}}});en.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=s(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=s(t);return this._layers[e]?(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),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!!t&&s(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?_(t)?t:[t]:[]).length;e<n;e++)this.addLayer(t[e])},_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[s(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=s(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 Fn=qn.extend({initialize:function(t,e){var n,i;if(f(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!!t&&("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 s(t)}}),Wn=function(t,e){return new Fn(t,e)},Un=Fn.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Fn.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),Fn.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 B;for(var e in this._layers){var n=this._layers[e];t.extend(n.getBounds?n.getBounds():n.getLatLng())}return t}}),Vn=function(t,e){return new Un(t,e)},Gn=S.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function(t){f(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),i},_setIconStyles:function(t,e){var n=this.options,i=n[e+"Size"];"number"==typeof i&&(i=[i,i]);var o=j(i),r=j("shadow"===e&&n.shadowAnchor||n.iconAnchor||o&&o.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(n.className||""),r&&(t.style.marginLeft=-r.x+"px",t.style.marginTop=-r.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 kt&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function Kn(t){return new Gn(t)}var Yn=Gn.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 Yn.imagePath||(Yn.imagePath=this._detectIconPath()),(this.options.imagePath||Yn.imagePath)+Gn.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=ce("div","leaflet-default-icon-path",document.body),e=ue(t,"background-image")||ue(t,"backgroundImage");return document.body.removeChild(t),e=null===e||0!==e.indexOf("url")?"":e.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),Xn=pn.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new bn(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),ge(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&&_e(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,r=Ee(e._icon),s=n.getPixelBounds(),a=n.getPixelOrigin(),l=I(s.min._subtract(a).add(o),s.max._subtract(a).subtract(o));if(!l.contains(r)){var u=j((Math.max(l.max.x,r.x)-l.max.x)/(s.max.x-l.max.x)-(Math.min(l.min.x,r.x)-l.min.x)/(s.min.x-l.min.x),(Math.max(l.max.y,r.y)-l.max.y)/(s.max.y-l.max.y)-(Math.min(l.min.y,r.y)-l.min.y)/(s.min.y-l.min.y)).multiplyBy(i);n.panBy(u,{animate:!1}),this._draggable._newPos._add(u),this._draggable._startPos._add(u),Ce(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=E(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&&(k(this._panRequest),this._panRequest=E(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){k(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Qn=qn.extend({options:{icon:new Yn,interactive:!0,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){f(this,e),this._latlng=$(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=$(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||"")),ge(n,e),t.keyboard&&(n.tabIndex="0"),this._icon=n,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var o=t.icon.createShadow(this._shadow),r=!1;o!==this._shadow&&(this._removeShadow(),r=!0),o&&(ge(o,e),o.alt=""),this._shadow=o,t.opacity<1&&this._updateOpacity(),i&&this.getPane().appendChild(this._icon),this._initInteraction(),o&&r&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),he(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&he(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&&(ge(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Xn)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Xn(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&&be(this._icon,t),this._shadow&&be(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function Jn(t,e){return new Qn(t,e)}var ti=qn.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 f(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}}),ei=ti.extend({options:{fill:!0,radius:10},initialize:function(t,e){f(this,e),this._latlng=$(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=$(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 ti.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 O(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 ni(t,e){return new ei(t,e)}var ii=ei.extend({initialize:function(t,e,i){if("number"==typeof e&&(e=n({},i,{radius:e})),f(this,e),this._latlng=$(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 B(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:ti.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,n=this._map,i=n.options.crs;if(i.distance===F.distance){var o=Math.PI/180,r=this._mRadius/F.R/o,s=n.project([e+r,t]),a=n.project([e-r,t]),l=s.add(a).divideBy(2),u=n.unproject(l).lat,c=Math.acos((Math.cos(r*o)-Math.sin(e*o)*Math.sin(u*o))/(Math.cos(e*o)*Math.cos(u*o)))/o;(isNaN(c)||0===c)&&(c=r/Math.cos(Math.PI/180*e)),this._point=l.subtract(n.getPixelOrigin()),this._radius=isNaN(c)?0:l.x-n.project([u,t-c]).x,this._radiusY=l.y-s.y}else{var h=i.unproject(i.project(this._latlng).subtract([this._mRadius,0]));this._point=n.latLngToLayerPoint(this._latlng),this._radius=this._point.x-n.latLngToLayerPoint(h).x}this._updateBounds()}});function oi(t,e,n){return new ii(t,e,n)}var ri=ti.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){f(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,r=An,s=0,a=this._parts.length;s<a;s++)for(var l=this._parts[s],u=1,c=l.length;u<c;u++){var h=r(t,e=l[u-1],n=l[u],!0);h<i&&(i=h,o=r(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()");var t,e,n,i,o,r,s,a=this._rings[0],l=a.length;if(!l)return null;for(t=0,e=0;t<l-1;t++)e+=a[t].distanceTo(a[t+1])/2;if(0===e)return this._map.layerPointToLatLng(a[0]);for(t=0,i=0;t<l-1;t++)if(o=a[t],r=a[t+1],(i+=n=o.distanceTo(r))>e)return s=(i-e)/n,this._map.layerPointToLatLng([r.x-s*(r.x-o.x),r.y-s*(r.y-o.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=$(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new B,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]=$(t[i]),this._bounds.extend(e[i])):e[i]=this._convertLatLngs(t[i]);return e},_project:function(){var t=new O;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 N(t,t);this._pxBounds=new O([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)])},_projectLatlngs:function(t,e,n){var i,o,r=t[0]instanceof Z,s=t.length;if(r){for(o=[],i=0;i<s;i++)o[i]=this._map.latLngToLayerPoint(t[i]),n.extend(o[i]);e.push(o)}else for(i=0;i<s;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,r,s,a,l=this._parts;for(e=0,i=0,o=this._rings.length;e<o;e++)for(n=0,r=(a=this._rings[e]).length;n<r-1;n++)(s=kn(a[n],a[n+1],t,n,!0))&&(l[i]=l[i]||[],l[i].push(s[0]),s[1]===a[n+1]&&n!==r-2||(l[i].push(s[1]),i++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,n=0,i=t.length;n<i;n++)t[n]=wn(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,r,s,a,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(n=0,r=this._parts.length;n<r;n++)for(i=0,o=(s=(a=this._parts[n]).length)-1;i<s;o=i++)if((e||0!==i)&&xn(t,a[o],a[i])<=l)return!0;return!1}});function si(t,e){return new ri(t,e)}ri._flat=Nn;var ai=ri.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()");var t,e,n,i,o,r,s,a,l,u=this._rings[0],c=u.length;if(!c)return null;for(r=s=a=0,t=0,e=c-1;t<c;e=t++)n=u[t],i=u[e],o=n.y*i.x-i.y*n.x,s+=(n.x+i.x)*o,a+=(n.y+i.y)*o,r+=3*o;return l=0===r?u[0]:[s/r,a/r],this._map.layerPointToLatLng(l)},_convertLatLngs:function(t){var e=ri.prototype._convertLatLngs.call(this,t),n=e.length;return n>=2&&e[0]instanceof Z&&e[0].equals(e[n-1])&&e.pop(),e},_setLatLngs:function(t){ri.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 N(e,e);if(t=new O(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,r=this._rings.length;o<r;o++)(i=jn(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,r,s,a,l,u=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(o=0,a=this._parts.length;o<a;o++)for(r=0,s=(l=(e=this._parts[o]).length)-1;r<l;s=r++)n=e[r],i=e[s],n.y>t.y!=i.y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(u=!u);return u||ri.prototype._containsPoint.call(this,t,!0)}});function li(t,e){return new ai(t,e)}var ui=Un.extend({initialize:function(t,e){f(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,i,o=_(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 r=this.options;if(r.filter&&!r.filter(t))return this;var s=ci(t,r);return s?(s.feature=_i(t),s.defaultOptions=s.options,this.resetStyle(s),r.onEachFeature&&r.onEachFeature(t,s),this.addLayer(s)):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 ci(t,e){var n,i,o,r,s="Feature"===t.type?t.geometry:t,a=s?s.coordinates:null,l=[],u=e&&e.pointToLayer,c=e&&e.coordsToLatLng||di;if(!a&&!s)return null;switch(s.type){case"Point":return hi(u,t,n=c(a),e);case"MultiPoint":for(o=0,r=a.length;o<r;o++)n=c(a[o]),l.push(hi(u,t,n,e));return new Un(l);case"LineString":case"MultiLineString":return i=fi(a,"LineString"===s.type?0:1,c),new ri(i,e);case"Polygon":case"MultiPolygon":return i=fi(a,"Polygon"===s.type?1:2,c),new ai(i,e);case"GeometryCollection":for(o=0,r=s.geometries.length;o<r;o++){var h=ci({geometry:s.geometries[o],type:"Feature",properties:t.properties},e);h&&l.push(h)}return new Un(l);default:throw new Error("Invalid GeoJSON object.")}}function hi(t,e,n,i){return t?t(e,n):new Qn(n,i&&i.markersInheritOptions&&i)}function di(t){return new Z(t[1],t[0],t[2])}function fi(t,e,n){for(var i,o=[],r=0,s=t.length;r<s;r++)i=e?fi(t[r],e-1,n):(n||di)(t[r]),o.push(i);return o}function pi(t,e){return e="number"==typeof e?e:6,void 0!==t.alt?[c(t.lng,e),c(t.lat,e),c(t.alt,e)]:[c(t.lng,e),c(t.lat,e)]}function mi(t,e,n,i){for(var o=[],r=0,s=t.length;r<s;r++)o.push(e?mi(t[r],e-1,n,i):pi(t[r],i));return!e&&n&&o.push(o[0]),o}function gi(t,e){return t.feature?n({},t.feature,{geometry:e}):_i(e)}function _i(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var vi={toGeoJSON:function(t){return gi(this,{type:"Point",coordinates:pi(this.getLatLng(),t)})}};function yi(t,e){return new ui(t,e)}Qn.include(vi),ii.include(vi),ei.include(vi),ri.include({toGeoJSON:function(t){var e=!zn(this._latlngs);return gi(this,{type:(e?"Multi":"")+"LineString",coordinates:mi(this._latlngs,e?1:0,!1,t)})}}),ai.include({toGeoJSON:function(t){var e=!zn(this._latlngs),n=e&&!zn(this._latlngs[0]),i=mi(this._latlngs,n?2:e?1:0,!0,t);return e||(i=[i]),gi(this,{type:(n?"Multi":"")+"Polygon",coordinates:i})}}),Fn.include({toMultiPoint:function(t){var e=[];return this.eachLayer((function(n){e.push(n.toGeoJSON(t).geometry.coordinates)})),gi(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 r=_i(o);"FeatureCollection"===r.type?i.push.apply(i,r.features):i.push(r)}}})),n?gi(this,{geometries:i,type:"GeometryCollection"}):{type:"FeatureCollection",features:i}}});var bi=yi,wi=qn.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,n){this._url=t,this._bounds=R(e),f(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ge(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){he(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&&fe(this._image),this},bringToBack:function(){return this._map&&pe(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=R(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:ce("img");ge(e,"leaflet-image-layer"),this._zoomAnimated&&ge(e,"leaflet-zoom-animated"),this.options.className&&ge(e,this.options.className),e.onselectstart=u,e.onmousemove=u,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;Te(this._image,n,e)},_reset:function(){var t=this._image,e=new O(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(){be(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)}}),xi=function(t,e,n){return new wi(t,e,n)},Ti=wi.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:ce("video");if(ge(e,"leaflet-image-layer"),this._zoomAnimated&&ge(e,"leaflet-zoom-animated"),this.options.className&&ge(e,this.options.className),e.onselectstart=u,e.onmousemove=u,e.onloadeddata=o(this.fire,this,"load"),t){for(var n=e.getElementsByTagName("source"),i=[],r=0;r<n.length;r++)i.push(n[r].src);this._url=n.length>0?i:[e.src]}else{_(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;for(var s=0;s<this._url.length;s++){var a=ce("source");a.src=this._url[s],e.appendChild(a)}}}});function Ci(t,e,n){return new Ti(t,e,n)}var Ei=wi.extend({_initImage:function(){var t=this._image=this._url;ge(t,"leaflet-image-layer"),this._zoomAnimated&&ge(t,"leaflet-zoom-animated"),this.options.className&&ge(t,this.options.className),t.onselectstart=u,t.onmousemove=u}});function Li(t,e,n){return new Ei(t,e,n)}var ki=qn.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,e){f(this,t),this._source=e},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&be(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&be(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(be(this._container,0),this._removeTimeout=setTimeout(o(he,void 0,this._container),200)):he(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=$(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&&fe(this._container),this},bringToBack:function(){return this._map&&pe(this._container),this},_prepareOpen:function(t,e,n){if(e instanceof qn||(n=e,e=t),e instanceof Un)for(var i in t._layers){e=t._layers[i];break}if(!n)if(e.getCenter)n=e.getCenter();else{if(!e.getLatLng)throw new Error("Unable to get source layer LatLng.");n=e.getLatLng()}return this._source=e,this.update(),n},_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=j(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]}}),Pi=ki.extend({options:{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.openPopup(this),this},onAdd:function(t){ki.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof ti||this._source.on("preclick",$e))},onRemove:function(t){ki.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof ti||this._source.off("preclick",$e))},getEvents:function(){var t=ki.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},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t="leaflet-popup",e=this._container=ce("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=ce("div",t+"-content-wrapper",e);if(this._contentNode=ce("div",t+"-content",n),qe(e),He(this._contentNode),De(e,"contextmenu",$e),this._tipContainer=ce("div",t+"-tip-container",e),this._tip=ce("div",t+"-tip",this._tipContainer),this.options.closeButton){var i=this._closeButton=ce("a",t+"-close-button",e);i.href="#close",i.innerHTML="&#215;",De(i,"click",this._onCloseButtonClick,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,r="leaflet-popup-scrolled";o&&i>o?(e.height=o+"px",ge(t,r)):_e(t,r),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){this._map._panAnim&&this._map._panAnim.stop();var t=this._map,e=parseInt(ue(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,i=this._containerWidth,o=new N(this._containerLeft,-n-this._containerBottom);o._add(Ee(this._container));var r=t.layerPointToContainerPoint(o),s=j(this.options.autoPanPadding),a=j(this.options.autoPanPaddingTopLeft||s),l=j(this.options.autoPanPaddingBottomRight||s),u=t.getSize(),c=0,h=0;r.x+i+l.x>u.x&&(c=r.x+i-u.x+l.x),r.x-c-a.x<0&&(c=r.x-a.x),r.y+n+l.y>u.y&&(h=r.y+n-u.y+l.y),r.y-h-a.y<0&&(h=r.y-a.y),(c||h)&&t.fire("autopanstart").panBy([c,h])}},_onCloseButtonClick:function(t){this._close(),We(t)},_getAnchor:function(){return j(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Si=function(t,e){return new Pi(t,e)};en.mergeOptions({closePopupOnClick:!0}),en.include({openPopup:function(t,e,n){return t instanceof Pi||(t=new Pi(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),qn.include({bindPopup:function(t,e){return t instanceof Pi?(f(t,e),this._popup=t,t._source=this):(this._popup&&!e||(this._popup=new Pi(e,this)),this._popup.setContent(t)),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,e){return this._popup&&this._map&&(e=this._popup._prepareOpen(this,t,e),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),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){var e=t.layer||t.target;this._popup&&this._map&&(We(t),e instanceof ti?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var Mi=ki.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){ki.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){ki.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=ki.prototype.getEvents.call(this);return Ct&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ce("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,n,i=this._map,o=this._container,r=i.latLngToContainerPoint(i.getCenter()),s=i.layerPointToContainerPoint(t),a=this.options.direction,l=o.offsetWidth,u=o.offsetHeight,c=j(this.options.offset),h=this._getAnchor();"top"===a?(e=l/2,n=u):"bottom"===a?(e=l/2,n=0):"center"===a?(e=l/2,n=u/2):"right"===a?(e=0,n=u/2):"left"===a?(e=l,n=u/2):s.x<r.x?(a="right",e=0,n=u/2):(a="left",e=l+2*(c.x+h.x),n=u/2),t=t.subtract(j(e,n,!0)).add(c).add(h),_e(o,"leaflet-tooltip-right"),_e(o,"leaflet-tooltip-left"),_e(o,"leaflet-tooltip-top"),_e(o,"leaflet-tooltip-bottom"),ge(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&&be(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return j(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),Ai=function(t,e){return new Mi(t,e)};en.include({openTooltip:function(t,e,n){return t instanceof Mi||(t=new Mi(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),qn.include({bindTooltip:function(t,e){return t instanceof Mi?(f(t,e),this._tooltip=t,t._source=this):(this._tooltip&&!e||(this._tooltip=new Mi(e,this)),this._tooltip.setContent(t)),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,this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),Ct&&(n.click=this._openTooltip)),this[e](n),this._tooltipHandlersAdded=!t}},openTooltip:function(t,e){return this._tooltip&&this._map&&(e=this._tooltip._prepareOpen(this,t,e),this._map.openTooltip(this._tooltip,e),this._tooltip.options.interactive&&this._tooltip._container&&(ge(this._tooltip._container,"leaflet-clickable"),this.addInteractiveTarget(this._tooltip._container))),this},closeTooltip:function(){return this._tooltip&&(this._tooltip._close(),this._tooltip.options.interactive&&this._tooltip._container&&(_e(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(t){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(t)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_openTooltip:function(t){var e=t.layer||t.target;this._tooltip&&this._map&&this.openTooltip(e,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 zi=Gn.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?(de(e),e.appendChild(n.html)):e.innerHTML=!1!==n.html?n.html:"",n.bgPos){var i=j(n.bgPos);e.style.backgroundPosition=-i.x+"px "+-i.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});function Ni(t){return new zi(t)}Gn.Default=Yn;var Di=qn.extend({options:{tileSize:256,opacity:1,updateWhenIdle:yt,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){f(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),he(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(fe(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(pe(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(){return this._map&&(this._removeAllTiles(),this._update()),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 N?t:new N(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,r=n.length;o<r;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&&!et){be(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 r=Math.min(1,(t-o.loaded)/200);be(o.el,r),r<1?e=!0:(o.active?n=!0:this._onOpaqueTile(o),o.active=!0)}}n&&!this._noPrune&&this._pruneTiles(),e&&(k(this._fadeFrame),this._fadeFrame=E(this._updateOpacity,this))}},_onOpaqueTile:u,_initContainer:function(){this._container||(this._container=ce("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)):(he(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=ce("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()),u(i.el.offsetWidth),this._onCreateLevel(i)),this._level=i,i}},_onUpdateLevel:u,_onRemoveLevel:u,_onCreateLevel:u,_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)he(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),r=Math.floor(e/2),s=n-1,a=new N(+o,+r);a.z=+s;var l=this._tileCoordsToKey(a),u=this._tiles[l];return u&&u.active?(u.retain=!0,!0):(u&&u.loaded&&(u.retain=!0),s>i&&this._retainParent(o,r,s,i))},_retainChildren:function(t,e,n,i){for(var o=2*t;o<2*t+2;o++)for(var r=2*e;r<2*e+2;r++){var s=new N(o,r);s.z=n+1;var a=this._tileCoordsToKey(s),l=this._tiles[a];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),n+1<i&&this._retainChildren(o,r,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 r=this.options.updateWhenZooming&&o!==this._tileZoom;i&&!r||(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();vt?Te(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(),r=e.getSize().divideBy(2*i);return new O(o.subtract(r),o.add(r))},_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),r=o.getCenter(),s=[],a=this.options.keepBuffer,l=new O(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 u in this._tiles){var c=this._tiles[u].coords;c.z===this._tileZoom&&l.contains(new N(c.x,c.y))||(this._tiles[u].current=!1)}if(Math.abs(n-this._tileZoom)>1)this._setView(t,n);else{for(var h=o.min.y;h<=o.max.y;h++)for(var d=o.min.x;d<=o.max.x;d++){var f=new N(d,h);if(f.z=this._tileZoom,this._isValidTile(f)){var p=this._tiles[this._tileCoordsToKey(f)];p?p.current=!0:s.push(f)}}if(s.sort((function(t,e){return t.distanceTo(r)-e.distanceTo(r)})),0!==s.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(d=0;d<s.length;d++)this._addTile(s[d],m);this._level.el.appendChild(m)}}}}},_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 R(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 B(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 N(+e[0],+e[1]);return n.z=+e[2],n},_removeTile:function(t){var e=this._tiles[t];e&&(he(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){ge(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=u,t.onmousemove=u,et&&this.options.opacity<1&&be(t,this.options.opacity),ot&&!rt&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var n=this._getTilePos(t),i=this._tileCoordsToKey(t),r=this.createTile(this._wrapCoords(t),o(this._tileReady,this,t));this._initTile(r),this.createTile.length<2&&E(o(this._tileReady,this,t,null,r)),Ce(r,n),this._tiles[i]={el:r,coords:t,current:!0},e.appendChild(r),this.fire("tileloadstart",{tile:r,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?(be(n.el,0),k(this._fadeFrame),this._fadeFrame=E(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(ge(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),et||!this._map._fadeAnimated?E(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 N(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 O(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 ji(t){return new Di(t)}var Oi=Di.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,(e=f(this,e)).detectRetina&&kt&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),ot||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 De(n,"load",o(this._tileOnLoad,this,e,n)),De(n,"error",o(this._tileOnError,this,e,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),n.alt="",n.setAttribute("role","presentation"),n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:kt?"@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 g(this._url,n(e,this.options))},_tileOnLoad:function(t,e){et?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)this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=u,e.onerror=u,e.complete||(e.src=y,he(e),delete this._tiles[t]))},_removeTile:function(t){var e=this._tiles[t];if(e)return at||e.el.setAttribute("src",y),Di.prototype._removeTile.call(this,t)},_tileReady:function(t,e,n){if(this._map&&(!n||n.getAttribute("src")!==y))return Di.prototype._tileReady.call(this,t,e,n)}});function Ii(t,e){return new Oi(t,e)}var Bi=Oi.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 r=(e=f(this,e)).detectRetina&&kt?2:1,s=this.getTileSize();i.width=s.x*r,i.height=s.y*r,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,Oi.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),n=this._crs,i=I(n.project(e[0]),n.project(e[1])),o=i.min,r=i.max,s=(this._wmsVersion>=1.3&&this._crs===$n?[o.y,o.x,r.y,r.x]:[o.x,o.y,r.x,r.y]).join(","),a=Oi.prototype.getTileUrl.call(this,t);return a+p(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+s},setParams:function(t,e){return n(this.wmsParams,t),e||this.redraw(),this}});function Ri(t,e){return new Bi(t,e)}Oi.WMS=Bi,Ii.wms=Ri;var Zi=qn.extend({options:{padding:.1,tolerance:0},initialize:function(t){f(this,t),s(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&ge(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=Ee(this._container),o=this._map.getSize().multiplyBy(.5+this.options.padding),r=this._map.project(this._center,e),s=this._map.project(t,e).subtract(r),a=o.multiplyBy(-n).add(i).add(o).subtract(s);vt?Te(this._container,a,n):Ce(this._container,a)},_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 O(n,n.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),$i=Zi.extend({getEvents:function(){var t=Zi.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Zi.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");De(t,"mousemove",this._onMouseMove,this),De(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),De(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){k(this._redrawRequest),delete this._ctx,he(this._container),Oe(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){Zi.prototype._update.call(this);var t=this._bounds,e=this._container,n=t.getSize(),i=kt?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",kt&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){Zi.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[s(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[s(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||E(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new O,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,r,s=t._parts,a=s.length,l=this._ctx;if(a){for(l.beginPath(),n=0;n<a;n++){for(i=0,o=s[n].length;i<o;i++)r=s[n][i],l[i?"lineTo":"moveTo"](r.x,r.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);n&&(Ye(t),this._fireEvent([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&&(_e(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,r=this._drawFirst;r;r=r.next)(n=r.layer).options.interactive&&n._containsPoint(e)&&(i=n);i!==this._hoveredLayer&&(this._handleMouseOut(t),i&&(ge(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseover"),this._hoveredLayer=i)),this._hoveredLayer&&this._fireEvent([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 Hi(t){return St?new $i(t):null}var qi=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">')}}}(),Fi={_initContainer:function(){this._container=ce("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Zi.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=qi("shape");ge(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=qi("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[s(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;he(e),t.removeInteractiveTarget(e),delete this._layers[s(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=qi("stroke")),o.appendChild(e),e.weight=i.weight+"px",e.color=i.color,e.opacity=i.opacity,i.dashArray?e.dashStyle=_(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=qi("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){fe(t._container)},_bringToBack:function(t){pe(t._container)}},Wi=At?qi:X,Ui=Zi.extend({getEvents:function(){var t=Zi.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=Wi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Wi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){he(this._container),Oe(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){Zi.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=Wi("path");t.options.className&&ge(e,t.options.className),t.options.interactive&&ge(e,"leaflet-interactive"),this._updateStyle(t),this._layers[s(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){he(t._path),t.removeInteractiveTarget(t._path),delete this._layers[s(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,Q(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){fe(t._path)},_bringToBack:function(t){pe(t._path)}});function Vi(t){return Mt||At?new Ui(t):null}At&&Ui.include(Fi),en.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&&Hi(t)||Vi(t)}});var Gi=ai.extend({initialize:function(t,e){ai.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=R(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function Ki(t,e){return new Gi(t,e)}Ui.create=Wi,Ui.pointsToPath=Q,ui.geometryToLayer=ci,ui.coordsToLatLng=di,ui.coordsToLatLngs=fi,ui.latLngToCoords=pi,ui.latLngsToCoords=mi,ui.getFeature=gi,ui.asFeature=_i,en.mergeOptions({boxZoom:!0});var Yi=pn.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(){De(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Oe(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){he(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(),te(),ke(),this._startPoint=this._map.mouseEventToContainerPoint(t),De(document,{contextmenu:We,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=ce("div","leaflet-zoom-box",this._container),ge(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new O(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&&(he(this._box),_e(this._container,"leaflet-crosshair")),ee(),Pe(),Oe(document,{contextmenu:We,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 B(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()}});en.addInitHook("addHandler","boxZoom",Yi),en.mergeOptions({doubleClickZoom:!0});var Xi=pn.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)}});en.addInitHook("addHandler","doubleClickZoom",Xi),en.mergeOptions({dragging:!0,inertia:!rt,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Qi=pn.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new bn(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))}ge(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){_e(this._map._container,"leaflet-grab"),_e(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=R(this._map.options.maxBounds);this._offsetLimit=I(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,r=(i+e+n)%t-e-n,s=Math.abs(o+n)<Math.abs(r+n)?o:r;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=s},_onDragEnd:function(t){var e=this._map,n=e.options,i=!n.inertia||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]),r=(this._lastTime-this._times[0])/1e3,s=n.easeLinearity,a=o.multiplyBy(s/r),l=a.distanceTo([0,0]),u=Math.min(n.inertiaMaxSpeed,l),c=a.multiplyBy(u/l),h=u/(n.inertiaDeceleration*s),d=c.multiplyBy(-h/2).round();d.x||d.y?(d=e._limitOffset(d,e.options.maxBounds),E((function(){e.panBy(d,{duration:h,easeLinearity:s,noMoveStart:!0,animate:!0})}))):e.fire("moveend")}}});en.addInitHook("addHandler","dragging",Qi),en.mergeOptions({keyboard:!0,keyboardPanDelta:80});var Ji=pn.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"),De(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(),Oe(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(){De(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Oe(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=j(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()}We(t)}}});en.addInitHook("addHandler","keyboard",Ji),en.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var to=pn.extend({addHooks:function(){De(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Oe(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=Ge(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),We(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,r=n?Math.ceil(o/n)*n:o,s=t._limitZoom(e+(this._delta>0?r:-r))-e;this._delta=0,this._startTime=null,s&&("center"===t.options.scrollWheelZoom?t.setZoom(e+s):t.setZoomAround(this._lastMousePos,e+s))}});en.addInitHook("addHandler","scrollWheelZoom",to),en.mergeOptions({tap:!0,tapTolerance:15});var eo=pn.extend({addHooks:function(){De(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Oe(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(Fe(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var e=t.touches[0],n=e.target;this._startPos=this._newPos=new N(e.clientX,e.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&ge(n,"leaflet-active"),this._holdTimeout=setTimeout(o((function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))}),this),1e3),this._simulateEvent("mousedown",e),De(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),Oe(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var e=t.changedTouches[0],n=e.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&_e(n,"leaflet-active"),this._simulateEvent("mouseup",e),this._isTapValid()&&this._simulateEvent("click",e)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new N(e.clientX,e.clientY),this._simulateEvent("mousemove",e)},_simulateEvent:function(t,e){var n=document.createEvent("MouseEvents");n._simulated=!0,e.target._simulatedClick=!0,n.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(n)}});!Ct||Tt&&!ht||en.addInitHook("addHandler","tap",eo),en.mergeOptions({touchZoom:Ct&&!rt,bounceAtZoomLimits:!0});var no=pn.extend({addHooks:function(){ge(this._map._container,"leaflet-touch-zoom"),De(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){_e(this._map._container,"leaflet-touch-zoom"),Oe(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(),De(document,"touchmove",this._onTouchMove,this),De(document,"touchend",this._onTouchEnd,this),Fe(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]),r=n.distanceTo(i)/this._startDist;if(this._zoom=e.getScaleZoom(r,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&r<1||this._zoom>e.getMaxZoom()&&r>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===r)return}else{var s=n._add(i)._divideBy(2)._subtract(this._centerPoint);if(1===r&&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),k(this._animRequest);var a=o(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=E(a,this,!0),Fe(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,k(this._animRequest),Oe(document,"touchmove",this._onTouchMove,this),Oe(document,"touchend",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}});en.addInitHook("addHandler","touchZoom",no),en.BoxZoom=Yi,en.DoubleClickZoom=Xi,en.Drag=Qi,en.Keyboard=Ji,en.ScrollWheelZoom=to,en.Tap=eo,en.TouchZoom=no,t.version=e,t.Control=on,t.control=rn,t.Browser=Nt,t.Evented=z,t.Mixin=gn,t.Util=P,t.Class=S,t.Handler=pn,t.extend=n,t.bind=o,t.stamp=s,t.setOptions=f,t.DomEvent=Je,t.DomUtil=Ne,t.PosAnimation=tn,t.Draggable=bn,t.LineUtil=Dn,t.PolyUtil=On,t.Point=N,t.point=j,t.Bounds=O,t.bounds=I,t.Transformation=V,t.transformation=G,t.Projection=Rn,t.LatLng=Z,t.latLng=$,t.LatLngBounds=B,t.latLngBounds=R,t.CRS=q,t.GeoJSON=ui,t.geoJSON=yi,t.geoJson=bi,t.Layer=qn,t.LayerGroup=Fn,t.layerGroup=Wn,t.FeatureGroup=Un,t.featureGroup=Vn,t.ImageOverlay=wi,t.imageOverlay=xi,t.VideoOverlay=Ti,t.videoOverlay=Ci,t.SVGOverlay=Ei,t.svgOverlay=Li,t.DivOverlay=ki,t.Popup=Pi,t.popup=Si,t.Tooltip=Mi,t.tooltip=Ai,t.Icon=Gn,t.icon=Kn,t.DivIcon=zi,t.divIcon=Ni,t.Marker=Qn,t.marker=Jn,t.TileLayer=Oi,t.tileLayer=Ii,t.GridLayer=Di,t.gridLayer=ji,t.SVG=Ui,t.svg=Vi,t.Renderer=Zi,t.Canvas=$i,t.canvas=Hi,t.Path=ti,t.CircleMarker=ei,t.circleMarker=ni,t.Circle=ii,t.circle=oi,t.Polyline=ri,t.polyline=si,t.Polygon=ai,t.polygon=li,t.Rectangle=Gi,t.rectangle=Ki,t.Map=en,t.map=nn;var io=window.L;t.noConflict=function(){return window.L=io,this},window.L=t}(e)}));function we(e){let n,i,o,r,s,a,l,u,f,_,y,b,T,C,E,L,k,P,S,M,A,z,N,D,j,O,I,B;return{c(){n=p("div"),i=p("div"),o=m("map center: "),r=m(e[0]),s=g(),a=p("a"),l=m("view on osm.org"),u=g(),f=p("br"),_=m("\n    map zoom: "),y=m(e[1]),b=g(),T=p("br"),C=m("\n    viewbox: "),E=m(e[2]),L=g(),k=p("br"),P=m("\n    last click: "),S=m(e[4]),M=g(),A=p("br"),z=m("\n    mouse position: "),N=m(e[5]),D=g(),j=p("div"),O=p("a"),O.textContent="hide",w(a,"target","_blank"),w(a,"href",e[3]),w(i,"id","map-position-inner"),w(O,"href","#hide"),w(j,"id","map-position-close"),w(j,"class","svelte-1b30dq3"),w(n,"id","map-position"),w(n,"class","svelte-1b30dq3")},m(t,e){h(t,n,e),c(n,i),c(i,o),c(i,r),c(i,s),c(i,a),c(a,l),c(i,u),c(i,f),c(i,_),c(i,y),c(i,b),c(i,T),c(i,C),c(i,E),c(i,L),c(i,k),c(i,P),c(i,S),c(i,M),c(i,A),c(i,z),c(i,N),c(n,D),c(n,j),c(j,O),I||(B=v(O,"click",xe),I=!0)},p(t,[e]){1&e&&x(r,t[0]),8&e&&w(a,"href",t[3]),2&e&&x(y,t[1]),4&e&&x(E,t[2]),16&e&&x(S,t[4]),32&e&&x(N,t[5])},i:t,o:t,d(t){t&&d(n),I=!1,B()}}}function xe(){document.getElementById("map-position").style.display="none",document.getElementById("show-map-position").style.display="block"}function Te(t,e,n){let i,o,r,s,a,l,u;function c(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,r=t.getZoom()),n(2,s=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,u="-"),e&&n(5,u=[e.lat.toFixed(5),e.lng.toFixed(5)].join(",")),i&&n(4,l=[i.lat.toFixed(5),i.lng.toFixed(5)].join(","))}return ot.subscribe((t=>{t&&(t.on("move",(function(){c(t)})),t.on("mousemove",(function(e){c(t,e.latlng)})),t.on("click",(function(e){i=e.latlng,c(t)})),t.on("load",(function(){c(t)})))})),[o,r,s,a,l,u]}tt((function(t,e){!function(e,n){t.exports=e(be),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,r,s){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",r,s),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)}));class Ce extends Q{constructor(t){super(),X(this,t,Te,we,r,{})}}function Ee(e){let n,r,s,a,l,u,c,f;return n=new Ce({}),{c(){V(n.$$.fragment),r=g(),s=p("div"),a=g(),l=p("div"),l.textContent="show map bounds",w(s,"id","map"),w(s,"class","svelte-1vbvdrk"),w(l,"id","show-map-position"),w(l,"class","leaflet-bar btn btn-sm btn-outline-secondary svelte-1vbvdrk")},m(i,d){var p;G(n,i,d),h(i,r,d),h(i,s,d),h(i,a,d),h(i,l,d),u=!0,c||(f=[(p=e[0].call(null,s),p&&o(p.destroy)?p.destroy:t),v(l,"click",b(Le))],c=!0)},p:t,i(t){u||(W(n.$$.fragment,t),u=!0)},o(t){U(n.$$.fragment,t),u=!1},d(t){K(n,t),t&&d(r),t&&d(s),t&&d(a),t&&d(l),c=!1,i(f)}}}function Le(t){t.target.style.display="none",document.getElementById("map-position").style.display="block"}function ke(t,e,n){let{display_minimap:i=!1}=e,o=[];function r(t){let e=a(ot);if(!e)return;!function(){let t=a(ot);t&&o.forEach((function(e){t.removeLayer(e)}))}();let n=a(at);if(n){let t=be.circleMarker(n,{radius:5,weight:2,fillColor:"#ff7800",color:"red",opacity:.75,zIndexOffset:100,clickable:!1});t.addTo(e),o.push(t)}var i=new URLSearchParams(window.location.search).get("viewbox");if(i){let t=i.split(","),n=be.latLngBounds([t[1],t[0]],[t[3],t[2]]);be.rectangle(n,{color:"#69d53e",weight:3,dashArray:"5 5",opacity:.8,fill:!1}).addTo(e)}if(!t)return;let r=t.centroid?t.centroid.coordinates[1]:t.lat,s=t.centroid?t.centroid.coordinates[0]:t.lon,l=t.geometry||t.geojson;if(r&&s){let t=be.circleMarker([r,s],{radius:10,weight:2,fillColor:"#ff7800",color:"blue",opacity:.75});e.addLayer(t),o.push(t)}if(l){var u=be.geoJson({type:"FeatureCollection",features:[{type:"Feature",geometry:l,properties:{}}]},{style:()=>({interactive:!1,color:"blue"})});e.addLayer(u),o.push(u),e.fitBounds(u.getBounds())}else r&&s?e.setView([r,s],10):e.fitWorld()}return st.subscribe((t=>{r(t)})),t.$$set=t=>{"display_minimap"in t&&n(1,i=t.display_minimap)},[function(t){let e=function(t){const e=yt("Map_Tile_Attribution")||null;let n=new be.map(t,{attributionControl:e&&e.length,scrollWheelZoom:!0,touchZoom:!1,center:[yt("Map_Default_Lat"),yt("Map_Default_Lon")],zoom:yt("Map_Default_Zoom")});if(be.tileLayer(yt("Map_Tile_URL"),{attribution:e}).addTo(n),i){let t=new be.TileLayer(yt("Map_Tile_URL"),{minZoom:0,maxZoom:13,attribution:e});new be.Control.MiniMap(t,{toggleDisplay:!0}).addTo(n)}const o=be.Control.extend({options:{position:"topright"},onAdd:()=>document.getElementById("show-map-position")});return n.addControl(new o),n}(t);return ot.set(e),r(a(st)),{destroy:()=>{e.remove()}}},i]}class Pe extends Q{constructor(t){super(),X(this,t,ke,Ee,r,{display_minimap:1})}}function Se(t){let e,n,i,o,r,s,a,l,u;return e=new ie({props:{reverse_search:t[0],api_request_params:t[1],bStructuredSearch:t[2]}}),r=new ye({props:{reverse_search:t[0]}}),l=new Pe({props:{display_minimap:!0}}),{c(){V(e.$$.fragment),n=g(),i=p("div"),o=p("div"),V(r.$$.fragment),s=g(),a=p("div"),V(l.$$.fragment),w(o,"class","sidebar svelte-1wb4w3"),w(a,"id","map-wrapper"),w(a,"class","svelte-1wb4w3"),w(i,"id","content"),w(i,"class","svelte-1wb4w3")},m(t,d){G(e,t,d),h(t,n,d),h(t,i,d),c(i,o),G(r,o,null),c(i,s),c(i,a),G(l,a,null),u=!0},p(t,[n]){const i={};1&n&&(i.reverse_search=t[0]),2&n&&(i.api_request_params=t[1]),e.$set(i);const o={};1&n&&(o.reverse_search=t[0]),r.$set(o)},i(t){u||(W(e.$$.fragment,t),W(r.$$.fragment,t),W(l.$$.fragment,t),u=!0)},o(t){U(e.$$.fragment,t),U(r.$$.fragment,t),U(l.$$.fragment,t),u=!1},d(t){K(e,t),t&&d(n),t&&d(i),K(r),K(l)}}}function Me(t,e,n){let i,o,{reverse_search:r=!1}=e;function s(){let t=new URLSearchParams(window.location.search);if(Tt(),r)n(1,i={lat:t.get("lat"),lon:t.get("lon"),zoom:t.get("zoom")>1?Number(t.get("zoom")):Number(yt("Reverse_Default_Search_Zoom")),format:"jsonv2"}),(i.lat||i.lat)&&wt("reverse",i,(function(t){t&&!t.error?(at.set([i.lat,i.lon]),rt.set([t])):rt.set([]),Tt("Reverse result for "+i.lat+","+i.lon),document.querySelector("input[name=lat]").focus()}));else{n(1,i={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:yt("Search_AreaPolygons",!1)?1:0,viewbox:t.get("viewbox"),bounded:t.get("bounded"),dedupe:t.get("dedupe"),"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=i.street||i.city||i.county||i.state||i.country||i.postalcode;(i.q||e)&&wt("search",i,(function(t){rt.set(t),Tt("Result for "+i.q),document.querySelector("input[name=q]").focus()}))}}var a;return S((()=>{o=ut.subscribe(s)})),a=()=>{o()},P().$$.on_destroy.push(a),t.$$set=t=>{"reverse_search"in t&&n(0,r=t.reverse_search)},[r,i,undefined]}class Ae extends Q{constructor(t){super(),X(this,t,Me,Se,r,{reverse_search:0})}}function ze(e){let n,o,r,s,a,l,u,f,m,_,b,x,T,C,E,L,k,P;return{c(){n=p("div"),o=p("div"),r=p("div"),s=p("h1"),s.textContent="Show details for place",a=g(),l=p("div"),l.innerHTML='<h4 class="svelte-k5v90i">Search by place id</h4> \n\n        <form class="form-inline" action="details.html"><input type="edit" class="form-control form-control-sm svelte-k5v90i" pattern="^[0-9]+$" name="place_id" placeholder="12345"/> \n          <input type="submit" class="btn btn-primary btn-sm" value="Show"/></form>',u=g(),f=p("div"),m=p("h4"),m.textContent="Search by OSM type and OSM id",_=g(),b=p("form"),b.innerHTML='<input type="edit" class="form-control form-control-sm svelte-k5v90i" pattern="^[NWR][0-9]+$" placeholder="N123 or W123 or R123"/> \n          <input type="hidden" name="osmtype"/> \n          <input type="hidden" name="osmid"/> \n          <input type="submit" class="btn btn-primary btn-sm" value="Show"/>',x=g(),T=p("div"),C=p("h4"),C.textContent="Search by openstreetmap.org URL",E=g(),L=p("form"),L.innerHTML='<input type="edit" class="form-control form-control-sm svelte-k5v90i" pattern=".*openstreetmap.*" placeholder="https://www.openstreetmap.org/relation/123"/> \n          <input type="hidden" name="osmtype"/> \n          <input type="hidden" name="osmid"/> \n          <input type="submit" class="btn btn-primary btn-sm" value="Show"/>',w(l,"class","search-form svelte-k5v90i"),w(m,"class","svelte-k5v90i"),w(b,"id","form-by-type-and-id"),w(b,"class","form-inline"),w(b,"action","details.html"),w(f,"class","search-form svelte-k5v90i"),w(C,"class","svelte-k5v90i"),w(L,"id","form-by-osm-url"),w(L,"class","form-inline"),w(L,"action","details.html"),w(T,"class","search-form svelte-k5v90i"),w(r,"class","col-md-12"),w(o,"class","row"),w(n,"class","container"),w(n,"id","details-index-page")},m(t,e){h(t,n,e),c(n,o),c(o,r),c(r,s),c(r,a),c(r,l),c(r,u),c(r,f),c(f,m),c(f,_),c(f,b),c(r,x),c(r,T),c(T,C),c(T,E),c(T,L),k||(P=[v(b,"submit",y(Ne)),v(L,"submit",y(Ne))],k=!0)},p:t,i:t,o:t,d(t){t&&d(n),k=!1,i(P)}}}function Ne(t){let e=t.target,n=e.querySelector("input[type=edit]").value,i=n.match(/^\s*([NWR])(\d+)\s*$/i);if(i||(i=n.match(/\/(relation|way|node)\/(\d+)\s*$/)),!i)return void alert("invalid input");let o=i[1].charAt(0).toUpperCase();e.querySelector("input[name=osmtype]").setAttribute("value",o),e.querySelector("input[name=osmid]").setAttribute("value",i[2]),e.submit()}class De extends Q{constructor(t){super(),X(this,t,null,ze,r,{})}}function je(e){let n;return{c(){n=p("span"),n.textContent="No Name",w(n,"class","noname svelte-rtfpp8")},m(t,e){h(t,n,e)},p:t,d(t){t&&d(n)}}}function Oe(t){let e,n=t[0].localname+"";return{c(){e=m(n)},m(t,n){h(t,e,n)},p(t,i){1&i&&n!==(n=t[0].localname+"")&&x(e,n)},d(t){t&&d(e)}}}function Ie(t){let e,n,i;return{c(){e=p("a"),n=m("details"),w(e,"href",i=zt(t[0]))},m(t,i){h(t,e,i),c(e,n)},p(t,n){1&n&&i!==(i=zt(t[0]))&&w(e,"href",i)},d(t){t&&d(e)}}}function Be(e){let n,i,o,r,s,a,l,u,f,_,v,y,b,T,E,L,k,P=It(e[0])+"",S=Mt(e[0])+"",M=e[0].rank_address+"",A=Bt(e[0].admin_level)+"",z=Rt(e[0].distance,e[1])+"";function N(t,e){return t[0].localname?Oe:je}let D=N(e),j=D(e),O=e[0].osm_id&&Ie(e);return{c(){n=p("tr"),i=p("td"),j.c(),o=g(),r=p("td"),s=m(P),a=g(),l=p("td"),u=g(),f=p("td"),_=m(M),v=g(),y=p("td"),b=m(A),T=g(),E=p("td"),L=g(),k=p("td"),O&&O.c(),w(i,"class","name svelte-rtfpp8"),w(n,"class","svelte-rtfpp8"),C(n,"notused",!e[2])},m(t,e){h(t,n,e),c(n,i),j.m(i,null),c(n,o),c(n,r),c(r,s),c(n,a),c(n,l),l.innerHTML=S,c(n,u),c(n,f),c(f,_),c(n,v),c(n,y),c(y,b),c(n,T),c(n,E),E.innerHTML=z,c(n,L),c(n,k),O&&O.m(k,null)},p(t,[e]){D===(D=N(t))&&j?j.p(t,e):(j.d(1),j=D(t),j&&(j.c(),j.m(i,null))),1&e&&P!==(P=It(t[0])+"")&&x(s,P),1&e&&S!==(S=Mt(t[0])+"")&&(l.innerHTML=S),1&e&&M!==(M=t[0].rank_address+"")&&x(_,M),1&e&&A!==(A=Bt(t[0].admin_level)+"")&&x(b,A),3&e&&z!==(z=Rt(t[0].distance,t[1])+"")&&(E.innerHTML=z),t[0].osm_id?O?O.p(t,e):(O=Ie(t),O.c(),O.m(k,null)):O&&(O.d(1),O=null),4&e&&C(n,"notused",!t[2])},i:t,o:t,d(t){t&&d(n),j.d(),O&&O.d()}}}function Re(t,e,n){let i,{addressLine:o}=e,{bDistanceInMeters:r}=e;return t.$$set=t=>{"addressLine"in t&&n(0,o=t.addressLine),"bDistanceInMeters"in t&&n(1,r=t.bDistanceInMeters)},t.$$.update=()=>{1&t.$$.dirty&&n(2,i=o.isaddress)},[o,r,i]}class Ze extends Q{constructor(t){super(),X(this,t,Re,Be,r,{addressLine:0,bDistanceInMeters:1})}}function $e(t,e,n){const i=t.slice();return i[3]=e[n],i}function He(t,e,n){const i=t.slice();return i[6]=e[n],i}function qe(t,e,n){const i=t.slice();return i[9]=e[n],i}function Fe(t,e,n){const i=t.slice();return i[9]=e[n],i}function We(t,e,n){const i=t.slice();return i[14]=e[n],i}function Ue(t,e,n){const i=t.slice();return i[14]=e[n],i}function Ve(t,e,n){const i=t.slice();return i[19]=e[n],i}function Ge(t,e,n){const i=t.slice();return i[19]=e[n],i}function Ke(t,e,n){const i=t.slice();return i[19]=e[n],i}function Ye(e){let n;return{c(){n=m("No such place found.")},m(t,e){h(t,n,e)},p:t,i:t,o:t,d(t){t&&d(n)}}}function Xe(e){let n,i;return n=new De({}),{c(){V(n.$$.fragment)},m(t,e){G(n,t,e),i=!0},p:t,i(t){i||(W(n.$$.fragment,t),i=!0)},o(t){U(n.$$.fragment,t),i=!1},d(t){K(n,t)}}}function Qe(t){let e,n,i,o,r,s,a,l,u,_,v,y,b,T,C,E,L,k,P,S,M,A,z,N,D,j,O,I,B,R,Z,$,H,Y,X,Q,J,tt,et,nt,it,ot,rt,st,at,lt,ut,ct,ht,dt,ft,pt,mt,gt,_t,vt,yt,bt,wt,xt,Tt,Ct,Et,Lt,kt,Pt,St,At,Nt,It,Bt,Rt,Zt,$t,Ht,qt,Ft,Wt,Ut,Vt,Gt,Kt,Yt,Xt,Qt,Jt,te,ee,ne,ie,oe,re,se,ae,ue,ce,he,de,fe,pe,me,ge,_e,ve,ye,be,we,xe,Te,Ce,Ee,Le,ke,Se,Me,Ae,ze,Ne,De=t[0].localname+"",je=t[0].category+"",Oe=t[0].type+"",Ie=t[0].indexed_date+"",Be=jt(t[0]),Re=t[0].rank_search+"",Ze=t[0].rank_address+"",$e=Ot(t[0].rank_address)+"",He=Dt(t[0])+"",qe=t[0].centroid.coordinates[1]+"",Fe=t[0].centroid.coordinates[0]+"",We=Mt(t[0])+"",Ue=t[0].place_id+"",Ye=t[0].calculated_postcode+"";b=new le({props:{aPlace:t[0]}});let Xe=Object.keys(t[0].names),Qe=[];for(let e=0;e<Xe.length;e+=1)Qe[e]=Je(Ke(t,Xe,e));let nn=Be&&tn(t),ln=t[0].calculated_importance&&en(t),cn=t[0].calculated_wikipedia&&on(t),fn=Object.keys(t[0].addresstags),pn=[];for(let e=0;e<fn.length;e+=1)pn[e]=rn(Ge(t,fn,e));let mn=Object.keys(t[0].extratags),gn=[];for(let e=0;e<mn.length;e+=1)gn[e]=sn(Ve(t,mn,e));fe=new Pe({});let yn=t[0].address&&an(t),bn=t[0].linked_places&&un(t);function wn(t,e){return t[0].keywords?dn:hn}let xn=wn(t),Tn=xn(t);const Cn=[vn,_n],En=[];function Ln(t,e){return t[0].hierarchy?0:1}return Ae=Ln(t),ze=En[Ae]=Cn[Ae](t),{c(){e=p("div"),n=p("div"),i=p("div"),o=p("h1"),r=m(De),s=g(),a=p("small"),l=p("a"),u=m("link to this page"),v=g(),y=p("div"),V(b.$$.fragment),T=g(),C=p("div"),E=p("div"),L=p("table"),k=p("tbody"),P=p("tr"),S=p("td"),S.textContent="Name",M=g(),A=p("td");for(let t=0;t<Qe.length;t+=1)Qe[t].c();z=g(),N=p("tr"),D=p("td"),D.textContent="Type",j=g(),O=p("td"),I=m(je),B=m(":"),R=m(Oe),Z=g(),$=p("tr"),H=p("td"),H.textContent="Last Updated",Y=g(),X=p("td"),Q=m(Ie),J=g(),nn&&nn.c(),tt=g(),et=p("tr"),nt=p("td"),nt.textContent="Search Rank",it=g(),ot=p("td"),rt=m(Re),st=g(),at=p("tr"),lt=p("td"),lt.textContent="Address Rank",ut=g(),ct=p("td"),ht=m(Ze),dt=m(" ("),ft=m($e),pt=m(")"),mt=g(),ln&&ln.c(),gt=g(),_t=p("tr"),vt=p("td"),vt.textContent="Coverage",yt=g(),bt=p("td"),wt=m(He),xt=g(),Tt=p("tr"),Ct=p("td"),Ct.textContent="Centre Point (lat,lon)",Et=g(),Lt=p("td"),kt=m(qe),Pt=m(","),St=m(Fe),At=g(),Nt=p("tr"),It=p("td"),It.textContent="OSM",Bt=g(),Rt=p("td"),Zt=g(),$t=p("tr"),Ht=p("td"),Ht.innerHTML='Place Id\n                (<a href="https://nominatim.org/release-docs/develop/api/Output/#place_id-is-not-a-persistent-id">on this server</a>)',qt=g(),Ft=p("td"),Wt=m(Ue),Ut=g(),cn&&cn.c(),Vt=g(),Gt=p("tr"),Kt=p("td"),Kt.textContent="Computed Postcode",Yt=g(),Xt=p("td"),Qt=m(Ye),Jt=g(),te=p("tr"),ee=p("td"),ee.textContent="Address Tags",ne=g(),ie=p("td");for(let t=0;t<pn.length;t+=1)pn[t].c();oe=g(),re=p("tr"),se=p("td"),se.textContent="Extra Tags",ae=g(),ue=p("td");for(let t=0;t<gn.length;t+=1)gn[t].c();ce=g(),he=p("div"),de=p("div"),V(fe.$$.fragment),pe=g(),me=p("div"),ge=p("div"),_e=p("h2"),_e.textContent="Address",ve=g(),ye=p("table"),be=p("thead"),be.innerHTML='<tr class="svelte-j6zgmy"><th class="svelte-j6zgmy">Local name</th> \n              <th class="svelte-j6zgmy">Type</th> \n              <th class="svelte-j6zgmy">OSM</th> \n              <th class="svelte-j6zgmy">Address rank</th> \n              <th class="svelte-j6zgmy">Admin level</th> \n              <th class="svelte-j6zgmy">Distance</th> \n              <th class="svelte-j6zgmy"></th></tr>',we=g(),xe=p("tbody"),yn&&yn.c(),Te=g(),bn&&bn.c(),Ce=g(),Ee=p("tr"),Ee.innerHTML='<td colspan="6" class="svelte-j6zgmy"><h2 class="svelte-j6zgmy">Keywords</h2></td>',Le=g(),Tn.c(),ke=g(),Se=p("tr"),Se.innerHTML='<td colspan="6" class="svelte-j6zgmy"><h2 class="svelte-j6zgmy">Parent Of</h2></td>',Me=g(),ze.c(),w(l,"href",_=zt(t[0])),w(l,"class","svelte-j6zgmy"),w(o,"class","svelte-j6zgmy"),w(i,"class","col-sm-10"),w(y,"class","col-sm-2 text-right"),w(n,"class","row"),w(S,"class","svelte-j6zgmy"),w(A,"class","svelte-j6zgmy"),w(P,"class","svelte-j6zgmy"),w(D,"class","svelte-j6zgmy"),w(O,"class","svelte-j6zgmy"),w(N,"class","svelte-j6zgmy"),w(H,"class","svelte-j6zgmy"),w(X,"class","svelte-j6zgmy"),w($,"class","svelte-j6zgmy"),w(nt,"class","svelte-j6zgmy"),w(ot,"class","svelte-j6zgmy"),w(et,"class","svelte-j6zgmy"),w(lt,"class","svelte-j6zgmy"),w(ct,"class","svelte-j6zgmy"),w(at,"class","svelte-j6zgmy"),w(vt,"class","svelte-j6zgmy"),w(bt,"class","svelte-j6zgmy"),w(_t,"class","svelte-j6zgmy"),w(Ct,"class","svelte-j6zgmy"),w(Lt,"class","svelte-j6zgmy"),w(Tt,"class","svelte-j6zgmy"),w(It,"class","svelte-j6zgmy"),w(Rt,"class","svelte-j6zgmy"),w(Nt,"class","svelte-j6zgmy"),w(Ht,"class","svelte-j6zgmy"),w(Ft,"class","svelte-j6zgmy"),w($t,"class","svelte-j6zgmy"),w(Kt,"class","svelte-j6zgmy"),w(Xt,"class","svelte-j6zgmy"),w(Gt,"class","svelte-j6zgmy"),w(ee,"class","svelte-j6zgmy"),w(ie,"class","svelte-j6zgmy"),w(te,"class","svelte-j6zgmy"),w(se,"class","svelte-j6zgmy"),w(ue,"class","svelte-j6zgmy"),w(re,"class","svelte-j6zgmy"),w(k,"class","svelte-j6zgmy"),w(L,"id","locationdetails"),w(L,"class","table table-striped svelte-j6zgmy"),w(E,"class","col-md-6"),w(de,"id","map-wrapper"),w(de,"class","svelte-j6zgmy"),w(he,"class","col-md-6"),w(C,"class","row"),w(_e,"class","svelte-j6zgmy"),w(be,"class","svelte-j6zgmy"),w(Ee,"class","all-columns svelte-j6zgmy"),w(Se,"class","all-columns svelte-j6zgmy"),w(xe,"class","svelte-j6zgmy"),w(ye,"id","address"),w(ye,"class","table table-striped table-small svelte-j6zgmy"),w(ge,"class","col-md-12"),w(me,"class","row"),w(e,"class","container")},m(t,d){h(t,e,d),c(e,n),c(n,i),c(i,o),c(o,r),c(o,s),c(o,a),c(a,l),c(l,u),c(n,v),c(n,y),G(b,y,null),c(e,T),c(e,C),c(C,E),c(E,L),c(L,k),c(k,P),c(P,S),c(P,M),c(P,A);for(let t=0;t<Qe.length;t+=1)Qe[t].m(A,null);c(k,z),c(k,N),c(N,D),c(N,j),c(N,O),c(O,I),c(O,B),c(O,R),c(k,Z),c(k,$),c($,H),c($,Y),c($,X),c(X,Q),c(k,J),nn&&nn.m(k,null),c(k,tt),c(k,et),c(et,nt),c(et,it),c(et,ot),c(ot,rt),c(k,st),c(k,at),c(at,lt),c(at,ut),c(at,ct),c(ct,ht),c(ct,dt),c(ct,ft),c(ct,pt),c(k,mt),ln&&ln.m(k,null),c(k,gt),c(k,_t),c(_t,vt),c(_t,yt),c(_t,bt),c(bt,wt),c(k,xt),c(k,Tt),c(Tt,Ct),c(Tt,Et),c(Tt,Lt),c(Lt,kt),c(Lt,Pt),c(Lt,St),c(k,At),c(k,Nt),c(Nt,It),c(Nt,Bt),c(Nt,Rt),Rt.innerHTML=We,c(k,Zt),c(k,$t),c($t,Ht),c($t,qt),c($t,Ft),c(Ft,Wt),c(k,Ut),cn&&cn.m(k,null),c(k,Vt),c(k,Gt),c(Gt,Kt),c(Gt,Yt),c(Gt,Xt),c(Xt,Qt),c(k,Jt),c(k,te),c(te,ee),c(te,ne),c(te,ie);for(let t=0;t<pn.length;t+=1)pn[t].m(ie,null);c(k,oe),c(k,re),c(re,se),c(re,ae),c(re,ue);for(let t=0;t<gn.length;t+=1)gn[t].m(ue,null);c(C,ce),c(C,he),c(he,de),G(fe,de,null),c(e,pe),c(e,me),c(me,ge),c(ge,_e),c(ge,ve),c(ge,ye),c(ye,be),c(ye,we),c(ye,xe),yn&&yn.m(xe,null),c(xe,Te),bn&&bn.m(xe,null),c(xe,Ce),c(xe,Ee),c(xe,Le),Tn.m(xe,null),c(xe,ke),c(xe,Se),c(xe,Me),En[Ae].m(xe,null),Ne=!0},p(t,e){(!Ne||1&e)&&De!==(De=t[0].localname+"")&&x(r,De),(!Ne||1&e&&_!==(_=zt(t[0])))&&w(l,"href",_);const n={};if(1&e&&(n.aPlace=t[0]),b.$set(n),1&e){let n;for(Xe=Object.keys(t[0].names),n=0;n<Xe.length;n+=1){const i=Ke(t,Xe,n);Qe[n]?Qe[n].p(i,e):(Qe[n]=Je(i),Qe[n].c(),Qe[n].m(A,null))}for(;n<Qe.length;n+=1)Qe[n].d(1);Qe.length=Xe.length}if((!Ne||1&e)&&je!==(je=t[0].category+"")&&x(I,je),(!Ne||1&e)&&Oe!==(Oe=t[0].type+"")&&x(R,Oe),(!Ne||1&e)&&Ie!==(Ie=t[0].indexed_date+"")&&x(Q,Ie),1&e&&(Be=jt(t[0])),Be?nn?nn.p(t,e):(nn=tn(t),nn.c(),nn.m(k,tt)):nn&&(nn.d(1),nn=null),(!Ne||1&e)&&Re!==(Re=t[0].rank_search+"")&&x(rt,Re),(!Ne||1&e)&&Ze!==(Ze=t[0].rank_address+"")&&x(ht,Ze),(!Ne||1&e)&&$e!==($e=Ot(t[0].rank_address)+"")&&x(ft,$e),t[0].calculated_importance?ln?ln.p(t,e):(ln=en(t),ln.c(),ln.m(k,gt)):ln&&(ln.d(1),ln=null),(!Ne||1&e)&&He!==(He=Dt(t[0])+"")&&x(wt,He),(!Ne||1&e)&&qe!==(qe=t[0].centroid.coordinates[1]+"")&&x(kt,qe),(!Ne||1&e)&&Fe!==(Fe=t[0].centroid.coordinates[0]+"")&&x(St,Fe),(!Ne||1&e)&&We!==(We=Mt(t[0])+"")&&(Rt.innerHTML=We),(!Ne||1&e)&&Ue!==(Ue=t[0].place_id+"")&&x(Wt,Ue),t[0].calculated_wikipedia?cn?cn.p(t,e):(cn=on(t),cn.c(),cn.m(k,Vt)):cn&&(cn.d(1),cn=null),(!Ne||1&e)&&Ye!==(Ye=t[0].calculated_postcode+"")&&x(Qt,Ye),1&e){let n;for(fn=Object.keys(t[0].addresstags),n=0;n<fn.length;n+=1){const i=Ge(t,fn,n);pn[n]?pn[n].p(i,e):(pn[n]=rn(i),pn[n].c(),pn[n].m(ie,null))}for(;n<pn.length;n+=1)pn[n].d(1);pn.length=fn.length}if(1&e){let n;for(mn=Object.keys(t[0].extratags),n=0;n<mn.length;n+=1){const i=Ve(t,mn,n);gn[n]?gn[n].p(i,e):(gn[n]=sn(i),gn[n].c(),gn[n].m(ue,null))}for(;n<gn.length;n+=1)gn[n].d(1);gn.length=mn.length}t[0].address?yn?(yn.p(t,e),1&e&&W(yn,1)):(yn=an(t),yn.c(),W(yn,1),yn.m(xe,Te)):yn&&(q(),U(yn,1,1,(()=>{yn=null})),F()),t[0].linked_places?bn?(bn.p(t,e),1&e&&W(bn,1)):(bn=un(t),bn.c(),W(bn,1),bn.m(xe,Ce)):bn&&(q(),U(bn,1,1,(()=>{bn=null})),F()),xn===(xn=wn(t))&&Tn?Tn.p(t,e):(Tn.d(1),Tn=xn(t),Tn&&(Tn.c(),Tn.m(xe,ke)));let i=Ae;Ae=Ln(t),Ae===i?En[Ae].p(t,e):(q(),U(En[i],1,1,(()=>{En[i]=null})),F(),ze=En[Ae],ze?ze.p(t,e):(ze=En[Ae]=Cn[Ae](t),ze.c()),W(ze,1),ze.m(xe,null))},i(t){Ne||(W(b.$$.fragment,t),W(fe.$$.fragment,t),W(yn),W(bn),W(ze),Ne=!0)},o(t){U(b.$$.fragment,t),U(fe.$$.fragment,t),U(yn),U(bn),U(ze),Ne=!1},d(t){t&&d(e),K(b),f(Qe,t),nn&&nn.d(),ln&&ln.d(),cn&&cn.d(),f(pn,t),f(gn,t),K(fe),yn&&yn.d(),bn&&bn.d(),Tn.d(),En[Ae].d()}}}function Je(t){let e,n,i,o,r,s,a=t[0].names[t[19]]+"",l=t[19]+"";return{c(){e=p("div"),n=p("span"),i=m(a),o=m(" ("),r=m(l),s=m(")\n                  "),w(n,"class","name svelte-j6zgmy"),w(e,"class","line")},m(t,a){h(t,e,a),c(e,n),c(n,i),c(e,o),c(e,r),c(e,s)},p(t,e){1&e&&a!==(a=t[0].names[t[19]]+"")&&x(i,a),1&e&&l!==(l=t[19]+"")&&x(r,l)},d(t){t&&d(e)}}}function tn(t){let e,n,i,o,r,s=t[0].admin_level+"";return{c(){e=p("tr"),n=p("td"),n.textContent="Admin Level",i=g(),o=p("td"),r=m(s),w(n,"class","svelte-j6zgmy"),w(o,"class","svelte-j6zgmy"),w(e,"class","svelte-j6zgmy")},m(t,s){h(t,e,s),c(e,n),c(e,i),c(e,o),c(o,r)},p(t,e){1&e&&s!==(s=t[0].admin_level+"")&&x(r,s)},d(t){t&&d(e)}}}function en(t){let e,n,i,o,r,s,a=t[0].calculated_importance+"",l=!t[0].importance&&nn();return{c(){e=p("tr"),n=p("td"),n.textContent="Importance",i=g(),o=p("td"),r=m(a),s=g(),l&&l.c(),w(n,"class","svelte-j6zgmy"),w(o,"class","svelte-j6zgmy"),w(e,"class","svelte-j6zgmy")},m(t,a){h(t,e,a),c(e,n),c(e,i),c(e,o),c(o,r),c(o,s),l&&l.m(o,null)},p(t,e){1&e&&a!==(a=t[0].calculated_importance+"")&&x(r,a),t[0].importance?l&&(l.d(1),l=null):l||(l=nn(),l.c(),l.m(o,null))},d(t){t&&d(e),l&&l.d()}}}function nn(t){let e;return{c(){e=m("(estimated)")},m(t,n){h(t,e,n)},d(t){t&&d(e)}}}function on(t){let e,n,i,o,r=Nt(t[0])+"";return{c(){e=p("tr"),n=p("td"),n.textContent="Wikipedia Calculated",i=g(),o=p("td"),w(n,"class","svelte-j6zgmy"),w(o,"class","svelte-j6zgmy"),w(e,"class","svelte-j6zgmy")},m(t,s){h(t,e,s),c(e,n),c(e,i),c(e,o),o.innerHTML=r},p(t,e){1&e&&r!==(r=Nt(t[0])+"")&&(o.innerHTML=r)},d(t){t&&d(e)}}}function rn(t){let e,n,i,o,r,s,a=t[0].addresstags[t[19]]+"",l=t[19]+"";return{c(){e=p("div"),n=p("span"),i=m(a),o=m(" ("),r=m(l),s=m(")\n                  "),w(n,"class","name svelte-j6zgmy"),w(e,"class","line")},m(t,a){h(t,e,a),c(e,n),c(n,i),c(e,o),c(e,r),c(e,s)},p(t,e){1&e&&a!==(a=t[0].addresstags[t[19]]+"")&&x(i,a),1&e&&l!==(l=t[19]+"")&&x(r,l)},d(t){t&&d(e)}}}function sn(t){let e,n,i,o,r,s,a=t[0].extratags[t[19]]+"",l=t[19]+"";return{c(){e=p("div"),n=p("span"),i=m(a),o=m(" ("),r=m(l),s=m(")\n                  "),w(n,"class","name svelte-j6zgmy"),w(e,"class","line")},m(t,a){h(t,e,a),c(e,n),c(n,i),c(e,o),c(e,r),c(e,s)},p(t,e){1&e&&a!==(a=t[0].extratags[t[19]]+"")&&x(i,a),1&e&&l!==(l=t[19]+"")&&x(r,l)},d(t){t&&d(e)}}}function an(t){let e,n,i=t[0].address,o=[];for(let e=0;e<i.length;e+=1)o[e]=ln(Ue(t,i,e));const r=t=>U(o[t],1,1,(()=>{o[t]=null}));return{c(){for(let t=0;t<o.length;t+=1)o[t].c();e=_()},m(t,i){for(let e=0;e<o.length;e+=1)o[e].m(t,i);h(t,e,i),n=!0},p(t,n){if(1&n){let s;for(i=t[0].address,s=0;s<i.length;s+=1){const r=Ue(t,i,s);o[s]?(o[s].p(r,n),W(o[s],1)):(o[s]=ln(r),o[s].c(),W(o[s],1),o[s].m(e.parentNode,e))}for(q(),s=i.length;s<o.length;s+=1)r(s);F()}},i(t){if(!n){for(let t=0;t<i.length;t+=1)W(o[t]);n=!0}},o(t){o=o.filter(Boolean);for(let t=0;t<o.length;t+=1)U(o[t]);n=!1},d(t){f(o,t),t&&d(e)}}}function ln(t){let e,n;return e=new Ze({props:{addressLine:t[14],bDistanceInMeters:"false"}}),{c(){V(e.$$.fragment)},m(t,i){G(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.addressLine=t[14]),e.$set(i)},i(t){n||(W(e.$$.fragment,t),n=!0)},o(t){U(e.$$.fragment,t),n=!1},d(t){K(e,t)}}}function un(t){let e,n,i,o,r=t[0].linked_places,s=[];for(let e=0;e<r.length;e+=1)s[e]=cn(We(t,r,e));const a=t=>U(s[t],1,1,(()=>{s[t]=null}));return{c(){e=p("tr"),e.innerHTML='<td colspan="6" class="svelte-j6zgmy"><h2 class="svelte-j6zgmy">Linked Places</h2></td>',n=g();for(let t=0;t<s.length;t+=1)s[t].c();i=_(),w(e,"class","all-columns svelte-j6zgmy")},m(t,r){h(t,e,r),h(t,n,r);for(let e=0;e<s.length;e+=1)s[e].m(t,r);h(t,i,r),o=!0},p(t,e){if(1&e){let n;for(r=t[0].linked_places,n=0;n<r.length;n+=1){const o=We(t,r,n);s[n]?(s[n].p(o,e),W(s[n],1)):(s[n]=cn(o),s[n].c(),W(s[n],1),s[n].m(i.parentNode,i))}for(q(),n=r.length;n<s.length;n+=1)a(n);F()}},i(t){if(!o){for(let t=0;t<r.length;t+=1)W(s[t]);o=!0}},o(t){s=s.filter(Boolean);for(let t=0;t<s.length;t+=1)U(s[t]);o=!1},d(t){t&&d(e),t&&d(n),f(s,t),t&&d(i)}}}function cn(t){let e,n;return e=new Ze({props:{addressLine:t[14],bDistanceInMeters:"true"}}),{c(){V(e.$$.fragment)},m(t,i){G(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.addressLine=t[14]),e.$set(i)},i(t){n||(W(e.$$.fragment,t),n=!0)},o(t){U(e.$$.fragment,t),n=!1},d(t){K(e,t)}}}function hn(e){let n,i,o,r;return{c(){n=p("tr"),i=p("td"),o=p("a"),r=m("display keywords"),w(o,"class","btn btn-outline-secondary btn-sm"),w(o,"href",e[1]+"&keywords=1"),w(i,"class","svelte-j6zgmy"),w(n,"class","svelte-j6zgmy")},m(t,e){h(t,n,e),c(n,i),c(i,o),c(o,r)},p:t,d(t){t&&d(n)}}}function dn(t){let e,n,i,o,r,s,a=t[0].keywords.name,l=[];for(let e=0;e<a.length;e+=1)l[e]=pn(Fe(t,a,e));let u=t[0].keywords.address,c=[];for(let e=0;e<u.length;e+=1)c[e]=gn(qe(t,u,e));return{c(){e=p("tr"),e.innerHTML='<td colspan="6" class="svelte-j6zgmy"><h3 class="svelte-j6zgmy">Name Keywords</h3></td>',n=g();for(let t=0;t<l.length;t+=1)l[t].c();i=g(),o=p("tr"),o.innerHTML='<td colspan="6" class="svelte-j6zgmy"><h3 class="svelte-j6zgmy">Address Keywords</h3></td>',r=g();for(let t=0;t<c.length;t+=1)c[t].c();s=_(),w(e,"class","all-columns svelte-j6zgmy"),w(o,"class","all-columns svelte-j6zgmy")},m(t,a){h(t,e,a),h(t,n,a);for(let e=0;e<l.length;e+=1)l[e].m(t,a);h(t,i,a),h(t,o,a),h(t,r,a);for(let e=0;e<c.length;e+=1)c[e].m(t,a);h(t,s,a)},p(t,e){if(1&e){let n;for(a=t[0].keywords.name,n=0;n<a.length;n+=1){const o=Fe(t,a,n);l[n]?l[n].p(o,e):(l[n]=pn(o),l[n].c(),l[n].m(i.parentNode,i))}for(;n<l.length;n+=1)l[n].d(1);l.length=a.length}if(1&e){let n;for(u=t[0].keywords.address,n=0;n<u.length;n+=1){const i=qe(t,u,n);c[n]?c[n].p(i,e):(c[n]=gn(i),c[n].c(),c[n].m(s.parentNode,s))}for(;n<c.length;n+=1)c[n].d(1);c.length=u.length}},d(t){t&&d(e),t&&d(n),f(l,t),t&&d(i),t&&d(o),t&&d(r),f(c,t),t&&d(s)}}}function fn(t){let e,n,i,o=t[9].id+"";return{c(){e=p("td"),n=m("word id: "),i=m(o),w(e,"class","svelte-j6zgmy")},m(t,o){h(t,e,o),c(e,n),c(e,i)},p(t,e){1&e&&o!==(o=t[9].id+"")&&x(i,o)},d(t){t&&d(e)}}}function pn(t){let e,n,i,o,r=Zt(t[9].token)+"",s=t[9].id&&fn(t);return{c(){e=p("tr"),n=p("td"),i=m(r),o=g(),s&&s.c(),w(n,"class","svelte-j6zgmy"),w(e,"class","svelte-j6zgmy")},m(t,r){h(t,e,r),c(e,n),c(n,i),c(e,o),s&&s.m(e,null)},p(t,n){1&n&&r!==(r=Zt(t[9].token)+"")&&x(i,r),t[9].id?s?s.p(t,n):(s=fn(t),s.c(),s.m(e,null)):s&&(s.d(1),s=null)},d(t){t&&d(e),s&&s.d()}}}function mn(t){let e,n,i,o=t[9].id+"";return{c(){e=p("td"),n=m("word id: "),i=m(o),w(e,"class","svelte-j6zgmy")},m(t,o){h(t,e,o),c(e,n),c(e,i)},p(t,e){1&e&&o!==(o=t[9].id+"")&&x(i,o)},d(t){t&&d(e)}}}function gn(t){let e,n,i,o,r,s=Zt(t[9].token)+"",a=t[9].id&&mn(t);return{c(){e=p("tr"),n=p("td"),i=m(s),o=g(),a&&a.c(),r=g(),w(n,"class","svelte-j6zgmy"),w(e,"class","svelte-j6zgmy")},m(t,s){h(t,e,s),c(e,n),c(n,i),c(e,o),a&&a.m(e,null),c(e,r)},p(t,n){1&n&&s!==(s=Zt(t[9].token)+"")&&x(i,s),t[9].id?a?a.p(t,n):(a=mn(t),a.c(),a.m(e,r)):a&&(a.d(1),a=null)},d(t){t&&d(e),a&&a.d()}}}function _n(e){let n,i,o,r;return{c(){n=p("tr"),i=p("td"),o=p("a"),r=m("display child places"),w(o,"class","btn btn-outline-secondary btn-sm"),w(o,"href",e[1]+"&hierarchy=1"),w(i,"class","svelte-j6zgmy"),w(n,"class","svelte-j6zgmy")},m(t,e){h(t,n,e),c(n,i),c(i,o),c(o,r)},p:t,i:t,o:t,d(t){t&&d(n)}}}function vn(t){let e,n,i,o=Object.keys(t[0].hierarchy)>500,r=Object.keys(t[0].hierarchy),s=[];for(let e=0;e<r.length;e+=1)s[e]=bn($e(t,r,e));const a=t=>U(s[t],1,1,(()=>{s[t]=null}));let l=o&&wn();return{c(){for(let t=0;t<s.length;t+=1)s[t].c();e=g(),l&&l.c(),n=_()},m(t,o){for(let e=0;e<s.length;e+=1)s[e].m(t,o);h(t,e,o),l&&l.m(t,o),h(t,n,o),i=!0},p(t,i){if(1&i){let n;for(r=Object.keys(t[0].hierarchy),n=0;n<r.length;n+=1){const o=$e(t,r,n);s[n]?(s[n].p(o,i),W(s[n],1)):(s[n]=bn(o),s[n].c(),W(s[n],1),s[n].m(e.parentNode,e))}for(q(),n=r.length;n<s.length;n+=1)a(n);F()}1&i&&(o=Object.keys(t[0].hierarchy)>500),o?l||(l=wn(),l.c(),l.m(n.parentNode,n)):l&&(l.d(1),l=null)},i(t){if(!i){for(let t=0;t<r.length;t+=1)W(s[t]);i=!0}},o(t){s=s.filter(Boolean);for(let t=0;t<s.length;t+=1)U(s[t]);i=!1},d(t){f(s,t),t&&d(e),l&&l.d(t),t&&d(n)}}}function yn(t){let e,n;return e=new Ze({props:{addressLine:t[6],bDistanceInMeters:"true"}}),{c(){V(e.$$.fragment)},m(t,i){G(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.addressLine=t[6]),e.$set(i)},i(t){n||(W(e.$$.fragment,t),n=!0)},o(t){U(e.$$.fragment,t),n=!1},d(t){K(e,t)}}}function bn(t){let e,n,i,o,r,s,a,l=t[3]+"",u=t[0].hierarchy[t[3]],v=[];for(let e=0;e<u.length;e+=1)v[e]=yn(He(t,u,e));const y=t=>U(v[t],1,1,(()=>{v[t]=null}));return{c(){e=p("tr"),n=p("td"),i=p("h3"),o=m(l),r=g();for(let t=0;t<v.length;t+=1)v[t].c();s=_(),w(i,"class","svelte-j6zgmy"),w(n,"colspan","6"),w(n,"class","svelte-j6zgmy"),w(e,"class","all-columns svelte-j6zgmy")},m(t,l){h(t,e,l),c(e,n),c(n,i),c(i,o),h(t,r,l);for(let e=0;e<v.length;e+=1)v[e].m(t,l);h(t,s,l),a=!0},p(t,e){if((!a||1&e)&&l!==(l=t[3]+"")&&x(o,l),1&e){let n;for(u=t[0].hierarchy[t[3]],n=0;n<u.length;n+=1){const i=He(t,u,n);v[n]?(v[n].p(i,e),W(v[n],1)):(v[n]=yn(i),v[n].c(),W(v[n],1),v[n].m(s.parentNode,s))}for(q(),n=u.length;n<v.length;n+=1)y(n);F()}},i(t){if(!a){for(let t=0;t<u.length;t+=1)W(v[t]);a=!0}},o(t){v=v.filter(Boolean);for(let t=0;t<v.length;t+=1)U(v[t]);a=!1},d(t){t&&d(e),t&&d(r),f(v,t),t&&d(s)}}}function wn(t){let e;return{c(){e=p("p"),e.textContent="There are more child objects which are not shown."},m(t,n){h(t,e,n)},d(t){t&&d(e)}}}function xn(t){let e,n,i,o;const r=[Qe,Xe,Ye],s=[];function a(t,e){return t[0]?0:""===window.location.search?1:2}return e=a(t),n=s[e]=r[e](t),{c(){n.c(),i=_()},m(t,n){s[e].m(t,n),h(t,i,n),o=!0},p(t,[o]){let l=e;e=a(t),e===l?s[e].p(t,o):(q(),U(s[l],1,1,(()=>{s[l]=null})),F(),n=s[e],n?n.p(t,o):(n=s[e]=r[e](t),n.c()),W(n,1),n.m(i.parentNode,i))},i(t){o||(W(n),o=!0)},o(t){U(n),o=!1},d(t){s[e].d(t),t&&d(i)}}}function Tn(t,e,n){let i,o=window.location.search;return S((function(){var t=new URLSearchParams(window.location.search),e={place_id:t.get("place_id"),osmtype:t.get("osmtype"),osmid:t.get("osmid"),class:t.get("class"),keywords:t.get("keywords"),addressdetails:1,hierarchy:"1"===t.get("hierarchy")?1:0,group_hierarchy:1,polygon_geojson:1,format:"json"};e.place_id||e.osmtype&&e.osmid?(Tt(e.place_id?"Details for "+e.place_id:"Details for "+e.osmtype+e.osmid),wt("details",e,(function(t){n(0,i=t),st.set(t)}))):n(0,i=void 0)})),[i,o]}class Cn extends Q{constructor(t){super(),X(this,t,Tn,xn,r,{})}}function En(t,e,n){const i=t.slice();return i[2]=e[n],i}function Ln(t){let e,n,i,o,r,s,a,l,u,f,_,v,y,b,T,C,E,L,k,P,S,M,A,z,N,D,j,O,I,B=t[2].osm_type+"",R=Mt(t[2])+"",Z=t[2].class+"",$=t[2].type+"",H=t[2].name+"",q=(t[2].country_code||"")+"",F=t[2].errormessage+"",W=t[2].updated+"";return{c(){e=p("tr"),n=p("td"),i=m(B),o=g(),r=p("td"),s=g(),a=p("td"),l=m(Z),u=g(),f=p("td"),_=m($),v=g(),y=p("td"),b=m(H),T=g(),C=p("td"),E=m(q),L=g(),k=p("td"),P=m(F),S=g(),M=p("td"),A=m(W),z=g(),N=p("td"),D=p("a"),j=m("josm"),I=g(),w(D,"href",O="http://localhost:8111/import?url=https://www.openstreetmap.org/api/0.6/"+St(t[2].osm_type)+"/"+t[2].osm_id+"/full"),w(D,"target","josm")},m(t,d){h(t,e,d),c(e,n),c(n,i),c(e,o),c(e,r),r.innerHTML=R,c(e,s),c(e,a),c(a,l),c(e,u),c(e,f),c(f,_),c(e,v),c(e,y),c(y,b),c(e,T),c(e,C),c(C,E),c(e,L),c(e,k),c(k,P),c(e,S),c(e,M),c(M,A),c(e,z),c(e,N),c(N,D),c(D,j),c(e,I)},p(t,e){1&e&&B!==(B=t[2].osm_type+"")&&x(i,B),1&e&&R!==(R=Mt(t[2])+"")&&(r.innerHTML=R),1&e&&Z!==(Z=t[2].class+"")&&x(l,Z),1&e&&$!==($=t[2].type+"")&&x(_,$),1&e&&H!==(H=t[2].name+"")&&x(b,H),1&e&&q!==(q=(t[2].country_code||"")+"")&&x(E,q),1&e&&F!==(F=t[2].errormessage+"")&&x(P,F),1&e&&W!==(W=t[2].updated+"")&&x(A,W),1&e&&O!==(O="http://localhost:8111/import?url=https://www.openstreetmap.org/api/0.6/"+St(t[2].osm_type)+"/"+t[2].osm_id+"/full")&&w(D,"href",O)},d(t){t&&d(e)}}}function kn(e){let n,i,o,r,s,a,l,u,_,v,y,b,T,C,E=e[0].length+"",L=e[0],k=[];for(let t=0;t<L.length;t+=1)k[t]=Ln(En(e,L,t));return{c(){n=p("div"),i=p("div"),o=p("div"),r=p("h1"),r.textContent="Broken polygons",s=g(),a=p("p"),l=m("Total number of broken polygons: "),u=m(E),_=m("."),v=g(),y=p("table"),b=p("thead"),b.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>",T=g(),C=p("tbody");for(let t=0;t<k.length;t+=1)k[t].c();w(y,"class","table table-striped table-hover"),w(o,"class","col-sm-12"),w(i,"class","row"),w(n,"class","container")},m(t,e){h(t,n,e),c(n,i),c(i,o),c(o,r),c(o,s),c(o,a),c(a,l),c(a,u),c(a,_),c(o,v),c(o,y),c(y,b),c(y,T),c(y,C);for(let t=0;t<k.length;t+=1)k[t].m(C,null)},p(t,[e]){if(1&e&&E!==(E=t[0].length+"")&&x(u,E),1&e){let n;for(L=t[0],n=0;n<L.length;n+=1){const i=En(t,L,n);k[n]?k[n].p(i,e):(k[n]=Ln(i),k[n].c(),k[n].m(C,null))}for(;n<k.length;n+=1)k[n].d(1);k.length=L.length}},i:t,o:t,d(t){t&&d(n),f(k,t)}}}function Pn(t,e,n){let i=[];return S((function(){wt("polygons",{format:"json"},(function(t){n(0,i=t)})),Tt("Broken polygons")})),[i]}class Sn extends Q{constructor(t){super(),X(this,t,Pn,kn,r,{})}}function Mn(t,e,n){const i=t.slice();return i[2]=e[n],i}function An(t){let e,n,i,o,r,s,a,l,u,f,_,v,y,b,T,C,E,L,k,P,S,M,A,z=t[2].place_id+"",N=t[2].country_code+"",D=t[2].name+"",j=Mt(t[2])+"",O=t[2].osm_type+"",I=t[2].class+"",B=t[2].type+"";return{c(){e=p("tr"),n=p("td"),i=p("a"),o=m(z),s=g(),a=p("td"),l=m(N),u=g(),f=p("td"),_=m(D),v=g(),y=p("td"),b=g(),T=p("td"),C=m(O),E=g(),L=p("td"),k=m(I),P=g(),S=p("td"),M=m(B),A=g(),w(i,"href",r=zt(t[2]))},m(t,r){h(t,e,r),c(e,n),c(n,i),c(i,o),c(e,s),c(e,a),c(a,l),c(e,u),c(e,f),c(f,_),c(e,v),c(e,y),y.innerHTML=j,c(e,b),c(e,T),c(T,C),c(e,E),c(e,L),c(L,k),c(e,P),c(e,S),c(S,M),c(e,A)},p(t,e){1&e&&z!==(z=t[2].place_id+"")&&x(o,z),1&e&&r!==(r=zt(t[2]))&&w(i,"href",r),1&e&&N!==(N=t[2].country_code+"")&&x(l,N),1&e&&D!==(D=t[2].name+"")&&x(_,D),1&e&&j!==(j=Mt(t[2])+"")&&(y.innerHTML=j),1&e&&O!==(O=t[2].osm_type+"")&&x(C,O),1&e&&I!==(I=t[2].class+"")&&x(k,I),1&e&&B!==(B=t[2].type+"")&&x(M,B)},d(t){t&&d(e)}}}function zn(e){let n,i,o,r,s,a,l,u,_,v,y,b,T,C=e[0].length+"",E=e[0],L=[];for(let t=0;t<E.length;t+=1)L[t]=An(Mn(e,E,t));return{c(){n=p("div"),i=p("div"),o=p("div"),r=p("h1"),r.textContent="Deletable",s=g(),a=p("p"),l=m(C),u=m(" objects have been deleted in OSM but are still in the Nominatim database."),_=g(),v=p("table"),y=p("thead"),y.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>",b=g(),T=p("tbody");for(let t=0;t<L.length;t+=1)L[t].c();w(v,"class","table table-striped table-hover"),w(o,"class","col-sm-12"),w(i,"class","row"),w(n,"class","container")},m(t,e){h(t,n,e),c(n,i),c(i,o),c(o,r),c(o,s),c(o,a),c(a,l),c(a,u),c(o,_),c(o,v),c(v,y),c(v,b),c(v,T);for(let t=0;t<L.length;t+=1)L[t].m(T,null)},p(t,[e]){if(1&e&&C!==(C=t[0].length+"")&&x(l,C),1&e){let n;for(E=t[0],n=0;n<E.length;n+=1){const i=Mn(t,E,n);L[n]?L[n].p(i,e):(L[n]=An(i),L[n].c(),L[n].m(T,null))}for(;n<L.length;n+=1)L[n].d(1);L.length=E.length}},i:t,o:t,d(t){t&&d(n),f(L,t)}}}function Nn(t,e,n){let i=[];return S((function(){wt("deletable",{format:"json"},(function(t){n(0,i=t)})),Tt("Deletable objects")})),[i]}class Dn extends Q{constructor(t){super(),X(this,t,Nn,zn,r,{})}}function jn(t){let e,n;return e=new Sn({}),{c(){V(e.$$.fragment)},m(t,i){G(e,t,i),n=!0},i(t){n||(W(e.$$.fragment,t),n=!0)},o(t){U(e.$$.fragment,t),n=!1},d(t){K(e,t)}}}function On(t){let e,n;return e=new Dn({}),{c(){V(e.$$.fragment)},m(t,i){G(e,t,i),n=!0},i(t){n||(W(e.$$.fragment,t),n=!0)},o(t){U(e.$$.fragment,t),n=!1},d(t){K(e,t)}}}function In(t){let e,n;return e=new Cn({}),{c(){V(e.$$.fragment)},m(t,i){G(e,t,i),n=!0},i(t){n||(W(e.$$.fragment,t),n=!0)},o(t){U(e.$$.fragment,t),n=!1},d(t){K(e,t)}}}function Bn(t){let e,n;return e=new Ae({props:{reverse_search:!0}}),{c(){V(e.$$.fragment)},m(t,i){G(e,t,i),n=!0},i(t){n||(W(e.$$.fragment,t),n=!0)},o(t){U(e.$$.fragment,t),n=!1},d(t){K(e,t)}}}function Rn(t){let e,n;return e=new Ae({props:{reverse_search:!1}}),{c(){V(e.$$.fragment)},m(t,i){G(e,t,i),n=!0},i(t){n||(W(e.$$.fragment,t),n=!0)},o(t){U(e.$$.fragment,t),n=!1},d(t){K(e,t)}}}function Zn(t){let e,n,i,o,r,s,a,l,u;e=new pt({});const c=[Rn,Bn,In,On,jn],f=[];function p(t,e){return"search"===t[0]?0:"reverse"===t[0]?1:"details"===t[0]?2:"deletable"===t[0]?3:"polygons"===t[0]?4:-1}return~(i=p(t))&&(o=f[i]=c[i](t)),s=new gt({}),l=new vt({}),{c(){V(e.$$.fragment),n=g(),o&&o.c(),r=g(),V(s.$$.fragment),a=g(),V(l.$$.fragment)},m(t,o){G(e,t,o),h(t,n,o),~i&&f[i].m(t,o),h(t,r,o),G(s,t,o),h(t,a,o),G(l,t,o),u=!0},p(t,[e]){let n=i;i=p(t),i!==n&&(o&&(q(),U(f[n],1,1,(()=>{f[n]=null})),F()),~i?(o=f[i],o||(o=f[i]=c[i](t),o.c()),W(o,1),o.m(r.parentNode,r)):o=null)},i(t){u||(W(e.$$.fragment,t),W(o),W(s.$$.fragment,t),W(l.$$.fragment,t),u=!0)},o(t){U(e.$$.fragment,t),U(o),U(s.$$.fragment,t),U(l.$$.fragment,t),u=!1},d(t){K(e,t),t&&d(n),~i&&f[i].d(t),t&&d(r),K(s,t),t&&d(a),K(l,t)}}}function $n(t,e,n){let i,o;var r,a;return r=ut,a=t=>n(1,o=t),t.$$.on_destroy.push(s(r,a)),ct(),t.$$.update=()=>{2&t.$$.dirty&&n(0,i=o.tab)},[i,o]}let Hn=[];new class extends Q{constructor(t){super(),X(this,t,$n,Zn,r,{})}}({target:document.body}),document.addEventListener("click",(function(t){for(var e=t.target;e&&e!==this;e=e.parentNode)if(e.matches("a")){var n=e.href;if(!(i=n)||0!==i.indexOf("?")&&0!==i.indexOf("/")&&(0===i.indexOf("#")||i.match(/^http/)||i.match(/\.html/)))return;t.preventDefault(),t.stopPropagation(),window.history.pushState(Hn,"",n),ct();break}var i})),window.onpopstate=function(){ct()}}();
 //# sourceMappingURL=bundle.js.map
 //# sourceMappingURL=bundle.js.map