PageSourceSearch

https://www.lutherweg-sachsen-anhalt.de/wp-content/plugins/maps-marker-pro/js/mapsmarkerpro.js?ver=4.32.1

js lutherweg-sachsen-anhalt.de collected 2026-10-07 19:56:18 UTC 600,420 bytes, 43 lines download raw bytes

vendor: 9,088 bytes, line 1
1!function(){var t={748:function(t){var e;e=function(){"use strict";function t(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,o=Array(e);i<e;i++)o[i]=t[i];return o}function e(t,e,i){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function i(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,o)}return i}function o(t){for(var o=1;o<arguments.length;o++){var n=null!=arguments[o]?arguments[o]:{};o%2?i(Object(n),!0).forEach(function(i){e(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function n(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(e)||r(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function r(e,i){if(e){if("string"==typeof e)return t(e,i);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?t(e,i):void 0}}var a=function(t){return"string"==typeof t?document.querySelector(t):t()},l=function(t,e){var i="string"==typeof t?document.createElement(t):t;for(var o in e){var n=e[o];if("inside"===o)n.append(i);else if("dest"===o)a(n[0]).insertAdjacentElement(n[1],i);else if("around"===o){var s=n;s.parentNode.insertBefore(i,s),i.append(s),null!=s.getAttribute("autofocus")&&s.focus()}else o in i?i[o]=n:i.setAttribute(o,n)}return i},h=function(t,e){return t=String(t).toLowerCase(),e?t.normalize("NFD").replace(/[\u0300-\u036f]/g,"").normalize("NFC"):t},c=function(t,e){return l("mark",o({innerHTML:t},"string"==typeof e&&{class:e})).outerHTML},u=function(t,e){e.input.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:e.feedback,cancelable:!0}))},p=function(t,e,i){var o=i||{},n=o.mode,s=o.diacritics,r=o.highlight,a=h(e,s);if(e=String(e),t=h(t,s),"loose"===n){var l=(t=t.replace(/ /g,"")).length,u=0,p=Array.from(e).map(function(e,i){return u<l&&a[i]===t[u]&&(e=r?c(e,r):e,u++),e}).join("");if(u===l)return p}else{var d=a.indexOf(t);if(~d)return t=e.substring(d,d+t.length),r?e.replace(t,c(t,r)):e}},d=function(t,e){return new Promise(function(i,o){var n;return(n=t.data).cache&&n.store?i():new Promise(function(t,i){return"function"==typeof n.src?n.src(e).then(t,i):t(n.src)}).then(function(e){try{return t.feedback=n.store=e,u("response",t),i()}catch(t){return o(t)}},o)})},m=function(t,e){var i=e.data,o=e.searchEngine,n=[];i.store.forEach(function(s,a){var l=function(i){var r=i?s[i]:s,a="function"==typeof o?o(t,r):p(t,r,{mode:o,diacritics:e.diacritics,highlight:e.resultItem.highlight});if(a){var l={match:a,value:s};i&&(l.key=i),n.push(l)}};if(i.keys){var h,c=function(t){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=r(t))){e&&(t=e);var i=0,o=function(){};return{s:o,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,s=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return s=t.done,t},e:function(t){a=!0,n=t},f:function(){try{s||null==e.return||e.return()}finally{if(a)throw n}}}}(i.keys);try{for(c.s();!(h=c.n()).done;)l(h.value)}catch(t){c.e(t)}finally{c.f()}}else l()}),i.filter&&(n=i.filter(n));var s=n.slice(0,e.resultsList.maxResults);e.feedback={query:t,matches:n,results:s},u("results",e)},f="aria-expanded",g="aria-activedescendant",_="aria-selected",y=function(t,e){t.feedback.selection=o({index:e},t.feedback.results[e])},v=function(t){t.isOpen||((t.wrapper||t.input).setAttribute(f,!0),t.list.removeAttribute("hidden"),t.isOpen=!0,u("open",t))},b=function(t){t.isOpen&&((t.wrapper||t.input).setAttribute(f,!1),t.input.setAttribute(g,""),t.list.setAttribute("hidden",""),t.isOpen=!1,u("close",t))},x=function(t,e){var i=e.resultItem,o=e.list.getElementsByTagName(i.tag),s=!!i.selected&&i.selected.split(" ");if(e.isOpen&&o.length){var r,a,l=e.cursor;t>=o.length&&(t=0),t<0&&(t=o.length-1),e.cursor=t,l>-1&&(o[l].removeAttribute(_),s&&(a=o[l].classList).remove.apply(a,n(s))),o[t].setAttribute(_,!0),s&&(r=o[t].classList).add.apply(r,n(s)),e.input.setAttribute(g,o[e.cursor].id),e.list.scrollTop=o[t].offsetTop-e.list.clientHeight+o[t].clientHeight+5,e.feedback.cursor=e.cursor,y(e,t),u("navigate",e)}},L=function(t){x(t.cursor+1,t)},w=function(t){x(t.cursor-1,t)},k=function(t,e,i){(i=i>=0?i:t.cursor)<0||(t.feedback.event=e,y(t,i),u("selection",t),b(t))};function M(t,e){var i=this;return new Promise(function(n,s){var r,a;return r=e||((a=t.input)instanceof HTMLInputElement||a instanceof HTMLTextAreaElement?a.value:a.innerHTML),function(t,e,i){return e?e(t):t.length>=i}(r=t.query?t.query(r):r,t.trigger,t.threshold)?d(t,r).then(function(e){try{return t.feedback instanceof Error?n():(m(r,t),t.resultsList&&function(t){var e=t.resultsList,i=t.list,n=t.resultItem,s=t.feedback,r=s.matches,a=s.results;if(t.cursor=-1,i.innerHTML="",r.length||e.noResults){var h=new DocumentFragment;a.forEach(function(t,e){var i=l(n.tag,o({id:"".concat(n.id,"_").concat(e),role:"option",innerHTML:t.match,inside:h},n.class&&{class:n.class}));n.element&&n.element(i,t)}),i.append(h),e.element&&e.element(i,s),v(t)}else b(t)}(t),h.call(i))}catch(t){return s(t)}},s):(b(t),h.call(i));function h(){return n()}})}var C=function(t,e){for(var i in t)for(var o in t[i])e(i,o)};function T(t){var e=this;return new Promise(function(i,n){var s,r,a;if(s=t.placeHolder,a={role:"combobox","aria-owns":(r=t.resultsList).id,"aria-haspopup":!0,"aria-expanded":!1},l(t.input,o(o({"aria-controls":r.id,"aria-autocomplete":"both"},s&&{placeholder:s}),!t.wrapper&&o({},a))),t.wrapper&&(t.wrapper=l("div",o({around:t.input,class:t.name+"_wrapper"},a))),r&&(t.list=l(r.tag,o({dest:[r.destination,r.position],id:r.id,role:"listbox",hidden:"hidden"},r.class&&{class:r.class}))),function(t){var e,i,n,s=t.events,r=(e=function(){return M(t)},i=t.debounce,function(){clearTimeout(n),n=setTimeout(function(){return e()},i)}),a=t.events=o({input:o({},s&&s.input)},t.resultsList&&{list:s?o({},s.list):{}}),l={input:{input:function(){r()},keydown:function(e){!function(t,e){switch(t.keyCode){case 40:case 38:t.preventDefault(),40===t.keyCode?L(e):w(e);break;case 13:e.submit||t.preventDefault(),e.cursor>=0&&k(e,t);break;case 9:e.resultsList.tabSelect&&e.cursor>=0&&k(e,t);break;case 27:e.input.value="",u("clear",e),b(e)}}(e,t)},blur:function(){b(t)}},list:{mousedown:function(t){t.preventDefault()},click:function(e){!function(t,e){var i=e.resultItem.tag.toUpperCase(),o=Array.from(e.list.querySelectorAll(i)),n=t.target.closest(i);n&&n.nodeName===i&&k(e,t,o.indexOf(n))}(e,t)}}};C(l,function(e,i){(t.resultsList||"input"===i)&&(a[e][i]||(a[e][i]=l[e][i]))}),C(a,function(e,i){t[e].addEventListener(i,a[e][i])})}(t),t.data.cache)return d(t).then(function(t){try{return h.call(e)}catch(t){return n(t)}},n);function h(){return u("init",t),i()}return h.call(e)})}function P(t){var e=t.prototype;e.init=function(){T(this)},e.start=function(t){M(this,t)},e.unInit=function(){if(this.wrapper){var t=this.wrapper.parentNode;t.insertBefore(this.input,this.wrapper),t.removeChild(this.wrapper)}var e;C((e=this).events,function(t,i){e[t].removeEventListener(i,e.events[t][i])})},e.open=function(){v(this)},e.close=function(){b(this)},e.goTo=function(t){x(t,this)},e.next=function(){L(this)},e.previous=function(){w(this)},e.select=function(t){k(this,null,t)},e.search=function(t,e,i){return p(t,e,i)}}return function t(e){this.options=e,this.id=t.instances=(t.instances||0)+1,this.name="autoComplete",this.wrapper=1,this.threshold=1,this.debounce=0,this.resultsList={position:"afterend",tag:"ul",maxResults:5},this.resultItem={tag:"li"},function(t){var e=t.name,i=t.options,o=t.resultsList,n=t.resultItem;for(var r in i)if("object"===s(i[r]))for(var l in t[r]||(t[r]={}),i[r])t[r][l]=i[r][l];else t[r]=i[r];t.selector=t.selector||"#"+e,o.destination=o.destination||t.selector,o.id=o.id||e+"_list_"+t.id,n.id=n.id||e+"_result",t.input
vendor: 4,760 bytes, lines 1-8
1=a(t.selector)}(this),P.call(this,t),T(this)}},t.exports=e()},898:function(t){t.exports=function(t,e){return!(t[0]>e[2]||t[2]<e[0]||t[3]<e[1]||t[1]>e[3])}},576:function(t){
2/*!
3 * clipboard.js v2.0.11
4 * https://clipboardjs.com/
5 *
6 * Licensed MIT © Zeno Rocha
7 */
8var e;e=function(){return function(){var t={686:function(t,e,i){"use strict";i.d(e,{default:function(){return L}});var o=i(279),n=i.n(o),s=i(370),r=i.n(s),a=i(817),l=i.n(a);function h(t){try{return document.execCommand(t)}catch(t){return!1}}var c=function(t){var e=l()(t);return h("cut"),e},u=function(t,e){var i=function(t){var e="rtl"===document.documentElement.getAttribute("dir"),i=document.createElement("textarea");i.style.fontSize="12pt",i.style.border="0",i.style.padding="0",i.style.margin="0",i.style.position="absolute",i.style[e?"right":"left"]="-9999px";var o=window.pageYOffset||document.documentElement.scrollTop;return i.style.top="".concat(o,"px"),i.setAttribute("readonly",""),i.value=t,i}(t);e.container.appendChild(i);var o=l()(i);return h("copy"),i.remove(),o},p=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body},i="";return"string"==typeof t?i=u(t,e):t instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(null==t?void 0:t.type)?i=u(t.value,e):(i=l()(t),h("copy")),i};function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}var m=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.action,i=void 0===e?"copy":e,o=t.container,n=t.target,s=t.text;if("copy"!==i&&"cut"!==i)throw new Error('Invalid "action" value, use either "copy" or "cut"');if(void 0!==n){if(!n||"object"!==d(n)||1!==n.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===i&&n.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===i&&(n.hasAttribute("readonly")||n.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes')}return s?p(s,{container:o}):n?"cut"===i?c(n):p(n,{container:o}):void 0};function f(t){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f(t)}function g(t,e){for(var i=0;i<e.length;i++){var o=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function _(t,e){return _=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},_(t,e)}function y(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var i,o,n,s=v(t);if(e){var r=v(this).constructor;i=Reflect.construct(s,arguments,r)}else i=s.apply(this,arguments);return o=this,!(n=i)||"object"!==f(n)&&"function"!=typeof n?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(o):n}}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}function b(t,e){var i="data-clipboard-".concat(t);if(e.hasAttribute(i))return e.getAttribute(i)}var x=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&_(t,e)}(s,t);var e,i,o,n=y(s);function s(t,e){var i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),(i=n.call(this)).resolveOptions(e),i.listenClick(t),i}return e=s,i=[{key:"resolveOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===f(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=r()(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget,i=this.action(e)||"copy",o=m({action:i,container:this.container,target:this.target(e),text:this.text(e)});
vendor: 3,300 bytes, line 8
8this.emit(o?"success":"error",{action:i,text:o,trigger:e,clearSelection:function(){e&&e.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(t){return b("action",t)}},{key:"defaultTarget",value:function(t){var e=b("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return b("text",t)}},{key:"destroy",value:function(){this.listener.destroy()}}],o=[{key:"copy",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body};return p(t,e)}},{key:"cut",value:function(t){return c(t)}},{key:"isSupported",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,i=!!document.queryCommandSupported;return e.forEach(function(t){i=i&&!!document.queryCommandSupported(t)}),i}}],i&&g(e.prototype,i),o&&g(e,o),s}(n()),L=x},828:function(t){if("undefined"!=typeof Element&&!Element.prototype.matches){var e=Element.prototype;e.matches=e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector}t.exports=function(t,e){for(;t&&9!==t.nodeType;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}},438:function(t,e,i){var o=i(828);function n(t,e,i,o,n){var r=s.apply(this,arguments);return t.addEventListener(i,r,n),{destroy:function(){t.removeEventListener(i,r,n)}}}function s(t,e,i,n){return function(i){i.delegateTarget=o(i.target,e),i.delegateTarget&&n.call(t,i)}}t.exports=function(t,e,i,o,s){return"function"==typeof t.addEventListener?n.apply(null,arguments):"function"==typeof i?n.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,function(t){return n(t,e,i,o,s)}))}},879:function(t,e){e.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},e.nodeList=function(t){var i=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===i||"[object HTMLCollection]"===i)&&"length"in t&&(0===t.length||e.node(t[0]))},e.string=function(t){return"string"==typeof t||t instanceof String},e.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},370:function(t,e,i){var o=i(879),n=i(438);t.exports=function(t,e,i){if(!t&&!e&&!i)throw new Error("Missing required arguments");if(!o.string(e))throw new TypeError("Second argument must be a String");if(!o.fn(i))throw new TypeError("Third argument must be a Function");if(o.node(t))return function(t,e,i){return t.addEventListener(e,i),{destroy:function(){t.removeEventListener(e,i)}}}(t,e,i);if(o.nodeList(t))return function(t,e,i){return Array.prototype.forEach.call(t,function(t){t.addEventListener(e,i)}),{destroy:function(){Array.prototype.forEach.call(t,function(t){t.removeEventListener(e,i)})}}}(t,e,i);if(o.string(t))return function(t,e,i){return n(document.body,t,e,i)}(t,e,i);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},817:function(t){t.exports=function(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var i=t.hasAttribute("readonly");i||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),i||t.removeAttribute("readonly"),e=t.value}
8else{t.hasAttribute("contenteditable")&&t.focus();var o=window.getSelection(),n=document.createRange();n.selectNodeContents(t),o.removeAllRanges(),o.addRange(n),e=o.toString()}return e}},279:function(t){function e(){}e.prototype={on:function(t,e,i){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:i}),this},once:function(t,e,i){var o=this;function n(){o.off(t,n),e.apply(i,arguments)}return n._=e,this.on(t,n,i)},emit:function(t){for(var e=[].slice.call(arguments,1),i=((this.e||(this.e={}))[t]||[]).slice(),o=0,n=i.length;o<n;o++)i[o].fn.apply(i[o].ctx,e);return this},off:function(t,e){var i=this.e||(this.e={}),o=i[t],n=[];if(o&&e)for(var s=0,r=o.length;s<r;s++)o[s].fn!==e&&o[s].fn._!==e&&n.push(o[s]);return n.length?i[t]=n:delete i[t],this}},t.exports=e,t.exports.TinyEmitter=e}},e={};function i(o){if(e[o])return e[o].exports;var n=e[o]={exports:{}};return t[o](n,n.exports,i),n.exports}return i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,{a:e}),e},i.d=function(t,e){for(var o in e)i.o(e,o)&&!i.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i(686)}().default},t.exports=e()},348:function(t,e){var i,o,n;o=[e,t],i=function(t,e){"use strict";var i={timeout:5e3,jsonpCallback:"callback",jsonpCallbackFunction:null};function o(){return"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random())}function n(t){try{delete window[t]}catch(e){window[t]=void 0}}function s(t){var e=document.getElementById(t);e&&document.getElementsByTagName("head")[0].removeChild(e)}function r(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=t,a=e.timeout||i.timeout,l=e.jsonpCallback||i.jsonpCallback,h=void 0;return new Promise(function(i,c){var u=e.jsonpCallbackFunction||o(),p=l+"_"+u;window[u]=function(t){i({ok:!0,json:function(){return Promise.resolve(t)}}),h&&clearTimeout(h),s(p),n(u)},r+=-1===r.indexOf("?")?"?":"&";var d=document.createElement("script");d.setAttribute("src",""+r+l+"="+u),e.charset&&d.setAttribute("charset",e.charset),e.nonce&&d.setAttribute("nonce",e.nonce),e.referrerPolicy&&d.setAttribute("referrerPolicy",e.referrerPolicy),e.crossorigin&&d.setAttribute("crossorigin","string"==typeof e.crossorigin?e.crossorigin:"anonymous");var m=e.fetchPriority;"high"!==m&&"low"!==m&&"auto"!==m||d.setAttribute("fetchPriority",m),d.id=p,document.getElementsByTagName("head")[0].appendChild(d),h=setTimeout(function(){c(new Error("JSONP request to "+t+" timed out")),n(u),s(p),window[u]=function(){n(u)}},a),d.onerror=function(){c(new Error("JSONP request to "+t+" failed")),n(u),s(p),h&&clearTimeout(h)}})}e.exports=r},void 0===(n="function"==typeof i?i.apply(e,o):i)||(t.exports=n)},891:function(t,e,i){var o=i(481),n=i(348),s=i(898);var r=["Aerial","AerialWithLabels","AerialWithLabelsOnDemand","Road","RoadOnDemand","CanvasLight","CanvasDark","CanvasGray","OrdnanceSurvey"],a=["AerialWithLabelsOnDemand","RoadOnDemand"];o.TileLayer.Bing=o.TileLayer.extend({options:{bingMapsKey:null,imagerySet:"Aerial",culture:"en-US",minZoom:1,minNativeZoom:1,maxNativeZoom:19},statics:{METADATA_URL:"https://dev.virtualearth.net/REST/v1/Imagery/Metadata/{imagerySet}?key={bingMapsKey}&include=ImageryProviders&uriScheme=https&c={culture}",POINT_METADATA_URL:"https://dev.virtualearth.net/REST/v1/Imagery/Metadata/{imagerySet}/{lat},{lng}?zl={z}&key={bingMapsKey}&uriScheme=https&c={culture}"},initialize:function(t){if("string"==typeof t&&(t={bingMapsKey:t}),t&&t.BingMapsKey&&(t.bingMapsKey=t.BingMapsKey,console.warn("use options.bingMapsKey instead of options.BingMapsKey")),!t||!t.bingMapsKey)throw new Error("Mu
8st supply options.BingMapsKey");if(t=o.setOptions(this,t),r.indexOf(t.imagerySet)<0)throw new Error("'"+t.imagerySet+"' is an invalid imagerySet, see https://github.com/digidem/leaflet-bing-layer#parameters");t&&t.style&&a.indexOf(t.imagerySet)<0&&console.warn("Dynamic styles will only work with these imagerySet choices: "+a.join(", "));var e=o.Util.template(o.TileLayer.Bing.METADATA_URL,{bingMapsKey:this.options.bingMapsKey,imagerySet:this.options.imagerySet,culture:this.options.culture});this._imageryProviders=[],this._attributions=[],this._fetch=n(e,{jsonpCallback:"jsonp"}).then(function(t){return t.json()}).then(this._metaDataOnLoad.bind(this)).catch(console.error.bind(console)),o.Browser.android||this.on("tileunload",this._onTileRemove)},createTile:function(t,e){var i=document.createElement("img");return o.DomEvent.on(i,"load",o.bind(this._tileOnLoad,this,e,i)),o.DomEvent.on(i,"error",o.bind(this._tileOnError,this,e,i)),this.options.crossOrigin&&(i.crossOrigin=""),i.alt="",this._url?i.src=this.getTileUrl(t):this._fetch.then(function(){i.src=this.getTileUrl(t)}.bind(this)).catch(function(t){console.error(t),e(t)}),i},getTileUrl:function(t){var e=function(t,e,i){for(var o="",n=i;n>0;n--){var s=0,r=1<<n-1;0!==(t&r)&&s++,0!==(e&r)&&(s+=2),o+=s.toString()}return o}(t.x,t.y,t.z),i=o.Util.template(this._url,{quadkey:e,subdomain:this._getSubdomain(t),culture:this.options.culture});return"string"==typeof this.options.style&&(i+="&st="+this.options.style),i},onAdd:function(t){t.on("moveend",this._updateAttribution,this),o.TileLayer.prototype.onAdd.call(this,t),this._attributions.forEach(function(e){t.attributionControl.addAttribution(e)})},onRemove:function(t){t.off("moveend",this._updateAttribution,this),this._attributions.forEach(function(e){t.attributionControl.removeAttribution(e)}),o.TileLayer.prototype.onRemove.call(this,t)},getMetaData:function(t,e){if(!(this._map||t&&e))return Promise.reject(new Error("If layer is not attached to map, you must provide LatLng and zoom"));t=t||this._map.getCenter(),e=e||this._map.getZoom();var i=o.Util.template(o.TileLayer.Bing.POINT_METADATA_URL,{bingMapsKey:this.options.bingMapsKey,imagerySet:this.options.imagerySet,z:e,lat:t.lat,lng:t.lng});return n(i,{jsonpCallback:"jsonp"}).then(function(t){return t.json()}).catch(console.error.bind(console))},_metaDataOnLoad:function(t){if(200!==t.statusCode)throw new Error("Bing Imagery Metadata error: \n"+JSON.stringify(t,null,"  "));var e=t.resourceSets[0].resources[0];return this._url=e.imageUrl,this._imageryProviders=e.imageryProviders||[],this.options.subdomains=e.imageUrlSubdomains,this._updateAttribution(),Promise.resolve()},_updateAttribution:function(){var t=this._map;if(t&&t.attributionControl){var e=t.getZoom(),i=function(t){var e=t.split(",");return[e[1],e[0],e[3],e[2]]}(t.getBounds().toBBoxString());this._fetch.then(function(){var o=this._getAttributions(i,e),n=this._attributions;o.forEach(function(e){n.indexOf(e)>-1||t.attributionControl.addAttribution(e)}),n.filter(function(e){o.indexOf(e)>-1||t.attributionControl.removeAttribution(e)}),this._attributions=o}.bind(this))}},_getAttributions:function(t,e){return this._imageryProviders.reduce(function(i,o){for(var n=0;n<o.coverageAreas.length;n++)if(s(t,o.coverageAreas[n].bbox)&&e>=o.coverageAreas[n].zoomMin&&e<=o.coverageAreas[n].zoomMax)return i.push(o.attribution),i;return i},[])}}),o.tileLayer.bing=function(t){return new o.TileLayer.Bing(t)},t.exports=o.TileLayer.Bing},189:function(){L.Control.Fullscreen=L.Control.extend({options:{position:"topleft",title:{false:"View Fullscreen",true:"Exit Fullscreen"}},onAdd:function(t){var e=L.DomUtil.create("div","leaflet-control-fullscreen leaflet-bar leaflet-control");return this.link=L.DomUtil.create("a","leaflet-control-fullscreen-button leaflet-bar-part",e),this.link.href="#",this._map=t,this._map.on("fullscreenchange",this._toggleTitle,this),this._toggleTitle(),L.DomEvent.on(this.link,"click",this._click,this),e},_click:function(t){L.DomEvent.stopPropagation(t),L.DomEvent.preventDefault(t),this._map.toggleFullscreen(this.options)},_toggleTitle:function(){this.link.title=this.options.title[this._map.isFullscreen()]}}),L.Map.include({isFullscreen:function(){return this._isFullscreen||
vendor: 2,302 bytes, line 8
8!1},toggleFullscreen:function(t){var e=this.getContainer();this.isFullscreen()?t&&t.pseudoFullscreen?this._disablePseudoFullscreen(e):document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.msExitFullscreen?document.msExitFullscreen():this._disablePseudoFullscreen(e):t&&t.pseudoFullscreen?this._enablePseudoFullscreen(e):e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):e.msRequestFullscreen?e.msRequestFullscreen():this._enablePseudoFullscreen(e)},_enablePseudoFullscreen:function(t){L.DomUtil.addClass(t,"leaflet-pseudo-fullscreen"),this._setFullscreen(!0),this.fire("fullscreenchange")},_disablePseudoFullscreen:function(t){L.DomUtil.removeClass(t,"leaflet-pseudo-fullscreen"),this._setFullscreen(!1),this.fire("fullscreenchange")},_setFullscreen:function(t){this._isFullscreen=t;var e=this.getContainer();t?L.DomUtil.addClass(e,"leaflet-fullscreen-on"):L.DomUtil.removeClass(e,"leaflet-fullscreen-on"),this.invalidateSize()},_onFullscreenChange:function(t){var e=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement;e!==this.getContainer()||this._isFullscreen?e!==this.getContainer()&&this._isFullscreen&&(this._setFullscreen(!1),this.fire("fullscreenchange")):(this._setFullscreen(!0),this.fire("fullscreenchange"))}}),L.Map.mergeOptions({fullscreenControl:!1}),L.Map.addInitHook(function(){var t;if(this.options.fullscreenControl&&(this.fullscreenControl=new L.Control.Fullscreen(this.options.fullscreenControl),this.addControl(this.fullscreenControl)),"onfullscreenchange"in document?t="fullscreenchange":"onmozfullscreenchange"in document?t="mozfullscreenchange":"onwebkitfullscreenchange"in document?t="webkitfullscreenchange":"onmsfullscreenchange"in document&&(t="MSFullscreenChange"),t){var e=L.bind(this._onFullscreenChange,this);this.whenReady(function(){L.DomEvent.on(document,t,e)}),this.on("unload",function(){L.DomEvent.off(document,t,e)})}}),L.control.fullscreen=function(t){return new L.Control.Fullscreen(t)}},882:function(t,e){!function(t){"use strict";var e
vendor: 13,084 bytes, line 8
8={ar:{touch:"استخدم إصبعين لتحريك الخريطة",scroll:"‏استخدم ctrl + scroll لتصغير/تكبير الخريطة",scrollMac:"يمكنك استخدام ⌘ + التمرير لتكبير/تصغير الخريطة"},bg:{touch:"Използвайте два пръста, за да преместите картата",scroll:"Задръжте бутона Ctrl натиснат, докато превъртате, за да промените мащаба на картата",scrollMac:"Задръжте бутона ⌘ натиснат, докато превъртате, за да промените мащаба на картата"},bn:{touch:"মানচিত্রটিকে সরাতে দুটি আঙ্গুল ব্যবহার করুন",scroll:"ম্যাপ জুম করতে ctrl + scroll ব্যবহার করুন",scrollMac:"ম্যাপে জুম করতে ⌘ বোতাম টিপে স্ক্রল করুন"},ca:{touch:"Fes servir dos dits per moure el mapa",scroll:"Prem la tecla Control mentre et desplaces per apropar i allunyar el mapa",scrollMac:"Prem la tecla ⌘ mentre et desplaces per apropar i allunyar el mapa"},cs:{touch:"K posunutí mapy použijte dva prsty",scroll:"Velikost zobrazení mapy změňte podržením klávesy Ctrl a posouváním kolečka myši",scrollMac:"Velikost zobrazení mapy změníte podržením klávesy ⌘ a posunutím kolečka myši / touchpadu"},da:{touch:"Brug to fingre til at flytte kortet",scroll:"Brug ctrl + rullefunktionen til at zoome ind og ud på kortet",scrollMac:"Brug ⌘ + rullefunktionen til at zoome ind og ud på kortet"},de:{touch:"Verschieben der Karte mit zwei Fingern",scroll:"Verwende Strg+Scrollen zum Zoomen der Karte",scrollMac:"⌘"},el:{touch:"Χρησιμοποιήστε δύο δάχτυλα για μετακίνηση στον χάρτη",scroll:"Χρησιμοποιήστε το πλήκτρο Ctrl και κύλιση, για να μεγεθύνετε τον χάρτη",scrollMac:"Χρησιμοποιήστε το πλήκτρο ⌘ + κύλιση για εστίαση στον χάρτη"},en:{touch:"Use two fingers to move the map",scroll:"Use ctrl + scroll to zoom the map",scrollMac:"Use ⌘ + scroll to zoom the map"},"en-AU":{touch:"Use two fingers to move the map",scroll:"Use ctrl + scroll to zoom the map",scrollMac:"Use ⌘ + scroll to zoom the map"},"en-GB":{touch:"Use two fingers to move the map",scroll:"Use ctrl + scroll to zoom the map",scrollMac:"Use ⌘ + scroll to zoom the map"},es:{touch:"Para mover el mapa, utiliza dos dedos",scroll:"Mantén pulsada la tecla Ctrl mientras te desplazas para acercar o alejar el mapa",scrollMac:"Mantén pulsada la tecla ⌘ mientras te desplazas para acercar o alejar el mapa"},eu:{touch:"Erabili bi hatz mapa mugitzeko",scroll:"Mapan zooma aplikatzeko, sakatu Ktrl eta egin gora edo behera",scrollMac:"Eduki sakatuta ⌘ eta egin gora eta behera mapa handitu eta txikitzeko"},fa:{touch:"برای حرکت دادن نقشه از دو انگشت استفاده کنید.",scroll:"‏برای بزرگ‌نمایی نقشه از ctrl + scroll استفاده کنید",scrollMac:"برای بزرگ‌نمایی نقشه، از ⌘ + پیمایش استفاده کنید."},fi:{touch:"Siirrä karttaa kahdella sormella.",scroll:"Zoomaa karttaa painamalla Ctrl-painiketta ja vierittämällä.",scrollMac:"Zoomaa karttaa pitämällä painike ⌘ painettuna ja vierittämällä."},fil:{touch:"Gumamit ng dalawang daliri upang iusog ang mapa",scroll:"Gamitin ang ctrl + scroll upang i-zoom ang mapa",scrollMac:"Gamitin ang ⌘ + scroll upang i-zoom ang mapa"},fr:{touch:"Utilisez deux doigts pour déplacer la carte",scroll:"Vous pouvez zoomer sur la carte à l'aide de CTRL+Molette de défilement",scrollMac:"Vous pouvez zoomer sur la carte à l'aide de ⌘+Molette de défilement"},gl:{touch:"Utiliza dous dedos para mover o mapa",scroll:"Preme Ctrl mentres te desprazas para ampliar o mapa",scrollMac:"Preme ⌘ e desprázate para ampliar o mapa"},gu:{touch:"નકશો ખસેડવા બે આંગળીઓનો ઉપયોગ કરો",scroll:"નકશાને ઝૂમ કરવા માટે ctrl + સ્ક્રોલનો ઉપયોગ કરો",scrollMac:"નકશાને ઝૂમ કરવા ⌘ + સ્ક્રોલનો ઉપયોગ કરો"},hi:{touch:"मैप एक जगह से दूसरी जगह ले जाने के लिए दो उंगलियों का इस्तेमाल करें",scroll:"मैप को ज़ूम करने के लिए ctrl + स्क्रोल का उपयोग करें",scrollMac:"मैप को ज़ूम करने के लिए ⌘ + स्क्रोल का उपयोग करें"},hr:{touch:"Pomičite kartu pomoću dva prsta",scroll:"Upotrijebite Ctrl i klizač miša da biste zumirali kartu",scrollMac:"Upotrijebite gumb ⌘ dok se pomičete za zumiranje karte"},hu:{touch:"Két ujjal mozgassa a térképet",scroll:"A térkép a ctrl + görgetés használatával nagyítható",scrollMac:"A térkép a ⌘ + görgetés használatával nagyítható"},id:{touch:"Gunakan dua jari untuk menggerakkan peta",scroll:"Gunakan ctrl + scroll untuk memperbesar atau memperkecil peta",scrollMac:"Gunakan ⌘ + scroll untuk memperbesar atau memperkecil peta"},it:{touch:"Utilizza due dita per spostare la mappa",scroll:"Utilizza CTRL + scorrimento per eseguire lo zoom della mappa",scrollMac:"Utilizza ⌘ + scorrimento per eseguire lo zoom della mappa"},iw:{touch:"הזז את המפה באמצעות שתי אצבעות",scroll:"‏אפשר לשנות את מרחק התצוגה במפה באמצעות מקש ctrl וגלילה",scrollMac:"אפשר לשנות את מרחק התצוגה במפה באמצעות מקש ⌘ וגלילה"},ja:{touch:"地図を移動させるには指 2 本で操作します",scroll:"地図をズームするには、Ctrl キーを押しながらスクロールしてください",scrollMac:"地図をズームするには、⌘ キーを押しながらスクロールしてください"},kn:{touch:"Use two fingers to move the map",scroll:"Use Ctrl + scroll to zoom the map",scrollMac:"Use ⌘ + scroll to zoom the map"},ko:{touch:"지도를 움직이려면 두 손가락을 사용하세요.",scroll:"지도를 확대/축소하려면 Ctrl을 누른 채 스크롤하세요.",scrollMac:"지도를 확대하려면 ⌘ + 스크롤 사용"},lt:{touch:"Perkelkite žemėlapį dviem pirštais",scroll:"Slinkite nuspaudę klavišą „Ctrl“, kad pakeistumėte žemėlapio mastelį",scrollMac:"Paspauskite klavišą ⌘ ir slinkite, kad priartintumėte žemėlapį"},lv:{touch:"Lai pārvietotu karti, bīdiet to ar diviem pirkstiem",scroll:"Kartes tālummaiņai izmantojiet ctrl + ritināšanu",scrollMac:"Lai veiktu kartes tālummaiņu, izmantojiet ⌘ + ritināšanu"},ml:{touch:"മാപ്പ് നീക്കാൻ രണ്ട് വിരലുകൾ ഉപയോഗിക്കുക",scroll:"കൺട്രോൾ + സ്‌ക്രോൾ ഉപയോഗിച്ച് ‌മാപ്പ് ‌സൂം ചെയ്യുക",scrollMac:"⌘ + സ്‌ക്രോൾ ഉപയോഗിച്ച് ‌മാപ്പ് ‌സൂം ചെയ്യുക"},mr:{touch:"नकाशा हलविण्यासाठी दोन बोटे वापरा",scroll:"नकाशा झूम करण्यासाठी ctrl + scroll वापरा",scrollMac:"नकाशावर झूम करण्यासाठी ⌘ + स्क्रोल वापरा"},nl:{touch:"Gebruik twee vingers om de kaart te verplaatsen",scroll:"Gebruik Ctrl + scrollen om in- en uit te zoomen op de kaart",scrollMac:"Gebruik ⌘ + scrollen om in en uit te zoomen op de kaart"},no:{touch:"Bruk to fingre for å flytte kartet",scroll:"Hold ctrl-tasten inne og rull for å zoome på kartet",scrollMac:"Hold inne ⌘-tasten og rull for å zoome på kartet"},pl:{touch:"Przesuń mapę dwoma palcami",scroll:"Naciśnij CTRL i przewiń, by przybliżyć mapę",scrollMac:"Naciśnij ⌘ i przewiń, by przybliżyć mapę"},pt:{touch:"Use dois dedos para mover o mapa",scroll:"Pressione Ctrl e role a tela simultaneamente para aplicar zoom no mapa",scrollMac:"Use ⌘ e role a tela simultaneamente para aplicar zoom no mapa"},"pt-BR":{touch:"Use dois dedos para mover o mapa",scroll:"Pressione Ctrl e role a tela simultaneamente para aplicar zoom no mapa",scrollMac:"Use ⌘ e role a tela simultaneamente para aplicar zoom no mapa"},"pt-PT":{touch:"Utilize dois dedos para mover o mapa",scroll:"Utilizar ctrl + deslocar para aumentar/diminuir zoom do mapa",scrollMac:"Utilize ⌘ + deslocar para aumentar/diminuir o zoom do mapa"},ro:{touch:"Folosiți două degete pentru a deplasa harta",scroll:"Apăsați tasta ctrl și derulați simultan pentru a mări harta",scrollMac:"Folosiți ⌘ și derulați pentru a mări/micșora harta"},ru:{touch:"Чтобы переместить карту, проведите по ней двумя пальцами",scroll:"Чтобы изменить масштаб, прокручивайте карту, удерживая клавишу Ctrl.",scrollMac:"Чтобы изменить масштаб, нажмите ⌘ + прокрутка"},sk:{touch:"Mapu môžete posunúť dvoma prstami",scroll:"Ak chcete priblížiť mapu, stlačte kláves ctrl a posúvajte",scrollMac:"Ak chcete priblížiť mapu, stlačte kláves ⌘ a posúvajte kolieskom myši"},sl:{touch:"Premaknite zemljevid z dvema prstoma",scroll:"Zemljevid povečate tako, da držite tipko Ctrl in vrtite kolesce na miški",scrollMac:"Uporabite ⌘ + funkcijo pomika, da povečate ali pomanjšate zemljevid"},sr:{touch:"Мапу померајте помоћу два прста",scroll:"Притисните ctrl тастер док померате да бисте зумирали мапу",scrollMac:"Притисните тастер ⌘ док померате да бисте зумирали мапу"},sv:{touch:"Använd två fingrar för att flytta kartan",scroll:"Använd ctrl + rulla för att zooma kartan",scrollMac:"Använd ⌘ + rulla för att zooma på kartan"},ta:{touch:"மேப்பை நகர்த்த இரண்டு விரல்களைப் பயன்படுத்தவும்",scroll:"மேப்பை பெரிதாக்கி/சிறிதாக்கிப் பார்க்க, ctrl பட்டனைப் பிடித்தபடி, மேலே/கீழே ஸ்க்ரால் செய்யவும்",scrollMac:"மேப்பை பெரிதாக்கி/சிறிதாக்கிப் பார்க்க, ⌘ பட்டனைப் பிடித்தபடி, மேலே/கீழே ஸ்க்ரால் செய்யவும்"},te:{touch:"మ్యాప్‌ని తరలించడం కోసం రెండు వేళ్లను ఉపయోగించండి",scroll:"మ్యాప్‌ని జూమ్ చేయడానికి ctrl బటన్‌ను నొక్కి ఉంచి, స్క్రోల్ చేయండి",scrollMac:"మ్యాప్ జూమ్ చేయాలంటే ⌘ + స్క్రోల్ ఉపయోగించండి"},th:{touch:"ใช้ 2 นิ้วเพื่อเลื่อนแผนที่",scroll:"กด Ctrl ค้างไว้ แล้วเลื่อนหน้าจอเพื่อซูมแผนที่",scrollMac:"กด ⌘ แล้วเลื่อนหน้าจอเพื่อซูมแผนที่"},tl:{touch:"Gumamit ng dalawang daliri upang iusog ang mapa",scroll:"Gamitin ang ctrl + scroll upang i-zoom ang mapa",scrollMac:"Gamitin ang ⌘ + scroll upang i-zoom ang mapa"},tr:{touch:"Haritada gezinmek için iki parmağınızı kullanın",scroll:"Haritayı yakınlaştırmak için ctrl + kaydırma kombinasyonunu kullanın",scrollMac:"Haritayı yakınlaştırmak için ⌘ tuşuna basıp ekranı kaydırın"},uk:{touch:"Переміщуйте карту двома пальцями",scroll:"Щоб змінювати масштаб карти, прокручуйте коліщатко миші, утримуючи клавішу Ctrl",scrollMac:"Щоб змінити масштаб карти, використовуйте ⌘ + прокручування"},vi:{touch:"Sử dụng hai ngón tay để di chuyển bản đồ",scroll:"Sử dụng ctrl + cuộn để thu phóng bản đồ",scrollMac:"Sử dụng ⌘ + cuộn để thu phóng bản đồ"},"zh-CN":{touch:"使用双指移动地图",scroll:"按住 Ctrl 并滚动鼠标滚轮才可缩放地图",scrollMac:"按住 ⌘ 并滚动鼠标滚轮才可缩放地图"},"zh-TW":{touch:"同時以兩指移動地圖",scroll:"按住 ctrl 鍵加上捲動滑鼠可以縮放地圖",scrollMac:"按 ⌘ 加上滾動捲軸可以縮放地圖"}};
vendor: 4,322 bytes, line 8
8L.Map.mergeOptions({gestureHandlingOptions:{text:{},duration:1e3}});var i=!1,o=L.Handler.extend({addHooks:function(){this._handleTouch=this._handleTouch.bind(this),this._setupPluginOptions(),this._setLanguageContent(),this._disableInteractions(),this._map._container.addEventListener("touchstart",this._handleTouch),this._map._container.addEventListener("touchmove",this._handleTouch),this._map._container.addEventListener("touchend",this._handleTouch),this._map._container.addEventListener("touchcancel",this._handleTouch),this._map._container.addEventListener("click",this._handleTouch),L.DomEvent.on(this._map._container,"wheel",this._handleScroll,this),L.DomEvent.on(this._map,"mouseover",this._handleMouseOver,this),L.DomEvent.on(this._map,"mouseout",this._handleMouseOut,this),L.DomEvent.on(this._map,"movestart",this._handleDragging,this),L.DomEvent.on(this._map,"move",this._handleDragging,this),L.DomEvent.on(this._map,"moveend",this._handleDragging,this)},removeHooks:function(){this._enableInteractions(),this._map._container.removeEventListener("touchstart",this._handleTouch),this._map._container.removeEventListener("touchmove",this._handleTouch),this._map._container.removeEventListener("touchend",this._handleTouch),this._map._container.removeEventListener("touchcancel",this._handleTouch),this._map._container.removeEventListener("click",this._handleTouch),L.DomEvent.off(this._map._container,"wheel",this._handleScroll,this),L.DomEvent.off(this._map,"mouseover",this._handleMouseOver,this),L.DomEvent.off(this._map,"mouseout",this._handleMouseOut,this),L.DomEvent.off(this._map,"movestart",this._handleDragging,this),L.DomEvent.off(this._map,"move",this._handleDragging,this),L.DomEvent.off(this._map,"moveend",this._handleDragging,this)},_handleDragging:function(t){"movestart"==t.type||"move"==t.type?i=!0:"moveend"==t.type&&(i=!1)},_disableInteractions:function(){this._map.dragging.disable(),this._map.scrollWheelZoom.disable(),this._map.tap&&this._map.tap.disable()},_enableInteractions:function(){this._map.dragging.enable(),this._map.scrollWheelZoom.enable(),this._map.tap&&this._map.tap.enable()},_setupPluginOptions:function(){this._map.options.gestureHandlingText&&(this._map.options.gestureHandlingOptions.text=this._map.options.gestureHandlingText)},_setLanguageContent:function(){var t;if(this._map.options.gestureHandlingOptions&&this._map.options.gestureHandlingOptions.text&&this._map.options.gestureHandlingOptions.text.touch&&this._map.options.gestureHandlingOptions.text.scroll&&this._map.options.gestureHandlingOptions.text.scrollMac)t=this._map.options.gestureHandlingOptions.text;else{var i=this._getUserLanguage();i||(i="en"),e[i]&&(t=e[i]),t||-1===i.indexOf("-")||(i=i.split("-")[0],t=e[i]),t||(t=e[i="en"])}var o=!1;0<=navigator.platform.toUpperCase().indexOf("MAC")&&(o=!0);var n=t.scroll;o&&(n=t.scrollMac),this._map._container.setAttribute("data-gesture-handling-touch-content",t.touch),this._map._container.setAttribute("data-gesture-handling-scroll-content",n)},_getUserLanguage:function(){return navigator.languages?navigator.languages[0]:navigator.language||navigator.userLanguage},_handleTouch:function(t){for(var e=["leaflet-control-minimap","leaflet-interactive","leaflet-popup-content","leaflet-popup-content-wrapper","leaflet-popup-close-button","leaflet-control-zoom-in","leaflet-control-zoom-out"],i=!1,o=0;o<e.length;o++)L.DomUtil.hasClass(t.target,e[o])&&(i=!0);i?L.DomUtil.hasClass(t.target,"leaflet-interactive")&&"touchmove"===t.type&&1===t.touches.length?(L.DomUtil.addClass(this._map._container,"leaflet-gesture-handling-touch-warning"),this._disableInteractions()):L.DomUtil.removeClass(this._map._container,"leaflet-gesture-handling-touch-warning"):"touchmove"===t.type||"touchstart"===t.type?1===t.touches.length?(L.DomUtil.addClass(this._map._container,"leaflet-gesture-handling-touch-warning"),this._disableInteractions()):(t.preventDefault(),this._enableInteractions(),L.DomUtil.removeClass(this._map._container,"leaflet-gesture-handling-touch-warning")):L.DomUtil.removeClass(this._map._container,"leaflet-gesture-handling-touch-warning")},_isScrolling:!1,_handleScroll:function(t){t.metaKey||t.ctrlKey?(t.preventDefault(),L.DomUtil.removeClass(this._map._container,"leaflet-gesture-handling-scroll-warning"),this._map.scrollWheelZoom.enable()):(L.Dom
8Util.addClass(this._map._container,"leaflet-gesture-handling-scroll-warning"),this._map.scrollWheelZoom.disable(),clearTimeout(this._isScrolling),this._isScrolling=setTimeout(function(){for(var t=document.getElementsByClassName("leaflet-gesture-handling-scroll-warning"),e=0;e<t.length;e++)L.DomUtil.removeClass(t[e],"leaflet-gesture-handling-scroll-warning")},this._map.options.gestureHandlingOptions.duration))},_handleMouseOver:function(t){this._enableInteractions()},_handleMouseOut:function(t){i||this._disableInteractions()}});L.Map.addInitHook("addHandler","gestureHandling",o),t.GestureHandling=o,t.default=o,Object.defineProperty(t,"__esModule",{value:!0})}(e)},395:function(t,e,i){var o,n,s;!function(r,a){n=[i(481)],void 0===(s="function"==typeof(o=r)?o.apply(e,n):o)||(t.exports=s),void 0!==a&&a.L&&(a.L.Control.MiniMap=r(L),a.L.control.minimap=function(t,e){return new a.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,i){t.Util.setOptions(this,i),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 i={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 i=t.Util.extend(this.options.mapOptions,i),this._miniMap=new t.Map(this._container,i),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 i=this.options.centerFixed||this._mainMap.getCenter();return this._miniMap.setView(i,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,i,o,n,s,r){var a=t.DomUtil.create("a",o,n);a.innerHTML=e,a.href="#",a.title=i;var l=t.DomEvent.stopPropagation;return t.DomEvent.on(a,"click",l).on(a,"mousedown",l).on(a,"dblclick",l).on(a,"click",t.DomEvent.preventDefault).on(a,"click",s,r),a},_toggleDisplayButtonClicked:function(){this._userToggledDisplay=!0,this._minimized?this._restore(
8):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(),i=this._miniMap.latLngToContainerPoint(e.getSouthWest
8()),o=this._miniMap.latLngToContainerPoint(e.getNorthEast());this._lastAimingRectPosition={sw:i,ne:o}}},_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,i=this._miniMap.getZoom()-this._mainMap.getZoom(),o=this._miniMap.getZoom()-this.options.zoomLevelOffset;return i>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=o,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)},769:function(){!function(){"use strict";var t=Symbol("newer"),e=Symbol("older"),i=function(t,e){"number"!=typeof t&&(e=t,t=0),this.size=0,this.limit=t,this.oldest=this.newest=void 0,this._keymap=new Map,e&&(this.assign(e),t<1&&(this.limit=this.size))};function o(i,o){this.key=i,this.value=o,this[t]=void 0,this[e]=void 0}function n(t){this.entry=t}function s(t){this.entry=t}function r(t){this.entry=t}i.prototype._markEntryAsUsed=function(i){i!==this.newest&&(i[t]&&(i===this.oldest&&(this.oldest=i[t]),i[t][e]=i[e]),i[e]&&(i[e][t]=i[t]),i[t]=void 0,i[e]=this.newest,this.newest&&(this.newest[t]=i),this.newest=i)},i.prototype.assign=function(i){var n,s=this.limit||Number.MAX_VALUE;this._keymap.clear();for(var r=i[Symbol.iterator](),a=r.next();!a.done;a=r.next()){var l=new o(a.value[0],a.value[1]);if(this._keymap.set(l.key,l),n?(n[t]=l,l[e]=n):this.oldest=l,n=l,0==s--)throw new Error("overflow")}this.newest=n,this.size=this._keymap.size},i.prototype.get=function(t){var e=this._keymap.get(t);if(e)return this._markEntryAsUsed(e),e.value},i.prototype.set=function(i,n){var s=this._keymap.get(i);return s?(s.value=n,this._markEntryAsUsed(s),this):(this._keymap.set(i,s=new o(i,n)),this.newest?(this.newest[t]=s,s[e]=this.newest):this.oldest=s,this.newest=s,++this.size,this.size>this.limit&&this.shift(),this)},i.prototype.shift=function(){var i=this.oldest;if(i)return this.oldest[t]?(this.oldest=this.oldest[t],this.oldest[e]=void 0):(this.oldest=void 0,this.newest=void 0),i[t]=i[e]=void 0,this._keymap.delete(i.key),--this.size,[i.key,i.value]},i.prototype.find=function(t){var e=this._keymap.get(t);return e?e.value:void 0},i.prototype.has=function(t){return this._keymap.has(t)},i.prototype.delete=function(i){var o=this._keymap.get(i);if(o)return this._keymap.delete(o.key),o[t]&&o[e]?(o[e][t]=o[t],o[t][e]=o[e]):o[t]?(o[t][e]=void 0,this.oldest=o[t]):o[e]?(o[e][t]=void 0,this.newest=o[e]):this.oldest=this.newest=void 0,this.size--,o.value},i.prototype.clear=function(){this.oldest=this.newest=void 0,this.size=0,this._keymap.clear()},i.prototype.keys=function(){return new s(this.oldest)},i.prototype.values=function(){return new r(this.oldest)},i.prototype.entries=function(){return this},i.prototype[Symbol.iterator]=function(){return new n(this.oldest)},i.prototype.forEach=function(e,i){"object"!=typeof i&&(i=this);for(var o=this.oldest;o;)e.call(i,o.value,o.key,this),o=o[t]},i.prototype.toJSON=function(){for(var e=new Array(this.size),i=0,o=this.oldest;o;)e[i++]={key:o.key,value:o.value},o=o[t];return e},i.prototype.toString=function(){for(var e="",i=this.oldest;i;)e+=String(i.key)+":"+i.value,(i=i[t])&&(e+=" < ");return e},n.prototype[Symbol.iterator]=function(){return this},n.prototype.next=function(){var e=this.entry;return e?(this.entry=e[t],{done:!1,value:[e.key,e.value]}):{done:!0,value:void 0}},s.prototype[Symbol.iterator]=function(){return this},s.prototype.next=function(){var e=this.entry;return e?(this.entry=e[t],{done:!1,value:e.key}):{done:!0,value:void 0}},r.prototype[Symbol.iterator]=function(){return this},r.prototype.next=function(){var e=this.entry;return e?(this.entry=e[t],{done:!1,value:e.value}):{done:!0,value:void 0}},L.GridLayer.GoogleMutant=L.GridLayer.extend({options:{maxZoom:21,type:"roadmap",maxNativeZoom:21},initialize:function(t){L.GridLayer.prototype.initialize.call(this,t),this._tileCallbacks={},this._lru=new i(100),this._imagesPerTile=1,this._boundOnMutatedImage=this._onMutatedImage.bind(this)},onAdd:function(t){var e,i,o,n,s=this;L.GridLayer.prototype.onAdd.call(this,t),this._initMutantContainer(),this._logoContainer&&t._controlCorners.bottomleft.appendChild(this._logoContainer),this._attributionContainer&&t._controlCorners.bottomright.appendChild(this._attributionContainer),e=function(){s._map&&(s._initMutant(),google.maps.event.addListenerOnce(s._mutant,"idle",function(){s._map&&(s._checkZoomLevels(),s._mutantIsReady=!0)}))},o=0,n=null,n=setInterval(function(){if(o>=20)throw clearInterval(n),new Error("window.google not found after 10 seconds");window.google&&window.google.maps&&window.google.maps.Map&&(clearInterval(n),e.call(i)),++o},500)},onRemove:function(t){L.GridLayer.prototype.onRemove.call(this,t),this._observer.disconnect(),t._container.removeChild(this._mutantContainer),this._logoContainer&&L.DomUtil.remove(this._logoContainer),this._attributionContainer&&L.DomUtil.remove(this._attributionContainer),this._mutant&&google.maps.event.clearListeners(this._mutant,"idle")},addGoogleLayer:function(t,e){var i=this;return this._subLayers||(this._subLayers={}),this.whenReady(function(){var o=new(0,google.maps[t])(e);o.setMap(i._mutant),i._subLayers[t]=o}),this},removeGoogleLayer:function(t){var e=this;return this.whenReady(function(){var i=e._subLayers&&e._subLayers[t];
8i&&(i.setMap(null),delete e._subLayers[t])}),this},_initMutantContainer:function(){this._mutantContainer||(this._mutantContainer=L.DomUtil.create("div","leaflet-google-mutant leaflet-top leaflet-left"),this._mutantContainer.id="_MutantContainer_"+L.Util.stamp(this._mutantContainer),this._mutantContainer.style.pointerEvents="none",this._mutantContainer.style.visibility="hidden",L.DomEvent.off(this._mutantContainer)),this._map.getContainer().appendChild(this._mutantContainer),this.setOpacity(this.options.opacity);var t=this._mutantContainer.style;this._map.options.zoomSnap<1?(t.width="180%",t.height="180%"):(t.width="100%",t.height="100%"),t.zIndex=-1,this._attachObserver(this._mutantContainer)},_initMutant:function(){if(!this._mutant){var t={center:{lat:0,lng:0},zoom:0,tilt:0,mapTypeId:this.options.type,disableDefaultUI:!0,keyboardShortcuts:!1,draggable:!1,disableDoubleClickZoom:!0,scrollwheel:!1,styles:this.options.styles||[],backgroundColor:"transparent"};null!=this.options.mapId&&(t.mapId=this.options.mapId);var e=new google.maps.Map(this._mutantContainer,t);this._mutant=e,this._update(),this.fire("spawned",{mapObject:e}),this._waitControls(),this.once("controls_ready",this._setupAttribution)}},_attachObserver:function(t){this._observer||(this._observer=new MutationObserver(this._onMutations.bind(this))),this._observer.observe(t,{childList:!0,subtree:!0}),Array.prototype.forEach.call(t.querySelectorAll("img"),this._boundOnMutatedImage)},_waitControls:function(){var t=this,e=setInterval(function(){var i,o=t._mutant.__gm.layoutManager;o&&(clearInterval(e),Object.keys(o).forEach(function(t){var e=o[t];e.get&&e.get(1)instanceof Node&&(i=e)}),t.fire("controls_ready",{positions:i}))},50)},_setupAttribution:function(t){if(this._map){var e=google.maps.ControlPosition,i=this._attributionContainer=t.positions.get(e.BOTTOM_RIGHT);L.DomUtil.addClass(i,"leaflet-control leaflet-control-attribution"),L.DomEvent.disableClickPropagation(i),i.style.height="14px",this._map._controlCorners.bottomright.appendChild(i),this._logoContainer=t.positions.get(e.BOTTOM_LEFT),this._logoContainer.style.pointerEvents="auto",this._map._controlCorners.bottomleft.appendChild(this._logoContainer)}},_onMutations:function(t){for(var e=0;e<t.length;++e)for(var i=t[e],o=0;o<i.addedNodes.length;++o){var n=i.addedNodes[o];n instanceof HTMLImageElement?this._onMutatedImage(n):n instanceof HTMLElement&&Array.prototype.forEach.call(n.querySelectorAll("img"),this._boundOnMutatedImage)}},_roadRegexp:/!1i(\d+)!2i(\d+)!3i(\d+|VinaFnapurmBegrtn)!/,_satRegexp:/x=(\d+)&y=(\d+)&z=(\d+|VinaFnapurmBegrtn)/,_onMutatedImage:function(t){var e,i=t.src.match(this._roadRegexp),o=0;if(i?(e={z:i[1],x:i[2],y:i[3]},this._imagesPerTile>1&&(t.style.zIndex=1,o=1)):((i=t.src.match(this._satRegexp))&&(e={x:i[1],y:i[2],z:i[3]}),o=0),e){var n=this._tileCoordsToKey(e);t.style.position="absolute";var s=n+"/"+o;this._lru.set(s,t),s in this._tileCallbacks&&this._tileCallbacks[s]&&(this._tileCallbacks[s].forEach(function(e){return e(t)}),delete this._tileCallbacks[s])}},createTile:function(t,e){var i=this._tileCoordsToKey(t),o=L.DomUtil.create("div");o.style.textAlign="left",o.dataset.pending=this._imagesPerTile,e=e.bind(this,null,o);for(var n=0;n<this._imagesPerTile;++n){var s=i+"/"+n,r=this._lru.get(s);r?(o.appendChild(this._clone(r)),--o.dataset.pending):(this._tileCallbacks[s]=this._tileCallbacks[s]||[],this._tileCallbacks[s].push(function(t){return function(i){t.appendChild(this._clone(i)),--t.dataset.pending,parseInt(t.dataset.pending)||e()}.bind(this)}.bind(this)(o)))}return parseInt(o.dataset.pending)||L.Util.requestAnimFrame(e),o},_clone:function(t){var e=t.cloneNode(!0);return e.style.visibility="visible",e},_checkZoomLevels:function(){var t=this._map.getZoom(),e=this._mutant.getZoom();t&&e&&(e!==t||e>this.options.maxNativeZoom)&&this._setMaxNativeZoom(e)},_setMaxNativeZoom:function(t){t!==this.options.maxNativeZoom&&(this.options.maxNativeZoom=t,this._resetView())},_update:function(t){if(this._mutant){t=t||this._map.getCenter();var e=new google.maps.LatLng(t.lat,t.lng),i=Math.round(this._map.getZoom()),o=this._mutant.getZoom();this._mutant.setCenter(e),i!==o&&(this._mutant.setZoom(i),this._mutantIsReady&&this._checkZoomLevels())}L.GridLayer.prototype._update.call(this,t)},whenReady:function(t,e){return this._mutant?t.call(e||this,{target:this}):this.on("spawned",t,e),this}}),L.gridLayer.googleMutant=function(t){return new L.GridLayer.GoogleMutant(t)}}()},389:function(t,e){!function(t){"use strict";var e=L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,clusterPane:L.Marker.prototype.options.pane,spiderfyOnEveryZoom:!1,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyShapePositions:null,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(t){L.Util.setOptions(this,t),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.addEventParent(this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};var e=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,e?this._withAnimation:this._noAnimation),this._markerCluster
vendor: 10,985 bytes, line 8
8=e?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(t){if(t instanceof L.LayerGroup)return this.addLayers([t]);if(!t.getLatLng)return this._nonPointGroup.addLayer(t),this.fire("layeradd",{layer:t}),this;if(!this._map)return this._needsClustering.push(t),this.fire("layeradd",{layer:t}),this;if(this.hasLayer(t))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(t,this._maxZoom),this.fire("layeradd",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var e=t,i=this._zoom;if(t.__parent)for(;e.__parent._zoom>=i;)e=e.__parent;return this._currentShownBounds.contains(e.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(t,e):this._animationAddLayerNonAnimated(t,e)),this},removeLayer:function(t){return t instanceof L.LayerGroup?this.removeLayers([t]):t.getLatLng?this._map?t.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(t)),this._removeLayer(t,!0),this.fire("layerremove",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),t.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(t)&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow()),this):this:(!this._arraySplice(this._needsClustering,t)&&this.hasLayer(t)&&this._needsRemoving.push({layer:t,latlng:t._latlng}),this.fire("layerremove",{layer:t}),this):(this._nonPointGroup.removeLayer(t),this.fire("layerremove",{layer:t}),this)},addLayers:function(t,e){if(!L.Util.isArray(t))return this.addLayer(t);var i,o=this._featureGroup,n=this._nonPointGroup,s=this.options.chunkedLoading,r=this.options.chunkInterval,a=this.options.chunkProgress,l=t.length,h=0,c=!0;if(this._map){var u=(new Date).getTime(),p=L.bind(function(){var d=(new Date).getTime();for(this._map&&this._unspiderfy&&this._unspiderfy();h<l&&!(s&&h%200==0&&(new Date).getTime()-d>r);h++)if((i=t[h])instanceof L.LayerGroup)c&&(t=t.slice(),c=!1),this._extractNonGroupLayers(i,t),l=t.length;else if(i.getLatLng){if(!this.hasLayer(i)&&(this._addLayer(i,this._maxZoom),e||this.fire("layeradd",{layer:i}),i.__parent&&2===i.__parent.getChildCount())){var m=i.__parent.getAllChildMarkers(),f=m[0]===i?m[1]:m[0];o.removeLayer(f)}}else n.addLayer(i),e||this.fire("layeradd",{layer:i});a&&a(h,l,(new Date).getTime()-u),h===l?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(p,this.options.chunkDelay)},this);p()}else for(var d=this._needsClustering;h<l;h++)(i=t[h])instanceof L.LayerGroup?(c&&(t=t.slice(),c=!1),this._extractNonGroupLayers(i,t),l=t.length):i.getLatLng?this.hasLayer(i)||d.push(i):n.addLayer(i);return this},removeLayers:function(t){var e,i,o=t.length,n=this._featureGroup,s=this._nonPointGroup,r=!0;if(!this._map){for(e=0;e<o;e++)(i=t[e])instanceof L.LayerGroup?(r&&(t=t.slice(),r=!1),this._extractNonGroupLayers(i,t),o=t.length):(this._arraySplice(this._needsClustering,i),s.removeLayer(i),this.hasLayer(i)&&this._needsRemoving.push({layer:i,latlng:i._latlng}),this.fire("layerremove",{layer:i}));return this}if(this._unspiderfy){this._unspiderfy();var a=t.slice(),l=o;for(e=0;e<l;e++)(i=a[e])instanceof L.LayerGroup?(this._extractNonGroupLayers(i,a),l=a.length):this._unspiderfyLayer(i)}for(e=0;e<o;e++)(i=t[e])instanceof L.LayerGroup?(r&&(t=t.slice(),r=!1),this._extractNonGroupLayers(i,t),o=t.length):i.__parent?(this._removeLayer(i,!0,!0),this.fire("layerremove",{layer:i}),n.hasLayer(i)&&(n.removeLayer(i),i.clusterShow&&i.clusterShow())):(s.removeLayer(i),this.fire("layerremove",{layer:i}));return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],this._needsRemoving=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer(function(t){t.off(this._childMarkerEventHandlers,this),delete t.__parent},this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var t=new L.LatLngBounds;this._topClusterLevel&&t.extend(this._topClusterLevel._bounds);for(var e=this._needsClustering.length-1;e>=0;e--)t.extend(this._needsClustering[e].getLatLng());return t.extend(this._nonPointGroup.getBounds()),t},eachLayer:function(t,e){var i,o,n,s=this._needsClustering.slice(),r=this._needsRemoving;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(s),o=s.length-1;o>=0;o--){for(i=!0,n=r.length-1;n>=0;n--)if(r[n].layer===s[o]){i=!1;break}i&&t.call(e,s[o])}this._nonPointGroup.eachLayer(t,e)},getLayers:function(){var t=[];return this.eachLayer(function(e){t.push(e)}),t},getLayer:function(t){var e=null;return t=parseInt(t,10),this.eachLayer(function(i){L.stamp(i)===t&&(e=i)}),e},hasLayer:function(t){if(!t)return!1;var e,i=this._needsClustering;for(e=i.length-1;e>=0;e--)if(i[e]===t)return!0;for(e=(i=this._needsRemoving).length-1;e>=0;e--)if(i[e].layer===t)return!1;return!(!t.__parent||t.__parent._group!==this)||this._nonPointGroup.hasLayer(t)},zoomToShowLayer:function(t,e){var i=this._map;"function"!=typeof e&&(e=function(){});var o=function(){!i.hasLayer(t)&&!i.hasLayer(t.__parent)||this._inZoomAnimation||(this._map.off("moveend",o,this),this.off("animationend",o,this),i.hasLayer(t)?e():t.__parent._icon&&(this.once("spiderfied",e,this),t.__parent.spiderfy()))};t._icon&&this._map.getBounds().contains(t.getLatLng())?e():t.__parent._zoom<Math.round(this._map._zoom)?(this._map.on("moveend",o,this),this._map.panTo(t.getLatLng())):(this._map.on("moveend",o,this),this.on("animationend",o,this),t.__parent.zoomToBounds())},onAdd:function(t){var e,i,o;if(this._map=t,!isFinite(this._map.getMaxZoom()))throw"Map has no maxZoom specified";for(this._featureGroup.addTo(t),this._nonPointGroup.addTo(t),this._gridClusters||this._generateInitialClusters(),this._maxLat=t.options.crs.projection.MAX_LATITUDE,e=0,i=this._needsRemoving.length;e<i;e++)(o=this._needsRemoving[e]).newlatlng=o.layer._latlng,o.layer._latlng=o.latlng;for(e=0,i=this._needsRemoving.length;e<i;e++)o=this._needsRemoving[e],this._removeLayer(o.layer,!0),o.layer._latlng=o.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),i=this._needsClustering,this._needsClustering=[],this.addLayers(i,!0)},onRemove:function(t){t.off("zoomend",this._zoomEnd,this),t.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:function(t){for(var e=t;e&&!e._icon;)e=e.__parent;return e||null},_arraySplice:function(t,e){for(var i=t.length-1;i>=0;i--)if(t[i]===e)return t.splice(i,1),!0},_removeFromGridUnclustered:function(t,e){for(var i=this._map,o=this._gridUnclustered,n=Math.floor(this._map.getMinZoom());e>=n&&o[e].removeObject(t,i.project(t.getLatLng(),e));e--);},_childMarkerDragStart:function(t){t.target.__dragStart=t.target._latlng},_childMarkerMoved:function(t){if(!this._ignoreMove&&!t.target.__dragStart){var e=t.target._popup&&t.target._popup.isOpen();this._moveChild(t.target,t.oldLatLng,t.latlng),e&&t.target.openPopup()}},_moveChild:function(t,e,i){t._latlng=e,this.removeLayer(t),t._latlng=i,this.addLayer(t)},_childMarkerDragEnd:function(t){var e=t.target.__dragStart;delete t.target.__dragStart,e&&this._moveChild(t.target,e,t.target._latlng)},_removeLayer:function(t,e,i){var o=this._gridClusters,n=this._gridUnclustered,s=this._featureGroup,r=this._map,a=Math.floor(this._map.getMinZoom());e&&this._removeFromGridUnclustered(t,this._maxZoom);var l,h=t.__parent,c=h._markers;for(this._arraySplice(c,t);h&&(h._childCount--,h._boundsNeedUpdate=!0,!(h._zoom<a));)e&&h._childCount<=1?(l=h._markers[0]===t?h._markers[1]:h._markers[0],o[h._zoom].removeObject(h,r.project(h._cLatLng,h._zoom)),n[h._zoom].addObject(l,r.project(l.getLatLng(),h._zoom)),this._arraySplice(h.__parent._childClusters,h),h.__parent._markers.push(l),l.__parent=h.__parent,h._icon&&(s.removeLayer(h),i||s.addLayer(l))):h._iconNeedsUpdate=!0,h=h.__parent;delete t.__parent},_isOrIsParent:function(t,e){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},fire:function(t,e,i){if(e&&e.layer instanceof L.MarkerCluster){if(e.originalEvent&&this._isOrIsParent(e.layer._icon,e.originalEvent.relatedTarget))return;t="cluster"+t}L.FeatureGroup.prototype.fire.call(this,t,e,i)},listens:function(t,e){return L.FeatureGroup.prototype.listens.call(this,t,e)||L.FeatureGroup.prototype.listens.call(this,"cluster"+t,e)},_defaultIconCreateFunction:function(t){var e=t.getChildCount(),i=" marker-cluster-";return i+=e<10?"small":e<100?"medium":"large",new L.DivIcon({html:"<div><span>"+e+"</span></div>",className:"marker-cluster"+i,iconSize:new L.Point(40,40)})},_bindEvents:function(){var t=this._map,e=this.options.spiderfyOnMaxZoom,i=this.options.showCoverageOnHover,o=this.options.zoomToBoundsOnClick,n=this.options.spiderfyOnEveryZoom;(e||o||n)&&this.on("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),i&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),t.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(t){var e=t.layer,i=e;if("clusterkeypress"!==t.type||!t.originalEvent||13===t.originalEvent.keyCode){for(;1===i._childClusters.length;)i=i._childClusters[0];i._zoom===this._maxZoom&&i._childCount===e._childCount&&this.options.spiderfyOnMaxZoom?e.spiderfy():this.options.zoomToBoundsOnClick&&e.zoomToBounds(),this.options.spiderfyOnEveryZoom&&e.spiderfy(),t.originalEvent&&13===t.originalEvent.keyCode&&this._map._container.focus()}},_showCoverage:function(t){var e=this._map;this._inZoomAnimation||(this._shownPolygon&&e.removeLayer(this._shownPolygon),t.layer.getChildCount()>2&&t.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(t.layer.getConvexHull(),this.options.polygonOptions),e.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var t=this.options.spiderfyOnMaxZoom,e=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick,o=this.options.spiderfyOnEveryZoom,n=this._map;(t||i||o)&&this.off("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),e&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),n.off("zoomend",this._hideCoverage,this))}
vendor: 4,878 bytes, line 8
8,_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var t=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),t),this._currentShownBounds=t}},_generateInitialClusters:function(){var t=Math.ceil(this._map.getMaxZoom()),e=Math.floor(this._map.getMinZoom()),i=this.options.maxClusterRadius,o=i;"function"!=typeof i&&(o=function(){return i}),null!==this.options.disableClusteringAtZoom&&(t=this.options.disableClusteringAtZoom-1),this._maxZoom=t,this._gridClusters={},this._gridUnclustered={};for(var n=t;n>=e;n--)this._gridClusters[n]=new L.DistanceGrid(o(n)),this._gridUnclustered[n]=new L.DistanceGrid(o(n));this._topClusterLevel=new this._markerCluster(this,e-1)},_addLayer:function(t,e){var i,o,n=this._gridClusters,s=this._gridUnclustered,r=Math.floor(this._map.getMinZoom());for(this.options.singleMarkerMode&&this._overrideMarkerIcon(t),t.on(this._childMarkerEventHandlers,this);e>=r;e--){i=this._map.project(t.getLatLng(),e);var a=n[e].getNearObject(i);if(a)return a._addChild(t),void(t.__parent=a);if(a=s[e].getNearObject(i)){var l=a.__parent;l&&this._removeLayer(a,!1);var h=new this._markerCluster(this,e,a,t);n[e].addObject(h,this._map.project(h._cLatLng,e)),a.__parent=h,t.__parent=h;var c=h;for(o=e-1;o>l._zoom;o--)c=new this._markerCluster(this,o,c),n[o].addObject(c,this._map.project(a.getLatLng(),o));return l._addChild(c),void this._removeFromGridUnclustered(a,e)}s[e].addObject(t,i)}this._topClusterLevel._addChild(t),t.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer(function(t){t instanceof L.MarkerCluster&&t._iconNeedsUpdate&&t._updateIcon()})},_enqueue:function(t){this._queue.push(t),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var t=0;t<this._queue.length;t++)this._queue[t].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var t=Math.round(this._map._zoom);this._processQueue(),this._zoom<t&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,t)):this._zoom>t?(this._animationStart(),this._animationZoomOut(this._zoom,t)):this._moveEnd()},_getExpandedVisibleBounds:function(){return this.options.removeOutsideVisibleBounds?L.Browser.mobile?this._checkBoundsMaxLat(this._map.getBounds()):this._checkBoundsMaxLat(this._map.getBounds().pad(1)):this._mapBoundsInfinite},_checkBoundsMaxLat:function(t){var e=this._maxLat;return void 0!==e&&(t.getNorth()>=e&&(t._northEast.lat=1/0),t.getSouth()<=-e&&(t._southWest.lat=-1/0)),t},_animationAddLayerNonAnimated:function(t,e){if(e===t)this._featureGroup.addLayer(t);else if(2===e._childCount){e._addToMap();var i=e.getAllChildMarkers();this._featureGroup.removeLayer(i[0]),this._featureGroup.removeLayer(i[1])}else e._updateIcon()},_extractNonGroupLayers:function(t,e){var i,o=t.getLayers(),n=0;for(e=e||[];n<o.length;n++)(i=o[n])instanceof L.LayerGroup?this._extractNonGroupLayers(i,e):e.push(i);return e},_overrideMarkerIcon:function(t){return t.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[t]}})}});L.MarkerClusterGroup.include({_mapBoundsInfinite:new L.LatLngBounds(new L.LatLng(-1/0,-1/0),new L.LatLng(1/0,1/0))}),L.MarkerClusterGroup.include({_noAnimation:{_animationStart:function(){},_animationZoomIn:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(t,e){this._animationAddLayerNonAnimated(t,e)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationZoomIn:function(t,e){var i,o=this._getExpandedVisibleBounds(),n=this._featureGroup,s=Math.floor(this._map.getMinZoom());this._ignoreMove=!0,this._topClusterLevel._recursively(o,t,s,function(s){var r,a=s._latlng,l=s._markers;
vendor: 3,208 bytes, line 8
8for(o.contains(a)||(a=null),s._isSingleParent()&&t+1===e?(n.removeLayer(s),s._recursivelyAddChildrenToMap(null,e,o)):(s.clusterHide(),s._recursivelyAddChildrenToMap(a,e,o)),i=l.length-1;i>=0;i--)r=l[i],o.contains(r._latlng)||n.removeLayer(r)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(o,e),n.eachLayer(function(t){t instanceof L.MarkerCluster||!t._icon||t.clusterShow()}),this._topClusterLevel._recursively(o,t,e,function(t){t._recursivelyRestoreChildPositions(e)}),this._ignoreMove=!1,this._enqueue(function(){this._topClusterLevel._recursively(o,t,s,function(t){n.removeLayer(t),t.clusterShow()}),this._animationEnd()})},_animationZoomOut:function(t,e){this._animationZoomOutSingle(this._topClusterLevel,t-1,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t,this._getExpandedVisibleBounds())},_animationAddLayer:function(t,e){var i=this,o=this._featureGroup;o.addLayer(t),e!==t&&(e._childCount>2?(e._updateIcon(),this._forceLayout(),this._animationStart(),t._setPos(this._map.latLngToLayerPoint(e.getLatLng())),t.clusterHide(),this._enqueue(function(){o.removeLayer(t),t.clusterShow(),i._animationEnd()})):(this._forceLayout(),i._animationStart(),i._animationZoomOutSingle(e,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(t,e,i){var o=this._getExpandedVisibleBounds(),n=Math.floor(this._map.getMinZoom());t._recursivelyAnimateChildrenInAndAddSelfToMap(o,n,e+1,i);var s=this;this._forceLayout(),t._recursivelyBecomeVisible(o,i),this._enqueue(function(){if(1===t._childCount){var r=t._markers[0];this._ignoreMove=!0,r.setLatLng(r.getLatLng()),this._ignoreMove=!1,r.clusterShow&&r.clusterShow()}else t._recursively(o,i,n,function(t){t._recursivelyRemoveChildrenFromMap(o,n,e+1)});s._animationEnd()})},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:function(){L.Util.falseFn(document.body.offsetWidth)}}),L.markerClusterGroup=function(t){return new L.MarkerClusterGroup(t)};var i=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(t,e,i,o){L.Marker.prototype.initialize.call(this,i?i._cLatLng||i.getLatLng():new L.LatLng(0,0),{icon:this,pane:t.options.clusterPane}),this._group=t,this._zoom=e,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,i&&this._addChild(i),o&&this._addChild(o)},getAllChildMarkers:function(t,e){t=t||[];for(var i=this._childClusters.length-1;i>=0;i--)this._childClusters[i].getAllChildMarkers(t,e);for(var o=this._markers.length-1;o>=0;o--)e&&this._markers[o].__dragStart||t.push(this._markers[o]);return t},getChildCount:function(){return this._childCount},zoomToBounds:function(t){for(var e,i=this._childClusters.slice(),o=this._group._map,n=o.getBoundsZoom(this._bounds),s=this._zoom+1,r=o.getZoom();i.length>0&&n>s;){s++;var a=[];for(e=0;e<i.length;e++)a=a.concat(i[e]._childClusters);i=a}n>
vendor: 5,218 bytes, line 8
8s?this._group._map.setView(this._latlng,s):n<=r?this._group._map.setView(this._latlng,r+1):this._group._map.fitBounds(this._bounds,t)},getBounds:function(){var t=new L.LatLngBounds;return t.extend(this._bounds),t},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(t,e){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(t),t instanceof L.MarkerCluster?(e||(this._childClusters.push(t),t.__parent=this),this._childCount+=t._childCount):(e||this._markers.push(t),this._childCount++),this.__parent&&this.__parent._addChild(t,!0)},_setClusterCenter:function(t){this._cLatLng||(this._cLatLng=t._cLatLng||t._latlng)},_resetBounds:function(){var t=this._bounds;t._southWest&&(t._southWest.lat=1/0,t._southWest.lng=1/0),t._northEast&&(t._northEast.lat=-1/0,t._northEast.lng=-1/0)},_recalculateBounds:function(){var t,e,i,o,n=this._markers,s=this._childClusters,r=0,a=0,l=this._childCount;if(0!==l){for(this._resetBounds(),t=0;t<n.length;t++)i=n[t]._latlng,this._bounds.extend(i),r+=i.lat,a+=i.lng;for(t=0;t<s.length;t++)(e=s[t])._boundsNeedUpdate&&e._recalculateBounds(),this._bounds.extend(e._bounds),i=e._wLatLng,o=e._childCount,r+=i.lat*o,a+=i.lng*o;this._latlng=this._wLatLng=new L.LatLng(r/l,a/l),this._boundsNeedUpdate=!1}},_addToMap:function(t){t&&(this._backupLatlng=this._latlng,this.setLatLng(t)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(t,e,i){this._recursively(t,this._group._map.getMinZoom(),i-1,function(t){var i,o,n=t._markers;for(i=n.length-1;i>=0;i--)(o=n[i])._icon&&(o._setPos(e),o.clusterHide())},function(t){var i,o,n=t._childClusters;for(i=n.length-1;i>=0;i--)(o=n[i])._icon&&(o._setPos(e),o.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(t,e,i,o){this._recursively(t,o,e,function(n){n._recursivelyAnimateChildrenIn(t,n._group._map.latLngToLayerPoint(n.getLatLng()).round(),i),n._isSingleParent()&&i-1===o?(n.clusterShow(),n._recursivelyRemoveChildrenFromMap(t,e,i)):n.clusterHide(),n._addToMap()})},_recursivelyBecomeVisible:function(t,e){this._recursively(t,this._group._map.getMinZoom(),e,null,function(t){t.clusterShow()})},_recursivelyAddChildrenToMap:function(t,e,i){this._recursively(i,this._group._map.getMinZoom()-1,e,function(o){if(e!==o._zoom)for(var n=o._markers.length-1;n>=0;n--){var s=o._markers[n];i.contains(s._latlng)&&(t&&(s._backupLatlng=s.getLatLng(),s.setLatLng(t),s.clusterHide&&s.clusterHide()),o._group._featureGroup.addLayer(s))}},function(e){e._addToMap(t)})},_recursivelyRestoreChildPositions:function(t){for(var e=this._markers.length-1;e>=0;e--){var i=this._markers[e];i._backupLatlng&&(i.setLatLng(i._backupLatlng),delete i._backupLatlng)}if(t-1===this._zoom)for(var o=this._childClusters.length-1;o>=0;o--)this._childClusters[o]._restorePosition();else for(var n=this._childClusters.length-1;n>=0;n--)this._childClusters[n]._recursivelyRestoreChildPositions(t)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(t,e,i,o){var n,s;this._recursively(t,e-1,i-1,function(t){for(s=t._markers.length-1;s>=0;s--)n=t._markers[s],o&&o.contains(n._latlng)||(t._group._featureGroup.removeLayer(n),n.clusterShow&&n.clusterShow())},function(t){for(s=t._childClusters.length-1;s>=0;s--)n=t._childClusters[s],o&&o.contains(n._latlng)||(t._group._featureGroup.removeLayer(n),n.clusterShow&&n.clusterShow())})},_recursively:function(t,e,i,o,n){var s,r,a=this._childClusters,l=this._zoom;if(e<=l&&(o&&o(this),n&&l===i&&n(this)),l<e||l<i)for(s=a.length-1;s>=0;s--)(r=a[s])._boundsNeedUpdate&&r._recalculateBounds(),t.intersects(r._bounds)&&r._recursively(t,e,i,o,n)},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var t=this.options.opacity;return this.setOpacity(0),this.options.opacity=t,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),L.DistanceGrid=function(t){this._cellSize=t,this._sqCellSize=t*t,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(t,e){var i=this._getCoord(e.x),o=this._getCoord(e.y),n=this._grid,s=n[o]=n[o]||{},r=s[i]=s[i]||[],a=L.Util.stamp(t);this._objectPoint[a]=e,r.push(t)},updateObject:function(t,e){this.removeObject(t),this.addObject(t,e)},removeObject:function(t,e){var i,o,n=this._getCoord(e.x),s=this._getCoord(e.y),r=this._grid,a=r[s]=r[s]||{},l=a[n]=a[n]||[];for(delete this._objectPoint[L.Util.stamp(t)],i=0,o=l.length;i<o;i++)if(l[i]===t)return l.splice(i,1),1===o&&delete a[n],!0},eachObject:function(t,e){var i,o,n,s,r,a,l=this._grid;for(i in l)for(o in r=l[i])for(n=0,s=(a=r[o]).length;n<s;n++)t.call(e,a[n])&&(n--,s--)},getNearObject:function(t){var e,i,o,n,s,r,a,l,h=this._getCoord(t.x),c=this._getCoord(t.y),u=this._objectPoint,p=this._sqCellSize,d=null;for(e=c-1;e<=c+1;e++)if(n=this._grid[e])for(i=h-1;
vendor: 5,632 bytes, line 8
8i<=h+1;i++)if(s=n[i])for(o=0,r=s.length;o<r;o++)a=s[o],((l=this._sqDist(u[L.Util.stamp(a)],t))<p||l<=p&&null===d)&&(p=l,d=a);return d},_getCoord:function(t){var e=Math.floor(t/this._cellSize);return isFinite(e)?e:t},_sqDist:function(t,e){var i=e.x-t.x,o=e.y-t.y;return i*i+o*o}},L.QuickHull={getDistant:function(t,e){var i=e[1].lat-e[0].lat;return(e[0].lng-e[1].lng)*(t.lat-e[0].lat)+i*(t.lng-e[0].lng)},findMostDistantPointFromBaseLine:function(t,e){var i,o,n,s=0,r=null,a=[];for(i=e.length-1;i>=0;i--)o=e[i],(n=this.getDistant(o,t))>0&&(a.push(o),n>s&&(s=n,r=o));return{maxPoint:r,newPoints:a}},buildConvexHull:function(t,e){var i=[],o=this.findMostDistantPointFromBaseLine(t,e);return o.maxPoint?i=(i=i.concat(this.buildConvexHull([t[0],o.maxPoint],o.newPoints))).concat(this.buildConvexHull([o.maxPoint,t[1]],o.newPoints)):[t[0]]},getConvexHull:function(t){var e,i=!1,o=!1,n=!1,s=!1,r=null,a=null,l=null,h=null,c=null,u=null;for(e=t.length-1;e>=0;e--){var p=t[e];(!1===i||p.lat>i)&&(r=p,i=p.lat),(!1===o||p.lat<o)&&(a=p,o=p.lat),(!1===n||p.lng>n)&&(l=p,n=p.lng),(!1===s||p.lng<s)&&(h=p,s=p.lng)}return o!==i?(u=a,c=r):(u=h,c=l),[].concat(this.buildConvexHull([u,c],t),this.buildConvexHull([c,u],t))}},L.MarkerCluster.include({getConvexHull:function(){var t,e,i=this.getAllChildMarkers(),o=[];for(e=i.length-1;e>=0;e--)t=i[e].getLatLng(),o.push(t);return L.QuickHull.getConvexHull(o)}}),L.MarkerCluster.include({_2PI:2*Math.PI,_circleFootSeparation:25,_circleStartAngle:0,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(this._group._spiderfied!==this&&!this._group._inZoomAnimation){var t,e=this.getAllChildMarkers(null,!0),i=this._group._map.latLngToLayerPoint(this._latlng);this._group._unspiderfy(),this._group._spiderfied=this,this._group.options.spiderfyShapePositions?t=this._group.options.spiderfyShapePositions(e.length,i):e.length>=this._circleSpiralSwitchover?t=this._generatePointsSpiral(e.length,i):(i.y+=10,t=this._generatePointsCircle(e.length,i)),this._animationSpiderfy(e,t)}},unspiderfy:function(t){this._group._inZoomAnimation||(this._animationUnspiderfy(t),this._group._spiderfied=null)},_generatePointsCircle:function(t,e){var i,o,n=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+t)/this._2PI,s=this._2PI/t,r=[];for(n=Math.max(n,35),r.length=t,i=0;i<t;i++)o=this._circleStartAngle+i*s,r[i]=new L.Point(e.x+n*Math.cos(o),e.y+n*Math.sin(o))._round();return r},_generatePointsSpiral:function(t,e){var i,o=this._group.options.spiderfyDistanceMultiplier,n=o*this._spiralLengthStart,s=o*this._spiralFootSeparation,r=o*this._spiralLengthFactor*this._2PI,a=0,l=[];for(l.length=t,i=t;i>=0;i--)i<t&&(l[i]=new L.Point(e.x+n*Math.cos(a),e.y+n*Math.sin(a))._round()),n+=r/(a+=s/n+5e-4*i);return l},_noanimationUnspiderfy:function(){var t,e,i=this._group,o=i._map,n=i._featureGroup,s=this.getAllChildMarkers(null,!0);for(i._ignoreMove=!0,this.setOpacity(1),e=s.length-1;e>=0;e--)t=s[e],n.removeLayer(t),t._preSpiderfyLatlng&&(t.setLatLng(t._preSpiderfyLatlng),delete t._preSpiderfyLatlng),t.setZIndexOffset&&t.setZIndexOffset(0),t._spiderLeg&&(o.removeLayer(t._spiderLeg),delete t._spiderLeg);i.fire("unspiderfied",{cluster:this,markers:s}),i._ignoreMove=!1,i._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(t,e){var i,o,n,s,r=this._group,a=r._map,l=r._featureGroup,h=this._group.options.spiderLegPolylineOptions;for(r._ignoreMove=!0,i=0;i<t.length;i++)s=a.layerPointToLatLng(e[i]),o=t[i],n=new L.Polyline([this._latlng,s],h),a.addLayer(n),o._spiderLeg=n,o._preSpiderfyLatlng=o._latlng,o.setLatLng(s),o.setZIndexOffset&&o.setZIndexOffset(1e6),l.addLayer(o);this.setOpacity(.3),r._ignoreMove=!1,r.fire("spiderfied",{cluster:this,markers:t})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerCluster.include({_animationSpiderfy:function(t,e){var i,o,n,s,r,a,l=this,h=this._group,c=h._map,u=h._featureGroup,p=this._latlng,d=c.latLngToLayerPoint(p),m=L.Path.SVG,f=L.extend({},this._group.options.spiderLegPolylineOptions),g=f.opacity;for(void 0===g&&(g=L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),m?(f.opacity=0,f.className=(f.className||"")+" leaflet-cluster-spider-leg"):f.opacity=g,h._ignoreMove=!0,i=0;i<t.length;i++)o=t[i],a=c.layerPointToLatLng(e[i]),n=new L.Polyline([p,a],f),c.addLayer(n),o._spiderLeg=n,m&&(r=(s=n._path).getTotalLength()+.1,s.style.strokeDasharray=r,s.style.strokeDashoffset=r),o.setZIndexOffset&&o.setZIndexOffset(1e6),o.clusterHide&&o.clusterHide(),u.addLayer(o),o._setPos&&o._setPos(d);for(h._forceLayout(),h._animationStart(),i=t.length-1;i>=0;i--)a=c.layerPointToLatLng(e[i]),(o=t[i])._preSpiderfyLatlng=o._latlng,o.setLatLng(a),o.clusterShow&&o.clusterShow(),m&&((s=(n=o._spiderLeg)._path).style.strokeDashoffset=0,n.setStyle({opacity:g}));this.setOpacity(.3),h._ignoreMove=!1,setTimeout(function(){h._animationEnd(),h.fire("spiderfied",{cluster:l,markers:t})},200)},_animationUnspiderfy:function(t){var e,i,o,n,s,r,a=this,l=this._group,h=l._map,c=l._featureGroup,u=t?h._latLngToNewLayerPoint(this._latlng,t.zoom,t.center):h.latLngToLayerPoint(this._latlng),p=this.getAllChildMarkers(null,!0),d=L.Path.SVG;for(l._ignoreMove=!0,l._animationStart(),this.setOpacity(1),i=p.length-1;i>=0;i--)(e=p[i])._preSpiderfyLatlng&&(e.closePopup(),e.setLatLng(e._preSpiderfyLatlng),delete e._preSpiderfyLatlng,r=!0,e._setPos&&(e._setPos(u),r=!1),e.clusterHide&&(e.clusterHide(),r=!1),r&&c.removeLayer(e),d&&(s=(n=(o=e._spiderLeg)._path).getTotalLength()+.1,n.style.strokeDashoffset=s,o.setStyle({opacity:0}
vendor: 3,574 bytes, line 8
8)));l._ignoreMove=!1,setTimeout(function(){var t=0;for(i=p.length-1;i>=0;i--)(e=p[i])._spiderLeg&&t++;for(i=p.length-1;i>=0;i--)(e=p[i])._spiderLeg&&(e.clusterShow&&e.clusterShow(),e.setZIndexOffset&&e.setZIndexOffset(0),t>1&&c.removeLayer(e),h.removeLayer(e._spiderLeg),delete e._spiderLeg);l._animationEnd(),l.fire("unspiderfied",{cluster:a,markers:p})},200)}}),L.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(){this._unspiderfy.apply(this,arguments)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),L.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(t){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(t))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(t){this._spiderfied&&this._spiderfied.unspiderfy(t)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(t){t._spiderLeg&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow(),t.setZIndexOffset&&t.setZIndexOffset(0),this._map.removeLayer(t._spiderLeg),delete t._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(t){return t?t instanceof L.MarkerClusterGroup?t=t._topClusterLevel.getAllChildMarkers():t instanceof L.LayerGroup?t=t._layers:t instanceof L.MarkerCluster?t=t.getAllChildMarkers():t instanceof L.Marker&&(t=[t]):t=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(t),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(t),this},_flagParentsIconsNeedUpdate:function(t){var e,i;for(e in t)for(i=t[e].__parent;i;)i._iconNeedsUpdate=!0,i=i.__parent},_refreshSingleMarkerModeMarkers:function(t){var e,i;for(e in t)i=t[e],this.hasLayer(i)&&i.setIcon(this._overrideMarkerIcon(i))}}),L.Marker.include({refreshIconOptions:function(t,e){var i=this.options.icon;return L.setOptions(i,t),this.setIcon(i),e&&this.__parent&&this.__parent._group.refreshClusters(this),this}}),t.MarkerClusterGroup=e,t.MarkerCluster=i,Object.defineProperty(t,"__esModule",{value:!0})}(e)},423:function(t,e,i){var o,n,s;n=[i(481)],void 0===(s="function"==typeof(o=function(t){var e="polyline-measure-control",i="polyline-measure-unicode-icon";return t.Control.PolylineMeasure=t.Control.extend({options:{position:"topleft",unit:"metres",clearMeasurementsOnStop:!0,showBearings:!1,bearingTextIn:"In",bearingTextOut:"Out",tooltipTextFinish:"Click to <b>finish line</b><br>",tooltipTextDelete:"Press SHIFT-key and click to <b>delete point</b>",tooltipTextMove:"Click and drag to <b>move point</b><br>",tooltipTextResume:"<br>Press CTRL-key and click to <b>resume line</b>",tooltipTextAdd:"Press CTRL-key and click to <b>add point</b>",measureControlTitleOn:"Turn on PolylineMeasure",measureControlTitleOff:"Turn off PolylineMeasure",measureControlLabel:"&#8614;",measureControlClasses:[],showClearControl:!1,clearControlTitle:"Clear Measurements",clearControl
8Label:"&times;",clearControlClasses:[],showUnitControl:!1,distanceShowSameUnit:!1,unitControlTitle:{text:"Change Units",metres:"metres",landmiles:"land miles",nauticalmiles:"nautical miles"},unitControlLabel:{metres:"m",kilometres:"km",feet:"ft",landmiles:"mi",nauticalmiles:"nm"},tempLine:{color:"#00f",weight:2},fixedLine:{color:"#006",weight:2},startCircle:{color:"#000",weight:1,fillColor:"#0f0",fillOpacity:1,radius:3},intermedCircle:{color:"#000",weight:1,fillColor:"#ff0",fillOpacity:1,radius:3},currentCircle:{color:"#000",weight:1,fillColor:"#f0f",fillOpacity:1,radius:6},endCircle:{color:"#000",weight:1,fillColor:"#f00",fillOpacity:1,radius:3}},_arcpoints:100,_circleNr:-1,_lineNr:-1,_createControl:function(e,i,o,n,s,r){var a=document.createElement("a");return a.innerHTML=e,a.setAttribute("title",i),o.forEach(function(t){a.classList.add(t)}),t.DomEvent.on(a,"click",s,r),n.appendChild(a),a},onAdd:function(o){var n=this;o.on("movestart ",function(){n._mapdragging=!0}),this._container=document.createElement("div"),this._container.classList.add("leaflet-bar"),t.DomEvent.disableClickPropagation(this._container);var s=this.options.measureControlTitleOn,r=this.options.measureControlLabel,a=this.options.measureControlClasses;return-1!=r.indexOf("&")&&a.push(i),this._arrPolylines=[],this._measureControl=this._createControl(r,s,a,this._container,this._toggleMeasure,this),this._defaultControlBgColor=this._measureControl.style.backgroundColor,this._measureControl.setAttribute("id",e),this.options.showClearControl&&(s=this.options.clearControlTitle,r=this.options.clearControl
8Label,a=this.options.clearControlClasses,-1!=r.indexOf("&")&&a.push(i),this._clearMeasureControl=this._createControl(r,s,a,this._container,this._clearAllMeasurements,this),this._clearMeasureControl.classList.add("polyline-measure-clearControl")),this.options.showUnitControl&&("metres"==this.options.unit?(r=this.options.unitControlLabel.metres,s=this.options.unitControlTitle.text+" ["+this.options.unitControlTitle.metres+"]"):"landmiles"==this.options.unit?(r=this.options.unitControlLabel.landmiles,s=this.options.unitControlTitle.text+" ["+this.options.unitControlTitle.landmiles+"]"):(r=this.options.unitControlLabel.nauticalmiles,s=this.options.unitControlTitle.text+" ["+this.options.unitControlTitle.nauticalmiles+"]"),a=[],this._unitControl=this._createControl(r,s,a,this._container,this._changeUnit,this),this._unitControl.setAttribute("id","unitControlId")),this._container},onRemove:function(){this._measuring&&this._toggleMeasure()},_saveNonpolylineEvents:function(){this._nonpolylineTargets=this._map._targets,void 0!==this._polylineTargets?this._map._targets=this._polylineTargets:this._map._targets={}},_savePolylineEvents:function(){this._polylineTargets=this._map._targets,this._map._targets=this._nonpolylineTargets},_toggleMeasure:function(){this._measuring=!this._measuring,this._measuring?(this._mapdragging=!1,this._saveNonpolylineEvents(),this._measureControl.classList.add("polyline-measure-controlOnBgColor"),this._measureControl.style.backgroundColor=this.options.backgroundColor,this._measureControl.title=this.options.measureControlTitleOff,this._oldCursor=this._map._container.style.cursor,this._map._container.style.cursor="crosshair",this._doubleClickZoom=this._map.doubleClickZoom.enabled(),this._map.doubleClickZoom.disable(),this._layerPaint||(this._layerPaint=t.layerGroup().addTo(this._map)),this._map.on("mousemove",this._mouseMove,this),this._map.on("click",this._mouseClick,this),t.DomEvent.on(document,"keydown",this._onKeyDown,this),this._resetPathVariables()):(this._savePolylineEvents(),this._measureControl.classList.remove("polyline-measure-controlOnBgColor"),this._measureControl.style.backgroundColor=this._defaultControlBgColor,this._measureControl.title=this.options.measureControlTitleOn,this._map._container.style.cursor=this._oldCursor,this._map.off("mousemove",this._mouseMove,this),this._map.off("click",this._mouseClick,this),this._map.off("mousemove",this._resumeFirstpointMousemove,this),this._map.off("click",this._resumeFirstpointClick,this),this._map.off("mousemove",this._dragCircleMousemove,this),this._map.off("mouseup",this._dragCircleMouseup,this),t.DomEvent.off(document,"keydown",this._onKeyDown,this),this._doubleClickZoom&&this._map.doubleClickZoom.enable(),this.options.clearMeasurementsOnStop&&this._layerPaint&&this._clearAllMeasurements(),0!==this._cntCircle&&this._finishPolylinePath()),this._map.fire("polylinemeasure:toggle",{sttus:this._measuring})},_clearAllMeasurements:function(){void 0!==this._cntCircle&&0!==this._cntCircle&&this._finishPolylinePath(),this._layerPaint&&this._layerPaint.clearLayers(),this._arrPolylines=[],this._map.fire("polylinemeasure:clear")},_changeUnit:function(){"metres"==this.options.unit?(this.options.unit="landmiles",document.getElementById("unitControlId").innerHTML=this.options.unitControlLabel.landmiles,this._unitControl.title=this.options.unitControlTitle.text+" ["+this.options.unitControlTitle.landmiles+"]"):"landmiles"==this.options.unit?(this.options.unit="nauticalmiles",document.getElementById("unitControlId").innerHTML=this.options.unitControlLabel.nauticalmiles,this._unitControl.title=this.options.unitControlTitle.text+" ["+this.options.unitControlTitle.nauticalmiles+"]"):(this.options.unit="metres",document.getElementById("unitControlId").innerHTML=this.options.unitControlLabel.metres,this._unitControl.title=this.options.unitControlTitle.text+" ["+this.options.unitControlTitle.metres+"]"),this._currentLine&&this._computeDistance(this._currentLine),this._arrPolylines.map(this._computeDistance.bind(this))},_computeDistance:function(t){var e=0;t.circleCoords.map(function(i,o){if(o>=1){var n=t.circleCoords[o-1].distanceTo(t.circleCoords[o]);e+=n,this._updateTooltip(t.tooltips[o],t.tooltips[o-1],e,n,t.cir
8cleCoords[o-1],t.circleCoords[o])}}.bind(this))},_onKeyDown:function(t){if(27===t.keyCode){if(!0===this._resumeFirstpointFlag){this._resumeFirstpointFlag=!1;var e=this._lineNr;this._map.off("mousemove",this._resumeFirstpointMousemove,this),this._map.off("click",this._resumeFirstpointClick,this),this._layerPaint.removeLayer(this._rubberlinePath2),this._layerPaint.removeLayer(this._tooltipNew),this._arrPolylines[e].circleMarkers[0].setStyle(this.options.startCircle);var i="",o=0;return!0===this.options.showBearings&&(i=this.options.bearingTextIn+":---°<br>"+this.options.bearingTextOut+":---°"),i+='<div class="polyline-measure-tooltip-difference">+0</div>',i+='<div class="polyline-measure-tooltip-total">0</div>',this._arrPolylines[e].tooltips[0]._icon.innerHTML=i,this._arrPolylines[e].tooltips.map(function(t,i){if(i>=1){var n=this._arrPolylines[e].circleCoords[i-1].distanceTo(this._arrPolylines[e].circleCoords[i]),s=this._arrPolylines[e].circleCoords[i-1],r=this._arrPolylines[e].circleCoords[i];o+=n;var a=this._arrPolylines[e].tooltips[i-1];this._updateTooltip(t,a,o,n,s,r)}}.bind(this)),void this._map.on("mousemove",this._mouseMove,this)}this._currentLine?this._finishPolylinePath(t):this._toggleMeasure()}},_getDistance:function(t){var e,i=t;return"nauticalmiles"===this.options.unit?(e=this.options.unitControlLabel.nauticalmiles,i>=185200?i=(i/1852).toFixed(0):i>=18520?i=(i/1852).toFixed(1):i>=1852?i=(i/1852).toFixed(2):this.options.distanceShowSameUnit?i=(i/1852).toFixed(3):(i=(i/.3048).toFixed(0),e=this.options.unitControlLabel.feet)):"landmiles"===this.options.unit?(e=this.options.unitControlLabel.landmiles,i>=160934.4?i=(i/1609.344).toFixed(0):i>=16093.44?i=(i/1609.344).toFixed(1):i>=1609.344?i=(i/1609.344).toFixed(2):this.options.distanceShowSameUnit?i=(i/1609.344).toFixed(3):(i=(i/.3048).toFixed(0),e=this.options.unitControlLabel.feet)):(e=this.options.unitControlLabel.kilometres,i>=1e5?i=(i/1e3).toFixed(0):i>=1e4?i=(i/1e3).toFixed(1):i>=1e3?i=(i/1e3).toFixed(2):this.options.distanceShowSameUnit?i=(i/1e3).toFixed(3):(i=i.toFixed(0),e=this.options.unitControlLabel.metres)),{value:i,unit:e}},_polylineArc:function(t,e){function i(t){var e=Math.sin((1-t)*l)/Math.sin(l),i=Math.sin(t*l)/Math.sin(l),o=e*Math.cos(n)*Math.cos(s)+i*Math.cos(r)*Math.cos(a),h=e*Math.cos(n)*Math.sin(s)+i*Math.cos(r)*Math.sin(a),c=e*Math.sin(n)+i*Math.sin(r),u=180/Math.PI*Math.atan2(c,Math.sqrt(Math.pow(o,2)+Math.pow(h,2))),p=180/Math.PI*Math.atan2(h,o),d=p-180*s/Math.PI;function m(t){return Math[t>0?"floor":"ceil"](t)}return[u,p-=d<0?360*m((d-180)/360):360*m((d+180)/360)]}function o(t){for(var e=[],o=1/(t-1),n=0;n<t;n++){var s=i(o*n);e.push(s)}return e}var n=t.lat,s=t.lng,r=e.lat,a=e.lng;n=n*Math.PI/180,s=s*Math.PI/180,r=r*Math.PI/180,a=a*Math.PI/180;var l=2*Math.asin(Math.sqrt(Math.pow(Math.sin((n-r)/2),2)+Math.cos(n)*Math.cos(r)*Math.pow(Math.sin((s-a)/2),2)));return 0===l?[[n,s]]:o(this._arcpoints)},_updateTooltip:function(t,e,i,o,n,s){var r=function(t,e,i){var o=t.lat/180*Math.PI,n=e.lat/180*Math.PI,s=t.lng/180*Math.PI,r=e.lng/180*Math.PI,a=Math.sin(r-s)*Math.cos(n),l=Math.cos(o)*Math.sin(n)-Math.sin(o)*Math.cos(n)*Math.cos(r-s);if("inbound"===i)var h=(180*Math.atan2(a,l)/Math.PI+180).toFixed(0);else h=(180*Math.atan2(a,l)/Math.PI+360).toFixed(0);return h%360},a=r(s,n,"inbound"),l=r(n,s,"outbound"),h=this._getDistance(i),c=this._getDistance(o),u="";if(c.value>0&&(!0===this.options.showBearings&&(u=this.options.bearingTextIn+": "+a+"°<br>"+this.options.bearingTextOut+":---°"),u+='<div class="polyline-measure-tooltip-difference">+'+c.value+"&nbsp;"+c.unit+"</div>"),u+='<div class="polyline-measure-tooltip-total">'+h.value+"&nbsp;"+h.unit+"</div>",t._icon.innerHTML=u,!0===this.options.showBearings&&e){var p=e._icon.innerHTML,d=new RegExp(this.options.bearingTextOut+".*°"),m=p.replace(d,this.options.bearingTextOut+": "+l+"°");e._icon.innerHTML=m}},_drawArrow:function(e){var i=Math.round(e.length/2),o=e[i-1],n=e[i],s=n[1]-o[1],r=n[0]-o[0],a=[o[0]+r/2,o[1]+s/2],l=57.29578*-Math.atan2(r,s),h=t.divIcon({className:"",iconSize:[16,16],iconAnchor:[8,8],html:"<div style = 'font-size: 16px; line-height: 16px; vertical-align:top; transform: rotate("+l+"deg)'>&#x27a4;</div>"}),c=t.marker(a,{icon:h,zIndexOffset:-50}).addTo(this._layerPaint);return this._currentLine||c.bindTooltip(this.options.tooltipTextAdd,{direction:"top",opacity:.7,className:"polyline-measure-popupTooltip"}),c.on("click",this._clickedArrow,this),c},_mouseMove:function(t){var e=t.latlng;if(this._map.on("click",this._mouseClick,this),e&&this._currentLine){var i=this._currentLine.circleCoords.last();this._rubberlinePath.setLatLngs(this._polylineArc(i,e));var o=this._currentLine.tooltips.last(),n=this._currentLine.tooltips.slice(-2,-1)[0];o.setLatLng(e);var s=e.distanceTo(i);this._updateTooltip(o,n,this._currentLine.distance+s,s,i,e)}},_startLine:function(e){var i=t.divIcon({className:"polyline-measure-tooltip",iconA
8nchor:[-4,-4]}),o=function(){return this.slice(-1)[0]};this._rubberlinePath=t.polyline([],{color:this.options.tempLine.color,weight:this.options.tempLine.weight,interactive:!1,dashArray:"8,8"}).addTo(this._layerPaint).bringToBack();var n=this;this._currentLine={id:0,circleCoords:[],circleMarkers:[],arrowMarkers:[],tooltips:[],distance:0,polylinePath:t.polyline([],{color:this.options.fixedLine.color,weight:this.options.fixedLine.weight,interactive:!1}).addTo(this._layerPaint).bringToBack(),handleMarkers:function(e){var i=this.circleMarkers.last();i&&(i.bindTooltip(n.options.tooltipTextDelete,{direction:"top",opacity:.7,className:"polyline-measure-popupTooltip"}),i.off("click",n._finishPolylinePath,n),1===this.circleMarkers.length?i.setStyle(n.options.startCircle):i.setStyle(n.options.intermedCircle));var o=new t.CircleMarker(e,n.options.currentCircle).addTo(n._layerPaint);o.bindTooltip(n.options.tooltipTextFinish+n.options.tooltipTextDelete,{direction:"top",opacity:.7,className:"polyline-measure-popupTooltip"}),o.cntLine=n._currentLine.id,o.cntCircle=n._cntCircle,n._cntCircle++,o.on("mousedown",n._dragCircle,n),o.on("click",n._finishPolylinePath,n),this.circleMarkers.push(o)},getNewToolTip:function(e){return t.marker(e,{icon:i,interactive:!1})},addPoint:function(t){var e=this.circleCoords.last();if(!e||!e.equals(t)){if(this.circleCoords.push(t),this.circleCoords.length>1){var i=n._polylineArc(e,t);this.circleCoords.length>2&&i.shift(),this.polylinePath.setLatLngs(this.polylinePath.getLatLngs().concat(i));var o=n._drawArrow(i);o.cntLine=n._currentLine.id,o.cntArrow=n._cntCircle-1,n._currentLine.arrowMarkers.push(o);var s=e.distanceTo(t);this.distance+=s;var r=n._currentLine.tooltips.last(),a=n._currentLine.tooltips.slice(-1,-2)[0];n._updateTooltip(r,a,this.distance,s,e,t)}r&&r.setLatLng(t);var l=this.getNewToolTip(t);l.addTo(n._layerPaint),this.tooltips.push(l),this.handleMarkers(t)}},finalize:function(){if(n._layerPaint.removeLayer(this.tooltips.last()),this.tooltips.pop(),n._layerPaint.removeLayer(n._rubberlinePath),this.circleCoords.length>1){this.tooltips.last()._icon.classList.add("polyline-measure-tooltip-end");var t=this.circleMarkers.last();t.setStyle(n.options.endCircle),t.unbindTooltip(),n._currentLine.circleMarkers.map(function(t){t.bindTooltip(n.options.tooltipTextMove+n.options.tooltipTextDelete,{direction:"top",opacity:.7,className:"polyline-measure-popupTooltip"})}),n._currentLine.circleMarkers[0].bindTooltip(n.options.tooltipTextMove+n.options.tooltipTextDelete+n.options.tooltipTextResume,{direction:"top",opacity:.7,className:"polyline-measure-popupTooltip"}),t.bindTooltip(n.options.tooltipTextMove+n.options.tooltipTextDelete+n.options.tooltipTextResume,{direction:"top",opacity:.7,className:"polyline-measure-popupTooltip"}),n._currentLine.arrowMarkers.map(function(t){t.bindTooltip(n.options.tooltipTextAdd,{direction:"top",opacity:.7,className:"polyline-measure-popupTooltip"})}),t.off("click",n._finishPolylinePath,n),t.on("click",n._resumePolylinePath,n),n._arrPolylines.push(this)}else n._layerPaint.removeLayer(this.circleMarkers.last()),n._layerPaint.removeLayer(this.tooltips.last());n._resetPathVariables()}};var s=t.marker(e,{icon:i,interactive:!1});s.addTo(this._layerPaint);var r="";!0===this.options.showBearings&&(r=this.options.bearingTextIn+":---°<br>"+this.options.bearingTextOut+":---°"),r+='<div class="polyline-measure-tooltip-difference">+0</div>',r+='<div class="polyline-measure-tooltip-total">0</div>',s._icon.innerHTML=r,this._currentLine.tooltips.push(s),this._currentLine.circleCoords.last=o,this._currentLine.tooltips.last=o,this._currentLine.circleMarkers.last=o,this._currentLine.id=this._arrPolylines.length},_mouseClick:function(t){!t.latlng||this._finishCircleScreencoords&&this._finishCircleScreencoords.equals(t.containerPoint)||(this._currentLine||this._mapdragging||(this._startLine(t.latlng),this._map.fire("polylinemeasure:start",this._currentLine)),this._mapdragging?this._mapdragging=!1:(this._currentLine.addPoint(t.latlng),this._map.fire("polylinemeasure:add",t),this._map.fire("polylinemeasure:change",this._currentLine)))},_finishPolylinePath:function(t){this._map.fire("polylinemeasure:finish",this._currentLine),this._currentLine.finalize(),t&&(this._finishCircleScreencoords=t.containerPoint)},_resumePolylinePath:function(e){if(!0===e.originalEvent.ctrlKey){this._currentLine=this._arrPolylines[e.target.cntLine],this._rubberlinePath=t.polyline([],{color:this.options.tempLine.color,weight:this.options.tempLine.weight,interactive:!1,dashArray:"8,8"}).addTo(this._layerPaint).bringToBack(),this._currentLine.tooltips.last()._icon.classList.remove("polyline-measure-tooltip-en
8d");var i=this._currentLine.getNewToolTip(e.latlng);i.addTo(this._layerPaint),this._currentLine.tooltips.push(i),this._currentLine.circleMarkers.last().unbindTooltip(),this._currentLine.circleMarkers.last().bindTooltip(this.options.tooltipTextMove+this.options.tooltipTextDelete,{direction:"top",opacity:.7,className:"polyline-measure-popupTooltip"}),this._currentLine.circleMarkers.last().setStyle(this.options.currentCircle),this._cntCircle=this._currentLine.circleCoords.length,this._map.fire("polylinemeasure:resume",this._currentLine)}},_resetPathVariables:function(){this._cntCircle=0,this._currentLine=null},_clickedArrow:function(e){if(e.originalEvent.ctrlKey){var i=e.target.cntLine,o=e.target.cntArrow;this._arrPolylines[i].arrowMarkers[o].removeFrom(this._layerPaint);var n=new t.CircleMarker(e.latlng,this.options.intermedCircle).addTo(this._layerPaint);n.cntLine=i,n.on("mousedown",this._dragCircle,this),n.bindTooltip(this.options.tooltipTextMove+this.options.tooltipTextDelete,{direction:"top",opacity:.7,className:"polyline-measure-popupTooltip"}),this._arrPolylines[i].circleMarkers.splice(o+1,0,n),this._arrPolylines[i].circleMarkers.map(function(t,e){t.cntCircle=e}),this._arrPolylines[i].circleCoords.splice(o+1,0,e.latlng),lineCoords=this._arrPolylines[i].polylinePath.getLatLngs();var s=this._polylineArc(this._arrPolylines[i].circleCoords[o],e.latlng);s.pop();var r=this._polylineArc(e.latlng,this._arrPolylines[i].circleCoords[o+2]);Array.prototype.splice.apply(lineCoords,[o*(this._arcpoints-1),this._arcpoints].concat(s,r)),this._arrPolylines[i].polylinePath.setLatLngs(lineCoords);var a=this._drawArrow(s);this._arrPolylines[i].arrowMarkers[o]=a,a=this._drawArrow(r),this._arrPolylines[i].arrowMarkers.splice(o+1,0,a),this._arrPolylines[i].arrowMarkers.map(function(t,e){t.cntLine=i,t.cntArrow=e}),this._tooltipNew=t.marker(e.latlng,{icon:t.divIcon({className:"polyline-measure-tooltip",iconAnchor:[-4,-4]}),interactive:!1}),this._tooltipNew.addTo(this._layerPaint),this._arrPolylines[i].tooltips.splice(o+1,0,this._tooltipNew);var l=0;this._arrPolylines[i].tooltips.map(function(t,e){if(e>=1){var o=this._arrPolylines[i].circleCoords[e-1].distanceTo(this._arrPolylines[i].circleCoords[e]),n=this._arrPolylines[i].circleCoords[e-1],s=this._arrPolylines[i].circleCoords[e];l+=o;var r=this._arrPolylines[i].tooltips[e-1];this._updateTooltip(t,r,l,o,n,s)}}.bind(this)),this._map.fire("polylinemeasure:insert",e),this._map.fire("polylinemeasure:change",this._arrPolylines[this._lineNr])}},_dragCircleMouseup:function(){0===this._circleNr||this._circleNr===this._arrPolylines[this._lineNr].circleCoords.length-1?this._e1.target.bindTooltip(this.options.tooltipTextMove+this.options.tooltipTextDelete+this.options.tooltipTextResume,{direction:"top",opacity:.7,className:"polyline-measure-popupTooltip"}):this._e1.target.bindTooltip(this.options.tooltipTextMove+this.options.tooltipTextDelete,{direction:"top",opacity:.7,className:"polyline-measure-popupTooltip"}),this._resetPathVariables(),this._map.off("mousemove",this._dragCircleMousemove,this),this._map.dragging.enable(),this._map.on("mousemove",this._mouseMove,this),this._map.off("mouseup",this._dragCircleMouseup,this),this._map.fire("polylinemeasure:move",this._e1),this._map.fire("polylinemeasure:change",this._arrPolylines[this._lineNr])},_dragCircleMousemove:function(e){var i=e.latlng.lat,o=e.latlng.lng,n=i-this._mouseStartingLat,s=o-this._mouseStartingLng,r=t.latLng(this._circleStartingLat+n,this._circleStartingLng+s),a=this._arcpoints,l=this._e1.target.cntLine;this._lineNr=l;var h=this._e1.target.cntCircle;this._circleNr=h,this._e1.target.setLatLng(r),this._e1.target.unbindTooltip(),this._arrPolylines[l].circleCoords[h]=r;var c=this._arrPolylines[l].polylinePath.getLatLngs();if(h>=1){var u=this._polylineArc(this._arrPolylines[l].circleCoords[h-1],r);Array.prototype.splice.apply(c,[(h-1)*(a-1),a].concat(u));var p=this._drawArrow(u);p.cntLine=l,p.cntArrow=h-1,this._arrPolylines[l].arrowMarkers[h-1].removeFrom(this._layerPaint),this._arrPolylines[l].arrowMarkers[h-1]=p}if(h<this._arrPolylines[l].circleCoords.length-1){var d=this._polylineArc(r,this._arrPolylines[l].circleCoords[h+1]);Array.prototype.splice.apply(c,[h*(a-1),a].concat(d)),(p=this._drawArrow(d)).cntLine=l,p.cntArrow=h,this._arrPolylines[l].arrowMarkers[h].removeFrom(this._layerPaint),this._arrPolylines[l].arrowMarkers[h]=p}this._arrPolylines[l].polylinePath.setLatLngs(c),h>=0&&this._arrPolylines[l].tooltips[h].setLatLng(r);var m=0;this._arrPolylines[l].tooltips.map(function(t,e){if(e>=1){var i=this._arrPolylines[l].circleCoords[e-1].distanceTo(this._arrPolylines[l].circleCoords[e]),o=this._arrPolylines[l].circleCoords[e-1],n=this._arrPolylines[l].circleCoords[e];m+=i,this._arrPolylines[l].distance=m;var s=this._arrPolylines[l].tooltips[e-1];this._updateTooltip(t,s,m,i,o,n)}}.bind(this)),this._map.on("mouseup",this._dragCircleMouseup,this)},_resumeFirstpointMousemove:function(t){var e=this._lineNr;this._map.on("click",this._resumeFirstpointClick,this);var i=t.latlng;this._rubberlinePath2.setLatLngs(this._polylineArc(i,currentCircleCoords)),this._tooltipNew.setLatLng(i);var o=0,n=i.distanceTo(this._arrPolylines[e].circleCoords[0]),s=i,r=this._arrPolylines[e].circleCoords[0];o+=n;var a=this._tooltipNew,l=this._arrPolylines[e].tooltips[0];this._updateTooltip(l,a,o,n,s,r),this._arrPolylines[e].tooltips.map(function(t,i){if(i>=1){var n=this._arrPolylines[e].circleCoords[i-1].distanceTo(this._arrPolylines[e].circleCoords[i]),s=this._arrPolylines[e].circleCoords[i-1],r=this._arrPolylines[e].circleCoords[i];o+=n;var a=this._arrPolylines[e].tooltips[i-1];this._updateTooltip(t,a,o,n,s,r)}}.bind(this))},_resumeFirstpointClick:function(e){var i=this._lineNr;this._resumeFirstpointFlag=!1,this._map.off("mousemove",this._resumeFirstpointMousemove,this),this._map.off("click",this._resumeFirstpointClick,this),this._layerPaint.removeLayer(this._rubberlinePath2),this._arrPolylines[i].circleMarkers[0].setStyle(this.options.intermedCircle),this._arrPolylines[i].circleMarkers[0].unbindTooltip(),this._arrPolylines[i].circleMarkers[0].bindTooltip(this.options.tooltipTextMove+this.options.tooltipTextDelete,{direction:"top",opacity:.7,className:"polyline-measure-popupTooltip"});var o=new t.CircleMarker(e.latlng,this.options.startCircle).addTo(this._layerPaint);o.cntLine=i,o.cntCircle=0,o.on("mousedown",this._dragCircle,this),o.bindTooltip(this.options.tooltipTextMove+this.options.tooltipTextDelete+this.options.tooltipTextResume,{direction:"top",opacity:.7,className:"polyline-measure-popupTooltip"}),this._arrPolylines[i].circleMarkers.unshift(o),this._arrPolylines[i].circleMarkers.map(function(t,e){t.cntCircle=e}),this._arrPolylines[i].circleCoords.unshift(e.latlng);var n=this._polylineArc(e.latlng,currentCircleCoords),s=this._drawArrow(n);this._arrPolylines[i].arrowMarkers.unshift(s),this._arrPolylines[i].arrowMarkers.map(function(t,e){t.cntLine=i,t.cntArrow=e}),n.pop(),this._arrPolylines[i].polylinePath.setLatLngs(n.concat(this._arrPolylines[i].polylinePath.getLatLngs())
8),this._arrPolylines[i].tooltips.unshift(this._tooltipNew),this._map.on("mousemove",this._mouseMove,this)},_dragCircle:function(e){var i=this._arcpoints;if(e.originalEvent.ctrlKey){if(this._map.off("click",this._mouseClick,this),0===e.target.cntCircle){this._resumeFirstpointFlag=!0,this._lineNr=e.target.cntLine;var o=this._lineNr;this._circleNr=e.target.cntCircle,currentCircleCoords=e.latlng,this._arrPolylines[o].circleMarkers[0].setStyle(this.options.currentCircle),this._rubberlinePath2=t.polyline([],{color:this.options.tempLine.color,weight:this.options.tempLine.weight,interactive:!1,dashArray:"8,8"}).addTo(this._layerPaint).bringToBack(),this._tooltipNew=t.marker(currentCircleCoords,{icon:t.divIcon({className:"polyline-measure-tooltip",iconAnchor:[-4,-4]}),interactive:!1}),this._tooltipNew.addTo(this._layerPaint);var n="";!0===this.options.showBearings&&(n=n+this.options.bearingTextIn+":---°<br>"+this.options.bearingTextOut+":---°"),n+='<div class="polyline-measure-tooltip-difference">+0</div>',n+='<div class="polyline-measure-tooltip-total">0</div>',this._tooltipNew._icon.innerHTML=n,this._map.off("mousemove",this._mouseMove,this),this._map.on("mousemove",this._resumeFirstpointMousemove,this)}}else{if(e.originalEvent.shiftKey){this._lineNr=e.target.cntLine,o=this._lineNr,this._circleNr=e.target.cntCircle;var s=this._circleNr;if(this._arrPolylines[o]){if(2===this._arrPolylines[o].circleMarkers.length)return this._layerPaint.removeLayer(this._arrPolylines[o].circleMarkers[1]),this._layerPaint.removeLayer(this._arrPolylines[o].tooltips[1]),this._layerPaint.removeLayer(this._arrPolylines[o].circleMarkers[0]),this._layerPaint.removeLayer(this._arrPolylines[o].tooltips[0]),this._layerPaint.removeLayer(this._arrPolylines[o].arrowMarkers[0]),this._layerPaint.removeLayer(this._arrPolylines[o].polylinePath),this._map.fire("polylinemeasure:remove",e),void this._map.fire("polylinemeasure:change",this._arrPolylines[this._lineNr]);this._arrPolylines[o].circleCoords.splice(s,1),this._arrPolylines[o].circleMarkers[s].removeFrom(this._layerPaint),this._arrPolylines[o].circleMarkers.splice(s,1),this._arrPolylines[o].circleMarkers.map(function(t,e){t.cntCircle=e});var r=this._arrPolylines[o].polylinePath.getLatLngs();if(this._arrPolylines[o].tooltips[s].removeFrom(this._layerPaint),this._arrPolylines[o].tooltips.splice(s,1),!this._arrPolylines[o].circleMarkers.length)return this._arrPolylines.splice(o,1),void this._arrPolylines.forEach(function(t,e){t.circleMarkers.map(function(t){t.cntLine=e}),t.arrowMarkers.map(function(t){t.cntLine=e})});if(0===s)this._arrPolylines[o].circleMarkers[0].setStyle(this.options.startCircle),r.splice(0,i-1),this._arrPolylines[o].circleMarkers[0].bindTooltip(this.options.tooltipTextMove+this.options.tooltipTextDelete+this.options.tooltipTextResume,{direction:"top",opacity:.7,className:"polyline-measure-popupTooltip"}),this._arrPolylines[o].arrowMarkers[s].removeFrom(this._layerPaint),this._arrPolylines[o].arrowMarkers.splice(0,1),n="",!0===this.options.showBearings&&(n=this.options.bearingTextIn+":---°<br>"+this.options.bearingTextOut+":---°"),n+='<div class="polyline-measure-tooltip-difference">+0</div>',n+='<div class="polyline-measure-tooltip-total">0</div>',this._arrPolylines[o].tooltips[0]._icon.innerHTML=n;else if(s===this._arrPolylines[o].circleCoords.length)this._arrPolylines[o].circleMarkers[s-1].on("click",this._resumePolylinePath,this),this._arrPolylines[o].circleMarkers[s-1].bindTooltip(this.options.tooltipTextMove+this.options.tooltipTextDelete+this.options.tooltipTextResume,{direction:"top",opacity:.7,className:"polyline-measure-popupTooltip"}),this._arrPolylines[o].circleMarkers.slice(-1)[0].setStyle(this.options.endCircle),this._arrPolylines[o].tooltips.slice(-1)[0]._icon.classList.add("polyline-measure-tooltip-end"),r.splice(-(i-1),i-1),this._arrPolylines[o].arrowMarkers[s-1].removeFrom(this._layerPaint),this._arrPolylines[o].arrowMarkers.splice(-1,1);else{newLineSegment=this._polylineArc(this._arrPolylines[o].circleCoords[s-1],this._arrPolylines[o].circleCoords[s]),Array.prototype.splice.apply(r,[(s-1)*(i-1),2*i-1].concat(newLineSegment)),this._arrPolylines[o].arrowMarkers[s-1].removeFrom(this._layerPaint),this._arrPolylines[o].arrowMarkers[s].removeFrom(this._layerPaint);var a=this._drawArrow(newLineSegment);this._arrPolylines[o].arrowMarkers.splice(s-1,2,a)}this._arrPolylines[o].polylinePath.setLatLngs(r),this._arrPolylines[o].arrowMarkers.map(function(t,e){t.cntLine=o,t.cntArrow=e});var l=0;this._arrPolylines[o].tooltips.map(function(t,e){if(e>=1){var i=this._arrPolylines[o].circleCoords[e-1].distanceTo(this._arrPolylines[o].circleCoords[e]),n=this._arrPolylines[o].circleCoords[e-1],s=this._arrPolylines[o].circleCoords[e];l+=i,this._arrPolylines[o].distance=l;var r=this._arrPolylines[o].tooltips[e-1];this._updateTooltip(t,r,l,i,n,s)}}.bind(this))}else{if(this._cntCircle--,1===this._currentLine.circleMarkers.length)return void this._currentLine.finalize();this._currentLine.circleCoords.splice(s,1),this._currentLine.circleMarkers[s].removeFrom(this._layerPaint),this._currentLine.circleMarkers.splice(s,1),this._currentLine.circleMarkers.map(function(t,e){t.cntCircle=e}),r=this._currentLine.polylinePath.getLatLngs(),this._currentLine.tooltips[s].removeFrom(this._layerPaint),this._currentLine.tooltips.splice(s,1),0===s?(1===this._currentLine.circleMarkers.length?this._currentLine.circleMarkers[0].setStyle(this.options.currentCircle):this._currentLine.circleMarkers[0].setStyle(this.options.startCircle),r.splice(0,i-1),this._currentLine.circleMarkers[0].bindTooltip(this.options.tooltipTextMove+this.options.tooltipTextDelete+this.options.tooltipTextResume,{direction:"top",opacity:.7,className:"polyline-measure-popupTooltip"}),this._currentLine.arrowMarkers[s].removeFrom(this._layerPaint),this._currentLine.arrowMarkers.splice(0,1),n="",!0===this.options.showBearings&&(n=this.options.bearingTextIn+":---°<br>
vendor: 5,103 bytes, lines 8-13
8"+this.options.bearingTextOut+":---°"),n+='<div class="polyline-measure-tooltip-difference">+0</div>',n+='<div class="polyline-measure-tooltip-total">0</div>',this._currentLine.tooltips[0]._icon.innerHTML=n):s===this._currentLine.circleCoords.length?(this._currentLine.circleMarkers[s-1].on("click",this._resumePolylinePath,this),this._currentLine.circleMarkers[s-1].bindTooltip(this.options.tooltipTextMove+this.options.tooltipTextDelete+this.options.tooltipTextResume,{direction:"top",opacity:.7,className:"polyline-measure-popupTooltip"}),this._currentLine.circleMarkers.slice(-1)[0].setStyle(this.options.currentCircle),this._currentLine.tooltips.slice(-1)[0]._icon.classList.add("polyline-measure-tooltip-end"),r.splice(-(i-1),i-1),this._currentLine.arrowMarkers[s-1].removeFrom(this._layerPaint),this._currentLine.arrowMarkers.splice(-1,1)):(newLineSegment=this._polylineArc(this._currentLine.circleCoords[s-1],this._currentLine.circleCoords[s]),Array.prototype.splice.apply(r,[(s-1)*(i-1),2*i-1].concat(newLineSegment)),this._currentLine.arrowMarkers[s-1].removeFrom(this._layerPaint),this._currentLine.arrowMarkers[s].removeFrom(this._layerPaint),a=this._drawArrow(newLineSegment),this._currentLine.arrowMarkers.splice(s-1,2,a)),this._currentLine.polylinePath.setLatLngs(r),this._currentLine.arrowMarkers.map(function(t,e){t.cntLine=o,t.cntArrow=e});var h=0;this._currentLine.tooltips.map(function(t,i,o){if(i>=1){var n,s,r=this._currentLine.tooltips[i-1],a=this._currentLine.circleCoords[i-1];i===o.length-1?(n=this._currentLine.circleCoords[i-1].distanceTo(e.latlng),s=e.latlng,this._updateTooltip(t,r,h+n,n,a,s)):(n=this._currentLine.circleCoords[i-1].distanceTo(this._currentLine.circleCoords[i]),s=this._currentLine.circleCoords[i],h+=n,this._updateTooltip(t,r,h,n,a,s))}}.bind(this)),this._currentLine.distance=h}return this._map.fire("polylinemeasure:remove",e),void this._map.fire("polylinemeasure:change",this._arrPolylines[this._lineNr])}this._e1=e,this._measuring&&0===this._cntCircle&&(this._map.dragging.disable(),this._map.off("mousemove",this._mouseMove,this),this._map.off("click",this._mouseClick,this),this._mouseStartingLat=e.latlng.lat,this._mouseStartingLng=e.latlng.lng,this._circleStartingLat=e.target._latlng.lat,this._circleStartingLng=e.target._latlng.lng,this._map.on("mousemove",this._dragCircleMousemove,this))}},seed:function(e){e.forEach(e=>{this._toggleMeasure(),this._startLine(e[0]),e.forEach((i,o)=>{const n=t.latLng(i);this._mouseMove({latLng:n}),this._currentLine.addPoint(n),o===e.length-1&&(this._finishPolylinePath(),this._toggleMeasure())})})}}),t.Map.mergeOptions({PolylineMeasureControl:!1}),t.Map.addInitHook(function(){this.options.polylineMeasureControl&&(this.PMControl=new t.Control.PolylineMeasure,this.addControl(this.PMControl))}),t.control.polylineMeasure=function(e){return new t.Control.PolylineMeasure(e)},t.Control.PolylineMeasure})?o.apply(e,n):o)||(t.exports=s)},481:function(t,e){
9/* @preserve
10 * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
11 * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
12 */
13!function(t){"use strict";var e="1.9.4";function i(t){var e,i,o,n;for(i=1,o=arguments.length;i<o;i++)for(e in n=arguments[i])t[e]=n[e];return t}var o=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function n(t,e){var i=Array.prototype.slice;if(t.bind)return t.bind.apply(t,i.call(arguments,1));var o=i.call(arguments,2);return function(){return t.apply(e,o.length?o.concat(i.call(arguments)):arguments)}}var s=0;function r(t){return"_leaflet_id"in t||(t._leaflet_id=++s),t._leaflet_id}function a(t,e,i){var o,n,s,r;return r=function(){o=!1,n&&(s.apply(i,n),n=!1)},s=function(){o?n=arguments:(t.apply(i,arguments),setTimeout(r,e),o=!0)},s}function l(t,e,i){var o=e[1],n=e[0],s=o-n;return t===o&&i?t:((t-n)%s+s)%s+n}function h(){return!1}function c(t,e){if(!1===e)return t;var i=Math.pow(10,void 0===e?6:e);return Math.round(t*i)/i}function u(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function p(t){return u(t).split(/\s+/)}function d(t,e){for(var i in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?o(t.options):{}),e)t.options[i]=e[i];return t.options}function m(t,e,i){var o=[];for(var n in t)o.push(encodeURIComponent(i?n.toUpperCase():n)+"="+encodeURIComponent(t[n]));return(e&&-1!==e.indexOf("?")?"&":"?")+o.join("&")}var f=/\{ *([\w_ -]+) *\}/g;function g(t,e){return t.replace(f,function(t,i){var o=e[i];if(void 0===o)throw new Error("No value provided for variable "+t);return"function"==typeof o&&(o=o(e)),o})}var _=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function y(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1}var v="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function b(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var x=0;function w(t){var e=+new Date,i=Math.max(0,16-(e-x));return x=e+i,window.setTimeout(t,i)}var k=window.requestAnimationFrame||b("RequestAnimationFrame")||w,M=window.cancelAnimationFrame||b("C
13ancelAnimationFrame")||b("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function C(t,e,i){if(!i||k!==w)return k.call(window,n(t,e));t.call(e)}function T(t){t&&M.call(window,t)}var P={__proto__:null,extend:i,create:o,bind:n,get lastId(){return s},stamp:r,throttle:a,wrapNum:l,falseFn:h,formatNum:c,trim:u,splitWords:p,setOptions:d,getParamString:m,template:g,isArray:_,indexOf:y,emptyImageUrl:v,requestFn:k,cancelFn:M,requestAnimFrame:C,cancelAnimFrame:T};function S(){}function A(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(){d(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},n=e.__super__=this.prototype,s=o(n);for(var r in s.constructor=e,e.prototype=s,this)Object.prototype.hasOwnProperty.call(this,r)&&"prototype"!==r&&"__super__"!==r&&(e[r]=this[r]);return t.statics&&i(e,t.statics),t.includes&&(A(t.includes),i.apply(null,[s].concat(t.includes))),i(s,t),delete s.statics,delete s.includes,s.options&&(s.options=n.options?o(n.options):{},i(s.options,t.options)),s._initHooks=[],s.callInitHooks=function(){if(!this._initHooksCalled){n.callInitHooks&&n.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=s._initHooks.length;t<e;t++)s._initHooks[t].call(this)}},e},S.include=function(t){var e=this.prototype.options;return i(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this},S.mergeOptions=function(t){return i(this.prototype.options,t),this},S.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};var O={on:function(t,e,i){if("object"==typeof t)for(var o in t)this._on(o,t[o],e);else for(var n=0,s=(t=p(t)).length;n<s;n++)this._on(t[n],e,i);return this},off:function(t,e,i){if(arguments.length)if("object"==typeof t)for(var o in t)this._off(o,t[o],e);else{t=p(t);for(var n=1===arguments.length,s=0,r=t.length;s<r;s++)n?this._off(t[s]):this._off(t[s],e,i)}else delete this._events;return this},_on:function(t,e,i,o){if("function"==typeof e){if(!1===this._listens(t,e,i)){i===this&&(i=void 0);var n={fn:e,ctx:i};o&&(n.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(n)}}else console.warn("wrong listener type: "+typeof e)},_off:function(t,e,i){var o,n,s;if(this._events&&(o=this._events[t]))if(1!==arguments.length)if("function"==typeof e){var r=this._listens(t,e,i);if(!1!==r){var a=o[r];this._firingCount&&(a.fn=h,this._events[t]=o=o.slice()),o.splice(r,1)}}else console.warn("wrong listener type: "+typeof e);else{if(this._firingCount)for(n=0,s=o.length;n<s;n++)o[n].fn=h;delete this._events[t]}},fire:function(t,e,o){if(!this.listens(t,o))return this;var n=i({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var s=this._events[t];if(s){this._firingCount=this._firingCount+1||1;for(var r=0,a=s.length;r<a;r++){var l=s[r],h=l.fn;l.once&&this.off(t,h,l.ctx),h.call(l.ctx||this,n)}this._firingCount--}}return o&&this._propagateEvent(n),this},listens:function(t,e,i,o){"string"!=typeof t&&console.warn('"string" type argument expected');var n=e;"function"!=typeof e&&(o=!!e,n=void 0,i=void 0);var s=this._events&&this._events[t];if(s&&s.length&&!1!==this._listens(t,n,i))return!0;if(o)for(var r in this._eventParents)if(this._eventParents[r].listens(t,e,i,o))return!0;return!1},_listens:function(t,e,i){if(!this._events)return!1;var o=this._events[t]||[];if(!e)return!!o.length;i===this&&(i=void 0);for(var n=0,s=o.length;n<s;n++)if(o[n].fn===e&&o[n].ctx===i)return n;return!1},once:function(t,e,i){if("object"==typeof t)for(var o in t)this._on(o,t[o],e,!0);else for(var n=0,s=(t=p(t)).length;n<s;n++)this._on(t[n],e,i,!0);return this},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[r(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[r(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,i({layer:t.target,propagatedFrom:t.target},t),!0)}};O.addEventListener=O.on,O.removeEventListener=O.clearAllEventListeners=O.off,O.addOneTimeEventListener=O.once,O.fireEvent=O.fire,O.hasEventListeners=O.listens;var E=S.extend(O);function D(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e}var I=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function z(t,e,i){return t instanceof D?t:_(t)?new D(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new D(t.x,t.y):new D(t,e,i)}function B(t,e){if(t)for(var i=e?[t,e]:t,o=0,n=i.length;o<n;o++)this.extend(i[o])}function F(t,e){return!t||t instanceof B?t:new B(t,e)}function R(t,e){if(t)for(var i=e?[t,e]:t,o=0,n=i.length;o<n;o++)this.extend(i[o])}function Z(t,e){return t instanceof R?t:new R(t,e)}function U(t,e,i){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==i&&(this.alt=+i)}function N(t,e,i){return t instanceof U?t:_(t)&&"object"!=typeof t[0]?3===t.length?new U(t[0],t[1],t[2]):2===t.length?new U(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new U(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new U(t,e,i)}D.prototype={clone:function(){return new D(this.x,this.y)},add:function(t){return this.clone()._add(z(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(z(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 D(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new D(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=I(this.x),this.y=I(this.y),this},distanceTo:function(t){var e=(t=z(t)).x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return(t=z(t)).x===this.x&&t.y===this.y},contains:function(t){return t=z(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)+")"}},B.prototype={extend:function(t){var e,i;if(!t)return this;if(t instanceof D||"number"==typeof t[0]||"x"in t)e=i=z(t);else if(e=(t=F(t)).min,i=t.max,!e||!i)return this;return this.min||this.max?(this.min.x=Math.min(e.x,this.min.x),this.max.x=Math.max(i.x,this.max.x),this.min.y=Math.min(e.y,this.min.y),this.max.y=Math.max(i.y,this.max.y)):(this.min=e.clone(),this.max=i.
vendor: 2,346 bytes, line 13
13clone()),this},getCenter:function(t){return z((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return z(this.min.x,this.max.y)},getTopRight:function(){return z(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,i;return(t="number"==typeof t[0]||t instanceof D?z(t):F(t))instanceof B?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=F(t);var e=this.min,i=this.max,o=t.min,n=t.max,s=n.x>=e.x&&o.x<=i.x,r=n.y>=e.y&&o.y<=i.y;return s&&r},overlaps:function(t){t=F(t);var e=this.min,i=this.max,o=t.min,n=t.max,s=n.x>e.x&&o.x<i.x,r=n.y>e.y&&o.y<i.y;return s&&r},isValid:function(){return!(!this.min||!this.max)},pad:function(t){var e=this.min,i=this.max,o=Math.abs(e.x-i.x)*t,n=Math.abs(e.y-i.y)*t;return F(z(e.x-o,e.y-n),z(i.x+o,i.y+n))},equals:function(t){return!!t&&(t=F(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight()))}},R.prototype={extend:function(t){var e,i,o=this._southWest,n=this._northEast;if(t instanceof U)e=t,i=t;else{if(!(t instanceof R))return t?this.extend(N(t)||Z(t)):this;if(e=t._southWest,i=t._northEast,!e||!i)return this}return o||n?(o.lat=Math.min(e.lat,o.lat),o.lng=Math.min(e.lng,o.lng),n.lat=Math.max(i.lat,n.lat),n.lng=Math.max(i.lng,n.lng)):(this._southWest=new U(e.lat,e.lng),this._northEast=new U(i.lat,i.lng)),this},pad:function(t){var e=this._southWest,i=this._northEast,o=Math.abs(e.lat-i.lat)*t,n=Math.abs(e.lng-i.lng)*t;return new R(new U(e.lat-o,e.lng-n),new U(i.lat+o,i.lng+n))},getCenter:function(){return new U((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 U(this.getNorth(),this.getWest())},getSouthEast:function(){return new U(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 U||"lat"in t?N(t):Z(t);var e,i,o=this._southWest,n=this._northEast;
vendor: 2,213 bytes, line 13
13return t instanceof R?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=o.lat&&i.lat<=n.lat&&e.lng>=o.lng&&i.lng<=n.lng},intersects:function(t){t=Z(t);var e=this._southWest,i=this._northEast,o=t.getSouthWest(),n=t.getNorthEast(),s=n.lat>=e.lat&&o.lat<=i.lat,r=n.lng>=e.lng&&o.lng<=i.lng;return s&&r},overlaps:function(t){t=Z(t);var e=this._southWest,i=this._northEast,o=t.getSouthWest(),n=t.getNorthEast(),s=n.lat>e.lat&&o.lat<i.lat,r=n.lng>e.lng&&o.lng<i.lng;return s&&r},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=Z(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},U.prototype={equals:function(t,e){return!!t&&(t=N(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 G.distance(this,N(t))},wrap:function(){return G.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,i=e/Math.cos(Math.PI/180*this.lat);return Z([this.lat-e,this.lng-i],[this.lat+e,this.lng+i])},clone:function(){return new U(this.lat,this.lng,this.alt)}};var j,H={latLngToPoint:function(t,e){var i=this.projection.project(t),o=this.scale(e);return this.transformation._transform(i,o)},pointToLatLng:function(t,e){var i=this.scale(e),o=this.transformation.untransform(t,i);return this.projection.unproject(o)},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,i=this.scale(t);return new B(this.transformation.transform(e.min,i),this.transformation.transform(e.max,i))},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?l(t.lng,this.wrapLng,!0):t.lng;return new U(this.wrapLat?l(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),i=this.wrapLatLng(e),o=e.lat-i.lat,n=e.lng-i.lng;if(0===o&&0===n)return t;
vendor: 8,736 bytes, line 13
13var s=t.getSouthWest(),r=t.getNorthEast();return new R(new U(s.lat-o,s.lng-n),new U(r.lat-o,r.lng-n))}},G=i({},H,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var i=Math.PI/180,o=t.lat*i,n=e.lat*i,s=Math.sin((e.lat-t.lat)*i/2),r=Math.sin((e.lng-t.lng)*i/2),a=s*s+Math.cos(o)*Math.cos(n)*r*r,l=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*l}}),V=6378137,W={R:V,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,i=this.MAX_LATITUDE,o=Math.max(Math.min(i,t.lat),-i),n=Math.sin(o*e);return new D(this.R*t.lng*e,this.R*Math.log((1+n)/(1-n))/2)},unproject:function(t){var e=180/Math.PI;return new U((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(j=V*Math.PI,new B([-j,-j],[j,j]))};function q(t,e,i,o){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=i,this._d=o}function $(t,e,i,o){return new q(t,e,i,o)}q.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 D((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var K=i({},G,{code:"EPSG:3857",projection:W,transformation:function(){var t=.5/(Math.PI*W.R);return $(t,.5,-t,.5)}()}),J=i({},K,{code:"EPSG:900913"});function Y(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function X(t,e){var i,o,n,s,r,a,l="";for(i=0,n=t.length;i<n;i++){for(o=0,s=(r=t[i]).length;o<s;o++)l+=(o?"L":"M")+(a=r[o]).x+" "+a.y;l+=e?Rt.svg?"z":"x":""}return l||"M0 0"}var Q,tt=document.documentElement.style,et="ActiveXObject"in window,it=et&&!document.addEventListener,ot="msLaunchUri"in navigator&&!("documentMode"in document),nt=Ft("webkit"),st=Ft("android"),rt=Ft("android 2")||Ft("android 3"),at=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),lt=st&&Ft("Google")&&at<537&&!("AudioNode"in window),ht=!!window.opera,ct=!ot&&Ft("chrome"),ut=Ft("gecko")&&!nt&&!ht&&!et,pt=!ct&&Ft("safari"),dt=Ft("phantom"),mt="OTransition"in tt,ft=0===navigator.platform.indexOf("Win"),gt=et&&"transition"in tt,_t="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!rt,yt="MozPerspective"in tt,vt=!window.L_DISABLE_3D&&(gt||_t||yt)&&!mt&&!dt,bt="undefined"!=typeof orientation||Ft("mobile"),xt=bt&&nt,Lt=bt&&_t,wt=!window.PointerEvent&&window.MSPointerEvent,kt=!(!window.PointerEvent&&!wt),Mt="ontouchstart"in window||!!window.TouchEvent,Ct=!window.L_NO_TOUCH&&(Mt||kt),Tt=bt&&ht,Pt=bt&&ut,St=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,At=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",h,e),window.removeEventListener("testPassiveEventSupport",h,e)}catch(t){}return t}(),Ot=!!document.createElement("canvas").getContext,Et=!(!document.createElementNS||!Y("svg").createSVGRect),Dt=!!Et&&((Q=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===(Q.firstChild&&Q.firstChild.namespaceURI)),It=!Et&&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}}(),zt=0===navigator.platform.indexOf("Mac"),Bt=0===navigator.platform.indexOf("Linux");function Ft(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Rt={ie:et,ielt9:it,edge:ot,webkit:nt,android:st,android23:rt,androidStock:lt,opera:ht,chrome:ct,gecko:ut,safari:pt,phantom:dt,opera12:mt,win:ft,ie3d:gt,webkit3d:_t,gecko3d:yt,any3d:vt,mobile:bt,mobileWebkit:xt,mobileWebkit3d:Lt,msPointer:wt,pointer:kt,touch:Ct,touchNative:Mt,mobileOpera:Tt,mobileGecko:Pt,retina:St,passiveEvents:At,canvas:Ot,svg:Et,vml:It,inlineSvg:Dt,mac:zt,linux:Bt},Zt=Rt.msPointer?"MSPointerDown":"pointerdown",Ut=Rt.msPointer?"MSPointerMove":"pointermove",Nt=Rt.msPointer?"MSPointerUp":"pointerup",jt=Rt.msPointer?"MSPointerCancel":"pointercancel",Ht={touchstart:Zt,touchmove:Ut,touchend:Nt,touchcancel:jt},Gt={touchstart:te,touchmove:Qt,touchend:Qt,touchcancel:Qt},Vt={},Wt=!1;function qt(t,e,i){return"touchstart"===e&&Xt(),Gt[e]?(i=Gt[e].bind(this,i),t.addEventListener(Ht[e],i,!1),i):(console.warn("wrong event specified:",e),h)}function $t(t,e,i){Ht[e]?t.removeEventListener(Ht[e],i,!1):console.warn("wrong event specified:",e)}function Kt(t){Vt[t.pointerId]=t}function Jt(t){Vt[t.pointerId]&&(Vt[t.pointerId]=t)}function Yt(t){delete Vt[t.pointerId]}function Xt(){Wt||(document.addEventListener(Zt,Kt,!0),document.addEventListener(Ut,Jt,!0),document.addEventListener(Nt,Yt,!0),document.addEventListener(jt,Yt,!0),Wt=!0)}function Qt(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var i in e.touches=[],Vt)e.touches.push(Vt[i]);e.changedTouches=[e],t(e)}}function te(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&Ke(e),Qt(t,e)}function ee(t){var e,i,o={};for(i in t)e=t[i],o[i]=e&&e.bind?e.bind(t):e;return t=o,o.type="dblclick",o.detail=2,o.isTrusted=!1,o._simulated=!0,o}var ie=200;function oe(t,e){t.addEventListener("dblclick",e);var i,o=0;function n(t){if(1===t.detail){if("mouse"!==t.pointerType&&(!t.sourceCapabilities||t.sourceCapabilities.firesTouchEvents)){var n=Ye(t);if(!n.some(function(t){return t instanceof HTMLLabelElement&&t.attributes.for})||n.some(function(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement})){var s=Date.now();s-o<=ie?2===++i&&e(ee(t)):i=1,o=s}}}else i=t.detail}return t.addEventListener("click",n),{dblclick:e,simDblclick:n}}function ne(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}var se,re,ae,le,he,ce=Te(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ue=Te(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),pe="webkitTransition"===ue||"OTransition"===ue?ue+"End":"transitionend";function de(t){return"string"==typeof t?document.getElementById(t):t}function me(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||"auto"===i)&&document.defaultView){var o=document.defaultView.getComputedStyle(t,null);i=o?o[e]:null}return"auto"===i?null:i}function fe(t,e,i){var o=document.createElement(t);return o.className=e||"",i&&i.appendChild(o),o}function ge(t){var e=t.parentNode;e&&e.removeChild(t)}function _e(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function ye(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function ve(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function be(t,e){if(void 0!==t.classList)return t.classList.contains(e);var i=ke(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function xe(t,e){if(void 0!==t.classList)for(var i=p(e),o=0,n=i.length;o<n;o++)t.classList.add(i[o]);else if(!be(t,e)){var s=ke(t);we(t,(s?s+" ":"")+e)}}function Le(t,e){void 0!==t.classList?t.classList.remove(e):we(t,u((" "+ke(t)+" ").replace(" "+e+" "," ")))}function we(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function ke(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function Me(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&Ce(t,e)}function Ce(t,e){var i=!1,o="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(o)}catch(t){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+o+"(opacity="+e+")"}function Te(t){for(var e=document.documentElement.style,i=0;i<t.length;i++)if(t[i]in e)return t[i];return!1}function Pe(t,e,i){var o=e||new D(0,0);t.style[ce]=(Rt.ie3d?"translate("+o.x+"px,"+o.y+"px)":"translate3d("+o.x+"px,"+o.y+"px,0)")+(i?" scale("+i+")":"")}function Se(t,e){t._leaflet_pos=e,Rt.any3d?Pe(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function Ae(t){return t._leaflet_pos||new D(0,0)}if("onselectstart"in document)se=function(){Ze(window,"selectstart",Ke)},re=function(){Ne(window,"selectstart",Ke)};else{var Oe=Te(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);se=function(){if(Oe){var t=document.documentElement.style;ae=t[Oe],t[Oe]="none"}},re=function(){Oe&&(document.documentElement.style[Oe]=ae,ae=void 0)}}function Ee(){Ze(window,"dragstart",Ke)}function De(){Ne(window,"dragstart",Ke)}function Ie(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(ze(),le=t,he=t.style.outlineStyle,t.style.outlineStyle="none",Ze(window,"keydown",ze))}function ze(){le&&(le.style.outlineStyle=he,le=void 0,he=void 0,Ne(window,"keydown",ze))}function Be(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function Fe(t){var e=t.getBoundingClientRect();
vendor: 1,064 bytes, line 13
13return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Re={__proto__:null,TRANSFORM:ce,TRANSITION:ue,TRANSITION_END:pe,get:de,getStyle:me,create:fe,remove:ge,empty:_e,toFront:ye,toBack:ve,hasClass:be,addClass:xe,removeClass:Le,setClass:we,getClass:ke,setOpacity:Me,testProp:Te,setTransform:Pe,setPosition:Se,getPosition:Ae,get disableTextSelection(){return se},get enableTextSelection(){return re},disableImageDrag:Ee,enableImageDrag:De,preventOutline:Ie,restoreOutline:ze,getSizedParentNode:Be,getScale:Fe};function Ze(t,e,i,o){if(e&&"object"==typeof e)for(var n in e)Ge(t,n,e[n],i);else for(var s=0,r=(e=p(e)).length;s<r;s++)Ge(t,e[s],i,o);return this}var Ue="_leaflet_events";function Ne(t,e,i,o){if(1===arguments.length)je(t),delete t[Ue];else if(e&&"object"==typeof e)for(var n in e)Ve(t,n,e[n],i);else if(e=p(e),2===arguments.length)je(t,function(t){return-1!==y(e,t)});else for(var s=0,r=e.length;s<r;s++)Ve(t,e[s],i,o);return this}function je(t,e){for(var i in t[Ue]){var o=i.split(/\d/)[0];e&&!e(o)||Ve(t,o,null,null,i)}}
vendor: 123,043 bytes, line 13
13var He={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Ge(t,e,i,o){var n=e+r(i)+(o?"_"+r(o):"");if(t[Ue]&&t[Ue][n])return this;var s=function(e){return i.call(o||t,e||window.event)},a=s;!Rt.touchNative&&Rt.pointer&&0===e.indexOf("touch")?s=qt(t,e,s):Rt.touch&&"dblclick"===e?s=oe(t,s):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(He[e]||e,s,!!Rt.passiveEvents&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?(s=function(e){e=e||window.event,ei(t,e)&&a(e)},t.addEventListener(He[e],s,!1)):t.addEventListener(e,a,!1):t.attachEvent("on"+e,s),t[Ue]=t[Ue]||{},t[Ue][n]=s}function Ve(t,e,i,o,n){n=n||e+r(i)+(o?"_"+r(o):"");var s=t[Ue]&&t[Ue][n];if(!s)return this;!Rt.touchNative&&Rt.pointer&&0===e.indexOf("touch")?$t(t,e,s):Rt.touch&&"dblclick"===e?ne(t,s):"removeEventListener"in t?t.removeEventListener(He[e]||e,s,!1):t.detachEvent("on"+e,s),t[Ue][n]=null}function We(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function qe(t){return Ge(t,"wheel",We),this}function $e(t){return Ze(t,"mousedown touchstart dblclick contextmenu",We),t._leaflet_disable_click=!0,this}function Ke(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Je(t){return Ke(t),We(t),this}function Ye(t){if(t.composedPath)return t.composedPath();for(var e=[],i=t.target;i;)e.push(i),i=i.parentNode;return e}function Xe(t,e){if(!e)return new D(t.clientX,t.clientY);var i=Fe(e),o=i.boundingClientRect;return new D((t.clientX-o.left)/i.x-e.clientLeft,(t.clientY-o.top)/i.y-e.clientTop)}var Qe=Rt.linux&&Rt.chrome?window.devicePixelRatio:Rt.mac?3*window.devicePixelRatio:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function ti(t){return Rt.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Qe:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function ei(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(t){return!1}return i!==t}var ii={__proto__:null,on:Ze,off:Ne,stopPropagation:We,disableScrollPropagation:qe,disableClickPropagation:$e,preventDefault:Ke,stop:Je,getPropagationPath:Ye,getMousePosition:Xe,getWheelDelta:ti,isExternalTarget:ei,addListener:Ze,removeListener:Ne},oi=E.extend({run:function(t,e,i,o){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(o||.5,.2),this._startPos=Ae(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=C(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=1e3*this._duration;e<i?this._runFrame(this._easeOut(e/i),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var i=this._startPos.add(this._offset.multiplyBy(t));e&&i._round(),Se(this._el,i),this.fire("step")},_complete:function(){T(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),ni=E.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=d(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=n(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(N(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=ue&&Rt.any3d&&!Rt.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Ze(this._proxy,pe,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,o){return e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(N(t),e,this.options.maxBounds),o=o||{},this._stop(),this._loaded&&!o.reset&&!0!==o&&(void 0!==o.animate&&(o.zoom=i({animate:o.animate},o.zoom),o.pan=i({animate:o.animate,duration:o.duration},o.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,o.zoom):this._tryAnimatedPan(t,o.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,e,o.pan&&o.pan.noMoveStart),this)},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(Rt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(Rt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,i){var o=this.getZoomScale(e),n=this.getSize().divideBy(2),s=(t instanceof D?t:this.latLngToContainerPoint(t)).subtract(n).multiplyBy(1-1/o),r=this.containerPointToLatLng(n.add(s));return this.setView(r,e,{zoom:i})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():Z(t);var i=z(e.paddingTopLeft||e.padding||[0,0]),o=z(e.paddingBottomRight||e.padding||[0,0]),n=this.getBoundsZoom(t,!1,i.add(o));if((n="number"==typeof e.maxZoom?Math.min(e.maxZoom,n):n)===1/0)return{center:t.getCenter(),zoom:n};var s=o.subtract(i).divideBy(2),r=this.project(t.getSouthWest(),n),a=this.project(t.getNorthEast(),n);return{center:this.unproject(r.add(a).divideBy(2).add(s),n),zoom:n}},fitBounds:function(t,e){if(!(t=Z(t)).isValid())throw new Error("Bounds are not valid.");var i=this._getBoundsCenterZoom(t,e);return this.setView(i.center,i.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=z(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 oi,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){xe(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,i){if(!1===(i=i||{}).animate||!Rt.any3d)return this.setView(t,e,i);this._stop();var o=this.project(this.getCenter()),n=this.project(t),s=this.getSize(),r=this._zoom;t=N(t),e=void 0===e?r:e;var a=Math.max(s.x,s.y),l=a*this.getZoomScale(r,e),h=n.distanceTo(o)||1,c=1.42,u=c*c;function p(t){var e=(l*l-a*a+(t?-1:1)*u*u*h*h)/(2*(t?l:a)*u*h),i=Math.sqrt(e*e+1)-e;return i<1e-9?-18:Math.log(i)}function d(t){return(Math.exp(t)-Math.exp(-t))/2}function m(t){return(Math.exp(t)+Math.exp(-t))/2}function f(t){return d(t)/m(t)}var g=p(0);function _(t){return a*(m(g)/m(g+c*t))}function y(t){return a*(m(g)*f(g+c*t)-d(g))/u}function v(t){return 1-Math.pow(1-t,1.5)}var b=Date.now(),x=(p(1)-g)/c,L=i.duration?1e3*i.duration:1e3*x*.8;function w(){var i=(Date.now()-b)/L,s=v(i)*x;i<=1?(this._flyToFrame=C(w,this),this._move(this.unproject(o.add(n.subtract(o).multiplyBy(y(s)/h)),r),this.getScaleZoom(a/_(s),r),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}return this._moveStart(!0,i.noMoveStart),w.call(this),this},flyToBounds:function(t,e){var i=this._getBoundsCenterZoom(t,e);return this.flyTo(i.center,i.zoom,e)},setMaxBounds:function(t){return t=Z(t),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),t.isValid()?(this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),o=this._limitCenter(i,this._zoom,Z(t));return i.equals(o)||this.panTo(o,e),this._enforcingBounds=!1,this},panInside:function(t,e){var i=z((e=e||{}).paddingTopLeft||e.padding||[0,0]),o=z(e.paddingBottomRight||e.padding||[0,0]),n=this.project(this.getCenter()),s=this.project(t),r=this.getPixelBounds(),a=F([r.min.add(i),r.max.subtract(o)]),l=a.getSize();if(!a.contains(s)){this._enforcingBounds=!0;var h=s.subtract(a.getCenter()),c=a.extend(s).getSize().subtract(l);n.x+=h.x<0?-c.x:c.x,n.y+=h.y<0?-c.y:c.y,this.panTo(this.unproject(n),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=i({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var o=this.getSize(),s=e.divideBy(2).round(),r=o.divideBy(2).round(),a=s.subtract(r);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(n(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:o})):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=i({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=n(this._handleGeolocationResponse,this),o=n(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,o,t):navigator.geolocation.getCurrentPosition(e,o,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var e=t.code,i=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: "+i+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=new U(t.coords.latitude,t.coords.longitude),i=e.toBounds(2*t.coords.accuracy),o=this._locateOptions;if(o.setView){var n=this.getBoundsZoom(i);this.setView(e,o.maxZoom?Math.min(n,o.maxZoom):n)}var s={latlng:e,bounds:i,timestamp:t.timestamp};for(var r in t.coords)"number"==typeof t.coords[r]&&(s[r]=t.coords[r]);this.fire("locationfound",s)}},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ge(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(T(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)ge(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var i=fe("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=i),i},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new R(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,i){t=Z(t),i=z(i||[0,0]);var o=this.getZoom()||0,n=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),a=t.getSouthEast(),l=this.getSize().subtract(i),h=F(this.project(a,o),this.project(r,o)).getSize(),c=Rt.any3d?this.options.zoomSnap:1,u=l.x/h.x,p=l.y/h.y,d=e?Math.max(u,p):Math.min(u,p);return o=this.getScaleZoom(d,o),c&&(o=Math.round(o/(c/100))*(c/100),o=e?Math.ceil(o/c)*c:Math.floor(o/c)*c),Math.max(n,Math.min(s,o))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new D(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new B(i,i.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 i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=void 0===e?this._zoom:e;var o=i.zoom(t*i.scale(e));return isNaN(o)?1/0:o},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(N(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(z(t),e)},layerPointToLatLng:function(t){var e=z(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(N(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(N(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(Z(t))},distance:function(t,e){return this.options.crs.distance(N(t),N(e))},containerPointToLayerPoint:function(t){return z(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return z(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(z(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(N(t)))},mouseEventToContainerPoint:function(t){return Xe(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=de(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");Ze(e,"scroll",this._onScroll,this),this._containerId=r(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&Rt.any3d,xe(t,"leaflet-container"+(Rt.touch?" leaflet-touch":"")+(Rt.retina?" leaflet-retina":"")+(Rt.ielt9?" leaflet-oldie":"")+(Rt.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=me(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&"sticky"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Se(this._mapPane,new D(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(xe(t.markerPane,"leaflet-zoom-hide"),xe(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,i){Se(this._mapPane,new D(0,0));var o=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var n=this._zoom!==e;this._moveStart(n,i)._move(t,e)._moveEnd(n),this.fire("viewreset"),o&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i,o){void 0===e&&(e=this._zoom);var n=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),o?i&&i.pinch&&this.fire("zoom",i):((n||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return T(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Se(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[r(this._container)]=this;var e=t?Ne:Ze;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),Rt.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){T(this._resizeRequest),this._resizeRequest=C(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 i,o=[],n="mouseout"===e||"mouseover"===e,s=t.target||t.srcElement,a=!1;s;){if((i=this._targets[r(s)])&&("click"===e||"preclick"===e)&&this._draggableMoved(i)){a=!0;break}if(i&&i.listens(e,!0)){if(n&&!ei(s,t))break;if(o.push(i),n)break}if(s===this._container)break;s=s.parentNode}return o.length||a||n||!this.listens(e,!0)||(o=[this]),o},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(e))){var i=t.type;"mousedown"===i&&Ie(e),this._fireDOMEvent(t,i)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,o){if("click"===t.type){var n=i({},t);n.type="preclick",this._fireDOMEvent(n,n.type,o)}var s=this._findEventTargets(t,e);if(o){for(var r=[],a=0;a<o.length;a++)o[a].listens(e,!0)&&r.push(o[a]);s=r.concat(s)}if(s.length){"contextmenu"===e&&Ke(t);var l=s[0],h={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var c=l.getLatLng&&(!l._radius||l._radius<=10);h.containerPoint=c?this.latLngToContainerPoint(l.getLatLng()):this.mouseEventToContainerPoint(t),h.layerPoint=this.containerPointToLayerPoint(h.containerPoint),h.latlng=c?l.getLatLng():this.layerPointToLatLng(h.layerPoint)}for(a=0;a<s.length;a++)if(s[a].fire(e,h,!0),h.originalEvent._stopped||!1===s[a].options.bubblingMouseEvents&&-1!==y(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 Ae(this._mapPane)||new D(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 i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,i){var o=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(o)},_latLngBoundsToNewLayerBounds:function(t,e,i){var o=this._getNewPixelOrigin(i,e);return F([this.project(t.getSouthWest(),e)._subtract(o),this.project(t.getNorthWest(),e)._subtract(o),this.project(t.getSouthEast(),e)._subtract(o),this.project(t.getNorthEast(),e)._subtract(o)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var o=this.project(t,e),n=this.getSize().divideBy(2),s=new B(o.subtract(n),o.add(n)),r=this._getBoundsOffset(s,i,e);return Math.abs(r.x)<=1&&Math.abs(r.y)<=1?t:this.unproject(o.add(r),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),o=new B(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(o,e))},_getBoundsOffset:function(t,e,i){var o=F(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i)),n=o.min.subtract(t.min),s=o.max.subtract(t.max);return new D(this._rebound(n.x,-s.x),this._rebound(n.y,-s.y))},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),o=Rt.any3d?this.options.zoomSnap:1;return o&&(t=Math.round(t/o)*o),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Le(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(i)||(this.panBy(i,e),0))},_createAnimProxy:function(){var t=this._proxy=fe("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var e=ce,i=this._proxy.style[e];Pe(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),i===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ge(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();Pe(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,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||!1===i.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var o=this.getZoomScale(e),n=this._getCenterOffset(t)._divideBy(1-1/o);return!(!0!==i.animate&&!this.getSize().contains(n)||(C(function(){this._moveStart(!0,i.noMoveStart||!1)._animateZoom(t,e,!0)},this),0))},_animateZoom:function(t,e,i,o){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,xe(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:o}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(n(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Le(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function si(t,e){return new ni(t,e)}var ri=S.extend({options:{position:"topright"},initialize:function(t){d(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),i=this.getPosition(),o=t._controlCorners[i];return xe(e,"leaflet-control"),-1!==i.indexOf("bottom")?o.insertBefore(e,o.firstChild):o.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(ge(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()}}),ai=function(t){return new ri(t)};ni.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",i=this._controlContainer=fe("div",e+"control-container",this._container);function o(o,n){var s=e+o+" "+e+n;t[o+n]=fe("div",s,i)}o("top","left"),o("top","right"),o("bottom","left"),o("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)ge(this._controlCorners[t]);ge(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var li=ri.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,o){return i<o?-1:o<i?1:0}},initialize:function(t,e,i){for(var o in d(this,i),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1,t)this._addLayer(t[o],o);for(o in e)this._addLayer(e[o],o,!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 ri.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(r(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){xe(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?(xe(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):Le(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return Le(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=fe("div",t),i=this.options.collapsed;e.setAttribute("aria-haspopup",!0),$e(e),qe(e);var o=this._section=fe("section",t+"-list");i&&(this._map.on("click",this.collapse,this),Ze(e,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var n=this._layersLink=fe("a",t+"-toggle",e);n.href="#",n.title="Layers",n.setAttribute("role","button"),Ze(n,{keydown:function(t){13===t.keyCode&&this._expandSafely()},click:function(t){Ke(t),this._expandSafely()}},this),i||this.expand(),this._baseLayersList=fe("div",t+"-base",o),this._separator=fe("div",t+"-separator",o),this._overlaysList=fe("div",t+"-overlays",o),e.appendChild(o)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&r(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,i){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:i}),this.options.sortLayers&&this._layers.sort(n(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;_e(this._baseLayersList),_e(this._overlaysList),this._layerControlInputs=[];var t,e,i,o,n=0;for(i=0;i<this._layers.length;i++)o=this._layers[i],this._addItem(o),e=e||o.overlay,t=t||!o.overlay,n+=o.overlay?0:1;return this.options.hideSingleBase&&(t=t&&n>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(r(t.target)),i=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)},_createRadioElement:function(t,e){var i='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",o=document.createElement("div");return o.innerHTML=i,o.firstChild},_addItem:function(t){var e,i=document.createElement("label"),o=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=o):e=this._createRadioElement("leaflet-base-layers_"+r(this),o),this._layerControlInputs.push(e),e.layerId=r(t.layer),Ze(e,"click",this._onInputClick,this);var n=document.createElement("span");n.innerHTML=" "+t.name;var s=document.createElement("span");return i.appendChild(s),s.appendChild(e),s.appendChild(n),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(i),this._checkDisabledLayers(),i},_onInputClick:function(){if(!this._preventClick){var t,e,i=this._layerControlInputs,o=[],n=[];this._handlingClick=!0;for(var s=i.length-1;s>=0;s--)t=i[s],e=this._getLayer(t.layerId).layer,t.checked?o.push(e):t.checked||n.push(e);for(s=0;s<n.length;s++)this._map.hasLayer(n[s])&&this._map.removeLayer(n[s]);for(s=0;s<o.length;s++)this._map.hasLayer(o[s])||this._map.addLayer(o[s]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var t,e,i=this._layerControlInputs,o=this._map.getZoom(),n=i.length-1;n>=0;n--)t=i[n],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&o<e.options.minZoom||void 0!==e.options.maxZoom&&o>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,Ze(t,"click",Ke),this.expand();var e=this;setTimeout(function(){Ne(t,"click",Ke),e._preventClick=!1})}}),hi=function(t,e,i){return new li(t,e,i)},ci=ri.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=fe("div",e+" leaflet-bar"),o=this.options;return this._zoomInButton=this._createButton(o.zoomInText,o.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(o.zoomOutText,o.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},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,i,o,n){var s=fe("a",i,o);return s.innerHTML=t,s.href="#",s.title=e,s.setAttribute("role","button"),s.setAttribute("aria-label",e),$e(s),Ze(s,"click",Je),Ze(s,"click",n,this),Ze(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";Le(this._zoomInButton,e),Le(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(xe(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(xe(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});ni.mergeOptions({zoomControl:!0}),ni.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new ci,this.addControl(this.zoomControl))});var ui=function(t){return new ci(t)},pi=ri.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=fe("div",e),o=this.options;return this._addScales(o,e+"-line",i),t.on(o.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=fe("div",e,i)),t.imperial&&(this._iScale=fe("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)},_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),i=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,i,e/t)},_updateImperial:function(t){var e,i,o,n=3.2808399*t;n>5280?(e=n/5280,i=this._getRoundNum(e),this._updateScale(this._iScale,i+" mi",i/e)):(o=this._getRoundNum(n),this._updateScale(this._iScale,o+" ft",o/n))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return e*(i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1)}}),di=function(t){return new pi(t)},mi='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',fi=ri.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Rt.inlineSvg?mi+" ":"")+"Leaflet</a>"},initialize:function(t){d(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=fe("div","leaflet-control-attribution"),$e(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(' <span aria-hidden="true">|</span> ')}}});ni.mergeOptions({attributionControl:!0}),ni.addInitHook(function(){this.options.attributionControl&&(new fi).addTo(this)});var gi=function(t){return new fi(t)};ri.Layers=li,ri.Zoom=ci,ri.Scale=pi,ri.Attribution=fi,ai.layers=hi,ai.zoom=ui,ai.scale=di,ai.attribution=gi;var _i=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}});_i.addTo=function(t,e){return t.addHandler(e,this),this};var yi={Events:O},vi=Rt.touch?"touchstart mousedown":"mousedown",bi=E.extend({options:{clickTolerance:3},initialize:function(t,e,i,o){d(this,o),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(Ze(this._dragStartTarget,vi,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(bi._dragging===this&&this.finishDrag(!0),Ne(this._dragStartTarget,vi,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!be(this._element,"leaflet-zoom-anim")))if(t.touches&&1!==t.touches.length)bi._dragging===this&&this.finishDrag();else if(!(bi._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(bi._dragging=this,this._preventOutline&&Ie(this._element),Ee(),se(),this._moving))){this.fire("down");var e=t.touches?t.touches[0]:t,i=Be(this._element);this._startPoint=new D(e.clientX,e.clientY),this._startPos=Ae(this._element),this._parentScale=Fe(i);var o="mousedown"===t.type;Ze(document,o?"mousemove":"touchmove",this._onMove,this),Ze(document,o?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(t){if(this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,i=new D(e.clientX,e.clientY)._subtract(this._startPoint);(i.x||i.y)&&(Math.abs(i.x)+Math.abs(i.y)<this.options.clickTolerance||(i.x/=this._parentScale.x,i.y/=this._parentScale.y,Ke(t),this._moved||(this.fire("dragstart"),this._moved=!0,xe(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),xe(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(i),this._moving=!0,this._lastEvent=t,this._updatePosition()))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),Se(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){Le(document.body,"leaflet-dragging"),this._lastTarget&&(Le(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Ne(document,"mousemove touchmove",this._onMove,this),Ne(document,"mouseup touchend touchcancel",this._onUp,this),De(),re();var e=this._moved&&this._moving;this._moving=!1,bi._dragging=!1,e&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}});function xi(t,e,i){var o,n,s,r,a,l,h,c,u,p=[1,4,2,8];for(n=0,h=t.length;n<h;n++)t[n]._code=Ii(t[n],e);for(r=0;r<4;r++){for(c=p[r],o=[],n=0,s=(h=t.length)-1;n<h;s=n++)a=t[n],l=t[s],a._code&c?l._code&c||((u=Di(l,a,c,e,i))._code=Ii(u,e),o.push(u)):(l._code&c&&((u=Di(l,a,c,e,i))._code=Ii(u,e),o.push(u)),o.push(a));t=o}return t}function Li(t,e){var i,o,n,s,r,a,l,h,c;if(!t||0===t.length)throw new Error("latlngs not passed");Fi(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var u=N([0,0]),p=Z(t);p.getNorthWest().distanceTo(p.getSouthWest())*p.getNorthEast().distanceTo(p.getNorthWest())<1700&&(u=wi(t));var d=t.length,m=[];for(i=0;i<d;i++){var f=N(t[i]);m.push(e.project(N([f.lat-u.lat,f.lng-u.lng])))}for(a=l=h=0,i=0,o=d-1;i<d;o=i++)n=m[i],s=m[o],r=n.y*s.x-s.y*n.x,l+=(n.x+s.x)*r,h+=(n.y+s.y)*r,a+=3*r;c=0===a?m[0]:[l/a,h/a];var g=e.unproject(z(c));return N([g.lat+u.lat,g.lng+u.lng])}function wi(t){for(var e=0,i=0,o=0,n=0;n<t.length;n++){var s=N(t[n]);e+=s.lat,i+=s.lng,o++}return N([e/o,i/o])}var ki,Mi={__proto__:null,clipPolygon:xi,polygonCenter:Li,centroid:wi};function Ci(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=Si(t=Oi(t,i),i)}function Ti(t,e,i){return Math.sqrt(Bi(t,e,i,!0))}function Pi(t,e,i){return Bi(t,e,i)}function Si(t,e){var i=t.length,o=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(i);o[0]=o[i-1]=1,Ai(t,o,e,0,i-1);var n,s=[];for(n=0;n<i;n++)o[n]&&s.push(t[n]);return s}function Ai(t,e,i,o,n){var s,r,a,l=0;for(r=o+1;r<=n-1;r++)(a=Bi(t[r],t[o],t[n],!0))>l&&(s=r,l=a);l>i&&(e[s]=1,Ai(t,e,i,o,s),Ai(t,e,i,s,n))}function Oi(t,e){for(var i=[t[0]],o=1,n=0,s=t.length;o<s;o++)zi(t[o],t[n])>e&&(i.push(t[o]),n=o);return n<s-1&&i.push(t[s-1]),i}function Ei(t,e,i,o,n){var s,r,a,l=o?ki:Ii(t,i),h=Ii(e,i);for(ki=h;;){if(!(l|h))return[t,e];if(l&h)return!1;a=Ii(r=Di(t,e,s=l||h,i,n),i),s===l?(t=r,l=a):(e=r,h=a)}}function Di(t,e,i,o,n){var s,r,a=e.x-t.x,l=e.y-t.y,h=o.min,c=o.max;return 8&i?(s=t.x+a*(c.y-t.y)/l,r=c.y):4&i?(s=t.x+a*(h.y-t.y)/l,r=h.y):2&i?(s=c.x,r=t.y+l*(c.x-t.x)/a):1&i&&(s=h.x,r=t.y+l*(h.x-t.x)/a),new D(s,r,n)}function Ii(t,e){var i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8),i}function zi(t,e){var i=e.x-t.x,o=e.y-t.y;return i*i+o*o}function Bi(t,e,i,o){var n,s=e.x,r=e.y,a=i.x-s,l=i.y-r,h=a*a+l*l;return h>0&&((n=((t.x-s)*a+(t.y-r)*l)/h)>1?(s=i.x,r=i.y):n>0&&(s+=a*n,r+=l*n)),a=t.x-s,l=t.y-r,o?a*a+l*l:new D(s,r)}function Fi(t){return!_(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function Ri(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Fi(t)}function Zi(t,e){var i,o,n,s,r,a,l,h;if(!t||0===t.length)throw new Error("latlngs not passed");Fi(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var c=N([0,0]),u=Z(t);u.getNorthWest().distanceTo(u.getSouthWest())*u.getNorthEast().distanceTo(u.getNorthWest())<1700&&(c=wi(t));var p=t.length,d=[];for(i=0;i<p;i++){var m=N(t[i]);d.push(e.project(N([m.lat-c.lat,m.lng-c.lng])))}for(i=0,o=0;i<p-1;i++)o+=d[i].distanceTo(d[i+1])/2;if(0===o)h=d[0];else for(i=0,s=0;i<p-1;i++)if(r=d[i],a=d[i+1],(s+=n=r.distanceTo(a))>o){l=(s-o)/n,h=[a.x-l*(a.x-r.x),a.y-l*(a.y-r.y)];break}var f=e.unproject(z(h));return N([f.lat+c.lat,f.lng+c.lng])}var Ui={__proto__:null,simplify:Ci,pointToSegmentDistance:Ti,closestPointOnSegment:Pi,clipSegment:Ei,_getEdgeIntersection:Di,_getBitCode:Ii,_sqClosestPointOnSegment:Bi,isFlat:Fi,_flat:Ri,polylineCenter:Zi},Ni={project:function(t){return new D(t.lng,t.lat)},unproject:function(t){return new U(t.y,t.x)},bounds:new B([-180,-90],[180,90])},ji={R:6378137,R_MINOR:6356752.314245179,bounds:new B([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,i=this.R,o=t.lat*e,n=this.R_MINOR/i,s=Math.sqrt(1-n*n),r=s*Math.sin(o),a=Math.tan(Math.PI/4-o/2)/Math.pow((1-r)/(1+r),s/2);return o=-i*Math.log(Math.max(a,1e-10)),new D(t.lng*e*i,o)},unproject:function(t){for(var e,i=180/Math.PI,o=this.R,n=this.R_MINOR/o,s=Math.sqrt(1-n*n),r=Math.exp(-t.y/o),a=Math.PI/2-2*Math.atan(r),l=0,h=.1;l<15&&Math.abs(h)>1e-7;l++)e=s*Math.sin(a),e=Math.pow((1-e)/(1+e),s/2),a+=h=Math.PI/2-2*Math.atan(r*e)-a;return new U(a*i,t.x*i/o)}},Hi={__proto__:null,LonLat:Ni,Mercator:ji,SphericalMercator:W},Gi=i({},G,{code:"EPSG:3395",projection:ji,transformation:function(){var t=.5/(Math.PI*ji.R);return $(t,.5,-t,.5)}()}),Vi=i({},G,{code:"EPSG:4326",projection:Ni,transformation:$(1/180,1,-1/180,.5)}),Wi=i({},H,{projection:Ni,transformation:$(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 i=e.lng-t.lng,o=e.lat-t.lat;return Math.sqrt(i*i+o*o)},infinite:!0});H.Earth=G,H.EPSG3395=Gi,H.EPSG3857=K,H.EPSG900913=J,H.EPSG4326=Vi,H.Simple=Wi;var qi=E.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[r(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[r(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",function(){e.off(i,this)},this)}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}});ni.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=r(t);return this._layers[e]||(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=r(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return r(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){for(var e=0,i=(t=t?_(t)?t:[t]:[]).length;e<i;e++)this.addLayer(t[e])},_addZoomLimit:function(t){isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[r(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=r(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,i=this._getZoomSpan();for(var o in this._zoomBoundLayers){var n=this._zoomBoundLayers[o].options;t=void 0===n.minZoom?t:Math.min(t,n.minZoom),e=void 0===n.maxZoom?e:Math.max(e,n.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,i!==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 $i=qi.extend({initialize:function(t,e){var i,o;if(d(this,e),this._layers={},t)for(i=0,o=t.length;i<o;i++)this.addLayer(t[i])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return("number"==typeof t?t:this.getLayerId(t))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,i,o=Array.prototype.slice.call(arguments,1);for(e in this._layers)(i=this._layers[e])[t]&&i[t].apply(i,o);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return r(t)}}),Ki=function(t,e){return new $i(t,e)},Ji=$i.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),$i.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),$i.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 R;for(var e in this._layers){var i=this._layers[e];t.extend(i.getBounds?i.getBounds():i.getLatLng())}return t}}),Yi=function(t,e){return new Ji(t,e)},Xi=S.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){d(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var o=this._createImg(i,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(o,t),(this.options.crossOrigin||""===this.options.crossOrigin)&&(o.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),o},_setIconStyles:function(t,e){var i=this.options,o=i[e+"Size"];"number"==typeof o&&(o=[o,o]);var n=z(o),s=z("shadow"===e&&i.shadowAnchor||i.iconAnchor||n&&n.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),s&&(t.style.marginLeft=-s.x+"px",t.style.marginTop=-s.y+"px"),n&&(t.style.width=n.x+"px",t.style.height=n.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return Rt.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function Qi(t){return new Xi(t)}var to=Xi.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return"string"!=typeof to.imagePath&&(to.imagePath=this._detectIconPath()),(this.options.imagePath||to.imagePath)+Xi.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var e=function(t,e,i){var o=e.exec(t);return o&&o[i]};return(t=e(t,/^url\((['"])?(.+)\1\)$/,2))&&e(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=fe("div","leaflet-default-icon-path",document.body),e=me(t,"background-image")||me(t,"backgroundImage");if(document.body.removeChild(t),e=this._stripUrl(e))return e;var i=document.querySelector('link[href$="leaflet.css"]');return i?i.href.substring(0,i.href.length-11-1):""}}),eo=_i.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new bi(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),xe(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&&Le(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,i=e._map,o=this._marker.options.autoPanSpeed,n=this._marker.options.autoPanPadding,s=Ae(e._icon),r=i.getPixelBounds(),a=i.getPixelOrigin(),l=F(r.min._subtract(a).add(n),r.max._subtract(a).subtract(n));if(!l.contains(s)){var h=z((Math.max(l.max.x,s.x)-l.max.x)/(r.max.x-l.max.x)-(Math.min(l.min.x,s.x)-l.min.x)/(r.min.x-l.min.x),(Math.max(l.max.y,s.y)-l.max.y)/(r.max.y-l.max.y)-(Math.min(l.min.y,s.y)-l.min.y)/(r.min.y-l.min.y)).multiplyBy(o);i.panBy(h,{animate:!1}),this._draggable._newPos._add(h),this._draggable._startPos._add(h),Se(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=C(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&&(T(this._panRequest),this._panRequest=C(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,i=e._shadow,o=Ae(e._icon),n=e._map.layerPointToLatLng(o);i&&Se(i,o),e._latlng=n,t.latlng=n,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){T(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),io=qi.extend({options:{icon:new to,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){d(this,e),this._latlng=N(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=N(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"),i=t.icon.createIcon(this._icon),o=!1;i!==this._icon&&(this._icon&&this._removeIcon(),o=!0,t.title&&(i.title=t.title),"IMG"===i.tagName&&(i.alt=t.alt||"")),xe(i,e),t.keyboard&&(i.tabIndex="0",i.setAttribute("role","button")),this._icon=i,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Ze(i,"focus",this._panOnFocus,this);var n=t.icon.createShadow(this._shadow),s=!1;n!==this._shadow&&(this._removeShadow(),s=!0),n&&(xe(n,e),n.alt=""),this._shadow=n,t.opacity<1&&this._updateOpacity(),o&&this.getPane().appendChild(this._icon),this._initInteraction(),n&&s&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Ne(this._icon,"focus",this._panOnFocus,this),ge(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&ge(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&Se(this._icon,t),this._shadow&&Se(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&&(xe(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),eo)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new eo(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&&Me(this._icon,t),this._shadow&&Me(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var t=this._map;if(t){var e=this.options.icon.options,i=e.iconSize?z(e.iconSize):z(0,0),o=e.iconAnchor?z(e.iconAnchor):z(0,0);t.panInside(this._latlng,{paddingTopLeft:o,paddingBottomRight:i.subtract(o)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function oo(t,e){return new io(t,e)}var no=qi.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 d(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),so=no.extend({options:{fill:!0,radius:10},initialize:function(t,e){d(this,e),this._latlng=N(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=N(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 no.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,i=this._clickTolerance(),o=[t+i,e+i];this._pxBounds=new B(this._point.subtract(o),this._point.add(o))},_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 ro(t,e){return new so(t,e)}var ao=so.extend({initialize:function(t,e,o){if("number"==typeof e&&(e=i({},o,{radius:e})),d(this,e),this._latlng=N(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 R(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:no.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,i=this._map,o=i.options.crs;if(o.distance===G.distance){var n=Math.PI/180,s=this._mRadius/G.R/n,r=i.project([e+s,t]),a=i.project([e-s,t]),l=r.add(a).divideBy(2),h=i.unproject(l).lat,c=Math.acos((Math.cos(s*n)-Math.sin(e*n)*Math.sin(h*n))/(Math.cos(e*n)*Math.cos(h*n)))/n;(isNaN(c)||0===c)&&(c=s/Math.cos(Math.PI/180*e)),this._point=l.subtract(i.getPixelOrigin()),this._radius=isNaN(c)?0:l.x-i.project([h,t-c]).x,this._radiusY=l.y-r.y}else{var u=o.unproject(o.project(this._latlng).subtract([this._mRadius,0]));this._point=i.latLngToLayerPoint(this._latlng),this._radius=this._point.x-i.latLngToLayerPoint(u).x}this._updateBounds()}});function lo(t,e,i){return new ao(t,e,i)}var ho=no.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){d(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,i,o=1/0,n=null,s=Bi,r=0,a=this._parts.length;r<a;r++)for(var l=this._parts[r],h=1,c=l.length;h<c;h++){var u=s(t,e=l[h-1],i=l[h],!0);u<o&&(o=u,n=s(t,e,i))}return n&&(n.distance=Math.sqrt(o)),n},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Zi(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=N(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new R,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return Fi(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=Fi(t),o=0,n=t.length;o<n;o++)i?(e[o]=N(t[o]),this._bounds.extend(e[o])):e[o]=this._convertLatLngs(t[o]);return e},_project:function(){var t=new B;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),e=new D(t,t);this._rawPxBounds&&(this._pxBounds=new B([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)]))},_projectLatlngs:function(t,e,i){var o,n,s=t[0]instanceof U,r=t.length;if(s){for(n=[],o=0;o<r;o++)n[o]=this._map.latLngToLayerPoint(t[o]),i.extend(n[o]);e.push(n)}else for(o=0;o<r;o++)this._projectLatlngs(t[o],e,i)},_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,i,o,n,s,r,a,l=this._parts;for(e=0,o=0,n=this._rings.length;e<n;e++)for(i=0,s=(a=this._rings[e]).length;i<s-1;i++)(r=Ei(a[i],a[i+1],t,i,!0))&&(l[o]=l[o]||[],l[o].push(r[0]),r[1]===a[i+1]&&i!==s-2||(l[o].push(r[1]),o++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,i=0,o=t.length;i<o;i++)t[i]=Ci(t[i],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var i,o,n,s,r,a,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,s=this._parts.length;i<s;i++)for(o=0,n=(r=(a=this._parts[i]).length)-1;o<r;n=o++)if((e||0!==o)&&Ti(t,a[n],a[o])<=l)return!0;return!1}});function co(t,e){return new ho(t,e)}ho._flat=Ri;var uo=ho.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Li(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(t){var e=ho.prototype._convertLatLngs.call(this,t),i=e.length;return i>=2&&e[0]instanceof U&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){ho.prototype._setLatLngs.call(this,t),Fi(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Fi(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new D(e,e);if(t=new B(t.min.subtract(i),t.max.add(i)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var o,n=0,s=this._rings.length;n<s;n++)(o=xi(this._rings[n],t,!0)).length&&this._parts.push(o)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,i,o,n,s,r,a,l,h=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(n=0,a=this._parts.length;n<a;n++)for(s=0,r=(l=(e=this._parts[n]).length)-1;s<l;r=s++)i=e[s],o=e[r],i.y>t.y!=o.y>t.y&&t.x<(o.x-i.x)*(t.y-i.y)/(o.y-i.y)+i.x&&(h=!h);return h||ho.prototype._containsPoint.call(this,t,!0)}});function po(t,e){return new uo(t,e)}var mo=Ji.extend({initialize:function(t,e){d(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,o,n=_(t)?t:t.features;if(n){for(e=0,i=n.length;e<i;e++)((o=n[e]).geometries||o.geometry||o.features||o.coordinates)&&this.addData(o);return this}var s=this.options;if(s.filter&&!s.filter(t))return this;var r=fo(t,s);return r?(r.feature=Lo(t),r.defaultOptions=r.options,this.resetStyle(r),s.onEachFeature&&s.onEachFeature(t,r),this.addLayer(r)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=i({},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 fo(t,e){var i,o,n,s,r="Feature"===t.type?t.geometry:t,a=r?r.coordinates:null,l=[],h=e&&e.pointToLayer,c=e&&e.coordsToLatLng||_o;if(!a&&!r)return null;switch(r.type){case"Point":return go(h,t,i=c(a),e);case"MultiPoint":for(n=0,s=a.length;n<s;n++)i=c(a[n]),l.push(go(h,t,i,e));return new Ji(l);case"LineString":case"MultiLineString":return o=yo(a,"LineString"===r.type?0:1,c),new ho(o,e);case"Polygon":case"MultiPolygon":return o=yo(a,"Polygon"===r.type?1:2,c),new uo(o,e);case"GeometryCollection":for(n=0,s=r.geometries.length;n<s;n++){var u=fo({geometry:r.geometries[n],type:"Feature",properties:t.properties},e);u&&l.push(u)}return new Ji(l);case"FeatureCollection":for(n=0,s=r.features.length;n<s;n++){var p=fo(r.features[n],e);p&&l.push(p)}return new Ji(l);default:throw new Error("Invalid GeoJSON object.")}}function go(t,e,i,o){return t?t(e,i):new io(i,o&&o.markersInheritOptions&&o)}function _o(t){return new U(t[1],t[0],t[2])}function yo(t,e,i){for(var o,n=[],s=0,r=t.length;s<r;s++)o=e?yo(t[s],e-1,i):(i||_o)(t[s]),n.push(o);return n}function vo(t,e){return void 0!==(t=N(t)).alt?[c(t.lng,e),c(t.lat,e),c(t.alt,e)]:[c(t.lng,e),c(t.lat,e)]}function bo(t,e,i,o){for(var n=[],s=0,r=t.length;s<r;s++)n.push(e?bo(t[s],Fi(t[s])?0:e-1,i,o):vo(t[s],o));return!e&&i&&n.length>0&&n.push(n[0].slice()),n}function xo(t,e){return t.feature?i({},t.feature,{geometry:e}):Lo(e)}function Lo(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var wo={toGeoJSON:function(t){return xo(this,{type:"Point",coordinates:vo(this.getLatLng(),t)})}};function ko(t,e){return new mo(t,e)}io.include(wo),ao.include(wo),so.include(wo),ho.include({toGeoJSON:function(t){var e=!Fi(this._latlngs);return xo(this,{type:(e?"Multi":"")+"LineString",coordinates:bo(this._latlngs,e?1:0,!1,t)})}}),uo.include({toGeoJSON:function(t){var e=!Fi(this._latlngs),i=e&&!Fi(this._latlngs[0]),o=bo(this._latlngs,i?2:e?1:0,!0,t);return e||(o=[o]),xo(this,{type:(i?"Multi":"")+"Polygon",coordinates:o})}}),$i.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(i){e.push(i.toGeoJSON(t).geometry.coordinates)}),xo(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 i="GeometryCollection"===e,o=[];return this.eachLayer(function(e){if(e.toGeoJSON){var n=e.toGeoJSON(t);if(i)o.push(n.geometry);else{var s=Lo(n);"FeatureCollection"===s.type?o.push.apply(o,s.features):o.push(s)}}}),i?xo(this,{geometries:o,type:"GeometryCollection"}):{type:"FeatureCollection",features:o}}});var Mo=ko,Co=qi.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,i){this._url=t,this._bounds=Z(e),d(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(xe(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ge(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&&ye(this._image),this},bringToBack:function(){return this._map&&ve(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=Z(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:fe("img");xe(e,"leaflet-image-layer"),this._zoomAnimated&&xe(e,"leaflet-zoom-animated"),this.options.className&&xe(e,this.options.className),e.onselectstart=h,e.onmousemove=h,e.onload=n(this.fire,this,"load"),e.onerror=n(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),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;Pe(this._image,i,e)},_reset:function(){var t=this._image,e=new B(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();Se(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){Me(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),To=function(t,e,i){return new Co(t,e,i)},Po=Co.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:fe("video");if(xe(e,"leaflet-image-layer"),this._zoomAnimated&&xe(e,"leaflet-zoom-animated"),this.options.className&&xe(e,this.options.className),e.onselectstart=h,e.onmousemove=h,e.onloadeddata=n(this.fire,this,"load"),t){for(var i=e.getElementsByTagName("source"),o=[],s=0;s<i.length;s++)o.push(i[s].src);this._url=i.length>0?o:[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,e.playsInline=!!this.options.playsInline;for(var r=0;r<this._url.length;r++){var a=fe("source");a.src=this._url[r],e.appendChild(a)}}}});function So(t,e,i){return new Po(t,e,i)}var Ao=Co.extend({_initImage:function(){var t=this._image=this._url;xe(t,"leaflet-image-layer"),this._zoomAnimated&&xe(t,"leaflet-zoom-animated"),this.options.className&&xe(t,this.options.className),t.onselectstart=h,t.onmousemove=h}});function Oo(t,e,i){return new Ao(t,e,i)}var Eo=qi.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,e){t&&(t instanceof U||_(t))?(this._latlng=N(t),d(this,e)):(d(this,t),this._source=e),this.options.content&&(this._content=this.options.content)},openOn:function(t){return(t=arguments.length?t:this._source._map).hasLayer(this)||t.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&Me(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&Me(this._container,1),this.bringToFront(),this.options.interactive&&(xe(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(Me(this._container,0),this._removeTimeout=setTimeout(n(ge,void 0,this._container),200)):ge(this._container),this.options.interactive&&(Le(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=N(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&&ye(this._container),this},bringToBack:function(){return this._map&&ve(this._container),this},_prepareOpen:function(t){var e=this._source;if(!e._map)return!1;if(e instanceof Ji){e=null;var i=this._source._layers;for(var o in i)if(i[o]._map){e=i[o];break}if(!e)return!1;this._source=e}if(!t)if(e.getCenter)t=e.getCenter();else if(e.getLatLng)t=e.getLatLng();else{if(!e.getBounds)throw new Error("Unable to get source layer LatLng.");t=e.getBounds().getCenter()}return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=z(this.options.offset),i=this._getAnchor();this._zoomAnimated?Se(this._container,t.add(i)):e=e.add(t).add(i);var o=this._containerBottom=-e.y,n=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=o+"px",this._container.style.left=n+"px"}},_getAnchor:function(){return[0,0]}});ni.include({_initOverlay:function(t,e,i,o){var n=e;return n instanceof t||(n=new t(o).setContent(e)),i&&n.setLatLng(i),n}}),qi.include({_initOverlay:function(t,e,i,o){var n=i;return n instanceof t?(d(n,o),n._source=this):(n=e&&!o?e:new t(o,this)).setContent(i),n}});var Do=Eo.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return!(t=arguments.length?t:this._source._map).hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,Eo.prototype.openOn.call(this,t)},onAdd:function(t){Eo.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof no||this._source.on("preclick",We))},onRemove:function(t){Eo.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof no||this._source.off("preclick",We))},getEvents:function(){var t=Eo.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this.close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_initLayout:function(){var t="leaflet-popup",e=this._container=fe("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),i=this._wrapper=fe("div",t+"-content-wrapper",e);if(this._contentNode=fe("div",t+"-content",i),$e(e),qe(this._contentNode),Ze(e,"contextmenu",We),this._tipContainer=fe("div",t+"-tip-container",e),this._tip=fe("div",t+"-tip",this._tipContainer),this.options.closeButton){var o=this._closeButton=fe("a",t+"-close-button",e);o.setAttribute("role","button"),o.setAttribute("aria-label","Close popup"),o.href="#close",o.innerHTML='<span aria-hidden="true">&#215;</span>',Ze(o,"click",function(t){Ke(t),this.close()},this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth;i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="";var o=t.offsetHeight,n=this.options.maxHeight,s="leaflet-popup-scrolled";n&&o>n?(e.height=n+"px",xe(t,s)):Le(t,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();Se(this._container,e.add(i))},_adjustPan:function(){if(this.options.autoPan)if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning)this._autopanning=!1;else{var t=this._map,e=parseInt(me(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,o=this._containerWidth,n=new D(this._containerLeft,-i-this._containerBottom);n._add(Ae(this._container));var s=t.layerPointToContainerPoint(n),r=z(this.options.autoPanPadding),a=z(this.options.autoPanPaddingTopLeft||r),l=z(this.options.autoPanPaddingBottomRight||r),h=t.getSize(),c=0,u=0;s.x+o+l.x>h.x&&(c=s.x+o-h.x+l.x),s.x-c-a.x<0&&(c=s.x-a.x),s.y+i+l.y>h.y&&(u=s.y+i-h.y+l.y),s.y-u-a.y<0&&(u=s.y-a.y),(c||u)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([c,u]))}},_getAnchor:function(){return z(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Io=function(t,e){return new Do(t,e)};ni.mergeOptions({closePopupOnClick:!0}),ni.include({openPopup:function(t,e,i){return this._initOverlay(Do,t,e,i).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),qi.include({bindPopup:function(t,e){return this._popup=this._initOverlay(Do,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof Ji||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(this._popup&&this._map){Je(t);var e=t.layer||t.target;this._popup._source!==e||e instanceof no?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var zo=Eo.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Eo.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Eo.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Eo.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=fe("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+r(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i,o=this._map,n=this._container,s=o.latLngToContainerPoint(o.getCenter()),r=o.layerPointToContainerPoint(t),a=this.options.direction,l=n.offsetWidth,h=n.offsetHeight,c=z(this.options.offset),u=this._getAnchor();"top"===a?(e=l/2,i=h):"bottom"===a?(e=l/2,i=0):"center"===a?(e=l/2,i=h/2):"right"===a?(e=0,i=h/2):"left"===a?(e=l,i=h/2):r.x<s.x?(a="right",e=0,i=h/2):(a="left",e=l+2*(c.x+u.x),i=h/2),t=t.subtract(z(e,i,!0)).add(c).add(u),Le(n,"leaflet-tooltip-right"),Le(n,"leaflet-tooltip-left"),Le(n,"leaflet-tooltip-top"),Le(n,"leaflet-tooltip-bottom"),xe(n,"leaflet-tooltip-"+a),Se(n,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&Me(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return z(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),Bo=function(t,e){return new zo(t,e)};ni.include({openTooltip:function(t,e,i){return this._initOverlay(zo,t,e,i).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),qi.include({bindTooltip:function(t,e){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(zo,this._tooltip,t,e),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(t||!this._tooltipHandlersAdded){var e=t?"off":"on",i={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?i.add=this._openTooltip:(i.mouseover=this._openTooltip,i.mouseout=this.closeTooltip,i.click=this._openTooltip,this._map?this._addFocusListeners():i.add=this._addFocusListeners),this._tooltip.options.sticky&&(i.mousemove=this._moveTooltip),this[e](i),this._tooltipHandlersAdded=!t}},openTooltip:function(t){return this._tooltip&&(this instanceof Ji||(this._tooltip._source=this),this._tooltip._prepareOpen(t)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(t){var e="function"==typeof t.getElement&&t.getElement();e&&(Ze(e,"focus",function(){this._tooltip._source=t,this.openTooltip()},this),Ze(e,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(t){var e="function"==typeof t.getElement&&t.getElement();e&&e.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(t){if(this._tooltip&&this._map)if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var e=this;this._map.once("moveend",function(){e._openOnceFlag=!1,e._openTooltip(t)})}else this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var e,i,o=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),i=this._map.containerPointToLayerPoint(e),o=this._map.layerPointToLatLng(i)),this._tooltip.setLatLng(o)}});var Fo=Xi.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"),i=this.options;if(i.html instanceof Element?(_e(e),e.appendChild(i.html)):e.innerHTML=!1!==i.html?i.html:"",i.bgPos){var o=z(i.bgPos);e.style.backgroundPosition=-o.x+"px "+-o.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});function Ro(t){return new Fo(t)}Xi.Default=to;var Zo=qi.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Rt.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){d(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),ge(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(ye(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(ve(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var t=this._clampZoom(this._map.getZoom());t!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()}return this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=a(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof D?t:new D(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,i=this.getPane().children,o=-t(-1/0,1/0),n=0,s=i.length;n<s;n++)e=i[n].style.zIndex,i[n]!==this._container&&e&&(o=t(o,+e));isFinite(o)&&(this.options.zIndex=o+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Rt.ielt9){Me(this._container,this.options.opacity);var t=+new Date,e=!1,i=!1;for(var o in this._tiles){var n=this._tiles[o];if(n.current&&n.loaded){var s=Math.min(1,(t-n.loaded)/200);Me(n.el,s),s<1?e=!0:(n.active?i=!0:this._onOpaqueTile(n),n.active=!0)}}i&&!this._noPrune&&this._pruneTiles(),e&&(T(this._fadeFrame),this._fadeFrame=C(this._updateOpacity,this))}},_onOpaqueTile:h,_initContainer:function(){this._container||(this._container=fe("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var i in this._levels)i=Number(i),this._levels[i].el.children.length||i===t?(this._levels[i].el.style.zIndex=e-Math.abs(t-i),this._onUpdateLevel(i)):(ge(this._levels[i].el),this._removeTilesAtZoom(i),this._onRemoveLevel(i),delete this._levels[i]);var o=this._levels[t],n=this._map;return o||((o=this._levels[t]={}).el=fe("div","leaflet-tile-container leaflet-zoom-animated",this._container),o.el.style.zIndex=e,o.origin=n.project(n.unproject(n.getPixelOrigin()),t).round(),o.zoom=t,this._setZoomTransform(o,n.getCenter(),n.getZoom()),h(o.el.offsetWidth),this._onCreateLevel(o)),this._level=o,o}},_onUpdateLevel:h,_onRemoveLevel:h,_onCreateLevel:h,_pruneTiles:function(){if(this._map){var t,e,i=this._map.getZoom();if(i>this.options.maxZoom||i<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 o=e.coords;this._retainParent(o.x,o.y,o.z,o.z-5)||this._retainChildren(o.x,o.y,o.z,o.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)ge(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,i,o){var n=Math.floor(t/2),s=Math.floor(e/2),r=i-1,a=new D(+n,+s);a.z=+r;var l=this._tileCoordsToKey(a),h=this._tiles[l];return h&&h.active?(h.retain=!0,!0):(h&&h.loaded&&(h.retain=!0),r>o&&this._retainParent(n,s,r,o))},_retainChildren:function(t,e,i,o){for(var n=2*t;n<2*t+2;n++)for(var s=2*e;s<2*e+2;s++){var r=new D(n,s);r.z=i+1;var a=this._tileCoordsToKey(r),l=this._tiles[a];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),i+1<o&&this._retainChildren(n,s,i+1,o))}},_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,i,o){var n=Math.round(e);n=void 0!==this.options.maxZoom&&n>this.options.maxZoom||void 0!==this.options.minZoom&&n<this.options.minZoom?void 0:this._clampZoom(n);var s=this.options.updateWhenZooming&&n!==this._tileZoom;o&&!s||(this._tileZoom=n,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==n&&this._update(t),i||this._pruneTiles(),this._noPrune=!!i),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var i in this._levels)this._setZoomTransform(this._levels[i],t,e)},_setZoomTransform:function(t,e,i){var o=this._map.getZoomScale(i,t.zoom),n=t.origin.multiplyBy(o).subtract(this._map._getNewPixelOrigin(e,i)).round();Rt.any3d?Pe(t.el,n,o):Se(t.el,n)},_resetGrid:function(){var t=this._map,e=t.options.crs,i=this._tileSize=this.getTileSize(),o=this._tileZoom,n=this._map.getPixelWorldBounds(this._tileZoom);n&&(this._globalTileRange=this._pxBoundsToTileRange(n)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],o).x/i.x),Math.ceil(t.project([0,e.wrapLng[1]],o).x/i.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],o).y/i.x),Math.ceil(t.project([e.wrapLat[1],0],o).y/i.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,i=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),o=e.getZoomScale(i,this._tileZoom),n=e.project(t,this._tileZoom).floor(),s=e.getSize().divideBy(2*o);return new B(n.subtract(s),n.add(s))},_update:function(t){var e=this._map;if(e){var i=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var o=this._getTiledPixelBounds(t),n=this._pxBoundsToTileRange(o),s=n.getCenter(),r=[],a=this.options.keepBuffer,l=new B(n.getBottomLeft().subtract([a,-a]),n.getTopRight().add([a,-a]));if(!(isFinite(n.min.x)&&isFinite(n.min.y)&&isFinite(n.max.x)&&isFinite(n.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var h in this._tiles){var c=this._tiles[h].coords;c.z===this._tileZoom&&l.contains(new D(c.x,c.y))||(this._tiles[h].current=!1)}if(Math.abs(i-this._tileZoom)>1)this._setView(t,i);else{for(var u=n.min.y;u<=n.max.y;u++)for(var p=n.min.x;p<=n.max.x;p++){var d=new D(p,u);if(d.z=this._tileZoom,this._isValidTile(d)){var m=this._tiles[this._tileCoordsToKey(d)];m?m.current=!0:r.push(d)}}if(r.sort(function(t,e){return t.distanceTo(s)-e.distanceTo(s)}),0!==r.length){this._loading||(this._loading=!0,this.fire("loading"));var f=document.createDocumentFragment();for(p=0;p<r.length;p++)this._addTile(r[p],f);this._level.el.appendChild(f)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var i=this._globalTileRange;if(!e.wrapLng&&(t.x<i.min.x||t.x>i.max.x)||!e.wrapLat&&(t.y<i.min.y||t.y>i.max.y))return!1}if(!this.options.bounds)return!0;var o=this._tileCoordsToBounds(t);return Z(this.options.bounds).overlaps(o)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),o=t.scaleBy(i),n=o.add(i);return[e.unproject(o,t.z),e.unproject(n,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new R(e[0],e[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new D(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(ge(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){xe(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=h,t.onmousemove=h,Rt.ielt9&&this.options.opacity<1&&Me(t,this.options.opacity)},_addTile:function(t,e){var i=this._getTilePos(t),o=this._tileCoordsToKey(t),s=this.createTile(this._wrapCoords(t),n(this._tileReady,this,t));this._initTile(s),this.createTile.length<2&&C(n(this._tileReady,this,t,null,s)),Se(s,i),this._tiles[o]={el:s,coords:t,current:!0},e.appendChild(s),this.fire("tileloadstart",{tile:s,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var o=this._tileCoordsToKey(t);(i=this._tiles[o])&&(i.loaded=+new Date,this._map._fadeAnimated?(Me(i.el,0),T(this._fadeFrame),this._fadeFrame=C(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(xe(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Rt.ielt9||!this._map._fadeAnimated?C(this._pruneTiles,this):setTimeout(n(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new D(this._wrapX?l(t.x,this._wrapX):t.x,this._wrapY?l(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new B(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function Uo(t){return new Zo(t)}var No=Zo.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,(e=d(this,e)).detectRetina&&Rt.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var i=document.createElement("img");return Ze(i,"load",n(this._tileOnLoad,this,e,i)),Ze(i,"error",n(this._tileOnError,this,e,i)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(i.referrerPolicy=this.options.referrerPolicy),i.alt="",i.src=this.getTileUrl(t),i},getTileUrl:function(t){var e={r:Rt.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var o=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=o),e["-y"]=o}return g(this._url,i(e,this.options))},_tileOnLoad:function(t,e){Rt.ielt9?setTimeout(n(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var o=this.options.errorTileUrl;o&&e.getAttribute("src")!==o&&(e.src=o),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=h,e.onerror=h,!e.complete)){e.src=v;var i=this._tiles[t].coords;ge(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:i})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",v),Zo.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(this._map&&(!i||i.getAttribute("src")!==v))return Zo.prototype._tileReady.call(this,t,e,i)}});function jo(t,e){return new No(t,e)}var Ho=No.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 o=i({},this.defaultWmsParams);for(var n in e)n in this.options||(o[n]=e[n]);var s=(e=d(this,e)).detectRetina&&Rt.retina?2:1,r=this.getTileSize();o.width=r.x*s,o.height=r.y*s,this.wmsParams=o},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,No.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,o=F(i.project(e[0]),i.project(e[1])),n=o.min,s=o.max,r=(this._wmsVersion>=1.3&&this._crs===Vi?[n.y,n.x,s.y,s.x]:[n.x,n.y,s.x,s.y]).join(","),a=No.prototype.getTileUrl.call(this,t);return a+m(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(t,e){return i(this.wmsParams,t),e||this.redraw(),this}});function Go(t,e){return new Ho(t,e)}No.WMS=Ho,jo.wms=Go;var Vo=qi.extend({options:{padding:.1},initialize:function(t){d(this,t),r(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),xe(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 i=this._map.getZoomScale(e,this._zoom),o=this._map.getSize().multiplyBy(.5+this.options.padding),n=this._map.project(this._center,e),s=o.multiplyBy(-i).add(n).subtract(this._map._getNewPixelOrigin(t,e));Rt.any3d?Pe(this._container,s,i):Se(this._container,s)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new B(i,i.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Wo=Vo.extend({options:{tolerance:0},getEvents:function(){var t=Vo.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Vo.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Ze(t,"mousemove",this._onMouseMove,this),Ze(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ze(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){T(this._redrawRequest),delete this._ctx,ge(this._container),Ne(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){Vo.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),o=Rt.retina?2:1;Se(e,t.min),e.width=o*i.x,e.height=o*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",Rt.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){Vo.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[r(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,i=e.next,o=e.prev;i?i.prev=o:this._drawLast=o,o?o.next=i:this._drawFirst=i,delete t._order,delete this._layers[r(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var e,i,o=t.options.dashArray.split(/[, ]+/),n=[];for(i=0;i<o.length;i++){if(e=Number(o[i]),isNaN(e))return;n.push(e)}t.options._dashArray=n}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||C(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new B,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var i=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,i.x,i.y),this._ctx.clip()}this._drawing=!0;for(var o=this._drawFirst;o;o=o.next)t=o.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var i,o,n,s,r=t._parts,a=r.length,l=this._ctx;if(a){for(l.beginPath(),i=0;i<a;i++){for(o=0,n=r[i].length;o<n;o++)s=r[i][o],l[o?"lineTo":"moveTo"](s.x,s.y);e&&l.closePath()}this._fillStroke(l,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,i=this._ctx,o=Math.max(Math.round(t._radius),1),n=(Math.max(Math.round(t._radiusY),1)||o)/o;1!==n&&(i.save(),i.scale(1,n)),i.beginPath(),i.arc(e.x,e.y/n,o,0,2*Math.PI,!1),1!==n&&i.restore(),this._fillStroke(i,t)}},_fillStroke:function(t,e){var i=e.options;i.fill&&(t.globalAlpha=i.fillOpacity,t.fillStyle=i.fillColor||i.color,t.fill(i.fillRule||"evenodd")),i.stroke&&0!==i.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=i.opacity,t.lineWidth=i.weight,t.strokeStyle=i.color,t.lineCap=i.lineCap,t.lineJoin=i.lineJoin,t.stroke())},_onClick:function(t){for(var e,i,o=this._map.mouseEventToLayerPoint(t),n=this._drawFirst;n;n=n.next)(e=n.layer).options.interactive&&e._containsPoint(o)&&("click"!==t.type&&"preclick"!==t.type||!this._map._draggableMoved(e))&&(i=e);this._fireEvent(!!i&&[i],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&&(Le(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,e){if(!this._mouseHoverThrottled){for(var i,o,s=this._drawFirst;s;s=s.next)(i=s.layer).options.interactive&&i._containsPoint(e)&&(o=i);o!==this._hoveredLayer&&(this._handleMouseOut(t),o&&(xe(this._container,"leaflet-interactive"),this._fireEvent([o],t,"mouseover"),this._hoveredLayer=o)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(n(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(t,e,i){this._map._fireDOMEvent(e,i||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var i=e.next,o=e.prev;i&&(i.prev=o,o?o.next=i:i&&(this._drawFirst=i),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 i=e.next,o=e.prev;o&&(o.next=i,i?i.prev=o:o&&(this._drawLast=o),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}});function qo(t){return Rt.canvas?new Wo(t):null}var $o=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">')}}(),Ko={_initContainer:function(){this._container=fe("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Vo.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=$o("shape");xe(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=$o("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[r(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;ge(e),t.removeInteractiveTarget(e),delete this._layers[r(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,o=t.options,n=t._container;n.stroked=!!o.stroke,n.filled=!!o.fill,o.stroke?(e||(e=t._stroke=$o("stroke")),n.appendChild(e),e.weight=o.weight+"px",e.color=o.color,e.opacity=o.opacity,o.dashArray?e.dashStyle=_(o.dashArray)?o.dashArray.join(" "):o.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=o.lineCap.replace("butt","flat"),e.joinstyle=o.lineJoin):e&&(n.removeChild(e),t._stroke=null),o.fill?(i||(i=t._fill=$o("fill")),n.appendChild(i),i.color=o.fillColor||o.color,i.opacity=o.fillOpacity):i&&(n.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),o=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+o+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){ye(t._container)},_bringToBack:function(t){ve(t._container)}},Jo=Rt.vml?$o:Y,Yo=Vo.extend({_initContainer:function(){this._container=Jo("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Jo("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ge(this._container),Ne(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){Vo.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),Se(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=Jo("path");t.options.className&&xe(e,t.options.className),t.options.interactive&&xe(e,"leaflet-interactive"),this._updateStyle(t),this._layers[r(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ge(t._path),t.removeInteractiveTarget(t._path),delete this._layers[r(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,i=t.options;e&&(i.stroke?(e.setAttribute("stroke",i.color),e.setAttribute("stroke-opacity",i.opacity),e.setAttribute("stroke-width",i.weight),e.setAttribute("stroke-linecap",i.lineCap),e.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?e.setAttribute("stroke-dasharray",i.dashArray):e.removeAttribute("stroke-dasharray"),i.dashOffset?e.setAttribute("stroke-dashoffset",i.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),i.fill?(e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,X(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),o="a"+i+","+(Math.max(Math.round(t._radiusY),1)||i)+" 0 1,0 ",n=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+o+2*i+",0 "+o+2*-i+",0 ";this._setPath(t,n)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){ye(t._path)},_bringToBack:function(t){ve(t._path)}});function Xo(t){return Rt.svg||Rt.vml?new Yo(t):null}Rt.vml&&Yo.include(Ko),ni.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&&qo(t)||Xo(t)}});var Qo=uo.extend({initialize:function(t,e){uo.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=Z(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function tn(t,e){return new Qo(t,e)}Yo.create=Jo,Yo.pointsToPath=X,mo.geometryToLayer=fo,mo.coordsToLatLng=_o,mo.coordsToLatLngs=yo,mo.latLngToCoords=vo,mo.latLngsToCoords=bo,mo.getFeature=xo,mo.asFeature=Lo,ni.mergeOptions({boxZoom:!0});var en=_i.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){Ze(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Ne(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ge(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),se(),Ee(),this._startPoint=this._map.mouseEventToContainerPoint(t),Ze(document,{contextmenu:Je,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=fe("div","leaflet-zoom-box",this._container),xe(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new B(this._point,this._startPoint),i=e.getSize();Se(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(ge(this._box),Le(this._container,"leaflet-crosshair")),re(),De(),Ne(document,{contextmenu:Je,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(n(this._resetState,this),0);var e=new R(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});ni.addInitHook("addHandler","boxZoom",en),ni.mergeOptions({doubleClickZoom:!0});var on=_i.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,i=e.getZoom(),o=e.options.zoomDelta,n=t.originalEvent.shiftKey?i-o:i+o;"center"===e.options.doubleClickZoom?e.setZoom(n):e.setZoomAround(t.containerPoint,n)}});ni.addInitHook("addHandler","doubleClickZoom",on),ni.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var nn=_i.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new bi(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))}xe(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Le(this._map._container,"leaflet-grab"),Le(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=Z(this._map.options.maxBounds);this._offsetLimit=F(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,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),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),i=this._initialWorldOffset,o=this._draggable._newPos.x,n=(o-e+i)%t+e-i,s=(o+e+i)%t-e-i,r=Math.abs(n+i)<Math.abs(s+i)?n:s;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=r},_onDragEnd:function(t){var e=this._map,i=e.options,o=!i.inertia||t.noInertia||this._times.length<2;if(e.fire("dragend",t),o)e.fire("moveend");else{this._prunePositions(+new Date);var n=this._lastPos.subtract(this._positions[0]),s=(this._lastTime-this._times[0])/1e3,r=i.easeLinearity,a=n.multiplyBy(r/s),l=a.distanceTo([0,0]),h=Math.min(i.inertiaMaxSpeed,l),c=a.multiplyBy(h/l),u=h/(i.inertiaDeceleration*r),p=c.multiplyBy(-u/2).round();p.x||p.y?(p=e._limitOffset(p,e.options.maxBounds),C(function(){e.panBy(p,{duration:u,easeLinearity:r,noMoveStart:!0,animate:!0})})):e.fire("moveend")}}});ni.addInitHook("addHandler","dragging",nn),ni.mergeOptions({keyboard:!0,keyboardPanDelta:80});var sn=_i.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),Ze(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Ne(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,i=t.scrollTop||e.scrollTop,o=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(o,i)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,i,o=this._panKeys={},n=this.keyCodes;for(e=0,i=n.left.length;e<i;e++)o[n.left[e]]=[-1*t,0];for(e=0,i=n.right.length;e<i;e++)o[n.right[e]]=[t,0];for(e=0,i=n.down.length;e<i;e++)o[n.down[e]]=[0,t];for(e=0,i=n.up.length;e<i;e++)o[n.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,i,o=this._zoomKeys={},n=this.keyCodes;for(e=0,i=n.zoomIn.length;e<i;e++)o[n.zoomIn[e]]=t;for(e=0,i=n.zoomOut.length;e<i;e++)o[n.zoomOut[e]]=-t},_addHooks:function(){Ze(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Ne(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,i=t.keyCode,o=this._map;if(i in this._panKeys){if(!o._panAnim||!o._panAnim._inProgress)if(e=this._panKeys[i],t.shiftKey&&(e=z(e).multiplyBy(3)),o.options.maxBounds&&(e=o._limitOffset(z(e),o.options.maxBounds)),o.options.worldCopyJump){var n=o.wrapLatLng(o.unproject(o.project(o.getCenter()).add(e)));o.panTo(n)}else o.panBy(e)}else if(i in this._zoomKeys)o.setZoom(o.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[i]);else{if(27!==i||!o._popup||!o._popup.options.closeOnEscapeKey)return;o.closePopup()}Je(t)}}});ni.addInitHook("addHandler","keyboard",sn),ni.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var rn=_i.extend({addHooks:function(){Ze(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Ne(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=ti(t),i=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var o=Math.max(i-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(n(this._performZoom,this),o),Je(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),i=this._map.options.zoomSnap||0;t._stop();var o=this._delta/(4*this._map.options.wheelPxPerZoomLevel),n=4*Math.log(2/(1+Math.exp(-Math.abs(o))))/Math.LN2,s=i?Math.ceil(n/i)*i:n,r=t._limitZoom(e+(this._delta>0?s:-s))-e;this._delta=0,this._startTime=null,r&&("center"===t.options.scrollWheelZoom?t.setZoom(e+r):t.setZoomAround(this._lastMousePos,e+r))}});ni.addInitHook("addHandler","scrollWheelZoom",rn);var an=600;ni.mergeOptions({tapHold:Rt.touchNative&&Rt.safari&&Rt.mobile,tapTolerance:15});var ln=_i.extend({addHooks:function(){Ze(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Ne(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),1===t.touches.length){var e=t.touches[0];this._startPos=this._newPos=new D(e.clientX,e.clientY),this._holdTimeout=setTimeout(n(function(){this._cancel(),this._isTapValid()&&(Ze(document,"touchend",Ke),Ze(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))},this),an),Ze(document,"touchend touchcancel contextmenu",this._cancel,this),Ze(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){Ne(document,"touchend",Ke),Ne(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),Ne(document,"touchend touchcancel contextmenu",this._cancel,this),Ne(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new D(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var i=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});i._simulated=!0,e.target.dispatchEvent(i)}});ni.addInitHook("addHandler","tapHold",ln),ni.mergeOptions({touchZoom:Rt.touch,bounceAtZoomLimits:!0});var hn=_i.extend({addHooks:function(){xe(this._map._container,"leaflet-touch-zoom"),Ze(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Le(this._map._container,"leaflet-touch-zoom"),Ne(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 i=e.mouseEventToContainerPoint(t.touches[0]),o=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(i.add(o)._divideBy(2))),this._startDist=i.distanceTo(o),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),Ze(document,"touchmove",this._onTouchMove,this),Ze(document,"touchend touchcancel",this._onTouchEnd,this),Ke(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),o=e.mouseEventToContainerPoint(t.touches[1]),s=i.distanceTo(o)/this._startDist;if(this._zoom=e.getScaleZoom(s,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMin
13Zoom()&&s<1||this._zoom>e.getMaxZoom()&&s>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===s)return}else{var r=i._add(o)._divideBy(2)._subtract(this._centerPoint);if(1===s&&0===r.x&&0===r.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(r),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),T(this._animRequest);var a=n(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=C(a,this,!0),Ke(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,T(this._animRequest),Ne(document,"touchmove",this._onTouchMove,this),Ne(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});ni.addInitHook("addHandler","touchZoom",hn),ni.BoxZoom=en,ni.DoubleClickZoom=on,ni.Drag=nn,ni.Keyboard=sn,ni.ScrollWheelZoom=rn,ni.TapHold=ln,ni.TouchZoom=hn,t.Bounds=B,t.Browser=Rt,t.CRS=H,t.Canvas=Wo,t.Circle=ao,t.CircleMarker=so,t.Class=S,t.Control=ri,t.DivIcon=Fo,t.DivOverlay=Eo,t.DomEvent=ii,t.DomUtil=Re,t.Draggable=bi,t.Evented=E,t.FeatureGroup=Ji,t.GeoJSON=mo,t.GridLayer=Zo,t.Handler=_i,t.Icon=Xi,t.ImageOverlay=Co,t.LatLng=U,t.LatLngBounds=R,t.Layer=qi,t.LayerGroup=$i,t.LineUtil=Ui,t.Map=ni,t.Marker=io,t.Mixin=yi,t.Path=no,t.Point=D,t.PolyUtil=Mi,t.Polygon=uo,t.Polyline=ho,t.Popup=Do,t.PosAnimation=oi,t.Projection=Hi,t.Rectangle=Qo,t.Renderer=Vo,t.SVG=Yo,t.SVGOverlay=Ao,t.TileLayer=No,t.Tooltip=zo,t.Transformation=q,t.Util=P,t.VideoOverlay=Po,t.bind=n,t.bounds=F,t.canvas=qo,t.circle=lo,t.circleMarker=ro,t.control=ai,t.divIcon=Ro,t.extend=i,t.featureGroup=Yi,t.geoJSON=ko,t.geoJson=Mo,t.gridLayer=Uo,t.icon=Qi,t.imageOverlay=To,t.latLng=N,t.latLngBounds=Z,t.layerGroup=Ki,t.map=si,t.marker=oo,t.point=z,t.polygon=po,t.polyline=co,t.popup=Io,t.rectangle=tn,t.setOptions=d,t.stamp=r,t.svg=Xo,t.svgOverlay=Oo,t.tileLayer=jo,t.tooltip=Bo,t.transformation=$,t.version=e,t.videoOverlay=So;var cn=window.L;t.noConflict=function(){return window.L=cn,this},window.L=t}(e)}},e={};function i(o){var n=e[o];if(void 0!==n)return n.exports;var s=e[o]={exports:{}};return t[o].call(s.exports,s,s.exports,i),s.exports}i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,{a:e}),e},i.d=function(t,e){for(var o in e)i.o(e,o)&&!i.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";function t(t){t=t||{},this.settings={timeMovingThreshold:t.timeMovingThreshold||15e3,eleGainThreshold:t.eleGainThreshold||5},this.xml=null,this.metadata={},this.waypoints=[],this.routes=[],this.tracks=[]}t.prototype.parse=function(t){var e=this,i=new DOMParser;this.xml=i.parseFromString(t,"text/xml");var o=this.xml.querySelector("metadata");null!==o&&(this.metadata=this.parseMetadataType(o));for(var n=[].slice.call(this.xml.querySelectorAll("wpt")),s=0;s<n.length;s++){var r=n[s],a=e.parseWptType(r,!0);e.waypoints.push(a)}for(var l=[].slice.call(this.xml.querySelectorAll("rte")),h=0;h<l.length;h++){var c=l[h],u=e.parseRteType(c);if(!u.points.length)return;u.time=e.calcTime(u.points),u.distance=e.calcDistance(u.points),u.elevation=e.calcElevation(u.points),u.heartRate=e.calcHeartRate(u.points),e.routes.push(u)}for(var p=[].slice.call(this.xml.querySelectorAll("trk")),d=0;d<p.length;d++){var m=p[d],f=e.parseTrkType(m);if(!f.points.length)return;f.time=e.calcTime(f.points),f.distance=e.calcDistance(f.points),f.elevation=e.calcElevation(f.points),f.heartRate=e.calcHeartRate(f.points),e.tracks.push(f)}},t.prototype.getFirstTagValue=function(t,e){var i=t.querySelectorAll(e);return i.length?i[0].textContent:null},t.prototype.getFirstTagValueNs=function(t,e,i){var o=t.getElementsByTagNameNS(e,i);return o.length?o[0].textContent:null},t.prototype.getTpxValue=function(t,e){var i=this.getFirstTagValueNs(t,"http://www.garmin.com/xmlschemas/TrackPointExtension/v1",e);return null===i&&(i=this.getFirstTagValueNs(t,"http://www.garmin.com/xmlschemas/TrackPointExtension/v2",e)),i},t.prototype.parseLinks=function(t){for(var e=[],i=[].slice.call(t.querySelectorAll("link")),o=0;o<i.length;o++){var n=i[o],s=this.parseLinkType(n);e.push(s)}return e},t.prototype.parseRtepts=function(t){for(var e=[],i=[].slice.call(t.querySelectorAll("rtept")),o=0;o<i.length;o++){var n=i[o],s=this.parseWptType(n,!1);e.push(s)}return e},t.prototype.parseTrkpts=function(t){for(var e=[],i=[].slice.call(t.querySelectorAll("trkpt")),o=0;o<i.length;o++){var n=i[o],s=this.parseWptType(n,!1);e.push(s)}return e},t.prototype.parseTrksegs=function(t){for(var e=this,i=[],o=[].slice.call(t.querySelectorAll("trkseg")),n=0;n<o.length;n++){var s=o[n],r=e.parseTrksegType(s,!1);r.time=e.calcTime(r.points),r.distance=e.calcDistance(r.points),r.elevation=e.calcElevation(r.points),r.heartRate=e.calcHeartRate(r.points),i.push(r)}return i},t.prototype.parseWptTypeExtensions=function(t){return{tpx:this.parseTrackPointExtensionType(t)}},t.prototype.parseLinkType=function(t){return{href:t.getAttribute("href"),text:this.getFirstTagValue(t,"text"),type:this.getFirstTagValue(t,"type")}},t.prototype.parseMetadataType=function(t){return{name:this.getFirstTagValue(t,"name"),desc:this.getFirstTagValue(t,"de
vendor: 8,464 bytes, lines 13-20
13sc"),time:Date.parse(this.getFirstTagValue(t,"time")),links:this.parseLinks(t)}},t.prototype.parseWptType=function(t,e){var i={lat:parseFloat(t.getAttribute("lat")),lon:parseFloat(t.getAttribute("lon")),ele:parseFloat(this.getFirstTagValue(t,"ele")),time:Date.parse(this.getFirstTagValue(t,"time")),extension:this.parseWptTypeExtensions(t)};return e&&(i.name=this.getFirstTagValue(t,"name"),i.cmt=this.getFirstTagValue(t,"cmt"),i.desc=this.getFirstTagValue(t,"desc"),i.links=this.parseLinks(t)),i},t.prototype.parseRteType=function(t){return{name:this.getFirstTagValue(t,"name"),cmt:this.getFirstTagValue(t,"cmt"),desc:this.getFirstTagValue(t,"desc"),src:this.getFirstTagValue(t,"src"),number:this.getFirstTagValue(t,"number"),type:this.getFirstTagValue(t,"type"),links:this.parseLinks(t),points:this.parseRtepts(t),extensions:this.parseMmpExtensionType(t,["color","weight","opacity"])}},t.prototype.parseTrkType=function(t){return{name:this.getFirstTagValue(t,"name"),cmt:this.getFirstTagValue(t,"cmt"),desc:this.getFirstTagValue(t,"desc"),src:this.getFirstTagValue(t,"src"),number:this.getFirstTagValue(t,"number"),type:this.getFirstTagValue(t,"type"),links:this.parseLinks(t),points:this.parseTrkpts(t),segments:this.parseTrksegs(t),extensions:this.parseMmpExtensionType(t,["color","weight","opacity"])}},t.prototype.parseTrksegType=function(t){return{points:this.parseTrkpts(t),extensions:this.parseMmpExtensionType(t,["color","weight","opacity"])}},t.prototype.parseMmpExtensionType=function(t,e){var i=t.querySelector("extensions");if(null===i||i.parentNode!==t)return{};for(var o={},n=0;n<e.length;n++){var s=e[n];o[s]=this.getFirstTagValueNs(i,"https://www.mapsmarker.com/GPX/1/",s)}return o},t.prototype.parseTrackPointExtensionType=function(t){var e=t.querySelector("TrackPointExtension");return null===e?{}:{atemp:parseFloat(this.getTpxValue(e,"atemp")),wtemp:parseFloat(this.getTpxValue(e,"wtemp")),depth:parseFloat(this.getTpxValue(e,"depth")),hr:parseInt(this.getTpxValue(e,"hr")),cad:parseInt(this.getTpxValue(e,"cad")),speed:parseFloat(this.getTpxValue(e,"speed")),course:parseFloat(this.getTpxValue(e,"course")),bearing:parseFloat(this.getTpxValue(e,"bearing"))}},t.prototype.calcTime=function(t){var e=0,i=0;t[0].elapsed=e;for(var o=0;o<t.length-1;o++){var n=t[o+1].time-t[o].time;isNaN(n)||(e+=n,n<this.settings.timeMovingThreshold&&(i+=n)),t[o+1].elapsed=e}return{start:t[0].time,end:t[t.length-1].time,total:e,moving:i}},t.prototype.calcDistance=function(t){var e=0;t[0].dist=e;for(var i=0;i<t.length-1;i++){e+=this.calcDistanceBetween(t[i],t[i+1]),t[i+1].dist=e}return{total:e}},t.prototype.calcDistanceBetween=function(t,e){var i=Math.PI/180,o=t.lat*i,n=e.lat*i,s=Math.sin((e.lat-t.lat)*i/2),r=Math.sin((e.lon-t.lon)*i/2),a=s*s+Math.cos(o)*Math.cos(n)*r*r;return 6371e3*(2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a)))},t.prototype.calcElevation=function(t){for(var e=[],i=0,o=0,n=null,s=0;s<t.length;s++){var r=t[s].ele;if(isNaN(r))t[s].gain=Math.abs(i),t[s].loss=Math.abs(o);else if(null!==n){var a=r-n;Math.abs(a)>=5&&(a>0?i+=a:a<0&&(o+=a),n=r,e.push(r)),t[s].gain=Math.abs(i),t[s].loss=Math.abs(o)}else e.push(r),n=r,t[s].gain=Math.abs(i),t[s].loss=Math.abs(o)}return{max:Math.max.apply(null,e),min:Math.min.apply(null,e),gain:Math.abs(i),loss:Math.abs(o),avg:e.reduce(function(t,e){return t+e},0)/e.length}},t.prototype.calcHeartRate=function(t){for(var e=[],i=0;i<t.length;i++){var o=t[i].extension;void 0!==o.tpx&&o.tpx.hr&&e.push(o.tpx.hr)}return{max:Math.max.apply(null,e),min:Math.min.apply(null,e),avg:e.reduce(function(t,e){return t+e},0)/e.length}};var e=t;
14/*!
15 * @kurkle/color v0.3.4
16 * https://github.com/kurkle/color#readme
17 * (c) 2024 Jukka Kurkela
18 * Released under the MIT License
19 */
20function o(t){return t+.5|0}const n=(t,e,i)=>Math.max(Math.min(t,i),e);function s(t){return n(o(2.55*t),0,255)}function r(t){return n(o(255*t),0,255)}function a(t){return n(o(t/2.55)/100,0,1)}function l(t){return n(o(100*t),0,100)}const h={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},c=[..."0123456789ABCDEF"],u=t=>c[15&t],p=t=>c[(240&t)>>4]+c[15&t],d=t=>(240&t)>>4==(15&t);function m(t){var e=(t=>d(t.r)&&d(t.g)&&d(t.b)&&d(t.a))(t)?u:p;return t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0}const f=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function g(t,e,i){const o=e*Math.min(i,1-i),n=(e,n=(e+t/30)%12)=>i-o*Math.max(Math.min(n-3,9-n,1),-1);return[n(0),n(8),n(4)]}function _(t,e,i){const o=(o,n=(o+t/60)%6)=>i-i*e*Math.max(Math.min(n,4-n,1),0);return[o(5),o(3),o(1)]}function y(t,e,i){const o=g(t,1,.5);let n;for(e+i>1&&(n=1/(e+i),e*=n,i*=n),n=0;n<3;n++)o[n]*=1-e-i,o[n]+=e;return o}function v(t){const e=t.r/255,i=t.g/255,o=t.b/255,n=Math.max(e,i,o),s=Math.min(e,i,o),r=(n+s)/2;let a,l,h;return n!==s&&(h=n-s,l=r>.5?h/(2-n-s):h/(n+s),a=function(t,e,i,o,n){return t===n?(e-i)/o+(e<i?6:0):e===n?(i-t)/o+2:(t-e)/o+4}(e,i,o,h,n),a=60*a+.5),[0|a,l||0,r]}function b(t,e,i,o){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,o)).map(r)}function x(t,e,i){return b(g,t,e,i)}function L(t){return(t%360+360)%360}function w(t){const e=f.exec(t);let i,o=255;if(!e)return;e[5]!==i&&(o=e[6]?s(+e[5]):r(+e[5]));const n=L(+e[2]),a=+e[3]/100,l=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return b(y,t,e,i)}(n,a,l):"hsv"===e[1]?function(t,e,i){return b(_,t,e,i)}(n,a,l):x(n,a,l),{r:i[0],g:i[1],b:i[2],a:o}}const k={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},M={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let C;function T(t){C||(C=function(){const t={},e=Object.keys(M),i=Object.keys(k);let o,n,s,r,a;for(o=0;o<e.length;o++){for(r=a=e[o],n=0;n<i.length;n++)s=i[n],a=a.replace(s,k[s]);s=parseInt(M[r],16),t[a]=[s>>16&255,s>>8&255,255&s]}return t}(),C.transparent=[0,0,0,0]);const e=C[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}const P=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const S=t=>
vendor: 5,518 bytes, lines 20-27
20t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,A=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function O(t,e,i){if(t){let o=v(t);o[e]=Math.max(0,Math.min(o[e]+o[e]*i,0===e?360:1)),o=x(o),t.r=o[0],t.g=o[1],t.b=o[2]}}function E(t,e){return t?Object.assign(e||{},t):t}function D(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=r(t[3]))):(e=E(t,{r:0,g:0,b:0,a:1})).a=r(e.a),e}function I(t){return"r"===t.charAt(0)?function(t){const e=P.exec(t);let i,o,r,a=255;if(e){if(e[7]!==i){const t=+e[7];a=e[8]?s(t):n(255*t,0,255)}return i=+e[1],o=+e[3],r=+e[5],i=255&(e[2]?s(i):n(i,0,255)),o=255&(e[4]?s(o):n(o,0,255)),r=255&(e[6]?s(r):n(r,0,255)),{r:i,g:o,b:r,a:a}}}(t):w(t)}class z{constructor(t){if(t instanceof z)return t;const e=typeof t;let i;var o,n,s;"object"===e?i=D(t):"string"===e&&(s=(o=t).length,"#"===o[0]&&(4===s||5===s?n={r:255&17*h[o[1]],g:255&17*h[o[2]],b:255&17*h[o[3]],a:5===s?17*h[o[4]]:255}:7!==s&&9!==s||(n={r:h[o[1]]<<4|h[o[2]],g:h[o[3]]<<4|h[o[4]],b:h[o[5]]<<4|h[o[6]],a:9===s?h[o[7]]<<4|h[o[8]]:255})),i=n||T(t)||I(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=E(this._rgb);return t&&(t.a=a(t.a)),t}set rgb(t){this._rgb=D(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${a(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0;var t}hexString(){return this._valid?m(this._rgb):void 0}hslString(){return this._valid?function(t){if(!t)return;const e=v(t),i=e[0],o=l(e[1]),n=l(e[2]);return t.a<255?`hsla(${i}, ${o}%, ${n}%, ${a(t.a)})`:`hsl(${i}, ${o}%, ${n}%)`}(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,o=t.rgb;let n;const s=e===n?.5:e,r=2*s-1,a=i.a-o.a,l=((r*a===-1?r:(r+a)/(1+r*a))+1)/2;n=1-l,i.r=255&l*i.r+n*o.r+.5,i.g=255&l*i.g+n*o.g+.5,i.b=255&l*i.b+n*o.b+.5,i.a=s*i.a+(1-s)*o.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,i){const o=A(a(t.r)),n=A(a(t.g)),s=A(a(t.b));return{r:r(S(o+i*(A(a(e.r))-o))),g:r(S(n+i*(A(a(e.g))-n))),b:r(S(s+i*(A(a(e.b))-s))),a:t.a+i*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new z(this.rgb)}alpha(t){return this._rgb.a=r(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=o(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return O(this._rgb,2,t),this}darken(t){return O(this._rgb,2,-t),this}saturate(t){return O(this._rgb,1,t),this}desaturate(t){return O(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=v(t);i[0]=L(i[0]+e),i=x(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}
21/*!
22 * Chart.js v4.5.1
23 * https://www.chartjs.org
24 * (c) 2025 Chart.js Contributors
25 * Released under the MIT License
26 */
27function B(){}const F=(()=>{let t=0;return()=>t++})();function R(t){return null==t}function Z(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function U(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function N(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function j(t,e){return N(t)?t:e}function H(t,e){return void 0===t?e:t}const G=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function V(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function W(t,e,i,o){let n,s,r;if(Z(t))if(s=t.length,o)for(n=s-1;n>=0;n--)e.call(i,t[n],n);else for(n=0;n<s;n++)e.call(i,t[n],n);else if(U(t))for(r=Object.keys(t),s=r.length,n=0;n<s;n++)e.call(i,t[r[n]],r[n])}function q(t,e){let i,o,n,s;if(!t||!e||t.length!==e.length)return!1;for(i=0,o=t.length;i<o;++i)if(n=t[i],s=e[i],n.datasetIndex!==s.datasetIndex||n.index!==s.index)return!1;return!0}function $(t){if(Z(t))return t.map($);if(U(t)){const e=Object.create(null),i=Object.keys(t),o=i.length;let n=0;for(;n<o;++n)e[i[n]]=$(t[i[n]]);return e}return t}function K(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function J(t,e,i,o){if(!K(t))return;const n=e[t],s=i[t];U(n)&&U(s)?Y(n,s,o):e[t]=$(s)}function Y(t,e,i){const o=Z(e)?e:[e],n=o.length;if(!U(t))return t;const s=(i=i||{}).merger||J;let r;for(let e=0;e<n;++e){if(r=o[e],!U(r))continue;const n=Object.keys(r);for(let e=0,o=n.length;e<o;++e)s(n[e],t,r,i)}return t}function X(t,e){return Y(t,e,{merger:Q})}function Q(t,e,i){if(!K(t))return;const o=e[t],n=i[t];U(o)&&U(n)?X(o,n):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=$(n))}const tt={"":t=>t,x:t=>t.x,y:t=>t.y};function et(t,e){const i=tt[e]||(tt[e]=function(t){const e=function(t){const e=t.split("."),i=[];let o="";for(const t of e)o+=t,o.endsWith("\\")?o=o.slice(0,-1)+".":(i.push(o),o="");return i}(t);return t=>{for(const i of e){if(""===i)break;t=t&&t[i]}return t}}(e));return i(t)}function it(t){return t.charAt(0).toUpperCase()+t.slice(1)}const ot=t=>void 0!==t,nt=t=>"function"==typeof t,st=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0};const rt=Math.PI,at=2*rt,lt=at+rt,ht=Number.POSITIVE_INFINITY,ct=rt/180,ut=rt/2,pt=rt/4,dt=2*rt/3,mt=Math.log10,ft=Math.sign;function gt(t,e,i){return Math.abs(t-e)<i}function _t(t){const e=Math.round(t);t=gt(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(mt(t))),o=t/i;return(o<=1?1:o<=2?2:o<=5?5:10)*i}function yt(t){return!function(t){return"symbol"==typeof t||"object"==typeof t&&null!==t&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}(t)&&!isNaN(parseFloat(t))&&isFinite(t)}
vendor: 6,123 bytes, line 27
27function vt(t,e,i){let o,n,s;for(o=0,n=t.length;o<n;o++)s=t[o][i],isNaN(s)||(e.min=Math.min(e.min,s),e.max=Math.max(e.max,s))}function bt(t){return t*(rt/180)}function xt(t){return t*(180/rt)}function Lt(t){if(!N(t))return;let e=1,i=0;for(;Math.round(t*e)/e!==t;)e*=10,i++;return i}function wt(t,e){const i=e.x-t.x,o=e.y-t.y,n=Math.sqrt(i*i+o*o);let s=Math.atan2(o,i);return s<-.5*rt&&(s+=at),{angle:s,distance:n}}function kt(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Mt(t,e){return(t-e+lt)%at-rt}function Ct(t){return(t%at+at)%at}function Tt(t,e,i,o){const n=Ct(t),s=Ct(e),r=Ct(i),a=Ct(s-n),l=Ct(r-n),h=Ct(n-s),c=Ct(n-r);return n===s||n===r||o&&s===r||a>l&&h<c}function Pt(t,e,i){return Math.max(e,Math.min(i,t))}function St(t,e,i,o=1e-6){return t>=Math.min(e,i)-o&&t<=Math.max(e,i)+o}function At(t,e,i){i=i||(i=>t[i]<e);let o,n=t.length-1,s=0;for(;n-s>1;)o=s+n>>1,i(o)?s=o:n=o;return{lo:s,hi:n}}const Ot=(t,e,i,o)=>At(t,i,o?o=>{const n=t[o][e];return n<i||n===i&&t[o+1][e]===i}:o=>t[o][e]<i),Et=(t,e,i)=>At(t,i,o=>t[o][e]>=i);const Dt=["push","pop","shift","splice","unshift"];function It(t,e){const i=t._chartjs;if(!i)return;const o=i.listeners,n=o.indexOf(e);-1!==n&&o.splice(n,1),o.length>0||(Dt.forEach(e=>{delete t[e]}),delete t._chartjs)}const zt="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function Bt(t,e){let i=[],o=!1;return function(...n){i=n,o||(o=!0,zt.call(window,()=>{o=!1,t.apply(e,i)}))}}const Ft=t=>"start"===t?"left":"end"===t?"right":"center",Rt=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function Zt(t,e,i){const o=e.length;let n=0,s=o;if(t._sorted){const{iScale:r,vScale:a,_parsed:l}=t,h=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,c=r.axis,{min:u,max:p,minDefined:d,maxDefined:m}=r.getUserBounds();if(d){if(n=Math.min(Ot(l,c,u).lo,i?o:Ot(e,c,r.getPixelForValue(u)).lo),h){const t=l.slice(0,n+1).reverse().findIndex(t=>!R(t[a.axis]));n-=Math.max(0,t)}n=Pt(n,0,o-1)}if(m){let t=Math.max(Ot(l,r.axis,p,!0).hi+1,i?0:Ot(e,c,r.getPixelForValue(p),!0).hi+1);if(h){const e=l.slice(t-1).findIndex(t=>!R(t[a.axis]));t+=Math.max(0,e)}s=Pt(t,n,o)-n}else s=o-n}return{start:n,count:s}}function Ut(t){const{xScale:e,yScale:i,_scaleRanges:o}=t,n={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!o)return t._scaleRanges=n,!0;const s=o.xmin!==e.min||o.xmax!==e.max||o.ymin!==i.min||o.ymax!==i.max;return Object.assign(o,n),s}const Nt=t=>0===t||1===t,jt=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*at/i),Ht=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*at/i)+1,Gt={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*ut),easeOutSine:t=>Math.sin(t*ut),easeInOutSine:t=>-.5*(Math.cos(rt*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>Nt(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>Nt(t)?t:jt(t,.075,.3),easeOutElastic:t=>Nt(t)?t:Ht(t,.075,.3),easeInOutElastic(t){const e=.1125;return Nt(t)?t:t<.5?.5*jt(2*t,e,.45):.5+.5*Ht(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-Gt.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*Gt.easeInBounce(2*t):.5*Gt.easeOutBounce(2*t-1)+.5};function Vt(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function Wt(t){return Vt(t)?t:new z(t)}function qt(t){return Vt(t)?t:new z(t).saturate(.5).darken(.1).hexString()}const $t=["x","y","borderWidth","radius","tension"],Kt=["color","borderColor","backgroundColor"];const Jt=new Map;function Yt(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let o=Jt.get(i);return o||(o=new Intl.NumberFormat(t,e),Jt.set(i,o)),o}(e,i).format(t)}const Xt={values(t){return Z(t)?t:""+t},numeric(t,e,i){if(0===t)return"0";const o=this.chart.options.locale;let n,s=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(n="scientific"),s=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const r=mt(Math.abs(s)),a=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:n,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Yt(t,o,l)},logarithmic(t,e,i){if(0===t)return"0";const o=i[e].significand||t/Math.pow(10,Math.floor(mt(t)));return[1,2,3,5,10,15].includes(o)||e>.8*i.length?Xt.numeric.call(this,t,e,i):""}};var Qt={formatters:Xt};const te=Object.create(null),ee=Object.create(null);function ie(t,e){if(!e)return t;const i=e.split(".");for(let e=0,o=i.length;e<o;++e){const o=i[e];t=t[o]||(t[o]=Object.create(null))}return t}function oe(t,e,i){return"string"==typeof e?Y(ie(t,e),i):Y(ie(t,""),e)}class ne{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={}
vendor: 4,181 bytes, line 27
27,this.hoverBackgroundColor=(t,e)=>qt(e.backgroundColor),this.hoverBorderColor=(t,e)=>qt(e.borderColor),this.hoverColor=(t,e)=>qt(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return oe(this,t,e)}get(t){return ie(this,t)}describe(t,e){return oe(ee,t,e)}override(t,e){return oe(te,t,e)}route(t,e,i,o){const n=ie(this,t),s=ie(this,i),r="_"+e;Object.defineProperties(n,{[r]:{value:n[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[r],e=s[o];return U(t)?Object.assign({},e,t):H(t,e)},set(t){this[r]=t}}})}apply(t){t.forEach(t=>t(this))}}var se=new ne({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:Kt},numbers:{type:"number",properties:$t}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Qt.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);function re(t,e,i,o,n){let s=e[n];return s||(s=e[n]=t.measureText(n).width,i.push(n)),s>o&&(o=s),o}function ae(t,e,i){const o=t.currentDevicePixelRatio,n=0!==i?Math.max(i/2,.5):0;return Math.round((e-n)*o)/o+n}function le(t,e){(e||t)&&((e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function he(t,e,i,o){ce(t,e,i,o,null)}function ce(t,e,i,o,n){let s,r,a,l,h,c,u,p;const d=e.pointStyle,m=e.rotation,f=e.radius;let g=(m||0)*ct;if(d&&"object"==typeof d&&(s=d.toString(),"[object HTMLImageElement]"===s||"[object HTMLCanvasElement]"===s))return t.save(),t.translate(i,o),t.rotate(g),t.drawImage(d,-d.width/2,-d.height/2,d.width,d.height),void t.restore();if(!(isNaN(f)||f<=0)){switch(t.beginPath(),d){default:n?t.ellipse(i,o,n/2,f,0,0,at):t.arc(i,o,f,0,at),t.closePath();break;case"triangle":c=n?n/2:f,t.moveTo(i+Math.sin(g)*c,o-Math.cos(g)*f),g+=dt,t.lineTo(i+Math.sin(g)*c,o-Math.cos(g)*f),g+=dt,t.lineTo(i+Math.sin(g)*c,o-Math.cos(g)*f),t.closePath();break;case"rectRounded":h=.516*f,l=f-h,r=Math.cos(g+pt)*l,u=Math.cos(g+pt)*(n?n/2-h:l),a=Math.sin(g+pt)*l,p=Math.sin(g+pt)*(n?n/2-h:l),t.arc(i-u,o-a,h,g-rt,g-ut),t.arc(i+p,o-r,h,g-ut,g),t.arc(i+u,o+a,h,g,g+ut),t.arc(i-p,o+r,h,g+ut,g+rt),t.closePath();break;
vendor: 12,933 bytes, line 27
27case"rect":if(!m){l=Math.SQRT1_2*f,c=n?n/2:l,t.rect(i-c,o-l,2*c,2*l);break}g+=pt;case"rectRot":u=Math.cos(g)*(n?n/2:f),r=Math.cos(g)*f,a=Math.sin(g)*f,p=Math.sin(g)*(n?n/2:f),t.moveTo(i-u,o-a),t.lineTo(i+p,o-r),t.lineTo(i+u,o+a),t.lineTo(i-p,o+r),t.closePath();break;case"crossRot":g+=pt;case"cross":u=Math.cos(g)*(n?n/2:f),r=Math.cos(g)*f,a=Math.sin(g)*f,p=Math.sin(g)*(n?n/2:f),t.moveTo(i-u,o-a),t.lineTo(i+u,o+a),t.moveTo(i+p,o-r),t.lineTo(i-p,o+r);break;case"star":u=Math.cos(g)*(n?n/2:f),r=Math.cos(g)*f,a=Math.sin(g)*f,p=Math.sin(g)*(n?n/2:f),t.moveTo(i-u,o-a),t.lineTo(i+u,o+a),t.moveTo(i+p,o-r),t.lineTo(i-p,o+r),g+=pt,u=Math.cos(g)*(n?n/2:f),r=Math.cos(g)*f,a=Math.sin(g)*f,p=Math.sin(g)*(n?n/2:f),t.moveTo(i-u,o-a),t.lineTo(i+u,o+a),t.moveTo(i+p,o-r),t.lineTo(i-p,o+r);break;case"line":r=n?n/2:Math.cos(g)*f,a=Math.sin(g)*f,t.moveTo(i-r,o-a),t.lineTo(i+r,o+a);break;case"dash":t.moveTo(i,o),t.lineTo(i+Math.cos(g)*(n?n/2:f),o+Math.sin(g)*f);break;case!1:t.closePath()}t.fill(),e.borderWidth>0&&t.stroke()}}function ue(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i}function pe(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function de(t){t.restore()}function me(t,e,i,o,n){if(!e)return t.lineTo(i.x,i.y);if("middle"===n){const o=(e.x+i.x)/2;t.lineTo(o,e.y),t.lineTo(o,i.y)}else"after"===n!=!!o?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}function fe(t,e,i,o){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(o?e.cp1x:e.cp2x,o?e.cp1y:e.cp2y,o?i.cp2x:i.cp1x,o?i.cp2y:i.cp1y,i.x,i.y)}function ge(t,e,i,o,n){if(n.strikethrough||n.underline){const s=t.measureText(o),r=e-s.actualBoundingBoxLeft,a=e+s.actualBoundingBoxRight,l=i-s.actualBoundingBoxAscent,h=i+s.actualBoundingBoxDescent,c=n.strikethrough?(l+h)/2:h;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=n.decorationWidth||2,t.moveTo(r,c),t.lineTo(a,c),t.stroke()}}function _e(t,e){const i=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=i}function ye(t,e,i,o,n,s={}){const r=Z(e)?e:[e],a=s.strokeWidth>0&&""!==s.strokeColor;let l,h;for(t.save(),t.font=n.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),R(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,s),l=0;l<r.length;++l)h=r[l],s.backdrop&&_e(t,s.backdrop),a&&(s.strokeColor&&(t.strokeStyle=s.strokeColor),R(s.strokeWidth)||(t.lineWidth=s.strokeWidth),t.strokeText(h,i,o,s.maxWidth)),t.fillText(h,i,o,s.maxWidth),ge(t,i,o,h,s),o+=Number(n.lineHeight);t.restore()}function ve(t,e){const{x:i,y:o,w:n,h:s,radius:r}=e;t.arc(i+r.topLeft,o+r.topLeft,r.topLeft,1.5*rt,rt,!0),t.lineTo(i,o+s-r.bottomLeft),t.arc(i+r.bottomLeft,o+s-r.bottomLeft,r.bottomLeft,rt,ut,!0),t.lineTo(i+n-r.bottomRight,o+s),t.arc(i+n-r.bottomRight,o+s-r.bottomRight,r.bottomRight,ut,0,!0),t.lineTo(i+n,o+r.topRight),t.arc(i+n-r.topRight,o+r.topRight,r.topRight,0,-ut,!0),t.lineTo(i+r.topLeft,o)}const be=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,xe=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Le(t,e){const i=(""+t).match(be);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}const we=t=>+t||0;function ke(t,e){const i={},o=U(e),n=o?Object.keys(e):e,s=U(t)?o?i=>H(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of n)i[t]=we(s(t));return i}function Me(t){return ke(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Ce(t){return ke(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Te(t){const e=Me(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Pe(t,e){t=t||{},e=e||se.font;let i=H(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let o=H(t.style,e.style);o&&!(""+o).match(xe)&&(console.warn('Invalid font style specified: "'+o+'"'),o=void 0);const n={family:H(t.family,e.family),lineHeight:Le(H(t.lineHeight,e.lineHeight),i),size:i,style:o,weight:H(t.weight,e.weight),string:""};return n.string=function(t){return!t||R(t.size)||R(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(n),n}function Se(t,e,i,o){let n,s,r,a=!0;for(n=0,s=t.length;n<s;++n)if(r=t[n],void 0!==r&&(void 0!==e&&"function"==typeof r&&(r=r(e),a=!1),void 0!==i&&Z(r)&&(r=r[i%r.length],a=!1),void 0!==r))return o&&!a&&(o.cacheable=!1),r}function Ae(t,e){return Object.assign(Object.create(t),e)}function Oe(t,e=[""],i,o,n=()=>t[0]){const s=i||t;void 0===o&&(o=je("_fallback",t));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:s,_fallback:o,_getTarget:n,override:i=>Oe([i,...t],e,s,o)};return new Proxy(r,{deleteProperty(e,i){return delete e[i],delete e._keys,delete t[0][i],!0},get(i,o){return Be(i,o,()=>function(t,e,i,o){let n;for(const s of e)if(n=je(Ie(s,t),i),void 0!==n)return ze(t,n)?Ue(i,o,t,n):n}(o,e,t,i))},getOwnPropertyDescriptor(t,e){return Reflect.getOwnPropertyDescriptor(t._scopes[0],e)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(t,e){return He(t).includes(e)},ownKeys(t){return He(t)},set(t,e,i){const o=t._storage||(t._storage=n());return t[e]=o[e]=i,delete t._keys,!0}})}function Ee(t,e,i,o){const n={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:De(t,o),setContext:e=>Ee(t,e,i,o),override:n=>Ee(t.override(n),e,i,o)};return new Proxy(n,{deleteProperty(e,i){return delete e[i],delete t[i],!0},get(t,e,i){return Be(t,e,()=>function(t,e,i){const{_proxy:o,_context:n,_subProxy:s,_descriptors:r}=t;let a=o[e];nt(a)&&r.isScriptable(e)&&(a=function(t,e,i,o){const{_proxy:n,_context:s,_subProxy:r,_stack:a}=i;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t);let l=e(s,r||o);a.delete(t),ze(t,l)&&(l=Ue(n._scopes,n,t,l));return l}(e,a,t,i));Z(a)&&a.length&&(a=function(t,e,i,o){const{_proxy:n,_context:s,_subProxy:r,_descriptors:a}=i;if(void 0!==s.index&&o(t))return e[s.index%e.length];if(U(e[0])){const i=e,o=n._scopes.filter(t=>t!==i);e=[];for(const l of i){const i=Ue(o,n,t,l);e.push(Ee(i,s,r&&r[t],a))}}return e}(e,a,t,r.isIndexable));ze(e,a)&&(a=Ee(a,n,s&&s[e],r));return a}(t,e,i))},getOwnPropertyDescriptor(e,i){return e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(e,i){return Reflect.has(t,i)},ownKeys(){return Reflect.ownKeys(t)},set(e,i,o){return t[i]=o,delete e[i],!0}})}function De(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:o=e.indexable,_allKeys:n=e.allKeys}=t;return{allKeys:n,scriptable:i,indexable:o,isScriptable:nt(i)?i:()=>i,isIndexable:nt(o)?o:()=>o}}const Ie=(t,e)=>t?t+it(e):e,ze=(t,e)=>U(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function Be(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e)||"constructor"===e)return t[e];const o=i();return t[e]=o,o}function Fe(t,e,i){return nt(t)?t(e,i):t}const Re=(t,e)=>!0===t?e:"string"==typeof t?et(e,t):void 0;function Ze(t,e,i,o,n){for(const s of e){const e=Re(i,s);if(e){t.add(e);const s=Fe(e._fallback,i,n);if(void 0!==s&&s!==i&&s!==o)return s}else if(!1===e&&void 0!==o&&i!==o)return null}return!1}function Ue(t,e,i,o){const n=e._rootScopes,s=Fe(e._fallback,i,o),r=[...t,...n],a=new Set;a.add(o);let l=Ne(a,r,i,s||i,o);return null!==l&&((void 0===s||s===i||(l=Ne(a,r,s,l,o),null!==l))&&Oe(Array.from(a),[""],n,s,()=>function(t,e,i){const o=t._getTarget();e in o||(o[e]={});const n=o[e];if(Z(n)&&U(i))return i;return n||{}}(e,i,o)))}function Ne(t,e,i,o,n){for(;i;)i=Ze(t,e,i,o,n);return i}function je(t,e){for(const i of e){if(!i)continue;const e=i[t];if(void 0!==e)return e}}function He(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter(t=>!t.startsWith("_")))e.add(t);return Array.from(e)}(t._scopes)),e}const Ge=Number.EPSILON||1e-14,Ve=(t,e)=>e<t.length&&!t[e].skip&&t[e],We=t=>"x"===t?"y":"x";function qe(t,e,i,o){const n=t.skip?e:t,s=e,r=i.skip?e:i,a=kt(s,n),l=kt(r,s);let h=a/(a+l),c=l/(a+l);h=isNaN(h)?0:h,c=isNaN(c)?0:c;const u=o*h,p=o*c;return{previous:{x:s.x-u*(r.x-n.x),y:s.y-u*(r.y-n.y)},next:{x:s.x+p*(r.x-n.x),y:s.y+p*(r.y-n.y)}}}function $e(t,e="x"){const i=We(e),o=t.length,n=Array(o).fill(0),s=Array(o);let r,a,l,h=Ve(t,0);for(r=0;r<o;++r)if(a=l,l=h,h=Ve(t,r+1),l){if(h){const t=h[e]-l[e];n[r]=0!==t?(h[i]-l[i])/t:0}s[r]=a?h?ft(n[r-1])!==ft(n[r])?0:(n[r-1]+n[r])/2:n[r-1]:n[r]}!function(t,e,i){const o=t.length;let n,s,r,a,l,h=Ve(t,0);for(let c=0;c<o-1;++c)l=h,h=Ve(t,c+1),l&&h&&(gt(e[c],0,Ge)?i[c]=i[c+1]=0:(n=i[c]/e[c],s=i[c+1]/e[c],a=Math.pow(n,2)+Math.pow(s,2),a<=9||(r=3/Math.sqrt(a),i[c]=n*r*e[c],i[c+1]=s*r*e[c])))}(t,n,s),function(t,e,i="x"){const o=We(i),n=t.length;let s,r,a,l=Ve(t,0);for(let h=0;h<n;++h){if(r=a,a=l,l=Ve(t,h+1),!a)continue;const n=a[i],c=a[o];r&&(s=(n-r[i])/3,a[`cp1${i}`]=n-s,a[`cp1${o}`]=c-s*e[h]),l&&(s=(l[i]-n)/3,a[`cp2${i}`]=n+s,a[`cp2${o}`]=c+s*e[h])}}(t,s,e)}function Ke(t,e,i){return Math.max(Math.min(t,i),e)}function Je(t,e,i,o,n){let s,r,a,l;if(e.spanGaps&&(t=t.filter(t=>!t.skip)),"monotone"===e.cubicInterpolationMode)$e(t,n);else{let i=o?t[t.length-1]:t[0];for(s=0,r=t.length;s<r;++s)a=t[s],l=qe(i,a,t[Math.min(s+1,r-(o?0:1))%r],e.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,i=a}e.capBezierPoints&&function(t,e){let i,o,n,s,r,a=ue(t[0],e);for(i=0,o=t.length;i<o;++i)r=s,s=a,a=i<o-1&&ue(t[i+1],e),s&&(n=t[i],r&&(n.cp1x=Ke(n.cp1x,e.left,e.right),n.cp1y=Ke(n.cp1y,e.top,e.bottom)),a&&(n.cp2x=Ke(n.cp2x,e.left,e.right),n.cp2y=Ke(n.cp2y,e.top,e.bottom)))}(t,i)}function Ye(){return"undefined"!=typeof window&&"undefined"!=typeof document}function Xe(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function Qe(t,e,i){let o;return"string"==typeof t?(o=parseInt(t,10),-1!==t.indexOf("%")&&(o=o/100*e.parentNode[i])):o=t,o}const ti=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);const ei=["top","right","bottom","left"];function ii(t,e,i){const o={};i=i?"-"+i:"";for(let n=0;n<4;n++){const s=ei[n];o[s]=parseFloat(t[e+"-"+s+i])||0}return o.width=o.left+o.right,o.height=o.top+o.bottom,o}function oi(t,e){if("native"in t)return t;const{canvas:i,currentDevicePixelRatio:o}=e,n=ti(i),s="border-box"===n.boxSizing,r=ii(n,"padding"),a=ii(n,"border","width"),{x:l,y:h,box:c}=function(t,e){const i=t.touches,o=i&&i.length?i[0]:t,{offsetX:n,offsetY:s}=o;let r,a,l=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(n,s,t.target))r=n,a=s;else{const t=e.getBoundingClientRect();r=o.clientX-t.left,a=o.clientY-t.top,l=!0}return{x:r,y:a,box:l}}(t,i),u=r.left+(c&&a.left),p=r.top+(c&&a.top);let{width:d,height:m}=e;return s&&(d-=r.width+a.width,m-=r.height+a.height),{x:Math.round((l-u)/d*i.width/o),y:Math.round((h-p)/m*i.height/o)}}const ni=t=>Math.round(10*t)/10;function si(t,e,i,o){const n=ti(t),s=ii(n,"margin"),r=Qe(n.maxWidth,t,"clientWidth")||ht,a=Qe(n.maxHeight,t,"clientHeight")||ht,l=function(t,e,i){let o,n;if(void 0===e||void 0===i){const s=t&&Xe(t);if(s){const t=s.getBoundingClientRect(),r=ti(s),a=ii(r,"border","width"),l=ii(r,"padding");e=t.width-l.width-a.width,i=t.height-l.height-a.height,o=Qe(r.maxWidth,s,"clientWidth"),n=Qe(r.maxHeight,s,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:o||ht,maxHeight:n||ht}}(t,e,i);let{width:h,height:c}=l;if("content-box"===n.boxSizing){const t=ii(n,"border","width"),e=ii(n,"padding");h-=e.width+t.width,c-=e.height+t.height}h=Math.max(0,h-s.width),c=Math.max(0,o?h/o:c-s.height),h=ni(Math.min(h,r,l.maxWidth)),c=ni(Math.min(c,a,l.maxHeight)),h&&!c&&(c=ni(h/2));return(void 0!==e||void 0!==i)&&o&&l.height&&c>l.height&&(c=l.height,h=ni(Math.floor(c*o))),{width:h,height:c}}function ri(t,e,i){const o=e||1,n=ni(t.height*o),s=ni(t.width*o);t.height=ni(t.height),t.width=ni(t.width);const r=t.canvas;return r.style&&(i||!r.style.height&&!r.style.width)&&(r.style.height=`${t.height}px`,r.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==o||r.height!==n||r.width!==s)&&(t.currentDevicePixelRatio=o,r.height=n,r.width=s,t.ctx.setTransform(o,0,0,o,0,0),!0)}const ai=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};Ye()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(t){}return t}();function li(t,e){const i=function(t,e){return ti(t).getPropertyValue(e)}(t,e),o=i&&i.match(/^(\d+)(\.\d+)?px$/);return o?+o[1]:void 0}function hi(t,e,i,o){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function ci(t,e,i,o){return{x:t.x+i*(e.x-t.x),y:"middle"===o?i<.5?t.y:e.y:"after"===o?i<1?t.y:e.y:i>0?e.y:t.y}}function ui(t,e,i,o){const n={x:t.cp2x,y:t.cp2y},s={x:e.cp1x,y:e.cp1y},r=hi(t,n,i),a=hi(n,s,i),l=hi(s,e,i),h=hi(r,a,i),c=hi(a,l,i);return hi(h,c,i)}function pi(t,e,i){return t?function(t,e){return{x(i){return t+t+e-i}
vendor: 4,186 bytes, lines 27-34
27,setWidth(t){e=t},textAlign(t){return"center"===t?t:"right"===t?"left":"right"},xPlus(t,e){return t-e},leftForLtr(t,e){return t-e}}}(e,i):{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}}function di(t,e){let i,o;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,o=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=o)}function mi(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function fi(t){return"angle"===t?{between:Tt,compare:Mt,normalize:Ct}:{between:St,compare:(t,e)=>t-e,normalize:t=>t}}function gi({start:t,end:e,count:i,loop:o,style:n}){return{start:t%i,end:e%i,loop:o&&(e-t+1)%i==0,style:n}}function _i(t,e,i){if(!i)return[t];const{property:o,start:n,end:s}=i,r=e.length,{compare:a,between:l,normalize:h}=fi(o),{start:c,end:u,loop:p,style:d}=function(t,e,i){const{property:o,start:n,end:s}=i,{between:r,normalize:a}=fi(o),l=e.length;let h,c,{start:u,end:p,loop:d}=t;if(d){for(u+=l,p+=l,h=0,c=l;h<c&&r(a(e[u%l][o]),n,s);++h)u--,p--;u%=l,p%=l}return p<u&&(p+=l),{start:u,end:p,loop:d,style:t.style}}(t,e,i),m=[];let f,g,_,y=!1,v=null;const b=()=>y||l(n,_,f)&&0!==a(n,_),x=()=>!y||0===a(s,f)||l(s,_,f);for(let t=c,i=c;t<=u;++t)g=e[t%r],g.skip||(f=h(g[o]),f!==_&&(y=l(f,n,s),null===v&&b()&&(v=0===a(f,n)?t:i),null!==v&&x()&&(m.push(gi({start:v,end:t,loop:p,count:r,style:d})),v=null),i=t,_=f));return null!==v&&m.push(gi({start:v,end:u,loop:p,count:r,style:d})),m}function yi(t,e){const i=[],o=t.segments;for(let n=0;n<o.length;n++){const s=_i(o[n],t.points,e);s.length&&i.push(...s)}return i}function vi(t,e,i,o){return o&&o.setContext&&i?function(t,e,i,o){const n=t._chart.getContext(),s=bi(t.options),{_datasetIndex:r,options:{spanGaps:a}}=t,l=i.length,h=[];let c=s,u=e[0].start,p=u;function d(t,e,o,n){const s=a?-1:1;if(t!==e){for(t+=l;i[t%l].skip;)t-=s;for(;i[e%l].skip;)e+=s;t%l!==e%l&&(h.push({start:t%l,end:e%l,loop:o,style:n}),c=n,u=e%l)}}for(const t of e){u=a?u:t.start;let e,s=i[u%l];for(p=u+1;p<=t.end;p++){const a=i[p%l];e=bi(o.setContext(Ae(n,{type:"segment",p0:s,p1:a,p0DataIndex:(p-1)%l,p1DataIndex:p%l,datasetIndex:r}))),xi(e,c)&&d(u,p-1,t.loop,c),s=a,c=e}u<p-1&&d(u,p-1,t.loop,c)}return h}(t,e,i,o):e}function bi(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function xi(t,e){if(!e)return!1;const i=[],o=function(t,e){return Vt(e)?(i.includes(e)||i.push(e),i.indexOf(e)):e};return JSON.stringify(t,o)!==JSON.stringify(e,o)}function Li(t,e,i){return t.options.clip?t[i]:e[i]}function wi(t,e){const i=e._clip;if(i.disabled)return!1;const o=function(t,e){const{xScale:i,yScale:o}=t;return i&&o?{left:Li(i,e,"left"),right:Li(i,e,"right"),top:Li(o,e,"top"),bottom:Li(o,e,"bottom")}:e}(e,t.chartArea);return{left:!1===i.left?0:o.left-(!0===i.left?0:i.left),right:!1===i.right?t.width:o.right+(!0===i.right?0:i.right),top:!1===i.top?0:o.top-(!0===i.top?0:i.top),bottom:!1===i.bottom?t.height:o.bottom+(!0===i.bottom?0:i.bottom)}}
28/*!
29 * Chart.js v4.5.1
30 * https://www.chartjs.org
31 * (c) 2025 Chart.js Contributors
32 * Released under the MIT License
33 */
34class ki{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,o){const n=e.listeners[o],s=e.duration;n.forEach(o=>o({chart:t,initial:e.initial,numSteps:s,currentStep:Math.min(i-e.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=zt.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((i,o)=>{if(!i.running||!i.items.length)return;const n=i.items;let s,r=n.length-1,a=!1;for(;r>=0;--r)s=n[r],s._active?(s._total>i.duration&&(i.duration=s._total),s.tick(t),a=!0):(n[r]=n[n.length-1],n.pop());a&&(o.draw(),this._notify(o,i,t,"progress")),n.length||(i.running=!1,this._notify(o,i,t,"complete"),i.initial=!1),e+=n.length}),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);
vendor: 4,497 bytes, line 34
34return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((t,e)=>Math.max(t,e._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let o=i.length-1;for(;o>=0;--o)i[o].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Mi=new ki;const Ci="transparent",Ti={boolean(t,e,i){return i>.5?e:t},color(t,e,i){const o=Wt(t||Ci),n=o.valid&&Wt(e||Ci);return n&&n.valid?n.mix(o,i).hexString():e},number(t,e,i){return t+(e-t)*i}};class Pi{constructor(t,e,i,o){const n=e[i];o=Se([t.to,o,n,t.from]);const s=Se([t.from,n,o]);this._active=!0,this._fn=t.fn||Ti[t.type||typeof s],this._easing=Gt[t.easing]||Gt.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=s,this._to=o,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const o=this._target[this._prop],n=i-this._start,s=this._duration-n;this._start=i,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=n,this._loop=!!t.loop,this._to=Se([t.to,e,o,t.from]),this._from=Se([t.from,o,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,o=this._prop,n=this._from,s=this._loop,r=this._to;let a;if(this._active=n!==r&&(s||e<i),!this._active)return this._target[o]=r,void this._notify(!0);e<0?this._target[o]=n:(a=e/i%2,a=s&&a>1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[o]=this._fn(n,r,a))}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t<i.length;t++)i[t][e]()}}class Si{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!U(t))return;const e=Object.keys(se.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(o=>{const n=t[o];if(!U(n))return;const s={};for(const t of e)s[t]=n[t];(Z(n.properties)&&n.properties||[o]).forEach(t=>{t!==o&&i.has(t)||i.set(t,s)})})}_animateOptions(t,e){const i=e.options,o=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!o)return[];const n=this._createAnimations(o,i);return i.$shared&&function(t,e){const i=[],o=Object.keys(e);for(let e=0;e<o.length;e++){const n=t[o[e]];n&&n.active()&&i.push(n.wait())}return Promise.all(i)}(t.options.$animations,i).then(()=>{t.options=i},()=>{}),n}_createAnimations(t,e){const i=this._properties,o=[],n=t.$animations||(t.$animations={}),s=Object.keys(e),r=Date.now();let a;for(a=s.length-1;a>=0;--a){const l=s[a];if("$"===l.charAt(0))continue;if("options"===l){o.push(...this._animateOptions(t,e));continue}const h=e[l];let c=n[l];const u=i.get(l);if(c){if(u&&c.active()){c.update(u,h,r);continue}c.cancel()}u&&u.duration?(n[l]=c=new Pi(u,t,l,h),o.push(c)):t[l]=h}return o}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(Mi.add(this._chart,i),!0):void 0}}function Ai(t,e){const i=t&&t.options||{},o=i.reverse,n=void 0===i.min?e:0,s=void 0===i.max?e:0;return{start:o?s:n,end:o?n:s}}function Oi(t,e){const i=[],o=t._getSortedDatasetMetas(e);let n,s;for(n=0,s=o.length;n<s;++n)i.push(o[n].index);return i}function Ei(t,e,i,o={}){const n=t.keys,s="single"===o.mode;let r,a,l,h;if(null===e)return;let c=!1;for(r=0,a=n.length;r<a;++r){if(l=+n[r],l===i){if(c=!0,o.all)continue;break}h=t.values[l],N(h)&&(s||0===e||ft(e)===ft(h))&&(e+=h)}return c||o.all?e:0}function Di(t,e){const i=t&&t.options.stacked;return i||void 0===i&&void 0!==e.stack}function Ii(t,e,i){const o=t[e]||(t[e]={});return o[i]||(o[i]={})}function zi(t,e,i,o){for(const n of e.getMatchingVisibleMetas(o).reverse()){const e=t[n.index];if(i&&e>0||!i&&e<0)return n.index}return null}function Bi(t,e){const{chart:i,_cachedMeta:o}=t,n=i._stacks||(i._stacks={}),{iScale:s,vScale:r,index:a}
vendor: 4,444 bytes, line 34
34=o,l=s.axis,h=r.axis,c=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(s,r,o),u=e.length;let p;for(let t=0;t<u;++t){const i=e[t],{[l]:s,[h]:u}=i;p=(i._stacks||(i._stacks={}))[h]=Ii(n,c,s),p[a]=u,p._top=zi(p,r,!0,o.type),p._bottom=zi(p,r,!1,o.type);(p._visualValues||(p._visualValues={}))[a]=u}}function Fi(t,e){const i=t.scales;return Object.keys(i).filter(t=>i[t].axis===e).shift()}function Ri(t,e){const i=t.controller.index,o=t.vScale&&t.vScale.axis;if(o){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[o]||void 0===e[o][i])return;delete e[o][i],void 0!==e[o]._visualValues&&void 0!==e[o]._visualValues[i]&&delete e[o]._visualValues[i]}}}const Zi=t=>"reset"===t||"none"===t,Ui=(t,e)=>e?t:Object.assign({},t);class Ni{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Di(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Ri(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),o=(t,e,i,o)=>"x"===t?e:"r"===t?o:i,n=e.xAxisID=H(i.xAxisID,Fi(t,"x")),s=e.yAxisID=H(i.yAxisID,Fi(t,"y")),r=e.rAxisID=H(i.rAxisID,Fi(t,"r")),a=e.indexAxis,l=e.iAxisID=o(a,n,s,r),h=e.vAxisID=o(a,s,n,r);e.xScale=this.getScaleForId(n),e.yScale=this.getScaleForId(s),e.rScale=this.getScaleForId(r),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&It(this._data,this),t._stacked&&Ri(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(U(e)){const t=this._cachedMeta;this._data=function(t,e){const{iScale:i,vScale:o}=e,n="x"===i.axis?"x":"y",s="x"===o.axis?"x":"y",r=Object.keys(t),a=new Array(r.length);let l,h,c;for(l=0,h=r.length;l<h;++l)c=r[l],a[l]={[n]:c,[s]:t[c]};return a}(e,t)}else if(i!==e){if(i){It(i,this);const t=this._cachedMeta;Ri(t),t._parsed=[]}e&&Object.isExtensible(e)&&(n=this,(o=e)._chartjs?o._chartjs.listeners.push(n):(Object.defineProperty(o,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[n]}}),Dt.forEach(t=>{const e="_onData"+it(t),i=o[t];Object.defineProperty(o,t,{configurable:!0,enumerable:!1,value(...t){const n=i.apply(this,t);return o._chartjs.listeners.forEach(i=>{"function"==typeof i[e]&&i[e](...t)}),n}})}))),this._syncList=[],this._data=e}var o,n}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let o=!1;this._dataCheck();const n=e._stacked;e._stacked=Di(e.vScale,e),e.stack!==i.stack&&(o=!0,Ri(e),e.stack=i.stack),this._resyncElements(t),(o||n!==e._stacked)&&(Bi(this,e._parsed),e._stacked=Di(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:o}=this,{iScale:n,_stacked:s}=i,r=n.axis;let a,l,h,c=0===t&&e===o.length||i._sorted,u=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=o,i._sorted=!0,h=o;else{h=Z(o[t])?this.parseArrayData(i,o,t,e):U(o[t])?this.parseObjectData(i,o,t,e):this.parsePrimitiveData(i,o,t,e);const n=()=>null===l[r]||u&&l[r]<u[r];for(a=0;a<e;++a)i._parsed[a+t]=l=h[a],c&&(n()&&(c=!1),u=l);i._sorted=c}s&&Bi(this,h)}
vendor: 5,206 bytes, line 34
34parsePrimitiveData(t,e,i,o){const{iScale:n,vScale:s}=t,r=n.axis,a=s.axis,l=n.getLabels(),h=n===s,c=new Array(o);let u,p,d;for(u=0,p=o;u<p;++u)d=u+i,c[u]={[r]:h||n.parse(l[d],d),[a]:s.parse(e[d],d)};return c}parseArrayData(t,e,i,o){const{xScale:n,yScale:s}=t,r=new Array(o);let a,l,h,c;for(a=0,l=o;a<l;++a)h=a+i,c=e[h],r[a]={x:n.parse(c[0],h),y:s.parse(c[1],h)};return r}parseObjectData(t,e,i,o){const{xScale:n,yScale:s}=t,{xAxisKey:r="x",yAxisKey:a="y"}=this._parsing,l=new Array(o);let h,c,u,p;for(h=0,c=o;h<c;++h)u=h+i,p=e[u],l[h]={x:n.parse(et(p,r),u),y:s.parse(et(p,a),u)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const o=this.chart,n=this._cachedMeta,s=e[t.axis];return Ei({keys:Oi(o,!0),values:e._stacks[t.axis]._visualValues},s,n.index,{mode:i})}updateRangeFromParsed(t,e,i,o){const n=i[e.axis];let s=null===n?NaN:n;const r=o&&i._stacks[e.axis];o&&r&&(o.values=r,s=Ei(o,n,this._cachedMeta.index)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,e){const i=this._cachedMeta,o=i._parsed,n=i._sorted&&t===i.iScale,s=o.length,r=this._getOtherScale(t),a=((t,e,i)=>t&&!e.hidden&&e._stacked&&{keys:Oi(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:c}=function(t){const{min:e,max:i,minDefined:o,maxDefined:n}=t.getUserBounds();return{min:o?e:Number.NEGATIVE_INFINITY,max:n?i:Number.POSITIVE_INFINITY}}(r);let u,p;function d(){p=o[u];const e=p[r.axis];return!N(p[t.axis])||h>e||c<e}for(u=0;u<s&&(d()||(this.updateRangeFromParsed(l,t,p,a),!n));++u);if(n)for(u=s-1;u>=0;--u)if(!d()){this.updateRangeFromParsed(l,t,p,a);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let o,n,s;for(o=0,n=e.length;o<n;++o)s=e[o][t.axis],N(s)&&i.push(s);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,o=e.vScale,n=this.getParsed(t);return{label:i?""+i.getLabelForValue(n[i.axis]):"",value:o?""+o.getLabelForValue(n[o.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=function(t){let e,i,o,n;return U(t)?(e=t.top,i=t.right,o=t.bottom,n=t.left):e=i=o=n=t,{top:e,right:i,bottom:o,left:n,disabled:!1===t}}(H(this.options.clip,function(t,e,i){if(!1===i)return!1;const o=Ai(t,i),n=Ai(e,i);return{top:n.end,right:o.end,bottom:n.start,left:o.start}}(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,i=this._cachedMeta,o=i.data||[],n=e.chartArea,s=[],r=this._drawStart||0,a=this._drawCount||o.length-r,l=this.options.drawActiveElementsOnTop;let h;for(i.dataset&&i.dataset.draw(t,n,r,a),h=r;h<r+a;++h){const e=o[h];e.hidden||(e.active&&l?s.push(e):e.draw(t,n))}for(h=0;h<s.length;++h)s[h].draw(t,n)}getStyle(t,e){const i=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const o=this.getDataset();let n;if(t>=0&&t<this._cachedMeta.data.length){const e=this._cachedMeta.data[t];n=e.$context||(e.$context=function(t,e,i){return Ae(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:i,index:e,mode:"default",type:"data"})}(this.getContext(),t,e)),n.parsed=this.getParsed(t),n.raw=o.data[t],n.index=n.dataIndex=t}else n=this.$context||(this.$context=function(t,e){return Ae(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),n.dataset=o,n.index=n.datasetIndex=this.index;return n.active=!!e,n.mode=i,n}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const o="active"===e,n=this._cachedDataOpts,s=t+"-"+e,r=n[s],a=this.enableOptionSharing&&ot(i);if(r)return Ui(r,a);const l=this.chart.config,h=l.datasetElementScopeKeys(this._type,t),c=o?[`${t}Hover`,"hover",t,""]:[t,""],u=l.getOptionScopes(this.getDataset(),h),p=Object.keys(se.elements[t]),d=l.resolveNamedOptions(u,p,()=>this.getContext(i,o,e),c);return d.$shared&&(d.$shared=a,n[s]=Object.freeze(Ui(d,a))),d}_resolveAnimations(t,e,i){const o=this.chart,n=this._cachedDataOpts,s=`animation-${e}`,r=n[s];if(r)return r;let a;if(!1!==o.options.animation){const o=this.chart.config,n=o.datasetAnimationScopeKeys(this._type,e),s=o.getOptionScopes(this.getDataset(),n);a=o.createResolver(s,this.getContext(t,i,e))}const l=new Si(o,a&&a.animations);return a&&a._cacheable&&(n[s]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Zi(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),o=this._sharedOptions,n=this.getSharedOptions(i),s=this.includeOptions(e,n)||n!==o;return this.updateSharedOptions(n,e,i),{sharedOptions:n,includeOptions:s}}updateElement(t,e,i,o){Zi(o)?Object.assign(t,i):this._resolveAnimations(e,o).update(t,i)}updateSharedOptions(t,e,i){t&&!Zi(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,o){t.active=o;const n=this.getStyle(e,o);
vendor: 4,350 bytes, line 34
34this._resolveAnimations(e,i,o).update(t,{options:!o&&this.getSharedOptions(n)||n})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const o=i.length,n=e.length,s=Math.min(n,o);s&&this.parse(0,s),n>o?this._insertElements(o,n-o,t):n<o&&this._removeElements(n,o-n)}_insertElements(t,e,i=!0){const o=this._cachedMeta,n=o.data,s=t+e;let r;const a=t=>{for(t.length+=e,r=t.length-1;r>=s;r--)t[r]=t[r-e]};for(a(n),r=t;r<s;++r)n[r]=new this.dataElementType;this._parsing&&a(o._parsed),this.parse(t,e),i&&this.updateElements(n,t,e,"reset")}updateElements(t,e,i,o){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const o=i._parsed.splice(t,e);i._stacked&&Ri(i,o)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,i,o]=t;this[e](i,o)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}class ji extends Ni{static id="scatter";static defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:o,yScale:n}=e,s=this.getParsed(t),r=o.getLabelForValue(s.x),a=n.getLabelForValue(s.y);return{label:i[t]||"",value:"("+r+", "+a+")"}}update(t){const e=this._cachedMeta,{data:i=[]}=e,o=this.chart._animationsDisabled;let{start:n,count:s}=Zt(e,i,o);if(this._drawStart=n,this._drawCount=s,Ut(e)&&(n=0,s=i.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:n,_dataset:s}=e;n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!s._decimated,n.points=i;const r=this.resolveDatasetElementOptions(t);r.segment=this.options.segment,this.updateElement(n,void 0,{animated:!o,options:r},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(i,n,s,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,i,o){const n="reset"===o,{iScale:s,vScale:r,_stacked:a,_dataset:l}=this._cachedMeta,h=this.resolveDataElementOptions(e,o),c=this.getSharedOptions(h),u=this.includeOptions(o,c),p=s.axis,d=r.axis,{spanGaps:m,segment:f}=this.options,g=yt(m)?m:Number.POSITIVE_INFINITY,_=this.chart._animationsDisabled||n||"none"===o;let y=e>0&&this.getParsed(e-1);for(let h=e;h<e+i;++h){const e=t[h],i=this.getParsed(h),m=_?e:{},v=R(i[d]),b=m[p]=s.getPixelForValue(i[p],h),x=m[d]=n||v?r.getBasePixel():r.getPixelForValue(a?this.applyStack(r,i,a):i[d],h);m.skip=isNaN(b)||isNaN(x)||v,m.stop=h>0&&Math.abs(i[p]-y[p])>g,f&&(m.parsed=i,m.raw=l.data[h]),u&&(m.options=c||this.resolveDataElementOptions(h,e.active?"active":o)),_||this.updateElement(e,h,m,o),y=i}this.updateSharedOptions(c,o,h)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let i=e.length-1;i>=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}const i=t.dataset,o=i.options&&i.options.borderWidth||0;if(!e.length)return o;const n=e[0].size(this.resolveDataElementOptions(0)),s=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(o,n,s)/2}}function Hi(t,e,i,o){const{controller:n,data:s,_sorted:r}=t,a=n._cachedMeta.iScale,l=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(a&&e===a.axis&&"r"!==e&&r&&s.length){const r=a._reversePixels?Et:Ot;if(!o){const o=r(s,e,i);if(l){const{vScale:e}=n._cachedMeta,{_parsed:i}=t,s=i.slice(0,o.lo+1).reverse().findIndex(t=>
vendor: 22,792 bytes, line 34
34!R(t[e.axis]));o.lo-=Math.max(0,s);const r=i.slice(o.hi).findIndex(t=>!R(t[e.axis]));o.hi+=Math.max(0,r)}return o}if(n._sharedOptions){const t=s[0],o="function"==typeof t.getRange&&t.getRange(e);if(o){const t=r(s,e,i-o),n=r(s,e,i+o);return{lo:t.lo,hi:n.hi}}}}return{lo:0,hi:s.length-1}}function Gi(t,e,i,o,n){const s=t.getSortedVisibleDatasetMetas(),r=i[e];for(let t=0,i=s.length;t<i;++t){const{index:i,data:a}=s[t],{lo:l,hi:h}=Hi(s[t],e,r,n);for(let t=l;t<=h;++t){const e=a[t];e.skip||o(e,i,t)}}}function Vi(t,e,i,o,n){const s=[];if(!n&&!t.isPointInArea(e))return s;return Gi(t,i,e,function(i,r,a){(n||ue(i,t.chartArea,0))&&i.inRange(e.x,e.y,o)&&s.push({element:i,datasetIndex:r,index:a})},!0),s}function Wi(t,e,i,o,n,s){let r=[];const a=function(t){const e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,o){const n=e?Math.abs(t.x-o.x):0,s=i?Math.abs(t.y-o.y):0;return Math.sqrt(Math.pow(n,2)+Math.pow(s,2))}}(i);let l=Number.POSITIVE_INFINITY;return Gi(t,i,e,function(i,h,c){const u=i.inRange(e.x,e.y,n);if(o&&!u)return;const p=i.getCenterPoint(n);if(!(!!s||t.isPointInArea(p))&&!u)return;const d=a(e,p);d<l?(r=[{element:i,datasetIndex:h,index:c}],l=d):d===l&&r.push({element:i,datasetIndex:h,index:c})}),r}function qi(t,e,i,o,n,s){return s||t.isPointInArea(e)?"r"!==i||o?Wi(t,e,i,o,n,s):function(t,e,i,o){let n=[];return Gi(t,i,e,function(t,i,s){const{startAngle:r,endAngle:a}=t.getProps(["startAngle","endAngle"],o),{angle:l}=wt(t,{x:e.x,y:e.y});Tt(l,r,a)&&n.push({element:t,datasetIndex:i,index:s})}),n}(t,e,i,n):[]}function $i(t,e,i,o,n){const s=[],r="x"===i?"inXRange":"inYRange";let a=!1;return Gi(t,i,e,(t,o,l)=>{t[r]&&t[r](e[i],n)&&(s.push({element:t,datasetIndex:o,index:l}),a=a||t.inRange(e.x,e.y,n))}),o&&!a?[]:s}var Ki={evaluateInteractionItems:Gi,modes:{index(t,e,i,o){const n=oi(e,t),s=i.axis||"x",r=i.includeInvisible||!1,a=i.intersect?Vi(t,n,s,o,r):qi(t,n,s,!1,o,r),l=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach(t=>{const e=a[0].index,i=t.data[e];i&&!i.skip&&l.push({element:i,datasetIndex:t.index,index:e})}),l):[]},dataset(t,e,i,o){const n=oi(e,t),s=i.axis||"xy",r=i.includeInvisible||!1;let a=i.intersect?Vi(t,n,s,o,r):qi(t,n,s,!1,o,r);if(a.length>0){const e=a[0].datasetIndex,i=t.getDatasetMeta(e).data;a=[];for(let t=0;t<i.length;++t)a.push({element:i[t],datasetIndex:e,index:t})}return a},point(t,e,i,o){return Vi(t,oi(e,t),i.axis||"xy",o,i.includeInvisible||!1)},nearest(t,e,i,o){const n=oi(e,t),s=i.axis||"xy",r=i.includeInvisible||!1;return qi(t,n,s,i.intersect,o,r)},x(t,e,i,o){return $i(t,oi(e,t),"x",i.intersect,o)},y(t,e,i,o){return $i(t,oi(e,t),"y",i.intersect,o)}}};const Ji=["left","top","right","bottom"];function Yi(t,e){return t.filter(t=>t.pos===e)}function Xi(t,e){return t.filter(t=>-1===Ji.indexOf(t.pos)&&t.box.axis===e)}function Qi(t,e){return t.sort((t,i)=>{const o=e?i:t,n=e?t:i;return o.weight===n.weight?o.index-n.index:o.weight-n.weight})}function to(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:o,stackWeight:n}=i;if(!t||!Ji.includes(o))continue;const s=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=n}return e}(t),{vBoxMaxWidth:o,hBoxMaxHeight:n}=e;let s,r,a;for(s=0,r=t.length;s<r;++s){a=t[s];const{fullSize:r}=a.box,l=i[a.stack],h=l&&a.stackWeight/l.weight;a.horizontal?(a.width=h?h*o:r&&e.availableWidth,a.height=n):(a.width=o,a.height=h?h*n:r&&e.availableHeight)}return i}function eo(t,e,i,o){return Math.max(t[i],e[i])+Math.max(t[o],e[o])}function io(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function oo(t,e,i,o){const{pos:n,box:s}=i,r=t.maxPadding;if(!U(n)){i.size&&(t[n]-=i.size);const e=o[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?s.height:s.width),i.size=e.size/e.count,t[n]+=i.size}s.getPadding&&io(r,s.getPadding());const a=Math.max(0,e.outerWidth-eo(r,t,"left","right")),l=Math.max(0,e.outerHeight-eo(r,t,"top","bottom")),h=a!==t.w,c=l!==t.h;return t.w=a,t.h=l,i.horizontal?{same:h,other:c}:{same:c,other:h}}function no(t,e){const i=e.maxPadding;function o(t){const o={left:0,top:0,right:0,bottom:0};return t.forEach(t=>{o[t]=Math.max(e[t],i[t])}),o}return o(t?["left","right"]:["top","bottom"])}function so(t,e,i,o){const n=[];let s,r,a,l,h,c;for(s=0,r=t.length,h=0;s<r;++s){a=t[s],l=a.box,l.update(a.width||e.w,a.height||e.h,no(a.horizontal,e));const{same:r,other:u}=oo(e,i,a,o);h|=r&&n.length,c=c||u,l.fullSize||n.push(a)}return h&&so(n,e,i,o)||c}function ro(t,e,i,o,n){t.top=i,t.left=e,t.right=e+o,t.bottom=i+n,t.width=o,t.height=n}function ao(t,e,i,o){const n=i.padding;let{x:s,y:r}=e;for(const a of t){const t=a.box,l=o[a.stack]||{count:1,placed:0,weight:1},h=a.stackWeight/l.weight||1;if(a.horizontal){const o=e.w*h,s=l.size||t.height;ot(l.start)&&(r=l.start),t.fullSize?ro(t,n.left,r,i.outerWidth-n.right-n.left,s):ro(t,e.left+l.placed,r,o,s),l.start=r,l.placed+=o,r=t.bottom}else{const o=e.h*h,r=l.size||t.width;ot(l.start)&&(s=l.start),t.fullSize?ro(t,s,n.top,r,i.outerHeight-n.bottom-n.top):ro(t,s,e.top+l.placed,r,o),l.start=s,l.placed+=o,s=t.right}}e.x=s,e.y=r}var lo={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure(t,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(t,e,i,o){if(!t)return;const n=Te(t.options.layout.padding),s=Math.max(e-n.width,0),r=Math.max(i-n.height,0),a=function(t){const e=function(t){const e=[];let i,o,n,s,r,a;for(i=0,o=(t||[]).length;i<o;++i)n=t[i],({position:s,options:{stack:r,stackWeight:a=1}}=n),e.push({index:i,box:n,pos:s,horizontal:n.isHorizontal(),weight:n.weight,stack:r&&s+r,stackWeight:a});return e}(t),i=Qi(e.filter(t=>t.box.fullSize),!0),o=Qi(Yi(e,"left"),!0),n=Qi(Yi(e,"right")),s=Qi(Yi(e,"top"),!0),r=Qi(Yi(e,"bottom")),a=Xi(e,"x"),l=Xi(e,"y");return{fullSize:i,leftAndTop:o.concat(s),rightAndBottom:n.concat(l).concat(r).concat(a),chartArea:Yi(e,"chartArea"),vertical:o.concat(n).concat(l),horizontal:s.concat(r).concat(a)}}(t.boxes),l=a.vertical,h=a.horizontal;W(t.boxes,t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()});const c=l.reduce((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1,0)||1,u=Object.freeze({outerWidth:e,outerHeight:i,padding:n,availableWidth:s,availableHeight:r,vBoxMaxWidth:s/2/c,hBoxMaxHeight:r/2}),p=Object.assign({},n);io(p,Te(o));const d=Object.assign({maxPadding:p,w:s,h:r,x:n.left,y:n.top},n),m=to(l.concat(h),u);so(a.fullSize,d,u,m),so(l,d,u,m),so(h,d,u,m)&&so(l,d,u,m),function(t){const e=t.maxPadding;function i(i){const o=Math.max(e[i]-t[i],0);return t[i]+=o,o}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(d),ao(a.leftAndTop,d,u,m),d.x+=d.w,d.y+=d.h,ao(a.rightAndBottom,d,u,m),t.chartArea={left:d.left,top:d.top,right:d.left+d.w,bottom:d.top+d.h,height:d.h,width:d.w},W(a.chartArea,e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(d.w,d.h,{left:0,top:0,right:0,bottom:0})})}};class ho{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,o){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,o?Math.floor(e/o):i)}}isAttached(t){return!0}updateConfig(t){}}class co extends ho{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const uo="$chartjs",po={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},mo=t=>null===t||""===t;const fo=!!ai&&{passive:!0};function go(t,e,i){t&&t.canvas&&t.canvas.removeEventListener(e,i,fo)}function _o(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function yo(t,e,i){const o=t.canvas,n=new MutationObserver(t=>{let e=!1;for(const i of t)e=e||_o(i.addedNodes,o),e=e&&!_o(i.removedNodes,o);e&&i()});return n.observe(document,{childList:!0,subtree:!0}),n}function vo(t,e,i){const o=t.canvas,n=new MutationObserver(t=>{let e=!1;for(const i of t)e=e||_o(i.removedNodes,o),e=e&&!_o(i.addedNodes,o);e&&i()});return n.observe(document,{childList:!0,subtree:!0}),n}const bo=new Map;let xo=0;function Lo(){const t=window.devicePixelRatio;t!==xo&&(xo=t,bo.forEach((e,i)=>{i.currentDevicePixelRatio!==t&&e()}))}function wo(t,e,i){const o=t.canvas,n=o&&Xe(o);if(!n)return;const s=Bt((t,e)=>{const o=n.clientWidth;i(t,e),o<n.clientWidth&&i()},window),r=new ResizeObserver(t=>{const e=t[0],i=e.contentRect.width,o=e.contentRect.height;0===i&&0===o||s(i,o)});return r.observe(n),function(t,e){bo.size||window.addEventListener("resize",Lo),bo.set(t,e)}(t,s),r}function ko(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){bo.delete(t),bo.size||window.removeEventListener("resize",Lo)}(t)}function Mo(t,e,i){const o=t.canvas,n=Bt(e=>{null!==t.ctx&&i(function(t,e){const i=po[t.type]||t.type,{x:o,y:n}=oi(t,e);return{type:i,chart:e,native:t,x:void 0!==o?o:null,y:void 0!==n?n:null}}(e,t))},t);return function(t,e,i){t&&t.addEventListener(e,i,fo)}(o,e,n),n}class Co extends ho{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,o=t.getAttribute("height"),n=t.getAttribute("width");if(t[uo]={initial:{height:o,width:n,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",mo(n)){const e=li(t,"width");void 0!==e&&(t.width=e)}if(mo(o))if(""===t.style.height)t.height=t.width/(e||2);else{const e=li(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[uo])return!1;const i=e[uo].initial;["height","width"].forEach(t=>{const o=i[t];R(o)?e.removeAttribute(t):e.setAttribute(t,o)});const o=i.style||{};return Object.keys(o).forEach(t=>{e.style[t]=o[t]}),e.width=e.width,delete e[uo],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const o=t.$proxies||(t.$proxies={}),n={attach:yo,detach:vo,resize:wo}[e]||Mo;o[e]=n(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),o=i[e];if(!o)return;({attach:ko,detach:ko,resize:ko}[e]||go)(t,e,o),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,o){return si(t,e,i,o)}isAttached(t){const e=t&&Xe(t);return!(!e||!e.isConnected)}}class To{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return yt(this.x)&&yt(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const o={};return t.forEach(t=>{o[t]=i[t]&&i[t].active()?i[t]._to:this[t]}),o}}function Po(t,e){const i=t.options.ticks,o=function(t){const e=t.options.offset,i=t._tickSize(),o=t._length/i+(e?0:1),n=t._maxLength/i;return Math.floor(Math.min(o,n))}(t),n=Math.min(i.maxTicksLimit||o,o),s=i.major.enabled?function(t){const e=[];let i,o;for(i=0,o=t.length;i<o;i++)t[i].major&&e.push(i);return e}(e):[],r=s.length,a=s[0],l=s[r-1],h=[];if(r>n)return function(t,e,i,o){let n,s=0,r=i[0];for(o=Math.ceil(o),n=0;n<t.length;n++)n===r&&(e.push(t[n]),s++,r=i[s*o])}(e,h,s,r/n),h;const c=function(t,e,i){const o=function(t){const e=t.length;let i,o;if(e<2)return!1;for(o=t[0],i=1;i<e;++i)if(t[i]-t[i-1]!==o)return!1;return o}(t),n=e.length/i;if(!o)return Math.max(n,1);const s=function(t){const e=[],i=Math.sqrt(t);let o;for(o=1;o<i;o++)t%o===0&&(e.push(o),e.push(t/o));return i===(0|i)&&e.push(i),e.sort((t,e)=>t-e).pop(),e}(o);for(let t=0,e=s.length-1;t<e;t++){const e=s[t];if(e>n)return e}return Math.max(n,1)}(s,e,n);if(r>0){let t,i;const o=r>1?Math.round((l-a)/(r-1)):null;for(So(e,h,c,R(o)?0:a-o,a),t=0,i=r-1;t<i;t++)So(e,h,c,s[t],s[t+1]);return So(e,h,c,l,R(o)?e.length:l+o),h}return So(e,h,c),h}function So(t,e,i,o,n){const s=H(o,0),r=Math.min(H(n,t.length),t.length);let a,l,h,c=0;for(i=Math.ceil(i),n&&(a=n-o,i=a/Math.floor(a/i)),h=s;h<0;)c++,h=Math.round(s+c*i);for(l=Math.max(s,0);l<r;l++)l===h&&(e.push(t[l]),c++,h=Math.round(s+c*i))}const Ao=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i,Oo=(t,e)=>Math.min(e||t,t);function Eo(t,e){const i=[],o=t.length/e,n=t.length;let s=0;for(;s<n;s+=o)i.push(t[Math.floor(s)]);return i}function Do(t,e,i){const o=t.ticks.length,n=Math.min(e,o-1),s=t._startPixel,r=t._endPixel,a=1e-6;let l,h=t.getPixelForTick(n);if(!(i&&(l=1===o?Math.max(h-s,r-h):0===e?(t.getPixelForTick(1)-h)/2:(h-t.getPixelForTick(n-1))/2,h+=n<e?l:-l,h<s-a||h>r+a)))return h}function Io(t){return t.drawTicks?t.tickLength:0}function zo(t,e){if(!t.display)return 0;const i=Pe(t.font,e),o=Te(t.padding);return(Z(t.text)?t.text.length:1)*i.lineHeight+o.height}function Bo(t,e,i){let o=Ft(t);return(i&&"right"!==e||!i&&"right"===e)&&(o=(t=>"left"===t?"right":"right"===t?"left":t)(o)),o}class Fo extends To{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:o}=this;return t=j(t,Number.POSITIVE_INFINITY),e=j(e,Number.NEGATIVE_INFINITY),i=j(i,Number.POSITIVE_INFINITY),o=j(o,Number.NEGATIVE_INFINITY),{min:j(t,i),max:j(e,o),minDefined:N(t),maxDefined:N(e)}}getMinMax(t){let e,{min:i,max:o,minDefined:n,maxDefined:s}=this.getUserBounds();if(n&&s)return{min:i,max:o};const r=this.getMatchingVisibleMetas();for(let a=0,l=r.length;a<l;++a)e=r[a].controller.getMinMax(this,t),n||(i=Math.min(i,e.min)),s||(o=Math.max(o,e.max));return i=s&&i>o?o:i,o=n&&i>o?i:o,{min:j(i,j(o,i)),max:j(o,j(i,o))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){V(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:o,grace:n,ticks:s}=this.options,r=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){const{min:o,max:n}=t,s=G(e,(n-o)/2),r=(t,e)=>i&&0===t?0:t+e;return{min:r(o,-Math.abs(s)),max:r(n,s)}}(this,n,o),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=r<this.ticks.length;this._convertTicksToLabels(a?Eo(this.ticks,r):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||"auto"===s.source)&&(this.ticks=Po(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),a&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,i=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,i=!i),this._startPixel=t,this._endPixel=e,this._reversePixels=i,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){V(this.options.afterUpdate,[this])}beforeSetDimensions(){V(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){V(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),V(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){V(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let i,o,n;for(i=0,o=t.length;i<o;i++)n=t[i],n.label=V(e.callback,[n.value,i,t],this)}afterTickToLabelConversion(){V(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){V(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=Oo(this.ticks.length,t.ticks.maxTicksLimit),o=e.minRotation||0,n=e.maxRotation;let s,r,a,l=o;if(!this._isVisible()||!e.display||o>=n||i<=1||!this.isHorizontal())return void(this.labelRotation=o);const h=this._getLabelSizes(),c=h.widest.width,u=h.highest.height,p=Pt(this.chart.width-c,0,this.maxWidth);s=t.offset?this.maxWidth/i:p/(i-1),c+6>s&&(s=p/(i-(t.offset?.5:1)),r=this.maxHeight-Io(t.grid)-e.padding-zo(t.title,this.chart.options.font),a=Math.sqrt(c*c+u*u),l=xt(Math.min(Math.asin(Pt((h.highest.height+6)/s,-1,1)),Math.asin(Pt(r/a,-1,1))-Math.asin(Pt(u/a,-1,1)))),l=Math.max(o,Math.min(n,l))),this.labelRotation=l}afterCalculateLabelRotation(){V(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){V(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:o,grid:n}}=this,s=this._isVisible(),r=this.isHorizontal();if(s){const s=zo(o,e.options.font);if(r?(t.width=this.maxWidth,t.height=Io(n)+s):(t.height=this.maxHeight,t.width=Io(n)+s),i.display&&this.ticks.length){const{first:e,last:o,widest:n,highest:s}=this._getLabelSizes(),a=2*i.padding,l=bt(this.labelRotation),h=Math.cos(l),c=Math.sin(l);if(r){const e=i.mirror?0:c*n.width+h*s.height;t.height=Math.min(this.maxHeight,t.height+e+a)}else{const e=i.mirror?0:h*n.width+c*s.height;t.width=Math.min(this.maxWidth,t.width+e+a)}this._calculatePadding(e,o,c,h)}}this._handleMargins(),r?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,o){const{ticks:{align:n,padding:s},position:r}=this.options,a=0!==this.labelRotation,l="top"!==r&&"x"===this.axis;if(this.isHorizontal()){const r=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let c=0,u=0;a?l?(c=o*t.width,u=i*e.height):(c=i*t.height,u=o*e.width):"start"===n?u=e.width:"end"===n?c=t.width:"inner"!==n&&(c=t.width/2,u=e.width/2),this.paddingLeft=Math.max((c-r+s)*this.width/(this.width-r),0),this.paddingRight=Math.max((u-h+s)*this.width/(this.width-h),0)}else{let i=e.height/2,o=t.height/2;"start"===n?(i=0,o=t.height):"end"===n&&(i=e.height,o=0),this.paddingTop=i+s,this.paddingBottom=o+s}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){V(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e<i;e++)R(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let i=this.ticks;e<i.length&&(i=Eo(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,i){const{ctx:o,_longestTextCache:n}=this,s=[],r=[],a=Math.floor(e/Oo(e,i));let l,h,c,u,p,d,m,f,g,_,y,v=0,b=0;for(l=0;l<e;l+=a){if(u=t[l].label,p=this._resolveTickFontOptions(l),o.font=d=p.string,m=n[d]=n[d]||{data:{},gc:[]},f=p.lineHeight,g=_=0,R(u)||Z(u)){if(Z(u))for(h=0,c=u.length;h<c;++h)y=u[h],R(y)||Z(y)||(g=re(o,m.data,m.gc,g,y),_+=f)}else g=re(o,m.data,m.gc,g,u),_=f;s.push(g),r.push(_),v=Math.max(g,v),b=Math.max(_,b)}!function(t,e){W(t,t=>{const i=t.gc,o=i.length/2;let n;if(o>e){for(n=0;n<o;++n)delete t.data[i[n]];i.splice(0,o)}})}(n,e);const x=s.indexOf(v),L=r.indexOf(b),w=t=>({width:s[t]||0,height:r[t]||0});return{first:w(0),last:w(e-1),widest:w(x),highest:w(L),widths:s,heights:r}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Pt(this._alignToPixels?ae(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const i=e[t];return i.$context||(i.$context=function(t,e,i){return Ae(t,{tick:i,index:e,type:"tick"})}(this.getContext(),t,i))}return this.$context||(this.$context=Ae(this.chart.getContext(),{scale:this,type:"scale"}))}_tickSize(){const t=this.options.ticks,e=bt(this.labelRotation),i=Math.abs(Math.cos(e)),o=Math.abs(Math.sin(e)),n=this._getLabelSizes(),s=t.autoSkipPadding||0,r=n?n.widest.width+s:0,a=n?
vendor: 4,831 bytes, line 34
34n.highest.height+s:0;return this.isHorizontal()?a*i>r*o?r/i:a/o:a*o<r*i?a/i:r/o}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,i=this.chart,o=this.options,{grid:n,position:s,border:r}=o,a=n.offset,l=this.isHorizontal(),h=this.ticks.length+(a?1:0),c=Io(n),u=[],p=r.setContext(this.getContext()),d=p.display?p.width:0,m=d/2,f=function(t){return ae(i,t,d)};let g,_,y,v,b,x,L,w,k,M,C,T;if("top"===s)g=f(this.bottom),x=this.bottom-c,w=g-m,M=f(t.top)+m,T=t.bottom;else if("bottom"===s)g=f(this.top),M=t.top,T=f(t.bottom)-m,x=g+m,w=this.top+c;else if("left"===s)g=f(this.right),b=this.right-c,L=g-m,k=f(t.left)+m,C=t.right;else if("right"===s)g=f(this.left),k=t.left,C=f(t.right)-m,b=g+m,L=this.left+c;else if("x"===e){if("center"===s)g=f((t.top+t.bottom)/2+.5);else if(U(s)){const t=Object.keys(s)[0],e=s[t];g=f(this.chart.scales[t].getPixelForValue(e))}M=t.top,T=t.bottom,x=g+m,w=x+c}else if("y"===e){if("center"===s)g=f((t.left+t.right)/2);else if(U(s)){const t=Object.keys(s)[0],e=s[t];g=f(this.chart.scales[t].getPixelForValue(e))}b=g-m,L=b-c,k=t.left,C=t.right}const P=H(o.ticks.maxTicksLimit,h),S=Math.max(1,Math.ceil(h/P));for(_=0;_<h;_+=S){const t=this.getContext(_),e=n.setContext(t),o=r.setContext(t),s=e.lineWidth,h=e.color,c=o.dash||[],p=o.dashOffset,d=e.tickWidth,m=e.tickColor,f=e.tickBorderDash||[],g=e.tickBorderDashOffset;y=Do(this,_,a),void 0!==y&&(v=ae(i,y,s),l?b=L=k=C=v:x=w=M=T=v,u.push({tx1:b,ty1:x,tx2:L,ty2:w,x1:k,y1:M,x2:C,y2:T,width:s,color:h,borderDash:c,borderDashOffset:p,tickWidth:d,tickColor:m,tickBorderDash:f,tickBorderDashOffset:g}))}return this._ticksLength=h,this._borderValue=g,u}_computeLabelItems(t){const e=this.axis,i=this.options,{position:o,ticks:n}=i,s=this.isHorizontal(),r=this.ticks,{align:a,crossAlign:l,padding:h,mirror:c}=n,u=Io(i.grid),p=u+h,d=c?-h:p,m=-bt(this.labelRotation),f=[];let g,_,y,v,b,x,L,w,k,M,C,T,P="middle";if("top"===o)x=this.bottom-d,L=this._getXAxisLabelAlignment();else if("bottom"===o)x=this.top+d,L=this._getXAxisLabelAlignment();else if("left"===o){const t=this._getYAxisLabelAlignment(u);L=t.textAlign,b=t.x}else if("right"===o){const t=this._getYAxisLabelAlignment(u);L=t.textAlign,b=t.x}else if("x"===e){if("center"===o)x=(t.top+t.bottom)/2+p;else if(U(o)){const t=Object.keys(o)[0],e=o[t];x=this.chart.scales[t].getPixelForValue(e)+p}L=this._getXAxisLabelAlignment()}else if("y"===e){if("center"===o)b=(t.left+t.right)/2-p;else if(U(o)){const t=Object.keys(o)[0],e=o[t];b=this.chart.scales[t].getPixelForValue(e)}L=this._getYAxisLabelAlignment(u).textAlign}"y"===e&&("start"===a?P="top":"end"===a&&(P="bottom"));const S=this._getLabelSizes();for(g=0,_=r.length;g<_;++g){y=r[g],v=y.label;const t=n.setContext(this.getContext(g));w=this.getPixelForTick(g)+n.labelOffset,k=this._resolveTickFontOptions(g),M=k.lineHeight,C=Z(v)?v.length:1;const e=C/2,i=t.color,a=t.textStrokeColor,h=t.textStrokeWidth;let u,p=L;if(s?(b=w,"inner"===L&&(p=g===_-1?this.options.reverse?"left":"right":0===g?this.options.reverse?"right":"left":"center"),T="top"===o?"near"===l||0!==m?-C*M+M/2:"center"===l?-S.highest.height/2-e*M+M:-S.highest.height+M/2:"near"===l||0!==m?M/2:"center"===l?S.highest.height/2-e*M:S.highest.height-C*M,c&&(T*=-1),0===m||t.showLabelBackdrop||(b+=M/2*Math.sin(m))):(x=w,T=(1-C)*M/2),t.showLabelBackdrop){const e=Te(t.backdropPadding),i=S.heights[g],o=S.widths[g];let n=T-e.top,s=0-e.left;switch(P){case"middle":n-=i/2;break;case"bottom":n-=i}switch(L){case"center":s-=o/2;break;case"right":s-=o;break;case"inner":g===_-1?s-=o:g>0&&(s-=o/2)}u={left:s,top:n,width:o+e.width,height:i+e.height,color:t.backdropColor}}f.push({label:v,font:k,textOffset:T,options:{rotation:m,color:i,strokeColor:a,strokeWidth:h,textAlign:p,textBaseline:P,translation:[b,x],backdrop:u}})}return f}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-bt(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align?i="right":"inner"===e.align&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:o,padding:n}}=this.options,s=t+n,r=this._getLabelSizes().widest.width;let a,l;return"left"===e?o?(l=this.right+n,"near"===i?a="left":"center"===i?(a="center",l+=r/2):(a="right",l+=r)):(l=this.right-s,"near"===i?a="right":"center"===i?(a="center",l-=r/2):(a="left",l=this.left)):"right"===e?o?(l=this.left+n,"near"===i?a="right":"center"===i?(a="center",l-=r/2):(a="left",l-=r)):(l=this.left+s,"near"===i?a="left":"center"===i?(a="center",l+=r/2):(a="right",l=this.right)):a="right",{textAlign:a,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}
vendor: 31,031 bytes, line 34
34:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:o,width:n,height:s}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,o,n,s),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const i=this.ticks.findIndex(e=>e.value===t);if(i>=0){return e.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,i=this.ctx,o=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let n,s;const r=(t,e,o)=>{o.width&&o.color&&(i.save(),i.lineWidth=o.width,i.strokeStyle=o.color,i.setLineDash(o.borderDash||[]),i.lineDashOffset=o.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(n=0,s=o.length;n<s;++n){const t=o[n];e.drawOnChartArea&&r({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),e.drawTicks&&r({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:i,grid:o}}=this,n=i.setContext(this.getContext()),s=i.display?n.width:0;if(!s)return;const r=o.setContext(this.getContext(0)).lineWidth,a=this._borderValue;let l,h,c,u;this.isHorizontal()?(l=ae(t,this.left,s)-s/2,h=ae(t,this.right,r)+r/2,c=u=a):(c=ae(t,this.top,s)-s/2,u=ae(t,this.bottom,r)+r/2,l=h=a),e.save(),e.lineWidth=n.width,e.strokeStyle=n.color,e.beginPath(),e.moveTo(l,c),e.lineTo(h,u),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const e=this.ctx,i=this._computeLabelArea();i&&pe(e,i);const o=this.getLabelItems(t);for(const t of o){const i=t.options,o=t.font;ye(e,t.label,0,t.textOffset,o,i)}i&&de(e)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:o}}=this;if(!i.display)return;const n=Pe(i.font),s=Te(i.padding),r=i.align;let a=n.lineHeight/2;"bottom"===e||"center"===e||U(e)?(a+=s.bottom,Z(i.text)&&(a+=n.lineHeight*(i.text.length-1))):a+=s.top;const{titleX:l,titleY:h,maxWidth:c,rotation:u}=function(t,e,i,o){const{top:n,left:s,bottom:r,right:a,chart:l}=t,{chartArea:h,scales:c}=l;let u,p,d,m=0;const f=r-n,g=a-s;if(t.isHorizontal()){if(p=Rt(o,s,a),U(i)){const t=Object.keys(i)[0],o=i[t];d=c[t].getPixelForValue(o)+f-e}else d="center"===i?(h.bottom+h.top)/2+f-e:Ao(t,i,e);u=a-s}else{if(U(i)){const t=Object.keys(i)[0],o=i[t];p=c[t].getPixelForValue(o)-g+e}else p="center"===i?(h.left+h.right)/2-g+e:Ao(t,i,e);d=Rt(o,r,n),m="left"===i?-ut:ut}return{titleX:p,titleY:d,maxWidth:u,rotation:m}}(this,a,e,r);ye(t,i.text,0,0,n,{color:i.color,maxWidth:c,rotation:u,textAlign:Bo(r,e,o),textBaseline:"middle",translation:[l,h]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,i=H(t.grid&&t.grid.z,-1),o=H(t.border&&t.border.z,0);return this._isVisible()&&this.draw===Fo.prototype.draw?[{z:i,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:o,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",o=[];let n,s;for(n=0,s=e.length;n<s;++n){const s=e[n];s[i]!==this.id||t&&s.type!==t||o.push(s)}return o}_resolveTickFontOptions(t){return Pe(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Ro{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let i;(function(t){return"id"in t&&"defaults"in t})(e)&&(i=this.register(e));const o=this.items,n=t.id,s=this.scope+"."+n;if(!n)throw new Error("class does not have id: "+t);return n in o||(o[n]=t,function(t,e,i){const o=Y(Object.create(null),[i?se.get(i):{},se.get(e),t.defaults]);se.set(e,o),t.defaultRoutes&&function(t,e){Object.keys(e).forEach(i=>{const o=i.split("."),n=o.pop(),s=[t].concat(o).join("."),r=e[i].split("."),a=r.pop(),l=r.join(".");se.route(s,n,l,a)})}(e,t.defaultRoutes);t.descriptors&&se.describe(e,t.descriptors)}(t,s,i),this.override&&se.override(t.id,t.overrides)),s}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,o=this.scope;i in e&&delete e[i],o&&i in se[o]&&(delete se[o][i],this.override&&delete te[i])}}class Zo{constructor(){this.controllers=new Ro(Ni,"datasets",!0),this.elements=new Ro(To,"elements"),this.plugins=new Ro(Object,"plugins"),this.scales=new Ro(Fo,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach(e=>{const o=i||this._getRegistryForType(e);i||o.isForType(e)||o===this.plugins&&e.id?this._exec(t,o,e):W(e,e=>{const o=i||this._getRegistryForType(e);this._exec(t,o,e)})})}_exec(t,e,i){const o=it(t);V(i["before"+o],[],i),e[t](i),V(i["after"+o],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const o=e.get(t);if(void 0===o)throw new Error('"'+t+'" is not a registered '+i+".");return o}}var Uo=new Zo;class No{constructor(){this._init=void 0}notify(t,e,i,o){if("beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install")),void 0===this._init)return;const n=o?this._descriptors(t).filter(o):this._descriptors(t),s=this._notify(n,t,e,i);return"afterDestroy"===e&&(this._notify(n,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),s}_notify(t,e,i,o){o=o||{};for(const n of t){const t=n.plugin;if(!1===V(t[i],[e,o,n.options],t)&&o.cancelable)return!1}return!0}invalidate(){R(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,o=H(i.options&&i.options.plugins,{}),n=function(t){const e={},i=[],o=Object.keys(Uo.plugins.items);for(let t=0;t<o.length;t++)i.push(Uo.getPlugin(o[t]));const n=t.plugins||[];for(let t=0;t<n.length;t++){const o=n[t];-1===i.indexOf(o)&&(i.push(o),e[o.id]=!0)}return{plugins:i,localIds:e}}(i);return!1!==o||e?function(t,{plugins:e,localIds:i},o,n){const s=[],r=t.getContext();for(const a of e){const e=a.id,l=jo(o[e],n);null!==l&&s.push({plugin:a,options:Ho(t.config,{plugin:a,local:i[e]},l,r)})}return s}(t,n,o,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,o=(t,e)=>t.filter(t=>!e.some(e=>t.plugin.id===e.plugin.id));this._notify(o(e,i),t,"stop"),this._notify(o(i,e),t,"start")}}function jo(t,e){return e||!1!==t?!0===t?{}:t:null}function Ho(t,{plugin:e,local:i},o,n){const s=t.pluginScopeKeys(e),r=t.getOptionScopes(o,s);return i&&e.defaults&&r.push(e.defaults),t.createResolver(r,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Go(t,e){const i=se.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function Vo(t){if("x"===t||"y"===t||"r"===t)return t}function Wo(t){return"top"===t||"bottom"===t?"x":"left"===t||"right"===t?"y":void 0}function qo(t,...e){if(Vo(t))return t;for(const i of e){const e=i.axis||Wo(i.position)||t.length>1&&Vo(t[0].toLowerCase());if(e)return e}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function $o(t,e,i){if(i[e+"AxisID"]===t)return{axis:e}}function Ko(t,e){const i=te[t.type]||{scales:{}},o=e.scales||{},n=Go(t.type,e),s=Object.create(null);return Object.keys(o).forEach(e=>{const r=o[e];if(!U(r))return console.error(`Invalid scale configuration for scale: ${e}`);if(r._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${e}`);const a=qo(e,r,function(t,e){if(e.data&&e.data.datasets){const i=e.data.datasets.filter(e=>e.xAxisID===t||e.yAxisID===t);if(i.length)return $o(t,"x",i[0])||$o(t,"y",i[0])}return{}}(e,t),se.scales[r.type]),l=function(t,e){return t===e?"_index_":"_value_"}(a,n),h=i.scales||{};s[e]=X(Object.create(null),[{axis:a},r,h[a],h[l]])}),t.data.datasets.forEach(i=>{const n=i.type||t.type,r=i.indexAxis||Go(n,e),a=(te[n]||{}).scales||{};Object.keys(a).forEach(t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,r),n=i[e+"AxisID"]||e;s[n]=s[n]||Object.create(null),X(s[n],[{axis:e},o[n],a[t]])})}),Object.keys(s).forEach(t=>{const e=s[t];X(e,[se.scales[e.type],se.scale])}),s}function Jo(t){const e=t.options||(t.options={});e.plugins=H(e.plugins,{}),e.scales=Ko(t,e)}function Yo(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const Xo=new Map,Qo=new Set;function tn(t,e){let i=Xo.get(t);return i||(i=e(),Xo.set(t,i),Qo.add(i)),i}const en=(t,e,i)=>{const o=et(e,i);void 0!==o&&t.add(o)};class on{constructor(t){this._config=function(t){return(t=t||{}).data=Yo(t.data),Jo(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Yo(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Jo(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return tn(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return tn(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return tn(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id;return tn(`${this.type}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const i=this._scopeCache;let o=i.get(t);return o&&!e||(o=new Map,i.set(t,o)),o}getOptionScopes(t,e,i){const{options:o,type:n}=this,s=this._cachedScopes(t,i),r=s.get(e);if(r)return r;const a=new Set;e.forEach(e=>{t&&(a.add(t),e.forEach(e=>en(a,t,e))),e.forEach(t=>en(a,o,t)),e.forEach(t=>en(a,te[n]||{},t)),e.forEach(t=>en(a,se,t)),e.forEach(t=>en(a,ee,t))});const l=Array.from(a);return 0===l.length&&l.push(Object.create(null)),Qo.has(e)&&s.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,te[e]||{},se.datasets[e]||{},{type:e},se,ee]}resolveNamedOptions(t,e,i,o=[""]){const n={$shared:!0},{resolver:s,subPrefixes:r}=nn(this._resolverCache,t,o);let a=s;if(function(t,e){const{isScriptable:i,isIndexable:o}=De(t);for(const n of e){const e=i(n),s=o(n),r=(s||e)&&t[n];if(e&&(nt(r)||sn(r))||s&&Z(r))return!0}return!1}(s,e)){n.$shared=!1;a=Ee(s,i=nt(i)?i():i,this.createResolver(t,i,r))}for(const t of e)n[t]=a[t];return n}createResolver(t,e,i=[""],o){const{resolver:n}=nn(this._resolverCache,t,i);return U(e)?Ee(n,e,void 0,o):n}}function nn(t,e,i){let o=t.get(e);o||(o=new Map,t.set(e,o));const n=i.join();let s=o.get(n);if(!s){s={resolver:Oe(e,i),subPrefixes:i.filter(t=>!t.toLowerCase().includes("hover"))},o.set(n,s)}return s}const sn=t=>U(t)&&Object.getOwnPropertyNames(t).some(e=>nt(t[e]));const rn=["top","bottom","left","right","chartArea"];function an(t,e){return"top"===t||"bottom"===t||-1===rn.indexOf(t)&&"x"===e}function ln(t,e){return function(i,o){return i[t]===o[t]?i[e]-o[e]:i[t]-o[t]}}function hn(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),V(i&&i.onComplete,[t],e)}function cn(t){const e=t.chart,i=e.options.animation;V(i&&i.onProgress,[t],e)}function un(t){return Ye()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const pn={},dn=t=>{const e=un(t);return Object.values(pn).filter(t=>t.canvas===e).pop()};function mn(t,e,i){const o=Object.keys(t);for(const n of o){const o=+n;if(o>=e){const s=t[n];delete t[n],(i>0||o>e)&&(t[o+i]=s)}}}class fn{static defaults=se;static instances=pn;static overrides=te;static registry=Uo;static version="4.5.1";static getChart=dn;static register(...t){Uo.add(...t),gn()}static unregister(...t){Uo.remove(...t),gn()}constructor(t,e){const i=this.config=new on(e),o=un(t),n=dn(o);if(n)throw new Error("Canvas is already in use. Chart with ID '"+n.id+"' must be destroyed before the canvas with ID '"+n.canvas.id+"' can be reused.");const s=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!Ye()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?co:Co}(o)),this.platform.updateConfig(i);const r=this.platform.acquireContext(o,s.aspectRatio),a=r&&r.canvas,l=a&&a.height,h=a&&a.width;this.id=F(),this.ctx=r,this.canvas=a,this.width=h,this.height=l,this._options=s,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new No,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...o){return e?(clearTimeout(i),i=setTimeout(t,e,o)):t.apply(this,o),e}}(t=>this.update(t),s.resizeDelay||0),this._dataChanges=[],pn[this.id]=this,r&&a?(Mi.listen(this,"complete",hn),Mi.listen(this,"progress",cn),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:o,_aspectRatio:n}=this;return R(t)?e&&n?n:o?i/o:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Uo}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():ri(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return le(this.canvas,this.ctx),this}stop(){return Mi.stop(this),this}resize(t,e){Mi.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,o=this.canvas,n=i.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(o,t,e,n),r=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,ri(this,r,!0)&&(this.notifyPlugins("resize",{size:s}),V(i.onResize,[this,s],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){W(this.options.scales||{},(t,e)=>{t.id=e})}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,o=Object.keys(i).reduce((t,e)=>(t[e]=!1,t),{});let n=[];e&&(n=n.concat(Object.keys(e).map(t=>{const i=e[t],o=qo(t,i),n="r"===o,s="x"===o;return{options:i,dposition:n?"chartArea":s?"bottom":"left",dtype:n?"radialLinear":s?"category":"linear"}}))),W(n,e=>{const n=e.options,s=n.id,r=qo(s,n),a=H(n.type,e.dtype);void 0!==n.position&&an(n.position,r)===an(e.dposition)||(n.position=e.dposition),o[s]=!0;let l=null;if(s in i&&i[s].type===a)l=i[s];else{l=new(Uo.getScale(a))({id:s,type:a,ctx:this.ctx,chart:this}),i[l.id]=l}l.init(n,t)}),W(o,(t,e)=>{t||delete i[e]}),W(i,t=>{lo.configure(this,t,t.options),lo.addBox(this,t)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((t,e)=>t.index-e.index),i>e){for(let t=e;t<i;++t)this._destroyDatasetMeta(t);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(ln("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((t,i)=>{0===e.filter(e=>e===t._dataset).length&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,o;for(this._removeUnreferencedMetasets(),i=0,o=e.length;i<o;i++){const o=e[i];let n=this.getDatasetMeta(i);const s=o.type||this.config.type;if(n.type&&n.type!==s&&(this._destroyDatasetMeta(i),n=this.getDatasetMeta(i)),n.type=s,n.indexAxis=o.indexAxis||Go(s,this.options),n.order=o.order||0,n.index=i,n.label=""+o.label,n.visible=this.isDatasetVisible(i),n.controller)n.controller.updateIndex(i),n.controller.linkScales();else{const e=Uo.getController(s),{datasetElementType:o,dataElementType:r}=se.datasets[s];Object.assign(e,{dataElementType:Uo.getElement(r),datasetElementType:o&&Uo.getElement(o)}),n.controller=new e(this,i),t.push(n.controller)}}return this._updateMetasets(),t}_resetElements(){W(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),o=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const n=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let t=0,e=this.data.datasets.length;t<e;t++){const{controller:e}=this.getDatasetMeta(t),i=!o&&-1===n.indexOf(e);e.buildOrUpdateElements(i),s=Math.max(+e.getMaxOverflow(),s)}s=this._minPadding=i.layout.autoPadding?s:0,this._updateLayout(s),o||W(n,t=>{t.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(ln("z","_idx"));const{_active:r,_lastEvent:a}=this;a?this._eventHandler(a,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){W(this.scales,t=>{lo.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);st(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:o,count:n}of e){mn(t,o,"_removeElements"===i?-n:n)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter(t=>t[0]===e).map((t,e)=>e+","+t.splice(1).join(","))),o=i(0);for(let t=1;t<e;t++)if(!st(o,i(t)))return;return Array.from(o).map(t=>t.split(",")).map(t=>({method:t[1],start:+t[2],count:+t[3]}))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;lo.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],W(this.boxes,t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))},this),this._layers.forEach((t,e)=>{t._idx=e}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t<e;++t)this.getDatasetMeta(t).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,nt(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),o={meta:i,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",o)&&(i.controller._update(e),o.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",o))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(Mi.has(this)?this.attached&&!Mi.running(this)&&Mi.start(this):(this.draw(),hn({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:e}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(t,e)}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let o,n;for(o=0,n=e.length;o<n;++o){const n=e[o];t&&!n.visible||i.push(n)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i={meta:t,index:t.index,cancelable:!0},o=wi(this,t);!1!==this.notifyPlugins("beforeDatasetDraw",i)&&(o&&pe(e,o),t.controller.draw(),o&&de(e),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(t){return ue(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,o){const n=Ki.modes[e];return"function"==typeof n?n(this,t,i,o):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let o=i.filter(t=>t&&t._dataset===e).pop();return o||(o={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(o)),o}getContext(){return this.$context||(this.$context=Ae(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const o=i?"show":"hide",n=this.getDatasetMeta(t),s=n.controller._resolveAnimations(void 0,o);ot(e)?(n.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),s.update(n,{visible:i}),this.update(e=>e.datasetIndex===t?o:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Mi.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),le(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete pn[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,i=(i,o)=>{e.addEventListener(this,i,o),t[i]=o},o=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};W(this.options.events,t=>i(t,o))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,o)=>{e.addEventListener(this,i,o),t[i]=o},o=(i,o)=>{t[i]&&(e.removeEventListener(this,i,o),delete t[i])},n=(t,e)=>{this.canvas&&this.resize(t,e)};let s;const r=()=>{o("attach",r),this.attached=!0,this.resize(),i("resize",n),i("detach",s)};s=()=>{this.attached=!1,o("resize",n),this._stop(),this._resize(0,0),i("attach",r)},e.isAttached(this.canvas)?r():s()}unbindEvents(){W(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},W(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const o=i?"set":"remove";let n,s,r,a;for("dataset"===e&&(n=this.getDatasetMeta(t[0].datasetIndex),n.controller["_"+o+"DatasetHoverStyle"]()),r=0,a=t.length;r<a;++r){s=t[r];const e=s&&this.getDatasetMeta(s.datasetIndex).controller;e&&e[o+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],i=t.map(({datasetIndex:t,index:e})=>{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}});!q(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return 1===this._plugins._cache.filter(e=>e.plugin.id===t).length}_updateHoverStyles(t,e,i){const o=this.options.hover,n=(t,e)=>t.filter(t=>!e.some(e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)),s=n(e,t),r=i?t:n(t,e);s.length&&this.updateHoverStyle(s,o.mode,!1),r.length&&o.mode&&this.updateHoverStyle(r,o.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},o=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,o))return;const n=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,o),(n||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:o=[],options:n}=this,s=e,r=this._getActiveElements(t,o,i,s),a=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),l=function(t,e,i,o){return i&&"mouseout"!==t.type?o?e:t:null}(t,this._lastEvent,i,a);i&&(this._lastEvent=null,V(n.onHover,[t,r,this],this),a&&V(n.onClick,[t,r,this],this));const h=!q(r,o);return(h||e)&&(this._active=r,this._updateHoverStyles(r,o,e)),this._lastEvent=l,h}_getActiveElements(t,e,i,o){if("mouseout"===t.type)return[];if(!i)return e;const n=this.options.hover;return this.getElementsAtEventForMode(t,n.mode,n,o)}}function gn(){return W(fn.instances,t=>t._plugins.invalidate())}function _n(t,e,i=e){t.lineCap=H(i.borderCapStyle,e.borderCapStyle),t.setLineDash(H(i.borderDash,e.borderDash)),t.lineDashOffset=H(i.borderDashOffset,e.borderDashOffset),t.lineJoin=H(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=H(i.borderWidth,e.borderWidth),t.strokeStyle=H(i.borderColor,e.borderColor)}function yn(t,e,i){t.lineTo(i.x,i.y)}function vn(t,e,i={}){const o=t.length,{start:n=0,end:s=o-1}=i,{start:r,end:a}=e,l=Math.max(n,r),h=Math.min(s,a),c=n<r&&s<r||n>a&&s>a;return{count:o,start:l,loop:e.loop,ilen:h<l&&!c?o+h-l:h-l}}function bn(t,e,i,o){const{points:n,options:s}=e,{count:r,start:a,loop:l,ilen:h}=vn(n,i,o),c=function(t){return t.stepped?me:t.tension||"monotone"===t.cubicInterpolationMode?fe:yn}(s);let u,p,d,{move:m=!0,reverse:f}=o||{};for(u=0;u<=h;++u)p=n[(a+(f?h-u:u))%r],p.skip||(m?(t.moveTo(p.x,p.y),m=!1):c(t,d,p,f,s.stepped),d=p);return l&&(p=n[(a+(f?h:0))%r],c(t,d,p,f,s.stepped)),!!l}function xn(t,e,i,o){const n=e.points,{count:s,start:r,ilen:a}=vn(n,i,o),{move:l=!0,reverse:h}=o||{};let c,u,p,d,m,f,g=0,_=0;const y=t=>(r+(h?a-t:t))%s,v=()=>{d!==m&&(t.lineTo(g,m),t.lineTo(g,d),t.lineTo(g,f))};for(l&&(u=n[y(0)],t.moveTo(u.x,u.y)),c=0;c<=a;++c){if(u=n[y(c)],u.skip)continue;const e=u.x,i=u.y,o=0|e;o===p?(i<d?d=i:i>m&&(m=i),g=(_*g+e)/++_):(v(),t.lineTo(e,i),p=o,_=0,d=m=i),f=i}v()}function Ln(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?xn:bn}const wn="function"==typeof Path2D;function kn(t,e,i,o){wn&&!e.options.segment?function(t,e,i,o){let n=e._path;n||(n=e._path=new Path2D,e.path(n,i,o)&&n.closePath()),_n(t,e.options),t.stroke(n)}(t,e,i,o):function(t,e,i,o){const{segments:n,options:s}=e,r=Ln(e);for(const a of n)_n(t,s,a.style),t.beginPath(),r(t,e,a,{start:i,end:i+o-1})&&t.closePath(),t.stroke()}(t,e,i,o)}class Mn extends To{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const o=i.spanGaps?this._loop:this._fullLoop;Je(this._points,i,t,o,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,o=t.options.spanGaps,n=i.length;if(!n)return[];const s=!!t._loop,{start:r,end:a}=function(t,e,i,o){let n=0,s=e-1;if(i&&!o)for(;n<e&&!t[n].skip;)n++;for(;n<e&&t[n].skip;)n++;for(n%=e,i&&(s+=n);s>n&&t[s%e].skip;)s--;return s%=e,{start:n,end:s}}(i,n,s,o);return vi(t,!0===o?[{start:r,end:a,loop:s}]:function(t,e,i,o){const n=t.length,s=[];let r,a=e,l=t[e];for(r=e+1;r<=i;++r){const i=t[r%n];i.skip||i.stop?l.skip||(o=!1,s.push({start:e%n,end:(r-1)%n,loop:o}),e=a=i.stop?r:null):(a=r,l.skip&&(e=r)),l=i}return null!==a&&s.push({start:e%n,end:a%n,loop:o}),s}(i,r,a<r?a+n:a,!!t._fullLoop&&0===r&&a===n-1),i,e)}(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,o=t[e],n=this.points,s=yi(this,{property:e,start:o,end:o});if(!s.length)return;const r=[],a=function(t){return t.stepped?ci:t.tension||"monotone"===t.cubicInterpolationMode?ui:hi}(i);let l,h;for(l=0,h=s.length;l<h;++l){const{start:h,end:c}=s[l],u=n[h],p=n[c];if(u===p){r.push(u);continue}const d=a(u,p,Math.abs((o-u[e])/(p[e]-u[e])),i.stepped);d[e]=t[e],r.push(d)}return 1===r.length?r[0]:r}pathSegment(t,e,i){return Ln(this)(t,this,e,i)}path(t,e,i){const o=this.segments,n=Ln(this);let s=this._loop;e=e||0,i=i||this.points.length-e;for(const r of o)s&=n(t,this,r,{start:e,end:e+i-1});return!!s}draw(t,e,i,o){const n=this.options||{};(this.points||[]).length&&n.borderWidth&&(t.save(),kn(t,this,i,o),t.restore(
vendor: 10,088 bytes, line 34
34)),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Cn(t,e,i,o){const n=t.options,{[i]:s}=t.getProps([i],o);return Math.abs(e-s)<n.radius+n.hitRadius}class Tn extends To{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const o=this.options,{x:n,y:s}=this.getProps(["x","y"],i);return Math.pow(t-n,2)+Math.pow(e-s,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(t,e){return Cn(this,t,"x",e)}inYRange(t,e){return Cn(this,t,"y",e)}getCenterPoint(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}size(t){let e=(t=t||this.options||{}).radius||0;e=Math.max(e,e&&t.hoverRadius||0);return 2*(e+(e&&t.borderWidth||0))}draw(t,e){const i=this.options;this.skip||i.radius<.1||!ue(this,e,this.size(i)/2)||(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,he(t,i,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function Pn(t,e,i,o){if(o)return;let n=e[t],s=i[t];return"angle"===t&&(n=Ct(n),s=Ct(s)),{property:t,start:n,end:s}}function Sn(t,e,i){for(;e>t;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function An(t,e,i,o){return t&&e?o(t[i],e[i]):t?t[i]:e?e[i]:0}function On(t,e){let i=[],o=!1;return Z(t)?(o=!0,i=t):i=function(t,e){const{x:i=null,y:o=null}=t||{},n=e.points,s=[];return e.segments.forEach(({start:t,end:e})=>{e=Sn(t,e,n);const r=n[t],a=n[e];null!==o?(s.push({x:r.x,y:o}),s.push({x:a.x,y:o})):null!==i&&(s.push({x:i,y:r.y}),s.push({x:i,y:a.y}))}),s}(t,e),i.length?new Mn({points:i,options:{tension:0},_loop:o,_fullLoop:o}):null}function En(t){return t&&!1!==t.fill}function Dn(t,e,i){let o=t[e].fill;const n=[e];let s;if(!i)return o;for(;!1!==o&&-1===n.indexOf(o);){if(!N(o))return o;if(s=t[o],!s)return!1;if(s.visible)return o;n.push(o),o=s.fill}return!1}function In(t,e,i){const o=function(t){const e=t.options,i=e.fill;let o=H(i&&i.target,i);void 0===o&&(o=!!e.backgroundColor);if(!1===o||null===o)return!1;if(!0===o)return"origin";return o}(t);if(U(o))return!isNaN(o.value)&&o;let n=parseFloat(o);return N(n)&&Math.floor(n)===n?function(t,e,i,o){"-"!==t&&"+"!==t||(i=e+i);if(i===e||i<0||i>=o)return!1;return i}(o[0],e,n,i):["origin","start","end","stack","shape"].indexOf(o)>=0&&o}function zn(t,e,i){const o=[];for(let n=0;n<i.length;n++){const s=i[n],{first:r,last:a,point:l}=Bn(s,e,"x");if(!(!l||r&&a))if(r)o.unshift(l);else if(t.push(l),!a)break}t.push(...o)}function Bn(t,e,i){const o=t.interpolate(e,i);if(!o)return{};const n=o[i],s=t.segments,r=t.points;let a=!1,l=!1;for(let t=0;t<s.length;t++){const e=s[t],o=r[e.start][i],h=r[e.end][i];if(St(n,o,h)){a=n===o,l=n===h;break}}return{first:a,last:l,point:o}}class Fn{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:o,y:n,radius:s}=this;return e=e||{start:0,end:at},t.arc(o,n,s,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:o}=this,n=t.angle;return{x:e+Math.cos(n)*o,y:i+Math.sin(n)*o,angle:n}}}function Rn(t){const{chart:e,fill:i,line:o}=t;if(N(i))return function(t,e){const i=t.getDatasetMeta(e),o=i&&t.isDatasetVisible(e);return o?i.dataset:null}(e,i);if("stack"===i)return function(t){const{scale:e,index:i,line:o}=t,n=[],s=o.segments,r=o.points,a=function(t,e){const i=[],o=t.getMatchingVisibleMetas("line");for(let t=0;t<o.length;t++){const n=o[t];if(n.index===e)break;n.hidden||i.unshift(n.dataset)}return i}(e,i);a.push(On({x:null,y:e.bottom},o));for(let t=0;t<s.length;t++){const e=s[t];for(let t=e.start;t<=e.end;t++)zn(n,r[t],a)}return new Mn({points:n,options:{}})}(t);if("shape"===i)return!0;const n=function(t){const e=t.scale||{};if(e.getPointPositionForValue)return function(t){const{scale:e,fill:i}=t,o=e.options,n=e.getLabels().length,s=o.reverse?e.max:e.min,r=function(t,e,i){let o;return o="start"===t?i:"end"===t?e.options.reverse?e.min:e.max:U(t)?t.value:e.getBaseValue(),o}(i,e,s),a=[];if(o.grid.circular){const t=e.getPointPositionForValue(0,s);return new Fn({x:t.x,y:t.y,radius:e.getDistanceFromCenterForValue(r)})}for(let t=0;t<n;++t)a.push(e.getPointPositionForValue(t,r));return a}(t);return function(t){const{scale:e={},fill:i}=t,o=function(t,e){let i=null;return"start"===t?i=e.bottom:"end"===t?i=e.top:U(t)?i=e.getPixelForValue(t.value):e.getBasePixel&&(i=e.getBasePixel()),i}(i,e);if(N(o)){const t=e.isHorizontal();return{x:t?o:null,y:t?null:o}}return null}(t)}(t);return n instanceof Fn?n:On(n,o)}function Zn(t,e,i){const o=Rn(e),{chart:n,index:s,line:r,scale:a,axis:l}=e,h=r.options,c=h.fill,u=h.backgroundColor,{above:p=u,below:d=u}=c||{},m=n.getDatasetMeta(s),f=wi(n,m);o&&r.points.length&&(pe(t,i),function(t,e){const{line:i,target:o,above:n,below:s,area:r,scale:a,clip:l}=e,h=i._loop?"angle":e.axis;t.save();let c=s;s!==n&&("x"===h?(Un(t,o,r.top),jn(t,{line:i,target:o,color:n,scale:a,property:h,clip:l}),t.restore(),t.save(),Un(t,o,r.bottom)):"y"===h&&(Nn(t,o,r.left),jn(t,{line:i,target:o,color:s,scale:a,property:h,clip:l}),t.restore(),t.save(),Nn(t,o,r.right),c=n));jn(t,{line:i,target:o,color:c,scale:a,property:h,clip:l}),t.restore()}(t,{line:r,target:o,above:p,below:d,area:i,scale:a,axis:l,clip:f}),de(t))}function Un(t,e,i){const{segments:o,points:n}=e;let s=!0,r=!1;t.beginPath();for(const a of o){const{start:o,end:l}=a,h=n[o],c=n[Sn(o,l,n)];s?(t.moveTo(h.x,h.y),s=!1):(t.lineTo(h.x,i),t.lineTo(h.x,h.y)),r=!!e.pathSegment(t,a,{move:r}),r?t.closePath():t.lineTo(c.x,i)}t.lineTo(e.first().x,i),t.closePath(),t.clip()}function Nn(t,e,i){const{segments:o,points:n}=e;let s=!0,r=!1;t.beginPath();for(const a of o){const{start:o,end:l}=a,h=n[o],c=n[Sn(o,l,n)];s?(t.moveTo(h.x,h.y),s=!1):(t.lineTo(i,h.y),t.lineTo(h.x,h.y)),r=!!e.pathSegment(t,a,{move:r}),r?t.closePath():t.lineTo(i,c.y)}t.lineTo(i,e.first().y),t.closePath(),t.clip()}function jn(t,e){const{line:i,target:o,property:n,color:s,scale:r,clip:a}=e,l=function(t,e,i){const o=t.segments,n=t.points,s=e.points,r=[];for(const t of o){let{start:o,end:a}=t;a=Sn(o,a,n);const l=Pn(i,n[o],n[a],t.loop);if(!e.segments){r.push({source:t,target:l,start:n[o],end:n[a]});continue}const h=yi(e,l);for(const e of h){const o=Pn(i,s[e.start],s[e.end],e.loop),a=_i(t,n,o);for(const t of a)r.push({source:t,target:e,start:{[i]:An(l,o,"start",Math.max)},end:{[i]:An(l,o,"end",Math.min)}})}}return r}(i,o,n);for(const{source:e,target:h,start:c,end:u}of l){const{style:{backgroundColor:l=s}={}}=e,p=!0!==o;t.save(),t.fillStyle=l,Hn(t,r,a,p&&Pn(n,c,u)),t.beginPath();const d=!!i.pathSegment(t,e);let m;if(p){d?t.closePath():Gn(t,o,u,n);const e=!!o.pathSegment(t,h,{move:d,reverse:!0});m=d&&e,m||Gn(t,o,c,n)}t.closePath(),t.fill(m?"evenodd":"nonzero"),t.restore()}}function Hn(t,e,i,o){const n=e.chart.chartArea,{property:s,start:r,end:a}=o||{};if("x"===s||"y"===s){let e,o,l,h;"x"===s?(e=r,o=n.top,l=a,h=n.bottom):(e=n.left,o=r,l=n.right,h=a),t.beginPath(),i&&(e=Math.max(e,i.left),l=Math.min(l,i.right),o=Math.max(o,i.top),h=Math.min(h,i.bottom)),t.rect(e,o,l-e,h-o),t.clip()}}function Gn(t,e,i,o){const n=e.interpolate(i,o);n&&t.lineTo(n.x,n.y)}var Vn={id:"filler",afterDatasetsUpdate(t,e,i){const o=(t.data.datasets||[]).length,n=[];let s,r,a,l;for(r=0;r<o;++r)s=t.getDatasetMeta(r),a=s.dataset,l=null,a&&a.options&&a instanceof Mn&&(l={visible:t.isDatasetVisible(r),index:r,fill:In(a,r,o),chart:t,axis:s.controller.options.indexAxis,scale:s.vScale,line:a}),s.$filler=l,n.push(l);for(r=0;r<o;++r)l=n[r],l&&!1!==l.fill&&(l.fill=Dn(n,r,i.propagate))},beforeDraw(t,e,i){const o="beforeDraw"===i.drawTime,n=t.getSortedVisibleDatasetMetas(),s=t.chartArea;for(let e=n.length-1;e>=0;--e){const i=n[e].$filler;i&&(i.line.updateControlPoints(s,i.axis),o&&i.fill&&Zn(t.ctx,i,s))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const o=t.getSortedVisibleDatasetMetas();for(let e=o.length-1;e>=0;--e){const i=o[e].$filler;En(i)&&Zn(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const o=e.meta.$filler;En(o)&&"beforeDatasetDraw"===i.drawTime&&Zn(t.ctx,o,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};new WeakMap;const Wn={average(t){if(!t.length)return!1;let e,i,o=new Set,n=0,s=0;for(e=0,i=t.length;e<i;++e){const i=t[e].element;if(i&&i.hasValue()){const t=i.tooltipPosition();o.add(t.x),n+=t.y,++s}}if(0===s||0===o.size)return!1;return{x:[...o].reduce((t,e)=>t+e)/o.size,y:n/s}},nearest(t,e){if(!t.length)return!1;let i,o,n,s=e.x,r=e.y,a=Number.POSITIVE_INFINITY;for(i=0,o=t.length;i<o;++i){const o=t[i].element;if(o&&o.hasValue()){const t=kt(e,o.getCenterPoint());t<a&&(a=t,n=o)}}if(n){const t=n.tooltipPosition();s=t.x,r=t.y}return{x:s,y:r}}};function qn(t,e){return e&&(Z(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function $n(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function Kn(t,e){const{element:i,datasetIndex:o,index:n}=e,s=t.getDatasetMeta(o).controller,{label:r,value:a}=s.getLabelAndValue(n);return{chart:t,label:r,parsed:s.getParsed(n),raw:t.data.datasets[o].data[n],formattedValue:a,dataset:s.getDataset(),dataIndex:n,datasetIndex:o,element:i}}function Jn(t,e){const i=t.chart.ctx,{body:o,footer:n,title:s}=t,{boxWidth:r,boxHeight:a}=e,l=Pe(e.bodyFont),h=Pe(e.titleFont),c=Pe(e.footerFont),u=s.length,p=n.length,d=o.length,m=Te(e.padding);let f=m.height,g=0,_=o.reduce((t,e)=>t+e.before.length+e.lines.length+e.after.length,0);if(_+=t.beforeBody.length+t.afterBody.length,u&&(f+=u*h.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),_){f+=d*(e.displayColors?Math.max(a,l.lineHeight):l.lineHeight)+(_-d)*l.lineHeight+(_-1)*e.bodySpacing}p&&(f+=e.footerMarginTop+p*c.lineHeight+(p-1)*e.footerSpacing);let y=0;const v=function(t){g=Math.max(g,i.measureText(t).width+y)};return i.save(),i.font=h.string,W(t.title,v),i.font=l.string,W(t.beforeBody.concat(t.afterBody),v),y=e.displayColors?r+2+e.boxPadding:0,W(o,t=>{W(t.before,v),W(t.lines,v),W(t.after,v)}
vendor: 16,901 bytes, line 34
34),y=0,i.font=c.string,W(t.footer,v),i.restore(),g+=m.width,{width:g,height:f}}function Yn(t,e,i,o){const{x:n,width:s}=i,{width:r,chartArea:{left:a,right:l}}=t;let h="center";return"center"===o?h=n<=(a+l)/2?"left":"right":n<=s/2?h="left":n>=r-s/2&&(h="right"),function(t,e,i,o){const{x:n,width:s}=o,r=i.caretSize+i.caretPadding;return"left"===t&&n+s+r>e.width||"right"===t&&n-s-r<0||void 0}(h,t,e,i)&&(h="center"),h}function Xn(t,e,i){const o=i.yAlign||e.yAlign||function(t,e){const{y:i,height:o}=e;return i<o/2?"top":i>t.height-o/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||Yn(t,e,i,o),yAlign:o}}function Qn(t,e,i,o){const{caretSize:n,caretPadding:s,cornerRadius:r}=t,{xAlign:a,yAlign:l}=i,h=n+s,{topLeft:c,topRight:u,bottomLeft:p,bottomRight:d}=Ce(r);let m=function(t,e){let{x:i,width:o}=t;return"right"===e?i-=o:"center"===e&&(i-=o/2),i}(e,a);const f=function(t,e,i){let{y:o,height:n}=t;return"top"===e?o+=i:o-="bottom"===e?n+i:n/2,o}(e,l,h);return"center"===l?"left"===a?m+=h:"right"===a&&(m-=h):"left"===a?m-=Math.max(c,p)+n:"right"===a&&(m+=Math.max(u,d)+n),{x:Pt(m,0,o.width-e.width),y:Pt(f,0,o.height-e.height)}}function ts(t,e,i){const o=Te(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-o.right:t.x+o.left}function es(t){return qn([],$n(t))}function is(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}const os={beforeTitle:B,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,o=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(o>0&&e.dataIndex<o)return i[e.dataIndex]}return""},afterTitle:B,beforeBody:B,beforeLabel:B,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const i=t.formattedValue;return R(i)||(e+=i),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:B,afterBody:B,beforeFooter:B,footer:B,afterFooter:B};function ns(t,e,i,o){const n=t[e].call(i,o);return void 0===n?os[e].call(i,o):n}class ss extends To{static positioners=Wn;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),o=i.enabled&&e.options.animation&&i.animations,n=new Si(this.chart,o);return o._cacheable&&(this._cachedAnimations=Object.freeze(n)),n}getContext(){return this.$context||(this.$context=(t=this.chart.getContext(),e=this,i=this._tooltipItems,Ae(t,{tooltip:e,tooltipItems:i,type:"tooltip"})));var t,e,i}getTitle(t,e){const{callbacks:i}=e,o=ns(i,"beforeTitle",this,t),n=ns(i,"title",this,t),s=ns(i,"afterTitle",this,t);let r=[];return r=qn(r,$n(o)),r=qn(r,$n(n)),r=qn(r,$n(s)),r}getBeforeBody(t,e){return es(ns(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:i}=e,o=[];return W(t,t=>{const e={before:[],lines:[],after:[]},n=is(i,t);qn(e.before,$n(ns(n,"beforeLabel",this,t))),qn(e.lines,ns(n,"label",this,t)),qn(e.after,$n(ns(n,"afterLabel",this,t))),o.push(e)}),o}getAfterBody(t,e){return es(ns(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,o=ns(i,"beforeFooter",this,t),n=ns(i,"footer",this,t),s=ns(i,"afterFooter",this,t);let r=[];return r=qn(r,$n(o)),r=qn(r,$n(n)),r=qn(r,$n(s)),r}_createItems(t){const e=this._active,i=this.chart.data,o=[],n=[],s=[];let r,a,l=[];for(r=0,a=e.length;r<a;++r)l.push(Kn(this.chart,e[r]));return t.filter&&(l=l.filter((e,o,n)=>t.filter(e,o,n,i))),t.itemSort&&(l=l.sort((e,o)=>t.itemSort(e,o,i))),W(l,e=>{const i=is(t.callbacks,e);o.push(ns(i,"labelColor",this,e)),n.push(ns(i,"labelPointStyle",this,e)),s.push(ns(i,"labelTextColor",this,e))}),this.labelColors=o,this.labelPointStyles=n,this.labelTextColors=s,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),o=this._active;let n,s=[];if(o.length){const t=Wn[i.position].call(this,o,this._eventPosition);s=this._createItems(i),this.title=this.getTitle(s,i),this.beforeBody=this.getBeforeBody(s,i),this.body=this.getBody(s,i),this.afterBody=this.getAfterBody(s,i),this.footer=this.getFooter(s,i);const e=this._size=Jn(this,i),r=Object.assign({},t,e),a=Xn(this.chart,i,r),l=Qn(i,r,a,this.chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,n={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(n={opacity:0});this._tooltipItems=s,this.$context=void 0,n&&this._resolveAnimations().update(this,n),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,o){const n=this.getCaretPosition(t,i,o);e.lineTo(n.x1,n.y1),e.lineTo(n.x2,n.y2),e.lineTo(n.x3,n.y3)}getCaretPosition(t,e,i){const{xAlign:o,yAlign:n}=this,{caretSize:s,cornerRadius:r}=i,{topLeft:a,topRight:l,bottomLeft:h,bottomRight:c}=Ce(r),{x:u,y:p}=t,{width:d,height:m}=e;let f,g,_,y,v,b;return"center"===n?(v=p+m/2,"left"===o?(f=u,g=f-s,y=v+s,b=v-s):(f=u+d,g=f+s,y=v-s,b=v+s),_=f):(g="left"===o?u+Math.max(a,h)+s:"right"===o?u+d-Math.max(l,c)-s:this.caretX,"top"===n?(y=p,v=y-s,f=g-s,_=g+s):(y=p+m,v=y+s,f=g+s,_=g-s),b=y),{x1:f,x2:g,x3:_,y1:y,y2:v,y3:b}}drawTitle(t,e,i){const o=this.title,n=o.length;let s,r,a;if(n){const l=pi(i.rtl,this.x,this.width);for(t.x=ts(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",s=Pe(i.titleFont),r=i.titleSpacing,e.fillStyle=i.titleColor,e.font=s.string,a=0;a<n;++a)e.fillText(o[a],l.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+r,a+1===n&&(t.y+=i.titleMarginBottom-r)}}_drawColorBox(t,e,i,o,n){const s=this.labelColors[i],r=this.labelPointStyles[i],{boxHeight:a,boxWidth:l}=n,h=Pe(n.bodyFont),c=ts(this,"left",n),u=o.x(c),p=a<h.lineHeight?(h.lineHeight-a)/2:0,d=e.y+p;if(n.usePointStyle){const e={radius:Math.min(l,a)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1},i=o.leftForLtr(u,l)+l/2,h=d+a/2;t.strokeStyle=n.multiKeyBackground,t.fillStyle=n.multiKeyBackground,he(t,e,i,h),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,he(t,e,i,h)}else{t.lineWidth=U(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,t.strokeStyle=s.borderColor,t.setLineDash(s.borderDash||[]),t.lineDashOffset=s.borderDashOffset||0;const e=o.leftForLtr(u,l),i=o.leftForLtr(o.xPlus(u,1),l-2),r=Ce(s.borderRadius);Object.values(r).some(t=>0!==t)?(t.beginPath(),t.fillStyle=n.multiKeyBackground,ve(t,{x:e,y:d,w:l,h:a,radius:r}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),ve(t,{x:i,y:d+1,w:l-2,h:a-2,radius:r}),t.fill()):(t.fillStyle=n.multiKeyBackground,t.fillRect(e,d,l,a),t.strokeRect(e,d,l,a),t.fillStyle=s.backgroundColor,t.fillRect(i,d+1,l-2,a-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:o}=this,{bodySpacing:n,bodyAlign:s,displayColors:r,boxHeight:a,boxWidth:l,boxPadding:h}=i,c=Pe(i.bodyFont);let u=c.lineHeight,p=0;const d=pi(i.rtl,this.x,this.width),m=function(i){e.fillText(i,d.x(t.x+p),t.y+u/2),t.y+=u+n},f=d.textAlign(s);let g,_,y,v,b,x,L;for(e.textAlign=s,e.textBaseline="middle",e.font=c.string,t.x=ts(this,f,i),e.fillStyle=i.bodyColor,W(this.beforeBody,m),p=r&&"right"!==f?"center"===s?l/2+h:l+2+h:0,v=0,x=o.length;v<x;++v){for(g=o[v],_=this.labelTextColors[v],e.fillStyle=_,W(g.before,m),y=g.lines,r&&y.length&&(this._drawColorBox(e,t,v,d,i),u=Math.max(c.lineHeight,a)),b=0,L=y.length;b<L;++b)m(y[b]),u=c.lineHeight;W(g.after,m)}p=0,u=c.lineHeight,W(this.afterBody,m),t.y-=n}drawFooter(t,e,i){const o=this.footer,n=o.length;let s,r;if(n){const a=pi(i.rtl,this.x,this.width);for(t.x=ts(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=a.textAlign(i.footerAlign),e.textBaseline="middle",s=Pe(i.footerFont),e.fillStyle=i.footerColor,e.font=s.string,r=0;r<n;++r)e.fillText(o[r],a.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+i.footerSpacing}}drawBackground(t,e,i,o){const{xAlign:n,yAlign:s}=this,{x:r,y:a}=t,{width:l,height:h}=i,{topLeft:c,topRight:u,bottomLeft:p,bottomRight:d}=Ce(o.cornerRadius);e.fillStyle=o.backgroundColor,e.strokeStyle=o.borderColor,e.lineWidth=o.borderWidth,e.beginPath(),e.moveTo(r+c,a),"top"===s&&this.drawCaret(t,e,i,o),e.lineTo(r+l-u,a),e.quadraticCurveTo(r+l,a,r+l,a+u),"center"===s&&"right"===n&&this.drawCaret(t,e,i,o),e.lineTo(r+l,a+h-d),e.quadraticCurveTo(r+l,a+h,r+l-d,a+h),"bottom"===s&&this.drawCaret(t,e,i,o),e.lineTo(r+p,a+h),e.quadraticCurveTo(r,a+h,r,a+h-p),"center"===s&&"left"===n&&this.drawCaret(t,e,i,o),e.lineTo(r,a+c),e.quadraticCurveTo(r,a,r+c,a),e.closePath(),e.fill(),o.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,o=i&&i.x,n=i&&i.y;if(o||n){const i=Wn[t.position].call(this,this._active,this._eventPosition);if(!i)return;const s=this._size=Jn(this,t),r=Object.assign({},i,this._size),a=Xn(e,t,r),l=Qn(t,r,a,e);o._to===l.x&&n._to===l.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=s.width,this.height=s.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const o={width:this.width,height:this.height},n={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const s=Te(e.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&r&&(t.save(),t.globalAlpha=i,this.drawBackground(n,t,o,e),di(t,e.textDirection),n.y+=s.top,this.drawTitle(n,t,e),this.drawBody(n,t,e),this.drawFooter(n,t,e),mi(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,o=t.map(({datasetIndex:t,index:e})=>{const i=this.chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}),n=!q(i,o),s=this._positionChanged(o,e);(n||s)&&(this._active=o,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const o=this.options,n=this._active||[],s=this._getActiveElements(t,n,e,i),r=this._positionChanged(s,t),a=e||!q(s,n)||r;return a&&(this._active=s,(o.enabled||o.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),a}_getActiveElements(t,e,i,o){const n=this.options;if("mouseout"===t.type)return[];if(!o)return e.filter(t=>this.chart.data.datasets[t.datasetIndex]&&void 0!==this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index));const s=this.chart.getElementsAtEventForMode(t,n.mode,n,i);return n.reverse&&s.reverse(),s}_positionChanged(t,e){const{caretX:i,caretY:o,options:n}=this,s=Wn[n.position].call(this,t,e);return!1!==s&&(i!==s.x||o!==s.y)}}var rs={id:"tooltip",_element:ss,positioners:Wn,afterInit(t,e,i){i&&(t.tooltip=new ss({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",{...i,cancelable:!0}))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:os},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};function as(t,e){const i=[],{bounds:o,step:n,min:s,max:r,precision:a,count:l,maxTicks:h,maxDigits:c,includeBounds:u}=t,p=n||1,d=h-1,{min:m,max:f}=e,g=!R(s),_=!R(r),y=!R(l),v=(f-m)/(c+1);let b,x,L,w,k=_t((f-m)/d/p)*p;if(k<1e-14&&!g&&!_)return[{value:m},{value:f}];w=Math.ceil(f/k)-Math.floor(m/k),w>d&&(k=_t(w*k/d/p)*p),R(a)||(b=Math.pow(10,a),k=Math.ceil(k*b)/b),"ticks"===o?(x=Math.floor(m/k)*k,L=Math.ceil(f/k)*k):(x=m,L=f),g&&_&&n&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((r-s)/n,k/1e3)?(w=Math.round(Math.min((r-s)/k,h)),k=(r-s)/w,x=s,L=r):y?(x=g?s:x,L=_?r:L,w=l-1,k=(L-x)/w):(w=(L-x)/k,w=gt(w,Math.round(w),k/1e3)?Math.round(w):Math.ceil(w));const M=Math.max(Lt(k),Lt(x));b=Math.pow(10,R(a)?M:a),x=Math.round(x*b)/b,L=Math.round(L*b)/b;let C=0;for(g&&(u&&x!==s?(i.push({value:s}),x<s&&C++,gt(Math.round((x+C*k)*b)/b,s,ls(s,v,t))&&C++):x<s&&C++);C<w;++C){const t=Math.round((x+C*k)*b)/b;if(_&&t>r)break;i.push({value:t})}return _&&u&&L!==r?i.length&&gt(i[i.length-1].value,r,ls(r,v,t))?i[i.length-1].value=r:i.push({value:r}):_&&L!==r||i.push({value:L}),i}function ls(t,e,{horizontal:i,minRotation:o}){const n=bt(o),s=(i?Math.sin(n):Math.cos(n))||.001,r=.75*e*(""+t).length;return Math.min(e/s,r)}class hs extends Fo{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return R(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:o,max:n}=this;const s=t=>o=e?o:t,r=t=>n=i?n:t;if(t){const t=ft(o),e=ft(n);t<0&&e<0?r(0):t>0&&e>0&&s(0)}if(o===n){let e=0===n?1:Math.abs(.05*n);r(n+e),t||s(o-e)}this.min=o,this.max=n}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:o}=t;return o?(e=Math.ceil(this.max/o)-Math.floor(this.min/o)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${o} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const o=as({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&vt(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const o=(i-e)/Math.max(t.length-1,1)/2;e-=o,i+=o}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return Yt(t,this.chart.options.locale,this.options.ticks.format)}}class cs extends hs{static id="linear";static defaults={ticks:{callback:Qt.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=N(t)?t:0,this.max=N(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=bt(this.options.ticks.minRotation),o=(t?Math.sin(i):Math.cos(i))||.001,n=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,n.lineHeight/o))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}Qt.formatters.logarithmic;Qt.formatters.numeric;
vendor: 12,297 bytes, line 34
34var us=i(481),ps=i.n(us);const ds=window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest,ms=""===document.documentElement.style.pointerEvents,fs={cors:ds,pointerEvents:ms};const gs={attributionWidthOffset:55};let _s=0;function ys(t){let e="";t.f=t.f||"json";for(const i in t)if(Object.hasOwn(t,i)){const o=t[i],n=Object.prototype.toString.call(o);let s;e.length&&(e+="&"),s="[object Array]"===n?"[object Object]"===Object.prototype.toString.call(o[0])?JSON.stringify(o):o.join(","):"[object Object]"===n?JSON.stringify(o):"[object Date]"===n?o.valueOf():o,e+=`${encodeURIComponent(i)}=${encodeURIComponent(s)}`}return e.replaceAll("'","%27")}function vs(t,e){const i=new window.XMLHttpRequest;return i.onerror=function(){i.onreadystatechange=us.Util.falseFn,t.call(e,{error:{code:500,message:"XMLHttpRequest error"}},null)},i.onreadystatechange=function(){let o,n;if(4===i.readyState){try{o=JSON.parse(i.responseText)}catch(t){o=null,n={code:500,message:"Could not parse response as JSON. This could also be caused by a CORS or XMLHttpRequest error."}}!n&&o.error&&(n=o.error,o=null),i.onerror=us.Util.falseFn,t.call(e,n,o)}},i.ontimeout=function(){this.onerror()},i}function bs(t,e,i,o){const n=vs(i,o);return n.open("GET",`${t}?${ys(e)}`,!0),null!=o&&void 0!==o.options&&(n.timeout=o.options.timeout,o.options.withCredentials&&(n.withCredentials=!0)),n.send(null),n}function xs(t,e,i,o){const n=ys(e),s=vs(i,o),r=`${t}?${n}`.length;if(r<=2e3&&fs.cors?s.open("GET",`${t}?${n}`):r>2e3&&fs.cors&&(s.open("POST",t),s.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8")),null!=o&&void 0!==o.options&&(s.timeout=o.options.timeout,o.options.withCredentials&&(s.withCredentials=!0)),r<=2e3&&fs.cors)s.send(null);else{if(!(r>2e3&&fs.cors))return r<=2e3&&!fs.cors?Ls(t,e,i,o):void ks(`a request to ${t} was longer then 2000 characters and this browser cannot make a cross-domain post request. Please use a proxy https://developers.arcgis.com/esri-leaflet/api-reference/request/`);s.send(n)}return s}function Ls(t,e,i,o){window._EsriLeafletCallbacks=window._EsriLeafletCallbacks||{};const n=`c${_s}`;e.callback=`window._EsriLeafletCallbacks.${n}`,window._EsriLeafletCallbacks[n]=function(t){if(!0!==window._EsriLeafletCallbacks[n]){let e;const s=Object.prototype.toString.call(t);"[object Object]"!==s&&"[object Array]"!==s&&(e={error:{code:500,message:"Expected array or object as JSONP response"}},t=null),!e&&t.error&&(e=t,t=null),i.call(o,e,t),window._EsriLeafletCallbacks[n]=!0}};const s=us.DomUtil.create("script",null,document.body);return s.type="text/javascript",s.src=`${t}?${ys(e)}`,s.id=n,s.onerror=function(t){if(t&&!0!==window._EsriLeafletCallbacks[n]){const t={error:{code:500,message:"An unknown error occurred"}};i.call(o,t),window._EsriLeafletCallbacks[n]=!0}},us.DomUtil.addClass(s,"esri-leaflet-jsonp"),_s++,{id:n,url:s.src,abort(){window._EsriLeafletCallbacks._callback[n]({code:0,message:"Request aborted."})}}}const ws=fs.cors?bs:Ls;function ks(...t){console&&console.warn&&console.warn.apply(console,t)}ws.CORS=bs,ws.JSONP=Ls;const Ms={request:xs,get:ws,post:function(t,e,i,o){const n=vs(i,o);return n.open("POST",t),null!=o&&void 0!==o.options&&(n.timeout=o.options.timeout),n.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),n.send(ys(e)),n}};var Cs=Ms,Ts=function(t,e,i,o){var n=(o[0]-i[0])*(t[1]-i[1])-(o[1]-i[1])*(t[0]-i[0]),s=(e[0]-t[0])*(t[1]-i[1])-(e[1]-t[1])*(t[0]-i[0]),r=(o[1]-i[1])*(e[0]-t[0])-(o[0]-i[0])*(e[1]-t[1]);if(0!==r){var a=n/r,l=s/r;if(a>=0&&a<=1&&l>=0&&l<=1)return!0}return!1},Ps=function(t,e){for(var i=0;i<t.length-1;i++)for(var o=0;o<e.length-1;o++)if(Ts(t[i],t[i+1],e[o],e[o+1]))return!0;return!1},Ss=function(t){return function(t,e){for(var i=0;i<t.length;i++)if(t[i]!==e[i])return!1;return!0}(t[0],t[t.length-1])||t.push(t[0]),t},As=function(t){for(var e,i=0,o=0,n=t.length,s=t[o];o<n-1;o++)i+=((e=t[o+1])[0]-s[0])*(e[1]+s[1]),s=e;return i>=0},Os=function(t){var e={};for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e},Es=function(t,e){var i=Ps(t,e),o=function(t,e){for(var i=!1,o=-1,n=t.length,s=n-1;++o<n;s=o)(t[o][1]<=e[1]&&e[1]<t[s][1]||t[s][1]<=e[1]&&e[1]<t[o][1])&&e[0]<(t[s][0]-t[o][0])*(e[1]-t[o][1])/(t[s][1]-t[o][1])+t[o][0]&&(i=!i);return i}(t,e[0]);return!(i||!o)},Ds=function t(e,i){var o={};if(e.features){o.type="FeatureCollection",o.features=[];for(var n=0;n<e.features.length;n++)o.features.push(t(e.features[n],i))}if("number"==typeof e.x&&"number"==typeof e.y&&(o.type="Point",o.coordinates=[e.x,e.y],"number"==typeof e.z&&o.coordinates.push(e.z)),e.points&&(o.type="MultiPoint",o.coordinates=e.points.slice(0)),e.paths&&(1===e.paths.length?(o.type="LineString",o.coordinates=e.paths[0].slice(0)):(o.type="MultiLineString",o.coordinates=e.paths.slice(0))),e.rings&&(o=function(t){for(var e,i,o,n=[],s=[],r=0;r<t.length;r++){var a=Ss(t[r].slice(0));if(!(a.length<4))if(As(a)){var l=[a.slice().reverse()];n.push(l)}else s.push(a.slice().reverse())}for(var h=[];s.length;){o=s.pop();var c=!1;for(e=n.length-1;e>=0;e--)if(i=n[e][0],Es(i,o)){n[e].push(o),c=!0;break}c||h.push(o)}for(;h.length;){o=h.pop();var u=!1;for(e=n.length-1;e>=0;e--)if(i=n[e][0],Ps(i,o)){n[e].push(o),u=!0;break}u||n.push([o.reverse()])}return 1===n.length?{type:"Polygon",coordinates:n[0]}:{type:"MultiPolygon",coordinates:n}}(e.rings.slice(0))),"number"==typeof e.xmin&&"number"==typeof e.ymin&&"number"==typeof e.xmax&&"number"==typeof e.ymax&&(o.type="Polygon",o.coordinates=[[[e.xmax,e.ymax],[e.xmin,e.ymax],[e.xmin,e.ymin],[e.xmax,e.ymin],[e.xmax,e.ymax]]]),(e.geometry||e.attributes)&&(o.type="Feature",o.geometry=e.geometry?t(e.geometry):null,o.properties=e.attributes?Os(e.attributes):null,e.attributes))try{o.id=function(t,e){for(var i=e?[e,"OBJECTID","FID"]:["OBJECTID","FID"],o=0;o<i.length;o++){var n=i[o];if(n in t&&("string"==typeof t[n]||"number"==typeof t[n]))return t[n]}throw Error("No valid id attribute found")}(e.attributes,i)}catch(t){}return JSON.stringify(o.geometry)===JSON.stringify({})&&(o.geometry=null),e.spatialReference&&e.spatialReference.wkid&&4326!==e.spatialReference.wkid&&console.warn("Object converted in non-standard crs - "+JSON.stringify(e.spatialReference)),o},Is=function(t){var e=[],i=t.slice(0),o=Ss(i.shift().slice(0));if(o.length>=4){As(o)||o.reverse(),e.push(o);for(var n=0;n<i.length;n++){var s=Ss(i[n].slice(0));s.length>=4&&(As(s)&&s.reverse(),e.push(s))}}return e},zs=function t(e,i){i=i||"OBJECTID";var o,n={wkid:4326},s={};switch(e.type){case"Point":s.x=e.coordinates[0],s.y=e.coordinates[1],null!=e.coordinates[2]&&(s.z=e.coordinates[2]),s.spatialReference=n;break;case"MultiPoint":s.points=e.coordinates.slice(0),null!=e.coordinates[0][2]&&(s.hasZ=!0),s.spatialReference=n;break;case"LineString":s.paths=[e.coordinates.slice(0)],null!=e.coordinates[0][2]&&(s.hasZ=!0),s.spatialReference=n;break;case"MultiLineString":s.paths=e.coordinates.slice(0),null!=e.coordinates[0][0][2]&&(s.hasZ=!0),s.spatialReference=n;break;case"Polygon":s.rings=Is(e.coordinates.slice(0)),null!=e.coordinates[0][0][2]&&(s.hasZ=!0),s.spatialReference=n;break;case"MultiPolygon":s.rings=function(t){for(var e=[],i=0;i<t.length;i++)for(var o=Is(t[i]),n=o.length-1;n>=0;n--){var s=o[n].slice(0);e.push(s)}return e}(e.coordinates.slice(0)),null!=e.coordinates[0][0][0][2]&&(s.hasZ=!0),s.spatialReference=n;break;case"Feature":e.geometry&&(s.geometry=t(e.geometry,i)),s.attributes=e.properties?Os(e.properties):{},e.id&&(s.attributes[i]=e.id);break;case"FeatureCollection":for(s=[],o=0;o<e.features.length;o++)s.push(t(e.features[o],i));break;case"GeometryCollection":for(s=[],o=0;o<e.geometries.length;o++)s.push(t(e.geometries[o],i))}return s};function Bs(t,e){return zs(t,e)}function Fs(t,e){return Ds(t,e)}function Rs(t){if("NaN"!==t.xmin&&"NaN"!==t.ymin&&"NaN"!==t.xmax&&"NaN"!==t.ymax){const e=(0,us.latLng)(t.ymin,t.xmin),i=(0,us.latLng)(t.ymax,t.xmax);return(0,us.latLngBounds)(e,i)}return null}function Zs(t){return{xmin:(t=(0,us.latLngBounds)(t)).getSouthWest().lng,ymin:t.getSouthWest().lat,xmax:t.getNorthEast().lng,ymax:t.getNorthEast().lat,spatialReference:{wkid:4326}}}const Us=/^(OBJECTID|FID|OID|ID)$/i;function Ns(t){let e;if(t.objectIdFieldName)e=t.objectIdFieldName;else if(t.fields){for(let i=0;i<=t.fields.length-1;i++)if("esriFieldTypeOID"===t.fields[i].type){e=t.fields[i].name;break}if(!e)for(let i=0;i<=t.fields.length-1;i++)if(t.fields[i].name.match(Us)){e=t.fields[i].name;break}}return e}function js(t){for(const e in t.attributes)if(e.match(Us))return e}function Hs(t,e){let i;const o=t.features||t.results,n=o&&o.length;i=e||Ns(t);const s={type:"FeatureCollection",features:[]};if(n)for(let t=o.length-1;t>=0;t--){const e=Fs(o[t],i||js(o[t]));s.features.push(e)}return s}function Gs(t){return"/"!==(t=us.Util.trim(t))[t.length-1]&&(t+="/"),t}function Vs(t){if(-1!==t.url.indexOf("?")){t.requestParams=t.requestParams||{};const e=t.url.substring(t.url.indexOf("?")+1);t.url=t.url.split("?")[0],t.requestParams=JSON.parse(`{"${decodeURI(e).replace(/"/g,'\\"').replace(/&/g,'","').replace(/=/g,'":"')}"}`)}return t.url=Gs(t.url.split("?")[0]),t}function Ws(t){return/^(?!.*utility\.arcgis\.com).*\.arcgis\.com.*FeatureServer/i.test(t)}function qs(t){let e;switch(t){case"Point":e="esriGeometryPoint";break;case"MultiPoint":e="esriGeometryMultipoint";break;case"LineString":case"MultiLineString":e="esriGeometryPolyline";break;case"Polygon":case"MultiPolygon":e="esriGeometryPolygon"}return e}function $s(t){return t.getSize().x-gs.attributionWidthOffset+"px"}function Ks(t){if(t.attributionControl){if(t.attributionControl._esriAttributionLayerCount||(t.attributionControl._esriAttributionLayerCount=0),0===t.attributionControl._esriAttributionLayerCount){if(!t.attributionControl._esriAttributionAddedOnce){const e=document.createElement("style");e.type="text/css",e.innerHTML=".esri-truncated-attribution:hover {white-space: normal;}",document.getElementsByTagName("head")[0].appendChild(e);const i=document.createElement("style");i.type="text/css",i.innerHTML=`.esri-truncated-attribution {vertical-align: -3px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;display: inline-block;transition: 0s white-space;transition-delay: 1s;max-width: ${$s(t)};}`,document.getElementsByTagName("head")[0].appendChild(i),t.on("resize",e=>{t.attributionControl&&(t.attributionControl._container.style.maxWidth=$s(e.target))}),t.attributionControl._esriAttributionAddedOnce=!0}us.DomUtil.addClass(t.attributionControl._container,"esri-truncated-attribution:hover"),us.DomUtil.addClass(t.attributionControl._container,"esri-truncated-attribution")}t.attributionControl._esriAttributionLayerCount=t.attributionControl._esriAttributionLayerCount+1}}function Js(){return'Powered by <a href="https://www.esri.com">Esri</a>'}function Ys(t){t.attributionControl&&(t.attributionControl._esriAttributionLayerCount&&1===t.attributionControl._esriAttributionLayerCount&&(us.DomUtil.removeClass(t.attributionControl._container,"esri-truncated-attribution:hover"),us.DomUtil.removeClass(t.attributionControl._container,"esri-truncated-attribution")),t.attributionControl._esriAttributionLayerCount=t.attributionControl._esriAttributionLayerCount-1)}function Xs(t){const e={geometry:null,geometryType:null};return t instanceof us.LatLngBounds?(e.geometry=Zs(t),e.geometryType="esriGeometryEnvelope",e):(t.getLatLng&&(t=t.getLatLng()),t instanceof us.LatLng&&(t={type:"Point",coordinates:[t.lng,t.lat]}),t instanceof us.GeoJSON&&(t=t.getLayers()[0].feature.geometry,e.geometry=Bs(t),e.geometryType=qs(t.type)),t.toGeoJSON&&(t=t.toGeoJSON()),"Feature"===t.type&&(t=t.geometry),"Point"===t.type||"LineString"===t.type||"Polygon"===t.type||"MultiPolygon"===t.type?(e.geometry=Bs(t),e.geometryType=qs(t.type),e):void ks("invalid geometry passed to spatial query. Should be L.LatLng, L.LatLngBounds, L.Marker or a GeoJSON Point, Line, Polygon or MultiPolygon object"))}function Qs(t,e){fs.cors&&xs(t,{},us.Util.bind((t,i)=>{if(t)return;e._esriAttributions=[];for(let t=0;t<i.contributors.length;t++){const o=i.contributors[t];for(let t=0;t<o.coverageAreas.length;t++){const i=o.coverageAreas[t],n=(0,us.latLng)(i.bbox[0],i.bbox[1]),s=(0,us.latLng)(i.bbox[2],i.bbox[3]);e._esriAttributions.push({attribution:o.attribution,score:i.score,boun
34ds:(0,us.latLngBounds)(n,s),minZoom:i.zoomMin,maxZoom:i.zoomMax})}}e._esriAttributions.sort((t,e)=>e.score-t.score);tr({target:e})},this))}function tr(t){const e=t.target,i=e._esriAttributions;if(!e||!e.attributionControl)return;const o=e.attributionControl._container.querySelector(".esri-dynamic-attribution");if(o&&i){let t="";const n=e.getBounds(),s=(0,us.latLngBounds)(n.getSouthWest().wrap(),n.getNorthEast().wrap()),r=e.getZoom();for(let e=0;e<i.length;e++){const o=i[e],n=o.attribution;!t.match(n)&&o.bounds.intersects(s)&&r>=o.minZoom&&r<=o.maxZoom&&(t+=`, ${n}`)}t=`Powered by <a href="https://www.esri.com">Esri</a> | ${t.substr(2)}`,o.innerHTML=t,o.style.maxWidth=$s(e),e.fire("attributionupdated",{attribution:t})}}const er={warn:ks,cleanUrl:Gs,getUrlParams:Vs,isArcgisOnline:Ws,geojsonTypeToArcGIS:qs,responseToFeatureCollection:Hs,geojsonToArcGIS:Bs,arcgisToGeoJSON:Fs,boundsToExtent:Zs,extentToBounds:Rs,calcAttributionWidth:$s,setEsriAttribution:Ks,getEsriAttributionHtmlString:Js,removeEsriAttribution:Ys,_setGeometry:Xs,_getAttributionData:Qs,_updateMapAttribution:tr,_findIdAttributeFromFeature:js,_findIdAttributeFromResponse:Ns};const ir=us.Class.extend({options:{proxy:!1,useCors:ds},generateSetter(t,e){return us.Util.bind(function(e){return this.params[t]=e,this},e)},initialize(t){if(t.request&&t.options?(this._service=t,us.Util.setOptions(this,t.options)):(us.Util.setOptions(this,t),this.options.url=Gs(t.url)),this.params=us.Util.extend({},this.params||{}),this.setters)for(const t in this.setters){const e=this.setters[t];this[t]=this.generateSetter(e,this)}},token(t){return this._service?this._service.authenticate(t):this.params.token=t,this},apikey(t){return this.token(t)},format(t){return this.params.returnUnformattedValues=!t,this},request(t,e){return this.options.requestParams&&us.Util.extend(this.params,this.options.requestParams),this._service?this._service.request(this.path,this.params,t,e):this._request("request",this.path,this.params,t,e)},_request(t,e,i,o,n){const s=this.options.proxy?`${this.options.proxy}?${this.options.url}${e}`:this.options.url+e;return"get"!==t&&"request"!==t||this.options.useCors?Cs[t](s,i,o,n):Cs.get.JSONP(s,i,o,n)}});const or=ir.extend({setters:{offset:"resultOffset",limit:"resultRecordCount",fields:"outFields",precision:"geometryPrecision",featureIds:"objectIds",returnGeometry:"returnGeometry",returnM:"returnM",transform:"datumTransformation",token:"token"},path:"query",params:{returnGeometry:!0,where:"1=1",outSR:4326,outFields:"*"},within(t){return this._setGeometryParams(t),this.params.spatialRel="esriSpatialRelContains",this},intersects(t){return this._setGeometryParams(t),this.params.spatialRel="esriSpatialRelIntersects",this},contains(t){return this._setGeometryParams(t),this.params.spatialRel="esriSpatialRelWithin",this},crosses(t){return this._setGeometryParams(t),this.params.spatialRel="esriSpatialRelCrosses",this},touches(t){return this._setGeometryParams(t),this.params.spatialRel="esriSpatialRelTouches",this},overlaps(t){return this._setGeometryParams(t),this.params.spatialRel="esriSpatialRelOverlaps",this},bboxIntersects(t){return this._setGeometryParams(t),this.params.spatialRel="esriSpatialRelEnvelopeIntersects",this},indexIntersects(t){return this._setGeometryParams(t),this.params.spatialRel="esriSpatialRelIndexIntersects",this},nearby(t,e){return t=(0,us.latLng)(t),this.params.geometry=[t.lng,t.lat],this.params.geometryType="esriGeometryPoint",this.params.spatialRel="esriSpatialRelIntersects",this.params.units="esriSRUnit_Meter",this.params.distance=e,this.params.inSR=4326,this},where(t){return this.params.where=t,this},between(t,e){return this.params.time=[t.valueOf(),e.valueOf()],this},simplify(t,e){const i=Math.abs(t.getBounds().getWest()-t.getBounds().getEast());return this.params.maxAllowableOffset=i/t.getSize().y*e,this},orderBy(t,e){return e=e||"ASC",this.params.orderByFields=this.params.orderByFields?`${this.params.orderByFields},`:"",this.params.orderByFields+=[t,e].join(" "),this},run(t,e){return this._cleanParams(),this.options.isModern||Ws(this.options.url)&&void 0===this.options.isModern?(this.params.f="geojson",this.request(function(i,o){this._trapSQLerrors(i),t.call(e,i,o,o)},this)):this.request(function(i,o){this._trapSQLerrors(i),t.call(e,i,o&&Hs(o),o)},this)},count(t,e){return this._cleanParams(),this.params.returnCountOnly=!0,this.request(function(e,i){t.call(this,e,i&&i.count,i)},e)},ids(t,e){return this._cleanParams(),this.params.returnIdsOnly=!0,this.request(function(e,i){t.call(this,e,i&&i.objectIds,i)},e)},bounds(t,e){return this._cleanParams(),this.params.returnExtentOnly=!0,this.request((i,o)=>{o&&o.extent&&Rs(o.extent)?t.call(e,i,Rs(o.extent),o):(i={message:"Invalid Bounds"},t.call(e,i,null,o))},e)},distinct(){return this.params.returnGeometry=!1,this.params.returnDistinctValues=!0,this},pixelSize(t){const e=(0,us.point)(t);return this.params.pixelSize=[e.x,e.y],this},layer(t){return this.path=`${t}/query`,this},_trapSQLerrors(t){t&&"400"===t.code&&ks("one common syntax error in query requests is encasing str
34ing values in double quotes instead of single quotes")},_cleanParams(){delete this.params.returnIdsOnly,delete this.params.returnExtentOnly,delete this.params.returnCountOnly},_setGeometryParams(t){this.params.inSR=4326;const e=Xs(t);this.params.geometry=e.geometry,this.params.geometryType=e.geometryType}});var nr=function(t){return new or(t)};const sr=ir.extend({setters:{contains:"contains",text:"searchText",fields:"searchFields",spatialReference:"sr",sr:"sr",layers:"layers",returnGeometry:"returnGeometry",maxAllowableOffset:"maxAllowableOffset",precision:"geometryPrecision",dynamicLayers:"dynamicLayers",returnZ:"returnZ",returnM:"returnM",gdbVersion:"gdbVersion",token:"token"},path:"find",params:{sr:4326,contains:!0,returnGeometry:!0,returnZ:!0,returnM:!1},layerDefs(t,e){return this.params.layerDefs=this.params.layerDefs?`${this.params.layerDefs};`:"",this.params.layerDefs+=[t,e].join(":"),this},simplify(t,e){const i=Math.abs(t.getBounds().getWest()-t.getBounds().getEast());return this.params.maxAllowableOffset=i/t.getSize().y*e,this},run(t,e){return this.request((i,o)=>{t.call(e,i,o&&Hs(o),o)},e)}});var rr=function(t){return new sr(t)};const ar=ir.extend({path:"identify",between(t,e){return this.params.time=[t.valueOf(),e.valueOf()],this}});const lr=ar.extend({setters:{layers:"layers",precision:"geometryPrecision",tolerance:"tolerance",returnGeometry:"returnGeometry"},params:{sr:4326,layers:"all",tolerance:3,returnGeometry:!0},on(t){const e=Zs(t.getBounds()),i=t.getSize();return this.params.imageDisplay=[i.x,i.y,96],this.params.mapExtent=[e.xmin,e.ymin,e.xmax,e.ymax],this},at(t){return 2===t.length&&(t=(0,us.latLng)(t)),this._setGeometryParams(t),this},layerDef(t,e){return this.params.layerDefs=this.params.layerDefs?`${this.params.layerDefs};`:"",this.params.layerDefs+=[t,e].join(":"),this},simplify(t,e){const i=Math.abs(t.getBounds().getWest()-t.getBounds().getEast());return this.params.maxAllowableOffset=i/t.getSize().y*e,this},run(t,e){return this.request((i,o)=>{if(i)t.call(e,i,void 0,o);else{const i=Hs(o);o.results=o.results.reverse();for(let t=0;t<i.features.length;t++){i.features[t].layerId=o.results[t].layerId}t.call(e,void 0,i,o)}})},_setGeometryParams(t){const e=Xs(t);this.params.geometry=e.geometry,this.params.geometryType=e.geometryType}});var hr=function(t){return new lr(t)};const cr=ar.extend({setters:{setMosaicRule:"mosaicRule",setRenderingRule:"renderingRule",setPixelSize:"pixelSize",returnCatalogItems:"returnCatalogItems",returnGeometry:"returnGeometry"},params:{returnGeometry:!1},at(t){return t=(0,us.latLng)(t),this.params.geometry=JSON.stringify({x:t.lng,y:t.lat,spatialReference:{wkid:4326}}),this.params.geometryType="esriGeometryPoint",this},getMosaicRule(){return this.params.mosaicRule},getRenderingRule(){return this.params.renderingRule},getPixelSize(){return this.params.pixelSize},run(t,e){return this.request(function(i,o){t.call(e,i,o&&this._responseToGeoJSON(o),o)},this)},_responseToGeoJSON(t){const e=t.location,i=t.catalogItems,o=t.catalogItemVisibilities,n={pixel:{type:"Feature",geometry:{type:"Point",coordinates:[e.x,e.y]},crs:{type:"EPSG",properties:{code:e.spatialReference.wkid}},properties:{OBJECTID:t.objectId,name:t.name,value:t.value},id:t.objectId}};if(t.properties&&t.properties.Values&&(n.pixel.properties.values=t.properties.Values),i&&i.features&&(n.catalogItems=Hs(i),o&&o.length===n.catalogItems.features.length))for(let t=o.length-1;t>=0;t--)n.catalogItems.features[t].properties.catalogItemVisibility=o[t];return n}});var ur=function(t){return new cr(t)};const pr=us.Evented.extend({options:{proxy:!1,useCors:ds,timeout:0},initialize(t){t=t||{},this._requestQueue=[],this._authenticating=!1,us.Util.setOptions(this,t),this.options.url=Gs(this.options.url)},get(t,e,i,o){return this._request("get",t,e,i,o)},post(t,e,i,o){return this._request("post",t,e,i,o)},request(t,e,i,o){return this._request("request",t,e,i,o)},metadata(t,e){return this._request("get","",{},t,e)},authenticate(t){return this._authenticating=!1,this.options.token=t,this._runQueue(),this},getTimeout(){return this.options.timeout},setTimeout(t){this.options.timeout=t},_request(t,e,i,o,n){this.fire("requeststart",{url:this.options.url+e,params:i,method:t},!0);const s=this._createServiceCallback(t,e,i,o,n);if(this.options.token&&(i.token=this.options.token),this.options.requestParam
34s&&us.Util.extend(i,this.options.requestParams),!this._authenticating){const o=this.options.proxy?`${this.options.proxy}?${this.options.url}${e}`:this.options.url+e;return"get"!==t&&"request"!==t||this.options.useCors?Cs[t](o,i,s,n):Cs.get.JSONP(o,i,s,n)}this._requestQueue.push([t,e,i,o,n])},_createServiceCallback(t,e,i,o,n){return us.Util.bind(function(s,r){!s||499!==s.code&&498!==s.code||(this._authenticating=!0,this._requestQueue.push([t,e,i,o,n]),this.fire("authenticationrequired",{authenticate:us.Util.bind(this.authenticate,this)},!0),s.authenticate=us.Util.bind(this.authenticate,this)),o.call(n,s,r),s?this.fire("requesterror",{url:this.options.url+e,params:i,message:s.message,code:s.code,method:t},!0):this.fire("requestsuccess",{url:this.options.url+e,params:i,response:r,method:t},!0),this.fire("requestend",{url:this.options.url+e,params:i,method:t},!0)},this)},_runQueue(){for(let t=this._requestQueue.length-1;t>=0;t--){const e=this._requestQueue[t];this[e.shift()].apply(this,e)}this._requestQueue=[]}});const dr=pr.extend({identify(){return hr(this)},find(){return rr(this)},query(){return nr(this)}});var mr=function(t){return new dr(t)};const fr=pr.extend({query(){return nr(this)},identify(){return ur(this)}});var gr=function(t){return new fr(t)};const _r=pr.extend({options:{idAttribute:"OBJECTID"},query(){return nr(this)},addFeature(t,e,i){this.addFeatures(t,e,i)},addFeatures(t,e,i){const o=t.features?t.features:[t];for(let t=o.length-1;t>=0;t--)delete o[t].id;return t=Bs(t),t=o.length>1?t:[t],this.post("addFeatures",{features:t},(t,o)=>{const n=o&&o.addResults?o.addResults.length>1?o.addResults:o.addResults[0]:void 0;e&&e.call(i,t||o.addResults[0].error,n)},i)},updateFeature(t,e,i){this.updateFeatures(t,e,i)},updateFeatures(t,e,i){const o=t.features?t.features:[t];return t=Bs(t,this.options.idAttribute),t=o.length>1?t:[t],this.post("updateFeatures",{features:t},(t,o)=>{const n=o&&o.updateResults?o.updateResults.length>1?o.updateResults:o.updateResults[0]:void 0;e&&e.call(i,t||o.updateResults[0].error,n)},i)},deleteFeature(t,e,i){this.deleteFeatures(t,e,i)},deleteFeatures(t,e,i){return this.post("deleteFeatures",{objectIds:t},(t,o)=>{const n=o&&o.deleteResults?o.deleteResults.length>1?o.deleteResults:o.deleteResults[0]:void 0;e&&e.call(i,t||o.deleteResults[0].error,n)},i)}});var yr=function(t){return new _r(t)};const vr="https:"!==window.location.protocol?"http:":"https:",br=us.TileLayer.extend({statics:{TILES:{Streets:{urlTemplate:`${vr}//{s}.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}`,options:{minZoom:1,maxZoom:19,subdomains:["server","services"],attribution:"USGS, NOAA",attributionUrl:"https://static.arcgis.com/attribution/World_Street_Map"}},Topographic:{urlTemplate:`${vr}//{s}.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{z}/{y}/{x}`,options:{minZoom:1,maxZoom:19,subdomains:["server","services"],attribution:"USGS, NOAA",attributionUrl:"https://static.arcgis.com/attribution/World_Topo_Map"}},Oceans:{urlTemplate:`${vr}//{s}.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer/tile/{z}/{y}/{x}`,options:{minZoom:1,maxZoom:16,subdomains:["server","services"],attribution:"USGS, NOAA",attributionUrl:"https://static.arcgis.com/attribution/Ocean_Basemap"}},OceansLabels:{urlTemplate:`${vr}//{s}.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Reference/MapServer/tile/{z}/{y}/{x}`,options:{minZoom:1,maxZoom:16,subdomains:["server","services"],pane:ms?"esri-labels":"tilePane",attribution:""}},NationalGeographic:{urlTemplate:`${vr}//{s}.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/tile/{z}/{y}/{x}`,options:{minZoom:1,maxZoom:16,subdomains:["server","services"],attribution:"National Geographic, DeLorme, HERE, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, increment P Corp."}},DarkGray:{urlTemplate:`${vr}//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Base/MapServer/tile/{z}/{y}/{x}`,options:{minZoom:1,maxZoom:16,subdomains:["server","services"],attribution:"HERE, DeLorme, MapmyIndia, &copy; OpenStreetMap contributors"}},DarkGrayLabels:{urlTemplate:`${vr}//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Reference/MapServer/tile/{z}/{y}/{x}`,options:{minZoom:1,maxZoom:16,subdomains:["server","services"],pane:ms?"esri-labels":"tilePane",attribution:""}},Gray:{urlTemplate:`${vr}//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}`,options:{minZoom:1,maxZoom:16,subdomains:["server","services"],attribution:"HERE, DeLorme, MapmyIndia, &copy; OpenStreetMap contributors"}},GrayLabels:{urlTemplate:`${vr}//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Reference/MapServer/tile/{z}/{y}/{x}`,options:{minZoom:1,maxZoom:16,subdomains:["server","services"],pane:ms?"esri-labels":"tilePane",attribution:""}},Imagery:{urlTemplate:`${vr}//{s}.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}`,options:{minZoom:1,maxZoom:19,subdomains:["server","services"],attribution:"DigitalGlobe, GeoEye, i-cubed, USDA, USGS, AEX, Getmapping, Aerogrid, IGN, IGP, swisstopo, and the GIS User Community",attributionUrl:"https://static.arcgis.com/attribution/World_Imagery"}},ImageryLabels:{urlTemplate:`${vr}//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer/tile/{z}/{y}/{x}`,options:{minZoom:1,maxZoom:19,subdomains:["server","services"],pane:ms?"esri-labels":"tilePane",attribution:""}},ImageryTransportation:{urlTemplate:`${vr}//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Transportation/MapServer/tile/{z}/{y}/{x}`,options:{minZoom:1,maxZoom:19,subdomains:["server","services"],pane:ms?"esri-labels":"tilePane",attribution:""}},ShadedRelief:{urlTemplate:`${vr}//{s}.arcgisonline.com/ArcGIS/rest/services/World_Shaded_Relief/MapServer/tile/{z}/{y}/{x}`,options:{minZoom:1,maxZoom:13,subdomains:["server","services"],attribution:"USGS"}},ShadedReliefLabels:{urlTemplate:`${vr}//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places_Alternate/MapServer/tile/{z}/{y}/{x}`,options:{minZoom:1,maxZoom:12,subdomains:["server","services"],pane:ms?"esri-labels":"tilePane",attribution:""}},Terrain:{urlTemplate:`${vr}//{s}.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer/tile/{z}/{y}/{x}`,options:{minZoom:1,maxZoom:13,subdomains:["server","services"],attribution:"USGS, NOAA"}},TerrainLabels:{urlTemplate:`${vr}//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Reference_Overlay/MapServer/tile/{z}/{y}/{x}`,options:{minZoom:1,maxZoom:13,subdomains:["server","services"],pane:ms?"esri-labels":"tilePane",attribution:""}},USATopo:{urlTemplate:`${vr}//{s}.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer/tile/{z}/{y}/{x}`,options:{minZoom:1,maxZoom:15,subdomains:["server","services"],attribution:"USGS, National Geographic Society, i-cubed"}},ImageryClarity:{urlTemplate:`${vr}//clarity.maptiles.arcgis.com/arcgis/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}`,options:{minZoom:1,maxZoom:19,attribution:"Esri, DigitalGlobe, GeoEye, Earthstar Geographics, CNES/Airbus DS, USDA, USGS, AeroGRID, IGN, and the GIS User Community"}},Physical:{urlTemplate:`${vr}//{s}.arcgisonline.com/arcgis/rest/services/World_Physical_Map/MapServer/tile/{z}/{y}/{x}`,options:{minZoom:1,maxZoom:8,subdomains:["server","services"],attribution:"U.S. National Park Service"}},ImageryFirefly:{urlTemplate:`${vr}//fly.maptiles.arcgis.com/arcgis/rest/services/World_Imagery_Firefly/MapServer/tile/{z}/{y}/{x}`,options:{minZoom:1,maxZoom:19,attribution:"Esri, DigitalGlobe, GeoEye, Earthstar Geographics, CNES/Airbus DS, USDA, USGS, AeroGRID, IGN, and the GIS User Community",attributionUrl:"https://static.arcgis.com/attribution/World_Imagery"}}}},initialize(t,e){let i;if("object"==typeof t&&t.urlTemplate&&t.options)i=t;else{if("string"!=typeof t||!br.TILES[t])throw new Error('L.esri.BasemapLayer: Invalid parameter. Use one of "Streets", "Topographic", "Oceans", "OceansLabels", "NationalGeographic", "Physical", "Gray", "GrayLabels", "DarkGray", "DarkGrayLabels", "Imagery", "ImageryLabels", "ImageryTransportation", "ImageryClarity", "ImageryFirefly", ShadedRelief", "ShadedReliefLabels", "Terrain", "TerrainLabels" or "USATopo"');i=br.TILES[t]}const o=us.Util.extend(i.options,e);us.Util.setOptions(this,o),this.options.ignoreDeprecationWarning||console.warn("WARNING: L.esri.BasemapLayer uses data services that are in mature support and are not being updated. Please use L.esri.Vector.vectorBasemapLayer instead. More info: https://esriurl.com/esri-leaflet-basemap"),this.options.token&&-1===i.urlTemplate.indexOf("token=")&&(i.urlTemplate+=`?token=${this.options.token}`),this.options.proxy&&(i.urlTemplate=`${this.options.proxy}?${i.urlTemplate}`),us.TileLayer.prototype.initialize.call(this,i.urlTemplate,o)},onAdd(t){Ks(t),"esri-labels"===this.options.pane&&this._initPane(),this.options.attributionUrl&&Qs((this.options.proxy?`${this.options.proxy}?`:"")+this.options.attributionUrl,t),t.on("moveend",tr),us.TileLayer.prototype.onAdd.call(this,t)},onRemove(t){Ys(t),t.off("moveend",tr),us.TileLayer.prototype.onRemove.call(this,t)},_initPane(){if(!this._map.getPane(this.options.pane)){const t=this._map.createPane(this.options.pane);t.style.pointerEvents="none",t.style.zIndex=500}},getAttribution(){let t;return this.options.attribution&&(t=`<span class="esri-dynamic-attribution">${this.options.attribution}</span>`),t}});function xr(t,e){return new br(t,e)}const Lr=us.TileLayer.extend({options:{zoomOffsetAllowance:.1,errorTileUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEABAMAAACuXLVVAAAAA1BMVEUzNDVszlHHAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAAAAAAAAAB6mUWpAAAADZJREFUeJztwQEBAAAAgiD/r25IQAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA7waBAAABw08RwAAAAABJRU5ErkJggg=="},statics:{MercatorZoomLevels:{0:156543.033928,1:78271.5169639999,2:39135.7584820001,3:19567.8792409999,4:9783.93962049996,5:4891.96981024998,6:2445.98490512499,7:1222.99245256249,8:611.49622628138,9:305.748113140558,10:152.874056570411,11:76.4370282850732,12:38.2185141425366,13:19.1092570712683,14:9.55462853563415,15:4.77731426794937,16:2.38865713397468,17:1.19432856685505,18:.597164283559817,19:.298582141647617,20:.14929107082381,21:.07464553541191,22:.0373227677059525,23:.0186613838529763}},initialize(t){(t=us.Util.setOptions(this,t)).apikey&&(t.token=t.apikey),t=Vs(t),this.tileUrl=`${(t.proxy?`${t.proxy}?`:"")+t.url}tile/{z}/{y}/{x}
34${t.requestParams&&Object.keys(t.requestParams).length>0?us.Util.getParamString(t.requestParams):""}`,-1!==t.url.indexOf("{s}")&&t.subdomains&&(t.url=t.url.replace("{s}",t.subdomains[0])),this.service=mr(t),this.service.addEventParent(this);new RegExp(/tiles.arcgis(online)?\.com/g).test(t.url)&&(this.tileUrl=this.tileUrl.replace("://tiles","://tiles{s}"),t.subdomains=["1","2","3","4"]),this.options.token&&(this.tileUrl+=`?token=${this.options.token}`),us.TileLayer.prototype.initialize.call(this,this.tileUrl,t)},getTileUrl(t){const e=this._getZoomForUrl();return us.Util.template(this.tileUrl,us.Util.extend({s:this._getSubdomain(t),x:t.x,y:t.y,z:this._lodMap&&void 0!==this._lodMap[e]?this._lodMap[e]:e},this.options))},createTile(t,e){const i=document.createElement("img");return us.DomEvent.on(i,"load",us.Util.bind(this._tileOnLoad,this,e,i)),us.DomEvent.on(i,"error",us.Util.bind(this._tileOnError,this,e,i)),this.options.crossOrigin&&(i.crossOrigin=""),i.alt="","crs"===this._lodMap||this._lodMap&&void 0!==this._lodMap[this._getZoomForUrl()]?i.src=this.getTileUrl(t):this.once("lodmap",function(){i.src=this.getTileUrl(t)},this),i},onAdd(t){Ks(t),this._lodMap||this.metadata(function(e,i){if(!e&&i.spatialReference){const e=i.spatialReference.latestWkid||i.spatialReference.wkid;if(!this.options.attribution&&t.attributionControl&&i.copyrightText&&(this.options.attribution=i.copyrightText,t.attributionControl.addAttribution(this.getAttribution())),t.options.crs!==us.CRS.EPSG3857||102100!==e&&3857!==e)t.options.crs&&t.options.crs.code&&t.options.crs.code.indexOf(e)>-1?(this._lodMap="crs",this.fire("lodmap")):ks("L.esri.TiledMapLayer is using a non-mercator spatial reference. Support may be available through Proj4Leaflet https://developers.arcgis.com/esri-leaflet/samples/non-mercator-projection/");else{this._lodMap={};const t=i.tileInfo.lods,e=Lr.MercatorZoomLevels;for(let i=0;i<t.length;i++){const o=t[i];for(const t in e){const i=e[t];if(this._withinPercentage(o.resolution,i,this.options.zoomOffsetAllowance)){this._lodMap[t]=o.level;break}}}this.fire("lodmap")}}},this),us.TileLayer.prototype.onAdd.call(this,t)},onRemove(t){Ys(t),us.TileLayer.prototype.onRemove.call(this,t)},metadata(t,e){return this.service.metadata(t,e),this},identify(){return this.service.identify()},find(){return this.service.find()},query(){return this.service.query()},authenticate(t){const e=`?token=${t}`;return this.tileUrl=this.options.token?this.tileUrl.replace(/\?token=(.+)/g,e):this.tileUrl+e,this.options.token=t,this.service.authenticate(t),this},_withinPercentage(t,e,i){return Math.abs(t/e-1)<i}});const wr=us.ImageOverlay.extend({onAdd(t){this._topLeft=t.getPixelBounds().min,us.ImageOverlay.prototype.onAdd.call(this,t)},_reset(){this._map.options.crs===us.CRS.EPSG3857?us.ImageOverlay.prototype._reset.call(this):us.DomUtil.setPosition(this._image,this._topLeft.subtract(this._map.getPixelOrigin()))}}),kr=us.Layer.extend({options:{opacity:1,position:"front",f:"image",useCors:ds,attribution:null,interactive:!1,alt:""},onAdd(t){Ks(t),this.options.zIndex&&(this.options.position=null),this._update=us.Util.throttle(this._update,this.options.updateInterval,this),t.on("moveend",this._update,this),this._currentImage&&this._currentImage._bounds.equals(this._map.getBounds())?t.addLayer(this._currentImage):this._currentImage&&(this._map.removeLayer(this._currentImage),this._currentImage=null),this._update(),this._popup&&(this._map.on("click",this._getPopupData,this),this._map.on("dblclick",this._resetPopupState,this)),this.metadata(function(e,i){!e&&!this.options.attribution&&t.attributionControl&&i.copyrightText&&(this.options.attribution=i.copyrightText,t.attributionControl.addAttribution(this.getAttribution()))},this)},onRemove(t){Ys(t),this._currentImage&&this._map.removeLayer(this._currentImage),this._popup&&(this._map.off("click",this._getPopupData,this),this._map.off("dblclick",this._resetPopupState,this)),this._map.off("moveend",this._update,this)},bindPopup(t,e){return this._shouldRenderPopup=!1,this._lastClick=!1,this._popup=(0,us.popup)(e),this._popupFunction=t,this._map&&(this._map.on("click",this._getPopupData,this),this._map.on("dblclick",this._resetPopupState,this)),this},unbindPopup(){return this._map&&(this._map.closePopup(this._popup),this._map.off("click",this._getPopupData,this),this._map.off("dblclick",this._resetPopupState,this)),this._popup=!1,this},bringToFront(){return this.options.position="front",this._currentImage&&(this._currentImage.bringToFront(),this._setAutoZIndex(Math.max)),this},bringToBack(){return this.options.position="back",this._currentImage&&(this._currentImage.bringToBack(),this._setAutoZIndex(Math.min)),this},setZIndex(t){return this.options.zIndex=t,this._currentImage&&this._currentImage.setZIndex(t),this},_setAutoZIndex(t){if(!this._currentImage)return;const e=this._currentImage.getPane().children;let i=-t(-1/0,1/0);for(let o,n=0,s=e.length;n<s;n++)o=e[n].style.zIndex,e[n]!==this._currentImage._image&&o&&(i=t(i,+o));isFinite(i)&&(this.options.zIndex=i+t(-1,1),this.setZIndex(this.options.zIndex))},getAttribution(){return this.options.attribution},getOpacity(){return this.options.opacity},setOpacity(t){return this.options.opacity=t,this._currentImage&&this._currentImage.setOpacity(t),this},getTimeRange(){return[this.options.from,this.options.to]},setTimeRange(t,e){return this.options.from=t,this.options.to=e,this._update(),this},metadata(t,e){return this.service.metadata(t,e),this},authenticate(t){return this.service.authenticate(t),this},redraw(){this._update()},_renderImage(t,e,i){if(this._map){if(i&&(t=`data:${i};base64,${t}`),!t)return;const o=new wr(t,e,{opacity:0,crossOrigin:this.options.withCredentials?"use-credentials":this.options.useCors,alt:this.options.alt,pane:this.options.pane||this.getPane(),interactive:this.options.interactive}).addTo(this._map);let n;const s=function(){this._map.removeLayer(o),this.fire("error"),o.off("load",n,this)};n=function(t){if(o.off("error",s,this),this._map){const i=t.target,o=this._currentImage;i._bounds.equals(e)&&i._bounds.equals(this._map.getBounds())?(this._currentImage=i,"front"===this.options.position?this.bringToFront():"back"===this.options.position&&this.bringToBack(),this.options.zIndex&&this.setZIndex(this.options.zIndex),this._map&&this._currentImage._map?this._currentImage.setOpacity(this.options.opacity):this._currentImage._map.removeLayer(this._currentImage),o&&this._map&&this._map.removeLayer(o),o&&o._map&&o._map.removeLayer(o)):this._map.removeLayer(i)}this.fire("load",{bounds:e})},o.once("error",s,this),o.once("load",n,this)}},_update(){if(!this._map)return;const t=this._map.getZoom(),e=this._map.getBounds();if(this._animatingZoom)return;if(this._map._panTransition&&this._map._panTransition._inProgress)return;if(t>this.options.maxZoom||t<this.options.minZoom)return void(this._currentImage&&(this._currentImage._map.removeLayer(this._currentImage),this._currentImage=null));const i=this._buildExportParams();
34us.Util.extend(i,this.options.requestParams),i?(this._requestExport(i,e),this.fire("loading",{bounds:e})):this._currentImage&&(this._currentImage._map.removeLayer(this._currentImage),this._currentImage=null)},_renderPopup(t,e,i,o){if(t=(0,us.latLng)(t),this._shouldRenderPopup&&this._lastClick.equals(t)){const n=this._popupFunction(e,i,o);n&&this._popup.setLatLng(t).setContent(n).openOn(this._map)}},_resetPopupState(t){this._shouldRenderPopup=!1,this._lastClick=t.latlng},_calculateBbox(){const t=this._map.getPixelBounds(),e=this._map.unproject(t.getBottomLeft()),i=this._map.unproject(t.getTopRight()),o=this._map.options.crs.project(i),n=this._map.options.crs.project(e),s=(0,us.bounds)(o,n);return[s.getBottomLeft().x,s.getBottomLeft().y,s.getTopRight().x,s.getTopRight().y].join(",")},_calculateImageSize(){const t=this._map.getPixelBounds(),e=this._map.getSize(),i=this._map.unproject(t.getBottomLeft()),o=this._map.unproject(t.getTopRight()),n=this._map.latLngToLayerPoint(o).y,s=this._map.latLngToLayerPoint(i).y;return(n>0||s<e.y)&&(e.y=s-n),`${e.x},${e.y}`}});kr.extend({options:{updateInterval:150,format:"jpgpng",transparent:!0,f:"image"},query(){return this.service.query()},identify(){return this.service.identify()},initialize(t){t=Vs(t),this.service=gr(t),this.service.addEventParent(this),us.Util.setOptions(this,t)},setPixelType(t){return this.options.pixelType=t,this._update(),this},getPixelType(){return this.options.pixelType},setBandIds(t){return us.Util.isArray(t)?this.options.bandIds=t.join(","):this.options.bandIds=t.toString(),this._update(),this},getBandIds(){return this.options.bandIds},setNoData(t,e){return us.Util.isArray(t)?this.options.noData=t.join(","):this.options.noData=t.toString(),e&&(this.options.noDataInterpretation=e),this._update(),this},getNoData(){return this.options.noData},getNoDataInterpretation(){return this.options.noDataInterpretation},setRenderingRule(t){this.options.renderingRule=t,this._update()},getRenderingRule(){return this.options.renderingRule},setMosaicRule(t){this.options.mosaicRule=t,this._update()},getMosaicRule(){return this.options.mosaicRule},_getPopupData(t){const e=us.Util.bind(function(e,i,o){e||setTimeout(us.Util.bind(function(){this._renderPopup(t.latlng,e,i,o)},this),300)},this),i=this.identify().at(t.latlng);this.options.mosaicRule&&i.setMosaicRule(this.options.mosaicRule),i.run(e),this._shouldRenderPopup=!0,this._lastClick=t.latlng},_buildExportParams(){const t=parseInt(this._map.options.crs.code.split(":")[1],10),e={bbox:this._calculateBbox(),size:this._calculateImageSize(),format:this.options.format,transparent:this.options.transparent,bboxSR:t,imageSR:t};return this.options.from&&this.options.to&&(e.time=`${this.options.from.valueOf()},${this.options.to.valueOf()}`),this.options.pixelType&&(e.pixelType=this.options.pixelType),this.options.interpolation&&(e.interpolation=this.options.interpolation),this.options.compressionQuality&&(e.compressionQuality=this.options.compressionQuality),this.options.bandIds&&(e.bandIds=this.options.bandIds),(0===this.options.noData||this.options.noData)&&(e.noData=this.options.noData),this.options.noDataInterpretation&&(e.noDataInterpretation=this.options.noDataInterpretation),this.service.options.token&&(e.token=this.service.options.token),this.options.renderingRule&&(e.renderingRule=JSON.stringify(this.options.renderingRule)),this.options.mosaicRule&&(e.mosaicRule=JSON.stringify(this.options.mosaicRule)),e},_requestExport(t,e){if("json"===this.options.f)this.service.request("exportImage",t,function(t,i){t||(this.options.token&&(i.href+=`?token=${this.options.token}`),this.options.proxy&&(i.href=`${this.options.proxy}?${i.href}`),this._renderImage(i.href,e))},this);else{t.f="image";let i=`${this.options.url}exportImage${us.Util.getParamString(t)}`;this.options.proxy&&(i=`${this.options.proxy}?${i}`),this._renderImage(i,e)}}});kr.extend({options:{updateInterval:150,layers:!1,layerDefs:!1,timeOptions:!1,format:"png32",transparent:!0,f:"json"},initialize(t){t=Vs(t),this.service=mr(t),this.service.addEventParent(this),us.Util.setOptions(this,t)},getDynamicLayers(){return this.options.dynamicLayers},setDynamicLayers(t){return this.options.dynamicLayers=t,this._update(),this},getLayers(){return this.options.layers}
34,setLayers(t){return this.options.layers=t,this._update(),this},getLayerDefs(){return this.options.layerDefs},setLayerDefs(t){return this.options.layerDefs=t,this._update(),this},getTimeOptions(){return this.options.timeOptions},setTimeOptions(t){return this.options.timeOptions=t,this._update(),this},query(){return this.service.query()},identify(){return this.service.identify()},find(){return this.service.find()},_getPopupData(t){const e=us.Util.bind(function(e,i,o){e||setTimeout(us.Util.bind(function(){this._renderPopup(t.latlng,e,i,o)},this),300)},this);let i;if(i=this.options.popup?this.options.popup.on(this._map).at(t.latlng):this.identify().on(this._map).at(t.latlng),i.params.maxAllowableOffset||i.simplify(this._map,.5),this.options.popup&&this.options.popup.params&&this.options.popup.params.layers||(this.options.layers?i.layers(`visible:${this.options.layers.join(",")}`):i.layers("visible")),this.options.layerDefs&&"string"!=typeof this.options.layerDefs&&!i.params.layerDefs)for(const t in this.options.layerDefs)Object.hasOwn(this.options.layerDefs,t)&&i.layerDef(t,this.options.layerDefs[t]);i.run(e),this._shouldRenderPopup=!0,this._lastClick=t.latlng},_buildExportParams(){const t=parseInt(this._map.options.crs.code.split(":")[1],10),e={bbox:this._calculateBbox(),size:this._calculateImageSize(),dpi:96,format:this.options.format,transparent:this.options.transparent,bboxSR:t,imageSR:t};if(this.options.dynamicLayers&&(e.dynamicLayers=this.options.dynamicLayers),this.options.layers){if(0===this.options.layers.length)return;e.layers=`show:${this.options.layers.join(",")}`}return this.options.layerDefs&&(e.layerDefs="string"==typeof this.options.layerDefs?this.options.layerDefs:JSON.stringify(this.options.layerDefs)),this.options.timeOptions&&(e.timeOptions=JSON.stringify(this.options.timeOptions)),this.options.from&&this.options.to&&(e.time=`${this.options.from.valueOf()},${this.options.to.valueOf()}`),this.service.options.token&&(e.token=this.service.options.token),this.options.proxy&&(e.proxy=this.options.proxy),this.options.disableCache&&(e._ts=Date.now()),e},_requestExport(t,e){if("json"===this.options.f)this.service.request("export",t,function(t,i){t||(this.options.token&&i.href&&(i.href+=`?token=${this.options.token}`),this.options.proxy&&i.href&&(i.href=`${this.options.proxy}?${i.href}`),i.href?this._renderImage(i.href,e):this._renderImage(i.imageData,e,i.contentType))},this);else{t.f="image";let i=`${this.options.url}export${us.Util.getParamString(t)}`;this.options.proxy&&(i=`${this.options.proxy}?${i}`),this._renderImage(i,e)}}});const Mr=us.Layer.extend({options:{cellSize:512,updateWhenIdle:us.Browser.mobile,updateInterval:150,noWrap:!1,keepBuffer:1.5},initialize(t){us.Util.setOptions(this,t)},onAdd(){this._cells={},this._activeCells={},this._resetView(),this._update()},onRemove(){this._removeAllCells(),this._cellZoom=void 0},isLoading(){return this._loading},redraw(){return this._map&&(this._removeAllCells(),this._update()),this},getEvents(){const t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=us.Util.throttle(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),t},createCell(){return document.createElement("div")},removeCell(){},reuseCell(){},cellLeave(){},cellEnter(){},getCellSize(){const t=this.options.cellSize;return t instanceof us.Point?t:new us.Point(t,t)},_pruneCells(){if(!this._map)return;let t,e;for(t in this._cells)e=this._cells[t],e.retain=e.current;for(t in this._cells)if(e=this._cells[t],e.current&&!e.active){const t=e.coords;this._retainParent(t.x,t.y,t.z,t.z-5)||this._retainChildren(t.x,t.y,t.z,t.z+2)}for(t in this._cells)this._cells[t].retain||this._removeCell(t)},_removeAllCells(){for(const t in this._cells)this._removeCell(t)},_invalidateAll(){this._removeAllCells(),this._cellZoom=void 0},_retainParent(t,e,i,o){const n=Math.floor(t/2),s=Math.floor(e/2),r=i-1,a=new us.Point(+n,+s);a.z=+r;const l=this._cellCoordsToKey(a),h=this._cells[l];return h&&h.active?(h.retain=!0,!0):(h&&h.loaded&&(h.retain=!0),r>o&&this._retainParent(n,s,r,o))},_retainChildren(t,e,i,o){for(let n=2*t;n<2*t+2;n++)for(let t=2*e;t<2*e+2;t++){const e=new us.Point(n,t);e.z=i+1;const s=this._cellCoordsToKey(e),r=this._cells[s];r&&r.active?r.retain=!0:(r&&r.loaded&&(r.retain=!0),i+1<o&&this._retainChildren(n,t,i+1,o))}},_resetView(t){const e=t&&(t.pinch||t.flyTo);
34e||this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_setView(t,e,i,o){const n=Math.round(e);o||(this._cellZoom=n,this._abortLoading&&this._abortLoading(),this._resetGrid(),void 0!==n&&this._update(t),i||this._pruneCells(),this._noPrune=!!i)},_resetGrid(){const t=this._map,e=t.options.crs,i=this._cellSize=this.getCellSize(),o=this._cellZoom,n=this._map.getPixelWorldBounds(this._cellZoom);n&&(this._globalCellRange=this._pxBoundsToCellRange(n)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],o).x/i.x),Math.ceil(t.project([0,e.wrapLng[1]],o).x/i.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],o).y/i.x),Math.ceil(t.project([e.wrapLat[1],0],o).y/i.y)]},_onMoveEnd(t){t&&(t.pinch||t.flyTo)||!this._map||this._map._animatingZoom||this._update()},_getCelldPixelBounds(t){const e=this._map,i=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),o=e.getZoomScale(i,this._cellZoom),n=e.project(t,this._cellZoom).floor(),s=e.getSize().divideBy(2*o);return new us.Bounds(n.subtract(s),n.add(s))},_update(t){const e=this._map;if(!e)return;const i=Math.round(e.getZoom());void 0===t&&(t=e.getCenter());const o=this._getCelldPixelBounds(t),n=this._pxBoundsToCellRange(o),s=n.getCenter(),r=[],a=this.options.keepBuffer,l=new us.Bounds(n.getBottomLeft().subtract([a,-a]),n.getTopRight().add([a,-a]));if(!(isFinite(n.min.x)&&isFinite(n.min.y)&&isFinite(n.max.x)&&isFinite(n.max.y)))throw new Error("Attempted to load an infinite number of cells");for(const t in this._cells){const e=this._cells[t].coords;e.z===this._cellZoom&&l.contains(new us.Point(e.x,e.y))||(this._cells[t].current=!1)}if(Math.abs(i-this._cellZoom)>1)this._setView(t,i);else{for(let t=n.min.y;t<=n.max.y;t++)for(let e=n.min.x;e<=n.max.x;e++){const i=new us.Point(e,t);if(i.z=this._cellZoom,!this._isValidCell(i))continue;const o=this._cells[this._cellCoordsToKey(i)];o?o.current=!0:r.push(i)}if(r.sort((t,e)=>t.distanceTo(s)-e.distanceTo(s)),0!==r.length){this._loading||(this._loading=!0);for(let t=0;t<r.length;t++){const e=this._cellCoordsToKey(r[t]),i=this._keyToCellCoords(e);this._activeCells[i]?this._reuseCell(r[t]):this._createCell(r[t])}}}},_isValidCell(t){const e=this._map.options.crs;if(!e.infinite){const i=this._globalCellRange;if(!e.wrapLng&&(t.x<i.min.x||t.x>i.max.x)||!e.wrapLat&&(t.y<i.min.y||t.y>i.max.y))return!1}if(!this.options.bounds)return!0;const i=this._cellCoordsToBounds(t);return(0,us.latLngBounds)(this.options.bounds).overlaps(i)},_keyToBounds(t){return this._cellCoordsToBounds(this._keyToCellCoords(t))},_cellCoordsToNwSe(t){const e=this._map,i=this.getCellSize(),o=t.scaleBy(i),n=o.add(i);return[e.unproject(o,t.z),e.unproject(n,t.z)]},_cellCoordsToBounds(t){const e=this._cellCoordsToNwSe(t);let i=new us.LatLngBounds(e[0],e[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i},_cellCoordsToKey(t){return`${t.x}:${t.y}:${t.z}`},_keyToCellCoords(t){const e=t.split(":"),i=new us.Point(+e[0],+e[1]);return i.z=+e[2],i},_removeCell(t){const e=this._cells[t];if(!e)return;const i=this._keyToCellCoords(t),o=this._wrapCoords(i),n=this._cellCoordsToBounds(this._wrapCoords(i));e.current=!1,delete this._cells[t],this._activeCells[t]=e,this.cellLeave(n,o,t),this.fire("cellleave",{key:t,coords:o,bounds:n})},_reuseCell(t){const e=this._cellCoordsToKey(t);this._cells[e]=this._activeCells[e],this._cells[e].current=!0;const i=this._wrapCoords(t),o=this._cellCoordsToBounds(this._wrapCoords(t));this.cellEnter(o,i,e),this.fire("cellenter",{key:e,coords:i,bounds:o})},_createCell(t){const e=this._cellCoordsToKey(t),i=this._wrapCoords(t),o=this._cellCoordsToBounds(this._wrapCoords(t));this.createCell(o,i,e),this.fire("cellcreate",{key:e,coords:i,bounds:o}),this._cells[e]={coords:t,current:!0},us.Util.requestAnimFrame(this._pruneCells,this)},_cellReady(t,e,i){const o=this._cellCoordsToKey(t);(i=this._cells[o])&&(i.loaded=+new Date,i.active=!0)},_getCellPos(t){return t.scaleBy(this.getCellSize())},_wrapCoords(t){const e=new us.Point(this._wrapX?us.Util.wrapNum(t.x,this._wrapX):t.x,this._wrapY?us.Util.wrapNum(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToCellRange(t){const e=this.getCellSize();return new us.Bounds(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))}});function Cr(t){this.values=[].concat(t||[])}Cr.prototype.query=function(t){var e=this.getIndex(t);return this.values[e]},Cr.prototype.getIndex=function(t){this.dirty&&this.sort();for(var e,i,o=0,n=this.values.length-1;o<=n;)if(e=(o+n)/2|0,+(i=this.values[Math.round(e)]).value<+t)o=e+1;else{if(!(+i.value>+t))return e;n=e-1}return Math.abs(~n)},Cr.prototype.between=function(t,e){var i=this.getIndex(t),o=this.getIndex(e);if(0===i&&0===o)return[];for(;this.values[i-1]&&this.values[i-1].value===t;)i--;for(;this.values[o+1]&&this.values[o+1].value===e;)o++;return this.values[o]&&this.values[o].value===e&&this.values[o+1]&&o++,this.values.slice(i,o)},Cr.prototype.insert=function(t){return this.values.splice(this.getIndex(t.value),0,t),this},Cr.prototype.bulkAdd=function(t,e){return this.values=this.values.concat([].concat(t||[])),e?this.sort():this.dirty=!0,this},Cr.prototype.sort=function(){return this.values.sort(function(t,e){return+e.value-+t.value}).reverse(),this.dirty=!1,this};var Tr=Cr;const Pr=Mr.extend({options:{attribution:null,where:"1=1",fields:["*"],from:!1,to:!1,timeField:!1,timeFilterMode:"server",simplifyFactor:0,precision:6,fetchAllFeatures:!1},initialize(t){if(Mr.prototype.initialize.call(this,t),t=Vs(t),t=us.Util.setOptions(this,t),this.service=yr(t),this.service.addEventParent(this),"*"!==this.options.fields[0]){let t=!1;for(let e=0;e<this.options.fields.length;e++)this.options.fields[e].match(/^(OBJECTID|FID|OID|ID)$/i)&&(t=!0);!1===t&&ks("no known esriFieldTypeOID field detected in fields Array.  Please add an attribute field containing unique IDs to ensure the layer can be drawn correctly.")}this.options.timeField.start&&this.options.timeField.end?(this._startTimeIndex=new Tr,this._endTimeIndex=new Tr):this.options.timeField&&(this._timeIndex=new Tr),this._cache={},this._currentSnapshot=[],this._activeRequests=0},onAdd(t){return Ks(t),this.service.metadata(function(e,i){if(!e){const e=i.supportedQueryFormats;let o=!1;(!1===this.service.options.isModern||this.options.fetchAllFeatures)&&(o=!0),!o&&e&&-1!==e.indexOf("geoJSON")&&(this.service.options.isModern=!0),i.objectIdField&&(this.service.options.idAttribute=i.objectIdField),!this.options.attribution&&t.attributionControl&&i.copyrightText&&(this.options.attribution=i.copyrightText,t.attributionControl.addAttribution(this.getAttribution()))}},this),t.on("zoomend",this._handleZoomChange,this),Mr.prototype.onAdd.call(this,t)},onRemove(t){return Ys(t),t.off("zoomend",this._handleZoomChange,this),Mr.prototype.onRemove.call(this,t)},getAttribution(){return this.options.attribution},createCell(t,e){this._visibleZoom()&&this._requestFeatures(t,e)},_requestFeatures(t,e,i,o){this._activeRequests++,o=o||0;const n=this.options.where;return 1===this._activeRequests&&this.fire("loading",{bounds:t},!0),this._buildQuery(t,o).run(function(s,r,a){a&&a.exceededTransferLimit&&this.fire("drawlimitexceeded"),this.options.where===n&&(!s&&r&&r.features.length&&us.Util.requestAnimFrame
34(us.Util.bind(function(){this._addFeatures(r.features,e),this._postProcessFeatures(t)},this)),s||!r||r.features.length||this._postProcessFeatures(t),s&&this._postProcessFeatures(t),i&&i.call(this,s,r),a&&(a.exceededTransferLimit||a.properties&&a.properties.exceededTransferLimit)&&this.options.fetchAllFeatures&&this._requestFeatures(t,e,i,o+r.features.length))},this)},_postProcessFeatures(t){this._activeRequests--,this._activeRequests<=0&&this.fire("load",{bounds:t})},_cacheKey(t){return`${t.z}:${t.x}:${t.y}`},_addFeatures(t,e){let i;e&&(i=this._cacheKey(e),this._cache[i]=this._cache[i]||[]);for(let e=t.length-1;e>=0;e--){const o=t[e].id;-1===this._currentSnapshot.indexOf(o)&&this._currentSnapshot.push(o),void 0!==i&&-1===this._cache[i].indexOf(o)&&this._cache[i].push(o)}this.options.timeField&&this._buildTimeIndexes(t),this.createLayers(t)},_buildQuery(t,e){let i=this.service.query().intersects(t).where(this.options.where).fields(this.options.fields).precision(this.options.precision);return this.options.fetchAllFeatures&&!isNaN(parseInt(e))&&(i=i.offset(e)),i.params.resultType="tile",this.options.requestParams&&us.Util.extend(i.params,this.options.requestParams),this.options.simplifyFactor&&i.simplify(this._map,this.options.simplifyFactor),"server"===this.options.timeFilterMode&&this.options.from&&this.options.to&&i.between(this.options.from,this.options.to),i},setWhere(t,e,i){this.options.where=t&&t.length?t:"1=1";const o=[],n=[];let s=0,r=null;const a=us.Util.bind(function(a,l){if(a&&(r=a),l)for(let t=l.features.length-1;t>=0;t--)n.push(l.features[t].id);s--,s<=0&&this._visibleZoom()&&t===this.options.where&&(this._currentSnapshot=n,us.Util.requestAnimFrame(us.Util.bind(function(){this.removeLayers(o),this.addLayers(n),e&&e.call(i,r)},this)))},this);for(let t=this._currentSnapshot.length-1;t>=0;t--)o.push(this._currentSnapshot[t]);this._cache={};for(const t in this._cells){s++;const e=this._keyToCellCoords(t),i=this._cellCoordsToBounds(e);this._requestFeatures(i,e,a)}return this},getWhere(){return this.options.where},getTimeRange(){return[this.options.from,this.options.to]},setTimeRange(t,e,i,o){const n=this.options.from,s=this.options.to;let r=0,a=null;const l=us.Util.bind(function(l){l&&(a=l),this._filterExistingFeatures(n,s,t,e),r--,i&&r<=0&&i.call(o,a)},this);if(this.options.from=t,this.options.to=e,this._filterExistingFeatures(n,s,t,e),"server"===this.options.timeFilterMode)for(const t in this._cells){r++;const e=this._keyToCellCoords(t),i=this._cellCoordsToBounds(e);this._requestFeatures(i,e,l)}return this},refresh(){this.setWhere(this.options.where)},_filterExistingFeatures(t,e,i,o){const n=t&&e?this._getFeaturesInTimeRange(t,e):this._currentSnapshot,s=this._getFeaturesInTimeRange(i,o);if(s.indexOf)for(let t=0;t<s.length;t++){const e=n.indexOf(s[t]);e>=0&&n.splice(e,1)}us.Util.requestAnimFrame(us.Util.bind(function(){this.removeLayers(n),this.addLayers(s)},this))},_getFeaturesInTimeRange(t,e){const i=[];let o;if(this.options.timeField.start&&this.options.timeField.end){const i=this._startTimeIndex.between(t,e),n=this._endTimeIndex.between(t,e);o=i.concat(n)}else{if(!this._timeIndex)return ks("You must set timeField in the layer constructor in order to manipulate the start and end time filter."),[];o=this._timeIndex.between(t,e)}for(let t=o.length-1;t>=0;t--)i.push(o[t].id);return i},_buildTimeIndexes(t){let e,i;if(this.options.timeField.start&&this.options.timeField.end){const o=[],n=[];for(e=t.length-1;e>=0;e--)i=t[e],o.push({id:i.id,value:new Date(i.properties[this.options.timeField.start])}),n.push({id:i.id,value:new Date(i.properties[this.options.timeField.end])});this._startTimeIndex.bulkAdd(o),this._endTimeIndex.bulkAdd(n)}else{const o=[];for(e=t.length-1;e>=0;e--)i=t[e],o.push({id:i.id,value:new Date(i.properties[this.options.timeField])});this._timeIndex.bulkAdd(o)}},_featureWithinTimeRange(t){if(!this.options.from||!this.options.to)return!0;const e=+this.options.from.valueOf(),i=+this.options.to.valueOf();if("string"==typeof this.options.timeField){const o=+t.properties[this.options.timeField];return o>=e&&o<=i}if(this.options.timeField.start&&this.options.timeField.end){const o=+t.properties[this.options.timeField.start],n=+t.properties[this.options.timeField.end];return o>=e&&o<=i||n>=e&&n<=i||o<=e&&n>=i}}
34,_visibleZoom(){if(!this._map)return!1;const t=this._map.getZoom();return!(t>this.options.maxZoom||t<this.options.minZoom)},_handleZoomChange(){if(this._visibleZoom())for(const t in this._cells){const e=this._cells[t].coords,i=this._cacheKey(e);this._cache[i]&&this.addLayers(this._cache[i])}else this.removeLayers(this._currentSnapshot),this._currentSnapshot=[]},authenticate(t){return this.service.authenticate(t),this},metadata(t,e){return this.service.metadata(t,e),this},query(){return this.service.query()},_getMetadata(t){if(this._metadata){let e;t(e,this._metadata)}else this.metadata(us.Util.bind(function(e,i){this._metadata=i,t(e,this._metadata)},this))},addFeature(t,e,i){this.addFeatures(t,e,i)},addFeatures(t,e,i){this._getMetadata(us.Util.bind(function(o,n){if(o)return void(e&&e.call(this,o,null));const s=t.features?t.features:[t];this.service.addFeatures(t,us.Util.bind(function(t,o){if(!t){for(let t=s.length-1;t>=0;t--)s[t].properties[n.objectIdField]=s.length>1?o[t].objectId:o.objectId,s[t].id=s.length>1?o[t].objectId:o.objectId;this._addFeatures(s)}e&&e.call(i,t,o)},this))},this))},updateFeature(t,e,i){this.updateFeatures(t,e,i)},updateFeatures(t,e,i){const o=t.features?t.features:[t];this.service.updateFeatures(t,function(t,n){if(!t){for(let t=o.length-1;t>=0;t--)this.removeLayers([o[t].id],!0);this._addFeatures(o)}e&&e.call(i,t,n)},this)},deleteFeature(t,e,i){this.deleteFeatures(t,e,i)},deleteFeatures(t,e,i){return this.service.deleteFeatures(t,function(t,o){const n=o.length?o:[o];if(!t&&n.length>0)for(let t=n.length-1;t>=0;t--)this.removeLayers([n[t].objectId],!0);e&&e.call(i,t,o)},this)}});Pr.extend({options:{cacheLayers:!0},initialize(t){t.apikey&&(t.token=t.apikey),Pr.prototype.initialize.call(this,t),this._originalStyle=this.options.style,this._layers={}},onRemove(t){for(const e in this._layers)t.removeLayer(this._layers[e]),this.fire("removefeature",{feature:this._layers[e].feature,permanent:!1},!0);return Pr.prototype.onRemove.call(this,t)},createNewLayer(t){const e=us.GeoJSON.geometryToLayer(t,this.options);return e&&(e.defaultOptions=e.options),e},_updateLayer(t,e){let i=[];const o=this.options.coordsToLatLng||us.GeoJSON.coordsToLatLng;switch(e.properties&&(t.feature.properties=e.properties),e.geometry.type){case"Point":i=us.GeoJSON.coordsToLatLng(e.geometry.coordinates),t.setLatLng(i);break;case"LineString":i=us.GeoJSON.coordsToLatLngs(e.geometry.coordinates,0,o),t.setLatLngs(i);break;case"MultiLineString":case"Polygon":i=us.GeoJSON.coordsToLatLngs(e.geometry.coordinates,1,o),t.setLatLngs(i);break;case"MultiPolygon":i=us.GeoJSON.coordsToLatLngs(e.geometry.coordinates,2,o),t.setLatLngs(i)}this.redraw(t.feature.id)},createLayers(t){for(let e=t.length-1;e>=0;e--){const i=t[e],o=this._layers[i.id];let n;!this._visibleZoom()||!o||this._map.hasLayer(o)||this.options.timeField&&!this._featureWithinTimeRange(i)||(this._map.addLayer(o),this.fire("addfeature",{feature:o.feature},!0)),o&&(o.setLatLngs||o.setLatLng)&&this._updateLayer(o,i),o||(n=this.createNewLayer(i),n?(n.feature=i,n.addEventParent(this),this.options.onEachFeature&&this.options.onEachFeature(n.feature,n),this._layers[n.feature.id]=n,this.setFeatureStyle(n.feature.id,this.options.style),this.fire("createfeature",{feature:n.feature},!0),this._visibleZoom()&&(!this.options.timeField||this.options.timeField&&this._featureWithinTimeRange(i))&&this._map.addLayer(n)):ks("invalid GeoJSON encountered"))}},addLayers(t){for(let e=t.length-1;e>=0;e--){const i=this._layers[t[e]];!i||this.options.timeField&&!this._featureWithinTimeRange(i.feature)||(this._map.addLayer(i),this.fire("addfeature",{feature:i.feature},!0))}},removeLayers(t,e){for(let i=t.length-1;i>=0;i--){const o=t[i],n=this._layers[o];n&&(this.fire("removefeature",{feature:n.feature,permanent:e},!0),this._map.removeLayer(n)),n&&e&&delete this._layers[o]}},cellEnter(t,e){this._visibleZoom()&&!this._zooming&&this._map&&us.Util.requestAnimFrame(us.Util.bind(function(){const t=this._cacheKey(e),i=this._cellCoordsToKey(e),o=this._cache[t];this._activeCells[i]&&o&&this.addLayers(o)},this))}
34,cellLeave(t,e){this._zooming||us.Util.requestAnimFrame(us.Util.bind(function(){if(this._map){const t=this._cacheKey(e),i=this._cellCoordsToKey(e),o=this._cache[t],n=this._map.getBounds();if(!this._activeCells[i]&&o){let e=!0;for(let t=0;t<o.length;t++){const i=this._layers[o[t]];i&&i.getBounds&&n.intersects(i.getBounds())&&(e=!1)}e&&this.removeLayers(o,!this.options.cacheLayers),!this.options.cacheLayers&&e&&(delete this._cache[t],delete this._cells[i],delete this._activeCells[i])}}},this))},resetStyle(){return this.options.style=this._originalStyle,this.eachFeature(function(t){this.resetFeatureStyle(t.feature.id)},this),this},setStyle(t){return this.options.style=t,this.eachFeature(function(e){this.setFeatureStyle(e.feature.id,t)},this),this},resetFeatureStyle(t){const e=this._layers[t],i=this._originalStyle||us.Path.prototype.options;return e&&(us.Util.extend(e.options,e.defaultOptions),this.setFeatureStyle(t,i)),this},setFeatureStyle(t,e){const i=this._layers[t];return"function"==typeof e&&(e=e(i.feature)),i.setStyle&&i.setStyle(e),this}
34,eachActiveFeature(t,e){if(this._map){const i=this._map.getBounds();for(const o in this._layers)-1!==this._currentSnapshot.indexOf(this._layers[o].feature.id)&&("function"==typeof this._layers[o].getLatLng&&i.contains(this._layers[o].getLatLng())||"function"==typeof this._layers[o].getBounds&&i.intersects(this._layers[o].getBounds()))&&t.call(e,this._layers[o])}return this},eachFeature(t,e){for(const i in this._layers)t.call(e,this._layers[i]);return this},getFeature(t){return this._layers[t]},bringToBack(){this.eachFeature(t=>{t.bringToBack&&t.bringToBack()})},bringToFront(){this.eachFeature(t=>{t.bringToFront&&t.bringToFront()})},redraw(t){return t&&this._redraw(t),this},_redraw(t){const e=this._layers[t],i=e.feature;if(e&&e.setIcon&&this.options.pointToLayer&&this.options.pointToLayer){const t=this.options.pointToLayer(i,(0,us.latLng)(i.geometry.coordinates[1],i.geometry.coordinates[0])).options.icon;e.setIcon(t)}if(e&&e.setStyle&&this.options.pointToLayer){const t=this.options.pointToLayer(i,(0,us.latLng)(i.geometry.coordinates[1],i.geometry.coordinates[0])).options;this.setFeatureStyle(i.id,t)}e&&e.setStyle&&this.options.style&&this.resetFeatureStyle(i.id)},openPopup(t){return this._popup&&this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map),this},openTooltip(t){return this._tooltip&&this._tooltip._prepareOpen(t)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this)),this}});i(389),i(769),i(891);ps().TileLayer.HERE=ps().TileLayer.extend({options:{minZoom:2,maxZoom:18,style:"explore.day",resource:"base",format:"png8",apiKey:"",features:null,mapVersion:null,language:null},initialize:function(t){(t=ps().setOptions(this,t)).tileResolution=256,ps().Browser.retina&&(t.tileResolution=512);var e="https://maps.hereapi.com/v3/{resource}/mc/{z}/{x}/{y}/{format}?apiKey={apiKey}&style={style}&size={tileResolution}";t.features&&(e+="&features={features}"),t.mapVersion&&(e+="&mv={mapVersion}"),t.language&&(e+="&lang={language}"),this._attributionUrl=ps().Util.template("https://maps.hereapi.com/v3/copyright?apiKey={apiKey}",this.options),this._attributionText="",ps().TileLayer.prototype.initialize.call(this,e,t)},onAdd:function(t){ps().TileLayer.prototype.onAdd.call(this,t),this._attributionText="",this._attributionBBoxes?this._findCopyrightBBox():this._fetchAttributionBBoxes(),this._map.on("moveend zoomend resetview",this._findCopyrightBBox,this)},onRemove:function(t){ps().TileLayer.prototype.onRemove.call(this,t),this._map.off("moveend zoomend resetview",this._findCopyrightBBox,this),void 0!==this._map.attributionControl&&this._map.attributionControl.removeAttribution(this._attributionText)},_fetchAttributionBBoxes:function(){var t=new XMLHttpRequest;t.onreadystatechange=ps().bind(function(){4===t.readyState&&200===t.status&&this._parseAttributionBBoxes(JSON.parse(t.responseText))},this),t.open("GET",this._attributionUrl,!0),t.send()},_parseAttributionBBoxes:function(t){this._map&&(Object.keys(t.copyrights).forEach(function(e){for(var i=0;i<t.copyrights[e].length;i++){var o=t.copyrights[e][i];if(o.boundingBoxes)for(var n=0;n<o.boundingBoxes.length;n++){var s=o.boundingBoxes[n];t.copyrights[e][i].boundingBoxes[n]=ps().latLngBounds([[s.north,s.east],[s.south,s.west]])}}}),this._attributionBBoxes=t,this._findCopyrightBBox())},_findCopyrightBBox:function(){if(this._map&&this._map.attributionControl&&this._attributionBBoxes){for(var t=this._map.getZoom(),e=this._map.getBounds(),i=this._attributionBBoxes.resources[this.options.resource].styles[this.options.style],o=this._attributionBBoxes.copyrights,n=[],s=0;s<i.length;s++)for(var r=i[s],a=0;a<o[r].length;a++){var l=o[r][a];if(!(t<l.minLevel||t>l.maxLevel))if(l.boundingBoxes){for(var h=0;h<l.boundingBoxes.length;h++)if(e.overlaps(l.boundingBoxes[h])){n.push(l);break}}else n.push(l)}var c=['<a href="https://legal.here.com/terms/serviceterms/gb/">HERE maps</a>'];for(s=0;s<n.length;s++){var u=n[s];c.push('<abbr title="'+u.copyrightText+'">'+u.label+"</abbr>")}var p="© "+c.join(", ");p!==this._attributionText&&(this._map.attributionControl.removeAttribution(this._attributionText),this._attributionText=p,this._map.attributionControl.addAttribution(this._attributionText))}}}),ps().tileLayer.here=function(t){return new(ps().TileLayer.HERE)(t)},ps().TileLayer.TomTom=ps().TileLayer.extend({options:{apiKey:"",style:"main",subdomains:"abcd",minNativeZoom:0,maxNativeZoom:22},initialize:function(t){var e="https://{s}.api.tomtom.com/map/1/tile/basic/"+(t=ps().setOptions(this,t)).style+"/{z}/{x}/{y}.png?key="+t.apiKey;ps().TileLayer.prototype.initialize.call(this,e,t),this._copyright=ps().DomUtil.create("div","tomtom-copyright"),this._copyrightClose=ps().DomUtil.create("button","tomtom-copyright-close",this._copyright),this._copyrightContent=ps().DomUtil.create("div","tomtom-copyright-content",this._copyright),ps().DomEvent.on(this._copyrightClose,"click",function(t){t.preventDefault(),t.stopPropagation(),this._hideCopyright()},this),this._attributionText='<a class="tomtom-attribution" href="#">&copy; 1992 - '+(new Date).getFullYear()+" TomTom.</a>"},onAdd:function(t){ps().TileLayer.prototype.onAdd.call(this,t),this._addAttribution(),this._map.on("click",this._hideCopyright,this)},onRemove:function(t){ps().TileLayer.prototype.onRemove.call(this,t),this._hideCopyright(),this._removeAttribution(),this._map.off("click",this._hideCopyright,this)},_addAttribution:function(){if(void 0!==this._map.attributionControl){this._map.attributionControl.addAttribution(this._attributionText);var t=this._map.attributionControl.getContainer().querySelector(".tomtom-attribution");null!==t&&ps().DomEvent.on(t,"click",function(t){t.preventDefault(),t.stopPropagation(),this._showCopyright()},this)}},_removeAttribution:function(){void 0!==this._map.attributionControl&&this._map.attributionControl.removeAttribution(this._attributionText)},_showCopyright:function(){var t=this._map.getContainer();null===t.querySelector(".tomtom-copyright")&&t.appendChild(this._copyright);var e,i,o,n,s=this._map.getBounds(),r=s.getNorthEast().wrap(),a=s.get
34SouthWest().wrap();a.lng<r.lng?(e=a.lng,i=r.lng):(e=r.lng,i=a.lng),a.lat<r.lat?(o=a.lat,n=r.lat):(o=r.lat,n=a.lat);var l="https://api.tomtom.com/map/1/copyrights/"+e+"/"+o+"/"+i+"/"+n+".json?key="+this.options.apiKey,h=new XMLHttpRequest;h.onreadystatechange=ps().bind(function(){if(h.readyState===XMLHttpRequest.DONE&&200===h.status){for(var t=JSON.parse(h.responseText),e="<h4>General Copyrights:</h4>",i=0;i<t.generalCopyrights.length;i++)e+="<p>"+t.generalCopyrights[i]+"</p>";for(i=0;i<t.regions.length;i++){var o=t.regions[i];e+="<h4>"+o.country.label+":</h4>";for(var n=0;n<o.copyrights.length;n++)e+="<p>"+o.copyrights[n]+"</p>"}this._copyrightContent.innerHTML=e}},this),h.open("GET",l,!0),h.send()},_hideCopyright:function(){this._copyright.remove()}}),ps().tileLayer.tomTom=function(t,e){return new(ps().TileLayer.TomTom)(t,e)},function(t,e){"function"==typeof define&&define.amd?define(["leaflet"],t):"object"==typeof exports&&(module.exports=t(require("leaflet"))),void 0!==e&&e.L&&!e.L.EdgeBuffer&&t(e.L)}(function(t){t.EdgeBuffer={previousMethods:{getTiledPixelBounds:t.GridLayer.prototype._getTiledPixelBounds}},t.GridLayer.include({_getTiledPixelBounds:function(e,i,o){var n=t.EdgeBuffer.previousMethods.getTiledPixelBounds.call(this,e,i,o),s=1;if(void 0!==this.options.edgeBufferTiles&&null!==this.options.edgeBufferTiles&&(s=this.options.edgeBufferTiles),s>0){var r=t.GridLayer.prototype.getTileSize.call(this).multiplyBy(s);n=new t.Bounds(n.min.subtract(r),n.max.add(r))}return n}})},window);i(882),i(189),i(395);
35/*! Version: 0.89.0
36Copyright (c) 2016 Dominik Moritz */
37/*!
38Copyright (c) 2016 Dominik Moritz
39
40This file is part of the leaflet locate control. It is licensed under the MIT license.
41You can find the project at: https://github.com/domoritz/leaflet-locatecontrol
42*/
43const Sr=3.2808399;function Ar(t,e){e.split(" ").forEach(e=>{t.classList.add(e)})}function Or(t,e){e.split(" ").forEach(e=>{t.classList.remove(e)})}function Er(t,e,i){const o=document.createElement(t);return e&&(o.className=e),i?.append(o),o}const Dr=us.Marker.extend({initialize(t,e){us.Util.setOptions(this,e),this._latlng=t,this.createIcon()},createIcon(){const t=this.options,e=[["stroke",t.color],["stroke-width",t.weight],["fill",t.fillColor],["fill-opacity",t.fillOpacity],["opacity",t.opacity]].filter(([,t])=>void 0!==t).map(([t,e])=>`${t}="${e}"`).join(" "),i=this._getIconSVG(t,e);this._locationIcon=new us.DivIcon({className:i.className,html:i.svg,iconSize:[i.w,i.h]}),this.setIcon(this._locationIcon)},_getIconSVG(t,e){const i=t.radius,o=i+t.weight,n=2*o;return{className:"leaflet-control-locate-location",svg:`<svg xmlns="http://www.w3.org/2000/svg" width="${n}" height="${n}" version="1.1" viewBox="-${o} -${o} ${n} ${n}"><circle r="${i}" ${e} /></svg>`,w:n,h:n}},setStyle(t){us.Util.setOptions(this,t),this.createIcon()}}),Ir=Dr.extend({initialize(t,e,i){us.Util.setOptions(this,i),this._latlng=t,this._heading=e,this.createIcon()},setHeading(t){this._heading=t},_getIconSVG(t,e){const i=t.radius,o=i+t.weight+t.depth,n=2*o;return{className:"leaflet-control-locate-heading",svg:`<svg xmlns="http://www.w3.org/2000/svg" width="${n}" height="${n}" version="1.1" viewBox="-${o} -${o} ${n} ${n}"><path d="${this._arrowPoints(i,t.width,t.depth,this._heading)}" ${e} /></svg>`,w:n,h:n}},_arrowPoints(t,e,i,o){const n=(o-90)*Math.PI/180,s=Math.cos(n),r=Math.sin(n),a=-Math.sin(n),l=Math.cos(n),h=e/2,c=t*s,u=t*r;return`M ${c+h*a},${u+h*l} L ${c-h*a},${u-h*l} L ${c+i*s},${u+i*r} Z`}}),zr=us.Control.extend({options:{position:"topleft",layer:void 0,setView:"untilPanOrZoom",keepCurrentZoomLevel:!1,initialZoomLevel:!1,getLocationBounds(t){return t.bounds},flyTo:!1,clickBehavior:{inView:"stop",outOfView:"setView",inViewNotFollowing:"inView"},returnToPrevBounds:!1,cacheLocation:!0,drawCircle:!0,drawMarker:!0,showCompass:!0,markerClass:Dr,compassClass:Ir,circleStyle:{className:"leaflet-control-locate-circle",color:"#136AEC",fillColor:"#136AEC",fillOpacity:.15,weight:0},markerStyle:{className:"leaflet-control-locate-marker",color:"#fff",fillColor:"#2A93EE",fillOpacity:1,weight:3,opacity:1,radius:9},compassStyle:{fillColor:"#2A93EE",fillOpacity:1,weight:0,color:"#fff",opacity:1,radius:9,width:9,depth:6},followCircleStyle:{},followMarkerStyle:{},followCompassStyle:{},icon:"leaflet-control-locate-location-arrow",iconLoading:"leaflet-control-locate-spinner",iconElementTag:"span",textElementTag:"small",circlePadding:[0,0],metric:!0,createButtonCallback(t,e){const i=Er("a","leaflet-bar-part leaflet-bar-part-single",t);i.title=e.strings.title,i.href="#",i.setAttribute("role","button"),i.setAttribute("aria-label",e.strings.title);const o=Er(e.iconElementTag,e.icon,i);if(o.classList.add("leaflet-locate-icon"),void 0!==e.strings.text){Er(e.textElementTag,"leaflet-locate-text",i).textContent=e.strings.text,i.classList.add("leaflet-locate-text-active"),i.parentNode.style.display="flex"}return{link:i,icon:o}},onLocationError(t){alert(t.message)},onLocationOutsideMapBounds(t){t.stop(),alert(t.options.strings.outsideMapBoundsMsg)},showPopup:!0,strings:{title:"Show me where I am",metersUnit:"meters",feetUnit:"feet",popup:"You are within {distance} {unit} from this point",outsideMapBoundsMsg:"You seem located outside the boundaries of the map"},locateOptions:{maxZoom:1/0,watch:!0,setView:!1}},initialize(t={}){this.options=function(t){const e={};for(const i in t){const o=t[i];Array.isArray(o)?e[i]=[...o]:e[i]=o?.constructor===Object?{...o}:o}return e}(this.options);for(const e in t){const i=t[e],o=this.options[e];i?.constructor===Object&&o?.constructor===Object?Object.assign(o,i):this.options[e]=i}this.options.followMarkerStyle={...this.options.markerStyle,...this.options.followMarkerStyle},this.options.followCircleStyle={...this.options.circleStyle,...this.options.followCircleStyle},this.options.followCompassStyle={...this.options.compassStyle,...this.options.followCompassStyle}},onAdd(t){const e=Er("div","leaflet-control-locate leaflet-bar leaflet-control");this._container=e,this._map=t,this._layer=this.options.layer||new us.LayerGroup,this._layer.addTo(t),this._event=void 0,this._compassHeading=null,this._prevBounds=null;const i=this.options.createButtonCallback(e,this.options);return this._link=i.link,this._icon=i.icon,this._link.addEventListener("click",t=>{t.stopPropagation(),t.preventDefault(),this._onClick()}),this._link.addEventListener("dblclick",t=>t.stopPropagation()),this._resetVariables(),this._map.on("unload",this._unload,this),e},onRemove(){this.stop()},_onClick(){this._justClicked=!0;const t=this._isFollowing();if(this._userPanned=!1,this._userZoomed=!1,this._active&&!this._event)this.stop();else if(this._active){const e=this.options.clickBehavior;let i=e.outOfView;switch(this._map.getBounds().contains(this._event.latlng)&&(i=t?e.inView:e.inViewNotFollowing),e[i]&&(i=e[i]),i){case"setView":this.setView();break;case"stop":if(this.stop(),this.options.returnToPrevBounds){(this.options.flyTo?this._map.flyToBounds:this._map.fitBounds).bind(this._map)(this._prevBounds)}}}else this.options.returnToPrevBounds&&(this._prevBounds=this._map.getBounds()),this.start();this._updateContainerStyle()},start(){this._activate(),this._event&&(this._drawMarker(this._map),this.options.setView&&this.setView()),this._updateContainerStyle()}
vendor: 6,563 bytes, line 43
43,stop(){this._deactivate(),this._cleanClasses(),this._resetVariables(),this._removeMarker()},stopFollowing(){this._userPanned=!0,this._updateContainerStyle(),this._drawMarker()},_activate(){!this._active&&this._map&&(this._map.locate(this.options.locateOptions),this._map.fire("locateactivate",this),this._active=!0,this._map.on("locationfound",this._onLocationFound,this),this._map.on("locationerror",this._onLocationError,this),this._map.on("dragstart",this._onDrag,this),this._map.on("zoomstart",this._onZoom,this),this._map.on("zoomend",this._onZoomEnd,this),this._activateCompass())},async _activateCompass(){if(!this.options.showCompass)return;const t="ondeviceorientationabsolute"in window;if(!t&&!("ondeviceorientation"in window))return;const e=t?"deviceorientationabsolute":"deviceorientation";if(DeviceOrientationEvent&&"function"==typeof DeviceOrientationEvent.requestPermission)try{if("granted"!==await DeviceOrientationEvent.requestPermission())return}catch(t){return void console.warn("DeviceOrientation permission denied or unavailable:",t)}this._compassEventName=e,us.DomEvent.on(window,e,this._onDeviceOrientation,this)},_deactivate(){this._active&&this._map&&(this._map.stopLocate(),this._map.fire("locatedeactivate",this),this._active=!1,this.options.cacheLocation||(this._event=void 0),this._map.off("locationfound",this._onLocationFound,this),this._map.off("locationerror",this._onLocationError,this),this._map.off("dragstart",this._onDrag,this),this._map.off("zoomstart",this._onZoom,this),this._map.off("zoomend",this._onZoomEnd,this),this._deactivateCompass())},_deactivateCompass(){this._compassEventName&&(this._compassHeading=null,us.DomEvent.off(window,this._compassEventName,this._onDeviceOrientation,this),this._compassEventName=null)},_shouldKeepCurrentZoom(){const t=this.options.keepCurrentZoomLevel;if(Array.isArray(t)&&2===t.length){const e=this._map.getZoom(),[i,o]=t;return e>=i&&e<=o}return!0===t},setView(){if(this._drawMarker(),this._isOutsideMapBounds())return this._event=void 0,void this.options.onLocationOutsideMapBounds(this);const{latlng:t}=this._event,e=this.options.flyTo;let i,o;this._justClicked&&!1!==this.options.initialZoomLevel?(i=e?"flyTo":"setView",o=[t,this.options.initialZoomLevel]):this._shouldKeepCurrentZoom()?(i=e?"flyTo":"panTo",o=[t]):(i=e?"flyToBounds":"fitBounds",o=[this.options.getLocationBounds(this._event),{padding:this.options.circlePadding,maxZoom:this.options.locateOptions.maxZoom}]),this._setViewIgnoringEvents(i,o)},_setViewIgnoringEvents(t,e){this._ignoreEvent=!0,this._map[t](...e),requestAnimationFrame(()=>{this._ignoreEvent=!1})},_drawCompass(){if(!this._event)return;const t=this._event.latlng;if(this.options.showCompass&&t&&null!==this._compassHeading){const e=this._isFollowing()?this.options.followCompassStyle:this.options.compassStyle;this._compass?(this._compass.setLatLng(t),this._compass.setHeading(this._compassHeading),this._compass.setStyle&&this._compass.setStyle(e)):this._compass=new this.options.compassClass(t,this._compassHeading,e).addTo(this._layer)}!this._compass||this.options.showCompass&&null!==this._compassHeading||(this._compass.removeFrom(this._layer),this._compass=null)},_drawMarker(){if(!this._event)return;const t=this._event.latlng,e=this._event.accuracy??0,i=this._isFollowing();if(this.options.drawCircle){const o=i?this.options.followCircleStyle:this.options.circleStyle;if(this._circle)this._circle.setLatLng(t).setRadius(e).setStyle(o);else{const i={...o,radius:e};this._circle=new us.Circle(t,i).addTo(this._layer)}}if(this.options.drawMarker){const e=i?this.options.followMarkerStyle:this.options.markerStyle;this._marker?(this._marker.setLatLng(t),this._marker.setStyle&&this._marker.setStyle(e)):this._marker=new this.options.markerClass(t,e).addTo(this._layer)}this._drawCompass(),this._bindPopup(t,e)},_bindPopup(t,e){const i=this.options.strings.popup;if(!this.options.showPopup||!i)return;let o,n,s;this.options.metric?(o=e.toFixed(0),n=this.options.strings.metersUnit,s=null!=this._event?.altitude?this._event.altitude.toFixed(1):"N/A"):(o=(e*Sr).toFixed(0),n=this.options.strings.feetUnit,s=null!=this._event?.altitude?(this._event.altitude*Sr).toFixed(1):"N/A");const r=null!=this._event?.speed?this._event.speed.toFixed(2):"N/A",a=null!=this._event?.heading?this._event.heading.toFixed(0):"N/A",l={distance:o,unit:n,lat:t.lat.toFixed(6),lng:t.lng.toFixed(6),altitude:s,speed:r,heading:a};let h;h="string"==typeof i?us.Util.template(i,l):"function"==typeof i?i(l):i,this._marker&&this._marker.bindPopup(h)._popup.setLatLng(t),this._compass&&this._compass.bindPopup(h)._popup.setLatLng(t)},_removeMarker(){this._layer.clearLayers(),this._marker=void 0,this._circle=void 0,this._compass=void 0},_unload(){this.stop(),this._map&&this._map.off("unload",this._unload,this)},_setCompassHeading(t){Number.isFinite(t)?(this._compassHeading=Math.round(t),requestAnimationFrame(()=>this._drawCompass())):(this._compassHeading=null,this._drawCompass())},_onCompassNeedsCalibration(){this._setCompassHeading()},_onDeviceOrientation(t){this._active&&(t.webkitCompassHeading?this._setCompassHeading(t.webkitCompassHeading):t.absolute&&t.alpha&&this._setCompassHeading(360-t.alpha))},_onLocationError(t){if(3===t.code&&this.options.locateOptions.watch)return this._timeoutCount=(this._timeoutCount||0)+1,this._map.fire("locationtimeout",{error:t,control:this,count:this._timeoutCount}),void(this._timeoutCount>=3&&this._container&&Ar(this._container,"locate-timeout"));this._timeoutCount=0,this.stop(),this.options.onLocationError(t,this)},_onLocationFound(t){if((this._event?.latlng?.lat!==t.latlng.lat||this._event?.latlng?.lng!==t.latlng.lng||this._event?.accuracy!==t.accuracy)&&this._active){switch(this._timeoutCount=0,this._container&&Or(this._container,"locate-timeout"),this._event=t,this._drawMarker(),this._updateContainerStyle(),this._map.fire("locatelocationfound",{...t,control:this}),this.options.setView){case"once":this._justClicked&&this.setView();break;case"untilPan":this._userPanned||this.setView();break;case"untilPanOrZoom":this._userPanned||this._userZoomed||this.setView();break;case"always":this.setView()}this._justClicked=!1}},_onDrag(){this._event&&!this._ignoreEvent&&(this._userPanned=!0,this._updateContainerStyle(),this._drawMarker())},_onZoom(){this._event&&!this._ignoreEvent&&(this._userZoomed=!0,this._updateContainerStyle(),this._drawMarker())},_onZoomEnd(){this._event&&this._drawCompass(),this._event&&!this._ignoreEvent&&this._marker&&!this._map.getBounds().pad(-.3).contains(this._marker.getLatLng())&&
43(this._userPanned=!0,this._updateContainerStyle(),this._drawMarker())},_isFollowing(){return!!this._active&&("always"===this.options.setView||("untilPan"===this.options.setView?!this._userPanned:"untilPanOrZoom"===this.options.setView&&(!this._userPanned&&!this._userZoomed)))},_isOutsideMapBounds(){return void 0!==this._event&&(this._map.options.maxBounds&&!this._map.options.maxBounds.contains(this._event.latlng))},_updateContainerStyle(){this._container&&(this._active&&!this._event?this._setClasses("requesting"):this._isFollowing()?this._setClasses("following"):this._active?this._setClasses("active"):this._cleanClasses())},_setClasses(t){switch(t){case"requesting":Or(this._container,"active following"),Ar(this._container,"requesting"),Or(this._icon,this.options.icon),Ar(this._icon,this.options.iconLoading);break;case"active":Or(this._container,"requesting following"),Ar(this._container,"active"),Or(this._icon,this.options.iconLoading),Ar(this._icon,this.options.icon);break;case"following":Or(this._container,"requesting"),Ar(this._container,"active following"),Or(this._icon,this.options.iconLoading),Ar(this._icon,this.options.icon)}},_cleanClasses(){Or(this._container,"requesting active following"),Or(this._icon,this.options.iconLoading),Ar(this._icon,this.options.icon)},_resetVariables(){this._active=!1,this._justClicked=!1,this._timeoutCount=0,this._container&&Or(this._container,"locate-timeout"),this._userPanned=!1,this._userZoomed=!1}});function Br(t){return Br="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Br(t)}function Fr(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)}function Rr(t){return 4!==(t=(t=t.replace(/[^0-9.,-]/g,"")).split(",")).length?null:(t.map(parseFloat),[[t[0],t[1]],[t[2],t[3]]])}function Zr(t,e,i,o){return t.sort(function(t,n){var s,r;return"desc"===i?(s=n[e],r=t[e]):(s=t[e],r=n[e]),o?s-r:s.localeCompare(r,void 0,{numeric:!0,sensitivity:"base"})}),t}function Ur(t,e){var i,o,n,s,r,a;return o=(i=Math.floor(t))%1e3,n=(i=Math.floor(i/1e3))%60,s=(i=Math.floor(i/60))%60,r=(i=Math.floor(i/60))%24,a=i=Math.floor(i/24),e?(o="",n+='"'):(o+='"',n+="."),t>6e4?s+="'":s="",t>36e5?r+=":":r="",t>864e5?a+=".":a="",a+r+s+n+o}function Nr(t,e){var i=Math.pow(10,e);return Math.round(t*i)/i}function jr(t,e,i){if(isNaN(t))return"N/A";var o,n,s,r,a;
43switch(e?(o=1.609344,n="km",s="mi"):(o=.3048,n="m",s="ft"),"imperial"===i||"imperial-metric"===i?(r=t*o,a=t):(r=t,a=t/o),r=Nr(r,2)+" "+n,a=Nr(a,2)+" "+s,i){case"imperial":return a;case"metric-imperial":return r+" ("+a+")";case"imperial-metric":return a+" ("+r+")";default:return r}}function Hr(t){try{var e=JSON.parse(t);if(e&&"object"===Br(e))return e}catch(t){return t}return!1}function Gr(t){try{var e=new URL(t),i=new URL(window.location);e.hostname===i.hostname&&e.protocol!==i.protocol&&(e.protocol=i.protocol,t=e.toString())}catch(t){}return t}function Vr(t){return new Promise(function(e,i){var o=new XMLHttpRequest;if(o.open(t.type,t.url,!0),o.onload=function(){200===o.status?e(o.responseText):i(new Error("XHR request failed with error "+o.status+" ("+o.statusText+")"))},o.onerror=function(){i(new Error("XHR request failed with an unknown error"))},t.beforeSend&&t.beforeSend(o),t.data){var n=new FormData;Object.keys(t.data).forEach(function(e){n.append(e,t.data[e])}),o.send(n)}else o.send(null)})}ps().Control.ResetView=ps().Control.extend({options:{position:"topleft",onDemand:!1,coordinates:null,zoom:null,title:""},onAdd:function(t){var e=ps().DomUtil.create("div","leaflet-control-reset-view leaflet-bar"),i=this.options;return i.onDemand&&(e.style.display="none",t.on("movestart",function(){e.style.display="block"})),null===i.coordinates&&(i.coordinates=t.getCenter()),null===i.zoom&&(i.zoom=t.getZoom()),this._createButton("",i.title,"leaflet-control-reset-view-button leaflet-bar-part",e,this._resetView),e},_createButton:function(t,e,i,o,n){var s=ps().DomUtil.create("a",i,o);s.innerHTML=t,s.href="#",s.title=e,ps().DomEvent.disableClickPropagation(s),ps().DomEvent.on(s,"click",ps().DomEvent.stop),ps().DomEvent.on(s,"click",n,this),ps().DomEvent.on(s,"click",this._refocusOnMap,this)},_resetView:function(){this._map.stop(),this.options.onDemand&&this._map.once("moveend",function(){this._container.style.display="none"}
43,this),this._map.setView(this.options.coordinates,this.options.zoom,{animate:!0})}}),ps().control.resetView=function(t){return new(ps().Control.ResetView)(t)},ps().Control.Filters=ps().Control.extend({options:{mmp:null,collapsed:!0,position:"topright",buttons:!0,allText:"All",noneText:"None"},initialize:function(t){ps().Util.setOptions(this,t)},onAdd:function(t){this._map=t;var e=this.options.mmp,i=this.options.collapsed,o="mmp-control-filters",n=this._container=ps().DomUtil.create("div",o);n.setAttribute("aria-haspopup",!0),ps().DomEvent.disableClickPropagation(n),ps().DomEvent.disableScrollPropagation(n),i&&(this._map.on("click",this.collapse,this),ps().Browser.android||ps().DomEvent.on(n,{mouseenter:this.expand,mouseleave:this.collapse},this));var s=ps().DomUtil.create("a",o+"-toggle",n);s.href="#",s.title="Filters",ps().Browser.touch?(ps().DomEvent.on(s,"click",ps().DomEvent.stop),ps().DomEvent.on(s,"click",this.expand,this)):ps().DomEvent.on(s,"focus",this.expand,this);var r=this._form=ps().DomUtil.create("form",o+"-list",n);if(this.options.buttons){var a=ps().DomUtil.create("div","mmp-control-filters-buttons",r),l=ps().DomUtil.create("a",null,a);l.innerHTML=this.options.allText,l.href="#",l.title=this.options.allText,ps().DomEvent.disableClickPropagation(l),ps().DomEvent.on(l,"click",ps().DomEvent.stop),ps().DomEvent.on(l,"click",function(){this._batchSelect(!0)},this);var h=ps().DomUtil.create("a",null,a);h.innerHTML=this.options.noneText,h.href="#",h.title=this.options.noneText,ps().DomEvent.disableClickPropagation(h),ps().DomEvent.on(h,"click",ps().DomEvent.stop),ps().DomEvent.on(h,"click",function(){this._batchSelect(!1)},this)}var c=[];Object.keys(e.settings.filtersDetails).forEach(function(t){var i=e.settings.filtersDetails[t];if(void 0!==e.groups[t]){var o=0;Object.keys(e.markers).forEach(function(i){-1!==e.markers[i].feature.properties.maps.indexOf(t)&&o++}),c.push({index:i.index,id:t,icon:i.icon,name:i.name,count:o})}}),c="id"===e.settings.filtersOrderBy?Zr(c,"id",e.settings.filtersSortOrder,!0):"name"===e.settings.filtersOrderBy?Zr(c,"name",e.settings.filtersSortOrder,!1):"count"===e.settings.filtersOrderBy?Zr(c,"count",e.settings.filtersSortOrder,!0):Zr(c,"index","asc",!0);for(var u=0;u<c.length;u++){var p=ps().DomUtil.create("label",null,r),d=ps().DomUtil.create("input",o+"-selector",p);d.type="checkbox",d.value=c[u].id,void 0!==e.groups[c[u].id]&&e.groups[c[u].id].active&&(d.checked=!0);var m=ps().DomUtil.create("span",null,p),f="";if(e.settings.filtersIcon)f+='<img class="mmp-filter-icon" src="'+(c[u].icon?mmpVars.iconsUrl+c[u].icon:mmpVars.pluginUrl+"images/leaflet/marker.png")+'" />';e.settings.filtersName&&(f+=c[u].name),e.settings.filtersCount&&(f+=" ["+c[u].count+"]"),m.innerHTML=f;var g=this;ps().DomEvent.on(d,"click",function(){void 0!==e.groups[this.value]&&(e.groups[this.value].active=this.checked),g._update(),t.fire("filterclick")},d)}return i||this.expand(),n},expand:function(){ps().DomUtil.addClass(this._container,"mmp-control-filters-expanded"),this._form.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._form.clientHeight?(ps().DomUtil.addClass(this._form,"mmp-control-filters-scrollbar"),this._form.style.height=t+"px"):ps().DomUtil.removeClass(this._form,"mmp-control-filters-scrollbar"),this},collapse:function(){return ps().DomUtil.removeClass(this._container,"mmp-control-filters-expanded"),this},_batchSelect:function(t){for(var e=this.options.mmp,i=this._container.getElementsByClassName("mmp-control-filters-selector"),o=i.length-1;o>=0;o--)i[o].checked=t,void 0!==e.groups[i[o].value]&&(e.groups[i[o].value].active=t);this._update(),this._map.fire("filterclick")},_update:function(){var t=this.options.mmp;if("map"===t.type&&t.settings.list)t.getList();else{var e=t.getActiveMarkers();t.drawMarkers(e)}t.drawGeoJson()}}),ps().control.filters=function(t){return new(ps().Control.Filters)(t)},ps().Control.Gpx=ps().Control.extend({options:{mmp:null,collapsed:!0,position:"topleft"},initialize:function(t){ps().Util.setOptions(this,t)},onAdd:function(t){this._map=t;var e=this.options.mmp,i=this.options.collapsed,o="mmp-control-tracks",n=this._container=ps().DomUtil.create("div",o);n.setAttribute("aria-haspopup",!0),ps().DomEvent.disableClickPropagation(n),ps().DomEvent.disableScrollPropagation(n),i&&(this._map.on("click",this.collapse,this),ps().Browser.android||ps().DomEvent.on(n,{mouseenter:this.expand,mouseleave:this.collapse},this));var s=ps().DomUtil.create("a",o+"-toggle",n);s.href="#",s.title="Tracks",ps().Browser.touch?(ps().DomEvent.on(s,"click",ps().DomEvent.stop),ps().DomEvent.on(s,"click",this.expand,this)):ps().DomEvent.on(s,"focus",this.expand,this);var r,a=this._form=ps().DomUtil.create("form",o+"-list",n);for(r=0;r<e.gpx.tracks.length;
43r++){var l=ps().DomUtil.create("label",null,a),h=ps().DomUtil.create("input",o+"-selector",l);h.type="radio",h.name="mmp-gpx-tracks",h.value=r,0===r&&(h.checked=!0),ps().DomUtil.create("span",null,l).innerHTML=e.gpx.tracks[r].name?e.gpx.tracks[r].name:"Unnamed Track",ps().DomEvent.on(h,"click",function(){var i=parseInt(this.value);t._activeTrack=i,t.fitBounds(e.gpxTracks[i].getBounds(),{padding:[10,10]}),e.updateElevationChart(!0)},h)}return i||this.expand(),n},expand:function(){ps().DomUtil.addClass(this._container,"mmp-control-tracks-expanded"),this._form.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._form.clientHeight?(ps().DomUtil.addClass(this._form,"mmp-control-tracks-scrollbar"),this._form.style.height=t+"px"):ps().DomUtil.removeClass(this._form,"mmp-control-tracks-scrollbar"),this},collapse:function(){return ps().DomUtil.removeClass(this._container,"mmp-control-tracks-expanded"),this}}),ps().control.gpx=function(t){return new(ps().Control.Gpx)(t)};i(423);var Wr=i(748),qr=i.n(Wr);var $r=function(t){var e=this;this.selector=t.selector||"#address",this.beforeSend=t.beforeSend||function(){},this.error=t.error||function(){},this.selected=t.selected||function(){},this.provider=t.provider||"none",this.typingDelay=t.typingDelay||400,this.minChars=t.minChars||3,this.autocomplete,this.init=function(){document.querySelector(e.selector)&&(e.autocomplete=new(qr())({name:"mmp-autocomplete",selector:e.selector,debounce:e.typingDelay,threshold:e.minChars,data:{src:function(t){return ps().DomUtil.removeClass(e.autocomplete.input,"results-error"),ps().DomUtil.addClass(e.autocomplete.input,"results-loading"),e.beforeSend(),Vr({type:"POST",url:mmpVars.ajaxurl,data:{action:"mmp_geocoding",provider:e.provider,query:t}}).then(function(t){return(t=JSON.parse(t)).success?t.results:(ps().DomUtil.addClass(e.autocomplete.input,"results-error"),void e.error(""+t.message))}).catch(function(t){ps().DomUtil.addClass(e.autocomplete.input,"results-error"),e.error(""+t)}).finally(function(){ps().DomUtil.removeClass(e.autocomplete.input,"results-loading")})},keys:["address"],cache:!1},searchEngine:function(t,e){return e},resultsList:{element:function(t,i){if(!i.results.length){var o=document.createElement("div");o.setAttribute("class",e.autocomplete.name+"_no-results"),o.innerHTML="<span>No results</span>",t.prepend(o)}var n=ps().DomUtil.create("div",e.autocomplete.name+"_footer",t);switch(e.provider){case"locationiq":n.innerHTML='<a href="https://www.mapsmarker.com/locationiq-geocoding/" target="_blank"><img class="logo-locationiq" src="'+mmpVars.pluginUrl+'images/options/locationiq-logo.png" /></a>';break;case"mapquest":n.innerHTML='<a href="https://www.mapsmarker.com/mapquest-geocoding/" target="_blank"><img class="logo-mapquest" src="'+mmpVars.pluginUrl+'images/geocoding/mapquest-logo.png" /></a>';break;case"google":case"googlelegacy":n.innerHTML='<a href="https://www.mapsmarker.com/google-geocoding/ target="_blank"><img class="logo-google" src="'+mmpVars.pluginUrl+'images/geocoding/powered-by-google.png" /></a>';break;case"tomtom":n.innerHTML='<a href="https://www.mapsmarker.com/tomtom-geocoding/" target="_blank"><img class="logo-tomtom" src="'+mmpVars.pluginUrl+'images/geocoding/tomtom-logo.png" /></a>';break;case"stadia":n.innerHTML='<a href="https://www.mapsmarker.com/stadia-geocoding/" target="_blank"><img class="logo-stadia" src="'+mmpVars.pluginUrl+'images/geocoding/stadia-logo.png" /></a>';break;default:n.innerHTML=""}},maxResults:10,noResults:!0},resultItem:{element:function(t,i){t.innerHTML='<span class="'+e.autocomplete.name+'_icon"></span><span class="'+e.autocomplete.name+'_address">'+i.value.address+"</span>"},highlight:!1},events:{input:{init:function(t){t.srcElement.setAttribute("autocomplete","off")},focus:function(){e.autocomplete.open()},selection:function(t){var i=t.detail.selection.value;e.autocomplete.input.value=i.address,e.autocomplete.input.blur(),i.placeId?Vr({type:"POST",url:mmpVars.ajaxurl,data:{action:"mmp_google_places",placeId:i.placeId,legacy:"googlelegacy"===e.provider}}).then(function(t){(t=JSON.parse(t)).success&&e.selected(t.lat,t.lon,i.value)}
43).catch(function(){}):e.selected(i.lat,i.lon,i.value)}}}}))}};ps().Control.MmpGeocoding=ps().Control.extend({options:{mmp:null,collapsed:!0,position:"topleft",provider:"none",typingDelay:400,minChars:3,icon:null,titleText:"",errorText:""},onAdd:function(t){this._map=t;var e=this.options,i="leaflet-control-mmp-geocoding";e.icon?this._marker=ps().marker([0,0],{icon:e.icon}):this._marker=null;var o=ps().DomUtil.create("div",i);ps().DomEvent.disableClickPropagation(o);var n=ps().DomUtil.create("div",i+"-input-container",o),s=ps().DomUtil.create("input",i+"-input",n);s.id=i+"-input-"+e.mmp.uid,s.type="text",s.title=e.titleText,s.placeholder=e.titleText,ps().DomEvent.on(s,"keyup",this._onKeyUp,this);var r=this._clearButton=ps().DomUtil.create("div",i+"-clear",n);return r.style.display="none",ps().DomEvent.on(r,"mousedown",this._onMouseDown,this),ps().DomEvent.on(r,"click",this.clear,this),e.collapsed&&(ps().DomEvent.on(s,"focus",this.expand,this),ps().DomEvent.on(s,"blur",this.collapse,this)),this._geocoding=new $r({selector:"#"+i+"-input-"+e.mmp.uid,beforeSend:this._beforeSend.bind(this),error:this._onError.bind(this),selected:this._onSelected.bind(this),provider:e.provider,typingDelay:e.typingDelay,minChars:e.minChars}),o},addTo:function(t){return ps().Control.prototype.addTo.call(this,t),this._geocoding.init(),this.options.collapsed||this.expand(),this},expand:function(){ps().DomUtil.removeClass(this._container,"leaflet-control-mmp-geocoding-collapsed"),ps().DomUtil.addClass(this._container,"leaflet-control-mmp-geocoding-expanded")},collapse:function(){ps().DomUtil.removeClass(this._container,"leaflet-control-mmp-geocoding-expanded"),ps().DomUtil.addClass(this._container,"leaflet-control-mmp-geocoding-collapsed")},clear:function(){this._marker&&this._marker.remove(),this._geocoding.autocomplete.input.value="",this._clearButton.style.display="none",this._geocoding.autocomplete.close()},_onKeyUp:function(){this._geocoding.autocomplete.input.value?this._clearButton.style.display="inline-block":this._clearButton.style.display="none"},_onMouseDown:function(t){t.preventDefault()},_beforeSend:function(){},_onError:function(t){this.options.mmp.showMapModal(this.options.errorText,t)},_onSelected:function(t,e,i){var o=this.options.mmp;void 0!==o.controls.locate&&o.controls.locate.stop(),this._marker&&(this._marker.remove(),this._marker.options.title=i,this._marker.setLatLng([t,e]),this._marker.addTo(this._map)),this._map.setVie
43w([t,e]),this._geocoding.autocomplete.input.blur()}}),ps().control.mmpGeocoding=function(t){return new(ps().Control.MmpGeocoding)(t)};var Kr=i(576),Jr=i.n(Kr);function Yr(t){return Yr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yr(t)}function Xr(t,e){for(var i=0;i<e.length;i++){var o=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,Qr(o.key),o)}}function Qr(t){var e=function(t,e){if("object"!=Yr(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,e||"default");if("object"!=Yr(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Yr(e)?e:e+""}function ta(t,e,i){return e=oa(e),function(t,e){if(e&&("object"==Yr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ea()?Reflect.construct(e,i||[],oa(t).constructor):e.apply(t,i))}function ea(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(ea=function(){return!!t})()}function ia(){return ia="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,i){var o=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=oa(t)););return t}(t,e);if(o){var n=Object.getOwnPropertyDescriptor(o,e);return n.get?n.get.call(arguments.length<3?t:i):n.value}},ia.apply(null,arguments)}function oa(t){return oa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},oa(t)}function na(t,e){return na=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},na(t,e)}function sa(t){var i=this;this.uid=t.uid,this.type=t.type,this.id=t.id,this.isBackend=t.isBackend,this.lazy=t.lazy,this.customMarkers=t.marker||t.markers,this.settings=t.overrides||{},this.highlight=t.highlight||{},this.fitMarkers=t.fitMarkers||!1,this.fitGpx=t.fitGpx,this.containers={},this.map={},this.groups={},this.markers={},this.markerGroup={},this.geoJson={},this.geoJsonGroup={},this.tooltips={},this.basemaps={},this.minimaps={},this.overlays={},this.controls={},this.gpx={},this.gpxChart={},this.gpxTracks={},this.gpxWaypoints={},this.chartLayers={},this.listeners={},this.list={page:1,term:null,sort:null,order:null,lat:null,lng:null,zoom:null,radius:0,located:!1,geocoding:{},marker:{},circle:{},fitVisible:!1,filterBounds:!1,highlight:null,results:[]},this.on=function(t,e){i.listeners[t]instanceof Array||(i.listeners[t]=[]),-1===i.listeners[t].indexOf(e)&&i.listeners[t].push(e)},this.off=function(t,e){if(i.listeners[t]instanceof Array){var o=i.listeners[t].indexOf(e);-1!==o&&i.listeners[t].splice(o,1)}},this.fire=function(t,e){if(i.listeners[t]instanceof Array)for(var o=0;o<i.listeners[t].length;o++)i.listeners[t][o].call(i,e)},this.checkInvalidateSize=function(){var t=Fr(i.containers.main);!i.mapVisible&&t&&(i.map.invalidateSize(),void 0!==i.controls.minimap&&i.controls.minimap._miniMap.invalidateSize()),i.mapVisible=t},this.addLoading=function(t){if(!t.getElementsByClassName("mmp-loading-spinner").length){var e=ps().DomUtil.create("div","mmp-loading-spinner"),i=ps().DomUtil.create("div","rect-wrap");e.appendChild(i);for(var o=1;o<=5;o++){var n=ps().DomUtil.create("div","rect"+o);i.appendChild(n)}t.appendChild(e)}},this.removeLoading=function(t){for(var e=t.getElementsByClassName("mmp-loading-spinner"),i=0;i<e.length;i++)e[i].remove()},this.showMapModal=function(t,e){void 0!==i.containers.mapModal&&i.containers.mapModal.remove(),i.containers.mapModal=ps().DomUtil.create("div","mmp-map-modal"),i.containers.mapModal.addEventListener("click",function(t){t.target===this&&this.remove()});var o=ps().DomUtil.create("div","mmp-map-modal-content",i.containers.mapModal),n=ps().DomUtil.create("span","mmp-map-modal-close",o);n.innerHTML="&times;",n.addEventListener("click",function(t){t.target===this&&i.containers.mapModal.remove()});var s=ps().DomUtil.create("div","mmp-map-modal-header",o);ps().DomUtil.create("p","mmp-map-modal-title",s).innerHTML=t;var r=ps().DomUtil.create("div","mmp-map-modal-body",o);"string"==typeof e?ps().DomUtil.create("p","mmp-map-modal-message",r).innerHTML=e:r.appendChild(e);i.containers.mapWrap.appendChild(i.containers.mapModal)},this.getDirectionsLink=function(t,e,o,n){var s=i.settings,r="";switch(t){case"googlemaps":r="https://www.google.com/maps/dir/?api=1&destination="+(n||e+","+o),s.directionsGoogleTravelMode&&(r+="&travelmode="+s.directionsGoogleTravelMode);break;case"ors":r="https://classic-maps.openrouteservice.org/directions?a=null,null,"+e+","+o,r+="&b="+("Bicycle"===s.directionsOrsType?"1a":"Pedestrian"===s.directionsOrsType?"2":"HeavyVehicle"===s.directionsOrsType?"4a":"0"),r+="&c="+("Shortest"===s.directionsOrsRoute?"1":"0");break;case"bingmaps":r="https://www.bing.com/maps/default.aspx?v=2&rtp=pos___e_~pos."+e+"_"+o+(n?"_"+n:"")}return r},this.getApiLink=function(t,e,o){o=o||{},!mmpVars.language||"geojson"!==t&&"kml"!==t&&"georss"!==t||(o.lang=mmpVars.language);var n=mmpVars.apiUrl;switch(t){case"editMap":n=mmpVars.adminUrl+"admin.php?page=mapsmarkerpro_map&id="+e;break;case"editMarker":n=mmpVars.adminUrl+"admin.php?page=mapsmarkerpro_marker&id="+e;break;case"fs":n+="fullscreen/"+e+"/";break;case"gpx":n=mmpVars.baseUrl+"index.php?mapsmarkerpro=download_gpx&url="+i.settings.gpxUrl;break;case"geojson":n+="export/geojson/"+e+"/";break;case"kml":n+="export/kml/"+e+"/";break;case"georss":n+="export/georss/"+e+"/"}
43return Object.keys(o).length&&(n+="?",Object.keys(o).forEach(function(t){n+=t+"="+o[t]+"&"}),n=n.slice(0,-1)),n},this.addApiLink=function(t,e,i,o){var n=ps().DomUtil.create("a","mmp-api-icon "+i,o);n.href=t,n.rel="nofollow",n.target="_blank",n.title=e},this.addShareLink=function(t,e){var o=ps().DomUtil.create("i","mmp-api-icon mmp-api-icon-share",e);o.title=mmpL10n.api.share,o.addEventListener("click",function(){i.containers.main.scrollIntoView(),i.openShareModal(t)})},this.openShareModal=function(t){var e,o=i.settings;o.apiFullscreen&&"fs"===o.shareUrl?e=i.getApiLink("fs",i.id,{marker:t}):((e=new URL(window.location)).searchParams.delete("marker"),e.searchParams.set("markerid",t),e=e.toString());var n=ps().DomUtil.create("div",null);o.shareFacebook&&n.appendChild(i.getShareLink("facebook",e,o.shareText)),o.shareTwitter&&n.appendChild(i.getShareLink("twitter",e,o.shareText)),o.shareLinkedIn&&n.appendChild(i.getShareLink("linkedin",e,o.shareText)),o.shareWhatsApp&&n.appendChild(i.getShareLink("whatsapp",e,o.shareText)),o.shareEmail&&n.appendChild(i.getShareLink("email",e,o.shareText));var s=ps().DomUtil.create("div","mmp-share-modal-url",n),r=ps().DomUtil.create("input",null,s);r.setAttribute("type","text"),r.setAttribute("value",e),r.addEventListener("click",function(){this.select()});var a=ps().DomUtil.create("button","mmp-share-modal-copy",s);a.setAttribute("type","button"),a.dataset.clipboardText=e,a.innerHTML=mmpL10n.api.copy;new(Jr())("#maps-marker-pro-"+i.uid+" .mmp-share-modal-copy");i.showMapModal(mmpL10n.api.share,n)},this.getShareLink=function(t,e,i){e=encodeURIComponent(e),i=encodeURIComponent(i);var o=ps().DomUtil.create("a","mmp-share-button-link");o.setAttribute("target","_blank"),o.setAttribute("rel","noopener");var n=ps().DomUtil.create("div","mmp-share-button",o),s=ps().DomUtil.create("div","mmp-share-button-icon",n),r=ps().SVG.create("svg");r.setAttribute("viewBox","0 0 24 24"),s.appendChild(r);var a=ps().SVG.create("path");switch(r.appendChild(a),t){case"facebook":o.setAttribute("href","https://www.facebook.com/sharer.php?u="+e),ps().DomUtil.addClass(n,"mmp-share-button-facebook"),a.setAttribute("d","M18.77 7.46H14.5v-1.9c0-.9.6-1.1 1-1.1h3V.5h-4.33C10.24.5 9.5 3.44 9.5 5.32v2.15h-3v4h3v12h5v-12h3.85l.42-4z");break;case"twitter":o.setAttribute("href","https://twitter.com/share?text="+i+"&url="+e+"&via=mapsmarker"),ps().DomUtil.addClass(n,"mmp-share-button-twitter"),a.setAttribute("d","M23.44 4.83c-.8.37-1.5.38-2.22.02.93-.56.98-.96 1.32-2.02-.88.52-1.86.9-2.9 1.1-.82-.88-2-1.43-3.3-1.43-2.5 0-4.55 2.04-4.55 4.54 0 .36.03.7.1 1.04-3.77-.2-7.12-2-9.36-4.75-.4.67-.6 1.45-.6 2.3 0 1.56.8 2.95 2 3.77-.74-.03-1.44-.23-2.05-.57v.06c0 2.2 1.56 4.03 3.64 4.44-.67.2-1.37.2-2.06.08.58 1.8 2.26 3.12 4.25 3.16C5.78 18.1 3.37 18.74 1 18.46c2 1.3 4.4 2.04 6.97 2.04 8.35 0 12.92-6.92 12.92-12.93 0-.2 0-.4-.02-.6.9-.63 1.96-1.22 2.56-2.14z");break;case"linkedin":o.setAttribute("href","https://www.linkedin.com/shareArticle?title="+i+"&url="+e),ps().DomUtil.addClass(n,"mmp-share-button-linkedin"),a.setAttribute("d","M6.5 21.5h-5v-13h5v13zM4 6.5C2.5 6.5 1.5 5.3 1.5 4s1-2.4 2.5-2.4c1.6 0 2.5 1 2.6 2.5 0 1.4-1 2.5-2.6 2.5zm11.5 6c-1 0-2 1-2 2v7h-5v-13h5V10s1.6-1.5 4-1.5c3 0 5 2.2 5 6.3v6.7h-5v-7c0-1-1-2-2-2z");break;case"whatsapp":ps().Browser.mobile?o.setAttribute("href","whatsapp://send?text="+i+" "+e):o.setAttribute("href","https://api.whatsapp.com/send?text="+i+" "+e),ps().DomUtil.addClass(n,"mmp-share-button-whatsapp"),a.setAttribute("d","M20.1 3.9C17.9 1.7 15 .5 12 .5 5.8.5.7 5.6.7 11.9c0 2 .5 3.9 1.5 5.6L.6 23.4l6-1.6c1.6.9 3.5 1.3 5.4 1.3 6.3 0 11.4-5.1 11.4-11.4-.1-2.8-1.2-5.7-3.3-7.8zM12 21.4c-1.7 0-3.3-.5-4.8-1.3l-.4-.2-3.5 1 1-3.4L4 17c-1-1.5-1.4-3.2-1.4-5.1 0-5.2 4.2-9.4 9.4-9.4 2.5 0 4.9 1 6.7 2.8 1.8 1.8 2.8 4.2 2.8 6.7-.1 5.2-4.3 9.4-9.5 9.4zm5.1-7.1c-.3-.1-1.7-.9-1.9-1-.3-.1-.5-.1-.7.1-.2.3-.8 1-.9 1.1-.2.2-.3.2-.6.1s-1.2-.5-2.3-1.4c-.9-.8-1.4-1.7-1.6-2-.2-.3 0-.5.1-.6s.3-.3.4-.5c.2-.1.3-.3.4-.5.1-.2 0-.4 0-.5C10 9 9.3 7.6 9 7c-.1-.4-.4-.3-.5-.3h-.6s-.4.1-.7.3c-.3.3-1 1-1 2.4s1 2.8 1.1 3c.1.2 2 3.1 4.9 4.3.7.3 1.2.5 1.6.6.7.2 1.3.2 1.8.1.6-.1 1.7-.7 1.9-1.3.2-.7.2-1.2.2-1.3-.1-.3-.3-.4-.6-.5z");break;case"email":i?o.setAttribute("href","mailto:?subject="+i+"&body="+e):o.setAttribute("href","mailto:?body="+e),o.setAttribute("target","_self"),ps().DomUtil.addClass(n,"mmp-share-button-email"),a.setAttribute("d","M22 4H2C.9 4 0 4.9 0 6v12c0 1.1.9 2 2 2h20c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM7.25 14.43l-3.5 2c-.08.05-.17.07-.25.07-.17 0-.34-.1-.43-.25-.14-.24-.06-.55.18-.68l3.5-2c.24-.14.55-.06.68.18.14.24.06.55-.18.68zm4.75.07c-.1 0-.2-.03-.27-.08l-8.5-5.5c-.23-.15-.3-.46-.15-.7.15-.22.46-.3.7-.14L12 13.4l8.23-5.32c.23-.15.54-.08.7.15.14.23.07.54-.16.7l-8.5 5.5c-.08.04-.17.07-.27.07zm8.93 1.75c-.1.16-.26.25-.43.25-.08 0-.17-.02-.25-.07l-3.5-2c-.24-.13-.32-.44-.18-.68s.44-.32.68-.18l3.5 2c.24.13.32.44.18.68z");break;default:return null}return o},this.getActiveMarkers=function(){var t=i.settings,e=[];
43return Object.keys(i.markers).forEach(function(o){var n=i.markers[o],s=n.feature.properties.maps;if("map"!==i.type||t.filtersAllMarkers)e.push(n);else{var r=!1;"and"===t.filtersLogic?(r=!0,Object.keys(i.groups).forEach(function(t){t!==i.id&&i.groups[t].active&&-1===s.indexOf(t)&&(r=!1)})):Object.keys(i.groups).forEach(function(t){i.groups[t].active&&-1!==s.indexOf(t)&&(r=!0)}),r&&-1===e.indexOf(n)&&e.push(n)}}),e},this.checkPopupSize=function(t){var e=i.settings;i.containers.map.offsetWidth<e.popupMaxWidth?(t.options.minWidth=i.containers.map.offsetWidth-50,t.options.maxWidth=i.containers.map.offsetWidth-50):(t.options.minWidth=e.popupMinWidth,t.options.maxWidth=e.popupMaxWidth),i.containers.map.offsetHeight<e.popupMaxHeight?t.options.maxHeight=i.containers.map.offsetHeight-50:t.options.maxHeight=e.popupMaxHeight,t.update()},this.loadPopup=function(t,e){return new Promise(function(o,n){var s=t.getPopup();if(void 0!==s)if(e||!s.getContent()){var r=ps().DomUtil.create("div","mmp-popup");ps().DomUtil.create("img","mmp-popup-loading",r).src=mmpVars.pluginUrl+"images/icons/paging-ajax-loader.gif",s.setContent(r);var a="";new Promise(function(e,o){t instanceof ps().Marker?null===t.feature.properties.popup?i.getPopups(t.feature.properties.id).then(function(){a=i.getMarkerPopup(t),e()}).catch(function(){o()}):(a=i.getMarkerPopup(t),e()):t instanceof ps().Path?(a=i.getGeoJsonPopup(t),e()):o()}).then(function(){var t=a.getElementsByTagName("img"),e=Array.prototype.slice.call(t);Promise.all(e.map(i.imgLoaded)).then(function(){s.setContent(a),o(s)})}).catch(function(){n()})}else o(s);else n()})},this.getMarkerPopup=function(t){var e=i.settings,o=t.feature.properties,n=ps().DomUtil.create("div","mmp-popup");if(n.id="mmp-popup-"+o.id,e.popupMarkername&&o.name){var s=ps().DomUtil.create("div","mmp-popup-name",n);s.innerHTML=o.name,s.style.borderBottom="1px solid #f0f0e7"}o.popup&&(ps().DomUtil.create("div","mmp-popup-text",n).innerHTML=o.popup);if(o.address&&e.popupAddress||e.popupCoordinates||e.popupDirections||e.popupShare){var r=ps().DomUtil.create("div","mmp-popup-location",n);if(r.style.borderTop="1px solid #f0f0e7",e.popupShare&&i.addShareLink(o.id,r),e.popupDirections){var a=i.getDirectionsLink(e.directionsProvider,t.getLatLng().lat,t.getLatLng().lng,o.address);i.addApiLink(a,mmpL10n.api.dir,"mmp-api-icon-directions",r)}if(o.address&&e.popupAddress)ps().DomUtil.create("span","mmp-popup-location-address",r).innerHTML+=o.address;if(e.popupCoordinates){var l=ps().DomUtil.create("span","mmp-popup-location-coordinates",r);o.address&&e.popupAddress?l.innerHTML+=" ("+t.getLatLng().lat+", "+t.getLatLng().lng+")":l.innerHTML+=t.getLatLng().lat+", "+t.getLatLng().lng}}return n},this.getGeoJsonPopup=function(t){var e=i.settings,o=ps().DomUtil.create("div","mmp-popup");if(e.popupMarkername&&t.options.name){var n=ps().DomUtil.create("div","mmp-popup-name",o);n.innerHTML=t.options.name,n.style.borderBottom="1px solid #f0f0e7"}t.options.popup&&(ps().DomUtil.create("div","mmp-popup-text",o).innerHTML=t.options.popup);return o},this.imgLoaded=function(t){if(t.src)return new Promise(function(e){t.addEventListener("load",e),t.addEventListener("error",e),t.loading&&"lazy"===t.loading&&(t.loading="eager")})},this.updatePopups=function(){var t=i.settings;Object.keys(i.markers).forEach(function(e){var o=i.markers[e],n=o.getPopup();void 0!==n&&(n.setContent(""),n.options.minWidth=t.popupMinWidth,n.options.maxWidth=t.popupMaxWidth,n.options.maxHeight=t.popupMaxHeight,n.isOpen()&&i.updatePopup(o))})},this.updatePopup=function(t,e){var o=i.settings,n=t.getPopup();if(t instanceof ps().Marker){var s=t.feature.properties;!n&&s.popup?t.bindPopup("",i.popup):!n||s.popup||s.address&&o.popupAddress||o.popupCoordinates||o.popupDirections||(t.closePopup(),t.unbindPopup())}else t instanceof ps().Path&&(!n&&t.options.popup?t.bindPopup("",i.popup):n&&!t.options.popup&&(t.closePopup(),t.unbindPopup()));i.loadPopup(t,e).then(function(t){i.checkPopupSize(t),o.popupCenterOnMap&&i.centerPopup(t)}).catch(function(){})},this.centerPopup=function(t){if(t.isOpen()){var e=t.getLatLng(),o=i.map.project(e),n=t._container.clientHeight;o.y-=n/2;var s=i.map.unproject(o);i.map.panTo(s,{animate:!0})}},this.openMarker=function(t){t.isPopupOpen()?i.updatePopup(t):t.openPopup()},this.highlightMarker=function(t,e,o,n){if(t instanceof ps().Marker||void 0!==(t=i.markers[t])){var s=t.feature.properties;if(s.link)i.openLink(s.link,s.blank);else{e&&i.containers.main.scrollIntoView();var r=t.getLatLng(),a=!0===o&&i.map.getZoom()<s.zoom||"set"===o?s.zoom:void 0;i.map.once("moveend",function(){i.markerGroup instanceof ps().MarkerClusterGroup?i.markerGroup.zoomToShowLayer(t,function(){var e=t.getLatLng(),o=void 0!==o&&i.map.getZoom()<o?o:void 0;i.map.once("moveend",function(){n&&i.openMarker(t)}
43),i.map.setView(e,o)}):n&&i.openMarker(t)}),i.map.setView(r,a)}}},this.openLink=function(t,e){var i="1"===e?"_blank":"_self";window.open(t,i)},this.showError=function(t){if(i.containers.main.innerHTML="",ps().DomUtil.addClass(i.containers.main,"mmp-map-error"),mmpVars.isAdmin){var e=ps().DomUtil.create("pre","mmp-map-error-debug",i.containers.main);e.innerHTML='Unable to load Maps Marker Pro map.\nSee <a href="https://www.mapsmarker.com/map-loading-issues/" target="_blank">https://www.mapsmarker.com/map-loading-issues/</a> for possible solutions.\nPlease include the URL to the map and the information below if opening a support ticket.\n\n',e.appendChild(document.createTextNode(t.stack))}else{ps().DomUtil.create("p","mmp-map-error-msg",i.containers.main).innerHTML="The map could not be loaded. Please contact the site owner."}},this.logError=function(t){console.error("[Maps Marker Pro] "+t)},this.main=function(){i.containers.main=document.getElementById("maps-marker-pro-"+i.uid),i.containers.main?i.lazy?"function"==typeof IntersectionObserver?new IntersectionObserver(i.lazyLoadHandler,{root:null,rootMargin:"0px",threshold:0}).observe(i.containers.main):i.lazyLoadHandlerFallback():i.load():"function"==typeof MutationObserver?new MutationObserver(i.deferredLoadHandler).observe(document.body,{childList:!0,subtree:!0,attributes:!1,characterData:!1}):i.logError("Unable to find map container")},this.load=function(){if(void 0===window.L||void 0===window.L.map||window.L.version!==ps().version){var t=new Error("Incorrect or missing Leaflet library");return i.logError("Error loading map ("+t.message+")"),void i.showError(t)}if(i.addLoading(i.containers.main),"function"==typeof URL){var e=new URL(window.location),o=parseInt(e.searchParams.get("marker"));isNaN(o)&&(o=parseInt(e.searchParams.get("markerid"))),isNaN(o)||(i.highlight={id:o,zoom:!1,open:!0})}for(var n=document.getElementsByClassName("mmp-highlight"),s=0;s<n.length;s++){var r=n[s].dataset;r.uid&&r.uid!==i.uid||(r.map&&r.map!==i.id||n[s].addEventListener("click",function(t){t.preventDefault(),t.stopPropagation();var e=this.dataset,o=e.marker||null,n=!e.scroll||"false"!==e.scroll,s=!(!e.zoom||"true"!==e.zoom),r=!e.open||"false"!==e.open;i.highlightMarker(o,n,s,r)}))}for(var a=0;a<sa.callbacks.length;a++){var l=sa.callbacks[a];"function"==typeof l&&l(i)}i.loadSettings().then(function(){return i.init(),i.loadResources()}).then(function(){i.loadControls(),i.removeLoading(i.containers.main),i.highlight.id?i.highlightMarker(i.highlight.id,!!i.highlight.scroll,!!i.highlight.zoom,!!i.highlight.open):i.fitMarkers&&!i.map.getBounds().contains(i.markerGroup.getBounds())?i.fitVisibleMarkers(i.loadControls):void 0!==i.fitGpx&&void 0!==i.gpxGroup&&i.fitGpxTrack(i.fitGpx,i.loadControls)}).catch(function(t){i.logError("Error loading map ("+t.message+")"),i.showError(t)})},this.init=function(){i.containers.mapWrap=document.getElementById("mmp-map-wrap-"+i.uid),i.containers.mapWrap||(i.containers.mapWrap=ps().DomUtil.create("div","mmp-map-wrap",i.containers.main),i.containers.mapWrap.id="mmp-map-wrap-"+i.uid),i.loadPanel(),i.loadMap(),i.loadChart(),i.loadList(),i.setLayout(),window.addEventListener("resize",i.setLayoutThrottled),"function"==typeof IntersectionObserver?new IntersectionObserver(i.visibilityDetectionHandler,{root:null,rootMargin:"0px",threshold:0}).observe(i.containers.main):i.visibilityDetectionHandlerFallback(),i.loadBasemaps(),i.loadOverlays()},this.setLayout=function(){var t=i.settings;i.containers.main.style.width=t.width+t.widthUnit,i.containers.map.style.height=t.height+t.heightUnit,t.responsive&&"px"===t.widthUnit&&("100%"!==i.containers.main.style.width&&i.containers.main.parentNode.offsetWidth<t.width?i.containers.main.style.width="100%":"100%"===i.containers.main.style.width&&i.containers.main.parentNode.offsetWidth>t.width&&(i.containers.main.style.width=t.width+"px")),void 0!==i.containers.list&&(t.list>0?1===t.list||-1===i.containers.main.style.width.indexOf("px")&&i.containers.main.offsetWidth<t.listWidth+t.listBreakpoint?(ps().DomUtil.removeClass(i.containers.main,"mmp-list-right"),ps().DomUtil.removeClass(i.
43containers.main,"mmp-list-left"),ps().DomUtil.addClass(i.containers.main,"mmp-list-below")):(ps().DomUtil.removeClass(i.containers.main,"mmp-list-below"),2===t.list?(ps().DomUtil.removeClass(i.containers.main,"mmp-list-left"),ps().DomUtil.addClass(i.containers.main,"mmp-list-right")):3===t.list&&(ps().DomUtil.removeClass(i.containers.main,"mmp-list-right"),ps().DomUtil.addClass(i.containers.main,"mmp-list-left"))):(ps().DomUtil.removeClass(i.containers.main,"mmp-list-below"),ps().DomUtil.removeClass(i.containers.main,"mmp-list-right"),ps().DomUtil.removeClass(i.containers.main,"mmp-list-left"))),i.map.invalidateSize()},this.setLayoutThrottled=ps().Util.throttle(i.setLayout,200,this),this.loadSettings=function(){return new Promise(function(t,e){Vr({type:"POST",url:mmpVars.ajaxurl,data:{action:"mmp_map_settings",type:i.type,id:i.id,marker:i.customMarkers||null,highlight:i.highlight.id||null,lang:mmpVars.language}}).then(function(o){(o=Hr(o))instanceof Error?e(o):o.success||e(new Error(o.data));var n=o.data;Object.keys(i.settings).forEach(function(t){n[t]=i.settings[t]}),i.settings=n,n.callback&&"function"==typeof window[n.callback]&&window[n.callback](i),i.fire("settingsloaded",i.settings),t()}).catch(function(t){i.logError("Error loading settings ("+t.message+")"),e(t)})})},this.loadPanel=function(){var t=i.settings;if(i.containers.panel=document.getElementById("mmp-panel-"+i.uid),t.panel){var e=ps().DomUtil.create("div","mmp-panel");e.id="mmp-panel-"+i.uid,e.style.backgroundColor=t.panelColor,ps().DomUtil.create("div","mmp-panel-text",e).innerHTML=t.name;var o=ps().DomUtil.create("div","mmp-panel-api",e);"map"===i.type&&(t.panelEdit&&i.addApiLink(i.getApiLink("editMap",i.id),mmpL10n.api.editMap,"mmp-api-icon-edit",o),t.apiFullscreen&&t.panelFs&&i.addApiLink(i.getApiLink("fs",i.id),mmpL10n.api.fs,"mmp-api-icon-fullscreen",o),t.panelGpx&&t.gpxUrl&&i.addApiLink(i.getApiLink("gpx",i.id),mmpL10n.gpx.metaDownload,"mmp-api-icon-gpx",o),t.apiExport&&t.panelGeoJson&&i.addApiLink(i.getApiLink("geojson",i.id),mmpL10n.api.geoJson,"mmp-api-icon-geojson",o),t.apiExport&&t.panelKml&&i.addApiLink(i.getApiLink("kml",i.id),mmpL10n.api.kml,"mmp-api-icon-kml",o),t.apiExport&&t.panelGeoRss&&i.addApiLink(i.getApiLink("georss",i.id),mmpL10n.api.geoRss,"mmp-api-icon-georss",o)),i.containers.panel?i.containers.panel.parentNode.replaceChild(e,i.containers.panel):i.containers.mapWrap.insertBefore(e,i.containers.map),i.containers.panel=e,i.fire("panelloaded",i.map)}else i.containers.panel&&(i.containers.panel.remove(),i.containers.panel=null)},this.loadMap=function(){var t=i.settings;"function"==typeof i.map.remove&&i.map.remove(),i.map={};var e=ps().DomUtil.create("div","mmp-map");if(e.id="mmp-map-"+i.uid,e.style.height=t.height+t.heightUnit,i.containers.map=document.getElementById("mmp-map-"+i.uid),i.containers.map?i.containers.map.parentNode.replaceChild(e,i.containers.map):i.containers.mapWrap.insertBefore(e,i.containers.chartWrap),i.containers.map=e,i.map=ps().map(i.containers.map,{center:[t.lat,t.lng],zoom:t.zoom,minZoom:Math.round(t.minZoom),maxZoom:t.maxZoom,zoomSnap:t.zoomStep,zoomDelta:t.zoomStep,maxBounds:Rr(t.maxBounds),maxBoundsViscosity:1,gestureHandling:t.gestureHandling,gestureHandlingOptions:{text:{touch:mmpL10n.interaction.gestureTouch,scroll:mmpL10n.interaction.gestureScroll,scrollMac:mmpL10n.interaction.gestureScrollMac},duration:1e3},dragging:t.dragging,inertia:t.inertia,inertiaDeceleration:t.inertiaDeceleration,inertiaMaxSpeed:t.inertiaMaxSpeed,keyboard:t.keyboard,keyboardPanDelta:t.keyboardPanDelta,scrollWheelZoom:t.scrollWheelZoom,doubleClickZoom:t.doubleClickZoom,touchZoom:t.touchZoom,boxzoom:t.boxzoom,bounceAtZoomLimits:t.bounceAtZoomLimits,worldCopyJump:t.worldCopyJump,attributionControl:!0,zoomControl:!1,closePopupOnClick:t.popupAutoClose}),i.map._activeTrack=0,i.map.attributionControl.setPosition(t.attributionPosition),i.map.attributionControl.setPrefix(t.attributionPrefix),i.map.attributionControl._esriAttributionAdded=!0,t.attributionCondensed&&(ps().DomUtil.removeClass(i.map.attributionControl.getContainer(),"leaflet-control-attribution"),ps().DomUtil.addClass(i.map.attributionControl.getContainer(),"mmp-control-attribution")),i.settings.useBounds&&!i.isBackend){var o=ps().latLngBounds(Rr(i.settings.bounds));if(!o.isValid())return;i.map.fitBounds(o)}i.fire("maploaded",i.map)},this.loadChart=function(){var t=i.settings;if("function"==typeof i.gpxChart.destroy&&i.gpxChart.destroy(),i.gpxChart={},i.containers.chartWrap=document.getElementById("mmp-chart-wrap-"+i.uid),t.gpxUrl&&t.gpxChart){var e=ps().DomUtil.create("div","mmp-gpx-chart-wrap");e.id="mmp-chart-wrap-"+i.uid,e.style.height=t.gpxChartHeight+"px",e.style.position="relative",e.style.minWidth=0;var o=ps().DomUtil.create("canvas","mmp-gpx-chart",e);o.id="mmp-gpx-chart-"+i.uid,i.containers.chartWrap?i.containers.chartWrap.parentNode.replaceChild(e,i.containers.chartWrap):i.containers.mapWrap.appendChild(e),i.containers.chartWrap=e,i.containers.chart=o,i.fire("chartloaded",i.gpxChart)}else i.containers.chartWrap&&(i.containers.chartWrap.remove(),i.containers.chartWrap=null,i.containers.chart=null)},this.loadList=function(){var t=i.settings;if(i.containers.list=document.getElementById("mmp-list-"+i.uid),"map"!==i.type&&"custom"!==i.t
43ype||!t.list)i.containers.list&&(i.containers.list.remove(),i.containers.list=null);else{var e=ps().DomUtil.create("div","mmp-list");if(e.id="mmp-list-"+i.uid,e.style.flexBasis=t.listWidth+"px",i.list.sort=t.listOrderBy,i.list.order=t.listSortOrder,t.listSearch){var o=ps().DomUtil.create("div","mmp-list-header",e),n=ps().DomUtil.create("div","mmp-list-header-left",o),s=ps().DomUtil.create("div","mmp-list-search-wrap",n),r=ps().DomUtil.create("input","mmp-list-search",s);r.id="list-search-"+i.uid,r.type="search",r.placeholder=mmpL10n.list.search;var a=ps().DomUtil.create("div","mmp-list-search-clear",s);a.style.display="none",a.addEventListener("click",function(){var t=document.getElementById("list-search-"+i.uid);t&&(t.value=""),this.style.display="none",i.getList({page:1,term:null})}),r.addEventListener("keyup",function(e){this.value?a.style.display="inline-block":a.style.display="none","Enter"===e.key&&i.getList({page:1,term:this.value,fitVisible:t.listFitVisible})});var l=ps().DomUtil.create("div","mmp-list-header-right",o),h=[];if(t.listOrderById&&h.push("id"),t.listOrderByName&&h.push("name"),t.listOrderByAddress&&h.push("address"),t.listOrderByDistance&&h.push("distance"),t.listOrderByIcon&&h.push("icon"),t.listOrderByPublished&&h.push("publish"),t.listOrderByUpdated&&h.push("modified"),t.listOrderByCustom&&h.push("custom"),h.length){for(var c=ps().DomUtil.create("select","mmp-list-sort",l),u=0;u<h.length;u++){var p=ps().DomUtil.create("option",null,c);p.value=h[u],h[u]===t.listOrderBy&&(p.defaultSelected=!0),p.innerHTML=mmpL10n.list[h[u]]}c.addEventListener("change",function(){i.getList({page:1,sort:this.value})}),ps().DomUtil.create("i","mmp-list-order mmp-"+t.listSortOrder,l).addEventListener("click",function(){var t=ps().DomUtil.hasClass(this,"mmp-desc")?"asc":"desc";ps().DomUtil.removeClass(this,"mmp-asc"),ps().DomUtil.removeClass(this,"mmp-desc"),ps().DomUtil.addClass(this,"mmp-"+t),i.getList({page:1,order:t})})}}if(t.listLocation&&"none"!==t.geocodingProvider){var d=ps().DomUtil.create("div","mmp-list-header",e),m=ps().DomUtil.create("div","mmp-list-header-left",d),f=ps().DomUtil.create("div","mmp-list-search-wrap",m),g=ps().DomUtil.create("input","mmp-list-location",f);g.id="list-address-"+i.uid,g.type="text",g.placeholder=mmpL10n.list.location,g.addEventListener("keyup",function(){this.value?_.style.display="inline-block":_.style.display="none"});var _=ps().DomUtil.create("div","mmp-list-location-clear",f);_.style.display="none",_.addEventListener("click",function(){var t=document.getElementById("list-address-"+i.uid);t&&(ps().DomUtil.removeClass(t,"results-loading"),ps().DomUtil.removeClass(t,"results-error"),t.value=""),this.style.display="none",i.list.located||i.getList({page:1,lat:null,lng:null})});var y=ps().DomUtil.create("div","mmp-list-header-right",d),v=ps().DomUtil.create("select","mmp-list-radius",y),b=[0,5,10,15,20,25,50,100,200,500];for(u=0;u<b.length;u++){var x=ps().DomUtil.create("option",null,v);x.value=b[u],b[u]<=0?x.innerHTML=mmpL10n.list.noLimit:"imperial"===t.listDistanceUnit?x.innerHTML=b[u]+" mi":"metric-imperial"===t.listDistanceUnit?x.innerHTML=b[u]+" km ("+(b[u]/1.609344).toFixed(t.listDistancePrecision)+" mi)":"imperial-metric"===t.listDistanceUnit?x.innerHTML=b[u]+" mi ("+(1.609344*b[u]).toFixed(t.listDistancePrecision)+" km)":x.innerHTML=b[u]+" km"}v.addEventListener("change",function(){i.getList({page:1,radius:v.value})})}i.containers.listBody=ps().DomUtil.create("div","mmp-list-body",e),i.containers.listFooter=ps().DomUtil.create("div","mmp-list-footer",e),i.containers.list?i.containers.list.parentNode.replaceChild(e,i.containers.list):i.containers.main.appendChild(e),i.containers.list=e,t.listLocation&&"none"!==t.geocodingProvider&&(i.list.geocoding=new $r({selector:"#list-address-"+i.uid,error:function(t){i.showMapModal(mmpL10n.list.locationError,t)},selected:function(e,o){void 0!==i.controls.locate&&i.controls.locate.stop(),i.getList({page:1,lat:e,lng:o,zoom:t.listGeocodingZoom})},provider:i.settings.geocodingProvider,typingDelay:i.settings.geocodingTypingDelay,minChars:i.settings.geocodingMinChars}
43),i.list.geocoding.init()),i.settings.listFilterBounds?(i.list.filterBounds=!0,i.map.on("moveend",i.showList)):(i.list.filterBounds=!1,i.map.off("moveend",i.showList))}},this.loadBasemaps=function(){var t=i.settings;Object.keys(i.basemaps).forEach(function(t){i.map.removeLayer(i.basemaps[t])}),i.basemaps={},i.minimaps={},!t.basemaps.length&&t.fallbackBasemap&&(t.basemaps=[t.fallbackBasemap]);for(var e=0;e<t.basemaps.length;e++){var o=t.basemaps[e];if(1===o.type){if(o.options.bounds&&"string"==typeof o.options.bounds){var n=Rr(o.options.bounds);o.options.rasterTiles?o.options.bounds=[i.map.unproject(ps().point(n[0][1],n[0][0]),o.options.maxNativeZoom),i.map.unproject(ps().point(n[1][1],n[1][0]),o.options.maxNativeZoom)]:o.options.bounds=n}o.options.minZoom=t.minZoom,o.options.maxZoom=t.maxZoom,o.options.errorTileUrl=void 0===o.options.errorTiles&&t.errorTiles||o.options.errorTiles?t.errorTileUrl:null,o.options.edgeBufferTiles=t.basemapEdgeBufferTiles,o.wms?(i.basemaps[o.name]=ps().tileLayer.wms(o.url,o.options),i.minimaps[o.name]=ps().tileLayer.wms(o.url,o.options)):(i.basemaps[o.name]=ps().tileLayer(o.url,o.options),i.minimaps[o.name]=ps().tileLayer(o.url,o.options))}else if(2===o.type&&t.googleApiKey)o.options.styles=t.basemapGoogleStyles,o.options.minZoom=t.minZoom,o.options.maxZoom=t.maxZoom,o.options.edgeBufferTiles=0,i.basemaps[o.name]=new(ps().gridLayer.googleMutant)(o.options),i.minimaps[o.name]=new(ps().gridLayer.googleMutant)(o.options);else if(3===o.type&&t.bingApiKey)o.options.bingMapsKey=t.bingApiKey,o.options.culture=t.basemapBingCulture,o.options.minZoom=t.minZoom,o.options.maxZoom=t.maxZoom,o.options.errorTileUrl=t.errorTiles?t.errorTileUrl:null,o.options.edgeBufferTiles=t.basemapEdgeBufferTiles,i.basemaps[o.name]=ps().tileLayer.bing(o.options),i.minimaps[o.name]=ps().tileLayer.bing(o.options);else if(4===o.type&&t.hereApiKey)o.options.apiKey=t.hereApiKey,o.options.minZoom=t.minZoom,o.options.maxZoom=t.maxZoom,o.options.errorTileUrl=t.errorTiles?t.errorTileUrl:null,o.options.edgeBufferTiles=t.basemapEdgeBufferTiles,i.basemaps[o.name]=ps().tileLayer.here(o.options),i.minimaps[o.name]=ps().tileLayer.here(o.options);else if(5===o.type&&t.tomApiKey)o.options.apiKey=t.tomApiKey,o.options.minZoom=t.minZoom,o.options.maxZoom=t.maxZoom,o.options.errorTileUrl=t.errorTiles?t.errorTileUrl:null,o.options.edgeBufferTiles=t.basemapEdgeBufferTiles,i.basemaps[o.name]=ps().tileLayer.tomTom(o.options),i.minimaps[o.name]=ps().tileLayer.tomTom(o.options);else{if(6!==o.type)continue;o.options.minZoom=t.minZoom,o.options.maxZoom=t.maxZoom,o.options.errorTileUrl=void 0===o.options.errorTiles&&t.errorTiles||o.options.errorTiles?t.errorTileUrl:null,o.options.edgeBufferTiles=t.basemapEdgeBufferTiles,o.labels?(i.basemaps[o.name]=ps().layerGroup([xr(o.key,o.options),xr(o.labels,o.options)]),i.minimaps[o.name]=ps().layerGroup([xr(o.key,o.options),xr(o.labels,o.options)])):(i.basemaps[o.name]=xr(o.key,o.options),i.minimaps[o.name]=xr(o.key,o.options))}i.basemaps[o.name].mmp_id=o.id,i.minimaps[o.name].mmp_id=o.id}var s=Object.keys(i.basemaps);if(s.length){var r=s[0];for(e=0;e<s.length;e++){var a=s[e];if(i.basemaps[a].mmp_id===t.basemapDefault){r=a;break}}i.basemaps[r].addTo(i.map)}i.fire("basemapsloaded",i.basemaps)},this.loadOverlays=function(){var t=i.settings;Object.keys(i.overlays).forEach(function(t){i.map.removeLayer(i.overlays[t])}),i.overlays={};for(var e=0;e<t.overlays.length;e++){var o=t.overlays[e];if(o.options.bounds&&"string"==typeof o.options.bounds){var n=Rr(o.options.bounds);o.options.rasterTiles?o.options.bounds=[i.map.unproject(ps().point(n[0][1],n[0][0]),o.options.maxNativeZoom),i.map.unproject(ps().point(n[1][1],n[1][0]),o.options.maxNativeZoom)]:o.options.bounds=n}o.options.minZoom=t.minZoom,o.options.maxZoom=t.maxZoom,o.options.errorTileUrl=void 0===o.options.errorTiles||o.options.errorTiles?t.errorTileUrl:null,o.options.edgeBufferTiles=t.basemapEdgeBufferTiles,o.wms?i.overlays[o.name]=ps().tileLayer.wms(o.url,o.options):i.overlays[o.name]=ps().tileLayer(o.url,o.options),-1!==t.overlaysActive.indexOf(o.id)&&i.overlays[o.name].addTo(i.map)}i.fire("overlaysloaded",i.overlays)},this.loadResources=function(){var t=i.settings;return i.groups={},i.groups[i.id]={active:!0}
43,Object.keys(t.filtersDetails).forEach(function(e){i.groups[e]={active:t.filtersDetails[e].active}}),Promise.all([i.getMarkers(),i.getGeoJson(),i.getGpx()])},this.getMarkers=function(){var t=i.settings,e=[];return t.filtersAllMarkers||(e.push(i.id),Object.keys(t.filtersDetails).forEach(function(t){e.push(t)})),new Promise(function(o,n){Vr({type:"POST",url:mmpVars.ajaxurl,data:{action:"mmp_map_markers",type:i.type,id:e,custom:i.customMarkers,lang:mmpVars.language}}).then(function(e){(e=Hr(e))instanceof Error?n(e):e.success||n(new Error(e.data)),i.addMarkers(e.data),"map"!==i.type&&"custom"!==i.type||!t.list?(i.drawMarkers(),o()):i.getList({highlight:i.highlight.id||!1}).then(function(){o()}).catch(function(t){n(t)})}).catch(function(t){i.logError("Error loading markers ("+t.message+")"),n(t)})})},this.addMarkers=function(t){var e=i.settings;i.markers={},i.tooltip={direction:e.tooltipDirection,permanent:e.tooltipPermanent,sticky:e.tooltipSticky,opacity:e.tooltipOpacity,className:"mmp-marker-tooltip"},i.popup={minWidth:e.popupMinWidth,maxWidth:e.popupMaxWidth,maxHeight:e.popupMaxHeight,autoPan:!e.popupCenterOnMap,closeButton:e.popupCloseButton,autoClose:e.popupAutoClose},ps().geoJSON(t,{pointToLayer:function(t,i){return ps().marker(i,{icon:ps().icon({iconUrl:t.properties.icon?mmpVars.iconsUrl+t.properties.icon:mmpVars.pluginUrl+"images/leaflet/marker.png",iconSize:e.iconSize,iconAnchor:e.iconAnchor,popupAnchor:e.popupAnchor,className:"mmp-marker-icon mmp-marker-icon-"+t.properties.id}),opacity:e.markerOpacity,zIndexOffset:t.properties.zIndexOffset||0})},onEachFeature:function(t,o){var n=t.properties;n.name&&(i.tooltips[n.id]=n.name,!e.tooltip||!e.tooltipPermanent&&ps().Browser.mobile||o.bindTooltip(i.tooltips[n.id],i.tooltip)),n.link?(o.on("click",function(){i.openLink(this.feature.properties.link,this.feature.properties.blank)}),o.on("keypress",function(t){"Enter"===t.key&&i.openLink(this.feature.properties.link,this.feature.properties.blank)})):(!1!==n.popup||n.address&&e.popupAddress||e.popupCoordinates||e.popupDirections)&&o.bindPopup("",i.popup),o.on("popupopen",i.openPopupHandler),e.popupOpenOnHover?o.on("mouseover",i.openOnHoverHandler):o.off("mouseover",i.openOnHoverHandler),i.markers[n.id]=o}}),i.fire("markersloaded",i.markers)},this.drawMarkers=function(t){t=t||i.getActiveMarkers();var e=i.settings;"function"==typeof i.markerGroup.remove&&i.markerGroup.remove(),i.markerGroup={},e.clustering?i.markerGroup=ps().markerClusterGroup({showCoverageOnHover:e.showCoverageOnHover,disableClusteringAtZoom:e.disableClusteringAtZoom||null,maxClusterRadius:e.maxClusterRadius,singleMarkerMode:e.singleMarkerMode,spiderfyDistanceMultiplier:e.spiderfyDistanceMultiplier,spiderfyOnEveryZoom:e.spiderfyOnEveryZoom,chunkedLoading:!1}):i.markerGroup=ps().featureGroup(),i.markerGroup.addTo(i.map);for(var o=0;o<t.length;o++)i.markerGroup.hasLayer(t[o])||i.markerGroup.addLayer(t[o])},this.getGeoJson=function(){var t=[i.id];return!i.settings.filtersAllMarkers&&i.settings.filtersGeoJson&&Object.keys(i.settings.filtersDetails).forEach(function(e){t.push(e)}),new Promise(function(e,o){Vr({type:"POST",url:mmpVars.ajaxurl,data:{action:"mmp_map_geojson",type:i.type,id:t,lang:mmpVars.language}}
43).then(function(t){(t=Hr(t))instanceof Error?o(t):t.success||o(new Error(t.data)),i.addGeoJson(t.data),e()}).catch(function(t){i.logError("Error loading GeoJSON ("+t.message+")"),o(t)})})},this.parseGeoJson=function(t){return ps().geoJSON(t,{pointToLayer:function(t,e){if(t.properties.radius)return ps().circle(e,t.properties.radius)},style:function(t){if(!t.properties)return{};var e={};return Object.keys(t.properties).forEach(function(i){switch(i){case"weight":e[i]=parseInt(t.properties[i]);break;case"opacity":case"fillOpacity":e[i]=parseFloat(t.properties[i]);break;default:e[i]=t.properties[i]}}),e},onEachFeature:function(t,e){e.options.popup&&e.bindPopup("",i.popup),e.on("popupopen",i.openPopupHandler)}})},this.addGeoJson=function(t){"function"==typeof i.geoJsonGroup.remove&&i.geoJsonGroup.remove(),i.geoJson={},i.geoJsonGroup={},i.geoJson[i.id]=ps().geoJSON(),t&&(Object.keys(t).forEach(function(e){void 0===t[e].features?i.geoJson[e]=ps().geoJSON():i.geoJson[e]=i.parseGeoJson(t[e])}),i.drawGeoJson(),i.fire("geojsonloaded",i.geoJson))},this.drawGeoJson=function(){"function"==typeof i.geoJsonGroup.remove&&i.geoJsonGroup.remove(),i.geoJsonGroup=ps().featureGroup(),i.geoJsonGroup.addTo(i.map),Object.keys(i.groups).forEach(function(t){i.groups[t].active&&void 0!==i.geoJson[t]&&i.geoJsonGroup.addLayer(i.geoJson[t])})},this.getPopups=function(t){return new Promise(function(e,o){Vr({type:"POST",url:mmpVars.ajaxurl,data:{action:"mmp_marker_popups",id:t,lang:mmpVars.language}}
43).then(function(t){(t=Hr(t))instanceof Error?o(t):t.success||o(new Error(t.data));for(var n=t.data,s=0;s<n.length;s++){var r=n[s];i.markers[r.id].feature.properties.popup=r.popup}e()}).catch(function(t){i.logError("Error retrieving popups ("+t.message+")"),o(t)})})},this.getList=function(t){t=t||{};var e=i.settings;if(("map"===i.type||"custom"===i.type)&&e.list){for(var o=["page","term","sort","order","lat","lng","zoom","radius","fitVisible","filterBonds","highlight"],n=0;n<o.length;n++){var s=o[n];void 0!==t[s]&&(i.list[s]=t[s])}var r=[];return"map"===i.type?e.filtersAllMarkers||Object.keys(i.groups).forEach(function(t){"and"===e.filtersLogic&&t===i.id||i.groups[t].active&&r.push(t)}):r=i.customMarkers,new Promise(function(t,o){Vr({type:"POST",url:mmpVars.ajaxurl,data:{action:"mmp_map_marker_list",type:i.type,id:r,logic:e.filtersLogic,term:i.list.term||"",sort:i.list.sort,order:i.list.order,custom:e.listOrderByCustomIds,lat:i.list.lat||"",lng:i.list.lng||"",radius:"imperial"===e.listDistanceUnit||"imperial-metric"===e.listDistanceUnit?1609.344*i.list.radius:1e3*i.list.radius,lang:mmpVars.language}}
43).then(function(e){(e=Hr(e))instanceof Error?o(e):e.success||o(new Error(e.data)),i.list.results=[];for(var n=0;n<e.data.length;n++)void 0!==i.markers[e.data[n]]&&i.list.results.push(i.markers[e.data[n]]);i.updateMarkerAndCircle(),i.showList(),i.drawMarkers(i.list.results),!i.list.filterBounds&&i.list.fitVisible&&(i.fitVisibleMarkers(),i.list.fitVisible=!1),t()}).catch(function(t){i.logError("Error retrieving marker list ("+t.message+")"),o(t)})})}},this.showList=function(){var t,e=i.settings,o=(t=i.list.filterBounds?i.list.results.filter(function(t){return i.map.getBounds().contains(t.getLatLng())}):i.list.results).length>e.listLimit?e.listLimit:t.length,n=Math.ceil(t.length/e.listLimit);if(i.list.highlight){var s=t.findIndex(function(t){return t.feature.properties.id==i.list.highlight});-1!==s?i.list.page=Math.ceil((s+1)/e.listLimit):i.list.highlight=null}i.list.page=i.list.page>n?n:i.list.page,i.list.page<=0&&(i.list.page=1);for(var r=i.list.page===n?t.length:o*i.list.page,a=[],l=(i.list.page-1)*o;l<r;l++)null===t[l].feature.properties.popup&&a.push(t[l].feature.properties.id);a.length?i.getPopups(a).then(function(){i.renderList(t)}).catch(function(){}):i.renderList(t)},this.renderList=function(t){var e=i.settings;i.containers.listBody.innerHTML="";var o=t.length>e.listLimit?e.listLimit:t.length,n=Math.ceil(t.length/e.listLimit);i.list.page=i.list.page>n?n:i.list.page,i.list.page<=0&&(i.list.page=1);for(var s=i.list.page===n?t.length:o*i.list.page,r=(i.list.page-1)*o;r<s;r++){var a=ps().DomUtil.create("div","mmp-list-row",i.containers.listBody);if(a.id="mmp-list-row-"+t[r].feature.properties.id,e.listIcon){var l=ps().DomUtil.create("div","mmp-list-row-icon",a),h=ps().DomUtil.create("div","mmp-list-icon",l),c=ps().DomUtil.create("img",null,h);t[r].feature.properties.icon?c.src=mmpVars.iconsUrl+t[r].feature.properties.icon:c.src=mmpVars.pluginUrl+"images/leaflet/marker.png",c.style.width=e.iconSize[0]+"px",c.style.height=e.iconSize[1]+"px"}var u=ps().DomUtil.create("div","mmp-list-row-info",a),p=ps().DomUtil.create("div","mmp-list-row-header",u);if(e.listName||e.listDate)var d=ps().DomUtil.create("div","mmp-list-row-header-left",p);if(e.listName){var m=ps().DomUtil.create("div","mmp-list-name",d);m.innerHTML=t[r].feature.properties.name,"none"!==e.listAction&&(m.tabIndex=0,function(o){var n=i.containers.main.getBoundingClientRect().top<0,s=!1;"setviewzoom"===e.listAction||"popupzoom"===e.listAction?s=!0:"setviewsetzoom"!==e.listAction&&"popupsetzoom"!==e.listAction||(s="set");var r="popup"===e.listAction||"popupzoom"===e.listAction||"popupsetzoom"===e.listAction;ps().DomEvent.on(m,"click",function(){i.highlightMarker(t[o],n,s,r)}),ps().DomEvent.on(m,"keypress",function(e){"Enter"===e.key&&i.highlightMarker(t[o],n,s,r)})}(r))}if(e.listDate){var f=ps().DomUtil.create("div","mmp-list-date",d),g=e.listDatePrefix?mmpL10n.list.publish+": ":"",_=e.listDatePrefix?mmpL10n.list.modified+": ":"";"published"===e.listDateType?"date"===e.listDateFormat?f.innerHTML=g+t[r].feature.properties.published_local_date:"time"===e.listDateFormat?f.innerHTML=g+t[r].feature.properties.published_local_time:f.innerHTML=g+t[r].feature.properties.published_local_date+" "+t[r].feature.properties.published_local_time:"updated"===e.listDateType?"date"===e.listDateFormat?f.innerHTML=_+t[r].feature.properties.modified_local_date:"time"===e.listDateFormat?f.innerHTML=_+t[r].feature.properties.modified_local_time:f.innerHTML=_+t[r].feature.properties.modified_local_date+" "+t[r].feature.properties.modified_local_time:"date"===e.listDateFormat?f.innerHTML=g+t[r].feature.properties.published_local_date+"<br />"+_+t[r].feature.properties.modified_local_date:"time"===e.listDateFormat?f.innerHTML=g+t[r].feature.properties.published_local_time+"<br />"+_+t[r].feature.properties.modified_local_time:f.innerHTML=g+t[r].feature.properties.published_local_date+" "+t[r].feature.properties.published_local_time+"<br />"+_+t[r].feature.properties.modified_local_date+" "+t[r].feature.properties.modified_local_time}var y=ps().DomUtil.create("div","mmp-list-row-header-right",p),v=ps().DomUtil.create("div","mmp-list-api",y);if(t[r].feature.properties.edit&&i.addApiLink(i.getApiLink("editMarker",t[r].feature.properties.id),mmpL10n.api.editMarker,"mmp-api-icon-edit",v),e.listDir){var b=i.getDirectionsLink(e.directionsProvider,t[r].getLatLng().lat,t[r].getLatLng().lng,t[r].feature.properties.address);i.addApiLink(b,mmpL10n.api.dir,"mmp-api-icon-directions",v)}e.apiFullscreen&&e.listFs&&i.addApiLink(i.getApiLink("fs",i.id,{marker:t[r].feature.properties.id}),mmpL10n.api.fs,"mmp-api-icon-fullscreen",v),e.listShare&&i.addShareLink(t[r].feature.properties.id,v);var x=ps().DomUtil.create("div","mmp-list-row-body",u);if(e.listPopup&&t[r].feature.properties.popup)ps().DomUtil.create("div","mmp-list-popup",x).innerHTML=t[r].feature.properties.popup;var L=ps().DomUtil.create("div","mmp-list-row-footer",u);if(e.listAddress&&t[r].feature.properties.address)ps().DomUtil.create("span","mmp-list-address",L).innerHTML=t[r].feature.properties.address;if(e.listCoordinates){var w=ps().DomUtil.create("span","mmp-list-coordinates",L);t[r].feature.properties.address&&e.listAddress?w.innerHTML+=" ("+t[r].getLatLng().lat+", "+t[r].getLatLng().lng+")":w.innerHTML+=t[r].getLatLng().lat+", "+t[r].getLatLng().lng}if(e.listDistance&&null!==i.list.lat&&null!==i.list.lng){var k=ps().latLng(i.list.lat,i.list.lng),M=t[r].getLatLng(),C=ps().latLng(k).distanceTo(M),T=ps().DomUtil.create("div","mmp-list-distance",v);"imperial"===e.listDistanceUnit?T.innerHTML=(C/1609.344).toFixed(e.listDistancePrecision)+" mi":"metric-imperial"===e.listDistanceUnit?T.innerHTML=(C/1e3).toFixed(e.listDistancePrecision)+" km ("+(C/1609.344).toFixed(e.listDistancePrecision)+" mi)":"imperial-metric"===e.listDistanceUnit?T.innerHTML=(C/1609.344).toFixed(e.listDistancePrecision)+" mi ("+(C/1e3).toFixed(e.listDistancePrecision)+" km)":T.innerHTML=(C/1e3).toFixed(e.listDistancePrecision)+" km"}}if(i.list.highlight){var P=document.getElementById("mmp-list-row-"+i.list.highlight);P&&(i.containers.listBody.scrollTop=P.offsetTop-i.containers.listBody.offsetTop),i.list.highlight=null}i.containers.listFooter.innerHTML="";var S=ps().DomUtil.create("div","mmp-list-count",i.containers.listFooter);if(0===t.length?S.innerHTML=mmpL10n.list.noResults:1===t.length?S.innerHTML=mmpL10n.list.oneResult:S.innerHTML=t.length+" "+mmpL10n.list.results,t.length>e.listLimit){var A=ps().DomUtil.create("div","mmp-list-nav",i.containers.listFooter),O=ps().DomUtil.create("button",null,A);O.innerHTML="&laquo;",O.addEventListener("click",function(){i.list.page=1,i.showList(t)});var E=ps().DomUtil.create("button",null,A);E.innerHTML="&lsaquo;",E.addEventListener("click",function(){i.list.page=1===i.list.page?1:i.list.page-1,i.showList(t)});var D=ps().DomUtil.create("button",null,A);
43D.innerHTML="&rsaquo;",D.addEventListener("click",function(){i.list.page=i.list.page===n?n:i.list.page+1,i.showList(t)});var I=ps().DomUtil.create("button",null,A);I.innerHTML="&raquo;",I.addEventListener("click",function(){i.list.page=n,i.showList(t)});var z=ps().DomUtil.create("div","mmp-list-page",i.containers.listFooter),B=ps().DomUtil.create("input",null,z);B.type="search",B.value=i.list.page,z.appendChild(document.createTextNode(" / "+n)),z.addEventListener("keyup",function(e){"Enter"===e.key&&(i.list.page=Math.abs(parseInt(B.value)),i.showList(t))})}i.fire("listupdated",i.map)},this.updateMarkerAndCircle=function(){var t=i.settings;if("function"==typeof i.list.marker.remove&&(i.list.marker.remove(),i.list.marker={}),"function"==typeof i.list.circle.remove&&(i.list.circle.remove(),i.list.circle={}),null!==i.list.lat&&null!==i.list.lng){var e=ps().latLng([i.list.lat,i.list.lng]);if(t.listGeocodingShowMarker&&(i.list.marker=ps().marker(e,{icon:ps().icon({iconUrl:t.listGeocodingMarkerIcon?mmpVars.iconsUrl+t.listGeocodingMarkerIcon:mmpVars.pluginUrl+"images/leaflet/pin.png",iconSize:t.iconSize,iconAnchor:t.iconAnchor,popupAnchor:t.popupAnchor})}
43).addTo(i.map)),i.list.radius<=0)i.list.zoom?i.map.setView(e,i.list.zoom):i.map.panTo(e);else{var o=i.list.radius;"imperial"===t.listDistanceUnit||"imperial-metric"===t.listDistanceUnit?o*=1609.344:o*=1e3,t.listGeocodingDrawCircle&&(i.list.circle=ps().circle(e,{interactive:!1,radius:o,stroke:t.listGeocodingStroke,color:t.listGeocodingColor,weight:t.listGeocodingWeight,fill:t.listGeocodingFill,fillColor:t.listGeocodingFillColor,fillOpacity:t.listGeocodingFillOpacity}).addTo(i.map)),i.map.fitBounds(e.toBounds(2*o))}i.list.zoom=null}},this.loadControls=function(){var t=i.settings;if(void 0!==i.controls.locate&&i.controls.locate.stop(),Object.keys(i.controls).forEach(function(t){i.controls[t].remove()}),i.controls={},"hidden"!==t.geocodingControlPosition&&"none"!==t.geocodingProvider){var e=null;t.geocodingControlShowMarker&&(e=ps().icon({iconUrl:t.geocodingControlMarkerIcon?mmpVars.iconsUrl+t.geocodingControlMarkerIcon:mmpVars.pluginUrl+"images/leaflet/pin.png",iconSize:t.iconSize,iconAnchor:t.iconAnchor,popupAnchor:t.popupAnchor})),i.controls.geocoding=ps().control.mmpGeocoding({mmp:i,collapsed:"collapsed"===t.geocodingControlCollapsed||"collapsed-mobile"===t.geocodingControlCollapsed&&ps().Browser.mobile,position:t.geocodingControlPosition,provider:t.geocodingProvider,typingDelay:t.geocodingTypingDelay,minChars:t.geocodingMinChars,icon:e,titleText:mmpL10n.control.geocodingTitle,errorText:mmpL10n.control.geocodingError}),i.controls.geocoding.mmpIndex=t.geocodingControlIndex}if("hidden"!==t.zoomControlPosition&&(i.controls.zoom=ps().control.zoom({position:t.zoomControlPosition,zoomInTitle:mmpL10n.control.zoomIn,zoomOutTitle:mmpL10n.control.zoomOut}),i.controls.zoom.mmpIndex=t.zoomControlIndex),"hidden"!==t.fullscreenPosition&&(i.controls.fullscreen=ps().control.fullscreen({position:t.fullscreenPosition,title:{false:mmpL10n.control.fullscreenFalse,true:mmpL10n.control.fullscreenTrue}}),i.controls.fullscreen.mmpIndex=t.fullscreenIndex),"hidden"!==t.resetPosition&&(i.controls.reset=ps().control.resetView({position:t.resetPosition,onDemand:t.resetOnDemand,title:mmpL10n.control.reset}),i.controls.reset.mmpIndex=t.resetIndex),"hidden"!==t.locatePosition&&(i.controls.locate=new zr({locateOptions:{enableHighAccuracy:!0},position:t.locatePosition,drawCircle:t.locateDrawCircle,drawMarker:t.locateDrawMarker,setView:t.locateSetView,keepCurrentZoomLevel:t.locateKeepCurrentZoomLevel,clickBehavior:{inView:t.locateClickBehaviorInView,outOfView:t.locateClickBehaviorOutOfView},icon:"icon-pin",iconLoading:"icon-spinner",metric:t.locateMetric,showPopup:t.locateShowPopup,strings:{title:mmpL10n.control.locateTitle,metersUnit:mmpL10n.control.locateMetersUnit,feetUnit:mmpL10n.control.locateFeetUnit,popup:mmpL10n.control.locatePopup,outsideMapBoundsMsg:mmpL10n.control.locateOutsideMapBoundsMsg},onLocationError:function(t){var e=mmpL10n.control.locateErrorUnknown;1===t.code?e=mmpL10n.control.locateErrorDenied:2===t.code?e=mmpL10n.control.locateErrorUnavailable:3===t.code&&(e=mmpL10n.control.locateErrorTimeout),i.showMapModal(mmpL10n.control.locateError,e)},onLocationOutsideMapBounds:function(t){t.stop(),i.showMapModal(mmpL10n.control.locateError,t.options.strings.outsideMapBoundsMsg)}}),i.controls.locate.mmpIndex=t.locateIndex),"hidden"!==t.measurePosition&&(i.controls.measure=ps().control.polylineMeasure({position:t.measurePosition,unit:"imperial"===t.measureUnit?"landmiles":"metres",showBearings:t.measureShowBearings,distanceShowSameUnit:!1,clearMeasurementsOnStop:t.measureClearMeasurementsOnStop,showClearControl:t.measureShowClearControl,showUnitControl:t.measureShowUnitControl,measureControlTitleOn:mmpL10n.control.measureOn,measureControlTitleOff:mmpL10n.control.measureOff,bearingTextIn:mmpL10n.control.measureIn,bearingTextOut:mmpL10n.control.measureOut,clearControlTitle:mmpL10n.control.measureClear,unitControlTitle:{text:mmpL10n.control.measureChangeUnits,metres:mmpL10n.control.measureMeters,landmiles:mmpL10n.control.measureMiles,nauticalmiles:mmpL10n.control.measureNauticalMiles},tooltipTextFinish:mmpL10n.control.measureFinish+"<br />
43",tooltipTextDelete:mmpL10n.control.measureDelete,tooltipTextMove:mmpL10n.control.measureMove+"<br />",tooltipTextResume:"<br />"+mmpL10n.control.measureResume,tooltipTextAdd:mmpL10n.control.measureAdd}),i.controls.measure.mmpIndex=t.measureIndex),"hidden"!==t.scalePosition&&(i.controls.scale=ps().control.scale({position:t.scalePosition,maxWidth:t.scaleMaxWidth,metric:t.scaleMetric,imperial:t.scaleImperial}),i.controls.scale.mmpIndex=t.scaleIndex),"hidden"!==t.layersPosition&&(Object.keys(i.basemaps).length>1||Object.keys(i.overlays).length)&&(i.controls.layers=ps().control.layers(null,null,{position:t.layersPosition,collapsed:"collapsed"===t.layersCollapsed||"collapsed-mobile"===t.layersCollapsed&&ps().Browser.mobile}),Object.keys(i.basemaps).forEach(function(t){i.controls.layers.addBaseLayer(i.basemaps[t],t)}),Object.keys(i.overlays).forEach(function(t){i.controls.layers.addOverlay(i.overlays[t],t)}),i.controls.layers.mmpIndex=t.layersIndex),"hidden"!==t.filtersPosition&&"map"===i.type&&Object.keys(t.filtersDetails).length&&!t.filtersAllMarkers&&(i.controls.filters=ps().control.filters({mmp:i,position:t.filtersPosition,collapsed:"collapsed"===t.filtersCollapsed||"collapsed-mobile"===t.filtersCollapsed&&ps().Browser.mobile,buttons:t.filtersButtons,allText:mmpL10n.control.filtersAll,noneText:mmpL10n.control.filtersNone}),i.controls.filters.mmpIndex=t.filtersIndex),"hidden"!==t.gpxControlPosition&&void 0!==i.gpx.tracks&&i.gpx.tracks.length>1&&(i.controls.gpx=ps().control.gpx({mmp:i,collapsed:"collapsed"===t.gpxControlCollapsed||"collapsed-mobile"===t.gpxControlCollapsed&&ps().Browser.mobile,position:t.gpxControlPosition}),i.controls.gpx.mmpIndex=t.gpxControlIndex),"hidden"!==t.minimapPosition&&Object.keys(i.minimaps).length){var o=ps().tileLayer("");Object.keys(i.basemaps).forEach(function(t){i.map.hasLayer(i.basemaps[t])&&(o=i.minimaps[t])}),i.controls.minimap=new(ps().Control.MiniMap)(o,{position:t.minimapPosition,width:t.minimapWidth,height:t.minimapHeight,collapsedWidth:t.minimapCollapsedWidth,collapsedHeight:t.minimapCollapsedHeight,zoomLevelOffset:t.minimapZoomLevelOffset,zoomLevelFixed:t.minimapZoomLevelFixed||null,toggleDisplay:!0,autoToggleDisplay:!1,minimized:"collapsed"===t.minimapMinimized||"collapsed-mobile"===t.minimapMinimized&&ps().Browser.mobile,strings:{hideText:mmpL10n.control.minimapHideText,showText:mmpL10n.control.minimapShowText},mapOptions:{attributionControl:!1}}),i.controls.minimap.mmpIndex=t.minimapIndex}var n=[];Object.keys(i.controls).forEach(function(t){n.push(i.controls[t])}),n.sort(function(t,e){return t.mmpIndex-e.mmpIndex});for(var s=0;s<n.length;s++)n[s].addTo(i.map);Object.keys(i.basemaps).forEach(function(t){var e=i.basemaps[t];i.map.hasLayer(e)&&(e instanceof ps().TileLayer.HERE?e._attributionBBoxes&&(e._attributionText="",e._findCopyrightBBox()):e instanceof ps().TileLayer.TomTom?e._addAttribution():e instanceof br&&er._updateMapAttribution({target:i.map}))}),void 0!==i.controls.minimap?i.map.on("baselayerchange",i.updateMinimapHandler):i.map.off("baselayerchange",i.updateMinimapHandler),void 0!==i.controls.locate?(i.map.on("locationfound",i.updateLocationHandler),i.map.on("locatedeactivate",i.locateDeactivateHandler),!i.settings.locateAutostart||i.highlight.id||i.fitMarkers||i.controls.locate.start()):(i.map.off("locationfound",i.updateLocationHandler),i.map.off("locatedeactivate",i.locateDeactivateHandler)),i.fire("controlsloaded",i.controls)},this.getGpx=function(){var t=i.settings;return t.gpxUrl?new Promise(function(o){Vr({type:"GET",url:Gr(t.gpxUrl)}).then(function(t){if(i.gpx=new e,i.gpx.parse(t),!i.gpx.tracks.length){for(var n=0;n<i.gpx.routes.length;n++){var s=i.gpx.routes[n];s.segments=[{points:s.points,extensions:s.extensions,time:s.time,distance:s.distance,elevation:s.elevation}],i.gpx.tracks.push(s)}i.gpx.routes=[]}i.addGpx(),o()}).catch(function(t){i.logError("Error loading GPX ("+t.message+")"),i.showMapModal(mmpL10n.gpx.loadingError,mmpL10n.gpx.loadingErrorMsg),o()})}):Promise.resolve()},this.addGpx=function(){var t=i.settings;if(void 0!==i.gpxGroup&&"function"==typeof i.gpxGroup.remove&&i.gpxGroup.remove(),i.gpxGroup=ps().featureGroup(),i.gpxTracks={},i.map._activeTrack=0,void 0!==i.gpx.tracks&&i.gpx.tracks.length){for(var e=[],o=0;o<i.gpx.tracks.length;o++)for(var n=i.gpx.tracks[o],s=0;s<n.segments.length;s++){var r=n.segments[s];e[o]=ps().polyline([],{interactive:!0,smoothFactor:t.gpxTrackSmoothFactor,color:n.extensions.color||r.extensions.color||t.gpxTrackColor,weight:parseInt(n.extensions.weight||r.extensions.weight||t.gpxTrackWeight),opacity:parseFloat(n.extensions.opacity||r.extensions.opacity||t.gpxTrackOpacity)});for(var a=0;a<r.points.length;a++){var l=r.points[a].lat,h=r.points[a].lon;e[o].addLatLng([l,h])}e[o].addTo(i.gpxGroup)}i.gpxTracks=e}i.setTrackIcons(),i.setIntervalMarkers(),i.setTrackMeta(),i.setWaypoints(),i.gpxGroup.addTo(i.map),i.fire("gpxloaded",i.gpxTracks),i.loadChart(),i.addElevationChart()},this.getGpxName=function(t){return!(void 0===i.gpx.tracks[t]||!i.gpx.tracks[t].name)&&i.gpx.tracks[t].name},this.getGpxStartTime=function(t){return!(void 0===i.gpx.tracks[t]||!i.gpx.tracks[t].time.start)&&new Date(i.gpx.tracks[t].time.start).toUTCString()},this.getGpxEndTime=function(t){return!(void 0===i.gpx.tracks[t]||!i.gpx.tracks[t].time.end)&&new Date(i.gpx.tracks[t].time.end).toUTCString()},this.getGpxTimeTotal=function(t,e){return!(void 0===i.gpx.tracks[t]||!i.gpx.tracks[t].time.total)&&Ur(i.gpx.tracks[t].time.total,e)},this.getGpxTimeMoving=function(t,e){return!(void 0===i.gpx.tracks[t]||!i.gpx.tracks[t].time.moving)&&Ur(i.gpx.tracks[t].time.moving,e)},this.getGpxDistance=function(t,e){if(e=e||"metric",void 0===i.gpx.tracks[t]||!i.gpx.tracks[t].distance.total)return!1;switch(e){case"imperial":return(i.gpx.tracks[t].distance.total/1609.344).toFixed(2)+" mi";case"metric-imperial":return(i.gpx.tracks[t].distance.total/1e3).toFixed(2)+" km ("+(i.gpx.tracks[t].distance.total/1609.344).toFixed(2)+" mi)";case"imperial-metric":return(i.gpx.tracks[t].distance.total/1609.344).toFixed(2)+" mi ("+(i.gpx.tracks[t].distance.total/1e3).toFixed(2)+" km)";default:return(i.gpx.tracks[t].distance.total/1e3).toFixed(2)+" km"}}
43,this.getGpxPace=function(t,e,o){if(e=e||"metric",void 0===i.gpx.tracks[t]||!i.gpx.tracks[t].time.moving||!i.gpx.tracks[t].distance.total)return!1;switch(e){case"imperial":return Ur(i.gpx.tracks[t].time.moving/(i.gpx.tracks[t].distance.total/1609.344),o)+"/mi";case"metric-imperial":return Ur(i.gpx.tracks[t].time.moving/(i.gpx.tracks[t].distance.total/1e3),o)+"/km ("+Ur(i.gpx.tracks[t].time.moving/(i.gpx.tracks[t].distance.total/1609.344),o)+"/mi)";case"imperial-metric":return Ur(i.gpx.tracks[t].time.moving/(i.gpx.tracks[t].distance.total/1609.344),o)+"/mi ("+Ur(i.gpx.tracks[t].time.moving/(i.gpx.tracks[t].distance.total/1e3),o)+"/km)";default:return Ur(i.gpx.tracks[t].time.moving/(i.gpx.tracks[t].distance.total/1e3),o)+"/km"}},this.getGpxHeartRate=function(t){return!(void 0===i.gpx.tracks[t]||!i.gpx.tracks[t].heartRate.avg)&&i.gpx.tracks[t].heartRate.avg.toFixed(0)+" bpm"},this.getGpxElevation=function(t,e){if(e=e||"metric",void 0===i.gpx.tracks[t]||!i.gpx.tracks[t].elevation.gain&&!i.gpx.tracks[t].elevation.loss)return!1;var o=i.gpx.tracks[t].elevation.gain-i.gpx.tracks[t].elevation.loss;switch(e){case"imperial":return"+"+(i.gpx.tracks[t].elevation.gain/.3048).toFixed(0)+" ft -"+(i.gpx.tracks[t].elevation.loss/.3048).toFixed(0)+" ft &Delta; "+(o/.3048).toFixed(0)+" ft";case"metric-imperial":return"+"+i.gpx.tracks[t].elevation.gain.toFixed(0)+" m -"+i.gpx.tracks[t].elevation.loss.toFixed(0)+" m &Delta; "+o.toFixed(0)+" m (+"+(i.gpx.tracks[t].elevation.gain/.3048).toFixed(0)+" ft -"+(i.gpx.tracks[t].elevation.loss/.3048).toFixed(0)+" ft &Delta; "+(o/.3048).toFixed(0)+" ft)";case"imperial-metric":return"+"+(i.gpx.tracks[t].elevation.gain/.3048).toFixed(0)+" ft -"+(i.gpx.tracks[t].elevation.loss/.3048).toFixed(0)+" ft &Delta; "+(o/.3048).toFixed(0)+" ft (+"+i.gpx.tracks[t].elevation.gain.toFixed(0)+" m -"+i.gpx.tracks[t].elevation.loss.toFixed(0)+" m &Delta; "+o.toFixed(0)+" m)";default:return"+"+i.gpx.tracks[t].elevation.gain.toFixed(0)+" m -"+i.gpx.tracks[t].elevation.loss.toFixed(0)+" m &Delta; "+o.toFixed(0)+" m"}},this.setTrackStyle=function(){var t=i.settings;
43Object.keys(i.gpxTracks).forEach(function(e){i.gpxTracks[e].setStyle({color:t.gpxTrackColor,weight:t.gpxTrackWeight,opacity:t.gpxTrackOpacity})})},this.setTrackIcons=function(){var t=i.settings;void 0!==i.gpx.tracks&&Object.keys(i.gpx.tracks).forEach(function(e){if(void 0!==i.gpx.tracks[e].startIcon&&i.gpx.tracks[e].startIcon&&i.gpx.tracks[e].startIcon.remove(),void 0!==i.gpx.tracks[e].endIcon&&i.gpx.tracks[e].endIcon&&i.gpx.tracks[e].endIcon.remove(),t.gpxShowStartIcon&&(i.gpx.tracks[e].startIcon=ps().marker([i.gpx.tracks[e].points[0].lat,i.gpx.tracks[e].points[0].lon],{interactive:!1,icon:ps().icon({iconUrl:t.gpxStartIcon?mmpVars.iconsUrl+t.gpxStartIcon:mmpVars.pluginUrl+"images/leaflet/gpx-start.png",iconSize:t.iconSize,iconAnchor:t.iconAnchor,popupAnchor:t.popupAnchor,className:"mmp-gpx-icon mmp-gpx-icon-start"})}).addTo(i.gpxGroup)),t.gpxShowEndIcon){var o=i.gpx.tracks[e].points.length-1;i.gpx.tracks[e].endIcon=ps().marker([i.gpx.tracks[e].points[o].lat,i.gpx.tracks[e].points[o].lon],{interactive:!1,icon:ps().icon({iconUrl:t.gpxEndIcon?mmpVars.iconsUrl+t.gpxEndIcon:mmpVars.pluginUrl+"images/leaflet/gpx-end.png",iconSize:t.iconSize,iconAnchor:t.iconAnchor,popupAnchor:t.popupAnchor,className:"mmp-gpx-icon mmp-gpx-icon-end"})}).addTo(i.gpxGroup)}})},this.setIntervalMarkers=function(){var t=i.settings;
43if(void 0!==i.gpx.tracks&&(Object.keys(i.gpx.tracks).forEach(function(t){if(void 0!==i.gpx.tracks[t].intervalMarkers&&i.gpx.tracks[t].intervalMarkers.length)for(var e=i.gpx.tracks[t].intervalMarkers,o=0;o<e.length;o++)e[o].remove()}),t.gpxIntervalMarkers))for(var e="imperial"===t.gpxMetaUnits||"imperial-metric"===t.gpxMetaUnits?1609.344:1e3,o=i.gpx.tracks,n=0;n<o.length;n++){o[n].intervalMarkers=[];for(var s=1,r=o[n].points,a=0;a<r.length;a++){var l=r[a];if(l.dist>=s*e){var h=ps().marker([l.lat,l.lon],{interactive:!1,icon:ps().divIcon({className:"mmp-interval-marker",html:"<span>"+s+"</span>"})}).addTo(i.map);o[n].intervalMarkers.push(h),s++}}}},this.setTrackMeta=function(){var t=i.settings;Object.keys(i.gpxTracks).forEach(function(e){if(!t.gpxMeta)return i.gpxTracks[e].closePopup(),void i.gpxTracks[e].unbindPopup();for(var o=ps().DomUtil.create("div","mmp-gpx-meta"),n=[{show:t.gpxMetaName,title:mmpL10n.gpx.metaName,value:i.getGpxName(e)},{show:t.gpxMetaStart,title:mmpL10n.gpx.metaStart,value:i.getGpxStartTime(e)},{show:t.gpxMetaEnd,title:mmpL10n.gpx.metaEnd,value:i.getGpxEndTime(e)},{show:t.gpxMetaTotal,title:mmpL10n.gpx.metaTotal,value:i.getGpxTimeTotal(e)},{show:t.gpxMetaMoving,title:mmpL10n.gpx.metaMoving,value:i.getGpxTimeMoving(e)},{show:t.gpxMetaDistance,title:mmpL10n.gpx.metaDistance,value:i.getGpxDistance(e,t.gpxMetaUnits)},{show:t.gpxMetaPace,title:mmpL10n.gpx.metaPace,value:i.getGpxPace(e,t.gpxMetaUnits)},{show:t.gpxMetaHeartRate,title:mmpL10n.gpx.metaHeartRate,value:i.getGpxHeartRate(e)},{show:t.gpxMetaElevation,title:mmpL10n.gpx.metaElevation,value:i.getGpxElevation(e,t.gpxMetaUnits)}],s=0;s<n.length;s++)!n[s].show||t.gpxMetaHideMissing&&!1===n[s].value||(!1===n[s].value&&(n[s].value="N/A"),o.innerHTML+="<strong>"+n[s].title+":</strong> "+n[s].value+"<br />");t.gpxMetaDownload&&(o.innerHTML+='<a href="'+mmpVars.baseUrl+"index.php?mapsmarkerpro=download_gpx&url="+i.settings.gpxUrl+'"><img src="'+mmpVars.pluginUrl+'images/icons/download-gpx.png" /> '+mmpL10n.gpx.metaDownload+"</a><br />"),t.gpxMetaDesc&&i.gpx.tracks[e].desc&&(o.innerHTML&&(o.innerHTML+="<br />"),o.innerHTML+=i.gpx.tracks[e].desc),void 0!==i.gpxTracks[e].getPopup()&&i.gpxTracks[e].getPopup()?i.gpxTracks[e].setPopupContent(o):i.gpxTracks[e].bindPopup(o)})},this.setWaypoints=function(){var t,e=i.settings;for(t=0;t<i.gpxWaypoints.length;t++)i.gpxWaypoints[t].remove();if(i.gpxWaypoints=[],e.gpxWaypoints&&void 0!==i.gpx.waypoints)for(t=0;t<i.gpx.waypoints.length;t++){var o=ps().circleMarker([i.gpx.waypoints[t].lat,i.gpx.waypoints[t].lon],{interactive:!0,radius:e.gpxWaypointsRadius,stroke:e.gpxWaypointsStroke,color:e.gpxWaypointsColor,weight:e.gpxWaypointsWeight,fillColor:e.gpxWaypointsFillColor,fillOpacity:e.gpxWaypointsFillOpacity}).addTo(i.gpxGroup);if(i.gpx.waypoints[t].name&&o.bindTooltip(i.gpx.waypoints[t].name,{className:"mmp-waypoint-tooltip"}),i.gpx.waypoints[t].desc){var n=ps().DomUtil.create("div","mmp-gpx-waypoint");n.innerHTML=i.gpx.waypoints[t].desc,o.bindPopup(n)}i.gpxWaypoints.push(o)}},this.setWaypointStyle=function(){for(var t=i.settings,e=0;e<i.gpxWaypoints.length;e++)i.gpxWaypoints[e].setStyle({radius:t.gpxWaypointsRadius,stroke:t.gpxWaypointsStroke,color:t.gpxWaypointsColor,weight:t.gpxWaypointsWeight,fillColor:t.gpxWaypointsFillColor,fillOpacity:t.gpxWaypointsFillOpacity})},this.generateChartData=function(){var t,e;"imperial"===i.settings.gpxChartUnits||"imperial-metric"===i.settings.gpxChartUnits?(t=1609.433,e=.3048):(t=1e3,e=1);var o=isNaN(parseFloat(i.settings.gpxChartYOffset))?0:parseFloat(i.settings.gpxChartYOffset);return i.gpx.tracks[i.map._activeTrack].points.map(function(i){return{x:i.dist/t,y:i.ele/e+o}})},this.updateElevationChart=function(t){var e=i.settings;if(i.gpxChart instanceof fn){if(t){var o=i.generateChartData();i.gpxChart.data.datasets[0].data=o,i.gpxChart.options.scales.x.max=o[o.length-1].x}i.gpxChart.data.datasets[0].borderWidth=e.gpxChartLineWidth,i.gpxChart.data.datasets[0].borderColor=e.gpxChartLineColor,i.gpxChart.data.datasets[0].fill=!!e.gpxChartFill&&"origin",i.gpxChart.data.datasets[0].backgroundColor=e.gpxChartFillColor,i.gpxChart.options.scales.y.grid.color=e.gpxChartGridLinesColor,i.gpxChart.options.scales.y.min=isNaN(parseInt(e.gpxChartYMin))?void 0:parseInt(e.gpxChartYMin),i.gpxChart.options.scales.y.max=isNaN(parseInt(e.gpxChartYMax))?void 0:parseInt(e.gpxChartYMax),i.gpxChart.options.scales.y.reverse=e.gpxChartReverseY,i.gpxChart.options.scales.y.ticks.color=e.gpxChartTicksFontColor,i.gpxChart.options.scales.x.grid.color=e.gpxChartGridLinesColor,i.gpxChart.options.scales.x.reverse=e.gpxChartReverseX,i.gpxChart.options.scales.x.ticks.color=e.gpxChartTicksFontColor,i.gpxChart.options.chartArea.backgroundColor=e.gpxChartBgColor,i.gpxChart.options.plugins.tooltip.backgroundColor=e.gpxChartTooltipBgColor,i.gpxChart.options.plugins.tooltip.bodyColor=e.gpxChartTooltipFontColor,i.gpxChart.options.indicator.lineWidth=e.gpxChartIndicatorLineWidth,i.gpxChart.options.indicator.lineColor=e.gpxChartIndicatorLineColor,
43i.gpxChart.update()}},this.updateElevationChartThrottled=ps().Util.throttle(i.updateElevationChart,100,this),this.addElevationChart=function(){var t=i.settings;if(i.settings.gpxChart&&void 0!==i.gpx.tracks&&i.gpx.tracks.length){void 0===i.containers.chartWrap&&i.loadChart();var e=i.generateChartData(),o=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),ta(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&na(t,e)}(e,t),i=e,o=[{key:"draw",value:function(){var t,i,o,n,s;(t=e,i="draw",o=this,s=ia(oa(1&(n=3)?t.prototype:t),i,o),2&n&&"function"==typeof s?function(t){return s.apply(o,t)}:s)([arguments]);var r=this.chart.config.options.mmp;if(this.chart.tooltip&&this.chart.tooltip._active&&this.chart.tooltip._active.length&&void 0!==this.chart.scales.y){var a=this.chart.ctx,l=r.map._activeTrack,h=this.chart.tooltip.dataPoints[0],c=h.dataIndex,u=h.element.x,p=this.chart.scales.y.top,d=this.chart.scales.y.bottom;this.chart.config.options.indicator&&this.chart.config.options.indicator.lineWidth&&this.chart.config.options.indicator.lineColor&&(a.save(),a.beginPath(),a.moveTo(u,p),a.lineTo(u,d),a.lineWidth=this.chart.config.options.indicator.lineWidth,a.strokeStyle=this.chart.config.options.indicator.lineColor,a.stroke(),a.restore()),r.settings.gpxChartLocator&&void 0!==r.chartLayers.locator&&(r.chartLayers.locator.setLatLng([r.gpx.tracks[l].points[c].lat,r.gpx.tracks[l].points[c].lon]),r.map.hasLayer(r.chartLayers.locator)||r.chartLayers.locator.addTo(r.map))}else void 0!==r.chartLayers.locator&&r.map.hasLayer(r.chartLayers.locator)&&r.chartLayers.locator.remove()}}],o&&Xr(i.prototype,o),n&&Xr(i,n),Object.defineProperty(i,"prototype",{writable:!1}),i;var i,o,n}(ji);o.id="scatterIndicator",o.defaults=ji.defaults,fn.register(Tn,Mn,ji,cs,o,Vn,rs),i.gpxChart=new fn("mmp-gpx-chart-"+i.uid,{plugins:[{beforeDraw:function(t){if(t.config.options.chartArea&&t.config.options.chartArea.backgroundColor){var e=t.ctx,i=t.chartArea;e.save(),e.fillStyle=t.config.options.chartArea.backgroundColor,e.fillRect(i.left,i.top,i.right-i.left,i.bottom-i.top),e.restore()}}},{afterDraw:function(t){if(!t.data.datasets[0].data.filter(function(t){return!isNaN(t.y)}).length){var e=t.ctx,i=t.width,o=t.height;t.clear(),e.save(),e.fillStyle="rgba(0, 0, 0, 1)",e.textAlign="center",e.textBaseline="middle",e.fillText(mmpL10n.gpx.noElevationData,i/2,o/2),e.restore()}}}],type:"scatterIndicator",data:{datasets:[{data:e,pointRadius:0,showLine:!0,spanGaps:!0,lineTension:t.gpxChartLineTension,borderCapStyle:"round",borderWidth:t.gpxChartLineWidth,borderColor:t.gpxChartLineColor,fill:!!t.gpxChartFill&&"origin",backgroundColor:t.gpxChartFillColor}]},options:{responsive:!0,maintainAspectRatio:!1,animation:{duration:0},layout:{padding:{top:10}},scales:{x:{grid:{color:t.gpxChartGridLinesColor},ticks:{callback:function(e){return jr(e,!0,t.gpxChartUnits)},autoSkip:!1,color:t.gpxChartTicksFontColor},min:0,max:e[e.length-1].x,reverse:t.gpxChartReverseX},y:{grid:{color:t.gpxChartGridLinesColor},ticks:{callback:function(e){return jr(e,!1,t.gpxChartUnits)},color:t.gpxChartTicksFontColor},min:isNaN(parseInt(t.gpxChartYMin))?void 0:parseInt(t.gpxChartYMin),max:isNaN(parseInt(t.gpxChartYMax))?void 0:parseInt(t.gpxChartYMax),reverse:t.gpxChartReverseY}},chartArea:{backgroundColor:t.gpxChartBgColor},plugins:{legend:{display:!1},tooltip:{callbacks:{label:function(e){var i=e.dataIndex,o=e.dataset.data[i].y,n=e.dataset.data[i].x;return[mmpL10n.gpx.metaElevation+": "+jr(o,!1,t.gpxChartUnits),mmpL10n.gpx.metaDistance+": "+jr(n,!0,t.gpxChartUnits)]}},animation:{duration:250},mode:"index",intersect:!1,displayColors:!1,backgroundColor:t.gpxChartTooltipBgColor,bodyColor:t.gpxChartTooltipFontColor}},indicator:{lineWidth:t.gpxChartIndicatorLineWidth,lineColor:t.gpxChartIndicatorLineColor},mmp:i}}
43),void 0!==i.chartLayers&&Object.keys(i.chartLayers).forEach(function(t){i.chartLayers[t].remove()}),i.chartLayers={},i.chartLayers.locator=ps().circleMarker([0,0]),i.setChartStyle()}},this.setChartStyle=function(){var t=i.settings;t.gpxChart&&void 0!==i.chartLayers&&(Object.keys(i.chartLayers).forEach(function(t){i.chartLayers[t].remove()}),i.chartLayers.locator.setStyle({interactive:!1,radius:t.gpxChartLocatorRadius,stroke:t.gpxChartLocatorStroke,color:t.gpxChartLocatorColor,weight:t.gpxChartLocatorWeight,fillColor:t.gpxChartLocatorFillColor,fillOpacity:t.gpxChartLocatorFillOpacity}))},this.fitVisibleMarkers=function(t){var e=i.markerGroup.getBounds();e.isValid()&&("function"==typeof t&&i.map.once("moveend",t),i.map.fitBounds(e,{padding:[10,10]}))},this.fitGpxTrack=function(t,e){var o=null;(o=void 0!==i.gpxTracks[t]?i.gpxTracks[t].getBounds():i.gpxGroup.getBounds()).isValid()&&("function"==typeof e&&i.map.once("moveend",e),i.map.fitBounds(o,{padding:[10,10]}))},this.fitGeoJson=function(t){var e=i.geoJson[i.id].getLayer(t);if(void 0!==e){var o=e.getBounds();o.isValid()&&i.map.fitBounds(o,{padding:[10,10]})}},this.deferredLoadHandler=function(t,e){t.forEach(function(t){if("childList"===t.type&&t.addedNodes.length)for(var o=0;o<t.addedNodes.length;o++){if(t.addedNodes[o].id==="maps-marker-pro-"+i.uid)return e.disconnect(),void i.main()}})},this.lazyLoadHandler=function(t,e){for(var o=0;o<t.length;o++){var n=t[o];if(n.target===i.containers.main&&n.isIntersecting)return e.disconnect(),void i.load()}},this.lazyLoadHandlerFallback=function(){if(!(Fr(i.containers.main)&&(t=i.containers.main,e=t.getBoundingClientRect(),o=window.innerHeight||document.documentElement.clientHeight,n=window.innerWidth||document.documentElement.clientWidth,e.left<=n&&e.right>
43=0&&e.top<=o&&e.bottom>=0)))return setTimeout(i.lazyLoadHandlerFallback,250);var t,e,o,n;i.load()},this.visibilityDetectionHandler=function(t){for(var e=0;e<t.length;e++){t[e].target===i.containers.main&&i.checkInvalidateSize()}},this.visibilityDetectionHandlerFallback=function(){i.checkInvalidateSize(),setTimeout(i.visibilityDetectionHandlerFallback,250)},this.openPopupHandler=function(t){var e=i.settings,o=t.target.getPopup();void 0!==o&&i.loadPopup(t.target).then(function(){i.checkPopupSize(o),e.popupCenterOnMap&&i.centerPopup(o),i.fire("popupopen",o)}).catch(function(){})},this.openOnHoverHandler=function(t){t.target.openPopup()},this.updateListHandler=function(){i.getList()},this.updateMinimapHandler=function(t){i.controls.minimap.changeLayer(i.minimaps[t.name])},this.updateLocationHandler=function(t){if(!i.list.located){i.list.located=!0;var e=document.getElementById("list-address-"+i.uid);e&&(e.value="",e.dispatchEvent(new Event("keyup"))),i.getList({lat:t.latitude,lng:t.longitude})}},this.locateDeactivateHandler=function(){i.list.located&&(i.list.located=!1,i.getList({lat:null,lng:null}))},this.main()}sa.callbacks=[],sa.init=function(){Object.keys(window.mapsMarkerPro).forEac
43h(function(t){window.mapsMarkerPro[t]instanceof sa||(window.mapsMarkerPro[t]=new sa(window.mapsMarkerPro[t]))})};var ra=sa;window.MapsMarkerPro=ra}()}();

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