1!function(i){var n={};function r(t){if(n[t])return n[t].exports;var e=n[t]={i:t,l:!1,exports:{}};return i[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}r.m=i,r.c=n,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(i,n,function(t){return e[t]}.bind(null,n));return i},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=44)}([function(t,e,i){ 2/* @preserve 3 * Leaflet 1.6.0, a JS library for interactive maps. http://leafletjs.com 4 * (c) 2010-2019 Vladimir Agafonkin, (c) 2010-2011 CloudMade 5 */ 6!function(t){"use strict";var e="1.6.0",i=Object.freeze;function l(t){var e,i,n,r;for(i=1,n=arguments.length;i<n;i++){r=arguments[i];for(e in r){t[e]=r[e]}}return t}Object.freeze=function(t){return t};var o=Object.create||function(){function e(){}return function(t){e.prototype=t;return new e}}();function s(t,e){var i=Array.prototype.slice;if(t.bind){return t.bind.apply(t,i.call(arguments,1))}var n=i.call(arguments,2);return function(){return t.apply(e,n.length?n.concat(i.call(arguments)):arguments)}}var n=0;function u(t){t._leaflet_id=t._leaflet_id||++n;return t._leaflet_id}function r(t,e,i){var n,r,o,a;a=function(){n=false;if(r){o.apply(i,r);r=false}};o=function(){if(n){r=arguments}else{t.apply(i,arguments);setTimeout(a,e);n=true}};return o}function a(t,e,i){var n=e[1],r=e[0],o=n-r;return t===n&&i?t:((t-r)%o+o)%o+r}function h(){return false}function c(t,e){var i=Math.pow(10,e===undefined?6:e);return Math.round(t*i)/i}function d(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function p(t){return d(t).split(/\s+/)}function f(t,e){if(!t.hasOwnProperty("options")){t.options=t.options?o(t.options):{}}for(var i in e){t.options[i]=e[i]}return t.options}function m(t,e,i){var n=[];for(var r in t){n.push(encodeURIComponent(i?r.toUpperCase():r)+"="+encodeURIComponent(t[r]))}return(!e||e.indexOf("?")===-1?"?":"&")+n.join("&")}var g=/\{ *([\w_-]+) *\}/g;function v(t,n){return t.replace(g,function(t,e){var i=n[e];if(i===undefined){throw new Error("No value provided for variable "+t)}else if(typeof i==="function"){i=i(n)}return i})}var _=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"};function y(t,e){for(var i=0;i<t.length;i++){if(t[i]===e){return i}}return-1}var x="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function b(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var w=0;function k(t){var e=+new Date,i=Math.max(0,16-(e-w));w=e+i;return window.setTimeout(t,i)}var M=window.requestAnimationFrame||b("RequestAnimationFrame")||k,C=window.cancelAnimationFrame||b("CancelAnimationFrame")||b("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function T(t,e,i){if(i&&M===k){t.call(e)}else{return M.call(window,s(t,e))}}function P(t){if(t){C.call(window,t)}}var S=(Object.freeze||Object)({freeze:i,extend:l,create:o,bind:s,lastId:n,stamp:u,throttle:r,wrapNum:a,falseFn:h,formatNum:c,trim:d,splitWords:p,setOptions:f,getParamString:m,template:v,isArray:_,indexOf:y,emptyImageUrl:x,requestFn:M,cancelFn:C,requestAnimFrame:T,cancelAnimFrame:P});function A(){}function I(t){if(typeof L==="undefined"||!L||!L.Mixin){return}t=_(t)?t:[t];for(var e=0;e<t.length;
6e++){if(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)}}}A.extend=function(t){var e=function(){if(this.initialize){this.initialize.apply(this,arguments)}this.callInitHooks()};var i=e.__super__=this.prototype;var n=o(i);n.constructor=e;e.prototype=n;for(var r in this){if(this.hasOwnProperty(r)&&r!=="prototype"&&r!=="__super__"){e[r]=this[r]}}if(t.statics){l(e,t.statics);delete t.statics}if(t.includes){I(t.includes);l.apply(null,[n].concat(t.includes));delete t.includes}if(n.options){t.options=l(o(n.options),t.options)}l(n,t);n._initHooks=[];n.callInitHooks=function(){if(this._initHooksCalled){return}if(i.callInitHooks){i.callInitHooks.call(this)}this._initHooksCalled=true;for(var t=0,e=n._initHooks.length;t<e;t++){n._initHooks[t].call(this)}};return e},A.include=function(t){l(this.prototype,t);return this},A.mergeOptions=function(t){l(this.prototype.options,t);return this},A.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1);var i=typeof t==="function"?t:function(){this[t].apply(this,e)};this.prototype._initHooks=this.prototype._initHooks||[];this.prototype._initHooks.push(i);return this};var D={on:function(t,e,i){if(typeof t==="object"){for(var n in t){this._on(n,t[n],e)}}else{t=p(t);for(var r=0,o=t.length;r<o;r++){this._on(t[r],e,i)}}return this},off:function(t,e,i){if(!t){delete this._events}else if(typeof t==="object"){for(var n in t){this._off(n,t[n],e)}}else{t=p(t);for(var r=0,o=t.length;r<o;r++){this._off(t[r],e,i)}}return this},_on:function(t,e,i){this._events=this._events||{};var n=this._events[t];if(!n){n=[];this._events[t]=n}if(i===this){i=undefined}var r={fn:e,ctx:i},o=n;for(var a=0,s=o.length;a<s;a++){if(o[a].fn===e&&o[a].ctx===i){return}}o.push(r)},_off:function(t,e,i){var n,r,o;if(!this._events){return}n=this._events[t];if(!n){return}if(!e){for(r=0,o=n.length;r<o;r++){n[r].fn=h}delete this._events[t];return}if(i===this){i=undefined}if(n){for(r=0,o=n.length;r<o;r++){var a=n[r];if(a.ctx!==i){continue}if(a.fn===e){a.fn=h;if(this._firingCount){this._events[t]=n=n.slice()}n.splice(r,1);return}}}},fire:function(t,e,i){if(!this.listens(t,i)){return this}var n=l({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var r=this._events[t];if(r){this._firingCount=this._firingCount+1||1;for(var o=0,a=r.length;o<a;o++){var s=r[o];s.fn.call(s.ctx||this,n)}this._firingCount--}}if(i){this._propagateEvent(n)}return this},listens:function(t,e){var i=this._events&&this._events[t];if(i&&i.length){return true}if(e){for(var n in this._eventParents){if(this._eventParents[n].listens(t,e)){return true}}}return false},once:function(t,e,i){if(typeof t==="object"){for(var n in t){this.once(n,t[n],e)}return this}var r=s(function(){this.off(t,e,i).off(t,r,i)},this);return this.on(t,e,i).on(t,r,i)},addEventParent:function(t){this._eventParents=this._eventParents||{};this._eventParents[u(t)]=t;return this},removeEventParent:function(t){if(this._eventParents){delete this._eventParents[u(t)]}return this},_propagateEvent:function(t){for(var e in this._eventParents){this._eventParents[e].fire(t.type,l({layer:t.target,propagatedFrom:t.target},t),true)}}};D.addEventListener=D.on,D.removeEventListener=D.clearAllEventListeners=D.off,D.addOneTimeEventListener=D.once,D.fireEvent=D.fire,D.hasEventListeners=D.listens;var O=A.extend(D);function z(t,e,i){this.x=i?Math.round(t):t;this.y=i?Math.round(e):e}var E=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function B(t,e,i){if(t instanceof z){return t}if(_(t)){return new z(t[0],t[1])}if(t===undefined||t===null){return t}if(typeof t==="object"&&"x"in t&&"y"in t){return new z(t.x,t.y)}return new z(t,e,i)}function F(t,e){if(!t){return}var i=e?[t,e]:t;for(var n=0,r=i.length;n<r;n++){this.extend(i[n])}}function R(t,e){if(!t||t instanceof F){return t}return new F(t,e)}function N(t,e){if(!t){return}var i=e?[t,e]:t;for(var n=0,r=i.length;n<r;n++){this.extend(i[n])}}function U(t,e){if(t instanceof N){return t}return new N(t,e)}
6function Z(t,e,i){if(isNaN(t)||isNaN(e)){throw new Error("Invalid LatLng object: ("+t+", "+e+")")}this.lat=+t;this.lng=+e;if(i!==undefined){this.alt=+i}}function j(t,e,i){if(t instanceof Z){return t}if(_(t)&&typeof t[0]!=="object"){if(t.length===3){return new Z(t[0],t[1],t[2])}if(t.length===2){return new Z(t[0],t[1])}return null}if(t===undefined||t===null){return t}if(typeof t==="object"&&"lat"in t){return new Z(t.lat,"lng"in t?t.lng:t.lon,t.alt)}if(e===undefined){return null}return new Z(t,e,i)}z.prototype={clone:function(){return new z(this.x,this.y)},add:function(t){return this.clone()._add(B(t))},_add:function(t){this.x+=t.x;this.y+=t.y;return this},subtract:function(t){return this.clone()._subtract(B(t))},_subtract:function(t){this.x-=t.x;this.y-=t.y;return this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){this.x/=t;this.y/=t;return this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){this.x*=t;this.y*=t;return this},scaleBy:function(t){return new z(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new z(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this},floor:function(){return this.clone()._floor()},_floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this},ceil:function(){return this.clone()._ceil()},_ceil:function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this},trunc:function(){return this.clone()._trunc()},_trunc:function(){this.x=E(this.x);this.y=E(this.y);return this},distanceTo:function(t){t=B(t);var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){t=B(t);return t.x===this.x&&t.y===this.y},contains:function(t){t=B(t);return 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)+")"}},F.prototype={extend:function(t){t=B(t);if(!this.min&&!this.max){this.min=t.clone();this.max=t.clone()}else{this.min.x=Math.min(t.x,this.min.x);this.max.x=Math.max(t.x,this.max.x);this.min.y=Math.min(t.y,this.min.y);this.max.y=Math.max(t.y,this.max.y)}return this},getCenter:function(t){return new z((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new z(this.min.x,this.max.y)},getTopRight:function(){return new 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;if(typeof t[0]==="number"||t instanceof z){t=B(t)}else{t=R(t)}if(t instanceof F){e=t.min;i=t.max}else{e=i=t}return e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=R(t);var e=this.min,i=this.max,n=t.min,r=t.max,o=r.x>=e.x&&n.x<=i.x,a=r.y>=e.y&&n.y<=i.y;return o&&a},overlaps:function(t){t=R(t);var e=this.min,i=this.max,n=t.min,r=t.max,o=r.x>e.x&&n.x<i.x,a=r.y>e.y&&n.y<i.y;return o&&a},isValid:function(){return!!(this.min&&this.max)}},N.prototype={extend:function(t){var e=this._southWest,i=this._northEast,n,r;if(t instanceof Z){n=t;r=t}else if(t instanceof N){n=t._southWest;r=t._northEast;if(!n||!r){return this}}else{return t?this.extend(j(t)||U(t)):this}if(!e&&!i){this._southWest=new Z(n.lat,n.lng);this._northEast=new Z(r.lat,r.lng)}else{e.lat=Math.min(n.lat,e.lat);e.lng=Math.min(n.lng,e.lng);i.lat=Math.max(r.lat,i.lat);i.lng=Math.max(r.lng,i.lng)}return this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,r=Math.abs(e.lng-i.lng)*t;return new N(new Z(e.lat-n,e.lng-r),new Z(i.lat+n,i.lng+r))},getCenter:function(){return new Z((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new Z(this.getNorth(),this.getWest())},getSouthEast:function(){return new Z(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat}
6,getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){if(typeof t[0]==="number"||t instanceof Z||"lat"in t){t=j(t)}else{t=U(t)}var e=this._southWest,i=this._northEast,n,r;if(t instanceof N){n=t.getSouthWest();r=t.getNorthEast()}else{n=r=t}return n.lat>=e.lat&&r.lat<=i.lat&&n.lng>=e.lng&&r.lng<=i.lng},intersects:function(t){t=U(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),r=t.getNorthEast(),o=r.lat>=e.lat&&n.lat<=i.lat,a=r.lng>=e.lng&&n.lng<=i.lng;return o&&a},overlaps:function(t){t=U(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),r=t.getNorthEast(),o=r.lat>e.lat&&n.lat<i.lat,a=r.lng>e.lng&&n.lng<i.lng;return o&&a},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){if(!t){return false}t=U(t);return this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e)},isValid:function(){return!!(this._southWest&&this._northEast)}},Z.prototype={equals:function(t,e){if(!t){return false}t=j(t);var i=Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng));return i<=(e===undefined?1e-9:e)},toString:function(t){return"LatLng("+c(this.lat,t)+", "+c(this.lng,t)+")"},distanceTo:function(t){return H.distance(this,j(t))},wrap:function(){return H.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,i=e/Math.cos(Math.PI/180*this.lat);return U([this.lat-e,this.lng-i],[this.lat+e,this.lng+i])},clone:function(){return new Z(this.lat,this.lng,this.alt)}};var W={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},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),n=this.transformation.transform(e.min,i),r=this.transformation.transform(e.max,i);return new F(n,r)},infinite:false,wrapLatLng:function(t){var e=this.wrapLng?a(t.lng,this.wrapLng,true):t.lng,i=this.wrapLat?a(t.lat,this.wrapLat,true):t.lat,n=t.alt;return new Z(i,e,n)},wrapLatLngBounds:function(t){var e=t.getCenter(),i=this.wrapLatLng(e),n=e.lat-i.lat,r=e.lng-i.lng;if(n===0&&r===0){return t}
6var o=t.getSouthWest(),a=t.getNorthEast(),s=new Z(o.lat-n,o.lng-r),l=new Z(a.lat-n,a.lng-r);return new N(s,l)}},H=l({},W,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var i=Math.PI/180,n=t.lat*i,r=e.lat*i,o=Math.sin((e.lat-t.lat)*i/2),a=Math.sin((e.lng-t.lng)*i/2),s=o*o+Math.cos(n)*Math.cos(r)*a*a,l=2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s));return this.R*l}}),G=6378137,V={R:G,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),r=Math.sin(n*e);return new z(this.R*t.lng*e,this.R*Math.log((1+r)/(1-r))/2)},unproject:function(t){var e=180/Math.PI;return new Z((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:function(){var t=G*Math.PI;return new F([-t,-t],[t,t])}()};function q(t,e,i,n){if(_(t)){this._a=t[0];this._b=t[1];this._c=t[2];this._d=t[3];return}this._a=t;this._b=e;this._c=i;this._d=n}function K(t,e,i,n){return new q(t,e,i,n)}q.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){e=e||1;t.x=e*(this._a*t.x+this._b);t.y=e*(this._c*t.y+this._d);return t},untransform:function(t,e){e=e||1;return new z((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var J=l({},H,{code:"EPSG:3857",projection:V,transformation:function(){var t=.5/(Math.PI*V.R);return K(t,.5,-t,.5)}()}),Y=l({},J,{code:"EPSG:900913"});function X(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Q(t,e){var i="",n,r,o,a,s,l;for(n=0,o=t.length;n<o;n++){s=t[n];for(r=0,a=s.length;r<a;r++){l=s[r];i+=(r?"L":"M")+l.x+" "+l.y}i+=e?At?"z":"x":""}return i||"M0 0"}var $=document.documentElement.style,tt="ActiveXObject"in window,et=tt&&!document.addEventListener,it="msLaunchUri"in navigator&&!("documentMode"in document),nt=Dt("webkit"),rt=Dt("android"),ot=Dt("android 2")||Dt("android 3"),at=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),st=rt&&Dt("Google")&&at<537&&!("AudioNode"in window),lt=!!window.opera,ut=Dt("chrome"),ht=Dt("gecko")&&!nt&&!lt&&!tt,ct=!ut&&Dt("safari"),dt=Dt("phantom"),pt="OTransition"in $,ft=navigator.platform.indexOf("Win")===0,mt=tt&&"transition"in $,gt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!ot,vt="MozPerspective"in $,_t=!window.L_DISABLE_3D&&(mt||gt||vt)&&!pt&&!dt,yt=typeof orientation!=="undefined"||Dt("mobile"),xt=yt&&nt,bt=yt&>,wt=!window.PointerEvent&&window.MSPointerEvent,kt=!nt&&!!(window.PointerEvent||wt),Lt=!window.L_NO_TOUCH&&(kt||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),Mt=yt&<,Ct=yt&&ht,Tt=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Pt=function(){var t=false;try{var e=Object.defineProperty({},"passive",{get:function(){t=true}});window.addEventListener("testPassiveEventSupport",h,e);window.removeEventListener("testPassiveEventSupport",h,e)}catch(t){}return t},St=function(){return!!document.createElement("canvas").getContext}(),At=!!(document.createElementNS&&X("svg").createSVGRect),It=!At&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;e.style.behavior="url(#default#VML)";return e&&typeof e.adj==="object"}catch(t){return false}}();function Dt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Ot=(Object.freeze||Object)({ie:tt,ielt9:et,edge:it,webkit:nt,android:rt,android23:ot,androidStock:st,opera:lt,chrome:ut,gecko:ht,safari:ct,phantom:dt,opera12:pt,win:ft,ie3d:mt,webkit3d:gt,gecko3d:vt,any3d:_t,mobile:yt,mobileWebkit:xt,mobileWebkit3d:bt,msPointer:wt,pointer:kt,touch:Lt,mobileOpera:Mt,mobileGecko:Ct,retina:Tt,passiveEvents:Pt,canvas:St,svg:At,vml:It}),zt=wt?"MSPointerDown":"pointerdown",Et=wt?"MSPointerMove":"pointermove",Bt=wt?"MSPointerUp":"pointerup",Ft=wt?"MSPointerCancel":"pointercancel",Rt=["INPUT","SELECT","OPTION"],Nt={},Ut=false,Zt=0;function jt(t,e,i,n){if(e==="touchstart"){Ht(t,i,n)}else if(e==="touchmove"){Jt(t,i,n)}else if(e==="touchend"){Yt(t,i,n)}return this}function Wt(t,e,i){var n=t["_leaflet_"+e+i];if(e==="touchstart"){t.removeEventListener(zt,n,false)}else if(e==="touchmove"){t.removeEventListener(Et,n,false)}else if(e==="touchend"){t.removeEventListener(Bt,n,false);t.removeEventListener(Ft,n,false)}return this}function Ht(t,e,i){var n=s(function(t){if(t.pointerType!=="mouse"&&t.MSPOINTER_TYPE_MOUSE&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(Rt.indexOf(t.target.tagName)<0){He(t)}else{return}}Kt(t,e)});t["_leaflet_touchstart"+i]=n;t.addEventListener(zt,n,false);
6if(!Ut){document.documentElement.addEventListener(zt,Gt,true);document.documentElement.addEventListener(Et,Vt,true);document.documentElement.addEventListener(Bt,qt,true);document.documentElement.addEventListener(Ft,qt,true);Ut=true}}function Gt(t){Nt[t.pointerId]=t;Zt++}function Vt(t){if(Nt[t.pointerId]){Nt[t.pointerId]=t}}function qt(t){delete Nt[t.pointerId];Zt--}function Kt(t,e){t.touches=[];for(var i in Nt){t.touches.push(Nt[i])}t.changedTouches=[t];e(t)}function Jt(t,e,i){var n=function(t){if((t.pointerType===t.MSPOINTER_TYPE_MOUSE||t.pointerType==="mouse")&&t.buttons===0){return}Kt(t,e)};t["_leaflet_touchmove"+i]=n;t.addEventListener(Et,n,false)}function Yt(t,e,i){var n=function(t){Kt(t,e)};t["_leaflet_touchend"+i]=n;t.addEventListener(Bt,n,false);t.addEventListener(Ft,n,false)}var Xt=wt?"MSPointerDown":kt?"pointerdown":"touchstart",Qt=wt?"MSPointerUp":kt?"pointerup":"touchend",$t="_leaflet_";function te(t,r,e){var o,a,s=false,l=250;function i(t){var e;if(kt){if(!it||t.pointerType==="mouse"){return}e=Zt}else{e=t.touches.length}if(e>1){return}var i=Date.now(),n=i-(o||i);a=t.touches?t.touches[0]:t;s=n>0&&n<=l;o=i}function n(t){if(s&&!a.cancelBubble){if(kt){if(!it||t.pointerType==="mouse"){return}var e={},i,n;for(n in a){i=a[n];e[n]=i&&i.bind?i.bind(a):i}a=e}a.type="dblclick";a.button=0;r(a);o=null}}t[$t+Xt+e]=i;t[$t+Qt+e]=n;t[$t+"dblclick"+e]=r;t.addEventListener(Xt,i,Pt?{passive:false}:false);t.addEventListener(Qt,n,Pt?{passive:false}:false);t.addEventListener("dblclick",r,false);return this}function ee(t,e){var i=t[$t+Xt+e],n=t[$t+Qt+e],r=t[$t+"dblclick"+e];t.removeEventListener(Xt,i,Pt?{passive:false}:false);t.removeEventListener(Qt,n,Pt?{passive:false}:false);if(!it){t.removeEventListener("dblclick",r,false)}return this}var ie=Le(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ne=Le(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),re=ne==="webkitTransition"||ne==="OTransition"?ne+"End":"transitionend",oe,ae,se,le,ue;function he(t){return typeof t==="string"?document.getElementById(t):t}function ce(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||i==="auto")&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return i==="auto"?null:i}function de(t,e,i){var n=document.createElement(t);n.className=e||"";if(i){i.appendChild(n)}return n}function pe(t){var e=t.parentNode;if(e){e.removeChild(t)}}function fe(t){while(t.firstChild){t.removeChild(t.firstChild)}}function me(t){var e=t.parentNode;if(e&&e.lastChild!==t){e.appendChild(t)}}function ge(t){var e=t.parentNode;if(e&&e.firstChild!==t){e.insertBefore(t,e.firstChild)}}function ve(t,e){if(t.classList!==undefined){return t.classList.contains(e)}var i=be(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function _e(t,e){if(t.classList!==undefined){var i=p(e);for(var n=0,r=i.length;n<r;n++){t.classList.add(i[n])}}else if(!ve(t,e)){var o=be(t);xe(t,(o?o+" ":"")+e)}}function ye(t,e){if(t.classList!==undefined){t.classList.remove(e)}else{xe(t,d((" "+be(t)+" ").replace(" "+e+" "," ")))}}function xe(t,e){if(t.className.baseVal===undefined){t.className=e}else{t.className.baseVal=e}}function be(t){if(t.correspondingElement){t=t.correspondingElement}return t.className.baseVal===undefined?t.className:t.className.baseVal}function we(t,e){if("opacity"in t.style){t.style.opacity=e}else if("filter"in t.style){ke(t,e)}}function ke(t,e){var i=false,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(t){if(e===1){return}}e=Math.round(e*100);if(i){i.Enabled=e!==100;i.Opacity=e}else{t.style.filter+=" progid:"+n+"(opacity="+e+")"}}function Le(t){var e=document.documentElement.style;for(var i=0;i<t.length;i++){if(t[i]in e){return t[i]}}return false}function Me(t,e,i){var n=e||new z(0,0);t.style[ie]=(mt?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(i?" scale("+i+")":"")}function Ce(t,e){t._leaflet_pos=e;if(_t){Me(t,e)}else{t.style.left=e.x+"px";t.style.top=e.y+"px"}}function Te(t){return t._leaflet_pos||new z(0,0)}if("onselectstart"in document){oe=function(){Be(window,"selectstart",He)};ae=function(){Re(window,"selectstart",He)}}else{var Pe=Le(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);oe=function(){if(Pe){var t=document.documentElement.style;se=t[Pe];t[Pe]="none"}};ae=function(){if(Pe){document.documentElement.style[Pe]=se;se=undefined}}}function Se(){Be(window,"dragstart",He)}function Ae(){Re(window,"dragstart",He)}function Ie(t){while(t.tabIndex===-1){t=t.parentNode}if(!t.style){return}De();le=t;ue=t.style.outline;t.style.outline="none";Be(window,"keydown",De)}function De(){if(!le){return}le.style.outline=ue;le=undefined;ue=undefined;Re(window,"keydown",De)}function Oe(t){do{t=t.parentNode}while((!t.offsetWidth||!t.offsetHeight)&&t!==document.body);return t}function ze(t){var e=t.getBoundingClientRect();
6return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Ee=(Object.freeze||Object)({TRANSFORM:ie,TRANSITION:ne,TRANSITION_END:re,get:he,getStyle:ce,create:de,remove:pe,empty:fe,toFront:me,toBack:ge,hasClass:ve,addClass:_e,removeClass:ye,setClass:xe,getClass:be,setOpacity:we,testProp:Le,setTransform:Me,setPosition:Ce,getPosition:Te,disableTextSelection:oe,enableTextSelection:ae,disableImageDrag:Se,enableImageDrag:Ae,preventOutline:Ie,restoreOutline:De,getSizedParentNode:Oe,getScale:ze});function Be(t,e,i,n){if(typeof e==="object"){for(var r in e){Ne(t,r,e[r],i)}}else{e=p(e);for(var o=0,a=e.length;o<a;o++){Ne(t,e[o],i,n)}}return this}var Fe="_leaflet_events";function Re(t,e,i,n){if(typeof e==="object"){for(var r in e){Ue(t,r,e[r],i)}}else if(e){e=p(e);for(var o=0,a=e.length;o<a;o++){Ue(t,e[o],i,n)}}else{for(var s in t[Fe]){Ue(t,s,t[Fe][s])}delete t[Fe]}return this}function Ne(e,t,i,n){var r=t+u(i)+(n?"_"+u(n):"");if(e[Fe]&&e[Fe][r]){return this}var o=function(t){return i.call(n||e,t||window.event)};var a=o;if(kt&&t.indexOf("touch")===0){jt(e,t,o,r)}else if(Lt&&t==="dblclick"&&te&&!(kt&&ut)){te(e,o,r)}else if("addEventListener"in e){if(t==="mousewheel"){e.addEventListener("onwheel"in e?"wheel":"mousewheel",o,Pt?{passive:false}:false)}else if(t==="mouseenter"||t==="mouseleave"){o=function(t){t=t||window.event;if($e(e,t)){a(t)}};e.addEventListener(t==="mouseenter"?"mouseover":"mouseout",o,false)}else{if(t==="click"&&rt){o=function(t){ti(t,a)}}e.addEventListener(t,o,false)}}else if("attachEvent"in e){e.attachEvent("on"+t,o)}e[Fe]=e[Fe]||{};e[Fe][r]=o}function Ue(t,e,i,n){var r=e+u(i)+(n?"_"+u(n):""),o=t[Fe]&&t[Fe][r];if(!o){return this}if(kt&&e.indexOf("touch")===0){Wt(t,e,r)}else if(Lt&&e==="dblclick"&&ee&&!(kt&&ut)){ee(t,r)}else if("removeEventListener"in t){if(e==="mousewheel"){t.removeEventListener("onwheel"in t?"wheel":"mousewheel",o,Pt?{passive:false}:false)}else{t.removeEventListener(e==="mouseenter"?"mouseover":e==="mouseleave"?"mouseout":e,o,false)}}else if("detachEvent"in t){t.detachEvent("on"+e,o)}t[Fe][r]=null}function Ze(t){if(t.stopPropagation){t.stopPropagation()}else if(t.originalEvent){t.originalEvent._stopped=true}else{t.cancelBubble=true}Qe(t);return this}function je(t){Ne(t,"mousewheel",Ze);return this}function We(t){Be(t,"mousedown touchstart dblclick",Ze);Ne(t,"click",Xe);return this}function He(t){if(t.preventDefault){t.preventDefault()}else{t.returnValue=false}return this}function Ge(t){He(t);Ze(t);return this}function Ve(t,e){if(!e){return new z(t.clientX,t.clientY)}var i=ze(e),n=i.boundingClientRect;return new z((t.clientX-n.left)/i.x-e.clientLeft,(t.clientY-n.top)/i.y-e.clientTop)}var qe=ft&&ut?2*window.devicePixelRatio:ht?window.devicePixelRatio:1;function Ke(t){return it?t.wheelDeltaY/2:t.deltaY&&t.deltaMode===0?-t.deltaY/qe:t.deltaY&&t.deltaMode===1?-t.deltaY*20:t.deltaY&&t.deltaMode===2?-t.deltaY*60:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?-t.detail*20:t.detail?t.detail/-32765*60:0}var Je={},Ye;function Xe(t){Je[t.type]=true}function Qe(t){var e=Je[t.type];Je[t.type]=false;return e}function $e(t,e){var i=e.relatedTarget;if(!i){return true}try{while(i&&i!==t){i=i.parentNode}}catch(t){return false}return i!==t}function ti(t,e){var i=t.timeStamp||t.originalEvent&&t.originalEvent.timeStamp,n=Ye&&i-Ye;if(n&&n>100&&n<500||t.target._simulatedClick&&!t._simulated){Ge(t);return}Ye=i;e(t)}var ei=(Object.freeze||Object)({on:Be,off:Re,stopPropagation:Ze,disableScrollPropagation:je,disableClickPropagation:We,preventDefault:He,stop:Ge,getMousePosition:Ve,getWheelDelta:Ke,fakeStop:Xe,skipped:Qe,isExternalTarget:$e,addListener:Be,removeListener:Re}),ii=O.extend({run:function(t,e,i,n){this.stop();this._el=t;this._inProgress=true;this._duration=i||.25;this._easeOutPower=1/Math.max(n||.5,.2);this._startPos=Te(t);this._offset=e.subtract(this._startPos);this._startTime=+new Date;this.fire("start");this._animate()},stop:function(){if(!this._inProgress){return}this._step(true);this._complete()},_animate:function(){this._animId=T(this._animate,this);this._step()},_step:function(t){var e=+new Date-this._startTime,i=this._duration*1e3;if(e<i){this._runFrame(this._easeOut(e/i),t)}else{this._runFrame(1);this._complete()}},_runFrame:function(t,e){var i=this._startPos.add(this._offset.multiplyBy(t));if(e){i._round()}Ce(this._el,i);this.fire("step")},_complete:function(){P(this._animId);this._inProgress=false;this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),ni=O.extend({options:{crs:J,center:undefined,zoom:undefined,minZoom:undefined,maxZoom:undefined,layers:[],maxBounds:undefined,renderer:undefined,zoomAnimation:true,zoomAnimationThreshold:4,fadeAnimation:true,markerZoomAnimation:true,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:true},initialize:function(t,e){e=f(this,e);this._handlers=[];this._layers={};this._zoomBoundLayers={};this._sizeChanged=true;this._initContainer(t);this._initLayout();this._onResize=s(this._onResize,this);this._initEvents();if(e.maxBounds){this.setMaxBounds(e.maxBounds)}if(e.zoom!==undefined){this._zoom=this._limitZoom(e.zoom)}if(e.center&&e.zoom!==undefined){this.setView(j(e.center),e.zoom,{reset:true})}this.callInitHooks();this._zoomAnimated=ne&&_t&&!Mt&&this.options.zoomAnimation;if(this._zoomAnimated){this._createAnimProxy();Be(this._proxy,re,this._catchTransitionEnd,this)}this._addLayers(this.options.layers)}
6,setView:function(t,e,i){e=e===undefined?this._zoom:this._limitZoom(e);t=this._limitCenter(j(t),e,this.options.maxBounds);i=i||{};this._stop();if(this._loaded&&!i.reset&&i!==true){if(i.animate!==undefined){i.zoom=l({animate:i.animate},i.zoom);i.pan=l({animate:i.animate,duration:i.duration},i.pan)}var n=this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,i.zoom):this._tryAnimatedPan(t,i.pan);if(n){clearTimeout(this._sizeTimer);return this}}this._resetView(t,e);return this},setZoom:function(t,e){if(!this._loaded){this._zoom=t;return this}return this.setView(this.getCenter(),t,{zoom:e})},zoomIn:function(t,e){t=t||(_t?this.options.zoomDelta:1);return this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){t=t||(_t?this.options.zoomDelta:1);return this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),r=this.getSize().divideBy(2),o=t instanceof z?t:this.latLngToContainerPoint(t),a=o.subtract(r).multiplyBy(1-1/n),s=this.containerPointToLatLng(r.add(a));return this.setView(s,e,{zoom:i})},_getBoundsCenterZoom:function(t,e){e=e||{};t=t.getBounds?t.getBounds():U(t);var i=B(e.paddingTopLeft||e.padding||[0,0]),n=B(e.paddingBottomRight||e.padding||[0,0]),r=this.getBoundsZoom(t,false,i.add(n));r=typeof e.maxZoom==="number"?Math.min(e.maxZoom,r):r;if(r===Infinity){return{center:t.getCenter(),zoom:r}}
6var o=n.subtract(i).divideBy(2),a=this.project(t.getSouthWest(),r),s=this.project(t.getNorthEast(),r),l=this.unproject(a.add(s).divideBy(2).add(o),r);return{center:l,zoom:r}},fitBounds:function(t,e){t=U(t);if(!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){t=B(t).round();e=e||{};if(!t.x&&!t.y){return this.fire("moveend")}if(e.animate!==true&&!this.getSize().contains(t)){this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom());return this}if(!this._panAnim){this._panAnim=new ii;this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)}if(!e.noMoveStart){this.fire("movestart")}if(e.animate!==false){_e(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(i,n,t){t=t||{};if(t.animate===false||!_t){return this.setView(i,n,t)}this._stop();var r=this.project(this.getCenter()),o=this.project(i),e=this.getSize(),a=this._zoom;i=j(i);n=n===undefined?a:n;var l=Math.max(e.x,e.y),u=l*this.getZoomScale(a,n),h=o.distanceTo(r)||1,s=1.42,c=s*s;function d(t){var e=t?-1:1,i=t?u:l,n=u*u-l*l+e*c*c*h*h,r=2*i*c*h,o=n/r,a=Math.sqrt(o*o+1)-o;var s=a<1e-9?-18:Math.log(a);return s}function p(t){return(Math.exp(t)-Math.exp(-t))/2}function f(t){return(Math.exp(t)+Math.exp(-t))/2}function m(t){return p(t)/f(t)}var g=d(0);function v(t){return l*(f(g)/f(g+s*t))}function _(t){return l*(f(g)*m(g+s*t)-p(g))/c}function y(t){return 1-Math.pow(1-t,1.5)}var x=Date.now(),b=(d(1)-g)/s,w=t.duration?1e3*t.duration:1e3*b*.8;function k(){var t=(Date.now()-x)/w,e=y(t)*b;if(t<=1){this._flyToFrame=T(k,this);this._move(this.unproject(r.add(o.subtract(r).multiplyBy(_(e)/h)),a),this.get
6ScaleZoom(l/v(e),a),{flyTo:true})}else{this._move(i,n)._moveEnd(true)}}this._moveStart(true,t.noMoveStart);k.call(this);return this},flyToBounds:function(t,e){var i=this._getBoundsCenterZoom(t,e);return this.flyTo(i.center,i.zoom,e)},setMaxBounds:function(t){t=U(t);if(!t.isValid()){this.options.maxBounds=null;return this.off("moveend",this._panInsideMaxBounds)}else if(this.options.maxBounds){this.off("moveend",this._panInsideMaxBounds)}this.options.maxBounds=t;if(this._loaded){this._panInsideMaxBounds()}return this.on("moveend",this._panInsideMaxBounds)},setMinZoom:function(t){var e=this.options.minZoom;this.options.minZoom=t;if(this._loaded&&e!==t){this.fire("zoomlevelschange");if(this.getZoom()<this.options.minZoom){return this.setZoom(t)}}return this},setMaxZoom:function(t){var e=this.options.maxZoom;this.options.maxZoom=t;if(this._loaded&&e!==t){this.fire("zoomlevelschange");if(this.getZoom()>this.options.maxZoom){return this.setZoom(t)}}return this},panInsideBounds:function(t,e){this._enforcingBounds=true;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,U(t));if(!i.equals(n)){this.panTo(n,e)}this._enforcingBounds=false;return this},panInside:function(t,e){e=e||{};var i=B(e.paddingTopLeft||e.padding||[0,0]),n=B(e.paddingBottomRight||e.padding||[0,0]),r=this.getCenter(),o=this.project(r),a=this.project(t),s=this.getPixelBounds(),l=s.getSize().divideBy(2),u=R([s.min.add(i),s.max.subtract(n)]);if(!u.contains(a)){this._enforcingBounds=true;var h=o.subtract(a),c=B(a.x+h.x,a.y+h.y);if(a.x<u.min.x||a.x>u.max.x){c.x=o.x-h.x;if(h.x>0){c.x+=l.x-i.x}else{c.x-=l.x-n.x}}if(a.y<u.min.y||a.y>u.max.y){c.y=o.y-h.y;if(h.y>0){c.y+=l.y-i.y}else{c.y-=l.y-n.y}}this.panTo(this.unproject(c),e);this._enforcingBounds=false}return this},invalidateSize:function(t){if(!this._loaded){return this}t=l({animate:false,pan:true},t===true?{animate:true}:t);var e=this.getSize();this._sizeChanged=true;this._lastCenter=null;var i=this.getSize(),n=e.divideBy(2).round(),r=i.divideBy(2).round(),o=n.subtract(r);if(!o.x&&!o.y){return this}if(t.animate&&t.pan){this.panBy(o)}else{if(t.pan){this._rawPanBy(o)}this.fire("move");if(t.debounceMoveend){clearTimeout(this._sizeTimer);this._sizeTimer=setTimeout(s(this.fire,this,"moveend"),200)}else{this.fire("moveend")}}return this.fire("resize",{oldSize:e,newSize:i})},stop:function(){this.setZoom(this._limitZoom(this._zoom));if(!this.options.zoomSnap){this.fire("viewreset")}return this._stop()},locate:function(t){t=this._locateOptions=l({timeout:1e4,watch:false},t);if(!("geolocation"in navigator)){this._handleGeolocationError({code:0,message:"Geolocation not supported."});return this}var e=s(this._handleGeolocationResponse,this),i=s(this._handleGeolocationError,this);if(t.watch){this._locationWatchId=navigator.geolocation.watchPosition(e,i,t)}else{navigator.geolocation.getCurrentPosition(e,i,t)}return this},stopLocate:function(){if(navigator.geolocation&&navigator.geolocation.clearWatch){navigator.geolocation.clearWatch(this._locationWatchId)}if(this._locateOptions){this._locateOptions.setView=false}return this},_handleGeolocationError:function(t){var e=t.code,i=t.message||(e===1?"permission denied":e===2?"position unavailable":"timeout");if(this._locateOptions.setView&&!this._loaded){this.fitWorld()}this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})},_handleGeolocationResponse:function(t){var e=t.coords.latitude,i=t.coords.longitude,n=new Z(e,i),r=n.toBounds(t.coords.accuracy*2),o=this._locateOptions;if(o.setView){var a=this.getBoundsZoom(r);this.setView(n,o.maxZoom?Math.min(a,o.maxZoom):a)}var s={latlng:n,bounds:r,timestamp:t.timestamp};for(var l in t.coords){if(typeof t.coords[l]==="number"){s[l]=t.coords[l]}}this.fire("locationfound",s)},addHandler:function(t,e){if(!e){return this}var i=this[t]=new e(this);this._handlers.push(i);if(this.options[t]){i.enable()}return this},remove:function(){this._initEvents(true);if(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=undefined;this._containerId=undefined}if(this._locationWatchId!==undefined){this.stopLocate()}this._stop();pe(this._mapPane);if(this._clearControlPos){this._clearControlPos()}if(this._resizeRequest){P(this._resizeRequest);this._resizeRequest=null}this._clearHandlers();if(this._loaded){this.fire("unload")}var t;for(t in this._layers){this._layers[t].remove()}for(t in this._panes){pe(this._panes[t])}this._layers=[];this._panes=[];delete this._mapPane;delete this._renderer;return this},createPane:function(t,e){var i="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),n=de("div",i,e||this._mapPane);if(t){this._panes[t]=n}return n},getCenter:function(){this._checkIfLoaded();if(this._lastCenter&&!this._moved()){return this._lastCenter}return this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new N(e,i)},getMinZoom:function(){return this.options.minZoom===undefined?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===undefined?this._layersMaxZo
6om===undefined?Infinity:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=U(t);i=B(i||[0,0]);var n=this.getZoom()||0,r=this.getMinZoom(),o=this.getMaxZoom(),a=t.getNorthWest(),s=t.getSouthEast(),l=this.getSize().subtract(i),u=R(this.project(s,n),this.project(a,n)).getSize(),h=_t?this.options.zoomSnap:1,c=l.x/u.x,d=l.y/u.y,p=e?Math.max(c,d):Math.min(c,d);n=this.getScaleZoom(p,n);if(h){n=Math.round(n/(h/100))*(h/100);n=e?Math.ceil(n/h)*h:Math.floor(n/h)*h}return Math.max(r,Math.min(o,n))},getSize:function(){if(!this._size||this._sizeChanged){this._size=new z(this._container.clientWidth||0,this._container.clientHeight||0);this._sizeChanged=false}return this._size.clone()},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new F(i,i.add(this.getSize()))},getPixelOrigin:function(){this._checkIfLoaded();return this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(t===undefined?this.getZoom():t)},getPane:function(t){return typeof t==="string"?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;e=e===undefined?this._zoom:e;return i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=e===undefined?this._zoom:e;var n=i.zoom(t*i.scale(e));return isNaN(n)?Infinity:n},project:function(t,e){e=e===undefined?this._zoom:e;return this.options.crs.latLngToPoint(j(t),e)},unproject:function(t,e){e=e===undefined?this._zoom:e;return this.options.crs.pointToLatLng(B(t),e)},layerPointToLatLng:function(t){var e=B(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(j(t))._round();return e._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(j(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(U(t))},distance:function(t,e){return this.options.crs.distance(j(t),j(e))},containerPointToLayerPoint:function(t){return B(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return B(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(B(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(j(t)))},mouseEventToContainerPoint:function(t){return Ve(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=he(t);if(!e){throw new Error("Map container not found.")}else if(e._leaflet_id){throw new Error("Map container is already initialized.")}Be(e,"scroll",this._onScroll,this);this._containerId=u(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&_t;_e(t,"leaflet-container"+(Lt?" leaflet-touch":"")+(Tt?" leaflet-retina":"")+(et?" leaflet-oldie":"")+(ct?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=ce(t,"position");if(e!=="absolute"&&e!=="relative"&&e!=="fixed"){t.style.position="relative"}this._initPanes();if(this._initControlPos){this._initControlPos()}},_initPanes:function(){var t=this._panes={};this._paneRenderers={};this._mapPane=this.createPane("mapPane",this._container);Ce(this._mapPane,new z(0,0));this.createPane("tilePane");this.createPane("shadowPane");this.createPane("overlayPane");this.createPane("markerPane");this.createPane("tooltipPane");this.createPane("popupPane");if(!this.options.markerZoomAnimation){_e(t.markerPane,"leaflet-zoom-hide");_e(t.shadowPane,"leaflet-zoom-hide")}},_resetView:function(t,e){Ce(this._mapPane,new z(0,0));var i=!this._loaded;this._loaded=true;e=this._limitZoom(e);this.fire("viewprereset");var n=this._zoom!==e;this._moveStart(n,false)._move(t,e)._moveEnd(n);this.fire("viewreset");if(i){this.fire("load")}},_moveStart:function(t,e){if(t){this.fire("zoomstart")}if(!e){this.fire("movestart")}return this}
6,_move:function(t,e,i){if(e===undefined){e=this._zoom}var n=this._zoom!==e;this._zoom=e;this._lastCenter=t;this._pixelOrigin=this._getNewPixelOrigin(t);if(n||i&&i.pinch){this.fire("zoom",i)}return this.fire("move",i)},_moveEnd:function(t){if(t){this.fire("zoomend")}return this.fire("moveend")},_stop:function(){P(this._flyToFrame);if(this._panAnim){this._panAnim.stop()}return this},_rawPanBy:function(t){Ce(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){if(!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[u(this._container)]=this;var e=t?Re:Be;e(this._container,"click dblclick mousedown mouseup "+"mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this);if(this.options.trackResize){e(window,"resize",this._onResize,this)}if(_t&&this.options.transform3DLimit){(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)}},_onResize:function(){P(this._resizeRequest);this._resizeRequest=T(function(){this.invalidateSize({debounceMoveend:true})},this)},_onScroll:function(){this._container.scrollTop=0;this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();if(Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit){this._resetView(this.getCenter(),this.getZoom())}},_findEventTargets:function(t,e){var i=[],n,r=e==="mouseout"||e==="mouseover",o=t.target||t.srcElement,a=false;while(o){n=this._targets[u(o)];if(n&&(e==="click"||e==="preclick")&&!t._simulated&&this._draggableMoved(n)){a=true;break}if(n&&n.listens(e,true)){if(r&&!$e(o,t)){break}i.push(n);if(r){break}}if(o===this._container){break}o=o.parentNode}if(!i.length&&!a&&!r&&$e(o,t)){i=[this]}return i},_handleDOMEvent:function(t){if(!this._loaded||Qe(t)){return}var e=t.type;if(e==="mousedown"||e==="keypress"||e==="keyup"||e==="keydown"){Ie(t.target||t.srcElement)}this._fireDOMEvent(t,e)},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if(t.type==="click"){var n=l({},t);n.type="preclick";this._fireDOMEvent(n,n.type,i)}if(t._stopped){return}i=(i||[]).concat(this._findEventTargets(t,e));if(!i.length){return}var r=i[0];if(e==="contextmenu"&&r.listens(e,true)){He(t)}var o={originalEvent:t};if(t.type!=="keypress"&&t.type!=="keydown"&&t.type!=="keyup"){var a=r.getLatLng&&(!r._radius||r._radius<=10);o.containerPoint=a?this.latLngToContainerPoint(r.getLatLng()):this.mouseEventToContainerPoint(t);o.layerPoint=this.containerPointToLayerPoint(o.containerPoint);o.latlng=a?r.getLatLng():this.layerPointToLatLng(o.layerPoint)}for(var s=0;s<i.length;s++){i[s].fire(e,o,true);if(o.originalEvent._stopped||i[s].options.bubblingMouseEvents===false&&y(this._mouseEvents,e)!==-1){return}}},_draggableMoved:function(t){t=t.dragging&&t.dragging.enabled()?t:this;return t.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){if(this._loaded){t.call(e||this,{target:this})}else{this.on("load",t,e)}return this},_getMapPanePos:function(){return Te(this._mapPane)||new z(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){var i=t&&e!==undefined?this._getNewPixelOrigin(t,e):this.getPixelOrigin();return i.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 n=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(n)},_latLngBoundsToNewLayerBounds:function(t,e,i){var n=this._getNewPixelOrigin(i,e);
6return R([this.project(t.getSouthWest(),e)._subtract(n),this.project(t.getNorthWest(),e)._subtract(n),this.project(t.getSouthEast(),e)._subtract(n),this.project(t.getNorthEast(),e)._subtract(n)])},_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 n=this.project(t,e),r=this.getSize().divideBy(2),o=new F(n.subtract(r),n.add(r)),a=this._getBoundsOffset(o,i,e);if(a.round().equals([0,0])){return t}return this.unproject(n.add(a),e)},_limitOffset:function(t,e){if(!e){return t}var i=this.getPixelBounds(),n=new F(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=R(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i)),r=n.min.subtract(t.min),o=n.max.subtract(t.max),a=this._rebound(r.x,-o.x),s=this._rebound(r.y,-o.y);return new z(a,s)},_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(),n=_t?this.options.zoomSnap:1;if(n){t=Math.round(t/n)*n}return Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){ye(this._mapPane,"leaflet-pan-anim");this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._trunc();if((e&&e.animate)!==true&&!this.getSize().contains(i)){return false}this.panBy(i,e);return true},_createAnimProxy:function(){var t=this._proxy=de("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t);this.on("zoomanim",function(t){var e=ie,i=this._proxy.style[e];Me(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1));if(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(){pe(this._proxy);this.off("load moveend",this._animMoveEnd,this);delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();Me(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){if(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 true}i=i||{};if(!this._zoomAnimated||i.animate===false||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold){return false}var n=this.getZoomScale(e),r=this._getCenterOffset(t)._divideBy(1-1/n);if(i.animate!==true&&!this.getSize().contains(r)){return false}T(function(){this._moveStart(true,false)._animateZoom(t,e,true)},this);return true},_animateZoom:function(t,e,i,n){if(!this._mapPane){return}if(i){this._animatingZoom=true;this._animateToCenter=t;this._animateToZoom=e;_e(this._mapPane,"leaflet-zoom-anim")}this.fire("zoomanim",{center:t,zoom:e,noUpdate:n});setTimeout(s(this._onZoomTransitionEnd,this),250)},_onZoomTransitionEnd:function(){if(!this._animatingZoom){return}if(this._mapPane){ye(this._mapPane,"leaflet-zoom-anim")}this._animatingZoom=false;this._move(this._animateToCenter,this._animateToZoom);T(function(){this._moveEnd(true)},this)}});function ri(t,e){return new ni(t,e)}var oi=A.extend({options:{position:"topright"},initialize:function(t){f(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;if(e){e.removeControl(this)}this.options.position=t;if(e){e.addControl(this)}return this},getContainer:function(){return this._container},addTo:function(t){this.remove();this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];_e(e,"leaflet-control");if(i.indexOf("bottom")!==-1){n.insertBefore(e,n.firstChild)}else{n.appendChild(e)}this._map.on("unload",this.remove,this);return this},remove:function(){if(!this._map){return this}pe(this._container);if(this.onRemove){this.onRemove(this._map)}this._map.off("unload",this.remove,this);this._map=null;return this},_refocusOnMap:function(t){if(this._map&&t&&t.screenX>0&&t.screenY>0){this._map.getContainer().focus()}}}),ai=function(t){return new oi(t)};ni.include({addControl:function(t){t.addTo(this);return this},removeControl:function(t){t.remove();return this}
6,_initControlPos:function(){var n=this._controlCorners={},r="leaflet-",o=this._controlContainer=de("div",r+"control-container",this._container);function t(t,e){var i=r+t+" "+r+e;n[t+e]=de("div",i,o)}t("top","left");t("top","right");t("bottom","left");t("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners){pe(this._controlCorners[t])}pe(this._controlContainer);delete this._controlCorners;delete this._controlContainer}});var si=oi.extend({options:{collapsed:true,position:"topright",autoZIndex:true,hideSingleBase:false,sortLayers:false,sortFunction:function(t,e,i,n){return i<n?-1:n<i?1:0}},initialize:function(t,e,i){f(this,i);this._layerControlInputs=[];this._layers=[];this._lastZIndex=0;this._handlingClick=false;for(var n in t){this._addLayer(t[n],n)}for(n in e){this._addLayer(e[n],n,true)}},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){oi.prototype.addTo.call(this,t);return 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){this._addLayer(t,e);return this._map?this._update():this},addOverlay:function(t,e){this._addLayer(t,e,true);return this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(u(t));if(e){this._layers.splice(this._layers.indexOf(e),1)}return this._map?this._update():this},expand:function(){_e(this._container,"leaflet-control-layers-expanded");this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);if(t<this._section.clientHeight){_e(this._section,"leaflet-control-layers-scrollbar");this._section.style.height=t+"px"}else{ye(this._section,"leaflet-control-layers-scrollbar")}this._checkDisabledLayers();return this},collapse:function(){ye(this._container,"leaflet-control-layers-expanded");return this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=de("div",t),i=this.options.collapsed;e.setAttribute("aria-haspopup",true);We(e);je(e);var n=this._section=de("section",t+"-list");if(i){this._map.on("click",this.collapse,this);if(!rt){Be(e,{mouseenter:this.expand,mouseleave:this.collapse},this)}}var r=this._layersLink=de("a",t+"-toggle",e);r.href="#";r.title="Layers";if(Lt){Be(r,"click",Ge);Be(r,"click",this.expand,this)}else{Be(r,"focus",this.expand,this)}if(!i){this.expand()}this._baseLayersList=de("div",t+"-base",n);this._separator=de("div",t+"-separator",n);this._overlaysList=de("div",t+"-overlays",n);e.appendChild(n)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++){if(this._layers[e]&&u(this._layers[e].layer)===t){return this._layers[e]}}},_addLayer:function(t,e,i){if(this._map){t.on("add remove",this._onLayerChange,this)}this._layers.push({layer:t,name:e,overlay:i});if(this.options.sortLayers){this._layers.sort(s(function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)},this))}if(this.options.autoZIndex&&t.setZIndex){this._lastZIndex++;t.setZIndex(this._lastZIndex)}this._expandIfNotCollapsed()},_update:function(){if(!this._container){return this}fe(this._baseLayersList);fe(this._overlaysList);this._layerControlInputs=[];var t,e,i,n,r=0;for(i=0;i<this._layers.length;i++){n=this._layers[i];this._addItem(n);e=e||n.overlay;t=t||!n.overlay;r+=!n.overlay?1:0}if(this.options.hideSingleBase){t=t&&r>1;this._baseLayersList.style.display=t?"":"none"}this._separator.style.display=e&&t?"":"none";return this},_onLayerChange:function(t){if(!this._handlingClick){this._update()}var e=this._getLayer(u(t.target));var i=e.overlay?t.type==="add"?"overlayadd":"overlayremove":t.type==="add"?"baselayerchange":null;if(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"':"")+"/>";var n=document.createElement("div");n.innerHTML=i;return n.firstChild},_addItem:function(t){var e=document.createElement("label"),i=this._map.hasLayer(t.layer),n;if(t.overlay){n=document.createElement("input");n.type="checkbox";n.className="leaflet-control-layers-selector";n.defaultChecked=i}else{n=this._createRadioElement("leaflet-base-layers_"+u(this),i)}this._layerControlInputs.push(n);n.layerId=u(t.layer);Be(n,"click",this._onInputClick,this);var r=document.createElement("span");r.innerHTML=" "+t.name;var o=document.createElement("div");e.appendChild(o);o.appendChild(n);o.appendChild(r);var a=t.overlay?this._overlaysList:this._baseLayersList;a.appendChild(e);this._checkDisabledLayers();return e},_onInputClick:function(){var t=this._layerControlInputs,e,i;var n=[],r=[];this._handlingClick=true;for(var o=t.length-1;o>=0;o--){e=t[o];i=this._getLayer(e.layerId).layer;if(e.checked){n.push(i)}else if(!e.checked){r.push(i)}}for(o=0;o<r.length;o++){if(this._map.hasLayer(r[o])){this._map.removeLayer(r[o])}}for(o=0;o<n.length;o++){if(!this._map.hasLayer(n[o])){this._map.addLayer(n[o])}}this._handlingClick=false;this._refocusOnMap()},_checkDisabledLayers:function(){var t=this._layerControlInputs,e,i,n=this._map.getZoom();for(var r=t.length-1;r>=0;r--){e=t[r];i=this._getLayer(e.layerId).layer;e.disabled=i.options.minZoom!==undefined&&n<i.options.minZoom||i.options.maxZoom!==undefined&&n>i.options.maxZoom}},_expandIfNotCollapsed:function(){if(this._map&&!this.options.collapsed){this.expand()}return this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}
6),li=function(t,e,i){return new si(t,e,i)},ui=oi.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=de("div",e+" leaflet-bar"),n=this.options;this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn);this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut);this._updateDisabled();t.on("zoomend zoomlevelschange",this._updateDisabled,this);return i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){this._disabled=true;this._updateDisabled();return this},enable:function(){this._disabled=false;this._updateDisabled();return this},_zoomIn:function(t){if(!this._disabled&&this._map._zoom<this._map.getMaxZoom()){this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))}},_zoomOut:function(t){if(!this._disabled&&this._map._zoom>this._map.getMinZoom()){this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))}},_createButton:function(t,e,i,n,r){var o=de("a",i,n);o.innerHTML=t;o.href="#";o.title=e;o.setAttribute("role","button");o.setAttribute("aria-label",e);We(o);Be(o,"click",Ge);Be(o,"click",r,this);Be(o,"click",this._refocusOnMap,this);return o},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";ye(this._zoomInButton,e);ye(this._zoomOutButton,e);if(this._disabled||t._zoom===t.getMinZoom()){_e(this._zoomOutButton,e)}if(this._disabled||t._zoom===t.getMaxZoom()){_e(this._zoomInButton,e)}}});ni.mergeOptions({zoomControl:true}),ni.addInitHook(function(){if(this.options.zoomControl){this.zoomControl=new ui;this.addControl(this.zoomControl)}});var hi=function(t){return new ui(t)},ci=oi.extend({options:{position:"bottomleft",maxWidth:100,metric:true,imperial:true},onAdd:function(t){var e="leaflet-control-scale",i=de("div",e),n=this.options;this._addScales(n,e+"-line",i);t.on(n.updateWhenIdle?"moveend":"move",this._update,this);t.whenReady(this._update,this);return i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){if(t.metric){this._mScale=de("div",e,i)}if(t.imperial){this._iScale=de("div",e,i)}},_update:function(){var t=this._map,e=t.getSize().y/2;var i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)},_updateScales:function(t){if(this.options.metric&&t){this._updateMetric(t)}if(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=t*3.2808399,i,n,r;if(e>5280){i=e/5280;n=this._getRoundNum(i);this._updateScale(this._iScale,n+" mi",n/i)}else{r=this._getRoundNum(e);this._updateScale(this._iScale,r+" ft",r/e)}},_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;i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1;return e*i}}),di=function(t){return new ci(t)},pi=oi.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){f(this,t);this._attributions={}},onAdd:function(t){t.attributionControl=this;this._container=de("div","leaflet-control-attribution");We(this._container);for(var e in t._layers){if(t._layers[e].getAttribution){this.addAttribution(t._layers[e].getAttribution())}}this._update();return this._container},setPrefix:function(t){this.options.prefix=t;this._update();return this},addAttribution:function(t){if(!t){return this}if(!this._attributions[t]){this._attributions[t]=0}this._attributions[t]++;this._update();return this},removeAttribution:function(t){if(!t){return this}if(this._attributions[t]){this._attributions[t]--;this._update()}return this},_update:function(){if(!this._map){return}var t=[];for(var e in this._attributions){if(this._attributions[e]){t.push(e)}}var i=[];if(this.options.prefix){i.push(this.options.prefix)}if(t.length){i.push(t.join(", "))}this._container.innerHTML=i.join(" | ")}});ni.mergeOptions({attributionControl:true}),ni.addInitHook(function(){if(this.options.attributionControl){(new pi).addTo(this)}});var fi=function(t){return new pi(t)};oi.Layers=si,oi.Zoom=ui,oi.Scale=ci,oi.Attribution=pi,ai.layers=li,ai.zoom=hi,ai.scale=di,ai.attribution=fi;var mi=A.extend({initialize:function(t){this._map=t},enable:function(){if(this._enabled){return this}this._enabled=true;this.addHooks();return this},disable:function(){if(!this._enabled){return this}this._enabled=false;this.removeHooks();return this},enabled:function(){return!!this._enabled}});mi.addTo=function(t,e){t.addHandler(e,this);return this};var gi={Events:D},vi=Lt?"touchstart mousedown":"mousedown",_i={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},yi={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},xi=O.extend({options:{clickTolerance:3}
6,initialize:function(t,e,i,n){f(this,n);this._element=t;this._dragStartTarget=e||t;this._preventOutline=i},enable:function(){if(this._enabled){return}Be(this._dragStartTarget,vi,this._onDown,this);this._enabled=true},disable:function(){if(!this._enabled){return}if(xi._dragging===this){this.finishDrag()}Re(this._dragStartTarget,vi,this._onDown,this);this._enabled=false;this._moved=false},_onDown:function(t){if(t._simulated||!this._enabled){return}this._moved=false;if(ve(this._element,"leaflet-zoom-anim")){return}if(xi._dragging||t.shiftKey||t.which!==1&&t.button!==1&&!t.touches){return}xi._dragging=this;if(this._preventOutline){Ie(this._element)}Se();oe();if(this._moving){return}this.fire("down");var e=t.touches?t.touches[0]:t,i=Oe(this._element);this._startPoint=new z(e.clientX,e.clientY);this._parentScale=ze(i);Be(document,yi[t.type],this._onMove,this);Be(document,_i[t.type],this._onUp,this)},_onMove:function(t){if(t._simulated||!this._enabled){return}if(t.touches&&t.touches.length>1){this._moved=true;return}var e=t.touches&&t.touches.length===1?t.touches[0]:t,i=new z(e.clientX,e.clientY)._subtract(this._startPoint);if(!i.x&&!i.y){return}if(Math.abs(i.x)+Math.abs(i.y)<this.options.clickTolerance){return}i.x/=this._parentScale.x;i.y/=this._parentScale.y;He(t);if(!this._moved){this.fire("dragstart");this._moved=true;this._startPos=Te(this._element).subtract(i);_e(document.body,"leaflet-dragging");this._lastTarget=t.target||t.srcElement;if(window.SVGElementInstance&&this._lastTarget instanceof SVGElementInstance){this._lastTarget=this._lastTarget.correspondingUseElement}_e(this._lastTarget,"leaflet-drag-target")}this._newPos=this._startPos.add(i);this._moving=true;P(this._animRequest);this._lastEvent=t;this._animRequest=T(this._updatePosition,this,true)},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t);Ce(this._element,this._newPos);this.fire("drag",t)},_onUp:function(t){if(t._simulated||!this._enabled){return}this.finishDrag()},finishDrag:function(){ye(document.body,"leaflet-dragging");if(this._lastTarget){ye(this._lastTarget,"leaflet-drag-target");this._lastTarget=null}for(var t in yi){Re(document,yi[t],this._onMove,this);Re(document,_i[t],this._onUp,this)}Ae();ae();if(this._moved&&this._moving){P(this._animRequest);this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})}this._moving=false;xi._dragging=false}}),bi;function wi(t,e){if(!e||!t.length){return t.slice()}var i=e*e;t=Ti(t,i);t=Mi(t,i);return t}function ki(t,e,i){return Math.sqrt(Di(t,e,i,true))}function Li(t,e,i){return Di(t,e,i)}function Mi(t,e){var i=t.length,n=typeof Uint8Array!==undefined+""?Uint8Array:Array,r=new n(i);r[0]=r[i-1]=1;Ci(t,r,e,0,i-1);var o,a=[];for(o=0;o<i;o++){if(r[o]){a.push(t[o])}}return a}function Ci(t,e,i,n,r){var o=0,a,s,l;for(s=n+1;s<=r-1;s++){l=Di(t[s],t[n],t[r],true);if(l>o){a=s;o=l}}if(o>i){e[a]=1;Ci(t,e,i,n,a);Ci(t,e,i,a,r)}}function Ti(t,e){var i=[t[0]];for(var n=1,r=0,o=t.length;n<o;n++){if(Ii(t[n],t[r])>e){i.push(t[n]);r=n}}if(r<o-1){i.push(t[o-1])}return i}function Pi(t,e,i,n,r){var o=n?bi:Ai(t,i),a=Ai(e,i),s,l,u;bi=a;while(true){if(!(o|a)){return[t,e]}if(o&a){return false}s=o||a;l=Si(t,e,s,i,r);u=Ai(l,i);if(s===o){t=l;o=u}else{e=l;a=u}}}function Si(t,e,i,n,r){var o=e.x-t.x,a=e.y-t.y,s=n.min,l=n.max,u,h;if(i&8){u=t.x+o*(l.y-t.y)/a;h=l.y}else if(i&4){u=t.x+o*(s.y-t.y)/a;h=s.y}else if(i&2){u=l.x;h=t.y+a*(l.x-t.x)/o}else if(i&1){u=s.x;h=t.y+a*(s.x-t.x)/o}return new z(u,h,r)}function Ai(t,e){var i=0;if(t.x<e.min.x){i|=1}else if(t.x>e.max.x){i|=2}if(t.y<e.min.y){i|=4}else if(t.y>e.max.y){i|=8}return i}function Ii(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}function Di(t,e,i,n){var r=e.x,o=e.y,a=i.x-r,s=i.y-o,l=a*a+s*s,u;if(l>0){u=((t.x-r)*a+(t.y-o)*s)/l;if(u>1){r=i.x;o=i.y}else if(u>0){r+=a*u;o+=s*u}}a=t.x-r;s=t.y-o;return n?a*a+s*s:new z(r,o)}function Oi(t){return!_(t[0])||typeof t[0][0]!=="object"&&typeof t[0][0]!=="undefined"}function zi(t){console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead.");return Oi(t)}var Ei=(Object.freeze||Object)({simplify:wi,pointToSegmentDistance:ki,closestPointOnSegment:Li,clipSegment:Pi,_getEdgeIntersection:Si,_getBitCode:Ai,_sqClosestPointOnSegment:Di,isFlat:Oi,_flat:zi});function Bi(t,e,i){var n,r=[1,4,2,8],o,a,s,l,u,h,c,d;for(o=0,h=t.length;o<h;o++){t[o]._code=Ai(t[o],e)}for(s=0;s<4;s++){c=r[s];n=[];for(o=0,h=t.length,a=h-1;o<h;a=o++){l=t[o];u=t[a];
6if(!(l._code&c)){if(u._code&c){d=Si(u,l,c,e,i);d._code=Ai(d,e);n.push(d)}n.push(l)}else if(!(u._code&c)){d=Si(u,l,c,e,i);d._code=Ai(d,e);n.push(d)}}t=n}return t}var Fi=(Object.freeze||Object)({clipPolygon:Bi}),Ri={project:function(t){return new z(t.lng,t.lat)},unproject:function(t){return new Z(t.y,t.x)},bounds:new F([-180,-90],[180,90])},Ni={R:6378137,R_MINOR:6356752.314245179,bounds:new F([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,i=this.R,n=t.lat*e,r=this.R_MINOR/i,o=Math.sqrt(1-r*r),a=o*Math.sin(n);var s=Math.tan(Math.PI/4-n/2)/Math.pow((1-a)/(1+a),o/2);n=-i*Math.log(Math.max(s,1e-10));return new z(t.lng*e*i,n)},unproject:function(t){var e=180/Math.PI,i=this.R,n=this.R_MINOR/i,r=Math.sqrt(1-n*n),o=Math.exp(-t.y/i),a=Math.PI/2-2*Math.atan(o);for(var s=0,l=.1,u;s<15&&Math.abs(l)>1e-7;s++){u=r*Math.sin(a);u=Math.pow((1-u)/(1+u),r/2);l=Math.PI/2-2*Math.atan(o*u)-a;a+=l}return new Z(a*e,t.x*e/i)}},Ui=(Object.freeze||Object)({LonLat:Ri,Mercator:Ni,SphericalMercator:V}),Zi=l({},H,{code:"EPSG:3395",projection:Ni,transformation:function(){var t=.5/(Math.PI*Ni.R);return K(t,.5,-t,.5)}()}),ji=l({},H,{code:"EPSG:4326",projection:Ri,transformation:K(1/180,1,-1/180,.5)}),Wi=l({},W,{projection:Ri,transformation:K(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,n=e.lat-t.lat;return Math.sqrt(i*i+n*n)},infinite:true});W.Earth=H,W.EPSG3395=Zi,W.EPSG3857=J,W.EPSG900913=Y,W.EPSG4326=ji,W.Simple=Wi;var Hi=O.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:true},addTo:function(t){t.addLayer(this);return this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){if(t){t.removeLayer(this)}return this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){this._map._targets[u(t)]=this;return this},removeInteractiveTarget:function(t){delete this._map._targets[u(t)];return this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(!e.hasLayer(this)){return}this._map=e;this._zoomAnimated=e._zoomAnimated;if(this.getEvents){var i=this.getEvents();e.on(i,this);this.once("remove",function(){e.off(i,this)},this)}this.onAdd(e);if(this.getAttribution&&e.attributionControl){e.attributionControl.addAttribution(this.getAttribution())}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=u(t);if(this._layers[e]){return this}this._layers[e]=t;t._mapToAdd=this;if(t.beforeAdd){t.beforeAdd(this)}this.whenReady(t._layerAdd,t);return this},removeLayer:function(t){var e=u(t);if(!this._layers[e]){return this}if(this._loaded){t.onRemove(this)}if(t.getAttribution&&this.attributionControl){this.attributionControl.removeAttribution(t.getAttribution())}delete this._layers[e];if(this._loaded){this.fire("layerremove",{layer:t});t.fire("remove")}t._map=t._mapToAdd=null;return this},hasLayer:function(t){return!!t&&u(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){t=t?_(t)?t:[t]:[];for(var e=0,i=t.length;e<i;e++){this.addLayer(t[e])}},_addZoomLimit:function(t){if(isNaN(t.options.maxZoom)||!isNaN(t.options.minZoom)){this._zoomBoundLayers[u(t)]=t;this._updateZoomLevels()}},_removeZoomLimit:function(t){var e=u(t);if(this._zoomBoundLayers[e]){delete this._zoomBoundLayers[e];this._updateZoomLevels()}},_updateZoomLevels:function(){var t=Infinity,e=-Infinity,i=this._getZoomSpan();for(var n in this._zoomBoundLayers){var r=this._zoomBoundLayers[n].options;t=r.minZoom===undefined?t:Math.min(t,r.minZoom);e=r.maxZoom===undefined?e:Math.max(e,r.maxZoom)}this._layersMaxZoom=e===-Infinity?undefined:e;this._layersMinZoom=t===Infinity?undefined:t;if(i!==this._getZoomSpan()){this.fire("zoomlevelschange")}if(this.options.maxZoom===undefined&&this._layersMaxZoom&&this.getZoom()>
6this._layersMaxZoom){this.setZoom(this._layersMaxZoom)}if(this.options.minZoom===undefined&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom){this.setZoom(this._layersMinZoom)}}});var Gi=Hi.extend({initialize:function(t,e){f(this,e);this._layers={};var i,n;if(t){for(i=0,n=t.length;i<n;i++){this.addLayer(t[i])}}},addLayer:function(t){var e=this.getLayerId(t);this._layers[e]=t;if(this._map){this._map.addLayer(t)}return this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);if(this._map&&this._layers[e]){this._map.removeLayer(this._layers[e])}delete this._layers[e];return this},hasLayer:function(t){return!!t&&(t in this._layers||this.getLayerId(t)in this._layers)},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e=Array.prototype.slice.call(arguments,1),i,n;for(i in this._layers){n=this._layers[i];if(n[t]){n[t].apply(n,e)}}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=[];this.eachLayer(t.push,t);return t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return u(t)}}),Vi=function(t,e){return new Gi(t,e)},qi=Gi.extend({addLayer:function(t){if(this.hasLayer(t)){return this}t.addEventParent(this);Gi.prototype.addLayer.call(this,t);return this.fire("layeradd",{layer:t})},removeLayer:function(t){if(!this.hasLayer(t)){return this}if(t in this._layers){t=this._layers[t]}t.removeEventParent(this);Gi.prototype.removeLayer.call(this,t);return this.fire("layerremove",{layer:t})},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new N;for(var e in this._layers){var i=this._layers[e];t.extend(i.getBounds?i.getBounds():i.getLatLng())}return t}}),Ki=function(t){return new qi(t)},Ji=A.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function(t){f(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if(t==="icon"){throw new Error("iconUrl not set in Icon options (see the docs).")}return null}var n=this._createImg(i,e&&e.tagName==="IMG"?e:null);this._setIconStyles(n,t);return n},_setIconStyles:function(t,e){var i=this.options;var n=i[e+"Size"];if(typeof n==="number"){n=[n,n]}var r=B(n),o=B(e==="shadow"&&i.shadowAnchor||i.iconAnchor||r&&r.divideBy(2,true));t.className="leaflet-marker-"+e+" "+(i.className||"");if(o){t.style.marginLeft=-o.x+"px";t.style.marginTop=-o.y+"px"}if(r){t.style.width=r.x+"px";t.style.height=r.y+"px"}},_createImg:function(t,e){e=e||document.createElement("img");e.src=t;return e},_getIconUrl:function(t){return Tt&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function Yi(t){return new Ji(t)}var Xi=Ji.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){if(!Xi.imagePath){Xi.imagePath=this._detectIconPath()}return(this.options.imagePath||Xi.imagePath)+Ji.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=de("div","leaflet-default-icon-path",document.body);var e=ce(t,"background-image")||ce(t,"backgroundImage");document.body.removeChild(t);if(e===null||e.indexOf("url")!==0){e=""}else{e=e.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}return e}}),Qi=mi.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;if(!this._draggable){this._draggable=new xi(t,t,true)}this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable();_e(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable();if(this._marker._icon){ye(this._marker._icon,"leaflet-marker-draggable")}},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,i=e._map,n=this._marker.options.autoPanSpeed,r=this._marker.options.autoPanPadding,o=Te(e._icon),a=i.getPixelBounds(),s=i.getPixelOrigin();var l=R(a.min._subtract(s).add(r),a.max._subtract(s).subtract(r));if(!l.contains(o)){var u=B((Math.max(l.max.x,o.x)-l.max.x)/(a.max.x-l.max.x)-(Math.min(l.min.x,o.x)-l.min.x)/(a.min.x-l.min.x),(Math.max(l.max.y,o.y)-l.max.y)/(a.max.y-l.max.y)-(Math.min(l.min.y,o.y)-l.min.y)/(a.min.y-l.min.y)).multiplyBy(n);i.panBy(u,{animate:false});this._draggable._newPos._add(u);this._draggable._startPos._add(u);Ce(e._icon,this._draggable._newPos);this._onDrag(t);this._panRequest=T(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng();this._marker.closePopup().fire("movestart").fire("dragstart")},_onPreDrag:function(t){if(this._marker.options.autoPan){P(this._panRequest);this._panRequest=T(this._adjustPan.bind(this,t))}},_onDrag:function(t){var e=this._marker,i=e._shadow,n=Te(e._icon),r=e._map.layerPointToLatLng(n);if(i){Ce(i,n)}e._latlng=r;t.latlng=r;t.oldLatLng=this._oldLatLng;e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){P(this._panRequest);delete this._oldLatLng;this._marker.fire("moveend").fire("dragend",t)}}),$i=Hi.extend({options:{icon:new Xi,interactive:true,keyboard:true,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:false,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:false,draggable:false,autoPan:false,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){f(this,e);this._latlng=j(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation;if(this._zoomAnimated){t.on("zoomanim",this._animateZoom,this)}this._initIcon();this.update()},onRemove:function(t){if(this.dragging&&this.dragging.enabled()){this.options.draggable=true;this.dragging.removeHooks()}delete this.dragging;if(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;this._latlng=j(t);this.update();return this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){this.options.zIndexOffset=t;return this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){this.options.icon=t;if(this._map){this._initIcon();this.update()}if(this._popup){this.bindPopup(this._popup,this._popup.options)}return 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");var i=t.icon.createIcon(this._icon),n=false;if(i!==this._icon){if(this._icon){this._removeIcon()}n=true;if(t.title){i.title=t.title}if(i.tagName==="IMG"){i.alt=t.alt||""}}_e(i,e);if(t.keyboard){i.tabIndex="0"}this._icon=i;if(t.riseOnHover){this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex})}var r=t.icon.createShadow(this._shadow),o=false;if(r!==this._shadow){this._removeShadow();o=true}if(r){_e(r,e);r.alt=""}this._shadow=r;if(t.opacity<1){this._updateOpacity()}if(n){this.getPane().appendChild(this._icon)}this._initInteraction();if(r&&o){this.getPane(t.shadowPane).appendChild(this._shadow)}},_removeIcon:function(){if(this.options.riseOnHover){this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex})}pe(this._icon);this.removeInteractiveTarget(this._icon);this._icon=null},_removeShadow:function(){if(this._shadow){pe(this._shadow)}this._shadow=null},_setPos:function(t){if(this._icon){Ce(this._icon,t)}if(this._shadow){Ce(this._shadow,t)}this._zIndex=t.y+this.options.zIndexOffset;this._resetZIndex()},_updateZIndex:function(t){if(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){return}_e(this._icon,"leaflet-interactive");this.addInteractiveTarget(this._icon);if(Qi){var t=this.options.draggable;if(this.dragging){t=this.dragging.enabled();this.dragging.disable()}this.dragging=new Qi(this);if(t){this.dragging.enable()}}},setOpacity:function(t){this.options.opacity=t;if(this._map){this._updateOpacity()}return this},_updateOpacity:function(){var t=this.options.opacity;if(this._icon){we(this._icon,t)}if(this._shadow){we(this._shadow,t)}},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function tn(t,e){return new $i(t,e)}var en=Hi.extend({options:{stroke:true,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:false,fillColor:null,fillOpacity:.2,f
6illRule:"evenodd",interactive:true,bubblingMouseEvents:true},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(){if(this._map){this._renderer._updatePath(this)}return this},setStyle:function(t){f(this,t);if(this._renderer){this._renderer._updateStyle(this);if(this.options.stroke&&t&&t.hasOwnProperty("weight")){this._updateBounds()}}return this},bringToFront:function(){if(this._renderer){this._renderer._bringToFront(this)}return this},bringToBack:function(){if(this._renderer){this._renderer._bringToBack(this)}return 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}}),nn=en.extend({options:{fill:true,radius:10},initialize:function(t,e){f(this,e);this._latlng=j(t);this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;this._latlng=j(t);this.redraw();return this.fire("move",{oldLatLng:e,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){this.options.radius=this._radius=t;return this.redraw()},getRadius:function(){return this._radius}
6,setStyle:function(t){var e=t&&t.radius||this._radius;en.prototype.setStyle.call(this,t);this.setRadius(e);return 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(),n=[t+i,e+i];this._pxBounds=new F(this._point.subtract(n),this._point.add(n))},_update:function(){if(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 rn(t,e){return new nn(t,e)}var on=nn.extend({initialize:function(t,e,i){if(typeof e==="number"){e=l({},i,{radius:e})}f(this,e);this._latlng=j(t);if(isNaN(this.options.radius)){throw new Error("Circle radius cannot be NaN")}this._mRadius=this.options.radius},setRadius:function(t){this._mRadius=t;return this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new N(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:en.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,i=this._map,n=i.options.crs;if(n.distance===H.distance){var r=Math.PI/180,o=this._mRadius/H.R/r,a=i.project([e+o,t]),s=i.project([e-o,t]),l=a.add(s).divideBy(2),u=i.unproject(l).lat,h=Math.acos((Math.cos(o*r)-Math.sin(e*r)*Math.sin(u*r))/(Math.cos(e*r)*Math.cos(u*r)))/r;if(isNaN(h)||h===0){h=o/Math.cos(Math.PI/180*e)}this._point=l.subtract(i.getPixelOrigin());this._radius=isNaN(h)?0:l.x-i.project([u,t-h]).x;this._radiusY=l.y-a.y}else{var c=n.unproject(n.project(this._latlng).subtract([this._mRadius,0]));this._point=i.latLngToLayerPoint(this._latlng);this._radius=this._point.x-i.latLngToLayerPoint(c).x}this._updateBounds()}});function an(t,e,i){return new on(t,e,i)}var sn=en.extend({options:{smoothFactor:1,noClip:false},initialize:function(t,e){f(this,e);this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){this._setLatLngs(t);return this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){var e=Infinity,i=null,n=Di,r,o;for(var a=0,s=this._parts.length;a<s;a++){var l=this._parts[a];for(var u=1,h=l.length;u<h;u++){r=l[u-1];o=l[u];var c=n(t,r,o,true);if(c<e){e=c;i=n(t,r,o)}}}if(i){i.distance=Math.sqrt(e)}return i}
6,getCenter:function(){if(!this._map){throw new Error("Must add layer to map before using getCenter()")}var t,e,i,n,r,o,a,s=this._rings[0],l=s.length;if(!l){return null}for(t=0,e=0;t<l-1;t++){e+=s[t].distanceTo(s[t+1])/2}if(e===0){return this._map.layerPointToLatLng(s[0])}for(t=0,n=0;t<l-1;t++){r=s[t];o=s[t+1];i=r.distanceTo(o);n+=i;if(n>e){a=(n-e)/i;return this._map.layerPointToLatLng([o.x-a*(o.x-r.x),o.y-a*(o.y-r.y)])}}},getBounds:function(){return this._bounds},addLatLng:function(t,e){e=e||this._defaultShape();t=j(t);e.push(t);this._bounds.extend(t);return this.redraw()},_setLatLngs:function(t){this._bounds=new N;this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return Oi(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){var e=[],i=Oi(t);for(var n=0,r=t.length;n<r;n++){if(i){e[n]=j(t[n]);this._bounds.extend(e[n])}else{e[n]=this._convertLatLngs(t[n])}}return e},_project:function(){var t=new F;this._rings=[];this._projectLatlngs(this._latlngs,this._rings,t);if(this._bounds.isValid()&&t.isValid()){this._rawPxBounds=t;this._updateBounds()}},_updateBounds:function(){var t=this._clickTolerance(),e=new z(t,t);this._pxBounds=new F([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)])},_projectLatlngs:function(t,e,i){var n=t[0]instanceof Z,r=t.length,o,a;if(n){a=[];for(o=0;o<r;o++){a[o]=this._map.latLngToLayerPoint(t[o]);i.extend(a[o])}e.push(a)}else{for(o=0;o<r;o++){this._projectLatlngs(t[o],e,i)}}},_clipPoints:function(){var t=this._renderer._bounds;this._parts=[];if(!this._pxBounds||!this._pxBounds.intersects(t)){return}if(this.options.noClip){this._parts=this._rings;return}var e=this._parts,i,n,r,o,a,s,l;for(i=0,r=0,o=this._rings.length;i<o;i++){l=this._rings[i];for(n=0,a=l.length;n<a-1;n++){s=Pi(l[n],l[n+1],t,n,true);if(!s){continue}e[r]=e[r]||[];e[r].push(s[0]);if(s[1]!==l[n+1]||n===a-2){e[r].push(s[1]);r++}}}},_simplifyPoints:function(){var t=this._parts,e=this.options.smoothFactor;for(var i=0,n=t.length;i<n;i++){t[i]=wi(t[i],e)}},_update:function(){if(!this._map){return}this._clipPoints();this._simplifyPoints();this._updatePath()},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var i,n,r,o,a,s,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t)){return false}for(i=0,o=this._parts.length;i<o;i++){s=this._parts[i];for(n=0,a=s.length,r=a-1;n<a;r=n++){if(!e&&n===0){continue}if(ki(t,s[r],s[n])<=l){return true}}}return false}});function ln(t,e){return new sn(t,e)}sn._flat=zi;var un=sn.extend({options:{fill:true},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length}
6,getCenter:function(){if(!this._map){throw new Error("Must add layer to map before using getCenter()")}var t,e,i,n,r,o,a,s,l,u=this._rings[0],h=u.length;if(!h){return null}o=a=s=0;for(t=0,e=h-1;t<h;e=t++){i=u[t];n=u[e];r=i.y*n.x-n.y*i.x;a+=(i.x+n.x)*r;s+=(i.y+n.y)*r;o+=r*3}if(o===0){l=u[0]}else{l=[a/o,s/o]}return this._map.layerPointToLatLng(l)},_convertLatLngs:function(t){var e=sn.prototype._convertLatLngs.call(this,t),i=e.length;if(i>=2&&e[0]instanceof Z&&e[0].equals(e[i-1])){e.pop()}return e},_setLatLngs:function(t){sn.prototype._setLatLngs.call(this,t);if(Oi(this._latlngs)){this._latlngs=[this._latlngs]}},_defaultShape:function(){return Oi(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new z(e,e);t=new F(t.min.subtract(i),t.max.add(i));this._parts=[];if(!this._pxBounds||!this._pxBounds.intersects(t)){return}if(this.options.noClip){this._parts=this._rings;return}for(var n=0,r=this._rings.length,o;n<r;n++){o=Bi(this._rings[n],t,true);if(o.length){this._parts.push(o)}}},_updatePath:function(){this._renderer._updatePoly(this,true)},_containsPoint:function(t){var e=false,i,n,r,o,a,s,l,u;if(!this._pxBounds||!this._pxBounds.contains(t)){return false}for(o=0,l=this._parts.length;o<l;o++){i=this._parts[o];for(a=0,u=i.length,s=u-1;a<u;s=a++){n=i[a];r=i[s];if(n.y>t.y!==r.y>t.y&&t.x<(r.x-n.x)*(t.y-n.y)/(r.y-n.y)+n.x){e=!e}}}return e||sn.prototype._containsPoint.call(this,t,true)}});function hn(t,e){return new un(t,e)}var cn=qi.extend({initialize:function(t,e){f(this,e);this._layers={};if(t){this.addData(t)}},addData:function(t){var e=_(t)?t:t.features,i,n,r;if(e){for(i=0,n=e.length;i<n;i++){r=e[i];if(r.geometries||r.geometry||r.features||r.coordinates){this.addData(r)}}return this}var o=this.options;if(o.filter&&!o.filter(t)){return this}var a=dn(t,o);if(!a){return this}a.feature=yn(t);a.defaultOptions=a.options;this.resetStyle(a);if(o.onEachFeature){o.onEachFeature(t,a)}return this.addLayer(a)},resetStyle:function(t){if(t===undefined){return this.eachLayer(this.resetStyle,this)}t.options=l({},t.defaultOptions);this._setLayerStyle(t,this.options.style);return this},setStyle:function(e){return this.eachLayer(function(t){this._setLayerStyle(t,e)},this)},_setLayerStyle:function(t,e){if(t.setStyle){if(typeof e==="function"){e=e(t.feature)}t.setStyle(e)}}});function dn(t,e){var i=t.type==="Feature"?t.geometry:t,n=i?i.coordinates:null,r=[],o=e&&e.pointToLayer,a=e&&e.coordsToLatLng||fn,s,l,u,h;if(!n&&!i){return null}switch(i.type){case"Point":s=a(n);return pn(o,t,s,e);case"MultiPoint":for(u=0,h=n.length;u<h;u++){s=a(n[u]);r.push(pn(o,t,s,e))}return new qi(r);case"LineString":case"MultiLineString":l=mn(n,i.type==="LineString"?0:1,a);return new sn(l,e);case"Polygon":case"MultiPolygon":l=mn(n,i.type==="Polygon"?1:2,a);return new un(l,e);case"GeometryCollection":for(u=0,h=i.geometries.length;u<h;u++){var c=dn({geometry:i.geometries[u],type:"Feature",properties:t.properties},e);if(c){r.push(c)}}return new qi(r);default:throw new Error("Invalid GeoJSON object.")}}function pn(t,e,i,n){return t?t(e,i):new $i(i,n&&n.markersInheritOptions&&n)}function fn(t){return new Z(t[1],t[0],t[2])}function mn(t,e,i){var n=[];for(var r=0,o=t.length,a;r<o;r++){a=e?mn(t[r],e-1,i):(i||fn)(t[r]);n.push(a)}return n}function gn(t,e){e=typeof e==="number"?e:6;return t.alt!==undefined?[c(t.lng,e),c(t.lat,e),c(t.alt,e)]:[c(t.lng,e),c(t.lat,e)]}function vn(t,e,i,n){var r=[];for(var o=0,a=t.length;o<a;o++){r.push(e?vn(t[o],e-1,i,n):gn(t[o],n))}if(!e&&i){r.push(r[0])}return r}function _n(t,e){return t.feature?l({},t.feature,{geometry:e}):yn(e)}function yn(t){if(t.type==="Feature"||t.type==="FeatureCollection"){return t}return{type:"Feature",properties:{},geometry:t}}var xn={toGeoJSON:function(t){return _n(this,{type:"Point",coordinates:gn(this.getLatLng(),t)})}};function bn(t,e){return new cn(t,e)}$i.include(xn),on.include(xn),nn.include(xn),sn.include({toGeoJSON:function(t){var e=!Oi(this._latlngs);var i=vn(this._latlngs,e?1:0,false,t);return _n(this,{type:(e?"Multi":"")+"LineString",coordinates:i})}}),un.include({toGeoJSON:function(t){var e=!Oi(this._latlngs),i=e&&!Oi(this._latlngs[0]);var n=vn(this._latlngs,i?2:e?1:0,true,t);if(!e){n=[n]}return _n(this,{type:(i?"Multi":"")+"Polygon",coordinates:n})}}),Gi.include({toMultiPoint:function(e){var i=[];this.eachLayer(function(t){i.push(t.toGeoJSON(e).geometry.coordinates)});return _n(this,{type:"MultiPoint",coordinates:i})},toGeoJSON:function(n){var t=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(t==="MultiPoint"){return this.toMultiPoint(n)}
6var r=t==="GeometryCollection",o=[];this.eachLayer(function(t){if(t.toGeoJSON){var e=t.toGeoJSON(n);if(r){o.push(e.geometry)}else{var i=yn(e);if(i.type==="FeatureCollection"){o.push.apply(o,i.features)}else{o.push(i)}}}});if(r){return _n(this,{geometries:o,type:"GeometryCollection"})}return{type:"FeatureCollection",features:o}}});var wn=bn,kn=Hi.extend({options:{opacity:1,alt:"",interactive:false,crossOrigin:false,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,i){this._url=t;this._bounds=U(e);f(this,i)},onAdd:function(){if(!this._image){this._initImage();if(this.options.opacity<1){this._updateOpacity()}}if(this.options.interactive){_e(this._image,"leaflet-interactive");this.addInteractiveTarget(this._image)}this.getPane().appendChild(this._image);this._reset()},onRemove:function(){pe(this._image);if(this.options.interactive){this.removeInteractiveTarget(this._image)}},setOpacity:function(t){this.options.opacity=t;if(this._image){this._updateOpacity()}return this},setStyle:function(t){if(t.opacity){this.setOpacity(t.opacity)}return this},bringToFront:function(){if(this._map){me(this._image)}return this},bringToBack:function(){if(this._map){ge(this._image)}return this},setUrl:function(t){this._url=t;if(this._image){this._image.src=t}return this},setBounds:function(t){this._bounds=U(t);if(this._map){this._reset()}return this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};if(this._zoomAnimated){t.zoomanim=this._animateZoom}return t},setZIndex:function(t){this.options.zIndex=t;this._updateZIndex();return this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t=this._url.tagName==="IMG";var e=this._image=t?this._url:de("img");_e(e,"leaflet-image-layer");if(this._zoomAnimated){_e(e,"leaflet-zoom-animated")}if(this.options.className){_e(e,this.options.className)}e.onselectstart=h;e.onmousemove=h;e.onload=s(this.fire,this,"load");e.onerror=s(this._overlayOnError,this,"error");if(this.options.crossOrigin||this.options.crossOrigin===""){e.crossOrigin=this.options.crossOrigin===true?"":this.options.crossOrigin}if(this.options.zIndex){this._updateZIndex()}if(t){this._url=e.src;return}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;Me(this._image,i,e)},_reset:function(){var t=this._image,e=new F(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();Ce(t,e.min);t.style.width=i.x+"px";t.style.height=i.y+"px"},_updateOpacity:function(){we(this._image,this.options.opacity)},_updateZIndex:function(){if(this._image&&this.options.zIndex!==undefined&&this.options.zIndex!==null){this._image.style.zIndex=this.options.zIndex}},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;if(t&&this._url!==t){this._url=t;this._image.src=t}}}),Ln=function(t,e,i){return new kn(t,e,i)},Mn=kn.extend({options:{autoplay:true,loop:true,keepAspectRatio:true},_initImage:function(){var t=this._url.tagName==="VIDEO";var e=this._image=t?this._url:de("video");_e(e,"leaflet-image-layer");if(this._zoomAnimated){_e(e,"leaflet-zoom-animated")}if(this.options.className){_e(e,this.options.className)}e.onselectstart=h;e.onmousemove=h;e.onloadeddata=s(this.fire,this,"load");if(t){var i=e.getElementsByTagName("source");var n=[];for(var r=0;r<i.length;r++){n.push(i[r].src)}this._url=i.length>0?n:[e.src];return}if(!_(this._url)){this._url=[this._url]}if(!this.options.keepAspectRatio&&e.style.hasOwnProperty("objectFit")){e.style["objectFit"]="fill"}e.autoplay=!!this.options.autoplay;e.loop=!!this.options.loop;for(var o=0;o<this._url.length;o++){var a=de("source");a.src=this._url[o];e.appendChild(a)}}});function Cn(t,e,i){return new Mn(t,e,i)}var Tn=kn.extend({_initImage:function(){var t=this._image=this._url;_e(t,"leaflet-image-layer");if(this._zoomAnimated){_e(t,"leaflet-zoom-animated")}if(this.options.className){_e(t,this.options.className)}t.onselectstart=h;t.onmousemove=h}});function Pn(t,e,i){return new Tn(t,e,i)}var Sn=Hi.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,e){f(this,t);this._source=e},onAdd:function(t){this._zoomAnimated=t._zoomAnimated;if(!this._container){this._initLayout()}if(t._fadeAnimated){we(this._container,0)}clearTimeout(this._removeTimeout);this.getPane().appendChild(this._container);this.update();if(t._fadeAnimated){we(this._container,1)}this.bringToFront()},onRemove:function(t){if(t._fadeAnimated){we(this._container,0);this._removeTimeout=setTimeout(s(pe,undefined,this._container),200)}else{pe(this._container)}},getLatLng:function(){return this._latlng},setLatLng:function(t){this._latlng=j(t);if(this._map){this._updatePosition();this._adjustPan()}return this},getContent:function(){return this._content},setContent:function(t){this._content=t;this.update();return this},getElement:function(){return this._container},update:function(){if(!this._map){return}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};if(this._zoomAnimated){t.zoomanim=this._animateZoom}return t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){if(this._map){me(this._container)}return this},bringToBack:function(){if(this._map){ge(this._container)}return this}
6,_prepareOpen:function(t,e,i){if(!(e instanceof Hi)){i=e;e=t}if(e instanceof qi){for(var n in t._layers){e=t._layers[n];break}}if(!i){if(e.getCenter){i=e.getCenter()}else if(e.getLatLng){i=e.getLatLng()}else{throw new Error("Unable to get source layer LatLng.")}}this._source=e;this.update();return i},_updateContent:function(){if(!this._content){return}var t=this._contentNode;var e=typeof this._content==="function"?this._content(this._source||this):this._content;if(typeof e==="string"){t.innerHTML=e}else{while(t.hasChildNodes()){t.removeChild(t.firstChild)}t.appendChild(e)}this.fire("contentupdate")},_updatePosition:function(){if(!this._map){return}var t=this._map.latLngToLayerPoint(this._latlng),e=B(this.options.offset),i=this._getAnchor();if(this._zoomAnimated){Ce(this._container,t.add(i))}else{e=e.add(t).add(i)}var n=this._containerBottom=-e.y,r=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=n+"px";this._container.style.left=r+"px"},_getAnchor:function(){return[0,0]}}),An=Sn.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:true,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:false,closeButton:true,autoClose:true,closeOnEscapeKey:true,className:""},openOn:function(t){t.openPopup(this);return this},onAdd:function(t){Sn.prototype.onAdd.call(this,t);t.fire("popupopen",{popup:this});if(this._source){this._source.fire("popupopen",{popup:this},true);if(!(this._source instanceof en)){this._source.on("preclick",Ze)}}},onRemove:function(t){Sn.prototype.onRemove.call(this,t);t.fire("popupclose",{popup:this});if(this._source){this._source.fire("popupclose",{popup:this},true);if(!(this._source instanceof en)){this._source.off("preclick",Ze)}}},getEvents:function(){var t=Sn.prototype.getEvents.call(this);if(this.options.closeOnClick!==undefined?this.options.closeOnClick:this._map.options.closePopupOnClick){t.preclick=this._close}if(this.options.keepInView){t.moveend=this._adjustPan}return t},_close:function(){if(this._map){this._map.closePopup(this)}},_initLayout:function(){var t="leaflet-popup",e=this._container=de("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated");var i=this._wrapper=de("div",t+"-content-wrapper",e);this._contentNode=de("div",t+"-content",i);We(i);je(this._contentNode);Be(i,"contextmenu",Ze);this._tipContainer=de("div",t+"-tip-container",e);this._tip=de("div",t+"-tip",this._tipContainer);if(this.options.closeButton){var n=this._closeButton=de("a",t+"-close-button",e);n.href="#close";n.innerHTML="×";Be(n,"click",this._onCloseButtonClick,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 n=t.offsetHeight,r=this.options.maxHeight,o="leaflet-popup-scrolled";if(r&&n>r){e.height=r+"px";_e(t,o)}else{ye(t,o)}this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();Ce(this._container,e.add(i))},_adjustPan:function(){if(!this.options.autoPan){return}if(this._map._panAnim){this._map._panAnim.stop()}var t=this._map,e=parseInt(ce(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,r=new z(this._containerLeft,-i-this._containerBottom);r._add(Te(this._container));var o=t.layerPointToContainerPoint(r),a=B(this.options.autoPanPadding),s=B(this.options.autoPanPaddingTopLeft||a),l=B(this.options.autoPanPaddingBottomRight||a),u=t.getSize(),h=0,c=0;if(o.x+n+l.x>u.x){h=o.x+n-u.x+l.x}if(o.x-h-s.x<0){h=o.x-s.x}if(o.y+i+l.y>u.y){c=o.y+i-u.y+l.y}if(o.y-c-s.y<0){c=o.y-s.y}if(h||c){t.fire("autopanstart").panBy([h,c])}},_onCloseButtonClick:function(t){this._close();Ge(t)},_getAnchor:function(){return B(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),In=function(t,e){return new An(t,e)};ni.mergeOptions({closePopupOnClick:true}
6),ni.include({openPopup:function(t,e,i){if(!(t instanceof An)){t=new An(i).setContent(t)}if(e){t.setLatLng(e)}if(this.hasLayer(t)){return this}if(this._popup&&this._popup.options.autoClose){this.closePopup()}this._popup=t;return this.addLayer(t)},closePopup:function(t){if(!t||t===this._popup){t=this._popup;this._popup=null}if(t){this.removeLayer(t)}return this}}),Hi.include({bindPopup:function(t,e){if(t instanceof An){f(t,e);this._popup=t;t._source=this}else{if(!this._popup||e){this._popup=new An(e,this)}this._popup.setContent(t)}if(!this._popupHandlersAdded){this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup});this._popupHandlersAdded=true}return this},unbindPopup:function(){if(this._popup){this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup});this._popupHandlersAdded=false;this._popup=null}return this},openPopup:function(t,e){if(this._popup&&this._map){e=this._popup._prepareOpen(this,t,e);this._map.openPopup(this._popup,e)}return this},closePopup:function(){if(this._popup){this._popup._close()}return this},togglePopup:function(t){if(this._popup){if(this._popup._map){this.closePopup()}else{this.openPopup(t)}}return this},isPopupOpen:function(){return this._popup?this._popup.isOpen():false},setPopupContent:function(t){if(this._popup){this._popup.setContent(t)}return this},getPopup:function(){return this._popup},_openPopup:function(t){var e=t.layer||t.target;if(!this._popup){return}if(!this._map){return}Ge(t);if(e instanceof en){this.openPopup(t.layer||t.target,t.latlng);return}if(this._map.hasLayer(this._popup)&&this._popup._source===e){this.closePopup()}else{this.openPopup(e,t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){if(t.originalEvent.keyCode===13){this._openPopup(t)}}});var Dn=Sn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:false,sticky:false,interactive:false,opacity:.9},onAdd:function(t){Sn.prototype.onAdd.call(this,t);this.setOpacity(this.options.opacity);t.fire("tooltipopen",{tooltip:this});if(this._source){this._source.fire("tooltipopen",{tooltip:this},true)}},onRemove:function(t){Sn.prototype.onRemove.call(this,t);t.fire("tooltipclose",{tooltip:this});if(this._source){this._source.fire("tooltipclose",{tooltip:this},true)}},getEvents:function(){var t=Sn.prototype.getEvents.call(this);if(Lt&&!this.options.permanent){t.preclick=this._close}return t},_close:function(){if(this._map){this._map.closeTooltip(this)}},_initLayout:function(){var t="leaflet-tooltip",e=t+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=de("div",e)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e=this._map,i=this._container,n=e.latLngToContainerPoint(e.getCenter()),r=e.layerPointToContainerPoint(t),o=this.options.direction,a=i.offsetWidth,s=i.offsetHeight,l=B(this.options.offset),u=this._getAnchor();if(o==="top"){t=t.add(B(-a/2+l.x,-s+l.y+u.y,true))}else if(o==="bottom"){t=t.subtract(B(a/2-l.x,-l.y,true))}else if(o==="center"){t=t.subtract(B(a/2+l.x,s/2-u.y+l.y,true))}else if(o==="right"||o==="auto"&&r.x<n.x){o="right";t=t.add(B(l.x+u.x,u.y-s/2+l.y,true))}else{o="left";t=t.subtract(B(a+u.x-l.x,s/2-u.y-l.y,true))}ye(i,"leaflet-tooltip-right");ye(i,"leaflet-tooltip-left");ye(i,"leaflet-tooltip-top");ye(i,"leaflet-tooltip-bottom");_e(i,"leaflet-tooltip-"+o);Ce(i,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t;if(this._container){we(this._container,t)}},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return B(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),On=function(t,e){return new Dn(t,e)};ni.include({openTooltip:function(t,e,i){if(!(t instanceof Dn)){t=new Dn(i).setContent(t)}if(e){t.setLatLng(e)}if(this.hasLayer(t)){return this}return this.addLayer(t)},closeTooltip:function(t){if(t){this.removeLayer(t)}return this}}),Hi.include({bindTooltip:function(t,e){if(t instanceof Dn){f(t,e);this._tooltip=t;t._source=this}else{if(!this._tooltip||e){this._tooltip=new Dn(e,this)}this._tooltip.setContent(t)}this._initTooltipInteractions();if(this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)){this.openTooltip()}return this},unbindTooltip:function(){if(this._tooltip){this._initTooltipInteractions(true);this.closeTooltip();this._tooltip=null}return this},_initTooltipInteractions:function(t){if(!t&&this._tooltipHandlersAdded){return}var e=t?"off":"on",i={remove:this.closeTooltip,move:this._moveTooltip};if(!this._tooltip.options.permanent){i.mouseover=this._openTooltip;i.mouseout=this.closeTooltip;if(this._tooltip.options.sticky){i.mousemove=this._moveTooltip}if(Lt){i.click=this._openTooltip}}else{i.add=this._openTooltip}this[e](i);this._tooltipHandlersAdded=!t},openTooltip:function(t,e){if(this._tooltip&&this._map){e=this._tooltip._prepareOpen(this,t,e);this._map.openTooltip(this._tooltip,e);if(this._tooltip.options.interactive&&this._tooltip._container){_e(this._tooltip._container,"leaflet-clickable");this.addInteractiveTarget(this._tooltip._container)}}return this},closeTooltip:function(){if(this._tooltip){this._tooltip._close();if(this._tooltip.options.interactive&&this._tooltip._container){ye(this._tooltip._container,"leaflet-clickable");this.removeInteractiveTarget(this._tooltip._container)}}return this},toggleTooltip:function(t){if(this._tooltip){if(this._tooltip._map){this.closeTooltip()}else{this.openTooltip(t)}}return this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){if(this._tooltip){this._tooltip.setContent(t)}return this},getTooltip:function(){return this._tooltip},_openTooltip:function(t){var e=t.layer||t.target;if(!this._tooltip||!this._map){return}this.openTooltip(e,this._tooltip.options.sticky?t.latlng:undefined)},_moveTooltip:function(t){var e=t.latlng,i,n;if(this._tooltip.options.sticky&&t.originalEvent){i=this._map.mouseEventToContainerPoint(t.originalEvent);n=this._map.containerPointToLayerPoint(i);e=this._map.layerPointToLatLng(n)}this._tooltip.setLatLng(e)}});var zn=Ji.extend({options:{iconSize:[12,12],html:false,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&t.tagName==="DIV"?t:document.createElement("div"),i=this.options;if(i.html instanceof Element){fe(e);e.appendChild(i.html)}else{e.innerHTML=i.html!==false?i.html:""}if(i.bgPos){var n=B(i.bgPos);e.style.backgroundPosition=-n.x+"px "+-n.y+"px"}this._setIconStyles(e,"icon");return e},createShadow:function(){return null}});function En(t){return new zn(t)}Ji.Default=Xi;var Bn=Hi.extend({options:{tileSize:256,opacity:1,updateWhenIdle:yt,updateWhenZooming:true,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:undefined,maxNativeZoom:undefined,minNativeZoom:undefined,noWrap:false,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){f(this,t)},onAdd:function(){this._initContainer();this._levels={};this._tiles={};this._resetView();this._update()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles();pe(this._container);t._removeZoomLimit(this);this._container=null;this._tileZoom=undefined},bringToFront:function(){if(this._map){me(this._container);this._setAutoZIndex(Math.max)}return this},bringToBack:function(){if(this._map){ge(this._container);this._setAutoZIndex(Math.min)}return this},getContainer:function(){return this._container},setOpacity:function(t){this.options.opacity=t;this._updateOpacity();return this},setZIndex:function(t){this.options.zIndex=t;this._updateZIndex();return this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();this._update()}return this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};if(!this.options.updateWhenIdle){if(!this._onMove){this._onMove=r(this._onMoveEnd,this.options.updateInterval,this)}t.move=this._onMove}if(this._zoomAnimated){t.zoomanim=this._animateZoom}return t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof z?t:new z(t,t)},_updateZIndex:function(){if(this._container&&this.options.zIndex!==undefined&&this.options.zIndex!==null){this._container.style.zIndex=this.options.zIndex}},_setAutoZIndex:function(t){var e=this.getPane().children,i=-t(-Infinity,Infinity);for(var n=0,r=e.length,o;n<r;n++){o=e[n].style.zIndex;if(e[n]!==this._container&&o){i=t(i,+o)}}if(isFinite(i)){this.options.zIndex=i+t(-1,1);this._updateZIndex()}},_updateOpacity:function(){if(!this._map){return}if(et){return}we(this._container,this.options.opacity);var t=+new Date,e=false,i=false;for(var n in this._tiles){var r=this._tiles[n];if(!r.current||!r.loaded){continue}var o=Math.min(1,(t-r.loaded)/200);we(r.el,o);if(o<1){e=true}else{if(r.active){i=true}else{this._onOpaqueTile(r)}r.active=true}}if(i&&!this._noPrune){this._pruneTiles()}if(e){P(this._fadeFrame);this._fadeFrame=T(this._updateOpacity,this)}},_onOpaqueTile:h,_initContainer:function(){if(this._container){return}this._container=de("div","leaflet-layer "+(this.options.className||""));this._updateZIndex();if(this.options.opacity<1){this._updateOpacity()}this.getPane().appendChild(this._container)},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(t===undefined){return undefined}for(var i in this._levels){if(this._levels[i].el.children.length||i===t){this._levels[i].el.style.zIndex=e-Math.abs(t-i);this._onUpdateLevel(i)}else{pe(this._levels[i].el);this._removeTilesAtZoom(i);this._onRemoveLevel(i);delete this._levels[i]}}var n=this._levels[t],r=this._map;if(!n){n=this._levels[t]={};n.el=de("div","leaflet-tile-container leaflet-zoom-animated",this._container);n.el.style.zIndex=e;n.origin=r.project(r.unproject(r.getPixelOrigin()),t).round();n.zoom=t;this._setZoomTransform(n,r.getCenter(),r.getZoom());h(n.el.offsetWidth);this._onCreateLevel(n)}this._level=n;return n},_onUpdateLevel:h,_onRemoveLevel:h,_onCreateLevel:h,_pruneTiles:function(){if(!this._map){return}var t,e;var i=this._map.getZoom();if(i>this.options.maxZoom||i<this.options.minZoom){this._removeAllTiles();return}for(t in this._tiles){e=this._tiles[t];e.retain=e.current}for(t in this._tiles){e=this._tiles[t];if(e.current&&!e.active){var n=e.coords;if(!this._retainParent(n.x,n.y,n.z,n.z-5)){this._retainChildren(n.x,n.y,n.z,n.z+2)}}}
6for(t in this._tiles){if(!this._tiles[t].retain){this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var e in this._tiles){if(this._tiles[e].coords.z!==t){continue}this._removeTile(e)}},_removeAllTiles:function(){for(var t in this._tiles){this._removeTile(t)}},_invalidateAll:function(){for(var t in this._levels){pe(this._levels[t].el);this._onRemoveLevel(t);delete this._levels[t]}this._removeAllTiles();this._tileZoom=undefined},_retainParent:function(t,e,i,n){var r=Math.floor(t/2),o=Math.floor(e/2),a=i-1,s=new z(+r,+o);s.z=+a;var l=this._tileCoordsToKey(s),u=this._tiles[l];if(u&&u.active){u.retain=true;return true}else if(u&&u.loaded){u.retain=true}if(a>n){return this._retainParent(r,o,a,n)}return false},_retainChildren:function(t,e,i,n){for(var r=2*t;r<2*t+2;r++){for(var o=2*e;o<2*e+2;o++){var a=new z(r,o);a.z=i+1;var s=this._tileCoordsToKey(a),l=this._tiles[s];if(l&&l.active){l.retain=true;continue}else if(l&&l.loaded){l.retain=true}if(i+1<n){this._retainChildren(r,o,i+1,n)}}}},_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,true,t.noUpdate)},_clampZoom:function(t){var e=this.options;if(undefined!==e.minNativeZoom&&t<e.minNativeZoom){return e.minNativeZoom}if(undefined!==e.maxNativeZoom&&e.maxNativeZoom<t){return e.maxNativeZoom}return t},_setView:function(t,e,i,n){var r=this._clampZoom(Math.round(e));if(this.options.maxZoom!==undefined&&r>this.options.maxZoom||this.options.minZoom!==undefined&&r<this.options.minZoom){r=undefined}var o=this.options.updateWhenZooming&&r!==this._tileZoom;if(!n||o){this._tileZoom=r;if(this._abortLoading){this._abortLoading()}this._updateLevels();this._resetGrid();if(r!==undefined){this._update(t)}if(!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 n=this._map.getZoomScale(i,t.zoom),r=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(e,i)).round();if(_t){Me(t.el,r,n)}else{Ce(t.el,r)}},_resetGrid:function(){var t=this._map,e=t.options.crs,i=this._tileSize=this.getTileSize(),n=this._tileZoom;var r=this._map.getPixelWorldBounds(this._tileZoom);if(r){this._globalTileRange=this._pxBoundsToTileRange(r)}this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],n).x/i.x),Math.ceil(t.project([0,e.wrapLng[1]],n).x/i.y)];this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],n).y/i.x),Math.ceil(t.project([e.wrapLat[1],0],n).y/i.y)]},_onMoveEnd:function(){if(!this._map||this._map._animatingZoom){return}this._update()},_getTiledPixelBounds:function(t){var e=this._map,i=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),n=e.getZoomScale(i,this._tileZoom),r=e.project(t,this._tileZoom).floor(),o=e.getSize().divideBy(n*2);return new F(r.subtract(o),r.add(o))},_update:function(t){var e=this._map;if(!e){return}var i=this._clampZoom(e.getZoom());if(t===undefined){t=e.getCenter()}if(this._tileZoom===undefined){return}var n=this._getTiledPixelBounds(t),r=this._pxBoundsToTileRange(n),o=r.getCenter(),a=[],s=this.options.keepBuffer,l=new F(r.getBottomLeft().subtract([s,-s]),r.getTopRight().add([s,-s]));if(!(isFinite(r.min.x)&&isFinite(r.min.y)&&isFinite(r.max.x)&&isFinite(r.max.y))){throw new Error("Attempted to load an infinite number of tiles")}for(var u in this._tiles){var h=this._tiles[u].coords;if(h.z!==this._tileZoom||!l.contains(new z(h.x,h.y))){this._tiles[u].current=false}}if(Math.abs(i-this._tileZoom)>1){this._setView(t,i);return}for(var c=r.min.y;c<=r.max.y;c++){for(var d=r.min.x;d<=r.max.x;d++){var p=new z(d,c);p.z=this._tileZoom;if(!this._isValidTile(p)){continue}var f=this._tiles[this._tileCoordsToKey(p)];if(f){f.current=true}else{a.push(p)}}}a.sort(function(t,e){return t.distanceTo(o)-e.distanceTo(o)});if(a.length!==0){if(!this._loading){this._loading=true;this.fire("loading")}var m=document.createDocumentFragment();for(d=0;d<a.length;d++){this._addTile(a[d],m)}this._level.el.appendChild(m)}},_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 false}}if(!this.options.bounds){return true}var n=this._tileCoordsToBounds(t);return U(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),r=n.add(i),o=e.unproject(n,t.z),a=e.unproject(r,t.z);return[o,a]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new N(e[0],e[1]);if(!this.options.noWrap){i=this._map.wrapLatLngBounds(i)}return i},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new z(+e[0],+e[1]);i.z=+e[2];return i},_removeTile:function(t){var e=this._tiles[t];if(!e){return}pe(e.el);delete this._tiles[t];this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)})},_initTile:function(t){_e(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;if(et&&this.options.opacity<1){we(t,this.options.opacity)}if(rt&&!ot){t.style.WebkitBackfaceVisibility="hidden"}},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t);var r=this.createTile(this._wrapCoords(t),s(this._tileReady,this,t));this._initTile(r);if(this.createTile.length<2){T(s(this._tileReady,this,t,null,r))}Ce(r,i);this._tiles[n]={el:r,coords:t,current:true};e.appendChild(r);this.fire("tileloadstart",{tile:r,coords:t})}
6,_tileReady:function(t,e,i){if(e){this.fire("tileerror",{error:e,tile:i,coords:t})}var n=this._tileCoordsToKey(t);i=this._tiles[n];if(!i){return}i.loaded=+new Date;if(this._map._fadeAnimated){we(i.el,0);P(this._fadeFrame);this._fadeFrame=T(this._updateOpacity,this)}else{i.active=true;this._pruneTiles()}if(!e){_e(i.el,"leaflet-tile-loaded");this.fire("tileload",{tile:i.el,coords:t})}if(this._noTilesToLoad()){this._loading=false;this.fire("load");if(et||!this._map._fadeAnimated){T(this._pruneTiles,this)}else{setTimeout(s(this._pruneTiles,this),250)}}},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new z(this._wrapX?a(t.x,this._wrapX):t.x,this._wrapY?a(t.y,this._wrapY):t.y);e.z=t.z;return e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new F(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 false}}return true}});function Fn(t){return new Bn(t)}var Rn=Bn.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:false,zoomReverse:false,detectRetina:false,crossOrigin:false},initialize:function(t,e){this._url=t;e=f(this,e);if(e.detectRetina&&Tt&&e.maxZoom>0){e.tileSize=Math.floor(e.tileSize/2);if(!e.zoomReverse){e.zoomOffset++;e.maxZoom--}else{e.zoomOffset--;e.minZoom++}e.minZoom=Math.max(0,e.minZoom)}if(typeof e.subdomains==="string"){e.subdomains=e.subdomains.split("")}if(!rt){this.on("tileunload",this._onTileRemove)}},setUrl:function(t,e){if(this._url===t&&e===undefined){e=true}this._url=t;if(!e){this.redraw()}return this},createTile:function(t,e){var i=document.createElement("img");Be(i,"load",s(this._tileOnLoad,this,e,i));Be(i,"error",s(this._tileOnError,this,e,i));if(this.options.crossOrigin||this.options.crossOrigin===""){i.crossOrigin=this.options.crossOrigin===true?"":this.options.crossOrigin}i.alt="";i.setAttribute("role","presentation");i.src=this.getTileUrl(t);return i},getTileUrl:function(t){var e={r:Tt?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;if(this.options.tms){e["y"]=i}e["-y"]=i}return v(this._url,l(e,this.options))},_tileOnLoad:function(t,e){if(et){setTimeout(s(t,this,null,e),0)}else{t(null,e)}},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;if(n&&e.getAttribute("src")!==n){e.src=n}t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,i=this.options.zoomReverse,n=this.options.zoomOffset;if(i){t=e-t}return t+n},_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;e.onload=h;e.onerror=h;if(!e.complete){e.src=x;pe(e);delete this._tiles[t]}}}},_removeTile:function(t){var e=this._tiles[t];if(!e){return}if(!st){e.el.setAttribute("src",x)}return Bn.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(!this._map||i&&i.getAttribute("src")===x){return}return Bn.prototype._tileReady.call(this,t,e,i)}});function Nn(t,e){return new Rn(t,e)}var Un=Rn.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:false,version:"1.1.1"},options:{crs:null,uppercase:false},initialize:function(t,e){this._url=t;var i=l({},this.defaultWmsParams);for(var n in e){if(!(n in this.options)){i[n]=e[n]}}e=f(this,e);var r=e.detectRetina&&Tt?2:1;var o=this.getTileSize();i.width=o.x*r;i.height=o.y*r;this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs;this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code;Rn.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,n=R(i.project(e[0]),i.project(e[1])),r=n.min,o=n.max,a=(this._wmsVersion>=1.3&&this._crs===ji?[r.y,r.x,o.y,o.x]:[r.x,r.y,o.x,o.y]).join(","),s=Rn.prototype.getTileUrl.call(this,t);return s+m(this.wmsParams,s,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+a},setParams:function(t,e){l(this.wmsParams,t);if(!e){this.redraw()}return this}});function Zn(t,e){return new Un(t,e)}Rn.WMS=Un,Nn.wms=Zn;var jn=Hi.extend({options:{padding:.1,tolerance:0},initialize:function(t){f(this,t);u(this);this._layers=this._layers||{}},onAdd:function(){if(!this._container){this._initContainer();if(this._zoomAnimated){_e(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};if(this._zoomAnimated){t.zoomanim=this._onAnimZoom}return 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),n=Te(this._container),r=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),a=this._map.project(t,e),s=a.subtract(o),l=r.multiplyBy(-i).add(n).add(r).subtract(s);if(_t){Me(this._container,l,i)}else{Ce(this._container,l)}},_reset:function(){this._update();this._updateTransform(this._center,this._zoom);for(var t in this._layers){this._layers[t]._reset()}},_onZoomEnd:function(){for(var t in this._layers){this._layers[t]._project()}},_updatePaths:function(){for(var t in this._layers){this._layers[t]._update()}},_update:function(){var t=this.options.padding,e=this._map.getSize(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).roun
6d();this._bounds=new F(i,i.add(e.multiplyBy(1+t*2)).round());this._center=this._map.getCenter();this._zoom=this._map.getZoom()}}),Wn=jn.extend({getEvents:function(){var t=jn.prototype.getEvents.call(this);t.viewprereset=this._onViewPreReset;return t},_onViewPreReset:function(){this._postponeUpdatePaths=true},onAdd:function(){jn.prototype.onAdd.call(this);this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Be(t,"mousemove",this._onMouseMove,this);Be(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this);Be(t,"mouseout",this._handleMouseOut,this);this._ctx=t.getContext("2d")},_destroyContainer:function(){P(this._redrawRequest);delete this._ctx;pe(this._container);Re(this._container);delete this._container},_updatePaths:function(){if(this._postponeUpdatePaths){return}var t;this._redrawBounds=null;for(var e in this._layers){t=this._layers[e];t._update()}this._redraw()},_update:function(){if(this._map._animatingZoom&&this._bounds){return}jn.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),n=Tt?2:1;Ce(e,t.min);e.width=n*i.x;e.height=n*i.y;e.style.width=i.x+"px";e.style.height=i.y+"px";if(Tt){this._ctx.scale(2,2)}this._ctx.translate(-t.min.x,-t.min.y);this.fire("update")},_reset:function(){jn.prototype._reset.call(this);if(this._postponeUpdatePaths){this._postponeUpdatePaths=false;this._updatePaths()}},_initPath:function(t){this._updateDashArray(t);this._layers[u(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};if(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;var i=e.next;var n=e.prev;if(i){i.prev=n}else{this._drawLast=n}if(n){n.next=i}else{this._drawFirst=i}delete t._order;delete this._layers[u(t)];this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t);t._project();t._update();this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t);this._requestRedraw(t)},_updateDashArray:function(t){if(typeof t.options.dashArray==="string"){var e=t.options.dashArray.split(/[, ]+/),i=[],n,r;for(r=0;r<e.length;r++){n=Number(e[r]);if(isNaN(n)){return}i.push(n)}t.options._dashArray=i}else{t.options._dashArray=t.options.dashArray}},_requestRedraw:function(t){if(!this._map){return}this._extendRedrawBounds(t);this._redrawRequest=this._redrawRequest||T(this._redraw,this)},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new F;this._redrawBounds.extend(t._pxBounds.min.subtract([e,e]));this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_redraw:function(){this._redrawRequest=null;if(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.clearRect(0,0,this._container.width,this._container.height)}},_draw:function(){var t,e=this._redrawBounds;this._ctx.save();if(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=true;for(var n=this._drawFirst;n;n=n.next){t=n.layer;if(!e||t._pxBounds&&t._pxBounds.intersects(e)){t._updatePath()}}this._drawing=false;this._ctx.restore()},_updatePoly:function(t,e){if(!this._drawing){return}var i,n,r,o,a=t._parts,s=a.length,l=this._ctx;if(!s){return}l.beginPath();for(i=0;i<s;i++){for(n=0,r=a[i].length;n<r;n++){o=a[i][n];l[n?"lineTo":"moveTo"](o.x,o.y)}if(e){l.closePath()}}this._fillStroke(l,t)},_updateCircle:function(t){if(!this._drawing||t._empty()){return}var e=t._point,i=this._ctx,n=Math.max(Math.round(t._radius),1),r=(Math.max(Math.round(t._radiusY),1)||n)/n;if(r!==1){i.save();i.scale(1,r)}i.beginPath();i.arc(e.x,e.y/r,n,0,Math.PI*2,false);if(r!==1){i.restore()}this._fillStroke(i,t)},_fillStroke:function(t,e){var i=e.options;if(i.fill){t.globalAlpha=i.fillOpacity;t.fillStyle=i.fillColor||i.color;t.fill(i.fillRule||"evenodd")}if(i.stroke&&i.weight!==0){if(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){var e=this._map.mouseEventToLayerPoint(t),i,n;for(var r=this._drawFirst;r;r=r.next){i=r.layer;if(i.options.interactive&&i._containsPoint(e)&&!this._map._draggableMoved(i)){n=i}}if(n){Xe(t);this._fireEvent([n],t)}},_onMouseMove:function(t){if(!this._map||this._map.dragging.moving()||this._map._animatingZoom){return}var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)},_handleMouseOut:function(t){var e=this._hoveredLayer;if(e){ye(this._container,"leaflet-interactive");this._fireEvent([e],t,"mouseout");this._hoveredLayer=null;this._mouseHoverThrottled=false}},_handleMouseHover:function(t,e){if(this._mouseHoverThrottled){return}var i,n;for(var r=this._drawFirst;r;r=r.next){i=r.layer;if(i.options.interactive&&i._containsPoint(e)){n=i}}if(n!==this._hoveredLayer){this._handleMouseOut(t);if(n){_e(this._container,"leaflet-interactive");this._fireEvent([n],t,"mouseover");this._hoveredLayer=n}}if(this._hoveredLayer){this._fireEvent([this._hoveredLayer],t)}this._mouseHoverThrottled=true;setTimeout(L.bind(function(){this._mouseHoverThrottled=false},this),32)}
6,_fireEvent:function(t,e,i){this._map._fireDOMEvent(e,i||e.type,t)},_bringToFront:function(t){var e=t._order;if(!e){return}var i=e.next;var n=e.prev;if(i){i.prev=n}else{return}if(n){n.next=i}else if(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){return}var i=e.next;var n=e.prev;if(n){n.next=i}else{return}if(i){i.prev=n}else if(n){this._drawLast=n}e.prev=null;e.next=this._drawFirst;this._drawFirst.prev=e;this._drawFirst=e;this._requestRedraw(t)}});function Hn(t){return St?new Wn(t):null}var Gn=function(){try{document.namespaces.add("lvml","urn:schemas-microsoft-com:vml");return 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">')}}}(),Vn={_initContainer:function(){this._container=de("div","leaflet-vml-container")},_update:function(){if(this._map._animatingZoom){return}jn.prototype._update.call(this);this.fire("update")},_initPath:function(t){var e=t._container=Gn("shape");_e(e,"leaflet-vml-shape "+(this.options.className||""));e.coordsize="1 1";t._path=Gn("path");e.appendChild(t._path);this._updateStyle(t);this._layers[u(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e);if(t.options.interactive){t.addInteractiveTarget(e)}},_removePath:function(t){var e=t._container;pe(e);t.removeInteractiveTarget(e);delete this._layers[u(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,r=t._container;r.stroked=!!n.stroke;r.filled=!!n.fill;if(n.stroke){if(!e){e=t._stroke=Gn("stroke")}r.appendChild(e);e.weight=n.weight+"px";e.color=n.color;e.opacity=n.opacity;if(n.dashArray){e.dashStyle=_(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," ")}else{e.dashStyle=""}e.endcap=n.lineCap.replace("butt","flat");e.joinstyle=n.lineJoin}else if(e){r.removeChild(e);t._stroke=null}if(n.fill){if(!i){i=t._fill=Gn("fill")}r.appendChild(i);i.color=n.fillColor||n.color;i.opacity=n.fillOpacity}else if(i){r.removeChild(i);t._fill=null}},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,"+65535*360)},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){me(t._container)},_bringToBack:function(t){ge(t._container)}},qn=It?Gn:X,Kn=jn.extend({getEvents:function(){var t=jn.prototype.getEvents.call(this);t.zoomstart=this._onZoomStart;return t},_initContainer:function(){this._container=qn("svg");this._container.setAttribute("pointer-events","none");this._rootGroup=qn("g");this._container.appendChild(this._rootGroup)},_destroyContainer:function(){pe(this._container);Re(this._container);delete this._container;delete this._rootGroup;delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(this._map._animatingZoom&&this._bounds){return}jn.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container;if(!this._svgSize||!this._svgSize.equals(e)){this._svgSize=e;i.setAttribute("width",e.x);i.setAttribute("height",e.y)}Ce(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=qn("path");if(t.options.className){_e(e,t.options.className)}if(t.options.interactive){_e(e,"leaflet-interactive")}this._updateStyle(t);this._layers[u(t)]=t},_addPath:function(t){if(!this._rootGroup){this._initContainer()}this._rootGroup.appendChild(t._path);t.addInteractiveTarget(t._path)},_removePath:function(t){pe(t._path);t.removeInteractiveTarget(t._path);delete this._layers[u(t)]},_updatePath:function(t){t._project();t._update()},_updateStyle:function(t){var e=t._path,i=t.options;if(!e){return}if(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);if(i.dashArray){e.setAttribute("stroke-dasharray",i.dashArray)}else{e.removeAttribute("stroke-dasharray")}if(i.dashOffset){e.setAttribute("stroke-dashoffset",i.dashOffset)}else{e.removeAttribute("stroke-dashoffset")}}else{e.setAttribute("stroke","none")}if(i.fill){e.setAttribute("fill",i.fillColor||i.color);e.setAttribute("fill-opacity",i.fillOpacity);e.setAttribute("fill-rule",i.fillRule||"evenodd")}else{e.setAttribute("fill","none")}},_updatePoly:function(t,e){this._setPath(t,Q(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n=Math.max(Math.round(t._radiusY),1)||i,r="a"+i+","+n+" 0 1,0 ";var o=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+r+i*2+",0 "+r+-i*2+",0 ";this._setPath(t,o)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){me(t._path)},_bringToBack:function(t){ge(t._path)}});if(It){Kn.include(Vn)}function Jn(t){return At||It?new Kn(t):null}ni.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;if(!e){e=this._renderer=this._createRenderer()}if(!this.hasLayer(e)){this.addLayer(e)}return e},_getPaneRenderer:function(t){if(t==="overlayPane"||t===undefined){return false}var e=this._paneRenderers[t];if(e===undefined){e=this._createRenderer({pane:t});this._paneRenderers[t]=e}return e},_createRenderer:function(t){return this.options.preferCanvas&&Hn(t)||Jn(t)}});var Yn=un.extend({initialize:function(t,e){un.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){t=U(t);
6return[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function Xn(t,e){return new Yn(t,e)}Kn.create=qn,Kn.pointsToPath=Q,cn.geometryToLayer=dn,cn.coordsToLatLng=fn,cn.coordsToLatLngs=mn,cn.latLngToCoords=gn,cn.latLngsToCoords=vn,cn.getFeature=_n,cn.asFeature=yn,ni.mergeOptions({boxZoom:true});var Qn=mi.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(){Be(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Re(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){pe(this._pane);delete this._pane},_resetState:function(){this._resetStateTimeout=0;this._moved=false},_clearDeferredResetState:function(){if(this._resetStateTimeout!==0){clearTimeout(this._resetStateTimeout);this._resetStateTimeout=0}},_onMouseDown:function(t){if(!t.shiftKey||t.which!==1&&t.button!==1){return false}this._clearDeferredResetState();this._resetState();oe();Se();this._startPoint=this._map.mouseEventToContainerPoint(t);Be(document,{contextmenu:Ge,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){if(!this._moved){this._moved=true;this._box=de("div","leaflet-zoom-box",this._container);_e(this._container,"leaflet-crosshair");this._map.fire("boxzoomstart")}this._point=this._map.mouseEventToContainerPoint(t);var e=new F(this._point,this._startPoint),i=e.getSize();Ce(this._box,e.min);this._box.style.width=i.x+"px";this._box.style.height=i.y+"px"},_finish:function(){if(this._moved){pe(this._box);ye(this._container,"leaflet-crosshair")}ae();Ae();Re(document,{contextmenu:Ge,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if(t.which!==1&&t.button!==1){return}this._finish();if(!this._moved){return}this._clearDeferredResetState();this._resetStateTimeout=setTimeout(s(this._resetState,this),0);var e=new N(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})},_onKeyDown:function(t){if(t.keyCode===27){this._finish()}}});ni.addInitHook("addHandler","boxZoom",Qn),ni.mergeOptions({doubleClickZoom:true});var $n=mi.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(),n=e.options.zoomDelta,r=t.originalEvent.shiftKey?i-n:i+n;if(e.options.doubleClickZoom==="center"){e.setZoom(r)}else{e.setZoomAround(t.containerPoint,r)}}});ni.addInitHook("addHandler","doubleClickZoom",$n),ni.mergeOptions({dragging:true,inertia:!ot,inertiaDeceleration:3400,inertiaMaxSpeed:Infinity,easeLinearity:.2,worldCopyJump:false,maxBoundsViscosity:0});var tr=mi.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new xi(t._mapPane,t._container);this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this);this._draggable.on("predrag",this._onPreDragLimit,this);if(t.options.worldCopyJump){this._draggable.on("predrag",this._onPreDragWrap,this);t.on("zoomend",this._onZoomEnd,this);t.whenReady(this._onZoomEnd,this)}}_e(this._map._container,"leaflet-grab leaflet-touch-drag");this._draggable.enable();this._positions=[];this._times=[]},removeHooks:function(){ye(this._map._container,"leaflet-grab");ye(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;t._stop();if(this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=U(this._map.options.maxBounds);this._offsetLimit=R(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");if(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){while(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){return}var t=this._draggable._newPos.subtract(this._draggable._startPos);var e=this._offsetLimit;if(t.x<e.min.x){t.x=this._viscousLimit(t.x,e.min.x)}if(t.y<e.min.y){t.y=this._viscousLimit(t.y,e.min.y)}if(t.x>e.max.x){t.x=this._viscousLimit(t.x,e.max.x)}if(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,n=this._draggable._newPos.x,r=(n-e+i)%t+e-i,o=(n+e+i)%t-e-i,a=Math.abs(r+i)<Math.abs(o+i)?r:o;this._draggable._absPos=this._draggable._newPos.clone();this._draggable._newPos.x=a},_onDragEnd:function(t){var e=this._map,i=e.options,n=!i.inertia||this._times.length<2;e.fire("dragend",t);if(n){e.fire("moveend")}else{this._prunePositions(+new Date);var r=this._lastPos.subtract(this._positions[0]),o=(this._lastTime-this._times[0])/1e3,a=i.easeLinearity,s=r.multiplyBy(a/o),l=s.distanceTo([0,0]),u=Math.min(i.inertiaMaxSpeed,l),h=s.multiplyBy(u/l),c=u/(i.inertiaDeceleration*a),d=h.multiplyBy(-c/2).round();if(!d.x&&!d.y){e.fire("moveend")}else{d=e._limitOffset(d,e.options.maxBounds);T(function(){e.panBy(d,{duration:c,easeLinearity:a,noMoveStart:true,animate:true})})}}}});ni.addInitHook("addHandler","dragging",tr),ni.mergeOptions({keyboard:true,keyboardPanDelta:80});var er=mi.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;if(t.tabIndex<=0){t.tabIndex="0"}Be(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this);
6this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks();Re(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this);this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(this._focused){return}var t=document.body,e=document.documentElement,i=t.scrollTop||e.scrollTop,n=t.scrollLeft||e.scrollLeft;this._map._container.focus();window.scrollTo(n,i)},_onFocus:function(){this._focused=true;this._map.fire("focus")},_onBlur:function(){this._focused=false;this._map.fire("blur")},_setPanDelta:function(t){var e=this._panKeys={},i=this.keyCodes,n,r;for(n=0,r=i.left.length;n<r;n++){e[i.left[n]]=[-1*t,0]}for(n=0,r=i.right.length;n<r;n++){e[i.right[n]]=[t,0]}for(n=0,r=i.down.length;n<r;n++){e[i.down[n]]=[0,t]}for(n=0,r=i.up.length;n<r;n++){e[i.up[n]]=[0,-1*t]}},_setZoomDelta:function(t){var e=this._zoomKeys={},i=this.keyCodes,n,r;for(n=0,r=i.zoomIn.length;n<r;n++){e[i.zoomIn[n]]=t}for(n=0,r=i.zoomOut.length;n<r;n++){e[i.zoomOut[n]]=-t}},_addHooks:function(){Be(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Re(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(t.altKey||t.ctrlKey||t.metaKey){return}var e=t.keyCode,i=this._map,n;if(e in this._panKeys){if(!i._panAnim||!i._panAnim._inProgress){n=this._panKeys[e];if(t.shiftKey){n=B(n).multiplyBy(3)}i.panBy(n);if(i.options.maxBounds){i.panInsideBounds(i.options.maxBounds)}}}else if(e in this._zoomKeys){i.setZoom(i.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[e])}else if(e===27&&i._popup&&i._popup.options.closeOnEscapeKey){i.closePopup()}else{return}Ge(t)}});ni.addInitHook("addHandler","keyboard",er),ni.mergeOptions({scrollWheelZoom:true,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var ir=mi.extend({addHooks:function(){Be(this._map._container,"mousewheel",this._onWheelScroll,this);this._delta=0},removeHooks:function(){Re(this._map._container,"mousewheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=Ke(t);var i=this._map.options.wheelDebounceTime;this._delta+=e;this._lastMousePos=this._map.mouseEventToContainerPoint(t);if(!this._startTime){this._startTime=+new Date}var n=Math.max(i-(+new Date-this._startTime),0);clearTimeout(this._timer);this._timer=setTimeout(s(this._performZoom,this),n);Ge(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),i=this._map.options.zoomSnap||0;t._stop();var n=this._delta/(this._map.options.wheelPxPerZoomLevel*4),r=4*Math.log(2/(1+Math.exp(-Math.abs(n))))/Math.LN2,o=i?Math.ceil(r/i)*i:r,a=t._limitZoom(e+(this._delta>0?o:-o))-e;this._delta=0;this._startTime=null;if(!a){return}if(t.options.scrollWheelZoom==="center"){t.setZoom(e+a)}else{t.setZoomAround(this._lastMousePos,e+a)}}});ni.addInitHook("addHandler","scrollWheelZoom",ir),ni.mergeOptions({tap:true,tapTolerance:15});var nr=mi.extend({addHooks:function(){Be(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Re(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(!t.touches){return}He(t);this._fireClick=true;if(t.touches.length>1){this._fireClick=false;clearTimeout(this._holdTimeout);return}var e=t.touches[0],i=e.target;this._startPos=this._newPos=new z(e.clientX,e.clientY);if(i.tagName&&i.tagName.toLowerCase()==="a"){_e(i,"leaflet-active")}this._holdTimeout=setTimeout(s(function(){if(this._isTapValid()){this._fireClick=false;this._onUp();this._simulateEvent("contextmenu",e)}},this),1e3);this._simulateEvent("mousedown",e);Be(document,{touchmove:this._onMove,touchend:this._onUp},this)},_onUp:function(t){clearTimeout(this._holdTimeout);Re(document,{touchmove:this._onMove,touchend:this._onUp},this);if(this._fireClick&&t&&t.changedTouches){var e=t.changedTouches[0],i=e.target;if(i&&i.tagName&&i.tagName.toLowerCase()==="a"){ye(i,"leaflet-active")}this._simulateEvent("mouseup",e);if(this._isTapValid()){this._simulateEvent("click",e)}}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new z(e.clientX,e.clientY);this._simulateEvent("mousemove",e)},_simulateEvent:function(t,e){var i=document.createEvent("MouseEvents");i._simulated=true;e.target._simulatedClick=true;i.initMouseEvent(t,true,true,window,1,e.screenX,e.screenY,e.clientX,e.clientY,false,false,false,false,0,null);e.target.dispatchEvent(i)}});if(Lt&&!kt){ni.addInitHook("addHandler","tap",nr)}ni.mergeOptions({touchZoom:Lt&&!ot,bounceAtZoomLimits:true});var rr=mi.extend({addHooks:function(){_e(this._map._container,"leaflet-touch-zoom");Be(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){ye(this._map._container,"leaflet-touch-zoom");Re(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(!t.touches||t.touches.length!==2||e._animatingZoom||this._zooming){return}var i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2);this._startLatLng=e.containerPointToLatLng(this._centerPoint);if(e.options.touchZoom!=="center"){this._pinchStartLatLng=e.containerPointToLatLng(i.add(n)._divideBy(2))}this._startDist=i.distanceTo(n);this._startZoom=e.getZoom();this._moved=false;this._zooming=true;e._stop();Be(document,"touchmove",this._onTouchMove,this);Be(document,"touchend",this._onTouchEnd,this);He(t)},_onTouchMove:function(t){if(!t.touches||t.touches.length!==2||!this._zooming){return}var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),r
6=i.distanceTo(n)/this._startDist;this._zoom=e.getScaleZoom(r,this._startZoom);if(!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&r<1||this._zoom>e.getMaxZoom()&&r>1)){this._zoom=e._limitZoom(this._zoom)}if(e.options.touchZoom==="center"){this._center=this._startLatLng;if(r===1){return}}else{var o=i._add(n)._divideBy(2)._subtract(this._centerPoint);if(r===1&&o.x===0&&o.y===0){return}this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(o),this._zoom)}if(!this._moved){e._moveStart(true,false);this._moved=true}P(this._animRequest);var a=s(e._move,e,this._center,this._zoom,{pinch:true,round:false});this._animRequest=T(a,this,true);He(t)},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=false;return}this._zooming=false;P(this._animRequest);Re(document,"touchmove",this._onTouchMove);Re(document,"touchend",this._onTouchEnd);if(this._map.options.zoomAnimation){this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),true,this._map.options.zoomSnap)}else{this._map._resetView(this._center,this._map._limitZoom(this._zoom))}}});ni.addInitHook("addHandler","touchZoom",rr),ni.BoxZoom=Qn,ni.DoubleClickZoom=$n,ni.Drag=tr,ni.Keyboard=er,ni.ScrollWheelZoom=ir,ni.Tap=nr,ni.TouchZoom=rr,Object.freeze=i,t.version=e,t.Control=oi,t.control=ai,t.Browser=Ot,t.Evented=O,t.Mixin=gi,t.Util=S,t.Class=A,t.Handler=mi,t.extend=l,t.bind=s,t.stamp=u,t.setOptions=f,t.DomEvent=ei,t.DomUtil=Ee,t.PosAnimation=ii,t.Draggable=xi,t.LineUtil=Ei,t.PolyUtil=Fi,t.Point=z,t.point=B,t.Bounds=F,t.bounds=R,t.Transformation=q,t.transformation=K,t.Projection=Ui,t.LatLng=Z,t.latLng=j,t.LatLngBounds=N,t.latLngBounds=U,t.CRS=W,t.GeoJSON=cn,t.geoJSON=bn,t.geoJson=wn,t.Layer=Hi,t.LayerGroup=Gi,t.layerGroup=Vi,t.FeatureGroup=qi,t.featureGroup=Ki,t.ImageOverlay=kn,t.imageOverlay=Ln,t.VideoOverlay=Mn,t.videoOverlay=Cn,t.SVGOverlay=Tn,t.svgOverlay=Pn,t.DivOverlay=Sn,t.Popup=An,t.popup=In,t.Tooltip=Dn,t.tooltip=On,t.Icon=Ji,t.icon=Yi,t.DivIcon=zn,t.divIcon=En,t.Marker=$i,t.marker=tn,t.TileLayer=Rn,t.tileLayer=Nn,t.GridLayer=Bn,t.gridLayer=Fn,t.SVG=Kn,t.svg=Jn,t.Renderer=jn,t.Canvas=Wn,t.canvas=Hn,t.Path=en,t.CircleMarker=nn,t.circleMarker=rn,t.Circle=on,t.circle=an,t.Polyline=sn,t.polyline=ln,t.Polygon=un,t.polygon=hn,t.Rectangle=Yn,t.rectangle=Xn,t.Map=ni,t.map=ri;var or=window.L;t.noConflict=function(){window.L=or;return this},window.L=t}(e)},function(t,e,i){"use strict";function n(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)}function r(t){var e=t.getBoundingClientRect(),i=window.innerHeight||document.documentElement.clientHeight,n=window.innerWidth||document.documentElement.clientWidth;return e.left<=n&&0<=e.right&&e.top<=i&&0<=e.bottom}function o(t,r,o,a){return t.sort(function(t,e){var i,n="desc"==o?(i=e[r],t[r]):(i=t[r],e[r]);return a?i-n:i.localeCompare(n,void 0,{numeric:!0,sensitivity:"base"})}),t}function a(t,e,i,n){return n&&(t=t.replace(/<\/?[^>]+(>|$)/g,"")),i?-1!==t.indexOf(e):-1!==t.toUpperCase().indexOf(e.toUpperCase())}function s(t,e){var i=Math.floor(t),n=i%1e3,r=(i=Math.floor(i/1e3))%60,o=(i=Math.floor(i/60))%60,a=(i=Math.floor(i/60))%24,s=Math.floor(i/24);return e?(n="",r+='"'):(n+='"',r+="."),6e4<t?o+="'":o="",36e5<t?a+=":":a="",864e5<t?s+=".":s="",s+a+o+r+n}function l(t,e){var i=Math.pow(10,e);return Math.round(t*i)/i}function u(t){return t.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function h(t){return/a(?!\\)/i.test(t.replace(/\\\\/g,""))}function c(t){return t.replace(/G(?!\\)/g,"H").replace(/h(?!\\)/g,"G").replace(/g(?!\\)/g,"h").replace(/S(?!\\)/g,"J").replace(/s(?!\\)/g,"S").replace(/a(?!\\)/g,"K").replace(/A(?!\\)/g,"K")}i.d(e,"f",function(){return n}),i.d(e,"e",function(){return r}),i.d(e,"i",function(){return o}),i.d(e,"c",function(){return a}),i.d(e,"g",function(){return s}),i.d(e,"h",function(){return l}),i.d(e,"b",function(){return u}),i.d(e,"d",function(){return h}),i.d(e,"a",function(){return c})},function(t,e,i){"use strict";i.d(e,"b",function(){return j}),i.d(e,"a",function(){return st}),i.d(e,"c",function(){return lt});i(4);var n=window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest,r=""===document.documentElement.style.pointerEvents,s={cors:n,pointerEvents:r},o={attributionWidthOffset:55},v=i(0),a=0;function l(t){var e,i,n,r="";for(var o in t.f=t.f||"json",t){t.hasOwnProperty(o)&&(e=t[o],i=Object.prototype.toString.call(e),r.length&&(r+="&"),n="[object Array]"===i?"[object Object]"===Object.prototype.toString.call(e[0])?JSON.stringify(e):e.join(","):"[object Object]"===i?JSON.stringify(e):"[object Date]"===i?e.valueOf():e,r+=encodeURIComponent(o)+"="+encodeURIComponent(n))}return r}function u(n,r){var o=new window.XMLHttpRequest;return o.onerror=function(t){o.onreadystatechange=v.Util.falseFn,n.call(r,{error:{code:500,message:"XMLHttpRequest error"}},null)},o.onreadystatechange=function(){var e,i;if(4===o.readyState){try{e=JSON.parse(o.responseText)}catch(t){e=null,i={code:500,message:"Could not parse response as JSON. This could also be caused by a CORS or XMLHttpRequest error."}}!i&&e.error&&(i=e.error,e=null),o.onerror=v.Util.falseFn,n.call(r,i,e)}}
6,o.ontimeout=function(){this.onerror()},o}function h(t,e,i,n){var r=u(i,n);return r.open("GET",t+"?"+l(e),!0),null!=n&&void 0!==n.options&&(r.timeout=n.options.timeout,n.options.withCredentials&&(r.withCredentials=!0)),r.send(null),r}function c(t,e,i,n){var r=l(e),o=u(i,n),a=(t+"?"+r).length;if(a<=2e3&&s.cors?o.open("GET",t+"?"+r):2e3<a&&s.cors&&(o.open("POST",t),o.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8")),null!=n&&void 0!==n.options&&(o.timeout=n.options.timeout,n.options.withCredentials&&(o.withCredentials=!0)),a<=2e3&&s.cors)o.send(null);else{if(!(2e3<a&&s.cors))return a<=2e3&&!s.cors?d(t,e,i,n):void f("a request to "+t+" was longer then 2000 characters and this browser cannot make a cross-domain post request. Please use a proxy http://esri.github.io/esri-leaflet/api-reference/request.html");o.send(r)}return o}function d(t,e,n,r){window._EsriLeafletCallbacks=window._EsriLeafletCallbacks||{};var o="c"+a;e.callback="window._EsriLeafletCallbacks."+o,window._EsriLeafletCallbacks[o]=function(t){var e,i;!0!==window._EsriLeafletCallbacks[o]&&("[object Object]"!==(i=Object.prototype.toString.call(t))&&"[object Array]"!==i&&(e={error:{code:500,message:"Expected array or object as JSONP response"}},t=null),!e&&t.error&&(e=t,t=null),n.call(r,e,t),window._EsriLeafletCallbacks[o]=!0)};var i=v.DomUtil.create("script",null,document.body);return i.type="text/javascript",i.src=t+"?"+l(e),i.id=o,i.onerror=function(t){t&&!0!==window._EsriLeafletCallbacks[o]&&(n.call(r,{error:{code:500,message:"An unknown error occurred"}}),window._EsriLeafletCallbacks[o]=!0)},v.DomUtil.addClass(i,"esri-leaflet-jsonp"),a++,{id:o,url:i.src,abort:function(){window._EsriLeafletCallbacks._callback[o]({code:0,message:"Request aborted."})}}}var p=s.cors?h:d;function f(){console&&console.warn&&console.warn.apply(console,arguments)}p.CORS=h,p.JSONP=d;function g(t,e){for(var i=0;i<t.length-1;i++)for(var n=0;n<e.length-1;n++)if(function(t,e,i,n){var r=(n[0]-i[0])*(t[1]-i[1])-(n[1]-i[1])*(t[0]-i[0]),o=(e[0]-t[0])*(t[1]-i[1])-(e[1]-t[1])*(t[0]-i[0]),a=(n[1]-i[1])*(e[0]-t[0])-(n[0]-i[0])*(e[1]-t[1]);if(0!=a){var s=r/a,l=o/a;if(0<=s&&s<=1&&0<=l&&l<=1)return!0}return!1}(t[i],t[i+1],e[n],e[n+1]))return!0;return!1}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}function y(t){for(var e,i=0,n=0,r=t.length,o=t[n];n<r-1;n++)i+=((e=t[n+1])[0]-o[0])*(e[1]+o[1]),o=e;return 0<=i}function m(t){var e={};for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e}function x(t){for(var e,i,n=[],r=[],o=0;o<t.length;o++){var a,s=_(t[o].slice(0));s.length<4||(y(s)?(a=[s.slice().reverse()],n.push(a)):r.push(s.slice().reverse()))}for(var l,u,h,c,d=[];r.length;){i=r.pop();for(var p=!1,f=n.length-1;0<=f;f--)if(e=n[f][0],c=h=void 0,h=g(l=e,u=i),c=function(t,e){for(var i=!1,n=-1,r=t.length,o=r-1;++n<r;o=n)(t[n][1]<=e[1]&&e[1]<t[o][1]||t[o][1]<=e[1]&&e[1]<t[n][1])&&e[0]<(t[o][0]-t[n][0])*(e[1]-t[n][1])/(t[o][1]-t[n][1])+t[n][0]&&(i=!i);return i}(l,u[0]),!(h||!c)){n[f].push(i),p=!0;break}p||d.push(i)}for(;d.length;){i=d.pop();var m=!1;for(f=n.length-1;0<=f;f--)if(e=n[f][0],g(e,i)){n[f].push(i),m=!0;break}m||n.push([i.reverse()])}return 1===n.length?{type:"Polygon",coordinates:n[0]}:{type:"MultiPolygon",coordinates:n}}function b(t){var e=[],i=t.slice(0),n=_(i.shift().slice(0));if(4<=n.length){y(n)||n.reverse(),e.push(n);for(var r=0;r<i.length;r++){var o=_(i[r].slice(0));4<=o.length&&(y(o)&&o.reverse(),e.push(o))}}return e}var w={request:c,get:p,post:function(t,e,i,n){var r=u(i,n);return r.open("POST",t),null!=n&&void 0!==n.options&&(r.timeout=n.options.timeout),r.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),r.send(l(e)),r}},k=function t(e,i){var n={};if(e.features){n.type="FeatureCollection",n.features=[];for(var r=0;r<e.features.length;r++)n.features.push(t(e.features[r],i))}if("number"==typeof e.x&&"number"==typeof e.y&&(n.type="Point",n.coordinates=[e.x,e.y],"number"==typeof e.z&&n.coordinates.push(e.z)),e.points&&(n.type="MultiPoint",n.coordinates=e.points.slice(0)),e.paths&&(1===e.paths.length?(n.type="LineString",n.coordinates=e.paths[0].slice(0)):(n.type="MultiLineString",n.coordinates=e.paths.slice(0))),e.rings&&(n=x(e.rings.slice(0))),"number"==typeof e.xmin&&"number"==typeof e.ymin&&"number"==typeof e.xmax&&"number"==typeof e.ymax&&(n.type="Polygon",n.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)&&(n.type="Feature",n.geometry=e.geometry?t(e.geometry):null,n.properties=e.attributes?m(e.attributes):null,e.attributes))try{n.id=function(t,e){for(var i=e?[e,"OBJECTID","FID"]:["OBJECTID","FID"],n=0;n<i.length;n++){var r=i[n];if(r in t&&("string"==typeof t[r]||"number"==typeof t[r]))return t[r]}throw Error("No valid id attribute found")}(e.attributes,i)}catch(t){}return JSON.stringify(n.geometry)===JSON.stringify({})&&(n.geometry=null),e.spatialReference&&e.spatialReference.wkid&&4326!==e.spatialReference.wkid&&console.warn("Object converted in non-standard crs - "+JSON.stringify(e.spatialReference)),n},L=function t(e,i){i=i||"OBJECTID";var n,r={wkid:4326},o={};switch(e.type){case"Point":o.x=e.coordinates[0],o.y=e.coordinates[1],o.spatialReference=r;break;case"MultiPoint":o.points=e.coordinates.slice(0),o.spatialReference=r;break;case"LineString":o.paths=[e.coordinates.slice(0)],o.spatialReference=r;break;case"MultiLineString":o.paths=e.coordinates.slice(0),o.spatialReference=r;break;case"Polygon":o.rings=b(e.coordinates.slice(0)),o.spatialReference=r;break;case"MultiPolygon":o.rings=function(t){for(var e=[],i=0;i<t.length;i++)for(var n=b(t[i]),r=n.length-1;0<=r;r--){var o=n[r].slice(0);e.push(o)}return e}(e.coordinates.slice(0)),o.spatialReference=r;break;case"Feature":e.geometry&&(o.geometry=t(e.geometry,i)),o.attributes=e.properties?m(e.properties):{},e.id&&(o.attributes[i]=e.id);break;case"FeatureCollection":for(o=[],n=0;n<e.features.length;n++)o.push(t(e.features[n],i));break;case"GeometryCollection":for(o=[],n=0;n<e.geometries.length;n++)o.push(t(e.geometries[n],i))}return o};function M(t,e){return L(t,e)}function C(t,e){return k(t,e)}function T(t){if("NaN"===t.xmin||"NaN"===t.ymin||"NaN"===t.xmax||"NaN"===t.ymax)return null;var e=Object(v.latLng)(t.ymin,t.xmin),i=Object(v.latLng)(t.ymax,t.xmax);return Object(v.latLngBounds)(e,i)}function P(t){return{xmin:(t=Object(v.latLngBounds)(t)).getSouthWest
6().lng,ymin:t.getSouthWest().lat,xmax:t.getNorthEast().lng,ymax:t.getNorthEast().lat,spatialReference:{wkid:4326}}}var S=/^(OBJECTID|FID|OID|ID)$/i;function A(t){var e;if(t.objectIdFieldName)e=t.objectIdFieldName;else if(t.fields){for(var i=0;i<=t.fields.length-1;i++)if("esriFieldTypeOID"===t.fields[i].type){e=t.fields[i].name;break}if(!e)for(i=0;i<=t.fields.length-1;i++)if(t.fields[i].name.match(S)){e=t.fields[i].name;break}}return e}function I(t){for(var e in t.attributes)if(e.match(S))return e}function D(t,e){var i=t.features||t.results,n=i&&i.length,r=e||A(t),o={type:"FeatureCollection",features:[]};if(n)for(var a=i.length-1;0<=a;a--){var s=C(i[a],r||I(i[a]));o.features.push(s)}return o}function O(t){return"/"!==(t=v.Util.trim(t))[t.length-1]&&(t+="/"),t}function z(t){var e;return-1!==t.url.indexOf("?")&&(t.requestParams=t.requestParams||{},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,'":"')+'"}')),t.url=O(t.url.split("?")[0]),t}function E(t){return/^(?!.*utility\.arcgis\.com).*\.arcgis\.com.*FeatureServer/i.test(t)}function B(t){var 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 F(t){return t.getSize().x-o.attributionWidthOffset+"px"}function R(e){var t,i;e.attributionControl&&!e.attributionControl._esriAttributionAdded&&(e.attributionControl.setPrefix('<a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet</a> | Powered by <a href="https://www.esri.com">Esri</a>'),(t=document.createElement("style")).type="text/css",t.innerHTML=".esri-truncated-attribution:hover {white-space: normal;}",document.getElementsByTagName("head")[0].appendChild(t),v.DomUtil.addClass(e.attributionControl._container,"esri-truncated-attribution:hover"),(i=document.createElement("style")).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: "+F(e)+";}",document.getElementsByTagName("head")[0].appendChild(i),v.DomUtil.addClass(e.attributionControl._container,"esri-truncated-attribution"),e.on("resize",function(t){e.attributionControl._container.style.maxWidth=F(t.target)}),e.attributionControl._esriAttributionAdded=!0)}function N(t){var e={geometry:null,geometryType:null};return t instanceof v.LatLngBounds?(e.geometry=P(t),e.geometryType="esriGeometryEnvelope",e):(t.getLatLng&&(t=t.getLatLng()),t instanceof v.LatLng&&(t={type:"Point",coordinates:[t.lng,t.lat]}),t instanceof v.GeoJSON&&(t=t.getLayers()[0].feature.geometry,e.geometry=M(t),e.geometryType=B(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=M(t),e.geometryType=B(t.type),e):void f("invalid geometry passed to spatial query. Should be L.LatLng, L.LatLngBounds, L.Marker or a GeoJSON Point, Line, Polygon or MultiPolygon object"))}function U(t,l){s.cors&&c(t,{},v.Util.bind(function(t,e){if(!t){l._esriAttributions=[];for(var i=0;i<e.contributors.length;i++)for(var n=e.contributors[i],r=0;r<n.coverageAreas.length;r++){var o=n.coverageAreas[r],a=Object(v.latLng)(o.bbox[0],o.bbox[1]),s=Object(v.latLng)(o.bbox[2],o.bbox[3]);l._esriAttributions.push({attribution:n.attribution,score:o.score,bounds:Object(v.latLngBounds)(a,s),minZoom:o.zoomMin,maxZoom:o.zoomMax})}l._esriAttributions.sort(function(t,e){return e.score-t.score}),Z({target:l})}},this))}function Z(t){var e=t.target,i=e._esriAttributions;if(e&&e.attributionControl){var n=e.attributionControl._container.querySelector(".esri-dynamic-attribution");if(n&&i){for(var r="",o=e.getBounds(),a=Object(v.latLngBounds)(o.getSouthWest
6().wrap(),o.getNorthEast().wrap()),s=e.getZoom(),l=0;l<i.length;l++){var u=i[l],h=u.attribution;!r.match(h)&&u.bounds.intersects(a)&&s>=u.minZoom&&s<=u.maxZoom&&(r+=", "+h)}r=r.substr(2),n.innerHTML=r,n.style.maxWidth=F(e),e.fire("attributionupdated",{attribution:r})}}}var j={warn:f,cleanUrl:O,getUrlParams:z,isArcgisOnline:E,geojsonTypeToArcGIS:B,responseToFeatureCollection:D,geojsonToArcGIS:M,arcgisToGeoJSON:C,boundsToExtent:P,extentToBounds:T,calcAttributionWidth:F,setEsriAttribution:R,_setGeometry:N,_getAttributionData:U,_updateMapAttribution:Z,_findIdAttributeFromFeature:I,_findIdAttributeFromResponse:A},W=v.Class.extend({options:{proxy:!1,useCors:n},generateSetter:function(e,t){return v.Util.bind(function(t){return this.params[e]=t,this},t)},initialize:function(t){if(t.request&&t.options?(this._service=t,v.Util.setOptions(this,t.options)):(v.Util.setOptions(this,t),this.options.url=O(t.url)),this.params=v.Util.extend({},this.params||{}),this.setters)for(var e in this.setters){var i=this.setters[e];this[e]=this.generateSetter(i,this)}},token:function(t){return this._service?this._service.authenticate(t):this.params.token=t,this},format:function(t){return this.params.returnUnformattedValues=!t,this},request:function(t,e){return this.options.requestParams&&v.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:function(t,e,i,n,r){var o=this.options.proxy?this.options.proxy+"?"+this.options.url+e:this.options.url+e;return"get"!==t&&"request"!==t||this.options.useCors?w[t](o,i,n,r):w.get.JSONP(o,i,n,r)}});var H=W.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:function(t){return this._setGeometryParams(t),this.params.spatialRel="esriSpatialRelContains",this},intersects:function(t){return this._setGeometryParams(t),this.params.spatialRel="esriSpatialRelIntersects",this},contains:function(t){return this._setGeometryParams(t),this.params.spatialRel="esriSpatialRelWithin",this},crosses:function(t){return this._setGeometryParams(t),this.params.spatialRel="esriSpatialRelCrosses",this},touches:function(t){return this._setGeometryParams(t),this.params.spatialRel="esriSpatialRelTouches",this},overlaps:function(t){return this._setGeometryParams(t),this.params.spatialRel="esriSpatialRelOverlaps",this},bboxIntersects:function(t){return this._setGeometryParams(t),this.params.spatialRel="esriSpatialRelEnvelopeIntersects",this},indexIntersects:function(t){return this._setGeometryParams(t),this.params.spatialRel="esriSpatialRelIndexIntersects",this},nearby:function(t,e){return t=Object(v.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:function(t){return this.params.where=t,this},between:function(t,e){return this.params.time=[t.valueOf(),e.valueOf()],this},simplify:function(t,e){var i=Math.abs(t.getBounds().getWest()-t.getBounds().getEast());return this.params.maxAllowableOffset=i/t.getSize().y*e,this},orderBy:function(t,e){return e=e||"ASC",this.params.orderByFields=this.params.orderByFields?this.params.orderByFields+",":"",this.params.orderByFields+=[t,e].join(" "),this},run:function(i,n){return this._cleanParams(),this.options.isModern||E(this.options.url)&&void 0===this.options.isModern?(this.params.f="geojson",this.request(function(t,e){this._trapSQLerrors(t),i.call(n,t,e,e)},this)):this.request(function(t,e){this._trapSQLerrors(t),i.call(n,t,e&&D(e),e)},this)},count:function(i,t){return this._cleanParams(),this.params.returnCountOnly=!0,this.request(function(t,e){i.call(this,t,e&&e.count,e)},t)},ids:function(i,t){return this._cleanParams(),this.params.returnIdsOnly=!0,this.request(function(t,e){i.call(this,t,e&&e.objectIds,e)},t)},bounds:function(i,n){return this._cleanParams(),this.params.returnExtentOnly=!0,this.request(function(t,e){e&&e.extent&&T(e.extent)?i.call(n,t,T(e.extent),e):(t={message:"Invalid Bounds"},i.call(n,t,null,e))},n)},distinct:function(){return this.params.returnGeometry=!1,this.params.returnDistinctValues=!0,this},pixelSize:function(t){var e=Object(v.point)(t);return this.params.pixelSize=[e.x,e.y],this},layer:function(t){return this.path=t+"/query",this},_trapSQLerrors:function(t){t&&"400"===t.code&&f("one common syntax error in query requests is encasing str
6ing values in double quotes instead of single quotes")},_cleanParams:function(){delete this.params.returnIdsOnly,delete this.params.returnExtentOnly,delete this.params.returnCountOnly},_setGeometryParams:function(t){this.params.inSr=4326;var e=N(t);this.params.geometry=e.geometry,this.params.geometryType=e.geometryType}});var G=function(t){return new H(t)},V=W.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:function(t,e){return this.params.layerDefs=this.params.layerDefs?this.params.layerDefs+";":"",this.params.layerDefs+=[t,e].join(":"),this},simplify:function(t,e){var i=Math.abs(t.getBounds().getWest()-t.getBounds().getEast());return this.params.maxAllowableOffset=i/t.getSize().y*e,this},run:function(i,n){return this.request(function(t,e){i.call(n,t,e&&D(e),e)},n)}});var q=function(t){return new V(t)},K=W.extend({path:"identify",between:function(t,e){return this.params.time=[t.valueOf(),e.valueOf()],this}});var J=K.extend({setters:{layers:"layers",precision:"geometryPrecision",tolerance:"tolerance",returnGeometry:"returnGeometry"},params:{sr:4326,layers:"all",tolerance:3,returnGeometry:!0},on:function(t){var e=P(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:function(t){return 2===t.length&&(t=Object(v.latLng)(t)),this._setGeometryParams(t),this},layerDef:function(t,e){return this.params.layerDefs=this.params.layerDefs?this.params.layerDefs+";":"",this.params.layerDefs+=[t,e].join(":"),this},simplify:function(t,e){var i=Math.abs(t.getBounds().getWest()-t.getBounds().getEast());return this.params.maxAllowableOffset=i/t.getSize().y*e,this},run:function(r,o){return this.request(function(t,e){if(t)r.call(o,t,void 0,e);else{var i=D(e);e.results=e.results.reverse();for(var n=0;n<i.features.length;n++){i.features[n].layerId=e.results[n].layerId}r.call(o,void 0,i,e)}})},_setGeometryParams:function(t){var e=N(t);this.params.geometry=e.geometry,this.params.geometryType=e.geometryType}});var Y=function(t){return new J(t)},X=K.extend({setters:{setMosaicRule:"mosaicRule",setRenderingRule:"renderingRule",setPixelSize:"pixelSize",returnCatalogItems:"returnCatalogItems",returnGeometry:"returnGeometry"},params:{returnGeometry:!1},at:function(t){return t=Object(v.latLng)(t),this.params.geometry=JSON.stringify({x:t.lng,y:t.lat,spatialReference:{wkid:4326}}),this.params.geometryType="esriGeometryPoint",this},getMosaicRule:function(){return this.params.mosaicRule},getRenderingRule:function(){return this.params.renderingRule},getPixelSize:function(){return this.params.pixelSize},run:function(i,n){return this.request(function(t,e){i.call(n,t,e&&this._responseToGeoJSON(e),e)},this)},_responseToGeoJSON:function(t){var e=t.location,i=t.catalogItems,n=t.catalogItemVisibilities,r={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&&(r.pixel.properties.values=t.properties.Values),i&&i.features&&(r.catalogItems=D(i),n&&n.length===r.catalogItems.features.length))for(var o=n.length-1;0<=o;o--)r.catalogItems.features[o].properties.catalogItemVisibility=n[o];return r}});var Q=function(t){return new X(t)},$=v.Evented.extend({options:{proxy:!1,useCors:n,timeout:0},initialize:function(t){t=t||{},this._requestQueue=[],this._authenticating=!1,v.Util.setOptions(this,t),this.options.url=O(this.options.url)},get:function(t,e,i,n){return this._request("get",t,e,i,n)},post:function(t,e,i,n){return this._request("post",t,e,i,n)},request:function(t,e,i,n){return this._request("request",t,e,i,n)},metadata:function(t,e){return this._request("get","",{},t,e)},authenticate:function(t){return this._authenticating=!1,this.options.token=t,this._runQueue(),this},getTimeout:function(){return this.options.timeout},setTimeout:function(t){this.options.timeout=t}
6,_request:function(t,e,i,n,r){this.fire("requeststart",{url:this.options.url+e,params:i,method:t},!0);var o=this._createServiceCallback(t,e,i,n,r);if(this.options.token&&(i.token=this.options.token),this.options.requestParams&&v.Util.extend(i,this.options.requestParams),!this._authenticating){var a=this.options.proxy?this.options.proxy+"?"+this.options.url+e:this.options.url+e;return"get"!==t&&"request"!==t||this.options.useCors?w[t](a,i,o,r):w.get.JSONP(a,i,o,r)}this._requestQueue.push([t,e,i,n,r])},_createServiceCallback:function(i,n,r,o,a){return v.Util.bind(function(t,e){!t||499!==t.code&&498!==t.code||(this._authenticating=!0,this._requestQueue.push([i,n,r,o,a]),this.fire("authenticationrequired",{authenticate:v.Util.bind(this.authenticate,this)},!0),t.authenticate=v.Util.bind(this.authenticate,this)),o.call(a,t,e),t?this.fire("requesterror",{url:this.options.url+n,params:r,message:t.message,code:t.code,method:i},!0):this.fire("requestsuccess",{url:this.options.url+n,params:r,response:e,method:i},!0),this.fire("requestend",{url:this.options.url+n,params:r,method:i},!0)},this)},_runQueue:function(){for(var t=this._requestQueue.length-1;0<=t;t--){var e=this._requestQueue[t];this[e.shift()].apply(this,e)}this._requestQueue=[]}});var tt=$.extend({identify:function(){return Y(this)},find:function(){return q(this)},query:function(){return G(this)}});var et=function(t){return new tt(t)},it=$.extend({query:function(){return G(this)},identify:function(){return Q(this)}});var nt=function(t){return new it(t)},rt=$.extend({options:{idAttribute:"OBJECTID"},query:function(){return G(this)},addFeature:function(t,e,i){this.addFeatures(t,e,i)},addFeatures:function(t,n,r){for(var e=t.features?t.features:[t],i=e.length-1;0<=i;i--)delete e[i].id;return t=M(t),t=1<e.length?t:[t],this.post("addFeatures",{features:t},function(t,e){var i=e&&e.addResults?1<e.addResults.length?e.addResults:e.addResults[0]:void 0;n&&n.call(r,t||e.addResults[0].error,i)},r)},updateFeature:function(t,e,i){this.updateFeatures(t,e,i)},updateFeatures:function(t,n,r){var e=t.features?t.features:[t];return t=M(t,this.options.idAttribute),t=1<e.length?t:[t],this.post("updateFeatures",{features:t},function(t,e){var i=e&&e.updateResults?1<e.updateResults.length?e.updateResults:e.updateResults[0]:void 0;n&&n.call(r,t||e.updateResults[0].error,i)},r)},deleteFeature:function(t,e,i){this.deleteFeatures(t,e,i)},deleteFeatures:function(t,n,r){return this.post("deleteFeatures",{objectIds:t},function(t,e){var i=e&&e.deleteResults?1<e.deleteResults.length?e.deleteResults:e.deleteResults[0]:void 0;n&&n.call(r,t||e.deleteResults[0].error,i)},r)}});var ot=function(t){return new rt(t)},at="https:"!==window.location.protocol?"http:":"https:",st=v.TileLayer.extend({statics:{TILES:{Streets:{urlTemplate:at+"//{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:at+"//{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:at+"//{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:at+"//{s}.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Reference/MapServer/tile/{z}/{y}/{x}",options:{minZoom:1,maxZoom:16,subdomains:["server","services"],pane:r?"esri-labels":"tilePane",attribution:""}},NationalGeographic:{urlTemplate:at+"//{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."}}
6,DarkGray:{urlTemplate:at+"//{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, © OpenStreetMap contributors"}},DarkGrayLabels:{urlTemplate:at+"//{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:r?"esri-labels":"tilePane",attribution:""}},Gray:{urlTemplate:at+"//{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, © OpenStreetMap contributors"}},GrayLabels:{urlTemplate:at+"//{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:r?"esri-labels":"tilePane",attribution:""}},Imagery:{urlTemplate:at+"//{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:at+"//{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:r?"esri-labels":"tilePane",attribution:""}},ImageryTransportation:{urlTemplate:at+"//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Transportation/MapServer/tile/{z}/{y}/{x}",options:{minZoom:1,maxZoom:19,subdomains:["server","services"],pane:r?"esri-labels":"tilePane",attribution:""}},ShadedRelief:{urlTemplate:at+"//{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:at+"//{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:r?"esri-labels":"tilePane",attribution:""}},Terrain:{urlTemplate:at+"//{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:at+"//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Reference_Overlay/MapServer/tile/{z}/{y}/{x}",options:{minZoom:1,maxZoom:13,subdomains:["server","services"],pane:r?"esri-labels":"tilePane",attribution:""}},USATopo:{urlTemplate:at+"//{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:at+"//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:at+"//{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:at+"//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:function(t,e){var i;if("object"==typeof t&&t.urlTemplate&&t.options)i=t;else{if("string"!=typeof t||!st.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=st.TILES[t]}var n=v.Util.extend(i.options,e);v.Util.setOptions(this,n),this.options.token&&-1===i.urlTemplate.indexOf("token=")&&(i.urlTemplate+="?token="+this.options.token),this.options.proxy&&(i.urlTemplate=this.options.proxy+"?"+i.urlTemplate),v.TileLayer.prototype.initialize.call(this,i.urlTemplate,n)},onAdd:function(t){R(t),"esri-labels"===this.options.pane&&this._initPane(),this.options.attributionUrl&&U((this.options.proxy?this.options.proxy+"?":"")+this.options.attributionUrl,t),t.on("moveend",Z),v.TileLayer.prototype.onAdd.call(this,t)},onRemove:function(t){t.off("moveend",Z),v.TileLayer.prototype.onRemove.call(this,t)},_initPane:function(){var t;this._map.getPane(this.options.pane)||((t=this._map.createPane(this.options.pane)).style.pointerEvents="none",t.style.zIndex=500)},getAttribution:function(){var t;return this.options.attribution&&(t='<span class="esri-dynamic-attribution">'+this.options.attribution+"</span>"),t}});function lt(t,e){return new st(t,e)}var ut=v.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:function(t){t=z(t=v.Util.setOptions(this,t)),this.tileUrl=(t.proxy?t.proxy+"?":"")+t.url+"tile/{z}/{y}/{x}
6"+(t.requestParams&&0<Object.keys(t.requestParams).length?v.Util.getParamString(t.requestParams):""),-1!==t.url.indexOf("{s}")&&t.subdomains&&(t.url=t.url.replace("{s}",t.subdomains[0])),this.service=et(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),v.TileLayer.prototype.initialize.call(this,this.tileUrl,t)},getTileUrl:function(t){var e=this._getZoomForUrl();return v.Util.template(this.tileUrl,v.Util.extend({s:this._getSubdomain(t),x:t.x,y:t.y,z:this._lodMap&&this._lodMap[e]?this._lodMap[e]:e},this.options))},createTile:function(t,e){var i=document.createElement("img");return v.DomEvent.on(i,"load",v.Util.bind(this._tileOnLoad,this,e,i)),v.DomEvent.on(i,"error",v.Util.bind(this._tileOnError,this,e,i)),this.options.crossOrigin&&(i.crossOrigin=""),i.alt="",!this._lodMap||this._lodMap&&this._lodMap[this._getZoomForUrl()]?i.src=this.getTileUrl(t):this.once("lodmap",function(){i.src=this.getTileUrl(t)},this),i},onAdd:function(u){R(u),this._lodMap||this.metadata(function(t,e){if(!t&&e.spatialReference){var i=e.spatialReference.latestWkid||e.spatialReference.wkid;if(!this.options.attribution&&u.attributionControl&&e.copyrightText&&(this.options.attribution=e.copyrightText,u.attributionControl.addAttribution(this.getAttribution())),u.options.crs!==v.CRS.EPSG3857||102100!==i&&3857!==i)u.options.crs&&u.options.crs.code&&-1<u.options.crs.code.indexOf(i)||f("L.esri.TiledMapLayer is using a non-mercator spatial reference. Support may be available through Proj4Leaflet http://esri.github.io/esri-leaflet/examples/non-mercator-projection.html");else{this._lodMap={};for(var n=e.tileInfo.lods,r=ut.MercatorZoomLevels,o=0;o<n.length;o++){var a=n[o];for(var s in r){var l=r[s];if(this._withinPercentage(a.resolution,l,this.options.zoomOffsetAllowance)){this._lodMap[s]=a.level;break}}}this.fire("lodmap")}}},this),v.TileLayer.prototype.onAdd.call(this,u)},metadata:function(t,e){return this.service.metadata(t,e),this},identify:function(){return this.service.identify()},find:function(){return this.service.find()},query:function(){return this.service.query()},authenticate:function(t){var 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:function(t,e,i){return Math.abs(t/e-1)<i}});var ht=v.ImageOverlay.extend({onAdd:function(t){this._topLeft=t.getPixelBounds().min,v.ImageOverlay.prototype.onAdd.call(this,t)},_reset:function(){this._map.options.crs===v.CRS.EPSG3857?v.ImageOverlay.prototype._reset.call(this):v.DomUtil.setPosition(this._image,this._topLeft.subtract(this._map.getPixelOrigin()))}}),ct=v.Layer.extend({options:{opacity:1,position:"front",f:"image",useCors:n,attribution:null,interactive:!1,alt:""},onAdd:function(i){R(i),this.options.zIndex&&(this.options.position=null),this._update=v.Util.throttle(this._update,this.options.updateInterval,this),i.on("moveend",this._update,this),this._currentImage&&this._currentImage._bounds.equals(this._map.getBounds())?i.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(t,e){!t&&!this.options.attribution&&i.attributionControl&&e.copyrightText&&(this.options.attribution=e.copyrightText,i.attributionControl.addAttribution(this.getAttribution()))},this)},onRemove:function(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:function(t,e){return this._shouldRenderPopup=!1,this._lastClick=!1,this._popup=Object(v.popup)(e),this._popupFunction=t,this._map&&(this._map.on("click",this._getPopupData,this),this._map.on("dblclick",this._resetPopupState,this)),this},unbindPopup:function(){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:function(){return this.options.position="front",this._currentImage&&(this._currentImage.bringToFront(),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this.options.position="back",this._currentImage&&(this._currentImage.bringToBack(),this._setAutoZIndex(Math.min)),this},setZIndex:function(t){return this.options.zIndex=t,this._currentImage&&this._currentImage.setZIndex(t),this},_setAutoZIndex:function(t){if(this._currentImage){for(var e,i=this._currentImage.getPane().children,n=-t(-1/0,1/0),r=0,o=i.length;r<o;r++)e=i[r].style.zIndex,i[r]!==this._currentImage._image&&e&&(n=t(n,+e));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this.setZIndex(this.options.zIndex))}},getAttribution:function(){return this.options.attribution},getOpacity:function(){return this.options.opacity},setOpacity:function(t){return this.options.opacity=t,this._currentImage&&this._currentImage.setOpacity(t),this},getTimeRange:function(){return[this.options.from,this.options.to]},setTimeRange:function(t,e){return this.options.from=t,this.options.to=e,this._update(),this},metadata:function(t,e){return this.service.metadata(t,e),this},authenticate:function(t){return this.service.authenticate(t),this},redraw:function(){this._update()},_renderImage:function(t,n,e){if(this._map){if(e&&(t="data:"+e+";base64,"+t),!t)return;var r=new ht(t,n,{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),o=function(t){var e,i;r.off("error",o,this),this._map&&(e=t.target,i=this._currentImage,e._bounds.equals(n)&&e._bounds.equals(this._map.getBounds())?(this._currentImage=e,"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),i&&this._map&&this._map.removeLayer(i),i&&i._map&&i._map.removeLayer(i)):this._map.removeLayer(e)),this.fire("load",{bounds:n})};r.once("error",function(){this._map.removeLayer(r),this.fire("error"),r.off("load",o,this)},this),r.once("load",o,this)}},_update:function(){var t,e,i;this._map&&(t=this._map.getZoom(),e=this._map.getBounds(),this._animatingZoom||this._map._panTransition&&this._map._panTransition._inProgress||(t>this.options.maxZoom||t<this.options.minZoom?this._currentImage&&(this._currentImage._map.removeLayer(this._currentImage),this._currentImage=null):(i=this._buildExportParams(),v.Util.extend(i,this.options.requestParam
6s),i?(this._requestExport(i,e),this.fire("loading",{bounds:e})):this._currentImage&&(this._currentImage._map.removeLayer(this._currentImage),this._currentImage=null))))},_renderPopup:function(t,e,i,n){var r;t=Object(v.latLng)(t),this._shouldRenderPopup&&this._lastClick.equals(t)&&((r=this._popupFunction(e,i,n))&&this._popup.setLatLng(t).setContent(r).openOn(this._map))},_resetPopupState:function(t){this._shouldRenderPopup=!1,this._lastClick=t.latlng},_calculateBbox:function(){var t=this._map.getPixelBounds(),e=this._map.unproject(t.getBottomLeft()),i=this._map.unproject(t.getTopRight()),n=this._map.options.crs.project(i),r=this._map.options.crs.project(e),o=Object(v.bounds)(n,r);return[o.getBottomLeft().x,o.getBottomLeft().y,o.getTopRight().x,o.getTopRight().y].join(",")},_calculateImageSize:function(){var t=this._map.getPixelBounds(),e=this._map.getSize(),i=this._map.unproject(t.getBottomLeft()),n=this._map.unproject(t.getTopRight()),r=this._map.latLngToLayerPoint(n).y,o=this._map.latLngToLayerPoint(i).y;return(0<r||o<e.y)&&(e.y=o-r),e.x+","+e.y}});ct.extend({options:{updateInterval:150,format:"jpgpng",transparent:!0,f:"image"},query:function(){return this.service.query()},identify:function(){return this.service.identify()},initialize:function(t){t=z(t),this.service=nt(t),this.service.addEventParent(this),v.Util.setOptions(this,t)},setPixelType:function(t){return this.options.pixelType=t,this._update(),this},getPixelType:function(){return this.options.pixelType},setBandIds:function(t){return v.Util.isArray(t)?this.options.bandIds=t.join(","):this.options.bandIds=t.toString(),this._update(),this},getBandIds:function(){return this.options.bandIds},setNoData:function(t,e){return v.Util.isArray(t)?this.options.noData=t.join(","):this.options.noData=t.toString(),e&&(this.options.noDataInterpretation=e),this._update(),this},getNoData:function(){return this.options.noData},getNoDataInterpretation:function(){return this.options.noDataInterpretation},setRenderingRule:function(t){this.options.renderingRule=t,this._update()},getRenderingRule:function(){return this.options.renderingRule},setMosaicRule:function(t){this.options.mosaicRule=t,this._update()},getMosaicRule:function(){return this.options.mosaicRule},_getPopupData:function(n){var t=v.Util.bind(function(t,e,i){t||setTimeout(v.Util.bind(function(){this._renderPopup(n.latlng,t,e,i)},this),300)},this),e=this.identify().at(n.latlng);this.options.mosaicRule&&e.setMosaicRule(this.options.mosaicRule),e.run(t),this._shouldRenderPopup=!0,this._lastClick=n.latlng},_buildExportParams:function(){var 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:function(t,i){var e;"json"===this.options.f?this.service.request("exportImage",t,function(t,e){t||(this.options.token&&(e.href+="?token="+this.options.token),this.options.proxy&&(e.href=this.options.proxy+"?"+e.href),this._renderImage(e.href,i))},this):(t.f="image",e=this.options.url+"exportImage"+v.Util.getParamString(t),this.options.proxy&&(e=this.options.proxy+"?"+e),this._renderImage(e,i))}});ct.extend({options:{updateInterval:150,layers:!1,layerDefs:!1,timeOptions:!1,format:"png32",transparent:!0,f:"json"},initialize:function(t){t=z(t),this.service=et(t),this.service.addEventParent(this),v.Util.setOptions(this,t)},getDynamicLayers:function(){return this.options.dynamicLayers},setDynamicLayers:function(t){return this.options.dynamicLayers=t,this._update(),this},getLayers:function(){return this.options.layers}
6,setLayers:function(t){return this.options.layers=t,this._update(),this},getLayerDefs:function(){return this.options.layerDefs},setLayerDefs:function(t){return this.options.layerDefs=t,this._update(),this},getTimeOptions:function(){return this.options.timeOptions},setTimeOptions:function(t){return this.options.timeOptions=t,this._update(),this},query:function(){return this.service.query()},identify:function(){return this.service.identify()},find:function(){return this.service.find()},_getPopupData:function(n){var t=v.Util.bind(function(t,e,i){t||setTimeout(v.Util.bind(function(){this._renderPopup(n.latlng,t,e,i)},this),300)},this),e=this.options.popup?this.options.popup.on(this._map).at(n.latlng):this.identify().on(this._map).at(n.latlng);if(e.params.maxAllowableOffset||e.simplify(this._map,.5),this.options.popup&&this.options.popup.params&&this.options.popup.params.layers||(this.options.layers?e.layers("visible:"+this.options.layers.join(",")):e.layers("visible")),this.options.layerDefs&&"string"!=typeof this.options.layerDefs&&!e.params.layerDefs)for(var i in this.options.layerDefs)this.options.layerDefs.hasOwnProperty(i)&&e.layerDef(i,this.options.layerDefs[i]);e.run(t),this._shouldRenderPopup=!0,this._lastClick=n.latlng},_buildExportParams:function(){var 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:function(t,i){var e;"json"===this.options.f?this.service.request("export",t,function(t,e){t||(this.options.token&&e.href&&(e.href+="?token="+this.options.token),this.options.proxy&&e.href&&(e.href=this.options.proxy+"?"+e.href),e.href?this._renderImage(e.href,i):this._renderImage(e.imageData,i,e.contentType))},this):(t.f="image",e=this.options.url+"export"+v.Util.getParamString(t),this.options.proxy&&(e=this.options.proxy+"?"+e),this._renderImage(e,i))}});var dt=v.Layer.extend({options:{cellSize:512,updateWhenIdle:v.Browser.mobile,updateInterval:150,noWrap:!1,keepBuffer:1.5},initialize:function(t){v.Util.setOptions(this,t)},onAdd:function(t){this._cells={},this._activeCells={},this._resetView(),this._update()},onRemove:function(t){this._removeAllCells(),this._cellZoom=void 0},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllCells(),this._update()),this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=v.Util.throttle(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),t},createCell:function(){return document.createElement("div")},removeCell:function(){},reuseCell:function(){},cellLeave:function(){},cellEnter:function(){},getCellSize:function(){var t=this.options.cellSize;return t instanceof v.Point?t:new v.Point(t,t)},_pruneCells:function(){if(this._map){var t,e,i;for(t in this._cells)(i=this._cells[t]).retain=i.current;for(t in this._cells){(i=this._cells[t]).current&&!i.active&&(e=i.coords,this._retainParent(e.x,e.y,e.z,e.z-5)||this._retainChildren(e.x,e.y,e.z,e.z+2))}for(t in this._cells)this._cells[t].retain||this._removeCell(t)}},_removeAllCells:function(){for(var t in this._cells)this._removeCell(t)},_invalidateAll:function(){this._removeAllCells(),this._cellZoom=void 0}
6,_retainParent:function(t,e,i,n){var r=Math.floor(t/2),o=Math.floor(e/2),a=i-1,s=new v.Point(+r,+o);s.z=+a;var l=this._cellCoordsToKey(s),u=this._cells[l];return u&&u.active?u.retain=!0:(u&&u.loaded&&(u.retain=!0),n<a&&this._retainParent(r,o,a,n))},_retainChildren:function(t,e,i,n){for(var r=2*t;r<2*t+2;r++)for(var o=2*e;o<2*e+2;o++){var a=new v.Point(r,o);a.z=i+1;var s=this._cellCoordsToKey(a),l=this._cells[s];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),i+1<n&&this._retainChildren(r,o,i+1,n))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);e||this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_setView:function(t,e,i,n){var r=Math.round(e);n||(this._cellZoom=r,this._abortLoading&&this._abortLoading(),this._resetGrid(),void 0!==r&&this._update(t),i||this._pruneCells(),this._noPrune=!!i)},_resetGrid:function(){var t=this._map,e=t.options.crs,i=this._cellSize=this.getCellSize(),n=this._cellZoom,r=this._map.getPixelWorldBounds(this._cellZoom);r&&(this._globalCellRange=this._pxBoundsToCellRange(r)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],n).x/i.x),Math.ceil(t.project([0,e.wrapLng[1]],n).x/i.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],n).y/i.x),Math.ceil(t.project([e.wrapLat[1],0],n).y/i.y)]},_onMoveEnd:function(t){t&&(t.pinch||t.flyTo)||!this._map||this._map._animatingZoom||this._update()},_getCelldPixelBounds:function(t){var e=this._map,i=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),n=e.getZoomScale(i,this._cellZoom),r=e.project(t,this._cellZoom).floor(),o=e.getSize().divideBy(2*n);return new v.Bounds(r.subtract(o),r.add(o))},_update:function(t){var e=this._map;if(e){var i=Math.round(e.getZoom());void 0===t&&(t=e.getCenter());var n=this._getCelldPixelBounds(t),r=this._pxBoundsToCellRange(n),o=r.getCenter(),a=[],s=this.options.keepBuffer,l=new v.Bounds(r.getBottomLeft().subtract([s,-s]),r.getTopRight().add([s,-s]));if(!(isFinite(r.min.x)&&isFinite(r.min.y)&&isFinite(r.max.x)&&isFinite(r.max.y)))throw new Error("Attempted to load an infinite number of cells");for(var u in this._cells){var h=this._cells[u].coords;h.z===this._cellZoom&&l.contains(new v.Point(h.x,h.y))||(this._cells[u].current=!1)}if(1<Math.abs(i-this._cellZoom))this._setView(t,i);else{for(var c=r.min.y;c<=r.max.y;c++)for(var d=r.min.x;d<=r.max.x;d++){var p,f=new v.Point(d,c);f.z=this._cellZoom,this._isValidCell(f)&&((p=this._cells[this._cellCoordsToKey(f)])?p.current=!0:a.push(f))}if(a.sort(function(t,e){return t.distanceTo(o)-e.distanceTo(o)}),0!==a.length)for(this._loading||(this._loading=!0),d=0;d<a.length;d++){var m=this._cellCoordsToKey(a[d]),g=this._keyToCellCoords(m);this._activeCells[g]?this._reuseCell(a[d]):this._createCell(a[d])}}}},_isValidCell:function(t){var e=this._map.options.crs;if(!e.infinite){var 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;var n=this._cellCoordsToBounds(t);return Object(v.toLatLngBounds)(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._cellCoordsToBounds(this._keyToCellCoords(t))},_cellCoordsToNwSe:function(t){var e=this._map,i=this.getCellSize(),n=t.scaleBy(i),r=n.add(i);return[e.unproject(n,t.z),e.unproject(r,t.z)]},_cellCoordsToBounds:function(t){var e=this._cellCoordsToNwSe(t),i=new v.LatLngBounds(e[0],e[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i},_cellCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToCellCoords:function(t){var e=t.split(":"),i=new v.Point(+e[0],+e[1]);return i.z=+e[2],i},_removeCell:function(t){var e,i,n,r=this._cells[t];r&&(e=this._keyToCellCoords(t),i=this._wrapCoords(e),n=this._cellCoordsToBounds(this._wrapCoords(e)),r.current=!1,delete this._cells[t],this._activeCells[t]=r,this.cellLeave(n,i,t),this.fire("cellleave",{key:t,coords:i,bounds:n}))},_reuseCell:function(t){var e=this._cellCoordsToKey(t);this._cells[e]=this._activeCells[e],this._cells[e].current=!0;var i=this._wrapCoords(t),n=this._cellCoordsToBounds(this._wrapCoords(t));this.cellEnter(n,i,e),this.fire("cellenter",{key:e,coords:i,bounds:n})},_createCell:function(t){var e=this._cellCoordsToKey(t),i=this._wrapCoords(t),n=this._cellCoordsToBounds(this._wrapCoords(t));this.createCell(n,i,e),this.fire("cellcreate",{key:e,coords:i,bounds:n}),this._cells[e]={coords:t,current:!0}
6,v.Util.requestAnimFrame(this._pruneCells,this)},_cellReady:function(t,e,i){var n=this._cellCoordsToKey(t);(i=this._cells[n])&&(i.loaded=+new Date,i.active=!0)},_getCellPos:function(t){return t.scaleBy(this.getCellSize())},_wrapCoords:function(t){var e=new v.Point(this._wrapX?v.Util.wrapNum(t.x,this._wrapX):t.x,this._wrapY?v.Util.wrapNum(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToCellRange:function(t){var e=this.getCellSize();return new v.Bounds(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))}});function pt(t){this.values=[].concat(t||[])}pt.prototype.query=function(t){var e=this.getIndex(t);return this.values[e]},pt.prototype.getIndex=function(t){this.dirty&&this.sort();for(var e,i,n=0,r=this.values.length-1;n<=r;)if(e=(n+r)/2|0,+(i=this.values[Math.round(e)]).value<+t)n=1+e;else{if(!(+i.value>+t))return e;r=e-1}return Math.abs(~r)},pt.prototype.between=function(t,e){var i=this.getIndex(t),n=this.getIndex(e);if(0===i&&0===n)return[];for(;this.values[i-1]&&this.values[i-1].value===t;)i--;for(;this.values[n+1]&&this.values[n+1].value===e;)n++;return this.values[n]&&this.values[n].value===e&&this.values[n+1]&&n++,this.values.slice(i,n)},pt.prototype.insert=function(t){return this.values.splice(this.getIndex(t.value),0,t),this},pt.prototype.bulkAdd=function(t,e){return this.values=this.values.concat([].concat(t||[])),e?this.sort():this.dirty=!0,this},pt.prototype.sort=function(){return this.values.sort(function(t,e){return e.value-t.value}).reverse(),this.dirty=!1,this};var ft=pt,mt=dt.extend({options:{attribution:null,where:"1=1",fields:["*"],from:!1,to:!1,timeField:!1,timeFilterMode:"server",simplifyFactor:0,precision:6,fetchAllFeatures:!1},initialize:function(t){if(dt.prototype.initialize.call(this,t),t=z(t),t=v.Util.setOptions(this,t),this.service=ot(t),this.service.addEventParent(this),"*"!==this.options.fields[0]){for(var e=!1,i=0;i<this.options.fields.length;i++)this.options.fields[i].match(/^(OBJECTID|FID|OID|ID)$/i)&&(e=!0);!1===e&&f("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 ft,this._endTimeIndex=new ft):this.options.timeField&&(this._timeIndex=new ft),this._cache={},this._currentSnapshot=[],this._activeRequests=0},onAdd:function(r){return R(r),this.service.metadata(function(t,e){var i,n;t||(i=e.supportedQueryFormats,(n=!1)!==this.service.options.isModern&&!this.options.fetchAllFeatures||(n=!0),!n&&i&&-1!==i.indexOf("geoJSON")&&(this.service.options.isModern=!0),e.objectIdField&&(this.service.options.idAttribute=e.objectIdField),!this.options.attribution&&r.attributionControl&&e.copyrightText&&(this.options.attribution=e.copyrightText,r.attributionControl.addAttribution(this.getAttribution())))},this),r.on("zoomend",this._handleZoomChange,this),dt.prototype.onAdd.call(this,r)},onRemove:function(t){return t.off("zoomend",this._handleZoomChange,this),dt.prototype.onRemove.call(this,t)},getAttribution:function(){return this.options.attribution},createCell:function(t,e){this._visibleZoom()&&this._requestFeatures(t,e)},_requestFeatures:function(n,r,o,a){this._activeRequests++,a=a||0;var s=this.options.where;return 1===this._activeRequests&&this.fire("loading",{bounds:n},!0),this._buildQuery(n,a).run(function(t,e,i){i&&i.exceededTransferLimit&&this.fire("drawlimitexceeded"),this.options.where===s&&(!t&&e&&e.features.length&&v.Util.requestAnimFrame(v.Util.bind(function(){this._addFeatures(e.features,r),this._postProcessFeatures(n)},this)),t||!e||e.features.length||this._postProcessFeatures(n),t&&this._postProcessFeatures(n),o&&o.call(this,t,e),i&&(i.exceededTransferLimit||i.properties&&i.properties.exceededTransferLimit)&&this.options.fetchAllFeatures&&this._requestFeatures(n,r,o,a+e.features.length))},this)},_postProcessFeatures:function(t){this._activeRequests--,this._activeRequests<=0&&this.fire("load",{bounds:t})},_cacheKey:function(t){return t.z+":"+t.x+":"+t.y},_addFeatures:function(t,e){var i;e&&(i=this._cacheKey(e),this._cache[i]=this._cache[i]||[]);for(var n=t.length-1;0<=n;n--){var r=t[n].id;-1===this._currentSnapshot.indexOf(r)&&this._currentSnapshot.push(r),void 0!==i&&-1===this._cache[i].indexOf(r)&&this._cache[i].push(r)}this.options.timeField&&this._buildTimeIndexes(t),this.createLayers(t)},_buildQuery:function(t,e){var 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.requestParam
6s&&v.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:function(n,r,o){this.options.where=n&&n.length?n:"1=1";for(var a=[],s=[],l=0,u=null,t=v.Util.bind(function(t,e){if(t&&(u=t),e)for(var i=e.features.length-1;0<=i;i--)s.push(e.features[i].id);--l<=0&&this._visibleZoom()&&n===this.options.where&&(this._currentSnapshot=s,v.Util.requestAnimFrame(v.Util.bind(function(){this.removeLayers(a),this.addLayers(s),r&&r.call(o,u)},this)))},this),e=this._currentSnapshot.length-1;0<=e;e--)a.push(this._currentSnapshot[e]);for(var i in this._cache={},this._cells){l++;var h=this._keyToCellCoords(i),c=this._cellCoordsToBounds(h);this._requestFeatures(c,h,t)}return this},getWhere:function(){return this.options.where},getTimeRange:function(){return[this.options.from,this.options.to]},setTimeRange:function(e,i,n,r){var o=this.options.from,a=this.options.to,s=0,l=null,t=v.Util.bind(function(t){t&&(l=t),this._filterExistingFeatures(o,a,e,i),s--,n&&s<=0&&n.call(r,l)},this);if(this.options.from=e,this.options.to=i,this._filterExistingFeatures(o,a,e,i),"server"===this.options.timeFilterMode)for(var u in this._cells){s++;var h=this._keyToCellCoords(u),c=this._cellCoordsToBounds(h);this._requestFeatures(c,h,t)}return this},refresh:function(){this.setWhere(this.options.where)},_filterExistingFeatures:function(t,e,i,n){var r=t&&e?this._getFeaturesInTimeRange(t,e):this._currentSnapshot,o=this._getFeaturesInTimeRange(i,n);if(o.indexOf)for(var a=0;a<o.length;a++){var s=r.indexOf(o[a]);0<=s&&r.splice(s,1)}v.Util.requestAnimFrame(v.Util.bind(function(){this.removeLayers(r),this.addLayers(o)},this))},_getFeaturesInTimeRange:function(t,e){var i=[];if(this.options.timeField.start&&this.options.timeField.end)var n=this._startTimeIndex.between(t,e),r=this._endTimeIndex.between(t,e),o=n.concat(r);else{if(!this._timeIndex)return f("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(var a=o.length-1;0<=a;a--)i.push(o[a].id);return i},_buildTimeIndexes:function(t){var e;if(this.options.timeField.start&&this.options.timeField.end){for(var i=[],n=[],r=t.length-1;0<=r;r--)e=t[r],i.push({id:e.id,value:new Date(e.properties[this.options.timeField.start])}),n.push({id:e.id,value:new Date(e.properties[this.options.timeField.end])});this._startTimeIndex.bulkAdd(i),this._endTimeIndex.bulkAdd(n)}else{var o=[];for(r=t.length-1;0<=r;r--)e=t[r],o.push({id:e.id,value:new Date(e.properties[this.options.timeField])});this._timeIndex.bulkAdd(o)}},_featureWithinTimeRange:function(t){if(!this.options.from||!this.options.to)return!0;var e=+this.options.from.valueOf(),i=+this.options.to.valueOf();if("string"==typeof this.options.timeField){var n=+t.properties[this.options.timeField];return e<=n&&n<=i}if(this.options.timeField.start&&this.options.timeField.end){var r=+t.properties[this.options.timeField.start],o=+t.properties[this.options.timeField.end];return e<=r&&r<=i||e<=o&&o<=i||r<=e&&i<=o}},_visibleZoom:function(){if(!this._map)return!1;var t=this._map.getZoom();return!(t>this.options.maxZoom||t<this.options.minZoom)},_handleZoomChange:function(){if(this._visibleZoom())for(var t in this._cells){var e=this._cells[t].coords,i=this._cacheKey(e);this._cache[i]&&this.addLayers(this._cache[i])}else this.removeLayers(this._currentSnapshot)},authenticate:function(t){return this.service.authenticate(t),this},metadata:function(t,e){return this.service.metadata(t,e),this},query:function(){return this.service.query()},_getMetadata:function(i){this._metadata?i(void 0,this._metadata):this.metadata(v.Util.bind(function(t,e){this._metadata=e,i(t,this._metadata)},this))},addFeature:function(t,e,i){this.addFeatures(t,e,i)},addFeatures:function(e,o,a){this._getMetadata(v.Util.bind(function(t,n){var r;t?o&&o.call(this,t,null):(r=e.features?e.features:[e],this.service.addFeatures(e,v.Util.bind(function(t,e){if(!t){for(var i=r.length-1;0<=i;i--)r[i].properties[n.objectIdField]=1<r.length?e[i].objectId:e.objectId,r[i].id=1<r.length?e[i].objectId:e.objectId;this._addFeatures(r)}o&&o.call(a,t,e)},this)))},this))}
6,updateFeature:function(t,e,i){this.updateFeatures(t,e,i)},updateFeatures:function(t,n,r){var o=t.features?t.features:[t];this.service.updateFeatures(t,function(t,e){if(!t){for(var i=o.length-1;0<=i;i--)this.removeLayers([o[i].id],!0);this._addFeatures(o)}n&&n.call(r,t,e)},this)},deleteFeature:function(t,e,i){this.deleteFeatures(t,e,i)},deleteFeatures:function(t,r,o){return this.service.deleteFeatures(t,function(t,e){var i=e.length?e:[e];if(!t&&0<i.length)for(var n=i.length-1;0<=n;n--)this.removeLayers([i[n].objectId],!0);r&&r.call(o,t,e)},this)}});mt.extend({options:{cacheLayers:!0},initialize:function(t){mt.prototype.initialize.call(this,t),this._originalStyle=this.options.style,this._layers={}},onRemove:function(t){for(var e in this._layers)t.removeLayer(this._layers[e]),this.fire("removefeature",{feature:this._layers[e].feature,permanent:!1},!0);return mt.prototype.onRemove.call(this,t)},createNewLayer:function(t){var e=v.GeoJSON.geometryToLayer(t,this.options);return e&&(e.defaultOptions=e.options),e},_updateLayer:function(t,e){var i=[],n=this.options.coordsToLatLng||v.GeoJSON.coordsToLatLng;switch(e.properties&&(t.feature.properties=e.properties),e.geometry.type){case"Point":i=v.GeoJSON.coordsToLatLng(e.geometry.coordinates),t.setLatLng(i);break;case"LineString":i=v.GeoJSON.coordsToLatLngs(e.geometry.coordinates,0,n),t.setLatLngs(i);break;case"MultiLineString":case"Polygon":i=v.GeoJSON.coordsToLatLngs(e.geometry.coordinates,1,n),t.setLatLngs(i);break;case"MultiPolygon":i=v.GeoJSON.coordsToLatLngs(e.geometry.coordinates,2,n),t.setLatLngs(i)}},createLayers:function(t){for(var e=t.length-1;0<=e;e--){var i,n=t[e],r=this._layers[n.id];!this._visibleZoom()||!r||this._map.hasLayer(r)||this.options.timeField&&!this._featureWithinTimeRange(n)||(this._map.addLayer(r),this.fire("addfeature",{feature:r.feature},!0)),r&&0<this.options.simplifyFactor&&(r.setLatLngs||r.setLatLng)&&this._updateLayer(r,n),r||((i=this.createNewLayer(n))?(i.feature=n,i.addEventParent(this),this.options.onEachFeature&&this.options.onEachFeature(i.feature,i),this._layers[i.feature.id]=i,this.setFeatureStyle(i.feature.id,this.options.style),this.fire("createfeature",{feature:i.feature},!0),this._visibleZoom()&&(!this.options.timeField||this.options.timeField&&this._featureWithinTimeRange(n))&&this._map.addLayer(i)):f("invalid GeoJSON encountered"))}},addLayers:function(t){for(var e=t.length-1;0<=e;e--){var i=this._layers[t[e]];!i||this.options.timeField&&!this._featureWithinTimeRange(i.feature)||this._map.addLayer(i)}},removeLayers:function(t,e){for(var i=t.length-1;0<=i;i--){var n=t[i],r=this._layers[n];r&&(this.fire("removefeature",{feature:r.feature,permanent:e},!0),this._map.removeLayer(r)),r&&e&&delete this._layers[n]}},cellEnter:function(t,n){this._visibleZoom()&&!this._zooming&&this._map&&v.Util.requestAnimFrame(v.Util.bind(function(){var t=this._cacheKey(n),e=this._cellCoordsToKey(n),i=this._cache[t];this._activeCells[e]&&i&&this.addLayers(i)},this))},cellLeave:function(t,s){this._zooming||v.Util.requestAnimFrame(v.Util.bind(function(){if(this._map){var t=this._cacheKey(s),e=this._cellCoordsToKey(s),i=this._cache[t],n=this._map.getBounds();if(!this._activeCells[e]&&i){for(var r=!0,o=0;o<i.length;o++){var a=this._layers[i[o]];a&&a.getBounds&&n.intersects(a.getBounds())&&(r=!1)}r&&this.removeLayers(i,!this.options.cacheLayers),!this.options.cacheLayers&&r&&(delete this._cache[t],delete this._cells[e],delete this._activeCells[e])}}},this))},resetStyle:function(){return this.options.style=this._originalStyle,this.eachFeature(function(t){this.resetFeatureStyle(t.feature.id)},this),this},setStyle:function(e){return this.options.style=e,this.eachFeature(function(t){this.setFeatureStyle(t.feature.id,e)},this),this},resetFeatureStyle:function(t){var e=this._layers[t],i=this._originalStyle||v.Path.prototype.options;return e&&(v.Util.extend(e.options,e.defaultOptions),this.setFeatureStyle(t,i)),this},setFeatureStyle:function(t,e){var i=this._layers[t];return"function"==typeof e&&(e=e(i.feature)),i.setStyle&&i.setStyle(e),this},eachActiveFeature:function(t,e){if(this._map){var i=this._map.getBounds();for(var n in this._layers)-1!==this._currentSnapshot.indexOf(this._layers[n].feature.id)&&
6("function"==typeof this._layers[n].getLatLng&&i.contains(this._layers[n].getLatLng())||"function"==typeof this._layers[n].getBounds&&i.intersects(this._layers[n].getBounds()))&&t.call(e,this._layers[n])}return this},eachFeature:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getFeature:function(t){return this._layers[t]},bringToBack:function(){this.eachFeature(function(t){t.bringToBack&&t.bringToBack()})},bringToFront:function(){this.eachFeature(function(t){t.bringToFront&&t.bringToFront()})},redraw:function(t){return t&&this._redraw(t),this},_redraw:function(t){var e,i,n=this._layers[t],r=n.feature;n&&n.setIcon&&this.options.pointToLayer&&this.options.pointToLayer&&(e=this.options.pointToLayer(r,Object(v.latLng)(r.geometry.coordinates[1],r.geometry.coordinates[0])).options.icon,n.setIcon(e)),n&&n.setStyle&&this.options.pointToLayer&&(i=this.options.pointToLayer(r,Object(v.latLng)(r.geometry.coordinates[1],r.geometry.coordinates[0])).options,this.setFeatureStyle(r.id,i)),n&&n.setStyle&&this.options.style&&this.resetStyle(r.id)}})},function(t,e,i){ 7/*! 8 * Chart.js v2.9.4 9 * https://www.chartjs.org 10 * (c) 2020 Chart.js Contributors 11 * Released under the MIT License 12 */ 13t.exports=function(n){"use strict";function t(t,e){return e={exports:{}},t(e,e.exports),e.exports}function e(t){return t&&t["default"]||t}n=n&&n.hasOwnProperty("default")?n["default"]:n;var h={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87
vendor: 14,073 bytes, line 13
13],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},u=t(function(t){var s={};for(var e in h){if(h.hasOwnProperty(e)){s[h[e]]=e}}var l=t.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var i in l){if(l.hasOwnProperty(i)){if(!("channels"in l[i])){throw new Error("missing channels property: "+i)}if(!("labels"in l[i])){throw new Error("missing channel labels property: "+i)}if(l[i].labels.length!==l[i].channels){throw new Error("channel and label counts mismatch: "+i)}var n=l[i].channels;var r=l[i].labels;delete l[i].channels;delete l[i].labels;Object.defineProperty(l[i],"channels",{value:n});Object.defineProperty(l[i],"labels",{value:r})}}l.rgb.hsl=function(t){var e=t[0]/255;var i=t[1]/255;var n=t[2]/255;var r=Math.min(e,i,n);var o=Math.max(e,i,n);var a=o-r;var s;var l;var u;if(o===r){s=0}else if(e===o){s=(i-n)/a}else if(i===o){s=2+(n-e)/a}else if(n===o){s=4+(e-i)/a}s=Math.min(s*60,360);if(s<0){s+=360}u=(r+o)/2;if(o===r){l=0}else if(u<=.5){l=a/(o+r)}else{l=a/(2-o-r)}return[s,l*100,u*100]};l.rgb.hsv=function(t){var e;var i;var n;var r;var o;var a=t[0]/255;var s=t[1]/255;var l=t[2]/255;var u=Math.max(a,s,l);var h=u-Math.min(a,s,l);var c=function(t){return(u-t)/6/h+1/2};if(h===0){r=o=0}else{o=h/u;e=c(a);i=c(s);n=c(l);if(a===u){r=n-i}else if(s===u){r=1/3+e-n}else if(l===u){r=2/3+i-e}if(r<0){r+=1}else if(r>1){r-=1}}return[r*360,o*100,u*100]};l.rgb.hwb=function(t){var e=t[0];var i=t[1];var n=t[2];var r=l.rgb.hsl(t)[0];var o=1/255*Math.min(e,Math.min(i,n));n=1-1/255*Math.max(e,Math.max(i,n));return[r,o*100,n*100]};l.rgb.cmyk=function(t){var e=t[0]/255;var i=t[1]/255;var n=t[2]/255;var r;var o;var a;var s;s=Math.min(1-e,1-i,1-n);r=(1-e-s)/(1-s)||0;o=(1-i-s)/(1-s)||0;a=(1-n-s)/(1-s)||0;return[r*100,o*100,a*100,s*100]};function u(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2)}l.rgb.keyword=function(t){var e=s[t];if(e){return e}var i=Infinity;var n;for(var r in h){if(h.hasOwnProperty(r)){var o=h[r];var a=u(t,o);if(a<i){i=a;n=r}}}return n};l.keyword.rgb=function(t){return h[t]};l.rgb.xyz=function(t){var e=t[0]/255;var i=t[1]/255;var n=t[2]/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92;i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92;n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92;var r=e*.4124+i*.3576+n*.1805;var o=e*.2126+i*.7152+n*.0722;var a=e*.0193+i*.1192+n*.9505;return[r*100,o*100,a*100]};l.rgb.lab=function(t){var e=l.rgb.xyz(t);var i=e[0];var n=e[1];var r=e[2];var o;var a;var s;i/=95.047;n/=100;r/=108.883;i=i>.008856?Math.pow(i,1/3):7.787*i+16/116;n=n>.008856?Math.pow(n,1/3):7.787*n+16/116;r=r>.008856?Math.pow(r,1/3):7.787*r+16/116;o=116*n-16;a=500*(i-n);s=200*(n-r);return[o,a,s]};l.hsl.rgb=function(t){var e=t[0]/360;var i=t[1]/100;var n=t[2]/100;var r;var o;var a;var s;var l;if(i===0){l=n*255;return[l,l,l]}if(n<.5){o=n*(1+i)}else{o=n+i-n*i}r=2*n-o;s=[0,0,0];for(var u=0;u<3;u++){a=e+1/3*-(u-1);if(a<0){a++}if(a>1){a--}if(6*a<1){l=r+(o-r)*6*a}else if(2*a<1){l=o}else if(3*a<2){l=r+(o-r)*(2/3-a)*6}else{l=r}s[u]=l*255}return s};l.hsl.hsv=function(t){var e=t[0];var i=t[1]/100;var n=t[2]/100;var r=i;var o=Math.max(n,.01);var a;var s;n*=2;i*=n<=1?n:2-n;r*=o<=1?o:2-o;s=(n+i)/2;a=n===0?2*r/(o+r):2*i/(n+i);return[e,a*100,s*100]};l.hsv.rgb=function(t){var e=t[0]/60;var i=t[1]/100;var n=t[2]/100;var r=Math.floor(e)%6;var o=e-Math.floor(e);var a=255*n*(1-i);var s=255*n*(1-i*o);var l=255*n*(1-i*(1-o));n*=255;switch(r){case 0:return[n,l,a];case 1:return[s,n,a];case 2:return[a,n,l];case 3:return[a,s,n];case 4:return[l,a,n];case 5:return[n,a,s]}};l.hsv.hsl=function(t){var e=t[0];var i=t[1]/100;var n=t[2]/100;var r=Math.max(n,.01);var o;var a;var s;s=(2-i)*n;o=(2-i)*r;a=i*r;a/=o<=1?o:2-o;a=a||0;s/=2;return[e,a*100,s*100]};l.hwb.rgb=function(t){var e=t[0]/360;var i=t[1]/100;var n=t[2]/100;var r=i+n;var o;var a;var s;var l;if(r>1){i/=r;n/=r}o=Math.floor(6*e);a=1-n;s=6*e-o;if((o&1)!==0){s=1-s}l=i+s*(a-i);var u;var h;var c;switch(o){default:case 6:case 0:u=a;h=l;c=i;break;case 1:u=l;h=a;c=i;break;case 2:u=i;h=a;c=l;break;case 3:u=i;h=l;c=a;break;case 4:u=l;h=i;c=a;break;case 5:u=a;h=i;c=l;break}return[u*255,h*255,c*255]};l.cmyk.rgb=function(t){var e=t[0]/100;var i=t[1]/100;var n=t[2]/100;var r=t[3]/100;var o;var a;var s;o=1-Math.min(1,e*(1-r)+r);a=1-Math.min(1,i*(1-r)+r);s=1-Math.min(1,n*(1-r)+r);return[o*255,a*255,s*255]};l.xyz.rgb=function(t){var e=t[0]/100;var i=t[1]/100;var n=t[2]/100;var r;var o;var a;r=e*3.2406+i*-1.5372+n*-.4986;o=e*-.9689+i*1.8758+n*.0415;a=e*.0557+i*-.204+n*1.057;r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:r*12.92;o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o*12.92;a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*12.92;r=Math.min(Math.max(0,r),1);o=Math.min(Math.max(0,o),1);a=Math.min(Math.max(0,a),1);return[r*255,o*255,a*255]};l.xyz.lab=function(t){var e=t[0];var i=t[1];var n=t[2];var r;var o;var a;e/=95.047;i/=100;n/=108.883;e=e>.008856?Math.pow(e,1/3):7.787*e+16/116;i=i>.008856?Math.pow(i,1/3):7.787*i+16/116;n=n>.008856?Math.pow(n,1/3):7.787*n+16/116;r=116*i-16;o=500*(e-i);a=200*(i-n);return[r,o,a]};l.lab.xyz=function(t){var e=t[0];var i=t[1];var n=t[2];var r;var o;var a;o=(e+16)/116;r=i/500+o;a=o-n/200;var s=Math.pow(o,3);var l=Math.pow(r,3);var u=Math.pow(a,3);o=s>.008856?s:(o-16/116)/7.787;r=l>.008856?l:(r-16/116)/7.787;a=u>.008856?u:(a-16/116)/7.787;r*=95.047;o*=100;a*=108.883;return[r,o,a]};l.lab.lch=function(t){var e=t[0];var i=t[1];var n=t[2];var r;var o;var a;r=Math.atan2(n,i);o=r*360/2/Math.PI;if(o<0){o+=360}a=Math.sqrt(i*i+n*n);return[e,a,o]};l.lch.lab=function(t){var e=t[0];var i=t[1];var n=t[2];var r;var o;var a;a=n/360*2*Math.PI;r=i*Math.cos(a);o=i*Math.sin(a);return[e,r,o]};l.rgb.ansi16=function(t){var e=t[0];var i=t[1];var n=t[2];var r=1 in arguments?arguments[1]:l.rgb.hsv(t)[2];r=Math.round(r/50);if(r===0){return 30}var o=30+(Math.round(n/255)<<2|Math.round(i/255)<<1|Math.round(e/255));if(r===2){o+=60}return o};l.hsv.ansi16=function(t){return l.rgb.ansi16(l.hsv.rgb(t),t[2])};l.rgb.ansi256=function(t){var e=t[0];var i=t[1];var n=t[2];if(e===i&&i===n){if(e<8){return 16}if(e>248){return 231}return Math.round((e-8)/247*24)+232}var r=16+36*Math.round(e/255*5)+6*Math.round(i/255*5)+Math.round(n/255*5);return r};l.ansi16.rgb=function(t){var e=t%10;if(e===0||e===7){if(t>50){e+=3.5}e=e/10.5*255;return[e,e,e]}var i=(~~(t>50)+1)*.5;var n=(e&1)*i*255;var r=(e>>1&1)*i*255;var o=(e>>2&1)*i*255;return[n,r,o]};l.ansi256.rgb=function(t){if(t>=232){var e=(t-232)*10+8;return[e,e,e]}t-=16;var i;var n=Math.floor(t/36)/5*255;var r=Math.floor((i=t%36)/6)/5*255;var o=i%6/5*255;return[n,r,o]};l.rgb.hex=function(t){var e=((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255);var i=e.toString(16).toUpperCase();return"000000".substring(i.length)+i};l.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e){return[0,0,0]}var i=e[0];if(e[0].length===3){i=i.split("").map(function(t){return t+t}).join("")}var n=parseInt(i,16);var r=n>>16&255;var o=n>>8&255;var a=n&255;return[r,o,a]};l.rgb.hcg=function(t){var e=t[0]/255;var i=t[1]/255;var n=t[2]/255;var r=Math.max(Math.max(e,i),n);var o=Math.min(Math.min(e,i),n);var a=r-o;var s;var l;if(a<1){s=o/(1-a)}else{s=0}if(a<=0){l=0}else if(r===e){l=(i-n)/a%6}else if(r===i){l=2+(n-e)/a}else{l=4+(e-i)/a+4}l/=6;l%=1;return[l*360,a*100,s*100]};l.hsl.hcg=function(t){var e=t[1]/100;var i=t[2]/100;var n=1;var r=0;if(i<.5){n=2*e*i}else{n=2*e*(1-i)}if(n<1){r=(i-.5*n)/(1-n)}return[t[0],n*100,r*100]};l.hsv.hcg=function(t){var e=t[1]/100;var i=t[2]/100;var n=e*i;var r=0;if(n<1){r=(i-n)/(1-n)}return[t[0],n*100,r*100]};l.hcg.rgb=function(t){var e=t[0]/360;var i=t[1]/100;var n=t[2]/100;if(i===0){return[n*255,n*255,n*255]}var r=[0,0,0];var o=e%1*6;var a=o%1;var s=1-a;var l=0;switch(Math.floor(o)){case 0:r[0]=1;r[1]=a;r[2]=0;break;case 1:r[0]=s;r[1]=1;r[2]=0;break;case 2:r[0]=0;r[1]=1;r[2]=a;break;case 3:r[0]=0;r[1]=s;r[2]=1;break;case 4:r[0]=a;r[1]=0;r[2]=1;break;default:r[0]=1;r[1]=0;r[2]=s}l=(1-i)*n;return[(i*r[0]+l)*255,(i*r[1]+l)*255,(i*r[2]+l)*255]};l.hcg.hsv=function(t){var e=t[1]/100;var i=t[2]/100;var n=e+i*(1-e);var r=0;if(n>0){r=e/n}return[t[0],r*100,n*100]};l.hcg.hsl=function(t){var e=t[1]/100;var i=t[2]/100;var n=i*(1-e)+.5*e;var r=0;if(n>0&&n<.5){r=e/(2*n)}else if(n>=.5&&n<1){r=e/(2*(1-n))}return[t[0],r*100,n*100]};l.hcg.hwb=function(t){var e=t[1]/100;var i=t[2]/100;var n=e+i*(1-e);return[t[0],(n-e)*100,(1-n)*100]};l.hwb.hcg=function(t){var e=t[1]/100;var i=t[2]/100;var n=1-i;var r=n-e;var o=0;if(r<1){o=(n-r)/(1-r)}return[t[0],r*100,o*100]};l.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};l.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};l.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};l.gray.hsl=l.gray.hsv=function(t){return[0,0,t[0]]};l.gray.hwb=function(t){return[0,100,t[0]]};l.gray.cmyk=function(t){return[0,0,0,t[0]]};l.gray.lab=function(t){return[t[0],0,0]};l.gray.hex=function(t){var e=Math.round(t[0]/100*255)&255;var i=(e<<16)+(e<<8)+e;var n=i.toString(16).toUpperCase();return"000000".substring(n.length)+n};l.rgb.gray=function(t){var e=(t[0]+t[1]+t[2])/3;return[e/255*100]}}),i=u.rgb,r=u.hsl,o=u.hsv,a=u.hwb,s=u.cmyk,l=u.xyz,c=u.lab,d=u.lch,p=u.hex,f=u.keyword,m=u.ansi16,g=u.ansi256,v=u.hcg,_=u.apple,y=u.gray;function x(){var t={};var e=Object.keys(u);for(var i=e.length,n=0;n<i;n++){t[e[n]]={distance:-1,parent:null}}return t}function b(t){var e=x();var i=[t];e[t].distance=0;while(i.length){var n=i.pop();var r=Object.keys(u[n]);for(var o=r.length,a=0;a<o;a++){var s=r[a];var l=e[s];if(l.distance===-1){l.distance=e[n].distance+1;l.parent=n;i.unshift(s)}}}return e}function w(e,i){return function(t){return i(e(t))}}function k(t,e){var i=[e[t].parent,t];var n=u[e[t].parent][t];var r=e[t].parent;while(e[r].parent){i.unshift(e[r].parent);n=w(u[e[r].parent][r],n);r=e[r].parent}n.conversion=i;return n}var L=function(t){var e=b(t);var i={};var n=Object.keys(e);for(var r=n.length,o=0;o<r;o++){var a=n[o];var s=e[a];if(s.parent===null){continue}i[a]=k(a,e)}return i},M={},C;function T(e){var t=function(t){if(t===undefined||t===null){return t}if(arguments.length>1){t=Array.prototype.slice.call(arguments)}return e(t)};if("conversion"in e){t.conversion=e.conversion}return t}function P(r){var t=function(t){if(t===undefined||t===null){return t}if(arguments.length>1){t=Array.prototype.slice.call(arguments)}var e=r(t);if(typeof e==="object"){for(var i=e.length,n=0;n<i;n++){e[n]=Math.round(e[n])}}return e};if("conversion"in r){t.conversion=r.conversion}return t}Object.keys(u).forEach(function(i){M[i]={};Object.defineProperty(M[i],"channels",{value:u[i].channels});Object.defineProperty(M[i],"labels",{value:u[i].labels});var n=L(i);var t=Object.keys(n);t.forEach(function(t){var e=n[t];M[i][t]=P(e);M[i][t].raw=T(e)})});var S=M,A={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],ol
13ive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},I={getRgba:D,getHsla:O,getRgb:E,getHsl:B,getHwb:z,getAlpha:F,hexString:R,rgbString:N,rgbaString:U,percentString:Z,percentaString:j,hslString:W,hslaString:H,hwbString:G,keyword:V};function D(t){if(!t){return}var e=/^#([a-fA-F0-9]{3,4})$/i,i=/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i,n=/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i,r=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i,o=/(\w+)/;var a=[0,0,0],s=1,l=t.match(e),u="";if(l){l=l[1];u=l[3];for(var h=0;h<a.length;h++){a[h]=parseInt(l[h]+l[h],16)}if(u){s=Math.round(parseInt(u+u,16)/255*100)/100}}else if(l=t.match(i)){u=l[2];l=l[1];for(var h=0;h<a.length;h++){a[h]=parseInt(l.slice(h*2,h*2+2),16)}if(u){s=Math.round(parseInt(u,16)/255*100)/100}}else if(l=t.match(n)){for(var h=0;h<a.length;h++){a[h]=parseInt(l[h+1])}s=parseFloat(l[4])}else if(l=t.match(r)){for(var h=0;h<a.length;h++){a[h]=Math.round(parseFloat(l[h+1])*2.55)}s=parseFloat(l[4])}else if(l=t.match(o)){if(l[1]=="transparent"){return[0,0,0,0]}a=A[l[1]];if(!a){return}}for(var h=0;h<a.length;h++){a[h]=q(a[h],0,255)}if(!s&&s!=0){s=1}else{s=q(s,0,1)}a[3]=s;return a}function O(t){if(!t){return}var e=/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/;var i=t.match(e);if(i){var n=parseFloat(i[4]);var r=q(parseInt(i[1]),0,360),o=q(parseFloat(i[2]),0,100),a=q(parseFloat(i[3]),0,100),s=q(isNaN(n)?1:n,0,1);return[r,o,a,s]}}function z(t){if(!t){return}var e=/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/;var i=t.match(e);if(i){var n=parseFloat(i[4]);var r=q(parseInt(i[1]),0,360),o=q(parseFloat(i[2]),0,100),a=q(parseFloat(i[3]),0,100),s=q(isNaN(n)?1:n,0,1);return[r,o,a,s]}}function E(t){var e=D(t);return e&&e.slice(0,3)}function B(t){var e=O(t);return e&&e.slice(0,3)}function F(t){var e=D(t);if(e){return e[3]}else if(e=O(t)){return e[3]}else if(e=z(t)){return e[3]}}function R(t,e){var e=e!==undefined&&t.length===3?e:t[3];return"#"+K(t[0])+K(t[1])+K(t[2])+(e>=0&&e<1?K(Math.round(e*255)):"")}function N(t,e){if(e<1||t[3]&&t[3]<1){return U(t,e)}return"rgb("+t[0]+", "+t[1]+", "+t[2]+")"}function U(t,e){if(e===undefined){e=t[3]!==undefined?t[3]:1}return"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function Z(t,e){if(e<1||t[3]&&t[3]<1){return j(t,e)}var i=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return"rgb("+i+"%, "+n+"%, "+r+"%)"}function j(t,e){var i=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return"rgba("+i+"%, "+n+"%, "+r+"%, "+(e||t[3]||1)+")"}function W(t,e){if(e<1||t[3]&&t[3]<1){return H(t,e)}return"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"}function H(t,e){if(e===undefined){e=t[3]!==undefined?t[3]:1}return"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function G(t,e){if(e===undefined){e=t[3]!==undefined?t[3]:1}return"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(e!==undefined&&e!==1?", "+e:"")+")"}function V(t){return J[t.slice(0,3)]}function q(t,e,i){return Math.min(Math.max(e,t),i)}function K(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var J={};for(var Y in A){J[A[Y]]=Y}var X=function(t){if(t instanceof X){return t}if(!(this instanceof X)){return new X(t)}this.valid=false;this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1};var e;if(typeof t==="string"){e=I.getRgba(t);if(e){this.setValues("rgb",e)}else if(e=I.getHsla(t)){this.setValues("hsl",e)}else if(e=I.getHwb(t)){this.setValues("hwb",e)}}else if(typeof t==="object"){e=t;
13if(e.r!==undefined||e.red!==undefined){this.setValues("rgb",e)}else if(e.l!==undefined||e.lightness!==undefined){this.setValues("hsl",e)}else if(e.v!==undefined||e.value!==undefined){this.setValues("hsv",e)}else if(e.w!==undefined||e.whiteness!==undefined){this.setValues("hwb",e)}else if(e.c!==undefined||e.cyan!==undefined){this.setValues("cmyk",e)}}};if(X.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var t=this.values;if(t.alpha!==1){return t.hwb.concat([t.alpha])}return t.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var t=this.values;return t.rgb.concat([t.alpha])},hslaArray:function(){var t=this.values;return t.hsl.concat([t.alpha])},alpha:function(t){if(t===undefined){return this.values.alpha}this.setValues("alpha",t);return this},red:function(t){return this.setChannel("rgb",0,t)},green:function(t){return this.setChannel("rgb",1,t)},blue:function(t){return this.setChannel("rgb",2,t)},hue:function(t){if(t){t%=360;t=t<0?360+t:t}return this.setChannel("hsl",0,t)},saturation:function(t){return this.setChannel("hsl",1,t)},lightness:function(t){return this.setChannel("hsl",2,t)},saturationv:function(t){return this.setChannel("hsv",1,t)},whiteness:function(t){return this.setChannel("hwb",1,t)},blackness:function(t){return this.setChannel("hwb",2,t)},value:function(t){return this.setChannel("hsv",2,t)},cyan:function(t){return this.setChannel("cmyk",0,t)},magenta:function(t){return this.setChannel("cmyk",1,t)},yellow:function(t){return this.setChannel("cmyk",2,t)},black:function(t){return this.setChannel("cmyk",3,t)},hexString:function(){return I.hexString(this.values.rgb)},rgbString:function(){return I.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return I.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return I.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return I.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return I.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return I.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return I.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var t=this.values.rgb;return t[0]<<16|t[1]<<8|t[2]},luminosity:function(){var t=this.values.rgb;var e=[];for(var i=0;i<t.length;i++){var n=t[i]/255;e[i]=n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity();var i=t.luminosity();if(e>i){return(e+.05)/(i+.05)}return(i+.05)/(e+.05)},level:function(t){var e=this.contrast(t);if(e>=7.1){return"AAA"}return e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;var e=(t[0]*299+t[1]*587+t[2]*114)/1e3;return e<128},light:function(){return!this.dark()},negate:function(){var t=[];for(var e=0;e<3;e++){t[e]=255-this.values.rgb[e]}this.setValues("rgb",t);return this},lighten:function(t){var e=this.values.hsl;e[2]+=e[2]*t;this.setValues("hsl",e);return this},darken:function(t){var e=this.values.hsl;e[2]-=e[2]*t;this.setValues("hsl",e);return this},saturate:function(t){var e=this.values.hsl;e[1]+=e[1]*t;this.setValues("hsl",e);return this},desaturate:function(t){var e=this.values.hsl;e[1]-=e[1]*t;this.setValues("hsl",e);return this},whiten:function(t){var e=this.values.hwb;e[1]+=e[1]*t;this.setValues("hwb",e);return this},blacken:function(t){var e=this.values.hwb;e[2]+=e[2]*t;this.setValues("hwb",e);return this},greyscale:function(){var t=this.values.rgb;var e=t[0]*.3+t[1]*.59+t[2]*.11;this.setValues("rgb",[e,e,e]);return this},clearer:function(t){var e=this.values.alpha;this.setValues("alpha",e-e*t);return this},opaquer:function(t){var e=this.values.alpha;
13this.setValues("alpha",e+e*t);return this},rotate:function(t){var e=this.values.hsl;var i=(e[0]+t)%360;e[0]=i<0?360+i:i;this.setValues("hsl",e);return this},mix:function(t,e){var i=this;var n=t;var r=e===undefined?.5:e;var o=2*r-1;var a=i.alpha()-n.alpha();var s=((o*a===-1?o:(o+a)/(1+o*a))+1)/2;var l=1-s;return this.rgb(s*i.red()+l*n.red(),s*i.green()+l*n.green(),s*i.blue()+l*n.blue()).alpha(i.alpha()*r+n.alpha()*(1-r))},toJSON:function(){return this.rgb()},clone:function(){var t=new X;var e=this.values;var i=t.values;var n,r;for(var o in e){if(e.hasOwnProperty(o)){n=e[o];r={}.toString.call(n);if(r==="[object Array]"){i[o]=n.slice(0)}else if(r==="[object Number]"){i[o]=n}else{console.error("unexpected color value:",n)}}}return t}},X.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},X.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},X.prototype.getValues=function(t){var e=this.values;var i={};for(var n=0;n<t.length;n++){i[t.charAt(n)]=e[t][n]}if(e.alpha!==1){i.a=e.alpha}return i},X.prototype.setValues=function(t,e){var i=this.values;var n=this.spaces;var r=this.maxes;var o=1;var a;this.valid=true;if(t==="alpha"){o=e}else if(e.length){i[t]=e.slice(0,t.length);o=e[t.length]}else if(e[t.charAt(0)]!==undefined){for(a=0;a<t.length;a++){i[t][a]=e[t.charAt(a)]}o=e.a}else if(e[n[t][0]]!==undefined){var s=n[t];for(a=0;a<t.length;a++){i[t][a]=e[s[a]]}o=e.alpha}i.alpha=Math.max(0,Math.min(1,o===undefined?i.alpha:o));if(t==="alpha"){return false}var l;for(a=0;a<t.length;a++){l=Math.max(0,Math.min(r[t][a],i[t][a]));i[t][a]=Math.round(l)}for(var u in n){if(u!==t){i[u]=S[t][u](i[t])}}return true},X.prototype.setSpace=function(t,e){var i=e[0];if(i===undefined){return this.getValues(t)}if(typeof i==="number"){i=Array.prototype.slice.call(e)}this.setValues(t,i);return this},X.prototype.setChannel=function(t,e,i){var n=this.values[t];if(i===undefined){return n[e]}else if(i===n[e]){return this}n[e]=i;this.setValues(t,n);return this},typeof window!=="undefined"){window.Color=X}var Q=X;function $(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}var tt={noop:function(){},uid:function(){var t=0;return function(){return t++}}(),isNullOrUndef:function(t){return t===null||typeof t==="undefined"},isArray:function(t){if(Array.isArray&&Array.isArray(t)){return true}var e=Object.prototype.toString.call(t);if(e.substr(0,7)==="[object"&&e.substr(-6)==="Array]"){return true}return false},isObject:function(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"},isFinite:function(t){return(typeof t==="number"||t instanceof Number)&&isFinite(t)},valueOrDefault:function(t,e){return typeof t==="undefined"?e:t},valueAtIndexOrDefault:function(t,e,i){return tt.valueOrDefault(tt.isArray(t)?t[e]:t,i)},callback:function(t,e,i){if(t&&typeof t.call==="function"){return t.apply(i,e)}},each:function(t,e,i,n){var r,o,a;if(tt.isArray(t)){o=t.length;if(n){for(r=o-1;r>=0;r--){e.call(i,t[r],r)}}else{for(r=0;r<o;r++){e.call(i,t[r],r)}}}else if(tt.isObject(t)){a=Object.keys(t);o=a.length;for(r=0;r<o;r++){e.call(i,t[a[r]],a[r])}}},arrayEquals:function(t,e){var i,n,r,o;
13if(!t||!e||t.length!==e.length){return false}for(i=0,n=t.length;i<n;++i){r=t[i];o=e[i];if(r instanceof Array&&o instanceof Array){if(!tt.arrayEquals(r,o)){return false}}else if(r!==o){return false}}return true},clone:function(t){if(tt.isArray(t)){return t.map(tt.clone)}if(tt.isObject(t)){var e=Object.create(t);var i=Object.keys(t);var n=i.length;var r=0;for(;r<n;++r){e[i[r]]=tt.clone(t[i[r]])}return e}return t},_merger:function(t,e,i,n){if(!$(t)){return}var r=e[t];var o=i[t];if(tt.isObject(r)&&tt.isObject(o)){tt.merge(r,o,n)}else{e[t]=tt.clone(o)}},_mergerIf:function(t,e,i){if(!$(t)){return}var n=e[t];var r=i[t];if(tt.isObject(n)&&tt.isObject(r)){tt.mergeIf(n,r)}else if(!e.hasOwnProperty(t)){e[t]=tt.clone(r)}},merge:function(t,e,i){var n=tt.isArray(e)?e:[e];var r=n.length;var o,a,s,l,u;if(!tt.isObject(t)){return t}i=i||{};o=i.merger||tt._merger;for(a=0;a<r;++a){e=n[a];if(!tt.isObject(e)){continue}s=Object.keys(e);for(u=0,l=s.length;u<l;++u){o(s[u],t,e,i)}}return t},mergeIf:function(t,e){return tt.merge(t,e,{merger:tt._mergerIf})},extend:Object.assign||function(t){return tt.merge(t,[].slice.call(arguments,1),{merger:function(t,e,i){e[t]=i[t]}})},inherits:function(t){var e=this;var i=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)};var n=function(){this.constructor=i};n.prototype=e.prototype;i.prototype=new n;i.extend=tt.inherits;if(t){tt.extend(i.prototype,t)}i.__super__=e.prototype;return i},_deprecated:function(t,e,i,n){if(e!==undefined){console.warn(t+': "'+i+'" is deprecated. Please use "'+n+'" instead')}}},et=tt;tt.callCallback=tt.callback,tt.indexOf=function(t,e,i){return Array.prototype.indexOf.call(t,e,i)},tt.getValueOrDefault=tt.valueOrDefault,tt.getValueAtIndexOrDefault=tt.valueAtIndexOrDefault;var it={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-t*(t-2)},easeInOutQuad:function(t){if((t/=.5)<1){return.5*t*t}return-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return(t=t-1)*t*t+1},easeInOutCubic:function(t){if((t/=.5)<1){return.5*t*t*t}return.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-((t=t-1)*t*t*t-1)},easeInOutQuart:function(t){if((t/=.5)<1){return.5*t*t*t*t}return-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return(t=t-1)*t*t*t*t+1},easeInOutQuint:function(t){if((t/=.5)<1){return.5*t*t*t*t*t}return.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return-Math.cos(t*(Math.PI/2))+1},easeOutSine:function(t){return Math.sin(t*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t)-1)},easeInExpo:function(t){return t===0?0:Math.pow(2,10*(t-1))},easeOutExpo:function(t){return t===1?1:-Math.pow(2,-10*t)+1},easeInOutExpo:function(t){if(t===0){return 0}if(t===1){return 1}if((t/=.5)<1){return.5*Math.pow(2,10*(t-1))}return.5*(-Math.pow(2,-10*--t)+2)},easeInCirc:function(t){if(t>=1){return t}return-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t=t-1)*t)},easeInOutCirc:function(t){if((t/=.5)<1){return-.5*(Math.sqrt(1-t*t)-1)}return.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158;var i=0;var n=1;if(t===0){return 0}if(t===1){return 1}if(!i){i=.3}if(n<1){n=1;e=i/4}else{e=i/(2*Math.PI)*Math.asin(1/n)}return-(n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i))},easeOutElastic:function(t){var e=1.70158;var i=0;var n=1;if(t===0){return 0}if(t===1){return 1}if(!i){i=.3}if(n<1){n=1;e=i/4}else{e=i/(2*Math.PI)*Math.asin(1/n)}return n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/i)+1},easeInOutElastic:function(t){var e=1.70158;var i=0;var n=1;if(t===0){return 0}if((t/=.5)===2){return 1}if(!i){i=.45}if(n<1){n=1;e=i/4}else{e=i/(2*Math.PI)*Math.asin(1/n)}if(t<1){return-.5*(n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i))}return n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.5+1},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t=t-1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;if((t/=.5)<1){return.5*(t*t*(((e*=1.525)+1)*t-e))}return.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:function(t){return 1-it.easeOutBounce(1-t)},easeOutBounce:function(t){if(t<1/2.75){return 7.5625*t*t}if(t<2/2.75){return 7.5625*(t-=1.5/2.75)*t+.75}if(t<2.5/2.75){return 7.5625*(t-=2.25/2.75)*t+.9375}return 7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){if(t<.5){return it.easeInBounce(t*2)*.5}return it.easeOutBounce(t*2-1)*.5+.5}},nt={effects:it};
13et.easingEffects=it;var rt=Math.PI,ot=rt/180,at=rt*2,st=rt/2,lt=rt/4,ut=rt*2/3,ht={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,i,n,r,o){if(o){var a=Math.min(o,r/2,n/2);var s=e+a;var l=i+a;var u=e+n-a;var h=i+r-a;t.moveTo(e,l);if(s<u&&l<h){t.arc(s,l,a,-rt,-st);t.arc(u,l,a,-st,0);t.arc(u,h,a,0,st);t.arc(s,h,a,st,rt)}else if(s<u){t.moveTo(s,i);t.arc(u,l,a,-st,st);t.arc(s,l,a,st,rt+st)}else if(l<h){t.arc(s,l,a,-rt,0);t.arc(s,h,a,0,rt)}else{t.arc(s,l,a,-rt,rt)}t.closePath();t.moveTo(e,i)}else{t.rect(e,i,n,r)}},drawPoint:function(t,e,i,n,r,o){var a,s,l,u,h;var c=(o||0)*ot;if(e&&typeof e==="object"){a=e.toString();if(a==="[object HTMLImageElement]"||a==="[object HTMLCanvasElement]"){t.save();t.translate(n,r);t.rotate(c);t.drawImage(e,-e.width/2,-e.height/2,e.width,e.height);t.restore();return}}if(isNaN(i)||i<=0){return}t.beginPath();switch(e){default:t.arc(n,r,i,0,at);t.closePath();break;case"triangle":t.moveTo(n+Math.sin(c)*i,r-Math.cos(c)*i);c+=ut;t.lineTo(n+Math.sin(c)*i,r-Math.cos(c)*i);c+=ut;t.lineTo(n+Math.sin(c)*i,r-Math.cos(c)*i);t.closePath();break;case"rectRounded":h=i*.516;u=i-h;s=Math.cos(c+lt)*u;l=Math.sin(c+lt)*u;t.arc(n-s,r-l,h,c-rt,c-st);t.arc(n+l,r-s,h,c-st,c);t.arc(n+s,r+l,h,c,c+st);t.arc(n-l,r+s,h,c+st,c+rt);t.closePath();break;case"rect":if(!o){u=Math.SQRT1_2*i;t.rect(n-u,r-u,2*u,2*u);break}c+=lt;case"rectRot":s=Math.cos(c)*i;l=Math.sin(c)*i;t.moveTo(n-s,r-l);t.lineTo(n+l,r-s);t.lineTo(n+s,r+l);t.lineTo(n-l,r+s);t.closePath();break;case"crossRot":c+=lt;case"cross":s=Math.cos(c)*i;l=Math.sin(c)*i;t.moveTo(n-s,r-l);t.lineTo(n+s,r+l);t.moveTo(n+l,r-s);t.lineTo(n-l,r+s);break;case"star":s=Math.cos(c)*i;l=Math.sin(c)*i;t.moveTo(n-s,r-l);t.lineTo(n+s,r+l);t.moveTo(n+l,r-s);t.lineTo(n-l,r+s);c+=lt;s=Math.cos(c)*i;l=Math.sin(c)*i;t.moveTo(n-s,r-l);t.lineTo(n+s,r+l);t.moveTo(n+l,r-s);t.lineTo(n-l,r+s);break;case"line":s=Math.cos(c)*i;l=Math.sin(c)*i;t.moveTo(n-s,r-l);t.lineTo(n+s,r+l);break;case"dash":t.moveTo(n,r);t.lineTo(n+Math.cos(c)*i,r+Math.sin(c)*i);break}t.fill();t.stroke()},_isPointInArea:function(t,e){var i=1e-6;return t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i},clipArea:function(t,e){t.save();t.beginPath();t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top);t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,i,n){var r=i.steppedLine;if(r){if(r==="middle"){var o=(e.x+i.x)/2;t.lineTo(o,n?i.y:e.y);t.lineTo(o,n?e.y:i.y)}else if(r==="after"&&!n||r!=="after"&&n){t.lineTo(e.x,i.y)}else{t.lineTo(i.x,e.y)}t.lineTo(i.x,i.y);return}if(!i.tension){t.lineTo(i.x,i.y);return}t.bezierCurveTo(n?e.controlPointPreviousX:e.controlPointNextX,n?e.controlPointPreviousY:e.controlPointNextY,n?i.controlPointNextX:i.controlPointPreviousX,n?i.controlPointNextY:i.controlPointPreviousY,i.x,i.y)}},ct=ht;et.clear=ht.clear,et.drawRoundedRectangle=function(t){t.beginPath();ht.roundedRect.apply(ht,arguments)};var dt={_set:function(t,e){return et.merge(this[t]||(this[t]={}),e)}};dt._set("global",{defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",defaultLineHeight:1.2,showLines:true});var pt=dt,ft=et.valueOrDefault;function mt(t){if(!t||et.isNullOrUndef(t.size)||et.isNullOrUndef(t.family)){return null}return(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}var gt={toLineHeight:function(t,e){var i=(""+t).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!i||i[1]==="normal"){return e*1.2}t=+i[2];switch(i[3]){case"px":return t;case"%":t/=100;break}return e*t},toPadding:function(t){var e,i,n,r;if(et.isObject(t)){e=+t.top||0;i=+t.right||0;n=+t.bottom||0;r=+t.left||0}else{e=i=n=r=+t||0}return{top:e,right:i,bottom:n,left:r,height:e+n,width:r+i}},_parseFont:function(t){var e=pt.global;var i=ft(t.fontSize,e.defaultFontSize);var n={family:ft(t.fontFamily,e.defaultFontFamily),lineHeight:et.options.toLineHeight(ft(t.lineHeight,e.defaultLineHeight),i),size:i,style:ft(t.fontStyle,e.defaultFontStyle),weight:null,string:""};n.string=mt(n);return n}
13,resolve:function(t,e,i,n){var r=true;var o,a,s;for(o=0,a=t.length;o<a;++o){s=t[o];if(s===undefined){continue}if(e!==undefined&&typeof s==="function"){s=s(e);r=false}if(i!==undefined&&et.isArray(s)){s=s[i];r=false}if(s!==undefined){if(n&&!r){n.cacheable=false}return s}}}},vt={_factorize:function(t){var e=[];var i=Math.sqrt(t);var n;for(n=1;n<i;n++){if(t%n===0){e.push(n);e.push(t/n)}}if(i===(i|0)){e.push(i)}e.sort(function(t,e){return t-e}).pop();return e},log10:Math.log10||function(t){var e=Math.log(t)*Math.LOG10E;var i=Math.round(e);var n=t===Math.pow(10,i);return n?i:e}},_t=vt;et.log10=vt.log10;var yt=function(e,i){return{x:function(t){return e+e+i-t},setWidth:function(t){i=t},textAlign:function(t){if(t==="center"){return t}return t==="right"?"left":"right"},xPlus:function(t,e){return t-e},leftForLtr:function(t,e){return t-e}}},xt=function(){return{x:function(t){return t},setWidth:function(t){},textAlign:function(t){return t},xPlus:function(t,e){return t+e},leftForLtr:function(t,e){return t}}},bt,wt,kt,Lt,Mt=et,Ct,Tt=ct,Pt=gt,St=_t,At={getRtlAdapter:function(t,e,i){return t?yt(e,i):xt()},overrideTextDirection:function(t,e){var i,n;if(e==="ltr"||e==="rtl"){i=t.canvas.style;n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")];i.setProperty("direction",e,"important");t.prevTextDirection=n}},restoreTextDirection:function(t){var e=t.prevTextDirection;if(e!==undefined){delete t.prevTextDirection;t.canvas.style.setProperty("direction",e[0],e[1])}}};function It(t,e,i,n){var r=Object.keys(i);var o,a,s,l,u,h,c,d,p;for(o=0,a=r.length;o<a;++o){s=r[o];h=i[s];if(!e.hasOwnProperty(s)){e[s]=h}l=e[s];if(l===h||s[0]==="_"){continue}if(!t.hasOwnProperty(s)){t[s]=l}u=t[s];c=typeof h;if(c===typeof u){if(c==="string"){d=Q(u);if(d.valid){p=Q(h);if(p.valid){e[s]=p.mix(d,n).rgbString();continue}}}else if(Mt.isFinite(u)&&Mt.isFinite(h)){e[s]=u+(h-u)*n;continue}}e[s]=h}}Mt.easing=nt,Mt.canvas=Tt,Mt.options=Pt,Mt.math=St,Mt.rtl=At;var Dt=function(t){Mt.extend(this,t);this.initialize.apply(this,arguments)};Mt.extend(Dt.prototype,{_type:undefined,initialize:function(){this.hidden=false},pivot:function(){var t=this;if(!t._view){t._view=Mt.extend({},t._model)}t._start={};return t},transition:function(t){var e=this;var i=e._model;var n=e._start;var r=e._view;if(!i||t===1){e._view=Mt.extend({},i);e._start=null;return e}if(!r){r=e._view={}}if(!n){n=e._start={}}It(n,r,i,t);return e},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return Mt.isNumber(this._model.x)&&Mt.isNumber(this._model.y)}}),Dt.extend=Mt.inherits;var Ot=Dt,zt=Ot.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),Et=zt;Object.defineProperty(zt.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(zt.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}}),pt._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:Mt.noop,onComplete:Mt.noop}});var Bt={animations:[],request:null,addAnimation:function(t,e,i,n){var r=this.animations;var o,a;e.chart=t;e.startTime=Date.now();e.duration=i;if(!n){t.animating=true}for(o=0,a=r.length;o<a;++o){if(r[o].chart===t){r[o]=e;return}}r.push(e);if(r.length===1){this.requestAnimationFrame()}},cancelAnimation:function(e){var t=Mt.findIndex(this.animations,function(t){return t.chart===e});if(t!==-1){this.animations.splice(t,1);e.animating=false}},requestAnimationFrame:function(){var t=this;if(t.request===null){t.request=Mt.requestAnimFrame.call(window,function(){t.request=null;t.startDigest()})}},startDigest:function(){var t=this;t.advance();if(t.animations.length>0){t.requestAnimationFrame()}},advance:function(){var t=this.animations;var e,i,n,r;var o=0;while(o<t.length){e=t[o];i=e.chart;n=e.numSteps;r=Math.floor((Date.now()-e.startTime)/e.duration*n)+1;e.currentStep=Math.min(r,n);Mt.callback(e.render,[i,e],i);Mt.callback(e.onAnimationProgress,[e],i);if(e.currentStep>=n){Mt.callback(e.onAnimationComplete,[e],i);i.animating=false;t.splice(o,1)}else{++o}}}},Ft=Mt.options.resolve,Rt=["push","pop","shift","splice","unshift"];function Nt(r,t){if(r._chartjs){r._chartjs.listeners.push(t);return}Object.defineProperty(r,"_chartjs",{configurable:true,enumerable:false,value:{listeners:[t]}});Rt.forEach(function(t){var i="onData"+t.charAt(0).toUpperCase()+t.slice(1);var n=r[t];Object.defineProperty(r,t,{configurable:true,enumerable:false,value:function(){var e=Array.prototype.slice.call(arguments);var t=n.apply(this,e);Mt.each(r._chartjs.listeners,function(t){if(typeof t[i]==="function"){t[i].apply(t,e)}});return t}})})}function Ut(e,t){var i=e._chartjs;if(!i){return}var n=i.listeners;var r=n.indexOf(t);if(r!==-1){n.splice(r,1)}if(n.length>0){return}Rt.forEach(function(t){delete e[t]});delete e._chartjs}var Zt=function(t,e){this.initialize(t,e)};Mt.extend(Zt.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(t,e){var i=this;i.chart=t;i.index=e;i.linkScales();i.addElements();i._type=i.getMeta().type},updateIndex:function(t){this.index=t},linkScales:function(){var t=this;var e=t.getMeta();var i=t.chart;var n=i.scales;var r=t.getDataset();var o=i.options.scales;if(e.xAxisID===null||!(e.xAxisID in n)||r.xAxisID){e.xAxisID=r.xAxisID||o.xAxes[0].id}if(e.yAxisID===null||!(e.yAxisID in n)||r.yAxisID){e.yAxisID=r.yAxisID||o.yAxes[0].id}},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID}
13,_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(true)},destroy:function(){if(this._data){Ut(this._data,this)}},createMetaDataset:function(){var t=this;var e=t.datasetElementType;return e&&new e({_chart:t.chart,_datasetIndex:t.index})},createMetaData:function(t){var e=this;var i=e.dataElementType;return i&&new i({_chart:e.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var t=this;var e=t.getMeta();var i=t.getDataset().data||[];var n=e.data;var r,o;for(r=0,o=i.length;r<o;++r){n[r]=n[r]||t.createMetaData(r)}e.dataset=e.dataset||t.createMetaDataset()},addElementAndReset:function(t){var e=this.createMetaData(t);this.getMeta().data.splice(t,0,e);this.updateElement(e,t,true)},buildOrUpdateElements:function(){var t=this;var e=t.getDataset();var i=e.data||(e.data=[]);if(t._data!==i){if(t._data){Ut(t._data,t)}if(i&&Object.isExtensible(i)){Nt(i,t)}t._data=i}t.resyncElements()},_configure:function(){var t=this;t._config=Mt.merge(Object.create(null),[t.chart.options.datasets[t._type],t.getDataset()],{merger:function(t,e,i){if(t!=="_meta"&&t!=="data"){Mt._merger(t,e,i)}}})},_update:function(t){var e=this;e._configure();e._cachedDataOpts=null;e.update(t)},update:Mt.noop,transition:function(t){var e=this.getMeta();var i=e.data||[];var n=i.length;var r=0;for(;r<n;++r){i[r].transition(t)}if(e.dataset){e.dataset.transition(t)}},draw:function(){var t=this.getMeta();var e=t.data||[];var i=e.length;var n=0;if(t.dataset){t.dataset.draw()}for(;n<i;++n){e[n].draw()}},getStyle:function(t){var e=this;var i=e.getMeta();var n=i.dataset;var r;e._configure();if(n&&t===undefined){r=e._resolveDatasetElementOptions(n||{})}else{t=t||0;r=e._resolveDataElementOptions(i.data[t]||{},t)}if(r.fill===false||r.fill===null){r.backgroundColor=r.borderColor}return r},_resolveDatasetElementOptions:function(t,e){var i=this;var n=i.chart;var r=i._config;var o=t.custom||{};var a=n.options.elements[i.datasetElementType.prototype._type]||{};var s=i._datasetElementOptions;var l={};var u,h,c,d;var p={chart:n,dataset:i.getDataset(),datasetIndex:i.index,hover:e};for(u=0,h=s.length;u<h;++u){c=s[u];d=e?"hover"+c.charAt(0).toUpperCase()+c.slice(1):c;l[c]=Ft([o[d],r[d],a[d]],p)}return l},_resolveDataElementOptions:function(t,e){var i=this;var n=t&&t.custom;var r=i._cachedDataOpts;if(r&&!n){return r}var o=i.chart;var a=i._config;var s=o.options.elements[i.dataElementType.prototype._type]||{};var l=i._dataElementOptions;var u={};var h={chart:o,dataIndex:e,dataset:i.getDataset(),datasetIndex:i.index};var c={cacheable:!n};var d,p,f,m;n=n||{};if(Mt.isArray(l)){for(p=0,f=l.length;p<f;++p){m=l[p];u[m]=Ft([n[m],a[m],s[m]],h,e,c)}}else{d=Object.keys(l);for(p=0,f=d.length;p<f;++p){m=d[p];u[m]=Ft([n[m],a[l[m]],a[m],s[m]],h,e,c)}}if(c.cacheable){i._cachedDataOpts=Object.freeze(u)}return u},removeHoverStyle:function(t){Mt.merge(t._model,t.$previousStyle||{});delete t.$previousStyle},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex];var i=t._index;var n=t.custom||{};var r=t._model;var o=Mt.getHoverColor;t.$previousStyle={backgroundColor:r.backgroundColor,borderColor:r.borderColor,borderWidth:r.borderWidth};r.backgroundColor=Ft([n.hoverBackgroundColor,e.hoverBackgroundColor,o(r.backgroundColor)],undefined,i);r.borderColor=Ft([n.hoverBorderColor,e.hoverBorderColor,o(r.borderColor)],undefined,i);r.borderWidth=Ft([n.hoverBorderWidth,e.hoverBorderWidth,r.borderWidth],undefined,i)},_removeDatasetHoverStyle:function(){var t=this.getMeta().dataset;if(t){this.removeHoverStyle(t)}},_setDatasetHoverStyle:function(){var t=this.getMeta().dataset;var e={};var i,n,r,o,a,s;if(!t){return}s=t._model;a=this._resolveDatasetElementOptions(t,true);o=Object.keys(a);for(i=0,n=o.length;i<n;++i){r=o[i];e[r]=s[r];s[r]=a[r]}t.$previousStyle=e},resyncElements:function(){var t=this;var e=t.getMeta();var i=t.getDataset().data;var n=e.data.length;var r=i.length;if(r<n){e.data.splice(r,n-r)}else if(r>n){t.insertElements(n,r-n)}},insertElements:function(t,e){for(var i=0;i<e;++i){this.addElementAndReset(t+i)}},onDataPush:function(){var t=arguments.length;this.insertElements(this.getDataset().data.length-t,t)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(t,e){this.getMeta().data.splice(t,e);this.insertElements(t,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),Zt.extend=Mt.inherits;var jt=Zt,Wt=Math.PI*2;function Ht(t,e){var i=e.startAngle;var n=e.endAngle;var r=e.pixelMargin;var o=r/e.outerRadius;var a=e.x;var s=e.y;t.beginPath();t.arc(a,s,e.outerRadius,i-o,n+o);if(e.innerRadius>r){o=r/e.innerRadius;t.arc(a,s,e.innerRadius-r,n+o,i-o,true)}else{t.arc(a,s,r,n+Math.PI/2,i-Math.PI/2)}t.closePath();t.clip()}function Gt(t,e,i,n){var r=i.endAngle;var o;if(n){i.endAngle=i.startAngle+Wt;Ht(t,i);i.endAngle=r;if(i.endAngle===i.startAngle&&i.fullCircles){i.endAngle+=Wt;i.fullCircles--}}t.beginPath();t.arc(i.x,i.y,i.innerRadius,i.startAngle+Wt,i.startAngle,true);for(o=0;o<i.fullCircles;++o){t.stroke()}t.beginPath();t.arc(i.x,i.y,e.outerRadius,i.startAngle,i.startAngle+Wt);for(o=0;o<i.fullCircles;++o){t.stroke()}}function Vt(t,e,i){var n=e.borderAlign==="inner";if(n){t.lineWidth=e.borderWidth*2;t.lineJoin="round"}else{t.lineWidth=e.borderWidth;t.lineJoin="bevel"}if(i.fullCircles){Gt(t,e,i,n)}if(n){Ht(t,i)}t.beginPath();t.arc(i.x,i.y,e.outerRadius,i.startAngle,i.endAngle);t.arc(i.x,i.y,i.innerRadius,i.endAngle,i.startAngle,true);t.closePath();t.stroke()}pt._set("global",{elements:{arc:{backgroundColor:pt.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});var qt=Ot.extend({_type:"arc",inLabelRange:function(t){var e=this._view;if(e){return Math.pow(t-e.x,2)<Math.pow(e.radius+e.hoverRadius,2)}return false},inRange:function(t,e){var i=this._view;if(i){var n=Mt.getAngleFromPoint(i,{x:t,y:e});var r=n.angle;var o=n.distance;var a=i.startAngle;var s=i.endAngle;while(s<a){s+=Wt}while(r>s){r-=Wt}while(r<a){r+=Wt}var l=r>=a&&r<=s;var u=o>=i.innerRadius&&o<=i.outerRadius;return l&&u}return false},getCenterPoint:function(){var t=this._view;var e=(t.startAngle+t.endAngle)/2;var i=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view;var e=t.startAngle+(t.endAngle-t.startAngle)/2;var i=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},draw:function(){var t=this._chart.ctx;var e=this._view;var i=e.borderAlign==="inner"?.33:0;var n={x:e.x,y:e.y,innerRadius:e.innerRadius,outerRadius:Math.max(e.outerRadius-i,0),pixelMargin:i,startAngle:e.startAngle,endAngle:e.endAngle,fullCircles:Math.floor(e.cir
13cumference/Wt)};var r;t.save();t.fillStyle=e.backgroundColor;t.strokeStyle=e.borderColor;if(n.fullCircles){n.endAngle=n.startAngle+Wt;t.beginPath();t.arc(n.x,n.y,n.outerRadius,n.startAngle,n.endAngle);t.arc(n.x,n.y,n.innerRadius,n.endAngle,n.startAngle,true);t.closePath();for(r=0;r<n.fullCircles;++r){t.fill()}n.endAngle=n.startAngle+e.circumference%Wt}t.beginPath();t.arc(n.x,n.y,n.outerRadius,n.startAngle,n.endAngle);t.arc(n.x,n.y,n.innerRadius,n.endAngle,n.startAngle,true);t.closePath();t.fill();if(e.borderWidth){Vt(t,e,n)}t.restore()}}),Kt=Mt.valueOrDefault,Jt=pt.global.defaultColor;pt._set("global",{elements:{line:{tension:.4,backgroundColor:Jt,borderWidth:3,borderColor:Jt,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:true,fill:true}}});var Yt=Ot.extend({_type:"line",draw:function(){var t=this;var e=t._view;var i=t._chart.ctx;var n=e.spanGaps;var r=t._children.slice();var o=pt.global;var a=o.elements.line;var s=-1;var l=t._loop;var u,h,c;if(!r.length){return}if(t._loop){for(u=0;u<r.length;++u){h=Mt.previousItem(r,u);if(!r[u]._view.skip&&h._view.skip){r=r.slice(u).concat(r.slice(0,u));l=n;break}}if(l){r.push(r[0])}}i.save();i.lineCap=e.borderCapStyle||a.borderCapStyle;if(i.setLineDash){i.setLineDash(e.borderDash||a.borderDash)}i.lineDashOffset=Kt(e.borderDashOffset,a.borderDashOffset);i.lineJoin=e.borderJoinStyle||a.borderJoinStyle;i.lineWidth=Kt(e.borderWidth,a.borderWidth);i.strokeStyle=e.borderColor||o.defaultColor;i.beginPath();c=r[0]._view;if(!c.skip){i.moveTo(c.x,c.y);s=0}for(u=1;u<r.length;++u){c=r[u]._view;h=s===-1?Mt.previousItem(r,u):r[s];if(!c.skip){if(s!==u-1&&!n||s===-1){i.moveTo(c.x,c.y)}else{Mt.canvas.lineTo(i,h._view,c)}s=u}}if(l){i.closePath()}i.stroke();i.restore()}}),Xt=Mt.valueOrDefault,Qt=pt.global.defaultColor;function $t(t){var e=this._view;return e?Math.abs(t-e.x)<e.radius+e.hitRadius:false}function te(t){var e=this._view;return e?Math.abs(t-e.y)<e.radius+e.hitRadius:false}pt._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:Qt,borderColor:Qt,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});var ee=Ot.extend({_type:"point",inRange:function(t,e){var i=this._view;return i?Math.pow(t-i.x,2)+Math.pow(e-i.y,2)<Math.pow(i.hitRadius+i.radius,2):false},inLabelRange:$t,inXRange:$t,inYRange:te,getCenterPoint:function(){var t=this._view;return{x:t.x,y:t.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y,padding:t.radius+t.borderWidth}},draw:function(t){var e=this._view;var i=this._chart.ctx;var n=e.pointStyle;var r=e.rotation;var o=e.radius;var a=e.x;var s=e.y;var l=pt.global;var u=l.defaultColor;if(e.skip){return}if(t===undefined||Mt.canvas._isPointInArea(e,t)){i.strokeStyle=e.borderColor||u;i.lineWidth=Xt(e.borderWidth,l.elements.point.borderWidth);i.fillStyle=e.backgroundColor||u;Mt.canvas.drawPoint(i,n,o,a,s,r)}}}),ie=pt.global.defaultColor;function ne(t){return t&&t.width!==undefined}function re(t){var e,i,n,r,o;if(ne(t)){o=t.width/2;e=t.x-o;i=t.x+o;n=Math.min(t.y,t.base);r=Math.max(t.y,t.base)}else{o=t.height/2;e=Math.min(t.x,t.base);i=Math.max(t.x,t.base);n=t.y-o;r=t.y+o}return{left:e,top:n,right:i,bottom:r}}function oe(t,e,i){return t===e?i:t===i?e:t}function ae(t){var e=t.borderSkipped;var i={};if(!e){return i}if(t.horizontal){if(t.base>t.x){e=oe(e,"left","right")}}else if(t.base<t.y){e=oe(e,"bottom","top")}i[e]=true;return i}function se(t,e,i){var n=t.borderWidth;var r=ae(t);var o,a,s,l;if(Mt.isObject(n)){o=+n.top||0;a=+n.right||0;s=+n.bottom||0;l=+n.left||0}else{o=a=s=l=+n||0}return{t:r.top||o<0?0:o>i?i:o,r:r.right||a<0?0:a>e?e:a,b:r.bottom||s<0?0:s>i?i:s,l:r.left||l<0?0:l>e?e:l}}function le(t){var e=re(t);var i=e.right-e.left;var n=e.bottom-e.top;var r=se(t,i/2,n/2);return{outer:{x:e.left,y:e.top,w:i,h:n},inner:{x:e.left+r.l,y:e.top+r.t,w:i-r.l-r.r,h:n-r.t-r.b}}}function ue(t,e,i){var n=e===null;var r=i===null;var o=!t||n&&r?false:re(t);return o&&(n||e>=o.left&&e<=o.right)&&(r||i>=o.top&&i<=o.bottom)}pt._set("global",{elements:{rectangle:{backgroundColor:ie,borderColor:ie,borderSkipped:"bottom",borderWidth:0}}});var he=Ot.extend({_type:"rectangle",draw:function(){var t=this._chart.ctx;var e=this._view;var i=le(e);var n=i.outer;var r=i.inner;t.fillStyle=e.backgroundColor;t.fillRect(n.x,n.y,n.w,n.h);if(n.w===r.w&&n.h===r.h){return}t.save();t.beginPath();t.rect(n.x,n.y,n.w,n.h);t.clip();t.fillStyle=e.borderColor;t.rect(r.x,r.y,r.w,r.h);t.fill("evenodd");
13t.restore()},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){return ue(this._view,t,e)},inLabelRange:function(t,e){var i=this._view;return ne(i)?ue(i,t,null):ue(i,null,e)},inXRange:function(t){return ue(this._view,t,null)},inYRange:function(t){return ue(this._view,null,t)},getCenterPoint:function(){var t=this._view;var e,i;if(ne(t)){e=t.x;i=(t.y+t.base)/2}else{e=(t.x+t.base)/2;i=t.y}return{x:e,y:i}},getArea:function(){var t=this._view;return ne(t)?t.width*Math.abs(t.y-t.base):t.height*Math.abs(t.x-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}}),ce={},de,pe=Yt,fe=ee,me=he;ce.Arc=qt,ce.Line=pe,ce.Point=fe,ce.Rectangle=me;var ge=Mt._deprecated,ve=Mt.valueOrDefault;function _e(t,e){var i=t._length;var n,r,o,a;for(o=1,a=e.length;o<a;++o){i=Math.min(i,Math.abs(e[o]-e[o-1]))}for(o=0,a=t.getTicks().length;o<a;++o){r=t.getPixelForTick(o);i=o>0?Math.min(i,Math.abs(r-n)):i;n=r}return i}function ye(t,e,i){var n=i.barThickness;var r=e.stackCount;var o=e.pixels[t];var a=Mt.isNullOrUndef(n)?_e(e.scale,e.pixels):-1;var s,l;if(Mt.isNullOrUndef(n)){s=a*i.categoryPercentage;l=i.barPercentage}else{s=n*r;l=1}return{chunk:s/r,ratio:l,start:o-s/2}}function xe(t,e,i){var n=e.pixels;var r=n[t];var o=t>0?n[t-1]:null;var a=t<n.length-1?n[t+1]:null;var s=i.categoryPercentage;var l,u;if(o===null){o=r-(a===null?e.end-e.start:a-r)}if(a===null){a=r+r-o}l=r-(r-Math.min(o,a))/2*s;u=Math.abs(a-o)/2*s;return{chunk:u/e.stackCount,ratio:i.barPercentage,start:l}}pt._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:true,gridLines:{offsetGridLines:true}}],yAxes:[{type:"linear"}]}}),pt._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var be=jt.extend({dataElementType:ce.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var t=this;var e,i;jt.prototype.initialize.apply(t,arguments);e=t.getMeta();e.stack=t.getDataset().stack;e.bar=true;i=t._getIndexScale().options;ge("bar chart",i.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage");ge("bar chart",i.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness");ge("bar chart",i.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage");ge("bar chart",t._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength");ge("bar chart",i.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(t){var e=this;var i=e.getMeta().data;var n,r;e._ruler=e.getRuler();for(n=0,r=i.length;n<r;++n){e.updateElement(i[n],n,t)}},updateElement:function(t,e,i){var n=this;var r=n.getMeta();var o=n.getDataset();var a=n._resolveDataElementOptions(t,e);t._xScale=n.getScaleForId(r.xAxisID);t._yScale=n.getScaleForId(r.yAxisID);t._datasetIndex=n.index;t._index=e;t._model={backgroundColor:a.backgroundColor,borderColor:a.borderColor,borderSkipped:a.borderSkipped,borderWidth:a.borderWidth,datasetLabel:o.label,label:n.chart.data.labels[e]};if(Mt.isArray(o.data[e])){t._model.borderSkipped=null}n._updateElementGeometry(t,e,i,a);t.pivot()},_updateElementGeometry:function(t,e,i,n){var r=this;var o=t._model;var a=r._getValueScale();var s=a.getBasePixel();var l=a.isHorizontal();var u=r._ruler||r.getRuler();var h=r.calculateBarValuePixels(r.index,e,n);var c=r.calculateBarIndexPixels(r.index,e,u,n);o.horizontal=l;o.base=i?s:h.base;o.x=l?i?s:h.head:c.center;o.y=l?c.center:i?s:h.head;o.height=l?c.size:undefined;o.width=l?undefined:c.size},_getStacks:function(t){var e=this;var i=e._getIndexScale();var n=i._getMatchingVisibleMetas(e._type);var r=i.options.stacked;var o=n.length;var a=[];var s,l;for(s=0;s<o;++s){l=n[s];if(r===false||a.indexOf(l.stack)===-1||r===undefined&&l.stack===undefined){a.push(l.stack)}if(l.index===t){break}}return a},getStackCount:function(){return this._getStacks().length},getStackIndex:function(t,e){var i=this._getStacks(t);var n=e!==undefined?i.indexOf(e):-1;return n===-1?i.length-1:n},getRuler:function(){var t=this;var e=t._getIndexScale();var i=[];var n,r;for(n=0,r=t.getMeta().data.length;n<r;++n){i.push(e.getPixelForValue(null,n,t.index))}return{pixels:i,start:e._startPixel,end:e._endPixel,stackCount:t.getStackCount(),scale:e}}
13,calculateBarValuePixels:function(t,e,i){var n=this;var r=n.chart;var o=n._getValueScale();var a=o.isHorizontal();var s=r.data.datasets;var l=o._getMatchingVisibleMetas(n._type);var u=o._parseValue(s[t].data[e]);var h=i.minBarLength;var c=o.options.stacked;var d=n.getMeta().stack;var p=u.start===undefined?0:u.max>=0&&u.min>=0?u.min:u.max;var f=u.start===undefined?u.end:u.max>=0&&u.min>=0?u.max-u.min:u.min-u.max;var m=l.length;var g,v,_,y,x,b,w;if(c||c===undefined&&d!==undefined){for(g=0;g<m;++g){v=l[g];if(v.index===t){break}if(v.stack===d){w=o._parseValue(s[v.index].data[e]);_=w.start===undefined?w.end:w.min>=0&&w.max>=0?w.max:w.min;if(u.min<0&&_<0||u.max>=0&&_>0){p+=_}}}}y=o.getPixelForValue(p);x=o.getPixelForValue(p+f);b=x-y;if(h!==undefined&&Math.abs(b)<h){b=h;if(f>=0&&!a||f<0&&a){x=y-h}else{x=y+h}}return{size:b,base:y,head:x,center:x+b/2}},calculateBarIndexPixels:function(t,e,i,n){var r=this;var o=n.barThickness==="flex"?xe(e,i,n):ye(e,i,n);var a=r.getStackIndex(t,r.getMeta().stack);var s=o.start+o.chunk*a+o.chunk/2;var l=Math.min(ve(n.maxBarThickness,Infinity),o.chunk*o.ratio);return{base:s-l/2,head:s+l/2,center:s,size:l}},draw:function(){var t=this;var e=t.chart;var i=t._getValueScale();var n=t.getMeta().data;var r=t.getDataset();var o=n.length;var a=0;Mt.canvas.clipArea(e.ctx,e.chartArea);for(;a<o;++a){var s=i._parseValue(r.data[a]);if(!isNaN(s.min)&&!isNaN(s.max)){n[a].draw()}}Mt.canvas.unclipArea(e.ctx)},_resolveDataElementOptions:function(){var t=this;var e=Mt.extend({},jt.prototype._resolveDataElementOptions.apply(t,arguments));var i=t._getIndexScale().options;var n=t._getValueScale().options;e.barPercentage=ve(i.barPercentage,e.barPercentage);e.barThickness=ve(i.barThickness,e.barThickness);e.categoryPercentage=ve(i.categoryPercentage,e.categoryPercentage);e.maxBarThickness=ve(i.maxBarThickness,e.maxBarThickness);e.minBarLength=ve(n.minBarLength,e.minBarLength);return e}}),we=Mt.valueOrDefault,ke=Mt.options.resolve;pt._set("bubble",{hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(t,e){var i=e.datasets[t.datasetIndex].label||"";var n=e.datasets[t.datasetIndex].data[t.index];return i+": ("+t.xLabel+", "+t.yLabel+", "+n.r+")"}}}});var Le=jt.extend({dataElementType:ce.Point,_dataElementOptions:["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"],update:function(i){var n=this;var t=n.getMeta();var e=t.data;Mt.each(e,function(t,e){n.updateElement(t,e,i)})},updateElement:function(t,e,i){var n=this;var r=n.getMeta();var o=t.custom||{};var a=n.getScaleForId(r.xAxisID);var s=n.getScaleForId(r.yAxisID);var l=n._resolveDataElementOptions(t,e);var u=n.getDataset().data[e];var h=n.index;var c=i?a.getPixelForDecimal(.5):a.getPixelForValue(typeof u==="object"?u:NaN,e,h);var d=i?s.getBasePixel():s.getPixelForValue(u,e,h);t._xScale=a;t._yScale=s;t._options=l;t._datasetIndex=h;t._index=e;t._model={backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,hitRadius:l.hitRadius,pointStyle:l.pointStyle,rotation:l.rotation,radius:i?0:l.radius,skip:o.skip||isNaN(c)||isNaN(d),x:c,y:d};t.pivot()},setHoverStyle:function(t){var e=t._model;var i=t._options;var n=Mt.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius};e.backgroundColor=we(i.hoverBackgroundColor,n(i.backgroundColor));e.borderColor=we(i.hoverBorderColor,n(i.borderColor));e.borderWidth=we(i.hoverBorderWidth,i.borderWidth);e.radius=i.radius+i.hoverRadius},_resolveDataElementOptions:function(t,e){var i=this;var n=i.chart;var r=i.getDataset();var o=t.custom||{};var a=r.data[e]||{};var s=jt.prototype._resolveDataElementOptions.apply(i,arguments);var l={chart:n,dataIndex:e,dataset:r,datasetIndex:i.index};if(i._cachedDataOpts===s){s=Mt.extend({},s)}s.radius=ke([o.radius,a.r,i._config.radius,n.options.elements.point.radius],l,e);return s}}),Me=Mt.valueOrDefault,Ce=Math.PI,Te=Ce*2,Pe=Ce/2;pt._set("doughnut",{animation:{animateRotate:true,animateScale:false},hover:{mode:"single"},legendCallback:function(t){var e=document.createElement("ul");var i=t.data;var n=i.datasets;var r=i.labels;var o,a,s,l;e.setAttribute("class",t.id+"-legend");if(n.length){for(o=0,a=n[0].data.length;o<a;++o){s=e.appendChild(document.createElement("li"));l=s.appendChild(document.createElement("span"));l.style.backgroundColor=n[0].backgroundColor[o];if(r[o]){s.appendChild(document.createTextNode(r[o]))}}}return e.outerHTML},legend:{labels:{generateLabels:function(r){var o=r.data;if(o.labels.length&&o.datasets.length){return o.labels.map(function(t,e){var i=r.getDatasetMeta(0);var n=i.controller.getStyle(e);return{text:t,fillStyle:n.backgroundColor,strokeStyle:n.borderColor,lineWidth:n.borderWidth,hidden:isNaN(o.datasets[0].data[e])||i.data[e].hidden,index:e}})}return[]}},onClick:function(t,e){var i=e.index;var n=this.chart;var r,o,a;for(r=0,o=(n.data.datasets||[]).length;r<o;++r){a=n.getDatasetMeta(r);if(a.data[i]){a.data[i].hidden=!a.data[i].hidden}}n.update()}},cutoutPercentage:50,rotation:-Pe,circumference:Te,tooltips:{callbacks:{title:function(){return""},label:function(t,e){var i=e.labels[t.index];var n=": "+e.datasets[t.datasetIndex].data[t.index];if(Mt.isArray(i)){i=i.slice();i[0]+=n}else{i+=n}return i}}}});var Se=jt.extend({dataElementType:ce.Arc,linkScales:Mt.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroun
13dColor","hoverBorderColor","hoverBorderWidth"],getRingIndex:function(t){var e=0;for(var i=0;i<t;++i){if(this.chart.isDatasetVisible(i)){++e}}return e},update:function(t){var e=this;var i=e.chart;var n=i.chartArea;var r=i.options;var o=1;var a=1;var s=0;var l=0;var u=e.getMeta();var h=u.data;var c=r.cutoutPercentage/100||0;var d=r.circumference;var p=e._getRingWeight(e.index);var f,m,g,v;if(d<Te){var _=r.rotation%Te;_+=_>=Ce?-Te:_<-Ce?Te:0;var y=_+d;var x=Math.cos(_);var b=Math.sin(_);var w=Math.cos(y);var k=Math.sin(y);var L=_<=0&&y>=0||y>=Te;var M=_<=Pe&&y>=Pe||y>=Te+Pe;var C=_===-Ce||y>=Ce;var T=_<=-Pe&&y>=-Pe||y>=Ce+Pe;var P=C?-1:Math.min(x,x*c,w,w*c);var S=T?-1:Math.min(b,b*c,k,k*c);var A=L?1:Math.max(x,x*c,w,w*c);var I=M?1:Math.max(b,b*c,k,k*c);o=(A-P)/2;a=(I-S)/2;s=-(A+P)/2;l=-(I+S)/2}for(g=0,v=h.length;g<v;++g){h[g]._options=e._resolveDataElementOptions(h[g],g)}i.borderWidth=e.getMaxBorderWidth();f=(n.right-n.left-i.borderWidth)/o;m=(n.bottom-n.top-i.borderWidth)/a;i.outerRadius=Math.max(Math.min(f,m)/2,0);i.innerRadius=Math.max(i.outerRadius*c,0);i.radiusLength=(i.outerRadius-i.innerRadius)/(e._getVisibleDatasetWeightTotal()||1);i.offsetX=s*i.outerRadius;i.offsetY=l*i.outerRadius;u.total=e.calculateTotal();e.outerRadius=i.outerRadius-i.radiusLength*e._getRingWeightOffset(e.index);e.innerRadius=Math.max(e.outerRadius-i.radiusLength*p,0);for(g=0,v=h.length;g<v;++g){e.updateElement(h[g],g,t)}},updateElement:function(t,e,i){var n=this;var r=n.chart;var o=r.chartArea;var a=r.options;var s=a.animation;var l=(o.left+o.right)/2;var u=(o.top+o.bottom)/2;var h=a.rotation;var c=a.rotation;var d=n.getDataset();var p=i&&s.animateRotate?0:t.hidden?0:n.calculateCircumference(d.data[e])*(a.circumference/Te);var f=i&&s.animateScale?0:n.innerRadius;var m=i&&s.animateScale?0:n.outerRadius;var g=t._options||{};Mt.extend(t,{_datasetIndex:n.index,_index:e,_model:{backgroundColor:g.backgroundColor,borderColor:g.borderColor,borderWidth:g.borderWidth,borderAlign:g.borderAlign,x:l+r.offsetX,y:u+r.offsetY,startAngle:h,endAngle:c,circumference:p,outerRadius:m,innerRadius:f,label:Mt.valueAtIndexOrDefault(d.label,e,r.data.labels[e])}});var v=t._model;if(!i||!s.animateRotate){if(e===0){v.startAngle=a.rotation}else{v.startAngle=n.getMeta().data[e-1]._model.endAngle}v.endAngle=v.startAngle+v.circumference}t.pivot()},calculateTotal:function(){var i=this.getDataset();var t=this.getMeta();var n=0;var r;Mt.each(t.data,function(t,e){r=i.data[e];if(!isNaN(r)&&!t.hidden){n+=Math.abs(r)}});return n},calculateCircumference:function(t){var e=this.getMeta().total;if(e>0&&!isNaN(t)){return Te*(Math.abs(t)/e)}return 0},getMaxBorderWidth:function(t){var e=this;var i=0;var n=e.chart;var r,o,a,s,l,u,h,c;if(!t){for(r=0,o=n.data.datasets.length;r<o;++r){if(n.isDatasetVisible(r)){a=n.getDatasetMeta(r);t=a.data;if(r!==e.index){l=a.controller}break}}}if(!t){return 0}for(r=0,o=t.length;r<o;++r){s=t[r];if(l){l._configure();u=l._resolveDataElementOptions(s,r)}else{u=s._options}if(u.borderAlign!=="inner"){h=u.borderWidth;c=u.hoverBorderWidth;i=h>i?h:i;i=c>i?c:i}}return i},setHoverStyle:function(t){var e=t._model;var i=t._options;var n=Mt.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth};e.backgroundColor=Me(i.hoverBackgroundColor,n(i.backgroundColor));e.borderColor=Me(i.hoverBorderColor,n(i.borderColor));e.borderWidth=Me(i.hoverBorderWidth,i.borderWidth)},_getRingWeightOffset:function(t){var e=0;for(var i=0;i<t;++i){if(this.chart.isDatasetVisible(i)){e+=this._getRingWeight(i)}}return e},_getRingWeight:function(t){return Math.max(Me(this.chart.data.datasets[t].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});pt._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{type:"category",position:"left",offset:true,gridLines:{offsetGridLines:true}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{mode:"index",axis:"y"}}),pt._set("global",{datasets:{horizontalBar:{categoryPercentage:.8,barPercentage:.9}}});var Ae=be.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}}),Ie=Mt.valueOrDefault,De=Mt.options.resolve,Oe=Mt.canvas._isPointInArea;function ze(t,e){var i=t&&t.options.ticks||{};var n=i.reverse;var r=i.min===undefined?e:0;var o=i.max===undefined?e:0;return{start:n?o:r,end:n?r:o}}function Ee(t,e,i){var n=i/2;var r=ze(t,n);var o=ze(e,n);return{top:o.end,right:r.end,bottom:o.start,left:r.start}}function Be(t){var e,i,n,r;if(Mt.isObject(t)){e=t.top;i=t.right;n=t.bottom;r=t.left}else{e=i=n=r=t}return{top:e,right:i,bottom:n,left:r}}pt._set("line",{showLines:true,spanGaps:false,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}});var Fe=jt.extend({datasetElementType:ce.Line,dataElementType:ce.Point,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth","cubicInterpolationMode","fill"],_dataElementOptions:{backgroundColor:"pointBackgroun
13dColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},update:function(t){var e=this;var i=e.getMeta();var n=i.dataset;var r=i.data||[];var o=e.chart.options;var a=e._config;var s=e._showLine=Ie(a.showLine,o.showLines);var l,u;e._xScale=e.getScaleForId(i.xAxisID);e._yScale=e.getScaleForId(i.yAxisID);if(s){if(a.tension!==undefined&&a.lineTension===undefined){a.lineTension=a.tension}n._scale=e._yScale;n._datasetIndex=e.index;n._children=r;n._model=e._resolveDatasetElementOptions(n);n.pivot()}for(l=0,u=r.length;l<u;++l){e.updateElement(r[l],l,t)}if(s&&n._model.tension!==0){e.updateBezierControlPoints()}for(l=0,u=r.length;l<u;++l){r[l].pivot()}},updateElement:function(t,e,i){var n=this;var r=n.getMeta();var o=t.custom||{};var a=n.getDataset();var s=n.index;var l=a.data[e];var u=n._xScale;var h=n._yScale;var c=r.dataset._model;var d,p;var f=n._resolveDataElementOptions(t,e);d=u.getPixelForValue(typeof l==="object"?l:NaN,e,s);p=i?h.getBasePixel():n.calculatePointY(l,e,s);t._xScale=u;t._yScale=h;t._options=f;t._datasetIndex=s;t._index=e;t._model={x:d,y:p,skip:o.skip||isNaN(d)||isNaN(p),radius:f.radius,pointStyle:f.pointStyle,rotation:f.rotation,backgroundColor:f.backgroundColor,borderColor:f.borderColor,borderWidth:f.borderWidth,tension:Ie(o.tension,c?c.tension:0),steppedLine:c?c.steppedLine:false,hitRadius:f.hitRadius}},_resolveDatasetElementOptions:function(t){var e=this;var i=e._config;var n=t.custom||{};var r=e.chart.options;var o=r.elements.line;var a=jt.prototype._resolveDatasetElementOptions.apply(e,arguments);a.spanGaps=Ie(i.spanGaps,r.spanGaps);a.tension=Ie(i.lineTension,o.tension);a.steppedLine=De([n.steppedLine,i.steppedLine,o.stepped]);a.clip=Be(Ie(i.clip,Ee(e._xScale,e._yScale,a.borderWidth)));return a},calculatePointY:function(t,e,i){var n=this;var r=n.chart;var o=n._yScale;var a=0;var s=0;var l,u,h,c,d,p,f;if(o.options.stacked){d=+o.getRightValue(t);p=r._getSortedVisibleDatasetMetas();f=p.length;for(l=0;l<f;++l){h=p[l];if(h.index===i){break}u=r.data.datasets[h.index];if(h.type==="line"&&h.yAxisID===o.id){c=+o.getRightValue(u.data[e]);if(c<0){s+=c||0}else{a+=c||0}}}if(d<0){return o.getPixelForValue(s+d)}return o.getPixelForValue(a+d)}return o.getPixelForValue(t)},updateBezierControlPoints:function(){var t=this;var e=t.chart;var i=t.getMeta();var n=i.dataset._model;var r=e.chartArea;var o=i.data||[];var a,s,l,u;if(n.spanGaps){o=o.filter(function(t){return!t._model.skip})}function h(t,e,i){return Math.max(Math.min(t,i),e)}if(n.cubicInterpolationMode==="monotone"){Mt.splineCurveMonotone(o)}else{for(a=0,s=o.length;a<s;++a){l=o[a]._model;u=Mt.splineCurve(Mt.previousItem(o,a)._model,l,Mt.nextItem(o,a)._model,n.tension);l.controlPointPreviousX=u.previous.x;l.controlPointPreviousY=u.previous.y;l.controlPointNextX=u.next.x;l.controlPointNextY=u.next.y}}if(e.options.elements.line.capBezierPoints){for(a=0,s=o.length;a<s;++a){l=o[a]._model;if(Oe(l,r)){if(a>0&&Oe(o[a-1]._model,r)){l.controlPointPreviousX=h(l.controlPointPreviousX,r.left,r.right);l.controlPointPreviousY=h(l.controlPointPreviousY,r.top,r.bottom)}if(a<o.length-1&&Oe(o[a+1]._model,r)){l.controlPointNextX=h(l.controlPointNextX,r.left,r.right);l.controlPointNextY=h(l.controlPointNextY,r.top,r.bottom)}}}}},draw:function(){var t=this;var e=t.chart;var i=t.getMeta();var n=i.data||[];var r=e.chartArea;var o=e.canvas;var a=0;var s=n.length;var l;if(t._showLine){l=i.dataset._model.clip;Mt.canvas.clipArea(e.ctx,{left:l.left===false?0:r.left-l.left,right:l.right===false?o.width:r.right+l.right,top:l.top===false?0:r.top-l.top,bottom:l.bottom===false?o.height:r.bottom+l.bottom});i.dataset.draw();Mt.canvas.unclipArea(e.ctx)}for(;a<s;++a){n[a].draw(r)}},setHoverStyle:function(t){var e=t._model;var i=t._options;var n=Mt.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius};
13e.backgroundColor=Ie(i.hoverBackgroundColor,n(i.backgroundColor));e.borderColor=Ie(i.hoverBorderColor,n(i.borderColor));e.borderWidth=Ie(i.hoverBorderWidth,i.borderWidth);e.radius=Ie(i.hoverRadius,i.radius)}}),Re=Mt.options.resolve;pt._set("polarArea",{scale:{type:"radialLinear",angleLines:{display:false},gridLines:{circular:true},pointLabels:{display:false},ticks:{beginAtZero:true}},animation:{animateRotate:true,animateScale:true},startAngle:-.5*Math.PI,legendCallback:function(t){var e=document.createElement("ul");var i=t.data;var n=i.datasets;var r=i.labels;var o,a,s,l;e.setAttribute("class",t.id+"-legend");if(n.length){for(o=0,a=n[0].data.length;o<a;++o){s=e.appendChild(document.createElement("li"));l=s.appendChild(document.createElement("span"));l.style.backgroundColor=n[0].backgroundColor[o];if(r[o]){s.appendChild(document.createTextNode(r[o]))}}}return e.outerHTML},legend:{labels:{generateLabels:function(r){var o=r.data;if(o.labels.length&&o.datasets.length){return o.labels.map(function(t,e){var i=r.getDatasetMeta(0);var n=i.controller.getStyle(e);return{text:t,fillStyle:n.backgroundColor,strokeStyle:n.borderColor,lineWidth:n.borderWidth,hidden:isNaN(o.datasets[0].data[e])||i.data[e].hidden,index:e}})}return[]}},onClick:function(t,e){var i=e.index;var n=this.chart;var r,o,a;for(r=0,o=(n.data.datasets||[]).length;r<o;++r){a=n.getDatasetMeta(r);a.data[i].hidden=!a.data[i].hidden}n.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}});var Ne=jt.extend({dataElementType:ce.Arc,linkScales:Mt.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(t){var e=this;var i=e.getDataset();var n=e.getMeta();var r=e.chart.options.startAngle||0;var o=e._starts=[];var a=e._angles=[];var s=n.data;var l,u,h;e._updateRadius();n.count=e.countVisibleElements();for(l=0,u=i.data.length;l<u;l++){o[l]=r;h=e._computeAngle(l);a[l]=h;r+=h}for(l=0,u=s.length;l<u;++l){s[l]._options=e._resolveDataElementOptions(s[l],l);e.updateElement(s[l],l,t)}},_updateRadius:function(){var t=this;var e=t.chart;var i=e.chartArea;var n=e.options;var r=Math.min(i.right-i.left,i.bottom-i.top);e.outerRadius=Math.max(r/2,0);e.innerRadius=Math.max(n.cutoutPercentage?e.outerRadius/100*n.cutoutPercentage:1,0);e.radiusLength=(e.outerRadius-e.innerRadius)/e.getVisibleDatasetCount();t.outerRadius=e.outerRadius-e.radiusLength*t.index;t.innerRadius=t.outerRadius-e.radiusLength},updateElement:function(t,e,i){var n=this;var r=n.chart;var o=n.getDataset();var a=r.options;var s=a.animation;var l=r.scale;var u=r.data.labels;var h=l.xCenter;var c=l.yCenter;var d=a.startAngle;var p=t.hidden?0:l.getDistanceFromCenterForValue(o.data[e]);var f=n._starts[e];var m=f+(t.hidden?0:n._angles[e]);var g=s.animateScale?0:l.getDistanceFromCenterForValue(o.data[e]);var v=t._options||{};Mt.extend(t,{_datasetIndex:n.index,_index:e,_scale:l,_model:{backgroundColor:v.backgroundColor,borderColor:v.borderColor,borderWidth:v.borderWidth,borderAlign:v.borderAlign,x:h,y:c,innerRadius:0,outerRadius:i?g:p,startAngle:i&&s.animateRotate?d:f,endAngle:i&&s.animateRotate?d:m,label:Mt.valueAtIndexOrDefault(u,e,u[e])}});t.pivot()},countVisibleElements:function(){var i=this.getDataset();var t=this.getMeta();var n=0;Mt.each(t.data,function(t,e){if(!isNaN(i.data[e])&&!t.hidden){n++}});return n},setHoverStyle:function(t){var e=t._model;var i=t._options;var n=Mt.getHoverColor;var r=Mt.valueOrDefault;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth};e.backgroundColor=r(i.hoverBackgroundColor,n(i.backgroundColor));e.borderColor=r(i.hoverBorderColor,n(i.borderColor));e.borderWidth=r(i.hoverBorderWidth,i.borderWidth)},_computeAngle:function(t){var e=this;var i=this.getMeta().count;var n=e.getDataset();var r=e.getMeta();if(isNaN(n.data[t])||r.data[t].hidden){return 0}var o={chart:e.chart,dataIndex:t,dataset:n,datasetIndex:e.index};
13return Re([e.chart.options.elements.arc.angle,2*Math.PI/i],o,t)}});pt._set("pie",Mt.clone(pt.doughnut)),pt._set("pie",{cutoutPercentage:0});var Ue=Se,Ze=Mt.valueOrDefault;pt._set("radar",{spanGaps:false,scale:{type:"radialLinear"},elements:{line:{fill:"start",tension:0}}});var je=jt.extend({datasetElementType:ce.Line,dataElementType:ce.Point,linkScales:Mt.noop,_datasetElementOptions:["backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(t){var e=this;var i=e.getMeta();var n=i.dataset;var r=i.data||[];var o=e.chart.scale;var a=e._config;var s,l;if(a.tension!==undefined&&a.lineTension===undefined){a.lineTension=a.tension}n._scale=o;n._datasetIndex=e.index;n._children=r;n._loop=true;n._model=e._resolveDatasetElementOptions(n);n.pivot();for(s=0,l=r.length;s<l;++s){e.updateElement(r[s],s,t)}e.updateBezierControlPoints();for(s=0,l=r.length;s<l;++s){r[s].pivot()}},updateElement:function(t,e,i){var n=this;var r=t.custom||{};var o=n.getDataset();var a=n.chart.scale;var s=a.getPointPositionForValue(e,o.data[e]);var l=n._resolveDataElementOptions(t,e);var u=n.getMeta().dataset._model;var h=i?a.xCenter:s.x;var c=i?a.yCenter:s.y;t._scale=a;t._options=l;t._datasetIndex=n.index;t._index=e;t._model={x:h,y:c,skip:r.skip||isNaN(h)||isNaN(c),radius:l.radius,pointStyle:l.pointStyle,rotation:l.rotation,backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,tension:Ze(r.tension,u?u.tension:0),hitRadius:l.hitRadius}},_resolveDatasetElementOptions:function(){var t=this;var e=t._config;var i=t.chart.options;var n=jt.prototype._resolveDatasetElementOptions.apply(t,arguments);n.spanGaps=Ze(e.spanGaps,i.spanGaps);n.tension=Ze(e.lineTension,i.elements.line.tension);return n},updateBezierControlPoints:function(){var t=this;var e=t.getMeta();var i=t.chart.chartArea;var n=e.data||[];var r,o,a,s;if(e.dataset._model.spanGaps){n=n.filter(function(t){return!t._model.skip})}function l(t,e,i){return Math.max(Math.min(t,i),e)}for(r=0,o=n.length;r<o;++r){a=n[r]._model;s=Mt.splineCurve(Mt.previousItem(n,r,true)._model,a,Mt.nextItem(n,r,true)._model,a.tension);a.controlPointPreviousX=l(s.previous.x,i.left,i.right);a.controlPointPreviousY=l(s.previous.y,i.top,i.bottom);a.controlPointNextX=l(s.next.x,i.left,i.right);a.controlPointNextY=l(s.next.y,i.top,i.bottom)}},setHoverStyle:function(t){var e=t._model;var i=t._options;var n=Mt.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius};e.backgroundColor=Ze(i.hoverBackgroundColor,n(i.backgroundColor));e.borderColor=Ze(i.hoverBorderColor,n(i.borderColor));e.borderWidth=Ze(i.hoverBorderWidth,i.borderWidth);e.radius=Ze(i.hoverRadius,i.radius)}});pt._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},tooltips:{callbacks:{title:function(){return""},label:function(t){return"("+t.xLabel+", "+t.yLabel+")"}}}}),pt._set("global",{datasets:{scatter:{showLine:false}}});var We,He={bar:be,bubble:Le,doughnut:Se,horizontalBar:Ae,line:Fe,polarArea:Ne,pie:Ue,radar:je,scatter:Fe};function Ge(t,e){if(t.native){return{x:t.x,y:t.y}}return Mt.getRelativePosition(t,e)}function Ve(t,e){var i=t._getSortedVisibleDatasetMetas();var n,r,o,a,s,l;for(r=0,a=i.length;r<a;++r){n=i[r].data;for(o=0,s=n.length;o<s;++o){l=n[o];if(!l._view.skip){e(l)}}}}function qe(t,e){var i=[];Ve(t,function(t){if(t.inRange(e.x,e.y)){i.push(t)}});return i}function Ke(t,n,r,o){var a=Number.POSITIVE_INFINITY;var s=[];Ve(t,function(t){if(r&&!t.inRange(n.x,n.y)){return}var e=t.getCenterPoint();var i=o(n,e);if(i<a){s=[t];a=i}else if(i===a){s.push(t)}});return s}function Je(t){var r=t.indexOf("x")!==-1;var o=t.indexOf("y")!==-1;return function(t,e){var i=r?Math.abs(t.x-e.x):0;var n=o?Math.abs(t.y-e.y):0;return Math.sqrt(Math.pow(i,2)+Math.pow(n,2))}}function Ye(t,e,i){var n=Ge(e,t);i.axis=i.axis||"x";var r=Je(i.axis);var o=i.intersect?qe(t,n):Ke(t,n,false,r);var a=[];if(!o.length){return[]}
13t._getSortedVisibleDatasetMetas().forEach(function(t){var e=t.data[o[0]._index];if(e&&!e._view.skip){a.push(e)}});return a}var Xe={modes:{single:function(t,e){var i=Ge(e,t);var n=[];Ve(t,function(t){if(t.inRange(i.x,i.y)){n.push(t);return n}});return n.slice(0,1)},label:Ye,index:Ye,dataset:function(t,e,i){var n=Ge(e,t);i.axis=i.axis||"xy";var r=Je(i.axis);var o=i.intersect?qe(t,n):Ke(t,n,false,r);if(o.length>0){o=t.getDatasetMeta(o[0]._datasetIndex).data}return o},"x-axis":function(t,e){return Ye(t,e,{intersect:false})},point:function(t,e){var i=Ge(e,t);return qe(t,i)},nearest:function(t,e,i){var n=Ge(e,t);i.axis=i.axis||"xy";var r=Je(i.axis);return Ke(t,n,i.intersect,r)},x:function(t,e,i){var n=Ge(e,t);var r=[];var o=false;Ve(t,function(t){if(t.inXRange(n.x)){r.push(t)}if(t.inRange(n.x,n.y)){o=true}});if(i.intersect&&!o){r=[]}return r},y:function(t,e,i){var n=Ge(e,t);var r=[];var o=false;Ve(t,function(t){if(t.inYRange(n.y)){r.push(t)}if(t.inRange(n.x,n.y)){o=true}});if(i.intersect&&!o){r=[]}return r}}},Qe=Mt.extend;function $e(t,e){return Mt.where(t,function(t){return t.pos===e})}function ti(t,r){return t.sort(function(t,e){var i=r?e:t;var n=r?t:e;return i.weight===n.weight?i.index-n.index:i.weight-n.weight})}function ei(t){var e=[];var i,n,r;for(i=0,n=(t||[]).length;i<n;++i){r=t[i];e.push({index:i,box:r,pos:r.position,horizontal:r.isHorizontal(),weight:r.weight})}return e}function ii(t,e){var i,n,r;for(i=0,n=t.length;i<n;++i){r=t[i];r.width=r.horizontal?r.box.fullWidth&&e.availableWidth:e.vBoxMaxWidth;r.height=r.horizontal&&e.hBoxMaxHeight}}function ni(t){var e=ei(t);var i=ti($e(e,"left"),true);var n=ti($e(e,"right"));var r=ti($e(e,"top"),true);var o=ti($e(e,"bottom"));return{leftAndTop:i.concat(r),rightAndBottom:n.concat(o),chartArea:$e(e,"chartArea"),vertical:i.concat(n),horizontal:r.concat(o)}}function ri(t,e,i,n){return Math.max(t[i],e[i])+Math.max(t[n],e[n])}function oi(t,e,i){var n=i.box;var r=t.maxPadding;var o,a;if(i.size){t[i.pos]-=i.size}i.size=i.horizontal?n.height:n.width;t[i.pos]+=i.size;if(n.getPadding){var s=n.getPadding();r.top=Math.max(r.top,s.top);r.left=Math.max(r.left,s.left);r.bottom=Math.max(r.bottom,s.bottom);r.right=Math.max(r.right,s.right)}o=e.outerWidth-ri(r,t,"left","right");a=e.outerHeight-ri(r,t,"top","bottom");if(o!==t.w||a!==t.h){t.w=o;t.h=a;var l=i.horizontal?[o,t.w]:[a,t.h];return l[0]!==l[1]&&(!isNaN(l[0])||!isNaN(l[1]))}}function ai(i){var n=i.maxPadding;function t(t){var e=Math.max(n[t]-i[t],0);i[t]+=e;return e}i.y+=t("top");i.x+=t("left");t("right");t("bottom")}function si(t,i){var n=i.maxPadding;function e(t){var e={left:0,top:0,right:0,bottom:0};t.forEach(function(t){e[t]=Math.max(i[t],n[t])});return e}return t?e(["left","right"]):e(["top","bottom"])}function li(t,e,i){var n=[];var r,o,a,s,l,u;for(r=0,o=t.length;r<o;++r){a=t[r];s=a.box;s.update(a.width||e.w,a.height||e.h,si(a.horizontal,e));if(oi(e,i,a)){u=true;if(n.length){l=true}}if(!s.fullWidth){n.push(a)}}return l?li(n,e,i)||u:u}function ui(t,e,i){var n=i.padding;var r=e.x;var o=e.y;var a,s,l,u;for(a=0,s=t.length;a<s;++a){l=t[a];u=l.box;if(l.horizontal){u.left=u.fullWidth?n.left:e.left;u.right=u.fullWidth?i.outerWidth-n.right:e.left+e.w;u.top=o;u.bottom=o+u.height;u.width=u.right-u.left;o=u.bottom}else{u.left=r;u.right=r+u.width;u.top=e.top;u.bottom=e.top+e.h;u.height=u.bottom-u.top;r=u.right}}e.x=r;e.y=o}pt._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var hi={defaults:{},addBox:function(t,e){if(!t.boxes){t.boxes=[]}e.fullWidth=e.fullWidth||false;e.position=e.position||"top";e.weight=e.weight||0;e._layers=e._layers||function(){return[{z:0,draw:function(){e.draw.apply(e,arguments)}}]};t.boxes.push(e)},removeBox:function(t,e){var i=t.boxes?t.boxes.indexOf(e):-1;if(i!==-1){t.boxes.splice(i,1)}},configure:function(t,e,i){var n=["fullWidth","position","weight"];var r=n.length;var o=0;var a;for(;o<r;++o){a=n[o];if(i.hasOwnProperty(a)){e[a]=i[a]}}},update:function(i,t,e){if(!i){return}var n=i.options.layout||{};var r=Mt.options.toPadding(n.padding);var o=t-r.width;var a=e-r.height;var s=ni(i.boxes);var l=s.vertical;var u=s.horizontal;var h=Object.freeze({outerWidth:t,outerHeight:e,padding:r,availableWidth:o,vBoxMaxWidth:o/2/l.length,hBoxMaxHeight:a/2});var c=Qe({maxPadding:Qe({},r),w:o,h:a,x:r.left,y:r.top},r);ii(l.concat(u),h);li(l,c,h);if(li(u,c,h)){li(l,c,h)}ai(c);ui(s.leftAndTop,c,h);c.x+=c.w;c.y+=c.h;ui(s.rightAndBottom,c,h);i.chartArea={left:c.left,top:c.top,right:c.left+c.w,bottom:c.top+c.h};Mt.each(s.chartArea,function(t){var e=t.box;Qe(e,i.chartArea);e.update(c.w,c.h)})}},ci={acquireContext:function(t){if(t&&t.canvas){t=t.canvas}return t&&t.getContext("2d")||null}},di="/*\r\n * DOM element rendering detection\r\n * https://davidwalsh.name/detect-node-insertion\r\n */\r\n@keyframes chartjs-render-animation {\r\n\tfrom { opacity: 0.99; }\r\n\tto { opacity: 1; }\r\n}\r\n\r\n.chartjs-render-monitor {\r\n\tanimation: chartjs-render-animation 0.001s;\r\n}\r\n\r\n/*\r\n * DOM element resizing detection\r\n * https://github.com/marcj/css-element-queries\r\n */\r\n.chartjs-size-monitor,\r\n.chartjs-size-monitor-expand,\r\n.chartjs-size-monitor-shrink {\r\n\tposition: absolute;\r\n\tdirection: ltr;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\tright: 0;\r\n\tbottom: 0;\r\n\toverflow: hidden;\r\n\tpointer-events: none;\r\n\tvisibility: hidden;\r\n\tz-index: -1;\r\n}\r\n\r\n.chartjs-size-monitor-expand > div {\r\n\tposition: absolute;\r\n\twidth: 1000000px;\r\n\theight: 1000000px;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n\r\n.chartjs-size-monitor-shrink > div {\r\n\tposition: absolute;\r\n\twidth: 200%;\r\n\theight: 200%;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n",pi,fi=e(Object.freeze({__proto__:null,default:di})),mi="$chartjs",gi="chartjs-",vi=gi+"size-monitor",_i=gi+"render-monitor",yi=gi+"render-animation",xi=["animationstart","webkitAnimationStart"],bi={touchstart:"mousedown",touchmove:"mou
13semove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function wi(t,e){var i=Mt.getStyle(t,e);var n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?Number(n[1]):undefined}function ki(t,e){var i=t.style;var n=t.getAttribute("height");var r=t.getAttribute("width");t[mi]={initial:{height:n,width:r,style:{display:i.display,height:i.height,width:i.width}}};i.display=i.display||"block";if(r===null||r===""){var o=wi(t,"width");if(o!==undefined){t.width=o}}if(n===null||n===""){if(t.style.height===""){t.height=t.width/(e.options.aspectRatio||2)}else{var a=wi(t,"height");if(o!==undefined){t.height=a}}}return t}var Li,Mi=function(){var t=false;try{var e=Object.defineProperty({},"passive",{get:function(){t=true}});window.addEventListener("e",null,e)}catch(t){}return t}()?{passive:true}:false;function Ci(t,e,i){t.addEventListener(e,i,Mi)}function Ti(t,e,i){t.removeEventListener(e,i,Mi)}function Pi(t,e,i,n,r){return{type:t,chart:e,native:r||null,x:i!==undefined?i:null,y:n!==undefined?n:null}}function Si(t,e){var i=bi[t.type]||t.type;var n=Mt.getRelativePosition(t,e);return Pi(i,e,n.x,n.y,t)}function Ai(t,e){var i=false;var n=[];return function(){n=Array.prototype.slice.call(arguments);e=e||this;if(!i){i=true;Mt.requestAnimFrame.call(window,function(){i=false;t.apply(e,n)})}}}function Ii(t){var e=document.createElement("div");e.className=t||"";return e}function Di(t){var e=1e6;var i=Ii(vi);var n=Ii(vi+"-expand");var r=Ii(vi+"-shrink");n.appendChild(Ii());r.appendChild(Ii());i.appendChild(n);i.appendChild(r);i._reset=function(){n.scrollLeft=e;n.scrollTop=e;r.scrollLeft=e;r.scrollTop=e};var o=function(){i._reset();t()};Ci(n,"scroll",o.bind(n,"expand"));Ci(r,"scroll",o.bind(r,"shrink"));return i}function Oi(e,i){var t=e[mi]||(e[mi]={});var n=t.renderProxy=function(t){if(t.animationName===yi){i()}};Mt.each(xi,function(t){Ci(e,t,n)});t.reflow=!!e.offsetParent;e.classList.add(_i)}function zi(e){var t=e[mi]||{};var i=t.renderProxy;if(i){Mt.each(xi,function(t){Ti(e,t,i)});delete t.renderProxy}e.classList.remove(_i)}function Ei(i,n,r){var o=i[mi]||(i[mi]={});var e=o.resizer=Di(Ai(function(){if(o.resizer){var t=r.options.maintainAspectRatio&&i.parentNode;var e=t?t.clientWidth:0;n(Pi("resize",r));if(t&&t.clientWidth<e&&r.canvas){n(Pi("resize",r))}}}));Oi(i,function(){if(o.resizer){var t=i.parentNode;if(t&&t!==e.parentNode){t.insertBefore(e,t.firstChild)}e._reset()}})}function Bi(t){var e=t[mi]||{};var i=e.resizer;delete e.resizer;zi(t);if(i&&i.parentNode){i.parentNode.removeChild(i)}}function Fi(t,e){var i=t[mi]||(t[mi]={});if(!i.containsStyles){i.containsStyles=true;e="/* Chart.js */\n"+e;var n=document.createElement("style");n.setAttribute("type","text/css");n.appendChild(document.createTextNode(e));t.appendChild(n)}}var Ri={disableCSSInjection:false,_enabled:typeof window!=="undefined"&&typeof document!=="undefined",_ensureLoaded:function(t){if(!this.disableCSSInjection){var e=t.getRootNode?t.getRootNode():document;var i=e.host?e:document.head;Fi(i,fi)}},acquireContext:function(t,e){if(typeof t==="string"){t=document.getElementById(t)}else if(t.length){t=t[0]}if(t&&t.canvas){t=t.canvas}var i=t&&t.getContext&&t.getContext("2d");if(i&&i.canvas===t){this._ensureLoaded(t);ki(t,e);return i}return null},releaseContext:function(t){var i=t.canvas;if(!i[mi]){return}var n=i[mi].initial;["height","width"].forEach(function(t){var e=n[t];if(Mt.isNullOrUndef(e)){i.removeAttribute(t)}else{i.setAttribute(t,e)}});Mt.each(n.style||{},function(t,e){i.style[e]=t});i.width=i.width;delete i[mi]},addEventListener:function(e,t,i){var n=e.canvas;if(t==="resize"){Ei(n,i,e);return}var r=i[mi]||(i[mi]={});var o=r.proxies||(r.proxies={});var a=o[e.id+"_"+t]=function(t){i(Si(t,e))};Ci(n,t,a)},removeEventListener:function(t,e,i){var n=t.canvas;if(e==="resize"){Bi(n);return}var r=i[mi]||{};var o=r.proxies||{};var a=o[t.id+"_"+e];if(!a){return}Ti(n,e,a)}};Mt.addEvent=Ci,Mt.removeEvent=Ti;var Ni=Ri._enabled?Ri:ci,Ui=Mt.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},Ni);pt._set("global",{plugins:{}});var Zi={_plugins:[],_cacheId:0,register:function(t){var e=this._plugins;[].concat(t).forEach(function(t){if(e.indexOf(t)===-1){e.push(t)}});this._cacheId++},unregister:function(t){var i=this._plugins;[].concat(t).forEach(function(t){var e=i.indexOf(t);if(e!==-1){i.splice(e,1)}});this._cacheId++},clear:function(){this._plugins=[];this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins}
13,notify:function(t,e,i){var n=this.descriptors(t);var r=n.length;var o,a,s,l,u;for(o=0;o<r;++o){a=n[o];s=a.plugin;u=s[e];if(typeof u==="function"){l=[t].concat(i||[]);l.push(a.options);if(u.apply(s,l)===false){return false}}}return true},descriptors:function(t){var e=t.$plugins||(t.$plugins={});if(e.id===this._cacheId){return e.descriptors}var r=[];var o=[];var i=t&&t.config||{};var a=i.options&&i.options.plugins||{};this._plugins.concat(i.plugins||[]).forEach(function(t){var e=r.indexOf(t);if(e!==-1){return}var i=t.id;var n=a[i];if(n===false){return}if(n===true){n=Mt.clone(pt.global.plugins[i])}r.push(t);o.push({plugin:t,options:n||{}})});e.descriptors=o;e.id=this._cacheId;return o},_invalidate:function(t){delete t.$plugins}},ji={constructors:{},defaults:{},registerScaleType:function(t,e,i){this.constructors[t]=e;this.defaults[t]=Mt.clone(i)},getScaleConstructor:function(t){return this.constructors.hasOwnProperty(t)?this.constructors[t]:undefined},getScaleDefaults:function(t){return this.defaults.hasOwnProperty(t)?Mt.merge(Object.create(null),[pt.scale,this.defaults[t]]):{}},updateScaleDefaults:function(t,e){var i=this;if(i.defaults.hasOwnProperty(t)){i.defaults[t]=Mt.extend(i.defaults[t],e)}},addScalesToLayout:function(e){Mt.each(e.scales,function(t){t.fullWidth=t.options.fullWidth;t.position=t.options.position;t.weight=t.options.weight;hi.addBox(e,t)})}},Wi=Mt.valueOrDefault,Hi=Mt.rtl.getRtlAdapter;pt._set("global",{tooltips:{enabled:true,custom:null,mode:"nearest",position:"average",intersect:true,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:true,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:Mt.noop,title:function(t,e){var i="";var n=e.labels;var r=n?n.length:0;if(t.length>0){var o=t[0];if(o.label){i=o.label}else if(o.xLabel){i=o.xLabel}else if(r>0&&o.index<r){i=n[o.index]}}return i},afterTitle:Mt.noop,beforeBody:Mt.noop,beforeLabel:Mt.noop,label:function(t,e){var i=e.datasets[t.datasetIndex].label||"";if(i){i+=": "}if(!Mt.isNullOrUndef(t.value)){i+=t.value}else{i+=t.yLabel}return i},labelColor:function(t,e){var i=e.getDatasetMeta(t.datasetIndex);var n=i.data[t.index];var r=n._view;return{borderColor:r.borderColor,backgroundColor:r.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:Mt.noop,afterBody:Mt.noop,beforeFooter:Mt.noop,footer:Mt.noop,afterFooter:Mt.noop}}});var Gi={average:function(t){if(!t.length){return false}var e,i;var n=0;var r=0;var o=0;for(e=0,i=t.length;e<i;++e){var a=t[e];if(a&&a.hasValue()){var s=a.tooltipPosition();n+=s.x;r+=s.y;++o}}return{x:n/o,y:r/o}},nearest:function(t,e){var i=e.x;var n=e.y;var r=Number.POSITIVE_INFINITY;var o,a,s;for(o=0,a=t.length;o<a;++o){var l=t[o];if(l&&l.hasValue()){var u=l.getCenterPoint();var h=Mt.distanceBetweenPoints(e,u);if(h<r){r=h;s=l}}}if(s){var c=s.tooltipPosition();i=c.x;n=c.y}return{x:i,y:n}}};function Vi(t,e){if(e){if(Mt.isArray(e)){Array.prototype.push.apply(t,e)}else{t.push(e)}}return t}function qi(t){if((typeof t==="string"||t instanceof String)&&t.indexOf("\n")>-1){return t.split("\n")}return t}function Ki(t){var e=t._xScale;var i=t._yScale||t._scale;var n=t._index;var r=t._datasetIndex;var o=t._chart.getDatasetMeta(r).controller;var a=o._getIndexScale();var s=o._getValueScale();return{xLabel:e?e.getLabelForIndex(n,r):"",yLabel:i?i.getLabelForIndex(n,r):"",label:a?""+a.getLabelForIndex(n,r):"",value:s?""+s.getLabelForIndex(n,r):"",index:n,datasetIndex:r,x:t._model.x,y:t._model.y}}function Ji(t){var e=pt.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,rtl:t.rtl,textDirection:t.textDirection,bodyFontColor:t.bodyFontColor,_bodyFontFamily:Wi(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:Wi(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:Wi(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:Wi(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:Wi(t.titleFontStyle,e.defaultFontStyle),titleFontSize:Wi(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:Wi(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:Wi(t.footerFontStyle,e.defaultFontStyle),footerFontSize:Wi(t.footerFontSize,e.defaultFontSize),_footerAlign:t.footerAlign,footerSpacing:t.footerSpacing,footerMarginTop:t.footerMarginTop,caretSize:t.caretSize,cornerRadius:t.cornerRadius,backgroundColor:t.backgroundColor,opacity:0,legendColorBackgroun
13d:t.multiKeyBackground,displayColors:t.displayColors,borderColor:t.borderColor,borderWidth:t.borderWidth}}function Yi(t,e){var i=t._chart.ctx;var n=e.yPadding*2;var r=0;var o=e.body;var a=o.reduce(function(t,e){return t+e.before.length+e.lines.length+e.after.length},0);a+=e.beforeBody.length+e.afterBody.length;var s=e.title.length;var l=e.footer.length;var u=e.titleFontSize;var h=e.bodyFontSize;var c=e.footerFontSize;n+=s*u;n+=s?(s-1)*e.titleSpacing:0;n+=s?e.titleMarginBottom:0;n+=a*h;n+=a?(a-1)*e.bodySpacing:0;n+=l?e.footerMarginTop:0;n+=l*c;n+=l?(l-1)*e.footerSpacing:0;var d=0;var p=function(t){r=Math.max(r,i.measureText(t).width+d)};i.font=Mt.fontString(u,e._titleFontStyle,e._titleFontFamily);Mt.each(e.title,p);i.font=Mt.fontString(h,e._bodyFontStyle,e._bodyFontFamily);Mt.each(e.beforeBody.concat(e.afterBody),p);d=e.displayColors?h+2:0;Mt.each(o,function(t){Mt.each(t.before,p);Mt.each(t.lines,p);Mt.each(t.after,p)});d=0;i.font=Mt.fontString(c,e._footerFontStyle,e._footerFontFamily);Mt.each(e.footer,p);r+=2*e.xPadding;return{width:r,height:n}}function Xi(t,e){var i=t._model;var n=t._chart;var r=t._chart.chartArea;var o="center";var a="center";if(i.y<e.height){a="top"}else if(i.y>n.height-e.height){a="bottom"}var s,l;var u,h;var c;var d=(r.left+r.right)/2;var p=(r.top+r.bottom)/2;if(a==="center"){s=function(t){return t<=d};l=function(t){return t>d}}else{s=function(t){return t<=e.width/2};l=function(t){return t>=n.width-e.width/2}}u=function(t){return t+e.width+i.caretSize+i.caretPadding>n.width};h=function(t){return t-e.width-i.caretSize-i.caretPadding<0};c=function(t){return t<=p?"top":"bottom"};if(s(i.x)){o="left";if(u(i.x)){o="center";a=c(i.y)}}else if(l(i.x)){o="right";if(h(i.x)){o="center";a=c(i.y)}}var f=t._options;return{xAlign:f.xAlign?f.xAlign:o,yAlign:f.yAlign?f.yAlign:a}}function Qi(t,e,i,n){var r=t.x;var o=t.y;var a=t.caretSize;var s=t.caretPadding;var l=t.cornerRadius;var u=i.xAlign;var h=i.yAlign;var c=a+s;var d=l+s;if(u==="right"){r-=e.width}else if(u==="center"){r-=e.width/2;if(r+e.width>n.width){r=n.width-e.width}if(r<0){r=0}}if(h==="top"){o+=c}else if(h==="bottom"){o-=e.height+c}else{o-=e.height/2}if(h==="center"){if(u==="left"){r+=c}else if(u==="right"){r-=c}}else if(u==="left"){r-=d}else if(u==="right"){r+=d}return{x:r,y:o}}function $i(t,e){return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-t.xPadding:t.x+t.xPadding}function tn(t){return Vi([],qi(t))}var en,nn,rn=Ot.extend({initialize:function(){this._model=Ji(this._options);this._lastActive=[]},getTitle:function(){var t=this;var e=t._options;var i=e.callbacks;var n=i.beforeTitle.apply(t,arguments);var r=i.title.apply(t,arguments);var o=i.afterTitle.apply(t,arguments);var a=[];a=Vi(a,qi(n));a=Vi(a,qi(r));a=Vi(a,qi(o));return a},getBeforeBody:function(){return tn(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,i){var n=this;var r=n._options.callbacks;var o=[];Mt.each(t,function(t){var e={before:[],lines:[],after:[]};Vi(e.before,qi(r.beforeLabel.call(n,t,i)));Vi(e.lines,r.label.call(n,t,i));Vi(e.after,qi(r.afterLabel.call(n,t,i)));o.push(e)});return o},getAfterBody:function(){return tn(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var t=this;var e=t._options.callbacks;var i=e.beforeFooter.apply(t,arguments);var n=e.footer.apply(t,arguments);var r=e.afterFooter.apply(t,arguments);var o=[];o=Vi(o,qi(i));o=Vi(o,qi(n));o=Vi(o,qi(r));return o},update:function(t){var e=this;var i=e._options;var n=e._model;var r=e._model=Ji(i);var o=e._active;var a=e._data;var s={xAlign:n.xAlign,yAlign:n.yAlign};var l={x:n.x,y:n.y};var u={width:n.width,height:n.height};var h={x:n.caretX,y:n.caretY};var c,d;if(o.length){r.opacity=1;var p=[];var f=[];h=Gi[i.position].call(e,o,e._eventPosition);var m=[];for(c=0,d=o.length;c<d;++c){m.push(Ki(o[c]))}if(i.filter){m=m.filter(function(t){return i.filter(t,a)})}if(i.itemSort){m=m.sort(function(t,e){return i.itemSort(t,e,a)})}Mt.each(m,function(t){p.push(i.callbacks.labelColor.call(e,t,e._chart));f.push(i.callbacks.labelTextColor.call(e,t,e._chart))});r.title=e.getTitle(m,a);r.beforeBody=e.getBeforeBody(m,a);r.body=e.getBody(m,a);r.afterBody=e.getAfterBody(m,a);r.footer=e.getFooter(m,a);
13r.x=h.x;r.y=h.y;r.caretPadding=i.caretPadding;r.labelColors=p;r.labelTextColors=f;r.dataPoints=m;u=Yi(this,r);s=Xi(this,u);l=Qi(r,u,s,e._chart)}else{r.opacity=0}r.xAlign=s.xAlign;r.yAlign=s.yAlign;r.x=l.x;r.y=l.y;r.width=u.width;r.height=u.height;r.caretX=h.x;r.caretY=h.y;e._model=r;if(t&&i.custom){i.custom.call(e,r)}return e},drawCaret:function(t,e){var i=this._chart.ctx;var n=this._view;var r=this.getCaretPosition(t,e,n);i.lineTo(r.x1,r.y1);i.lineTo(r.x2,r.y2);i.lineTo(r.x3,r.y3)},getCaretPosition:function(t,e,i){var n,r,o,a,s,l;var u=i.caretSize;var h=i.cornerRadius;var c=i.xAlign;var d=i.yAlign;var p=t.x;var f=t.y;var m=e.width;var g=e.height;if(d==="center"){s=f+g/2;if(c==="left"){n=p;r=n-u;o=n;a=s+u;l=s-u}else{n=p+m;r=n+u;o=n;a=s-u;l=s+u}}else{if(c==="left"){r=p+h+u;n=r-u;o=r+u}else if(c==="right"){r=p+m-h-u;n=r-u;o=r+u}else{r=i.caretX;n=r-u;o=r+u}if(d==="top"){a=f;s=a-u;l=a}else{a=f+g;s=a+u;l=a;var v=o;o=n;n=v}}return{x1:n,x2:r,x3:o,y1:a,y2:s,y3:l}},drawTitle:function(t,e,i){var n=e.title;var r=n.length;var o,a,s;if(r){var l=Hi(e.rtl,e.x,e.width);t.x=$i(e,e._titleAlign);i.textAlign=l.textAlign(e._titleAlign);i.textBaseline="middle";o=e.titleFontSize;a=e.titleSpacing;i.fillStyle=e.titleFontColor;i.font=Mt.fontString(o,e._titleFontStyle,e._titleFontFamily);for(s=0;s<r;++s){i.fillText(n[s],l.x(t.x),t.y+o/2);t.y+=o+a;if(s+1===r){t.y+=e.titleMarginBottom-a}}}},drawBody:function(e,t,i){var n=t.bodyFontSize;var r=t.bodySpacing;var o=t._bodyAlign;var a=t.body;var s=t.displayColors;var l=0;var u=s?$i(t,"left"):0;var h=Hi(t.rtl,t.x,t.width);var c=function(t){i.fillText(t,h.x(e.x+l),e.y+n/2);e.y+=n+r};var d,p,f,m,g,v,_,y;var x=h.textAlign(o);i.textAlign=o;i.textBaseline="middle";i.font=Mt.fontString(n,t._bodyFontStyle,t._bodyFontFamily);e.x=$i(t,x);i.fillStyle=t.bodyFontColor;Mt.each(t.beforeBody,c);l=s&&x!=="right"?o==="center"?n/2+1:n+2:0;for(g=0,_=a.length;g<_;++g){d=a[g];p=t.labelTextColors[g];f=t.labelColors[g];i.fillStyle=p;Mt.each(d.before,c);m=d.lines;for(v=0,y=m.length;v<y;++v){if(s){var b=h.x(u);i.fillStyle=t.legendColorBackground;i.fillRect(h.leftForLtr(b,n),e.y,n,n);i.lineWidth=1;i.strokeStyle=f.borderColor;i.strokeRect(h.leftForLtr(b,n),e.y,n,n);i.fillStyle=f.backgroundColor;i.fillRect(h.leftForLtr(h.xPlus(b,1),n-2),e.y+1,n-2,n-2);i.fillStyle=p}c(m[v])}Mt.each(d.after,c)}l=0;Mt.each(t.afterBody,c);e.y-=r},drawFooter:function(t,e,i){var n=e.footer;var r=n.length;var o,a;if(r){var s=Hi(e.rtl,e.x,e.width);t.x=$i(e,e._footerAlign);t.y+=e.footerMarginTop;i.textAlign=s.textAlign(e._footerAlign);i.textBaseline="middle";o=e.footerFontSize;i.fillStyle=e.footerFontColor;i.font=Mt.fontString(o,e._footerFontStyle,e._footerFontFamily);for(a=0;a<r;++a){i.fillText(n[a],s.x(t.x),t.y+o/2);t.y+=o+e.footerSpacing}}},drawBackground:function(t,e,i,n){i.fillStyle=e.backgroundColor;i.strokeStyle=e.borderColor;i.lineWidth=e.borderWidth;var r=e.xAlign;var o=e.yAlign;var a=t.x;var s=t.y;var l=n.width;var u=n.height;var h=e.cornerRadius;i.beginPath();i.moveTo(a+h,s);if(o==="top"){this.drawCaret(t,n)}i.lineTo(a+l-h,s);i.quadraticCurveTo(a+l,s,a+l,s+h);if(o==="center"&&r==="right"){this.drawCaret(t,n)}i.lineTo(a+l,s+u-h);i.quadraticCurveTo(a+l,s+u,a+l-h,s+u);if(o==="bottom"){this.drawCaret(t,n)}i.lineTo(a+h,s+u);i.quadraticCurveTo(a,s+u,a,s+u-h);if(o==="center"&&r==="left"){this.drawCaret(t,n)}i.lineTo(a,s+h);i.quadraticCurveTo(a,s,a+h,s);i.closePath();i.fill();if(e.borderWidth>0){i.stroke()}},draw:function(){var t=this._chart.ctx;var e=this._view;if(e.opacity===0){return}var i={width:e.width,height:e.height};var n={x:e.x,y:e.y};var r=Math.abs(e.opacity<.001)?0:e.opacity;var o=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;if(this._options.enabled&&o){t.save();t.globalAlpha=r;this.drawBackground(n,e,t,i);n.y+=e.yPadding;Mt.rtl.overrideTextDirection(t,e.textDirection);this.drawTitle(n,e,t);this.drawBody(n,e,t);this.drawFooter(n,e,t);Mt.rtl.restoreTextDirection(t,e.textDirection);t.restore()}},handleEvent:function(t){var e=this;var i=e._options;var n=false;e._lastActive=e._lastActive||[];if(t.type==="mouseout"){e._active=[]}else{e._active=e._chart.getElementsAtEventForMode(t,i.mode,i);if(i.reverse){e._active.reverse()}}n=!Mt.arrayEquals(e._active,e._lastActive);if(n){e._lastActive=e._active;if(i.enabled||i.custom){e._eventPosition={x:t.x,y:t.y};e.update(true);e.pivot()}}return n}});rn.positioners=Gi;var on=Mt.valueOrDefault;function an(){return Mt.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,
13i,n){if(t==="xAxes"||t==="yAxes"){var r=i[t].length;var o,a,s;if(!e[t]){e[t]=[]}for(o=0;o<r;++o){s=i[t][o];a=on(s.type,t==="xAxes"?"category":"linear");if(o>=e[t].length){e[t].push({})}if(!e[t][o].type||s.type&&s.type!==e[t][o].type){Mt.merge(e[t][o],[ji.getScaleDefaults(a),s])}else{Mt.merge(e[t][o],s)}}}else{Mt._merger(t,e,i,n)}}})}function sn(){return Mt.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,i,n){var r=e[t]||Object.create(null);var o=i[t];if(t==="scales"){e[t]=an(r,o)}else if(t==="scale"){e[t]=Mt.merge(r,[ji.getScaleDefaults(o.type),o])}else{Mt._merger(t,e,i,n)}}})}function ln(t){t=t||Object.create(null);var e=t.data=t.data||{};e.datasets=e.datasets||[];e.labels=e.labels||[];t.options=sn(pt.global,pt[t.type],t.options||{});return t}function un(e){var t=e.options;Mt.each(e.scales,function(t){hi.removeBox(e,t)});t=sn(pt.global,pt[e.config.type],t);e.options=e.config.options=t;e.ensureScalesHaveIDs();e.buildOrUpdateScales();e.tooltip._options=t.tooltips;e.tooltip.initialize()}function hn(t,e,i){var n;var r=function(t){return t.id===n};do{n=e+i++}while(Mt.findIndex(t,r)>=0);return n}function cn(t){return t==="top"||t==="bottom"}function dn(i,n){return function(t,e){return t[i]===e[i]?t[n]-e[n]:t[i]-e[i]}}pt._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:true,animationDuration:400},onClick:null,maintainAspectRatio:true,responsive:true,responsiveAnimationDuration:0});var pn=function(t,e){this.construct(t,e);return this};Mt.extend(pn.prototype,{construct:function(t,e){var i=this;e=ln(e);var n=Ui.acquireContext(t,e);var r=n&&n.canvas;var o=r&&r.height;var a=r&&r.width;i.id=Mt.uid();i.ctx=n;i.canvas=r;i.config=e;i.width=a;i.height=o;i.aspectRatio=o?a/o:null;i.options=e.options;i._bufferedRender=false;i._layers=[];i.chart=i;i.controller=i;pn.instances[i.id]=i;Object.defineProperty(i,"data",{get:function(){return i.config.data},set:function(t){i.config.data=t}});if(!n||!r){console.error("Failed to create chart: can't acquire context from the given item");return}i.initialize();i.update()},initialize:function(){var t=this;Zi.notify(t,"beforeInit");Mt.retinaScale(t,t.options.devicePixelRatio);t.bindEvents();if(t.options.responsive){t.resize(true)}t.initToolTip();Zi.notify(t,"afterInit");return t},clear:function(){Mt.canvas.clear(this);return this},stop:function(){Bt.cancelAnimation(this);return this},resize:function(t){var e=this;var i=e.options;var n=e.canvas;var r=i.maintainAspectRatio&&e.aspectRatio||null;var o=Math.max(0,Math.floor(Mt.getMaximumWidth(n)));var a=Math.max(0,Math.floor(r?o/r:Mt.getMaximumHeight(n)));if(e.width===o&&e.height===a){return}n.width=e.width=o;n.height=e.height=a;n.style.width=o+"px";n.style.height=a+"px";Mt.retinaScale(e,i.devicePixelRatio);if(!t){var s={width:o,height:a};Zi.notify(e,"resize",[s]);if(i.onResize){i.onResize(e,s)}e.stop();e.update({duration:i.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options;var i=t.scales||{};var e=t.scale;Mt.each(i.xAxes,function(t,e){if(!t.id){t.id=hn(i.xAxes,"x-axis-",e)}});Mt.each(i.yAxes,function(t,e){if(!t.id){t.id=hn(i.yAxes,"y-axis-",e)}});if(e){e.id=e.id||"scale"}},buildOrUpdateScales:function(){var a=this;var t=a.options;var s=a.scales||{};var e=[];var l=Object.keys(s).reduce(function(t,e){t[e]=false;return t},{});if(t.scales){e=e.concat((t.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category",dposition:"bottom"}}),(t.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear",dposition:"left"}}))}if(t.scale){e.push({options:t.scale,dtype:"radialLinear",isDefault:true,dposition:"chartArea"})}Mt.each(e,function(t){var e=t.options;var i=e.id;var n=on(e.type,t.dtype);if(cn(e.position)!==cn(t.dposition)){e.position=t.dposition}l[i]=true;var r=null;if(i in s&&s[i].type===n){r=s[i];r.options=e;r.ctx=a.ctx;r.chart=a}else{var o=ji.getScaleConstructor(n);if(!o){return}r=new o({id:i,type:n,options:e,ctx:a.ctx,chart:a});s[r.id]=r}r.mergeTicksOptions();if(t.isDefault){a.scale=r}});Mt.each(l,function(t,e){if(!t){delete s[e]}});a.scales=s;ji.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t=this;var e=[];var i=t.data.datasets;var n,r;for(n=0,r=i.length;n<r;n++){var o=i[n];var a=t.getDatasetMeta(n);var s=o.type||t.config.type;if(a.type&&a.type!==s){t.destroyDatasetMeta(n);a=t.getDatasetMeta(n)}a.type=s;a.order=o.order||0;a.index=n;if(a.controller){a.controller.updateIndex(n);a.controller.linkScales()}else{var l=He[a.type];if(l===undefined){throw new Error('"'+a.type+'" is not a chart type.')}a.controller=new l(t,n);e.push(a.controller)}}return e},resetElements:function(){var i=this;Mt.each(i.data.datasets,function(t,e){i.getDatasetMeta(e).controller.reset()},i)},reset:function(){this.resetElements();this.tooltip.initialize()},update:function(t){var e=this;var i,n;if(!t||typeof t!=="object"){t={duration:t,lazy:arguments[1]}}un(e);Zi._invalidate(e);if(Zi.notify(e,"beforeUpdate")===false){return}e.tooltip._data=e.data;var r=e.buildOrUpdateControllers();for(i=0,n=e.data.datasets.length;i<n;i++){e.getDatasetMeta(i).controller.buildOrUpdateElements()}e.updateLayout();if(e.options.animation&&e.options.animation.duration){Mt.each(r,function(t){t.reset()})}e.updateDatasets();e.tooltip.initialize();e.lastActive=[];Zi.notify(e,"afterUpdate");e._layers.sort(dn("z","_idx"));if(e._bufferedRender){e._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}}else{e.render(t)}},updateLayout:function(){var e=this;if(Zi.notify(e,"beforeLayout")===false){return}hi.update(this,this.width,this.height);e._layers=[];Mt.each(e.boxes,function(t){if(t._configure){t._configure()}e._layers.push.apply(e._layers,t._layers())},e);
13e._layers.forEach(function(t,e){t._idx=e});Zi.notify(e,"afterScaleUpdate");Zi.notify(e,"afterLayout")},updateDatasets:function(){var t=this;if(Zi.notify(t,"beforeDatasetsUpdate")===false){return}for(var e=0,i=t.data.datasets.length;e<i;++e){t.updateDataset(e)}Zi.notify(t,"afterDatasetsUpdate")},updateDataset:function(t){var e=this;var i=e.getDatasetMeta(t);var n={meta:i,index:t};if(Zi.notify(e,"beforeDatasetUpdate",[n])===false){return}i.controller._update();Zi.notify(e,"afterDatasetUpdate",[n])},render:function(t){var e=this;if(!t||typeof t!=="object"){t={duration:t,lazy:arguments[1]}}var i=e.options.animation;var n=on(t.duration,i&&i.duration);var r=t.lazy;if(Zi.notify(e,"beforeRender")===false){return}var o=function(t){Zi.notify(e,"afterRender");Mt.callback(i&&i.onComplete,[t],e)};if(i&&n){var a=new Et({numSteps:n/16.66,easing:t.easing||i.easing,render:function(t,e){var i=Mt.easing.effects[e.easing];var n=e.currentStep;var r=n/e.numSteps;t.draw(i(r),r,n)},onAnimationProgress:i.onProgress,onAnimationComplete:o});Bt.addAnimation(e,a,n,r)}else{e.draw();o(new Et({numSteps:0,chart:e}))}return e},draw:function(t){var e=this;var i,n;e.clear();if(Mt.isNullOrUndef(t)){t=1}e.transition(t);if(e.width<=0||e.height<=0){return}if(Zi.notify(e,"beforeDraw",[t])===false){return}n=e._layers;for(i=0;i<n.length&&n[i].z<=0;++i){n[i].draw(e.chartArea)}e.drawDatasets(t);for(;i<n.length;++i){n[i].draw(e.chartArea)}e._drawTooltip(t);Zi.notify(e,"afterDraw",[t])},transition:function(t){var e=this;for(var i=0,n=(e.data.datasets||[]).length;i<n;++i){if(e.isDatasetVisible(i)){e.getDatasetMeta(i).controller.transition(t)}}e.tooltip.transition(t)},_getSortedDatasetMetas:function(t){var e=this;var i=e.data.datasets||[];var n=[];var r,o;for(r=0,o=i.length;r<o;++r){if(!t||e.isDatasetVisible(r)){n.push(e.getDatasetMeta(r))}}n.sort(dn("order","index"));return n},_getSortedVisibleDatasetMetas:function(){return this._getSortedDatasetMetas(true)},drawDatasets:function(t){var e=this;var i,n;if(Zi.notify(e,"beforeDatasetsDraw",[t])===false){return}i=e._getSortedVisibleDatasetMetas();for(n=i.length-1;n>=0;--n){e.drawDataset(i[n],t)}Zi.notify(e,"afterDatasetsDraw",[t])},drawDataset:function(t,e){var i=this;var n={meta:t,index:t.index,easingValue:e};if(Zi.notify(i,"beforeDatasetDraw",[n])===false){return}t.controller.draw(e);Zi.notify(i,"afterDatasetDraw",[n])},_drawTooltip:function(t){var e=this;var i=e.tooltip;var n={tooltip:i,easingValue:t};if(Zi.notify(e,"beforeTooltipDraw",[n])===false){return}i.draw();Zi.notify(e,"afterTooltipDraw",[n])},getElementAtEvent:function(t){return Xe.modes.single(this,t)},getElementsAtEvent:function(t){return Xe.modes.label(this,t,{intersect:true})},getElementsAtXAxis:function(t){return Xe.modes["x-axis"](this,t,{intersect:true})},getElementsAtEventForMode:function(t,e,i){var n=Xe.modes[e];if(typeof n==="function"){return n(this,t,i)}return[]},getDatasetAtEvent:function(t){return Xe.modes.dataset(this,t,{intersect:true})},getDatasetMeta:function(t){var e=this;var i=e.data.datasets[t];if(!i._meta){i._meta={}}var n=i._meta[e.id];if(!n){n=i._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:i.order||0,index:t}}return n},getVisibleDatasetCount:function(){var t=0;for(var e=0,i=this.data.datasets.length;e<i;++e){if(this.isDatasetVisible(e)){t++}}return t},isDatasetVisible:function(t){var e=this.getDatasetMeta(t);return typeof e.hidden==="boolean"?!e.hidden:!this.data.datasets[t].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(t){var e=this.id;var i=this.data.datasets[t];var n=i._meta&&i._meta[e];if(n){n.controller.destroy();delete i._meta[e]}},destroy:function(){var t=this;var e=t.canvas;var i,n;t.stop();for(i=0,n=t.data.datasets.length;i<n;++i){t.destroyDatasetMeta(i)}if(e){t.unbindEvents();Mt.canvas.clear(t);Ui.releaseContext(t.ctx);t.canvas=null;t.ctx=null}Zi.notify(t,"destroy");delete pn.instances[t.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var t=this;t.tooltip=new rn({_chart:t,_chartInstance:t,_data:t.data,_options:t.options.tooltips},t)},bindEvents:function(){var e=this;var i=e._listeners={};var n=function(){e.eventHandler.apply(e,arguments)};Mt.each(e.options.events,function(t){Ui.addEventListener(e,t,n);i[t]=n});if(e.options.responsive){n=function(){e.resize()};Ui.addEventListener(e,"resize",n);i.resize=n}},unbindEvents:function(){var i=this;var t=i._listeners;if(!t){return}delete i._listeners;Mt.each(t,function(t,e){Ui.removeEventListener(i,e,t)})}
13,updateHoverStyle:function(t,e,i){var n=i?"set":"remove";var r,o,a;for(o=0,a=t.length;o<a;++o){r=t[o];if(r){this.getDatasetMeta(r._datasetIndex).controller[n+"HoverStyle"](r)}}if(e==="dataset"){this.getDatasetMeta(t[0]._datasetIndex).controller["_"+n+"DatasetHoverStyle"]()}},eventHandler:function(t){var e=this;var i=e.tooltip;if(Zi.notify(e,"beforeEvent",[t])===false){return}e._bufferedRender=true;e._bufferedRequest=null;var n=e.handleEvent(t);if(i){n=i._start?i.handleEvent(t):n|i.handleEvent(t)}Zi.notify(e,"afterEvent",[t]);var r=e._bufferedRequest;if(r){e.render(r)}else if(n&&!e.animating){e.stop();e.render({duration:e.options.hover.animationDuration,lazy:true})}e._bufferedRender=false;e._bufferedRequest=null;return e},handleEvent:function(t){var e=this;var i=e.options||{};var n=i.hover;var r=false;e.lastActive=e.lastActive||[];if(t.type==="mouseout"){e.active=[]}else{e.active=e.getElementsAtEventForMode(t,n.mode,n)}Mt.callback(i.onHover||i.hover.onHover,[t.native,e.active],e);if(t.type==="mouseup"||t.type==="click"){if(i.onClick){i.onClick.call(e,t.native,e.active)}}if(e.lastActive.length){e.updateHoverStyle(e.lastActive,n.mode,false)}if(e.active.length&&n.mode){e.updateHoverStyle(e.active,n.mode,true)}r=!Mt.arrayEquals(e.active,e.lastActive);e.lastActive=e.active;return r}}),pn.instances={};var fn=pn;(pn.Controller=pn).types={},Mt.configMerge=sn,Mt.scaleMerge=an;var mn=function(){Mt.where=function(t,e){if(Mt.isArray(t)&&Array.prototype.filter){return t.filter(e)}var i=[];Mt.each(t,function(t){if(e(t)){i.push(t)}});return i};Mt.findIndex=Array.prototype.findIndex?function(t,e,i){return t.findIndex(e,i)}:function(t,e,i){i=i===undefined?t:i;for(var n=0,r=t.length;n<r;++n){if(e.call(i,t[n],n,t)){return n}}return-1};Mt.findNextWhere=function(t,e,i){if(Mt.isNullOrUndef(i)){i=-1}for(var n=i+1;n<t.length;n++){var r=t[n];if(e(r)){return r}}};Mt.findPreviousWhere=function(t,e,i){if(Mt.isNullOrUndef(i)){i=t.length}for(var n=i-1;n>=0;n--){var r=t[n];if(e(r)){return r}}};Mt.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)};Mt.almostEquals=function(t,e,i){return Math.abs(t-e)<i};Mt.almostWhole=function(t,e){var i=Math.round(t);return i-e<=t&&i+e>=t};Mt.max=function(t){return t.reduce(function(t,e){if(!isNaN(e)){return Math.max(t,e)}return t},Number.NEGATIVE_INFINITY)};Mt.min=function(t){return t.reduce(function(t,e){if(!isNaN(e)){return Math.min(t,e)}return t},Number.POSITIVE_INFINITY)};Mt.sign=Math.sign?function(t){return Math.sign(t)}:function(t){t=+t;if(t===0||isNaN(t)){return t}return t>0?1:-1};Mt.toRadians=function(t){return t*(Math.PI/180)};Mt.toDegrees=function(t){return t*(180/Math.PI)};Mt._decimalPlaces=function(t){if(!Mt.isFinite(t)){return}var e=1;var i=0;while(Math.round(t*e)/e!==t){e*=10;i++}return i};Mt.getAngleFromPoint=function(t,e){var i=e.x-t.x;var n=e.y-t.y;var r=Math.sqrt(i*i+n*n);var o=Math.atan2(n,i);if(o<-.5*Math.PI){o+=2*Math.PI}return{angle:o,distance:r}};Mt.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))};Mt.aliasPixel=function(t){return t%2===0?0:.5};Mt._alignPixel=function(t,e,i){var n=t.currentDevicePixelRatio;var r=i/2;return Math.round((e-r)*n)/n+r};Mt.splineCurve=function(t,e,i,n){var r=t.skip?e:t;var o=e;var a=i.skip?e:i;var s=Math.sqrt(Math.pow(o.x-r.x,2)+Math.pow(o.y-r.y,2));var l=Math.sqrt(Math.pow(a.x-o.x,2)+Math.pow(a.y-o.y,2));var u=s/(s+l);var h=l/(s+l);u=isNaN(u)?0:u;h=isNaN(h)?0:h;var c=n*u;var d=n*h;return{previous:{x:o.x-c*(a.x-r.x),y:o.y-c*(a.y-r.y)},next:{x:o.x+d*(a.x-r.x),y:o.y+d*(a.y-r.y)}}};Mt.EPSILON=Number.EPSILON||1e-14;Mt.splineCurveMonotone=function(t){var e=(t||[]).map(function(t){return{model:t._model,deltaK:0,mK:0}});var i=e.length;var n,r,o,a;for(n=0;n<i;++n){o=e[n];if(o.model.skip){continue}r=n>0?e[n-1]:null;a=n<i-1?e[n+1]:null;if(a&&!a.model.skip){var s=a.model.x-o.model.x;o.deltaK=s!==0?(a.model.y-o.model.y)/s:0}if(!r||r.model.skip){o.mK=o.deltaK}else if(!a||a.model.skip){o.mK=r.deltaK}else if(this.sign(r.deltaK)!==this.sign(o.deltaK)){o.mK=0}else{o.mK=(r.deltaK+o.deltaK)/2}}var l,u,h,c;for(n=0;n<i-1;++n){o=e[n];a=e[n+1];if(o.model.skip||a.model.skip){continue}if(Mt.almostEquals(o.deltaK,0,this.EPSILON)){o.mK=a.mK=0;continue}l=o.mK/o.deltaK;u=a.mK/o.deltaK;c=Math.pow(l,2)+Math.pow(u,2);if(c<=9){continue}h=3/Math.sqrt(c);o.mK=l*h*o.deltaK;a.mK=u*h*o.deltaK}var d;for(n=0;n<i;++n){o=e[n];if(o.model.skip){continue}r=n>0?e[n-1]:null;a=n<i-1?e[n+1]:null;if(r&&!r.model.skip){d=(o.model.x-r.model.x)/3;o.model.controlPointPreviousX=o.model.x-d;o.model.controlPointPreviousY=o.model.y-d*o.mK}if(a&&!a.model.skip){d=(a.model.x-o.model.x)/3;o.model.controlPointNextX=o.model.x+d;o.model.controlPointNextY=o.model.y+d*o.mK}}};
13Mt.nextItem=function(t,e,i){if(i){return e>=t.length-1?t[0]:t[e+1]}return e>=t.length-1?t[t.length-1]:t[e+1]};Mt.previousItem=function(t,e,i){if(i){return e<=0?t[t.length-1]:t[e-1]}return e<=0?t[0]:t[e-1]};Mt.niceNum=function(t,e){var i=Math.floor(Mt.log10(t));var n=t/Math.pow(10,i);var r;if(e){if(n<1.5){r=1}else if(n<3){r=2}else if(n<7){r=5}else{r=10}}else if(n<=1){r=1}else if(n<=2){r=2}else if(n<=5){r=5}else{r=10}return r*Math.pow(10,i)};Mt.requestAnimFrame=function(){if(typeof window==="undefined"){return function(t){t()}}return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)}}();Mt.getRelativePosition=function(t,e){var i,n;var r=t.originalEvent||t;var o=t.target||t.srcElement;var a=o.getBoundingClientRect();var s=r.touches;if(s&&s.length>0){i=s[0].clientX;n=s[0].clientY}else{i=r.clientX;n=r.clientY}var l=parseFloat(Mt.getStyle(o,"padding-left"));var u=parseFloat(Mt.getStyle(o,"padding-top"));var h=parseFloat(Mt.getStyle(o,"padding-right"));var c=parseFloat(Mt.getStyle(o,"padding-bottom"));var d=a.right-a.left-l-h;var p=a.bottom-a.top-u-c;i=Math.round((i-a.left-l)/d*o.width/e.currentDevicePixelRatio);n=Math.round((n-a.top-u)/p*o.height/e.currentDevicePixelRatio);return{x:i,y:n}};function h(t,e,i){var n;if(typeof t==="string"){n=parseInt(t,10);if(t.indexOf("%")!==-1){n=n/100*e.parentNode[i]}}else{n=t}return n}function c(t){return t!==undefined&&t!==null&&t!=="none"}function e(t,e,i){var n=document.defaultView;var r=Mt._getParentNode(t);var o=n.getComputedStyle(t)[e];var a=n.getComputedStyle(r)[e];var s=c(o);var l=c(a);var u=Number.POSITIVE_INFINITY;if(s||l){return Math.min(s?h(o,t,i):u,l?h(a,r,i):u)}return"none"}Mt.getConstraintWidth=function(t){return e(t,"max-width","clientWidth")};Mt.getConstraintHeight=function(t){return e(t,"max-height","clientHeight")};Mt._calculatePadding=function(t,e,i){e=Mt.getStyle(t,e);return e.indexOf("%")>-1?i*parseInt(e,10)/100:parseInt(e,10)};Mt._getParentNode=function(t){var e=t.parentNode;if(e&&e.toString()==="[object ShadowRoot]"){e=e.host}return e};Mt.getMaximumWidth=function(t){var e=Mt._getParentNode(t);if(!e){return t.clientWidth}var i=e.clientWidth;var n=Mt._calculatePadding(e,"padding-left",i);var r=Mt._calculatePadding(e,"padding-right",i);var o=i-n-r;var a=Mt.getConstraintWidth(t);return isNaN(a)?o:Math.min(o,a)};Mt.getMaximumHeight=function(t){var e=Mt._getParentNode(t);if(!e){return t.clientHeight}var i=e.clientHeight;var n=Mt._calculatePadding(e,"padding-top",i);var r=Mt._calculatePadding(e,"padding-bottom",i);var o=i-n-r;var a=Mt.getConstraintHeight(t);return isNaN(a)?o:Math.min(o,a)};Mt.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)};Mt.retinaScale=function(t,e){var i=t.currentDevicePixelRatio=e||typeof window!=="undefined"&&window.devicePixelRatio||1;if(i===1){return}var n=t.canvas;var r=t.height;var o=t.width;n.height=r*i;n.width=o*i;t.ctx.scale(i,i);if(!n.style.height&&!n.style.width){n.style.height=r+"px";n.style.width=o+"px"}};Mt.fontString=function(t,e,i){return e+" "+t+"px "+i};Mt.longestText=function(t,e,i,n){n=n||{};var r=n.data=n.data||{};var o=n.garbageCollect=n.garbageCollect||[];if(n.font!==e){r=n.data={};o=n.garbageCollect=[];n.font=e}t.font=e;var a=0;var s=i.length;var l,u,h,c,d;for(l=0;l<s;l++){c=i[l];if(c!==undefined&&c!==null&&Mt.isArray(c)!==true){a=Mt.measureText(t,r,o,a,c)}else if(Mt.isArray(c)){for(u=0,h=c.length;u<h;u++){d=c[u];if(d!==undefined&&d!==null&&!Mt.isArray(d)){a=Mt.measureText(t,r,o,a,d)}}}}var p=o.length/2;if(p>i.length){for(l=0;l<p;l++){delete r[o[l]]}o.splice(0,p)}return a};Mt.measureText=function(t,e,i,n,r){var o=e[r];if(!o){o=e[r]=t.measureText(r).width;i.push(r)}if(o>n){n=o}return n};Mt.numberOfLabelLines=function(t){var e=1;Mt.each(t,function(t){if(Mt.isArray(t)){if(t.length>e){e=t.length}}});return e};Mt.color=!Q?function(t){console.error("Color.js not found!");return t}:function(t){if(t instanceof CanvasGradient){t=pt.global.defaultColor}return Q(t)};Mt.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:Mt.color(t).saturate(.5).darken(.1).rgbString()}};function gn(){throw new Error("This method is not implemented: either no adapter can "+"be found or an incomplete integration was provided.")}function vn(t){this.options=t||{}}Mt.extend(vn.prototype,{formats:gn,parse:gn,format:gn,add:gn,diff:gn,startOf:gn,endOf:gn,_create:function(t){return t}}),vn.override=function(t){Mt.extend(vn.prototype,t)};var _n,yn={_date:vn},xn={formatters:{values:function(t){return Mt.isArray(t)?t:""+t}
13,linear:function(t,e,i){var n=i.length>3?i[2]-i[1]:i[1]-i[0];if(Math.abs(n)>1){if(t!==Math.floor(t)){n=t-Math.floor(t)}}var r=Mt.log10(Math.abs(n));var o="";if(t!==0){var a=Math.max(Math.abs(i[0]),Math.abs(i[i.length-1]));if(a<1e-4){var s=Mt.log10(Math.abs(t));var l=Math.floor(s)-Math.floor(r);l=Math.max(Math.min(l,20),0);o=t.toExponential(l)}else{var u=-1*Math.floor(r);u=Math.max(Math.min(u,20),0);o=t.toFixed(u)}}else{o="0"}return o},logarithmic:function(t,e,i){var n=t/Math.pow(10,Math.floor(Mt.log10(t)));if(t===0){return"0"}else if(n===1||n===2||n===5||e===0||e===i.length-1){return t.toExponential()}return""}}},bn=Mt.isArray,wn=Mt.isNullOrUndef,kn=Mt.valueOrDefault,Ln=Mt.valueAtIndexOrDefault;function Mn(t,e){var i=[];var n=t.length/e;var r=0;var o=t.length;for(;r<o;r+=n){i.push(t[Math.floor(r)])}return i}function Cn(t,e,i){var n=t.getTicks().length;var r=Math.min(e,n-1);var o=t.getPixelForTick(r);var a=t._startPixel;var s=t._endPixel;var l=1e-6;var u;if(i){if(n===1){u=Math.max(o-a,s-o)}else if(e===0){u=(t.getPixelForTick(1)-o)/2}else{u=(o-t.getPixelForTick(r-1))/2}o+=r<e?u:-u;if(o<a-l||o>s+l){return}}return o}function Tn(t,r){Mt.each(t,function(t){var e=t.gc;var i=e.length/2;var n;if(i>r){for(n=0;n<i;++n){delete t.data[e[n]]}e.splice(0,i)}})}function Pn(t,e,i,n){var r=i.length;var o=[];var a=[];var s=[];var l=0;var u=0;var h,c,d,p,f,m,g,v,_,y,x,b,w;for(h=0;h<r;++h){p=i[h].label;f=i[h].major?e.major:e.minor;t.font=m=f.string;g=n[m]=n[m]||{data:{},gc:[]};v=f.lineHeight;_=y=0;if(!wn(p)&&!bn(p)){_=Mt.measureText(t,g.data,g.gc,_,p);y=v}else if(bn(p)){for(c=0,d=p.length;c<d;++c){x=p[c];if(!wn(x)&&!bn(x)){_=Mt.measureText(t,g.data,g.gc,_,x);y+=v}}}o.push(_);a.push(y);s.push(v/2);l=Math.max(_,l);u=Math.max(y,u)}Tn(n,r);b=o.indexOf(l);w=a.indexOf(u);function k(t){return{width:o[t]||0,height:a[t]||0,offset:s[t]||0}}return{first:k(0),last:k(r-1),widest:k(b),highest:k(w)}}function Sn(t){return t.drawTicks?t.tickMarkLength:0}function An(t){var e,i;if(!t.display){return 0}e=Mt.options._parseFont(t);i=Mt.options.toPadding(t.padding);return e.lineHeight+i.height}function In(t,e){return Mt.extend(Mt.options._parseFont({fontFamily:kn(e.fontFamily,t.fontFamily),fontSize:kn(e.fontSize,t.fontSize),fontStyle:kn(e.fontStyle,t.fontStyle),lineHeight:kn(e.lineHeight,t.lineHeight)}),{color:Mt.options.resolve([e.fontColor,t.fontColor,pt.global.defaultFontColor])})}function Dn(t){var e=In(t,t.minor);var i=t.major.enabled?In(t,t.major):e;return{minor:e,major:i}}function On(t){var e=[];var i,n,r;for(n=0,r=t.length;n<r;++n){i=t[n];if(typeof i._index!=="undefined"){e.push(i)}}return e}function zn(t){var e=t.length;var i,n;if(e<2){return false}for(n=t[0],i=1;i<e;++i){if(t[i]-t[i-1]!==n){return false}}return n}function En(t,e,i,n){var r=zn(t);var o=(e.length-1)/n;var a,s,l,u;if(!r){return Math.max(o,1)}a=Mt.math._factorize(r);for(l=0,u=a.length-1;l<u;l++){s=a[l];if(s>o){return s}}return Math.max(o,1)}function Bn(t){var e=[];var i,n;for(i=0,n=t.length;i<n;i++){if(t[i].major){e.push(i)}}return e}function Fn(t,e,i){var n=0;var r=e[0];var o,a;i=Math.ceil(i);for(o=0;o<t.length;o++){a=t[o];if(o===r){a._index=o;n++;r=e[n*i]}else{delete a.label}}}function Rn(t,e,i,n){var r=kn(i,0);var o=Math.min(kn(n,t.length),t.length);var a=0;var s,l,u,h;e=Math.ceil(e);if(n){s=n-i;e=s/Math.floor(s/e)}h=r;while(h<0){a++;h=Math.round(r+a*e)}for(l=Math.max(r,0);l<o;l++){u=t[l];if(l===h){u._index=l;a++;h=Math.round(r+a*e)}else{delete u.label}}}pt._set("scale",{display:true,position:"left",offset:false,gridLines:{display:true,color:"rgba(0,0,0,0.1)",lineWidth:1,drawBorder:true,drawOnChartArea:true,drawTicks:true,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:false,borderDash:[],borderDashOffset:0},scaleLabel:{display:false,labelString:"",padding:{top:4,bottom:4}},ticks:{beginAtZero:false,minRotation:0,maxRotation:50,mirror:false,padding:0,reverse:false,display:true,autoSkip:true,autoSkipPadding:0,labelOffset:0,callback:xn.formatters.values,minor:{},major:{}}});var Nn=Ot.extend({zeroLineIndex:0,getPadding:function(){var t=this;return{left:t.paddingLeft||0,top:t.paddingTop||0,right:t.paddingRight||0,bottom:t.paddingBottom||0}},getTicks:function(){return this._ticks},_getLabels:function(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]},mergeTicksOptions:function(){},beforeUpdate:function(){Mt.callback(this.options.beforeUpdate,[this])}
13,update:function(t,e,i){var n=this;var r=n.options.ticks;var o=r.sampleSize;var a,s,l,u,h;n.beforeUpdate();n.maxWidth=t;n.maxHeight=e;n.margins=Mt.extend({left:0,right:0,top:0,bottom:0},i);n._ticks=null;n.ticks=null;n._labelSizes=null;n._maxLabelLines=0;n.longestLabelWidth=0;n.longestTextCache=n.longestTextCache||{};n._gridLineItems=null;n._labelItems=null;n.beforeSetDimensions();n.setDimensions();n.afterSetDimensions();n.beforeDataLimits();n.determineDataLimits();n.afterDataLimits();n.beforeBuildTicks();u=n.buildTicks()||[];u=n.afterBuildTicks(u)||u;if((!u||!u.length)&&n.ticks){u=[];for(a=0,s=n.ticks.length;a<s;++a){u.push({value:n.ticks[a],major:false})}}n._ticks=u;h=o<u.length;l=n._convertTicksToLabels(h?Mn(u,o):u);n._configure();n.beforeCalculateTickRotation();n.calculateTickRotation();n.afterCalculateTickRotation();n.beforeFit();n.fit();n.afterFit();n._ticksToDraw=r.display&&(r.autoSkip||r.source==="auto")?n._autoSkip(u):u;if(h){l=n._convertTicksToLabels(n._ticksToDraw)}n.ticks=l;n.afterUpdate();return n.minSize},_configure:function(){var t=this;var e=t.options.ticks.reverse;var i,n;if(t.isHorizontal()){i=t.left;n=t.right}else{i=t.top;n=t.bottom;e=!e}t._startPixel=i;t._endPixel=n;t._reversePixels=e;t._length=n-i},afterUpdate:function(){Mt.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){Mt.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var t=this;if(t.isHorizontal()){t.width=t.maxWidth;t.left=0;t.right=t.width}else{t.height=t.maxHeight;t.top=0;t.bottom=t.height}t.paddingLeft=0;t.paddingTop=0;t.paddingRight=0;t.paddingBottom=0},afterSetDimensions:function(){Mt.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){Mt.callback(this.options.beforeDataLimits,[this])},determineDataLimits:Mt.noop,afterDataLimits:function(){Mt.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){Mt.callback(this.options.beforeBuildTicks,[this])},buildTicks:Mt.noop,afterBuildTicks:function(t){var e=this;if(bn(t)&&t.length){return Mt.callback(e.options.afterBuildTicks,[e,t])}e.ticks=Mt.callback(e.options.afterBuildTicks,[e,e.ticks])||e.ticks;return t},beforeTickToLabelConversion:function(){Mt.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this;var e=t.options.ticks;t.ticks=t.ticks.map(e.userCallback||e.callback,this)},afterTickToLabelConversion:function(){Mt.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){Mt.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var t=this;var e=t.options;var i=e.ticks;var n=t.getTicks().length;var r=i.minRotation||0;var o=i.maxRotation;var a=r;var s,l,u,h,c,d,p;if(!t._isVisible()||!i.display||r>=o||n<=1||!t.isHorizontal()){t.labelRotation=r;return}s=t._getLabelSizes();l=s.widest.width;u=s.highest.height-s.highest.offset;h=Math.min(t.maxWidth,t.chart.width-l);c=e.offset?t.maxWidth/n:h/(n-1);if(l+6>c){c=h/(n-(e.offset?.5:1));d=t.maxHeight-Sn(e.gridLines)-i.padding-An(e.scaleLabel);p=Math.sqrt(l*l+u*u);a=Mt.toDegrees(Math.min(Math.asin(Math.min((s.highest.height+6)/c,1)),Math.asin(Math.min(d/p,1))-Math.asin(u/p)));a=Math.max(r,Math.min(o,a))}t.labelRotation=a},afterCalculateTickRotation:function(){Mt.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){Mt.callback(this.options.beforeFit,[this])},fit:function(){var t=this;var e=t.minSize={width:0,height:0};var i=t.chart;var n=t.options;var r=n.ticks;var o=n.scaleLabel;var a=n.gridLines;var s=t._isVisible();var l=n.position==="bottom";var u=t.isHorizontal();if(u){e.width=t.maxWidth}else if(s){e.width=Sn(a)+An(o)}if(!u){e.height=t.maxHeight}else if(s){e.height=Sn(a)+An(o)}if(r.display&&s){var h=Dn(r);var c=t._getLabelSizes();var d=c.first;var p=c.last;var f=c.widest;var m=c.highest;var g=h.minor.lineHeight*.4;var v=r.padding;if(u){var _=t.labelRotation!==0;var y=Mt.toRadians(t.labelRotation);var x=Math.cos(y);var b=Math.sin(y);var w=b*f.width+x*(m.height-(_?m.offset:0))+(_?0:g);e.height=Math.min(t.maxHeight,e.height+w+v);var k=t.getPixelForTick(0)-t.left;var L=t.right-t.getPixelForTick(t.getTicks().length-1);var M,C;if(_){M=l?x*d.width+b*d.offset:b*(d.height-d.offset);C=l?b*(p.height-p.offset):x*p.width+b*p.offset}else{M=d.width/2;C=p.width/2}t.paddingLeft=Math.max((M-k)*t.width/(t.width-k),0)+3;t.paddingRight=Math.max((C-L)*t.width/(t.width-L),0)+3}else{var T=r.mirror?0:f.width+v+g;e.width=Math.min(t.maxWidth,e.width+T);t.paddingTop=d.height/2;t.paddingBottom=p.height/2}}t.handleMargins();if(u){t.width=t._length=i.width-t.margins.left-t.margins.right;t.height=e.height}else{t.width=e.width;t.height=t._length=i.height-t.margins.top-t.margins.bottom}},handleMargins:function(){var t=this;if(t.margins){t.margins.left=Math.max(t.paddingLeft,t.margins.left);t.margins.top=Math.max(t.paddingTop,t.margins.top);t.margins.right=Math.max(t.paddingRight,t.margins.right);t.margins.bottom=Math.max(t.paddingBottom,t.margins.bottom)}},afterFit:function(){Mt.callback(this.options.afterFit,[this])},isHorizontal:function(){var t=this.options.position;return t==="top"||t==="bottom"},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(wn(t)){return NaN}if((typeof t==="number"||t instanceof Number)&&!isFinite(t)){return NaN}if(t){if(this.isHorizontal()){if(t.x!==undefined){return this.getRightValue(t.x)}}else if(t.y!==undefined){return this.getRightValue(t.y)}}return t},_convertTicksToLabels:function(t){var e=this;var i,n,r;e.ticks=t.map(function(t){return t.value});e.beforeTickToLabelConversion();i=e.convertTicksToLabels(t)||e.ticks;e.afterTickToLabelConversion();for(n=0,r=t.length;n<r;++n){t[n].label=i[n]}return i},_getLabelSizes:function(){var t=this;var e=t._labelSizes;if(!e){t._labelSizes=e=Pn(t.ctx,Dn(t.options.ticks),t.getTicks(),t.longestTextCache);t.longestLabelWidth=e.widest.width}return e},_parseValue:function(t){var e,i,n,r;if(bn(t)){e=+this.getRightValue(t[0]);i=+this.getRightValue(t[1]);n=Math.min(e,i);r=Math.max(e,i)}else{t=+this.getRightValue(t);e=undefined;i=t;n=t;r=t}return{min:n,max:r,start:e,end:i}},_getScaleLabel:function(t){var e=this._parseValue(t);if(e.start!==undefined){return"["+e.start+", "+e.end+"]"}return+this.getRightValue(t)}
13,getLabelForIndex:Mt.noop,getPixelForValue:Mt.noop,getValueForPixel:Mt.noop,getPixelForTick:function(t){var e=this;var i=e.options.offset;var n=e._ticks.length;var r=1/Math.max(n-(i?0:1),1);return t<0||t>n-1?null:e.getPixelForDecimal(t*r+(i?r/2:0))},getPixelForDecimal:function(t){var e=this;if(e._reversePixels){t=1-t}return e._startPixel+t*e._length},getDecimalForPixel:function(t){var e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this;var e=t.min;var i=t.max;return t.beginAtZero?0:e<0&&i<0?i:e>0&&i>0?e:0},_autoSkip:function(t){var e=this;var i=e.options.ticks;var n=e._length;var r=i.maxTicksLimit||n/e._tickSize()+1;var o=i.major.enabled?Bn(t):[];var a=o.length;var s=o[0];var l=o[a-1];var u,h,c,d;if(a>r){Fn(t,o,a/r);return On(t)}c=En(o,t,n,r);if(a>0){for(u=0,h=a-1;u<h;u++){Rn(t,c,o[u],o[u+1])}d=a>1?(l-s)/(a-1):null;Rn(t,c,Mt.isNullOrUndef(d)?0:s-d,s);Rn(t,c,l,Mt.isNullOrUndef(d)?t.length:l+d);return On(t)}Rn(t,c);return On(t)},_tickSize:function(){var t=this;var e=t.options.ticks;var i=Mt.toRadians(t.labelRotation);var n=Math.abs(Math.cos(i));var r=Math.abs(Math.sin(i));var o=t._getLabelSizes();var a=e.autoSkipPadding||0;var s=o?o.widest.width+a:0;var l=o?o.highest.height+a:0;return t.isHorizontal()?l*n>s*r?s/n:l/r:l*r<s*n?l/n:s/r},_isVisible:function(){var t=this;var e=t.chart;var i=t.options.display;var n,r,o;if(i!=="auto"){return!!i}for(n=0,r=e.data.datasets.length;n<r;++n){if(e.isDatasetVisible(n)){o=e.getDatasetMeta(n);if(o.xAxisID===t.id||o.yAxisID===t.id){return true}}}return false},_computeGridLineItems:function(t){var e=this;var i=e.chart;var n=e.options;var r=n.gridLines;var o=n.position;var a=r.offsetGridLines;var s=e.isHorizontal();var l=e._ticksToDraw;var u=l.length+(a?1:0);var h=Sn(r);var c=[];var d=r.drawBorder?Ln(r.lineWidth,0,0):0;var p=d/2;var f=Mt._alignPixel;var m=function(t){return f(i,t,d)};var g,v,_,y,x;var b,w,k,L,M,C,T,P,S,A,I,D;if(o==="top"){g=m(e.bottom);w=e.bottom-h;L=g-p;C=m(t.top)+p;P=t.bottom}else if(o==="bottom"){g=m(e.top);C=t.top;P=m(t.bottom)-p;w=g+p;L=e.top+h}else if(o==="left"){g=m(e.right);b=e.right-h;k=g-p;M=m(t.left)+p;T=t.right}else{g=m(e.left);M=t.left;T=m(t.right)-p;b=g+p;k=e.left+h}for(v=0;v<u;++v){_=l[v]||{};if(wn(_.label)&&v<l.length){continue}
13if(v===e.zeroLineIndex&&n.offset===a){S=r.zeroLineWidth;A=r.zeroLineColor;I=r.zeroLineBorderDash||[];D=r.zeroLineBorderDashOffset||0}else{S=Ln(r.lineWidth,v,1);A=Ln(r.color,v,"rgba(0,0,0,0.1)");I=r.borderDash||[];D=r.borderDashOffset||0}y=Cn(e,_._index||v,a);if(y===undefined){continue}x=f(i,y,S);if(s){b=k=M=T=x}else{w=L=C=P=x}c.push({tx1:b,ty1:w,tx2:k,ty2:L,x1:M,y1:C,x2:T,y2:P,width:S,color:A,borderDash:I,borderDashOffset:D})}c.ticksLength=u;c.borderValue=g;return c},_computeLabelItems:function(){var t=this;var e=t.options;var i=e.ticks;var n=e.position;var r=i.mirror;var o=t.isHorizontal();var a=t._ticksToDraw;var s=Dn(i);var l=i.padding;var u=Sn(e.gridLines);var h=-Mt.toRadians(t.labelRotation);var c=[];var d,p,f,m,g,v,_,y,x,b,w,k;if(n==="top"){v=t.bottom-u-l;_=!h?"center":"left"}else if(n==="bottom"){v=t.top+u+l;_=!h?"center":"right"}else if(n==="left"){g=t.right-(r?0:u)-l;_=r?"left":"right"}else{g=t.left+(r?0:u)+l;_=r?"right":"left"}for(d=0,p=a.length;d<p;++d){f=a[d];m=f.label;if(wn(m)){continue}y=t.getPixelForTick(f._index||d)+i.labelOffset;x=f.major?s.major:s.minor;b=x.lineHeight;w=bn(m)?m.length:1;if(o){g=y;k=n==="top"?((!h?.5:1)-w)*b:(!h?.5:0)*b}else{v=y;k=(1-w)*b/2}c.push({x:g,y:v,rotation:h,label:m,font:x,textOffset:k,textAlign:_})}return c},_drawGrid:function(t){var e=this;var i=e.options.gridLines;if(!i.display){return}var n=e.ctx;var r=e.chart;var o=Mt._alignPixel;var a=i.drawBorder?Ln(i.lineWidth,0,0):0;var s=e._gridLineItems||(e._gridLineItems=e._computeGridLineItems(t));var l,u,h,c,d;for(h=0,c=s.length;h<c;++h){d=s[h];l=d.width;u=d.color;if(l&&u){n.save();n.lineWidth=l;n.strokeStyle=u;if(n.setLineDash){n.setLineDash(d.borderDash);n.lineDashOffset=d.borderDashOffset}n.beginPath();if(i.drawTicks){n.moveTo(d.tx1,d.ty1);n.lineTo(d.tx2,d.ty2)}if(i.drawOnChartArea){n.moveTo(d.x1,d.y1);n.lineTo(d.x2,d.y2)}n.stroke();n.restore()}}if(a){var p=a;
13var f=Ln(i.lineWidth,s.ticksLength-1,1);var m=s.borderValue;var g,v,_,y;if(e.isHorizontal()){g=o(r,e.left,p)-p/2;v=o(r,e.right,f)+f/2;_=y=m}else{_=o(r,e.top,p)-p/2;y=o(r,e.bottom,f)+f/2;g=v=m}n.lineWidth=a;n.strokeStyle=Ln(i.color,0);n.beginPath();n.moveTo(g,_);n.lineTo(v,y);n.stroke()}},_drawLabels:function(){var t=this;var e=t.options.ticks;if(!e.display){return}var i=t.ctx;var n=t._labelItems||(t._labelItems=t._computeLabelItems());var r,o,a,s,l,u,h,c;for(r=0,a=n.length;r<a;++r){l=n[r];u=l.font;i.save();i.translate(l.x,l.y);i.rotate(l.rotation);i.font=u.string;i.fillStyle=u.color;i.textBaseline="middle";i.textAlign=l.textAlign;h=l.label;c=l.textOffset;if(bn(h)){for(o=0,s=h.length;o<s;++o){i.fillText(""+h[o],0,c);c+=u.lineHeight}}else{i.fillText(h,0,c)}i.restore()}},_drawTitle:function(){var t=this;var e=t.ctx;var i=t.options;var n=i.scaleLabel;if(!n.display){return}var r=kn(n.fontColor,pt.global.defaultFontColor);var o=Mt.options._parseFont(n);var a=Mt.options.toPadding(n.padding);var s=o.lineHeight/2;var l=i.position;var u=0;var h,c;if(t.isHorizontal()){h=t.left+t.width/2;c=l==="bottom"?t.bottom-s-a.bottom:t.top+s+a.top}else{var d=l==="left";h=d?t.left+s+a.top:t.right-s-a.top;c=t.top+t.height/2;u=d?-.5*Math.PI:.5*Math.PI}e.save();e.translate(h,c);e.rotate(u);e.textAlign="center";e.textBaseline="middle";e.fillStyle=r;e.font=o.string;e.fillText(n.labelString,0,0);e.restore()},draw:function(t){var e=this;if(!e._isVisible()){return}e._drawGrid(t);e._drawTitle();e._drawLabels()},_layers:function(){var t=this;var e=t.options;var i=e.ticks&&e.ticks.z||0;var n=e.gridLines&&e.gridLines.z||0;if(!t._isVisible()||i===n||t.draw!==t._draw){return[{z:i,draw:function(){t.draw.apply(t,arguments)}}]}return[{z:n,draw:function(){t._drawGrid.apply(t,arguments);t._drawTitle.apply(t,arguments)}},{z:i,draw:function(){t._drawLabels.apply(t,arguments)}}]},_getMatchingVisibleMetas:function(e){var i=this;var n=i.isHorizontal();return i.chart._getSortedVisibleDatasetMetas().filter(function(t){return(!e||t.type===e)&&(n?t.xAxisID===i.id:t.yAxisID===i.id)})}});Nn.prototype._draw=Nn.prototype.draw;var Un=Nn,Zn=Mt.isNullOrUndef,jn={position:"bottom"},Wn=Un.extend({determineDataLimits:function(){var t=this;var e=t._getLabels();var i=t.options.ticks;var n=i.min;var r=i.max;var o=0;var a=e.length-1;var s;if(n!==undefined){s=e.indexOf(n);if(s>=0){o=s}}if(r!==undefined){s=e.indexOf(r);if(s>=0){a=s}}t.minIndex=o;t.maxIndex=a;t.min=e[o];t.max=e[a]},buildTicks:function(){var t=this;var e=t._getLabels();var i=t.minIndex;var n=t.maxIndex;t.ticks=i===0&&n===e.length-1?e:e.slice(i,n+1)},getLabelForIndex:function(t,e){var i=this;var n=i.chart;if(n.getDatasetMeta(e).controller._getValueScaleId()===i.id){return i.getRightValue(n.data.datasets[e].data[t])}return i._getLabels()[t]},_configure:function(){var t=this;var e=t.options.offset;var i=t.ticks;Un.prototype._configure.call(t);if(!t.isHorizontal()){t._reversePixels=!t._reversePixels}if(!i){return}t._startValue=t.minIndex-(e?.5:0);t._valueRange=Math.max(i.length-(e?0:1),1)},getPixelForValue:function(t,e,i){var n=this;var r,o,a;if(!Zn(e)&&!Zn(i)){t=n.chart.data.datasets[i].data[e]}if(!Zn(t)){r=n.isHorizontal()?t.x:t.y}if(r!==undefined||t!==undefined&&isNaN(e)){o=n._getLabels();t=Mt.valueOrDefault(r,t);a=o.indexOf(t);e=a!==-1?a:e;if(isNaN(e)){e=t}}return n.getPixelForDecimal((e-n._startValue)/n._valueRange)},getPixelForTick:function(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t],t+this.minIndex)},getValueForPixel:function(t){var e=this;var i=Math.round(e._startValue+e.getDecimalForPixel(t)*e._valueRange);return Math.min(Math.max(i,0),e.ticks.length-1)},getBasePixel:function(){return this.bottom}}),Hn;Wn._defaults=jn;var Gn=Mt.noop,Vn=Mt.isNullOrUndef;function qn(t,e){var i=[];var n=1e-14;var r=t.stepSize;var o=r||1;var a=t.maxTicks-1;var s=t.min;var l=t.max;var u=t.precision;var h=e.min;var c=e.max;var d=Mt.niceNum((c-h)/a/o)*o;var p,f,m,g;if(d<n&&Vn(s)&&Vn(l)){return[h,c]}g=Math.ceil(c/d)-Math.floor(h/d);if(g>a){d=Mt.niceNum(g*d/a/o)*o}if(r||Vn(u)){p=Math.pow(10,Mt._decimalPlaces(d))}else{p=Math.pow(10,u);d=Math.ceil(d*p)/p}f=Math.floor(h/d)*d;m=Math.ceil(c/d)*d;if(r){if(!Vn(s)&&Mt.almostWhole(s/d,d/1e3)){f=s}if(!Vn(l)&&Mt.almostWhole(l/d,d/1e3)){m=l}}g=(m-f)/d;if(Mt.almostEquals(g,Math.round(g),d/1e3)){g=Math.round(g)}else{g=Math.ceil(g)}f=Math.round(f*p)/p;m=Math.round(m*p)/p;i.push(Vn(s)?f:s);for(var v=1;v<g;++v){i.push(Math.round((f+v*d)*p)/p)}i.push(Vn(l)?m:l);return i}var Kn=Un.extend({getRightValue:function(t){if(typeof t==="string"){return+t}return Un.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this;var e=t.options;var i=e.ticks;if(i.beginAtZero){var n=Mt.sign(t.min);var r=Mt.sign(t.max);if(n<0&&r<0){t.max=0}else if(n>0&&r>0){t.min=0}}var o=i.min!==undefined||i.suggestedMin!==undefined;var a=i.max!==undefined||i.suggestedMax!==undefined;if(i.min!==undefined){t.min=i.min}else if(i.suggestedMin!==undefined){if(t.min===null){t.min=i.suggestedMin}else{t.min=Math.min(t.min,i.suggestedMin)}}if(i.max!==undefined){t.max=i.max}else if(i.suggestedMax!==undefined){if(t.max===null){t.max=i.suggestedMax}else{t.max=Math.max(t.max,i.suggestedMax)}}if(o!==a){if(t.min>=t.max){if(o){t.max=t.min+1}else{t.min=t.max-1}}}if(t.min===t.max){t.max++;if(!i.beginAtZero){t.min--}}},getTickLimit:function(){var t=this;var e=t.options.ticks;var i=e.stepSize;var n=e.maxTicksLimit;var r;if(i){r=Math.ceil(t.max/i)-Math.floor(t.min/i)+1}else{r=t._computeTickLimit();n=n||11}if(n){r=Math.min(n,r)}return r},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:Gn,buildTicks:function(){var t=this;var e=t.options;var i=e.ticks;var n=t.getTickLimit();n=Math.max(2,n);var r={maxTicks:n,min:i.min,max:i.max,precision:i.precision,stepSize:Mt.valueOrDefault(i.fixedStepSize,i.stepSize)};var o=t.ticks=qn(r,t);t.handleDirectionalChanges();t.max=Mt.max(o);t.min=Mt.min(o);if(i.reverse){o.reverse();t.start=t.max;t.end=t.min}else{t.start=t.min;t.end=t.max}},convertTicksToLabels:function(){var t=this;t.ticksAsNumbers=t.ticks.slice();t.zeroLineIndex=t.ticks.indexOf(0);Un.prototype.convertTicksToLabels.call(t)},_configure:function(){var t=this;var e=t.getTicks();var i=t.min;var n=t.max;var r;Un.prototype._configure.call(t);if(t.options.offset&&e.length){r=(n-i)/Math.max(e.length-1,1)/2;i-=r;n+=r}t._startValue=i;t._endValue=n;t._valueRange=n-i}}),Jn={position:"left",ticks:{callback:xn.formatters.linear}},Yn=0,Xn=1;function Qn(t,e,i){var n=[i.type,e===undefined&&i.stack===undefined?i.index:"",i.stack].join(".");if(t[n]===undefined){t[n]={pos:[],neg:[]}}return t[n]}function $n(t,e,i,n){var r=t.options;var o=r.stacked;var a=Qn(e,o,i);var s=a.pos;var l=a.neg;var u=n.length;var h,c;for(h=0;h<u;++h){c=t._parseValue(n[h]);if(isNaN(c.min)||isNaN(c.max)||i.data[h].hidden){continue}s[h]=s[h]||0;l[h]=l[h]||0;if(r.relativePoints){s[h]=100}else if(c.min<0||c.max<0){l[h]+=c.min}else{s[h]+=c.max}}}function tr(t,e,i){var n=i.length;var r,o;for(r=0;r<n;++r){o=t._parseValue(i[r]);if(isNaN(o.min)||isNaN(o.max)||e.data[r].hidden){continue}t.min=Math.min(t.min,o.min);t.max=Math.max(t.max,o.max)}}var er=Kn.extend({determineDataLimits:function(){var e=this;var t=e.options;var i=e.chart;var n=i.data.datasets;var r=e._getMatchingVisibleMetas();var o=t.stacked;var a={};var s=r.length;var l,u,h,c;e.min=Number.POSITIVE_INFINITY;e.max=Number.NEGATIVE_INFINITY;
13if(o===undefined){for(l=0;!o&&l<s;++l){u=r[l];o=u.stack!==undefined}}for(l=0;l<s;++l){u=r[l];h=n[u.index].data;if(o){$n(e,a,u,h)}else{tr(e,u,h)}}Mt.each(a,function(t){c=t.pos.concat(t.neg);e.min=Math.min(e.min,Mt.min(c));e.max=Math.max(e.max,Mt.max(c))});e.min=Mt.isFinite(e.min)&&!isNaN(e.min)?e.min:Yn;e.max=Mt.isFinite(e.max)&&!isNaN(e.max)?e.max:Xn;e.handleTickRangeOptions()},_computeTickLimit:function(){var t=this;var e;if(t.isHorizontal()){return Math.ceil(t.width/40)}e=Mt.options._parseFont(t.options.ticks);return Math.ceil(t.height/e.lineHeight)},handleDirectionalChanges:function(){if(!this.isHorizontal()){this.ticks.reverse()}},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e=this;return e.getPixelForDecimal((+e.getRightValue(t)-e._startValue)/e._valueRange)},getValueForPixel:function(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange},getPixelForTick:function(t){var e=this.ticksAsNumbers;if(t<0||t>e.length-1){return null}return this.getPixelForValue(e[t])}}),ir;er._defaults=Jn;var nr=Mt.valueOrDefault,rr=Mt.math.log10;function or(t,e){var i=[];var n=nr(t.min,Math.pow(10,Math.floor(rr(e.min))));var r=Math.floor(rr(e.max));var o=Math.ceil(e.max/Math.pow(10,r));var a,s;if(n===0){a=Math.floor(rr(e.minNotZero));s=Math.floor(e.minNotZero/Math.pow(10,a));i.push(n);n=s*Math.pow(10,a)}else{a=Math.floor(rr(n));s=Math.floor(n/Math.pow(10,a))}var l=a<0?Math.pow(10,Math.abs(a)):1;do{i.push(n);++s;if(s===10){s=1;++a;l=a>=0?1:l}n=Math.round(s*Math.pow(10,a)*l)/l}while(a<r||a===r&&s<o);var u=nr(t.max,n);i.push(u);return i}var ar={position:"left",ticks:{callback:xn.formatters.logarithmic}};function sr(t,e){return Mt.isFinite(t)&&t>=0?t:e}var lr=Un.extend({determineDataLimits:function(){var n=this;var t=n.options;var e=n.chart;var i=e.data.datasets;var r=n.isHorizontal();function o(t){return r?t.xAxisID===n.id:t.yAxisID===n.id}var a,s,l,u,h,c;n.min=Number.POSITIVE_INFINITY;n.max=Number.NEGATIVE_INFINITY;n.minNotZero=Number.POSITIVE_INFINITY;var d=t.stacked;if(d===undefined){for(a=0;a<i.length;a++){s=e.getDatasetMeta(a);if(e.isDatasetVisible(a)&&o(s)&&s.stack!==undefined){d=true;break}}}if(t.stacked||d){var p={};for(a=0;a<i.length;a++){s=e.getDatasetMeta(a);var f=[s.type,t.stacked===undefined&&s.stack===undefined?a:"",s.stack].join(".");if(e.isDatasetVisible(a)&&o(s)){if(p[f]===undefined){p[f]=[]}u=i[a].data;for(h=0,c=u.length;h<c;h++){var m=p[f];l=n._parseValue(u[h]);if(isNaN(l.min)||isNaN(l.max)||s.data[h].hidden||l.min<0||l.max<0){continue}m[h]=m[h]||0;m[h]+=l.max}}}Mt.each(p,function(t){if(t.length>0){var e=Mt.min(t);var i=Mt.max(t);n.min=Math.min(n.min,e);n.max=Math.max(n.max,i)}})}else{for(a=0;a<i.length;a++){s=e.getDatasetMeta(a);if(e.isDatasetVisible(a)&&o(s)){u=i[a].data;for(h=0,c=u.length;h<c;h++){l=n._parseValue(u[h]);if(isNaN(l.min)||isNaN(l.max)||s.data[h].hidden||l.min<0||l.max<0){continue}n.min=Math.min(l.min,n.min);n.max=Math.max(l.max,n.max);if(l.min!==0){n.minNotZero=Math.min(l.min,n.minNotZero)}}}}}n.min=Mt.isFinite(n.min)?n.min:null;n.max=Mt.isFinite(n.max)?n.max:null;n.minNotZero=Mt.isFinite(n.minNotZero)?n.minNotZero:null;this.handleTickRangeOptions()},handleTickRangeOptions:function(){var t=this;var e=t.options.ticks;var i=1;var n=10;t.min=sr(e.min,t.min);t.max=sr(e.max,t.max);if(t.min===t.max){if(t.min!==0&&t.min!==null){t.min=Math.pow(10,Math.floor(rr(t.min))-1);t.max=Math.pow(10,Math.floor(rr(t.max))+1)}else{t.min=i;t.max=n}}if(t.min===null){t.min=Math.pow(10,Math.floor(rr(t.max))-1)}if(t.max===null){t.max=t.min!==0?Math.pow(10,Math.floor(rr(t.min))+1):n}if(t.minNotZero===null){if(t.min>0){t.minNotZero=t.min}else if(t.max<1){t.minNotZero=Math.pow(10,Math.floor(rr(t.max)))}else{t.minNotZero=i}}},buildTicks:function(){var t=this;var e=t.options.ticks;var i=!t.isHorizontal();var n={min:sr(e.min),max:sr(e.max)};var r=t.ticks=or(n,t);t.max=Mt.max(r);t.min=Mt.min(r);if(e.reverse){i=!i;t.start=t.max;t.end=t.min}else{t.start=t.min;t.end=t.max}if(i){r.reverse()}},convertTicksToLabels:function(){this.tickValues=this.ticks.slice();Un.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForTick:function(t){var e=this.tickValues;if(t<0||t>e.length-1){return null}return this.getPixelForValue(e[t])},_getFirstTickValue:function(t){var e=Math.floor(rr(t));var i=Math.floor(t/Math.pow(10,e));return i*Math.pow(10,e)},_configure:function(){var t=this;var e=t.min;var i=0;Un.prototype._configure.call(t);if(e===0){e=t._getFirstTickValue(t.minNotZero);i=nr(t.options.ticks.fontSize,pt.global.defaultFontSize)/t._length}t._startValue=rr(e);t._valueOffset=i;t._valueRange=(rr(t.max)-rr(e))/(1-i)},getPixelForValue:function(t){var e=this;var i=0;t=+e.getRightValue(t);if(t>e.min&&t>0){i=(rr(t)-e._startValue)/e._valueRange+e._valueOffset}return e.getPixelForDecimal(i)},getValueForPixel:function(t){var e=this;var i=e.getDecimalForPixel(t);return i===0&&e.min===0?0:Math.pow(10,e._startValue+(i-e._valueOffset)*e._valueRange)}}),ur;lr._defaults=ar;var hr=Mt.valueOrDefault,cr=Mt.valueAtIndexOrDefault,dr=Mt.options.resolve,pr={display:true,animate:true,position:"chartArea",angleLines:{display:true,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:false},ticks:{showLabelBackdrop:true,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:xn.formatters.linear}
13,pointLabels:{display:true,fontSize:10,callback:function(t){return t}}};function fr(t){var e=t.ticks;if(e.display&&t.display){return hr(e.fontSize,pt.global.defaultFontSize)+e.backdropPaddingY*2}return 0}function mr(t,e,i){if(Mt.isArray(i)){return{w:Mt.longestText(t,t.font,i),h:i.length*e}}return{w:t.measureText(i).width,h:e}}function gr(t,e,i,n,r){if(t===n||t===r){return{start:e-i/2,end:e+i/2}}else if(t<n||t>r){return{start:e-i,end:e}}return{start:e,end:e+i}}function vr(t){var e=Mt.options._parseFont(t.options.pointLabels);var i={l:0,r:t.width,t:0,b:t.height-t.paddingTop};var n={};var r,o,a;t.ctx.font=e.string;t._pointLabelSizes=[];var s=t.chart.data.labels.length;for(r=0;r<s;r++){a=t.getPointPosition(r,t.drawingArea+5);o=mr(t.ctx,e.lineHeight,t.pointLabels[r]);t._pointLabelSizes[r]=o;var l=t.getIndexAngle(r);var u=Mt.toDegrees(l)%360;var h=gr(u,a.x,o.w,0,180);var c=gr(u,a.y,o.h,90,270);if(h.start<i.l){i.l=h.start;n.l=l}if(h.end>i.r){i.r=h.end;n.r=l}if(c.start<i.t){i.t=c.start;n.t=l}if(c.end>i.b){i.b=c.end;n.b=l}}t.setReductions(t.drawingArea,i,n)}function _r(t){if(t===0||t===180){return"center"}else if(t<180){return"left"}return"right"}function yr(t,e,i,n){var r=i.y+n/2;var o,a;if(Mt.isArray(e)){for(o=0,a=e.length;o<a;++o){t.fillText(e[o],i.x,r);r+=n}}else{t.fillText(e,i.x,r)}}function xr(t,e,i){if(t===90||t===270){i.y-=e.h/2}else if(t>270||t<90){i.y-=e.h}}function br(t){var e=t.ctx;var i=t.options;var n=i.pointLabels;var r=fr(i);var o=t.getDistanceFromCenterForValue(i.ticks.reverse?t.min:t.max);var a=Mt.options._parseFont(n);e.save();e.font=a.string;e.textBaseline="middle";for(var s=t.chart.data.labels.length-1;s>=0;s--){var l=s===0?r/2:0;var u=t.getPointPosition(s,o+l+5);var h=cr(n.fontColor,s,pt.global.defaultFontColor);e.fillStyle=h;var c=t.getIndexAngle(s);var d=Mt.toDegrees(c);e.textAlign=_r(d);xr(d,t._pointLabelSizes[s],u);yr(e,t.pointLabels[s],u,a.lineHeight)}e.restore()}function wr(t,e,i,n){var r=t.ctx;var o=e.circular;var a=t.chart.data.labels.length;var s=cr(e.color,n-1);var l=cr(e.lineWidth,n-1);var u;if(!o&&!a||!s||!l){return}r.save();r.strokeStyle=s;r.lineWidth=l;if(r.setLineDash){r.setLineDash(e.borderDash||[]);r.lineDashOffset=e.borderDashOffset||0}r.beginPath();if(o){r.arc(t.xCenter,t.yCenter,i,0,Math.PI*2)}else{u=t.getPointPosition(0,i);r.moveTo(u.x,u.y);for(var h=1;h<a;h++){u=t.getPointPosition(h,i);r.lineTo(u.x,u.y)}}r.closePath();r.stroke();r.restore()}function kr(t){return Mt.isNumber(t)?t:0}var Lr=Kn.extend({setDimensions:function(){var t=this;t.width=t.maxWidth;t.height=t.maxHeight;t.paddingTop=fr(t.options)/2;t.xCenter=Math.floor(t.width/2);t.yCenter=Math.floor((t.height-t.paddingTop)/2);t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2},determineDataLimits:function(){var r=this;var i=r.chart;var o=Number.POSITIVE_INFINITY;var a=Number.NEGATIVE_INFINITY;Mt.each(i.data.datasets,function(t,e){if(i.isDatasetVisible(e)){var n=i.getDatasetMeta(e);Mt.each(t.data,function(t,e){var i=+r.getRightValue(t);if(isNaN(i)||n.data[e].hidden){return}o=Math.min(i,o);a=Math.max(i,a)})}});r.min=o===Number.POSITIVE_INFINITY?0:o;r.max=a===Number.NEGATIVE_INFINITY?0:a;r.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/fr(this.options))},convertTicksToLabels:function(){var e=this;Kn.prototype.convertTicksToLabels.call(e);e.pointLabels=e.chart.data.labels.map(function(){var t=Mt.callback(e.options.pointLabels.callback,arguments,e);return t||t===0?t:""})},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t=this;var e=t.options;if(e.display&&e.pointLabels.display){vr(t)}else{t.setCenterPoint(0,0,0,0)}},setReductions:function(t,e,i){var n=this;var r=e.l/Math.sin(i.l);var o=Math.max(e.r-n.width,0)/Math.sin(i.r);var a=-e.t/Math.cos(i.t);var s=-Math.max(e.b-(n.height-n.paddingTop),0)/Math.cos(i.b);r=kr(r);o=kr(o);a=kr(a);s=kr(s);n.drawingArea=Math.min(Math.floor(t-(r+o)/2),Math.floor(t-(a+s)/2));n.setCenterPoint(r,o,a,s)},setCenterPoint:function(t,e,i,n){var r=this;var o=r.width-e-r.drawingArea;var a=t+r.drawingArea;var s=i+r.drawingArea;var l=r.height-r.paddingTop-n-r.drawingArea;r.xCenter=Math.floor((a+o)/2+r.left);r.yCenter=Math.floor((s+l)/2+r.top+r.paddingTop)},getIndexAngle:function(t){var e=this.chart;var i=360/e.data.labels.length;var n=e.options||{};var r=n.startAngle||0;var o=(t*i+r)%360;return(o<0?o+360:o)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(Mt.isNullOrUndef(t)){return NaN}var i=e.drawingArea/(e.max-e.min);if(e.options.ticks.reverse){return(e.max-t)*i}return(t-e.min)*i},getPointPosition:function(t,e){var i=this;var n=i.getIndexAngle(t)-Math.PI/2;return{x:Math.cos(n)*e+i.xCenter,y:Math.sin(n)*e+i.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(t){var e=this;var i=e.min;var n=e.max;return e.getPointPositionForValue(t||0,e.beginAtZero?0:i<0&&n<0?n:i>0&&n>0?i:0)}
13,_drawGrid:function(){var i=this;var t=i.ctx;var e=i.options;var n=e.gridLines;var r=e.angleLines;var o=hr(r.lineWidth,n.lineWidth);var a=hr(r.color,n.color);var s,l,u;if(e.pointLabels.display){br(i)}if(n.display){Mt.each(i.ticks,function(t,e){if(e!==0){l=i.getDistanceFromCenterForValue(i.ticksAsNumbers[e]);wr(i,n,l,e)}})}if(r.display&&o&&a){t.save();t.lineWidth=o;t.strokeStyle=a;if(t.setLineDash){t.setLineDash(dr([r.borderDash,n.borderDash,[]]));t.lineDashOffset=dr([r.borderDashOffset,n.borderDashOffset,0])}for(s=i.chart.data.labels.length-1;s>=0;s--){l=i.getDistanceFromCenterForValue(e.ticks.reverse?i.min:i.max);u=i.getPointPosition(s,l);t.beginPath();t.moveTo(i.xCenter,i.yCenter);t.lineTo(u.x,u.y);t.stroke()}t.restore()}},_drawLabels:function(){var i=this;var n=i.ctx;var t=i.options;var r=t.ticks;if(!r.display){return}var e=i.getIndexAngle(0);var o=Mt.options._parseFont(r);var a=hr(r.fontColor,pt.global.defaultFontColor);var s,l;n.save();n.font=o.string;n.translate(i.xCenter,i.yCenter);n.rotate(e);n.textAlign="center";n.textBaseline="middle";Mt.each(i.ticks,function(t,e){if(e===0&&!r.reverse){return}s=i.getDistanceFromCenterForValue(i.ticksAsNumbers[e]);if(r.showLabelBackdrop){l=n.measureText(t).width;n.fillStyle=r.backdropColor;n.fillRect(-l/2-r.backdropPaddingX,-s-o.size/2-r.backdropPaddingY,l+r.backdropPaddingX*2,o.size+r.backdropPaddingY*2)}n.fillStyle=a;n.fillText(t,0,-s)});n.restore()},_drawTitle:Mt.noop}),Mr;Lr._defaults=pr;var Cr=Mt._deprecated,Tr=Mt.options.resolve,Pr=Mt.valueOrDefault,Sr=Number.MIN_SAFE_INTEGER||-9007199254740991,Ar=Number.MAX_SAFE_INTEGER||9007199254740991,Ir={millisecond:{common:true,size:1,steps:1e3},second:{common:true,size:1e3,steps:60},minute:{common:true,size:6e4,steps:60},hour:{common:true,size:36e5,steps:24},day:{common:true,size:864e5,steps:30},week:{common:false,size:6048e5,steps:4},month:{common:true,size:2628e6,steps:12},quarter:{common:false,size:7884e6,steps:4},year:{common:true,size:3154e7}},Dr=Object.keys(Ir);function Or(t,e){return t-e}function zr(t){var e={};var i=[];var n,r,o;for(n=0,r=t.length;n<r;++n){o=t[n];if(!e[o]){e[o]=true;i.push(o)}}return i}function Er(t){return Mt.valueOrDefault(t.time.min,t.ticks.min)}function Br(t){return Mt.valueOrDefault(t.time.max,t.ticks.max)}function Fr(t,e,i,n){if(n==="linear"||!t.length){return[{time:e,pos:0},{time:i,pos:1}]}var r=[];var o=[e];var a,s,l,u,h;for(a=0,s=t.length;a<s;++a){u=t[a];if(u>e&&u<i){o.push(u)}}o.push(i);for(a=0,s=o.length;a<s;++a){h=o[a+1];l=o[a-1];u=o[a];if(l===undefined||h===undefined||Math.round((h+l)/2)!==u){r.push({time:u,pos:a/(s-1)})}}return r}function Rr(t,e,i){var n=0;var r=t.length-1;var o,a,s;while(n>=0&&n<=r){o=n+r>>1;a=t[o-1]||null;s=t[o];if(!a){return{lo:null,hi:s}}else if(s[e]<i){n=o+1}else if(a[e]>i){r=o-1}else{return{lo:a,hi:s}}}return{lo:s,hi:null}}function Nr(t,e,i,n){var r=Rr(t,e,i);var o=!r.lo?t[0]:!r.hi?t[t.length-2]:r.lo;var a=!r.lo?t[1]:!r.hi?t[t.length-1]:r.hi;var s=a[e]-o[e];var l=s?(i-o[e])/s:0;var u=(a[n]-o[n])*l;return o[n]+u}function Ur(t,e){var i=t._adapter;var n=t.options.time;var r=n.parser;var o=r||n.format;var a=e;if(typeof r==="function"){a=r(a)}if(!Mt.isFinite(a)){a=typeof o==="string"?i.parse(a,o):i.parse(a)}if(a!==null){return+a}if(!r&&typeof o==="function"){a=o(e);if(!Mt.isFinite(a)){a=i.parse(a)}}return a}function Zr(t,e){if(Mt.isNullOrUndef(e)){return null}var i=t.options.time;var n=Ur(t,t.getRightValue(e));if(n===null){return n}if(i.round){n=+t._adapter.startOf(n,i.round)}return n}function jr(t,e,i,n){var r=Dr.length;var o,a,s;for(o=Dr.indexOf(t);o<r-1;++o){a=Ir[Dr[o]];s=a.steps?a.steps:Ar;if(a.common&&Math.ceil((i-e)/(s*a.size))<=n){return Dr[o]}}return Dr[r-1]}function Wr(t,e,i,n,r){var o,a;for(o=Dr.length-1;o>=Dr.indexOf(i);o--){a=Dr[o];if(Ir[a].common&&t._adapter.diff(r,n,a)>=e-1){return a}}return Dr[i?Dr.indexOf(i):0]}function Hr(t){for(var e=Dr.indexOf(t)+1,i=Dr.length;e<i;++e){if(Ir[Dr[e]].common){return Dr[e]}}}function Gr(t,e,i,n){var r=t._adapter;var o=t.options;var a=o.time;var s=a.unit||jr(a.minUnit,e,i,n);var l=Tr([a.stepSize,a.unitStepSize,1]);var u=s==="week"?a.isoWeekday:false;var h=e;var c=[];var d;if(u){h=+r.startOf(h,"isoWeek",u)}h=+r.startOf(h,u?"day":s);if(r.diff(i,e,s)>1e5*l){throw e+" and "+i+" are too far apart with stepSize of "+l+" "+s}for(d=h;d<i;d=+r.add(d,l,s)){c.push(d)}if(d===i||o.bounds==="ticks"){c.push(d)}return c}function Vr(t,e,i,n,r){var o=0;var a=0;var s,l;if(r.offset&&e.length){s=Nr(t,"time",e[0],"pos");if(e.length===1){o=1-s}else{o=(Nr(t,"time",e[1],"pos")-s)/2}l=Nr(t,"time",e[e.length-1],"pos");if(e.length===1){a=l}else{a=(l-Nr(t,"time",e[e.length-2],"pos"))/2}}return{start:o,end:a,factor:1/(o+1+a)}}function qr(t,e,i,n){var r=t._adapter;var o=+r.startOf(e[0].value,n);var a=e[e.length-1].value;var s,l;for(s=o;s<=a;s=+r.add(s,1,n)){l=i[s];if(l>=0){e[l].major=true}}return e}function Kr(t,e,i){var n=[];var r={};var o=e.length;var a,s;for(a=0;a<o;++a){s=e[a];r[s]=a;n.push({value:s,major:false})}return o===0||!i?n:qr(t,n,r,i)}var Jr={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:false,unit:false,round:false,displayFormat:false,isoWeekday:false,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:false,source:"auto",major:{enabled:false}}},Yr=Un.extend({initialize:function(){this.mergeTicksOptions();Un.prototype.initialize.call(this)},update:function(){var t=this;var e=t.options;var i=e.time||(e.time={});var n=t._adapter=new yn._date(e.adapters.date);
13Cr("time scale",i.format,"time.format","time.parser");Cr("time scale",i.min,"time.min","ticks.min");Cr("time scale",i.max,"time.max","ticks.max");Mt.mergeIf(i.displayFormats,n.formats());return Un.prototype.update.apply(t,arguments)},getRightValue:function(t){if(t&&t.t!==undefined){t=t.t}return Un.prototype.getRightValue.call(this,t)},determineDataLimits:function(){var t=this;var e=t.chart;var i=t._adapter;var n=t.options;var r=n.time.unit||"day";var o=Ar;var a=Sr;var s=[];var l=[];var u=[];var h,c,d,p,f,m,g;var v=t._getLabels();for(h=0,d=v.length;h<d;++h){u.push(Zr(t,v[h]))}for(h=0,d=(e.data.datasets||[]).length;h<d;++h){if(e.isDatasetVisible(h)){f=e.data.datasets[h].data;if(Mt.isObject(f[0])){l[h]=[];for(c=0,p=f.length;c<p;++c){m=Zr(t,f[c]);s.push(m);l[h][c]=m}}else{l[h]=u.slice(0);if(!g){s=s.concat(u);g=true}}}else{l[h]=[]}}if(u.length){o=Math.min(o,u[0]);a=Math.max(a,u[u.length-1])}if(s.length){s=d>1?zr(s).sort(Or):s.sort(Or);o=Math.min(o,s[0]);a=Math.max(a,s[s.length-1])}o=Zr(t,Er(n))||o;a=Zr(t,Br(n))||a;o=o===Ar?+i.startOf(Date.now(),r):o;a=a===Sr?+i.endOf(Date.now(),r)+1:a;t.min=Math.min(o,a);t.max=Math.max(o+1,a);t._table=[];t._timestamps={data:s,datasets:l,labels:u}},buildTicks:function(){var t=this;var e=t.min;var i=t.max;var n=t.options;var r=n.ticks;var o=n.time;var a=t._timestamps;var s=[];var l=t.getLabelCapacity(e);var u=r.source;var h=n.distribution;var c,d,p;if(u==="data"||u==="auto"&&h==="series"){a=a.data}else if(u==="labels"){a=a.labels}else{a=Gr(t,e,i,l)}if(n.bounds==="ticks"&&a.length){e=a[0];i=a[a.length-1]}e=Zr(t,Er(n))||e;i=Zr(t,Br(n))||i;for(c=0,d=a.length;c<d;++c){p=a[c];if(p>=e&&p<=i){s.push(p)}}t.min=e;t.max=i;t._unit=o.unit||(r.autoSkip?jr(o.minUnit,t.min,t.max,l):Wr(t,s.length,o.minUnit,t.min,t.max));t._majorUnit=!r.major.enabled||t._unit==="year"?undefined:Hr(t._unit);t._table=Fr(t._timestamps.data,e,i,h);t._offsets=Vr(t._table,s,e,i,n);if(r.reverse){s.reverse()}return Kr(t,s,t._majorUnit)},getLabelForIndex:function(t,e){var i=this;var n=i._adapter;var r=i.chart.data;var o=i.options.time;var a=r.labels&&t<r.labels.length?r.labels[t]:"";var s=r.datasets[e].data[t];if(Mt.isObject(s)){a=i.getRightValue(s)}if(o.tooltipFormat){return n.format(Ur(i,a),o.tooltipFormat)}if(typeof a==="string"){return a}return n.format(Ur(i,a),o.displayFormats.datetime)},tickFormatFunction:function(t,e,i,n){var r=this;var o=r._adapter;var a=r.options;var s=a.time.displayFormats;var l=s[r._unit];var u=r._majorUnit;var h=s[u];var c=i[e];var d=a.ticks;var p=u&&h&&c&&c.major;var f=o.format(t,n?n:p?h:l);var m=p?d.major:d.minor;var g=Tr([m.callback,m.userCallback,d.callback,d.userCallback]);return g?g(f,e,i):f},convertTicksToLabels:function(t){var e=[];var i,n;for(i=0,n=t.length;i<n;++i){e.push(this.tickFormatFunction(t[i].value,i,t))}return e},getPixelForOffset:function(t){var e=this;var i=e._offsets;var n=Nr(e._table,"time",t,"pos");return e.getPixelForDecimal((i.start+n)*i.factor)},getPixelForValue:function(t,e,i){var n=this;var r=null;if(e!==undefined&&i!==undefined){r=n._timestamps.datasets[i][e]}if(r===null){r=Zr(n,t)}if(r!==null){return n.getPixelForOffset(r)}},getPixelForTick:function(t){var e=this.getTicks();return t>=0&&t<e.length?this.getPixelForOffset(e[t].value):null},getValueForPixel:function(t){var e=this;var i=e._offsets;var n=e.getDecimalForPixel(t)/i.factor-i.end;var r=Nr(e._table,"pos",n,"time");return e._adapter._create(r)},_getLabelSize:function(t){var e=this;var i=e.options.ticks;var n=e.ctx.measureText(t).width;var r=Mt.toRadians(e.isHorizontal()?i.maxRotation:i.minRotation);var o=Math.cos(r);var a=Math.sin(r);var s=Pr(i.fontSize,pt.global.defaultFontSize);return{w:n*o+s*a,h:n*a+s*o}},getLabelWidth:function(t){return this._getLabelSize(t).w},getLabelCapacity:function(t){var e=this;var i=e.options.time;var n=i.displayFormats;var r=n[i.unit]||n.millisecond;var o=e.tickFormatFunction(t,0,Kr(e,[t],e._majorUnit),r);var a=e._getLabelSize(o);var s=Math.floor(e.isHorizontal()?e.width/a.w:e.height/a.h);if(e.options.offset){s--}return s>0?s:1}}),Xr;Yr._defaults=Jr;var Qr={category:Wn,linear:er,logarithmic:lr,radialLinear:Lr,time:Yr},$r={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};yn._date.override(typeof n==="function"?{_id:"moment",formats:function(){return $r},parse:function(t,e){if(typeof t==="string"&&typeof e==="string"){t=n(t,e)}else if(!(t instanceof n)){t=n(t)}return t.isValid()?t.valueOf():null},format:function(t,e){return n(t).format(e)}
13,add:function(t,e,i){return n(t).add(e,i).valueOf()},diff:function(t,e,i){return n(t).diff(n(e),i)},startOf:function(t,e,i){t=n(t);if(e==="isoWeek"){return t.isoWeekday(i).valueOf()}return t.startOf(e).valueOf()},endOf:function(t,e){return n(t).endOf(e).valueOf()},_create:function(t){return n(t)}}:{}),pt._set("global",{plugins:{filler:{propagate:true}}});var to={dataset:function(t){var e=t.fill;var i=t.chart;var n=i.getDatasetMeta(e);var r=n&&i.isDatasetVisible(e);var o=r&&n.dataset._children||[];var a=o.length||0;return!a?null:function(t,e){return e<a&&o[e]._view||null}},boundary:function(t){var i=t.boundary;var e=i?i.x:null;var n=i?i.y:null;if(Mt.isArray(i)){return function(t,e){return i[e]}}return function(t){return{x:e===null?t.x:e,y:n===null?t.y:n}}}};function eo(t,e,i){var n=t._model||{};var r=n.fill;var o;if(r===undefined){r=!!n.backgroundColor}if(r===false||r===null){return false}if(r===true){return"origin"}o=parseFloat(r,10);if(isFinite(o)&&Math.floor(o)===o){if(r[0]==="-"||r[0]==="+"){o=e+o}if(o===e||o<0||o>=i){return false}return o}switch(r){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return r;default:return false}}function io(t){var e=t.el._model||{};var i=t.el._scale||{};var n=t.fill;var r=null;var o;if(isFinite(n)){return null}if(n==="start"){r=e.scaleBottom===undefined?i.bottom:e.scaleBottom}else if(n==="end"){r=e.scaleTop===undefined?i.top:e.scaleTop}else if(e.scaleZero!==undefined){r=e.scaleZero}else if(i.getBasePixel){r=i.getBasePixel()}if(r!==undefined&&r!==null){if(r.x!==undefined&&r.y!==undefined){return r}if(Mt.isFinite(r)){o=i.isHorizontal();return{x:o?r:null,y:o?null:r}}}return null}function no(t){var e=t.el._scale;var i=e.options;var n=e.chart.data.labels.length;var r=t.fill;var o=[];var a,s,l,u,h;if(!n){return null}a=i.ticks.reverse?e.max:e.min;s=i.ticks.reverse?e.min:e.max;l=e.getPointPositionForValue(0,a);for(u=0;u<n;++u){h=r==="start"||r==="end"?e.getPointPositionForValue(u,r==="start"?a:s):e.getBasePosition(u);if(i.gridLines.circular){h.cx=l.x;h.cy=l.y;h.angle=e.getIndexAngle(u)-Math.PI/2}o.push(h)}return o}function ro(t){var e=t.el._scale||{};if(e.getPointPositionForValue){return no(t)}return io(t)}function oo(t,e,i){var n=t[e];var r=n.fill;var o=[e];var a;if(!i){return r}while(r!==false&&o.indexOf(r)===-1){if(!isFinite(r)){return r}a=t[r];if(!a){return false}if(a.visible){return r}o.push(r);r=a.fill}return false}function ao(t){var e=t.fill;var i="dataset";if(e===false){return null}if(!isFinite(e)){i="boundary"}return to[i](t)}function so(t){return t&&!t.skip}function lo(t,e,i,n,r){var o,a,s,l;if(!n||!r){return}t.moveTo(e[0].x,e[0].y);for(o=1;o<n;++o){Mt.canvas.lineTo(t,e[o-1],e[o])}if(i[0].angle!==undefined){a=i[0].cx;s=i[0].cy;l=Math.sqrt(Math.pow(i[0].x-a,2)+Math.pow(i[0].y-s,2));for(o=r-1;o>0;--o){t.arc(a,s,l,i[o].angle,i[o-1].angle,true)}return}t.lineTo(i[r-1].x,i[r-1].y);for(o=r-1;o>0;--o){Mt.canvas.lineTo(t,i[o],i[o-1],true)}}function uo(t,e,i,n,r,o){var a=e.length;var s=n.spanGaps;var l=[];var u=[];var h=0;var c=0;var d,p,f,m,g,v,_,y;t.beginPath();for(d=0,p=a;d<p;++d){f=d%a;m=e[f]._view;g=i(m,f,n);v=so(m);_=so(g);if(o&&y===undefined&&v){y=d+1;p=a+y}if(v&&_){h=l.push(m);c=u.push(g)}else if(h&&c){if(!s){lo(t,l,u,h,c);h=c=0;l=[];u=[]}else{if(v){l.push(m)}if(_){u.push(g)}}}}lo(t,l,u,h,c);t.closePath();t.fillStyle=r;t.fill()}var ho={id:"filler",afterDatasetsUpdate:function(t,e){var i=(t.data.datasets||[]).length;var n=e.propagate;var r=[];var o,a,s,l;for(a=0;a<i;++a){o=t.getDatasetMeta(a);s=o.dataset;l=null;if(s&&s._model&&s instanceof ce.Line){l={visible:t.isDatasetVisible(a),fill:eo(s,a,i),chart:t,el:s}}o.$filler=l;r.push(l)}for(a=0;a<i;++a){l=r[a];if(!l){continue}l.fill=oo(r,a,n);l.boundary=ro(l);l.mapper=ao(l)}},beforeDatasetsDraw:function(t){var e=t._getSortedVisibleDatasetMetas();var i=t.ctx;var n,r,o,a,s,l,u;for(r=e.length-1;r>=0;--r){n=e[r].$filler;if(!n||!n.visible){continue}o=n.el;a=o._view;s=o._children||[];l=n.mapper;u=a.backgroundColor||pt.global.defaultColor;if(l&&u&&s.length){Mt.canvas.clipArea(i,t.chartArea);uo(i,s,l,a,u,o._loop);Mt.canvas.unclipArea(i)}}}},co=Mt.rtl.getRtlAdapter,po=Mt.noop,fo=Mt.valueOrDefault;function mo(t,e){return t.usePointStyle&&t.boxWidth>e?e:t.boxWidth}
13pt._set("global",{legend:{display:true,position:"top",align:"center",fullWidth:true,reverse:false,weight:1e3,onClick:function(t,e){var i=e.datasetIndex;var n=this.chart;var r=n.getDatasetMeta(i);r.hidden=r.hidden===null?!n.data.datasets[i].hidden:null;n.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(i){var n=i.data.datasets;var t=i.options.legend||{};var r=t.labels&&t.labels.usePointStyle;return i._getSortedDatasetMetas().map(function(t){var e=t.controller.getStyle(r?0:undefined);return{text:n[t.index].label,fillStyle:e.backgroundColor,hidden:!i.isDatasetVisible(t.index),lineCap:e.borderCapStyle,lineDash:e.borderDash,lineDashOffset:e.borderDashOffset,lineJoin:e.borderJoinStyle,lineWidth:e.borderWidth,strokeStyle:e.borderColor,pointStyle:e.pointStyle,rotation:e.rotation,datasetIndex:t.index}},this)}}},legendCallback:function(t){var e=document.createElement("ul");var i=t.data.datasets;var n,r,o,a;e.setAttribute("class",t.id+"-legend");for(n=0,r=i.length;n<r;n++){o=e.appendChild(document.createElement("li"));a=o.appendChild(document.createElement("span"));a.style.backgroundColor=i[n].backgroundColor;if(i[n].label){o.appendChild(document.createTextNode(i[n].label))}}return e.outerHTML}});var go=Ot.extend({initialize:function(t){var e=this;Mt.extend(e,t);e.legendHitBoxes=[];e._hoveredItem=null;e.doughnutMode=false},beforeUpdate:po,update:function(t,e,i){var n=this;n.beforeUpdate();n.maxWidth=t;n.maxHeight=e;n.margins=i;n.beforeSetDimensions();n.setDimensions();n.afterSetDimensions();n.beforeBuildLabels();n.buildLabels();n.afterBuildLabels();n.beforeFit();n.fit();n.afterFit();n.afterUpdate();return n.minSize},afterUpdate:po,beforeSetDimensions:po,setDimensions:function(){var t=this;if(t.isHorizontal()){t.width=t.maxWidth;t.left=0;t.right=t.width}else{t.height=t.maxHeight;t.top=0;t.bottom=t.height}t.paddingLeft=0;t.paddingTop=0;t.paddingRight=0;t.paddingBottom=0;t.minSize={width:0,height:0}},afterSetDimensions:po,beforeBuildLabels:po,buildLabels:function(){var e=this;var i=e.options.labels||{};var t=Mt.callback(i.generateLabels,[e.chart],e)||[];if(i.filter){t=t.filter(function(t){return i.filter(t,e.chart.data)})}if(e.options.reverse){t.reverse()}e.legendItems=t},afterBuildLabels:po,beforeFit:po,fit:function(){var t=this;var e=t.options;var r=e.labels;var i=e.display;var o=t.ctx;var n=Mt.options._parseFont(r);var a=n.size;var s=t.legendHitBoxes=[];var l=t.minSize;var u=t.isHorizontal();if(u){l.width=t.maxWidth;l.height=i?10:0}else{l.width=i?10:0;l.height=t.maxHeight}if(!i){t.width=l.width=t.height=l.height=0;return}o.font=n.string;if(u){var h=t.lineWidths=[0];var c=0;o.textAlign="left";o.textBaseline="middle";Mt.each(t.legendItems,function(t,e){var i=mo(r,a);var n=i+a/2+o.measureText(t.text).width;if(e===0||h[h.length-1]+n+2*r.padding>l.width){c+=a+r.padding;h[h.length-(e>0?0:1)]=0}s[e]={left:0,top:0,width:n,height:a};h[h.length-1]+=n+r.padding});l.height+=c}else{var d=r.padding;var p=t.columnWidths=[];var f=t.columnHeights=[];var m=r.padding;var g=0;var v=0;Mt.each(t.legendItems,function(t,e){var i=mo(r,a);var n=i+a/2+o.measureText(t.text).width;if(e>0&&v+a+2*d>l.height){m+=g+r.padding;p.push(g);f.push(v);g=0;v=0}g=Math.max(g,n);v+=a+d;s[e]={left:0,top:0,width:n,height:a}});m+=g;p.push(g);f.push(v);l.width+=m}t.width=l.width;t.height=l.height},afterFit:po,isHorizontal:function(){return this.options.position==="top"||this.options.position==="bottom"},draw:function(){var s=this;var i=s.options;var l=i.labels;var t=pt.global;var u=t.defaultColor;var h=t.elements.line;var c=s.height;var d=s.columnHeights;var p=s.width;var f=s.lineWidths;if(!i.display){return}var m=co(i.rtl,s.left,s.minSize.width);var g=s.ctx;var e=fo(l.fontColor,t.defaultFontColor);var n=Mt.options._parseFont(l);var v=n.size;var _;g.textAlign=m.textAlign("left");g.textBaseline="middle";g.lineWidth=.5;g.strokeStyle=e;g.fillStyle=e;g.font=n.string;var y=mo(l,v);var x=s.legendHitBoxes;var b=function(t,e,i){if(isNaN(y)||y<=0){return}g.save();var n=fo(i.lineWidth,h.borderWidth);g.fillStyle=fo(i.fillStyle,u);g.lineCap=fo(i.lineCap,h.borderCapStyle);g.lineDashOffset=fo(i.lineDashOffset,h.borderDashOffset);g.lineJoin=fo(i.lineJoin,h.borderJoinStyle);g.lineWidth=n;g.strokeStyle=fo(i.strokeStyle,u);if(g.setLineDash){g.setLineDash(fo(i.lineDash,h.borderDash))}if(l&&l.usePointStyle){var r=y*Math.SQRT2/2;var o=m.xPlus(t,y/2);var a=e+v/2;Mt.canvas.drawPoint(g,i.pointStyle,r,o,a,i.rotation)}else{g.fillRect(m.leftForLtr(t,y),e,y,v);if(n!==0){g.strokeRect(m.leftForLtr(t,y),e,y,v)}}
13g.restore()};var w=function(t,e,i,n){var r=v/2;var o=m.xPlus(t,y+r);var a=e+r;g.fillText(i.text,o,a);if(i.hidden){g.beginPath();g.lineWidth=2;g.moveTo(o,a);g.lineTo(m.xPlus(o,n),a);g.stroke()}};var k=function(t,e){switch(i.align){case"start":return l.padding;case"end":return t-e;default:return(t-e+l.padding)/2}};var L=s.isHorizontal();if(L){_={x:s.left+k(p,f[0]),y:s.top+l.padding,line:0}}else{_={x:s.left+l.padding,y:s.top+k(c,d[0]),line:0}}Mt.rtl.overrideTextDirection(s.ctx,i.textDirection);var M=v+l.padding;Mt.each(s.legendItems,function(t,e){var i=g.measureText(t.text).width;var n=y+v/2+i;var r=_.x;var o=_.y;m.setWidth(s.minSize.width);if(L){if(e>0&&r+n+l.padding>s.left+s.minSize.width){o=_.y+=M;_.line++;r=_.x=s.left+k(p,f[_.line])}}else if(e>0&&o+M>s.top+s.minSize.height){r=_.x=r+s.columnWidths[_.line]+l.padding;_.line++;o=_.y=s.top+k(c,d[_.line])}var a=m.x(r);b(a,o,t);x[e].left=m.leftForLtr(a,x[e].width);x[e].top=o;w(a,o,t,i);if(L){_.x+=n+l.padding}else{_.y+=M}});Mt.rtl.restoreTextDirection(s.ctx,i.textDirection)},_getLegendItemAt:function(t,e){var i=this;var n,r,o;if(t>=i.left&&t<=i.right&&e>=i.top&&e<=i.bottom){o=i.legendHitBoxes;for(n=0;n<o.length;++n){r=o[n];if(t>
13=r.left&&t<=r.left+r.width&&e>=r.top&&e<=r.top+r.height){return i.legendItems[n]}}}return null},handleEvent:function(t){var e=this;var i=e.options;var n=t.type==="mouseup"?"click":t.type;var r;if(n==="mousemove"){if(!i.onHover&&!i.onLeave){return}}else if(n==="click"){if(!i.onClick){return}}else{return}r=e._getLegendItemAt(t.x,t.y);if(n==="click"){if(r&&i.onClick){i.onClick.call(e,t.native,r)}}else{if(i.onLeave&&r!==e._hoveredItem){if(e._hoveredItem){i.onLeave.call(e,t.native,e._hoveredItem)}e._hoveredItem=r}if(i.onHover&&r){i.onHover.call(e,t.native,r)}}}});function vo(t,e){var i=new go({ctx:t.ctx,options:e,chart:t});hi.configure(t,i,e);hi.addBox(t,i);t.legend=i}var _o={id:"legend",_element:go,beforeInit:function(t){var e=t.options.legend;if(e){vo(t,e)}},beforeUpdate:function(t){var e=t.options.legend;var i=t.legend;if(e){Mt.mergeIf(e,pt.global.legend);if(i){hi.configure(t,i,e);i.options=e}else{vo(t,e)}}else if(i){hi.removeBox(t,i);delete t.legend}},afterEvent:function(t,e){var i=t.legend;if(i){i.handleEvent(e)}}},yo=Mt.noop;pt._set("global",{title:{display:false,fontStyle:"bold",fullWidth:true,padding:10,position:"top",text:"",weight:2e3}});var xo=Ot.extend({initialize:function(t){var e=this;Mt.extend(e,t);e.legendHitBoxes=[]},beforeUpdate:yo,update:function(t,e,i){var n=this;n.beforeUpdate();n.maxWidth=t;n.maxHeight=e;n.margins=i;n.beforeSetDimensions();n.setDimensions();n.afterSetDimensions();n.beforeBuildLabels();n.buildLabels();n.afterBuildLabels();n.beforeFit();n.fit();n.afterFit();n.afterUpdate();return n.minSize},afterUpdate:yo,beforeSetDimensions:yo,setDimensions:function(){var t=this;if(t.isHorizontal()){t.width=t.maxWidth;t.left=0;t.right=t.width}else{t.height=t.maxHeight;t.top=0;t.bottom=t.height}t.paddingLeft=0;t.paddingTop=0;t.paddingRight=0;t.paddingBottom=0;t.minSize={width:0,height:0}},afterSetDimensions:yo,beforeBuildLabels:yo,buildLabels:yo,afterBuildLabels:yo,beforeFit:yo,fit:function(){var t=this;var e=t.options;var i=t.minSize={};var n=t.isHorizontal();var r,o;if(!e.display){t.width=i.width=t.height=i.height=0;return}r=Mt.isArray(e.text)?e.text.length:1;o=r*Mt.options._parseFont(e).lineHeight+e.padding*2;t.width=i.width=n?t.maxWidth:o;t.height=i.height=n?o:t.maxHeight},afterFit:yo,isHorizontal:function(){var t=this.options.position;return t==="top"||t==="bottom"},draw:function(){var t=this;var e=t.ctx;var i=t.options;if(!i.display){return}var n=Mt.options._parseFont(i);var r=n.lineHeight;var o=r/2+i.padding;var a=0;var s=t.top;var l=t.left;var u=t.bottom;var h=t.right;var c,d,p;e.fillStyle=Mt.valueOrDefault(i.fontColor,pt.global.defaultFontColor);e.font=n.string;if(t.isHorizontal()){d=l+(h-l)/2;p=s+o;c=h-l}else{d=i.position==="left"?l+o:h-o;p=s+(u-s)/2;c=u-s;a=Math.PI*(i.position==="left"?-.5:.5)}e.save();e.translate(d,p);e.rotate(a);e.textAlign="center";e.textBaseline="middle";var f=i.text;if(Mt.isArray(f)){var m=0;for(var g=0;g<f.length;++g){e.fillText(f[g],0,m,c);m+=r}}else{e.fillText(f,0,0,c)}e.restore()}});function bo(t,e){var i=new xo({ctx:t.ctx,options:e,chart:t});hi.configure(t,i,e);hi.addBox(t,i);t.titleBlock=i}var wo,ko={},Lo=ho,Mo=_o,Co={id:"title",_element:xo,beforeInit:function(t){var e=t.options.title;if(e){bo(t,e)}},beforeUpdate:function(t){var e=t.options.title;var i=t.titleBlock;if(e){Mt.mergeIf(e,pt.global.title);if(i){hi.configure(t,i,e);i.options=e}else{bo(t,e)}}else if(i){hi.removeBox(t,i);delete t.titleBlock}}};for(var To in ko.filler=Lo,ko.legend=Mo,ko.title=Co,fn.helpers=Mt,mn(),fn._adapters=yn,fn.Animation=Et,fn.animationService=Bt,fn.controllers=He,fn.DatasetController=jt,fn.defaults=pt,fn.Element=Ot,fn.elements=ce,fn.Interaction=Xe,fn.layouts=hi,fn.platform=Ui,fn.plugins=Zi,fn.Scale=Un,fn.scaleService=ji,fn.Ticks=xn,fn.Tooltip=rn,fn.helpers.each(Qr,function(t,e){fn.scaleService.registerScaleType(e,t,t._defaults)}),ko){if(ko.hasOwnProperty(To)){fn.plugins.register(ko[To])}}fn.platform.initialize();var Po=fn;if(typeof window!=="undefined"){window.Chart=fn}return(fn.Chart=fn).Legend=ko.legend._element,fn.Title=ko.title._element,fn.pluginService=fn.plugins,fn.PluginBase=fn.Element.extend({}),fn.canvasHelpers=fn.helpers.canvas,fn.layoutService=fn.layouts,fn.LinearScaleBase=Kn,fn.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],function(i){fn[i]=function(t,e){return new fn(t,fn.helpers.merge(e||{},{type:i.charAt(0).toLowerCase()+i.slice(1)}))}}),Po}(function(){try{return i(15)}catch(t){}}())},function(t){t.exports=JSON.parse("{}")}
13,,function(t,e,i){"use strict";function n(t){t=t||{},this.settings={timeMovingThreshold:t.timeMovingThreshold||15e3,eleGainThreshold:t.eleGainThreshold||5},this.xml=null,this.metadata={},this.waypoints=[],this.routes=[],this.tracks=[]}n.prototype.parse=function(t){var e=this,i=new DOMParser;this.xml=i.parseFromString(t,"text/xml");var n=this.xml.querySelector("metadata");null!==n&&(this.metadata=this.parseMetadataType(n));for(var r=[].slice.call(this.xml.querySelectorAll("wpt")),o=0;o<r.length;o++){var a=r[o],s=e.parseWptType(a,!0);e.waypoints.push(s)}for(var l=[].slice.call(this.xml.querySelectorAll("rte")),o=0;o<l.length;o++){var u=l[o],h=e.parseRteType(u);h.time=e.calcTime(h.points),h.distance=e.calcDistance(h.points),h.elevation=e.calcElevation(h.points),h.heartRate=e.calcHeartRate(h.points),e.routes.push(h)}for(var c=[].slice.call(this.xml.querySelectorAll("trk")),o=0;o<c.length;o++){var d=c[o],p=e.parseTrkType(d);p.time=e.calcTime(p.points),p.distance=e.calcDistance(p.points),p.elevation=e.calcElevation(p.points),p.heartRate=e.calcHeartRate(p.points),e.tracks.push(p)}},n.prototype.getFirstTagValue=function(t,e){var i=t.querySelectorAll(e);return i.length?i[0].textContent:null},n.prototype.getFirstTagValueNs=function(t,e,i){var n=t.getElementsByTagNameNS(e,i);return n.length?n[0].textContent:null},n.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},n.prototype.parseLinks=function(t){for(var e=[],i=[].slice.call(t.querySelectorAll("link")),n=0;n<i.length;n++){var r=i[n],o=this.parseLinkType(r);e.push(o)}return e},n.prototype.parseRtepts=function(t){for(var e=[],i=[].slice.call(t.querySelectorAll("rtept")),n=0;n<i.length;n++){var r=i[n],o=this.parseWptType(r,!1);e.push(o)}return e},n.prototype.parseTrkpts=function(t){for(var e=[],i=[].slice.call(t.querySelectorAll("trkpt")),n=0;n<i.length;n++){var r=i[n],o=this.parseWptType(r,!1);e.push(o)}return e},n.prototype.parseTrksegs=function(t){for(var e=[],i=[].slice.call(t.querySelectorAll("trkseg")),n=0;n<i.length;n++){var r=i[n],o=this.parseTrksegType(r,!1);o.time=this.calcTime(o.points),o.distance=this.calcDistance(o.points),o.elevation=this.calcElevation(o.points),o.heartRate=this.calcHeartRate(o.points),e.push(o)}return e},n.prototype.parseWptTypeExtensions=function(t){return{tpx:this.parseTrackPointExtensionType(t)}},n.prototype.parseLinkType=function(t){return{href:t.getAttribute("href"),text:this.getFirstTagValue(t,"text"),type:this.getFirstTagValue(t,"type")}},n.prototype.parseMetadataType=function(t){return{name:this.getFirstTagValue(t,"name"),desc:this.getFirstTagValue(t,"desc"),time:Date.parse(this.getFirstTagValue(t,"time")),links:this.parseLinks(t)}},n.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},n.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"])}},n.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"])}},n.prototype.parseTrksegType=function(t){return{points:this.parseTrkpts(t),extensions:this.parseMmpExtensionType(t,["color","weight","o
13pacity"])}},n.prototype.parseMmpExtensionType=function(t,e){var i=t.querySelector("extensions");if(null===i)return{};for(var n={},r=0;r<e.length;r++){var o=e[r];n[o]=this.getFirstTagValueNs(i,"https://www.mapsmarker.com/GPX/1/",o)}return n},n.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"))}},n.prototype.calcTime=function(t){var e=0,i=0;t[0].elapsed=e;for(var n=0;n<t.length-1;n++){var r=t[n+1].time-t[n].time;isNaN(r)||(e+=r,r<this.settings.timeMovingThreshold&&(i+=r)),t[n+1].elapsed=e}return{start:t[0].time,end:t[t.length-1].time,total:e,moving:i}},n.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}},n.prototype.calcDistanceBetween=function(t,e){var i=Math.PI/180,n=t.lat*i,r=e.lat*i,o=Math.sin((e.lat-t.lat)*i/2),a=Math.sin((e.lon-t.lon)*i/2),s=o*o+Math.cos(n)*Math.cos(r)*a*a;return 6371e3*(2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s)))},n.prototype.calcElevation=function(t){for(var e=[],i=0,n=0,r=null,o=0;o<t.length;o++){var a,s=t[o].ele;isNaN(s)?(t[o].gain=Math.abs(i),t[o].loss=Math.abs(n)):(null!==r?(a=s-r,5<=Math.abs(a)&&(0<a?i+=a:a<0&&(n+=a),r=s,e.push(s))):(e.push(s),r=s),t[o].gain=Math.abs(i),t[o].loss=Math.abs(n))}return{max:Math.max.apply(null,e),min:Math.min.apply(null,e),gain:Math.abs(i),loss:Math.abs(n),avg:e.reduce(function(t,e){return t+e},0)/e.length}},n.prototype.calcHeartRate=function(t){for(var e=[],i=0;i<t.length;i++){var n=t[i].extension;void 0!==n.tpx&&n.tpx.hr&&e.push(n.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 r=n,o=i(3),u=i.n(o),a=i(0),Y=i.n(a),s=i(2);i(16),i(7),i(8),i(9),i(10),i(19),i(20),i(21),i(22),i(23);Y.a.Control.ResetView=Y.a.Control.extend({options:{position:"topleft",onDemand:!1,coordinates:null,zoom:null,title:""},onAdd:function(t){var e=Y.a.DomUtil.create("div","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,"mmp-control-resetview",e,this._resetView),e},_createButton:function(t,e,i,n,r){var o=Y.a.DomUtil.create("a",i,n);o.innerHTML=t,o.href="#",o.title=e,Y.a.DomEvent.disableClickPropagation(o),Y.a.DomEvent.on(o,"click",Y.a.DomEvent.stop),Y.a.DomEvent.on(o,"click",r,this),Y.a.DomEvent.on(o,"click",this._refocusOnMap,this)},_resetView:function(){this._map.stop(),this.options.onDemand&&this._map.once("moveend",function(){this._container.style.display="none"}
13,this),this._map.setView(this.options.coordinates,this.options.zoom,{animate:!0})}}),Y.a.control.resetView=function(t){return new Y.a.Control.ResetView(t)};var X=i(1);Y.a.Control.Filters=Y.a.Control.extend({options:{mmp:null,collapsed:!0,position:"topright",buttons:!0,allText:"All",noneText:"None"},initialize:function(t){Y.a.Util.setOptions(this,t)},onAdd:function(t){this._map=t;var e=this.options.mmp,i=this.options.collapsed,n="mmp-control-filters",r=this._container=Y.a.DomUtil.create("div",n);r.setAttribute("aria-haspopup",!0),Y.a.DomEvent.disableClickPropagation(r),Y.a.DomEvent.disableScrollPropagation(r),i&&(this._map.on("click",this.collapse,this),Y.a.Browser.android||Y.a.DomEvent.on(r,{mouseenter:this.expand,mouseleave:this.collapse},this));var o=Y.a.DomUtil.create("a",n+"-toggle",r);o.href="#",o.title="Filters",Y.a.Browser.touch?(Y.a.DomEvent.on(o,"click",Y.a.DomEvent.stop),Y.a.DomEvent.on(o,"click",this.expand,this)):Y.a.DomEvent.on(o,"focus",this.expand,this);var a,s,l,u=this._form=Y.a.DomUtil.create("form",n+"-list",r);this.options.buttons&&(a=Y.a.DomUtil.create("div","mmp-control-filters-buttons",u),(s=Y.a.DomUtil.create("a",null,a)).innerHTML=this.options.allText,s.href="#",s.title=this.options.allText,Y.a.DomEvent.disableClickPropagation(s),Y.a.DomEvent.on(s,"click",Y.a.DomEvent.stop),Y.a.DomEvent.on(s,"click",function(){this._batchSelect(!0)},this),(l=Y.a.DomUtil.create("a",null,a)).innerHTML=this.options.noneText,l.href="#",l.title=this.options.noneText,Y.a.DomEvent.disableClickPropagation(l),Y.a.DomEvent.on(l,"click",Y.a.DomEvent.stop),Y.a.DomEvent.on(l,"click",function(){this._batchSelect(!1)},this));var h=[];Object.keys(e.settings.filtersDetails).forEach(function(t){void 0!==e.groups[t]&&h.push({index:e.settings.filtersDetails[t].index,id:t,icon:e.settings.filtersDetails[t].icon,name:e.settings.filtersDetails[t].name,count:Object.keys(e.groups[t].markers).length})}),h="id"==e.settings.filtersOrderBy?Object(X.i)(h,"id",e.settings.filtersSortOrder,!0):"name"==e.settings.filtersOrderBy?Object(X.i)(h,"name",e.settings.filtersSortOrder,!1):"count"==e.settings.filtersOrderBy?Object(X.i)(h,"count",e.settings.filtersSortOrder,!0):Object(X.i)(h,"index",e.settings.filtersSortOrder,!0);for(var c=0;c<h.length;c++){var d=Y.a.DomUtil.create("label",null,u),p=Y.a.DomUtil.create("input",n+"-selector",d);p.type="checkbox",p.value=h[c].id,void 0!==e.groups[h[c].id]&&e.groups[h[c].id].active&&(p.checked=!0);var f=Y.a.DomUtil.create("span",null,d),m="";e.settings.filtersIcon&&(m+='<img class="mmp-filter-icon" src="'+(h[c].icon?mmpVars.iconsUrl+h[c].icon:mmpVars.pluginUrl+"images/leaflet/marker.png")+'" />'),e.settings.filtersName&&(m+=h[c].name),e.settings.filtersCount&&(m+=" [ "+h[c].count+" ]"),f.innerHTML=m,Y.a.DomEvent.on(p,"click",function(){void 0!==e.groups[this.value]&&(e.groups[this.value].active=this.checked),e.drawMarkers(),e.drawGeoJson(),t.fire("filterclick")},p)}return i||this.expand(),r},expand:function(){Y.a.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?(Y.a.DomUtil.addClass(this._form,"mmp-control-filters-scrollbar"),this._form.style.height=t+"px"):Y.a.DomUtil.removeClass(this._form,"mmp-control-filters-scrollbar"),this},collapse:function(){return Y.a.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"),n=i.length-1;0<=n;n--)i[n].checked=t,void 0!==e.groups[i[n].value]&&(e.groups[i[n].value].active=t);e.drawMarkers(),e.drawGeoJson(),this._map.fire("filterclick")}}),Y.a.control.filters=function(t){return new Y.a.Control.Filters(t)},Y.a.Control.Gpx=Y.a.Control.extend({options:{mmp:null,collapsed:!0,position:"topleft"},initialize:function(t){Y.a.Util.setOptions(this,t)},onAdd:function(e){this._map=e;var i=this.options.mmp,t=this.options.collapsed,n="mmp-control-tracks",r=this._container=Y.a.DomUtil.create("div",n);r.setAttribute("aria-haspopup",!0),Y.a.DomEvent.disableClickPropagation(r),Y.a.DomEvent.disableScrollPropagation(r),t&&(this._map.on("click",this.collapse,this),Y.a.Browser.android||Y.a.DomEvent.on(r,{mouseenter:this.expand,mouseleave:this.collapse},this));var o=Y.a.DomUtil.create("a",n+"-toggle",r);o.href="#",o.title="Tracks",Y.a.Browser.touch?(Y.a.DomEvent.on(o,"click",Y.a.DomEvent.stop),Y.a.DomEvent.on(o,"click",this.expand,this)):Y.a.DomEvent.on(o,"focus",this.expand,this);
13for(var a=this._form=Y.a.DomUtil.create("form",n+"-list",r),s=0;s<i.gpx.tracks.length;s++){var l=Y.a.DomUtil.create("label",null,a),u=Y.a.DomUtil.create("input",n+"-selector",l);u.type="radio",u.name="mmp-gpx-tracks",0==(u.value=s)&&(u.checked=!0),Y.a.DomUtil.create("span",null,l).innerHTML=i.gpx.tracks[s].name?i.gpx.tracks[s].name:"Unnamed Track",Y.a.DomEvent.on(u,"click",function(){var t=parseInt(this.value);e._activeTrack=t,e.fitBounds(i.gpxTracks[t].getBounds(),{padding:[10,10]}),i.updateElevationChart(!0)},u)}return t||this.expand(),r},expand:function(){Y.a.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?(Y.a.DomUtil.addClass(this._form,"mmp-control-tracks-scrollbar"),this._form.style.height=t+"px"):Y.a.DomUtil.removeClass(this._form,"mmp-control-tracks-scrollbar"),this},collapse:function(){return Y.a.DomUtil.removeClass(this._container,"mmp-control-tracks-expanded"),this}}),Y.a.control.gpx=function(t){return new Y.a.Control.Gpx(t)};i(24);function l(t){return(l="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})(t)}e.a=function(t){var J=this;this.uid=t.uid,this.type=t.type,this.id=t.id,this.lazy=t.lazy,this.customMarkers=t.markers,this.settings=t.overrides||{},this.language=t.language||null,this.highlight=t.highlight||null,this.fullscreen=t.fullscreen||!1,this.page=t.page||null,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.location={},this.listeners={},this.on=function(t,e){J.listeners[t]instanceof Array||(J.listeners[t]=[]),-1===J.listeners[t].indexOf(e)&&J.listeners[t].push(e)},this.off=function(t,e){var i;J.listeners[t]instanceof Array&&(-1!==(i=J.listeners[t].indexOf(e))&&J.listeners[t].splice(i,1))},this.fire=function(t,e){if(J.listeners[t]instanceof Array)for(var i=0;i<J.listeners[t].length;i++)J.listeners[t][i].call(J,e)},this.checkInvalidateSize=function(){var t=X.f(J.containers.main);!J.mapVisible&&t&&(J.map.invalidateSize(),void 0!==J.controls.minimap&&J.controls.minimap._miniMap.invalidateSize()),J.mapVisible=t},this.strToBounds=function(t){return 4!==(t=(t=t.replace(/[^0-9.,-]/g,"")).split(",")).length?null:(t.map(parseFloat),[[t[0],t[1]],[t[2],t[3]]])},this.boundsToStr=function(t){return[t.getSouth(),t.getWest(),t.getNorth(),t.getEast()].join(",")},this.checkJson=function(t){try{var e=JSON.parse(t);if(e&&"object"===l(e))return e}catch(t){}return!1},this.formatGpxValue=function(t,e,i){if(isNaN(t))return"N/A";var n,r,o="dist"===e?(n=1.609344,r=" km"," mi"):(n=.3048,r=" m"," ft"),a="imperial"===i||"imperial-metric"===i?(s=t*n,t):(s=t)/n,s=X.h(s,2)+r;switch(a=X.h(a,2)+o,i){case"imperial":return a;case"metric-imperial":return s+" ("+a+")";case"imperial-metric":return a+" ("+s+")";default:return s}},this.addLoading=function(t){if(!t.getElementsByClassName("mmp-loading-spinner").length){var e=document.createElement("div");e.className="mmp-loading-spinner";var i=document.createElement("div");i.className="rect-wrap",e.appendChild(i);for(var n=1;n<=5;n++){var r=document.createElement("div");r.className="rect"+n,i.appendChild(r)}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!==J.containers.mapModal&&J.containers.mapModal.remove(),J.containers.mapModal=Y.a.DomUtil.create("div","mmp-map-modal"),J.containers.mapModal.addEventListener("click",function(t){t.target===this&&this.remove()});var i=Y.a.DomUtil.create("div","mmp-map-modal-content",J.containers.mapModal),n=Y.a.DomUtil.create("span","mmp-map-modal-close",i);n.innerHTML="×",n.addEventListener("click",function(t){t.target===this&&J.containers.mapModal.remove()});
13var r=Y.a.DomUtil.create("div","mmp-map-modal-header",i);Y.a.DomUtil.create("p","mmp-map-modal-title",r).innerHTML=t;var o=Y.a.DomUtil.create("div","mmp-map-modal-body",i);"string"==typeof e?Y.a.DomUtil.create("p","mmp-map-modal-message",o).innerHTML=e:o.appendChild(e),J.containers.map.appendChild(J.containers.mapModal)},this.getDirectionsLink=function(t,e,i,n){var r=J.settings,o="";switch(t){case"googlemaps":o="https://www.google.com/maps?daddr="+(n||e+","+i),o+="&t="+r.directionsGoogleType,o+="&layer="+(r.directionsGoogleTraffic?"1":"0"),o+="&doflg="+r.directionsGoogleUnits,r.directionsGoogleAvoidHighways&&(o+="&dirflg=h"),r.directionsGoogleAvoidTolls&&(o+="&dirflg=t"),r.directionsGooglePublicTransport&&(o+="&dirflg=r"),r.directionsGoogleWalking&&(o+="&dirflg=w"),r.directionsGoogleLanguage&&(o+="&hl="+r.directionsGoogleLanguage),o+="&om="+(r.directionsGoogleOverview?"1":"0");break;case"yours":o="http://www.yournavigation.org/?tlat="+e+"&tlon="+i,o+="&v="+r.directionsYoursType,o+="&fast="+("fastest"===r.directionsYoursRoute?"1":"0"),o+="&layer="+r.directionsYoursLayer;break;case"ors":o="https://maps.openrouteservice.org/directions?a=null,null,"+e+","+i,o+="&b="+("Bicycle"===r.directionsOrsType?"1a":"Pedestrian"===r.directionsOrsType?"2":"HeavyVehicle"===r.directionsOrsType?"4a":"0"),o+="&c="+("Shortest"===r.directionsOrsRoute?"1":"Recommended"===r.directionsOrsRoute?"2":"0");break;case"bingmaps":o="https://www.bing.com/maps/default.aspx?v=2&rtp=pos___e_~pos."+e+"_"+i+(n?"_"+n:"")}return o},this.getApiLink=function(t,e,i){i=i||{};var n=J.settings,r=mmpVars.apiUrl;switch(!n.language||"geojson"!==t&&"kml"!==t&&"georss"!==t||(i.lang=n.language),t){case"editMap":r=mmpVars.adminUrl+"admin.php?page=mapsmarkerpro_map&id="+e;break;case"editMarker":r=mmpVars.adminUrl+"admin.php?page=mapsmarkerpro_marker&id="+e;break;case"fs":r+="fullscreen/"+e+"/";break;case"gpx":r=mmpVars.baseUrl+"index.php?mapsmarkerpro=download_gpx&url="+n.gpxUrl;break;case"geojson":r+="export/geojson/"+e+"/";break;case"kml":r+="export/kml/"+e+"/";break;case"georss":r+="export/georss/"+e+"/"}
13return Object.keys(i).length&&(r+="?",Object.keys(i).forEach(function(t){r+=t+"="+i[t]+"&"}),r=r.slice(0,-1)),r},this.addApiLink=function(t,e,i,n){var r=Y.a.DomUtil.create("a",null,n);r.href=t,r.rel="nofollow",r.target="_blank",r.title=e;var o=Y.a.DomUtil.create("img",null,r);o.src=mmpVars.pluginUrl+"images/icons/"+i,o.title=e,o.style.width=14,o.style.height=14},this.addShareLink=function(t,e){var i=Y.a.DomUtil.create("img","mmp-share-icon",e);i.src=mmpVars.pluginUrl+"images/icons/share.png",i.title=mmpL10n.api.share,i.addEventListener("click",function(){J.containers.main.scrollIntoView(),J.openShareModal(t)})},this.openShareModal=function(t){var e=J.settings,i=e.apiFullscreen&&"fs"===e.shareUrl?J.getApiLink("fs",J.id,{marker:t}):J.page+"?markerid="+t,n=Y.a.DomUtil.create("div",null);e.shareFacebook&&n.appendChild(J.getShareLink("facebook",i,e.shareText)),e.shareTwitter&&n.appendChild(J.getShareLink("twitter",i,e.shareText)),e.shareLinkedIn&&n.appendChild(J.getShareLink("linkedin",i,e.shareText)),e.shareWhatsApp&&n.appendChild(J.getShareLink("whatsapp",i,e.shareText)),e.shareEmail&&n.appendChild(J.getShareLink("email",i,e.shareText));var r=Y.a.DomUtil.create("div","mmp-share-modal-url",n),o=Y.a.DomUtil.create("input",null,r);o.setAttribute("type","text"),o.setAttribute("value",i),o.addEventListener("click",function(){this.select()}),J.showMapModal(mmpL10n.api.share,n)},this.getShareLink=function(t,e,i){e=encodeURIComponent(e),i=encodeURIComponent(i);var n=Y.a.DomUtil.create("a","mmp-share-button-link");n.setAttribute("target","_blank"),n.setAttribute("rel","noopener");var r=Y.a.DomUtil.create("div","mmp-share-button",n),o=Y.a.DomUtil.create("div","mmp-share-button-icon",r),a=Y.a.SVG.create("svg");a.setAttribute("viewBox","0 0 24 24"),o.appendChild(a);var s=Y.a.SVG.create("path");switch(a.appendChild(s),t){case"facebook":n.setAttribute("href","https://www.facebook.com/sharer.php?u="+e),Y.a.DomUtil.addClass(r,"mmp-share-button-facebook"),s.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":n.setAttribute("href","https://twitter.com/share?text="+i+"&url="+e+"&via=mapsmarker"),Y.a.DomUtil.addClass(r,"mmp-share-button-twitter"),s.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":n.setAttribute("href","https://www.linkedin.com/shareArticle?title="+i+"&url="+e),Y.a.DomUtil.addClass(r,"mmp-share-button-linkedin"),s.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":Y.a.Browser.mobile?n.setAttribute("href","whatsapp://send?text="+i+" "+e):n.setAttribute("href","https://api.whatsapp.com/send?text="+i+" "+e),Y.a.DomUtil.addClass(r,"mmp-share-button-whatsapp"),s.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?n.setAttribute("href","mailto:?subject="+i+"&body="+e):n.setAttribute("href","mailto:?body="+e),n.setAttribute("target","_self"),Y.a.DomUtil.addClass(r,"mmp-share-button-email"),s.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 n},this.checkPopupSize=function(t){var e=J.settings;J.containers.map.offsetWidth<e.popupMaxWidth?(t.options.minWidth=J.containers.map.offsetWidth-50,t.options.maxWidth=J.containers.map.offsetWidth-50):(t.options.minWidth=e.popupMinWidth,t.options.maxWidth=e.popupMaxWidth),J.containers.map.offsetHeight<e.popupMaxHeight?t.options.maxHeight=J.containers.map.offsetHeight-50:t.options.maxHeight=e.popupMaxHeight,t.update(
13)},this.loadPopup=function(s,l){return new Promise(function(t,e){var i,n,r,o,a=s.getPopup();void 0!==a?l||!a.getContent()?(i=Y.a.DomUtil.create("div","mmp-popup"),Y.a.DomUtil.create("img","mmp-popup-loading",i).src=mmpVars.pluginUrl+"images/paging-ajax-loader.gif",a.setContent(i),n="",s instanceof Y.a.Marker?n=J.getMarkerPopup(s):s instanceof Y.a.Path&&(n=J.getGeoJsonPopup(s)),r=n.getElementsByTagName("img"),o=Array.prototype.slice.call(r),Promise.all(o.map(J.imgLoaded)).then(function(){a.setContent(n),t(a)})):t(a):e()})},this.getMarkerPopup=function(t){var e,i,n,r,o,a,s=J.settings,l=Y.a.DomUtil.create("div","mmp-popup");return l.id="mmp-popup-"+t.id,s.popupMarkername&&t.name&&((e=Y.a.DomUtil.create("div","mmp-popup-name",l)).innerHTML=t.name,e.style.borderBottom="1px solid #f0f0e7"),t.popup&&(Y.a.DomUtil.create("div","mmp-popup-text",l).innerHTML=t.popup),(t.address&&s.popupAddress||s.popupCoordinates||s.popupDirections||s.popupShare)&&((i=Y.a.DomUtil.create("div","mmp-popup-location",l)).style.borderTop="1px solid #f0f0e7",s.popupShare&&(n=Y.a.DomUtil.create("i","mmp-popup-share",i),J.addShareLink(t.id,n)),t.address&&s.popupAddress&&(Y.a.DomUtil.create("span","mmp-popup-location-address",i).innerHTML+=t.address),s.popupCoordinates&&(r=Y.a.DomUtil.create("span","mmp-popup-location-coordinates",i),t.address&&s.popupAddress?r.innerHTML+=" ("+t.getLatLng().lat+", "+t.getLatLng().lng+")":r.innerHTML+=t.getLatLng().lat+", "+t.getLatLng().lng),s.popupDirections&&(o=Y.a.DomUtil.create("span","mmp-popup-location-directions",i),(t.address&&s.popupAddress||s.popupCoordinates)&&(o.innerHTML+=" "),(a=Y.a.DomUtil.create("a",null,o)).href=J.getDirectionsLink(s.directionsProvider,t.getLatLng().lat,t.getLatLng().lng,t.address),a.target="_blank",a.title=mmpL10n.api.dir,a.innerHTML="("+mmpL10n.popup.directions+")")),l},this.getGeoJsonPopup=function(t){var e,i=J.settings,n=Y.a.DomUtil.create("div","mmp-popup");return i.popupMarkername&&t.options.name&&((e=Y.a.DomUtil.create("div","mmp-popup-name",n)).innerHTML=t.options.name,e.style.borderBottom="1px solid #f0f0e7"),t.options.popup&&(Y.a.DomUtil.create("div","mmp-popup-text",n).innerHTML=t.options.popup),n},this.imgLoaded=function(e){return new Promise(function(t){e.addEventListener("load",t),e.addEventListener("error",t),e.loading&&"lazy"===e.loading&&(e.loading="eager")})},this.updatePopups=function(){var n=J.settings;Object.keys(J.markers).forEach(function(t){var e=J.markers[t],i=e.getPopup();void 0!==i&&(i.setContent(""),i.options.minWidth=n.popupMinWidth,i.options.maxWidth=n.popupMaxWidth,i.options.maxHeight=n.popupMaxHeight,i.isOpen()&&J.updatePopup(e))})},this.updatePopup=function(t,e){var i=J.settings,n=t.getPopup();!n&&t.popup?t.bindPopup("",J.popup):n&&!t.popup&&(t.closePopup(),t.unbindPopup()),J.loadPopup(t,e).then(function(t){J.checkPopupSize(t),i.popupCenterOnMap&&J.centerPopup(t)}).catch(function(){})},this.centerPopup=function(t){var e,i,n,r;t.isOpen()&&(e=t.getLatLng(),i=J.map.project(e),n=t._container.clientHeight,i.y-=n/2,r=J.map.unproject(i),J.map.panTo(r,{animate:!0}))},this.highlightMarker=function(t,e,i){var n;t.link?J.openLink(t.link,t.blank):(e&&J.containers.main.scrollIntoView(),n=function(t,e){var i;e?t.isPopupOpen()?J.updatePopup(t):t.openPopup():(i=t.getLatLng(),J.map.setView(i))},J.settings.clustering?J.markerGroup.zoomToShowLayer(t,function(){n(t,i)}):n(t,i))},this.openLink=function(t,e){var i="1"===e?"_blank":"_self";window.open(t,i)},this.editMarker=function(t){var e;void 0!==t.relatedTarget.id&&(e=J.getApiLink("editMarker",t.relatedTarget.id),J.openLink(e,"1"))},this.logError=function(t){console.error("[Maps Marker Pro] "+t)},this.xhr=function(r){return new Promise(function(t,e){var i,n=new XMLHttpRequest;n.open(r.type,r.url,!0),n.onload=function(){200===n.status?t(n.responseText):e(n.statusText)},r.data?(i=new FormData,Object.keys(r.data).forEach(function(t){i.append(t,r.data[t])}),n.send(i)):n.send(null)})},this.main=function(){(mapsMarkerPro[J.uid]=J).containers.main=document.getElementById("maps-marker-pro-"+J.uid),J.containers.main?J.lazy?"function"==typeof IntersectionObserver?new IntersectionObserver(J.lazyLoadHandler,{root:null,rootMargin:"0px",threshold:0}).observe(J.containers.main):J.lazyLoadHandlerFallback():J.load():"function"==typeof MutationObserver?new MutationObserver(J.deferredLoadHandler).observe(document.body,{childList:!0,subtree:!0,attributes:!1,characterData:!1}):J.logError("Unable to find map container")},this.load=function(){var t,e,i;J.addLoading(J.containers.main),"function"==typeof URL&&(t=new URL(window.location.href),e=parseInt(t.searchParams.get("marker")),isNaN(e)||(J.urlHighlight=e),i=parseInt(t.searchParams.get("markerid")),isNaN(i)||(J.urlHighlight=i));for(var n=document.getElementsByClassName("mmp-highlight"),r=0;r<n.length;r++){var o=n[r].dataset;o.uid&&o.uid!==J.uid||o.map&&o.map!==J.id||n[r].addEventListener("click",function(t){t.preventDefault(),t.stopPropagation();var e=this.dataset,i=e.marker||null,n=!e.scroll||"false"!==e.scroll,r=!e.open||"false"!==e.open;i&&void 0!==J.markers[i]&&J.highlightMarker(J.markers[i],n,r)})}for(r=0;r<mapsMarkerPro.callbacks.length;r++){var a=mapsMarkerPro.callbacks[r];"function"==typeof a&&a(J)}J.xhr({type:"POST",url:ajaxurl,data:{action:"mmp_map_settings",type:J.type,id:J.id,lang:J.language}}
13).then(function(t){if(!(t=JSON.parse(t)).success)return J.containers.main.innerHTML=t.response,void Y.a.DomUtil.addClass(J.containers.main,"mmp-map-error");var e=t.response;Object.keys(J.settings).forEach(function(t){e[t]=J.settings[t]}),(J.settings=e).callback&&"function"==typeof window[e.callback]&&window[e.callback](J),J.fire("settingsloaded",J.settings),J.init()}).catch(function(t){J.containers.main.innerHTML="Error: the map with ID "+J.id+" could not be loaded. Please contact the site owner.",Y.a.DomUtil.addClass(J.containers.main,"mmp-map-error"),J.logError("Error loading settings ("+t+")")})},this.init=function(){J.containers.mapWrap=document.getElementById("mmp-map-wrap-"+J.uid),J.containers.mapWrap||(J.containers.mapWrap=Y.a.DomUtil.create("div","mmp-map-wrap",J.containers.main),J.containers.mapWrap.id="mmp-map-wrap-"+J.uid),J.loadPanel(),J.loadMap(),J.loadChart(),J.loadList(),J.setLayout(),window.addEventListener("resize",J.setLayoutThrottled),"function"==typeof IntersectionObserver?new IntersectionObserver(J.visibilityDetectionHandler,{root:null,rootMargin:"0px",threshold:0}).observe(J.containers.main):J.visibilityDetectionHandlerFallback(),J.loadBasemaps(),J.loadOverlays(),J.loadResources()},this.setLayout=function(){var t=J.settings;if(J.fullscreen)return Y.a.DomUtil.removeClass(J.containers.main,"mmp-list-below"),Y.a.DomUtil.removeClass(J.containers.main,"mmp-list-right"),Y.a.DomUtil.removeClass(J.containers.main,"mmp-list-left"),Y.a.DomUtil.addClass(J.containers.main,"mmp-fullscreen"),void J.map.invalidateSize();Y.a.DomUtil.removeClass(J.containers.main,"mmp-fullscreen"),J.containers.main.style.width=t.width+t.widthUnit,J.containers.map.style.height=t.height+t.heightUnit,t.responsive&&"px"===t.widthUnit&&("100%"!==J.containers.main.style.width&&J.containers.main.parentNode.offsetWidth<t.width?J.containers.main.style.width="100%":"100%"===J.containers.main.style.width&&J.containers.main.parentNode.offsetWidth>t.width&&(J.containers.main.style.width=t.width+"px")),void 0!==J.containers.list&&(0<t.list?1===t.list||-1===J.containers.main.style.width.indexOf("px")&&J.containers.main.offsetWidth<t.listWidth+t.listBreakpoint?(Y.a.DomUtil.removeClass(J.containers.main,"mmp-list-right"),Y.a.DomUtil.removeClass(J.containers.main,"mmp-list-left"),Y.a.DomUtil.addClass(J.containers.main,"mmp-list-below")):(Y.a.DomUtil.removeClass(J.containers.main,"mmp-list-below"),2===t.list?(Y.a.DomUtil.removeClass(J.containers.main,"mmp-list-left"),Y.a.DomUtil.addClass(J.containers.main,"mmp-list-right")):3===t.list&&(Y.a.DomUtil.removeClass(J.containers.main,"mmp-list-right"),Y.a.DomUtil.addClass(J.containers.main,"mmp-list-left"))):(Y.a.DomUtil.removeClass(J.containers.main,"mmp-list-below"),Y.a.DomUtil.removeClass(J.containers.main,"mmp-list-right"),Y.a.DomUtil.removeClass(J.containers.main,"mmp-list-left"))),J.map.invalidateSize()},this.setLayoutThrottled=Y.a.Util.throttle(J.setLayout,200,this),this.loadPanel=function(){var t,e,i=J.settings;J.containers.panel=document.getElementById("mmp-panel-"+J.uid),i.panel?((t=Y.a.Dom
13Util.create("div","mmp-panel")).id="mmp-panel-"+J.uid,t.style.backgroundColor=i.panelColor,Y.a.DomUtil.create("div","mmp-panel-text",t).innerHTML=i.name,e=Y.a.DomUtil.create("div","mmp-panel-api",t),"map"===J.type&&(i.panelEdit&&J.addApiLink(J.getApiLink("editMap",J.id),mmpL10n.api.editMap,"map-edit.png",e),i.apiFullscreen&&i.panelFs&&J.addApiLink(J.getApiLink("fs",J.id),mmpL10n.api.fs,"fullscreen.png",e),i.panelGpx&&i.gpxUrl&&J.addApiLink(J.getApiLink("gpx",J.id),mmpL10n.gpx.metaDownload,"gpx.png",e),i.apiExport&&i.panelGeoJson&&J.addApiLink(J.getApiLink("geojson",J.id),mmpL10n.api.geoJson,"geojson.png",e),i.apiExport&&i.panelKml&&J.addApiLink(J.getApiLink("kml",J.id),mmpL10n.api.kml,"kml.png",e),i.apiExport&&i.panelGeoRss&&J.addApiLink(J.getApiLink("georss",J.id),mmpL10n.api.geoRss,"georss.png",e)),J.containers.panel?J.containers.panel.parentNode.replaceChild(t,J.containers.panel):J.containers.mapWrap.insertBefore(t,J.containers.map),J.containers.panel=t,J.fire("panelloaded",J.map)):J.containers.panel&&(J.containers.panel.remove(),J.containers.panel=null)},this.loadMap=function(){var t=J.settings;"function"==typeof J.map.remove&&J.map.remove(),J.map={};var e=Y.a.DomUtil.create("div","mmp-map");e.id="mmp-map-"+J.uid,e.style.height=t.height+t.heightUnit,J.containers.map=document.getElementById("mmp-map-"+J.uid),J.containers.map?J.containers.map.parentNode.replaceChild(e,J.containers.map):J.containers.mapWrap.insertBefore(e,J.containers.chartWrap),J.containers.map=e,J.map=Y.a.map(J.containers.map,{center:[t.lat,t.lng],zoom:t.zoom,minZoom:t.minZoom,maxZoom:t.maxZoom,zoomSnap:t.zoomStep,zoomDelta:t.zoomStep,maxBounds:J.strToBounds(t.maxBounds),maxBoundsViscosity:1,gestureHandling:!J.fullscreen&&t.gestureHandling,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:!1,zoomControl:!1,closePopupOnClick:t.popupAutoClose,contextmenu:!0}),J.map._activeTrack=0,J.fire("maploaded",J.map)},this.loadChart=function(){var t,e,i=J.settings;"function"==typeof J.gpxChart.destroy&&J.gpxChart.destroy(),J.gpxChart={},J.containers.chartWrap=document.getElementById("mmp-chart-wrap-"+J.uid),i.gpxUrl&&i.gpxChart?((t=Y.a.Dom
13Util.create("div","mmp-gpx-chart-wrap")).id="mmp-chart-wrap-"+J.uid,t.style.height=i.gpxChartHeight+"px",t.style.position="relative",t.style.minWidth=0,(e=Y.a.DomUtil.create("canvas","mmp-gpx-chart",t)).id="mmp-gpx-chart-"+J.uid,J.containers.chartWrap?J.containers.chartWrap.parentNode.replaceChild(t,J.containers.chartWrap):J.containers.mapWrap.appendChild(t),J.containers.chartWrap=t,J.containers.chart=e,J.fire("chartloaded",J.gpxChart)):J.containers.chartWrap&&(J.containers.chartWrap.remove(),J.containers.chartWrap=null,J.containers.chart=null)},this.loadList=function(){var t,e=J.settings;J.containers.list=document.getElementById("mmp-list-"+J.uid),"map"!==J.type&&"custom"!==J.type||J.fullscreen||!e.list?J.containers.list&&(J.containers.list.remove(),J.containers.list=null):((t=Y.a.DomUtil.create("div","mmp-list")).id="mmp-list-"+J.uid,t.style.flexBasis=e.listWidth+"px",J.containers.list?J.containers.list.parentNode.replaceChild(t,J.containers.list):J.containers.main.appendChild(t),J.containers.list=t)},this.loadBasemaps=function(){var n=J.settings;Object.keys(J.basemaps).forEach(function(t){J.map.removeLayer(J.basemaps[t])}),J.basemaps={},J.minimaps={},Object.keys(n.basemaps).forEach(function(t){if(void 0!==n.availableBasemaps[n.basemaps[t]]){var e,i=n.availableBasemaps[n.basemaps[t]];if(1==i.type)i.options.bounds&&"string"==typeof i.options.bounds&&(e=J.strToBounds(i.options.bounds),i.options.rasterTiles?i.options.bounds=[J.map.unproject(Y.a.point(e[0][1],e[0][0]),i.options.maxNativeZoom),J.map.unproject(Y.a.point(e[1][1],e[1][0]),i.options.maxNativeZoom)]:i.options.bounds=e),i.options.minZoom=n.minZoom,i.options.maxZoom=n.maxZoom,i.options.errorTileUrl=void 0===i.options.errorTiles&&n.errorTiles||i.options.errorTiles?n.errorTileUrl:null,i.options.edgeBufferTiles=n.basemapEdgeBufferTiles,i.wms?(J.basemaps[i.name]=Y.a.tileLayer.wms(i.url,i.options),J.minimaps[i.name]=Y.a.tileLayer.wms(i.url,i.options)):(J.basemaps[i.name]=Y.a.tileLayer(i.url,i.options),J.minimaps[i.name]=Y.a.tileLayer(i.url,i.options));else if(2==i.type&&n.googleApiKey)i.options.styles=n.basemapGoogleStyles,i.options.edgeBufferTiles=0,J.basemaps[i.name]=new Y.a.gridLayer.googleMutant(i.options),J.minimaps[i.name]=new Y.a.gridLayer.googleMutant(i.options);else if(3==i.type&&n.bingApiKey)i.options.bingMapsKey=n.bingApiKey,i.options.culture=n.basemapBingCulture,i.options.minZoom=n.minZoom,i.options.maxZoom=n.maxZoom,i.options.errorTileUrl=n.errorTiles?n.errorTileUrl:null,i.options.edgeBufferTiles=n.basemapEdgeBufferTiles,J.basemaps[i.name]=Y.a.tileLayer.bing(i.options),J.minimaps[i.name]=Y.a.tileLayer.bing(i.options);else if(4==i.type&&(n.hereApiKey||n.hereAppId&&n.hereAppCode))i.options.apiKey=n.hereApiKey,i.options.appId=n.hereAppId,i.options.appCode=n.hereAppCode,i.options.minZoom=n.minZoom,i.options.maxZoom=n.maxZoom,i.options.errorTileUrl=n.errorTiles?n.errorTileUrl:null,i.options.edgeBufferTiles=n.basemapEdgeBufferTiles,J.basemaps[i.name]=Y.a.tileLayer.here(i.options),J.minimaps[i.name]=Y.a.tileLayer.here(i.options);else if(5==i.type&&n.tomApiKey)i.options.apiKey=n.tomApiKey,i.options.minZoom=n.minZoom,i.options.maxZoom=n.maxZoom,i.options.errorTileUrl=n.errorTiles?n.errorTileUrl:null,i.options.edgeBufferTiles=n.basemapEdgeBufferTiles,J.basemaps[i.name]=Y.a.tileLayer.tomTom(i.options),J.minimaps[i.name]=Y.a.tileLayer.tomTom(i.options);
13else{if(6!=i.type)return;i.options.minZoom=n.minZoom,i.options.maxZoom=n.maxZoom,i.options.errorTileUrl=void 0===i.options.errorTiles&&n.errorTiles||i.options.errorTiles?n.errorTileUrl:null,i.options.edgeBufferTiles=n.basemapEdgeBufferTiles,i.labels?(J.basemaps[i.name]=Y.a.layerGroup([s.c(i.key,i.options),s.c(i.labels,i.options)]),J.minimaps[i.name]=Y.a.layerGroup([s.c(i.key,i.options),s.c(i.labels,i.options)])):(J.basemaps[i.name]=s.c(i.key,i.options),J.minimaps[i.name]=s.c(i.key,i.options))}}});var t,e=Object.keys(J.basemaps);void 0!==n.availableBasemaps[n.basemapDefault]?(t=n.availableBasemaps[n.basemapDefault].name,void 0!==J.basemaps[t]?J.basemaps[t].addTo(J.map):e.length&&J.basemaps[e[0]].addTo(J.map)):e.length&&J.basemaps[e[0]].addTo(J.map),J.fire("basemapsloaded",J.basemaps)},this.loadOverlays=function(){var n=J.settings;Object.keys(J.overlays).forEach(function(t){J.map.removeLayer(J.overlays[t])}),J.overlays={},Object.keys(n.overlays).forEach(function(t){var e,i;void 0!==n.availableOverlays[n.overlays[t]]&&((e=n.availableOverlays[n.overlays[t]]).options.bounds&&"string"==typeof e.options.bounds&&(i=J.strToBounds(e.options.bounds),e.options.rasterTiles?e.options.bounds=[J.map.unproject(Y.a.point(i[0][1],i[0][0]),e.options.maxNativeZoom),J.map.unproject(Y.a.point(i[1][1],i[1][0]),e.options.maxNativeZoom)]:e.options.bounds=i),e.options.minZoom=n.minZoom,e.options.maxZoom=n.maxZoom,e.options.errorTileUrl=void 0===e.options.errorTiles||e.options.errorTiles?n.errorTileUrl:null,e.options.edgeBufferTiles=n.basemapEdgeBufferTiles,e.wms?J.overlays[e.name]=Y.a.tileLayer.wms(e.url,e.options):J.overlays[e.name]=Y.a.tileLayer(e.url,e.options),-1!==n.overlaysActive.indexOf(n.overlays[t])&&J.overlays[e.name].addTo(J.map))}),J.fire("overlaysloaded",J.overlays)},this.loadResources=function(){var e=J.settings;return J.groups={},J.groups[J.id]={active:!0,markers:{}},Object.keys(e.filtersDetails).forEach(function(t){J.groups[t]={active:e.filtersDetails[t].active,markers:{}}}),Promise.all([J.getMarkers(),J.getGeoJson(),J.getGpx()]).then(function(t){J.removeLoading(J.containers.main),J.loadControls()}).catch(function(t){J.logError("Error loading map ("+t+")")})},this.drawMarkers=function(i){var t=J.settings;if("function"==typeof J.markerGroup.remove&&J.markerGroup.remove(),J.markerGroup={},t.clustering?J.markerGroup=Y.a.markerClusterGroup({showCoverageOnHover:t.showCoverageOnHover,disableClusteringAtZoom:t.disableClusteringAtZoom||null,maxClusterRadius:t.maxClusterRadius,singleMarkerMode:t.singleMarkerMode,spiderfyDistanceMultiplier:t.spiderfyDistanceMultiplier,chunkedLoading:!1}):J.markerGroup=Y.a.featureGroup(),J.markerGroup.addTo(J.map),i||(i=[],Object.keys(J.groups).forEach(function(e){J.groups[e].active&&Object.keys(J.groups[e].markers).forEach(function(t){i.push(J.groups[e].markers[t])})})),t.clustering)J.markerGroup.addLayers(i);else for(var e=0;e<i.length;e++)J.markerGroup.hasLayer(i[e])||J.markerGroup.addLayer(i[e])},this.getMarkers=function(){var e=[J.id];return Object.keys(J.settings.filtersDetails).forEach(function(t){e.push(t)}),J.xhr({type:"POST",url:ajaxurl,data:{action:"mmp_map_markers",type:J.type,id:e,custom:J.customMarkers,all:J.settings.filtersAllMarkers,lang:J.language}}).then(function(t){var e=JSON.parse(t);return J.addMarkers(e),!0}).catch(function(t){return J.logError("Error loading markers ("+t+")"),!1})},this.addMarkers=function(t){var e=J.settings;"function"==typeof J.markerGroup.remove&&J.markerGroup.remove(),J.markers={},J.markerGroup={},J.tooltip={direction:e.tooltipDirection,permanent:e.tooltipPermanent,sticky:e.tooltipSticky,opacity:e.tooltipOpacity},J.popup={minWidth:e.popupMinWidth,maxWidth:e.popupMaxWidth,maxHeight:e.popupMaxHeight,autoPan:!e.popupCenterOnMap,closeButton:e.popupCloseButton,autoClose:e.popupAutoClose};for(var i=0;i<t.length;i++){var n=t[i];if(J.markers[n.id]=Y.a.marker([n.lat,n.lng],{pmIgnore:!0,contextmenu:e.listEdit,contextmenuItems:[{text:mmpL10n.api.editMarker,icon:mmpVars.pluginUrl+"images/icons/map-edit.png",callback:J.editMarker}],icon:Y.a.icon({iconUrl:n.icon?mmpVars.iconsUrl+n.icon:mmpVars.pluginUrl+"images/leaflet/marker.png",iconSize:e.iconSize,iconAnchor:e.iconAnchor,popupAnchor:e.popupAnchor,shadowUrl:e.shadowUrl,shadowSize:e.shadowSize,shadowAnchor:e.shadowAnchor,className:"mmp-marker-icon mmp-marker-icon-"+n.id}),opacity:e.markerOpacity}),J.markers[n.id].id=n.id,J.markers[n.id].name=n.name,J.markers[n.id].address=n.address,J.markers[n.id].popup=n.popup,J.markers[n.id].link=n.link,J.markers[n.id].blank=n.blank,J.markers[n.id].icon=n.icon,J.markers[n.id].created=n.created,J.markers[n.id].updated=n.updated,J.markers[n.id].edit=n.edit,n.name&&(J.tooltips[n.id]=n.name,!e.tooltip||!e.tooltipPermanent&&Y.a.Browser.mobile||J.markers[n.id].bindTooltip(J.tooltips[n.id],J.tooltip)),n.link?(J.markers[n.id].on("click",function(){J.openLink(this.link,this.blank)}),J.markers[n.id].on("keypress",function(t){13==t.which&&J.openLink(this.link,this.blank)})):(n.popup||n.address&&e.popupAddress||e.popupCoordinates||e.popupDirections)&&J.markers[n.id].bindPopup("",J.popup),J.markers[n.id].on("popupopen",J.openPopupHandler),e.popupOpenOnHover?J.markers[n.id].on("mouseover",J.openOnHoverHandler):J.markers[n.id].off("mouseover",J.openOnHoverHandler),"map"!==J.type||e.filtersAllMarkers)J.groups[J.id].markers[n.id]=J.markers[n.id];else for(var r=0;r<n.maps.length;r++)void 0!==J.groups[n.maps[r]]&&(J.groups[n.maps[r]].markers[n.id]=J.markers[n.id])}J.drawMarkers(),"map"===J.type&&!J.fullscreen&&0<e.list?J.map.on("filterclick",J.updateListHandler):J.map.off("filterclick",J.updateListHandler),J.fire("markersloaded",J.markers)},this.getGeoJson=function(){var e=[J.id];return!J.settings.filtersAllMarkers&&J.settings.filtersGeoJson&&Object.keys(J.settings.filtersDetails).forEac
13h(function(t){e.push(t)}),J.xhr({type:"POST",url:ajaxurl,data:{action:"mmp_map_geojson",type:J.type,id:e,lang:J.language}}).then(function(t){var e=JSON.parse(t);return J.addGeoJson(e),!0}).catch(function(t){return J.logError("Error loading GeoJSON ("+t+")"),!1})},this.parseGeoJson=function(t){return Y.a.geoJSON(t,{pointToLayer:function(t,e){if(t.properties.radius)return Y.a.circle(e,t.properties.radius)},style:function(e){if(!e.properties)return{};var i={};return Object.keys(e.properties).forEach(function(t){switch(t){case"weight":i[t]=parseInt(e.properties[t]);break;case"opacity":case"fillOpacity":i[t]=parseFloat(e.properties[t]);break;default:i[t]=e.properties[t]}}),i},onEachFeature:function(t,e){e.options.popup&&e.bindPopup("",J.popup),e.on("popupopen",J.openPopupHandler)}})},this.addGeoJson=function(e){"function"==typeof J.geoJsonGroup.remove&&J.geoJsonGroup.remove(),J.geoJson={},J.geoJsonGroup={},J.geoJson[J.id]=Y.a.geoJSON(),e&&(Object.keys(e).forEach(function(t){void 0===e[t].features?J.geoJson[t]=Y.a.geoJSON():J.geoJson[t]=J.parseGeoJson(e[t])}),J.drawGeoJson(),J.fire("geojsonloaded",J.geoJson))},this.drawGeoJson=function(){"function"==typeof J.geoJsonGroup.remove&&J.geoJsonGroup.remove(),J.geoJsonGroup=Y.a.featureGroup(),J.geoJsonGroup.addTo(J.map),Object.keys(J.groups).forEach(function(t){J.groups[t].active&&void 0!==J.geoJson[t]&&J.geoJsonGroup.addLayer(J.geoJson[t])})},this.getList=function(e,n,i,r,o){var a=J.settings;if(!("map"!==J.type&&"custom"!==J.type||J.fullscreen)&&a.list){e=e||1,n=n||"",i=i||a.listOrderBy,r=r||a.listSortOrder,o=o||0;var s,l,u=[];if("distance"==i)if(void 0===J.controls.locate)i="distance"!==a.listOrderBy?a.listOrderBy:a.listOrderById?"id":a.listOrderByName?"name":a.listOrderByAddress?"address":a.listOrderByIcon?"icon":a.listOrderByCreated?"created":a.listOrderByUpdated?"updated":"id";else if(void 0===J.location.latlng)return J.map.once("locationfound",function(){J.getList(1,n,i,r,o)}),J.map.once("locationerror",function(){i="distance"!==a.listOrderBy?a.listOrderBy:a.listOrderById?"id":a.listOrderByName?"name":a.listOrderByAddress?"address":a.listOrderByIcon?"icon":a.listOrderByCreated?"created":a.listOrderByUpdated?"updated":"id","distance"===a.listOrderBy&&(a.listOrderBy=i),J.getList(1,n,i,r,o)}),void J.controls.locate.start();if(Object.keys(J.groups).forEach(function(i){J.groups[i].active&&Object.keys(J.groups[i].markers).forEach(function(t){var e=J.groups[i].markers[t];-1===u.indexOf(e)&&(!n||X.c(e.name,n)||X.c(e.address,n)||X.c(e.popup,n))&&(void 0!==J.location.latlng?(void 0===e.distance&&(s=J.location.latlng,l=e.getLatLng(),e.distance=Y.a.latLng(s).distanceTo(l)),void 0!==e.distance&&0<o?"imperial"==a.listDistanceUnit||"imperial-metric"==a.listDistanceUnit?e.distance/1609.344<=o&&u.push(e):e.distance/1e3<=o&&u.push(e):u.push(e)):u.push(e))})}),"id"==i?u=X.i(u,"id",r,!0):"name"==i?u=X.i(u,"name",r,!1):"address"==i?u=X.i(u,"address",r,!1):"distance"==i?u=X.i(u,"distance",r,!0):"icon"==i?u=X.i(u,"icon",r,!1):"created"===i?u=X.i(u,"created",r,!0):"updated"===i&&(u=X.i(u,"updated",r,!0)),J.containers.list.innerHTML="",a.listSearch){var t,h=Y.a.DomUtil.create("div","mmp-list-header",J.containers.list),c=Y.a.DomUtil.create("div","mmp-list-header-left",h),d=Y.a.DomUtil.create("div","mmp-list-search-wrap",c),p=Y.a.DomUtil.create("input","mmp-list-search",d);if(p.type="text",p.value=n,p.placeholder=mmpL10n.list.search,n&&((t=Y.a.Dom
13Util.create("div","mmp-list-search-clear",d)).src=mmpVars.pluginUrl+"images/leaflet/search.png",t.addEventListener("click",function(){J.getList(1,null,i,r,o)})),void 0!==J.location.latlng){for(var f=Y.a.DomUtil.create("select","mmp-list-radius",c),m=[0,5,10,15,20,25,50,100,200,500],g=0;g<m.length;g++){var v=Y.a.DomUtil.create("option",null,f);v.value=m[g],m[g]==o&&(v.defaultSelected=!0),m[g]<=0?v.innerHTML=mmpL10n.list.everywhere:"imperial"==a.listDistanceUnit?v.innerHTML=m[g]+" mi":"metric-imperial"==a.listDistanceUnit?v.innerHTML=m[g]+" km ("+(m[g]/1.609344).toFixed(a.listDistancePrecision)+" mi)":"imperial-metric"==a.listDistanceUnit?v.innerHTML=m[g]+" mi ("+(1.609344*m[g]).toFixed(a.listDistancePrecision)+" km)":v.innerHTML=m[g]+" km"}f.addEventListener("change",function(){J.getList(1,n,y.value,r,f.value)})}var _=Y.a.DomUtil.create("div","mmp-list-header-right",h),y=Y.a.DomUtil.create("select","mmp-list-sort",_),x=Y.a.DomUtil.create("a","mmp-list-order mmp-"+r,_);x.href="#";var b=[];for(a.listOrderById&&b.push("id"),a.listOrderByName&&b.push("name"),a.listOrderByAddress&&b.push("address"),a.listOrderByDistance&&void 0!==J.controls.locate&&b.push("distance"),a.listOrderByIcon&&b.push("icon"),a.listOrderByCreated&&b.push("created"),a.listOrderByUpdated&&b.push("updated"),g=0;g<b.length;g++){var w=Y.a.DomUtil.create("option",null,y);w.value=b[g],b[g]==i&&(w.defaultSelected=!0),w.innerHTML=mmpL10n.list[b[g]]}p.addEventListener("keyup",function(t){13==t.which&&J.getList(1,p.value,i,r,o)}),y.addEventListener("change",function(){J.getList(1,n,y.value,r,o)}),x.addEventListener("click",function(t){t.preventDefault(),t.stopPropagation(),J.getList(1,n,i,"asc"===r?"desc":"asc",o)})}J.containers.listBody=Y.a.DomUtil.create("div","mmp-list-body",J.containers.list);var k=u.length>a.listLimit?a.listLimit:u.length,L=Math.ceil(u.length/a.listLimit),M=(e=L<e?L:e)==L?u.length:k*e;for(g=(e-1)*k;g<M;g++){var C,T,P,S=Y.a.DomUtil.create("div","mmp-list-row",J.containers.listBody);a.listIcon&&(C=Y.a.DomUtil.create("div","mmp-list-row-icon",S),T=Y.a.DomUtil.create("div","mmp-list-icon",C),P=Y.a.DomUtil.create("img",null,T),u[g].icon?P.src=mmpVars.iconsUrl+u[g].icon:P.src=mmpVars.pluginUrl+"images/leaflet/marker.png");var A,I=Y.a.DomUtil.create("div","mmp-list-row-info",S),D=Y.a.DomUtil.create("div","mmp-list-row-header",I);a.listName&&((A=Y.a.DomUtil.create("div","mmp-list-name",D)).innerHTML=u[g].name,"none"!==a.listAction&&(A.tabIndex=0,function(e){var i="popup"===a.listAction;Y.a.DomEvent.on(A,"click",function(){J.highlightMarker(u[e],J.containers.main.getBoundingClientRect().top<0,i)}),Y.a.DomEvent.on(A,"keypress",function(t){13===t.which&&J.highlightMarker(u[e],J.containers.main.getBoundingClientRect().top<0,i)})}(g)));var O,z,E,B=Y.a.DomUtil.create("div","mmp-list-api",D);u[g].edit&&J.addApiLink(J.getApiLink("editMarker",u[g].id),mmpL10n.api.editMarker,"map-edit.png",B),a.listDir&&(z=J.getDirectionsLink(a.directionsProvider,u[g].getLatLng().lat,u[g].getLatLng().lng,u[g].address),"googlemaps"==a.directionsProvider?O=a.directionsGoogleWalking?"walk.png":"car.png":"yours"==a.directionsProvider?O="bicycle"==a.directionsYoursType?"bicycle.png":"foot"==a.directionsYoursType?"walk.png":"car.png":"ors"==a.directionsProvider?O="Bicycle"==a.directionsOrsType?"bicycle.png":"Pedestrian"==a.directionsOrsType?"walk.png":"car.png":"bingmaps"==a.directionsProvider&&(O="car.png"),J.addApiLink(z,mmpL10n.api.dir,O,B)),a.apiFullscreen&&a.listFs&&J.addApiLink(J.getApiLink("fs",J.id,{marker:u[g].id}),mmpL10n.api.fs,"fullscreen.png",B),a.listShare&&(E=Y.a.DomUtil.create("i","mmp-list-share",B),J.addShareLink(u[g].id,E));var F=Y.a.DomUtil.create("div","mmp-list-row-body",I);a.listPopup&&(Y.a.DomUtil.create("div","mmp-list-popup",F).innerHTML=u[g].popup);var R,N=Y.a.DomUtil.create("div","mmp-list-row-footer",I);a.listAddress&&u[g].address&&(Y.a.DomUtil.create("div","mmp-list-address",N).innerHTML=u[g].address),a.listDistance&&void 0!==u[g].distance&&(R=Y.a.DomUtil.create("div","mmp-list-distance",B),"imperial"==a.listDistanceUnit?R.innerHTML=(u[g].distance/1609.344).toFixed(a.listDistancePrecision)+" mi":"metric-imperial"==a.listDistanceUnit?R.innerHTML=(u[g].distance/1e3).toFixed(a.listDistancePrecision)+" km ("+(u[g].distance/1609.344).toFixed(a.listDistancePrecision)+" mi)":"imperial-metric"==a.listDistanceUnit?R.innerHTML=(u[g].distance/1609.344).toFixed(a.listDistancePrecision)+" mi ("+(u[g].distance/1e3).toFixed(a.listDistancePrecision)+" km)":R.innerHTML=(u[g].distance/1e3).toFixed(a.listDistancePrecision)+" km")}
13var U,Z,j,W,H,G,V,q=Y.a.DomUtil.create("div","mmp-list-footer",J.containers.list),K=Y.a.DomUtil.create("div","mmp-list-count",q);0===u.length?K.innerHTML=mmpL10n.list.noResults:1===u.length?K.innerHTML=mmpL10n.list.oneResult:K.innerHTML=u.length+" "+mmpL10n.list.results,u.length>a.listLimit&&(U=Y.a.DomUtil.create("div","mmp-list-nav",q),(Z=Y.a.DomUtil.create("button",null,U)).innerHTML="«",Z.addEventListener("click",function(){J.getList(1,n,i,r,o)}),(j=Y.a.DomUtil.create("button",null,U)).innerHTML="‹",j.addEventListener("click",function(){var t=1===e?1:e-1;J.getList(t,n,i,r,o)}),(W=Y.a.DomUtil.create("button",null,U)).innerHTML="›",W.addEventListener("click",function(){var t=e===L?L:e+1;J.getList(t,n,i,r,o)}),(H=Y.a.DomUtil.create("button",null,U)).innerHTML="»",H.addEventListener("click",function(){J.getList(L,n,i,r,o)}),G=Y.a.DomUtil.create("div","mmp-list-page",q),(V=Y.a.DomUtil.create("input",null,G)).type="text",V.value=e,G.appendChild(document.createTextNode(" / "+L)),G.addEventListener("keyup",function(t){13==t.which&&J.getList(Math.abs(parseInt(V.value)),n,i,r,o)})),J.drawMarkers(u)}},this.loadControls=function(){var e,t=J.settings;void 0!==J.controls.locate&&J.controls.locate.stop(),Object.keys(J.controls).forEach(function(t){J.controls[t].remove()}),J.controls={},J.controls.attribution=Y.a.control.attribution({position:t.attributionPosition,prefix:t.attributionPrefix}),J.controls.attribution._esriAttributionAdded=!0,"hidden"!=t.zoomControlPosition&&(J.controls.zoom=Y.a.control.zoom({position:t.zoomControlPosition,zoomInTitle:mmpL10n.control.zoomIn,zoomOutTitle:mmpL10n.control.zoomOut})),"hidden"!=t.fullscreenPosition&&(J.controls.fullscreen=Y.a.control.fullscreen({position:t.fullscreenPosition,title:{false:mmpL10n.control.fullscreenFalse,true:mmpL10n.control.fullscreenTrue}})),"hidden"!=t.resetPosition&&(J.controls.reset=Y.a.control.resetView({position:t.resetPosition,onDemand:t.resetOnDemand,title:mmpL10n.control.reset})),"hidden"!=t.locatePosition&&(J.controls.locate=Y.a.control.locate({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:t.locateIcon,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),J.showMapModal(mmpL10n.control.locateError,e)},onLocationOutsideMapBounds:function(t){t.stop(),J.showMapModal(mmpL10n.control.locateError,t.options.strings.outsideMapBoundsMsg)}})),"hidden"!=t.scalePosition&&(J.controls.scale=Y.a.control.scale({position:t.scalePosition,maxWidth:t.scaleMaxWidth,metric:t.scaleMetric,imperial:t.scaleImperial})),"hidden"!=t.layersPosition&&(Object.keys(J.basemaps).length||Object.keys(J.overlays).length)&&(J.controls.layers=Y.a.control.layers(null,null,{position:t.layersPosition,collapsed:"collapsed"==t.layersCollapsed||"collapsed-mobile"==t.layersCollapsed&&Y.a.Browser.mobile}),Object.keys(J.basemaps).forEach(function(t){J.controls.layers.addBaseLayer(J.basemaps[t],t)}),Object.keys(J.overlays).forEach(function(t){J.controls.layers.addOverlay(J.overlays[t],t)})),"hidden"!=t.filtersPosition&&"map"===J.type&&Object.keys(t.filtersDetails).length&&!t.filtersAllMarkers&&(J.controls.filters=Y.a.control.filters({mmp:J,position:t.filtersPosition,collapsed:"collapsed"==t.filtersCollapsed||"collapsed-mobile"==t.filtersCollapsed&&Y.a.Browser.mobile,buttons:t.filtersButtons,allText:mmpL10n.control.filtersAll,noneText:mmpL10n.control.filtersNone})),"hidden"!=t.gpxControlPosition&&void 0!==J.gpx.tracks&&1<J.gpx.tracks.length&&(J.controls.gpx=Y.a.control.gpx({mmp:J,collapsed:"collapsed"==t.gpxControlCollapsed||"collapsed-mobile"==t.gpxControlCollapsed&&Y.a.Browser.mobile,position:t.gpxControlPosition}
13)),"hidden"!=t.minimapPosition&&Object.keys(J.minimaps).length&&(e=Y.a.tileLayer(""),Object.keys(J.basemaps).forEach(function(t){J.map.hasLayer(J.basemaps[t])&&(e=J.minimaps[t])}),J.controls.minimap=new Y.a.Control.MiniMap(e,{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&&Y.a.Browser.mobile,strings:{hideText:mmpL10n.control.minimapHideText,showText:mmpL10n.control.minimapShowText},mapOptions:{attributionControl:!1}})),Object.keys(J.controls).forEach(function(t){J.controls[t].addTo(J.map)}),Object.keys(J.basemaps).forEach(function(t){var e=J.basemaps[t];J.map.hasLayer(e)&&(e instanceof Y.a.TileLayer.HERE?e._findCopyrightBBox():e instanceof Y.a.TileLayer.TomTom?e._addAttribution():e instanceof s.a&&s.b._updateMapAttribution({target:J.map}))}),t.attributionCondensed&&(Y.a.DomUtil.removeClass(J.controls.attribution.getContainer(),"leaflet-control-attribution"),Y.a.DomUtil.addClass(J.controls.attribution.getContainer(),"mmp-control-attribution")),void 0!==J.controls.minimap?J.map.on("baselayerchange",J.updateMinimapHandler):J.map.off("baselayerchange",J.updateMinimapHandler),void 0!==J.controls.locate?(J.map.on("locationfound",J.updateLocationHandler),J.map.once("locationfound",J.updateListHandler),!J.settings.locateAutostart||J.urlHighlight||J.highlight||J.controls.locate.start()):(J.map.off("locationfound",J.updateLocationHandler),J.map.off("locationfound",J.updateListHandler)),J.fire("controlsloaded",J.controls),setTimeout(function(){J.urlHighlight&&void 0!==J.markers[J.urlHighlight]?J.highlightMarker(J.markers[J.urlHighlight],!0,!0):J.highlight&&void 0!==J.markers[J.highlight]&&J.highlightMarker(J.markers[J.highlight],!1,!0)},100),J.getList()},this.getGpx=function(){var t=J.settings;return t.gpxUrl?J.xhr({type:"GET",url:t.gpxUrl}).then(function(t){if(J.gpx=new r,J.gpx.parse(t),!J.gpx.tracks.length){for(var e=0;e<J.gpx.routes.length;e++){var i=J.gpx.routes[e];i.segments=[{points:i.points,extensions:i.extensions,time:i.time,distance:i.distance,elevation:i.elevation}],J.gpx.tracks.push(i)}J.gpx.routes=[]}return J.addGpx(),!0}).catch(function(t){return J.logError("Error loading GPX ("+t+")"),!1}):Promise.resolve()},this.addGpx=function(){var t=J.settings;if(void 0!==J.gpxGroup&&"function"==typeof J.gpxGroup.remove&&J.gpxGroup.remove(),J.gpxGroup=Y.a.featureGroup(),J.gpxTracks={},void 0!==J.gpx.tracks&&J.gpx.tracks.length){for(var e=[],i=0;i<J.gpx.tracks.length;i++)for(var n=J.gpx.tracks[i],r=0;r<n.segments.length;r++){var o=n.segments[r];e[i]=Y.a.polyline([],{pmIgnore:!0,interactive:!0,smoothFactor:t.gpxTrackSmoothFactor,color:n.extensions.color||o.extensions.color||t.gpxTrackColor,weight:parseInt(n.extensions.weight||o.extensions.weight||t.gpxTrackWeight),opacity:parseFloat(n.extensions.opacity||o.extensions.opacity||t.gpxTrackOpacity)});for(var a=0;a<o.points.length;a++){var s=o.points[a].lat,l=o.points[a].lon;e[i].addLatLng([s,l])}e[i].addTo(J.gpxGroup)}J.gpxTracks=e}J.setTrackIcons(),J.setIntervalMarkers(),J.setTrackMeta(),J.setWaypoints(),J.gpxGroup.addTo(J.map),J.fire("gpxloaded",J.gpxTracks),J.loadChart(),J.addElevationChart()},this.getGpxName=function(t){return!(void 0===J.gpx.tracks[t]||!J.gpx.tracks[t].name)&&J.gpx.tracks[t].name},this.getGpxStartTime=function(t){return!(void 0===J.gpx.tracks[t]||!J.gpx.tracks[t].time.start)&&new Date(J.gpx.tracks[t].time.start).toUTCString()},this.getGpxEndTime=function(t){return!(void 0===J.gpx.tracks[t]||!J.gpx.tracks[t].time.end)&&new Date(J.gpx.tracks[t].time.end).toUTCString()},this.getGpxTimeTotal=function(t,e){return!(void 0===J.gpx.tracks[t]||!J.gpx.tracks[t].time.total)&&X.g(J.gpx.tracks[t].time.total,e)},this.getGpxTimeMoving=function(t,e){return!(void 0===J.gpx.tracks[t]||!J.gpx.tracks[t].time.moving)&&X.g(J.gpx.tracks[t].time.moving,e)},this.getGpxDistance=function(t,e){if(e=e||"metric",void 0===J.gpx.tracks[t]||!J.gpx.tracks[t].distance.total)return!1;switch(e){case"imperial":return(J.gpx.tracks[t].distance.total/1609.344).toFixed(2)+" mi";case"metric-imperial":return(J.gpx.tracks[t].distance.total/1e3).toFixed(2)+" km ("+(J.gpx.tracks[t].distance.total/1609.344).toFixed(2)+" mi)";case"imperial-metric":return(J.gpx.tracks[t].distance.total/1609.344).toFixed(2)+" mi ("+(J.gpx.tracks[t].distance.total/1e3).toFixed(2)+" km)";default:return(J.gpx.tracks[t].distance.total/1e3).toFixed(2)+" km"}}
13,this.getGpxPace=function(t,e,i){if(e=e||"metric",void 0===J.gpx.tracks[t]||!J.gpx.tracks[t].time.moving||!J.gpx.tracks[t].distance.total)return!1;switch(e){case"imperial":return X.g(J.gpx.tracks[t].time.moving/(J.gpx.tracks[t].distance.total/1609.344),i)+"/mi";case"metric-imperial":return X.g(J.gpx.tracks[t].time.moving/(J.gpx.tracks[t].distance.total/1e3),i)+"/km ("+X.g(J.gpx.tracks[t].time.moving/(J.gpx.tracks[t].distance.total/1609.344),i)+"/mi)";case"imperial-metric":return X.g(J.gpx.tracks[t].time.moving/(J.gpx.tracks[t].distance.total/1609.344),i)+"/mi ("+X.g(J.gpx.tracks[t].time.moving/(J.gpx.tracks[t].distance.total/1e3),i)+"/km)";default:return X.g(J.gpx.tracks[t].time.moving/(J.gpx.tracks[t].distance.total/1e3),i)+"/km"}},this.getGpxHeartRate=function(t){return!(void 0===J.gpx.tracks[t]||!J.gpx.tracks[t].heartRate.avg)&&J.gpx.tracks[t].heartRate.avg.toFixed(0)+" bpm"},this.getGpxElevation=function(t,e){if(e=e||"metric",void 0===J.gpx.tracks[t]||!J.gpx.tracks[t].elevation.gain&&!J.gpx.tracks[t].elevation.loss)return!1;var i=J.gpx.tracks[t].elevation.gain-J.gpx.tracks[t].elevation.loss;switch(e){case"imperial":return"+"+(J.gpx.tracks[t].elevation.gain/.3048).toFixed(0)+" ft -"+(J.gpx.tracks[t].elevation.loss/.3048).toFixed(0)+" ft Δ "+(i/.3048).toFixed(0)+" ft";case"metric-imperial":return"+"+J.gpx.tracks[t].elevation.gain.toFixed(0)+" m -"+J.gpx.tracks[t].elevation.loss.toFixed(0)+" m Δ "+i.toFixed(0)+" m (+"+(J.gpx.tracks[t].elevation.gain/.3048).toFixed(0)+" ft -"+(J.gpx.tracks[t].elevation.loss/.3048).toFixed(0)+" ft Δ "+(i/.3048).toFixed(0)+" ft)";case"imperial-metric":return"+"+(J.gpx.tracks[t].elevation.gain/.3048).toFixed(0)+" ft -"+(J.gpx.tracks[t].elevation.loss/.3048).toFixed(0)+" ft Δ "+(i/.3048).toFixed(0)+" ft (+"+J.gpx.tracks[t].elevation.gain.toFixed(0)+" m -"+J.gpx.tracks[t].elevation.loss.toFixed(0)+" m Δ "+i.toFixed(0)+" m)";default:return"+"+J.gpx.tracks[t].elevation.gain.toFixed(0)+" m -"+J.gpx.tracks[t].elevation.loss.toFixed(0)+" m Δ "+i.toFixed(0)+" m"}},this.setTrackStyle=function(){var e=J.settings;
13Object.keys(J.gpxTracks).forEach(function(t){J.gpxTracks[t].setStyle({color:e.gpxTrackColor,weight:e.gpxTrackWeight,opacity:e.gpxTrackOpacity})})},this.setTrackIcons=function(){var i=J.settings;void 0!==J.gpx.tracks&&Object.keys(J.gpx.tracks).forEach(function(t){var e;void 0!==J.gpx.tracks[t].startIcon&&J.gpx.tracks[t].startIcon&&J.gpx.tracks[t].startIcon.remove(),void 0!==J.gpx.tracks[t].endIcon&&J.gpx.tracks[t].endIcon&&J.gpx.tracks[t].endIcon.remove(),i.gpxShowStartIcon&&(J.gpx.tracks[t].startIcon=Y.a.marker([J.gpx.tracks[t].points[0].lat,J.gpx.tracks[t].points[0].lon],{pmIgnore:!0,interactive:!1,icon:Y.a.icon({iconUrl:i.gpxStartIcon?mmpVars.iconsUrl+i.gpxStartIcon:mmpVars.pluginUrl+"images/leaflet/gpx-start.png",iconSize:i.iconSize,iconAnchor:i.iconAnchor,popupAnchor:i.popupAnchor,shadowUrl:i.shadowUrl,shadowSize:i.shadowSize,shadowAnchor:i.shadowAnchor,className:"mmp-gpx-icon mmp-gpx-icon-start"})}).addTo(J.gpxGroup)),i.gpxShowEndIcon&&(e=J.gpx.tracks[t].points.length-1,J.gpx.tracks[t].endIcon=Y.a.marker([J.gpx.tracks[t].points[e].lat,J.gpx.tracks[t].points[e].lon],{pmIgnore:!0,interactive:!1,icon:Y.a.icon({iconUrl:i.gpxEndIcon?mmpVars.iconsUrl+i.gpxEndIcon:mmpVars.pluginUrl+"images/leaflet/gpx-end.png",iconSize:i.iconSize,iconAnchor:i.iconAnchor,popupAnchor:i.popupAnchor,shadowUrl:i.shadowUrl,shadowSize:i.shadowSize,shadowAnchor:i.shadowAnchor,className:"mmp-gpx-icon mmp-gpx-icon-end"})}).addTo(J.gpxGroup))})},this.setIntervalMarkers=function(){var t=J.settings;
13if(void 0!==J.gpx.tracks&&(Object.keys(J.gpx.tracks).forEach(function(t){if(void 0!==J.gpx.tracks[t].intervalMarkers&&J.gpx.tracks[t].intervalMarkers.length)for(var e=J.gpx.tracks[t].intervalMarkers,i=0;i<e.length;i++)e[i].remove()}),t.gpxIntervalMarkers))for(var e="imperial"===t.gpxMetaUnits||"imperial-metric"===t.gpxMetaUnits?1609.344:1e3,i=J.gpx.tracks,n=0;n<i.length;n++){i[n].intervalMarkers=[];for(var r=1,o=i[n].points,a=0;a<o.length;a++){var s,l=o[a];l.dist>=r*e&&(s=Y.a.marker([l.lat,l.lon],{pmIgnore:!0,interactive:!1,icon:Y.a.divIcon({className:"mmp-interval-marker",html:"<span>"+r+"</span>"})}).addTo(J.map),i[n].intervalMarkers.push(s),r++)}}},this.setTrackMeta=function(){var r=J.settings;Object.keys(J.gpxTracks).forEach(function(t){if(!r.gpxMeta)return J.gpxTracks[t].closePopup(),void J.gpxTracks[t].unbindPopup();for(var e=Y.a.DomUtil.create("div","mmp-gpx-meta"),i=[{show:r.gpxMetaName,title:mmpL10n.gpx.metaName,value:J.getGpxName(t)},{show:r.gpxMetaStart,title:mmpL10n.gpx.metaStart,value:J.getGpxStartTime(t)},{show:r.gpxMetaEnd,title:mmpL10n.gpx.metaEnd,value:J.getGpxEndTime(t)},{show:r.gpxMetaTotal,title:mmpL10n.gpx.metaTotal,value:J.getGpxTimeTotal(t)},{show:r.gpxMetaMoving,title:mmpL10n.gpx.metaMoving,value:J.getGpxTimeMoving(t)},{show:r.gpxMetaDistance,title:mmpL10n.gpx.metaDistance,value:J.getGpxDistance(t,r.gpxMetaUnits)},{show:r.gpxMetaPace,title:mmpL10n.gpx.metaPace,value:J.getGpxPace(t,r.gpxMetaUnits)},{show:r.gpxMetaHeartRate,title:mmpL10n.gpx.metaHeartRate,value:J.getGpxHeartRate(t)},{show:r.gpxMetaElevation,title:mmpL10n.gpx.metaElevation,value:J.getGpxElevation(t,r.gpxMetaUnits)}],n=0;n<i.length;n++)!i[n].show||r.gpxMetaHideMissing&&!1===i[n].value||(!1===i[n].value&&(i[n].value="N/A"),e.innerHTML+="<strong>"+i[n].title+":</strong> "+i[n].value+"<br />");r.gpxMetaDownload&&(e.innerHTML+='<a href="'+mmpVars.baseUrl+"index.php?mapsmarkerpro=download_gpx&url="+J.settings.gpxUrl+'"><img src="'+mmpVars.pluginUrl+'images/icons/download-gpx.png" /> '+mmpL10n.gpx.metaDownload+"</a><br />"),r.gpxMetaDesc&&J.gpx.tracks[t].desc&&(e.innerHTML&&(e.innerHTML+="<br />"),e.innerHTML+=J.gpx.tracks[t].desc),void 0!==J.gpxTracks[t].getPopup()&&J.gpxTracks[t].getPopup()?J.gpxTracks[t].setPopupContent(e):J.gpxTracks[t].bindPopup(e)})},this.setWaypoints=function(){for(var t=J.settings,e=0;e<J.gpxWaypoints.length;e++)J.gpxWaypoints[e].remove();if(J.gpxWaypoints=[],t.gpxWaypoints&&void 0!==J.gpx.waypoints)for(e=0;e<J.gpx.waypoints.length;e++){var i,n=Y.a.circleMarker([J.gpx.waypoints[e].lat,J.gpx.waypoints[e].lon],{interactive:!0,radius:t.gpxWaypointsRadius,stroke:t.gpxWaypointsStroke,color:t.gpxWaypointsColor,weight:t.gpxWaypointsWeight,fillColor:t.gpxWaypointsFillColor,fillOpacity:t.gpxWaypointsFillOpacity}).addTo(J.gpxGroup);J.gpx.waypoints[e].name&&n.bindTooltip(J.gpx.waypoints[e].name),J.gpx.waypoints[e].desc&&((i=Y.a.DomUtil.create("div","mmp-gpx-waypoint")).innerHTML=J.gpx.waypoints[e].desc,n.bindPopup(i)),J.gpxWaypoints.push(n)}},this.setWaypointStyle=function(){for(var t=J.settings,e=0;e<J.gpxWaypoints.length;e++)J.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 e,i="imperial"===J.settings.gpxChartUnits||"imperial-metric"===J.settings.gpxChartUnits?(e=1609.433,.3048):(e=1e3,1),n=isNaN(parseFloat(J.settings.gpxChartYOffset))?0:parseFloat(J.settings.gpxChartYOffset);return J.gpx.tracks[J.map._activeTrack].points.map(function(t){return{x:t.dist/e,y:t.ele/i+n}})},this.updateElevationChart=function(t){var e,i=J.settings;J.gpxChart instanceof u.a&&(t&&(e=J.generateChartData(),J.gpxChart.data.datasets[0].data=e,J.gpxChart.options.scales.xAxes[0].ticks.max=e[e.length-1].x),J.gpxChart.data.datasets[0].borderWidth=i.gpxChartLineWidth,J.gpxChart.data.datasets[0].borderColor=i.gpxChartLineColor,J.gpxChart.data.datasets[0].fill=i.gpxChartFill,J.gpxChart.data.datasets[0].backgroundColor=i.gpxChartFillColor,J.gpxChart.options.scales.yAxes[0].gridLines.color=i.gpxChartGridLinesColor,J.gpxChart.options.scales.yAxes[0].ticks.min=isNaN(parseInt(i.gpxChartYMin))?void 0:parseInt(i.gpxChartYMin),J.gpxChart.options.scales.yAxes[0].ticks.max=isNaN(parseInt(i.gpxChartYMax))?void 0:parseInt(i.gpxChartYMax),J.gpxChart.options.scales.yAxes[0].ticks.reverse=i.gpxChartReverseY,J.gpxChart.options.scales.yAxes[0].ticks.minor.fontColor=i.gpxChartTicksFontColor,J.gpxChart.options.scales.xAxes[0].gridLines.color=i.gpxChartGridLinesColor,J.gpxChart.options.scales.xAxes[0].ticks.reverse=i.gpxChartReverseX,J.gpxChart.options.scales.xAxes[0].ticks.minor.fontColor=i.gpxChartTicksFontColor,J.gpxChart.options.chartArea.backgroundColor=i.gpxChartBgColor,J.gpxChart.options.tooltips.backgroundColor=i.gpxChartTooltipBgColor,J.gpxChart.options.tooltips.bodyFontColor=i.gpxChartTooltipFontColor,J.gpxChart.options.indicator.lineWidth=i.gpxChartIndicatorLineWidth,J.gpxChart.options.indicator.lineColor=i.gpxChartIndicatorLineColor,J.gpxChart.update(
13))},this.updateElevationChartThrottled=Y.a.Util.throttle(J.updateElevationChart,100,this),this.addElevationChart=function(){var t,e,l=J.settings;J.settings.gpxChart&&void 0!==J.gpx.tracks&&J.gpx.tracks.length&&(void 0===J.containers.chartWrap&&J.loadChart(),t=J.generateChartData(),e=document.getElementById("mmp-gpx-chart-"+J.uid).getContext("2d"),u.a.platform.disableCSSInjection=!0,u.a.defaults.scatterIndicator=u.a.defaults.scatter,u.a.controllers.scatterIndicator=u.a.controllers.scatter.extend({draw:function(t){var e,i,n,r,o,a,s;u.a.controllers.scatter.prototype.draw.call(this,t),this.chart.tooltip._active&&this.chart.tooltip._active.length&&void 0!==this.chart.scales["y-axis-1"]?(e=this.chart.ctx,i=J.map._activeTrack,r=(n=this.chart.tooltip._active[0])._index,o=n.tooltipPosition().x,a=this.chart.scales["y-axis-1"].top,s=this.chart.scales["y-axis-1"].bottom,this.chart.config.options.indicator&&this.chart.config.options.indicator.lineWidth&&this.chart.config.options.indicator.lineColor&&(e.save(),e.beginPath(),e.moveTo(o,a),e.lineTo(o,s),e.lineWidth=this.chart.config.options.indicator.lineWidth,e.strokeStyle=this.chart.config.options.indicator.lineColor,e.stroke(),e.restore()),l.gpxChartLocator&&void 0!==J.chartLayers.locator&&(J.chartLayers.locator.setLatLng([J.gpx.tracks[i].points[r].lat,J.gpx.tracks[i].points[r].lon]),J.map.hasLayer(J.chartLayers.locator)||J.chartLayers.locator.addTo(J.map))):void 0!==J.chartLayers.locator&&J.map.hasLayer(J.chartLayers.locator)&&J.chartLayers.locator.remove()}}),J.gpxChart=new u.a(e,{plugins:[{beforeDraw:function(t){var e,i;t.config.options.chartArea&&t.config.options.chartArea.backgroundColor&&(e=t.chart.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){var e,i,n;t.data.datasets[0].data.filter(function(t){return!isNaN(t.y)}).length||(e=t.chart.ctx,i=t.chart.width,n=t.chart.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,n/2),e.restore())}}],type:"scatterIndicator",data:{datasets:[{data:t,pointRadius:0,showLine:!0,spanGaps:!0,borderCapStyle:"round",borderWidth:l.gpxChartLineWidth,borderColor:l.gpxChartLineColor,fill:l.gpxChartFill,backgroundColor:l.gpxChartFillColor}]},options:{responsive:!0,maintainAspectRatio:!1,animation:{duration:0},layout:{padding:{top:10}},scales:{yAxes:[{gridLines:{color:l.gpxChartGridLinesColor},ticks:{callback:function(t){return J.formatGpxValue(t,"ele",l.gpxChartUnits)},min:isNaN(parseInt(l.gpxChartYMin))?void 0:parseInt(l.gpxChartYMin),max:isNaN(parseInt(l.gpxChartYMax))?void 0:parseInt(l.gpxChartYMax),reverse:l.gpxChartReverseY,fontColor:l.gpxChartTicksFontColor}}],xAxes:[{afterBuildTicks:function(t){var e=t.ticks.length;2<e&&(t.ticks[e-2]=null)},gridLines:{color:l.gpxChartGridLinesColor},ticks:{callback:function(t){if(null!==t)return J.formatGpxValue(t,"dist",l.gpxChartUnits)},min:0,max:t[t.length-1].x,reverse:l.gpxChartReverseX,autoSkip:!1,fontColor:l.gpxChartTicksFontColor}}]},legend:{display:!1},chartArea:{backgroundColor:l.gpxChartBgColor},tooltips:{callbacks:{label:function(t,e){var i=t.datasetIndex,n=t.index,r=e.datasets[i].data[n].y,o=e.datasets[i].data[n].x;return[mmpL10n.gpx.metaElevation+": "+J.formatGpxValue(r,"ele",l.gpxChartUnits),mmpL10n.gpx.metaDistance+": "+J.formatGpxValue(o,"dist",l.gpxChartUnits)]}},mode:"index",intersect:!1,displayColors:!1,backgroundColor:l.gpxChartTooltipBgColor,bodyFontColor:l.gpxChartTooltipFontColor},indicator:{lineWidth:l.gpxChartIndicatorLineWidth,lineColor:l.gpxChartIndicatorLineColor},hover:{animationDuration:250}}}),void 0!==J.chartLayers&&Object.keys(J.chartLayers).forEach(function(t){J.chartLayers[t].remove()}),J.chartLayers={},J.chartLayers.locator=Y.a.circleMarker([0,0]),J.setChartStyle())},this.setChartStyle=function(){var t=J.settings;t.gpxChart&&void 0!==J.chartLayers&&(Object.keys(J.chartLayers).forEach(function(t){J.chartLayers[t].remove()}),J.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(){var t=J.markerGroup.getBounds();t.isValid()&&J.map.fitBounds(t)},this.fitGeoJson=function(t){var e,i=J.geoJson.getLayer(t);void 0===i||(e=i.getBounds()).isValid()&&J.map.fitBounds(e)},this.deferredLoadHandler=function(t,i){t.forEach(function(t){if("childList"===t.type&&t.addedNodes.length)for(var e=0;e<t.addedNodes.length;
13e++){if(t.addedNodes[e].id==="maps-marker-pro-"+J.uid)return i.disconnect(),void J.main()}})},this.lazyLoadHandler=function(t,e){for(var i=0;i<t.length;i++){var n=t[i];n.target===J.containers.main&&n.isIntersecting&&(e.disconnect(),J.load())}},this.lazyLoadHandlerFallback=function(){if(!X.f(J.containers.main)||!X.e(J.containers.main))return setTimeout(J.lazyLoadHandlerFallback,250);J.load()},this.visibilityDetectionHandler=function(t,e){for(var i=0;i<t.length;i++){t[i].target===J.containers.main&&J.checkInvalidateSize()}},this.visibilityDetectionHandlerFallback=function(){J.checkInvalidateSize(),setTimeout(J.visibilityDetectionHandlerFallback,250)},this.openPopupHandler=function(t){var e=J.settings,i=t.target.getPopup();void 0!==i&&J.loadPopup(t.target).then(function(){J.checkPopupSize(i),e.popupCenterOnMap&&J.centerPopup(i),J.fire("popupopen",i)}).catch(function(){})},this.openOnHoverHandler=function(t){t.target.openPopup()},this.updateListHandler=function(){J.getList()},this.updateMinimapHandler=function(t){J.controls.minimap.changeLayer(J.minimaps[t.name])},this.updateLocationHandler=function(t){J.location=t},this.main()}},function(t,e){!function(){"use strict";function e(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))}var a=Symbol("newer"),s=Symbol("older");function l(t,e){this.key=t,this.value=e,this[a]=void 0,this[s]=void 0}function t(t){this.entry=t}function i(t){this.entry=t}function n(t){this.entry=t}e.prototype._markEntryAsUsed=function(t){t!==this.newest&&(t[a]&&(t===this.oldest&&(this.oldest=t[a]),t[a][s]=t[s]),t[s]&&(t[s][a]=t[a]),t[a]=void 0,t[s]=this.newest,this.newest&&(this.newest[a]=t),this.newest=t)},e.prototype.assign=function(t){var e,i=this.limit||Number.MAX_VALUE;this._keymap.clear();for(var n=t[Symbol.iterator](),r=n.next();!r.done;r=n.next()){var o=new l(r.value[0],r.value[1]);if(this._keymap.set(o.key,o),e?(e[a]=o)[s]=e:this.oldest=o,e=o,0==i--)throw new Error("overflow")}this.newest=e,this.size=this._keymap.size},e.prototype.get=function(t){var e=this._keymap.get(t);if(e)return this._markEntryAsUsed(e),e.value},e.prototype.set=function(t,e){var i=this._keymap.get(t);return i?(i.value=e,this._markEntryAsUsed(i)):(this._keymap.set(t,i=new l(t,e)),this.newest?(this.newest[a]=i)[s]=this.newest:this.oldest=i,this.newest=i,++this.size,this.size>this.limit&&this.shift()),this},e.prototype.shift=function(){var t=this.oldest;if(t)return this.oldest[a]?(this.oldest=this.oldest[a],this.oldest[s]=void 0):(this.oldest=void 0,this.newest=void 0),t[a]=t[s]=void 0,this._keymap.delete(t.key),--this.size,[t.key,t.value]},e.prototype.find=function(t){var e=this._keymap.get(t);return e?e.value:void 0},e.prototype.has=function(t){return this._keymap.has(t)},e.prototype.delete=function(t){var e=this._keymap.get(t);if(e)return this._keymap.delete(e.key),e[a]&&e[s]?(e[s][a]=e[a],e[a][s]=e[s]):e[a]?(e[a][s]=void 0,this.oldest=e[a]):e[s]?(e[s][a]=void 0,this.newest=e[s]):this.oldest=this.newest=void 0,this.size--,e.value},e.prototype.clear=function(){this.oldest=this.newest=void 0,this.size=0,this._keymap.clear()},e.prototype.keys=function(){return new i(this.oldest)},e.prototype.values=function(){return new n(this.oldest)},e.prototype.entries=function(){return this},e.prototype[Symbol.iterator]=function(){return new t(this.oldest)},e.prototype.forEach=function(t,e){"object"!=typeof e&&(e=this);for(var i=this.oldest;i;)t.call(e,i.value,i.key,this),i=i[a]},e.prototype.toJSON=function(){for(var t=new Array(this.size),e=0,i=this.oldest;i;)t[e++]={key:i.key,value:i.value},i=i[a];return t},e.prototype.toString=function(){for(var t="",e=this.oldest;e;)t+=String(e.key)+":"+e.value,(e=e[a])&&(t+=" < ");return t},t.prototype[Symbol.iterator]=function(){return this},t.prototype.next=function(){var t=this.entry;return t?(this.entry=t[a],{done:!1,value:[t.key,t.value]}):{done:!0,value:void 0}},i.prototype[Symbol.iterator]=function(){return this},i.prototype.next=function(){var t=this.entry;return t?(this.entry=t[a],{done:!1,value:t.key}):{done:!0,value:void 0}},n.prototype[Symbol.iterator]=function(){return this},n.prototype.next=function(){var t=this.entry;return t?(this.entry=t[a],{done:!1,value:t.value}):{done:!0,value:void 0}};var r=new Promise(function(t,e){var i=0,n=null,n=setInterval(function(){return 20<=i?(clearInterval(n),e(new Error("window.google not found after 10 seconds"))):window.google&&window.google.maps&&window.google.maps.Map?(clearInterval(n),t(window.google)):void++i},500)});L.GridLayer.GoogleMutant=L.GridLayer.extend({options:{minZoom:0,maxZoom:21,tileSize:256,subdomains:"abc",errorTileUrl:"",attribution:"",opacity:1,continuousWorld:!1,noWrap:!1,type:"roadmap",maxNativeZoom:21},initialize:function(t){L.GridLayer.prototype.initialize.call(this,t),this._isMounted=!0,this.once("spawned",function(){if(this._subLayers)for(var t in this._subLayers)this._subLayers[t].setMap(this._mutant)}),this._tileCallbacks={},this._lru=new e(100),this._imagesPerTile="hybrid"===this.options.type?2:1,this._boundOnMutatedImage=this._onMutatedImage.bind(this)},onAdd:function(e){var i=this;L.GridLayer.prototype.onAdd.call(this,e),this._initMutantContainer(),this._logoContainer&&e._controlCorners.bottomleft.appendChild(this._logoContainer),this._attributionContainer&&e._controlCorners.bottomright.appendChild(this._attributionContainer),r.then(function(){var t;i._isMounted&&(i._ready=!0,i._initMutant(),(e=i._map)&&(t=i.options.updateWhenIdle?"moveend":"move",e.on(t,i._update,i),i.once("remove",function(){this._map.off(t,this._update,this)}),google.maps.event.addListenerOnce(i._mutant,"idle",function(){i._map&&(i._checkZoomLevels(),i._mutantIsReady=!0)}),i._update()))})},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),google.maps.event.clearListeners(t,"idle"),this._mutant&&google.maps.event.clearListeners(this._mutant,"idle"),t.off("move moveend",this._update,this),this._isMounted=!1},addGoogleLayer:function(e,i){var n=this;return this._subLayers||(this._subLayers={}),r.then(function(){var t=new google.maps[e](i);n._mutant&&t.setMap(n._mutant),n._subLayers[e]=t}),this},removeGoogleLayer:function(e){var i=this;return r.then(function(){var t=i._subLayers&&i._subLayers[e];t&&(t.setMap(null),delete i._subLayers[e])}),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.zIndex=800,this._mutantContainer.style.pointerEvents="none",L.DomEvent.off(this._mutantContainer)),this._map.getContainer().appendChild(this._mutantContainer),this.setOpacity(this.options.opacity);var t=this._mutantContainer.style;this.options.zoomSnap<1?(t.width="150%",t.height="150%"):(t.width="100%",t.height="100%"),t.zIndex=-1,this._attachObserver(this._mutantContainer)},_initMutant:function(){var t,i=this;this._mutant||(t=new google.maps.Map(this._mutantContainer,{center:{lat:0,lng:0},zoom:0,tilt:0,mapTypeId:this.options.type,disableDefaultUI:!0,keyboardShortcuts:!1,draggable:!1,disableDoubleClickZoom:!0,scrollwheel:!1,streetViewControl:!1,styles:this.options.styles||{},backgroundColor:"transparent"}),this._mutant=t,google.maps.event.addListenerOnce(t,"idle",function(){for(var t=i._mutantContainer.querySelectorAll("a"),e=0;e<t.length;++e)t[e].style.pointerEvents="auto"}),this.fire("spawned",{mapObject:t}))},_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)},_onMutations:function(t){for(var e=0;e<t.length;++e)for(var i=t[e],n=0;n<i.addedNodes.length;++n){var r,o=i.addedNodes[n];
13o instanceof HTMLImageElement?this._onMutatedImage(o):o instanceof HTMLElement&&(Array.prototype.forEach.call(o.querySelectorAll("img"),this._boundOnMutatedImage),"white"===o.style.backgroundColor&&L.DomUtil.remove(o),0===o.textContent.indexOf("For development purposes only")&&L.DomUtil.remove(o),Array.prototype.forEach.call(o.querySelectorAll('div[draggable=false][style*="text-align: center"]'),L.DomUtil.remove),(0<o.querySelectorAll(".gmnoprint").length||0<o.querySelectorAll('a[title="Click to see this area on Google Maps"]').length)&&(r=this._attributionContainer=L.DomUtil.create("div","leaflet-control leaflet-control-attribution"),L.DomEvent.disableClickPropagation(r),r.style.height="14px",this._map._controlCorners.bottomright.appendChild(r),r.appendChild(o)),1e6==o.style.zIndex&&(this._map._controlCorners.bottomleft.appendChild(o),this._logoContainer=o))}},_roadRegexp:/!1i(\d+)!2i(\d+)!3i(\d+)!/,_satRegexp:/x=(\d+)&y=(\d+)&z=(\d+)/,_staticRegExp:/StaticMapService\.GetMapImage/,_onMutatedImage:function(e){var t,i,n,r=e.src.match(this._roadRegexp),o=0;r?(t={z:r[1],x:r[2],y:r[3]},1<this._imagesPerTile&&(o=e.style.zIndex=1)):((r=e.src.match(this._satRegexp))&&(t={x:r[1],y:r[2],z:r[3]}),o=0),t?(i=this._tileCoordsToKey(t),e.style.position="absolute",e.style.visibility="hidden",n=i+"/"+o,this._lru.set(n,e),n in this._tileCallbacks&&this._tileCallbacks[n]&&(this._tileCallbacks[n].forEach(function(t){return t(e)}),delete this._tileCallbacks[n])):e.src.match(this._staticRegExp)&&(e.style.visibility="hidden")},createTile:function(t,i){var e=this._tileCoordsToKey(t),n=L.DomUtil.create("div");n.style.textAlign="left",n.dataset.pending=this._imagesPerTile,i=i.bind(this,null,n);for(var r=0;r<this._imagesPerTile;++r){var o=e+"/"+r,a=this._lru.get(o);a?(n.appendChild(this._clone(a)),--n.dataset.pending):(this._tileCallbacks[o]=this._tileCallbacks[o]||[],this._tileCallbacks[o].push(function(e){return function(t){e.appendChild(this._clone(t)),--e.dataset.pending,parseInt(e.dataset.pending)||i()}.bind(this)}.bind(this)(n)))}return parseInt(n.dataset.pending)||L.Util.requestAnimFrame(i),n},_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(){var t,e,i,n;this._mutant&&(t=this._map.getCenter(),e=new google.maps.LatLng(t.lat,t.lng),i=Math.round(this._map.getZoom()),n=this._mutant.getZoom(),this._mutant.setCenter(e),i!==n&&(this._mutant.setZoom(i),this._mutantIsReady&&this._checkZoomLevels())),L.GridLayer.prototype._update.call(this)},_resize:function(){var t=this.options.zoomSnap<1?1.5:1,e=this._map.getSize().multiplyBy(t);this._mutantContainer.style.width===e.x&&this._mutantContainer.style.height===e.y||(this.setElementSize(this._mutantContainer,e),this._mutant&&google.maps.event.trigger(this._mutant,"resize"))},_handleZoomAnim:function(){var t,e;this._mutant&&(t=this._map.getCenter(),e=new google.maps.LatLng(t.lat,t.lng),this._mutant.setCenter(e),this._mutant.setZoom(Math.round(this._map.getZoom())))}}),L.gridLayer.googleMutant=function(t){return new L.GridLayer.GoogleMutant(t)}}()},function(t,e,i){var n=i(0),r=i(17),o=i(18);var a=["Aerial","AerialWithLabels","AerialWithLabelsOnDemand","Road","RoadOnDemand","CanvasLight","CanvasDark","CanvasGray","OrdnanceSurvey"],s=["AerialWithLabelsOnDemand","RoadOnDemand"];n.TileLayer.Bing=n.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
13st supply options.BingMapsKey");if(t=n.setOptions(this,t),a.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&&s.indexOf(t.imagerySet)<0&&console.warn("Dynamic styles will only work with these imagerySet choices: "+s.join(", "));var e=n.Util.template(n.TileLayer.Bing.METADATA_URL,{bingMapsKey:this.options.bingMapsKey,imagerySet:this.options.imagerySet,culture:this.options.culture});this._imageryProviders=[],this._attributions=[],this._fetch=r(e,{jsonpCallback:"jsonp"}).then(function(t){return t.json()}).then(this._metaDataOnLoad.bind(this)).catch(console.error.bind(console)),n.Browser.android||this.on("tileunload",this._onTileRemove)},createTile:function(t,e){var i=document.createElement("img");return n.DomEvent.on(i,"load",n.bind(this._tileOnLoad,this,e,i)),n.DomEvent.on(i,"error",n.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 n="",r=i;0<r;r--){var o=0,a=1<<r-1;0!=(t&a)&&o++,0!=(e&a)&&(o+=2),n+=o.toString()}return n}(t.x,t.y,t.z),i=n.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(e){e.on("moveend",this._updateAttribution,this),n.TileLayer.prototype.onAdd.call(this,e),this._attributions.forEach(function(t){e.attributionControl.addAttribution(t)})},onRemove:function(e){e.off("moveend",this._updateAttribution,this),this._attributions.forEach(function(t){e.attributionControl.removeAttribution(t)}),n.TileLayer.prototype.onRemove.call(this,e)},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=n.Util.template(n.TileLayer.Bing.POINT_METADATA_URL,{bingMapsKey:this.options.bingMapsKey,imagerySet:this.options.imagerySet,z:e,lat:t.lat,lng:t.lng});return r(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,n,e,i,r=this._map;r&&r.attributionControl&&(t=r.getZoom(),e=r.getBounds().toBBoxString(),n=[(i=e.split(","))[1],i[0],i[3],i[2]],this._fetch.then(function(){var e=this._getAttributions(n,t),i=this._attributions;e.forEach(function(t){-1<i.indexOf(t)||r.attributionControl.addAttribution(t)}),i.filter(function(t){-1<e.indexOf(t)||r.attributionControl.removeAttribution(t)}),this._attributions=e}.bind(this)))},_getAttributions:function(n,r){return this._imageryProviders.reduce(function(t,e){for(var i=0;i<e.coverageAreas.length;i++)if(o(n,e.coverageAreas[i].bbox)&&r>=e.coverageAreas[i].zoomMin&&r<=e.coverageAreas[i].zoomMax)return t.push(e.attribution),t;return t},[])}}),n.tileLayer.bing=function(t){return new n.TileLayer.Bing(t)},t.exports=n.TileLayer.Bing},function(t,e,i){"use strict";var n=i(0),s=i.n(n);s.a.TileLayer.HERE=s.a.TileLayer.extend({options:{subdomains:"1234",minZoom:2,maxZoom:18,scheme:"normal.day",resource:"maptile",mapId:"newest",format:"png8",apiKey:"",appId:"",appCode:""},initialize:function(t){var e,i,n,r=(t=s.a.setOptions(this,t)).scheme.split(".")[0];t.tileResolution=256,s.a.Browser.retina&&(t.tileResolution=512),n=t.apiKey?(e=".maps.ls.hereapi.com",i="/{resource}/2.1/{resource}/{mapId}/{scheme}/{z}/{x}/{y}/{tileResolution}/{format}?apiKey={apiKey}","/maptile/2.1/copyright/{mapId}?apiKey={apiKey}"):(e=".maps.api.here.com",i="/{resource}/2.1/{resource}/{mapId}/{scheme}/{z}/{x}/{y}/{tileResolution}
13/{format}?app_id={appId}&app_code={appCode}","/maptile/2.1/copyright/{mapId}?app_id={appId}&app_code={appCode}");var o="satellite"!=r&&"terrain"!=r&&"hybrid"!=r?"base":"aerial";-1!==t.scheme.indexOf(".traffic.")&&(o="traffic");var a="https://{s}."+o+e+i;this._attributionUrl=s.a.Util.template("https://1."+o+e+n,this.options),s.a.TileLayer.prototype.initialize.call(this,a,t),this._attributionText=""},onAdd:function(t){s.a.TileLayer.prototype.onAdd.call(this,t),this._attributionText="",this._attributionBBoxes||this._fetchAttributionBBoxes()},onRemove:function(t){s.a.TileLayer.prototype.onRemove.call(this,t),void 0!==this._map.attributionControl&&this._map.attributionControl.removeAttribution(this._attributionText),this._map.off("moveend zoomend resetview",this._findCopyrightBBox,this)},_fetchAttributionBBoxes:function(){var t=new XMLHttpRequest;t.onreadystatechange=s.a.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){if(this._map){for(var e=t[this.options.scheme.split(".")[0]]||t.normal,i=0;i<e.length;i++)if(e[i].boxes)for(var n=0;n<e[i].boxes.length;n++){var r=e[i].boxes[n];e[i].boxes[n]=s.a.latLngBounds([[r[0],r[1]],[r[2],r[3]]])}this._map.on("moveend zoomend resetview",this._findCopyrightBBox,this),this._attributionProviders=e,this._findCopyrightBBox()}},_findCopyrightBBox:function(){if(this._map){for(var t=this._attributionProviders,e=[],i=this._map.getZoom(),n=this._map.getBounds(),r=0;r<t.length;r++){if(t[r].minLevel<i&&t[r].maxLevel>i&&!t[r].boxes){e.push(t[r]);break}for(var o=0;o<t[r].boxes.length;o++){var a=t[r].boxes[o];if(n.overlaps(a)){e.push(t[r]);break}}}for(var s=['<a href="https://legal.here.com/terms/serviceterms/gb/">HERE maps</a>'],r=0;r<e.length;r++){var l=e[r];s.push('<abbr title="'+l.alt+'">'+l.label+"</abbr>")}var u="© "+s.join(", ")+". ";u!==this._attributionText&&void 0!==this._map.attributionControl&&(this._map.attributionControl.removeAttribution(this._attributionText),this._map.attributionControl.addAttribution(this._attributionText=u))}}}),s.a.tileLayer.here=function(t){return new s.a.TileLayer.HERE(t)}},function(t,e,i){"use strict";var n=i(0),h=i.n(n);h.a.TileLayer.TomTom=h.a.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=h.a.setOptions(this,t)).style+"/{z}/{x}/{y}.png?key="+t.apiKey;h.a.TileLayer.prototype.initialize.call(this,e,t),this._copyright=h.a.DomUtil.create("div","tomtom-copyright"),this._copyrightClose=h.a.DomUtil.create("button","tomtom-copyright-close",this._copyright),this._copyrightContent=h.a.DomUtil.create("div","tomtom-copyright-content",this._copyright),h.a.DomEvent.on(this._copyrightClose,"click",function(t){t.preventDefault(),t.stopPropagation(),this._hideCopyright()},this),this._attributionText='<a class="tomtom-attribution" href="#">© 1992 - '+(new Date).getFullYear()+" TomTom.</a>"},onAdd:function(t){h.a.TileLayer.prototype.onAdd.call(this,t),this._addAttribution(),this._map.on("click",this._hideCopyright,this)},onRemove:function(t){h.a.TileLayer.prototype.onRemove.call(this,t),this._hideCopyright(),this._removeAttribution(),this._map.off("click",this._hideCopyright,this)},_addAttribution:function(){var t;void 0!==this._map.attributionControl&&(this._map.attributionControl.addAttribution(this._attributionText),null!==(t=this._map.attributionControl.getContainer().querySelector(".tomtom-attribution"))&&h.a.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,n=this._map.getBounds(),r=n.getNorthEast().wrap(),o=n.getSouthWest
vendor: 7,019 bytes, lines 13-21
13().wrap(),a=o.lng<r.lng?(e=o.lng,r.lng):(e=r.lng,o.lng),s=o.lat<r.lat?(i=o.lat,r.lat):(i=r.lat,o.lat),l="https://api.tomtom.com/map/1/copyrights/"+e+"/"+i+"/"+a+"/"+s+".json?key="+this.options.apiKey,u=new XMLHttpRequest;u.onreadystatechange=h.a.bind(function(){if(u.readyState===XMLHttpRequest.DONE&&200===u.status){for(var t=JSON.parse(u.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 n=t.regions[i];e+="<h4>"+n.country.label+":</h4>";for(var r=0;r<n.copyrights.length;r++)e+="<p>"+n.copyrights[r]+"</p>"}this._copyrightContent.innerHTML=e}},this),u.open("GET",l,!0),u.send()},_hideCopyright:function(){this._copyright.remove()}}),h.a.tileLayer.tomTom=function(t,e){return new h.a.TileLayer.TomTom(t,e)}},function(t,e,i){"use strict";t.exports=i(12).polyfill()},function(t,e,i){(function(nt,rt){ 14/*! 15 * @overview es6-promise - a tiny implementation of Promises/A+. 16 * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) 17 * @license Licensed under MIT license 18 * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE 19 * @version v4.2.8+1e68dce6 20 */ 21t.exports=function(){"use strict";function n(t){var e=typeof t;return t!==null&&(e==="object"||e==="function")}function l(t){return typeof t==="function"}var t=void 0;if(Array.isArray){t=Array.isArray}else{t=function(t){return Object.prototype.toString.call(t)==="[object Array]"}}var i=t,r=0,e=void 0,o=void 0,a=function t(e,i){x[r]=e;x[r+1]=i;r+=2;if(r===2){if(o){o(b)}else{k()}}};function s(t){o=t}function u(t){a=t}var h=typeof window!=="undefined"?window:undefined,c=h||{},d=c.MutationObserver||c.WebKitMutationObserver,p=typeof self==="undefined"&&typeof nt!=="undefined"&&{}.toString.call(nt)==="[object process]",f=typeof Uint8ClampedArray!=="undefined"&&typeof importScripts!=="undefined"&&typeof MessageChannel!=="undefined";function m(){return function(){return nt.nextTick(b)}}function g(){if(typeof e!=="undefined"){return function(){e(b)}}return y()}function v(){var t=0;var e=new d(b);var i=document.createTextNode("");e.observe(i,{characterData:true});return function(){i.data=t=++t%2}}function _(){var t=new MessageChannel;t.port1.onmessage=b;return function(){return t.port2.postMessage(0)}}function y(){var t=setTimeout;return function(){return t(b,1)}}var x=new Array(1e3);function b(){for(var t=0;t<r;t+=2){var e=x[t];var i=x[t+1];e(i);x[t]=undefined;x[t+1]=undefined}r=0}function w(){try{var t=Function("return this")().require("vertx");e=t.runOnLoop||t.runOnContext;return g()}catch(t){return y()}}var k=void 0;if(p){k=m()}else if(d){k=v()}else if(f){k=_()}else if(h===undefined&&"function"==="function"){k=w()}else{k=y()}function L(t,e){var i=this;var n=new this.constructor(T);if(n[C]===undefined){q(n)}var r=i._state;if(r){var o=arguments[r-1];a(function(){return W(r,n,o,i._result)})}else{Z(i,n,t,e)}return n}function M(t){var e=this;if(t&&typeof t==="object"&&t.constructor===e){return t}var i=new e(T);F(i,t);return i}var C=Math.random().toString(36).substring(2);function T(){}var P=void 0,S=1,A=2;function I(){return new TypeError("You cannot resolve a promise with itself")}function D(){return new TypeError("A promises callback cannot return that same promise.")}function O(t,e,i,n){try{t.call(e,i,n)}catch(t){return t}}function z(t,n,r){a(function(e){var i=false;var t=O(r,n,function(t){if(i){return}i=true;if(n!==t){F(e,t)}else{N(e,t)}},function(t){if(i){return}i=true;U(e,t)},"Settle: "+(e._label||" unknown promise"));if(!i&&t){i=true;U(e,t)}},t)}function E(e,t){if(t._state===S){N(e,t._result)}else if(t._state===A){U(e,t._result)}else{Z(t,undefined,function(t){return F(e,t)},function(t){return U(e,t)})}}function B(t,e,i){if(e.constructor===t.constructor&&i===L&&e.constructor.resolve===M){E(t,e)}else{if(i===undefined){N(t,e)}else if(l(i)){z(t,e,i)}else{N(t,e)}}}function F(e,t){if(e===t){U(e,I())}else if(n(t)){var i=void 0;try{i=t.then}catch(t){U(e,t);return}B(e,t,i)}else{N(e,t)}}function R(t){if(t._onerror){t._onerror(t._result)}j(t)}function N(t,e){if(t._state!==P){return}t._result=e;t._state=S;if(t._subscribers.length!==0){a(j,t)}}function U(t,e){if(t._state!==P){return}t._state=A;t._result=e;a(R,t)}function Z(t,e,i,n){var r=t._subscribers;var o=r.length;t._onerror=null;r[o]=e;r[o+S]=i;r[o+A]=n;if(o===0&&t._state){a(j,t)}}function j(t){var e=t._subscribers;var i=t._state;if(e.length===0){return}var n=void 0,r=void 0,o=t._result;for(var a=0;a<e.length;a+=3){n=e[a];r=e[a+i];if(n){W(i,n,r,o)}else{r(o)}}t._subscribers.length=0}function W(t,e,i,n){var r=l(i),o=void 0,a=void 0,s=true;if(r){try{o=i(n)}catch(t){s=false;a=t}if(e===o){U(e,D());return}}else{o=n}if(e._state!==P){}else if(r&&s){F(e,o)}else if(s===false){U(e,a)}else if(t===S){N(e,o)}else if(t===A){U(e,o)}}function H(i,t){try{t(function t(e){F(i,e)},function t(e){U(i,e)})}catch(t){U(i,t)}}var G=0;function V(){return G++}function q(t){t[C]=G++;t._state=undefined;t._result=undefined;t._subscribers=[]}function K(){return new Error("Array Methods must be provided an Array")}var J=function(){function t(t,e){this._instanceConstructor=t;this.promise=new t(T);if(!this.promise[C]){q(this.promise)}if(i(e)){this.length=e.length;this._remaining=e.length;this._result=new Array(this.length);if(this.length===0){N(this.promise,this._result)}else{this.length=this.length||0;this._enumerate(e);if(this._remaining===0){N(this.promise,this._result)}}}else{U(this.promise,K())}}t.prototype._enumerate=function t(e){for(var i=0;this._state===P&&i<e.length;i++){this._eachEntry(e[i],i)}};t.prototype._eachEntry=function t(e,i){var n=this._instanceConstructor;var r=n.resolve;if(r===M){var o=void 0;var a=void 0;var s=false;try{o=e.then}catch(t){s=true;a=t}if(o===L&&e._state!==P){this._settledAt(e._state,i,e._result)}else if(typeof o!=="function"){this._remaining--;this._result[i]=e}else if(n===et){var l=new n(T);if(s){U(l,a)}else{B(l,e,o)}this._willSettleAt(l,i)}else{this._willSettleAt(new n(function(t){return t(e)}),i)}}else{this._willSettleAt(r(e),i)}};t.prototype._settledAt=function t(e,i,n){var r=this.promise;if(r._state===P){this._remaining--;if(e===A){U(r,n)}else{this._result[i]=n}}if(this._remaining===0){N(r,this._result)}};t.prototype._willSettleAt=function t(e,i){var n=this;Z(e,undefined,function(t){return n._settledAt(S,i,t)},function(t){return n._settledAt(A,i,t)})};return t}();function Y(t){return new J(this,t).promise}function X(r){var o=this;if(i(r))return new o(function(t,e){for(var i=r.length,n=0;n<i;n++)o.resolve(r[n]).then(t,e)});else return new o(function(t,e){return e(new TypeError("You must pass an array to race."))})}function Q(t){var e=new this(T);return U(e,t),e}function $(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function tt(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object c
21onstructor cannot be called as a function.")}var et=function(){function e(t){this[C]=V();this._result=this._state=undefined;this._subscribers=[];if(T!==t){typeof t!=="function"&&$();this instanceof e?H(this,t):tt()}}e.prototype.catch=function t(e){return this.then(null,e)};e.prototype.finally=function t(e){var i=this;var n=i.constructor;if(l(e)){return i.then(function(t){return n.resolve(e()).then(function(){return t})},function(t){return n.resolve(e()).then(function(){throw t})})}return i.then(e,e)};return e}();function it(){var t=void 0;if(void 0!==rt)t=rt;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;if(e){var i=null;try{i=Object.prototype.toString.call(e.resolve())}catch(t){}if("[object Promise]"===i&&!e.cast)return}t.Promise=et}return et.prototype.then=L,et.all=function(t){return new J(this,t).promise},et.race=function(r){var o=this;return i(r)?new o(function(t,e){for(var i=r.length,n=0;n<i;n++)o.resolve(r[n]).then(t,e)}):new o(function(t,e){return e(new TypeError("You must pass an array to race."))})},et.resolve=M,et.reject=function(t){var e=new this(T);return U(e,t),e},et._setScheduler=function(t){o=t},et._setAsap=function(t){a=t},et._asap=a,et.polyfill=function(){var t=void 0;if(void 0!==rt)t=rt;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;if(e){var i=null;try{i=Object.prototype.toString.call(e.resolve())}catch(t){}if("[object Promise]"===i&&!e.cast)return}t.Promise=et},et.Promise=et}()}).call(this,i(13),i(14))},function(t,e){var i,n,r=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(i===setTimeout)return setTimeout(e,0);if((i===o||!i)&&setTimeout)return i=setTimeout,setTimeout(e,0);try{return i(e,0)}catch(t){try{return i.call(null,e,0)}catch(t){return i.call(this,e,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:o}catch(t){i=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var l,u=[],h=!1,c=-1;function d(){h&&l&&(h=!1,l.length?u=l.concat(u):c=-1,u.length&&p())}function p(){if(!h){var t=s(d);h=!0;for(var e=u.length;e;){for(l=u,u=[];++c<e;)l&&l[c].run();c=-1,e=u.length}l=null,h=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function m(){}r.nextTick=function(t){var e=new Array(arguments.length-1);if(1<arguments.length)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];u.push(new f(t,e)),1!==u.length||h||s(p)},f.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=m,r.addListener=m,r.once=m,r.off=m,r.removeListener=m,r.removeAllListeners=m,r.emit=m,r.prependListener=m,r.prependOnceListener=m,r.listeners=function(t){return[]},r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(t,e){var i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e){if("undefined"==typeof moment){var i=new Error("Cannot find module 'moment'");throw i.code="MODULE_NOT_FOUND",i}t.exports=moment},function(t,e,i){!function(t){"use strict";var e=L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,clusterPane:L.Marker.prototype.options.pane,spiderfyOnMaxZoom:true,showCoverageOnHover:true,zoomToBoundsOnClick:true,singleMarkerMode:false,disableClusteringAtZoom:null,removeOutsideVisibleBounds:true,animate:true,animateAddingMarkers:false,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:false,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(t){L.Util.setOptions(this,t);if(!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);
21this._markerCluster=e?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(t){if(t instanceof L.LayerGroup){return this.addLayers([t])}if(!t.getLatLng){this._nonPointGroup.addLayer(t);this.fire("layeradd",{layer:t});return this}if(!this._map){this._needsClustering.push(t);this.fire("layeradd",{layer:t});return this}if(this.hasLayer(t)){return this}if(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){while(e.__parent._zoom>=i){e=e.__parent}}if(this._currentShownBounds.contains(e.getLatLng())){if(this.options.animateAddingMarkers){this._animationAddLayer(t,e)}else{this._animationAddLayerNonAnimated(t,e)}}return this},removeLayer:function(t){if(t instanceof L.LayerGroup){return this.removeLayers([t])}if(!t.getLatLng){this._nonPointGroup.removeLayer(t);this.fire("layerremove",{layer:t});return this}if(!this._map){if(!this._arraySplice(this._needsClustering,t)&&this.hasLayer(t)){this._needsRemoving.push({layer:t,latlng:t._latlng})}this.fire("layerremove",{layer:t});return this}if(!t.__parent){return this}if(this._unspiderfy){this._unspiderfy();this._unspiderfyLayer(t)}this._removeLayer(t,true);this.fire("layerremove",{layer:t});this._topClusterLevel._recalculateBounds();this._refreshClustersIcons();t.off(this._childMarkerEventHandlers,this);if(this._featureGroup.hasLayer(t)){this._featureGroup.removeLayer(t);if(t.clusterShow){t.clusterShow()}}return this},addLayers:function(r,o){if(!L.Util.isArray(r)){return this.addLayer(r)}var a=this._featureGroup,s=this._nonPointGroup,l=this.options.chunkedLoading,u=this.options.chunkInterval,h=this.options.chunkProgress,c=r.length,d=0,p=true,f;if(this._map){var m=(new Date).getTime();var g=L.bind(function(){var t=(new Date).getTime();for(;d<c;d++){if(l&&d%200===0){var e=(new Date).getTime()-t;if(e>u){break}}f=r[d];if(f instanceof L.LayerGroup){if(p){r=r.slice();p=false}this._extractNonGroupLayers(f,r);c=r.length;continue}if(!f.getLatLng){s.addLayer(f);if(!o){this.fire("layeradd",{layer:f})}continue}if(this.hasLayer(f)){continue}this._addLayer(f,this._maxZoom);if(!o){this.fire("layeradd",{layer:f})}if(f.__parent){if(f.__parent.getChildCount()===2){var i=f.__parent.getAllChildMarkers(),n=i[0]===f?i[1]:i[0];a.removeLayer(n)}}}if(h){h(d,c,(new Date).getTime()-m)}if(d===c){this._topClusterLevel._recalculateBounds();this._refreshClustersIcons();this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)}else{setTimeout(g,this.options.chunkDelay)}},this);g()}else{var t=this._needsClustering;for(;d<c;d++){f=r[d];if(f instanceof L.LayerGroup){if(p){r=r.slice();p=false}this._extractNonGroupLayers(f,r);c=r.length;continue}if(!f.getLatLng){s.addLayer(f);continue}if(this.hasLayer(f)){continue}t.push(f)}}return this},removeLayers:function(t){var e,i,n=t.length,r=this._featureGroup,o=this._nonPointGroup,a=true;if(!this._map){for(e=0;e<n;e++){i=t[e];if(i instanceof L.LayerGroup){if(a){t=t.slice();a=false}this._extractNonGroupLayers(i,t);n=t.length;continue}this._arraySplice(this._needsClustering,i);o.removeLayer(i);if(this.hasLayer(i)){this._needsRemoving.push({layer:i,latlng:i._latlng})}this.fire("layerremove",{layer:i})}return this}if(this._unspiderfy){this._unspiderfy();var s=t.slice(),l=n;for(e=0;e<l;e++){i=s[e];if(i instanceof L.LayerGroup){this._extractNonGroupLayers(i,s);l=s.length;continue}this._unspiderfyLayer(i)}}for(e=0;e<n;e++){i=t[e];if(i instanceof L.LayerGroup){if(a){t=t.slice();a=false}this._extractNonGroupLayers(i,t);n=t.length;continue}if(!i.__parent){o.removeLayer(i);this.fire("layerremove",{layer:i});continue}this._removeLayer(i,true,true);this.fire("layerremove",{layer:i});if(r.hasLayer(i)){r.removeLayer(i);if(i.clusterShow){i.clusterShow()}}}this._topClusterLevel._recalculateBounds();this._refreshClustersIcons();this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds);return this},clearLayers:function(){if(!this._map){this._needsClustering=[];this._needsRemoving=[];delete this._gridClusters;delete this._gridUnclustered}if(this._noanimationUnspiderfy){this._noanimationUnspiderfy()}this._featureGroup.clearLayers();this._nonPointGroup.clearLayers();this.eachLayer(function(t){t.off(this._childMarkerEventHandlers,this);delete t.__parent},this);if(this._map){this._generateInitialClusters()}return this},getBounds:function(){var t=new L.LatLngBounds;if(this._topClusterLevel){t.extend(this._topClusterLevel._bounds)}for(var e=this._needsClustering.length-1;e>=0;e--){t.extend(this._needsClustering[e].getLatLng())}t.extend(this._nonPointGroup.getBounds());return t},eachLayer:function(t,e){var i=this._needsClustering.slice(),n=this._needsRemoving,r,o,a;if(this._topClusterLevel){this._topClusterLevel.getAllChildMarkers(i)}for(o=i.length-1;o>=0;o--){r=true;for(a=n.length-1;a>=0;a--){if(n[a].layer===i[o]){r=false;break}}if(r){t.call(e,i[o])}}this._nonPointGroup.eachLayer(t,e)},getLayers:function(){var e=[];this.eachLayer(function(t){e.push(t)});return e},getLayer:function(e){var i=null;e=parseInt(e,10);this.eachLayer(function(t){if(L.stamp(t)===e){i=t}});return i},hasLayer:function(t){if(!t){return false}var e,i=this._needsClustering;for(e=i.length-1;e>=0;e--){if(i[e]===t){return true}}i=this._needsRemoving;for(e=i.length-1;e>=0;e--){if(i[e].layer===t){return false}}return!!(t.__parent&&t.__parent._group===this)||this._nonPointGroup.hasLayer(t)},zoomToShowLayer:function(t,e){if(typeof e!=="function"){e=function(){}}var i=function(){if((t._icon||t.__parent._icon)&&!this._inZoomAnimation){this._map.off("moveend",i,this);this.off("animationend",i,this);if(t._icon){e()}else if(t.__parent._icon){this.once("spiderfied",e,this);t.__parent.spiderfy()}}};if(t._icon&&this._map.getBounds().contains(t.getLatLng())){e()}else if(t.__parent._zoom<Math.round(this._map._zoom)){this._map.on("moveend",i,this);this._map.panTo(t.getLatLng())}else{this._map.on("moveend",i,this);this.on("animationend",i,this);t.__parent.zoomToBounds()}},onAdd:function(t){this._map=t;var e,i,n;if(!isFinite(this._map.getMaxZoom())){throw"Map has no maxZoom specified"}this._featureGroup.addTo(t);this._nonPointGroup.addTo(t);if(!this._gridClusters){this._generateInitialClusters()}this._maxLat=t.options.crs.projection.MAX_LATITUDE;for(e=0,i=this._needsRemoving.length;e<i;e++){n=this._needsRemoving[e];n.newlatlng=n.layer._latlng;n.layer._latlng=n.latlng}for(e=0,i=this._needsRemoving.length;e<i;e++){n=this._needsRemoving[e];this._removeLayer(n.layer,true);n.layer._latlng=n.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);if(this._spiderfierOnAdd){this._spiderfierOnAdd()}this._bindEvents();i=this._needsClustering;this._needsClustering=[];this.addLayers(i,true)},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","");if(this._spiderfierOnRemove){this._spiderfierOnRemove()}delete this._maxLat;this._hideCoverage();this._featureGroup.remove();this._nonPointGroup.remove();this._featureGroup.clearLayers();this._map=null},getVisibleParent:function(t){var e=t;while(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){t.splice(i,1);return true}}},_removeFromGridUnclustered:function(t,e){var i=this._map,n=this._gridUnclustered,r=Math.floor(this._map.getMinZoom());for(;e>=r;e--){if(!n[e].removeObject(t,i.project(t.getLatLng(),e))){break}}},_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);if(e){t.target.openPopup()}}}
21,_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;if(e){this._moveChild(t.target,e,t.target._latlng)}},_removeLayer:function(t,e,i){var n=this._gridClusters,r=this._gridUnclustered,o=this._featureGroup,a=this._map,s=Math.floor(this._map.getMinZoom());if(e){this._removeFromGridUnclustered(t,this._maxZoom)}var l=t.__parent,u=l._markers,h;this._arraySplice(u,t);while(l){l._childCount--;l._boundsNeedUpdate=true;if(l._zoom<s){break}else if(e&&l._childCount<=1){h=l._markers[0]===t?l._markers[1]:l._markers[0];n[l._zoom].removeObject(l,a.project(l._cLatLng,l._zoom));r[l._zoom].addObject(h,a.project(h.getLatLng(),l._zoom));this._arraySplice(l.__parent._childClusters,l);l.__parent._markers.push(h);h.__parent=l.__parent;if(l._icon){o.removeLayer(l);if(!i){o.addLayer(h)}}}else{l._iconNeedsUpdate=true}l=l.__parent}delete t.__parent},_isOrIsParent:function(t,e){while(e){if(t===e){return true}e=e.parentNode}return false},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();var i=" marker-cluster-";if(e<10){i+="small"}else if(e<100){i+="medium"}else{i+="large"}return 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,n=this.options.zoomToBoundsOnClick;if(e||n){this.on("clusterclick",this._zoomOrSpiderfy,this)}if(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;while(i._childClusters.length===1){i=i._childClusters[0]}if(i._zoom===this._maxZoom&&i._childCount===e._childCount&&this.options.spiderfyOnMaxZoom){e.spiderfy()}else if(this.options.zoomToBoundsOnClick){e.zoomToBounds()}if(t.originalEvent&&t.originalEvent.keyCode===13){this._map._container.focus()}},_showCoverage:function(t){var e=this._map;if(this._inZoomAnimation){return}if(this._shownPolygon){e.removeLayer(this._shownPolygon)}if(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(){if(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,n=this._map;if(t||i){this.off("clusterclick",this._zoomOrSpiderfy,this)}if(e){this.off("clustermouseover",this._showCoverage,this);this.off("clustermouseout",this._hideCoverage,this);n.off("zoomend",this._hideCoverage,this)}},_zoomEnd:function(){if(!this._map){return}this._mergeSplitClusters();this._zoom=Math.round(this._map._zoom);this._currentShownBounds=this._getExpandedVisibleBounds()},_moveEnd:function(){if(this._inZoomAnimation){return}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;return},_generateInitialClusters:function(){var t=Math.ceil(this._map.getMaxZoom()),e=Math.floor(this._map.getMinZoom()),i=this.options.maxClusterRadius,n=i;if(typeof i!=="function"){n=function(){return i}}if(this.options.disableClusteringAtZoom!==null){t=this.options.disableClusteringAtZoom-1}this._maxZoom=t;this._gridClusters={};this._gridUnclustered={};for(var r=t;r>=e;r--){this._gridClusters[r]=new L.DistanceGrid(n(r));this._gridUnclustered[r]=new L.DistanceGrid(n(r))}this._topClusterLevel=new this._markerCluster(this,e-1)},_addLayer:function(t,e){var i=this._gridClusters,n=this._gridUnclustered,r=Math.floor(this._map.getMinZoom()),o,a;
21if(this.options.singleMarkerMode){this._overrideMarkerIcon(t)}t.on(this._childMarkerEventHandlers,this);for(;e>=r;e--){o=this._map.project(t.getLatLng(),e);var s=i[e].getNearObject(o);if(s){s._addChild(t);t.__parent=s;return}s=n[e].getNearObject(o);if(s){var l=s.__parent;if(l){this._removeLayer(s,false)}var u=new this._markerCluster(this,e,s,t);i[e].addObject(u,this._map.project(u._cLatLng,e));s.__parent=u;t.__parent=u;var h=u;for(a=e-1;a>l._zoom;a--){h=new this._markerCluster(this,a,h);i[a].addObject(h,this._map.project(s.getLatLng(),a))}l._addChild(h);this._removeFromGridUnclustered(s,e);return}n[e].addObject(t,o)}this._topClusterLevel._addChild(t);t.__parent=this._topClusterLevel;return},_refreshClustersIcons:function(){this._featureGroup.eachLayer(function(t){if(t instanceof L.MarkerCluster&&t._iconNeedsUpdate){t._updateIcon()}})},_enqueue:function(t){this._queue.push(t);if(!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();if(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)}else if(this._zoom>t){this._animationStart();this._animationZoomOut(this._zoom,t)}else{this._moveEnd()}},_getExpandedVisibleBounds:function(){if(!this.options.removeOutsideVisibleBounds){return this._mapBoundsInfinite}else if(L.Browser.mobile){return this._checkBoundsMaxLat(this._map.getBounds())}return this._checkBoundsMaxLat(this._map.getBounds().pad(1))},_checkBoundsMaxLat:function(t){var e=this._maxLat;if(e!==undefined){if(t.getNorth()>=e){t._northEast.lat=Infinity}if(t.getSouth()<=-e){t._southWest.lat=-Infinity}}return t},_animationAddLayerNonAnimated:function(t,e){if(e===t){this._featureGroup.addLayer(t)}else if(e._childCount===2){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=t.getLayers(),n=0,r;e=e||[];for(;n<i.length;n++){r=i[n];if(r instanceof L.LayerGroup){this._extractNonGroupLayers(r,e);continue}e.push(r)}return e},_overrideMarkerIcon:function(t){var e=t.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[t]}});return e}});L.MarkerClusterGroup.include({_mapBoundsInfinite:new L.LatLngBounds(new L.LatLng(-Infinity,-Infinity),new L.LatLng(Infinity,Infinity))}),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(r,o){var a=this._getExpandedVisibleBounds(),s=this._featureGroup,t=Math.floor(this._map.getMinZoom()),l;this._ignoreMove=true;this._topClusterLevel._recursively(a,r,t,function(t){var e=t._latlng,i=t._markers,n;if(!a.contains(e)){e=null}if(t._isSingleParent()&&r+1===o){s.removeLayer(t);t._recursivelyAddChildrenToMap(null,o,a)}else{t.clusterHide();t._recursivelyAddChildrenToMap(e,o,a)}for(l=i.length-1;l>=0;l--){n=i[l];if(!a.contains(n._latlng)){s.removeLayer(n)}}});this._forceLayout();this._topClusterLevel._recursivelyBecomeVisible(a,o);s.eachLayer(function(t){if(!(t instanceof L.MarkerCluster)&&t._icon){t.clusterShow()}});this._topClusterLevel._recursively(a,r,o,function(t){t._recursivelyRestoreChildPositions(o)});this._ignoreMove=false;this._enqueue(function(){this._topClusterLevel._recursively(a,r,t,function(t){s.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,n=this._featureGroup;n.addLayer(t);if(e!==t){if(e._childCount>2){e._updateIcon();this._forceLayout();this._animationStart();t._setPos(this._map.latLngToLayerPoint(e.getLatLng()));t.clusterHide();this._enqueue(function(){n.removeLayer(t);t.clusterShow();i._animationEnd()})}else{this._forceLayout();i._animationStart();i._animationZoomOutSingle(e,this._map.getMaxZoom(),this._zoom)}}}},_animationZoomOutSingle:function(e,i,n){var r=this._getExpandedVisibleBounds(),o=Math.floor(this._map.getMinZoom());e._recursivelyAnimateChildrenInAndAddSelfToMap(r,o,i+1,n);var a=this;this._forceLayout();e._recursivelyBecomeVisible(r,n);this._enqueue(function(){if(e._childCount===1){var t=e._markers[0];this._ignoreMove=true;t.setLatLng(t.getLatLng());this._ignoreMove=false;if(t.clusterShow){t.clusterShow()}}else{e._recursively(r,n,o,function(t){t._recursivelyRemoveChildrenFromMap(r,o,i+1)})}a._animationEnd()})},_animationEnd:function(){if(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)};
21var i=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(t,e,i,n){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=true;this._boundsNeedUpdate=true;this._bounds=new L.LatLngBounds;if(i){this._addChild(i)}if(n){this._addChild(n)}},getAllChildMarkers:function(t,e){t=t||[];for(var i=this._childClusters.length-1;i>=0;i--){this._childClusters[i].getAllChildMarkers(t)}for(var n=this._markers.length-1;n>=0;n--){if(e&&this._markers[n].__dragStart){continue}t.push(this._markers[n])}return t},getChildCount:function(){return this._childCount},zoomToBounds:function(t){var e=this._childClusters.slice(),i=this._group._map,n=i.getBoundsZoom(this._bounds),r=this._zoom+1,o=i.getZoom(),a;while(e.length>0&&n>r){r++;var s=[];for(a=0;a<e.length;a++){s=s.concat(e[a]._childClusters)}e=s}if(n>r){this._group._map.setView(this._latlng,r)}
21else if(n<=o){this._group._map.setView(this._latlng,o+1)}else{this._group._map.fitBounds(this._bounds,t)}},getBounds:function(){var t=new L.LatLngBounds;t.extend(this._bounds);return t},_updateIcon:function(){this._iconNeedsUpdate=true;if(this._icon){this.setIcon(this)}},createIcon:function(){if(this._iconNeedsUpdate){this._iconObj=this._group.options.iconCreateFunction(this);this._iconNeedsUpdate=false}return this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(t,e){this._iconNeedsUpdate=true;this._boundsNeedUpdate=true;this._setClusterCenter(t);if(t instanceof L.MarkerCluster){if(!e){this._childClusters.push(t);t.__parent=this}this._childCount+=t._childCount}else{if(!e){this._markers.push(t)}this._childCount++}if(this.__parent){this.__parent._addChild(t,true)}},_setClusterCenter:function(t){if(!this._cLatLng){this._cLatLng=t._cLatLng||t._latlng}},_resetBounds:function(){var t=this._bounds;if(t._southWest){t._southWest.lat=Infinity;t._southWest.lng=Infinity}if(t._northEast){t._northEast.lat=-Infinity;t._northEast.lng=-Infinity}},_recalculateBounds:function(){var t=this._markers,e=this._childClusters,i=0,n=0,r=this._childCount,o,a,s,l;if(r===0){return}this._resetBounds();for(o=0;o<t.length;o++){s=t[o]._latlng;this._bounds.extend(s);i+=s.lat;n+=s.lng}for(o=0;o<e.length;o++){a=e[o];if(a._boundsNeedUpdate){a._recalculateBounds()}this._bounds.extend(a._bounds);s=a._wLatLng;l=a._childCount;i+=s.lat*l;n+=s.lng*l}this._latlng=this._wLatLng=new L.LatLng(i/r,n/r);this._boundsNeedUpdate=false},_addToMap:function(t){if(t){this._backupLatlng=this._latlng;this.setLatLng(t)}this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(t,r,e){this._recursively(t,this._group._map.getMinZoom(),e-1,function(t){var e=t._markers,i,n;for(i=e.length-1;i>=0;i--){n=e[i];if(n._icon){n._setPos(r);n.clusterHide()}}},function(t){var e=t._childClusters,i,n;for(i=e.length-1;i>=0;i--){n=e[i];if(n._icon){n._setPos(r);n.clusterHide()}}})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(e,i,n,r){this._recursively(e,r,i,function(t){t._recursivelyAnimateChildrenIn(e,t._group._map.latLngToLayerPoint(t.getLatLng()).round(),n);if(t._isSingleParent()&&n-1===r){t.clusterShow();t._recursivelyRemoveChildrenFromMap(e,i,n)}else{t.clusterHide()}t._addToMap()})},_recursivelyBecomeVisible:function(t,e){this._recursively(t,this._group._map.getMinZoom(),e,null,function(t){t.clusterShow()})},_recursivelyAddChildrenToMap:function(n,r,o){this._recursively(o,this._group._map.getMinZoom()-1,r,function(t){if(r===t._zoom){return}for(var e=t._markers.length-1;e>=0;e--){var i=t._markers[e];if(!o.contains(i._latlng)){continue}if(n){i._backupLatlng=i.getLatLng();i.setLatLng(n);if(i.clusterHide){i.clusterHide()}}t._group._featureGroup.addLayer(i)}},function(t){t._addToMap(n)})},_recursivelyRestoreChildPositions:function(t){for(var e=this._markers.length-1;e>=0;e--){var i=this._markers[e];if(i._backupLatlng){i.setLatLng(i._backupLatlng);delete i._backupLatlng}}if(t-1===this._zoom){for(var n=this._childClusters.length-1;n>=0;n--){this._childClusters[n]._restorePosition()}}else{for(var r=this._childClusters.length-1;r>=0;r--){this._childClusters[r]._recursivelyRestoreChildPositions(t)}}},_restorePosition:function(){if(this._backupLatlng){this.setLatLng(this._backupLatlng);delete this._backupLatlng}},_recursivelyRemoveChildrenFromMap:function(t,e,i,n){var r,o;this._recursively(t,e-1,i-1,function(t){for(o=t._markers.length-1;o>=0;o--){r=t._markers[o];if(!n||!n.contains(r._latlng)){t._group._featureGroup.removeLayer(r);if(r.clusterShow){r.clusterShow()}}}},function(t){for(o=t._childClusters.length-1;o>=0;o--){r=t._childClusters[o];if(!n||!n.contains(r._latlng)){t._group._featureGroup.removeLayer(r);if(r.clusterShow){r.clusterShow()}}}})},_recursively:function(t,e,i,n,r){var o=this._childClusters,a=this._zoom,s,l;if(e<=a){if(n){n(this)}if(r&&a===i){r(this)}}if(a<e||a<i){for(s=o.length-1;s>=0;s--){l=o[s];if(l._boundsNeedUpdate){l._recalculateBounds()}if(t.intersects(l._bounds)){l._recursively(t,e,i,n,r)}}}},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var t=this.options.opacity;this.setOpacity(0);this.options.opacity=t;return 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),n=this._getCoord(e.y),r=this._grid,o=r[n]=r[n]||{},a=o[i]=o[i]||[],s=L.Util.stamp(t);this._objectPoint[s]=e;a.push(t)},updateObject:function(t,e){this.removeObject(t);this.addObject(t,e)},removeObject:function(t,e){var i=this._getCoord(e.x),n=this._getCoord(e.y),r=this._grid,o=r[n]=r[n]||{},a=o[i]=o[i]||[],s,l;delete this._objectPoint[L.Util.stamp(t)];for(s=0,l=a.length;s<l;s++){if(a[s]===t){a.splice(s,1);if(l===1){delete o[i]}return true}}},eachObject:function(t,e){var i,n,r,o,a,s,l,u=this._grid;for(i in u){a=u[i];for(n in a){s=a[n];for(r=0,o=s.length;r<o;r++){l=t.call(e,s[r]);if(l){r--;o--}}}}},getNearObject:function(t){var e=this._getCoord(t.x),i=this._getCoord(t.y),n,r,o,a,s,l,u,h,c=this._objectPoint,d=this._sqCellSize,p=null;for(n=i-1;n<=i+1;n++){a=this._grid[n];if(a){for(r=e-1;r<=e+1;r++){s=a[r];if(s){for(o=0,l=s.length;o<l;o++){u=s[o];h=this._sqDist(c[L.Util.stamp(u)],t);if(h<d||h<=d&&p===null){d=h;p=u}}}}}}return p},_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,n=e.y-t.y;return i*i+n*n}},function(){L.QuickHull={getDistant:function(t,e){var i=e[1].lat-e[0].lat,n=e[0].lng-e[1].lng;return n*(t.lat-e[0].lat)+i*(t.lng-e[0].lng)},findMostDistantPointFromBaseLine:function(t,e){var i=0,n=null,r=[],o,a,s;for(o=e.length-1;o>=0;o--){a=e[o];s=this.getDistant(a,t);if(s>0){r.push(a)}else{continue}if(s>i){i=s;n=a}}return{maxPoint:n,newPoints:r}},buildConvexHull:function(t,e){var i=[],n=this.findMostDistantPointFromBaseLine(t,e);if(n.maxPoint){i=i.concat(this.buildConvexHull([t[0],n.maxPoint],n.newPoints));i=i.concat(this.buildConvexHull([n.maxPoint,t[1]],n.newPoints));return i}else{return[t[0]]}},getConvexHull:function(t){var e=false,i=false,n=false,r=false,o=null,a=null,s=null,l=null,u=null,h=null,c;for(c=t.length-1;c>=0;c--){var d=t[c];if(e===false||d.lat>e){o=d;e=d.lat}if(i===false||d.lat<i){a=d;i=d.lat}if(n===false||d.lng>n){s=d;n=d.lng}if(r===false||d.lng<r){l=d;r=d.lng}}if(i!==e){h=a;u=o}else{h=l;u=s}var p=[].concat(this.buildConvexHull([h,u],t),this.buildConvexHull([u,h],t));return p}}}(),L.MarkerCluster.include({getConvexHull:function(){var t=this.getAllChildMarkers(),e=[],i,n;for(n=t.length-1;n>=0;n--){i=t[n].getLatLng();e.push(i)}return L.QuickHull.getConvexHull(e)}}),L.MarkerCluster.include({_2PI:Math.PI*2,_circleFootSeparation:25,_circleStartAngle:0,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(this._group._spiderfied===this||this._group._inZoomAnimation){return}var t=this.getAllChildMarkers(null,true),e=this._group,i=e._map,n=i.latLngToLayerPoint(this._latlng),r;this._group._unspiderfy();this._group._spiderfied=this;if(t.length>=this._circleSpiralSwitchover){r=this._generatePointsSpiral(t.length,n)}else{n.y+=10;r=this._generatePointsCircle(t.length,n)}this._animationSpiderfy(t,r)},unspiderfy:function(t){if(this._group._inZoomAnimation){return}this._animationUnspiderfy(t);this._group._spiderfied=null},_generatePointsCircle:function(t,e){var i=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+t),n=i/this._2PI,r=this._2PI/t,o=[],a,s;n=Math.max(n,35);o.length=t;for(a=0;a<t;a++){s=this._circleStartAngle+a*r;o[a]=new L.Point(e.x+n*Math.cos(s),e.y+n*Math.sin(s))._round()}return o},_generatePointsSpiral:function(t,e){var i=this._group.options.spiderfyDistanceMultiplier,n=i*this._spiralLengthStart,r=i*this._spiralFootSeparation,o=i*this._spiralLengthFactor*this._2PI,a=0,s=[],l;s.length=t;for(l=t;l>=0;l--){if(l<t){s[l]=new L.Point(e.x+n*Math.cos(a),e.y+n*Math.sin(a))._round()}a+=r/n+l*5e-4;n+=o/a}return s},_noanimationUnspiderfy:function(){var t=this._group,e=t._map,i=t._featureGroup,n=this.getAllChildMarkers(null,true),r,o;t._ignoreMove=true;this.setOpacity(1);for(o=n.length-1;o>=0;o--){r=n[o];i.removeLayer(r);if(r._preSpiderfyLatlng){r.setLatLng(r._preSpiderfyLatlng);delete r._preSpiderfyLatlng}if(r.setZIndexOffset){r.setZIndexOffset(0)}if(r._spiderLeg){e.removeLayer(r._spiderLeg);delete r._spiderLeg}}t.fire("unspiderfied",{cluster:this,markers:n});t._ignoreMove=false;t._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(t,e){var i=this._group,n=i._map,r=i._featureGroup,o=this._group.options.spiderLegPolylineOptions,a,s,l,u;i._ignoreMove=true;for(a=0;a<t.length;a++){u=n.layerPointToLatLng(e[a]);s=t[a];l=new L.Polyline([this._latlng,u],o);n.addLayer(l);s._spiderLeg=l;s._preSpiderfyLatlng=s._latlng;s.setLatLng(u);if(s.setZIndexOffset){s.setZIndexOffset(1e6)}r.addLayer(s)}this.setOpacity(.3);i._ignoreMove=false;i.fire("spiderfied",{cluster:this,markers:t})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerCluster.include({_animationSpiderfy:function(t,e){var i=this,n=this._group,r=n._map,o=n._featureGroup,a=this._latlng,s=r.latLngToLayerPoint(a),l=L.Path.SVG,u=L.extend({},this._group.options.spiderLegPolylineOptions),h=u.opacity,c,d,p,f,m,g;if(h===undefined){h=L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity}if(l){u.opacity=0;u.className=(u.className||"")+" leaflet-cluster-spider-leg"}else{u.opacity=h}n._ignoreMove=true;for(c=0;c<t.length;c++){d=t[c];g=r.layerPointToLatLng(e[c]);p=new L.Polyline([a,g],u);r.addLayer(p);d._spiderLeg=p;if(l){f=p._path;m=f.getTotalLength()+.1;f.style.strokeDasharray=m;f.style.strokeDashoffset=m}if(d.setZIndexOffset){d.setZIndexOffset(1e6)}if(d.clusterHide){d.clusterHide()}o.addLayer(d);if(d._setPos){d._setPos(s)}}n._forceLayout();n._animationStart();for(c=t.length-1;c>=0;c--){g=r.layerPointToLatLng(e[c]);d=t[c];d._preSpiderfyLatlng=d._latlng;d.setLatLng(g);if(d.clusterShow){d.clusterShow()}if(l){p=d._spiderLeg;f=p._path;f.style.strokeDashoffset=0;p.setStyle({opacity:h})}}this.setOpacity(.3);n._ignoreMove=false;setTimeout(function(){n._animationEnd();n.fire("spiderfied",{cluster:i,markers:t})},200)},_animationUnspiderfy:function(t){var e=this,i=this._group,n=i._map,r=i._featureGroup,o=t?n._latLngToNewLayerPoint(this._latlng,t.zoom,t.center):n.latLngToLayerPoint(this._latlng),a=this.getAllChildMarkers(null,true),s=L.Path.SVG,l,u,h,c,d,p;i._ignoreMove=true;i._animationStart();this.setOpacity(1);for(u=a.length-1;u>=0;u--){l=a[u];if(!l._preSpiderfyLatlng){continue}l.closePopup();l.setLatLng(l._preSpiderfyLatlng);delete l._preSpiderfyLatlng;p=true;if(l._setPos){l._setPos(o);p=false}if(l.clusterHide){l.clusterHide();p=false}if(p){r.removeLayer(l)}if(s){h=l._spiderLeg;c=h._path;d=c.getTotalLength()+.1;c.style.strokeDashoffset=d;h.setStyle({opacity:0}
21)}}i._ignoreMove=false;setTimeout(function(){var t=0;for(u=a.length-1;u>=0;u--){l=a[u];if(l._spiderLeg){t++}}for(u=a.length-1;u>=0;u--){l=a[u];if(!l._spiderLeg){continue}if(l.clusterShow){l.clusterShow()}if(l.setZIndexOffset){l.setZIndexOffset(0)}if(t>1){r.removeLayer(l)}n.removeLayer(l._spiderLeg);delete l._spiderLeg}i._animationEnd();i.fire("unspiderfied",{cluster:e,markers:a})},200)}}),L.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(){this._unspiderfy.apply(this,arguments)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this);if(this._map.options.zoomAnimation){this._map.on("zoomstart",this._unspiderfyZoomStart,this)}this._map.on("zoomend",this._noanimationUnspiderfy,this);if(!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(){if(!this._map){return}this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(t){if(L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")){return}this._map.off("zoomanim",this._unspiderfyZoomAnim,this);this._unspiderfy(t)},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(t){if(this._spiderfied){this._spiderfied.unspiderfy(t)}},_noanimationUnspiderfy:function(){if(this._spiderfied){this._spiderfied._noanimationUnspiderfy()}},_unspiderfyLayer:function(t){if(t._spiderLeg){this._featureGroup.removeLayer(t);if(t.clusterShow){t.clusterShow()}if(t.setZIndexOffset){t.setZIndexOffset(0)}this._map.removeLayer(t._spiderLeg);delete t._spiderLeg}}}),L.MarkerClusterGroup.include({refreshClusters:function(t){if(!t){t=this._topClusterLevel.getAllChildMarkers()}else if(t instanceof L.MarkerClusterGroup){t=t._topClusterLevel.getAllChildMarkers()}else if(t instanceof L.LayerGroup){t=t._layers}else if(t instanceof L.MarkerCluster){t=t.getAllChildMarkers()}else if(t instanceof L.Marker){t=[t]}this._flagParentsIconsNeedUpdate(t);this._refreshClustersIcons();if(this.options.singleMarkerMode){this._refreshSingleMarkerModeMarkers(t)}return this},_flagParentsIconsNeedUpdate:function(t){var e,i;for(e in t){i=t[e].__parent;while(i){i._iconNeedsUpdate=true;i=i.__parent}}},_refreshSingleMarkerModeMarkers:function(t){var e,i;for(e in t){i=t[e];if(this.hasLayer(i)){i.setIcon(this._overrideMarkerIcon(i))}}}}),L.Marker.include({refreshIconOptions:function(t,e){var i=this.options.icon;L.setOptions(i,t);this.setIcon(i);if(e&&this.__parent){this.__parent._group.refreshClusters(this)}return this}}),t.MarkerClusterGroup=e,t.MarkerCluster=i}(e)},function(t,e,i){var n,r,o;r=[e,t],void 0===(o="function"==typeof(n=function(t,e){"use strict";var i={timeout:5e3,jsonpCallback:"callback",jsonpCallbackFunction:null};function c(){return"jsonp_"+Date.now()+"_"+Math.ceil(Math.random()*1e5)}function d(e){try{delete window[e]}catch(t){window[e]=undefined}}function p(t){var e=document.getElementById(t);if(e){document.getElementsByTagName("head")[0].removeChild(e)}}function n(o){var a=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];var s=o;var l=a.timeout||i.timeout;var u=a.jsonpCallback||i.jsonpCallback;var h=undefined;return new Promise(function(t,e){var i=a.jsonpCallbackFunction||c();var n=u+"_"+i;window[i]=function(e){t({ok:true,json:function t(){return Promise.resolve(e)}});if(h)clearTimeout(h);p(n);d(i)};s+=s.indexOf("?")===-1?"?":"&";var r=document.createElement("script");r.setAttribute("src",""+s+u+"="+i);if(a.charset){r.setAttribute("charset",a.charset)}r.id=n;document.getElementsByTagName("head")[0].appendChild(r);h=setTimeout(function(){e(new Error("JSONP request to "+o+" timed out"));d(i);p(n);window[i]=function(){d(i)}},l);r.onerror=function(){e(new Error("JSONP request to "+o+" failed"));d(i);p(n);if(h)clearTimeout(h)}})}e.exports=n})?n.apply(e,r):n)||(t.exports=o)},function(t,e){t.exports=function(t,e){return!(t[0]>e[2]||t[2]<e[0]||t[3]<e[1]||t[1]>e[3])}}
21,function(t,e,i){var n,r,o,a,s;a=function(a){a.EdgeBuffer={previousMethods:{getTiledPixelBounds:a.GridLayer.prototype._getTiledPixelBounds}},a.GridLayer.include({_getTiledPixelBounds:function(t,e,i){var n,r=a.EdgeBuffer.previousMethods.getTiledPixelBounds.call(this,t,e,i),o=1;return void 0!==this.options.edgeBufferTiles&&null!==this.options.edgeBufferTiles&&(o=this.options.edgeBufferTiles),0<o&&(n=a.GridLayer.prototype.getTileSize.call(this).multiplyBy(o),r=new a.Bounds(r.min.subtract(n),r.max.add(n))),r}})},s=window,r=[i(0)],void 0===(o="function"==typeof(n=a)?n.apply(e,r):n)||(t.exports=o),void 0!==s&&s.L&&!s.L.EdgeBuffer&&a(s.L)},function(t,e,i){!function(t){"use strict";var r
vendor: 13,084 bytes, line 21
21={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:"æ â å 䏿»¾åæ²è»¸å¯ä»¥ç¸®æ¾å°å"}};
21L.Map.mergeOptions({gestureHandlingOptions:{text:{},duration:1e3}});var e=!1,i=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?e=!0:"moveend"==t.type&&(e=!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,e=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?this._map.options.gestureHandlingOptions.text:(t=this._getUserLanguage(),r[t=t||"en"]&&(e=r[t]),e||-1===t.indexOf("-")||(t=t.
21split("-")[0],e=r[t]),e||r[t="en"]),i=!1;0<=navigator.platform.toUpperCase().indexOf("MAC")&&(i=!0);var n=e.scroll;i&&(n=e.scrollMac),this._map._container.setAttribute("data-gesture-handling-touch-content",e.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,n=0;n<e.length;n++)L.DomUtil.hasClass(t.target,e[n])&&(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()):(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.DomUtil.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){e||this._disableInteractions()}});L.Map.addInitHook("addHandler","gestureHandling",i),t.GestureHandling=i,t.default=i,Object.defineProperty(t,"__esModule",{value:!0})}(e)},function(t,e){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||!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,e;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&&(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)}}
21,function(t,e,i){var n,r,o,a,s;a=function(l){var t=l.Control.extend({includes:l.Evented?l.Evented.prototype:l.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(t,e){l.Util.setOptions(this,e),this.options.aimingRectOptions.clickable=!1,this.options.shadowRectOptions.clickable=!1,this._layer=t},onAdd:function(t){this._mainMap=t,this._container=l.DomUtil.create("div","leaflet-control-minimap"),this._container.style.width=this.options.width+"px",this._container.style.height=this.options.height+"px",l.DomEvent.disableClickPropagation(this._container),l.DomEvent.on(this._container,"mousewheel",l.DomEvent.stopPropagation);var e={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:t.options.crs},e=l.Util.extend(this.options.mapOptions,e);return this._miniMap=new l.Map(this._container,e),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(l.Util.bind(function(){this._aimingRect=l.rectangle(this._mainMap.getBounds(),this.options.aimingRectOptions).addTo(this._miniMap),this._shadowRect=l.rectangle(this._mainMap.getBounds(),this.options.shadowRectOptions).addTo(this._miniMap),this._mainMap.on("moveend",this._onMainMapMoved,this),this._mainMap.on("move",this._onMainMapMoving,this),this._miniMap.on("movestart",this._onMiniMapMoveStarted,this),this._miniMap.on("move",this._onMiniMapMoving,this),this._miniMap.on("moveend",this._onMiniMapMoved,this)},this)),this._container},addTo:function(t){l.Control.prototype.addTo.call(this,t);var e=this.options.centerFixed||this._mainMap.getCenter();return this._miniMap.setView(e,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(t,e,i,n,r,o){var a=l.DomUtil.create("a",i,n);a.innerHTML=t,a.href="#",a.title=e;var s=l.DomEvent.stopPropagation;return l.DomEvent.on(a,"click",s).on(a,"mousedown",s).on(a,"dblclick",s).on(a,"click",l.DomEvent.preventDefault).on(a,"click",r,o),a},_toggleDisplayButtonClicked:function(){this._userToggledDisplay=!0,this._minimized?this._restore():this._minimize()},_setDisplay:function(t){t!==this._minimized&&(this._minimized?this._restore():this._minimize())},_minimize:function(){this.options.toggleDisplay?(this._container.style.width=this.options.collapsedWidth+"px",this._container.style.height=this.options.collapsedHeight+"px",this._toggleDisplayButton.className+=" minimized-"+this.options.position,this._toggleDisplayButton.title=this.options.strings.showText):this._container.style.display="none",this._minimized=!0,this._onToggle(
21)},_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){var e;this._miniMapMoving?this._miniMapMoving=!1:(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){var e,i,n;this.options.centerFixed||(e=this._aimingRect.getBounds(),i=this._miniMap.latLngToContainerPoint(e.getSouthWest()),n=this._miniMap.latLngToContainerPoint(e.getNorthEast()),this._lastAimingRectPosition={sw:i,ne:n})},_onMiniMapMoving:function(t){this.options.centerFixed||!this._mainMapMoving&&this._lastAimingRectPosition&&(this._shadowRect.setBounds(new l.LatLngBounds(this._miniMap.containerPointToLatLng(this._lastAimingRectPosition.sw),this._miniMap.containerPointToLatLng(this._lastAimingRectPosition.ne))),this._shadowRect.setStyle({opacity:1,fillOpacity:.3}))},_onMiniMapMoved:function(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(),n=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=n,this._lastMiniMapZoom=this._miniMap.getZoom(),e},_decideMinimized:function(){return!this._userToggledDisplay&&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(){l.Util.requestAnimFrame(function(){l.DomEvent.on(this._container,"transitionend",this._fireToggleEvents,this),l.Browser.any3d||l.Util.requestAnimFrame(this._fireToggleEvents,this)},this)},_fireToggleEvents:function(){l.DomEvent.off(this._container,"transitionend",this._fireToggleEvents,this);var t={minimized:this._minimized};this.fire(this._minimized?"minimize":"restore",t),this.fire("toggle",t)}});return l.Map.mergeOptions({miniMapControl:!1}),l.Map.addInitHook(function(){this.options.miniMapControl&&(this.miniMapControl=(new t).addTo(this))}),t},s=window,r=[i(0)],void 0===(o="function"==typeof(n=a)?n.apply(e,r):n)||(t.exports=o),void 0!==s&&s.L&&(s.L.Control.MiniMap=a(L),s.L.control.minimap=function(t,e){return new s.L.Control.MiniMap(t,e)})},function(t,e,i){var n,r,o,a,s; 22/*! 23Copyright (c) 2016 Dominik Moritz 24 25This file is part of the leaflet locate control. It is licensed under the MIT license. 26You can find the project at: https://github.com/domoritz/leaflet-locatecontrol 27*/ 28a=function(l){function i(e,i,t){(t=t.split(" ")).forEach(function(t){l.DomUtil[e].call(this,i,t)})}function e(t,e){i("addClass",t,e)}function n(t,e){i("removeClass",t,e)}var t=l.Marker.extend({initialize:function(t,e){l.Util.setOptions(this,e),this._latlng=t,this.createIcon()},createIcon:function(){var t=this.options,e="";void 0!==t.color&&(e+="stroke:"+t.color+";"),void 0!==t.weight&&(e+="stroke-width:"+t.weight+";"),void 0!==t.fillColor&&(e+="fill:"+t.fillColor+";"),void 0!==t.fillOpacity&&(e+="fill-opacity:"+t.fillOpacity+";"),void 0!==t.opacity&&(e+="opacity:"+t.opacity+";");var i=this._getIconSVG(t,e);this._locationIcon=l.divIcon({className:i.className,html:i.svg,iconSize:[i.w,i.h]}),this.setIcon(this._locationIcon)},_getIconSVG:function(t,e){var i=t.radius,n=i+t.weight,r=2*n;return{className:"leaflet-control-locate-location",svg:'<svg xmlns="http://www.w3.org/2000/svg" width="'+r+'" height="'+r+'" version="1.1" viewBox="-'+n+" -"+n+" "+r+" "+r+'"><circle r="'+i+'" style="'+e+'" /></svg>',w:r,h:r}},setStyle:function(t){l.Util.setOptions(this,t),this.createIcon()}}
28),r=t.extend({initialize:function(t,e,i){l.Util.setOptions(this,i),this._latlng=t,this._heading=e,this.createIcon()},setHeading:function(t){this._heading=t},_getIconSVG:function(t,e){var i=t.radius,n=t.width+t.weight,r=2*(i+t.depth+t.weight),o="M0,0 l"+t.width/2+","+t.depth+" l-"+n+",0 z";return{className:"leaflet-control-locate-heading",svg:'<svg xmlns="http://www.w3.org/2000/svg" width="'+n+'" height="'+r+'" version="1.1" viewBox="-'+n/2+" 0 "+n+" "+r+'" style="'+("transform: rotate("+this._heading+"deg)")+'"><path d="'+o+'" style="'+e+'" /></svg>',w:n,h:r}}}),o=l.Control.extend({options:{position:"topleft",layer:void 0,setView:"untilPanOrZoom",keepCurrentZoomLevel:!1,initialZoomLevel:!1,getLocationBounds:function(t){return t.bounds},flyTo:!1,clickBehavior:{inView:"stop",outOfView:"setView",inViewNotFollowing:"inView"},returnToPrevBounds:!1,cacheLocation:!0,drawCircle:!0,drawMarker:!0,showCompass:!0,markerClass:t,compassClass:r,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:"fa fa-map-marker",iconLoading:"fa fa-spinner fa-spin",iconElementTag:"span",circlePadding:[0,0],metric:!0,createButtonCallback:function(t,e){var i=l.DomUtil.create("a","leaflet-bar-part leaflet-bar-part-single",t);return i.title=e.strings.title,i.role="button",i.href="#",{link:i,icon:l.DomUtil.create(e.iconElementTag,e.icon,i)}},onLocationError:function(t,e){alert(t.message)},onLocationOutsideMapBounds:function(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:function(t){for(var e in t)"object"==typeof this.options[e]?l.extend(this.options[e],t[e]):this.options[e]=t[e];this.options.followMarkerStyle=l.extend({},this.options.markerStyle,this.options.followMarkerStyle),this.options.followCircleStyle=l.extend({},this.options.circleStyle,this.options.followCircleStyle),this.options.followCompassStyle=l.extend({},this.options.compassStyle,this.options.followCompassStyle)},onAdd:function(t){var e=l.DomUtil.create("div","leaflet-control-locate leaflet-bar leaflet-control");this._container=e,this._map=t,this._layer=this.options.layer||new l.LayerGroup,this._layer.addTo(t),this._event=void 0,this._compassHeading=null,this._prevBounds=null;var i=this.options.createButtonCallback(e,this.options);return this._link=i.link,this._icon=i.icon,l.DomEvent.on(this._link,"click",l.DomEvent.stopPropagation).on(this._link,"click",l.DomEvent.preventDefault).on(this._link,"click",this._onClick,this).on(this._link,"dblclick",l.DomEvent.stopPropagation),this._resetVariables(),this._map.on("unload",this._unload,this),e},_onClick:function(){this._justClicked=!0;var t=this._isFollowing();if(this._userPanned=!1,this._userZoomed=!1,this._active&&!this._event)this.stop();else if(this._active&&void 0!==this._event){var e=this.options.clickBehavior,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":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:function(){this._activate(),this._event&&(this._drawMarker(this._map),this.options.setView&&this.setView()),this._updateContainerStyle()},stop:function(){this._deactivate(),this._cleanClasses(),this._resetVariables(),this._removeMarker()},stopFollowing:function(){this._userPanned=!0,this._updateContainerStyle(),this._drawMarker()},_activate:function(){var t,e,i;this._active||(this._map.locate(this.options.locateOptions),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.options.showCompass||((t="ondeviceorientationabsolute"in window)||"ondeviceorientation"in window)&&(e=this,i=function(){l.DomEvent.on(window,t?"deviceorientationabsolute":"deviceorientation",e._onDeviceOrientation,e)},DeviceOrientationEvent&&"function"==typeof DeviceOrientationEvent.requestPermission?DeviceOrientationEvent.requestPermission().then(function(t){"granted"===t&&i()}):i()))},_deactivate:function(){this._map.stopLocate(),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.options.showCompass&&(this._compassHeading=null,"ondeviceorientationabsolute"in window?l.DomEvent.off(window,"deviceorientationabsolute",this._onDeviceOrientation,this):"ondeviceorientation"in window&&l.DomEvent.off(window,"deviceorientation",this._onDeviceOrientation,this))}
28,setView:function(){var t;this._drawMarker(),this._isOutsideMapBounds()?(this._event=void 0,this.options.onLocationOutsideMapBounds(this)):this._justClicked&&!1!==this.options.initialZoomLevel?(t=this.options.flyTo?this._map.flyTo:this._map.setView).bind(this._map)([this._event.latitude,this._event.longitude],this.options.initialZoomLevel):this.options.keepCurrentZoomLevel?(t=this.options.flyTo?this._map.flyTo:this._map.panTo).bind(this._map)([this._event.latitude,this._event.longitude]):(t=this.options.flyTo?this._map.flyToBounds:this._map.fitBounds,this._ignoreEvent=!0,t.bind(this._map)(this.options.getLocationBounds(this._event),{padding:this.options.circlePadding,maxZoom:this.options.locateOptions.maxZoom}),l.Util.requestAnimFrame(function(){this._ignoreEvent=!1},this))},_drawCompass:function(){var t,e;this._event&&(t=this._event.latlng,this.options.showCompass&&t&&null!==this._compassHeading&&(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:function(){void 0===this._event.accuracy&&(this._event.accuracy=0);var t,e,i,n,r=this._event.accuracy,o=this._event.latlng;this.options.drawCircle&&(t=this._isFollowing()?this.options.followCircleStyle:this.options.circleStyle,this._circle?this._circle.setLatLng(o).setRadius(r).setStyle(t):this._circle=l.circle(o,r,t).addTo(this._layer)),i=this.options.metric?(e=r.toFixed(0),this.options.strings.metersUnit):(e=(3.2808399*r).toFixed(0),this.options.strings.feetUnit),this.options.drawMarker&&(n=this._isFollowing()?this.options.followMarkerStyle:this.options.markerStyle,this._marker?(this._marker.setLatLng(o),this._marker.setStyle&&this._marker.setStyle(n)):this._marker=new this.options.markerClass(o,n).addTo(this._layer)),this._drawCompass();var a=this.options.strings.popup;function s(){return"string"==typeof a?l.Util.template(a,{distance:e,unit:i}):"function"==typeof a?a({distance:e,unit:i}):a}this.options.showPopup&&a&&this._marker&&this._marker.bindPopup(s())._popup.setLatLng(o),this.options.showPopup&&a&&this._compass&&this._compass.bindPopup(s())._popup.setLatLng(o)},_removeMarker:function(){this._layer.clearLayers(),this._marker=void 0,this._circle=void 0},_unload:function(){this.stop(),this._map.off("unload",this._unload,this)},_setCompassHeading:function(t){!isNaN(parseFloat(t))&&isFinite(t)?(t=Math.round(t),this._compassHeading=t,l.Util.requestAnimFrame(this._drawCompass,this)):this._compassHeading=null},_onCompassNeedsCalibration:function(){this._setCompassHeading()},_onDeviceOrientation:function(t){this._active&&(t.webkitCompassHeading?this._setCompassHeading(t.webkitCompassHeading):t.absolute&&t.alpha&&this._setCompassHeading(360-t.alpha))},_onLocationError:function(t){3==t.code&&this.options.locateOptions.watch||(this.stop(),this.options.onLocationError(t,this))},_onLocationFound:function(t){if((!this._event||this._event.latlng.lat!==t.latlng.lat||this._event.latlng.lng!==t.latlng.lng||this._event.accuracy!==t.accuracy)&&this._active){switch(this._event=t,this._drawMarker(),this._updateContainerStyle(),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:function(){this._event&&!this._ignoreEvent&&(this._userPanned=!0,this._updateContainerStyle(),this._drawMarker())},_onZoom:function(){this._event&&!this._ignoreEvent&&(this._userZoomed=!0,this._updateContainerStyle(),this._drawMarker())},_onZoomEnd:function(){this._event&&this._drawCompass(),this._event&&!this._ignoreEvent&&this._marker&&!this._map.getBounds().pad(-.3).contains(this._marker.getLatLng())&&(this._userPanned=!0,this._updateContainerStyle(),this._drawMarker())},_isFollowing:function(){return!!this._active&&("always"===this.options.setView||("untilPan"===this.options.setView?!this._userPanned:"untilPanOrZoom"===this.options.setView?!this._userPanned&&!this._userZoomed:void 0))},_isOutsideMapBounds:function(){return void 0!==this._event&&(this._map.options.maxBounds&&!this._map.options.maxBounds.contains(this._event.latlng))},_updateContainerStyle:function(){this._container&&(this._active&&!this._event?this._setClasses("requesting"):this._isFollowing()?this._setClasses("following"):this._active?this._setClasses("active"):this._cleanClasse
28s())},_setClasses:function(t){"requesting"==t?(n(this._container,"active following"),e(this._container,"requesting"),n(this._icon,this.options.icon),e(this._icon,this.options.iconLoading)):"active"==t?(n(this._container,"requesting following"),e(this._container,"active"),n(this._icon,this.options.iconLoading),e(this._icon,this.options.icon)):"following"==t&&(n(this._container,"requesting"),e(this._container,"active following"),n(this._icon,this.options.iconLoading),e(this._icon,this.options.icon))},_cleanClasses:function(){l.DomUtil.removeClass(this._container,"requesting"),l.DomUtil.removeClass(this._container,"active"),l.DomUtil.removeClass(this._container,"following"),n(this._icon,this.options.iconLoading),e(this._icon,this.options.icon)},_resetVariables:function(){this._active=!1,this._justClicked=!1,this._userPanned=!1,this._userZoomed=!1}});return l.control.locate=function(t){return new l.Control.Locate(t)},o},s=window,r=[i(0)],void 0===(o="function"==typeof(n=a)?n.apply(e,r):n)||(t.exports=o),void 0!==s&&s.L&&(s.L.Control.Locate=a(L))},function(t,e,i){var n,r,o;r=[i(0)],void 0===(o="function"==typeof(n=function(h){h.Map.mergeOptions({contextmenuItems:[]}),h.Map.ContextMenu=h.Handler.extend({_touchstart:h.Browser.msPointer?"MSPointerDown":h.Browser.pointer?"pointerdown":"touchstart",statics:{BASE_CLS:"leaflet-contextmenu"},initialize:function(t){h.Handler.prototype.initialize.call(this,t);this._items=[];this._visible=false;var e=this._container=h.DomUtil.create("div",h.Map.ContextMenu.BASE_CLS,t._container);e.style.zIndex=1e4;e.style.position="absolute";if(t.options.contextmenuWidth){e.style.width=t.options.contextmenuWidth+"px"}this._createItems();h.DomEvent.on(e,"click",h.DomEvent.stop).on(e,"mousedown",h.DomEvent.stop).on(e,"dblclick",h.DomEvent.stop).on(e,"contextmenu",h.DomEvent.stop)},addHooks:function(){var t=this._map.getContainer();h.DomEvent.on(t,"mouseleave",this._hide,this).on(document,"keydown",this._onKeyDown,this);if(h.Browser.touch){h.DomEvent.on(document,this._touchstart,this._hide,this)}this._map.on({contextmenu:this._show,mousedown:this._hide,movestart:this._hide,zoomstart:this._hide},this)},removeHooks:function(){var t=this._map.getContainer();h.DomEvent.off(t,"mouseleave",this._hide,this).off(document,"keydown",this._onKeyDown,this);if(h.Browser.touch){h.DomEvent.off(document,this._touchstart,this._hide,this)}this._map.off({contextmenu:this._show,mousedown:this._hide,movestart:this._hide,zoomstart:this._hide},this)},showAt:function(t,e){if(t instanceof h.LatLng){t=this._map.latLngToContainerPoint(t)}this._showAtPoint(t,e)},hide:function(){this._hide()},addItem:function(t){return this.insertItem(t)},insertItem:function(t,e){e=e!==undefined?e:this._items.length;var i=this._createItem(this._container,t,e);this._items.push(i);this._sizeChanged=true;this._map.fire("contextmenu.additem",{contextmenu:this,el:i.el,index:e});return i.el},removeItem:function(t){var e=this._container;if(!isNaN(t)){t=e.children[t]}if(t){this._removeItem(h.Util.stamp(t));this._sizeChanged=true;this._map.fire("contextmenu.removeitem",{contextmenu:this,el:t});return t}return null},removeAllItems:function(){var t=this._container.children,e;while(t.length){e=t[0];this._removeItem(h.Util.stamp(e))}return t},hideAllItems:function(){var t,e,i;for(e=0,i=this._items.length;e<i;e++){t=this._items[e];t.el.style.display="none"}},showAllItems:function(){var t,e,i;for(e=0,i=this._items.length;e<i;e++){t=this._items[e];t.el.style.display=""}},setDisabled:function(t,e){var i=this._container,n=h.Map.ContextMenu.BASE_CLS+"-item";if(!isNaN(t)){t=i.children[t]}if(t&&h.DomUtil.hasClass(t,n)){if(e){h.DomUtil.addClass(t,n+"-disabled");this._map.fire("contextmenu.disableitem",{contextmenu:this,el:t})}else{h.DomUtil.removeClass(t,n+"-disabled");this._map.fire("contextmenu.enableitem",{contextmenu:this,el:t})}}},isVisible:function(){return this._visible},_createItems:function(){var t=this._map.options.contextmenuItems,e,i,n;for(i=0,n=t.length;i<n;i++){this._items.push(this._createItem(this._container,t[i]))}},_createItem:function(t,e,i){if(e.separator||e==="-"){return this._createSeparator(t,i)}var n=h.Map.ContextMenu.BASE_CLS+"-item",r=e.disabled?n+" "+n+"-disabled":n,o=this._insertElementAt("a",r,t,i),a=this._createEventHandler(o,e.callback,e.context,e.hideOnSelect),s=this._getIcon(e),l=this._getIconCls(e),u="";if(s){u='<img class="'+h.Map.ContextMenu.BASE_CLS+'-icon" src="'+s+'"/>'}else if(l){u='<span class="'+h.Map.ContextMenu.BASE_CLS+"-icon "+l+'"></span>'}o.innerHTML=u+e.text;o.href="#";h.DomEvent.on(o,"mouseover",this._onItemMouseOver,this).on(o,"mouseout",this._onItemMouseOut,this).on(o,"mousedown",h.DomEvent.stopPropagation).on(o,"click",a);if(h.Browser.touch){h.DomEvent.on(o,this._touchstart,h.DomEvent.stopPropagation)}if(!h.Browser.pointer){h.DomEvent.on(o,"click",this._onItemMouseOut,this)}return{id:h.Util.stamp(o),el:o,callback:a}},_removeItem:function(t){var e,i,n,r,o;for(n=0,r=this._items.length;n<r;n++){e=this._items[n];if(e.id===t){i=e.el;o=e.callback;if(o){h.DomEvent.off(i,"mouseover",this._onItemMouseOver,this).off(i,"mouseover",this._onItemMouseOut,this).off(i,"mousedown",h.DomEvent.stopPropagation).off(i,"click",o);if(h.Browser.touch){h.DomEvent.off(i,this._touchstart,h.DomEvent.stopPropagation)}if(!h.Browser.pointer){h.DomEvent.on(i,"click",this._onItemMouseOut,this)}}this._container.removeChild(i);this._items.splice(n,1);return e}}return null},_createSeparator:function(t,e){var i=this._insertElementAt("div",h.Map.ContextMenu.BASE_CLS+"-separator",t,e);return{id:h.Util.stamp(i),el:i}},_createEventHandler:function(e,i,n,r){var o=this,a=this._map,s=h.Map.ContextMenu.BASE_CLS+"-item-disabled",r=r!==undefined?r:true;return function(t){if(h.DomUtil.hasClass(e,s)){return}if(r){o._hide()}if(i){i.call(n||a,o._showLocation)}o._map.fire("contextmenu.select",{contextmenu:o,el:e})}}
28,_insertElementAt:function(t,e,i,n){var r,o=document.createElement(t);o.className=e;if(n!==undefined){r=i.children[n]}if(r){i.insertBefore(o,r)}else{i.appendChild(o)}return o},_show:function(t){this._showAtPoint(t.containerPoint,t)},_showAtPoint:function(t,e){if(this._items.length){var i=this._map,n=i.containerPointToLayerPoint(t),r=i.layerPointToLatLng(n),o=h.extend(e||{},{contextmenu:this});this._showLocation={latlng:r,layerPoint:n,containerPoint:t};if(e&&e.relatedTarget){this._showLocation.relatedTarget=e.relatedTarget}this._setPosition(t);if(!this._visible){this._container.style.display="block";this._visible=true}this._map.fire("contextmenu.show",o)}},_hide:function(){if(this._visible){this._visible=false;this._container.style.display="none";this._map.fire("contextmenu.hide",{contextmenu:this})}},_getIcon:function(t){return h.Browser.retina&&t.retinaIcon||t.icon},_getIconCls:function(t){return h.Browser.retina&&t.retinaIconCls||t.iconCls},_setPosition:function(t){var e=this._map.getSize(),i=this._container,n=this._getElementSize(i),r;if(this._map.options.contextmenuAnchor){r=h.point(this._map.options.contextmenuAnchor);t=t.add(r)}i._leaflet_pos=t;if(t.x+n.x>e.x){i.style.left="auto";i.style.right=Math.min(Math.max(e.x-t.x,0),e.x-n.x-1)+"px"}else{i.style.left=Math.max(t.x,0)+"px";i.style.right="auto"}if(t.y+n.y>e.y){i.style.top="auto";i.style.bottom=Math.min(Math.max(e.y-t.y,0),e.y-n.y-1)+"px"}else{i.style.top=Math.max(t.y,0)+"px";i.style.bottom="auto"}},_getElementSize:function(t){var e=this._size,i=t.style.display;if(!e||this._sizeChanged){e={};t.style.left="-999999px";t.style.right="auto";t.style.display="block";e.x=t.offsetWidth;e.y=t.offsetHeight;t.style.left="auto";t.style.display=i;this._sizeChanged=false}return e},_onKeyDown:function(t){var e=t.keyCode;if(e===27){this._hide()}},_onItemMouseOver:function(t){h.DomUtil.addClass(t.target||t.srcElement,"over")},_onItemMouseOut:function(t){h.DomUtil.removeClass(t.target||t.srcElement,"over")}}),h.Map.addInitHook("addHandler","contextmenu",h.Map.ContextMenu),h.Mixin.ContextMenu={bindContextMenu:function(t){h.setOptions(this,t);this._initContextMenu();return this},unbindContextMenu:function(){this.off("contextmenu",this._showContextMenu,this);return this},addContextMenuItem:function(t){this.options.contextmenuItems.push(t)},removeContextMenuItemWithIndex:function(t){var e=[];for(var i=0;i<this.options.contextmenuItems.length;i++){if(this.options.contextmenuItems[i].index==t){e.push(i)}}var n=e.pop();while(n!==undefined){this.options.contextmenuItems.splice(n,1);n=e.pop()}},replaceContextMenuItem:function(t){this.removeContextMenuItemWithIndex(t.index);this.addContextMenuItem(t)},_initContextMenu:function(){this._items=[];this.on("contextmenu",this._showContextMenu,this)},_showContextMenu:function(t){var e,i,n,r,o;if(this._map.contextmenu){i=h.extend({relatedTarget:this},t);n=this._map.mouseEventToContainerPoint(t.originalEvent);if(!this.options.contextmenuInheritItems){this._map.contextmenu.hideAllItems()}for(r=0,o=this.options.contextmenuItems.length;r<o;r++){e=this.options.contextmenuItems[r];this._items.push(this._map.contextmenu.insertItem(e,e.index))}this._map.once("contextmenu.hide",this._hideContextMenu,this);this._map.contextmenu.showAt(n,i)}},_hideContextMenu:function(){var t,e;for(t=0,e=this._items.length;t<e;t++){this._map.contextmenu.removeItem(this._items[t])}this._items.length=0;if(!this.options.contextmenuInheritItems){this._map.contextmenu.showAllItems()}}};var t=[h.Marker,h.Path],e={contextmenu:false,contextmenuItems:[],contextmenuInheritItems:true},i,n,r;for(n=0,r=t.length;n<r;n++){i=t[n];if(!i.prototype.options){i.prototype.options=e}else{i.mergeOptions(e)}i.addInitHook(function(){if(this.options.contextmenu){this._initContextMenu()}});i.include(h.Mixin.ContextMenu)}return h.Map.ContextMenu})?n.apply(e,r):n)||(t.exports=o)},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){}
28,function(t,e,i){},function(t,e,i){},,,,,function(t,e,i){i(45),i(25),i(26),i(27),i(28),i(29),i(30),i(31),i(32),i(33),i(34),i(35),i(36),i(37),i(38),t.exports=i(39)},function(t,e,i){"use strict";i.r(e);i(11);var n=i(6);window.mapsMarkerPro={callbacks:[]},window.MapsMarkerPro=n.a}]);
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.