ekylibre-cartography 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +3 -0
  3. data/Rakefile +10 -0
  4. data/app/assets/javascripts/cartography.coffee +535 -0
  5. data/app/assets/javascripts/cartography/base.coffee +11 -0
  6. data/app/assets/javascripts/cartography/controls.coffee +463 -0
  7. data/app/assets/javascripts/cartography/events.coffee +36 -0
  8. data/app/assets/javascripts/cartography/layers.coffee +127 -0
  9. data/app/assets/javascripts/cartography/layers/simple.coffee +37 -0
  10. data/app/assets/javascripts/cartography/leaflet/controls.coffee +420 -0
  11. data/app/assets/javascripts/cartography/leaflet/handlers.coffee +461 -0
  12. data/app/assets/javascripts/cartography/leaflet/i18n.coffee +31 -0
  13. data/app/assets/javascripts/cartography/leaflet/layers.coffee +60 -0
  14. data/app/assets/javascripts/cartography/leaflet/toolbars.coffee +450 -0
  15. data/app/assets/javascripts/cartography/patches.js +8 -0
  16. data/app/assets/javascripts/cartography/util.coffee +18 -0
  17. data/app/assets/javascripts/main.js +18 -0
  18. data/app/assets/stylesheets/cartography.css +86 -0
  19. data/app/helpers/cartography_helper.rb +55 -0
  20. data/lib/cartography.rb +1 -0
  21. data/lib/cartography/engine.rb +11 -0
  22. data/lib/cartography/version.rb +3 -0
  23. data/vendor/assets/components/d3-array/dist/d3-array.js +590 -0
  24. data/vendor/assets/components/d3-array/dist/d3-array.min.js +2 -0
  25. data/vendor/assets/components/geojson-equality/dist/geojson-equality.js +295 -0
  26. data/vendor/assets/components/geojson-equality/dist/geojson-equality.js.map +21 -0
  27. data/vendor/assets/components/geojson-equality/dist/geojson-equality.min.js +1 -0
  28. data/vendor/assets/components/leaflet-controlpanel/dist/leaflet.controlpanel.css +29 -0
  29. data/vendor/assets/components/leaflet-controlpanel/dist/leaflet.controlpanel.js +269 -0
  30. data/vendor/assets/components/leaflet-draw-cut/dist/leaflet.draw.cut.css +1 -0
  31. data/vendor/assets/components/leaflet-draw-cut/dist/leaflet.draw.cut.js +8 -0
  32. data/vendor/assets/components/leaflet-draw-merge/dist/leaflet.draw.merge.css +0 -0
  33. data/vendor/assets/components/leaflet-draw-merge/dist/leaflet.draw.merge.js +48026 -0
  34. data/vendor/assets/components/leaflet-draw/dist/leaflet.draw-src.css +326 -0
  35. data/vendor/assets/components/leaflet-draw/dist/leaflet.draw-src.js +4653 -0
  36. data/vendor/assets/components/leaflet-draw/dist/leaflet.draw-src.map +1 -0
  37. data/vendor/assets/components/leaflet-draw/dist/leaflet.draw.css +10 -0
  38. data/vendor/assets/components/leaflet-draw/dist/leaflet.draw.js +10 -0
  39. data/vendor/assets/components/leaflet-geographicutil/dist/leaflet.geographicutil.js +3220 -0
  40. data/vendor/assets/components/leaflet-reactive_measure/dist/reactive_measure.css +30 -0
  41. data/vendor/assets/components/leaflet-reactive_measure/dist/reactive_measure.js +3764 -0
  42. data/vendor/assets/components/leaflet/dist/leaflet-src.js +13609 -0
  43. data/vendor/assets/components/leaflet/dist/leaflet-src.js.map +1 -0
  44. data/vendor/assets/components/leaflet/dist/leaflet-src.map +1 -0
  45. data/vendor/assets/components/leaflet/dist/leaflet.css +632 -0
  46. data/vendor/assets/components/leaflet/dist/leaflet.js +5 -0
  47. data/vendor/assets/components/leaflet/dist/leaflet.js.map +1 -0
  48. data/vendor/assets/components/martinez-polygon-clipping/dist/martinez.min.js +9 -0
  49. data/vendor/assets/components/martinez-polygon-clipping/dist/martinez.umd.js +1716 -0
  50. data/vendor/assets/components/martinez-polygon-clipping/dist/martinez.umd.js.map +1 -0
  51. data/vendor/assets/components/polygon-clipping/dist/polygon-clipping.js +279 -0
  52. data/vendor/assets/components/polygon-clipping/dist/polygon-clipping.min.js +1 -0
  53. data/vendor/assets/components/rtree/dist/rtree.js +911 -0
  54. data/vendor/assets/components/rtree/dist/rtree.min.js +1 -0
  55. data/vendor/assets/components/splaytree/dist/splay.es6.js +765 -0
  56. data/vendor/assets/components/splaytree/dist/splay.es6.js.map +1 -0
  57. data/vendor/assets/components/splaytree/dist/splay.js +797 -0
  58. data/vendor/assets/components/splaytree/dist/splay.js.map +1 -0
  59. metadata +156 -0
@@ -0,0 +1,5 @@
1
+ /* @preserve
2
+ * Leaflet 1.2.0, a JS library for interactive maps. http://leafletjs.com
3
+ * (c) 2010-2017 Vladimir Agafonkin, (c) 2010-2011 CloudMade
4
+ */
5
+ !function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i(t.L={})}(this,function(t){"use strict";function i(t){var i,e,n,o;for(e=1,n=arguments.length;e<n;e++){o=arguments[e];for(i in o)t[i]=o[i]}return t}function e(t,i){var e=Array.prototype.slice;if(t.bind)return t.bind.apply(t,e.call(arguments,1));var n=e.call(arguments,2);return function(){return t.apply(i,n.length?n.concat(e.call(arguments)):arguments)}}function n(t){return t._leaflet_id=t._leaflet_id||++ti,t._leaflet_id}function o(t,i,e){var n,o,s,r;return r=function(){n=!1,o&&(s.apply(e,o),o=!1)},s=function(){n?o=arguments:(t.apply(e,arguments),setTimeout(r,i),n=!0)}}function s(t,i,e){var n=i[1],o=i[0],s=n-o;return t===n&&e?t:((t-o)%s+s)%s+o}function r(){return!1}function a(t,i){var e=Math.pow(10,i||5);return Math.round(t*e)/e}function h(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function u(t){return h(t).split(/\s+/)}function l(t,i){t.hasOwnProperty("options")||(t.options=t.options?Qt(t.options):{});for(var e in i)t.options[e]=i[e];return t.options}function c(t,i,e){var n=[];for(var o in t)n.push(encodeURIComponent(e?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(i&&-1!==i.indexOf("?")?"&":"?")+n.join("&")}function _(t,i){return t.replace(ii,function(t,e){var n=i[e];if(void 0===n)throw new Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(i)),n})}function d(t,i){for(var e=0;e<t.length;e++)if(t[e]===i)return e;return-1}function p(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}function m(t){var i=+new Date,e=Math.max(0,16-(i-oi));return oi=i+e,window.setTimeout(t,e)}function f(t,i,n){if(!n||si!==m)return si.call(window,e(t,i));t.call(i)}function g(t){t&&ri.call(window,t)}function v(){}function y(t){if(L&&L.Mixin){t=ei(t)?t:[t];for(var i=0;i<t.length;i++)t[i]===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)}}function x(t,i,e){this.x=e?Math.round(t):t,this.y=e?Math.round(i):i}function w(t,i,e){return t instanceof x?t:ei(t)?new x(t[0],t[1]):void 0===t||null===t?t:"object"==typeof t&&"x"in t&&"y"in t?new x(t.x,t.y):new x(t,i,e)}function P(t,i){if(t)for(var e=i?[t,i]:t,n=0,o=e.length;n<o;n++)this.extend(e[n])}function b(t,i){return!t||t instanceof P?t:new P(t,i)}function T(t,i){if(t)for(var e=i?[t,i]:t,n=0,o=e.length;n<o;n++)this.extend(e[n])}function z(t,i){return t instanceof T?t:new T(t,i)}function M(t,i,e){if(isNaN(t)||isNaN(i))throw new Error("Invalid LatLng object: ("+t+", "+i+")");this.lat=+t,this.lng=+i,void 0!==e&&(this.alt=+e)}function C(t,i,e){return t instanceof M?t:ei(t)&&"object"!=typeof t[0]?3===t.length?new M(t[0],t[1],t[2]):2===t.length?new M(t[0],t[1]):null:void 0===t||null===t?t:"object"==typeof t&&"lat"in t?new M(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===i?null:new M(t,i,e)}function Z(t,i,e,n){if(ei(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=i,this._c=e,this._d=n}function E(t,i,e,n){return new Z(t,i,e,n)}function S(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function k(t,i){var e,n,o,s,r,a,h="";for(e=0,o=t.length;e<o;e++){for(n=0,s=(r=t[e]).length;n<s;n++)a=r[n],h+=(n?"L":"M")+a.x+" "+a.y;h+=i?qi?"z":"x":""}return h||"M0 0"}function B(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}function I(t,i,e,n){return"touchstart"===i?O(t,e,n):"touchmove"===i?W(t,e,n):"touchend"===i&&H(t,e,n),this}function A(t,i,e){var n=t["_leaflet_"+i+e];return"touchstart"===i?t.removeEventListener(Xi,n,!1):"touchmove"===i?t.removeEventListener(Ji,n,!1):"touchend"===i&&(t.removeEventListener($i,n,!1),t.removeEventListener(Qi,n,!1)),this}function O(t,i,n){var o=e(function(t){if("mouse"!==t.pointerType&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(!(te.indexOf(t.target.tagName)<0))return;$(t)}j(t,i)});t["_leaflet_touchstart"+n]=o,t.addEventListener(Xi,o,!1),ee||(document.documentElement.addEventListener(Xi,R,!0),document.documentElement.addEventListener(Ji,D,!0),document.documentElement.addEventListener($i,N,!0),document.documentElement.addEventListener(Qi,N,!0),ee=!0)}function R(t){ie[t.pointerId]=t,ne++}function D(t){ie[t.pointerId]&&(ie[t.pointerId]=t)}function N(t){delete ie[t.pointerId],ne--}function j(t,i){t.touches=[];for(var e in ie)t.touches.push(ie[e]);t.changedTouches=[t],i(t)}function W(t,i,e){var n=function(t){(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons)&&j(t,i)};t["_leaflet_touchmove"+e]=n,t.addEventListener(Ji,n,!1)}function H(t,i,e){var n=function(t){j(t,i)};t["_leaflet_touchend"+e]=n,t.addEventListener($i,n,!1),t.addEventListener(Qi,n,!1)}function F(t,i,e){function n(t){var i;if(Wi){if(!Li||"mouse"===t.pointerType)return;i=ne}else i=t.touches.length;if(!(i>1)){var e=Date.now(),n=e-(s||e);r=t.touches?t.touches[0]:t,a=n>0&&n<=h,s=e}}function o(t){if(a&&!r.cancelBubble){if(Wi){if(!Li||"mouse"===t.pointerType)return;var e,n,o={};for(n in r)e=r[n],o[n]=e&&e.bind?e.bind(r):e;r=o}r.type="dblclick",i(r),s=null}}var s,r,a=!1,h=250;return t[re+oe+e]=n,t[re+se+e]=o,t[re+"dblclick"+e]=i,t.addEventListener(oe,n,!1),t.addEventListener(se,o,!1),t.addEventListener("dblclick",i,!1),this}function U(t,i){var e=t[re+oe+i],n=t[re+se+i],o=t[re+"dblclick"+i];return t.removeEventListener(oe,e,!1),t.removeEventListener(se,n,!1),Li||t.removeEventListener("dblclick",o,!1),this}function V(t,i,e,n){if("object"==typeof i)for(var o in i)q(t,o,i[o],e);else for(var s=0,r=(i=u(i)).length;s<r;s++)q(t,i[s],e,n);return this}function G(t,i,e,n){if("object"==typeof i)for(var o in i)K(t,o,i[o],e);else if(i)for(var s=0,r=(i=u(i)).length;s<r;s++)K(t,i[s],e,n);else{for(var a in t[ae])K(t,a,t[ae][a]);delete t[ae]}return this}function q(t,i,e,o){var s=i+n(e)+(o?"_"+n(o):"");if(t[ae]&&t[ae][s])return this;var r=function(i){return e.call(o||t,i||window.event)},a=r;Wi&&0===i.indexOf("touch")?I(t,i,r,s):!Hi||"dblclick"!==i||!F||Wi&&Mi?"addEventListener"in t?"mousewheel"===i?t.addEventListener("onwheel"in t?"wheel":"mousewheel",r,!1):"mouseenter"===i||"mouseleave"===i?(r=function(i){i=i||window.event,ot(t,i)&&a(i)},t.addEventListener("mouseenter"===i?"mouseover":"mouseout",r,!1)):("click"===i&&bi&&(r=function(t){st(t,a)}),t.addEventListener(i,r,!1)):"attachEvent"in t&&t.attachEvent("on"+i,r):F(t,r,s),t[ae]=t[ae]||{},t[ae][s]=r}function K(t,i,e,o){var s=i+n(e)+(o?"_"+n(o):""),r=t[ae]&&t[ae][s];if(!r)return this;Wi&&0===i.indexOf("touch")?A(t,i,s):Hi&&"dblclick"===i&&U?U(t,s):"removeEventListener"in t?"mousewheel"===i?t.removeEventListener("onwheel"in t?"wheel":"mousewheel",r,!1):t.removeEventListener("mouseenter"===i?"mouseover":"mouseleave"===i?"mouseout":i,r,!1):"detachEvent"in t&&t.detachEvent("on"+i,r),t[ae][s]=null}function Y(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,nt(t),this}function X(t){return q(t,"mousewheel",Y),this}function J(t){return V(t,"mousedown touchstart dblclick",Y),q(t,"click",et),this}function $(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Q(t){return $(t),Y(t),this}function tt(t,i){if(!i)return new x(t.clientX,t.clientY);var e=i.getBoundingClientRect();return new x(t.clientX-e.left-i.clientLeft,t.clientY-e.top-i.clientTop)}function it(t){return Li?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/he:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function et(t){ue[t.type]=!0}function nt(t){var i=ue[t.type];return ue[t.type]=!1,i}function ot(t,i){var e=i.relatedTarget;if(!e)return!0;try{for(;e&&e!==t;)e=e.parentNode}catch(t){return!1}return e!==t}function st(t,i){var e=t.timeStamp||t.originalEvent&&t.originalEvent.timeStamp,n=di&&e-di;n&&n>100&&n<500||t.target._simulatedClick&&!t._simulated?Q(t):(di=e,i(t))}function rt(t){return"string"==typeof t?document.getElementById(t):t}function at(t,i){var e=t.style[i]||t.currentStyle&&t.currentStyle[i];if((!e||"auto"===e)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);e=n?n[i]:null}return"auto"===e?null:e}function ht(t,i,e){var n=document.createElement(t);return n.className=i||"",e&&e.appendChild(n),n}function ut(t){var i=t.parentNode;i&&i.removeChild(t)}function lt(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function ct(t){var i=t.parentNode;i.lastChild!==t&&i.appendChild(t)}function _t(t){var i=t.parentNode;i.firstChild!==t&&i.insertBefore(t,i.firstChild)}function dt(t,i){if(void 0!==t.classList)return t.classList.contains(i);var e=gt(t);return e.length>0&&new RegExp("(^|\\s)"+i+"(\\s|$)").test(e)}function pt(t,i){if(void 0!==t.classList)for(var e=u(i),n=0,o=e.length;n<o;n++)t.classList.add(e[n]);else if(!dt(t,i)){var s=gt(t);ft(t,(s?s+" ":"")+i)}}function mt(t,i){void 0!==t.classList?t.classList.remove(i):ft(t,h((" "+gt(t)+" ").replace(" "+i+" "," ")))}function ft(t,i){void 0===t.className.baseVal?t.className=i:t.className.baseVal=i}function gt(t){return void 0===t.className.baseVal?t.className:t.className.baseVal}function vt(t,i){"opacity"in t.style?t.style.opacity=i:"filter"in t.style&&yt(t,i)}function yt(t,i){var e=!1,n="DXImageTransform.Microsoft.Alpha";try{e=t.filters.item(n)}catch(t){if(1===i)return}i=Math.round(100*i),e?(e.Enabled=100!==i,e.Opacity=i):t.style.filter+=" progid:"+n+"(opacity="+i+")"}function xt(t){for(var i=document.documentElement.style,e=0;e<t.length;e++)if(t[e]in i)return t[e];return!1}function wt(t,i,e){var n=i||new x(0,0);t.style[ce]=(Bi?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(e?" scale("+e+")":"")}function Lt(t,i){t._leaflet_pos=i,Oi?wt(t,i):(t.style.left=i.x+"px",t.style.top=i.y+"px")}function Pt(t){return t._leaflet_pos||new x(0,0)}function bt(){V(window,"dragstart",$)}function Tt(){G(window,"dragstart",$)}function zt(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Mt(),me=t,fe=t.style.outline,t.style.outline="none",V(window,"keydown",Mt))}function Mt(){me&&(me.style.outline=fe,me=void 0,fe=void 0,G(window,"keydown",Mt))}function Ct(t,i){if(!i||!t.length)return t.slice();var e=i*i;return t=kt(t,e),t=Et(t,e)}function Zt(t,i,e){return Math.sqrt(Rt(t,i,e,!0))}function Et(t,i){var e=t.length,n=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(e);n[0]=n[e-1]=1,St(t,n,i,0,e-1);var o,s=[];for(o=0;o<e;o++)n[o]&&s.push(t[o]);return s}function St(t,i,e,n,o){var s,r,a,h=0;for(r=n+1;r<=o-1;r++)(a=Rt(t[r],t[n],t[o],!0))>h&&(s=r,h=a);h>e&&(i[s]=1,St(t,i,e,n,s),St(t,i,e,s,o))}function kt(t,i){for(var e=[t[0]],n=1,o=0,s=t.length;n<s;n++)Ot(t[n],t[o])>i&&(e.push(t[n]),o=n);return o<s-1&&e.push(t[s-1]),e}function Bt(t,i,e,n,o){var s,r,a,h=n?ze:At(t,e),u=At(i,e);for(ze=u;;){if(!(h|u))return[t,i];if(h&u)return!1;a=At(r=It(t,i,s=h||u,e,o),e),s===h?(t=r,h=a):(i=r,u=a)}}function It(t,i,e,n,o){var s,r,a=i.x-t.x,h=i.y-t.y,u=n.min,l=n.max;return 8&e?(s=t.x+a*(l.y-t.y)/h,r=l.y):4&e?(s=t.x+a*(u.y-t.y)/h,r=u.y):2&e?(s=l.x,r=t.y+h*(l.x-t.x)/a):1&e&&(s=u.x,r=t.y+h*(u.x-t.x)/a),new x(s,r,o)}function At(t,i){var e=0;return t.x<i.min.x?e|=1:t.x>i.max.x&&(e|=2),t.y<i.min.y?e|=4:t.y>i.max.y&&(e|=8),e}function Ot(t,i){var e=i.x-t.x,n=i.y-t.y;return e*e+n*n}function Rt(t,i,e,n){var o,s=i.x,r=i.y,a=e.x-s,h=e.y-r,u=a*a+h*h;return u>0&&((o=((t.x-s)*a+(t.y-r)*h)/u)>1?(s=e.x,r=e.y):o>0&&(s+=a*o,r+=h*o)),a=t.x-s,h=t.y-r,n?a*a+h*h:new x(s,r)}function Dt(t){return!ei(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function Nt(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Dt(t)}function jt(t,i,e){var n,o,s,r,a,h,u,l,c,_=[1,4,2,8];for(o=0,u=t.length;o<u;o++)t[o]._code=At(t[o],i);for(r=0;r<4;r++){for(l=_[r],n=[],o=0,s=(u=t.length)-1;o<u;s=o++)a=t[o],h=t[s],a._code&l?h._code&l||((c=It(h,a,l,i,e))._code=At(c,i),n.push(c)):(h._code&l&&((c=It(h,a,l,i,e))._code=At(c,i),n.push(c)),n.push(a));t=n}return t}function Wt(t,i){var e,n,o,s,r="Feature"===t.type?t.geometry:t,a=r?r.coordinates:null,h=[],u=i&&i.pointToLayer,l=i&&i.coordsToLatLng||Ht;if(!a&&!r)return null;switch(r.type){case"Point":return e=l(a),u?u(t,e):new qe(e);case"MultiPoint":for(o=0,s=a.length;o<s;o++)e=l(a[o]),h.push(u?u(t,e):new qe(e));return new Fe(h);case"LineString":case"MultiLineString":return n=Ft(a,"LineString"===r.type?0:1,l),new Je(n,i);case"Polygon":case"MultiPolygon":return n=Ft(a,"Polygon"===r.type?1:2,l),new $e(n,i);case"GeometryCollection":for(o=0,s=r.geometries.length;o<s;o++){var c=Wt({geometry:r.geometries[o],type:"Feature",properties:t.properties},i);c&&h.push(c)}return new Fe(h);default:throw new Error("Invalid GeoJSON object.")}}function Ht(t){return new M(t[1],t[0],t[2])}function Ft(t,i,e){for(var n,o=[],s=0,r=t.length;s<r;s++)n=i?Ft(t[s],i-1,e):(e||Ht)(t[s]),o.push(n);return o}function Ut(t,i){return i="number"==typeof i?i:6,void 0!==t.alt?[a(t.lng,i),a(t.lat,i),a(t.alt,i)]:[a(t.lng,i),a(t.lat,i)]}function Vt(t,i,e,n){for(var o=[],s=0,r=t.length;s<r;s++)o.push(i?Vt(t[s],i-1,e,n):Ut(t[s],n));return!i&&e&&o.push(o[0]),o}function Gt(t,e){return t.feature?i({},t.feature,{geometry:e}):qt(e)}function qt(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}function Kt(t,i){return new Qe(t,i)}function Yt(t,i){return new ln(t,i)}function Xt(t){return Gi?new dn(t):null}function Jt(t){return qi||Ki?new gn(t):null}var $t=Object.freeze;Object.freeze=function(t){return t};var Qt=Object.create||function(){function t(){}return function(i){return t.prototype=i,new t}}(),ti=0,ii=/\{ *([\w_\-]+) *\}/g,ei=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},ni="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=",oi=0,si=window.requestAnimationFrame||p("RequestAnimationFrame")||m,ri=window.cancelAnimationFrame||p("CancelAnimationFrame")||p("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)},ai=(Object.freeze||Object)({freeze:$t,extend:i,create:Qt,bind:e,lastId:ti,stamp:n,throttle:o,wrapNum:s,falseFn:r,formatNum:a,trim:h,splitWords:u,setOptions:l,getParamString:c,template:_,isArray:ei,indexOf:d,emptyImageUrl:ni,requestFn:si,cancelFn:ri,requestAnimFrame:f,cancelAnimFrame:g});v.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},n=e.__super__=this.prototype,o=Qt(n);o.constructor=e,e.prototype=o;for(var s in this)this.hasOwnProperty(s)&&"prototype"!==s&&"__super__"!==s&&(e[s]=this[s]);return t.statics&&(i(e,t.statics),delete t.statics),t.includes&&(y(t.includes),i.apply(null,[o].concat(t.includes)),delete t.includes),o.options&&(t.options=i(Qt(o.options),t.options)),i(o,t),o._initHooks=[],o.callInitHooks=function(){if(!this._initHooksCalled){n.callInitHooks&&n.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,i=o._initHooks.length;t<i;t++)o._initHooks[t].call(this)}},e},v.include=function(t){return i(this.prototype,t),this},v.mergeOptions=function(t){return i(this.prototype.options,t),this},v.addInitHook=function(t){var i=Array.prototype.slice.call(arguments,1),e="function"==typeof t?t:function(){this[t].apply(this,i)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(e),this};var hi={on:function(t,i,e){if("object"==typeof t)for(var n in t)this._on(n,t[n],i);else for(var o=0,s=(t=u(t)).length;o<s;o++)this._on(t[o],i,e);return this},off:function(t,i,e){if(t)if("object"==typeof t)for(var n in t)this._off(n,t[n],i);else for(var o=0,s=(t=u(t)).length;o<s;o++)this._off(t[o],i,e);else delete this._events;return this},_on:function(t,i,e){this._events=this._events||{};var n=this._events[t];n||(n=[],this._events[t]=n),e===this&&(e=void 0);for(var o={fn:i,ctx:e},s=n,r=0,a=s.length;r<a;r++)if(s[r].fn===i&&s[r].ctx===e)return;s.push(o)},_off:function(t,i,e){var n,o,s;if(this._events&&(n=this._events[t]))if(i){if(e===this&&(e=void 0),n)for(o=0,s=n.length;o<s;o++){var a=n[o];if(a.ctx===e&&a.fn===i)return a.fn=r,this._firingCount&&(this._events[t]=n=n.slice()),void n.splice(o,1)}}else{for(o=0,s=n.length;o<s;o++)n[o].fn=r;delete this._events[t]}},fire:function(t,e,n){if(!this.listens(t,n))return this;var o=i({},e,{type:t,target:this});if(this._events){var s=this._events[t];if(s){this._firingCount=this._firingCount+1||1;for(var r=0,a=s.length;r<a;r++){var h=s[r];h.fn.call(h.ctx||this,o)}this._firingCount--}}return n&&this._propagateEvent(o),this},listens:function(t,i){var e=this._events&&this._events[t];if(e&&e.length)return!0;if(i)for(var n in this._eventParents)if(this._eventParents[n].listens(t,i))return!0;return!1},once:function(t,i,n){if("object"==typeof t){for(var o in t)this.once(o,t[o],i);return this}var s=e(function(){this.off(t,i,n).off(t,s,n)},this);return this.on(t,i,n).on(t,s,n)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[n(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[n(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,i({layer:t.target},t),!0)}};hi.addEventListener=hi.on,hi.removeEventListener=hi.clearAllEventListeners=hi.off,hi.addOneTimeEventListener=hi.once,hi.fireEvent=hi.fire,hi.hasEventListeners=hi.listens;var ui=v.extend(hi);x.prototype={clone:function(){return new x(this.x,this.y)},add:function(t){return this.clone()._add(w(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(w(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new x(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new x(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},distanceTo:function(t){var i=(t=w(t)).x-this.x,e=t.y-this.y;return Math.sqrt(i*i+e*e)},equals:function(t){return(t=w(t)).x===this.x&&t.y===this.y},contains:function(t){return t=w(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+a(this.x)+", "+a(this.y)+")"}},P.prototype={extend:function(t){return t=w(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new x((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new x(this.min.x,this.max.y)},getTopRight:function(){return new x(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 i,e;return(t="number"==typeof t[0]||t instanceof x?w(t):b(t))instanceof P?(i=t.min,e=t.max):i=e=t,i.x>=this.min.x&&e.x<=this.max.x&&i.y>=this.min.y&&e.y<=this.max.y},intersects:function(t){t=b(t);var i=this.min,e=this.max,n=t.min,o=t.max,s=o.x>=i.x&&n.x<=e.x,r=o.y>=i.y&&n.y<=e.y;return s&&r},overlaps:function(t){t=b(t);var i=this.min,e=this.max,n=t.min,o=t.max,s=o.x>i.x&&n.x<e.x,r=o.y>i.y&&n.y<e.y;return s&&r},isValid:function(){return!(!this.min||!this.max)}},T.prototype={extend:function(t){var i,e,n=this._southWest,o=this._northEast;if(t instanceof M)i=t,e=t;else{if(!(t instanceof T))return t?this.extend(C(t)||z(t)):this;if(i=t._southWest,e=t._northEast,!i||!e)return this}return n||o?(n.lat=Math.min(i.lat,n.lat),n.lng=Math.min(i.lng,n.lng),o.lat=Math.max(e.lat,o.lat),o.lng=Math.max(e.lng,o.lng)):(this._southWest=new M(i.lat,i.lng),this._northEast=new M(e.lat,e.lng)),this},pad:function(t){var i=this._southWest,e=this._northEast,n=Math.abs(i.lat-e.lat)*t,o=Math.abs(i.lng-e.lng)*t;return new T(new M(i.lat-n,i.lng-o),new M(e.lat+n,e.lng+o))},getCenter:function(){return new M((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 M(this.getNorth(),this.getWest())},getSouthEast:function(){return new M(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof M||"lat"in t?C(t):z(t);var i,e,n=this._southWest,o=this._northEast;return t instanceof T?(i=t.getSouthWest(),e=t.getNorthEast()):i=e=t,i.lat>=n.lat&&e.lat<=o.lat&&i.lng>=n.lng&&e.lng<=o.lng},intersects:function(t){t=z(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=i.lat&&n.lat<=e.lat,r=o.lng>=i.lng&&n.lng<=e.lng;return s&&r},overlaps:function(t){t=z(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>i.lat&&n.lat<e.lat,r=o.lng>i.lng&&n.lng<e.lng;return s&&r},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,i){return!!t&&(t=z(t),this._southWest.equals(t.getSouthWest(),i)&&this._northEast.equals(t.getNorthEast(),i))},isValid:function(){return!(!this._southWest||!this._northEast)}},M.prototype={equals:function(t,i){return!!t&&(t=C(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===i?1e-9:i))},toString:function(t){return"LatLng("+a(this.lat,t)+", "+a(this.lng,t)+")"},distanceTo:function(t){return ci.distance(this,C(t))},wrap:function(){return ci.wrapLatLng(this)},toBounds:function(t){var i=180*t/40075017,e=i/Math.cos(Math.PI/180*this.lat);return z([this.lat-i,this.lng-e],[this.lat+i,this.lng+e])},clone:function(){return new M(this.lat,this.lng,this.alt)}};var li={latLngToPoint:function(t,i){var e=this.projection.project(t),n=this.scale(i);return this.transformation._transform(e,n)},pointToLatLng:function(t,i){var e=this.scale(i),n=this.transformation.untransform(t,e);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 i=this.projection.bounds,e=this.scale(t);return new P(this.transformation.transform(i.min,e),this.transformation.transform(i.max,e))},infinite:!1,wrapLatLng:function(t){var i=this.wrapLng?s(t.lng,this.wrapLng,!0):t.lng;return new M(this.wrapLat?s(t.lat,this.wrapLat,!0):t.lat,i,t.alt)},wrapLatLngBounds:function(t){var i=t.getCenter(),e=this.wrapLatLng(i),n=i.lat-e.lat,o=i.lng-e.lng;if(0===n&&0===o)return t;var s=t.getSouthWest(),r=t.getNorthEast();return new T(new M(s.lat-n,s.lng-o),new M(r.lat-n,r.lng-o))}},ci=i({},li,{wrapLng:[-180,180],R:6371e3,distance:function(t,i){var e=Math.PI/180,n=t.lat*e,o=i.lat*e,s=Math.sin(n)*Math.sin(o)+Math.cos(n)*Math.cos(o)*Math.cos((i.lng-t.lng)*e);return this.R*Math.acos(Math.min(s,1))}}),_i={R:6378137,MAX_LATITUDE:85.0511287798,project:function(t){var i=Math.PI/180,e=this.MAX_LATITUDE,n=Math.max(Math.min(e,t.lat),-e),o=Math.sin(n*i);return new x(this.R*t.lng*i,this.R*Math.log((1+o)/(1-o))/2)},unproject:function(t){var i=180/Math.PI;return new M((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*i,t.x*i/this.R)},bounds:function(){var t=6378137*Math.PI;return new P([-t,-t],[t,t])}()};Z.prototype={transform:function(t,i){return this._transform(t.clone(),i)},_transform:function(t,i){return i=i||1,t.x=i*(this._a*t.x+this._b),t.y=i*(this._c*t.y+this._d),t},untransform:function(t,i){return i=i||1,new x((t.x/i-this._b)/this._a,(t.y/i-this._d)/this._c)}};var di,pi,mi,fi,gi=i({},ci,{code:"EPSG:3857",projection:_i,transformation:function(){var t=.5/(Math.PI*_i.R);return E(t,.5,-t,.5)}()}),vi=i({},gi,{code:"EPSG:900913"}),yi=document.documentElement.style,xi="ActiveXObject"in window,wi=xi&&!document.addEventListener,Li="msLaunchUri"in navigator&&!("documentMode"in document),Pi=B("webkit"),bi=B("android"),Ti=B("android 2")||B("android 3"),zi=!!window.opera,Mi=B("chrome"),Ci=B("gecko")&&!Pi&&!zi&&!xi,Zi=!Mi&&B("safari"),Ei=B("phantom"),Si="OTransition"in yi,ki=0===navigator.platform.indexOf("Win"),Bi=xi&&"transition"in yi,Ii="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!Ti,Ai="MozPerspective"in yi,Oi=!window.L_DISABLE_3D&&(Bi||Ii||Ai)&&!Si&&!Ei,Ri="undefined"!=typeof orientation||B("mobile"),Di=Ri&&Pi,Ni=Ri&&Ii,ji=!window.PointerEvent&&window.MSPointerEvent,Wi=!(!window.PointerEvent&&!ji),Hi=!window.L_NO_TOUCH&&(Wi||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),Fi=Ri&&zi,Ui=Ri&&Ci,Vi=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Gi=!!document.createElement("canvas").getContext,qi=!(!document.createElementNS||!S("svg").createSVGRect),Ki=!qi&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(t){return!1}}(),Yi=(Object.freeze||Object)({ie:xi,ielt9:wi,edge:Li,webkit:Pi,android:bi,android23:Ti,opera:zi,chrome:Mi,gecko:Ci,safari:Zi,phantom:Ei,opera12:Si,win:ki,ie3d:Bi,webkit3d:Ii,gecko3d:Ai,any3d:Oi,mobile:Ri,mobileWebkit:Di,mobileWebkit3d:Ni,msPointer:ji,pointer:Wi,touch:Hi,mobileOpera:Fi,mobileGecko:Ui,retina:Vi,canvas:Gi,svg:qi,vml:Ki}),Xi=ji?"MSPointerDown":"pointerdown",Ji=ji?"MSPointerMove":"pointermove",$i=ji?"MSPointerUp":"pointerup",Qi=ji?"MSPointerCancel":"pointercancel",te=["INPUT","SELECT","OPTION"],ie={},ee=!1,ne=0,oe=ji?"MSPointerDown":Wi?"pointerdown":"touchstart",se=ji?"MSPointerUp":Wi?"pointerup":"touchend",re="_leaflet_",ae="_leaflet_events",he=ki&&Mi?2*window.devicePixelRatio:Ci?window.devicePixelRatio:1,ue={},le=(Object.freeze||Object)({on:V,off:G,stopPropagation:Y,disableScrollPropagation:X,disableClickPropagation:J,preventDefault:$,stop:Q,getMousePosition:tt,getWheelDelta:it,fakeStop:et,skipped:nt,isExternalTarget:ot,addListener:V,removeListener:G}),ce=xt(["transform","WebkitTransform","OTransform","MozTransform","msTransform"]),_e=xt(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),de="webkitTransition"===_e||"OTransition"===_e?_e+"End":"transitionend";if("onselectstart"in document)pi=function(){V(window,"selectstart",$)},mi=function(){G(window,"selectstart",$)};else{var pe=xt(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);pi=function(){if(pe){var t=document.documentElement.style;fi=t[pe],t[pe]="none"}},mi=function(){pe&&(document.documentElement.style[pe]=fi,fi=void 0)}}var me,fe,ge=(Object.freeze||Object)({TRANSFORM:ce,TRANSITION:_e,TRANSITION_END:de,get:rt,getStyle:at,create:ht,remove:ut,empty:lt,toFront:ct,toBack:_t,hasClass:dt,addClass:pt,removeClass:mt,setClass:ft,getClass:gt,setOpacity:vt,testProp:xt,setTransform:wt,setPosition:Lt,getPosition:Pt,disableTextSelection:pi,enableTextSelection:mi,disableImageDrag:bt,enableImageDrag:Tt,preventOutline:zt,restoreOutline:Mt}),ve=ui.extend({run:function(t,i,e,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=e||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=Pt(t),this._offset=i.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=f(this._animate,this),this._step()},_step:function(t){var i=+new Date-this._startTime,e=1e3*this._duration;i<e?this._runFrame(this._easeOut(i/e),t):(this._runFrame(1),this._complete())},_runFrame:function(t,i){var e=this._startPos.add(this._offset.multiplyBy(t));i&&e._round(),Lt(this._el,e),this.fire("step")},_complete:function(){g(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),ye=ui.extend({options:{crs:gi,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,i){i=l(this,i),this._initContainer(t),this._initLayout(),this._onResize=e(this._onResize,this),this._initEvents(),i.maxBounds&&this.setMaxBounds(i.maxBounds),void 0!==i.zoom&&(this._zoom=this._limitZoom(i.zoom)),i.center&&void 0!==i.zoom&&this.setView(C(i.center),i.zoom,{reset:!0}),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this.callInitHooks(),this._zoomAnimated=_e&&Oi&&!Fi&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),V(this._proxy,de,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,n){return e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(C(t),e,this.options.maxBounds),n=n||{},this._stop(),this._loaded&&!n.reset&&!0!==n&&(void 0!==n.animate&&(n.zoom=i({animate:n.animate},n.zoom),n.pan=i({animate:n.animate,duration:n.duration},n.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,e),this)},setZoom:function(t,i){return this._loaded?this.setView(this.getCenter(),t,{zoom:i}):(this._zoom=t,this)},zoomIn:function(t,i){return t=t||(Oi?this.options.zoomDelta:1),this.setZoom(this._zoom+t,i)},zoomOut:function(t,i){return t=t||(Oi?this.options.zoomDelta:1),this.setZoom(this._zoom-t,i)},setZoomAround:function(t,i,e){var n=this.getZoomScale(i),o=this.getSize().divideBy(2),s=(t instanceof x?t:this.latLngToContainerPoint(t)).subtract(o).multiplyBy(1-1/n),r=this.containerPointToLatLng(o.add(s));return this.setView(r,i,{zoom:e})},_getBoundsCenterZoom:function(t,i){i=i||{},t=t.getBounds?t.getBounds():z(t);var e=w(i.paddingTopLeft||i.padding||[0,0]),n=w(i.paddingBottomRight||i.padding||[0,0]),o=this.getBoundsZoom(t,!1,e.add(n));if((o="number"==typeof i.maxZoom?Math.min(i.maxZoom,o):o)===1/0)return{center:t.getCenter(),zoom:o};var s=n.subtract(e).divideBy(2),r=this.project(t.getSouthWest(),o),a=this.project(t.getNorthEast(),o);return{center:this.unproject(r.add(a).divideBy(2).add(s),o),zoom:o}},fitBounds:function(t,i){if(!(t=z(t)).isValid())throw new Error("Bounds are not valid.");var e=this._getBoundsCenterZoom(t,i);return this.setView(e.center,e.zoom,i)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,i){return this.setView(t,this._zoom,{pan:i})},panBy:function(t,i){if(t=w(t).round(),i=i||{},!t.x&&!t.y)return this.fire("moveend");if(!0!==i.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new ve,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),i.noMoveStart||this.fire("movestart"),!1!==i.animate){pt(this._mapPane,"leaflet-pan-anim");var e=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,e,i.duration||.25,i.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,i,e){function n(t){var i=(g*g-m*m+(t?-1:1)*x*x*v*v)/(2*(t?g:m)*x*v),e=Math.sqrt(i*i+1)-i;return e<1e-9?-18:Math.log(e)}function o(t){return(Math.exp(t)-Math.exp(-t))/2}function s(t){return(Math.exp(t)+Math.exp(-t))/2}function r(t){return o(t)/s(t)}function a(t){return m*(s(w)/s(w+y*t))}function h(t){return m*(s(w)*r(w+y*t)-o(w))/x}function u(t){return 1-Math.pow(1-t,1.5)}function l(){var e=(Date.now()-L)/b,n=u(e)*P;e<=1?(this._flyToFrame=f(l,this),this._move(this.unproject(c.add(_.subtract(c).multiplyBy(h(n)/v)),p),this.getScaleZoom(m/a(n),p),{flyTo:!0})):this._move(t,i)._moveEnd(!0)}if(!1===(e=e||{}).animate||!Oi)return this.setView(t,i,e);this._stop();var c=this.project(this.getCenter()),_=this.project(t),d=this.getSize(),p=this._zoom;t=C(t),i=void 0===i?p:i;var m=Math.max(d.x,d.y),g=m*this.getZoomScale(p,i),v=_.distanceTo(c)||1,y=1.42,x=y*y,w=n(0),L=Date.now(),P=(n(1)-w)/y,b=e.duration?1e3*e.duration:1e3*P*.8;return this._moveStart(!0),l.call(this),this},flyToBounds:function(t,i){var e=this._getBoundsCenterZoom(t,i);return this.flyTo(e.center,e.zoom,i)},setMaxBounds:function(t){return(t=z(t)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},setMinZoom:function(t){return this.options.minZoom=t,this._loaded&&this.getZoom()<this.options.minZoom?this.setZoom(t):this},setMaxZoom:function(t){return this.options.maxZoom=t,this._loaded&&this.getZoom()>this.options.maxZoom?this.setZoom(t):this},panInsideBounds:function(t,i){this._enforcingBounds=!0;var e=this.getCenter(),n=this._limitCenter(e,this._zoom,z(t));return e.equals(n)||this.panTo(n,i),this._enforcingBounds=!1,this},invalidateSize:function(t){if(!this._loaded)return this;t=i({animate:!1,pan:!0},!0===t?{animate:!0}:t);var n=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var o=this.getSize(),s=n.divideBy(2).round(),r=o.divideBy(2).round(),a=s.subtract(r);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(e(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:n,newSize:o})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=i({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var n=e(this._handleGeolocationResponse,this),o=e(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(n,o,t):navigator.geolocation.getCurrentPosition(n,o,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var i=t.code,e=t.message||(1===i?"permission denied":2===i?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:i,message:"Geolocation error: "+e+"."})},_handleGeolocationResponse:function(t){var i=new M(t.coords.latitude,t.coords.longitude),e=i.toBounds(t.coords.accuracy),n=this._locateOptions;if(n.setView){var o=this.getBoundsZoom(e);this.setView(i,n.maxZoom?Math.min(o,n.maxZoom):o)}var s={latlng:i,bounds:e,timestamp:t.timestamp};for(var r in t.coords)"number"==typeof t.coords[r]&&(s[r]=t.coords[r]);this.fire("locationfound",s)},addHandler:function(t,i){if(!i)return this;var e=this[t]=new i(this);return this._handlers.push(e),this.options[t]&&e.enable(),this},remove:function(){if(this._initEvents(!0),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}ut(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._clearHandlers(),this._loaded&&this.fire("unload");var t;for(t in this._layers)this._layers[t].remove();for(t in this._panes)ut(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,i){var e=ht("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),i||this._mapPane);return t&&(this._panes[t]=e),e},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new T(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,i,e){t=z(t),e=w(e||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),a=t.getSouthEast(),h=this.getSize().subtract(e),u=b(this.project(a,n),this.project(r,n)).getSize(),l=Oi?this.options.zoomSnap:1,c=h.x/u.x,_=h.y/u.y,d=i?Math.max(c,_):Math.min(c,_);return n=this.getScaleZoom(d,n),l&&(n=Math.round(n/(l/100))*(l/100),n=i?Math.ceil(n/l)*l:Math.floor(n/l)*l),Math.max(o,Math.min(s,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new x(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,i){var e=this._getTopLeftPoint(t,i);return new P(e,e.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,i){var e=this.options.crs;return i=void 0===i?this._zoom:i,e.scale(t)/e.scale(i)},getScaleZoom:function(t,i){var e=this.options.crs;i=void 0===i?this._zoom:i;var n=e.zoom(t*e.scale(i));return isNaN(n)?1/0:n},project:function(t,i){return i=void 0===i?this._zoom:i,this.options.crs.latLngToPoint(C(t),i)},unproject:function(t,i){return i=void 0===i?this._zoom:i,this.options.crs.pointToLatLng(w(t),i)},layerPointToLatLng:function(t){var i=w(t).add(this.getPixelOrigin());return this.unproject(i)},latLngToLayerPoint:function(t){return this.project(C(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(C(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(z(t))},distance:function(t,i){return this.options.crs.distance(C(t),C(i))},containerPointToLayerPoint:function(t){return w(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return w(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var i=this.containerPointToLayerPoint(w(t));return this.layerPointToLatLng(i)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(C(t)))},mouseEventToContainerPoint:function(t){return tt(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 i=this._container=rt(t);if(!i)throw new Error("Map container not found.");if(i._leaflet_id)throw new Error("Map container is already initialized.");V(i,"scroll",this._onScroll,this),this._containerId=n(i)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&Oi,pt(t,"leaflet-container"+(Hi?" leaflet-touch":"")+(Vi?" leaflet-retina":"")+(wi?" leaflet-oldie":"")+(Zi?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var i=at(t,"position");"absolute"!==i&&"relative"!==i&&"fixed"!==i&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Lt(this._mapPane,new x(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(pt(t.markerPane,"leaflet-zoom-hide"),pt(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,i){Lt(this._mapPane,new x(0,0));var e=!this._loaded;this._loaded=!0,i=this._limitZoom(i),this.fire("viewprereset");var n=this._zoom!==i;this._moveStart(n)._move(t,i)._moveEnd(n),this.fire("viewreset"),e&&this.fire("load")},_moveStart:function(t){return t&&this.fire("zoomstart"),this.fire("movestart")},_move:function(t,i,e){void 0===i&&(i=this._zoom);var n=this._zoom!==i;return this._zoom=i,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(n||e&&e.pinch)&&this.fire("zoom",e),this.fire("move",e)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return g(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Lt(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[n(this._container)]=this;var i=t?G:V;i(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress",this._handleDOMEvent,this),this.options.trackResize&&i(window,"resize",this._onResize,this),Oi&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){g(this._resizeRequest),this._resizeRequest=f(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,i){for(var e,o=[],s="mouseout"===i||"mouseover"===i,r=t.target||t.srcElement,a=!1;r;){if((e=this._targets[n(r)])&&("click"===i||"preclick"===i)&&!t._simulated&&this._draggableMoved(e)){a=!0;break}if(e&&e.listens(i,!0)){if(s&&!ot(r,t))break;if(o.push(e),s)break}if(r===this._container)break;r=r.parentNode}return o.length||a||s||!ot(r,t)||(o=[this]),o},_handleDOMEvent:function(t){if(this._loaded&&!nt(t)){var i=t.type;"mousedown"!==i&&"keypress"!==i||zt(t.target||t.srcElement),this._fireDOMEvent(t,i)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,n){if("click"===t.type){var o=i({},t);o.type="preclick",this._fireDOMEvent(o,o.type,n)}if(!t._stopped&&(n=(n||[]).concat(this._findEventTargets(t,e))).length){var s=n[0];"contextmenu"===e&&s.listens(e,!0)&&$(t);var r={originalEvent:t};if("keypress"!==t.type){var a=s.options&&"icon"in s.options;r.containerPoint=a?this.latLngToContainerPoint(s.getLatLng()):this.mouseEventToContainerPoint(t),r.layerPoint=this.containerPointToLayerPoint(r.containerPoint),r.latlng=a?s.getLatLng():this.layerPointToLatLng(r.layerPoint)}for(var h=0;h<n.length;h++)if(n[h].fire(e,r,!0),r.originalEvent._stopped||!1===n[h].options.bubblingMouseEvents&&-1!==d(this._mouseEvents,e))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,i=this._handlers.length;t<i;t++)this._handlers[t].disable()},whenReady:function(t,i){return this._loaded?t.call(i||this,{target:this}):this.on("load",t,i),this},_getMapPanePos:function(){return Pt(this._mapPane)||new x(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,i){return(t&&void 0!==i?this._getNewPixelOrigin(t,i):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,i){var e=this.getSize()._divideBy(2);return this.project(t,i)._subtract(e)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,i,e){var n=this._getNewPixelOrigin(e,i);return this.project(t,i)._subtract(n)},_latLngBoundsToNewLayerBounds:function(t,i,e){var n=this._getNewPixelOrigin(e,i);return b([this.project(t.getSouthWest(),i)._subtract(n),this.project(t.getNorthWest(),i)._subtract(n),this.project(t.getSouthEast(),i)._subtract(n),this.project(t.getNorthEast(),i)._subtract(n)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,i,e){if(!e)return t;var n=this.project(t,i),o=this.getSize().divideBy(2),s=new P(n.subtract(o),n.add(o)),r=this._getBoundsOffset(s,e,i);return r.round().equals([0,0])?t:this.unproject(n.add(r),i)},_limitOffset:function(t,i){if(!i)return t;var e=this.getPixelBounds(),n=new P(e.min.add(t),e.max.add(t));return t.add(this._getBoundsOffset(n,i))},_getBoundsOffset:function(t,i,e){var n=b(this.project(i.getNorthEast(),e),this.project(i.getSouthWest(),e)),o=n.min.subtract(t.min),s=n.max.subtract(t.max);return new x(this._rebound(o.x,-s.x),this._rebound(o.y,-s.y))},_rebound:function(t,i){return t+i>0?Math.round(t-i)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(i))},_limitZoom:function(t){var i=this.getMinZoom(),e=this.getMaxZoom(),n=Oi?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(i,Math.min(e,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){mt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,i){var e=this._getCenterOffset(t)._floor();return!(!0!==(i&&i.animate)&&!this.getSize().contains(e))&&(this.panBy(e,i),!0)},_createAnimProxy:function(){var t=this._proxy=ht("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var i=ce,e=this._proxy.style[i];wt(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),e===this._proxy.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",function(){var t=this.getCenter(),i=this.getZoom();wt(this._proxy,this.project(t,i),this.getZoomScale(i,1))},this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ut(this._proxy),delete this._proxy},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,i,e){if(this._animatingZoom)return!0;if(e=e||{},!this._zoomAnimated||!1===e.animate||this._nothingToAnimate()||Math.abs(i-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(i),o=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==e.animate&&!this.getSize().contains(o))&&(f(function(){this._moveStart(!0)._animateZoom(t,i,!0)},this),!0)},_animateZoom:function(t,i,n,o){n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=i,pt(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:i,noUpdate:o}),setTimeout(e(this._onZoomTransitionEnd,this),250)},_onZoomTransitionEnd:function(){this._animatingZoom&&(mt(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),f(function(){this._moveEnd(!0)},this))}}),xe=v.extend({options:{position:"topright"},initialize:function(t){l(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var i=this._map;return i&&i.removeControl(this),this.options.position=t,i&&i.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var i=this._container=this.onAdd(t),e=this.getPosition(),n=t._controlCorners[e];return pt(i,"leaflet-control"),-1!==e.indexOf("bottom")?n.insertBefore(i,n.firstChild):n.appendChild(i),this},remove:function(){return this._map?(ut(this._container),this.onRemove&&this.onRemove(this._map),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),we=function(t){return new xe(t)};ye.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){function t(t,o){var s=e+t+" "+e+o;i[t+o]=ht("div",s,n)}var i=this._controlCorners={},e="leaflet-",n=this._controlContainer=ht("div",e+"control-container",this._container);t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)ut(this._controlCorners[t]);ut(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Le=xe.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,i,e,n){return e<n?-1:n<e?1:0}},initialize:function(t,i,e){l(this,e),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1;for(var n in t)this._addLayer(t[n],n);for(n in i)this._addLayer(i[n],n,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var i=0;i<this._layers.length;i++)this._layers[i].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return xe.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,i){return this._addLayer(t,i),this._map?this._update():this},addOverlay:function(t,i){return this._addLayer(t,i,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var i=this._getLayer(n(t));return i&&this._layers.splice(this._layers.indexOf(i),1),this._map?this._update():this},expand:function(){pt(this._container,"leaflet-control-layers-expanded"),this._form.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._form.clientHeight?(pt(this._form,"leaflet-control-layers-scrollbar"),this._form.style.height=t+"px"):mt(this._form,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return mt(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",i=this._container=ht("div",t),e=this.options.collapsed;i.setAttribute("aria-haspopup",!0),J(i),X(i);var n=this._form=ht("form",t+"-list");e&&(this._map.on("click",this.collapse,this),bi||V(i,{mouseenter:this.expand,mouseleave:this.collapse},this));var o=this._layersLink=ht("a",t+"-toggle",i);o.href="#",o.title="Layers",Hi?(V(o,"click",Q),V(o,"click",this.expand,this)):V(o,"focus",this.expand,this),e||this.expand(),this._baseLayersList=ht("div",t+"-base",n),this._separator=ht("div",t+"-separator",n),this._overlaysList=ht("div",t+"-overlays",n),i.appendChild(n)},_getLayer:function(t){for(var i=0;i<this._layers.length;i++)if(this._layers[i]&&n(this._layers[i].layer)===t)return this._layers[i]},_addLayer:function(t,i,n){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:i,overlay:n}),this.options.sortLayers&&this._layers.sort(e(function(t,i){return this.options.sortFunction(t.layer,i.layer,t.name,i.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;lt(this._baseLayersList),lt(this._overlaysList),this._layerControlInputs=[];var t,i,e,n,o=0;for(e=0;e<this._layers.length;e++)n=this._layers[e],this._addItem(n),i=i||n.overlay,t=t||!n.overlay,o+=n.overlay?0:1;return this.options.hideSingleBase&&(t=t&&o>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=i&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var i=this._getLayer(n(t.target)),e=i.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;e&&this._map.fire(e,i)},_createRadioElement:function(t,i){var e='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(i?' checked="checked"':"")+"/>",n=document.createElement("div");return n.innerHTML=e,n.firstChild},_addItem:function(t){var i,e=document.createElement("label"),o=this._map.hasLayer(t.layer);t.overlay?((i=document.createElement("input")).type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=o):i=this._createRadioElement("leaflet-base-layers",o),this._layerControlInputs.push(i),i.layerId=n(t.layer),V(i,"click",this._onInputClick,this);var s=document.createElement("span");s.innerHTML=" "+t.name;var r=document.createElement("div");return e.appendChild(r),r.appendChild(i),r.appendChild(s),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){var t,i,e=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(var s=e.length-1;s>=0;s--)t=e[s],i=this._getLayer(t.layerId).layer,t.checked?n.push(i):t.checked||o.push(i);for(s=0;s<o.length;s++)this._map.hasLayer(o[s])&&this._map.removeLayer(o[s]);for(s=0;s<n.length;s++)this._map.hasLayer(n[s])||this._map.addLayer(n[s]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,i,e=this._layerControlInputs,n=this._map.getZoom(),o=e.length-1;o>=0;o--)t=e[o],i=this._getLayer(t.layerId).layer,t.disabled=void 0!==i.options.minZoom&&n<i.options.minZoom||void 0!==i.options.maxZoom&&n>i.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),Pe=xe.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"&#x2212;",zoomOutTitle:"Zoom out"},onAdd:function(t){var i="leaflet-control-zoom",e=ht("div",i+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,i+"-in",e,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,i+"-out",e,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),e},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,i,e,n,o){var s=ht("a",e,n);return s.innerHTML=t,s.href="#",s.title=i,s.setAttribute("role","button"),s.setAttribute("aria-label",i),J(s),V(s,"click",Q),V(s,"click",o,this),V(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,i="leaflet-disabled";mt(this._zoomInButton,i),mt(this._zoomOutButton,i),(this._disabled||t._zoom===t.getMinZoom())&&pt(this._zoomOutButton,i),(this._disabled||t._zoom===t.getMaxZoom())&&pt(this._zoomInButton,i)}});ye.mergeOptions({zoomControl:!0}),ye.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Pe,this.addControl(this.zoomControl))});var be=xe.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var i=ht("div","leaflet-control-scale"),e=this.options;return this._addScales(e,"leaflet-control-scale-line",i),t.on(e.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,i,e){t.metric&&(this._mScale=ht("div",i,e)),t.imperial&&(this._iScale=ht("div",i,e))},_update:function(){var t=this._map,i=t.getSize().y/2,e=t.distance(t.containerPointToLatLng([0,i]),t.containerPointToLatLng([this.options.maxWidth,i]));this._updateScales(e)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var i=this._getRoundNum(t),e=i<1e3?i+" m":i/1e3+" km";this._updateScale(this._mScale,e,i/t)},_updateImperial:function(t){var i,e,n,o=3.2808399*t;o>5280?(i=o/5280,e=this._getRoundNum(i),this._updateScale(this._iScale,e+" mi",e/i)):(n=this._getRoundNum(o),this._updateScale(this._iScale,n+" ft",n/o))},_updateScale:function(t,i,e){t.style.width=Math.round(this.options.maxWidth*e)+"px",t.innerHTML=i},_getRoundNum:function(t){var i=Math.pow(10,(Math.floor(t)+"").length-1),e=t/i;return e=e>=10?10:e>=5?5:e>=3?3:e>=2?2:1,i*e}}),Te=xe.extend({options:{position:"bottomright",prefix:'<a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){l(this,t),this._attributions={}},onAdd:function(t){t.attributionControl=this,this._container=ht("div","leaflet-control-attribution"),J(this._container);for(var i in t._layers)t._layers[i].getAttribution&&this.addAttribution(t._layers[i].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var i in this._attributions)this._attributions[i]&&t.push(i);var e=[];this.options.prefix&&e.push(this.options.prefix),t.length&&e.push(t.join(", ")),this._container.innerHTML=e.join(" | ")}}});ye.mergeOptions({attributionControl:!0}),ye.addInitHook(function(){this.options.attributionControl&&(new Te).addTo(this)});xe.Layers=Le,xe.Zoom=Pe,xe.Scale=be,xe.Attribution=Te,we.layers=function(t,i,e){return new Le(t,i,e)},we.zoom=function(t){return new Pe(t)},we.scale=function(t){return new be(t)},we.attribution=function(t){return new Te(t)};var ze,Me=v.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}}),Ce={Events:hi},Ze=Hi?"touchstart mousedown":"mousedown",Ee={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},Se={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},ke=ui.extend({options:{clickTolerance:3},initialize:function(t,i,e,n){l(this,n),this._element=t,this._dragStartTarget=i||t,this._preventOutline=e},enable:function(){this._enabled||(V(this._dragStartTarget,Ze,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ke._dragging===this&&this.finishDrag(),G(this._dragStartTarget,Ze,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!dt(this._element,"leaflet-zoom-anim")&&!(ke._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(ke._dragging=this,this._preventOutline&&zt(this._element),bt(),pi(),this._moving)))){this.fire("down");var i=t.touches?t.touches[0]:t;this._startPoint=new x(i.clientX,i.clientY),V(document,Se[t.type],this._onMove,this),V(document,Ee[t.type],this._onUp,this)}},_onMove:function(t){if(!t._simulated&&this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var i=t.touches&&1===t.touches.length?t.touches[0]:t,e=new x(i.clientX,i.clientY).subtract(this._startPoint);(e.x||e.y)&&(Math.abs(e.x)+Math.abs(e.y)<this.options.clickTolerance||($(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=Pt(this._element).subtract(e),pt(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),pt(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(e),this._moving=!0,g(this._animRequest),this._lastEvent=t,this._animRequest=f(this._updatePosition,this,!0)))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),Lt(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){!t._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){mt(document.body,"leaflet-dragging"),this._lastTarget&&(mt(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null);for(var t in Se)G(document,Se[t],this._onMove,this),G(document,Ee[t],this._onUp,this);Tt(),mi(),this._moved&&this._moving&&(g(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,ke._dragging=!1}}),Be=(Object.freeze||Object)({simplify:Ct,pointToSegmentDistance:Zt,closestPointOnSegment:function(t,i,e){return Rt(t,i,e)},clipSegment:Bt,_getEdgeIntersection:It,_getBitCode:At,_sqClosestPointOnSegment:Rt,isFlat:Dt,_flat:Nt}),Ie=(Object.freeze||Object)({clipPolygon:jt}),Ae={project:function(t){return new x(t.lng,t.lat)},unproject:function(t){return new M(t.y,t.x)},bounds:new P([-180,-90],[180,90])},Oe={R:6378137,R_MINOR:6356752.314245179,bounds:new P([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var i=Math.PI/180,e=this.R,n=t.lat*i,o=this.R_MINOR/e,s=Math.sqrt(1-o*o),r=s*Math.sin(n),a=Math.tan(Math.PI/4-n/2)/Math.pow((1-r)/(1+r),s/2);return n=-e*Math.log(Math.max(a,1e-10)),new x(t.lng*i*e,n)},unproject:function(t){for(var i,e=180/Math.PI,n=this.R,o=this.R_MINOR/n,s=Math.sqrt(1-o*o),r=Math.exp(-t.y/n),a=Math.PI/2-2*Math.atan(r),h=0,u=.1;h<15&&Math.abs(u)>1e-7;h++)i=s*Math.sin(a),i=Math.pow((1-i)/(1+i),s/2),a+=u=Math.PI/2-2*Math.atan(r*i)-a;return new M(a*e,t.x*e/n)}},Re=(Object.freeze||Object)({LonLat:Ae,Mercator:Oe,SphericalMercator:_i}),De=i({},ci,{code:"EPSG:3395",projection:Oe,transformation:function(){var t=.5/(Math.PI*Oe.R);return E(t,.5,-t,.5)}()}),Ne=i({},ci,{code:"EPSG:4326",projection:Ae,transformation:E(1/180,1,-1/180,.5)}),je=i({},li,{projection:Ae,transformation:E(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,i){var e=i.lng-t.lng,n=i.lat-t.lat;return Math.sqrt(e*e+n*n)},infinite:!0});li.Earth=ci,li.EPSG3395=De,li.EPSG3857=gi,li.EPSG900913=vi,li.EPSG4326=Ne,li.Simple=je;var We=ui.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[n(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[n(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var i=t.target;if(i.hasLayer(this)){if(this._map=i,this._zoomAnimated=i._zoomAnimated,this.getEvents){var e=this.getEvents();i.on(e,this),this.once("remove",function(){i.off(e,this)},this)}this.onAdd(i),this.getAttribution&&i.attributionControl&&i.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),i.fire("layeradd",{layer:this})}}});ye.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var i=n(t);return this._layers[i]?this:(this._layers[i]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var i=n(t);return this._layers[i]?(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[i],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return!!t&&n(t)in this._layers},eachLayer:function(t,i){for(var e in this._layers)t.call(i,this._layers[e]);return this},_addLayers:function(t){for(var i=0,e=(t=t?ei(t)?t:[t]:[]).length;i<e;i++)this.addLayer(t[i])},_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[n(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var i=n(t);this._zoomBoundLayers[i]&&(delete this._zoomBoundLayers[i],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,i=-1/0,e=this._getZoomSpan();for(var n in this._zoomBoundLayers){var o=this._zoomBoundLayers[n].options;t=void 0===o.minZoom?t:Math.min(t,o.minZoom),i=void 0===o.maxZoom?i:Math.max(i,o.maxZoom)}this._layersMaxZoom=i===-1/0?void 0:i,this._layersMinZoom=t===1/0?void 0:t,e!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var He=We.extend({initialize:function(t){this._layers={};var i,e;if(t)for(i=0,e=t.length;i<e;i++)this.addLayer(t[i])},addLayer:function(t){var i=this.getLayerId(t);return this._layers[i]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var i=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[i]&&this._map.removeLayer(this._layers[i]),delete this._layers[i],this},hasLayer:function(t){return!!t&&(t in this._layers||this.getLayerId(t)in this._layers)},clearLayers:function(){for(var t in this._layers)this.removeLayer(this._layers[t]);return this},invoke:function(t){var i,e,n=Array.prototype.slice.call(arguments,1);for(i in this._layers)(e=this._layers[i])[t]&&e[t].apply(e,n);return this},onAdd:function(t){for(var i in this._layers)t.addLayer(this._layers[i])},onRemove:function(t){for(var i in this._layers)t.removeLayer(this._layers[i])},eachLayer:function(t,i){for(var e in this._layers)t.call(i,this._layers[e]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];for(var i in this._layers)t.push(this._layers[i]);return t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return n(t)}}),Fe=He.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),He.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),He.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new T;for(var i in this._layers){var e=this._layers[i];t.extend(e.getBounds?e.getBounds():e.getLatLng())}return t}}),Ue=v.extend({initialize:function(t){l(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,i){var e=this._getIconUrl(t);if(!e){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n=this._createImg(e,i&&"IMG"===i.tagName?i:null);return this._setIconStyles(n,t),n},_setIconStyles:function(t,i){var e=this.options,n=e[i+"Size"];"number"==typeof n&&(n=[n,n]);var o=w(n),s=w("shadow"===i&&e.shadowAnchor||e.iconAnchor||o&&o.divideBy(2,!0));t.className="leaflet-marker-"+i+" "+(e.className||""),s&&(t.style.marginLeft=-s.x+"px",t.style.marginTop=-s.y+"px"),o&&(t.style.width=o.x+"px",t.style.height=o.y+"px")},_createImg:function(t,i){return i=i||document.createElement("img"),i.src=t,i},_getIconUrl:function(t){return Vi&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),Ve=Ue.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return Ve.imagePath||(Ve.imagePath=this._detectIconPath()),(this.options.imagePath||Ve.imagePath)+Ue.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=ht("div","leaflet-default-icon-path",document.body),i=at(t,"background-image")||at(t,"backgroundImage");return document.body.removeChild(t),i=null===i||0!==i.indexOf("url")?"":i.replace(/^url\([\"\']?/,"").replace(/marker-icon\.png[\"\']?\)$/,"")}}),Ge=Me.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new ke(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),pt(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&mt(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup().fire("movestart").fire("dragstart")},_onDrag:function(t){var i=this._marker,e=i._shadow,n=Pt(i._icon),o=i._map.layerPointToLatLng(n);e&&Lt(e,n),i._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,i.fire("move",t).fire("drag",t)},_onDragEnd:function(t){delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),qe=We.extend({options:{icon:new Ve,interactive:!0,draggable:!1,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",bubblingMouseEvents:!1},initialize:function(t,i){l(this,i),this._latlng=C(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var i=this._latlng;return this._latlng=C(t),this.update(),this.fire("move",{oldLatLng:i,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,i="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),e=t.icon.createIcon(this._icon),n=!1;e!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(e.title=t.title),t.alt&&(e.alt=t.alt)),pt(e,i),t.keyboard&&(e.tabIndex="0"),this._icon=e,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var o=t.icon.createShadow(this._shadow),s=!1;o!==this._shadow&&(this._removeShadow(),s=!0),o&&(pt(o,i),o.alt=""),this._shadow=o,t.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),o&&s&&this.getPane("shadowPane").appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),ut(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&ut(this._shadow),this._shadow=null},_setPos:function(t){Lt(this._icon,t),this._shadow&&Lt(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(i)},_initInteraction:function(){if(this.options.interactive&&(pt(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Ge)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Ge(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;vt(this._icon,t),this._shadow&&vt(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor||[0,0]},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor||[0,0]}}),Ke=We.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return l(this,t),this._renderer&&this._renderer._updateStyle(this),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(Hi?10:0)}}),Ye=Ke.extend({options:{fill:!0,radius:10},initialize:function(t,i){l(this,i),this._latlng=C(t),this._radius=this.options.radius},setLatLng:function(t){return this._latlng=C(t),this.redraw(),this.fire("move",{latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var i=t&&t.radius||this._radius;return Ke.prototype.setStyle.call(this,t),this.setRadius(i),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,i=this._radiusY||t,e=this._clickTolerance(),n=[t+e,i+e];this._pxBounds=new P(this._point.subtract(n),this._point.add(n))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}}),Xe=Ye.extend({initialize:function(t,e,n){if("number"==typeof e&&(e=i({},n,{radius:e})),l(this,e),this._latlng=C(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new T(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:Ke.prototype.setStyle,_project:function(){var t=this._latlng.lng,i=this._latlng.lat,e=this._map,n=e.options.crs;if(n.distance===ci.distance){var o=Math.PI/180,s=this._mRadius/ci.R/o,r=e.project([i+s,t]),a=e.project([i-s,t]),h=r.add(a).divideBy(2),u=e.unproject(h).lat,l=Math.acos((Math.cos(s*o)-Math.sin(i*o)*Math.sin(u*o))/(Math.cos(i*o)*Math.cos(u*o)))/o;(isNaN(l)||0===l)&&(l=s/Math.cos(Math.PI/180*i)),this._point=h.subtract(e.getPixelOrigin()),this._radius=isNaN(l)?0:Math.max(Math.round(h.x-e.project([u,t-l]).x),1),this._radiusY=Math.max(Math.round(h.y-r.y),1)}else{var c=n.unproject(n.project(this._latlng).subtract([this._mRadius,0]));this._point=e.latLngToLayerPoint(this._latlng),this._radius=this._point.x-e.latLngToLayerPoint(c).x}this._updateBounds()}}),Je=Ke.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,i){l(this,i),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var i,e,n=1/0,o=null,s=Rt,r=0,a=this._parts.length;r<a;r++)for(var h=this._parts[r],u=1,l=h.length;u<l;u++){var c=s(t,i=h[u-1],e=h[u],!0);c<n&&(n=c,o=s(t,i,e))}return o&&(o.distance=Math.sqrt(n)),o},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,i,e,n,o,s,r,a=this._rings[0],h=a.length;if(!h)return null;for(t=0,i=0;t<h-1;t++)i+=a[t].distanceTo(a[t+1])/2;if(0===i)return this._map.layerPointToLatLng(a[0]);for(t=0,n=0;t<h-1;t++)if(o=a[t],s=a[t+1],e=o.distanceTo(s),(n+=e)>i)return r=(n-i)/e,this._map.layerPointToLatLng([s.x-r*(s.x-o.x),s.y-r*(s.y-o.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,i){return i=i||this._defaultShape(),t=C(t),i.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new T,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return Dt(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var i=[],e=Dt(t),n=0,o=t.length;n<o;n++)e?(i[n]=C(t[n]),this._bounds.extend(i[n])):i[n]=this._convertLatLngs(t[n]);return i},_project:function(){var t=new P;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t);var i=this._clickTolerance(),e=new x(i,i);this._bounds.isValid()&&t.isValid()&&(t.min._subtract(e),t.max._add(e),this._pxBounds=t)},_projectLatlngs:function(t,i,e){var n,o,s=t[0]instanceof M,r=t.length;if(s){for(o=[],n=0;n<r;n++)o[n]=this._map.latLngToLayerPoint(t[n]),e.extend(o[n]);i.push(o)}else for(n=0;n<r;n++)this._projectLatlngs(t[n],i,e)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var i,e,n,o,s,r,a,h=this._parts;for(i=0,n=0,o=this._rings.length;i<o;i++)for(e=0,s=(a=this._rings[i]).length;e<s-1;e++)(r=Bt(a[e],a[e+1],t,e,!0))&&(h[n]=h[n]||[],h[n].push(r[0]),r[1]===a[e+1]&&e!==s-2||(h[n].push(r[1]),n++))}},_simplifyPoints:function(){for(var t=this._parts,i=this.options.smoothFactor,e=0,n=t.length;e<n;e++)t[e]=Ct(t[e],i)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,i){var e,n,o,s,r,a,h=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(e=0,s=this._parts.length;e<s;e++)for(n=0,o=(r=(a=this._parts[e]).length)-1;n<r;o=n++)if((i||0!==n)&&Zt(t,a[o],a[n])<=h)return!0;return!1}});Je._flat=Nt;var $e=Je.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,i,e,n,o,s,r,a,h,u=this._rings[0],l=u.length;if(!l)return null;for(s=r=a=0,t=0,i=l-1;t<l;i=t++)e=u[t],n=u[i],o=e.y*n.x-n.y*e.x,r+=(e.x+n.x)*o,a+=(e.y+n.y)*o,s+=3*o;return h=0===s?u[0]:[r/s,a/s],this._map.layerPointToLatLng(h)},_convertLatLngs:function(t){var i=Je.prototype._convertLatLngs.call(this,t),e=i.length;return e>=2&&i[0]instanceof M&&i[0].equals(i[e-1])&&i.pop(),i},_setLatLngs:function(t){Je.prototype._setLatLngs.call(this,t),Dt(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Dt(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,i=this.options.weight,e=new x(i,i);if(t=new P(t.min.subtract(e),t.max.add(e)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var n,o=0,s=this._rings.length;o<s;o++)(n=jt(this._rings[o],t,!0)).length&&this._parts.push(n)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var i,e,n,o,s,r,a,h,u=!1;if(!this._pxBounds.contains(t))return!1;for(o=0,a=this._parts.length;o<a;o++)for(s=0,r=(h=(i=this._parts[o]).length)-1;s<h;r=s++)e=i[s],n=i[r],e.y>t.y!=n.y>t.y&&t.x<(n.x-e.x)*(t.y-e.y)/(n.y-e.y)+e.x&&(u=!u);return u||Je.prototype._containsPoint.call(this,t,!0)}}),Qe=Fe.extend({initialize:function(t,i){l(this,i),this._layers={},t&&this.addData(t)},addData:function(t){var i,e,n,o=ei(t)?t:t.features;if(o){for(i=0,e=o.length;i<e;i++)((n=o[i]).geometries||n.geometry||n.features||n.coordinates)&&this.addData(n);return this}var s=this.options;if(s.filter&&!s.filter(t))return this;var r=Wt(t,s);return r?(r.feature=qt(t),r.defaultOptions=r.options,this.resetStyle(r),s.onEachFeature&&s.onEachFeature(t,r),this.addLayer(r)):this},resetStyle:function(t){return t.options=i({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this},setStyle:function(t){return this.eachLayer(function(i){this._setLayerStyle(i,t)},this)},_setLayerStyle:function(t,i){"function"==typeof i&&(i=i(t.feature)),t.setStyle&&t.setStyle(i)}}),tn={toGeoJSON:function(t){return Gt(this,{type:"Point",coordinates:Ut(this.getLatLng(),t)})}};qe.include(tn),Xe.include(tn),Ye.include(tn),Je.include({toGeoJSON:function(t){var i=!Dt(this._latlngs),e=Vt(this._latlngs,i?1:0,!1,t);return Gt(this,{type:(i?"Multi":"")+"LineString",coordinates:e})}}),$e.include({toGeoJSON:function(t){var i=!Dt(this._latlngs),e=i&&!Dt(this._latlngs[0]),n=Vt(this._latlngs,e?2:i?1:0,!0,t);return i||(n=[n]),Gt(this,{type:(e?"Multi":"")+"Polygon",coordinates:n})}}),He.include({toMultiPoint:function(t){var i=[];return this.eachLayer(function(e){i.push(e.toGeoJSON(t).geometry.coordinates)}),Gt(this,{type:"MultiPoint",coordinates:i})},toGeoJSON:function(t){var i=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===i)return this.toMultiPoint(t);var e="GeometryCollection"===i,n=[];return this.eachLayer(function(i){if(i.toGeoJSON){var o=i.toGeoJSON(t);if(e)n.push(o.geometry);else{var s=qt(o);"FeatureCollection"===s.type?n.push.apply(n,s.features):n.push(s)}}}),e?Gt(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});var en=Kt,nn=We.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,i,e){this._url=t,this._bounds=z(i),l(this,e)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(pt(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ut(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&ct(this._image),this},bringToBack:function(){return this._map&&_t(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=z(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t=this._image=ht("img","leaflet-image-layer "+(this._zoomAnimated?"leaflet-zoom-animated":"")+(this.options.className||""));t.onselectstart=r,t.onmousemove=r,t.onload=e(this.fire,this,"load"),t.onerror=e(this._overlayOnError,this,"error"),this.options.crossOrigin&&(t.crossOrigin=""),this.options.zIndex&&this._updateZIndex(),t.src=this._url,t.alt=this.options.alt},_animateZoom:function(t){var i=this._map.getZoomScale(t.zoom),e=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;wt(this._image,e,i)},_reset:function(){var t=this._image,i=new P(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),e=i.getSize();Lt(t,i.min),t.style.width=e.x+"px",t.style.height=e.y+"px"},_updateOpacity:function(){vt(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)}}),on=nn.extend({options:{autoplay:!0,loop:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,i=this._image=t?this._url:ht("video");if(i.class=i.class||"",i.class+="leaflet-image-layer "+(this._zoomAnimated?"leaflet-zoom-animated":""),i.onselectstart=r,i.onmousemove=r,i.onloadeddata=e(this.fire,this,"load"),!t){ei(this._url)||(this._url=[this._url]),i.autoplay=!!this.options.autoplay,i.loop=!!this.options.loop;for(var n=0;n<this._url.length;n++){var o=ht("source");o.src=this._url[n],i.appendChild(o)}}}}),sn=We.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,i){l(this,t),this._source=i},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&vt(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&vt(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(vt(this._container,0),this._removeTimeout=setTimeout(e(ut,void 0,this._container),200)):ut(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=C(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&ct(this._container),this},bringToBack:function(){return this._map&&_t(this._container),this},_updateContent:function(){if(this._content){var t=this._contentNode,i="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof i)t.innerHTML=i;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(i)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),i=w(this.options.offset),e=this._getAnchor();this._zoomAnimated?Lt(this._container,t.add(e)):i=i.add(t).add(e);var n=this._containerBottom=-i.y,o=this._containerLeft=-Math.round(this._containerWidth/2)+i.x;this._container.style.bottom=n+"px",this._container.style.left=o+"px"}},_getAnchor:function(){return[0,0]}}),rn=sn.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,className:""},openOn:function(t){return t.openPopup(this),this},onAdd:function(t){sn.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Ke||this._source.on("preclick",Y))},onRemove:function(t){sn.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Ke||this._source.off("preclick",Y))},getEvents:function(){var t=sn.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t="leaflet-popup",i=this._container=ht("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),e=this._wrapper=ht("div",t+"-content-wrapper",i);if(this._contentNode=ht("div",t+"-content",e),J(e),X(this._contentNode),V(e,"contextmenu",Y),this._tipContainer=ht("div",t+"-tip-container",i),this._tip=ht("div",t+"-tip",this._tipContainer),this.options.closeButton){var n=this._closeButton=ht("a",t+"-close-button",i);n.href="#close",n.innerHTML="&#215;",V(n,"click",this._onCloseButtonClick,this)}},_updateLayout:function(){var t=this._contentNode,i=t.style;i.width="",i.whiteSpace="nowrap";var e=t.offsetWidth;e=Math.min(e,this.options.maxWidth),e=Math.max(e,this.options.minWidth),i.width=e+1+"px",i.whiteSpace="",i.height="";var n=t.offsetHeight,o=this.options.maxHeight;o&&n>o?(i.height=o+"px",pt(t,"leaflet-popup-scrolled")):mt(t,"leaflet-popup-scrolled"),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),e=this._getAnchor();Lt(this._container,i.add(e))},_adjustPan:function(){if(!(!this.options.autoPan||this._map._panAnim&&this._map._panAnim._inProgress)){var t=this._map,i=parseInt(at(this._container,"marginBottom"),10)||0,e=this._container.offsetHeight+i,n=this._containerWidth,o=new x(this._containerLeft,-e-this._containerBottom);o._add(Pt(this._container));var s=t.layerPointToContainerPoint(o),r=w(this.options.autoPanPadding),a=w(this.options.autoPanPaddingTopLeft||r),h=w(this.options.autoPanPaddingBottomRight||r),u=t.getSize(),l=0,c=0;s.x+n+h.x>u.x&&(l=s.x+n-u.x+h.x),s.x-l-a.x<0&&(l=s.x-a.x),s.y+e+h.y>u.y&&(c=s.y+e-u.y+h.y),s.y-c-a.y<0&&(c=s.y-a.y),(l||c)&&t.fire("autopanstart").panBy([l,c])}},_onCloseButtonClick:function(t){this._close(),Q(t)},_getAnchor:function(){return w(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});ye.mergeOptions({closePopupOnClick:!0}),ye.include({openPopup:function(t,i,e){return t instanceof rn||(t=new rn(e).setContent(t)),i&&t.setLatLng(i),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),We.include({bindPopup:function(t,i){return t instanceof rn?(l(t,i),this._popup=t,t._source=this):(this._popup&&!i||(this._popup=new rn(i,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,i){if(t instanceof We||(i=t,t=this),t instanceof Fe)for(var e in this._layers){t=this._layers[e];break}return i||(i=t.getCenter?t.getCenter():t.getLatLng()),this._popup&&this._map&&(this._popup._source=t,this._popup.update(),this._map.openPopup(this._popup,i)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var i=t.layer||t.target;this._popup&&this._map&&(Q(t),i instanceof Ke?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===i?this.closePopup():this.openPopup(i,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var an=sn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){sn.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){sn.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=sn.prototype.getEvents.call(this);return Hi&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ht("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var i=this._map,e=this._container,n=i.latLngToContainerPoint(i.getCenter()),o=i.layerPointToContainerPoint(t),s=this.options.direction,r=e.offsetWidth,a=e.offsetHeight,h=w(this.options.offset),u=this._getAnchor();"top"===s?t=t.add(w(-r/2+h.x,-a+h.y+u.y,!0)):"bottom"===s?t=t.subtract(w(r/2-h.x,-h.y,!0)):"center"===s?t=t.subtract(w(r/2+h.x,a/2-u.y+h.y,!0)):"right"===s||"auto"===s&&o.x<n.x?(s="right",t=t.add(w(h.x+u.x,u.y-a/2+h.y,!0))):(s="left",t=t.subtract(w(r+u.x-h.x,a/2-u.y-h.y,!0))),mt(e,"leaflet-tooltip-right"),mt(e,"leaflet-tooltip-left"),mt(e,"leaflet-tooltip-top"),mt(e,"leaflet-tooltip-bottom"),pt(e,"leaflet-tooltip-"+s),Lt(e,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&vt(this._container,t)},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(i)},_getAnchor:function(){return w(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});ye.include({openTooltip:function(t,i,e){return t instanceof an||(t=new an(e).setContent(t)),i&&t.setLatLng(i),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),We.include({bindTooltip:function(t,i){return t instanceof an?(l(t,i),this._tooltip=t,t._source=this):(this._tooltip&&!i||(this._tooltip=new an(i,this)),this._tooltip.setContent(t)),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(t||!this._tooltipHandlersAdded){var i=t?"off":"on",e={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?e.add=this._openTooltip:(e.mouseover=this._openTooltip,e.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(e.mousemove=this._moveTooltip),Hi&&(e.click=this._openTooltip)),this[i](e),this._tooltipHandlersAdded=!t}},openTooltip:function(t,i){if(t instanceof We||(i=t,t=this),t instanceof Fe)for(var e in this._layers){t=this._layers[e];break}return i||(i=t.getCenter?t.getCenter():t.getLatLng()),this._tooltip&&this._map&&(this._tooltip._source=t,this._tooltip.update(),this._map.openTooltip(this._tooltip,i),this._tooltip.options.interactive&&this._tooltip._container&&(pt(this._tooltip._container,"leaflet-clickable"),this.addInteractiveTarget(this._tooltip._container))),this},closeTooltip:function(){return this._tooltip&&(this._tooltip._close(),this._tooltip.options.interactive&&this._tooltip._container&&(mt(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(t){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(t)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_openTooltip:function(t){var i=t.layer||t.target;this._tooltip&&this._map&&this.openTooltip(i,this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var i,e,n=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(i=this._map.mouseEventToContainerPoint(t.originalEvent),e=this._map.containerPointToLayerPoint(i),n=this._map.layerPointToLatLng(e)),this._tooltip.setLatLng(n)}});var hn=Ue.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var i=t&&"DIV"===t.tagName?t:document.createElement("div"),e=this.options;if(i.innerHTML=!1!==e.html?e.html:"",e.bgPos){var n=w(e.bgPos);i.style.backgroundPosition=-n.x+"px "+-n.y+"px"}return this._setIconStyles(i,"icon"),i},createShadow:function(){return null}});Ue.Default=Ve;var un=We.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Ri,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){l(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(),ut(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=null},bringToFront:function(){return this._map&&(ct(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(_t(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=o(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof x?t:new x(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var i,e=this.getPane().children,n=-t(-1/0,1/0),o=0,s=e.length;o<s;o++)i=e[o].style.zIndex,e[o]!==this._container&&i&&(n=t(n,+i));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!wi){vt(this._container,this.options.opacity);var t=+new Date,i=!1,e=!1;for(var n in this._tiles){var o=this._tiles[n];if(o.current&&o.loaded){var s=Math.min(1,(t-o.loaded)/200);vt(o.el,s),s<1?i=!0:(o.active?e=!0:this._onOpaqueTile(o),o.active=!0)}}e&&!this._noPrune&&this._pruneTiles(),i&&(g(this._fadeFrame),this._fadeFrame=f(this._updateOpacity,this))}},_onOpaqueTile:r,_initContainer:function(){this._container||(this._container=ht("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,i=this.options.maxZoom;if(void 0!==t){for(var e in this._levels)this._levels[e].el.children.length||e===t?(this._levels[e].el.style.zIndex=i-Math.abs(t-e),this._onUpdateLevel(e)):(ut(this._levels[e].el),this._removeTilesAtZoom(e),this._onRemoveLevel(e),delete this._levels[e]);var n=this._levels[t],o=this._map;return n||((n=this._levels[t]={}).el=ht("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=i,n.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),n.zoom=t,this._setZoomTransform(n,o.getCenter(),o.getZoom()),n.el.offsetWidth,this._onCreateLevel(n)),this._level=n,n}},_onUpdateLevel:r,_onRemoveLevel:r,_onCreateLevel:r,_pruneTiles:function(){if(this._map){var t,i,e=this._map.getZoom();if(e>this.options.maxZoom||e<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(i=this._tiles[t]).retain=i.current;for(t in this._tiles)if((i=this._tiles[t]).current&&!i.active){var n=i.coords;this._retainParent(n.x,n.y,n.z,n.z-5)||this._retainChildren(n.x,n.y,n.z,n.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var i in this._tiles)this._tiles[i].coords.z===t&&this._removeTile(i)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)ut(this._levels[t].el),this._onRemoveLevel(t),delete this._levels[t];this._removeAllTiles(),this._tileZoom=null},_retainParent:function(t,i,e,n){var o=Math.floor(t/2),s=Math.floor(i/2),r=e-1,a=new x(+o,+s);a.z=+r;var h=this._tileCoordsToKey(a),u=this._tiles[h];return u&&u.active?(u.retain=!0,!0):(u&&u.loaded&&(u.retain=!0),r>n&&this._retainParent(o,s,r,n))},_retainChildren:function(t,i,e,n){for(var o=2*t;o<2*t+2;o++)for(var s=2*i;s<2*i+2;s++){var r=new x(o,s);r.z=e+1;var a=this._tileCoordsToKey(r),h=this._tiles[a];h&&h.active?h.retain=!0:(h&&h.loaded&&(h.retain=!0),e+1<n&&this._retainChildren(o,s,e+1,n))}},_resetView:function(t){var i=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),i,i)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var i=this.options;return void 0!==i.minNativeZoom&&t<i.minNativeZoom?i.minNativeZoom:void 0!==i.maxNativeZoom&&i.maxNativeZoom<t?i.maxNativeZoom:t},_setView:function(t,i,e,n){var o=this._clampZoom(Math.round(i));(void 0!==this.options.maxZoom&&o>this.options.maxZoom||void 0!==this.options.minZoom&&o<this.options.minZoom)&&(o=void 0);var s=this.options.updateWhenZooming&&o!==this._tileZoom;n&&!s||(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==o&&this._update(t),e||this._pruneTiles(),this._noPrune=!!e),this._setZoomTransforms(t,i)},_setZoomTransforms:function(t,i){for(var e in this._levels)this._setZoomTransform(this._levels[e],t,i)},_setZoomTransform:function(t,i,e){var n=this._map.getZoomScale(e,t.zoom),o=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(i,e)).round();Oi?wt(t.el,o,n):Lt(t.el,o)},_resetGrid:function(){var t=this._map,i=t.options.crs,e=this._tileSize=this.getTileSize(),n=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),this._wrapX=i.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,i.wrapLng[0]],n).x/e.x),Math.ceil(t.project([0,i.wrapLng[1]],n).x/e.y)],this._wrapY=i.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([i.wrapLat[0],0],n).y/e.x),Math.ceil(t.project([i.wrapLat[1],0],n).y/e.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var i=this._map,e=i._animatingZoom?Math.max(i._animateToZoom,i.getZoom()):i.getZoom(),n=i.getZoomScale(e,this._tileZoom),o=i.project(t,this._tileZoom).floor(),s=i.getSize().divideBy(2*n);return new P(o.subtract(s),o.add(s))},_update:function(t){var i=this._map;if(i){var e=this._clampZoom(i.getZoom());if(void 0===t&&(t=i.getCenter()),void 0!==this._tileZoom){var n=this._getTiledPixelBounds(t),o=this._pxBoundsToTileRange(n),s=o.getCenter(),r=[],a=this.options.keepBuffer,h=new P(o.getBottomLeft().subtract([a,-a]),o.getTopRight().add([a,-a]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var u in this._tiles){var l=this._tiles[u].coords;l.z===this._tileZoom&&h.contains(new x(l.x,l.y))||(this._tiles[u].current=!1)}if(Math.abs(e-this._tileZoom)>1)this._setView(t,e);else{for(var c=o.min.y;c<=o.max.y;c++)for(var _=o.min.x;_<=o.max.x;_++){var d=new x(_,c);d.z=this._tileZoom,this._isValidTile(d)&&(this._tiles[this._tileCoordsToKey(d)]||r.push(d))}if(r.sort(function(t,i){return t.distanceTo(s)-i.distanceTo(s)}),0!==r.length){this._loading||(this._loading=!0,this.fire("loading"));var p=document.createDocumentFragment();for(_=0;_<r.length;_++)this._addTile(r[_],p);this._level.el.appendChild(p)}}}}},_isValidTile:function(t){var i=this._map.options.crs;if(!i.infinite){var e=this._globalTileRange;if(!i.wrapLng&&(t.x<e.min.x||t.x>e.max.x)||!i.wrapLat&&(t.y<e.min.y||t.y>e.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return z(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToBounds:function(t){var i=this._map,e=this.getTileSize(),n=t.scaleBy(e),o=n.add(e),s=new T(i.unproject(n,t.z),i.unproject(o,t.z));return this.options.noWrap||i.wrapLatLngBounds(s),s},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var i=t.split(":"),e=new x(+i[0],+i[1]);return e.z=+i[2],e},_removeTile:function(t){var i=this._tiles[t];i&&(ut(i.el),delete this._tiles[t],this.fire("tileunload",{tile:i.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){pt(t,"leaflet-tile");var i=this.getTileSize();t.style.width=i.x+"px",t.style.height=i.y+"px",t.onselectstart=r,t.onmousemove=r,wi&&this.options.opacity<1&&vt(t,this.options.opacity),bi&&!Ti&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,i){var n=this._getTilePos(t),o=this._tileCoordsToKey(t),s=this.createTile(this._wrapCoords(t),e(this._tileReady,this,t));this._initTile(s),this.createTile.length<2&&f(e(this._tileReady,this,t,null,s)),Lt(s,n),this._tiles[o]={el:s,coords:t,current:!0},i.appendChild(s),this.fire("tileloadstart",{tile:s,coords:t})},_tileReady:function(t,i,n){if(this._map){i&&this.fire("tileerror",{error:i,tile:n,coords:t});var o=this._tileCoordsToKey(t);(n=this._tiles[o])&&(n.loaded=+new Date,this._map._fadeAnimated?(vt(n.el,0),g(this._fadeFrame),this._fadeFrame=f(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),i||(pt(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),wi||!this._map._fadeAnimated?f(this._pruneTiles,this):setTimeout(e(this._pruneTiles,this),250)))}},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var i=new x(this._wrapX?s(t.x,this._wrapX):t.x,this._wrapY?s(t.y,this._wrapY):t.y);return i.z=t.z,i},_pxBoundsToTileRange:function(t){var i=this.getTileSize();return new P(t.min.unscaleBy(i).floor(),t.max.unscaleBy(i).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),ln=un.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,i){this._url=t,(i=l(this,i)).detectRetina&&Vi&&i.maxZoom>0&&(i.tileSize=Math.floor(i.tileSize/2),i.zoomReverse?(i.zoomOffset--,i.minZoom++):(i.zoomOffset++,i.maxZoom--),i.minZoom=Math.max(0,i.minZoom)),"string"==typeof i.subdomains&&(i.subdomains=i.subdomains.split("")),bi||this.on("tileunload",this._onTileRemove)},setUrl:function(t,i){return this._url=t,i||this.redraw(),this},createTile:function(t,i){var n=document.createElement("img");return V(n,"load",e(this._tileOnLoad,this,i,n)),V(n,"error",e(this._tileOnError,this,i,n)),this.options.crossOrigin&&(n.crossOrigin=""),n.alt="",n.setAttribute("role","presentation"),n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:Vi?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var n=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=n),e["-y"]=n}return _(this._url,i(e,this.options))},_tileOnLoad:function(t,i){wi?setTimeout(e(t,this,null,i),0):t(null,i)},_tileOnError:function(t,i,e){var n=this.options.errorTileUrl;n&&i.src!==n&&(i.src=n),t(e,i)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,i=this.options.maxZoom,e=this.options.zoomReverse,n=this.options.zoomOffset;return e&&(t=i-t),t+n},_getSubdomain:function(t){var i=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[i]},_abortLoading:function(){var t,i;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((i=this._tiles[t].el).onload=r,i.onerror=r,i.complete||(i.src=ni,ut(i)))}}),cn=ln.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var n=i({},this.defaultWmsParams);for(var o in e)o in this.options||(n[o]=e[o]);e=l(this,e),n.width=n.height=e.tileSize*(e.detectRetina&&Vi?2:1),this.wmsParams=n},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var i=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[i]=this._crs.code,ln.prototype.onAdd.call(this,t)},getTileUrl:function(t){var i=this._tileCoordsToBounds(t),e=this._crs.project(i.getNorthWest()),n=this._crs.project(i.getSouthEast()),o=(this._wmsVersion>=1.3&&this._crs===Ne?[n.y,e.x,e.y,n.x]:[e.x,n.y,n.x,e.y]).join(","),s=ln.prototype.getTileUrl.call(this,t);return s+c(this.wmsParams,s,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+o},setParams:function(t,e){return i(this.wmsParams,t),e||this.redraw(),this}});ln.WMS=cn,Yt.wms=function(t,i){return new cn(t,i)};var _n=We.extend({options:{padding:.1},initialize:function(t){l(this,t),n(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&pt(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,i){var e=this._map.getZoomScale(i,this._zoom),n=Pt(this._container),o=this._map.getSize().multiplyBy(.5+this.options.padding),s=this._map.project(this._center,i),r=this._map.project(t,i).subtract(s),a=o.multiplyBy(-e).add(n).add(o).subtract(r);Oi?wt(this._container,a,e):Lt(this._container,a)},_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,i=this._map.getSize(),e=this._map.containerPointToLayerPoint(i.multiplyBy(-t)).round();this._bounds=new P(e,e.add(i.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),dn=_n.extend({getEvents:function(){var t=_n.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){_n.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");V(t,"mousemove",o(this._onMouseMove,32,this),this),V(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),V(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){delete this._ctx,ut(this._container),G(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){this._redrawBounds=null;for(var t in this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){this._drawnLayers={},_n.prototype._update.call(this);var t=this._bounds,i=this._container,e=t.getSize(),n=Vi?2:1;Lt(i,t.min),i.width=n*e.x,i.height=n*e.y,i.style.width=e.x+"px",i.style.height=e.y+"px",Vi&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){_n.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[n(t)]=t;var i=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=i),this._drawLast=i,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var i=t._order,e=i.next,n=i.prev;e?e.prev=n:this._drawLast=n,n?n.next=e:this._drawFirst=e,delete t._order,delete this._layers[L.stamp(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(t.options.dashArray){var i,e=t.options.dashArray.split(","),n=[];for(i=0;i<e.length;i++)n.push(Number(e[i]));t.options._dashArray=n}},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||f(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var i=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new P,this._redrawBounds.extend(t._pxBounds.min.subtract([i,i])),this._redrawBounds.extend(t._pxBounds.max.add([i,i]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var i=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,i.x,i.y)}else this._ctx.clearRect(0,0,this._container.width,this._container.height)},_draw:function(){var t,i=this._redrawBounds;if(this._ctx.save(),i){var e=i.getSize();this._ctx.beginPath(),this._ctx.rect(i.min.x,i.min.y,e.x,e.y),this._ctx.clip()}this._drawing=!0;for(var n=this._drawFirst;n;n=n.next)t=n.layer,(!i||t._pxBounds&&t._pxBounds.intersects(i))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,i){if(this._drawing){var e,n,o,s,r=t._parts,a=r.length,h=this._ctx;if(a){for(this._drawnLayers[t._leaflet_id]=t,h.beginPath(),e=0;e<a;e++){for(n=0,o=r[e].length;n<o;n++)s=r[e][n],h[n?"lineTo":"moveTo"](s.x,s.y);i&&h.closePath()}this._fillStroke(h,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var i=t._point,e=this._ctx,n=t._radius,o=(t._radiusY||n)/n;this._drawnLayers[t._leaflet_id]=t,1!==o&&(e.save(),e.scale(1,o)),e.beginPath(),e.arc(i.x,i.y/o,n,0,2*Math.PI,!1),1!==o&&e.restore(),this._fillStroke(e,t)}},_fillStroke:function(t,i){var e=i.options;e.fill&&(t.globalAlpha=e.fillOpacity,t.fillStyle=e.fillColor||e.color,t.fill(e.fillRule||"evenodd")),e.stroke&&0!==e.weight&&(t.setLineDash&&t.setLineDash(i.options&&i.options._dashArray||[]),t.globalAlpha=e.opacity,t.lineWidth=e.weight,t.strokeStyle=e.color,t.lineCap=e.lineCap,t.lineJoin=e.lineJoin,t.stroke())},_onClick:function(t){for(var i,e,n=this._map.mouseEventToLayerPoint(t),o=this._drawFirst;o;o=o.next)(i=o.layer).options.interactive&&i._containsPoint(n)&&!this._map._draggableMoved(i)&&(e=i);e&&(et(t),this._fireEvent([e],t))},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var i=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,i)}},_handleMouseOut:function(t){var i=this._hoveredLayer;i&&(mt(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseout"),this._hoveredLayer=null)},_handleMouseHover:function(t,i){for(var e,n,o=this._drawFirst;o;o=o.next)(e=o.layer).options.interactive&&e._containsPoint(i)&&(n=e);n!==this._hoveredLayer&&(this._handleMouseOut(t),n&&(pt(this._container,"leaflet-interactive"),this._fireEvent([n],t,"mouseover"),this._hoveredLayer=n)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t)},_fireEvent:function(t,i,e){this._map._fireDOMEvent(i,e||i.type,t)},_bringToFront:function(t){var i=t._order,e=i.next,n=i.prev;e&&(e.prev=n,n?n.next=e:e&&(this._drawFirst=e),i.prev=this._drawLast,this._drawLast.next=i,i.next=null,this._drawLast=i,this._requestRedraw(t))},_bringToBack:function(t){var i=t._order,e=i.next,n=i.prev;n&&(n.next=e,e?e.prev=n:n&&(this._drawLast=n),i.prev=null,i.next=this._drawFirst,this._drawFirst.prev=i,this._drawFirst=i,this._requestRedraw(t))}}),pn=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),mn={_initContainer:function(){this._container=ht("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(_n.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var i=t._container=pn("shape");pt(i,"leaflet-vml-shape "+(this.options.className||"")),i.coordsize="1 1",t._path=pn("path"),i.appendChild(t._path),this._updateStyle(t),this._layers[n(t)]=t},_addPath:function(t){var i=t._container;this._container.appendChild(i),t.options.interactive&&t.addInteractiveTarget(i)},_removePath:function(t){var i=t._container;ut(i),t.removeInteractiveTarget(i),delete this._layers[n(t)]},_updateStyle:function(t){var i=t._stroke,e=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(i||(i=t._stroke=pn("stroke")),o.appendChild(i),i.weight=n.weight+"px",i.color=n.color,i.opacity=n.opacity,n.dashArray?i.dashStyle=ei(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):i.dashStyle="",i.endcap=n.lineCap.replace("butt","flat"),i.joinstyle=n.lineJoin):i&&(o.removeChild(i),t._stroke=null),n.fill?(e||(e=t._fill=pn("fill")),o.appendChild(e),e.color=n.fillColor||n.color,e.opacity=n.fillOpacity):e&&(o.removeChild(e),t._fill=null)},_updateCircle:function(t){var i=t._point.round(),e=Math.round(t._radius),n=Math.round(t._radiusY||e);this._setPath(t,t._empty()?"M0 0":"AL "+i.x+","+i.y+" "+e+","+n+" 0,23592600")},_setPath:function(t,i){t._path.v=i},_bringToFront:function(t){ct(t._container)},_bringToBack:function(t){_t(t._container)}},fn=Ki?pn:S,gn=_n.extend({getEvents:function(){var t=_n.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=fn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=fn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ut(this._container),G(this._container),delete this._container,delete this._rootGroup},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){_n.prototype._update.call(this);var t=this._bounds,i=t.getSize(),e=this._container;this._svgSize&&this._svgSize.equals(i)||(this._svgSize=i,e.setAttribute("width",i.x),e.setAttribute("height",i.y)),Lt(e,t.min),e.setAttribute("viewBox",[t.min.x,t.min.y,i.x,i.y].join(" ")),this.fire("update")}},_initPath:function(t){var i=t._path=fn("path");t.options.className&&pt(i,t.options.className),t.options.interactive&&pt(i,"leaflet-interactive"),this._updateStyle(t),this._layers[n(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ut(t._path),t.removeInteractiveTarget(t._path),delete this._layers[n(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var i=t._path,e=t.options;i&&(e.stroke?(i.setAttribute("stroke",e.color),i.setAttribute("stroke-opacity",e.opacity),i.setAttribute("stroke-width",e.weight),i.setAttribute("stroke-linecap",e.lineCap),i.setAttribute("stroke-linejoin",e.lineJoin),e.dashArray?i.setAttribute("stroke-dasharray",e.dashArray):i.removeAttribute("stroke-dasharray"),e.dashOffset?i.setAttribute("stroke-dashoffset",e.dashOffset):i.removeAttribute("stroke-dashoffset")):i.setAttribute("stroke","none"),e.fill?(i.setAttribute("fill",e.fillColor||e.color),i.setAttribute("fill-opacity",e.fillOpacity),i.setAttribute("fill-rule",e.fillRule||"evenodd")):i.setAttribute("fill","none"))},_updatePoly:function(t,i){this._setPath(t,k(t._parts,i))},_updateCircle:function(t){var i=t._point,e=t._radius,n="a"+e+","+(t._radiusY||e)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(i.x-e)+","+i.y+n+2*e+",0 "+n+2*-e+",0 ";this._setPath(t,o)},_setPath:function(t,i){t._path.setAttribute("d",i)},_bringToFront:function(t){ct(t._path)},_bringToBack:function(t){_t(t._path)}});Ki&&gn.include(mn),ye.include({getRenderer:function(t){var i=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return i||(i=this._renderer=this.options.preferCanvas&&Xt()||Jt()),this.hasLayer(i)||this.addLayer(i),i},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var i=this._paneRenderers[t];return void 0===i&&(i=gn&&Jt({pane:t})||dn&&Xt({pane:t}),this._paneRenderers[t]=i),i}});var vn=$e.extend({initialize:function(t,i){$e.prototype.initialize.call(this,this._boundsToLatLngs(t),i)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=z(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});gn.create=fn,gn.pointsToPath=k,Qe.geometryToLayer=Wt,Qe.coordsToLatLng=Ht,Qe.coordsToLatLngs=Ft,Qe.latLngToCoords=Ut,Qe.latLngsToCoords=Vt,Qe.getFeature=Gt,Qe.asFeature=qt,ye.mergeOptions({boxZoom:!0});var yn=Me.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(){V(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){G(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ut(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),pi(),bt(),this._startPoint=this._map.mouseEventToContainerPoint(t),V(document,{contextmenu:Q,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=ht("div","leaflet-zoom-box",this._container),pt(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var i=new P(this._point,this._startPoint),e=i.getSize();Lt(this._box,i.min),this._box.style.width=e.x+"px",this._box.style.height=e.y+"px"},_finish:function(){this._moved&&(ut(this._box),mt(this._container,"leaflet-crosshair")),mi(),Tt(),G(document,{contextmenu:Q,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(e(this._resetState,this),0);var i=new T(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(i).fire("boxzoomend",{boxZoomBounds:i})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});ye.addInitHook("addHandler","boxZoom",yn),ye.mergeOptions({doubleClickZoom:!0});var xn=Me.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var i=this._map,e=i.getZoom(),n=i.options.zoomDelta,o=t.originalEvent.shiftKey?e-n:e+n;"center"===i.options.doubleClickZoom?i.setZoom(o):i.setZoomAround(t.containerPoint,o)}});ye.addInitHook("addHandler","doubleClickZoom",xn),ye.mergeOptions({dragging:!0,inertia:!Ti,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var wn=Me.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new ke(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}pt(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){mt(this._map._container,"leaflet-grab"),mt(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var i=z(this._map.options.maxBounds);this._offsetLimit=b(this._map.latLngToContainerPoint(i.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(i.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var i=this._lastTime=+new Date,e=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(e),this._times.push(i),i-this._times[0]>50&&(this._positions.shift(),this._times.shift())}this._map.fire("move",t).fire("drag",t)},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),i=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=i.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,i){return t-(t-i)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),i=this._offsetLimit;t.x<i.min.x&&(t.x=this._viscousLimit(t.x,i.min.x)),t.y<i.min.y&&(t.y=this._viscousLimit(t.y,i.min.y)),t.x>i.max.x&&(t.x=this._viscousLimit(t.x,i.max.x)),t.y>i.max.y&&(t.y=this._viscousLimit(t.y,i.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,i=Math.round(t/2),e=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-i+e)%t+i-e,s=(n+i+e)%t-i-e,r=Math.abs(o+e)<Math.abs(s+e)?o:s;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=r},_onDragEnd:function(t){var i=this._map,e=i.options,n=!e.inertia||this._times.length<2;if(i.fire("dragend",t),n)i.fire("moveend");else{var o=this._lastPos.subtract(this._positions[0]),s=(this._lastTime-this._times[0])/1e3,r=e.easeLinearity,a=o.multiplyBy(r/s),h=a.distanceTo([0,0]),u=Math.min(e.inertiaMaxSpeed,h),l=a.multiplyBy(u/h),c=u/(e.inertiaDeceleration*r),_=l.multiplyBy(-c/2).round();_.x||_.y?(_=i._limitOffset(_,i.options.maxBounds),f(function(){i.panBy(_,{duration:c,easeLinearity:r,noMoveStart:!0,animate:!0})})):i.fire("moveend")}}});ye.addInitHook("addHandler","dragging",wn),ye.mergeOptions({keyboard:!0,keyboardPanDelta:80});var Ln=Me.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),V(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),G(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,i=document.documentElement,e=t.scrollTop||i.scrollTop,n=t.scrollLeft||i.scrollLeft;this._map._container.focus(),window.scrollTo(n,e)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var i,e,n=this._panKeys={},o=this.keyCodes;for(i=0,e=o.left.length;i<e;i++)n[o.left[i]]=[-1*t,0];for(i=0,e=o.right.length;i<e;i++)n[o.right[i]]=[t,0];for(i=0,e=o.down.length;i<e;i++)n[o.down[i]]=[0,t];for(i=0,e=o.up.length;i<e;i++)n[o.up[i]]=[0,-1*t]},_setZoomDelta:function(t){var i,e,n=this._zoomKeys={},o=this.keyCodes;for(i=0,e=o.zoomIn.length;i<e;i++)n[o.zoomIn[i]]=t;for(i=0,e=o.zoomOut.length;i<e;i++)n[o.zoomOut[i]]=-t},_addHooks:function(){V(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){G(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var i,e=t.keyCode,n=this._map;if(e in this._panKeys){if(n._panAnim&&n._panAnim._inProgress)return;i=this._panKeys[e],t.shiftKey&&(i=w(i).multiplyBy(3)),n.panBy(i),n.options.maxBounds&&n.panInsideBounds(n.options.maxBounds)}else if(e in this._zoomKeys)n.setZoom(n.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[e]);else{if(27!==e||!n._popup)return;n.closePopup()}Q(t)}}});ye.addInitHook("addHandler","keyboard",Ln),ye.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var Pn=Me.extend({addHooks:function(){V(this._map._container,"mousewheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){G(this._map._container,"mousewheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var i=it(t),n=this._map.options.wheelDebounceTime;this._delta+=i,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var o=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(e(this._performZoom,this),o),Q(t)},_performZoom:function(){var t=this._map,i=t.getZoom(),e=this._map.options.zoomSnap||0;t._stop();var n=this._delta/(4*this._map.options.wheelPxPerZoomLevel),o=4*Math.log(2/(1+Math.exp(-Math.abs(n))))/Math.LN2,s=e?Math.ceil(o/e)*e:o,r=t._limitZoom(i+(this._delta>0?s:-s))-i;this._delta=0,this._startTime=null,r&&("center"===t.options.scrollWheelZoom?t.setZoom(i+r):t.setZoomAround(this._lastMousePos,i+r))}});ye.addInitHook("addHandler","scrollWheelZoom",Pn),ye.mergeOptions({tap:!0,tapTolerance:15});var bn=Me.extend({addHooks:function(){V(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){G(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if($(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var i=t.touches[0],n=i.target;this._startPos=this._newPos=new x(i.clientX,i.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&pt(n,"leaflet-active"),this._holdTimeout=setTimeout(e(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",i))},this),1e3),this._simulateEvent("mousedown",i),V(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),G(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var i=t.changedTouches[0],e=i.target;e&&e.tagName&&"a"===e.tagName.toLowerCase()&&mt(e,"leaflet-active"),this._simulateEvent("mouseup",i),this._isTapValid()&&this._simulateEvent("click",i)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var i=t.touches[0];this._newPos=new x(i.clientX,i.clientY),this._simulateEvent("mousemove",i)},_simulateEvent:function(t,i){var e=document.createEvent("MouseEvents");e._simulated=!0,i.target._simulatedClick=!0,e.initMouseEvent(t,!0,!0,window,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),i.target.dispatchEvent(e)}});Hi&&!Wi&&ye.addInitHook("addHandler","tap",bn),ye.mergeOptions({touchZoom:Hi&&!Ti,bounceAtZoomLimits:!0});var Tn=Me.extend({addHooks:function(){pt(this._map._container,"leaflet-touch-zoom"),V(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){mt(this._map._container,"leaflet-touch-zoom"),G(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var i=this._map;if(t.touches&&2===t.touches.length&&!i._animatingZoom&&!this._zooming){var e=i.mouseEventToContainerPoint(t.touches[0]),n=i.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=i.getSize()._divideBy(2),this._startLatLng=i.containerPointToLatLng(this._centerPoint),"center"!==i.options.touchZoom&&(this._pinchStartLatLng=i.containerPointToLatLng(e.add(n)._divideBy(2))),this._startDist=e.distanceTo(n),this._startZoom=i.getZoom(),this._moved=!1,this._zooming=!0,i._stop(),V(document,"touchmove",this._onTouchMove,this),V(document,"touchend",this._onTouchEnd,this),$(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var i=this._map,n=i.mouseEventToContainerPoint(t.touches[0]),o=i.mouseEventToContainerPoint(t.touches[1]),s=n.distanceTo(o)/this._startDist;if(this._zoom=i.getScaleZoom(s,this._startZoom),!i.options.bounceAtZoomLimits&&(this._zoom<i.getMinZoom()&&s<1||this._zoom>i.getMaxZoom()&&s>1)&&(this._zoom=i._limitZoom(this._zoom)),"center"===i.options.touchZoom){if(this._center=this._startLatLng,1===s)return}else{var r=n._add(o)._divideBy(2)._subtract(this._centerPoint);if(1===s&&0===r.x&&0===r.y)return;this._center=i.unproject(i.project(this._pinchStartLatLng,this._zoom).subtract(r),this._zoom)}this._moved||(i._moveStart(!0),this._moved=!0),g(this._animRequest);var a=e(i._move,i,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=f(a,this,!0),$(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,g(this._animRequest),G(document,"touchmove",this._onTouchMove),G(document,"touchend",this._onTouchEnd),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});ye.addInitHook("addHandler","touchZoom",Tn),ye.BoxZoom=yn,ye.DoubleClickZoom=xn,ye.Drag=wn,ye.Keyboard=Ln,ye.ScrollWheelZoom=Pn,ye.Tap=bn,ye.TouchZoom=Tn;var zn=window.L;window.L=t,Object.freeze=$t,t.version="1.2.0",t.noConflict=function(){return window.L=zn,this},t.Control=xe,t.control=we,t.Browser=Yi,t.Evented=ui,t.Mixin=Ce,t.Util=ai,t.Class=v,t.Handler=Me,t.extend=i,t.bind=e,t.stamp=n,t.setOptions=l,t.DomEvent=le,t.DomUtil=ge,t.PosAnimation=ve,t.Draggable=ke,t.LineUtil=Be,t.PolyUtil=Ie,t.Point=x,t.point=w,t.Bounds=P,t.bounds=b,t.Transformation=Z,t.transformation=E,t.Projection=Re,t.LatLng=M,t.latLng=C,t.LatLngBounds=T,t.latLngBounds=z,t.CRS=li,t.GeoJSON=Qe,t.geoJSON=Kt,t.geoJson=en,t.Layer=We,t.LayerGroup=He,t.layerGroup=function(t){return new He(t)},t.FeatureGroup=Fe,t.featureGroup=function(t){return new Fe(t)},t.ImageOverlay=nn,t.imageOverlay=function(t,i,e){return new nn(t,i,e)},t.VideoOverlay=on,t.videoOverlay=function(t,i,e){return new on(t,i,e)},t.DivOverlay=sn,t.Popup=rn,t.popup=function(t,i){return new rn(t,i)},t.Tooltip=an,t.tooltip=function(t,i){return new an(t,i)},t.Icon=Ue,t.icon=function(t){return new Ue(t)},t.DivIcon=hn,t.divIcon=function(t){return new hn(t)},t.Marker=qe,t.marker=function(t,i){return new qe(t,i)},t.TileLayer=ln,t.tileLayer=Yt,t.GridLayer=un,t.gridLayer=function(t){return new un(t)},t.SVG=gn,t.svg=Jt,t.Renderer=_n,t.Canvas=dn,t.canvas=Xt,t.Path=Ke,t.CircleMarker=Ye,t.circleMarker=function(t,i){return new Ye(t,i)},t.Circle=Xe,t.circle=function(t,i,e){return new Xe(t,i,e)},t.Polyline=Je,t.polyline=function(t,i){return new Je(t,i)},t.Polygon=$e,t.polygon=function(t,i){return new $e(t,i)},t.Rectangle=vn,t.rectangle=function(t,i){return new vn(t,i)},t.Map=ye,t.map=function(t,i){return new ye(t,i)}});
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["dist/leaflet-src.js"],"names":["global","factory","exports","module","define","amd","L","this","extend","dest","i","j","len","src","arguments","length","bind","fn","obj","slice","Array","prototype","apply","call","args","concat","stamp","_leaflet_id","lastId","throttle","time","context","lock","wrapperFn","later","setTimeout","wrapNum","x","range","includeMax","max","min","d","falseFn","formatNum","num","digits","pow","Math","round","trim","str","replace","splitWords","split","setOptions","options","hasOwnProperty","create","getParamString","existingUrl","uppercase","params","push","encodeURIComponent","toUpperCase","indexOf","join","template","data","templateRe","key","value","undefined","Error","array","el","getPrefixed","name","window","timeoutDefer","Date","timeToCall","lastTime","requestAnimFrame","immediate","requestFn","cancelAnimFrame","id","cancelFn","Class","checkDeprecatedMixinEvents","includes","Mixin","isArray","Events","console","warn","stack","Point","y","toPoint","Bounds","a","b","points","toBounds","LatLngBounds","corner1","corner2","latlngs","toLatLngBounds","LatLng","lat","lng","alt","isNaN","toLatLng","c","lon","Transformation","_a","_b","_c","_d","toTransformation","svgCreate","document","createElementNS","pointsToPath","rings","closed","len2","p","svg","userAgentContains","navigator","userAgent","toLowerCase","addPointerListener","type","handler","_addPointerStart","_addPointerMove","_addPointerEnd","removePointerListener","removeEventListener","POINTER_DOWN","POINTER_MOVE","POINTER_UP","POINTER_CANCEL","onDown","e","pointerType","MSPOINTER_TYPE_MOUSE","TAG_WHITE_LIST","target","tagName","preventDefault","_handlePointer","addEventListener","_pointerDocListener","documentElement","_globalPointerDown","_globalPointerMove","_globalPointerUp","_pointers","pointerId","_pointersCount","touches","changedTouches","onMove","buttons","onUp","addDoubleTapListener","onTouchStart","count","pointer","edge","now","delta","last","touch$$1","doubleTap","delay","onTouchEnd","cancelBubble","prop","newTouch","_pre","_touchstart","_touchend","removeDoubleTapListener","touchstart","touchend","dblclick","on","types","addOne","off","removeOne","eventsKey","event","originalHandler","touch","chrome","isExternalTarget","android","filterClick","attachEvent","detachEvent","stopPropagation","originalEvent","_stopped","skipped","disableScrollPropagation","disableClickPropagation","fakeStop","returnValue","stop","getMousePosition","container","clientX","clientY","rect","getBoundingClientRect","left","clientLeft","top","clientTop","getWheelDelta","wheelDeltaY","deltaY","deltaMode","wheelPxFactor","deltaX","deltaZ","wheelDelta","detail","abs","skipEvents","events","related","relatedTarget","parentNode","err","timeStamp","elapsed","lastClick","_simulatedClick","_simulated","get","getElementById","getStyle","style","currentStyle","defaultView","css","getComputedStyle","create$1","className","createElement","appendChild","remove","parent","removeChild","empty","firstChild","toFront","lastChild","toBack","insertBefore","hasClass","classList","contains","getClass","RegExp","test","addClass","classes","add","setClass","removeClass","baseVal","setOpacity","opacity","_setOpacityIE","filter","filterName","filters","item","Enabled","Opacity","testProp","props","setTransform","offset","scale","pos","TRANSFORM","ie3d","setPosition","point","_leaflet_pos","any3d","getPosition","disableImageDrag","enableImageDrag","preventOutline","element","tabIndex","restoreOutline","_outlineElement","_outlineStyle","outline","simplify","tolerance","sqTolerance","_reducePoints","_simplifyDP","pointToSegmentDistance","p1","p2","sqrt","_sqClosestPointOnSegment","markers","Uint8Array","_simplifyDPStep","newPoints","first","index","sqDist","maxSqDist","reducedPoints","prev","_sqDist","clipSegment","bounds","useLastCode","codeOut","newCode","codeA","_lastCode","_getBitCode","codeB","_getEdgeIntersection","code","dx","dy","t","dot","isFlat","_flat","clipPolygon","clippedPoints","k","edges","_code","geometryToLayer","geojson","latlng","geometry","coords","coordinates","layers","pointToLayer","_coordsToLatLng","coordsToLatLng","Marker","FeatureGroup","coordsToLatLngs","Polyline","Polygon","geometries","layer","properties","levelsDeep","latLngToCoords","precision","latLngsToCoords","getFeature","newGeometry","feature","asFeature","geoJSON","GeoJSON","tileLayer","url","TileLayer","canvas$1","canvas","Canvas","svg$1","vml","SVG","freeze","Object","F","proto","toString","emptyImageUrl","requestAnimationFrame","cancelAnimationFrame","clearTimeout","Util","NewClass","initialize","callInitHooks","parentProto","__super__","constructor","statics","_initHooks","_initHooksCalled","include","mergeOptions","addInitHook","init","_on","_off","_events","typeListeners","newListener","ctx","listeners","l","_firingCount","splice","fire","propagate","listens","_propagateEvent","_eventParents","once","addEventParent","removeEventParent","clearAllEventListeners","addOneTimeEventListener","fireEvent","hasEventListeners","Evented","clone","_add","subtract","_subtract","divideBy","_divideBy","multiplyBy","_multiplyBy","scaleBy","unscaleBy","_round","floor","_floor","ceil","_ceil","distanceTo","equals","getCenter","getBottomLeft","getTopRight","getTopLeft","getBottomRight","getSize","intersects","min2","max2","xIntersects","yIntersects","overlaps","xOverlaps","yOverlaps","isValid","sw2","ne2","sw","_southWest","ne","_northEast","pad","bufferRatio","heightBuffer","widthBuffer","getSouthWest","getNorthEast","getNorthWest","getNorth","getWest","getSouthEast","getSouth","getEast","latIntersects","lngIntersects","latOverlaps","lngOverlaps","toBBoxString","maxMargin","other","Earth","distance","wrap","wrapLatLng","sizeInMeters","latAccuracy","lngAccuracy","cos","PI","CRS","latLngToPoint","zoom","projectedPoint","projection","project","transformation","_transform","pointToLatLng","untransformedPoint","untransform","unproject","log","LN2","getProjectedBounds","infinite","s","transform","wrapLng","wrapLat","wrapLatLngBounds","center","newCenter","latShift","lngShift","R","latlng1","latlng2","rad","lat1","lat2","sin","acos","SphericalMercator","MAX_LATITUDE","atan","exp","disableTextSelection","enableTextSelection","_userSelect","EPSG3857","EPSG900913","style$1","ie","ielt9","webkit","android23","opera","gecko","safari","phantom","opera12","win","platform","webkit3d","WebKitCSSMatrix","gecko3d","L_DISABLE_3D","mobile","orientation","mobileWebkit","mobileWebkit3d","msPointer","PointerEvent","MSPointerEvent","L_NO_TOUCH","DocumentTouch","mobileOpera","mobileGecko","retina","devicePixelRatio","screen","deviceXDPI","logicalXDPI","getContext","createSVGRect","div","innerHTML","shape","behavior","adj","Browser","DomEvent","addListener","removeListener","TRANSITION","TRANSITION_END","userSelectProperty","DomUtil","PosAnimation","run","newPos","duration","easeLinearity","_el","_inProgress","_duration","_easeOutPower","_startPos","_offset","_startTime","_animate","_step","_complete","_animId","_runFrame","_easeOut","progress","Map","crs","minZoom","maxZoom","maxBounds","renderer","zoomAnimation","zoomAnimationThreshold","fadeAnimation","markerZoomAnimation","transform3DLimit","zoomSnap","zoomDelta","trackResize","_initContainer","_initLayout","_onResize","_initEvents","setMaxBounds","_zoom","_limitZoom","setView","reset","_handlers","_layers","_zoomBoundLayers","_sizeChanged","_zoomAnimated","_createAnimProxy","_proxy","_catchTransitionEnd","_addLayers","_limitCenter","_stop","_loaded","animate","pan","_tryAnimatedZoom","_tryAnimatedPan","_sizeTimer","_resetView","setZoom","zoomIn","zoomOut","setZoomAround","getZoomScale","viewHalf","centerOffset","latLngToContainerPoint","containerPointToLatLng","_getBoundsCenterZoom","getBounds","paddingTL","paddingTopLeft","padding","paddingBR","paddingBottomRight","getBoundsZoom","Infinity","paddingOffset","swPoint","nePoint","fitBounds","fitWorld","panTo","panBy","getZoom","_panAnim","step","_onPanTransitionStep","end","_onPanTransitionEnd","noMoveStart","_mapPane","_getMapPanePos","_rawPanBy","flyTo","targetCenter","targetZoom","r","w1","w0","rho2","u1","sq","sinh","n","cosh","tanh","w","r0","rho","u","easeOut","frame","start","S","_flyToFrame","_move","from","to","startZoom","getScaleZoom","_moveEnd","size","_moveStart","flyToBounds","_panInsideMaxBounds","setMinZoom","setMaxZoom","panInsideBounds","_enforcingBounds","invalidateSize","oldSize","_lastCenter","newSize","oldCenter","debounceMoveend","locate","_locateOptions","timeout","watch","_handleGeolocationError","message","onResponse","_handleGeolocationResponse","onError","_locationWatchId","geolocation","watchPosition","getCurrentPosition","stopLocate","clearWatch","error","latitude","longitude","accuracy","timestamp","addHandler","HandlerClass","enable","_containerId","_container","_clearControlPos","_clearHandlers","_panes","_renderer","createPane","pane","_checkIfLoaded","_moved","layerPointToLatLng","_getCenterLayerPoint","getPixelBounds","getMinZoom","_layersMinZoom","getMaxZoom","_layersMaxZoom","inside","nw","se","boundsSize","snap","scalex","scaley","_size","clientWidth","clientHeight","topLeftPoint","_getTopLeftPoint","getPixelOrigin","_pixelOrigin","getPixelWorldBounds","getPane","getPanes","getContainer","toZoom","fromZoom","latLngToLayerPoint","containerPointToLayerPoint","layerPointToContainerPoint","layerPoint","mouseEventToContainerPoint","mouseEventToLayerPoint","mouseEventToLatLng","_onScroll","_fadeAnimated","position","_initPanes","_initControlPos","panes","_paneRenderers","markerPane","shadowPane","loading","zoomChanged","_getNewPixelOrigin","pinch","_getZoomSpan","remove$$1","_targets","onOff","_handleDOMEvent","_onMoveEnd","_resizeRequest","scrollTop","scrollLeft","_findEventTargets","targets","isHover","srcElement","dragging","_draggableMoved","_fireDOMEvent","_mouseEvents","synth","isMarker","containerPoint","getLatLng","bubblingMouseEvents","enabled","moved","boxZoom","disable","whenReady","callback","_latLngToNewLayerPoint","topLeft","_latLngBoundsToNewLayerBounds","latLngBounds","_getCenterOffset","centerPoint","viewBounds","_getBoundsOffset","_limitOffset","newBounds","pxBounds","projectedMaxBounds","minOffset","maxOffset","_rebound","right","proxy","mapPane","_animatingZoom","_onZoomTransitionEnd","z","_destroyAnimProxy","propertyName","_nothingToAnimate","getElementsByClassName","_animateZoom","startAnim","noUpdate","_animateToCenter","_animateToZoom","Control","map","_map","removeControl","addControl","addTo","onAdd","corner","_controlCorners","onRemove","_refocusOnMap","screenX","screenY","focus","control","createCorner","vSide","hSide","corners","_controlContainer","Layers","collapsed","autoZIndex","hideSingleBase","sortLayers","sortFunction","layerA","layerB","nameA","nameB","baseLayers","overlays","_layerControlInputs","_lastZIndex","_handlingClick","_addLayer","_update","_checkDisabledLayers","_onLayerChange","_expandIfNotCollapsed","addBaseLayer","addOverlay","removeLayer","_getLayer","expand","_form","height","acceptableHeight","offsetTop","collapse","setAttribute","form","mouseenter","mouseleave","link","_layersLink","href","title","_baseLayersList","_separator","_overlaysList","overlay","sort","setZIndex","baseLayersPresent","overlaysPresent","baseLayersCount","_addItem","display","_createRadioElement","checked","radioHtml","radioFragment","input","label","hasLayer","defaultChecked","layerId","_onInputClick","holder","inputs","addedLayers","removedLayers","addLayer","disabled","_expand","_collapse","Zoom","zoomInText","zoomInTitle","zoomOutText","zoomOutTitle","zoomName","_zoomInButton","_createButton","_zoomIn","_zoomOutButton","_zoomOut","_updateDisabled","_disabled","shiftKey","html","zoomControl","Scale","maxWidth","metric","imperial","_addScales","updateWhenIdle","_mScale","_iScale","maxMeters","_updateScales","_updateMetric","_updateImperial","meters","_getRoundNum","_updateScale","maxMiles","miles","feet","maxFeet","text","ratio","width","pow10","Attribution","prefix","_attributions","attributionControl","getAttribution","addAttribution","setPrefix","removeAttribution","attribs","prefixAndAttribs","attribution","Handler","_enabled","addHooks","removeHooks","START","END","mousedown","pointerdown","MSPointerDown","MOVE","Draggable","clickTolerance","dragStartTarget","preventOutline$$1","_element","_dragStartTarget","_preventOutline","_onDown","_dragging","finishDrag","which","button","_moving","_startPoint","_onMove","_onUp","body","_lastTarget","SVGElementInstance","correspondingUseElement","_newPos","_animRequest","_lastEvent","_updatePosition","LineUtil","closestPointOnSegment","PolyUtil","LonLat","Mercator","R_MINOR","tmp","con","ts","tan","phi","dphi","EPSG3395","EPSG4326","Simple","Layer","removeFrom","_mapToAdd","addInteractiveTarget","targetEl","removeInteractiveTarget","_layerAdd","getEvents","beforeAdd","eachLayer","method","_addZoomLimit","_updateZoomLevels","_removeZoomLimit","oldZoomSpan","LayerGroup","getLayerId","clearLayers","invoke","methodName","getLayer","getLayers","zIndex","setStyle","bringToFront","bringToBack","Icon","createIcon","oldIcon","_createIcon","createShadow","_getIconUrl","img","_createImg","_setIconStyles","sizeOption","anchor","shadowAnchor","iconAnchor","marginLeft","marginTop","IconDefault","iconUrl","iconRetinaUrl","shadowUrl","iconSize","popupAnchor","tooltipAnchor","shadowSize","imagePath","_detectIconPath","path","MarkerDrag","marker","_marker","icon","_icon","_draggable","dragstart","_onDragStart","drag","_onDrag","dragend","_onDragEnd","_oldLatLng","closePopup","shadow","_shadow","iconPos","_latlng","oldLatLng","interactive","draggable","keyboard","zIndexOffset","riseOnHover","riseOffset","_initIcon","update","_removeIcon","_removeShadow","viewreset","setLatLng","setZIndexOffset","setIcon","_popup","bindPopup","getElement","_setPos","classToAdd","addIcon","mouseover","_bringToFront","mouseout","_resetZIndex","newShadow","addShadow","_updateOpacity","_initInteraction","_zIndex","_updateZIndex","opt","_getPopupAnchor","_getTooltipAnchor","Path","stroke","color","weight","lineCap","lineJoin","dashArray","dashOffset","fill","fillColor","fillOpacity","fillRule","getRenderer","_initPath","_reset","_addPath","_removePath","redraw","_updatePath","_updateStyle","_bringToBack","_path","_project","_clickTolerance","CircleMarker","radius","_radius","setRadius","getRadius","_point","_updateBounds","r2","_radiusY","_pxBounds","_updateCircle","_empty","_bounds","_containsPoint","Circle","legacyOptions","_mRadius","half","latR","bottom","lngR","smoothFactor","noClip","_setLatLngs","getLatLngs","_latlngs","setLatLngs","isEmpty","closestLayerPoint","minDistance","minPoint","closest","jLen","_parts","halfDist","segDist","dist","_rings","addLatLng","_defaultShape","_convertLatLngs","result","flat","_projectLatlngs","projectedBounds","ring","_clipPoints","segment","parts","_simplifyPoints","_updatePoly","part","f","area","pop","clipped","addData","features","defaultOptions","resetStyle","onEachFeature","_setLayerStyle","PointToGeoJSON","toGeoJSON","multi","holes","toMultiPoint","isGeometryCollection","jsons","json","geoJson","ImageOverlay","crossOrigin","errorOverlayUrl","_url","_image","_initImage","styleOpts","setUrl","setBounds","zoomanim","onselectstart","onmousemove","onload","onerror","_overlayOnError","image","errorUrl","VideoOverlay","autoplay","loop","wasElementSupplied","vid","class","onloadeddata","source","DivOverlay","_source","_removeTimeout","_adjustPan","getContent","_content","setContent","content","visibility","_updateContent","_updateLayout","isOpen","node","_contentNode","hasChildNodes","_getAnchor","_containerBottom","_containerLeft","_containerWidth","Popup","minWidth","maxHeight","autoPan","autoPanPaddingTopLeft","autoPanPaddingBottomRight","autoPanPadding","keepInView","closeButton","autoClose","openOn","openPopup","popup","closeOnClick","closePopupOnClick","preclick","_close","moveend","wrapper","_wrapper","_tipContainer","_tip","_closeButton","_onCloseButtonClick","whiteSpace","offsetWidth","offsetHeight","marginBottom","parseInt","containerHeight","containerWidth","layerPos","containerPos","_popupHandlersAdded","click","_openPopup","keypress","_onKeyPress","move","_movePopup","unbindPopup","togglePopup","isPopupOpen","setPopupContent","getPopup","keyCode","Tooltip","direction","permanent","sticky","tooltip","closeTooltip","_setPosition","tooltipPoint","tooltipWidth","tooltipHeight","openTooltip","bindTooltip","_tooltip","_initTooltipInteractions","unbindTooltip","_tooltipHandlersAdded","_moveTooltip","_openTooltip","mousemove","toggleTooltip","isTooltipOpen","setTooltipContent","getTooltip","DivIcon","bgPos","backgroundPosition","Default","GridLayer","tileSize","updateWhenZooming","updateInterval","maxNativeZoom","minNativeZoom","noWrap","keepBuffer","_levels","_tiles","_removeAllTiles","_tileZoom","_setAutoZIndex","isLoading","_loading","viewprereset","_invalidateAll","createTile","getTileSize","compare","children","edgeZIndex","isFinite","nextFrame","willPrune","tile","current","loaded","fade","active","_onOpaqueTile","_noPrune","_pruneTiles","_fadeFrame","_updateLevels","_onUpdateLevel","_removeTilesAtZoom","_onRemoveLevel","level","origin","_setZoomTransform","_onCreateLevel","_level","retain","_retainParent","_retainChildren","_removeTile","x2","y2","z2","coords2","_tileCoordsToKey","animating","_setView","_clampZoom","noPrune","tileZoom","tileZoomChanged","_abortLoading","_resetGrid","_setZoomTransforms","translate","_tileSize","_globalTileRange","_pxBoundsToTileRange","_wrapX","_wrapY","_getTiledPixelBounds","mapZoom","pixelCenter","halfSize","pixelBounds","tileRange","tileCenter","queue","margin","noPruneRange","_isValidTile","fragment","createDocumentFragment","_addTile","tileBounds","_tileCoordsToBounds","_keyToBounds","_keyToTileCoords","nwPoint","sePoint","_initTile","WebkitBackfaceVisibility","tilePos","_getTilePos","_wrapCoords","_tileReady","_noTilesToLoad","newCoords","subdomains","errorTileUrl","zoomOffset","tms","zoomReverse","detectRetina","_onTileRemove","noRedraw","done","_tileOnLoad","_tileOnError","getTileUrl","_getSubdomain","_getZoomForUrl","invertedY","tilePoint","complete","TileLayerWMS","defaultWmsParams","service","request","styles","format","transparent","version","wmsParams","_crs","_wmsVersion","parseFloat","projectionKey","bbox","setParams","WMS","wms","Renderer","_updatePaths","_destroyContainer","_onZoom","zoomend","_onZoomEnd","_onAnimZoom","ev","_updateTransform","currentCenterPoint","_center","topLeftOffset","_onViewPreReset","_postponeUpdatePaths","_draw","_onMouseMove","_onClick","_handleMouseOut","_ctx","_redrawBounds","_redraw","_drawnLayers","m","_updateDashArray","order","_order","_drawLast","next","_drawFirst","_requestRedraw","_extendRedrawBounds","Number","_dashArray","_redrawRequest","_clear","clearRect","save","beginPath","clip","_drawing","restore","closePath","_fillStroke","arc","globalAlpha","fillStyle","setLineDash","lineWidth","strokeStyle","clickedLayer","_fireEvent","moving","_handleMouseHover","_hoveredLayer","candidateHoveredLayer","vmlCreate","namespaces","vmlMixin","coordsize","_stroke","_fill","stroked","filled","dashStyle","endcap","joinstyle","_setPath","v","create$2","zoomstart","_onZoomStart","_rootGroup","_svgSize","removeAttribute","_getPaneRenderer","preferCanvas","Rectangle","_boundsToLatLngs","BoxZoom","_pane","overlayPane","_resetStateTimeout","_destroy","_onMouseDown","_resetState","_clearDeferredResetState","contextmenu","mouseup","_onMouseUp","keydown","_onKeyDown","_box","_finish","boxZoomBounds","doubleClickZoom","DoubleClickZoom","_onDoubleClick","oldZoom","inertia","inertiaDeceleration","inertiaMaxSpeed","worldCopyJump","maxBoundsViscosity","Drag","_onPreDragLimit","_onPreDragWrap","_positions","_times","_offsetLimit","_viscosity","_lastTime","_lastPos","_absPos","shift","pxCenter","pxWorldCenter","_initialWorldOffset","_worldWidth","_viscousLimit","threshold","limit","worldWidth","halfWidth","newX1","newX2","newX","noInertia","ease","speedVector","speed","limitedSpeed","limitedSpeedVector","decelerationDuration","keyboardPanDelta","Keyboard","keyCodes","down","up","_setPanDelta","_setZoomDelta","_onFocus","blur","_onBlur","_addHooks","_removeHooks","_focused","docEl","scrollTo","panDelta","keys","_panKeys","codes","_zoomKeys","altKey","ctrlKey","metaKey","scrollWheelZoom","wheelDebounceTime","wheelPxPerZoomLevel","ScrollWheelZoom","_onWheelScroll","_delta","debounce","_lastMousePos","_timer","_performZoom","d2","d3","d4","tap","tapTolerance","Tap","_fireClick","_holdTimeout","_isTapValid","_simulateEvent","touchmove","simulatedEvent","createEvent","initMouseEvent","dispatchEvent","touchZoom","bounceAtZoomLimits","TouchZoom","_onTouchStart","_zooming","_centerPoint","_startLatLng","_pinchStartLatLng","_startDist","_startZoom","_onTouchMove","_onTouchEnd","moveFn","oldL","noConflict","Projection","latLng","layerGroup","featureGroup","imageOverlay","videoOverlay","video","divIcon","gridLayer","circleMarker","circle","polyline","polygon","rectangle"],"mappings":";;;;CAIC,SAAUA,EAAQC,GACC,iBAAZC,SAA0C,oBAAXC,OAAyBF,EAAQC,SACrD,mBAAXE,QAAyBA,OAAOC,IAAMD,QAAQ,WAAYH,GAChEA,EAASD,EAAOM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,EAAQqmB,IAAMA,GACdrmB,EAAQs2B,IA/1RR,SAAmBhxB,EAAIhC,GACtB,OAAO,IAAI+iB,GAAI/gB,EAAIhC","file":"dist/leaflet.js.map"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * martinez v0.4.3
3
+ * Martinez polygon clipping algorithm, does boolean operation on polygons (multipolygons, polygons with holes etc): intersection, union, difference, xor
4
+ *
5
+ * @author Alex Milevski <info@w8r.name>
6
+ * @license MIT
7
+ * @preserve
8
+ */
9
+ (function(t,e){typeof exports==="object"&&typeof module!=="undefined"?e(exports):typeof define==="function"&&define.amd?define(["exports"],e):e(t.martinez={})})(this,function(t){"use strict";function i(t,e){return t>e?1:t<e?-1:0}var y=function t(e,r){if(e===void 0)e=i;if(r===void 0)r=false;this._compare=e;this._root=null;this._size=0;this._noDuplicates=!!r};var e={size:{configurable:true}};y.prototype.rotateLeft=function t(e){var r=e.right;if(r){e.right=r.left;if(r.left){r.left.parent=e}r.parent=e.parent}if(!e.parent){this._root=r}else if(e===e.parent.left){e.parent.left=r}else{e.parent.right=r}if(r){r.left=e}e.parent=r};y.prototype.rotateRight=function t(e){var r=e.left;if(r){e.left=r.right;if(r.right){r.right.parent=e}r.parent=e.parent}if(!e.parent){this._root=r}else if(e===e.parent.left){e.parent.left=r}else{e.parent.right=r}if(r){r.right=e}e.parent=r};y.prototype._splay=function t(e){var r=this;while(e.parent){var i=e.parent;if(!i.parent){if(i.left===e){r.rotateRight(i)}else{r.rotateLeft(i)}}else if(i.left===e&&i.parent.left===i){r.rotateRight(i.parent);r.rotateRight(i)}else if(i.right===e&&i.parent.right===i){r.rotateLeft(i.parent);r.rotateLeft(i)}else if(i.left===e&&i.parent.right===i){r.rotateRight(i);r.rotateLeft(i)}else{r.rotateLeft(i);r.rotateRight(i)}}};y.prototype.splay=function t(e){var r=this;var i,n,o,f,l;while(e.parent){i=e.parent;n=i.parent;if(n&&n.parent){o=n.parent;if(o.left===n){o.left=e}else{o.right=e}e.parent=o}else{e.parent=null;r._root=e}f=e.left;l=e.right;if(e===i.left){if(n){if(n.left===i){if(i.right){n.left=i.right;n.left.parent=n}else{n.left=null}i.right=n;n.parent=i}else{if(f){n.right=f;f.parent=n}else{n.right=null}e.left=n;n.parent=e}}if(l){i.left=l;l.parent=i}else{i.left=null}e.right=i;i.parent=e}else{if(n){if(n.right===i){if(i.left){n.right=i.left;n.right.parent=n}else{n.right=null}i.left=n;n.parent=i}else{if(l){n.left=l;l.parent=n}else{n.left=null}e.right=n;n.parent=e}}if(f){i.right=f;f.parent=i}else{i.right=null}e.left=i;i.parent=e}}};y.prototype.replace=function t(e,r){if(!e.parent){this._root=r}else if(e===e.parent.left){e.parent.left=r}else{e.parent.right=r}if(r){r.parent=e.parent}};y.prototype.minNode=function t(e){if(e===void 0)e=this._root;if(e){while(e.left){e=e.left}}return e};y.prototype.maxNode=function t(e){if(e===void 0)e=this._root;if(e){while(e.right){e=e.right}}return e};y.prototype.insert=function t(e,r){var i=this._root;var n=null;var o=this._compare;var f;if(this._noDuplicates){while(i){n=i;f=o(i.key,e);if(f===0){return}else if(o(i.key,e)<0){i=i.right}else{i=i.left}}}else{while(i){n=i;if(o(i.key,e)<0){i=i.right}else{i=i.left}}}i={key:e,data:r,left:null,right:null,parent:n};if(!n){this._root=i}else if(o(n.key,i.key)<0){n.right=i}else{n.left=i}this.splay(i);this._size++;return i};y.prototype.find=function t(e){var r=this._root;var i=this._compare;while(r){var n=i(r.key,e);if(n<0){r=r.right}else if(n>0){r=r.left}else{return r}}return null};y.prototype.contains=function t(e){var r=this._root;var i=this._compare;while(r){var n=i(e,r.key);if(n===0){return true}else if(n<0){r=r.left}else{r=r.right}}return false};y.prototype.remove=function t(e){var r=this.find(e);if(!r){return false}this.splay(r);if(!r.left){this.replace(r,r.right)}else if(!r.right){this.replace(r,r.left)}else{var i=this.minNode(r.right);if(i.parent!==r){this.replace(i,i.right);i.right=r.right;i.right.parent=i}this.replace(r,i);i.left=r.left;i.left.parent=i}this._size--;return true};y.prototype.removeNode=function t(e){if(!e){return false}this.splay(e);if(!e.left){this.replace(e,e.right)}else if(!e.right){this.replace(e,e.left)}else{var r=this.minNode(e.right);if(r.parent!==e){this.replace(r,r.right);r.right=e.right;r.right.parent=r}this.replace(e,r);r.left=e.left;r.left.parent=r}this._size--;return true};y.prototype.erase=function t(e){var r=this.find(e);if(!r){return}this.splay(r);var i=r.left;var n=r.right;var o=null;if(i){i.parent=null;o=this.maxNode(i);this.splay(o);this._root=o}if(n){if(i){o.right=n}else{this._root=n}n.parent=o}this._size--};y.prototype.pop=function t(){var e=this._root,r=null;if(e){while(e.left){e=e.left}r={key:e.key,data:e.data};this.remove(e.key)}return r};y.prototype.next=function t(e){var r=e;if(r){if(r.right){r=r.right;while(r&&r.left){r=r.left}}else{r=e.parent;while(r&&r.right===e){e=r;r=r.parent}}}return r};y.prototype.prev=function t(e){var r=e;if(r){if(r.left){r=r.left;while(r&&r.right){r=r.right}}else{r=e.parent;while(r&&r.left===e){e=r;r=r.parent}}}return r};y.prototype.forEach=function t(e){var r=this._root;var i=[],n=false,o=0;while(!n){if(r){i.push(r);r=r.left}else{if(i.length>0){r=i.pop();e(r,o++);r=r.right}else{n=true}}}return this};y.prototype.range=function t(e,r,i,n){var o=this;var f=[];var l=this._compare;var u=this._root,a;while(f.length!==0||u){if(u){f.push(u);u=u.left}else{u=f.pop();a=l(u.key,r);if(a>0){break}else if(l(u.key,e)>=0){if(i.call(n,u)){return o}}u=u.right}}return this};y.prototype.keys=function t(){var e=this._root;var r=[],i=[],n=false;while(!n){if(e){r.push(e);e=e.left}else{if(r.length>0){e=r.pop();i.push(e.key);e=e.right}else{n=true}}}return i};y.prototype.values=function t(){var e=this._root;var r=[],i=[],n=false;while(!n){if(e){r.push(e);e=e.left}else{if(r.length>0){e=r.pop();i.push(e.data);e=e.right}else{n=true}}}return i};y.prototype.at=function t(e){var r=this._root;var i=[],n=false,o=0;while(!n){if(r){i.push(r);r=r.left}else{if(i.length>0){r=i.pop();if(o===e){return r}o++;r=r.right}else{n=true}}}return null};y.prototype.load=function t(e,r,i){if(e===void 0)e=[];if(r===void 0)r=[];if(i===void 0)i=false;if(this._size!==0){throw new Error("bulk-load: tree is not empty")}var n=e.length;if(i){a(e,r,0,n-1,this._compare)}this._root=s(null,e,r,0,n);this._size=n;return this};y.prototype.min=function t(){var e=this.minNode(this._root);if(e){return e.key}else{return null}};y.prototype.max=function t(){var e=this.maxNode(this._root);if(e){return e.key}else{return null}};y.prototype.isEmpty=function t(){return this._root===null};e.size.get=function(){return this._size};y.createTree=function t(e,r,i,n,o){return new y(i,o).load(e,r,n)};Object.defineProperties(y.prototype,e);function s(t,e,r,i,n){var o=n-i;if(o>0){var f=i+Math.floor(o/2);var l=e[f];var u=r[f];var a={key:l,data:u,parent:t};a.left=s(a,e,r,i,f);a.right=s(a,e,r,f+1,n);return a}return null}function a(t,e,r,i,n){if(r>=i){return}var o=t[r+i>>1];var f=r-1;var l=i+1;while(true){do{f++}while(n(t[f],o)<0);do{l--}while(n(t[l],o)>0);if(f>=l){break}var u=t[f];t[f]=t[l];t[l]=u;u=e[f];e[f]=e[l];e[l]=u}a(t,e,r,l,n);a(t,e,l+1,i,n)}var f=0;var u=1;var h=2;var p=3;var d=0;var l=1;var E=2;var v=3;function w(t,e,r){if(e===null){t.inOut=false;t.otherInOut=true}else{if(t.isSubject===e.isSubject){t.inOut=!e.inOut;t.otherInOut=e.otherInOut}else{t.inOut=!e.otherInOut;t.otherInOut=e.isVertical()?!e.inOut:e.inOut}if(e){t.prevInResult=!n(e,r)||e.isVertical()?e.prevInResult:e}}t.inResult=n(t,r)}function n(t,e){switch(t.type){case f:switch(e){case d:return!t.otherInOut;case l:return t.otherInOut;case E:return t.isSubject&&t.otherInOut||!t.isSubject&&!t.otherInOut;case v:return true}break;case h:return e===d||e===l;case p:return e===E;case u:return false}return false}var c=function t(e,r,i,n,o){this.left=r;this.point=e;this.otherEvent=i;this.isSubject=n;this.type=o||f;this.inOut=false;this.otherInOut=false;this.prevInResult=null;this.inResult=false;this.resultInOut=false;this.isExteriorRing=true};c.prototype.isBelow=function t(e){var r=this.point,i=this.otherEvent.point;return this.left?(r[0]-e[0])*(i[1]-e[1])-(i[0]-e[0])*(r[1]-e[1])>0:(i[0]-e[0])*(r[1]-e[1])-(r[0]-e[0])*(i[1]-e[1])>0};c.prototype.isAbove=function t(e){return!this.isBelow(e)};c.prototype.isVertical=function t(){return this.point[0]===this.otherEvent.point[0]};c.prototype.clone=function t(){var e=new c(this.point,this.left,this.otherEvent,this.isSubject,this.type);e.inResult=this.inResult;e.prevInResult=this.prevInResult;e.isExteriorRing=this.isExteriorRing;e.inOut=this.inOut;e.otherInOut=this.otherInOut;return e};function g(t,e){if(t[0]===e[0]){if(t[1]===e[1]){return true}else{return false}}return false}function o(t,e,r){return(t[0]-r[0])*(e[1]-r[1])-(e[0]-r[0])*(t[1]-r[1])}function _(t,e){var r=t.point;var i=e.point;if(r[0]>i[0]){return 1}if(r[0]<i[0]){return-1}if(r[1]!==i[1]){return r[1]>i[1]?1:-1}return I(t,e,r,i)}function I(t,e,r,i){if(t.left!==e.left){return t.left?1:-1}if(o(r,t.otherEvent.point,e.otherEvent.point)!==0){return!t.isBelow(e.otherEvent.point)?1:-1}return!t.isSubject&&e.isSubject?1:-1}function m(t,e,r){var i=new c(e,false,t,t.isSubject);var n=new c(e,true,t.otherEvent,t.isSubject);if(g(t.point,t.otherEvent.point)){console.warn("what is that, a collapsed segment?",t)}i.contourId=n.contourId=t.contourId;if(_(n,t.otherEvent)>0){t.otherEvent.left=true;n.left=false}t.otherEvent.otherEvent=n;t.otherEvent=i;r.push(n);r.push(i);return r}function k(t,e){return t[0]*e[1]-t[1]*e[0]}function b(t,e){return t[0]*e[0]+t[1]*e[1]}function O(t,e,r,i,n){var o=[e[0]-t[0],e[1]-t[1]];var f=[i[0]-r[0],i[1]-r[1]];function l(t,e,r){return[t[0]+e*r[0],t[1]+e*r[1]]}var u=[r[0]-t[0],r[1]-t[1]];var a=k(o,f);var s=a*a;var h=b(o,o);if(s>0){var p=k(u,f)/a;if(p<0||p>1){return null}var v=k(u,o)/a;if(v<0||v>1){return null}if(p===0||p===1){return n?null:[l(t,p,o)]}if(v===0||v===1){return n?null:[l(r,v,f)]}return[l(t,p,o)]}a=k(u,o);s=a*a;if(s>0){return null}var c=b(o,u)/h;var g=c+b(o,f)/h;var y=Math.min(c,g);var d=Math.max(c,g);if(y<=1&&d>=0){if(y===1){return n?null:[l(t,y>0?y:0,o)]}if(d===0){return n?null:[l(t,d<1?d:1,o)]}if(n&&y===0&&d===1){return null}return[l(t,y>0?y:0,o),l(t,d<1?d:1,o)]}return null}function R(t,e,r){var i=O(t.point,t.otherEvent.point,e.point,e.otherEvent.point);var n=i?i.length:0;if(n===0){return 0}if(n===1&&(g(t.point,e.point)||g(t.otherEvent.point,e.otherEvent.point))){return 0}if(n===2&&t.isSubject===e.isSubject){return 0}if(n===1){if(!g(t.point,i[0])&&!g(t.otherEvent.point,i[0])){m(t,i[0],r)}if(!g(e.point,i[0])&&!g(e.otherEvent.point,i[0])){m(e,i[0],r)}return 1}var o=[];var f=false;var l=false;if(g(t.point,e.point)){f=true}else if(_(t,e)===1){o.push(e,t)}else{o.push(t,e)}if(g(t.otherEvent.point,e.otherEvent.point)){l=true}else if(_(t.otherEvent,e.otherEvent)===1){o.push(e.otherEvent,t.otherEvent)}else{o.push(t.otherEvent,e.otherEvent)}if(f&&l||f){e.type=u;t.type=e.inOut===t.inOut?h:p;if(f&&!l){m(o[1].otherEvent,o[0].point,r)}return 2}if(l){m(o[0],o[1].point,r);return 3}if(o[0]!==o[3].otherEvent){m(o[0],o[1].point,r);m(o[1],o[2].point,r);return 3}m(o[0],o[1].point,r);m(o[3].otherEvent,o[2].point,r);return 3}function j(t,e){if(t===e){return 0}if(o(t.point,t.otherEvent.point,e.point)!==0||o(t.point,t.otherEvent.point,e.otherEvent.point)!==0){if(g(t.point,e.point)){return t.isBelow(e.otherEvent.point)?-1:1}if(t.point[0]===e.point[0]){return t.point[1]<e.point[1]?-1:1}if(_(t,e)===1){return e.isAbove(t.point)?-1:1}return t.isBelow(e.point)?-1:1}if(t.isSubject===e.isSubject){var r=t.point,i=e.point;if(r[0]===i[0]&&r[1]===i[1]){r=t.otherEvent.point;i=e.otherEvent.point;if(r[0]===i[0]&&r[1]===i[1]){return 0}else{return t.contourId>e.contourId?1:-1}}}else{return t.isSubject?-1:1}return _(t,e)===1?1:-1}function x(t,e,r,i,n,o){var f=new y(j);var l=[];var u=Math.min(i[2],n[2]);var a,s,h;while(t.length!==0){var p=t.pop();l.push(p);if(o===d&&p.point[0]>u||o===E&&p.point[0]>i[2]){break}if(p.left){s=a=f.insert(p);h=f.minNode();if(a!==h){a=f.prev(a)}else{a=null}s=f.next(s);var v=a?a.key:null;var c=void 0;w(p,v,o);if(s){if(R(p,s.key,t)===2){w(p,v,o);w(p,s.key,o)}}if(a){if(R(a.key,p,t)===2){var g=a;if(g!==h){g=f.prev(g)}else{g=null}c=g?g.key:null;w(v,c,o);w(p,v,o)}}}else{p=p.otherEvent;s=a=f.find(p);if(a&&s){if(a!==h){a=f.prev(a)}else{a=null}s=f.next(s);f.remove(p);if(s&&a){R(a.key,s.key,t)}}}}return l}function S(t){var e,r,i,n;var o=[];for(r=0,i=t.length;r<i;r++){e=t[r];if(e.left&&e.inResult||!e.left&&e.otherEvent.inResult){o.push(e)}}var f=false;while(!f){f=true;for(r=0,i=o.length;r<i;r++){if(r+1<i&&_(o[r],o[r+1])===1){n=o[r];o[r]=o[r+1];o[r+1]=n;f=false}}}for(r=0,i=o.length;r<i;r++){e=o[r];e.pos=r}for(r=0,i=o.length;r<i;r++){e=o[r];if(!e.left){n=e.pos;e.pos=e.otherEvent.pos;e.otherEvent.pos=n}}return o}function N(t,e,r,i){var n=t+1;var o=e.length;if(n>o-1){return t-1}var f=e[t].point;var l=e[n].point;while(n<o&&l[0]===f[0]&&l[1]===f[1]){if(!r[n]){return n}else{n++}l=e[n].point}n=t-1;while(r[n]&&n>=i){n--}return n}function z(t,e){var r,i;var n=S(t);var o={};var f=[];var l;for(r=0,i=n.length;r<i;r++){if(o[r]){continue}var u=[[]];if(!n[r].isExteriorRing){if(e===E&&!n[r].isSubject&&f.length===0){f.push(u)}else if(f.length===0){f.push([[u]])}else{f[f.length-1].push(u[0])}}else if(e===E&&!n[r].isSubject&&f.length>1){f[f.length-1].push(u[0])}else{f.push(u)}var a=f.length-1;var s=r;var h=n[r].point;u[0].push(h);while(s>=r){l=n[s];o[s]=true;if(l.left){l.resultInOut=false;l.contourId=a}else{l.otherEvent.resultInOut=true;l.otherEvent.contourId=a}s=l.pos;o[s]=true;u[0].push(n[s].point);s=N(s,n,o,r)}s=s===-1?r:s;l=n[s];o[s]=o[l.pos]=true;l.otherEvent.resultInOut=true;l.otherEvent.contourId=a}return f}var M=L;var r=L;function L(t,e){var r=this;if(!(this instanceof L)){return new L(t,e)}this.data=t||[];this.length=this.data.length;this.compare=e||B;if(this.length>0){for(var i=(this.length>>1)-1;i>=0;i--){r._down(i)}}}function B(t,e){return t<e?-1:t>e?1:0}L.prototype={push:function(t){this.data.push(t);this.length++;this._up(this.length-1)},pop:function(){if(this.length===0){return undefined}var t=this.data[0];this.length--;if(this.length>0){this.data[0]=this.data[this.length];this._down(0)}this.data.pop();return t},peek:function(){return this.data[0]},_up:function(t){var e=this.data;var r=this.compare;var i=e[t];while(t>0){var n=t-1>>1;var o=e[n];if(r(i,o)>=0){break}e[t]=o;t=n}e[t]=i},_down:function(t){var e=this;var r=this.data;var i=this.compare;var n=this.length>>1;var o=r[t];while(t<n){var f=(t<<1)+1;var l=f+1;var u=r[f];if(l<e.length&&i(r[l],u)<0){f=l;u=r[l]}if(i(u,o)>=0){break}r[t]=u;t=f}r[t]=o}};M.default=r;var D=Math.max;var T=Math.min;var V=0;function A(t,e,r,i,n,o){var f,l,u,a,s,h;for(f=0,l=t.length-1;f<l;f++){u=t[f];a=t[f+1];s=new c(u,false,undefined,e);h=new c(a,false,s,e);s.otherEvent=h;if(u[0]===a[0]&&u[1]===a[1]){continue}s.contourId=h.contourId=r;if(!o){s.isExteriorRing=false;h.isExteriorRing=false}if(_(s,h)>0){h.left=true}else{s.left=true}var p=u[0],v=u[1];n[0]=T(n[0],p);n[1]=T(n[1],v);n[2]=D(n[2],p);n[3]=D(n[3],v);i.push(s);i.push(h)}}function C(t,e,r,i,n){var o=new M(null,_);var f,l,u,a,s,h;for(u=0,a=t.length;u<a;u++){f=t[u];for(s=0,h=f.length;s<h;s++){l=s===0;if(l){V++}A(f[s],true,V,o,r,l)}}for(u=0,a=e.length;u<a;u++){f=e[u];for(s=0,h=f.length;s<h;s++){l=s===0;if(n===E){l=false}if(l){V++}A(f[s],false,V,o,i,l)}}return o}var F=[];function P(t,e,r){var i=null;if(t.length*e.length===0){if(r===d){i=F}else if(r===E){i=t}else if(r===l||r===v){i=t.length===0?e:t}}return i}function U(t,e,r,i,n){var o=null;if(r[0]>i[2]||i[0]>r[2]||r[1]>i[3]||i[1]>r[3]){if(n===d){o=F}else if(n===E){o=t}else if(n===l||n===v){o=t.concat(e)}}return o}function X(t,e,r){if(typeof t[0][0][0]==="number"){t=[t]}if(typeof e[0][0][0]==="number"){e=[e]}var i=P(t,e,r);if(i){return i===F?null:i}var n=[Infinity,Infinity,-Infinity,-Infinity];var o=[Infinity,Infinity,-Infinity,-Infinity];var f=C(t,e,n,o,r);i=U(t,e,n,o,r);if(i){return i===F?null:i}var l=x(f,t,e,n,o,r);var u=z(l,r);return u}function q(t,e){return X(t,e,l)}function G(t,e){return X(t,e,E)}function H(t,e){return X(t,e,v)}function J(t,e){return X(t,e,d)}var K={UNION:l,DIFFERENCE:E,INTERSECTION:d,XOR:v};t.union=q;t.diff=G;t.xor=H;t.intersection=J;t.operations=K;Object.defineProperty(t,"__esModule",{value:true})});
@@ -0,0 +1,1716 @@
1
+ /**
2
+ * martinez v0.4.3
3
+ * Martinez polygon clipping algorithm, does boolean operation on polygons (multipolygons, polygons with holes etc): intersection, union, difference, xor
4
+ *
5
+ * @author Alex Milevski <info@w8r.name>
6
+ * @license MIT
7
+ * @preserve
8
+ */
9
+
10
+ (function (global, factory) {
11
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
12
+ typeof define === 'function' && define.amd ? define(['exports'], factory) :
13
+ (factory((global.martinez = {})));
14
+ }(this, (function (exports) { 'use strict';
15
+
16
+ function DEFAULT_COMPARE (a, b) { return a > b ? 1 : a < b ? -1 : 0; }
17
+
18
+ var SplayTree = function SplayTree(compare, noDuplicates) {
19
+ if ( compare === void 0 ) compare = DEFAULT_COMPARE;
20
+ if ( noDuplicates === void 0 ) noDuplicates = false;
21
+
22
+ this._compare = compare;
23
+ this._root = null;
24
+ this._size = 0;
25
+ this._noDuplicates = !!noDuplicates;
26
+ };
27
+
28
+ var prototypeAccessors = { size: { configurable: true } };
29
+
30
+
31
+ SplayTree.prototype.rotateLeft = function rotateLeft (x) {
32
+ var y = x.right;
33
+ if (y) {
34
+ x.right = y.left;
35
+ if (y.left) { y.left.parent = x; }
36
+ y.parent = x.parent;
37
+ }
38
+
39
+ if (!x.parent) { this._root = y; }
40
+ else if (x === x.parent.left) { x.parent.left = y; }
41
+ else { x.parent.right = y; }
42
+ if (y) { y.left = x; }
43
+ x.parent = y;
44
+ };
45
+
46
+
47
+ SplayTree.prototype.rotateRight = function rotateRight (x) {
48
+ var y = x.left;
49
+ if (y) {
50
+ x.left = y.right;
51
+ if (y.right) { y.right.parent = x; }
52
+ y.parent = x.parent;
53
+ }
54
+
55
+ if (!x.parent) { this._root = y; }
56
+ else if(x === x.parent.left) { x.parent.left = y; }
57
+ else { x.parent.right = y; }
58
+ if (y) { y.right = x; }
59
+ x.parent = y;
60
+ };
61
+
62
+
63
+ SplayTree.prototype._splay = function _splay (x) {
64
+ var this$1 = this;
65
+
66
+ while (x.parent) {
67
+ var p = x.parent;
68
+ if (!p.parent) {
69
+ if (p.left === x) { this$1.rotateRight(p); }
70
+ else { this$1.rotateLeft(p); }
71
+ } else if (p.left === x && p.parent.left === p) {
72
+ this$1.rotateRight(p.parent);
73
+ this$1.rotateRight(p);
74
+ } else if (p.right === x && p.parent.right === p) {
75
+ this$1.rotateLeft(p.parent);
76
+ this$1.rotateLeft(p);
77
+ } else if (p.left === x && p.parent.right === p) {
78
+ this$1.rotateRight(p);
79
+ this$1.rotateLeft(p);
80
+ } else {
81
+ this$1.rotateLeft(p);
82
+ this$1.rotateRight(p);
83
+ }
84
+ }
85
+ };
86
+
87
+
88
+ SplayTree.prototype.splay = function splay (x) {
89
+ var this$1 = this;
90
+
91
+ var p, gp, ggp, l, r;
92
+
93
+ while (x.parent) {
94
+ p = x.parent;
95
+ gp = p.parent;
96
+
97
+ if (gp && gp.parent) {
98
+ ggp = gp.parent;
99
+ if (ggp.left === gp) { ggp.left= x; }
100
+ else { ggp.right = x; }
101
+ x.parent = ggp;
102
+ } else {
103
+ x.parent = null;
104
+ this$1._root = x;
105
+ }
106
+
107
+ l = x.left; r = x.right;
108
+
109
+ if (x === p.left) { // left
110
+ if (gp) {
111
+ if (gp.left === p) {
112
+ /* zig-zig */
113
+ if (p.right) {
114
+ gp.left = p.right;
115
+ gp.left.parent = gp;
116
+ } else { gp.left = null; }
117
+
118
+ p.right = gp;
119
+ gp.parent = p;
120
+ } else {
121
+ /* zig-zag */
122
+ if (l) {
123
+ gp.right = l;
124
+ l.parent = gp;
125
+ } else { gp.right = null; }
126
+
127
+ x.left = gp;
128
+ gp.parent = x;
129
+ }
130
+ }
131
+ if (r) {
132
+ p.left = r;
133
+ r.parent = p;
134
+ } else { p.left = null; }
135
+
136
+ x.right= p;
137
+ p.parent = x;
138
+ } else { // right
139
+ if (gp) {
140
+ if (gp.right === p) {
141
+ /* zig-zig */
142
+ if (p.left) {
143
+ gp.right = p.left;
144
+ gp.right.parent = gp;
145
+ } else { gp.right = null; }
146
+
147
+ p.left = gp;
148
+ gp.parent = p;
149
+ } else {
150
+ /* zig-zag */
151
+ if (r) {
152
+ gp.left = r;
153
+ r.parent = gp;
154
+ } else { gp.left = null; }
155
+
156
+ x.right = gp;
157
+ gp.parent = x;
158
+ }
159
+ }
160
+ if (l) {
161
+ p.right = l;
162
+ l.parent = p;
163
+ } else { p.right = null; }
164
+
165
+ x.left = p;
166
+ p.parent = x;
167
+ }
168
+ }
169
+ };
170
+
171
+
172
+ SplayTree.prototype.replace = function replace (u, v) {
173
+ if (!u.parent) { this._root = v; }
174
+ else if (u === u.parent.left) { u.parent.left = v; }
175
+ else { u.parent.right = v; }
176
+ if (v) { v.parent = u.parent; }
177
+ };
178
+
179
+
180
+ SplayTree.prototype.minNode = function minNode (u) {
181
+ if ( u === void 0 ) u = this._root;
182
+
183
+ if (u) { while (u.left) { u = u.left; } }
184
+ return u;
185
+ };
186
+
187
+
188
+ SplayTree.prototype.maxNode = function maxNode (u) {
189
+ if ( u === void 0 ) u = this._root;
190
+
191
+ if (u) { while (u.right) { u = u.right; } }
192
+ return u;
193
+ };
194
+
195
+
196
+ SplayTree.prototype.insert = function insert (key, data) {
197
+ var z = this._root;
198
+ var p = null;
199
+ var comp = this._compare;
200
+ var cmp;
201
+
202
+ if (this._noDuplicates) {
203
+ while (z) {
204
+ p = z;
205
+ cmp = comp(z.key, key);
206
+ if (cmp === 0) { return; }
207
+ else if (comp(z.key, key) < 0) { z = z.right; }
208
+ else { z = z.left; }
209
+ }
210
+ } else {
211
+ while (z) {
212
+ p = z;
213
+ if (comp(z.key, key) < 0) { z = z.right; }
214
+ else { z = z.left; }
215
+ }
216
+ }
217
+
218
+ z = { key: key, data: data, left: null, right: null, parent: p };
219
+
220
+ if (!p) { this._root = z; }
221
+ else if (comp(p.key, z.key) < 0) { p.right = z; }
222
+ else { p.left= z; }
223
+
224
+ this.splay(z);
225
+ this._size++;
226
+ return z;
227
+ };
228
+
229
+
230
+ SplayTree.prototype.find = function find (key) {
231
+ var z = this._root;
232
+ var comp = this._compare;
233
+ while (z) {
234
+ var cmp = comp(z.key, key);
235
+ if (cmp < 0) { z = z.right; }
236
+ else if (cmp > 0) { z = z.left; }
237
+ else { return z; }
238
+ }
239
+ return null;
240
+ };
241
+
242
+ /**
243
+ * Whether the tree contains a node with the given key
244
+ * @param{Key} key
245
+ * @return {boolean} true/false
246
+ */
247
+ SplayTree.prototype.contains = function contains (key) {
248
+ var node = this._root;
249
+ var comparator = this._compare;
250
+ while (node){
251
+ var cmp = comparator(key, node.key);
252
+ if (cmp === 0) { return true; }
253
+ else if (cmp < 0) { node = node.left; }
254
+ else { node = node.right; }
255
+ }
256
+
257
+ return false;
258
+ };
259
+
260
+
261
+ SplayTree.prototype.remove = function remove (key) {
262
+ var z = this.find(key);
263
+
264
+ if (!z) { return false; }
265
+
266
+ this.splay(z);
267
+
268
+ if (!z.left) { this.replace(z, z.right); }
269
+ else if (!z.right) { this.replace(z, z.left); }
270
+ else {
271
+ var y = this.minNode(z.right);
272
+ if (y.parent !== z) {
273
+ this.replace(y, y.right);
274
+ y.right = z.right;
275
+ y.right.parent = y;
276
+ }
277
+ this.replace(z, y);
278
+ y.left = z.left;
279
+ y.left.parent = y;
280
+ }
281
+
282
+ this._size--;
283
+ return true;
284
+ };
285
+
286
+
287
+ SplayTree.prototype.removeNode = function removeNode (z) {
288
+ if (!z) { return false; }
289
+
290
+ this.splay(z);
291
+
292
+ if (!z.left) { this.replace(z, z.right); }
293
+ else if (!z.right) { this.replace(z, z.left); }
294
+ else {
295
+ var y = this.minNode(z.right);
296
+ if (y.parent !== z) {
297
+ this.replace(y, y.right);
298
+ y.right = z.right;
299
+ y.right.parent = y;
300
+ }
301
+ this.replace(z, y);
302
+ y.left = z.left;
303
+ y.left.parent = y;
304
+ }
305
+
306
+ this._size--;
307
+ return true;
308
+ };
309
+
310
+
311
+ SplayTree.prototype.erase = function erase (key) {
312
+ var z = this.find(key);
313
+ if (!z) { return; }
314
+
315
+ this.splay(z);
316
+
317
+ var s = z.left;
318
+ var t = z.right;
319
+
320
+ var sMax = null;
321
+ if (s) {
322
+ s.parent = null;
323
+ sMax = this.maxNode(s);
324
+ this.splay(sMax);
325
+ this._root = sMax;
326
+ }
327
+ if (t) {
328
+ if (s) { sMax.right = t; }
329
+ else { this._root = t; }
330
+ t.parent = sMax;
331
+ }
332
+
333
+ this._size--;
334
+ };
335
+
336
+ /**
337
+ * Removes and returns the node with smallest key
338
+ * @return {?Node}
339
+ */
340
+ SplayTree.prototype.pop = function pop () {
341
+ var node = this._root, returnValue = null;
342
+ if (node) {
343
+ while (node.left) { node = node.left; }
344
+ returnValue = { key: node.key, data: node.data };
345
+ this.remove(node.key);
346
+ }
347
+ return returnValue;
348
+ };
349
+
350
+
351
+ /* eslint-disable class-methods-use-this */
352
+
353
+ /**
354
+ * Successor node
355
+ * @param{Node} node
356
+ * @return {?Node}
357
+ */
358
+ SplayTree.prototype.next = function next (node) {
359
+ var successor = node;
360
+ if (successor) {
361
+ if (successor.right) {
362
+ successor = successor.right;
363
+ while (successor && successor.left) { successor = successor.left; }
364
+ } else {
365
+ successor = node.parent;
366
+ while (successor && successor.right === node) {
367
+ node = successor; successor = successor.parent;
368
+ }
369
+ }
370
+ }
371
+ return successor;
372
+ };
373
+
374
+
375
+ /**
376
+ * Predecessor node
377
+ * @param{Node} node
378
+ * @return {?Node}
379
+ */
380
+ SplayTree.prototype.prev = function prev (node) {
381
+ var predecessor = node;
382
+ if (predecessor) {
383
+ if (predecessor.left) {
384
+ predecessor = predecessor.left;
385
+ while (predecessor && predecessor.right) { predecessor = predecessor.right; }
386
+ } else {
387
+ predecessor = node.parent;
388
+ while (predecessor && predecessor.left === node) {
389
+ node = predecessor;
390
+ predecessor = predecessor.parent;
391
+ }
392
+ }
393
+ }
394
+ return predecessor;
395
+ };
396
+ /* eslint-enable class-methods-use-this */
397
+
398
+
399
+ /**
400
+ * @param{forEachCallback} callback
401
+ * @return {SplayTree}
402
+ */
403
+ SplayTree.prototype.forEach = function forEach (callback) {
404
+ var current = this._root;
405
+ var s = [], done = false, i = 0;
406
+
407
+ while (!done) {
408
+ // Reach the left most Node of the current Node
409
+ if (current) {
410
+ // Place pointer to a tree node on the stack
411
+ // before traversing the node's left subtree
412
+ s.push(current);
413
+ current = current.left;
414
+ } else {
415
+ // BackTrack from the empty subtree and visit the Node
416
+ // at the top of the stack; however, if the stack is
417
+ // empty you are done
418
+ if (s.length > 0) {
419
+ current = s.pop();
420
+ callback(current, i++);
421
+
422
+ // We have visited the node and its left
423
+ // subtree. Now, it's right subtree's turn
424
+ current = current.right;
425
+ } else { done = true; }
426
+ }
427
+ }
428
+ return this;
429
+ };
430
+
431
+
432
+ /**
433
+ * Walk key range from `low` to `high`. Stops if `fn` returns a value.
434
+ * @param{Key} low
435
+ * @param{Key} high
436
+ * @param{Function} fn
437
+ * @param{*?} ctx
438
+ * @return {SplayTree}
439
+ */
440
+ SplayTree.prototype.range = function range (low, high, fn, ctx) {
441
+ var this$1 = this;
442
+
443
+ var Q = [];
444
+ var compare = this._compare;
445
+ var node = this._root, cmp;
446
+
447
+ while (Q.length !== 0 || node) {
448
+ if (node) {
449
+ Q.push(node);
450
+ node = node.left;
451
+ } else {
452
+ node = Q.pop();
453
+ cmp = compare(node.key, high);
454
+ if (cmp > 0) {
455
+ break;
456
+ } else if (compare(node.key, low) >= 0) {
457
+ if (fn.call(ctx, node)) { return this$1; } // stop if smth is returned
458
+ }
459
+ node = node.right;
460
+ }
461
+ }
462
+ return this;
463
+ };
464
+
465
+ /**
466
+ * Returns all keys in order
467
+ * @return {Array<Key>}
468
+ */
469
+ SplayTree.prototype.keys = function keys () {
470
+ var current = this._root;
471
+ var s = [], r = [], done = false;
472
+
473
+ while (!done) {
474
+ if (current) {
475
+ s.push(current);
476
+ current = current.left;
477
+ } else {
478
+ if (s.length > 0) {
479
+ current = s.pop();
480
+ r.push(current.key);
481
+ current = current.right;
482
+ } else { done = true; }
483
+ }
484
+ }
485
+ return r;
486
+ };
487
+
488
+
489
+ /**
490
+ * Returns `data` fields of all nodes in order.
491
+ * @return {Array<Value>}
492
+ */
493
+ SplayTree.prototype.values = function values () {
494
+ var current = this._root;
495
+ var s = [], r = [], done = false;
496
+
497
+ while (!done) {
498
+ if (current) {
499
+ s.push(current);
500
+ current = current.left;
501
+ } else {
502
+ if (s.length > 0) {
503
+ current = s.pop();
504
+ r.push(current.data);
505
+ current = current.right;
506
+ } else { done = true; }
507
+ }
508
+ }
509
+ return r;
510
+ };
511
+
512
+
513
+ /**
514
+ * Returns node at given index
515
+ * @param{number} index
516
+ * @return {?Node}
517
+ */
518
+ SplayTree.prototype.at = function at (index) {
519
+ // removed after a consideration, more misleading than useful
520
+ // index = index % this.size;
521
+ // if (index < 0) index = this.size - index;
522
+
523
+ var current = this._root;
524
+ var s = [], done = false, i = 0;
525
+
526
+ while (!done) {
527
+ if (current) {
528
+ s.push(current);
529
+ current = current.left;
530
+ } else {
531
+ if (s.length > 0) {
532
+ current = s.pop();
533
+ if (i === index) { return current; }
534
+ i++;
535
+ current = current.right;
536
+ } else { done = true; }
537
+ }
538
+ }
539
+ return null;
540
+ };
541
+
542
+ /**
543
+ * Bulk-load items. Both array have to be same size
544
+ * @param{Array<Key>} keys
545
+ * @param{Array<Value>}[values]
546
+ * @param{Boolean} [presort=false] Pre-sort keys and values, using
547
+ * tree's comparator. Sorting is done
548
+ * in-place
549
+ * @return {AVLTree}
550
+ */
551
+ SplayTree.prototype.load = function load (keys, values, presort) {
552
+ if ( keys === void 0 ) keys = [];
553
+ if ( values === void 0 ) values = [];
554
+ if ( presort === void 0 ) presort = false;
555
+
556
+ if (this._size !== 0) { throw new Error('bulk-load: tree is not empty'); }
557
+ var size = keys.length;
558
+ if (presort) { sort(keys, values, 0, size - 1, this._compare); }
559
+ this._root = loadRecursive(null, keys, values, 0, size);
560
+ this._size = size;
561
+ return this;
562
+ };
563
+
564
+
565
+ SplayTree.prototype.min = function min () {
566
+ var node = this.minNode(this._root);
567
+ if (node) { return node.key; }
568
+ else { return null; }
569
+ };
570
+
571
+
572
+ SplayTree.prototype.max = function max () {
573
+ var node = this.maxNode(this._root);
574
+ if (node) { return node.key; }
575
+ else { return null; }
576
+ };
577
+
578
+ SplayTree.prototype.isEmpty = function isEmpty () { return this._root === null; };
579
+ prototypeAccessors.size.get = function () { return this._size; };
580
+
581
+
582
+ /**
583
+ * Create a tree and load it with items
584
+ * @param{Array<Key>} keys
585
+ * @param{Array<Value>?} [values]
586
+
587
+ * @param{Function?} [comparator]
588
+ * @param{Boolean?} [presort=false] Pre-sort keys and values, using
589
+ * tree's comparator. Sorting is done
590
+ * in-place
591
+ * @param{Boolean?} [noDuplicates=false] Allow duplicates
592
+ * @return {SplayTree}
593
+ */
594
+ SplayTree.createTree = function createTree (keys, values, comparator, presort, noDuplicates) {
595
+ return new SplayTree(comparator, noDuplicates).load(keys, values, presort);
596
+ };
597
+
598
+ Object.defineProperties( SplayTree.prototype, prototypeAccessors );
599
+
600
+
601
+ function loadRecursive (parent, keys, values, start, end) {
602
+ var size = end - start;
603
+ if (size > 0) {
604
+ var middle = start + Math.floor(size / 2);
605
+ var key = keys[middle];
606
+ var data = values[middle];
607
+ var node = { key: key, data: data, parent: parent };
608
+ node.left = loadRecursive(node, keys, values, start, middle);
609
+ node.right = loadRecursive(node, keys, values, middle + 1, end);
610
+ return node;
611
+ }
612
+ return null;
613
+ }
614
+
615
+
616
+ function sort(keys, values, left, right, compare) {
617
+ if (left >= right) { return; }
618
+
619
+ var pivot = keys[(left + right) >> 1];
620
+ var i = left - 1;
621
+ var j = right + 1;
622
+
623
+ while (true) {
624
+ do { i++; } while (compare(keys[i], pivot) < 0);
625
+ do { j--; } while (compare(keys[j], pivot) > 0);
626
+ if (i >= j) { break; }
627
+
628
+ var tmp = keys[i];
629
+ keys[i] = keys[j];
630
+ keys[j] = tmp;
631
+
632
+ tmp = values[i];
633
+ values[i] = values[j];
634
+ values[j] = tmp;
635
+ }
636
+
637
+ sort(keys, values, left, j, compare);
638
+ sort(keys, values, j + 1, right, compare);
639
+ }
640
+
641
+ var NORMAL = 0;
642
+ var NON_CONTRIBUTING = 1;
643
+ var SAME_TRANSITION = 2;
644
+ var DIFFERENT_TRANSITION = 3;
645
+
646
+ var INTERSECTION = 0;
647
+ var UNION = 1;
648
+ var DIFFERENCE = 2;
649
+ var XOR = 3;
650
+
651
+ /**
652
+ * @param {SweepEvent} event
653
+ * @param {SweepEvent} prev
654
+ * @param {Operation} operation
655
+ */
656
+ function computeFields (event, prev, operation) {
657
+ // compute inOut and otherInOut fields
658
+ if (prev === null) {
659
+ event.inOut = false;
660
+ event.otherInOut = true;
661
+
662
+ // previous line segment in sweepline belongs to the same polygon
663
+ } else {
664
+ if (event.isSubject === prev.isSubject) {
665
+ event.inOut = !prev.inOut;
666
+ event.otherInOut = prev.otherInOut;
667
+
668
+ // previous line segment in sweepline belongs to the clipping polygon
669
+ } else {
670
+ event.inOut = !prev.otherInOut;
671
+ event.otherInOut = prev.isVertical() ? !prev.inOut : prev.inOut;
672
+ }
673
+
674
+ // compute prevInResult field
675
+ if (prev) {
676
+ event.prevInResult = (!inResult(prev, operation) || prev.isVertical())
677
+ ? prev.prevInResult : prev;
678
+ }
679
+ }
680
+
681
+ // check if the line segment belongs to the Boolean operation
682
+ event.inResult = inResult(event, operation);
683
+ }
684
+
685
+
686
+ /* eslint-disable indent */
687
+ function inResult(event, operation) {
688
+ switch (event.type) {
689
+ case NORMAL:
690
+ switch (operation) {
691
+ case INTERSECTION:
692
+ return !event.otherInOut;
693
+ case UNION:
694
+ return event.otherInOut;
695
+ case DIFFERENCE:
696
+ // return (event.isSubject && !event.otherInOut) ||
697
+ // (!event.isSubject && event.otherInOut);
698
+ return (event.isSubject && event.otherInOut) ||
699
+ (!event.isSubject && !event.otherInOut);
700
+ case XOR:
701
+ return true;
702
+ }
703
+ break;
704
+ case SAME_TRANSITION:
705
+ return operation === INTERSECTION || operation === UNION;
706
+ case DIFFERENT_TRANSITION:
707
+ return operation === DIFFERENCE;
708
+ case NON_CONTRIBUTING:
709
+ return false;
710
+ }
711
+ return false;
712
+ }
713
+ /* eslint-enable indent */
714
+
715
+ var SweepEvent = function SweepEvent (point, left, otherEvent, isSubject, edgeType) {
716
+
717
+ /**
718
+ * Is left endpoint?
719
+ * @type {Boolean}
720
+ */
721
+ this.left = left;
722
+
723
+ /**
724
+ * @type {Array.<Number>}
725
+ */
726
+ this.point = point;
727
+
728
+ /**
729
+ * Other edge reference
730
+ * @type {SweepEvent}
731
+ */
732
+ this.otherEvent = otherEvent;
733
+
734
+ /**
735
+ * Belongs to source or clipping polygon
736
+ * @type {Boolean}
737
+ */
738
+ this.isSubject = isSubject;
739
+
740
+ /**
741
+ * Edge contribution type
742
+ * @type {Number}
743
+ */
744
+ this.type = edgeType || NORMAL;
745
+
746
+
747
+ /**
748
+ * In-out transition for the sweepline crossing polygon
749
+ * @type {Boolean}
750
+ */
751
+ this.inOut = false;
752
+
753
+
754
+ /**
755
+ * @type {Boolean}
756
+ */
757
+ this.otherInOut = false;
758
+
759
+ /**
760
+ * Previous event in result?
761
+ * @type {SweepEvent}
762
+ */
763
+ this.prevInResult = null;
764
+
765
+ /**
766
+ * Does event belong to result?
767
+ * @type {Boolean}
768
+ */
769
+ this.inResult = false;
770
+
771
+
772
+ // connection step
773
+
774
+ /**
775
+ * @type {Boolean}
776
+ */
777
+ this.resultInOut = false;
778
+
779
+ this.isExteriorRing = true;
780
+ };
781
+
782
+
783
+ /**
784
+ * @param{Array.<Number>}p
785
+ * @return {Boolean}
786
+ */
787
+ SweepEvent.prototype.isBelow = function isBelow (p) {
788
+ var p0 = this.point, p1 = this.otherEvent.point;
789
+ return this.left
790
+ ? (p0[0] - p[0]) * (p1[1] - p[1]) - (p1[0] - p[0]) * (p0[1] - p[1]) > 0
791
+ // signedArea(this.point, this.otherEvent.point, p) > 0 :
792
+ : (p1[0] - p[0]) * (p0[1] - p[1]) - (p0[0] - p[0]) * (p1[1] - p[1]) > 0;
793
+ //signedArea(this.otherEvent.point, this.point, p) > 0;
794
+ };
795
+
796
+
797
+ /**
798
+ * @param{Array.<Number>}p
799
+ * @return {Boolean}
800
+ */
801
+ SweepEvent.prototype.isAbove = function isAbove (p) {
802
+ return !this.isBelow(p);
803
+ };
804
+
805
+
806
+ /**
807
+ * @return {Boolean}
808
+ */
809
+ SweepEvent.prototype.isVertical = function isVertical () {
810
+ return this.point[0] === this.otherEvent.point[0];
811
+ };
812
+
813
+
814
+ SweepEvent.prototype.clone = function clone () {
815
+ var copy = new SweepEvent(
816
+ this.point, this.left, this.otherEvent, this.isSubject, this.type);
817
+
818
+ copy.inResult = this.inResult;
819
+ copy.prevInResult = this.prevInResult;
820
+ copy.isExteriorRing = this.isExteriorRing;
821
+ copy.inOut = this.inOut;
822
+ copy.otherInOut = this.otherInOut;
823
+
824
+ return copy;
825
+ };
826
+
827
+ function equals(p1, p2) {
828
+ if (p1[0] === p2[0]) {
829
+ if (p1[1] === p2[1]) {
830
+ return true;
831
+ } else {
832
+ return false;
833
+ }
834
+ }
835
+ return false;
836
+ }
837
+
838
+ // const EPSILON = 1e-9;
839
+ // const abs = Math.abs;
840
+ // TODO https://github.com/w8r/martinez/issues/6#issuecomment-262847164
841
+ // Precision problem.
842
+ //
843
+ // module.exports = function equals(p1, p2) {
844
+ // return abs(p1[0] - p2[0]) <= EPSILON && abs(p1[1] - p2[1]) <= EPSILON;
845
+ // };
846
+
847
+ /**
848
+ * Signed area of the triangle (p0, p1, p2)
849
+ * @param {Array.<Number>} p0
850
+ * @param {Array.<Number>} p1
851
+ * @param {Array.<Number>} p2
852
+ * @return {Number}
853
+ */
854
+ function signedArea(p0, p1, p2) {
855
+ return (p0[0] - p2[0]) * (p1[1] - p2[1]) - (p1[0] - p2[0]) * (p0[1] - p2[1]);
856
+ }
857
+
858
+ /**
859
+ * @param {SweepEvent} e1
860
+ * @param {SweepEvent} e2
861
+ * @return {Number}
862
+ */
863
+ function compareEvents(e1, e2) {
864
+ var p1 = e1.point;
865
+ var p2 = e2.point;
866
+
867
+ // Different x-coordinate
868
+ if (p1[0] > p2[0]) { return 1; }
869
+ if (p1[0] < p2[0]) { return -1; }
870
+
871
+ // Different points, but same x-coordinate
872
+ // Event with lower y-coordinate is processed first
873
+ if (p1[1] !== p2[1]) { return p1[1] > p2[1] ? 1 : -1; }
874
+
875
+ return specialCases(e1, e2, p1, p2);
876
+ }
877
+
878
+
879
+ /* eslint-disable no-unused-vars */
880
+ function specialCases(e1, e2, p1, p2) {
881
+ // Same coordinates, but one is a left endpoint and the other is
882
+ // a right endpoint. The right endpoint is processed first
883
+ if (e1.left !== e2.left)
884
+ { return e1.left ? 1 : -1; }
885
+
886
+ // const p2 = e1.otherEvent.point, p3 = e2.otherEvent.point;
887
+ // const sa = (p1[0] - p3[0]) * (p2[1] - p3[1]) - (p2[0] - p3[0]) * (p1[1] - p3[1])
888
+ // Same coordinates, both events
889
+ // are left endpoints or right endpoints.
890
+ // not collinear
891
+ if (signedArea(p1, e1.otherEvent.point, e2.otherEvent.point) !== 0) {
892
+ // the event associate to the bottom segment is processed first
893
+ return (!e1.isBelow(e2.otherEvent.point)) ? 1 : -1;
894
+ }
895
+
896
+ return (!e1.isSubject && e2.isSubject) ? 1 : -1;
897
+ }
898
+ /* eslint-enable no-unused-vars */
899
+
900
+ /**
901
+ * @param {SweepEvent} se
902
+ * @param {Array.<Number>} p
903
+ * @param {Queue} queue
904
+ * @return {Queue}
905
+ */
906
+ function divideSegment(se, p, queue) {
907
+ var r = new SweepEvent(p, false, se, se.isSubject);
908
+ var l = new SweepEvent(p, true, se.otherEvent, se.isSubject);
909
+
910
+ /* eslint-disable no-console */
911
+ if (equals(se.point, se.otherEvent.point)) {
912
+
913
+ console.warn('what is that, a collapsed segment?', se);
914
+ }
915
+ /* eslint-enable no-console */
916
+
917
+ r.contourId = l.contourId = se.contourId;
918
+
919
+ // avoid a rounding error. The left event would be processed after the right event
920
+ if (compareEvents(l, se.otherEvent) > 0) {
921
+ se.otherEvent.left = true;
922
+ l.left = false;
923
+ }
924
+
925
+ // avoid a rounding error. The left event would be processed after the right event
926
+ // if (compareEvents(se, r) > 0) {}
927
+
928
+ se.otherEvent.otherEvent = l;
929
+ se.otherEvent = r;
930
+
931
+ queue.push(l);
932
+ queue.push(r);
933
+
934
+ return queue;
935
+ }
936
+
937
+ //const EPS = 1e-9;
938
+
939
+ /**
940
+ * Finds the magnitude of the cross product of two vectors (if we pretend
941
+ * they're in three dimensions)
942
+ *
943
+ * @param {Object} a First vector
944
+ * @param {Object} b Second vector
945
+ * @private
946
+ * @returns {Number} The magnitude of the cross product
947
+ */
948
+ function crossProduct(a, b) {
949
+ return (a[0] * b[1]) - (a[1] * b[0]);
950
+ }
951
+
952
+ /**
953
+ * Finds the dot product of two vectors.
954
+ *
955
+ * @param {Object} a First vector
956
+ * @param {Object} b Second vector
957
+ * @private
958
+ * @returns {Number} The dot product
959
+ */
960
+ function dotProduct(a, b) {
961
+ return (a[0] * b[0]) + (a[1] * b[1]);
962
+ }
963
+
964
+ /**
965
+ * Finds the intersection (if any) between two line segments a and b, given the
966
+ * line segments' end points a1, a2 and b1, b2.
967
+ *
968
+ * This algorithm is based on Schneider and Eberly.
969
+ * http://www.cimec.org.ar/~ncalvo/Schneider_Eberly.pdf
970
+ * Page 244.
971
+ *
972
+ * @param {Array.<Number>} a1 point of first line
973
+ * @param {Array.<Number>} a2 point of first line
974
+ * @param {Array.<Number>} b1 point of second line
975
+ * @param {Array.<Number>} b2 point of second line
976
+ * @param {Boolean=} noEndpointTouch whether to skip single touchpoints
977
+ * (meaning connected segments) as
978
+ * intersections
979
+ * @returns {Array.<Array.<Number>>|Null} If the lines intersect, the point of
980
+ * intersection. If they overlap, the two end points of the overlapping segment.
981
+ * Otherwise, null.
982
+ */
983
+ function intersection (a1, a2, b1, b2, noEndpointTouch) {
984
+ // The algorithm expects our lines in the form P + sd, where P is a point,
985
+ // s is on the interval [0, 1], and d is a vector.
986
+ // We are passed two points. P can be the first point of each pair. The
987
+ // vector, then, could be thought of as the distance (in x and y components)
988
+ // from the first point to the second point.
989
+ // So first, let's make our vectors:
990
+ var va = [a2[0] - a1[0], a2[1] - a1[1]];
991
+ var vb = [b2[0] - b1[0], b2[1] - b1[1]];
992
+ // We also define a function to convert back to regular point form:
993
+
994
+ /* eslint-disable arrow-body-style */
995
+
996
+ function toPoint(p, s, d) {
997
+ return [
998
+ p[0] + s * d[0],
999
+ p[1] + s * d[1]
1000
+ ];
1001
+ }
1002
+
1003
+ /* eslint-enable arrow-body-style */
1004
+
1005
+ // The rest is pretty much a straight port of the algorithm.
1006
+ var e = [b1[0] - a1[0], b1[1] - a1[1]];
1007
+ var kross = crossProduct(va, vb);
1008
+ var sqrKross = kross * kross;
1009
+ var sqrLenA = dotProduct(va, va);
1010
+ //const sqrLenB = dotProduct(vb, vb);
1011
+
1012
+ // Check for line intersection. This works because of the properties of the
1013
+ // cross product -- specifically, two vectors are parallel if and only if the
1014
+ // cross product is the 0 vector. The full calculation involves relative error
1015
+ // to account for possible very small line segments. See Schneider & Eberly
1016
+ // for details.
1017
+ if (sqrKross > 0/* EPS * sqrLenB * sqLenA */) {
1018
+ // If they're not parallel, then (because these are line segments) they
1019
+ // still might not actually intersect. This code checks that the
1020
+ // intersection point of the lines is actually on both line segments.
1021
+ var s = crossProduct(e, vb) / kross;
1022
+ if (s < 0 || s > 1) {
1023
+ // not on line segment a
1024
+ return null;
1025
+ }
1026
+ var t = crossProduct(e, va) / kross;
1027
+ if (t < 0 || t > 1) {
1028
+ // not on line segment b
1029
+ return null;
1030
+ }
1031
+ if (s === 0 || s === 1) {
1032
+ // on an endpoint of line segment a
1033
+ return noEndpointTouch ? null : [toPoint(a1, s, va)];
1034
+ }
1035
+ if (t === 0 || t === 1) {
1036
+ // on an endpoint of line segment b
1037
+ return noEndpointTouch ? null : [toPoint(b1, t, vb)];
1038
+ }
1039
+ return [toPoint(a1, s, va)];
1040
+ }
1041
+
1042
+ // If we've reached this point, then the lines are either parallel or the
1043
+ // same, but the segments could overlap partially or fully, or not at all.
1044
+ // So we need to find the overlap, if any. To do that, we can use e, which is
1045
+ // the (vector) difference between the two initial points. If this is parallel
1046
+ // with the line itself, then the two lines are the same line, and there will
1047
+ // be overlap.
1048
+ //const sqrLenE = dotProduct(e, e);
1049
+ kross = crossProduct(e, va);
1050
+ sqrKross = kross * kross;
1051
+
1052
+ if (sqrKross > 0 /* EPS * sqLenB * sqLenE */) {
1053
+ // Lines are just parallel, not the same. No overlap.
1054
+ return null;
1055
+ }
1056
+
1057
+ var sa = dotProduct(va, e) / sqrLenA;
1058
+ var sb = sa + dotProduct(va, vb) / sqrLenA;
1059
+ var smin = Math.min(sa, sb);
1060
+ var smax = Math.max(sa, sb);
1061
+
1062
+ // this is, essentially, the FindIntersection acting on floats from
1063
+ // Schneider & Eberly, just inlined into this function.
1064
+ if (smin <= 1 && smax >= 0) {
1065
+
1066
+ // overlap on an end point
1067
+ if (smin === 1) {
1068
+ return noEndpointTouch ? null : [toPoint(a1, smin > 0 ? smin : 0, va)];
1069
+ }
1070
+
1071
+ if (smax === 0) {
1072
+ return noEndpointTouch ? null : [toPoint(a1, smax < 1 ? smax : 1, va)];
1073
+ }
1074
+
1075
+ if (noEndpointTouch && smin === 0 && smax === 1) { return null; }
1076
+
1077
+ // There's overlap on a segment -- two points of intersection. Return both.
1078
+ return [
1079
+ toPoint(a1, smin > 0 ? smin : 0, va),
1080
+ toPoint(a1, smax < 1 ? smax : 1, va)
1081
+ ];
1082
+ }
1083
+
1084
+ return null;
1085
+ }
1086
+
1087
+ /**
1088
+ * @param {SweepEvent} se1
1089
+ * @param {SweepEvent} se2
1090
+ * @param {Queue} queue
1091
+ * @return {Number}
1092
+ */
1093
+ function possibleIntersection (se1, se2, queue) {
1094
+ // that disallows self-intersecting polygons,
1095
+ // did cost us half a day, so I'll leave it
1096
+ // out of respect
1097
+ // if (se1.isSubject === se2.isSubject) return;
1098
+ var inter = intersection(
1099
+ se1.point, se1.otherEvent.point,
1100
+ se2.point, se2.otherEvent.point
1101
+ );
1102
+
1103
+ var nintersections = inter ? inter.length : 0;
1104
+ if (nintersections === 0) { return 0; } // no intersection
1105
+
1106
+ // the line segments intersect at an endpoint of both line segments
1107
+ if ((nintersections === 1) &&
1108
+ (equals(se1.point, se2.point) ||
1109
+ equals(se1.otherEvent.point, se2.otherEvent.point))) {
1110
+ return 0;
1111
+ }
1112
+
1113
+ if (nintersections === 2 && se1.isSubject === se2.isSubject) {
1114
+ // if(se1.contourId === se2.contourId){
1115
+ // console.warn('Edges of the same polygon overlap',
1116
+ // se1.point, se1.otherEvent.point, se2.point, se2.otherEvent.point);
1117
+ // }
1118
+ //throw new Error('Edges of the same polygon overlap');
1119
+ return 0;
1120
+ }
1121
+
1122
+ // The line segments associated to se1 and se2 intersect
1123
+ if (nintersections === 1) {
1124
+
1125
+ // if the intersection point is not an endpoint of se1
1126
+ if (!equals(se1.point, inter[0]) && !equals(se1.otherEvent.point, inter[0])) {
1127
+ divideSegment(se1, inter[0], queue);
1128
+ }
1129
+
1130
+ // if the intersection point is not an endpoint of se2
1131
+ if (!equals(se2.point, inter[0]) && !equals(se2.otherEvent.point, inter[0])) {
1132
+ divideSegment(se2, inter[0], queue);
1133
+ }
1134
+ return 1;
1135
+ }
1136
+
1137
+ // The line segments associated to se1 and se2 overlap
1138
+ var events = [];
1139
+ var leftCoincide = false;
1140
+ var rightCoincide = false;
1141
+
1142
+ if (equals(se1.point, se2.point)) {
1143
+ leftCoincide = true; // linked
1144
+ } else if (compareEvents(se1, se2) === 1) {
1145
+ events.push(se2, se1);
1146
+ } else {
1147
+ events.push(se1, se2);
1148
+ }
1149
+
1150
+ if (equals(se1.otherEvent.point, se2.otherEvent.point)) {
1151
+ rightCoincide = true;
1152
+ } else if (compareEvents(se1.otherEvent, se2.otherEvent) === 1) {
1153
+ events.push(se2.otherEvent, se1.otherEvent);
1154
+ } else {
1155
+ events.push(se1.otherEvent, se2.otherEvent);
1156
+ }
1157
+
1158
+ if ((leftCoincide && rightCoincide) || leftCoincide) {
1159
+ // both line segments are equal or share the left endpoint
1160
+ se2.type = NON_CONTRIBUTING;
1161
+ se1.type = (se2.inOut === se1.inOut)
1162
+ ? SAME_TRANSITION : DIFFERENT_TRANSITION;
1163
+
1164
+ if (leftCoincide && !rightCoincide) {
1165
+ // honestly no idea, but changing events selection from [2, 1]
1166
+ // to [0, 1] fixes the overlapping self-intersecting polygons issue
1167
+ divideSegment(events[1].otherEvent, events[0].point, queue);
1168
+ }
1169
+ return 2;
1170
+ }
1171
+
1172
+ // the line segments share the right endpoint
1173
+ if (rightCoincide) {
1174
+ divideSegment(events[0], events[1].point, queue);
1175
+ return 3;
1176
+ }
1177
+
1178
+ // no line segment includes totally the other one
1179
+ if (events[0] !== events[3].otherEvent) {
1180
+ divideSegment(events[0], events[1].point, queue);
1181
+ divideSegment(events[1], events[2].point, queue);
1182
+ return 3;
1183
+ }
1184
+
1185
+ // one line segment includes the other one
1186
+ divideSegment(events[0], events[1].point, queue);
1187
+ divideSegment(events[3].otherEvent, events[2].point, queue);
1188
+
1189
+ return 3;
1190
+ }
1191
+
1192
+ /**
1193
+ * @param {SweepEvent} le1
1194
+ * @param {SweepEvent} le2
1195
+ * @return {Number}
1196
+ */
1197
+ function compareSegments(le1, le2) {
1198
+ if (le1 === le2) { return 0; }
1199
+
1200
+ // Segments are not collinear
1201
+ if (signedArea(le1.point, le1.otherEvent.point, le2.point) !== 0 ||
1202
+ signedArea(le1.point, le1.otherEvent.point, le2.otherEvent.point) !== 0) {
1203
+
1204
+ // If they share their left endpoint use the right endpoint to sort
1205
+ if (equals(le1.point, le2.point)) { return le1.isBelow(le2.otherEvent.point) ? -1 : 1; }
1206
+
1207
+ // Different left endpoint: use the left endpoint to sort
1208
+ if (le1.point[0] === le2.point[0]) { return le1.point[1] < le2.point[1] ? -1 : 1; }
1209
+
1210
+ // has the line segment associated to e1 been inserted
1211
+ // into S after the line segment associated to e2 ?
1212
+ if (compareEvents(le1, le2) === 1) { return le2.isAbove(le1.point) ? -1 : 1; }
1213
+
1214
+ // The line segment associated to e2 has been inserted
1215
+ // into S after the line segment associated to e1
1216
+ return le1.isBelow(le2.point) ? -1 : 1;
1217
+ }
1218
+
1219
+ if (le1.isSubject === le2.isSubject) { // same polygon
1220
+ var p1 = le1.point, p2 = le2.point;
1221
+ if (p1[0] === p2[0] && p1[1] === p2[1]/*equals(le1.point, le2.point)*/) {
1222
+ p1 = le1.otherEvent.point; p2 = le2.otherEvent.point;
1223
+ if (p1[0] === p2[0] && p1[1] === p2[1]) { return 0; }
1224
+ else { return le1.contourId > le2.contourId ? 1 : -1; }
1225
+ }
1226
+ } else { // Segments are collinear, but belong to separate polygons
1227
+ return le1.isSubject ? -1 : 1;
1228
+ }
1229
+
1230
+ return compareEvents(le1, le2) === 1 ? 1 : -1;
1231
+ }
1232
+
1233
+ function subdivide(eventQueue, subject, clipping, sbbox, cbbox, operation) {
1234
+ var sweepLine = new SplayTree(compareSegments);
1235
+ var sortedEvents = [];
1236
+
1237
+ var rightbound = Math.min(sbbox[2], cbbox[2]);
1238
+
1239
+ var prev, next, begin;
1240
+
1241
+ while (eventQueue.length !== 0) {
1242
+ var event = eventQueue.pop();
1243
+ sortedEvents.push(event);
1244
+
1245
+ // optimization by bboxes for intersection and difference goes here
1246
+ if ((operation === INTERSECTION && event.point[0] > rightbound) ||
1247
+ (operation === DIFFERENCE && event.point[0] > sbbox[2])) {
1248
+ break;
1249
+ }
1250
+
1251
+ if (event.left) {
1252
+ next = prev = sweepLine.insert(event);
1253
+ begin = sweepLine.minNode();
1254
+
1255
+ if (prev !== begin) { prev = sweepLine.prev(prev); }
1256
+ else { prev = null; }
1257
+
1258
+ next = sweepLine.next(next);
1259
+
1260
+ var prevEvent = prev ? prev.key : null;
1261
+ var prevprevEvent = (void 0);
1262
+ computeFields(event, prevEvent, operation);
1263
+ if (next) {
1264
+ if (possibleIntersection(event, next.key, eventQueue) === 2) {
1265
+ computeFields(event, prevEvent, operation);
1266
+ computeFields(event, next.key, operation);
1267
+ }
1268
+ }
1269
+
1270
+ if (prev) {
1271
+ if (possibleIntersection(prev.key, event, eventQueue) === 2) {
1272
+ var prevprev = prev;
1273
+ if (prevprev !== begin) { prevprev = sweepLine.prev(prevprev); }
1274
+ else { prevprev = null; }
1275
+
1276
+ prevprevEvent = prevprev ? prevprev.key : null;
1277
+ computeFields(prevEvent, prevprevEvent, operation);
1278
+ computeFields(event, prevEvent, operation);
1279
+ }
1280
+ }
1281
+ } else {
1282
+ event = event.otherEvent;
1283
+ next = prev = sweepLine.find(event);
1284
+
1285
+ if (prev && next) {
1286
+
1287
+ if (prev !== begin) { prev = sweepLine.prev(prev); }
1288
+ else { prev = null; }
1289
+
1290
+ next = sweepLine.next(next);
1291
+ sweepLine.remove(event);
1292
+
1293
+ if (next && prev) {
1294
+ possibleIntersection(prev.key, next.key, eventQueue);
1295
+ }
1296
+ }
1297
+ }
1298
+ }
1299
+ return sortedEvents;
1300
+ }
1301
+
1302
+ /**
1303
+ * @param {Array.<SweepEvent>} sortedEvents
1304
+ * @return {Array.<SweepEvent>}
1305
+ */
1306
+ function orderEvents(sortedEvents) {
1307
+ var event, i, len, tmp;
1308
+ var resultEvents = [];
1309
+ for (i = 0, len = sortedEvents.length; i < len; i++) {
1310
+ event = sortedEvents[i];
1311
+ if ((event.left && event.inResult) ||
1312
+ (!event.left && event.otherEvent.inResult)) {
1313
+ resultEvents.push(event);
1314
+ }
1315
+ }
1316
+ // Due to overlapping edges the resultEvents array can be not wholly sorted
1317
+ var sorted = false;
1318
+ while (!sorted) {
1319
+ sorted = true;
1320
+ for (i = 0, len = resultEvents.length; i < len; i++) {
1321
+ if ((i + 1) < len &&
1322
+ compareEvents(resultEvents[i], resultEvents[i + 1]) === 1) {
1323
+ tmp = resultEvents[i];
1324
+ resultEvents[i] = resultEvents[i + 1];
1325
+ resultEvents[i + 1] = tmp;
1326
+ sorted = false;
1327
+ }
1328
+ }
1329
+ }
1330
+
1331
+
1332
+ for (i = 0, len = resultEvents.length; i < len; i++) {
1333
+ event = resultEvents[i];
1334
+ event.pos = i;
1335
+ }
1336
+
1337
+ // imagine, the right event is found in the beginning of the queue,
1338
+ // when his left counterpart is not marked yet
1339
+ for (i = 0, len = resultEvents.length; i < len; i++) {
1340
+ event = resultEvents[i];
1341
+ if (!event.left) {
1342
+ tmp = event.pos;
1343
+ event.pos = event.otherEvent.pos;
1344
+ event.otherEvent.pos = tmp;
1345
+ }
1346
+ }
1347
+
1348
+ return resultEvents;
1349
+ }
1350
+
1351
+
1352
+ /**
1353
+ * @param {Number} pos
1354
+ * @param {Array.<SweepEvent>} resultEvents
1355
+ * @param {Object>} processed
1356
+ * @return {Number}
1357
+ */
1358
+ function nextPos(pos, resultEvents, processed, origIndex) {
1359
+ var newPos = pos + 1;
1360
+ var length = resultEvents.length;
1361
+ if (newPos > length - 1) { return pos - 1; }
1362
+ var p = resultEvents[pos].point;
1363
+ var p1 = resultEvents[newPos].point;
1364
+
1365
+
1366
+ // while in range and not the current one by value
1367
+ while (newPos < length && p1[0] === p[0] && p1[1] === p[1]) {
1368
+ if (!processed[newPos]) {
1369
+ return newPos;
1370
+ } else {
1371
+ newPos++;
1372
+ }
1373
+ p1 = resultEvents[newPos].point;
1374
+ }
1375
+
1376
+ newPos = pos - 1;
1377
+
1378
+ while (processed[newPos] && newPos >= origIndex) {
1379
+ newPos--;
1380
+ }
1381
+ return newPos;
1382
+ }
1383
+
1384
+
1385
+ /**
1386
+ * @param {Array.<SweepEvent>} sortedEvents
1387
+ * @return {Array.<*>} polygons
1388
+ */
1389
+ function connectEdges(sortedEvents, operation) {
1390
+ var i, len;
1391
+ var resultEvents = orderEvents(sortedEvents);
1392
+
1393
+ // "false"-filled array
1394
+ var processed = {};
1395
+ var result = [];
1396
+ var event;
1397
+
1398
+ for (i = 0, len = resultEvents.length; i < len; i++) {
1399
+ if (processed[i]) { continue; }
1400
+ var contour = [[]];
1401
+
1402
+ if (!resultEvents[i].isExteriorRing) {
1403
+ if (operation === DIFFERENCE && !resultEvents[i].isSubject && result.length === 0) {
1404
+ result.push(contour);
1405
+ } else if (result.length === 0) {
1406
+ result.push([[contour]]);
1407
+ } else {
1408
+ result[result.length - 1].push(contour[0]);
1409
+ }
1410
+ } else if (operation === DIFFERENCE && !resultEvents[i].isSubject && result.length > 1) {
1411
+ result[result.length - 1].push(contour[0]);
1412
+ } else {
1413
+ result.push(contour);
1414
+ }
1415
+
1416
+ var ringId = result.length - 1;
1417
+ var pos = i;
1418
+
1419
+ var initial = resultEvents[i].point;
1420
+ contour[0].push(initial);
1421
+
1422
+ while (pos >= i) {
1423
+ event = resultEvents[pos];
1424
+ processed[pos] = true;
1425
+
1426
+ if (event.left) {
1427
+ event.resultInOut = false;
1428
+ event.contourId = ringId;
1429
+ } else {
1430
+ event.otherEvent.resultInOut = true;
1431
+ event.otherEvent.contourId = ringId;
1432
+ }
1433
+
1434
+ pos = event.pos;
1435
+ processed[pos] = true;
1436
+ contour[0].push(resultEvents[pos].point);
1437
+ pos = nextPos(pos, resultEvents, processed, i);
1438
+ }
1439
+
1440
+ pos = pos === -1 ? i : pos;
1441
+
1442
+ event = resultEvents[pos];
1443
+ processed[pos] = processed[event.pos] = true;
1444
+ event.otherEvent.resultInOut = true;
1445
+ event.otherEvent.contourId = ringId;
1446
+ }
1447
+
1448
+ // Handle if the result is a polygon (eg not multipoly)
1449
+ // Commented it again, let's see what do we mean by that
1450
+ // if (result.length === 1) result = result[0];
1451
+ return result;
1452
+ }
1453
+
1454
+ var tinyqueue = TinyQueue;
1455
+ var default_1 = TinyQueue;
1456
+
1457
+ function TinyQueue(data, compare) {
1458
+ var this$1 = this;
1459
+
1460
+ if (!(this instanceof TinyQueue)) { return new TinyQueue(data, compare); }
1461
+
1462
+ this.data = data || [];
1463
+ this.length = this.data.length;
1464
+ this.compare = compare || defaultCompare;
1465
+
1466
+ if (this.length > 0) {
1467
+ for (var i = (this.length >> 1) - 1; i >= 0; i--) { this$1._down(i); }
1468
+ }
1469
+ }
1470
+
1471
+ function defaultCompare(a, b) {
1472
+ return a < b ? -1 : a > b ? 1 : 0;
1473
+ }
1474
+
1475
+ TinyQueue.prototype = {
1476
+
1477
+ push: function (item) {
1478
+ this.data.push(item);
1479
+ this.length++;
1480
+ this._up(this.length - 1);
1481
+ },
1482
+
1483
+ pop: function () {
1484
+ if (this.length === 0) { return undefined; }
1485
+
1486
+ var top = this.data[0];
1487
+ this.length--;
1488
+
1489
+ if (this.length > 0) {
1490
+ this.data[0] = this.data[this.length];
1491
+ this._down(0);
1492
+ }
1493
+ this.data.pop();
1494
+
1495
+ return top;
1496
+ },
1497
+
1498
+ peek: function () {
1499
+ return this.data[0];
1500
+ },
1501
+
1502
+ _up: function (pos) {
1503
+ var data = this.data;
1504
+ var compare = this.compare;
1505
+ var item = data[pos];
1506
+
1507
+ while (pos > 0) {
1508
+ var parent = (pos - 1) >> 1;
1509
+ var current = data[parent];
1510
+ if (compare(item, current) >= 0) { break; }
1511
+ data[pos] = current;
1512
+ pos = parent;
1513
+ }
1514
+
1515
+ data[pos] = item;
1516
+ },
1517
+
1518
+ _down: function (pos) {
1519
+ var this$1 = this;
1520
+
1521
+ var data = this.data;
1522
+ var compare = this.compare;
1523
+ var halfLength = this.length >> 1;
1524
+ var item = data[pos];
1525
+
1526
+ while (pos < halfLength) {
1527
+ var left = (pos << 1) + 1;
1528
+ var right = left + 1;
1529
+ var best = data[left];
1530
+
1531
+ if (right < this$1.length && compare(data[right], best) < 0) {
1532
+ left = right;
1533
+ best = data[right];
1534
+ }
1535
+ if (compare(best, item) >= 0) { break; }
1536
+
1537
+ data[pos] = best;
1538
+ pos = left;
1539
+ }
1540
+
1541
+ data[pos] = item;
1542
+ }
1543
+ };
1544
+ tinyqueue.default = default_1;
1545
+
1546
+ var max = Math.max;
1547
+ var min = Math.min;
1548
+
1549
+ var contourId = 0;
1550
+
1551
+
1552
+ function processPolygon(contourOrHole, isSubject, depth, Q, bbox, isExteriorRing) {
1553
+ var i, len, s1, s2, e1, e2;
1554
+ for (i = 0, len = contourOrHole.length - 1; i < len; i++) {
1555
+ s1 = contourOrHole[i];
1556
+ s2 = contourOrHole[i + 1];
1557
+ e1 = new SweepEvent(s1, false, undefined, isSubject);
1558
+ e2 = new SweepEvent(s2, false, e1, isSubject);
1559
+ e1.otherEvent = e2;
1560
+
1561
+ if (s1[0] === s2[0] && s1[1] === s2[1]) {
1562
+ continue; // skip collapsed edges, or it breaks
1563
+ }
1564
+
1565
+ e1.contourId = e2.contourId = depth;
1566
+ if (!isExteriorRing) {
1567
+ e1.isExteriorRing = false;
1568
+ e2.isExteriorRing = false;
1569
+ }
1570
+ if (compareEvents(e1, e2) > 0) {
1571
+ e2.left = true;
1572
+ } else {
1573
+ e1.left = true;
1574
+ }
1575
+
1576
+ var x = s1[0], y = s1[1];
1577
+ bbox[0] = min(bbox[0], x);
1578
+ bbox[1] = min(bbox[1], y);
1579
+ bbox[2] = max(bbox[2], x);
1580
+ bbox[3] = max(bbox[3], y);
1581
+
1582
+ // Pushing it so the queue is sorted from left to right,
1583
+ // with object on the left having the highest priority.
1584
+ Q.push(e1);
1585
+ Q.push(e2);
1586
+ }
1587
+ }
1588
+
1589
+
1590
+ function fillQueue(subject, clipping, sbbox, cbbox, operation) {
1591
+ var eventQueue = new tinyqueue(null, compareEvents);
1592
+ var polygonSet, isExteriorRing, i, ii, j, jj; //, k, kk;
1593
+
1594
+ for (i = 0, ii = subject.length; i < ii; i++) {
1595
+ polygonSet = subject[i];
1596
+ for (j = 0, jj = polygonSet.length; j < jj; j++) {
1597
+ isExteriorRing = j === 0;
1598
+ if (isExteriorRing) { contourId++; }
1599
+ processPolygon(polygonSet[j], true, contourId, eventQueue, sbbox, isExteriorRing);
1600
+ }
1601
+ }
1602
+
1603
+ for (i = 0, ii = clipping.length; i < ii; i++) {
1604
+ polygonSet = clipping[i];
1605
+ for (j = 0, jj = polygonSet.length; j < jj; j++) {
1606
+ isExteriorRing = j === 0;
1607
+ if (operation === DIFFERENCE) { isExteriorRing = false; }
1608
+ if (isExteriorRing) { contourId++; }
1609
+ processPolygon(polygonSet[j], false, contourId, eventQueue, cbbox, isExteriorRing);
1610
+ }
1611
+ }
1612
+
1613
+ return eventQueue;
1614
+ }
1615
+
1616
+ var EMPTY = [];
1617
+
1618
+
1619
+ function trivialOperation(subject, clipping, operation) {
1620
+ var result = null;
1621
+ if (subject.length * clipping.length === 0) {
1622
+ if (operation === INTERSECTION) {
1623
+ result = EMPTY;
1624
+ } else if (operation === DIFFERENCE) {
1625
+ result = subject;
1626
+ } else if (operation === UNION ||
1627
+ operation === XOR) {
1628
+ result = (subject.length === 0) ? clipping : subject;
1629
+ }
1630
+ }
1631
+ return result;
1632
+ }
1633
+
1634
+
1635
+ function compareBBoxes(subject, clipping, sbbox, cbbox, operation) {
1636
+ var result = null;
1637
+ if (sbbox[0] > cbbox[2] ||
1638
+ cbbox[0] > sbbox[2] ||
1639
+ sbbox[1] > cbbox[3] ||
1640
+ cbbox[1] > sbbox[3]) {
1641
+ if (operation === INTERSECTION) {
1642
+ result = EMPTY;
1643
+ } else if (operation === DIFFERENCE) {
1644
+ result = subject;
1645
+ } else if (operation === UNION ||
1646
+ operation === XOR) {
1647
+ result = subject.concat(clipping);
1648
+ }
1649
+ }
1650
+ return result;
1651
+ }
1652
+
1653
+
1654
+ function boolean(subject, clipping, operation) {
1655
+ if (typeof subject[0][0][0] === 'number') {
1656
+ subject = [subject];
1657
+ }
1658
+ if (typeof clipping[0][0][0] === 'number') {
1659
+ clipping = [clipping];
1660
+ }
1661
+ var trivial = trivialOperation(subject, clipping, operation);
1662
+ if (trivial) {
1663
+ return trivial === EMPTY ? null : trivial;
1664
+ }
1665
+ var sbbox = [Infinity, Infinity, -Infinity, -Infinity];
1666
+ var cbbox = [Infinity, Infinity, -Infinity, -Infinity];
1667
+
1668
+ //console.time('fill queue');
1669
+ var eventQueue = fillQueue(subject, clipping, sbbox, cbbox, operation);
1670
+ //console.timeEnd('fill queue');
1671
+
1672
+ trivial = compareBBoxes(subject, clipping, sbbox, cbbox, operation);
1673
+ if (trivial) {
1674
+ return trivial === EMPTY ? null : trivial;
1675
+ }
1676
+ //console.time('subdivide edges');
1677
+ var sortedEvents = subdivide(eventQueue, subject, clipping, sbbox, cbbox, operation);
1678
+ //console.timeEnd('subdivide edges');
1679
+
1680
+ //console.time('connect vertices');
1681
+ var result = connectEdges(sortedEvents, operation);
1682
+ //console.timeEnd('connect vertices');
1683
+ return result;
1684
+ }
1685
+
1686
+ function union (subject, clipping) {
1687
+ return boolean(subject, clipping, UNION);
1688
+ }
1689
+
1690
+ function diff (subject, clipping) {
1691
+ return boolean(subject, clipping, DIFFERENCE);
1692
+ }
1693
+
1694
+ function xor (subject, clipping){
1695
+ return boolean(subject, clipping, XOR);
1696
+ }
1697
+
1698
+ function intersection$1 (subject, clipping) {
1699
+ return boolean(subject, clipping, INTERSECTION);
1700
+ }
1701
+
1702
+ /**
1703
+ * @enum {Number}
1704
+ */
1705
+ var operations = { UNION: UNION, DIFFERENCE: DIFFERENCE, INTERSECTION: INTERSECTION, XOR: XOR };
1706
+
1707
+ exports.union = union;
1708
+ exports.diff = diff;
1709
+ exports.xor = xor;
1710
+ exports.intersection = intersection$1;
1711
+ exports.operations = operations;
1712
+
1713
+ Object.defineProperty(exports, '__esModule', { value: true });
1714
+
1715
+ })));
1716
+ //# sourceMappingURL=martinez.umd.js.map