@nextgis/ngw-leaflet 1.19.5 → 2.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/index.d.ts +27 -39
- package/lib/ngw-leaflet.esm-browser.js +23074 -21877
- package/lib/ngw-leaflet.esm-browser.js.map +1 -1
- package/lib/ngw-leaflet.esm-browser.prod.js +1 -7
- package/lib/ngw-leaflet.esm-browser.prod.js.map +1 -1
- package/lib/ngw-leaflet.esm-bundler.js +56 -43
- package/lib/ngw-leaflet.esm-bundler.js.map +1 -1
- package/lib/ngw-leaflet.esm-bundler.prod.js +1 -1
- package/lib/ngw-leaflet.esm-bundler.prod.js.map +1 -1
- package/lib/ngw-leaflet.global.js +25338 -25177
- package/lib/ngw-leaflet.global.js.map +1 -1
- package/lib/ngw-leaflet.global.prod.js +1 -7
- package/lib/ngw-leaflet.global.prod.js.map +1 -1
- package/package.json +9 -8
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
var NgwLeaflet=function(){"use strict";var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};function e(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}var n=function(){return n=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};function i(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(t);o<i.length;o++)e.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(t,i[o])&&(n[i[o]]=t[i[o]])}return n}function o(t,e,n,i){return new(n||(n=Promise))((function(o,r){function s(t){try{u(i.next(t))}catch(e){r(e)}}function a(t){try{u(i.throw(t))}catch(e){r(e)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((i=i.apply(t,e||[])).next())}))}function r(t,e){var n,i,o,r,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;r&&(r=0,a[0]&&(s=0)),s;)try{if(n=1,i&&(o=2&a[0]?i.return:a[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,i=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){s.label=a[1];break}if(6===a[0]&&s.label<o[1]){s.label=o[1],o=a;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(a);break}o[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(u){a=[6,u],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}function s(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(t,e,n){if(n||2===arguments.length)for(var i,o=0,r=e.length;o<r;o++)!i&&o in e||(i||(i=Array.prototype.slice.call(e,0,o)),i[o]=e[o]);return t.concat(i||Array.prototype.slice.call(e))}function u(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=s(t),e={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(n){e[n]=t[n]&&function(e){return new Promise((function(i,o){(function(t,e,n,i){Promise.resolve(i).then((function(e){t({value:e,done:n})}),e)})(i,o,(e=t[n](e)).done,e.value)}))}}}function h(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}"function"==typeof SuppressedError&&SuppressedError;h('.leaflet-image-layer,.leaflet-layer,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-pane,.leaflet-pane>canvas,.leaflet-pane>svg,.leaflet-tile,.leaflet-tile-container,.leaflet-zoom-box{left:0;position:absolute;top:0}.leaflet-container{overflow:hidden}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile{-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.leaflet-tile::-moz-selection{background:transparent}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{height:1600px;-webkit-transform-origin:0 0;width:1600px}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-overlay-pane svg,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer{max-height:none!important;max-width:none!important}.leaflet-container.leaflet-touch-zoom{touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{box-sizing:border-box;height:0;width:0;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{height:1px;width:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{pointer-events:visiblePainted;pointer-events:auto;position:relative;z-index:800}.leaflet-bottom,.leaflet-top{pointer-events:none;position:absolute;z-index:1000}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{clear:both;float:left}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-tile{will-change:opacity}.leaflet-fade-anim .leaflet-popup{opacity:0;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{transform-origin:0 0}.leaflet-zoom-anim .leaflet-zoom-animated{transition:transform .25s cubic-bezier(0,0,.25,1);will-change:transform}.leaflet-pan-anim .leaflet-tile,.leaflet-zoom-anim .leaflet-tile{transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-control,.leaflet-popup-pane{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:grabbing}.leaflet-image-layer,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-image-layer.leaflet-interactive,.leaflet-marker-icon.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline:0}.leaflet-container a{color:#0078a8}.leaflet-container a.leaflet-active{outline:2px solid orange}.leaflet-zoom-box{background:hsla(0,0%,100%,.5);border:2px dotted #38f}.leaflet-container{font:12px/1.5 Helvetica Neue,Arial,Helvetica,sans-serif}.leaflet-bar{border-radius:4px;box-shadow:0 1px 5px rgba(0,0,0,.65)}.leaflet-bar a,.leaflet-bar a:hover{background-color:#fff;border-bottom:1px solid #ccc;color:#000;display:block;height:26px;line-height:26px;text-align:center;text-decoration:none;width:26px}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom:none;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.leaflet-bar a.leaflet-disabled{background-color:#f4f4f4;color:#bbb;cursor:default}.leaflet-touch .leaflet-bar a{height:30px;line-height:30px;width:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{background:#fff;border-radius:5px;box-shadow:0 1px 5px rgba(0,0,0,.4)}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);height:36px;width:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{height:44px;width:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{background:#fff;color:#333;padding:6px 10px 6px 6px}.leaflet-control-layers-scrollbar{overflow-x:hidden;overflow-y:scroll;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block}.leaflet-control-layers-separator{border-top:1px solid #ddd;height:0;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fff;background:hsla(0,0%,100%,.7);margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{color:#333;padding:0 5px}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover{text-decoration:underline}.leaflet-container .leaflet-control-attribution,.leaflet-container .leaflet-control-scale{font-size:11px}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{background:#fff;background:hsla(0,0%,100%,.5);border:2px solid #777;border-top:none;box-sizing:border-box;font-size:11px;line-height:1.1;overflow:hidden;padding:2px 5px 1px;white-space:nowrap}.leaflet-control-scale-line:not(:first-child){border-bottom:none;border-top:2px solid #777;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers{box-shadow:none}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-layers{background-clip:padding-box;border:2px solid rgba(0,0,0,.2)}.leaflet-popup{margin-bottom:20px;position:absolute;text-align:center}.leaflet-popup-content-wrapper{border-radius:12px;padding:1px;text-align:left}.leaflet-popup-content{line-height:1.4;margin:13px 19px}.leaflet-popup-content p{margin:18px 0}.leaflet-popup-tip-container{height:20px;left:50%;margin-left:-20px;overflow:hidden;pointer-events:none;position:absolute;width:40px}.leaflet-popup-tip{height:17px;margin:-10px auto 0;padding:1px;transform:rotate(45deg);width:17px}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;box-shadow:0 3px 14px rgba(0,0,0,.4);color:#333}.leaflet-container a.leaflet-popup-close-button{background:transparent;border:none;color:#c3c3c3;font:16px/14px Tahoma,Verdana,sans-serif;font-weight:700;height:14px;padding:4px 4px 0 0;position:absolute;right:0;text-align:center;text-decoration:none;top:0;width:18px}.leaflet-container a.leaflet-popup-close-button:hover{color:#999}.leaflet-popup-scrolled{border-bottom:1px solid #ddd;border-top:1px solid #ddd;overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678,M12=0.70710678,M21=-0.70710678,M22=0.70710678);margin:0 auto;width:24px}.leaflet-oldie .leaflet-popup-tip-container{margin-top:-1px}.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{background-color:#fff;border:1px solid #fff;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.4);color:#222;padding:6px;pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}.leaflet-tooltip.leaflet-clickable{cursor:pointer;pointer-events:auto}.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before,.leaflet-tooltip-top:before{background:transparent;border:6px solid transparent;content:"";pointer-events:none;position:absolute}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{border-top-color:#fff;bottom:0;margin-bottom:-12px}.leaflet-tooltip-bottom:before{border-bottom-color:#fff;margin-left:-6px;margin-top:-12px;top:0}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{margin-top:-6px;top:50%}.leaflet-tooltip-left:before{border-left-color:#fff;margin-right:-12px;right:0}.leaflet-tooltip-right:before{border-right-color:#fff;left:0;margin-left:-12px}');h(".ngw-map-container.leaflet-container{background:#fff}.leaflet-pane .leaflet-popup-pane{z-index:9999999999}");"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var c={exports:{}};(function(t){var e="1.7.1";function n(t){var e,n,i,o;for(n=1,i=arguments.length;n<i;n++)for(e in o=arguments[n])t[e]=o[e];return t}var i=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function o(t,e){var n=Array.prototype.slice;if(t.bind)return t.bind.apply(t,n.call(arguments,1));var i=n.call(arguments,2);return function(){return t.apply(e,i.length?i.concat(n.call(arguments)):arguments)}}var r=0;function s(t){return t._leaflet_id=t._leaflet_id||++r,t._leaflet_id}function a(t,e,n){var i,o,r,s;return s=function(){i=!1,o&&(r.apply(n,o),o=!1)},r=function(){i?o=arguments:(t.apply(n,arguments),setTimeout(s,e),i=!0)},r}function u(t,e,n){var i=e[1],o=e[0],r=i-o;return t===i&&n?t:((t-o)%r+r)%r+o}function h(){return!1}function c(t,e){var n=Math.pow(10,void 0===e?6:e);return Math.round(t*n)/n}function l(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function p(t){return l(t).split(/\s+/)}function d(t,e){for(var n in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?i(t.options):{}),e)t.options[n]=e[n];return t.options}function f(t,e,n){var i=[];for(var o in t)i.push(encodeURIComponent(n?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+i.join("&")}var m=/\{ *([\w_-]+) *\}/g;function _(t,e){return t.replace(m,(function(t,n){var i=e[n];if(void 0===i)throw new Error("No value provided for variable "+t);return"function"==typeof i&&(i=i(e)),i}))}var y=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function v(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1}var g="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function b(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var w=0;function x(t){var e=+new Date,n=Math.max(0,16-(e-w));return w=e+n,window.setTimeout(t,n)}var P=window.requestAnimationFrame||b("RequestAnimationFrame")||x,M=window.cancelAnimationFrame||b("CancelAnimationFrame")||b("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function C(t,e,n){if(!n||P!==x)return P.call(window,o(t,e));t.call(e)}function k(t){t&&M.call(window,t)}var A={extend:n,create:i,bind:o,lastId:r,stamp:s,throttle:a,wrapNum:u,falseFn:h,formatNum:c,trim:l,splitWords:p,setOptions:d,getParamString:f,template:_,isArray:y,indexOf:v,emptyImageUrl:g,requestFn:P,cancelFn:M,requestAnimFrame:C,cancelAnimFrame:k};function T(){}function O(t){if("undefined"!=typeof L&&L&&L.Mixin){t=y(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}}T.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},o=e.__super__=this.prototype,r=i(o);for(var s in r.constructor=e,e.prototype=r,this)Object.prototype.hasOwnProperty.call(this,s)&&"prototype"!==s&&"__super__"!==s&&(e[s]=this[s]);return t.statics&&(n(e,t.statics),delete t.statics),t.includes&&(O(t.includes),n.apply(null,[r].concat(t.includes)),delete t.includes),r.options&&(t.options=n(i(r.options),t.options)),n(r,t),r._initHooks=[],r.callInitHooks=function(){if(!this._initHooksCalled){o.callInitHooks&&o.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=r._initHooks.length;t<e;t++)r._initHooks[t].call(this)}},e},T.include=function(t){return n(this.prototype,t),this},T.mergeOptions=function(t){return n(this.prototype.options,t),this},T.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),n="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n),this};var E={on:function(t,e,n){if("object"==typeof t)for(var i in t)this._on(i,t[i],e);else for(var o=0,r=(t=p(t)).length;o<r;o++)this._on(t[o],e,n);return this},off:function(t,e,n){if(t)if("object"==typeof t)for(var i in t)this._off(i,t[i],e);else for(var o=0,r=(t=p(t)).length;o<r;o++)this._off(t[o],e,n);else delete this._events;return this},_on:function(t,e,n){this._events=this._events||{};var i=this._events[t];i||(this._events[t]=i=[]),n===this&&(n=void 0);for(var o={fn:e,ctx:n},r=i,s=0,a=r.length;s<a;s++)if(r[s].fn===e&&r[s].ctx===n)return;r.push(o)},_off:function(t,e,n){var i,o,r;if(this._events&&(i=this._events[t]))if(e){if(n===this&&(n=void 0),i)for(o=0,r=i.length;o<r;o++){var s=i[o];if(s.ctx===n&&s.fn===e)return s.fn=h,this._firingCount&&(this._events[t]=i=i.slice()),void i.splice(o,1)}}else{for(o=0,r=i.length;o<r;o++)i[o].fn=h;delete this._events[t]}},fire:function(t,e,i){if(!this.listens(t,i))return this;var o=n({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var r=this._events[t];if(r){this._firingCount=this._firingCount+1||1;for(var s=0,a=r.length;s<a;s++){var u=r[s];u.fn.call(u.ctx||this,o)}this._firingCount--}}return i&&this._propagateEvent(o),this},listens:function(t,e){var n=this._events&&this._events[t];if(n&&n.length)return!0;if(e)for(var i in this._eventParents)if(this._eventParents[i].listens(t,e))return!0;return!1},once:function(t,e,n){if("object"==typeof t){for(var i in t)this.once(i,t[i],e);return this}var r=o((function(){this.off(t,e,n).off(t,r,n)}),this);return this.on(t,e,n).on(t,r,n)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[s(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[s(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,n({layer:t.target,propagatedFrom:t.target},t),!0)}};E.addEventListener=E.on,E.removeEventListener=E.clearAllEventListeners=E.off,E.addOneTimeEventListener=E.once,E.fireEvent=E.fire,E.hasEventListeners=E.listens;var I=T.extend(E);function S(t,e,n){this.x=n?Math.round(t):t,this.y=n?Math.round(e):e}var z=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function B(t,e,n){return t instanceof S?t:y(t)?new S(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new S(t.x,t.y):new S(t,e,n)}function Z(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i<o;i++)this.extend(n[i])}function N(t,e){return!t||t instanceof Z?t:new Z(t,e)}function R(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i<o;i++)this.extend(n[i])}function j(t,e){return t instanceof R?t:new R(t,e)}function D(t,e,n){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==n&&(this.alt=+n)}function F(t,e,n){return t instanceof D?t:y(t)&&"object"!=typeof t[0]?3===t.length?new D(t[0],t[1],t[2]):2===t.length?new D(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new D(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new D(t,e,n)}S.prototype={clone:function(){return new S(this.x,this.y)},add:function(t){return this.clone()._add(B(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(B(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 S(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new S(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=z(this.x),this.y=z(this.y),this},distanceTo:function(t){var e=(t=B(t)).x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},equals:function(t){return(t=B(t)).x===this.x&&t.y===this.y},contains:function(t){return t=B(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+c(this.x)+", "+c(this.y)+")"}},Z.prototype={extend:function(t){return t=B(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 S((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new S(this.min.x,this.max.y)},getTopRight:function(){return new S(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,n;return(t="number"==typeof t[0]||t instanceof S?B(t):N(t))instanceof Z?(e=t.min,n=t.max):e=n=t,e.x>=this.min.x&&n.x<=this.max.x&&e.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=N(t);var e=this.min,n=this.max,i=t.min,o=t.max;return o.x>=e.x&&i.x<=n.x&&o.y>=e.y&&i.y<=n.y},overlaps:function(t){t=N(t);var e=this.min,n=this.max,i=t.min,o=t.max;return o.x>e.x&&i.x<n.x&&o.y>e.y&&i.y<n.y},isValid:function(){return!(!this.min||!this.max)}},R.prototype={extend:function(t){var e,n,i=this._southWest,o=this._northEast;if(t instanceof D)e=t,n=t;else{if(!(t instanceof R))return t?this.extend(F(t)||j(t)):this;if(n=t._northEast,!(e=t._southWest)||!n)return this}return i||o?(i.lat=Math.min(e.lat,i.lat),i.lng=Math.min(e.lng,i.lng),o.lat=Math.max(n.lat,o.lat),o.lng=Math.max(n.lng,o.lng)):(this._southWest=new D(e.lat,e.lng),this._northEast=new D(n.lat,n.lng)),this},pad:function(t){var e=this._southWest,n=this._northEast,i=Math.abs(e.lat-n.lat)*t,o=Math.abs(e.lng-n.lng)*t;return new R(new D(e.lat-i,e.lng-o),new D(n.lat+i,n.lng+o))},getCenter:function(){return new D((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 D(this.getNorth(),this.getWest())},getSouthEast:function(){return new D(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 D||"lat"in t?F(t):j(t);var e,n,i=this._southWest,o=this._northEast;return t instanceof R?(e=t.getSouthWest(),n=t.getNorthEast()):e=n=t,e.lat>=i.lat&&n.lat<=o.lat&&e.lng>=i.lng&&n.lng<=o.lng},intersects:function(t){t=j(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast();return o.lat>=e.lat&&i.lat<=n.lat&&o.lng>=e.lng&&i.lng<=n.lng},overlaps:function(t){t=j(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast();return o.lat>e.lat&&i.lat<n.lat&&o.lng>e.lng&&i.lng<n.lng},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=j(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},D.prototype={equals:function(t,e){return!!t&&(t=F(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===e?1e-9:e))},toString:function(t){return"LatLng("+c(this.lat,t)+", "+c(this.lng,t)+")"},distanceTo:function(t){return H.distance(this,F(t))},wrap:function(){return H.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,n=e/Math.cos(Math.PI/180*this.lat);return j([this.lat-e,this.lng-n],[this.lat+e,this.lng+n])},clone:function(){return new D(this.lat,this.lng,this.alt)}};var U,W={latLngToPoint:function(t,e){var n=this.projection.project(t),i=this.scale(e);return this.transformation._transform(n,i)},pointToLatLng:function(t,e){var n=this.scale(e),i=this.transformation.untransform(t,n);return this.projection.unproject(i)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,n=this.scale(t);return new Z(this.transformation.transform(e.min,n),this.transformation.transform(e.max,n))},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?u(t.lng,this.wrapLng,!0):t.lng;return new D(this.wrapLat?u(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),n=this.wrapLatLng(e),i=e.lat-n.lat,o=e.lng-n.lng;if(0===i&&0===o)return t;var r=t.getSouthWest(),s=t.getNorthEast();return new R(new D(r.lat-i,r.lng-o),new D(s.lat-i,s.lng-o))}},H=n({},W,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var n=Math.PI/180,i=t.lat*n,o=e.lat*n,r=Math.sin((e.lat-t.lat)*n/2),s=Math.sin((e.lng-t.lng)*n/2),a=r*r+Math.cos(i)*Math.cos(o)*s*s,u=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*u}}),V=6378137,q={R:V,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,n=this.MAX_LATITUDE,i=Math.max(Math.min(n,t.lat),-n),o=Math.sin(i*e);return new S(this.R*t.lng*e,this.R*Math.log((1+o)/(1-o))/2)},unproject:function(t){var e=180/Math.PI;return new D((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(U=V*Math.PI,new Z([-U,-U],[U,U]))};function G(t,e,n,i){if(y(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=n,this._d=i}function J(t,e,n,i){return new G(t,e,n,i)}G.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return t.x=(e=e||1)*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return new S((t.x/(e=e||1)-this._b)/this._a,(t.y/e-this._d)/this._c)}};var K=n({},H,{code:"EPSG:3857",projection:q,transformation:function(){var t=.5/(Math.PI*q.R);return J(t,.5,-t,.5)}()}),Y=n({},K,{code:"EPSG:900913"});function Q(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function X(t,e){var n,i,o,r,s,a,u="";for(n=0,o=t.length;n<o;n++){for(i=0,r=(s=t[n]).length;i<r;i++)u+=(i?"L":"M")+(a=s[i]).x+" "+a.y;u+=e?Ot?"z":"x":""}return u||"M0 0"}var $=document.documentElement.style,tt="ActiveXObject"in window,et=tt&&!document.addEventListener,nt="msLaunchUri"in navigator&&!("documentMode"in document),it=It("webkit"),ot=It("android"),rt=It("android 2")||It("android 3"),st=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),at=ot&&It("Google")&&st<537&&!("AudioNode"in window),ut=!!window.opera,ht=!nt&&It("chrome"),ct=It("gecko")&&!it&&!ut&&!tt,lt=!ht&&It("safari"),pt=It("phantom"),dt="OTransition"in $,ft=0===navigator.platform.indexOf("Win"),mt=tt&&"transition"in $,_t="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!rt,yt="MozPerspective"in $,vt=!window.L_DISABLE_3D&&(mt||_t||yt)&&!dt&&!pt,gt="undefined"!=typeof orientation||It("mobile"),bt=gt&&it,wt=gt&&_t,xt=!window.PointerEvent&&window.MSPointerEvent,Lt=!(!window.PointerEvent&&!xt),Pt=!window.L_NO_TOUCH&&(Lt||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),Mt=gt&&ut,Ct=gt&&ct,kt=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,At=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",h,e),window.removeEventListener("testPassiveEventSupport",h,e)}catch(n){}return t}(),Tt=!!document.createElement("canvas").getContext,Ot=!(!document.createElementNS||!Q("svg").createSVGRect),Et=!Ot&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(n){return!1}}();function It(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var St={ie:tt,ielt9:et,edge:nt,webkit:it,android:ot,android23:rt,androidStock:at,opera:ut,chrome:ht,gecko:ct,safari:lt,phantom:pt,opera12:dt,win:ft,ie3d:mt,webkit3d:_t,gecko3d:yt,any3d:vt,mobile:gt,mobileWebkit:bt,mobileWebkit3d:wt,msPointer:xt,pointer:Lt,touch:Pt,mobileOpera:Mt,mobileGecko:Ct,retina:kt,passiveEvents:At,canvas:Tt,svg:Ot,vml:Et},zt=xt?"MSPointerDown":"pointerdown",Bt=xt?"MSPointerMove":"pointermove",Zt=xt?"MSPointerUp":"pointerup",Nt=xt?"MSPointerCancel":"pointercancel",Rt={},jt=!1;function Dt(t,e,n,i){return"touchstart"===e?Ut(t,n,i):"touchmove"===e?Gt(t,n,i):"touchend"===e&&Jt(t,n,i),this}function Ft(t,e,n){var i=t["_leaflet_"+e+n];return"touchstart"===e?t.removeEventListener(zt,i,!1):"touchmove"===e?t.removeEventListener(Bt,i,!1):"touchend"===e&&(t.removeEventListener(Zt,i,!1),t.removeEventListener(Nt,i,!1)),this}function Ut(t,e,n){var i=o((function(t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&He(t),qt(t,e)}));t["_leaflet_touchstart"+n]=i,t.addEventListener(zt,i,!1),jt||(document.addEventListener(zt,Wt,!0),document.addEventListener(Bt,Ht,!0),document.addEventListener(Zt,Vt,!0),document.addEventListener(Nt,Vt,!0),jt=!0)}function Wt(t){Rt[t.pointerId]=t}function Ht(t){Rt[t.pointerId]&&(Rt[t.pointerId]=t)}function Vt(t){delete Rt[t.pointerId]}function qt(t,e){for(var n in t.touches=[],Rt)t.touches.push(Rt[n]);t.changedTouches=[t],e(t)}function Gt(t,e,n){var i=function(t){t.pointerType===(t.MSPOINTER_TYPE_MOUSE||"mouse")&&0===t.buttons||qt(t,e)};t["_leaflet_touchmove"+n]=i,t.addEventListener(Bt,i,!1)}function Jt(t,e,n){var i=function(t){qt(t,e)};t["_leaflet_touchend"+n]=i,t.addEventListener(Zt,i,!1),t.addEventListener(Nt,i,!1)}var Kt=xt?"MSPointerDown":Lt?"pointerdown":"touchstart",Yt=xt?"MSPointerUp":Lt?"pointerup":"touchend",Qt="_leaflet_";function Xt(t,e,n){var i,o,r=!1,s=250;function a(t){if(Lt){if(!t.isPrimary)return;if("mouse"===t.pointerType)return}else if(t.touches.length>1)return;var e=Date.now(),n=e-(i||e);o=t.touches?t.touches[0]:t,r=n>0&&n<=s,i=e}function u(t){if(r&&!o.cancelBubble){if(Lt){if("mouse"===t.pointerType)return;var n,s,a={};for(s in o)a[s]=(n=o[s])&&n.bind?n.bind(o):n;o=a}o.type="dblclick",o.button=0,e(o),i=null}}return t[Qt+Kt+n]=a,t[Qt+Yt+n]=u,t[Qt+"dblclick"+n]=e,t.addEventListener(Kt,a,!!At&&{passive:!1}),t.addEventListener(Yt,u,!!At&&{passive:!1}),t.addEventListener("dblclick",e,!1),this}function $t(t,e){var n=t[Qt+Yt+e],i=t[Qt+"dblclick"+e];return t.removeEventListener(Kt,t[Qt+Kt+e],!!At&&{passive:!1}),t.removeEventListener(Yt,n,!!At&&{passive:!1}),t.removeEventListener("dblclick",i,!1),this}var te,ee,ne,ie,oe,re=xe(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),se=xe(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ae="webkitTransition"===se||"OTransition"===se?se+"End":"transitionend";function ue(t){return"string"==typeof t?document.getElementById(t):t}function he(t,e){var n=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!n||"auto"===n)&&document.defaultView){var i=document.defaultView.getComputedStyle(t,null);n=i?i[e]:null}return"auto"===n?null:n}function ce(t,e,n){var i=document.createElement(t);return i.className=e||"",n&&n.appendChild(i),i}function le(t){var e=t.parentNode;e&&e.removeChild(t)}function pe(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function de(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function fe(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function me(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=ge(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function _e(t,e){if(void 0!==t.classList)for(var n=p(e),i=0,o=n.length;i<o;i++)t.classList.add(n[i]);else if(!me(t,e)){var r=ge(t);ve(t,(r?r+" ":"")+e)}}function ye(t,e){void 0!==t.classList?t.classList.remove(e):ve(t,l((" "+ge(t)+" ").replace(" "+e+" "," ")))}function ve(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function ge(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function be(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&we(t,e)}function we(t,e){var n=!1,i="DXImageTransform.Microsoft.Alpha";try{n=t.filters.item(i)}catch(o){if(1===e)return}e=Math.round(100*e),n?(n.Enabled=100!==e,n.Opacity=e):t.style.filter+=" progid:"+i+"(opacity="+e+")"}function xe(t){for(var e=document.documentElement.style,n=0;n<t.length;n++)if(t[n]in e)return t[n];return!1}function Le(t,e,n){var i=e||new S(0,0);t.style[re]=(mt?"translate("+i.x+"px,"+i.y+"px)":"translate3d("+i.x+"px,"+i.y+"px,0)")+(n?" scale("+n+")":"")}function Pe(t,e){t._leaflet_pos=e,vt?Le(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function Me(t){return t._leaflet_pos||new S(0,0)}if("onselectstart"in document)te=function(){ze(window,"selectstart",He)},ee=function(){Ze(window,"selectstart",He)};else{var Ce=xe(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);te=function(){if(Ce){var t=document.documentElement.style;ne=t[Ce],t[Ce]="none"}},ee=function(){Ce&&(document.documentElement.style[Ce]=ne,ne=void 0)}}function ke(){ze(window,"dragstart",He)}function Ae(){Ze(window,"dragstart",He)}function Te(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Oe(),ie=t,oe=t.style.outline,t.style.outline="none",ze(window,"keydown",Oe))}function Oe(){ie&&(ie.style.outline=oe,ie=void 0,oe=void 0,Ze(window,"keydown",Oe))}function Ee(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function Ie(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Se={TRANSFORM:re,TRANSITION:se,TRANSITION_END:ae,get:ue,getStyle:he,create:ce,remove:le,empty:pe,toFront:de,toBack:fe,hasClass:me,addClass:_e,removeClass:ye,setClass:ve,getClass:ge,setOpacity:be,testProp:xe,setTransform:Le,setPosition:Pe,getPosition:Me,disableTextSelection:te,enableTextSelection:ee,disableImageDrag:ke,enableImageDrag:Ae,preventOutline:Te,restoreOutline:Oe,getSizedParentNode:Ee,getScale:Ie};function ze(t,e,n,i){if("object"==typeof e)for(var o in e)je(t,o,e[o],n);else for(var r=0,s=(e=p(e)).length;r<s;r++)je(t,e[r],n,i);return this}var Be="_leaflet_events";function Ze(t,e,n,i){if("object"==typeof e)for(var o in e)De(t,o,e[o],n);else if(e)for(var r=0,s=(e=p(e)).length;r<s;r++)De(t,e[r],n,i);else{for(var a in t[Be])De(t,a,t[Be][a]);delete t[Be]}return this}function Ne(){if(Lt)return!(nt||lt)}var Re={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function je(t,e,n,i){var o=e+s(n)+(i?"_"+s(i):"");if(t[Be]&&t[Be][o])return this;var r=function(e){return n.call(i||t,e||window.event)},a=r;Lt&&0===e.indexOf("touch")?Dt(t,e,r,o):Pt&&"dblclick"===e&&!Ne()?Xt(t,r,o):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(Re[e]||e,r,!!At&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?t.addEventListener(Re[e],r=function(e){e=e||window.event,Xe(t,e)&&a(e)},!1):t.addEventListener(e,a,!1):"attachEvent"in t&&t.attachEvent("on"+e,r),t[Be]=t[Be]||{},t[Be][o]=r}function De(t,e,n,i){var o=e+s(n)+(i?"_"+s(i):""),r=t[Be]&&t[Be][o];if(!r)return this;Lt&&0===e.indexOf("touch")?Ft(t,e,o):Pt&&"dblclick"===e&&!Ne()?$t(t,o):"removeEventListener"in t?t.removeEventListener(Re[e]||e,r,!1):"detachEvent"in t&&t.detachEvent("on"+e,r),t[Be][o]=null}function Fe(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,Qe(t),this}function Ue(t){return je(t,"wheel",Fe),this}function We(t){return ze(t,"mousedown touchstart dblclick",Fe),je(t,"click",Ye),this}function He(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Ve(t){return He(t),Fe(t),this}function qe(t,e){if(!e)return new S(t.clientX,t.clientY);var n=Ie(e),i=n.boundingClientRect;return new S((t.clientX-i.left)/n.x-e.clientLeft,(t.clientY-i.top)/n.y-e.clientTop)}var Ge=ft&&ht?2*window.devicePixelRatio:ct?window.devicePixelRatio:1;function Je(t){return nt?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Ge:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}var Ke={};function Ye(t){Ke[t.type]=!0}function Qe(t){var e=Ke[t.type];return Ke[t.type]=!1,e}function Xe(t,e){var n=e.relatedTarget;if(!n)return!0;try{for(;n&&n!==t;)n=n.parentNode}catch(i){return!1}return n!==t}var $e={on:ze,off:Ze,stopPropagation:Fe,disableScrollPropagation:Ue,disableClickPropagation:We,preventDefault:He,stop:Ve,getMousePosition:qe,getWheelDelta:Je,fakeStop:Ye,skipped:Qe,isExternalTarget:Xe,addListener:ze,removeListener:Ze},tn=I.extend({run:function(t,e,n,i){this.stop(),this._el=t,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(i||.5,.2),this._startPos=Me(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=C(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,n=1e3*this._duration;e<n?this._runFrame(this._easeOut(e/n),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var n=this._startPos.add(this._offset.multiplyBy(t));e&&n._round(),Pe(this._el,n),this.fire("step")},_complete:function(){k(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),en=I.extend({options:{crs:K,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=d(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=o(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(F(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=se&&vt&&!Mt&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),ze(this._proxy,ae,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,i){return e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(F(t),e,this.options.maxBounds),i=i||{},this._stop(),this._loaded&&!i.reset&&!0!==i&&(void 0!==i.animate&&(i.zoom=n({animate:i.animate},i.zoom),i.pan=n({animate:i.animate,duration:i.duration},i.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,i.zoom):this._tryAnimatedPan(t,i.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,e),this)},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return this.setZoom(this._zoom+(t=t||(vt?this.options.zoomDelta:1)),e)},zoomOut:function(t,e){return this.setZoom(this._zoom-(t=t||(vt?this.options.zoomDelta:1)),e)},setZoomAround:function(t,e,n){var i=this.getZoomScale(e),o=this.getSize().divideBy(2),r=(t instanceof S?t:this.latLngToContainerPoint(t)).subtract(o).multiplyBy(1-1/i),s=this.containerPointToLatLng(o.add(r));return this.setView(s,e,{zoom:n})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():j(t);var n=B(e.paddingTopLeft||e.padding||[0,0]),i=B(e.paddingBottomRight||e.padding||[0,0]),o=this.getBoundsZoom(t,!1,n.add(i));if((o="number"==typeof e.maxZoom?Math.min(e.maxZoom,o):o)===1/0)return{center:t.getCenter(),zoom:o};var r=i.subtract(n).divideBy(2),s=this.project(t.getSouthWest(),o),a=this.project(t.getNorthEast(),o);return{center:this.unproject(s.add(a).divideBy(2).add(r),o),zoom:o}},fitBounds:function(t,e){if(!(t=j(t)).isValid())throw new Error("Bounds are not valid.");var n=this._getBoundsCenterZoom(t,e);return this.setView(n.center,n.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(e=e||{},!(t=B(t).round()).x&&!t.y)return this.fire("moveend");if(!0!==e.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new tn,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){_e(this._mapPane,"leaflet-pan-anim");var n=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,n,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,n){if(!1===(n=n||{}).animate||!vt)return this.setView(t,e,n);this._stop();var i=this.project(this.getCenter()),o=this.project(t),r=this.getSize(),s=this._zoom;t=F(t),e=void 0===e?s:e;var a=Math.max(r.x,r.y),u=a*this.getZoomScale(s,e),h=o.distanceTo(i)||1,c=1.42,l=c*c;function p(t){var e=(u*u-a*a+(t?-1:1)*l*l*h*h)/(2*(t?u:a)*l*h),n=Math.sqrt(e*e+1)-e;return n<1e-9?-18:Math.log(n)}function d(t){return(Math.exp(t)-Math.exp(-t))/2}function f(t){return(Math.exp(t)+Math.exp(-t))/2}function m(t){return d(t)/f(t)}var _=p(0);function y(t){return a*(f(_)/f(_+c*t))}function v(t){return a*(f(_)*m(_+c*t)-d(_))/l}function g(t){return 1-Math.pow(1-t,1.5)}var b=Date.now(),w=(p(1)-_)/c,x=n.duration?1e3*n.duration:1e3*w*.8;function L(){var n=(Date.now()-b)/x,r=g(n)*w;n<=1?(this._flyToFrame=C(L,this),this._move(this.unproject(i.add(o.subtract(i).multiplyBy(v(r)/h)),s),this.getScaleZoom(a/y(r),s),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}return this._moveStart(!0,n.noMoveStart),L.call(this),this},flyToBounds:function(t,e){var n=this._getBoundsCenterZoom(t,e);return this.flyTo(n.center,n.zoom,e)},setMaxBounds:function(t){return(t=j(t)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var n=this.getCenter(),i=this._limitCenter(n,this._zoom,j(t));return n.equals(i)||this.panTo(i,e),this._enforcingBounds=!1,this},panInside:function(t,e){var n=B((e=e||{}).paddingTopLeft||e.padding||[0,0]),i=B(e.paddingBottomRight||e.padding||[0,0]),o=this.getCenter(),r=this.project(o),s=this.project(t),a=this.getPixelBounds(),u=a.getSize().divideBy(2),h=N([a.min.add(n),a.max.subtract(i)]);if(!h.contains(s)){this._enforcingBounds=!0;var c=r.subtract(s),l=B(s.x+c.x,s.y+c.y);(s.x<h.min.x||s.x>h.max.x)&&(l.x=r.x-c.x,c.x>0?l.x+=u.x-n.x:l.x-=u.x-i.x),(s.y<h.min.y||s.y>h.max.y)&&(l.y=r.y-c.y,c.y>0?l.y+=u.y-n.y:l.y-=u.y-i.y),this.panTo(this.unproject(l),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=n({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),r=e.divideBy(2).round(),s=i.divideBy(2).round(),a=r.subtract(s);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=n({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=o(this._handleGeolocationResponse,this),i=o(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,n=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+n+"."})},_handleGeolocationResponse:function(t){var e=new D(t.coords.latitude,t.coords.longitude),n=e.toBounds(2*t.coords.accuracy),i=this._locateOptions;if(i.setView){var o=this.getBoundsZoom(n);this.setView(e,i.maxZoom?Math.min(o,i.maxZoom):o)}var r={latlng:e,bounds:n,timestamp:t.timestamp};for(var s in t.coords)"number"==typeof t.coords[s]&&(r[s]=t.coords[s]);this.fire("locationfound",r)},addHandler:function(t,e){if(!e)return this;var n=this[t]=new e(this);return this._handlers.push(n),this.options[t]&&n.enable(),this},remove:function(){if(this._initEvents(!0),this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(e){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),le(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(k(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)le(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n=ce("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new R(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,n){t=j(t),n=B(n||[0,0]);var i=this.getZoom()||0,o=this.getMinZoom(),r=this.getMaxZoom(),s=t.getNorthWest(),a=t.getSouthEast(),u=this.getSize().subtract(n),h=N(this.project(a,i),this.project(s,i)).getSize(),c=vt?this.options.zoomSnap:1,l=u.x/h.x,p=u.y/h.y,d=e?Math.max(l,p):Math.min(l,p);return i=this.getScaleZoom(d,i),c&&(i=Math.round(i/(c/100))*(c/100),i=e?Math.ceil(i/c)*c:Math.floor(i/c)*c),Math.max(o,Math.min(r,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new S(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var n=this._getTopLeftPoint(t,e);return new Z(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var n=this.options.crs;return e=void 0===e?this._zoom:e,n.scale(t)/n.scale(e)},getScaleZoom:function(t,e){var n=this.options.crs,i=n.zoom(t*n.scale(e=void 0===e?this._zoom:e));return isNaN(i)?1/0:i},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(F(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(B(t),e)},layerPointToLatLng:function(t){var e=B(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(F(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(F(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(j(t))},distance:function(t,e){return this.options.crs.distance(F(t),F(e))},containerPointToLayerPoint:function(t){return B(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return B(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(B(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(F(t)))},mouseEventToContainerPoint:function(t){return qe(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=ue(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");ze(e,"scroll",this._onScroll,this),this._containerId=s(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&vt,_e(t,"leaflet-container"+(Pt?" leaflet-touch":"")+(kt?" leaflet-retina":"")+(et?" leaflet-oldie":"")+(lt?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=he(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Pe(this._mapPane,new S(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(_e(t.markerPane,"leaflet-zoom-hide"),_e(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){Pe(this._mapPane,new S(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var i=this._zoom!==e;this._moveStart(i,!1)._move(t,e)._moveEnd(i),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,n){void 0===e&&(e=this._zoom);var i=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(i||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return k(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Pe(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[s(this._container)]=this;var e=t?Ze:ze;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),vt&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){k(this._resizeRequest),this._resizeRequest=C((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var n,i=[],o="mouseout"===e||"mouseover"===e,r=t.target||t.srcElement,a=!1;r;){if((n=this._targets[s(r)])&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(n)){a=!0;break}if(n&&n.listens(e,!0)){if(o&&!Xe(r,t))break;if(i.push(n),o)break}if(r===this._container)break;r=r.parentNode}return i.length||a||o||!Xe(r,t)||(i=[this]),i},_handleDOMEvent:function(t){if(this._loaded&&!Qe(t)){var e=t.type;"mousedown"!==e&&"keypress"!==e&&"keyup"!==e&&"keydown"!==e||Te(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if("click"===t.type){var o=n({},t);o.type="preclick",this._fireDOMEvent(o,o.type,i)}if(!t._stopped&&(i=(i||[]).concat(this._findEventTargets(t,e))).length){var r=i[0];"contextmenu"===e&&r.listens(e,!0)&&He(t);var s={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var a=r.getLatLng&&(!r._radius||r._radius<=10);s.containerPoint=a?this.latLngToContainerPoint(r.getLatLng()):this.mouseEventToContainerPoint(t),s.layerPoint=this.containerPointToLayerPoint(s.containerPoint),s.latlng=a?r.getLatLng():this.layerPointToLatLng(s.layerPoint)}for(var u=0;u<i.length;u++)if(i[u].fire(e,s,!0),s.originalEvent._stopped||!1===i[u].options.bubblingMouseEvents&&-1!==v(this._mouseEvents,e))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return Me(this._mapPane)||new S(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var n=this.getSize()._divideBy(2);return this.project(t,e)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return this.project(t,e)._subtract(i)},_latLngBoundsToNewLayerBounds:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return N([this.project(t.getSouthWest(),e)._subtract(i),this.project(t.getNorthWest(),e)._subtract(i),this.project(t.getSouthEast(),e)._subtract(i),this.project(t.getNorthEast(),e)._subtract(i)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,n){if(!n)return t;var i=this.project(t,e),o=this.getSize().divideBy(2),r=new Z(i.subtract(o),i.add(o)),s=this._getBoundsOffset(r,n,e);return s.round().equals([0,0])?t:this.unproject(i.add(s),e)},_limitOffset:function(t,e){if(!e)return t;var n=this.getPixelBounds(),i=new Z(n.min.add(t),n.max.add(t));return t.add(this._getBoundsOffset(i,e))},_getBoundsOffset:function(t,e,n){var i=N(this.project(e.getNorthEast(),n),this.project(e.getSouthWest(),n)),o=i.min.subtract(t.min),r=i.max.subtract(t.max);return new S(this._rebound(o.x,-r.x),this._rebound(o.y,-r.y))},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),n=this.getMaxZoom(),i=vt?this.options.zoomSnap:1;return i&&(t=Math.round(t/i)*i),Math.max(e,Math.min(n,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){ye(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var n=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(n)||(this.panBy(n,e),0))},_createAnimProxy:function(){var t=this._proxy=ce("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var e=re,n=this._proxy.style[e];Le(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),n===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){le(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();Le(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var i=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/i);return!(!0!==n.animate&&!this.getSize().contains(o)||(C((function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)}),this),0))},_animateZoom:function(t,e,n,i){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,_e(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:i}),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&ye(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),C((function(){this._moveEnd(!0)}),this))}});function nn(t,e){return new en(t,e)}var on=T.extend({options:{position:"topright"},initialize:function(t){d(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),n=this.getPosition(),i=t._controlCorners[n];return _e(e,"leaflet-control"),-1!==n.indexOf("bottom")?i.insertBefore(e,i.firstChild):i.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(le(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),rn=function(t){return new on(t)};en.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",n=this._controlContainer=ce("div",e+"control-container",this._container);function i(i,o){t[i+o]=ce("div",e+i+" "+e+o,n)}i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)le(this._controlCorners[t]);le(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var sn=on.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,n,i){return n<i?-1:i<n?1:0}},initialize:function(t,e,n){for(var i in d(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[i],i);for(i in e)this._addLayer(e[i],i,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return on.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(s(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){_e(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(_e(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):ye(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return ye(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=ce("div",t),n=this.options.collapsed;e.setAttribute("aria-haspopup",!0),We(e),Ue(e);var i=this._section=ce("section",t+"-list");n&&(this._map.on("click",this.collapse,this),ot||ze(e,{mouseenter:this.expand,mouseleave:this.collapse},this));var o=this._layersLink=ce("a",t+"-toggle",e);o.href="#",o.title="Layers",Pt?(ze(o,"click",Ve),ze(o,"click",this.expand,this)):ze(o,"focus",this.expand,this),n||this.expand(),this._baseLayersList=ce("div",t+"-base",i),this._separator=ce("div",t+"-separator",i),this._overlaysList=ce("div",t+"-overlays",i),e.appendChild(i)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&s(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,n){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:n}),this.options.sortLayers&&this._layers.sort(o((function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)}),this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;pe(this._baseLayersList),pe(this._overlaysList),this._layerControlInputs=[];var t,e,n,i,o=0;for(n=0;n<this._layers.length;n++)this._addItem(i=this._layers[n]),e=e||i.overlay,t=t||!i.overlay,o+=i.overlay?0:1;return this.options.hideSingleBase&&(this._baseLayersList.style.display=(t=t&&o>1)?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(s(t.target)),n=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;n&&this._map.fire(n,e)},_createRadioElement:function(t,e){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",i=document.createElement("div");return i.innerHTML=n,i.firstChild},_addItem:function(t){var e,n=document.createElement("label"),i=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=i):e=this._createRadioElement("leaflet-base-layers_"+s(this),i),this._layerControlInputs.push(e),e.layerId=s(t.layer),ze(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var r=document.createElement("div");return n.appendChild(r),r.appendChild(e),r.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){var t,e,n=this._layerControlInputs,i=[],o=[];this._handlingClick=!0;for(var r=n.length-1;r>=0;r--)e=this._getLayer((t=n[r]).layerId).layer,t.checked?i.push(e):t.checked||o.push(e);for(r=0;r<o.length;r++)this._map.hasLayer(o[r])&&this._map.removeLayer(o[r]);for(r=0;r<i.length;r++)this._map.hasLayer(i[r])||this._map.addLayer(i[r]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,e,n=this._layerControlInputs,i=this._map.getZoom(),o=n.length-1;o>=0;o--)e=this._getLayer((t=n[o]).layerId).layer,t.disabled=void 0!==e.options.minZoom&&i<e.options.minZoom||void 0!==e.options.maxZoom&&i>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),an=function(t,e,n){return new sn(t,e,n)},un=on.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=ce("div",e+" leaflet-bar"),i=this.options;return this._zoomInButton=this._createButton(i.zoomInText,i.zoomInTitle,e+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(i.zoomOutText,i.zoomOutTitle,e+"-out",n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,n,i,o){var r=ce("a",n,i);return r.innerHTML=t,r.href="#",r.title=e,r.setAttribute("role","button"),r.setAttribute("aria-label",e),We(r),ze(r,"click",Ve),ze(r,"click",o,this),ze(r,"click",this._refocusOnMap,this),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";ye(this._zoomInButton,e),ye(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMinZoom())&&_e(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMaxZoom())&&_e(this._zoomInButton,e)}});en.mergeOptions({zoomControl:!0}),en.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new un,this.addControl(this.zoomControl))}));var hn=function(t){return new un(t)},cn=on.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",n=ce("div",e),i=this.options;return this._addScales(i,e+"-line",n),t.on(i.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),n},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,n){t.metric&&(this._mScale=ce("div",e,n)),t.imperial&&(this._iScale=ce("div",e,n))},_update:function(){var t=this._map,e=t.getSize().y/2,n=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(n)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t);this._updateScale(this._mScale,e<1e3?e+" m":e/1e3+" km",e/t)},_updateImperial:function(t){var e,n,i,o=3.2808399*t;o>5280?(n=this._getRoundNum(e=o/5280),this._updateScale(this._iScale,n+" mi",n/e)):(i=this._getRoundNum(o),this._updateScale(this._iScale,i+" ft",i/o))},_updateScale:function(t,e,n){t.style.width=Math.round(this.options.maxWidth*n)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),n=t/e;return e*(n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),ln=function(t){return new cn(t)},pn=on.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){d(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=ce("div","leaflet-control-attribution"),We(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var n=[];this.options.prefix&&n.push(this.options.prefix),t.length&&n.push(t.join(", ")),this._container.innerHTML=n.join(" | ")}}});en.mergeOptions({attributionControl:!0}),en.addInitHook((function(){this.options.attributionControl&&(new pn).addTo(this)}));var dn=function(t){return new pn(t)};on.Layers=sn,on.Zoom=un,on.Scale=cn,on.Attribution=pn,rn.layers=an,rn.zoom=hn,rn.scale=ln,rn.attribution=dn;var fn=T.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});fn.addTo=function(t,e){return t.addHandler(e,this),this};var mn,_n={Events:E},yn=Pt?"touchstart mousedown":"mousedown",vn={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},gn={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},bn=I.extend({options:{clickTolerance:3},initialize:function(t,e,n,i){d(this,i),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(ze(this._dragStartTarget,yn,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(bn._dragging===this&&this.finishDrag(),Ze(this._dragStartTarget,yn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!me(this._element,"leaflet-zoom-anim")&&!(bn._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(bn._dragging=this,this._preventOutline&&Te(this._element),ke(),te(),this._moving)))){this.fire("down");var e=t.touches?t.touches[0]:t,n=Ee(this._element);this._startPoint=new S(e.clientX,e.clientY),this._parentScale=Ie(n),ze(document,gn[t.type],this._onMove,this),ze(document,vn[t.type],this._onUp,this)}},_onMove:function(t){if(!t._simulated&&this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,n=new S(e.clientX,e.clientY)._subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)<this.options.clickTolerance||(n.x/=this._parentScale.x,n.y/=this._parentScale.y,He(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=Me(this._element).subtract(n),_e(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),_e(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,k(this._animRequest),this._lastEvent=t,this._animRequest=C(this._updatePosition,this,!0)))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),Pe(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){!t._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){for(var t in ye(document.body,"leaflet-dragging"),this._lastTarget&&(ye(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),gn)Ze(document,gn[t],this._onMove,this),Ze(document,vn[t],this._onUp,this);Ae(),ee(),this._moved&&this._moving&&(k(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,bn._dragging=!1}});function wn(t,e){if(!e||!t.length)return t.slice();var n=e*e;return t=Pn(t=Cn(t,n),n)}function xn(t,e,n){return Math.sqrt(En(t,e,n,!0))}function Ln(t,e,n){return En(t,e,n)}function Pn(t,e){var n=t.length,i=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(n);i[0]=i[n-1]=1,Mn(t,i,e,0,n-1);var o,r=[];for(o=0;o<n;o++)i[o]&&r.push(t[o]);return r}function Mn(t,e,n,i,o){var r,s,a,u=0;for(s=i+1;s<=o-1;s++)(a=En(t[s],t[i],t[o],!0))>u&&(r=s,u=a);u>n&&(e[r]=1,Mn(t,e,n,i,r),Mn(t,e,n,r,o))}function Cn(t,e){for(var n=[t[0]],i=1,o=0,r=t.length;i<r;i++)On(t[i],t[o])>e&&(n.push(t[i]),o=i);return o<r-1&&n.push(t[r-1]),n}function kn(t,e,n,i,o){var r,s,a,u=i?mn:Tn(t,n),h=Tn(e,n);for(mn=h;;){if(!(u|h))return[t,e];if(u&h)return!1;a=Tn(s=An(t,e,r=u||h,n,o),n),r===u?(t=s,u=a):(e=s,h=a)}}function An(t,e,n,i,o){var r,s,a=e.x-t.x,u=e.y-t.y,h=i.min,c=i.max;return 8&n?(r=t.x+a*(c.y-t.y)/u,s=c.y):4&n?(r=t.x+a*(h.y-t.y)/u,s=h.y):2&n?(r=c.x,s=t.y+u*(c.x-t.x)/a):1&n&&(r=h.x,s=t.y+u*(h.x-t.x)/a),new S(r,s,o)}function Tn(t,e){var n=0;return t.x<e.min.x?n|=1:t.x>e.max.x&&(n|=2),t.y<e.min.y?n|=4:t.y>e.max.y&&(n|=8),n}function On(t,e){var n=e.x-t.x,i=e.y-t.y;return n*n+i*i}function En(t,e,n,i){var o,r=e.x,s=e.y,a=n.x-r,u=n.y-s,h=a*a+u*u;return h>0&&((o=((t.x-r)*a+(t.y-s)*u)/h)>1?(r=n.x,s=n.y):o>0&&(r+=a*o,s+=u*o)),a=t.x-r,u=t.y-s,i?a*a+u*u:new S(r,s)}function In(t){return!y(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function Sn(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),In(t)}var zn={simplify:wn,pointToSegmentDistance:xn,closestPointOnSegment:Ln,clipSegment:kn,_getEdgeIntersection:An,_getBitCode:Tn,_sqClosestPointOnSegment:En,isFlat:In,_flat:Sn};function Bn(t,e,n){var i,o,r,s,a,u,h,c,l,p=[1,4,2,8];for(o=0,h=t.length;o<h;o++)t[o]._code=Tn(t[o],e);for(s=0;s<4;s++){for(c=p[s],i=[],o=0,r=(h=t.length)-1;o<h;r=o++)u=t[r],(a=t[o])._code&c?u._code&c||((l=An(u,a,c,e,n))._code=Tn(l,e),i.push(l)):(u._code&c&&((l=An(u,a,c,e,n))._code=Tn(l,e),i.push(l)),i.push(a));t=i}return t}var Zn={clipPolygon:Bn},Nn={project:function(t){return new S(t.lng,t.lat)},unproject:function(t){return new D(t.y,t.x)},bounds:new Z([-180,-90],[180,90])},Rn={R:6378137,R_MINOR:6356752.314245179,bounds:new Z([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,n=this.R,i=t.lat*e,o=this.R_MINOR/n,r=Math.sqrt(1-o*o),s=r*Math.sin(i),a=Math.tan(Math.PI/4-i/2)/Math.pow((1-s)/(1+s),r/2);return i=-n*Math.log(Math.max(a,1e-10)),new S(t.lng*e*n,i)},unproject:function(t){for(var e,n=180/Math.PI,i=this.R,o=this.R_MINOR/i,r=Math.sqrt(1-o*o),s=Math.exp(-t.y/i),a=Math.PI/2-2*Math.atan(s),u=0,h=.1;u<15&&Math.abs(h)>1e-7;u++)e=r*Math.sin(a),e=Math.pow((1-e)/(1+e),r/2),a+=h=Math.PI/2-2*Math.atan(s*e)-a;return new D(a*n,t.x*n/i)}},jn={LonLat:Nn,Mercator:Rn,SphericalMercator:q},Dn=n({},H,{code:"EPSG:3395",projection:Rn,transformation:function(){var t=.5/(Math.PI*Rn.R);return J(t,.5,-t,.5)}()}),Fn=n({},H,{code:"EPSG:4326",projection:Nn,transformation:J(1/180,1,-1/180,.5)}),Un=n({},W,{projection:Nn,transformation:J(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var n=e.lng-t.lng,i=e.lat-t.lat;return Math.sqrt(n*n+i*i)},infinite:!0});W.Earth=H,W.EPSG3395=Dn,W.EPSG3857=K,W.EPSG900913=Y,W.EPSG4326=Fn,W.Simple=Un;var Wn=I.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[s(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[s(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var n=this.getEvents();e.on(n,this),this.once("remove",(function(){e.off(n,this)}),this)}this.onAdd(e),this.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this})}}});en.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=s(t);return this._layers[e]||(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=s(t);return this._layers[e]?(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return!!t&&s(t)in this._layers},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},_addLayers:function(t){for(var e=0,n=(t=t?y(t)?t:[t]:[]).length;e<n;e++)this.addLayer(t[e])},_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[s(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=s(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,n=this._getZoomSpan();for(var i in this._zoomBoundLayers){var o=this._zoomBoundLayers[i].options;t=void 0===o.minZoom?t:Math.min(t,o.minZoom),e=void 0===o.maxZoom?e:Math.max(e,o.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Hn=Wn.extend({initialize:function(t,e){var n,i;if(d(this,e),this._layers={},t)for(n=0,i=t.length;n<i;n++)this.addLayer(t[n])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return!!t&&("number"==typeof t?t:this.getLayerId(t))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,n,i=Array.prototype.slice.call(arguments,1);for(e in this._layers)(n=this._layers[e])[t]&&n[t].apply(n,i);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return s(t)}}),Vn=function(t,e){return new Hn(t,e)},qn=Hn.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Hn.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),Hn.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new R;for(var e in this._layers){var n=this._layers[e];t.extend(n.getBounds?n.getBounds():n.getLatLng())}return t}}),Gn=function(t,e){return new qn(t,e)},Jn=T.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function(t){d(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var n=this._getIconUrl(t);if(!n){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var i=this._createImg(n,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(i,t),i},_setIconStyles:function(t,e){var n=this.options,i=n[e+"Size"];"number"==typeof i&&(i=[i,i]);var o=B(i),r=B("shadow"===e&&n.shadowAnchor||n.iconAnchor||o&&o.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(n.className||""),r&&(t.style.marginLeft=-r.x+"px",t.style.marginTop=-r.y+"px"),o&&(t.style.width=o.x+"px",t.style.height=o.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return kt&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function Kn(t){return new Jn(t)}var Yn=Jn.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return Yn.imagePath||(Yn.imagePath=this._detectIconPath()),(this.options.imagePath||Yn.imagePath)+Jn.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=ce("div","leaflet-default-icon-path",document.body),e=he(t,"background-image")||he(t,"backgroundImage");return document.body.removeChild(t),e=null===e||0!==e.indexOf("url")?"":e.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),Qn=fn.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new bn(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),_e(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&ye(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,n=e._map,i=this._marker.options.autoPanSpeed,o=this._marker.options.autoPanPadding,r=Me(e._icon),s=n.getPixelBounds(),a=n.getPixelOrigin(),u=N(s.min._subtract(a).add(o),s.max._subtract(a).subtract(o));if(!u.contains(r)){var h=B((Math.max(u.max.x,r.x)-u.max.x)/(s.max.x-u.max.x)-(Math.min(u.min.x,r.x)-u.min.x)/(s.min.x-u.min.x),(Math.max(u.max.y,r.y)-u.max.y)/(s.max.y-u.max.y)-(Math.min(u.min.y,r.y)-u.min.y)/(s.min.y-u.min.y)).multiplyBy(i);n.panBy(h,{animate:!1}),this._draggable._newPos._add(h),this._draggable._startPos._add(h),Pe(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=C(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(k(this._panRequest),this._panRequest=C(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,n=e._shadow,i=Me(e._icon),o=e._map.layerPointToLatLng(i);n&&Pe(n,i),e._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){k(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Xn=Wn.extend({options:{icon:new Yn,interactive:!0,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){d(this,e),this._latlng=F(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=F(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),n=t.icon.createIcon(this._icon),i=!1;n!==this._icon&&(this._icon&&this._removeIcon(),i=!0,t.title&&(n.title=t.title),"IMG"===n.tagName&&(n.alt=t.alt||"")),_e(n,e),t.keyboard&&(n.tabIndex="0"),this._icon=n,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var o=t.icon.createShadow(this._shadow),r=!1;o!==this._shadow&&(this._removeShadow(),r=!0),o&&(_e(o,e),o.alt=""),this._shadow=o,t.opacity<1&&this._updateOpacity(),i&&this.getPane().appendChild(this._icon),this._initInteraction(),o&&r&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),le(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&le(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&Pe(this._icon,t),this._shadow&&Pe(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(_e(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Qn)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Qn(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&be(this._icon,t),this._shadow&&be(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function $n(t,e){return new Xn(t,e)}var ti=Wn.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return d(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+this._renderer.options.tolerance}}),ei=ti.extend({options:{fill:!0,radius:10},initialize:function(t,e){d(this,e),this._latlng=F(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=F(t),this.redraw(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return ti.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,n=this._clickTolerance(),i=[t+n,e+n];this._pxBounds=new Z(this._point.subtract(i),this._point.add(i))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function ni(t,e){return new ei(t,e)}var ii=ei.extend({initialize:function(t,e,i){if("number"==typeof e&&(e=n({},i,{radius:e})),d(this,e),this._latlng=F(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new R(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:ti.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,n=this._map,i=n.options.crs;if(i.distance===H.distance){var o=Math.PI/180,r=this._mRadius/H.R/o,s=n.project([e+r,t]),a=n.project([e-r,t]),u=s.add(a).divideBy(2),h=n.unproject(u).lat,c=Math.acos((Math.cos(r*o)-Math.sin(e*o)*Math.sin(h*o))/(Math.cos(e*o)*Math.cos(h*o)))/o;(isNaN(c)||0===c)&&(c=r/Math.cos(Math.PI/180*e)),this._point=u.subtract(n.getPixelOrigin()),this._radius=isNaN(c)?0:u.x-n.project([h,t-c]).x,this._radiusY=u.y-s.y}else{var l=i.unproject(i.project(this._latlng).subtract([this._mRadius,0]));this._point=n.latLngToLayerPoint(this._latlng),this._radius=this._point.x-n.latLngToLayerPoint(l).x}this._updateBounds()}});function oi(t,e,n){return new ii(t,e,n)}var ri=ti.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){d(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e,n,i=1/0,o=null,r=En,s=0,a=this._parts.length;s<a;s++)for(var u=this._parts[s],h=1,c=u.length;h<c;h++){var l=r(t,e=u[h-1],n=u[h],!0);l<i&&(i=l,o=r(t,e,n))}return o&&(o.distance=Math.sqrt(i)),o},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,n,i,o,r,s,a=this._rings[0],u=a.length;if(!u)return null;for(t=0,e=0;t<u-1;t++)e+=a[t].distanceTo(a[t+1])/2;if(0===e)return this._map.layerPointToLatLng(a[0]);for(t=0,i=0;t<u-1;t++)if((i+=n=(o=a[t]).distanceTo(r=a[t+1]))>e)return this._map.layerPointToLatLng([r.x-(s=(i-e)/n)*(r.x-o.x),r.y-s*(r.y-o.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=F(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new R,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return In(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],n=In(t),i=0,o=t.length;i<o;i++)n?(e[i]=F(t[i]),this._bounds.extend(e[i])):e[i]=this._convertLatLngs(t[i]);return e},_project:function(){var t=new Z;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),e=new S(t,t);this._pxBounds=new Z([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)])},_projectLatlngs:function(t,e,n){var i,o,r=t.length;if(t[0]instanceof D){for(o=[],i=0;i<r;i++)o[i]=this._map.latLngToLayerPoint(t[i]),n.extend(o[i]);e.push(o)}else for(i=0;i<r;i++)this._projectLatlngs(t[i],e,n)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var e,n,i,o,r,s,a,u=this._parts;for(e=0,i=0,o=this._rings.length;e<o;e++)for(n=0,r=(a=this._rings[e]).length;n<r-1;n++)(s=kn(a[n],a[n+1],t,n,!0))&&(u[i]=u[i]||[],u[i].push(s[0]),s[1]===a[n+1]&&n!==r-2||(u[i].push(s[1]),i++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,n=0,i=t.length;n<i;n++)t[n]=wn(t[n],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var n,i,o,r,s,a,u=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(n=0,r=this._parts.length;n<r;n++)for(i=0,o=(s=(a=this._parts[n]).length)-1;i<s;o=i++)if((e||0!==i)&&xn(t,a[o],a[i])<=u)return!0;return!1}});function si(t,e){return new ri(t,e)}ri._flat=Sn;var ai=ri.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,n,i,o,r,s,a,u=this._rings[0],h=u.length;if(!h)return null;for(r=s=a=0,t=0,e=h-1;t<h;e=t++)s+=((n=u[t]).x+(i=u[e]).x)*(o=n.y*i.x-i.y*n.x),a+=(n.y+i.y)*o,r+=3*o;return this._map.layerPointToLatLng(0===r?u[0]:[s/r,a/r])},_convertLatLngs:function(t){var e=ri.prototype._convertLatLngs.call(this,t),n=e.length;return n>=2&&e[0]instanceof D&&e[0].equals(e[n-1])&&e.pop(),e},_setLatLngs:function(t){ri.prototype._setLatLngs.call(this,t),In(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return In(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,n=new S(e,e);if(t=new Z(t.min.subtract(n),t.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var i,o=0,r=this._rings.length;o<r;o++)(i=Bn(this._rings[o],t,!0)).length&&this._parts.push(i)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,n,i,o,r,s,a,u,h=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(o=0,a=this._parts.length;o<a;o++)for(r=0,s=(u=(e=this._parts[o]).length)-1;r<u;s=r++)(n=e[r]).y>t.y!=(i=e[s]).y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(h=!h);return h||ri.prototype._containsPoint.call(this,t,!0)}});function ui(t,e){return new ai(t,e)}var hi=qn.extend({initialize:function(t,e){d(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,i,o=y(t)?t:t.features;if(o){for(e=0,n=o.length;e<n;e++)((i=o[e]).geometries||i.geometry||i.features||i.coordinates)&&this.addData(i);return this}var r=this.options;if(r.filter&&!r.filter(t))return this;var s=ci(t,r);return s?(s.feature=yi(t),s.defaultOptions=s.options,this.resetStyle(s),r.onEachFeature&&r.onEachFeature(t,s),this.addLayer(s)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=n({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer((function(e){this._setLayerStyle(e,t)}),this)},_setLayerStyle:function(t,e){t.setStyle&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))}});function ci(t,e){var n,i,o,r,s="Feature"===t.type?t.geometry:t,a=s?s.coordinates:null,u=[],h=e&&e.pointToLayer,c=e&&e.coordsToLatLng||pi;if(!a&&!s)return null;switch(s.type){case"Point":return li(h,t,n=c(a),e);case"MultiPoint":for(o=0,r=a.length;o<r;o++)n=c(a[o]),u.push(li(h,t,n,e));return new qn(u);case"LineString":case"MultiLineString":return i=di(a,"LineString"===s.type?0:1,c),new ri(i,e);case"Polygon":case"MultiPolygon":return i=di(a,"Polygon"===s.type?1:2,c),new ai(i,e);case"GeometryCollection":for(o=0,r=s.geometries.length;o<r;o++){var l=ci({geometry:s.geometries[o],type:"Feature",properties:t.properties},e);l&&u.push(l)}return new qn(u);default:throw new Error("Invalid GeoJSON object.")}}function li(t,e,n,i){return t?t(e,n):new Xn(n,i&&i.markersInheritOptions&&i)}function pi(t){return new D(t[1],t[0],t[2])}function di(t,e,n){for(var i,o=[],r=0,s=t.length;r<s;r++)i=e?di(t[r],e-1,n):(n||pi)(t[r]),o.push(i);return o}function fi(t,e){return e="number"==typeof e?e:6,void 0!==t.alt?[c(t.lng,e),c(t.lat,e),c(t.alt,e)]:[c(t.lng,e),c(t.lat,e)]}function mi(t,e,n,i){for(var o=[],r=0,s=t.length;r<s;r++)o.push(e?mi(t[r],e-1,n,i):fi(t[r],i));return!e&&n&&o.push(o[0]),o}function _i(t,e){return t.feature?n({},t.feature,{geometry:e}):yi(e)}function yi(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var vi={toGeoJSON:function(t){return _i(this,{type:"Point",coordinates:fi(this.getLatLng(),t)})}};function gi(t,e){return new hi(t,e)}Xn.include(vi),ii.include(vi),ei.include(vi),ri.include({toGeoJSON:function(t){var e=!In(this._latlngs);return _i(this,{type:(e?"Multi":"")+"LineString",coordinates:mi(this._latlngs,e?1:0,!1,t)})}}),ai.include({toGeoJSON:function(t){var e=!In(this._latlngs),n=e&&!In(this._latlngs[0]),i=mi(this._latlngs,n?2:e?1:0,!0,t);return e||(i=[i]),_i(this,{type:(n?"Multi":"")+"Polygon",coordinates:i})}}),Hn.include({toMultiPoint:function(t){var e=[];return this.eachLayer((function(n){e.push(n.toGeoJSON(t).geometry.coordinates)})),_i(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var n="GeometryCollection"===e,i=[];return this.eachLayer((function(e){if(e.toGeoJSON){var o=e.toGeoJSON(t);if(n)i.push(o.geometry);else{var r=yi(o);"FeatureCollection"===r.type?i.push.apply(i,r.features):i.push(r)}}})),n?_i(this,{geometries:i,type:"GeometryCollection"}):{type:"FeatureCollection",features:i}}});var bi=gi,wi=Wn.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,n){this._url=t,this._bounds=j(e),d(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(_e(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){le(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&&de(this._image),this},bringToBack:function(){return this._map&&fe(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=j(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:ce("img");_e(e,"leaflet-image-layer"),this._zoomAnimated&&_e(e,"leaflet-zoom-animated"),this.options.className&&_e(e,this.options.className),e.onselectstart=h,e.onmousemove=h,e.onload=o(this.fire,this,"load"),e.onerror=o(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;Le(this._image,n,e)},_reset:function(){var t=this._image,e=new Z(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=e.getSize();Pe(t,e.min),t.style.width=n.x+"px",t.style.height=n.y+"px"},_updateOpacity:function(){be(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&null!=this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)}}),xi=function(t,e,n){return new wi(t,e,n)},Li=wi.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:ce("video");if(_e(e,"leaflet-image-layer"),this._zoomAnimated&&_e(e,"leaflet-zoom-animated"),this.options.className&&_e(e,this.options.className),e.onselectstart=h,e.onmousemove=h,e.onloadeddata=o(this.fire,this,"load"),t){for(var n=e.getElementsByTagName("source"),i=[],r=0;r<n.length;r++)i.push(n[r].src);this._url=n.length>0?i:[e.src]}else{y(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted;for(var s=0;s<this._url.length;s++){var a=ce("source");a.src=this._url[s],e.appendChild(a)}}}});function Pi(t,e,n){return new Li(t,e,n)}var Mi=wi.extend({_initImage:function(){var t=this._image=this._url;_e(t,"leaflet-image-layer"),this._zoomAnimated&&_e(t,"leaflet-zoom-animated"),this.options.className&&_e(t,this.options.className),t.onselectstart=h,t.onmousemove=h}});function Ci(t,e,n){return new Mi(t,e,n)}var ki=Wn.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,e){d(this,t),this._source=e},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&be(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&be(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(be(this._container,0),this._removeTimeout=setTimeout(o(le,void 0,this._container),200)):le(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=F(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&&de(this._container),this},bringToBack:function(){return this._map&&fe(this._container),this},_prepareOpen:function(t,e,n){if(e instanceof Wn||(n=e,e=t),e instanceof qn)for(var i in t._layers){e=t._layers[i];break}if(!n)if(e.getCenter)n=e.getCenter();else{if(!e.getLatLng)throw new Error("Unable to get source layer LatLng.");n=e.getLatLng()}return this._source=e,this.update(),n},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=B(this.options.offset),n=this._getAnchor();this._zoomAnimated?Pe(this._container,t.add(n)):e=e.add(t).add(n);var i=this._containerBottom=-e.y,o=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=i+"px",this._container.style.left=o+"px"}},_getAnchor:function(){return[0,0]}}),Ai=ki.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return t.openPopup(this),this},onAdd:function(t){ki.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof ti||this._source.on("preclick",Fe))},onRemove:function(t){ki.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof ti||this._source.off("preclick",Fe))},getEvents:function(){var t=ki.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t="leaflet-popup",e=this._container=ce("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=ce("div",t+"-content-wrapper",e);if(this._contentNode=ce("div",t+"-content",n),We(e),Ue(this._contentNode),ze(e,"contextmenu",Fe),this._tipContainer=ce("div",t+"-tip-container",e),this._tip=ce("div",t+"-tip",this._tipContainer),this.options.closeButton){var i=this._closeButton=ce("a",t+"-close-button",e);i.href="#close",i.innerHTML="×",ze(i,"click",this._onCloseButtonClick,this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var n=t.offsetWidth;n=Math.min(n,this.options.maxWidth),n=Math.max(n,this.options.minWidth),e.width=n+1+"px",e.whiteSpace="",e.height="";var i=this.options.maxHeight,o="leaflet-popup-scrolled";i&&t.offsetHeight>i?(e.height=i+"px",_e(t,o)):ye(t,o),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),n=this._getAnchor();Pe(this._container,e.add(n))},_adjustPan:function(){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var t=this._map,e=parseInt(he(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,i=this._containerWidth,o=new S(this._containerLeft,-n-this._containerBottom);o._add(Me(this._container));var r=t.layerPointToContainerPoint(o),s=B(this.options.autoPanPadding),a=B(this.options.autoPanPaddingTopLeft||s),u=B(this.options.autoPanPaddingBottomRight||s),h=t.getSize(),c=0,l=0;r.x+i+u.x>h.x&&(c=r.x+i-h.x+u.x),r.x-c-a.x<0&&(c=r.x-a.x),r.y+n+u.y>h.y&&(l=r.y+n-h.y+u.y),r.y-l-a.y<0&&(l=r.y-a.y),(c||l)&&t.fire("autopanstart").panBy([c,l])}},_onCloseButtonClick:function(t){this._close(),Ve(t)},_getAnchor:function(){return B(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Ti=function(t,e){return new Ai(t,e)};en.mergeOptions({closePopupOnClick:!0}),en.include({openPopup:function(t,e,n){return t instanceof Ai||(t=new Ai(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),Wn.include({bindPopup:function(t,e){return t instanceof Ai?(d(t,e),this._popup=t,t._source=this):(this._popup&&!e||(this._popup=new Ai(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,e){return this._popup&&this._map&&(e=this._popup._prepareOpen(this,t,e),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e=t.layer||t.target;this._popup&&this._map&&(Ve(t),e instanceof ti?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var Oi=ki.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){ki.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){ki.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=ki.prototype.getEvents.call(this);return Pt&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){this._contentNode=this._container=ce("div","leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,n,i=this._map,o=this._container,r=i.latLngToContainerPoint(i.getCenter()),s=i.layerPointToContainerPoint(t),a=this.options.direction,u=o.offsetWidth,h=o.offsetHeight,c=B(this.options.offset),l=this._getAnchor();"top"===a?(e=u/2,n=h):"bottom"===a?(e=u/2,n=0):"center"===a?(e=u/2,n=h/2):"right"===a?(e=0,n=h/2):"left"===a?(e=u,n=h/2):s.x<r.x?(a="right",e=0,n=h/2):(a="left",e=u+2*(c.x+l.x),n=h/2),t=t.subtract(B(e,n,!0)).add(c).add(l),ye(o,"leaflet-tooltip-right"),ye(o,"leaflet-tooltip-left"),ye(o,"leaflet-tooltip-top"),ye(o,"leaflet-tooltip-bottom"),_e(o,"leaflet-tooltip-"+a),Pe(o,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&be(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return B(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),Ei=function(t,e){return new Oi(t,e)};en.include({openTooltip:function(t,e,n){return t instanceof Oi||(t=new Oi(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),Wn.include({bindTooltip:function(t,e){return t instanceof Oi?(d(t,e),this._tooltip=t,t._source=this):(this._tooltip&&!e||(this._tooltip=new Oi(e,this)),this._tooltip.setContent(t)),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(t||!this._tooltipHandlersAdded){var e=t?"off":"on",n={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?n.add=this._openTooltip:(n.mouseover=this._openTooltip,n.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),Pt&&(n.click=this._openTooltip)),this[e](n),this._tooltipHandlersAdded=!t}},openTooltip:function(t,e){return this._tooltip&&this._map&&(e=this._tooltip._prepareOpen(this,t,e),this._map.openTooltip(this._tooltip,e),this._tooltip.options.interactive&&this._tooltip._container&&(_e(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&&(ye(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){this._tooltip&&this._map&&this.openTooltip(t.layer||t.target,this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var e,n,i=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),n=this._map.containerPointToLayerPoint(e),i=this._map.layerPointToLatLng(n)),this._tooltip.setLatLng(i)}});var Ii=Jn.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),n=this.options;if(n.html instanceof Element?(pe(e),e.appendChild(n.html)):e.innerHTML=!1!==n.html?n.html:"",n.bgPos){var i=B(n.bgPos);e.style.backgroundPosition=-i.x+"px "+-i.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});function Si(t){return new Ii(t)}Jn.Default=Yn;var zi=Wn.extend({options:{tileSize:256,opacity:1,updateWhenIdle:gt,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){d(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),le(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(de(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(fe(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=a(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof S?t:new S(t,t)},_updateZIndex:function(){this._container&&null!=this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,n=this.getPane().children,i=-t(-1/0,1/0),o=0,r=n.length;o<r;o++)e=n[o].style.zIndex,n[o]!==this._container&&e&&(i=t(i,+e));isFinite(i)&&(this.options.zIndex=i+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!et){be(this._container,this.options.opacity);var t=+new Date,e=!1,n=!1;for(var i in this._tiles){var o=this._tiles[i];if(o.current&&o.loaded){var r=Math.min(1,(t-o.loaded)/200);be(o.el,r),r<1?e=!0:(o.active?n=!0:this._onOpaqueTile(o),o.active=!0)}}n&&!this._noPrune&&this._pruneTiles(),e&&(k(this._fadeFrame),this._fadeFrame=C(this._updateOpacity,this))}},_onOpaqueTile:h,_initContainer:function(){this._container||(this._container=ce("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var n in this._levels)n=Number(n),this._levels[n].el.children.length||n===t?(this._levels[n].el.style.zIndex=e-Math.abs(t-n),this._onUpdateLevel(n)):(le(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var i=this._levels[t],o=this._map;return i||((i=this._levels[t]={}).el=ce("div","leaflet-tile-container leaflet-zoom-animated",this._container),i.el.style.zIndex=e,i.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),i.zoom=t,this._setZoomTransform(i,o.getCenter(),o.getZoom()),h(i.el.offsetWidth),this._onCreateLevel(i)),this._level=i,i}},_onUpdateLevel:h,_onRemoveLevel:h,_onCreateLevel:h,_pruneTiles:function(){if(this._map){var t,e,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)if((e=this._tiles[t]).current&&!e.active){var i=e.coords;this._retainParent(i.x,i.y,i.z,i.z-5)||this._retainChildren(i.x,i.y,i.z,i.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)le(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,n,i){var o=Math.floor(t/2),r=Math.floor(e/2),s=n-1,a=new S(+o,+r);a.z=+s;var u=this._tileCoordsToKey(a),h=this._tiles[u];return h&&h.active?(h.retain=!0,!0):(h&&h.loaded&&(h.retain=!0),s>i&&this._retainParent(o,r,s,i))},_retainChildren:function(t,e,n,i){for(var o=2*t;o<2*t+2;o++)for(var r=2*e;r<2*e+2;r++){var s=new S(o,r);s.z=n+1;var a=this._tileCoordsToKey(s),u=this._tiles[a];u&&u.active?u.retain=!0:(u&&u.loaded&&(u.retain=!0),n+1<i&&this._retainChildren(o,r,n+1,i))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,n,i){var o=Math.round(e);o=void 0!==this.options.maxZoom&&o>this.options.maxZoom||void 0!==this.options.minZoom&&o<this.options.minZoom?void 0:this._clampZoom(o),i&&!(this.options.updateWhenZooming&&o!==this._tileZoom)||(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==o&&this._update(t),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var n in this._levels)this._setZoomTransform(this._levels[n],t,e)},_setZoomTransform:function(t,e,n){var i=this._map.getZoomScale(n,t.zoom),o=t.origin.multiplyBy(i).subtract(this._map._getNewPixelOrigin(e,n)).round();vt?Le(t.el,o,i):Pe(t.el,o)},_resetGrid:function(){var t=this._map,e=t.options.crs,n=this._tileSize=this.getTileSize(),i=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],i).x/n.x),Math.ceil(t.project([0,e.wrapLng[1]],i).x/n.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],i).y/n.x),Math.ceil(t.project([e.wrapLat[1],0],i).y/n.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,n=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),i=e.getZoomScale(n,this._tileZoom),o=e.project(t,this._tileZoom).floor(),r=e.getSize().divideBy(2*i);return new Z(o.subtract(r),o.add(r))},_update:function(t){var e=this._map;if(e){var n=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var i=this._getTiledPixelBounds(t),o=this._pxBoundsToTileRange(i),r=o.getCenter(),s=[],a=this.options.keepBuffer,u=new Z(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 h in this._tiles){var c=this._tiles[h].coords;c.z===this._tileZoom&&u.contains(new S(c.x,c.y))||(this._tiles[h].current=!1)}if(Math.abs(n-this._tileZoom)>1)this._setView(t,n);else{for(var l=o.min.y;l<=o.max.y;l++)for(var p=o.min.x;p<=o.max.x;p++){var d=new S(p,l);if(d.z=this._tileZoom,this._isValidTile(d)){var f=this._tiles[this._tileCoordsToKey(d)];f?f.current=!0:s.push(d)}}if(s.sort((function(t,e){return t.distanceTo(r)-e.distanceTo(r)})),0!==s.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(p=0;p<s.length;p++)this._addTile(s[p],m);this._level.el.appendChild(m)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var n=this._globalTileRange;if(!e.wrapLng&&(t.x<n.min.x||t.x>n.max.x)||!e.wrapLat&&(t.y<n.min.y||t.y>n.max.y))return!1}if(!this.options.bounds)return!0;var i=this._tileCoordsToBounds(t);return j(this.options.bounds).overlaps(i)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,n=this.getTileSize(),i=t.scaleBy(n),o=i.add(n);return[e.unproject(i,t.z),e.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),n=new R(e[0],e[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),n=new S(+e[0],+e[1]);return n.z=+e[2],n},_removeTile:function(t){var e=this._tiles[t];e&&(le(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){_e(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=h,t.onmousemove=h,et&&this.options.opacity<1&&be(t,this.options.opacity),ot&&!rt&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var n=this._getTilePos(t),i=this._tileCoordsToKey(t),r=this.createTile(this._wrapCoords(t),o(this._tileReady,this,t));this._initTile(r),this.createTile.length<2&&C(o(this._tileReady,this,t,null,r)),Pe(r,n),this._tiles[i]={el:r,coords:t,current:!0},e.appendChild(r),this.fire("tileloadstart",{tile:r,coords:t})},_tileReady:function(t,e,n){e&&this.fire("tileerror",{error:e,tile:n,coords:t});var i=this._tileCoordsToKey(t);(n=this._tiles[i])&&(n.loaded=+new Date,this._map._fadeAnimated?(be(n.el,0),k(this._fadeFrame),this._fadeFrame=C(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(_e(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),et||!this._map._fadeAnimated?C(this._pruneTiles,this):setTimeout(o(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new S(this._wrapX?u(t.x,this._wrapX):t.x,this._wrapY?u(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new Z(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function Bi(t){return new zi(t)}var Zi=zi.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,(e=d(this,e)).detectRetina&&kt&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),ot||this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var n=document.createElement("img");return ze(n,"load",o(this._tileOnLoad,this,e,n)),ze(n,"error",o(this._tileOnError,this,e,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),n.alt="",n.setAttribute("role","presentation"),n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:kt?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return _(this._url,n(e,this.options))},_tileOnLoad:function(t,e){et?setTimeout(o(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,n){var i=this.options.errorTileUrl;i&&e.getAttribute("src")!==i&&(e.src=i),t(n,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom;return this.options.zoomReverse&&(t=this.options.maxZoom-t),t+this.options.zoomOffset},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=h,e.onerror=h,e.complete||(e.src=g,le(e),delete this._tiles[t]))},_removeTile:function(t){var e=this._tiles[t];if(e)return at||e.el.setAttribute("src",g),zi.prototype._removeTile.call(this,t)},_tileReady:function(t,e,n){if(this._map&&(!n||n.getAttribute("src")!==g))return zi.prototype._tileReady.call(this,t,e,n)}});function Ni(t,e){return new Zi(t,e)}var Ri=Zi.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var i=n({},this.defaultWmsParams);for(var o in e)o in this.options||(i[o]=e[o]);var r=(e=d(this,e)).detectRetina&&kt?2:1,s=this.getTileSize();i.width=s.x*r,i.height=s.y*r,this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version),this.wmsParams[this._wmsVersion>=1.3?"crs":"srs"]=this._crs.code,Zi.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),n=this._crs,i=N(n.project(e[0]),n.project(e[1])),o=i.min,r=i.max,s=(this._wmsVersion>=1.3&&this._crs===Fn?[o.y,o.x,r.y,r.x]:[o.x,o.y,r.x,r.y]).join(","),a=Zi.prototype.getTileUrl.call(this,t);return a+f(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+s},setParams:function(t,e){return n(this.wmsParams,t),e||this.redraw(),this}});function ji(t,e){return new Ri(t,e)}Zi.WMS=Ri,Ni.wms=ji;var Di=Wn.extend({options:{padding:.1,tolerance:0},initialize:function(t){d(this,t),s(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&_e(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var n=this._map.getZoomScale(e,this._zoom),i=Me(this._container),o=this._map.getSize().multiplyBy(.5+this.options.padding),r=this._map.project(this._center,e),s=this._map.project(t,e).subtract(r),a=o.multiplyBy(-n).add(i).add(o).subtract(s);vt?Le(this._container,a,n):Pe(this._container,a)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),n=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new Z(n,n.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Fi=Di.extend({getEvents:function(){var t=Di.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Di.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");ze(t,"mousemove",this._onMouseMove,this),ze(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),ze(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){k(this._redrawRequest),delete this._ctx,le(this._container),Ze(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){Di.prototype._update.call(this);var t=this._bounds,e=this._container,n=t.getSize(),i=kt?2:1;Pe(e,t.min),e.width=i*n.x,e.height=i*n.y,e.style.width=n.x+"px",e.style.height=n.y+"px",kt&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){Di.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[s(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,n=e.next,i=e.prev;n?n.prev=i:this._drawLast=i,i?i.next=n:this._drawFirst=n,delete t._order,delete this._layers[s(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var e,n,i=t.options.dashArray.split(/[, ]+/),o=[];for(n=0;n<i.length;n++){if(e=Number(i[n]),isNaN(e))return;o.push(e)}t.options._dashArray=o}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||C(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new Z,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var n=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,n.x,n.y),this._ctx.clip()}this._drawing=!0;for(var i=this._drawFirst;i;i=i.next)t=i.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var n,i,o,r,s=t._parts,a=s.length,u=this._ctx;if(a){for(u.beginPath(),n=0;n<a;n++){for(i=0,o=s[n].length;i<o;i++)u[i?"lineTo":"moveTo"]((r=s[n][i]).x,r.y);e&&u.closePath()}this._fillStroke(u,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,n=this._ctx,i=Math.max(Math.round(t._radius),1),o=(Math.max(Math.round(t._radiusY),1)||i)/i;1!==o&&(n.save(),n.scale(1,o)),n.beginPath(),n.arc(e.x,e.y/o,i,0,2*Math.PI,!1),1!==o&&n.restore(),this._fillStroke(n,t)}},_fillStroke:function(t,e){var n=e.options;n.fill&&(t.globalAlpha=n.fillOpacity,t.fillStyle=n.fillColor||n.color,t.fill(n.fillRule||"evenodd")),n.stroke&&0!==n.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=n.opacity,t.lineWidth=n.weight,t.strokeStyle=n.color,t.lineCap=n.lineCap,t.lineJoin=n.lineJoin,t.stroke())},_onClick:function(t){for(var e,n,i=this._map.mouseEventToLayerPoint(t),o=this._drawFirst;o;o=o.next)(e=o.layer).options.interactive&&e._containsPoint(i)&&("click"!==t.type&&"preclick"===t.type||!this._map._draggableMoved(e))&&(n=e);n&&(Ye(t),this._fireEvent([n],t))},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(ye(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,e){if(!this._mouseHoverThrottled){for(var n,i,r=this._drawFirst;r;r=r.next)(n=r.layer).options.interactive&&n._containsPoint(e)&&(i=n);i!==this._hoveredLayer&&(this._handleMouseOut(t),i&&(_e(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseover"),this._hoveredLayer=i)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(o((function(){this._mouseHoverThrottled=!1}),this),32)}},_fireEvent:function(t,e,n){this._map._fireDOMEvent(e,n||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var n=e.next,i=e.prev;n&&(n.prev=i,i?i.next=n:n&&(this._drawFirst=n),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t))}},_bringToBack:function(t){var e=t._order;if(e){var n=e.next,i=e.prev;i&&(i.next=n,n?n.prev=i:i&&(this._drawLast=i),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}});function Ui(t){return Tt?new Fi(t):null}var Wi=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">')}}}(),Hi={_initContainer:function(){this._container=ce("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Di.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Wi("shape");_e(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Wi("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[s(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;le(e),t.removeInteractiveTarget(e),delete this._layers[s(t)]},_updateStyle:function(t){var e=t._stroke,n=t._fill,i=t.options,o=t._container;o.stroked=!!i.stroke,o.filled=!!i.fill,i.stroke?(e||(e=t._stroke=Wi("stroke")),o.appendChild(e),e.weight=i.weight+"px",e.color=i.color,e.opacity=i.opacity,e.dashStyle=i.dashArray?y(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):"",e.endcap=i.lineCap.replace("butt","flat"),e.joinstyle=i.lineJoin):e&&(o.removeChild(e),t._stroke=null),i.fill?(n||(n=t._fill=Wi("fill")),o.appendChild(n),n.color=i.fillColor||i.color,n.opacity=i.fillOpacity):n&&(o.removeChild(n),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),n=Math.round(t._radius),i=Math.round(t._radiusY||n);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+n+","+i+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){de(t._container)},_bringToBack:function(t){fe(t._container)}},Vi=Et?Wi:Q,qi=Di.extend({getEvents:function(){var t=Di.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=Vi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Vi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){le(this._container),Ze(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){Di.prototype._update.call(this);var t=this._bounds,e=t.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,n.setAttribute("width",e.x),n.setAttribute("height",e.y)),Pe(n,t.min),n.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=Vi("path");t.options.className&&_e(e,t.options.className),t.options.interactive&&_e(e,"leaflet-interactive"),this._updateStyle(t),this._layers[s(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){le(t._path),t.removeInteractiveTarget(t._path),delete this._layers[s(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,n=t.options;e&&(n.stroke?(e.setAttribute("stroke",n.color),e.setAttribute("stroke-opacity",n.opacity),e.setAttribute("stroke-width",n.weight),e.setAttribute("stroke-linecap",n.lineCap),e.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?e.setAttribute("stroke-dasharray",n.dashArray):e.removeAttribute("stroke-dasharray"),n.dashOffset?e.setAttribute("stroke-dashoffset",n.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),n.fill?(e.setAttribute("fill",n.fillColor||n.color),e.setAttribute("fill-opacity",n.fillOpacity),e.setAttribute("fill-rule",n.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,X(t._parts,e))},_updateCircle:function(t){var e=t._point,n=Math.max(Math.round(t._radius),1),i="a"+n+","+(Math.max(Math.round(t._radiusY),1)||n)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(e.x-n)+","+e.y+i+2*n+",0 "+i+2*-n+",0 ";this._setPath(t,o)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){de(t._path)},_bringToBack:function(t){fe(t._path)}});function Gi(t){return Ot||Et?new qi(t):null}Et&&qi.include(Hi),en.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&Ui(t)||Gi(t)}});var Ji=ai.extend({initialize:function(t,e){ai.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=j(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function Ki(t,e){return new Ji(t,e)}qi.create=Vi,qi.pointsToPath=X,hi.geometryToLayer=ci,hi.coordsToLatLng=pi,hi.coordsToLatLngs=di,hi.latLngToCoords=fi,hi.latLngsToCoords=mi,hi.getFeature=_i,hi.asFeature=yi,en.mergeOptions({boxZoom:!0});var Yi=fn.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){ze(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Ze(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){le(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),te(),ke(),this._startPoint=this._map.mouseEventToContainerPoint(t),ze(document,{contextmenu:Ve,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=ce("div","leaflet-zoom-box",this._container),_e(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new Z(this._point,this._startPoint),n=e.getSize();Pe(this._box,e.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(le(this._box),ye(this._container,"leaflet-crosshair")),ee(),Ae(),Ze(document,{contextmenu:Ve,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(o(this._resetState,this),0);var e=new R(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});en.addInitHook("addHandler","boxZoom",Yi),en.mergeOptions({doubleClickZoom:!0});var Qi=fn.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,n=e.getZoom(),i=e.options.zoomDelta,o=t.originalEvent.shiftKey?n-i:n+i;"center"===e.options.doubleClickZoom?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});en.addInitHook("addHandler","doubleClickZoom",Qi),en.mergeOptions({dragging:!0,inertia:!rt,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Xi=fn.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new bn(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}_e(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){ye(this._map._container,"leaflet-grab"),ye(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=j(this._map.options.maxBounds);this._offsetLimit=N(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),n=this._initialWorldOffset,i=this._draggable._newPos.x,o=(i-e+n)%t+e-n,r=(i+e+n)%t-e-n,s=Math.abs(o+n)<Math.abs(r+n)?o:r;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=s},_onDragEnd:function(t){var e=this._map,n=e.options,i=!n.inertia||this._times.length<2;if(e.fire("dragend",t),i)e.fire("moveend");else{this._prunePositions(+new Date);var o=this._lastPos.subtract(this._positions[0]),r=n.easeLinearity,s=o.multiplyBy(r/((this._lastTime-this._times[0])/1e3)),a=s.distanceTo([0,0]),u=Math.min(n.inertiaMaxSpeed,a),h=s.multiplyBy(u/a),c=u/(n.inertiaDeceleration*r),l=h.multiplyBy(-c/2).round();l.x||l.y?(l=e._limitOffset(l,e.options.maxBounds),C((function(){e.panBy(l,{duration:c,easeLinearity:r,noMoveStart:!0,animate:!0})}))):e.fire("moveend")}}});en.addInitHook("addHandler","dragging",Xi),en.mergeOptions({keyboard:!0,keyboardPanDelta:80});var $i=fn.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),ze(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Ze(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,e=document.documentElement,n=t.scrollTop||e.scrollTop,i=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(i,n)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,n,i=this._panKeys={},o=this.keyCodes;for(e=0,n=o.left.length;e<n;e++)i[o.left[e]]=[-1*t,0];for(e=0,n=o.right.length;e<n;e++)i[o.right[e]]=[t,0];for(e=0,n=o.down.length;e<n;e++)i[o.down[e]]=[0,t];for(e=0,n=o.up.length;e<n;e++)i[o.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,n,i=this._zoomKeys={},o=this.keyCodes;for(e=0,n=o.zoomIn.length;e<n;e++)i[o.zoomIn[e]]=t;for(e=0,n=o.zoomOut.length;e<n;e++)i[o.zoomOut[e]]=-t},_addHooks:function(){ze(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Ze(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,n=t.keyCode,i=this._map;if(n in this._panKeys)i._panAnim&&i._panAnim._inProgress||(e=this._panKeys[n],t.shiftKey&&(e=B(e).multiplyBy(3)),i.panBy(e),i.options.maxBounds&&i.panInsideBounds(i.options.maxBounds));else if(n in this._zoomKeys)i.setZoom(i.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[n]);else{if(27!==n||!i._popup||!i._popup.options.closeOnEscapeKey)return;i.closePopup()}Ve(t)}}});en.addInitHook("addHandler","keyboard",$i),en.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var to=fn.extend({addHooks:function(){ze(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Ze(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=Je(t),n=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var i=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(o(this._performZoom,this),i),Ve(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),n=this._map.options.zoomSnap||0;t._stop();var i=4*Math.log(2/(1+Math.exp(-Math.abs(this._delta/(4*this._map.options.wheelPxPerZoomLevel)))))/Math.LN2,o=n?Math.ceil(i/n)*n:i,r=t._limitZoom(e+(this._delta>0?o:-o))-e;this._delta=0,this._startTime=null,r&&("center"===t.options.scrollWheelZoom?t.setZoom(e+r):t.setZoomAround(this._lastMousePos,e+r))}});en.addInitHook("addHandler","scrollWheelZoom",to),en.mergeOptions({tap:!0,tapTolerance:15});var eo=fn.extend({addHooks:function(){ze(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Ze(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(He(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var e=t.touches[0],n=e.target;this._startPos=this._newPos=new S(e.clientX,e.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&_e(n,"leaflet-active"),this._holdTimeout=setTimeout(o((function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))}),this),1e3),this._simulateEvent("mousedown",e),ze(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),Ze(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var e=t.changedTouches[0],n=e.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&ye(n,"leaflet-active"),this._simulateEvent("mouseup",e),this._isTapValid()&&this._simulateEvent("click",e)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new S(e.clientX,e.clientY),this._simulateEvent("mousemove",e)},_simulateEvent:function(t,e){var n=document.createEvent("MouseEvents");n._simulated=!0,e.target._simulatedClick=!0,n.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(n)}});!Pt||Lt&&!lt||en.addInitHook("addHandler","tap",eo),en.mergeOptions({touchZoom:Pt&&!rt,bounceAtZoomLimits:!0});var no=fn.extend({addHooks:function(){_e(this._map._container,"leaflet-touch-zoom"),ze(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){ye(this._map._container,"leaflet-touch-zoom"),Ze(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(n.add(i)._divideBy(2))),this._startDist=n.distanceTo(i),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),ze(document,"touchmove",this._onTouchMove,this),ze(document,"touchend",this._onTouchEnd,this),He(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]),r=n.distanceTo(i)/this._startDist;if(this._zoom=e.getScaleZoom(r,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&r<1||this._zoom>e.getMaxZoom()&&r>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===r)return}else{var s=n._add(i)._divideBy(2)._subtract(this._centerPoint);if(1===r&&0===s.x&&0===s.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(s),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),k(this._animRequest);var a=o(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=C(a,this,!0),He(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,k(this._animRequest),Ze(document,"touchmove",this._onTouchMove,this),Ze(document,"touchend",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});en.addInitHook("addHandler","touchZoom",no),en.BoxZoom=Yi,en.DoubleClickZoom=Qi,en.Drag=Xi,en.Keyboard=$i,en.ScrollWheelZoom=to,en.Tap=eo,en.TouchZoom=no,t.version=e,t.Control=on,t.control=rn,t.Browser=St,t.Evented=I,t.Mixin=_n,t.Util=A,t.Class=T,t.Handler=fn,t.extend=n,t.bind=o,t.stamp=s,t.setOptions=d,t.DomEvent=$e,t.DomUtil=Se,t.PosAnimation=tn,t.Draggable=bn,t.LineUtil=zn,t.PolyUtil=Zn,t.Point=S,t.point=B,t.Bounds=Z,t.bounds=N,t.Transformation=G,t.transformation=J,t.Projection=jn,t.LatLng=D,t.latLng=F,t.LatLngBounds=R,t.latLngBounds=j,t.CRS=W,t.GeoJSON=hi,t.geoJSON=gi,t.geoJson=bi,t.Layer=Wn,t.LayerGroup=Hn,t.layerGroup=Vn,t.FeatureGroup=qn,t.featureGroup=Gn,t.ImageOverlay=wi,t.imageOverlay=xi,t.VideoOverlay=Li,t.videoOverlay=Pi,t.SVGOverlay=Mi,t.svgOverlay=Ci,t.DivOverlay=ki,t.Popup=Ai,t.popup=Ti,t.Tooltip=Oi,t.tooltip=Ei,t.Icon=Jn,t.icon=Kn,t.DivIcon=Ii,t.divIcon=Si,t.Marker=Xn,t.marker=$n,t.TileLayer=Zi,t.tileLayer=Ni,t.GridLayer=zi,t.gridLayer=Bi,t.SVG=qi,t.svg=Gi,t.Renderer=Di,t.Canvas=Fi,t.canvas=Ui,t.Path=ti,t.CircleMarker=ei,t.circleMarker=ni,t.Circle=ii,t.circle=oi,t.Polyline=ri,t.polyline=si,t.Polygon=ai,t.polygon=ui,t.Rectangle=Ji,t.rectangle=Ki,t.Map=en,t.map=nn;var io=window.L;t.noConflict=function(){return window.L=io,this},window.L=t})(c.exports);var l,p={exports:{}},d="object"==typeof Reflect?Reflect:null,f=d&&"function"==typeof d.apply?d.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};l=d&&"function"==typeof d.ownKeys?d.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var m=Number.isNaN||function(t){return t!=t};function _(){_.init.call(this)}p.exports=_,p.exports.once=function(t,e){return new Promise((function(n,i){function o(n){t.removeListener(e,r),i(n)}function r(){"function"==typeof t.removeListener&&t.removeListener("error",o),n([].slice.call(arguments))}k(t,e,r,{once:!0}),"error"!==e&&function(t,e,n){"function"==typeof t.on&&k(t,"error",e,n)}(t,o,{once:!0})}))},_.EventEmitter=_,_.prototype._events=void 0,_.prototype._eventsCount=0,_.prototype._maxListeners=void 0;var y=10;function v(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function g(t){return void 0===t._maxListeners?_.defaultMaxListeners:t._maxListeners}function b(t,e,n,i){var o,r,s,a;if(v(n),void 0===(r=t._events)?(r=t._events=Object.create(null),t._eventsCount=0):(void 0!==r.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),r=t._events),s=r[e]),void 0===s)s=r[e]=n,++t._eventsCount;else if("function"==typeof s?s=r[e]=i?[n,s]:[s,n]:i?s.unshift(n):s.push(n),(o=g(t))>0&&s.length>o&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=s.length,a=u,console&&console.warn&&console.warn(a)}return t}function w(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function x(t,e,n){var i={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},o=w.bind(i);return o.listener=n,i.wrapFn=o,o}function P(t,e,n){var i=t._events;if(void 0===i)return[];var o=i[e];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(o):C(o,o.length)}function M(t){var e=this._events;if(void 0!==e){var n=e[t];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function C(t,e){for(var n=new Array(e),i=0;i<e;++i)n[i]=t[i];return n}function k(t,e,n,i){if("function"==typeof t.on)i.once?t.once(e,n):t.on(e,n);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function o(r){i.once&&t.removeEventListener(e,o),n(r)}))}}Object.defineProperty(_,"defaultMaxListeners",{enumerable:!0,get:function(){return y},set:function(t){if("number"!=typeof t||t<0||m(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");y=t}}),_.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},_.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||m(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},_.prototype.getMaxListeners=function(){return g(this)},_.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var i="error"===t,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var r;if(e.length>0&&(r=e[0]),r instanceof Error)throw r;var s=new Error("Unhandled error."+(r?" ("+r.message+")":""));throw s.context=r,s}var a=o[t];if(void 0===a)return!1;if("function"==typeof a)f(a,this,e);else{var u=a.length,h=C(a,u);for(n=0;n<u;++n)f(h[n],this,e)}return!0},_.prototype.on=_.prototype.addListener=function(t,e){return b(this,t,e,!1)},_.prototype.prependListener=function(t,e){return b(this,t,e,!0)},_.prototype.once=function(t,e){return v(e),this.on(t,x(this,t,e)),this},_.prototype.prependOnceListener=function(t,e){return v(e),this.prependListener(t,x(this,t,e)),this},_.prototype.removeListener=function(t,e){var n,i,o,r,s;if(v(e),void 0===(i=this._events))return this;if(void 0===(n=i[t]))return this;if(n===e||n.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(o=-1,r=n.length-1;r>=0;r--)if(n[r]===e||n[r].listener===e){s=n[r].listener,o=r;break}if(o<0)return this;0===o?n.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(n,o),1===n.length&&(i[t]=n[0]),void 0!==i.removeListener&&this.emit("removeListener",t,s||e)}return this},_.prototype.off=_.prototype.removeListener,_.prototype.removeAllListeners=function(t){var e,n,i;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[t]),this;if(0===arguments.length){var o,r=Object.keys(n);for(i=0;i<r.length;++i)"removeListener"!==(o=r[i])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(void 0!==e)for(i=e.length-1;i>=0;i--)this.removeListener(t,e[i]);return this},_.prototype.listeners=function(t){return P(this,t,!0)},_.prototype.rawListeners=function(t){return P(this,t,!1)},_.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):M.call(t,e)},_.prototype.listenerCount=M,_.prototype.eventNames=function(){return this._eventsCount>0?l(this._events):[]};var A=function(t){function n(){var e=t.call(this)||this;return e.name="CancelError",Object.setPrototypeOf(e,n.prototype),e}return e(n,t),n}(Error),T=function(){function t(t){void 0===t&&(t={}),this.options=t,this._promises=new Map}return Object.defineProperty(t.prototype,"isLoaded",{get:function(){return this._promises.size>0},enumerable:!1,configurable:!0}),t.prototype.remove=function(t){this._promises.has(t)&&(this._promises.delete(t),this._onStop())},t.prototype.get=function(t){return this._promises.get(t)},t.prototype.add=function(t,e){var n=this,i=e||t,o=this._promises.get(i);return this.options.onStart&&!this.isLoaded&&this.options.onStart(),o||(this._promises.set(i,t),t.finally((function(){n.remove(i)})),t)},t.prototype.abort=function(){this.isLoaded&&(this._promises.forEach((function(t){t.cancel&&t.cancel()})),this._promises.clear(),this._onStop())},t.prototype.waitFunc=function(t,e){void 0===e&&(e="");var n=this.get(e=e||t.name);return n||this.add(t(),e)},t.prototype.WaitForMe=function(t){void 0===t&&(t="");var e=this.get.bind(this),n=this.add.bind(this);return function(i,o,r){var s=r.value;return t=t||o,r.value=function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];var r=e(t);return r||n(s.apply(this,i),t)},r}},t.prototype.GetOrCreateDecorator=function(t){return void 0===t&&(t=""),this.WaitForMe(t)},t.prototype._onStop=function(){this.options.onStop&&!this.isLoaded&&this.options.onStop()},t}(),O=function(t){function n(){var e=t.call(this)||this;return e.name="TimeoutError",Object.setPrototypeOf(e,n.prototype),e}return e(n,t),n}(Error),E=function(t,e,n,i){try{t(n(i))}catch(o){e(o)}},I=0,S=function(){function t(e,n){var i=this;this.id=I++,this._isCanceled=!1,this._isPending=!0,this._cancelHandlers=[],this._children=[],this._cancelPromise=new Promise((function(t,e){i._setCanceledCallback=function(e){return t(e||new A)}}));var o=[this._cancelPromise,new Promise((function(n,o){return e((function(e){e instanceof t?i.attach(e):i._isPending=!1,n(e)}),(function(t){i._isPending=!1,o(t)}),(function(t){if(!i._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");i._cancelHandlers.push(t)}))}))];n&&o.push(new Promise((function(t,e){setTimeout((function(){if(i._isPending)try{i.cancel()}finally{e(new O)}}),n)}))),this._promise=Promise.race(o)}return t.createControl=function(t){return new T(t)},t.resolve=function(e){return new t((function(t){return t(e)}))},t.reject=function(e){return new t((function(t,n){return n(e)}))},t.all=function(e){var n=this;return new t((function(t,n){Promise.all(e).then(t).catch(n)})).catch((function(t){if(t instanceof n.CancelError)for(var i=0,o=e;i<o.length;i++){var r=o[i];"cancel"in r&&r.cancel()}throw t}))},t.prototype.attach=function(t){this._isCanceled?t.cancel():this._children.push(t)},t.prototype.then=function(e,n){var i=this,o=new t((function(t,o){if(i._promise){var r=function(e){n?E(t,o,n,e):o(e)};i._promise.then((function(n){i._isCanceled?r(n):e?E(t,o,e,n):t(n)}),r)}}));return o._parentPromise=this,this._children.push(o),o},t.prototype.catch=function(t){return this._isCanceled&&t&&t(new A),this.then(void 0,t)},t.prototype.finally=function(t){return this._promise?this._promise.finally(t):Promise.reject(this._isCanceled?new A:t)},t.prototype.cancel=function(){if(this._isCanceled||!this._isPending)return this;this._isCanceled=!0;var t=this._getTopParent();if(t&&t.cancel(),this._children&&this._children.forEach((function(t){return t.cancel()})),this._isPending){if(this._cancelHandlers.length)try{for(var e=0,n=this._cancelHandlers;e<n.length;e++){(0,n[e])()}}catch(i){}this._setCanceledCallback&&this._setCanceledCallback()}return this._destroy(),this},t.prototype._getTopParent=function(){for(var t=this._parentPromise,e=!!t;e;)e=!(!t||!t._parentPromise)&&!!(t=t._parentPromise);return t},t.prototype._destroy=function(){this._setCanceledCallback=void 0,this._cancelPromise=void 0,this._promise=void 0},t.CancelError=A,t.TimeoutError=O,t.PromiseControl=T,t}();function z(t,e,n){void 0===n&&(n={});var i=function(t,e){for(void 0===e&&(e=[]);null!==t;t=Object.getPrototypeOf(t))for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++)-1==e.indexOf(n[i])&&e.push(n[i]);return e}(t.prototype),o=void 0===n.replace||n.replace;e.forEach((function(e){Object.getOwnPropertyNames(e.prototype).forEach((function(n){var r=-1!==i.indexOf(n);if(!o&&!r||o){var s=Object.getOwnPropertyDescriptor(e.prototype,n);s&&Object.defineProperty(t.prototype,n,s)}}))}))}function B(t){return null!=t}function Z(t){return"string"==typeof t?!!t:B(t)}function N(t,e,n){void 0===n&&(n=!1);var i=t,o=e,r=Array.isArray(o),s=r&&[]||{};return r&&Array.isArray(o)?n?(s=s.concat(i=i||[]),o.forEach((function(t,e){void 0===s[e]?s[e]=t:"object"==typeof t?s[e]=N(i[e],t,n):-1===i.indexOf(t)&&s.push(t)}))):s=o:(i&&"object"==typeof i&&Object.keys(i).forEach((function(t){s[t]=i[t]})),Object.keys(o).forEach((function(t){s[t]="object"==typeof o[t]&&o[t]&&"object"==typeof i[t]&&"object"==typeof o[t]?N(i[t],o[t],n):o[t]}))),s}function R(t){!t.lngLat&&t.latLng&&(t.lngLat=[t.latLng.lng,t.latLng.lat]);return t}function j(t,e){var n;function i(){for(var o=this,r=[],s=0;s<arguments.length;s++)r[s]=arguments[s];i.clear(),n=setTimeout((function(){n=null,t.apply(o,r)}),e)}return void 0===e&&(e=10),i.clear=function(){n&&(clearTimeout(n),n=null)},i}Object.setPrototypeOf(S.prototype,Promise.prototype);var D=6371;function F(t){return{type:"Polygon",coordinates:[U(t)]}}function U(t){var e=[t[0],t[1]];return[e,[t[2],t[1]],[t[2],t[3]],[t[0],t[3]],e]}var W=Math.PI/180,H=180/Math.PI;function V(t,e){e=e>85.06?85.06:e<-85.06?-85.06:e;var n=20037508.34*t/180,i=Math.log(Math.tan((90+e)*Math.PI/360))/(Math.PI/180);return[n,i=20037508.34*i/180]}function q(t,e,n,i){if(t instanceof Array)return e instanceof Array&&e.sort().join("")===t.sort().join("");if(t instanceof Date)return e instanceof Date&&""+t==""+e;if(t instanceof Function){if(!(e instanceof Function))return!1}else if(t instanceof Object)return e instanceof Object&&(t===n?e===i:G(t,e));return t===e}function G(t,e){var n=Object.keys(t).sort(),i=Object.keys(e).sort();if(n.length!==i.length)return!1;if(n.join("")!==i.join(""))return!1;for(var o=0;o<n.length;o++){if(!q(t[n[o]],e[i[o]],t,e))return!1}return!0}function J(t){var e={};return Object.keys(t).forEach((function(n){t[n]instanceof Array||t[n]!==Object(t[n])?void 0!==t[n]&&(e[n]=t[n]):e[n]=J(t[n])})),e}function K(t){return"[object Object]"===Object.prototype.toString.call(t)}function Y(t){return t.replace(/([^:]\/)\/+/g,"$1")}function Q(t){return"[object Object]"===Object.prototype.toString.call(t)}function X(t){return"function"==typeof t}function $(t){return function(e,n){var i=e.map((function(t){return t()}));return t(i,n)}}var tt={"!":$((function(t){return!t[0]})),"!=":$((function(t){return t[0]!==t[1]})),"<":$((function(t){return t[0]<t[1]})),"<=":$((function(t){return t[0]<=t[1]})),"==":$((function(t){return t[0]===t[1]})),">":$((function(t){return t[0]>t[1]})),">=":$((function(t){return t[0]>=t[1]})),coalesce:function(t){for(var e=0;e<t.length;e++){var n=t[e]();if(null!=n)return n}return null},all:function(t){for(var e=0;e<t.length;e++){if(!t[e]())return!1}return!0},any:function(t){for(var e=0;e<t.length;e++){if(t[e]())return!0}return!1},case:function(t){if(t.length<2)throw new Error('The "case" function requires at least a condition and a corresponding output.');if(t.length%2==0)throw new Error("Missing a fallback value or unmatched condition-output pair.");for(var e=0;e<t.length-1;e+=2){var n=t[e](),i=t[e+1]();if(n)return i}return(0,t[t.length-1])()},match:function(t){for(var e=t[0],n=t.slice(1),i=e(),o=n.splice(-1,n.length%2)[0],r=0;r<n.length-1;r+=2){if(n[r]()===i)return n[r+1]()}return o()}},et={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function nt(t){if("string"==typeof(i=t)&&/^#([A-Fa-f0-9]{3}){1,2}$/.test(i))return it(t);if("string"==typeof(n=t)&&n in et)return function(t){return it(et[t])}(t);if(function(t){return"string"==typeof t&&/^rgb(a?)\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)(?:\s*,\s*([01](?:\.\d+)?))?\s*\)$/.test(t)}(t))return function(t){var e,n=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)$/;if(e=t.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/))return[parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3],10)];if(e=t.match(n))return[parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3],10),parseFloat(e[4])];throw new Error("The '".concat(t,"' Is not valid rgb"))}(t);if("object"==typeof(e=t)&&null!==e&&"r"in e&&"g"in e&&"b"in e&&(!("a"in e)||"number"==typeof e.a&&e.a>=0&&e.a<=1))return function(t){var e=t.a;return a([t.r,t.g,t.b],void 0!==e?[e]:[],!0)}(t);var e,n,i;throw new Error("The '".concat(t,"' cannot be converted to color"))}function it(t){var e;if(e=/^#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])$/.exec(t))return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)];if(e=/^#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])$/.exec(t))return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16),parseInt(e[4]+e[4],16)/255];if(e=/^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/.exec(t))return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)];if(e=/^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/.exec(t))return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16),parseInt(e[4],16)/255];throw new Error("The '".concat(t,"' Is not valid hex"))}function ot(t,e,n,i,o){if("number"==typeof n&&"number"==typeof o)return n+(t-e)/(i-e)*(o-n);try{var r=nt(n),s=nt(o);return function(t){return"rgb(".concat(t.join(","),")")}(r.map((function(n,o){return Math.ceil(ot(t,e,n,i,s[o]))})))}catch(a){console.log(a)}throw new Error("Unsupported output type for linear interpolation.")}var rt={step:function(t){var e=t[0],n=t[1],i=t.slice(2),o=e();if("number"!=typeof o)return n();for(var r=0;r<i.length-2;r+=2){var s=i[r](),a=i[r+1](),u=i[r+2]();if(o>=s&&o<u)return a}return o>=i[i.length-2]()?i[i.length-1]():n()},interpolate:function(t){var e=t[0],n=t[1],i=t.slice(2);if(i.length<2)throw new Error("At least two stops are required");if(i.length<2||i.length%2!=0)throw new Error("Invalid stops provided.");var o=n();if("number"!=typeof o)throw new Error("Input must be a number.");for(var r=e(),s=0;s<i.length-2;s+=2){var a=i[s](),u=i[s+1](),h=i[s+2](),c=i[s+3]();if(o>=a&&o<=h&&"linear"===r[0])return ot(o,a,u,h,c)}throw new Error("Invalid interpolation type.")}};var st={get:$((function(t,e){var n=t[0],i=t[1]||e;return i&&"object"==typeof i&&n in i?i[n]:null})),length:$((function(t){var e=t[0];if("string"==typeof e||Array.isArray(e))return e.length})),at:$((function(t){return t[1][t[0]]})),has:$((function(t,e){var n=t[1]||e;return!(!n||"object"!=typeof n||!(t[0]in n))})),in:$((function(t){var e=t[0],n=t[1];if("string"==typeof n)return n.includes(String(e));if(Array.isArray(n))return n.includes(e);throw new Error("Invalid input type for 'in'. Expected string or array, got ".concat(typeof n,"."))})),"index-of":$((function(t){var e=t[0],n=t[1],i=t[2];if("string"==typeof n)return n.indexOf(String(e),i);if(Array.isArray(n))return n.indexOf(e,i);throw new Error("Invalid input type for 'index-of'. Expected string or array, got ".concat(typeof n,"."))})),slice:$((function(t){var e=t[0],n=t[1],i=t[2];if("string"==typeof e)return e.slice(n,i);if(Array.isArray(e))return e.slice(n,i);throw new Error("Invalid input type for 'slice'. Expected string or array, got ".concat(typeof e,"."))}))},at={"+":$((function(t){return t.reduce((function(t,e){return t+e}),0)})),"-":$((function(t){return t.reduce((function(t,e){return t-e}))})),"*":$((function(t){return t.reduce((function(t,e){return t*e}),1)})),"/":$((function(t){return t.reduce((function(t,e){return t/e}))})),"%":$((function(t){return t[0]%t[1]})),"^":$((function(t){return Math.pow(t[0],t[1])})),abs:$((function(t){return Math.abs(t[0])})),acos:$((function(t){return Math.acos(t[0])})),asin:$((function(t){return Math.asin(t[0])})),atan:$((function(t){return Math.atan(t[0])})),ceil:$((function(t){return Math.ceil(t[0])})),cos:$((function(t){return Math.cos(t[0])})),e:function(){return Math.E},floor:$((function(t){return Math.floor(t[0])})),ln:$((function(t){return Math.log(t[0])})),ln2:function(){return Math.LN2},log10:$((function(t){return Math.log10(t[0])})),log2:$((function(t){return Math.log2(t[0])})),max:$((function(t){return Math.max.apply(Math,t)})),min:$((function(t){return Math.min.apply(Math,t)})),pi:function(){return Math.PI},round:$((function(t){return Math.round(t[0])})),sin:$((function(t){return Math.sin(t[0])})),sqrt:$((function(t){return Math.sqrt(t[0])})),tan:$((function(t){return Math.tan(t[0])}))},ut={concat:$((function(t){return t.reduce((function(t,e){return String(t)+String(e)}),"")})),downcase:$((function(t){return String(t[0]).toLowerCase()})),upcase:$((function(t){return String(t[0]).toUpperCase()}))},ht=function(t,e,n){try{var i=t(e,n);if(void 0!==i)return i}catch(o){}};function ct(t){return function(e,n){for(var i=0,o=e;i<o.length;i++){var r=ht(t,o[i],n);if(void 0!==r)return r}throw new Error("Received a mismatched type")}}var lt={array:$((function(t){var e,n=t[0],i=t[1],o=t[2],r=void 0,s=void 0;if("string"==typeof n&&["string","number","boolean"].includes(n)?(r=n,"number"==typeof i?(s=i,e=o):e=i):Array.isArray(n)&&(e=n),!Array.isArray(e))throw new Error("Expected an array");if(r&&!e.every((function(t){return typeof t===r})))throw new Error("Expected all items in array to be of type ".concat(r));if(s&&e.length!==s)throw new Error("Expected array of length ".concat(s));return e})),boolean:$(ct((function(t){return"boolean"==typeof t?t:void 0}))),literal:$((function(t){return t[0]})),number:$(ct((function(t){return"number"==typeof t?t:void 0}))),object:$(ct((function(t){return null===t||"object"!=typeof t||Array.isArray(t)?void 0:t}))),string:$(ct((function(t){return"string"==typeof t?t:void 0}))),"to-boolean":$(ct(Boolean)),"to-number":$(ct(Number)),"to-string":$(ct(String)),typeof:$((function(t){return function(t){if(null===t)return"null";switch(typeof t){case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"object":if(Array.isArray(t)){var e="value";return t.every((function(t){return"number"==typeof t}))?e="number":t.every((function(t){return"string"==typeof t}))?e="string":t.every((function(t){return"boolean"==typeof t}))&&(e="boolean"),"array<".concat(e,", ").concat(t.length,">")}return"object";default:return"undefined"}}(t[0])}))};function pt(t){if(Array.isArray(t)){var e=t[0],n=t.slice(1);return"string"==typeof e&&"literal"!==e&&e in dt&&n.length>0}return!1}var dt=n(n(n(n(n(n({},at),lt),ut),st),tt),rt);function ft(t,e){void 0===e&&(e={});var n=t[0],i=t.slice(1),o=dt[n];if(o)return o(i.map((function(t){return function(){return pt(t)?ft(t,e):t}})),e);throw new Error('Expression "'.concat(n,'" is not supported.'))}function mt(t){return function(e){var n=e.properties;return!!n&&ft(t,n)}}var _t=["iconSize","iconAnchor"];function yt(t,e,n){if((e=String(e))===(t=String(t)))return!0;if(n&&e.toUpperCase()===t.toUpperCase())return!0;var i,o="^".concat((i=e,i.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")),"$").replace(/%/g,".*").replace("_",".");return null!==new RegExp(o,n?"i":"").exec(t)}var vt={gt:function(t,e){return t>e},lt:function(t,e){return t<e},ge:function(t,e){return t>=e},le:function(t,e){return t<=e},eq:function(t,e){return t===e},ne:function(t,e){return t!==e},in:function(t,e){return-1!==e.indexOf(t)},notin:function(t,e){return-1===e.indexOf(t)},like:function(t,e){return yt(t,e)},ilike:function(t,e){return yt(t,e,!0)}};function gt(t){return 3===t.length&&"string"==typeof t[0]&&"string"==typeof t[1]}function bt(t,e){var n="string"==typeof e[0]?e[0]:"all",i=function(e){if(gt(e)){var n=e[0],i=e[1],o=e[2],r=vt[i];if(r){if(("like"===i||"ilike"===i)&&"string"==typeof n){var s="",a=n.replace(/^%?(\w+)%?$/,(function(e,i){return s=t[i],n.replace(i,o)}));return r(s,a)}return r(t[n],o)}return!1}return bt(t,e)},o=e.filter((function(t){return Array.isArray(t)}));return"any"===n?o.some(i):o.every(i)}function wt(t){for(var e={},i=[],o=0,r=t;o<r.length;o++){var s=r[o];s&&(Array.isArray(s)?i.push(s):e=s)}return function(t){var o=i.find((function(e){return function(t,e){var i=n({},t.properties);return!!i&&(i.$id=t.id,bt(i,e))}(t,e[0])}));return o?n(n({},e),o[1]):e}}function xt(t){var e=t.paint,i=t.defaultPaint,o=function(t){var e=!1,i={};for(var o in t)if(-1===_t.indexOf(o)){var r=o,s=t[r];pt(s)&&(e=!0,i[r]=mt(s))}if(e)return function(e){var o={};for(var r in i)o[r]=i[r](e);return n(n({},t),o)}}(e);if(o){var r=function(t){return Pt({paint:o(t),defaultPaint:i})};return r.paint=Lt({paint:e,defaultPaint:i}),r}return Lt({paint:e,defaultPaint:i})}function Lt(t){var e,i=t.paint,o=n({},t.defaultPaint);return(o=n(n({},o),i)).fill=null===(e=o.fill)||void 0===e||e,o.stroke=void 0!==o.stroke?o.stroke:!o.fill||!(!o.strokeColor&&!o.strokeOpacity),o}function Pt(t){var e=t.paint,i=t.defaultPaint,o=t.getPaintFunctions;if(!e)throw new Error("paint is empty");var r=n({},i);if(X(e)){var s=function(t){var n=Pt({paint:e(t),defaultPaint:i,getPaintFunctions:o});return n.type=e.type,n};return s.type=e.type,s}if(function(t){return!!Array.isArray(t)}(e))return function(t){return Pt({paint:wt(e)(t),defaultPaint:i,getPaintFunctions:o})};if("get-paint"===e.type){var a=function(t,e){if("function"==typeof t.from)return t.from(t.options);if("string"==typeof t.from&&e){var n=e[t.from];if(n)return n(t.options)}}(e,o);a&&(r=Pt({paint:a,defaultPaint:i,getPaintFunctions:o}))}else{if("icon"===e.type)return e;r=xt({paint:e,defaultPaint:i})}return X(r)||("color"in r&&(r.strokeColor||(r.strokeColor=r.color),r.fillColor||(r.fillColor=r.color)),"opacity"in r&&(void 0===r.strokeOpacity&&(r.strokeOpacity=r.opacity),void 0===r.fillOpacity&&(r.fillOpacity=r.opacity))),r}var Mt=function(){this.backspace=8,this.tab=9,this.enter=13,this.shift=16,this.ctrl=17,this.alt=18,this["pause/break"]=19,this.caps_lock=20,this.escape=27,this.page_up=33,this.page_down=34,this.end=35,this.home=36,this.left_arrow=37,this.up_arrow=38,this.right_arrow=39,this.down_arrow=40,this.insert=45,this.delete=46,this.left_window_key=91,this.right_window_key=92,this.select_key=93,this.numpad_0=96,this.numpad_1=97,this.numpad_2=98,this.numpad_3=99,this.numpad_4=100,this.numpad_5=101,this.numpad_6=102,this.numpad_7=103,this.numpad_8=104,this.numpad_9=105,this.multiply=106,this.add=107,this.subtract=109,this.decimal_point=110,this.divide=111,this.f1=112,this.f2=113,this.f3=114,this.f4=115,this.f5=116,this.f6=117,this.f7=118,this.f8=119,this.f9=120,this.f10=121,this.f11=122,this.f12=123,this.num_lock=144,this.scroll_lock=145,this["semi-colon"]=186,this.equal_sign=187,this[","]=188,this["-"]=189,this["."]=190,this["/"]=191,this["`"]=192,this["["]=219,this["\\"]=220,this["]"]=221,this["'"]=222},Ct=function(){function t(){this.keyCodeAlias=new Mt,this.keys={},this._windowOnFocus=this.windowOnFocus.bind(this),this._keysPressed=this.keysPressed.bind(this),this._keysReleased=this.keysReleased.bind(this),this.addKeyboardEventsListener()}return t.prototype.pressed=function(t){var e=this.keyCodeAlias[t];return!!e&&this.keys[e]},t.prototype.addKeyboardEventsListener=function(){"undefined"!=typeof window&&(window.addEventListener("focus",this._windowOnFocus,!1),window.addEventListener("keydown",this._keysPressed,!1),window.addEventListener("keyup",this._keysReleased,!1))},t.prototype.removeKeyboardEventsListener=function(){"undefined"!=typeof window&&(window.removeEventListener("focus",this._windowOnFocus,!1),window.removeEventListener("keydown",this._keysPressed,!1),window.removeEventListener("keyup",this._keysReleased,!1))},t.prototype.keysPressed=function(t){t.stopPropagation(),this.keys[t.keyCode]||(this.keys[t.keyCode]=!0)},t.prototype.keysReleased=function(t){t.stopPropagation(),this.keys[t.keyCode]=!1},t.prototype.windowOnFocus=function(){this.keys={}},t}(),kt=function(){function t(t,e){this.webMap=t,e&&(e.value&&this.setValue(e.value),e.name&&(this.name=e.name),e.event&&(this.event=e.event))}return t.prototype.getValue=function(){return this.value},t.prototype.setValue=function(t){this.value=t},t}(),At=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="center",e.event="moveend",e}return e(n,t),n.prototype.getValue=function(){return this.webMap.getCenter()},n.prototype.setValue=function(t){this.webMap.setCenter(t)},n.prototype.toString=function(t){var e=t.map((function(t){return t.toFixed(5)}));return e[0]+"_"+e[1]},n.prototype.parse=function(t){return t.split("_").map(Number)},n}(kt),Tt=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="zoom",e.event="zoomend",e}return e(n,t),n.prototype.getValue=function(){var t=this.webMap.getZoom();return void 0!==t?Math.round(t):void 0},n.prototype.setValue=function(t){this.webMap.setZoom(t)},n.prototype.toString=function(t){return String(t)},n.prototype.parse=function(t){return Number(t)},n}(kt);var Ot=0,Et={minZoom:0,maxZoom:22,paint:{color:"#0000ff",opacity:.4,strokeOpacity:1,stroke:!0,radius:8,weight:1},selectedPaint:{color:"#00008b",opacity:.4,strokeOpacity:1,stroke:!0,radius:12,weight:1},create:!0},It=function(){function t(e){this.options=Et,this.emitter=new p.exports.EventEmitter,this.keys=t.keys,this.runtimeParams=[],this.getPaintFunctions=t.getPaintFunctions,this.mapState=[At,Tt],this.id=Ot++,this._initMapState={},this._mapState=[],this._eventsStatus={},this._mapEvents={},this.mapAdapter=e.mapAdapter,this._starterKits=e.starterKits||[],e&&(this.options=N(Et||{},e)),this.options.runtimeParams&&(this.runtimeParams=this.options.runtimeParams),this._addEventsListeners(),this.options.tileJson&&this._setTileJsonOptions(this.options.tileJson),this.options.create&&this.create()}return t.prototype.getId=function(){return this.id},t.prototype.create=function(){return o(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return this.getEventStatus("create")?[3,3]:[4,this._setInitMapState(this.mapState)];case 1:return t.sent(),[4,this._setupMap()];case 2:t.sent(),this._emitStatusEvent("create",this),t.label=3;case 3:return[2,this]}}))}))},t.prototype.setRuntimeParams=function(t){this.runtimeParams.push(t)},t.prototype.destroy=function(){this._removeEventListeners(),function(t){for(var e in t)delete t[e]}(this._emitStatusEvent),this.mapAdapter.destroy&&this.mapAdapter.destroy()},t.prototype.getState=function(){var t={};return this._mapState.forEach((function(e){t[e.name]=e.getValue()})),t},t.prototype.getRuntimeParams=function(){var t=this,e={};return this._mapState.forEach((function(n){for(var i=0,o=t.runtimeParams;i<o.length;i++){var r=o[i].get(n.name);if(void 0!==r){e[n.name]=n.parse(r);break}}})),e},t.prototype.getContainer=function(){if(this.mapAdapter.getContainer)return this.mapAdapter.getContainer();if(this.options.target){if(this.options.target instanceof HTMLElement)return this.options.target;if("string"==typeof this.options.target){var t=document.getElementById(this.options.target);if(t)return t}}},t.prototype.setCursor=function(t){this.mapAdapter.setCursor&&this.mapAdapter.setCursor(t)},t.prototype.getCursor=function(){if(this.mapAdapter.getCursor)return this.mapAdapter.getCursor();var t=this.getContainer();return t?t.style.cursor:void 0},t.prototype.setCenter=function(t){return this.mapAdapter.setCenter(t),this},t.prototype.getCenter=function(){return this.mapAdapter.getCenter()},t.prototype.getBounds=function(){if(this.mapAdapter.getBounds)return this.mapAdapter.getBounds()},t.prototype.getBoundsPolygon=function(){var t=this.getBounds();if(t)return{type:"Feature",properties:{},geometry:F(t)}},t.prototype.setZoom=function(t){return this.mapAdapter.setZoom(t),this},t.prototype.getZoom=function(){var t=this.mapAdapter.getZoom();if("number"==typeof t)return t},t.prototype.zoomIn=function(){if(this.mapAdapter.zoomIn)this.mapAdapter.zoomIn();else{var t=this.getZoom();if(void 0!==t)this.setZoom(t+1)}},t.prototype.zoomOut=function(){if(this.mapAdapter.zoomOut)this.mapAdapter.zoomOut();else{var t=this.getZoom();if(void 0!==t)this.setZoom(t-1)}},t.prototype.setView=function(t,e){if(Array.isArray(t)){var n=t;this.mapAdapter.setView&&n&&B(e)?this.mapAdapter.setView(n,e):(n&&this.mapAdapter.setCenter(n),B(e)&&this.mapAdapter.setZoom(e))}else{this.mapAdapter.setView&&this.mapAdapter.setView(t)}},t.prototype.fitBounds=function(t,e){return t.every((function(t){return B(t)}))&&(t[1]<-85.06&&(t[1]=-85.06),t[3]>85.06&&(t[3]=85.06),this.mapAdapter.fitBounds(t,e)),this},t.prototype.getEventStatus=function(t){var e=this._eventsStatus[t];return null!=e&&e},t.prototype.onLoad=function(t){var e=this;return void 0===t&&(t="create"),new Promise((function(n){e.getEventStatus(t)?n(e):e.emitter.once(t,(function(){n(e)}))}))},t.prototype.onMapLoad=function(t){var e=this;return new Promise((function(n){var i,o=function(){var i=e.mapAdapter;t&&t(i),i&&n(i)},r=null===(i=e.mapAdapter.isLoaded)||void 0===i||i;e.mapAdapter.map&&r?o():e.mapAdapter.emitter.once("create",(function(){o()}))}))},t.prototype.getLayerAdapters=function(){return this.mapAdapter.layerAdapters},t.prototype.getLayerAdapter=function(t){return this.mapAdapter.layerAdapters[t]},t.prototype.locate=function(t,e){if(this.mapAdapter&&this.mapAdapter.locate)return this.mapAdapter.locate(t,e);return{stop:function(){return{}}}},t.prototype.stopGetCoordFromMapClick=function(){this._coordFromMapClickPromise&&this._coordFromMapClickPromise.cancel()},t.prototype.getCoordFromMapClick=function(){var t=this;return this._coordFromMapClickPromise?this.getCoordFromMapClick():(this._coordFromMapClickPromise=new S((function(e,n,i){var o=t.getCursor()||"grab";t._removeEventListeners({include:["click"]}),t.setCursor("crosshair");var r=function(){t.setCursor(o),t._addEventsListeners({include:["click"]}),t.mapAdapter.emitter.off("click",s),t._coordFromMapClickPromise=void 0},s=function(t){r(),R(t),e(t.lngLat)};t.mapAdapter.emitter.once("click",s),i(r)})),this._coordFromMapClickPromise)},t.prototype._emitStatusEvent=function(t,e){var n=t;this._eventsStatus[n]=!0,this.emitter.emit(n,e)},t.prototype._addLayerProviders=function(){return o(this,void 0,void 0,(function(){return r(this,(function(t){return[2]}))}))},t.prototype._onLoadSync=function(){return o(this,void 0,void 0,(function(){return r(this,(function(t){return[2]}))}))},t.prototype._setupMap=function(){return o(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:if(!this.mapAdapter)throw new Error("WebMap `mapAdapter` option is not set");return[4,this.mapAdapter.create(this.options)];case 1:return t.sent(),this._zoomToInitialExtent(),[4,this._addLayerProviders()];case 2:return t.sent(),[4,this._onLoadSync()];case 3:return t.sent(),this._emitStatusEvent("build-map",this.mapAdapter),[2,this]}}))}))},t.prototype._setTileJsonOptions=function(t){t.center&&(this.options.center=t.center),t.bounds&&(this.options.bounds=t.bounds),B(t.maxzoom)&&(this.options.zoom=t.maxzoom),B(t.minzoom)&&(this.options.zoom=t.minzoom),B(t.maxzoom)&&B(t.minzoom)&&(this.options.zoom=(t.maxzoom+t.minzoom)/2)},t.prototype._zoomToInitialExtent=function(){var t,e=(t=this.options).center,n=t.zoom,i=t.bounds;this._extent?this.fitBounds(this._extent):e&&n?this.setView(e,n):i&&this.fitBounds(i)},t.prototype._setInitMapState=function(t){for(var e=0,n=t;e<n.length;e++){var i=new(0,n[e])(this);this._mapState.push(i);for(var o=0,r=this.runtimeParams;o<r.length;o++){var s=r[o].get(i.name);if(void 0!==s){var a=i.parse(s);this._initMapState[i.name]=a,Object.defineProperty(this.options,i.name,{value:a,configurable:!0,enumerable:!0});break}}}},t.prototype._addEventsListeners=function(t){var e=this,n=["preclick","click","zoomstart","zoom","zoomend","movestart","move","moveend","mousemove","mouseout","mouseover"];t&&t.include&&(n=n.filter((function(e){return t.include.includes(e)}))),n.forEach((function(t){e._mapEvents[t]=function(n){if(e.runtimeParams.length){var i=e._mapState.find((function(e){return e.event===t}));if(i){var o=i.toString(i.getValue());e.runtimeParams.forEach((function(t){t.set(i.name,o)}))}}e._eventsStatus&&e.emitter.emit(t,n)};var n=e._mapEvents[t];n&&e.mapAdapter.emitter.on(t,n)}))},t.prototype._removeEventListeners=function(t){var e=this,n=Object.entries(this._mapEvents);t&&t.include&&(n=n.filter((function(e){return t.include.includes(e[0])}))),n.forEach((function(t){var n=t[1];n&&e.mapAdapter.emitter.removeListener(t[0],n)}))},t.keys=new Ct,t}();function St(t){for(var e,n={},i=0;i<t.length;i++)n[t[i]]=1+(n[t[i]]||0);for(var o in n){n[o]>((void 0!==e?n[e]:0)||0)&&(e=o)}return e}var zt={polygon:"path",line:"path",point:"circle"},Bt={Point:"point",LineString:"line",MultiPoint:"point",Polygon:"polygon",MultiLineString:"line",MultiPolygon:"polygon"};function Zt(t){if(t.data){var e=Bt[function(t){var e;e="FeatureCollection"===t.type?St(t.features.map((function(t){return t.geometry.type}))):"GeometryCollection"===t.type?St(t.geometries.map((function(t){return t.type}))):"Feature"===t.type?t.geometry.type:t.type;return e}(t.data)],n=t.paint;n&&Q(n)&&(n.type=n.type?n.type:"polygon"===e||"line"===e?"path":"html"in n||"className"in n?"icon":zt[e]),t.type=t.type||e}return t}var Nt=function(t){function i(e){var n=t.call(this,e)||this;n._layersIdCounter=1,n._layersOrderCounter=1,n._baselayers=[],n._layers={},n._selectedLayers=[];var i=n.options.tileJson;return i&&n.emitter.once("build-map",(function(){return n.addTileJsonLayer(i)})),n}return e(i,t),i.prototype.fitLayer=function(t,e){return o(this,void 0,void 0,(function(){var n,i,o;return r(this,(function(r){switch(r.label){case 0:return n=this.getLayer(t),(i=n&&(n.getBounds||n.getExtent))?[4,i.call(n)]:[3,2];case 1:(o=r.sent())&&this.fitBounds(o,e),r.label=2;case 2:return[2]}}))}))},i.prototype.isBaseLayer=function(t){var e=this.getLayer(t);if(e&&e.id)return-1!==this._baselayers.indexOf(e.id)},i.prototype.getBaseLayers=function(){var t=this,e=[];return this._baselayers.forEach((function(n){var i=t._layers[n];i&&e.push(i)})),e},i.prototype.getBaseLayersIds=function(){return this._baselayers},i.prototype.getLayer=function(t){return"string"==typeof t?this._layers[t]:t},i.prototype.getLayerId=function(t){var e=this.getLayer(t);if(e){if(e.id)return null==e?void 0:e.id;if(e&&e.options)return e.options.id}throw new Error("No id for layer")},i.prototype.getLayers=function(){return Object.keys(this._layers)},i.prototype.allLayers=function(){return this._layers},i.prototype.orderedLayers=function(){return Object.values(this._layers).sort((function(t,e){return t.order&&e.order?t.order-e.order:0}))},i.prototype.findLayer=function(t){for(var e in this._layers){var n=this._layers[e];if(t(n))return n}},i.prototype.isLayerVisible=function(t){var e=this.getLayer(t);return!(!e||void 0===e.options.visibility)&&e.options.visibility},i.prototype.addBaseLayer=function(t,e){return o(this,void 0,void 0,(function(){return r(this,(function(i){switch(i.label){case 0:return[4,this.addLayer(t,n(n({},e),{baselayer:!0}),void 0)];case 1:return[2,i.sent()]}}))}))},i.prototype.addLayer=function(t,e,i){var s,a;return void 0===e&&(e={}),o(this,void 0,void 0,(function(){var o,u,h,c,l,p,d,f,m,_,y,v;return r(this,(function(r){switch(r.label){case 0:return o=this._layersIdCounter++,u=B(i)?i:void 0!==e.order?e.order:this.reserveOrder(),"string"!=typeof t?[3,1]:(h=this.getLayerAdapter(t),[3,4]);case 1:return"function"!=typeof t?[3,2]:(h=t,[3,4]);case 2:return"then"in t?[4,t]:[3,4];case 3:h=r.sent(),r.label=4;case 4:return this._updateGeoJsonOptions(c=e),e=n({id:String(o),order:u},e),l=null===(s=e.visibility)||void 0===s||s,e.visibility=!1,e.baselayer&&(e.order=0),this.options.onBeforeAddLayer&&(p=this.options.onBeforeAddLayer({options:e,adapter:h}))&&(p.options&&(e=p.options),p.adapter&&(h=p.adapter)),void 0===h?[3,12]:((d=new h(this.mapAdapter.map,e)).options=n(n({},e),d.options),d.options.baselayer&&(e.baselayer=!0,e.order=0,d.options.order=0),f=void 0,d.options.id&&(f=String(d.options.id),this._layers[f]=d),this._emitLayerEvent("layer:preadd",f||"",d),[4,this.onMapLoad()]);case 5:return r.sent(),d.map=this.mapAdapter.map,[4,d.addLayer(d.options)];case 6:if(m=r.sent(),d.layer=m,d.id=d.options.id||String(o),d.options.id=d.id,e.baselayer&&(d.options.order=0),d.order=null!==(a=d.options.order)&&void 0!==a?a:u,f&&delete this._layers[f],f=String(d.id),this._layers[f])throw Error("layer with id '".concat(f,"' already exist"));return f?(this._layers[f]=d,c.filter&&this.filterLayer(d,c.filter),e.baselayer&&this._baselayers.push(f),l?[4,this.showLayer(f)]:[3,8]):[3,8];case 7:r.sent(),r.label=8;case 8:return void 0!==(_=e.opacity)&&_<=1&&this.setLayerOpacity(d,_),y=m&&(d.getBounds||d.getExtent),e.fit&&y?[4,y.call(d)]:[3,11];case 9:return(v=r.sent())?[4,this.fitBounds(v)]:[3,11];case 10:r.sent(),r.label=11;case 11:return e.onAdded&&e.onAdded(d),this._emitLayerEvent("layer:add",f,d),[2,d];case 12:return[2,Promise.reject("No adapter")]}}))}))},i.prototype.addLayerFromAsyncAdapter=function(t,e,n){return o(this,void 0,void 0,(function(){var i,o;return r(this,(function(r){switch(r.label){case 0:return i=n||void 0!==e.order?e.order:this.reserveOrder(),[4,t()];case 1:return(o=r.sent())?[2,this.addLayer(o,e,i)]:[2,Promise.reject("No adapter")]}}))}))},i.prototype.removeLayers=function(t){for(var e in this._layers){var n=!0;t&&(n=t(e,this._layers[e])),n&&(this.removeLayer(e),delete this._layers[e])}},i.prototype.getLegend=function(t){return o(this,void 0,void 0,(function(){var e,n,i,o;return r(this,(function(r){switch(r.label){case 0:for(e=[],n=0,i=this.orderedLayers();n<i.length;n++)(o=i[n]).getLegend&&e.push(o.getLegend(t));return[4,Promise.all(e)];case 1:return[2,r.sent().flat()]}}))}))},i.prototype.reserveOrder=function(){return this._layersOrderCounter++},i.prototype.removeOverlays=function(){this.removeLayers((function(t,e){return!(e&&e.options&&e.options.baselayer)}))},i.prototype.removeLayer=function(t){var e=this.getLayer(t),n=e&&this.getLayerId(e);if(e&&n){if(this.emitter.emit("layer:preremove",e),e.beforeRemove&&e.beforeRemove(),e.removeLayer?e.removeLayer():this.mapAdapter.removeLayer(e.layer),e.options&&e.options.baselayer){var i=this._baselayers.indexOf(n);i&&this._baselayers.splice(i,1)}delete this._layers[n],this.emitter.emit("layer:remove",e)}},i.prototype.addGeoJsonLayer=function(t,e){return void 0===t&&(t={}),(t=t||{}).multiselect=void 0!==t.multiselect&&t.multiselect,t.unselectOnSecondClick=void 0===t.unselectOnSecondClick||t.unselectOnSecondClick,e||(t=Zt(t)),t.paint=t.paint||{},this.addLayer(e||"GEOJSON",t)},i.prototype.addFeatureLayer=function(t){return void 0===t&&(t={}),this.addGeoJsonLayer(t)},i.prototype.addTileLayer=function(t,e){return void 0===e&&(e={}),this.addLayer("TILE",n(n({},e),{url:t}))},i.prototype.addImageLayer=function(t,e){var i;return"string"==typeof t?i=t:(i=t.url,e=t),this.addLayer("IMAGE",n(n({},e),{url:i}))},i.prototype.showLayer=function(t,e){return void 0===e&&(e={}),this.toggleLayer(t,!0,e)},i.prototype.hideLayer=function(t,e){return void 0===e&&(e={}),this.toggleLayer(t,!1,e)},i.prototype.toggleLayer=function(t,e,n){var i=this;void 0===n&&(n={});var s=this.getLayer(t),a=void 0!==e?e:!(s&&s.options.visibility),u=void 0!==n.silent&&n.silent;return s?this.onMapLoad().then((function(){return t=s,o(i,void 0,void 0,(function(){var e,n,i,o,s,h,c,l=this;return r(this,(function(r){switch(r.label){case 0:if(e=String(t.id),n=a?"layer:preshow":"layer:prehide",i=a?"layer:show":"layer:hide",u||(this._emitLayerEvent(n,e,t),this._emitLayerEvent("layer:pretoggle",e,t)),!a||!this.mapAdapter)return[3,9];if(o=t.options.baselayer?0:t.options.order,!t.options.baselayer||!this._baselayers.length)return[3,4];s=this._baselayers.filter((function(e){return e!==t.id&&l.isLayerVisible(e)})),h=0,c=s,r.label=1;case 1:return h<c.length?[4,this.hideLayer(c[h])]:[3,4];case 2:r.sent(),r.label=3;case 3:return h++,[3,1];case 4:return t.showLayer?[4,t.showLayer.call(t,t.layer)]:[3,6];case 5:return r.sent(),[3,8];case 6:return void 0===t.layer?[3,8]:[4,this.mapAdapter.showLayer(t.layer)];case 7:r.sent(),r.label=8;case 8:return void 0!==o&&this.mapAdapter.setLayerOrder(t.layer,o,this._layers),[3,13];case 9:return t.hideLayer?[4,t.hideLayer.call(t,t.layer)]:[3,11];case 10:return r.sent(),[3,13];case 11:return void 0===t.layer?[3,13]:[4,this.mapAdapter.hideLayer(t.layer)];case 12:r.sent(),r.label=13;case 13:return t.options.visibility=a,u||(this._emitLayerEvent(i,e,t),this._emitLayerEvent("layer:toggle",e,t)),[2]}}))}));var t})):Promise.resolve()},i.prototype.updateLayer=function(t){var e=this,n=this.getLayer(t);if(n){if(n.updateLayer)return Promise.resolve(n.updateLayer());if(this.isLayerVisible(n))return this.hideLayer(n,{silent:!0}).then((function(){return e.showLayer(n,{silent:!0})}))}return Promise.resolve()},i.prototype.setLayerOpacity=function(t,e){var n=this.getLayer(t);n&&(n.setOpacity?n.setOpacity(e):this.mapAdapter.setLayerOpacity&&this.mapAdapter.setLayerOpacity(n.layer,e))},i.prototype.isLayerLabelVisible=function(t){var e,n=this.getLayer(t);return n.isLabelVisible?n.isLabelVisible():null===(e=n.options.labelVisibility)||void 0===e||e},i.prototype.showLayerLabel=function(t){this.toggleLayerLabel(t,!0)},i.prototype.hideLayerLabel=function(t){this.toggleLayerLabel(t,!1)},i.prototype.toggleLayerLabel=function(t,e){var n=this.getLayer(t);return e=null!=e?e:!this.isLayerLabelVisible(t),n&&(e?n.showLabel&&(n.options.labelVisibility=!0,n.showLabel()):n.hideLabel&&(n.options.labelVisibility=!1,n.hideLabel()),n.id&&this._emitLayerEvent("layer:label:toggle",n.id,n)),e},i.prototype.selectLayer=function(t,e){var n=this.getLayer(t);if(n){n&&n.select&&n.select(e);var i=this.getLayerId(n);i&&this._selectedLayers.push(i)}},i.prototype.unSelectLayer=function(t,e){var n=this.getLayer(t);if(n){var i=n&&n;i.unselect&&i.unselect(e);var o=this.getLayerId(n);if(o){var r=this._selectedLayers.indexOf(o);-1!==r&&this._selectedLayers.splice(r,1)}}},i.prototype.unSelectLayers=function(){for(var t,e=0,n=Object.values(this.allLayers());e<n.length;e++)(t=n[e]).unselect&&t.unselect()},i.prototype.filterLayer=function(t,e){var n=this.getLayer(t);return n.filter?n.filter(e):[]},i.prototype.propertiesFilter=function(t,e,n){var i=this.getLayer(t);if(i){var o=i;if(o.propertiesFilter)return o.propertiesFilter(e,n);o.filter&&this.filterLayer(o,(function(t){return!t.feature||!t.feature.properties||bt(t.feature.properties,e)}))}return Promise.resolve()},i.prototype.removeLayerFilter=function(t){var e=this.getLayer(t);e.removeFilter?e.removeFilter():e.filter&&e.filter((function(){return!0}))},i.prototype.setLayerData=function(t,e){var n=this.getLayer(t);if(n){if(n.setData)return n.setData(e);if(n.clearLayer&&n.addData)return n.clearLayer(),n.addData(e)}return Promise.resolve()},i.prototype.addLayerData=function(t,e){var n=this.getLayer(t);n.addData&&n.addData(e)},i.prototype.clearLayerData=function(t,e){var n=this.getLayer(t);n&&n.clearLayer&&n.clearLayer(e)},i.prototype.setLayerPaint=function(t,e){var n=this.getLayer(t);e&&n&&n.setPaint&&n.setPaint(e)},i.prototype.setLayerSelectedPaint=function(t,e){var n=this.getLayer(t);e&&n&&n.setSelectedPaint&&n.setSelectedPaint(e)},i.prototype.updateLayerPaint=function(t,e){var n=this.getLayer(t);e&&n&&n.updatePaint&&n.updatePaint(e)},i.prototype.updateLayerSelectedPaint=function(t,e){var n=this.getLayer(t);e&&n&&n.updateSelectedPaint&&n.updateSelectedPaint(e)},i.prototype.getAttributions=function(t){var e=[];for(var n in this._layers){var i=this._layers[n],o=!(void 0===t.onlyVisible||t.onlyVisible)||i.options.visibility;if(o&&t.onlyBaselayer&&(o=this._baselayers.includes(n)),o){var r=i.options&&i.options.attribution;r&&e.push(r)}}return e},i.prototype.getActiveBaseLayer=function(){var t=this,e=this.getBaseLayers().find((function(e){return t.isLayerVisible(e)}));if(e)return this.getLayer(e)},i.prototype.addTileJsonLayer=function(t){return this.addLayer("TILE",{url:t.tiles[0],maxZoom:t.maxzoom,minZoom:t.minzoom,subdomains:t.scheme,attribution:t.attribution})},i.prototype._emitLayerEvent=function(t,e,n){var i=String(t);if(B(e)&&i.startsWith("layer:")){var o=i.replace("layer:","layer-"+e+":");this.emitter.emit(o,n)}this.emitter.emit(t,n)},i.prototype._onLayerClick=function(t){return o(this,void 0,void 0,(function(){return r(this,(function(e){return this._emitLayerEvent("layer:click",t.layer.id||"",t),[2,Promise.resolve(t)]}))}))},i.prototype._onLayerSelect=function(t){return o(this,void 0,void 0,(function(){return r(this,(function(e){return this._emitLayerEvent("layer:select",t.layer.id||"",t),[2,Promise.resolve(t)]}))}))},i.prototype._updateGeoJsonOptions=function(t){var e=this,n=t.onSelect,i=t.onLayerSelect,o=t.onMouseOut,r=t.onMouseOver,s=t.onClick||t.onLayerClick;t.onClick=function(t){return s&&s(t),e._onLayerClick(t)},t.onMouseOut=function(t){var n=t.layer.id;o&&o(t),B(n)&&e._emitLayerEvent("layer:mouseout",n,t)},t.onMouseOver=function(t){var n=t.layer.id;r&&r(t),B(n)&&e._emitLayerEvent("layer:mouseover",n,t)};var a=n||i;t.onSelect=function(t){return a&&a(t),e._onLayerSelect(t)},t.nativePaint||(this.options.paint&&(t.paint=Pt({paint:t.paint||{},defaultPaint:this.options.paint,getPaintFunctions:this.getPaintFunctions})),t.selectedPaint&&this.options.selectedPaint&&(t.selectedPaint=Pt({paint:t.selectedPaint,defaultPaint:this.options.selectedPaint,getPaintFunctions:this.getPaintFunctions})))},i}(It);function Rt(t,e){var n=document.createElement("div"),i=!1;e.getStatus?i=e.getStatus():e.status&&(i=e.status);var o=e.title||"",r=e.html;function s(){o&&(n.title="string"==typeof o?o:i?o.on:o.off,n.setAttribute("aria-label",n.title))}function a(t){t instanceof HTMLElement?(n.innerHTML="",n.appendChild(t)):"string"==typeof t&&(n.innerHTML=t)}function u(){r&&("string"==typeof r||r instanceof HTMLElement?a(r):a(i?r.on:r.off),n.setAttribute("aria-label",n.title))}function h(t,e){t.split(" ").forEach((function(t){e?n.classList.add(t):n.classList.remove(t)}))}function c(){e.addClassOn&&h(e.addClassOn,i),e.addClassOff&&h(e.addClassOff,!i)}s(),u(),e.addClass&&h(e.addClass,!0),c();var l=function(t){void 0!==t&&(i=t),u(),s(),c()},p=function(t){if(i=void 0!==t?t:!i,e.onClick){var n=e.onClick(i);Promise.resolve(n).then((function(){return l()})).catch((function(){return i=!i}))}else l()},d=t({html:n,onClick:p});return d.onClick=p,d.changeStatus=l,d}var jt=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e._loadControlQueue={"top-right":[],"bottom-right":[],"top-left":[],"bottom-left":[]},e._isControlLoading={"top-right":!1,"bottom-right":!1,"top-left":!1,"bottom-left":!1},e}return e(n,t),n.prototype.addControl=function(t,e,n){return o(this,void 0,void 0,(function(){var i,s=this;return r(this,(function(a){return e=null!=e?e:"top-left",(i="string"==typeof t?this.getControl(t,n):t)?[2,new Promise((function(t){s._setControlQueue(e,(function(){return o(s,void 0,void 0,(function(){var n,o;return r(this,(function(r){switch(r.label){case 0:return[4,i];case 1:return n=r.sent(),o=this.mapAdapter.addControl(n,e),t(o),[2]}}))}))}))}))]:[2]}))}))},n.prototype.createControl=function(t,e){return o(this,void 0,void 0,(function(){return r(this,(function(n){switch(n.label){case 0:return[4,this.onLoad("build-map")];case 1:return n.sent(),this.mapAdapter.createControl?[2,this.mapAdapter.createControl(t,e)]:[2]}}))}))},n.prototype.createButtonControl=function(t){return o(this,void 0,void 0,(function(){return r(this,(function(e){switch(e.label){case 0:return[4,this.onLoad("build-map")];case 1:return e.sent(),this.mapAdapter.createButtonControl?[2,this.mapAdapter.createButtonControl(t)]:[2]}}))}))},n.prototype.createToggleControl=function(t){return o(this,void 0,void 0,(function(){return r(this,(function(e){switch(e.label){case 0:return[4,this.onLoad("build-map")];case 1:return e.sent(),this.mapAdapter.createToggleControl?[2,this.mapAdapter.createToggleControl(t)]:this.mapAdapter.createButtonControl?[2,Rt(this.mapAdapter.createButtonControl,t)]:[2]}}))}))},n.prototype.removeControl=function(t){var e=this;"remove"in t?t.remove():this.mapAdapter.removeControl&&Promise.resolve(t).then((function(t){e.mapAdapter.removeControl(t)}))},n.prototype.getControl=function(t,e){var i=this.mapAdapter.controlAdapters[t];if(i)return new i(e);var o=n.controls[t];return o?o(this,e):void 0},n.prototype.getControlContainer=function(){if(this.mapAdapter.getControlContainer)return this.mapAdapter.getControlContainer()},n.prototype._setControlQueue=function(t,e){this._loadControlQueue[t].push(e),this._isControlLoading[t]||this._applyControls(t)},n.prototype._applyControls=function(t){return o(this,void 0,void 0,(function(){return r(this,(function(e){switch(e.label){case 0:return this._loadControlQueue[t].length?(this._isControlLoading[t]=!0,[4,(0,this._loadControlQueue[t][0])()]):[3,2];case 1:return e.sent(),this._loadControlQueue[t].splice(0,1),this._applyControls(t),[3,3];case 2:this._isControlLoading[t]=!1,e.label=3;case 3:return[2]}}))}))},n.controls={CONTROL:function(t,e){return t.createControl(e.control,e.options)},BUTTON:function(t,e){return t.createButtonControl(e)},TOGGLE:function(t,e){return t.createToggleControl(e)}},n}(Nt),Dt={};var Ft=function(t){function n(e){var n=t.call(this,e)||this;return n._addControls(),Dt[n.id]=n,n}return e(n,t),n.get=function(t){return function(t){return Dt[t]}(t)},n.prototype._addLayerProviders=function(){var t,e,n,i,s,a;return o(this,void 0,void 0,(function(){var o,h,c,l,p,d,f,m,_,y,v,g;return r(this,(function(r){switch(r.label){case 0:r.trys.push([0,18,19,24]),o=!0,h=u(this._starterKits),r.label=1;case 1:return[4,h.next()];case 2:return c=r.sent(),(t=c.done)?[3,17]:(o=!1,(l=c.value).getLayerAdapters?[4,l.getLayerAdapters.call(l)]:[3,16]);case 3:if(!(p=r.sent()))return[3,16];r.label=4;case 4:r.trys.push([4,10,11,16]),d=!0,s=void 0,f=u(p),r.label=5;case 5:return[4,f.next()];case 6:return m=r.sent(),(i=m.done)?[3,9]:(d=!1,[4,(_=m.value).createAdapter(this)]);case 7:(y=r.sent())&&(this.mapAdapter.layerAdapters[_.name]=y),r.label=8;case 8:return d=!0,[3,5];case 9:return[3,16];case 10:return v=r.sent(),s={error:v},[3,16];case 11:return r.trys.push([11,,14,15]),d||i||!(a=f.return)?[3,13]:[4,a.call(f)];case 12:r.sent(),r.label=13;case 13:return[3,15];case 14:if(s)throw s.error;return[7];case 15:return[7];case 16:return o=!0,[3,1];case 17:return[3,24];case 18:return g=r.sent(),e={error:g},[3,24];case 19:return r.trys.push([19,,22,23]),o||t||!(n=h.return)?[3,21]:[4,n.call(h)];case 20:r.sent(),r.label=21;case 21:return[3,23];case 22:if(e)throw e.error;return[7];case 23:return[7];case 24:return[2]}}))}))},n.prototype._onLoadSync=function(){var t,e,n;return o(this,void 0,void 0,(function(){var i,o,s,a,h,c;return r(this,(function(r){switch(r.label){case 0:r.trys.push([0,8,9,14]),i=!0,o=u(this._starterKits),r.label=1;case 1:return[4,o.next()];case 2:if(s=r.sent(),t=s.done)return[3,7];if(i=!1,!(a=s.value).onLoadSync)return[3,6];r.label=3;case 3:return r.trys.push([3,5,,6]),[4,a.onLoadSync.call(a,this)];case 4:return r.sent(),[3,6];case 5:return h=r.sent(),console.error(h),[3,6];case 6:return i=!0,[3,1];case 7:return[3,14];case 8:return c=r.sent(),e={error:c},[3,14];case 9:return r.trys.push([9,,12,13]),i||t||!(n=o.return)?[3,11]:[4,n.call(o)];case 10:r.sent(),r.label=11;case 11:return[3,13];case 12:if(e)throw e.error;return[7];case 13:return[7];case 14:return[2]}}))}))},n.prototype._addControls=function(){var t=this;this.options.controls&&this.options.controls.forEach((function(e){var n=e,o={};"string"==typeof e&&t.options.controlsOptions&&t.options.controlsOptions[e]&&void 0!==(o=t.options.controlsOptions[e]).control&&(n=o.control);var r=o.position,s=i(o,["position"]);t.addControl(n,r||"top-left",s)})),this._emitStatusEvent("controls:create")},n}(jt);var Ut=function(){function t(e){var n;void 0===e&&(e={}),this.cache=[];var i=null!==(n=e.namespace)&&void 0!==n?n:"default";return t.instance[i]?t.instance[i]:(t.instance[i]=this,this)}return t.prototype.clean=function(){this.cache.length=0},t.prototype.all=function(){return this.cache},t.prototype.addFull=function(t,e,n){return this.add(t,e,n,!0)},t.prototype.add=function(t,e,n,i){var o=this,r=this._find(t,n);if(r)return r.value;var s=void 0;s=e instanceof Function?e():e;var a=n&&JSON.parse(JSON.stringify(J(n))),u={key:t,value:s,props:a,options:a};return i&&!Z(s)?s:(this.cache.push(u),s instanceof Promise?(s.catch((function(e){throw o.delete(t,n),e})),i&&s.then((function(e){return Z(e)||o.delete(t,n),e})),s):s)},t.prototype.match=function(t,e){var n=this._find(t,e);if(n)return n.value},t.prototype.matchAll=function(t,e){var n=this;return t?this.cache.filter((function(i){return n._filter(i,t,e)})).map((function(t){return t.value})):this.cache.map((function(t){return t.value}))},t.prototype.delete=function(t,e){var n=this,i=[];"string"==typeof t?i=this.cache.filter((function(i){return n._filter(i,t,e)})):i.push(t);for(var o=0,r=i;o<r.length;o++){var s=this.cache.indexOf(r[o]);this.cache.splice(s,1)}},t.prototype._find=function(t,e){var n=this;return this.cache.find((function(i){return n._filter(i,t,e)}))},t.prototype._filter=function(t,e,n){return t.key===e&&(!n||G(t.props||t.options||{},J(n)))},t.instance={},t}(),Wt=function(t){function n(e){var i=t.call(this)||this;return i.name="NgwError",Object.assign(i,e),Object.setPrototypeOf(i,n.prototype),i}return e(n,t),n}(Error),Ht=function(t){function n(e){var i=t.call(this,e)||this;return i.name="ResourceNotFoundError",i.exception="nextgisweb.resource.exception.ResourceNotFound",Object.setPrototypeOf(i,n.prototype),i}return e(n,t),n}(Wt);function Vt(t){return"[object Object]"===Object.prototype.toString.call(t)}var qt=["description"];function Gt(t,e){void 0===e&&(e=""),e=e?e+"__":"";for(var n={},i=0,o=Object.entries(t);i<o.length;i++){var r=o[i],s=r[0],a=r[1];if(-1===qt.indexOf(s))if(Vt(a))if("owner_user"===s){var u=Gt(a,s);Object.assign(n,u)}else"parent"===s&&"id"in a&&(n.parent_id=a.id);else B(a)&&(n[e+s]=a)}return n}var Jt=function(){function t(t){this.connector=t,this.cache=new Ut}return t.prototype.getOne=function(t,e){var i=this,o=new Ut,r={},s=n(n({},e),{cache:!1});"string"==typeof t?r.keyname=t:"number"==typeof t?r.id=t:Vt(t)&&(void 0!==t.id?r.id=t.id:t.keyname&&(r.keyname=t.keyname));return o.addFull("resource",(function(){return"string"==typeof t?i._fetchResourceBy({keyname:t},s):"number"==typeof t?i._fetchResourceById(t,s):Vt(t)?i._fetchResourceBy(t,s):S.resolve(void 0)}),r)},t.prototype.getOneOrFail=function(t,e){return this.getOne(t,e).then((function(t){if(t)return t;throw new Ht}))},t.prototype.getId=function(t,e){return"number"==typeof t?S.resolve(t):"string"==typeof t||Vt(t)?this.getOne(t,e).then((function(t){if(t)return t.resource.id})):S.resolve(void 0)},t.prototype.getIdOrFail=function(t,e){return this.getId(t,e).then((function(t){if(void 0===t)throw new Error;return t}))},t.prototype.getMany=function(t,e){var i=this;return this._resourceCacheFilter(t).then((function(o){if(!o.length){var r={};return t.keyname?r.keyname=t.keyname:Object.assign(r,Gt(t)),i.connector.get("resource.search",e,n({serialization:"full"},r)).then((function(t){if(t)for(var e=0,n=t;e<n.length;e++){var o=n[e];i.cache.add("resource.item",S.resolve(o),{id:o.resource.id})}return t}))}return o}))},t.prototype.getParent=function(t,e){var n=this;return this.getOne(t,e).then((function(t){return t?n.getOne(t.resource.parent.id,e):S.resolve(void 0)}))},t.prototype.getChildrenOf=function(t,e){var n=this;return this.getIdOrFail(t).then((function(t){return n._getChildrenOf(t,e)}))},t.prototype.update=function(t,e){var n=this;return this.getId(t).then((function(t){if(void 0!==t)return n.connector.put("resource.item",{data:e},{id:t})}))},t.prototype.delete=function(t){var e=this;return this.getId(t).then((function(t){if(void 0!==t)return e.connector.delete("resource.item",null,{id:t}).then((function(){e._cleanResourceItemCache(t)}))}))},t.prototype._getChildrenOf=function(t,e,i){var o=this;return void 0===i&&(i=[]),this.connector.get("resource.collection",n({cache:!0},e),{parent:t}).then((function(t){for(var n=[],r=0,s=t;r<s.length;r++){var a=s[r];o.cache.add("resource.item",S.resolve(a),{id:a.resource.id}),i.push(a),(null==e?void 0:e.recursive)&&a.resource.children&&n.push(o._getChildrenOf(a.resource.id,e,i))}return n.length?S.all(n).then((function(){return i})):i}))},t.prototype._cleanResourceItemCache=function(t){return o(this,void 0,void 0,(function(){var e,n,i,o,s,a,u,h;return r(this,(function(r){switch(r.label){case 0:e=this.cache.all(),n=[],i=0,o=e,r.label=1;case 1:return i<o.length?(a=(s=o[i]).options&&s.options.id,["resource.item","resource"].includes(s.key)&&void 0!==a?"number"!=typeof a?[3,2]:(a===t&&n.push(s),[3,4]):[3,4]):[3,5];case 2:return[4,this.getId(a)];case 3:r.sent()===t&&n.push(s),r.label=4;case 4:return i++,[3,1];case 5:for(u=0,h=n;u<h.length;u++)this.cache.delete(h[u]);return[2]}}))}))},t.prototype._fetchResourceById=function(t,e){var n=this;return this.cache.add("resource.item",(function(){return n.connector.get("resource.item",e,{id:t})}),{id:t}).catch((function(t){if(!(t instanceof Ht))throw t}))},t.prototype._fetchResourceBy=function(t,e){return this.getMany(t,e).then((function(t){return t[0]}))},t.prototype._resourceCacheFilter=function(t){return S.all(this.cache.matchAll("resource.item")).then((function(e){return e.filter((function(e){if(e)return t.keyname&&e.resource.keyname?t.keyname===e.resource.keyname:B(t.id)&&B(e.resource.id)?t.id===e.resource.id:G(t,e.resource)})),[]}))},t}(),Kt=[];function Yt(t){Kt.push(t)}var Qt=function(t){function n(e){var i=t.call(this,e)||this;return i.name="InsufficientPermissionsError",i.exception="nextgisweb.core.exception.InsufficientPermissions",Object.setPrototypeOf(i,n.prototype),i}return e(n,t),n}(Wt),Xt=/\{ *([\w_-]+) *\}/g;function $t(t,e){return t.replace(Xt,(function(t,n){var i=e[n];if(void 0===i)throw new Error("No value provided for letiable "+t);return"function"==typeof i&&(i=i(e)),i}))}var te,ee=function(t){function n(e){var i=t.call(this)||this;return i.name="NetworkError",Object.setPrototypeOf(i,n.prototype),i.message="Unable to request ".concat(e,".\n Possibly invalid NGW URL entered or CORS not configured to get request from ").concat(location.origin),i}return e(n,t),n}(Error);te=function(t,e,n,i,o){void 0===n&&(n={}),n.method=n.method||"GET";var r=new XMLHttpRequest;r.open(n.method||"GET",t,!0),"blob"===n.responseType&&(r.responseType=n.responseType);var s=function(){try{return JSON.parse(r.responseText)}catch(t){return r.responseText}};r.onload=function(){-1!==[401,403,404,422,500].indexOf(r.status)&&i(new Wt(s())),function(t){void 0===t&&(t=!1);var o=t?i:e;"blob"===n.responseType?o(r.response):r.responseText?o(s()):i({message:""})}()},r.onerror=function(e){i(0===r.status?new ee(t):e)},r.upload.onprogress=function(t){t.lengthComputable&&(n.onProgress&&n.onProgress(t.loaded/t.total*100,t))};var a,u=n.headers;if(u)for(var h in u){var c=u[h];"string"==typeof c&&r.setRequestHeader(h,c)}if(void 0!==n.withCredentials&&(r.withCredentials=n.withCredentials),n.file){if((a=new FormData).append("file",n.file),n.data)for(var l in n.data)a.append(l,a[l])}else a=n.data?"string"==typeof n.data?n.data:JSON.stringify(n.data):null;o&&o((function(){r.abort()})),r.send(a)};var ne=0,ie=function(){function t(t){this.options=t,this.id=ne++,this.emitter=new p.exports.EventEmitter,this.routeStr="/api/component/pyramid/route",this.activeRequests=[];var e=function(t){return Kt.find((function(e){if(e.options.baseUrl===t.baseUrl){if(!t.auth)return!0;if(e.options.auth)return G(e.options.auth,t.auth)}}))}(t);if(e)return e;this.options.route&&(this.routeStr=this.options.route),this.options.requestTransform&&(this.requestTransform=this.options.requestTransform),this.resources=new Jt(this),Yt(this)}return t.create=function(t){return new this(t)},t.prototype.setRequestTransform=function(t){this.requestTransform=t},t.prototype.setNgw=function(t){this.logout(),this.options.baseUrl=t,Yt(this)},t.prototype.connect=function(){var t=this,e=new Ut,n=this.options.auth;return e.add("route",(function(){return new S((function(e,i){var o=function(){return t.makeQuery(t.routeStr,{},{}).then((function(t){e(t)})).catch((function(t){i(t)}))};if(n){var r=n.login,s=n.password;if(r&&s)return t._login({login:r,password:s}).then((function(){return o()})).catch((function(t){return i(t)}))}return o()}))}),{id:this.id,auth:n,baseUrl:this.options.baseUrl})},t.prototype.login=function(t,e){return this.logout(),Yt(this),this._login(t,e)},t.prototype.logout=function(){var t;this.abort(),-1!==(t=Kt.indexOf(this))&&Kt.splice(t,1),this.options.auth=void 0,this.user=void 0,this.emitter.emit("logout"),this.resources.cache.clean()},t.prototype.getUserInfo=function(t,e){if(this.user&&this.user.id)return S.resolve(this.user);t&&(this.options.auth=t);var i=n({headers:this.getAuthorizationHeaders(t)},e);return this.makeQuery("/api/component/auth/current_user",{},i)},t.prototype.getAuthorizationHeaders=function(t){var e=this.makeClientId(t);if(e)return{Authorization:"Basic "+e}},t.prototype.makeClientId=function(t){if(t=t||this.options.auth){var e=t.password,n=unescape(encodeURIComponent("".concat(t.login,":").concat(e)));return window.btoa(n)}},t.prototype.abort=function(){for(var t=0,e=this.activeRequests;t<e.length;t++){e[t].cancel()}this.activeRequests=[]},t.prototype.getActiveApiRequests=function(){return a([],this.activeRequests,!0)},t.prototype.apiRequest=function(t,e,i){var o,r,s=this;void 0===e&&(e={}),void 0===i&&(i={});var u=i.method,h=i.headers,c=i.withCredentials,l=i.responseType,p=J(e=null!==(o=i.params)&&void 0!==o?o:e),d=function(){return function(t){var e=t.params;return new S((function(n,i){t.connector.connect().then((function(o){var r=o&&o[t.name];if(r){var s=(r=a([],r,!0)).shift();if(r.length){for(var u={},h=0;h<r.length;h++){var c=r[h];if(u[h]="{"+c+"}",void 0===e[c])throw new Error("`"+c+"` url api argument is not specified")}s&&(s=$t(s,u))}if(e){var l=[],p=e.paramList;for(var d in Array.isArray(p)&&(delete e.paramList,p.forEach((function(t){l.push("".concat(t[0],"=").concat(t[1]))}))),e)-1===r.indexOf(d)&&l.push("".concat(d,"=").concat(e[d]));l.length&&(s=s+"?"+l.join("&"))}s?n(t.connector.makeQuery(s,e,t.requestOptions)):i(new Error("request url is not set"))}else n(void 0)})).catch((function(t){i(t)}))}))}({name:t,params:p,requestOptions:i,connector:s})};return i.cache&&"GET"===u?(new Ut).add(t,d,n({params:p},J({headers:h,withCredentials:c,responseType:l,baseUrl:this.options.baseUrl,userId:null===(r=this.user)||void 0===r?void 0:r.id}))):d()},t.prototype.post=function(t,e,n){return(e=e||{}).method="POST",this.apiRequest(t,n,e)},t.prototype.get=function(t,e,n){return(e=e||{}).method="GET",this.apiRequest(t,n,e)},t.prototype.patch=function(t,e,n){return(e=e||{}).method="PATCH",this.apiRequest(t,n,e)},t.prototype.put=function(t,e,n){return(e=e||{}).method="PUT",this.apiRequest(t,n,e)},t.prototype.delete=function(t,e,n){return(e=e||{}).method="DELETE",this.apiRequest(t,n,e)},t.prototype.makeQuery=function(t,e,n){if(void 0===n&&(n={}),t=(this.options.baseUrl?this.options.baseUrl:"")+t)return e&&(t=$t(t,e)),t=encodeURI(Y(t)),this._loadData(t,n);throw new Error("Empty `url` not allowed")},t.prototype.getResource=function(t,e){return this.resources.getOne(t,e)},t.prototype.getResourceOrFail=function(t,e){return this.resources.getOneOrFail(t,e)},t.prototype.getResourceBy=function(t){return this.resources.getOne(t)},t.prototype.getResourceByKeyname=function(t){return this.resources.getOne(t)},t.prototype.getResourceById=function(t){return this.resources.getOne(t)},t.prototype.getResourceId=function(t,e){return this.resources.getId(t,e)},t.prototype.getResourceIdOrFail=function(t,e){return this.resources.getIdOrFail(t,e)},t.prototype.getResourcesBy=function(t,e){return this.resources.getMany(t,e)},t.prototype.getResourceParent=function(t,e){return this.resources.getParent(t,e)},t.prototype.getResourceChildren=function(t,e){return this.resources.getChildrenOf(t,e)},t.prototype.updateResource=function(t,e){return this.resources.update(t,e)},t.prototype.deleteResource=function(t){return this.resources.delete(t)},t.prototype._loadData=function(t,e){var i=this;e.responseType=e.responseType||"json";var o=new S((function(o,r,s){if(i.user&&((e=e||{}).headers=n(n({},i.getAuthorizationHeaders()),e.headers)),i.requestTransform){var a=i.requestTransform(t,e);t=a[0],e=a[1]}te(t,o,e,r,s)})).then((function(t){return i._cleanActiveRequests(o),t})).catch((function(t){if(i._cleanActiveRequests(o),t instanceof S.CancelError);else{var e=i._handleHttpError(t);if(e)throw e}}));return e.signal&&"function"==typeof e.signal.addEventListener&&e.signal.addEventListener("abort",(function(){o.cancel(),i._cleanActiveRequests(o)})),this.activeRequests.push(o),o},t.prototype._login=function(t,e){var n=this;return this.getUserInfo(t,e).then((function(t){return n.user=t,n.emitter.emit("login",t),t})).catch((function(t){throw n.emitter.emit("login:error",t),t}))},t.prototype._cleanActiveRequests=function(t){var e=this.activeRequests.indexOf(t);-1!==e&&this.activeRequests.splice(e,1)},t.prototype._handleHttpError=function(t){if(t&&t instanceof Wt){if("nextgisweb.resource.exception.ResourceNotFound"===t.exception)throw new Ht(t);if("nextgisweb.core.exception.InsufficientPermissions"===t.exception)throw new Qt(t)}return t},t.errors={NgwError:Wt,ResourceNotFoundError:Ht},t}(),oe=function(){function t(t){this.options=t,this.resourceId=t.resourceId;var e=t.item;this.item=e,this.name=t.labelField&&e.fields?e.fields[t.labelField]:String(e.id)}return t.prototype.extent=function(){var t=this;return this._extent?S.resolve(this._extent):this.options.connector.get("feature_layer.feature.item_extent",null,{id:this.resourceId,fid:this.item.id}).then((function(e){var n=e.extent,i=[n.minLon,n.minLat,n.maxLon,n.maxLat];return t._extent=i,i}))},t.prototype.geoJson=function(){var t=this;return this.item.geom?S.resolve(Ee(this.item)):un({resourceId:this.resourceId,featureId:this.item.id,connector:this.options.connector,geom:!0,fields:null,extensions:null}).then((function(e){return t.item.geom=e.geom,Ee(t.item)}))},t}();function re(t,e,n,i){return!!ue(t,e,n,he,i)}function se(t,e,n,i){return ue(t,e,n,ce,i)}function ae(t,e){void 0===e&&(e="children");var n=[],i=("function"==typeof e?e:function(t){return t[e]})(t);return i&&(Array.isArray(i)?n=i:n.push(i)),i?n:void 0}function ue(t,e,n,i,o){void 0===e&&(e=function(t){return!!t}),void 0===n&&(n="children");var r="function"==typeof e?e:function(t){return bt(t,e)};return i(t,o?function(t){return r(o(t))}:r,n)}function he(t,e,n,i){void 0===e&&(e=function(t){return!!t});var o=[];if(Array.isArray(t))o=t;else{if(e(t))return t;var r=ae(t,n);r&&(o=r)}for(var s=0;s<o.length;s++)if(o[s]){var a=he(o[s],e,n);if(a)return a}}function ce(t,e,n,i){void 0===e&&(e=function(t){return!!t}),void 0===i&&(i=[]);var o=[];if(Array.isArray(t))o=t;else{e(t)&&i.push(t);var r=ae(t,n);r&&(o=r)}for(var s=0;s<o.length;s++)o[s]&&ce(o[s],e,n,i);return i}function le(t,e,n,i){void 0===e&&(e=function(t){return!!t});var o=[];if(Array.isArray(t))o=t;else{if(!e(t))return!1;var r=ae(t,n);r&&(o=r)}for(var s=0;s<o.length;s++){if(o[s])if(!le(o[s],e,n))return!1}return!0}var pe=function(){function t(t){this._children=[],this.item=t}return t.prototype.setParent=function(t){this._parent=t},t.prototype.addChild=function(t){this._children.push(t)},t.prototype.getParent=function(){return this._parent},t.prototype.getParents=function(t){var e=this.getParent();return e?se(e,t,(function(t){return t.tree.getParent()})):[]},t.prototype.getRoot=function(){for(var t=this.getParent(),e=t;t;)(t=t.tree.getParent())&&(e=t);return e},t.prototype.find=function(t){return ue(this._children,t,(function(t){return t.tree.getChildren()}),he,e);var e},t.prototype.every=function(t){return!!ue(this._children,t,(function(t){return t.tree.getChildren()}),le,e);var e},t.prototype.some=function(t){return re(this._children,t,(function(t){return t.tree.getChildren()}))},t.prototype.all=function(t){return this.getDescendants(t)},t.prototype.getDescendants=function(t){return se(this._children,t,(function(t){return t.tree.getChildren()}))},t.prototype.getChildren=function(){return a([],this._children,!0)},t}(),de=function(){function t(t,e,n){this.emitter=new p.exports.EventEmitter,this._blocked=!1,this.item=e,this.options=Object.assign({},n),this.name=t,this._value=this.getProperty()}return t.prototype.getProperty=function(){return"function"==typeof this.options.getProperty?this.options.getProperty.call(this,this.item):this.options.value},t.prototype.getParents=function(){return this.item.tree.getParents()||[]},t.prototype.getParent=function(){return this.item.tree.getParent()},t.prototype.getChildren=function(){return this.item.tree.getChildren()},t.prototype.isGroup=function(){return this.item.tree.getDescendants().length},t.prototype.isBlocked=function(){if(void 0!==this._blocked)return this._blocked;var t=this.item.tree.getParents();return this._blocked=this._calculateBlockedStatus(t),this._blocked},t.prototype.set=function(t,e){this._value=this._prepareValue(t),this.update(this._value,e),this._fireChangeEvent(this._value,e)},t.prototype.get=function(){return this.getValue()},t.prototype.update=function(t,e){this._callOnSet(t,e)},t.prototype.getContainer=function(){return this._container},t.prototype.destroy=function(){if(this._container){var t=this._container.parentNode;t&&t.removeChild(this._container)}this._removeEventsListener&&this._removeEventsListener()},t.prototype.getValue=function(){return void 0!==this._value?this._value:this.getProperty()},t.prototype._prepareValue=function(t){return t},t.prototype._callOnSet=function(t,e){this.options.onSet&&this.options.onSet.call(this,t,e,this.item)},t.prototype._fireChangeEvent=function(t,e){var n=this;this.emitter&&(t=void 0!==t?t:this.getValue(),this.emitter.emit("change",{value:t,options:e}),this.item.tree.getParents().forEach((function(i){var o=i.properties&&i.properties.property(n.name);o&&o.emitter.emit("change-tree",{value:t,options:e,item:n.item})})))},t.prototype._calculateBlockedStatus=function(t){var e=this;return t.some((function(t){var n,i=null===(n=t.properties)||void 0===n?void 0:n.property(e.name);return!!i&&!i.get()}))},t}(),fe=function(t){function i(e,o,r){var s=t.call(this,e,o,n(n({},i.options),r))||this;return s.set(s.get()),s}return e(i,t),i.prototype.update=function(t,e){if(t){if(e&&e.bubble||this.options.bubble){this.unBlock(e);var n=this.getParent(),i=n&&n.properties&&n.properties.property(this.name);i&&i.set(t,Object.assign({},e,{bubble:!0,propagation:!1}))}this.isBlocked()||this._turnOn(e)}else this._turnOff(e);(e&&e.propagation||this.options.propagation)&&this._propagation(t,e)},i.prototype.getHierarchyValue=function(){var t=this;return this.get()&&this.getParents().every((function(e){var n=e.properties&&e.properties.get(t.name);return n&&n.get()}))},i.prototype.block=function(t){this._blocked=!0,this._block(t)},i.prototype.unBlock=function(t){this._blocked=!1,this.getValue()&&this._unBlock(t)},i.prototype.blockChild=function(t){var e=this;this.item.tree.getDescendants().forEach((function(n){return e._blockChild(n,t)}))},i.prototype.unblockChild=function(t){var e=this;this.item.tree.getChildren().forEach((function(n){return e._unBlockChild(n,t)}))},i.prototype._prepareValue=function(t){return t},i.prototype._turnOff=function(t){this.options.turnOff&&this.options.turnOff.call(this,t),this._callOnSet(!1,t),this.options.hierarchy&&this.isGroup()&&this.blockChild(t)},i.prototype._turnOn=function(t){this.options.turnOn&&this.options.turnOn.call(this,t),this._callOnSet(!0,t),this.options.hierarchy&&this.isGroup()&&this.unblockChild(t)},i.prototype._block=function(t){this._turnOff(t)},i.prototype._unBlock=function(t){this._turnOn(t)},i.prototype._blockChild=function(t,e){var n=t.properties&&t.properties.property(this.name);n&&n.block&&n.block(e)},i.prototype._unBlockChild=function(t,e){var n=t.properties&&t.properties.property(this.name);n&&n.unBlock&&n.unBlock(e)},i.prototype._propagation=function(t,e){if(this.isGroup())for(var i=this.item.tree.getChildren(),o=0;o<i.length;o++){var r=i[o],s=r.properties&&r.properties.property(this.name);s&&s.set(t,n(n({},e),{propagation:!0,bubble:!1}))}},i.options={hierarchy:!0,bubble:!1,propagation:!1,label:"Toggle"},i}(de),me=function(){function t(t,e){this.item=t,this.options={},this._properties={},this._propertiesList=[],e&&e.forEach(this._setPropertyHandler.bind(this))}return t.prototype.add=function(t){this._setPropertyHandler(t)},t.prototype.update=function(){this.list().forEach((function(t){return t.update()}))},t.prototype.get=function(t){var e=this.property(t);return e?e.get():void 0},t.prototype.set=function(t,e,n){var i=this.property(t);i&&i.getValue()!==e&&i.set(e,n)},t.prototype.property=function(t){return this._properties[t]},t.prototype.list=function(){var t=this;return this._propertiesList.map((function(e){return t._properties[e]}))},t.prototype.destroy=function(){for(var t in this._properties){var e=this.property(t);e&&e.destroy&&e.destroy()}this._properties={},this._propertiesList=[]},t.prototype._setPropertyHandler=function(t){var e=this._getHandler(t);if(e&&t.name){var i=n({},t);this._properties[t.name]=new e(t.name,this.item,i),this._propertiesList.push(t.name)}},t.prototype._getHandler=function(e){var n=e.handler;return!n&&e.type?"boolean"===e.type?t.handlers.CheckProperty:t.handlers.BaseProperty:n},t.handlers={CheckProperty:fe},t}(),_e=0,ye=function(){function t(t){this.options={},this.id=_e,_e+=1,this.options=n({},t),this.tree=new pe(this)}return t.prototype.initProperties=function(){this.properties=new me(this,this.options.properties)},t}(),ve=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.getProperty=function(){var t=this.item.layer;return t&&t&&t.options&&void 0!==t.options.opacity?t.options.opacity:1},n.prototype.update=function(t,e){var n=this;if(e=e||{},this.isGroup()){this._value=this._prepareValue(t,e);for(var i=0,o=this.getChildren();i<o.length;i++){var r=o[i].properties.property(this.name);r&&(e.propagation?r.set(t,e):r.update(r.get(),e))}}var s=this.item.layer;if(s){var a=this.getParents().reduce((function(t,e){var i=e.properties.property(n.name);return t*(i?i.getValue():1)}),1);this.item.webMap.setLayerOpacity(s,this._prepareValue(t*a))}},n.prototype._prepareValue=function(t,e){return e&&e.propagation&&this.isGroup()?1:Number(t)},n}(de);function ge(t){var e=t.extent_bottom,n=t.extent_left,i=t.extent_top,o=t.extent_right;if(e&&n&&i&&o){var r=[n,e,o,i];return r[3]>82&&(r[3]=82),r[1]<-82&&(r[1]=-82),r}}function be(t){var e=t.cache;return t.connector.get("layer.extent",{cache:void 0===e||e},{id:t.resourceId}).then((function(t){if(t){var e=t.extent;return[e.minLon,e.minLat,e.maxLon,e.maxLat]}}))}function we(t){return t.connector.getResource(t.resourceId).then((function(e){if(e)return xe(e,t.connector,t)}))}function xe(t,e,i){if(t.webmap)return S.resolve(ge(t.webmap));var o=t.resource;return o.cls&&-1!==o.cls.indexOf("style")?e.getResource(o.parent.id).then((function(t){if(t)return be(n(n({},i),{resourceId:t.resource.id,connector:e}))})):be(n(n({},i),{resourceId:o.id,connector:e}))}var Le=function(){function t(){}return t.prototype.getExtent=function(){return o(this,void 0,void 0,(function(){return r(this,(function(t){return[2,this.getBounds()]}))}))},t.prototype.getBounds=function(t){return o(this,void 0,void 0,(function(){var e;return r(this,(function(n){switch(n.label){case 0:return this._extent?[2,this._extent]:this.item?(e=this,[4,xe(this.item,this.connector,t)]):[3,2];case 1:return e._extent=n.sent(),[2,this._extent];case 2:return[2]}}))}))},t}();function Pe(t,e){return o(this,void 0,void 0,(function(){var n,i,o,s,a;return r(this,(function(r){switch(r.label){case 0:return i=n=t.resource,o=t.keyname,s=t.resourceId,n?"string"!=typeof n?[3,1]:(o=n,[3,5]):[3,5];case 1:return"number"!=typeof n?[3,2]:(s=n,[3,5]);case 2:return i.resource&&void 0!==i.resource&&"resource"in i?(s=n.resource.id,[3,5]):[3,3];case 3:return[4,Pe(n,e)];case 4:s=r.sent(),r.label=5;case 5:return s||!o?[3,7]:[4,e.getResource(o)];case 6:(a=r.sent())&&(s=a.resource.id),r.label=7;case 7:return[2,s]}}))}))}function Me(t){return new Promise((function(e,n){var i=new XMLHttpRequest;i.onreadystatechange=function(){if(4===i.readyState&&200===i.status&&i.responseText)try{e(JSON.parse(i.responseText))}catch(t){n(t)}},i.open("GET",Y(t),!0),i.send()}))}var Ce={tms:"TILE"};var ke="https://qms.nextgis.com";function Ae(t,e,s){var a;if(void 0===e&&(e=ke),void 0===s&&(s={}),"webMap"in t){var u=t.webMap,h=t.url,c=i(t,["webMap","url"]);a=u,h&&(e=h),c&&(s=c)}else a=t;return e||(e=ke),function(){function t(t,e){this.map=t;var i=n(n({},s),e);this.options=i,this.options.baselayer=!0,i.qms&&(this.qms=i.qms)}return t.prototype.addLayer=function(i){return o(this,void 0,void 0,(function(){var o,s,u,h,c,l,p,d;return r(this,(function(r){switch(r.label){case 0:if(this.qms||!i.qmsId)return[3,4];r.label=1;case 1:return r.trys.push([1,3,,4]),o=this,[4,Me(e+"/api/v1/geoservices/"+i.qmsId)];case 2:return o.qms=r.sent(),[3,4];case 3:return s=r.sent(),console.error(s),[3,4];case 4:return(u=this.qms)&&(c=a.mapAdapter.layerAdapters[h=Ce[u.type||"tms"]])&&(m=t,_=c,["showLayer","hideLayer"].forEach((function(t){var e=Object.getOwnPropertyDescriptor(_.prototype,t);e&&Object.defineProperty(m.prototype,t,e)})),"TILE"===h)?(i=n(n({order:0,maxZoom:a.options.maxZoom,minZoom:a.options.minZoom},this.options),function(t){var e=("https:"===location.protocol?"https":"http")+"://",n=t.url.replace(/^(https?|ftp):\/\//,e);return t.y_origin_top||(n=n.replace("{y}","{-y}")),{url:n,name:t.name,attribution:t.copyright_text,maxZoom:t.z_max,minZoom:t.z_min}}(u)),u.origin_url&&(f=[],l=[u.origin_url.replace(/{switch:(.*?)}/,(function(t,e){return"string"==typeof e&&e.split(",").forEach((function(t){return f.push(t)})),"{s}"})),f],p=l[0],(d=l[1]).length&&(i.subdomains=d,i.url=p)),this.options=i,[2,new c(this.map,i).addLayer(i)]):[2]}var f,m,_}))}))},t}()}var Te=function(){function t(t){this.options={url:"https://qms.nextgis.com"},this.options=n(n({},this.options),t),this.url=this.options.url}return t.prototype.getLayerAdapters=function(){var t=this;return Promise.resolve([{name:"QMS",createAdapter:function(e){return Promise.resolve(t._createAdapter(e))}}])},t.prototype._createAdapter=function(t){return Ae({webMap:t,url:this.url})},t.utils={createQmsAdapter:Ae},t}();var Oe={srs:4326,geom_format:"geojson"};function Ee(t){return{geometry:t.geom,id:t.id,type:"Feature",properties:t.fields}}function Ie(t,e){var n=e.extensions,i=e.geom,o=e.fields,r=e.srs,s=e.ilike,a=e.like,u=n?n.join(","):"";"*"!==u&&(t.extensions=u),void 0!==o&&(t.fields=Array.isArray(o)?o.join(","):""),void 0!==i&&(t.geom=i?"yes":"no",i||(delete t.srs,delete t.geom_format)),B(s)?t.ilike=s:B(a)&&(t.like=a),B(r)&&(t.srs=r)}function Se(t){var e=Be(t);return S.all(e).then((function(e){for(var n=[],i=[],o=0,r=e;o<r.length;o++)for(var s=0,a=r[o];s<a.length;s++){var u=a[s];n.includes(u.id)||(i.push(u),n.push(u.id))}return t.offset||t.limit?i.splice(void 0!==t.offset?t.offset:0,void 0!==t.limit?t.limit:i.length):i}))}function ze(t){var e=t[0],n=t[1],i=t[2],o="id"!==e?"fld_":"",r="",s="",a=String(e).trim().replace(/^(%?)(.+?)(%?)$/,(function(t,e,n,i){return r=e,s=i,n})),u=r+i+s;return["".concat(o).concat(a,"__").concat(n),u]}function Be(t,e,i){void 0===e&&(e=[]),void 0===i&&(i=[]);var o=t.filters,r="string"==typeof o[0]?o[0]:"all",s=o.filter((function(t){return Array.isArray(t)}));if("any"===r)for(var u=0,h=s;u<h.length;u++){gt(f=h[u])?e.push(Ne(n(n({},t),{paramList:a(a([],i,!0),[ze(f)],!1)}))):Be(n(n({},t),{filters:f}),e,a([],i,!0))}else if("all"===r){for(var c=[],l=[],p=0,d=s;p<d.length;p++){var f;gt(f=d[p])?c.push(ze(f)):l.push(f)}if(l.length)for(var m=0,_=l;m<_.length;m++){var y=_[m];Be(n(n({},t),{filters:y}),e,a(a([],i,!0),c,!0))}else e.push(Ne(n(n({},t),{paramList:a(a([],i,!0),c,!0)})))}return e}function Ze(t){var e=t.map((function(t){var e=V(t[0],t[1]).map((function(t){return e=t,i=n?Number("1e+"+n):1,Math.round((e+Number.EPSILON)*i)/i;var e,n,i}));return e[0]+" "+e[1]}));return"POLYGON((".concat(e.join(", "),"))")}function Ne(t){var e=n({},Oe),i=t.limit,o=t.cache,r=t.signal,s=t.offset,a=t.orderBy,u=t.paramList,h=t.connector,c=t.geomFormat,l=t.intersects,p=t.resourceId;if(i?i!==Number.POSITIVE_INFINITY&&(e.limit=i):e.limit=7e3,s&&(e.offset=s),c&&(e.geom_format=c),Ie(e,t),a&&(e.order_by=a.join(",")),Array.isArray(l)){var d=function(t){return Array.isArray(t)&&4===t.length&&t.every((function(t){return"number"==typeof t}))}(l)?U(l):l;e.intersects=Ze(d)}else"string"==typeof l&&(e.intersects=l);u&&(e.paramList=u);var f=n({id:p},e);return h.get("feature_layer.feature.collection",{cache:o,signal:r},f)}function Re(t){var e,n=function(){var n=t[e];if(K(n)){var i=n;if(B(i.year)&&B(i.month)&&B(i.day)){var o=[i.year,i.month-1,i.day];"hour"in i&&[i.hour,i.minute,i.second].forEach((function(t){o.push(t)})),t[e]=(new(Date.bind.apply(Date,a([void 0],o,!1)))).toISOString()}}else"id"===e&&"string"==typeof n&&(t[e]=n.split(",").map(Number))};for(e in t)n();return t}function je(t){var e=t.filters;return e?Se(n(n({},t),{filters:e})).then((function(i){var o;return(null!==(o=t.clientFilterValidate)&&void 0!==o?o:De(e))&&(i=i.filter((function(t){return bt(Re(n(n({},t.fields),{id:t.id})),e)}))),i})):Ne(t)}function De(t){if("any"===t[0])return!0;for(var e=1;e<t.length;e++){var n=t[e];if("[object Array]"===Object.prototype.toString.call(n))if(De(n))return!0}return!1}function Fe(t){return function(t){return je(t).then((function(t){var e=[];return t.forEach((function(t){e.push(Ee(t))})),e}))}(t).then((function(t){return{type:"FeatureCollection",features:t}}))}var Ue=["fields","intersects","limit","orderBy","strategy"];function We(t){var e={};return Ue.forEach((function(n){var i=t[n];void 0!==i&&(e[n]=i)})),e}function He(t){var i,s;return o(this,void 0,void 0,(function(){var a,u,h,c,l,d,f,m,_,y,v,g,b,w,x,L,P=this;return r(this,(function(M){switch(M.label){case 0:return a=t.item,u=t.webMap,l=null==(c=t.addLayerOptionsPriority)||c,f=t.Adapter||u.mapAdapter.layerAdapters.GEOJSON,m=[],_=!1,[4,Pe(d=t.layerOptions,h=t.connector)];case 1:return g=M.sent(),(null===(s=null===(i=d.adapterOptions)||void 0===i?void 0:i.popupOptions)||void 0===s?void 0:s.fromProperties)&&(d.adapterOptions.popupOptions.createPopupContent=function(t){var e=t.feature;return e&&function(t,e){var n=document.createElement("div");if(e&&e.feature_layer)e.feature_layer.fields.forEach((function(e){if(e.grid_visibility){var i=t.properties&&t.properties[e.keyname];if(i){var o=document.createElement("div");n.appendChild(o),o.innerHTML="<span>".concat(e.display_name,"</span>: ").concat(i,"<span></span>")}}}));else if(t.properties)for(var i in t.properties){var o=document.createElement("div");n.appendChild(o),o.innerHTML="<span>".concat(i,"</span>: ").concat(t.properties[i],"<span></span>")}return n}(e,a)}),b=function(t,e){return o(P,void 0,void 0,(function(){return r(this,(function(i){switch(i.label){case 0:return x(),y={filters:t,options:e},[4,v=Fe(n({resourceId:g,filters:t,connector:h,cache:!0},e))];case 1:return[2,i.sent()]}}))}))},w=!1,x=function(){v&&(v.cancel(),v=void 0)},L=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e.emitter=new p.exports.EventEmitter,e}return e(i,t),i.prototype.addLayer=function(e){return o(this,void 0,void 0,(function(){var i,o,s,u,h;return r(this,(function(r){switch(r.label){case 0:return i=!e.data,o=void 0===e.waitFullLoad||e.waitFullLoad,void 0!==d.id&&(e.id=d.id),a&&a.vector_layer&&(e.type=$e[a.vector_layer.geometry_type]),d.adapterOptions&&(e=l?n(n({},d.adapterOptions),e):n(n({},e),d.adapterOptions)),e.data&&0===Object.keys(e.data).length&&(e.data=void 0,i=!1),this.options.strategy=s=e.strategy||void 0,u=t.prototype.addLayer.call(this,e),y={filters:e.propertiesFilter,options:We(e)},i&&(h=this.updateLayer()),o&&h?[4,h]:[3,2];case 1:r.sent(),r.label=2;case 2:return s&&s.startsWith("BBOX")&&!_&&this._addBboxEventListener(),[2,u]}}))}))},i.prototype.getExtent=function(){return this.getBounds()},i.prototype.getBounds=function(){return o(this,void 0,void 0,(function(){var e,n;return r(this,(function(i){return e=this.getLayers&&this.getLayers().length,(null==(n=this.options.strategy)?void 0:n.startsWith("BBOX"))||e?[2,we({connector:h,resourceId:a.resource.id})]:t.prototype.getBounds?[2,t.prototype.getBounds.call(this)]:[2]}))}))},i.prototype.beforeRemove=function(){w=!0,this._removeMoveEventListener(),this._removeBboxEventListener(),this.__disableMapMoveListener=void 0,this.__enableMapMoveListener=void 0,this.__onMapMove=void 0,this.__onMapMoveStart=void 0,x()},i.prototype.getCount=function(){return function(t){var e=t.cache;return t.connector.get("feature_layer.feature.count",{cache:void 0===e||e},{id:t.resourceId}).then((function(t){return t.total_count}))}({connector:h,resourceId:g,cache:!0})},i.prototype.updateLayer=function(e){var i;return o(this,void 0,void 0,(function(){var o,s,a,h,c,l,p,f,v,g,x;return r(this,(function(r){switch(r.label){case 0:return e=e||y||{},(null===(i=this.options.strategy)||void 0===i?void 0:i.startsWith("BBOX"))?[4,u.onLoad("create")]:[3,2];case 1:if(r.sent(),e.options=e.options||{},e.options.intersects=u.getBounds(),s=(o=this.options).minZoom,a=o.maxZoom,void 0!==(h=u.getZoom())){if(void 0!==s&&h<s)return[2];if(void 0!==a&&h>a)return[2];if(_)return[2]}r.label=2;case 2:if(w)return[2];r.label=3;case 3:return r.trys.push([3,10,,11]),this.emitter.emit("preupdate",e),u._emitLayerEvent("layer:preupdate",d.id||"",e),[4,b(e.filters,n(n({},e.options),{srs:this.options.srs}))];case 4:return c=r.sent(),l=c,[4,this.getCount()];case 5:if(p=r.sent(),"BBOX+"!==this.options.strategy)return[3,7];for(l={type:"FeatureCollection",features:[]},f=0,v=c.features;f<v.length;f++)g=v[f],-1===m.indexOf(String(g.id))&&(m.push(String(g.id)),l.features.push(g));return _=void 0!==p&&m.length>=p,[4,u.addLayerData(this,l)];case 6:return r.sent(),[3,9];case 7:return _=void 0!==p&&c.features.length>=p,[4,u.setLayerData(this,c)];case 8:r.sent(),r.label=9;case 9:return this.emitter.emit("updated",c),u._emitLayerEvent("layer:updated",d.id||"",{data:c,newData:l,isFull:_}),[3,11];case 10:if((x=r.sent())instanceof Error&&"CancelError"!==x.name)throw x;return[3,11];case 11:return t.prototype.updateLayer&&t.prototype.updateLayer.call(this),[2]}}))}))},i.prototype.propertiesFilter=function(t,e){return o(this,void 0,void 0,(function(){var i;return r(this,(function(o){switch(o.label){case 0:return x(),this.filter&&_?(this.filter((function(e){var i=e.feature&&e.feature.properties&&Re(n({},e.feature.properties));return!i||bt(i,t)})),[3,3]):[3,1];case 1:return this.setData?(this.clearLayer&&this.clearLayer(),[4,b(t,n(n({},e),{srs:this.options.srs}))]):[3,3];case 2:i=o.sent(),this.setData(i),o.label=3;case 3:return[2]}}))}))},i.prototype.removeFilter=function(){y=void 0,this.propertiesFilter([]),this.filter&&this.filter((function(){return!0}))},i.prototype._addBboxEventListener=function(){var t=this;this.__enableMapMoveListener=function(e){e===t&&(t._removeMoveEventListener(),t.updateLayer(),t._addMoveEventListener())},this.__disableMapMoveListener=function(e){e===t&&t._removeMoveEventListener()},u.emitter.on("layer:show",this.__enableMapMoveListener),u.emitter.on("layer:hide",this.__disableMapMoveListener),this.__enableMapMoveListener(this)},i.prototype._removeBboxEventListener=function(){this.__enableMapMoveListener&&u.emitter.on("layer:show",this.__enableMapMoveListener),this.__disableMapMoveListener&&u.emitter.on("layer:hide",this.__disableMapMoveListener)},i.prototype._addMoveEventListener=function(){var t=this;this.__onMapMove=j((function(){return t.updateLayer()})),this.__onMapMoveStart=x,u.emitter.on("movestart",this.__onMapMoveStart),u.emitter.on("moveend",this.__onMapMove)},i.prototype._removeMoveEventListener=function(){this.__onMapMove&&u.emitter.removeListener("moveend",this.__onMapMove),this.__onMapMoveStart&&u.emitter.removeListener("movestart",this.__onMapMoveStart)},i}(f),[2,L]}}))}))}function Ve(t){var e,n,i=t.options,o=t.webMap,r=t.baseUrl,s=i.adapter||"IMAGE",a=o&&o.getLayerAdapters(),u=i.resource,h=i.tileNoData?i.tileNoData:200;if("number"==typeof u){if("IMAGE"===s){if(!a||a.IMAGE)return function(t){var e=t.resourceId,n=t.nd,i=t.headers,o=t.baseUrl+"/api/component/render/image",r={resource:e};return n&&(r.nd=n),{url:o,resourceId:e,headers:i,params:r,updateWmsParams:function(t){return n&&(t.nd=n),Qe(t,e)}}}({resourceId:u,headers:i.headers,nd:h,baseUrl:r});s="TILE"}if("WMS"===s){n="".concat(r,"/api/resource/").concat(u,"/wms");var c=i.adapterOptions;return{url:n,format:"image/png",version:"1.1.1",layers:c&&c.layers,headers:i.headers}}if("MVT"===s)return{url:n=r+"/api/component/feature_layer/mvt?x={x}&y={y}&z={z}&resource="+u+"&simplification="+(null!==(e=i.simplification)&&void 0!==e?e:6),sourceLayer:"ngw:"+u,featureIdName:"$id"};if("TERRAIN"===s)return{url:n=r+"/api/resource/".concat(u,"/terrain_provider"),adapter:s};if("MODEL_3D"===s)return{url:n=r+"/api/component/model_3d/".concat(u,"/data.glb")};if("TILE"===s)return{url:n=r+"/api/component/render/tile?z={z}&x={x}&y={y}&resource="+u+"&nd="+h,adapter:s}}else{if(void 0!==u)throw new Error("Option `resource` must be number, not "+typeof u);console.log("Option `resource` not set")}}function qe(t){var i=t.layerOptions,s=t.webMap,a=t.connector,u=t.item;return o(this,void 0,void 0,(function(){var t,h,c,l,p,d;return r(this,(function(f){switch(f.label){case 0:return t=u.resource.cls,h={wmsserver_service:"WMS",tmsclient_layer:"IMAGE"},void 0!==(c=i.adapter||t&&h[t]||"IMAGE")&&(i.adapter=c),"IMAGE"===c&&(l=s.getLayerAdapters(),!l||l.IMAGE||(c="TILE")),(p=s.mapAdapter.layerAdapters[c])?[4,Pe(i,a)]:[3,2];case 1:return d=f.sent(),[2,function(t){function h(e,o){var r=t.call(this,e,o)||this;r.map=e,r.item=u,r.resourceId=d;var h=Ve({options:i,webMap:s,baseUrl:a.options.baseUrl||""});if(h){var c=n(n(n({},h),i.adapterOptions),{params:{resource:d},layers:h.layers||String(d),resourceId:d});i.adapterOptions&&B(i.adapterOptions.setViewDelay)&&(c.setViewDelay=i.adapterOptions.setViewDelay),r.options=n(n({},r.options),c)}return r}return e(h,t),h.prototype.addLayer=function(e){return t.prototype.addLayer.call(this,n(n({},this.options),e))},h.prototype.getLegend=function(t){return o(this,void 0,void 0,(function(){var e,i,o;return r(this,(function(r){switch(r.label){case 0:return[4,a.get("render.legend_symbols",n({params:{id:d},cache:!0},t))];case 1:return e=r.sent(),void 0!==(i=this.options.id)?(o={layerId:i,legend:e.map((function(t){return{name:t.display_name,symbol:t.icon}}))},[2,[o]]):[2,[]]}}))}))},h.prototype.getIdentificationIds=function(){return o(this,void 0,void 0,(function(){var t;return r(this,(function(e){if(this.item){if("MVT"===c)return[2,[this.item.resource.id]];if(B(t=this.item.resource.parent.id))return[2,[t]]}return[2,[]]}))}))},h}(p)];case 2:throw new Error(c+" not supported yet. Only TILE")}}))}))}var Ge={},Je=["mapserver_style","qgis_vector_style","qgis_raster_style","wmsserver_service","raster_style","basemap_layer","vector_layer","raster_layer","postgis_layer","webmap","tmsclient_layer"];function Ke(t){var e=t.layerOptions,i=t.webMap,s=t.connector,a=t.item;return o(this,void 0,void 0,(function(){var t,o;return r(this,(function(r){switch(r.label){case 0:return[4,s.getResourceChildren(a.resource.id)];case 1:return t=r.sent(),(o=t&&t[0])?[2,Ye(n(n({},e),{resource:o.resource.id}),i,s)]:[2]}}))}))}function Ye(t,i,s){return o(this,void 0,void 0,(function(){var a,u,h,c,l,p,d,f,m,_,y,v,g,b;return r(this,(function(w){switch(w.label){case 0:return h=t.adapter,[4,Pe(t,s)];case 1:return(c=w.sent())?(l=t.resource)&&l.resource&&void 0!==l.resource.id?(u=l,[3,4]):[3,2]:[3,15];case 2:return[4,s.getResource(c)];case 3:u=w.sent(),w.label=4;case 4:return u?(p=u.resource.cls,d=n(n({},t),{resource:c}),f={layerOptions:d,webMap:i,connector:s,item:u},-1===Je.indexOf(p)?[3,12]:"webmap"!==p?[3,5]:(a=function(t){var n=t.layerOptions,i=t.webMap,s=t.connector;return o(this,void 0,void 0,(function(){var t;return r(this,(function(o){switch(o.label){case 0:return[4,Pe(n,s)];case 1:return t=o.sent(),[2,function(n){function o(e){return n.call(this,e,{url:"",webMap:i,resourceId:t,connector:s})||this}return e(o,n),o}(on)]}}))}))}(f),[3,11])):[3,14];case 5:if("vector_layer"!==p&&"postgis_layer"!==p)return[3,6];if(m=u.vector_layer&&$e[u.vector_layer.geometry_type],(_=f.layerOptions.adapterOptions||{}).type=_.type||m,f.layerOptions.adapterOptions=_,t.adapterOptions=f,void 0!==h&&"GEOJSON"!==h){if("MVT"!==h)return[2,Ke(f)];a=qe(f)}else a=He(f);return[3,11];case 6:return"raster_layer"!==p?[3,7]:[2,Ke(f)];case 7:return"basemap_layer"!==p?[3,8]:(a=function(t){var i=t.webMap,s=t.item;return o(this,void 0,void 0,(function(){var t,a,u,h,c;return r(this,(function(l){if(s.basemap_layer){if(a=s.basemap_layer.url,t=s.basemap_layer.qms)return u=JSON.parse(t),[2,Promise.resolve(Te.utils.createQmsAdapter(i,void 0,{qms:u,baselayer:!0}))];if(a&&(h=i.mapAdapter.layerAdapters.TILE))return c=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return e(i,t),i.prototype.addLayer=function(e){return o(this,void 0,void 0,(function(){return r(this,(function(i){return[2,t.prototype.addLayer.call(this,n(n({},e),{url:a}))]}))}))},i}(h),[2,c]}return[2]}))}))}(f),[3,11]);case 8:return"GEOJSON"!==h?[3,10]:[4,s.getResource(u.resource.parent.id)];case 9:return(y=w.sent())&&(v=n(n({},t),{resource:u.resource.parent.id}),a=He(n(n({},f),{item:y,layerOptions:v}))),[3,11];case 10:a=qe(f),w.label=11;case 11:return[3,13];case 12:if(!Ge[p])throw"Resource class '".concat(p,"' not yet supported.");g=Ge[p],b=void 0,(b=h&&"function"!=typeof b?g[h]:g)&&(a=b(f)),w.label=13;case 13:return[3,15];case 14:throw"Resource item is not found";case 15:return a?[2,a.then((function(t){if(t){var e=t;return u&&(e.prototype.item=u,e.prototype.resourceId=u.resource.id,e.prototype.connector=s),z(e,[Le],{replace:!1}),e}}))]:[2]}}))}))}function Qe(t,e){var n=t.bbox,i=t.width,o=t.height,r=t.nd;return{resource:Array.isArray(e)?e.join(","):e,extent:n,size:i+","+o,timestamp:Date.now(),nd:null!=r?r:200}}var Xe,$e={POINT:"point",LINESTRING:"line",POLYGON:"polygon",MULTIPOINT:"point",MULTILINESTRING:"line",MULTIPOLYGON:"polygon",POINTZ:"point",LINESTRINGZ:"line",POLYGONZ:"polygon",MULTIPOINTZ:"point",MULTILINESTRINGZ:"line",MULTIPOLYGONZ:"polygon"};function tn(t,e){void 0===e&&(e=0);var n=e,i=function(){if(void 0===Xe){var t=document.createElement("div");t.style.cssText="position: absolute; left: -100%; top: -100%; width: 100cm;",document.body.appendChild(t);var e=t.offsetWidth;document.body.removeChild(t),Xe=e}return Xe}()*function(t){return 12756274*Math.PI*Math.cos(t*Math.PI/180)}(n)/t,o=function(t){return Math.log(t/256)/Math.LN2}(i);return o}var en=function(t){function i(e,o,r,s,a,u){var h=t.call(this,n(n({},i.options),r))||this;if(h.webMap=e,h.emitter=new p.exports.EventEmitter,h._rootDescendantsCount=0,s&&(h.connector=s),a&&h.tree.setParent(a),h.item=o,"root"===h.item.item_type)h._rootDescendantsCount=h._sumUp(h.item.children);else{var c=h.tree.getRoot();c&&(h._rootDescendantsCount=c._rootDescendantsCount)}return h.initProperties(),u||h._init(o),h}return e(i,t),i.create=function(t,e,n,s,a){return o(this,void 0,void 0,(function(){var o;return r(this,(function(r){switch(r.label){case 0:return[4,(o=new i(t,e,n,s,a,!0))._init(e)];case 1:return r.sent(),[2,o]}}))}))},i.prototype.initItem=function(t){return"group"===t.item_type||"root"===t.item_type?this.initGroupItem(t):this.initLayerItem(t)},i.prototype.bringToFront=function(){},i.prototype.fit=function(){},i.prototype.getLayer=function(){return this.layer},i.prototype.getLegend=function(t){var e;return o(this,void 0,void 0,(function(){var i,o,s,a;return r(this,(function(r){switch(r.label){case 0:return void 0===(i=null===(e=this.layer)||void 0===e?void 0:e.id)?[3,2]:(o=this.connector)?[4,o.get("render.legend_symbols",n({params:{id:this.item.resourceId},cache:!0},t))]:[3,2];case 1:return s=r.sent(),a={layerId:i,legend:s.map((function(t){return{name:t.display_name,symbol:t.icon}}))},[2,[a]];case 2:return[2,[]]}}))}))},i.prototype.getItemOptions=function(t){var e,n="layer"===t.item_type&&t.layer_transparency,i="number"==typeof n?(100-n)/100:void 0,o={visibility:!1,name:t.display_name,headers:this.options.headers,crossOrigin:this.options.crossOrigin,setViewDelay:this.options.setViewDelay,params:{resource:this.item.resourceId,item:this.item}};if(this.options.order){var r=String(this.options.drawOrderEnabled&&"draw_order_position"in t?this._rootDescendantsCount-t.draw_order_position:this.id).padStart(4,"0");o.order=Number((0|this.options.order)+"."+r)}if(this.options.popupOptions&&(o.popupOptions=this.options.popupOptions),"layer"===t.item_type){var s=(e=this._getZoomRange(t)).maxZoom;Object.assign(o,{updateWmsParams:t.updateWmsParams,url:t.url,headers:this.options.headers,ratio:this.options.ratio,maxZoom:s,minZoom:e.minZoom,minScale:t.layer_min_scale_denom,maxScale:t.layer_max_scale_denom,interactive:t.layer_identifiable})}return void 0!==i&&(o.opacity=i),o},i.prototype.getChildren=function(t){return a([],t.children,!0).reverse()},i.prototype._mapScaleToZoomLevel=function(t){return tn(t)},i.prototype.initGroupItem=function(t){if(t.children&&t.children.length)for(var e=0,n=this.getChildren(t);e<n.length;e++){var i=new this.constructor(this.webMap,n[e],this.options,this.connector,this);this.tree.addChild(i)}return Promise.resolve()},i.prototype.initLayerItem=function(t){var e,n=this,o=this.getItemOptions(t),r=function(e){t._layer=e,n.layer=e,n.properties.get("visibility")&&n.properties.set("visibility",!0),void 0!==o.opacity&&n.webMap.setLayerOpacity(e,o.opacity)};if("layer"===t.item_type)e=t.adapter||t.layer_adapter.toUpperCase();else if(i.GetAdapterFromLayerType[t.item_type]){e=(0,i.GetAdapterFromLayerType[t.item_type])(t,o,this.webMap,this.connector)}return e?this.webMap.addLayer(e,o).then((function(t){r(t)})):t._layer?Promise.resolve(r(t._layer)):Promise.reject("No layer added")},i.prototype._getZoomRange=function(t){var e=this.options.minZoom,n=this.options.maxZoom,i=t.layer_min_scale_denom?this._mapScaleToZoomLevel(t.layer_min_scale_denom):void 0,o=t.layer_max_scale_denom?this._mapScaleToZoomLevel(t.layer_max_scale_denom):void 0,r=[e,i].filter(Boolean),s=[n,o].filter(Boolean);return{minZoom:r.length?Math.max.apply(Math,r):void 0,maxZoom:s.length?Math.min.apply(Math,s):void 0}},i.prototype._init=function(t){var e=this;this.initItem(t).then((function(){e.emitter.emit("init")}))},i.prototype._sumUp=function(t,e){void 0===e&&(e=0);for(var n=0,i=t;n<i.length;n++){var o=i[n];"layer"===o.item_type?(e+=1,o.draw_order_position=o.draw_order_position||e):"group"===o.item_type&&(e=this._sumUp(o.children,e))}return e},i.GetAdapterFromLayerType={},i.options={properties:[{type:"boolean",name:"visibility",getProperty:function(t){if(t){if("group"===t.item.item_type||"root"===t.item.item_type)return re(t.item,(function(t){return"layer_enabled"in t&&t.layer_enabled}),(function(t){return t.children}));if("layer"===t.item.item_type)return t.item.layer_enabled}return!1},onSet:function(t,e,n){n&&"layer"===n.item.item_type&&(n.layer&&(t?n.webMap.showLayer(n.layer):n.webMap.hideLayer(n.layer)),n.item.layer_enabled=t)}},{name:"opacity",handler:ve}]},i}(ye);function nn(t){var e=t.webMap,i=t.connector,s=t.item,a=t.adapterOptions,u=void 0===a?{}:a,h=t.idPrefix,c=void 0===h?"first-show-adapter":h;return o(this,void 0,void 0,(function(){var t;return r(this,(function(a){return t=function(t){var e=t.webMap,i=t.adapterOptions,s=void 0===i?{}:i,a=t.onLayerAdded,u=t.createAdapter;return o(this,void 0,void 0,(function(){var t;return r(this,(function(i){return t=function(){function t(){this.options={},this.layer=[],this._removed=!1,this._creatingInProgress=!1}return t.prototype.addLayer=function(){return this.layer},t.prototype.removeLayer=function(){this._removed=!0;for(var t=0,n=this.layer;t<n.length;t++)e.removeLayer(n[t])},t.prototype.destroyed=function(){return this._removed},t.prototype.showLayer=function(){return o(this,void 0,void 0,(function(){var t,n;return r(this,(function(i){switch(i.label){case 0:if(this.options.visibility=!0,!this.layer.length)return[3,5];t=0,n=this.layer,i.label=1;case 1:return t<n.length?[4,e.showLayer(n[t])]:[3,4];case 2:i.sent(),i.label=3;case 3:return t++,[3,1];case 4:return[3,7];case 5:return[4,this.loadLayer()];case 6:i.sent(),i.label=7;case 7:return[2]}}))}))},t.prototype.hideLayer=function(){return o(this,void 0,void 0,(function(){var t,n;return r(this,(function(i){switch(i.label){case 0:if(this.options.visibility=!1,!this.layer)return[3,4];t=0,n=this.layer,i.label=1;case 1:return t<n.length?[4,e.hideLayer(n[t])]:[3,4];case 2:i.sent(),i.label=3;case 3:return t++,[3,1];case 4:return[2]}}))}))},t.prototype.loadLayer=function(){return o(this,void 0,void 0,(function(){var t,i,o;return r(this,(function(r){switch(r.label){case 0:return this.layer.length||this._creatingInProgress?[3,5]:(this._creatingInProgress=!0,[4,u(this)]);case 1:return(t=r.sent())?[4,(i=new t(e.mapAdapter.map,n({},s))).addLayer({order:this.options.order,headers:this.options.headers,baselayer:this.options.baselayer})]:[3,5];case 2:return o=r.sent(),a&&a(i),Object.assign(i.options,s),i.layer=o,this._removed&&e.removeLayer(i),this.layer.push(i),this.options.visibility?[4,e.showLayer(i)]:[3,4];case 3:r.sent(),r.label=4;case 4:this._creatingInProgress=!1,r.label=5;case 5:return[2,this.layer]}}))}))},t}(),[2,t]}))}))}({webMap:e,adapterOptions:u,onLayerAdded:function(t){t.options.baselayer=!1,t.id=c+"-"+s.resource_id},createAdapter:function(){return Ye({resource:s.resource_id,adapterOptions:{name:s.display_name,opacity:s.opacity}},e,i)}}),[2,t]}))}))}var on=function(){function t(t,e){this.map=t,this.options=e,this.NgwWebmapItem=en,this.pixelRadius=10,this.webmapClassName="webmap",this.emitter=new p.exports.EventEmitter,this._webmapBaselayersIds=[];var n=e.resourceId;if(Array.isArray(n)?(this.resourceId=n[0],this.options.id=n[1]):this.resourceId=n,!this.resourceId)throw new Error("NGW `resourceId` is not defined")}return t.prototype.addLayer=function(t){var e,i;return o(this,void 0,void 0,(function(){var o,s;return r(this,(function(r){switch(r.label){case 0:return this.options=n(n({},this.options),t),o=this,[4,this._getWebMapLayerItem()];case 1:return o.layer=r.sent(),s=null===(i=null===(e=this.response)||void 0===e?void 0:e.webmap)||void 0===i?void 0:i.extent_constrained,this.options.useExtentConstrained&&this._extent&&s&&this.options.webMap.setView({maxBounds:this._extent}),[2,this.layer]}}))}))},t.prototype.removeLayer=function(){var t=this.options.webMap.mapAdapter;if(this.getDependLayers().forEach((function(e){"layer"in e&&t.removeLayer(e.layer.layer)})),this._webmapBaselayersIds.length){for(var e=0,n=this._webmapBaselayersIds;e<n.length;e++){this.options.webMap.removeLayer(n[e])}this._lastActiveBaselayer&&this.options.webMap.showLayer(this._lastActiveBaselayer)}this.options.useExtentConstrained&&this._extent&&this.options.webMap.setView({maxBounds:null}),delete this.layer,delete this.response,delete this._webmapLayersIds},t.prototype.showLayer=function(){return o(this,void 0,void 0,(function(){return r(this,(function(t){return this.layer&&this.layer.properties?[2,this.layer.properties.property("visibility").set(!0)]:[2]}))}))},t.prototype.hideLayer=function(){return o(this,void 0,void 0,(function(){return r(this,(function(t){return this.layer&&this.layer.properties?[2,this.layer.properties.property("visibility").set(!1)]:[2]}))}))},t.prototype.setOpacity=function(t){return o(this,void 0,void 0,(function(){return r(this,(function(e){return this.layer&&this.layer.properties?[2,this.layer.properties.property("opacity").set(t)]:[2]}))}))},t.prototype.getExtent=function(){return this.getBounds()},t.prototype.getBounds=function(){var t=this.response&&this.response.webmap;if(t)return ge(t)},t.prototype.getDependLayers=function(){return this.layer&&this.layer.tree.getDescendants()||[]},t.prototype.getBookmarksResourceId=function(){var t=this.response&&this.response.webmap;if(t)return t.bookmark_resource.id},t.prototype.fetchBookmarks=function(){var t=this.getBookmarksResourceId(),e=this.options.connector;if(t)return e.getResourceOrFail(t).then((function(n){var i,o=null===(i=n.feature_layer)||void 0===i?void 0:i.fields.find((function(t){return t.label_field})),r=o&&o.keyname;return je({connector:e,resourceId:t,geom:!1,fields:r?[r]:void 0}).then((function(n){for(var i=[],o=0,s=n;o<s.length;o++){var a=new oe({item:s[o],resourceId:t,labelField:r,connector:e});i.push(a)}return i}))}));throw new Error("Webmap was not loaded correctly, it is impossible to extract bookmarks")},t.prototype.getLegend=function(){return o(this,void 0,void 0,(function(){var t,e,n,i,o;return r(this,(function(r){switch(r.label){case 0:t=[],e=(e=this.getDependLayers()).sort((function(t,e){return e.id-t.id})),n=0,i=e,r.label=1;case 1:return n<i.length?[4,i[n].getLegend()]:[3,4];case 2:o=r.sent(),t.push.apply(t,o),r.label=3;case 3:return n++,[3,1];case 4:return[2,t]}}))}))},t.prototype.getIdentificationIds=function(){return o(this,void 0,void 0,(function(){var t,e,n;return r(this,(function(i){switch(i.label){case 0:return t=[],(e=this._webmapLayersIds)?[3,2]:[4,this._getWebMapIds()];case 1:e=i.sent(),this._webmapLayersIds=e,i.label=2;case 2:return e&&e.length&&(n=(n=this.getDependLayers()).sort((function(t,e){return e.id-t.id})),n.forEach((function(e){var n=e.item,i=n.parentId;if(void 0!==i&&"layer"===n.item_type&&n.layer_identifiable){var o=e.properties.property("visibility");o.get()&&!o.isBlocked()&&t.push(i)}}))),[2,t]}}))}))},t.prototype._getWebMapLayerItem=function(){return o(this,void 0,void 0,(function(){var t,e=this;return r(this,(function(n){switch(n.label){case 0:return this.resourceId?[4,this.getWebMapConfig(this.resourceId)]:[3,2];case 1:if((t=n.sent())&&t.root_item)return[2,new Promise((function(n){var i={};if(e.options.connector&&e.options.connector.options.auth){var o=e.options.connector.getAuthorizationHeaders();o&&(i.headers=o)}i.setViewDelay=e.options.setViewDelay,i.order=e.options.order,i.ratio=e.options.ratio,i.crossOrigin=e.options.crossOrigin,i.minZoom=e.options.minZoom,i.maxZoom=e.options.maxZoom,i.drawOrderEnabled=t.draw_order_enabled,i.popupOptions=e.options.popupOptions;var r=new e.NgwWebmapItem(e.options.webMap,t.root_item,i,e.options.connector);r.emitter.on("init",(function(){return n(r)}))}))];n.label=2;case 2:return[2]}}))}))},t.prototype.getWebMapConfig=function(t){return o(this,void 0,void 0,(function(){var e,n;return r(this,(function(i){switch(i.label){case 0:return[4,this.options.connector.getResource(t)];case 1:return(e=i.sent())&&(this.response=e,n=e[this.webmapClassName],this._setupBaselayers(e),n)?(this._extent=[n.extent_left,n.extent_bottom,n.extent_right,n.extent_top],this._updateItemsParams(n.root_item,this.options.webMap,e),[2,n]):[2]}}))}))},t.prototype._setupBaselayers=function(t){var e,n=this.options.webMap;if(null===(e=this.options.useBasemap)||void 0===e||e)if(t.basemap_webmap&&t.basemap_webmap.basemaps.length){var i=n.getActiveBaseLayer();this._lastActiveBaselayer=i?i.id:void 0,this._setBasemaps(t.basemap_webmap)}else this.options.defaultBasemap&&n.addBaseLayer("OSM",{id:"webmap-default-baselayer",name:"OpenStreetMap"})},t.prototype._setBasemaps=function(t){for(var e=this,n=this.options.webMap,i=!1,o=function(t){nn({webMap:n,connector:r.options.connector,item:t,adapterOptions:{crossOrigin:r.options.crossOrigin}}).then((function(o){var r=!i&&t.enabled;return t.enabled&&(i=!0),n.addBaseLayer(o,{id:an+t.resource_id,name:t.display_name,opacity:t.opacity,visibility:r}).then((function(t){t.id&&e._webmapBaselayersIds.push(t.id)}))}))},r=this,s=0,a=t.basemaps;s<a.length;s++){o(a[s])}},t.prototype._updateItemsParams=function(t,e,i){var o=this;if(t)if("group"===t.item_type||"root"===t.item_type)t.children&&(t.children=t.children.map((function(t){return o._updateItemsParams(t,e,i)}))),"root"===t.item_type&&(t.display_name=i.resource.display_name);else if("layer"===t.item_type){var r=Y(this.options.connector.options.baseUrl+"/api/component/render/image"),s=t.layer_style_id;t.url=r,t.resourceId=s,t.updateWmsParams=function(t){return Qe(t,s)};var a=Ve({options:{adapter:t.layer_adapter.toUpperCase(),resource:s},webMap:e,baseUrl:this.options.connector.options.baseUrl||""});t=n(n({},t),a)}return t},t.prototype._getWebMapIds=function(){return o(this,void 0,void 0,(function(){var t,e,n,i,o,s,a;return r(this,(function(r){switch(r.label){case 0:if(!(t=this.layer)||"root"!==t.item.item_type)return[3,2];for(e=t.tree.getDescendants(),n=[],i=function(t){var e=t.item;if("layer"===e.item_type){var i=o.options.connector.getResource(e.layer_style_id).then((function(t){if(t){var n=Number(t.resource.parent.id);return e.parentId=n,n}}));n.push(i)}},o=this,s=0,a=e;s<a.length;s++)i(a[s]);return[4,Promise.all(n)];case 1:return[2,r.sent().filter((function(t){return void 0!==t}))];case 2:return[2]}}))}))},t}(),rn=function(){function t(t){if(this.options=t,this.options.connector)this.url=this.options.connector.options.baseUrl||"",this.connector=this.options.connector;else{if(!this.options.baseUrl)throw new Error("url is not defined");this.url=this.options.baseUrl,this.connector=new ie({baseUrl:this.url,auth:this.options.auth})}}return t.addClassAdapters=function(t,e){Ge[t]=e},t.prototype.onLoadSync=function(t){return o(this,void 0,void 0,(function(){var e,i,o;return r(this,(function(r){switch(r.label){case 0:if(!this.options.resourceId||!this.url)return[3,4];if(!(e=[this.options.resourceId]).length)return[3,4];i=0,o=e,r.label=1;case 1:return i<o.length?[4,t.addLayer(on,n({visibility:!0,fit:!0,pixelRadius:this.options.pixelRadius},{resourceId:o[i],connector:this.connector,webMap:t}))]:[3,4];case 2:return[2,r.sent()];case 3:return i++,[3,1];case 4:return[2]}}))}))},t.prototype.getLayerAdapters=function(){return Promise.resolve([this._getLayerAdapter()])},t.prototype._getLayerAdapter=function(){var t=this;return{name:"WEBMAP",createAdapter:function(e){return Promise.resolve(t._createAdapter(e))}}},t.prototype._createAdapter=function(t){var i;return i={webMap:t,connector:this.connector,baseUrl:this.url},function(t){function o(e,o){return o=n(n({},i),o),t.call(this,e,o)||this}return e(o,t),o}(on)},t}(),sn=function(){function t(t){var e=t.feature;this.id=e.id,this.geom=e.geom,this.label=e.label,this.parent=e.parent,this.fields=e.fields,this.layerId=e.layerId,this.connector=t.connector}return t.prototype.identify=function(t){var e=this;return void 0===t&&(t={}),this._item?S.resolve(this._item):un(n({connector:this.connector,featureId:this.id,resourceId:this.layerId,fields:null,extensions:["attachment","description"]},t)).then((function(t){return e._item=t,e.geom=t.geom,e.extensions=t.extensions,t}))},t.prototype.resource=function(){var t=this;return this._resource?S.resolve(this._resource.feature_layer):this.connector.getResource(this.layerId).then((function(e){return t._resource=e,t._resource.feature_layer}))},t.prototype.getBounds=function(){return this._extent?S.resolve(this._extent):(t={connector:this.connector,featureId:this.id,resourceId:this.layerId}).connector.get("feature_layer.feature.item_extent",{cache:void 0===(e=t.cache)||e},{id:t.resourceId,fid:t.featureId}).then((function(t){if(t){var e=t.extent;return[e.minLon,e.minLat,e.maxLon,e.maxLat]}}));var t,e},t.prototype.geojson=function(){var t=this;return this._geojson?S.resolve(this._geojson):this.identify().then((function(e){return e.toGeojson().then((function(e){return t._geojson=e,e}))}))},t}(),an="webmap-baselayer";function un(t){var e=n({},Oe);Ie(e,t);var i=n({id:t.resourceId,fid:t.featureId},e);return t.connector.get("feature_layer.feature.item",{cache:t.cache||!0},i).then((function(e){return n(n({},e),{toGeojson:function(){return e.geom?S.resolve(Ee(e)):un(n(n({},t),{geom:!0,fields:null,extensions:null})).then((function(t){var i=t.geom;return Ee(n(n({},e),{geom:i}))}))}})}))}function hn(t){return un(t).then((function(t){return Ee(t)}))}function cn(t,e){void 0===e&&(e=!1);var n=[],i=[];for(var o in t){var r=Number(o);isNaN(r)||n.push(r)}var s=t.resources;s&&n.sort((function(t,e){return s.indexOf(t)-s.indexOf(e)}));for(var a=0;a<n.length;a++){var u=t[o=n[a]];if("features"in u){var h=ln(u.features,Number(o),e);if(h.length&&(i.push.apply(i,h),!e))break}}return i}function ln(t,e,n){for(var i=[],o=0,r=t;o<r.length;o++){var s=r[o];if(i.push({featureId:s.id,resourceId:e,feature:s}),!n)break}return i}function pn(t){var e=t.geom,n=t.signal,i=t.cache,o=t.layers,r="string"==typeof e?e:function(t){var e=function(t){var e;if(Array.isArray(t))return t;if("Feature"===t.type)return null===(e=t.geometry)||void 0===e?void 0:e.coordinates[0];if("Polygon"===t.type)return t.coordinates[0];return null}(t);if(!e)return null;var n=e.map((function(t){var e=V(t[0],t[1]),n=e[1];return"".concat(e[0]," ").concat(n)}));return"POLYGON((".concat(n.join(","),"))")}(e);if(!r)throw new Error("Not valid geometry format to make intersection");return t.connector.post("feature_layer.identify",{data:{geom:r,srs:3857,layers:o},signal:n,cache:i})}function dn(t,e){R(t);var i=t.lngLat,o=e.geom,r=e.signal,s=e.cache,a=null!=o?o:function(t,e,n,i){void 0===n&&(n=10),void 0===i&&(i=6);for(var o=n/D*H,r=o/Math.cos(e*W),s=[],a=0;a<i+1;a++){var u=Math.PI*(a/(i/2)),h=t+r*Math.cos(u),c=e+o*Math.sin(u);s.push([h,c])}return s}(i[0],i[1],e.radius);return pn(n(n({},e),{geom:a,signal:r,cache:s}))}function fn(t,e){var n;return o(this,void 0,void 0,(function(){var i,o,s,a,u,h,c;return r(this,(function(r){switch(r.label){case 0:return[4,t.get("pyramid.settings",null,{component:"pyramid"})];case 1:if(!((i=r.sent())&&i.company_logo&&i.company_logo.enabled))return[3,6];(o=document.createElement("a")).style.position="absolute",o.style.bottom="0",o.style.right="0",o.style.padding=null!==(n=null==e?void 0:e.padding)&&void 0!==n?n:"10px",o.className="ngw-map-logo",e&&e.cssClass&&(o.className+=" "+e.cssClass),(s=new Image).style.maxHeight="100px",s.style.maxWidth="100px",s.src="",r.label=2;case 2:return r.trys.push([2,4,,5]),[4,t.get("pyramid.company_logo",{responseType:"blob"})];case 3:return a=r.sent(),u=window.URL||window.webkitURL,h=u.createObjectURL(a),s.src=h,[3,5];case 4:return c=r.sent(),console.warn(c),[3,5];case 5:return null!==i.company_logo.link&&""!==i.company_logo.link.trim()&&(o.href=i.company_logo.link,o.target="_blank",-1!==i.company_logo.link.search(/:\/\/nextgis/)&&(s.alt="Get your own Web GIS at nextgis.com")),o.appendChild(s),[2,o];case 6:return[2]}}))}))}var mn={brill:'<path d="m6 0-5 6 5 6 5-6z"/>',circle:'<circle cx="6" cy="6" r="6"/>',rect:'<rect width="12" height="12"/>',marker:'<path d="m6 0c-1.85 0-4 1.19-4 4.22 0 2.05 3.08 6.59 4 7.78 0.821-1.19 4-5.62 4-7.78 0-3.03-2.15-4.22-4-4.22z"/>',cross:'<path d="M 2.4,12 6,8.4 9.6,12 12,9.6 8.4,6 12,2.4 9.6,0 6,3.6 2.4,0 0,2.4 3.6,6 0,9.6 Z"/>',star:'<path d="m6 0.25 1.71 4.18 4.29-1.04e-4 -3.43 3.14 0.857 4.18-3.43-3.14-3.43 3.14 0.857-4.18-3.43-3.14 4.29-0.209z"/>',triangle:'<path d="m12 11.7h-12l6-11.2z"/>',plus:'<path d="m7.5 12v-4.5h4.5v-3h-4.5v-4.5h-3v4.5h-4.5v3h4.5v4.5z"/>',minus:'<path d="m12 7.5v-3h-12v3z"/>',asterisk:'<path d="m7.59 12v-3.27l2.83 1.64 1.58-2.74-2.85-1.64 2.83-1.64-1.56-2.74-2.83 1.64v-3.24h-3.17v3.24l-2.85-1.64-1.57 2.74 2.84 1.64-2.84 1.64 1.57 2.74 2.85-1.64v3.27z"/>'},_n=12;function yn(t){var e,n,i,o,r,s;void 0===t&&(t={});var a=null!==(e=t.shape)&&void 0!==e?e:"circle",u=null!==(n=t.color)&&void 0!==n?n:"blue",h=null!==(i=t.strokeColor)&&void 0!==i?i:"white",c=null!==(o=t.size)&&void 0!==o?o:_n,l=null!==(r=t.rotate)&&void 0!==r?r:0,p=null!==(s=t.anchor)&&void 0!==s?s:[c/2,c/2],d=void 0!==t.stroke?Number(t.stroke):.8,f=t.p||mn[a]||"circle",m="string"==typeof f?f:f(t),_=function(t){return(new DOMParser).parseFromString(t,"image/svg+xml").documentElement}(t.svg||function(t){var e=t.height,n=t.stroke,i=void 0===n?0:n,o=t.content,r=i/2;return'<svg\n version="1.1"\n xmlns="http://www.w3.org/2000/svg"\n width="'.concat(t.width,'"\n height="').concat(e,'"\n viewBox="-').concat(r," -").concat(r," ").concat(_n+i," ").concat(_n+i,'"\n >').concat(o,"</svg>")}({width:c,height:c,stroke:d,content:m}));return _.setAttribute("width",String(c)),_.setAttribute("height",String(c)),_.setAttribute("fill",u),d&&(_.setAttribute("stroke",h),_.setAttribute("stroke-width",String(d))),{type:"icon",iconSize:[c,c],iconAnchor:p,html:(new XMLSerializer).serializeToString(_),rotate:l,svg:_}}function vn(t,e,i,o){if("number"==typeof e||"string"==typeof e)e=Number(e),t.push(n(n({},i),{resource:e}));else if(Array.isArray(e)){var r=e[0],s=e[1];t.push(n(n(n({},i),{resource:r,id:s}),o))}else"object"==typeof e&&t.push(n(n(n({},i),e),o))}var gn={target:"map",baseUrl:"",whitlabel:!1,controls:["ZOOM","ATTRIBUTION"],controlsOptions:{ZOOM:{position:"top-left"},ATTRIBUTION:{position:"bottom-right",customAttribution:['<a href="https://nextgis.com" target="_blank">©NextGIS</a>']}},pixelRadius:10};var bn=function(t){function i(e){var i=t.call(this,function(t){var e=[new Te];return t.starterKits&&t.starterKits.forEach((function(t){e.push(t)})),t.connector?t.connector&&(t.baseUrl=t.connector.options.baseUrl):t.connector=new ie({baseUrl:t.baseUrl||"",auth:t.auth}),(t=N(gn,t)).center||t.bounds||(t.bounds=[-179,-90,180,90]),t.connector&&e.push(new rn({connector:t.connector,auth:t.auth})),n(n({},t),{starterKits:e,create:!1})}(e))||this;return i.emitter=new p.exports.EventEmitter,i._ngwLayers={},i._promises={select:[],identify:[]},e.connector&&(i.connector=e.connector),i._createWebMap().then((function(){var t=i.getContainer();t&&t.classList.add("ngw-map-container"),i.options.whitlabel&&i._whiteLabel()})),i}return e(i,t),i.prototype.addControl=function(e,n,i){return o(this,void 0,void 0,(function(){return r(this,(function(o){switch(o.label){case 0:return[4,this.onLoad("controls:create")];case 1:return o.sent(),[2,t.prototype.addControl.call(this,e,n,i)]}}))}))},i.prototype.addNgwLayer=function(t){return o(this,void 0,void 0,(function(){var e,i,o,s,a,u,h,c,l;return r(this,(function(r){switch(r.label){case 0:return[4,this.onMapLoad()];case 1:if(r.sent(),i=t.resourceId,((e=t.keyname)||void 0!==i)&&console.warn("DEPRECATED WARN: ".concat("set `resource` options instead of `keyname` or `resourceId`")),o=t.resource,!e&&!i&&!o)throw new Error("resource, resourceId or keyname is required parameter to add NGW layer");if(!B(this.options.baseUrl))return[3,5];r.label=2;case 2:return r.trys.push([2,4,,5]),B(this.options.setViewDelay)&&(t.adapterOptions=t.adapterOptions||{},B(t.adapterOptions.setViewDelay)||(t.adapterOptions.setViewDelay=this.options.setViewDelay)),s=function(t,e,n){var i=n.getAuthorizationHeaders();return i&&(t.headers=i),Ye(t,e,n)}(t,this,this.connector),a=n(n({visibility:!0},t),t.adapterOptions),[4,this.addLayer(s,a)];case 3:return u=r.sent(),h=u&&this.getLayerId(u),u&&h&&(this._ngwLayers[h]={layer:u,resourceId:u.resourceId},u.options.name=u.options.name||u.item&&u.item.resource.display_name,u.options.baselayer&&this.getActiveBaseLayer()),[2,u];case 4:return c=r.sent(),l=K(o)&&"id"in o?o.id:e||i||o,console.error("Can't add NGW layer ".concat(l,"."),c),[3,5];case 5:return[2]}}))}))},i.prototype.fit=function(){var t,e=(t=this.options).center,n=t.zoom,i=t.bounds;e?(this.setCenter(e),n&&this.setZoom(n)):i&&this.fitBounds(i)},i.prototype.fetchNgwLayerItem=function(t){return un(n({connector:this.connector},t))},i.prototype.fetchNgwLayerItems=function(t){return je(n({connector:this.connector},t))},i.prototype.fetchNgwLayerFeature=function(t){return hn(n({connector:this.connector},t))},i.prototype.fetchNgwLayerFeatures=function(t){return Fe(n({connector:this.connector},t))},i.prototype.fetchIdentifyItem=function(t,e){var i,o,r,s=(o=(i={identify:t,connector:this.connector,requestOptions:e}).connector,(r=cn(i.identify))&&r.length?un(n(n({connector:o},i.requestOptions),r[0])):S.resolve(void 0));return this._addPromise("identify",s),s},i.prototype.fetchIdentifyGeoJson=function(t,e){void 0===e&&(e=!1);var i=function(t){var e=t.connector,i=t.identify,o=t.requestOptions;for(var r in i){var s=Number(r);if(!isNaN(s)){var a=i[r];if("features"in a){var u=a.features.find((function(t){return t.geom}));if(u&&u.geom){var h=u.geom;return S.resolve(Ee(n(n({},u),{geom:h})))}}}}var c=cn(i);return c&&c.length?hn(n(n(n({},o),{connector:e}),c[0])):S.resolve(void 0)}({identify:t,connector:this.connector,multiple:e});return i&&"then"in i?(this._addPromise("identify",i),i):S.resolve(i)},i.prototype.getIdentifyGeoJson=function(t,e){return void 0===e&&(e=!1),this.fetchIdentifyGeoJson(t,e)},i.prototype.getNgwLayers=function(){return o(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,this.onLoad()];case 1:return t.sent(),[2,this._ngwLayers]}}))}))},i.prototype.getNgwLayerByResourceId=function(t){return o(this,void 0,void 0,(function(){var e,n,i,o,s,a,u,h;return r(this,(function(r){switch(r.label){case 0:for(i in n=[],e=this._ngwLayers)n.push(i);o=0,r.label=1;case 1:return o<n.length?(i=n[o])in e?(s=this._ngwLayers[i]).resourceId!==t?[3,2]:[2,s&&s.layer]:[3,5]:[3,6];case 2:return s.layer.getIdentificationIds?[4,s.layer.getIdentificationIds()]:[3,4];case 3:if((a=r.sent())&&a.some((function(e){return e===t})))return[2,s.layer];r.label=4;case 4:if(s.layer.getDependLayers&&(u=s.layer.getDependLayers(),h=u.find((function(e){return e.item&&e.item.parentId===t}))))return[2,h.layer];r.label=5;case 5:return o++,[3,1];case 6:return[2]}}))}))},i.prototype.fitLayer=function(e,n){return o(this,void 0,void 0,(function(){var i,o,s,a,u=this;return r(this,(function(r){switch(r.label){case 0:return i="string"==typeof e||"number"==typeof e?String(i):e.id,(o=i&&this._ngwLayers[i])?o.layer.getBounds?[4,o.layer.getBounds()]:[3,2]:[3,7];case 1:return(s=r.sent())&&this.fitBounds(s,n),[3,6];case 2:return a=void 0,o.layer.item?(a=o.layer.item,[3,5]):[3,3];case 3:return[4,this.connector.getResource(o.resourceId)];case 4:a=r.sent(),r.label=5;case 5:a&&we({resourceId:a.resource.id,connector:this.connector}).then((function(t){t&&u.fitBounds(t,n)})),r.label=6;case 6:return[3,8];case 7:t.prototype.fitLayer.call(this,"number"==typeof e?String(e):e,n),r.label=8;case 8:return[2]}}))}))},i.prototype.zoomToLayer=function(t){return o(this,void 0,void 0,(function(){return r(this,(function(e){return[2,this.fitLayer(t)]}))}))},i.prototype.onLoad=function(e){return void 0===e&&(e="ngw-map:create"),t.prototype.onLoad.call(this,e)},i.prototype.removeLayer=function(e){var n=this.getLayer(e);if(n){var i=this.getLayerId(n);i&&delete this._ngwLayers[i],t.prototype.removeLayer.call(this,n)}},i.prototype.enableSelection=function(){var t=this;this.$$selectFromNgwRaster||(this.$$selectFromNgwRaster=function(e){t._getSelectListenersCount()&&t.selectFromNgwRaster(e)},this.$$selectFromNgwVector=function(e){t._getSelectListenersCount()&&t._selectFromNgwVector(e)},this.emitter.on("click",this.$$selectFromNgwRaster),this.emitter.on("layer:click",this.$$selectFromNgwVector))},i.prototype.disableSelection=function(){this.$$selectFromNgwRaster&&(this.emitter.removeListener("click",this.$$selectFromNgwRaster),this.$$selectFromNgwRaster=void 0),this.$$selectFromNgwVector&&(this.emitter.removeListener("layer:click",this.$$selectFromNgwVector),this.$$selectFromNgwVector=void 0)},i.prototype.getNgwLayerItem=function(t){return this.fetchNgwLayerItem(t)},i.prototype.getNgwLayerItems=function(t){return this.fetchNgwLayerItems(t)},i.prototype.getNgwLayerFeature=function(t){return this.fetchNgwLayerFeature(t)},i.prototype.getNgwLayerFeatures=function(t){return this.fetchNgwLayerFeatures(t)},i.prototype.cancelPromise=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.cancelPromises.apply(this,t)},i.prototype.cancelPromises=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];e.length||(e=Object.keys(this._promises)),e.forEach((function(e){var n=t._promises[e];n&&(n.forEach((function(t){return t.cancel()})),t._promises[e]=[])}))},i.prototype.selectFromNgwRaster=function(t){var e;return o(this,void 0,void 0,(function(){var i,o,s,a,u,h,c,l,p,d,f,m,_,y,v,g,b,w=this;return r(this,(function(r){switch(r.label){case 0:for(this._emitStatusEvent("ngw:preselect"),i=[],(o=Object.values(this._ngwLayers)).sort((function(t,e){return t.layer.order&&e.layer.order?e.layer.order-t.layer.order:1})),s=0,a=o;s<a.length;s++)c=null===(e=(u=a[s].layer).options.interactive)||void 0===e||e,(h="function"==typeof u.getIdentificationIds&&u.getIdentificationIds)&&u.options.selectable&&c&&this.isLayerVisible(u)&&i.push(h.call(u));return[4,Promise.all(i)];case 1:for(l=r.sent(),p=[],d=0,f=l;d<f.length;d++)(m=f[d])&&p.push.apply(p,m);return p.length?(_=this.options.pixelRadius||10,y=this.getCenter(),v=void 0!==(v=this.getZoom())?v:20,y&&v?(g=function(t,e,n){return(n=null!=n?n:10)*(40075016.686*Math.abs(Math.cos(180*t[1]/Math.PI))/Math.pow(2,e+8))*5e-4}(y,v,_),b=dn(t,{layers:p,connector:this.connector,radius:g}).then((function(e){var i=n(n({},e),{resources:p,sourceType:"raster",event:t}),o=w._prepareToIdentify(i);return w._emitStatusEvent("ngw:select",o),o})),this._addPromise("select",b),[2,b]):(this._emitStatusEvent("ngw:select",null),[2])):(this._emitStatusEvent("ngw:select",null),[2])}}))}))},i.prototype._addPromise=function(t,e){var n=this._promises[t];if(n&&-1===n.indexOf(e)){var i=function(){var t=n.indexOf(e);-1!==t&&n.splice(t,1)};e.then(i),e.catch(i),n.push(e)}},i.prototype._isFitFromResource=function(){var t=this._initMapState;return!t.zoom||!t.center},i.prototype._createWebMap=function(){return o(this,void 0,void 0,(function(){var t,e,n,i,o,s,a,u,h,c;return r(this,(function(r){switch(r.label){case 0:return[4,this.create()];case 1:if(r.sent(),this.options.qmsId&&this._addQmsBaseLayer(),this.options.osm&&this._addOsmBaseLayer(),t=[],e=this._isFitFromResource(),this.options.webmapId&&vn(t,this.options.webmapId,{fit:e}),this.options.resources&&Array.isArray(this.options.resources))for(n=0,i=this.options.resources;n<i.length;n++)o=i[n],s={},e||(s.fit=!1),vn(t,o,{},s);a=0,u=t,r.label=2;case 2:if(!(a<u.length))return[3,7];h=u[a],r.label=3;case 3:return r.trys.push([3,5,,6]),[4,this.addNgwLayer(h)];case 4:return r.sent(),[3,6];case 5:return c=r.sent(),console.warn(c),[3,6];case 6:return a++,[3,2];case 7:return this._emitStatusEvent("ngw-map:create",this),this.enableSelection(),[2]}}))}))},i.prototype._addOsmBaseLayer=function(){this.addBaseLayer("OSM")},i.prototype._addQmsBaseLayer=function(){var t,e;Array.isArray(this.options.qmsId)?(t=this.options.qmsId[0],e=this.options.qmsId[1]):t=Number(this.options.qmsId);var n={qmsId:t};e&&(n.id=e),this.addBaseLayer("QMS",n)},i.prototype._selectFromNgwVector=function(t){var e,i=t.layer;if(i.options.selectable&&this.isLayerVisible(i)){var o=i.item&&i.item.resource.id,r=t.feature;if(void 0!==o&&r){var s=r.id;if(s){var a={id:Number(s),fields:r.properties||{},label:"#".concat(o),layerId:Number(o),parent:"",geom:r.geometry},u=((e={featureCount:1})[o]={featureCount:1,features:[a]},e);return this._emitStatusEvent("ngw:select",this._prepareToIdentify(n(n({},u),{resources:[o],sourceType:"vector"}))),u}}}},i.prototype._prepareToIdentify=function(t){var e=this;return n(n({},t),{getIdentifyItems:function(){return cn(t,!0).map((function(t){return new sn({feature:t.feature,connector:e.connector})}))}})},i.prototype._getSelectListenersCount=function(){return this.emitter.listenerCount("ngw:select")},i.prototype._whiteLabel=function(){return o(this,void 0,void 0,(function(){var t,e;return r(this,(function(n){switch(n.label){case 0:return(t=this.getContainer())?[4,fn(this.connector,this.options.companyLogoOptions)]:[3,2];case 1:(e=n.sent())&&t.appendChild(e),n.label=2;case 2:return[2]}}))}))},i.getIcon=yn,i}(Ft),wn=function(t){function n(e){var n=t.call(this,e)||this,i=e&&e.customAttribution;if(i){var o=[];Array.isArray(i)?o=i:i&&(o=[i]),o.forEach((function(t){return n.addAttribution(t)}))}return n}return e(n,t),n}(c.exports.Control.Attribution);function xn(t,e,n){return void 0===e&&(e={}),new(c.exports.Control.extend({onAdd:function(){var i=document.createElement("div"),o=t.onAdd(n);return i.classList.add("leaflet-control"),e.bar&&i.classList.add("leaflet-bar"),e.addClass&&i.classList.add(e.addClass),e.margin||e.bar||(i.style.marginBottom="0px",i.style.marginTop="0px",i.style.marginLeft="0px",i.style.marginRight="0px"),o&&i.appendChild(o),c.exports.DomEvent.disableClickPropagation(i),i},onRemove:function(){t.onRemove()}}))}function Ln(t){var e=t.getNorthEast(),n=t.getSouthWest();return[n.lng,n.lat,e.lng,e.lat]}function Pn(t){for(var e={},n=0;n<t.length;n++)e[t[n]]=1+(e[t[n]]||0);var i="";for(var o in e){e[o]>(i?e[i]:0)&&(i=o)}return i}var Mn={Point:"point",LineString:"line",MultiPoint:"point",Polygon:"polygon",MultiLineString:"line",MultiPolygon:"polygon",GeometryCollection:"polygon"},Cn={stroke:!1,opacity:1},kn={};for(var An in Mn){var Tn=Mn[An],On=kn[Tn]||[];On.push(An),kn[Tn]=On}function En(t,e){return-1!==(kn[e]||[]).indexOf(t)}function In(t){var e=new c.exports.GeoJSON;return(Array.isArray(t)?t:[t]).forEach((function(t){return e.addData(t)})),e.getBounds()}function Sn(t){return{getBounds:function(){return function(t){return Ln(In(t))}(t)},getCenter:function(){return function(t){var e=In(t).getCenter();return[e.lng,e.lat]}(t)}}}var zn=function(){function t(t,e){if(this.map=t,this.options=e,this.pane="order-0",void 0!==e.order){var n="order-"+e.order,i=t.getPane(n);i||(i=t.createPane(n)),i.style.zIndex=String(Math.round(100*e.order)),this.pane=n}}return t.prototype.addLayer=function(t){Object.assign(this.options,t)},t}();function Bn(t){var e=t.containerPoint,n=t.latlng;return{latLng:n,lngLat:[n.lng,n.lat],pixel:{left:e.x,top:e.y},source:t}}var Zn=function(){function t(t){this.layer=t}return t.prototype.handleMouseEvents=function(t){var e=this,i=this.layer.options,o=i.onMouseOut,r=i.onMouseOver,s=i.onClick||i.onLayerClick;s&&(this._onclick=function(i){var o=!!e.layer._getSelected(t);s(n({selected:o},e._createMouseEvent(i)))},t.on("click",this._onclick,this)),o&&(this._mouseout=function(t){o(e._createMouseEvent(t))},t.on("mouseout",this._mouseout,this)),r&&(this._mouseover=function(t){r(e._createMouseEvent(t))},t.on("mouseover",this._mouseover,this))},t.prototype.stopMouseEvents=function(t){this._mouseover&&t.off("mouseover",this._mouseover,this),this._mouseout&&t.off("mouseout",this._mouseout,this),this._onclick&&t.off("click",this._onclick,this)},t.prototype._createMouseEvent=function(t){return function(t){var e=t.source,i=e.target.feature;return n({layer:t.layer,feature:i,event:Bn(e),source:e},Sn(i))}({layer:this.layer,source:t})},t}(),Nn=function(){function t(t){this.layer=t}return t.prototype.setPaintEachLayer=function(t){var e=this;this.layer._layers.forEach((function(n){e.setPaint(n,t)}))},t.prototype.setPaint=function(t,e){var n=void 0,i=t.layer,o=t.feature;if(i&&o&&(X(e)?n=e(o):Q(e)&&(n=e),n))if("point"===this.layer.type&&"icon"===n.type){var r=i,s=this._createDivIcon(n);setTimeout((function(){r.setIcon(s)}),10)}else"setStyle"in i&&i.setStyle(this.preparePaint(n))},t.prototype.preparePaint=function(t){if("get-paint"!==t.type){var e="line"===this.layer.type?[["color","strokeColor"],["opacity","strokeOpacity"],["weight","weight"]]:[["color","strokeColor"],["opacity","strokeOpacity"],["stroke","stroke"],["fillColor","fillColor"],["fillOpacity","fillOpacity"],["fill","fill"],["weight","weight"]],n={};"radius"in t&&"number"==typeof t.radius&&(n.radius=t.radius);for(var i=0,o=e;i<o.length;i++){var r=o[i],s=r[0],a=r[1],u=this.layer.options.opacity,h=t[a];B(u)&&-1!==a.toLowerCase().indexOf("opacity")&&(h=Number(h)*u),void 0!==h&&Object.defineProperty(n,s,{enumerable:!0,value:h})}return n}return Cn},t.prototype._createDivIcon=function(t){var e=t.html,o=t.rotate,r=t.className,s=i(t,["html","rotate","className"]),a=document.createElement("div");return r&&(a.className=r),o&&(a.style.transform="rotateZ(".concat(o,"deg)")),e&&(a.innerHTML=e),new c.exports.DivIcon(n(n({className:""},s),{html:a}))},t.prototype.createPaintToLayer=function(t){var e=this;if(t&&t.type)if("icon"===t.type){if(t.className||t.html)return function(n,i){var o=e._createDivIcon(t);return new c.exports.Marker(i,{icon:o})}}else if("pin"===t.type)return function(t,e){return new c.exports.Marker(e)};return function(i,o){return new c.exports.CircleMarker(o,e.preparePaint(n(n({},Cn),t)))}},t.prototype.createPaintOptions=function(t){var e={},n=this.preparePaint(t);return t&&(e.style=function(){return n}),"point"===this.layer.type?e.pointToLayer=this.createPaintToLayer(t):"line"===this.layer.type&&(n.stroke=!0),e},t}(),Rn=function(t){function i(e,n){var i=t.call(this,e,n)||this;return i.selected=!1,i._layers=[],i._selectedLayers=[],i._filteredLayers=[],i._openedPopup=[],i.$updateTooltip=j((function(){i.updateTooltip()}),300),i.$unselect=function(){i.unselect()},i._events=new Zn(i),i._paint=new Nn(i),i}return e(i,t),i.prototype.addLayer=function(t){return Object.assign(this.options,t),this.paint=t.paint,this.layer=new c.exports.FeatureGroup([],n(n({},t.nativeOptions),{pane:this.pane})),this.selectedPaint=t.selectedPaint,t.paint=this.paint,t.data&&this.addData(t.data),this._addMapListener(),this.layer},i.prototype.beforeRemove=function(){this._removeMapListener()},i.prototype.select=function(t){if(this.unselect(),t)for(var e=0,n=this._layers.filter(t);e<n.length;e++){this._selectLayer(n[e],"api")}else this.selected||(this.selected=!0,this.selectedPaint&&this._paint.setPaintEachLayer(this.selectedPaint))},i.prototype.unselect=function(t){var e=this;if(t)this._layers.filter(t).forEach((function(t){e._unSelectLayer(t)}));else if(this.selected){for(var n=0,i=this._openedPopup;n<i.length;n++){this._removePopup(i[n][0])}this.paint&&this._paint.setPaintEachLayer(this.paint),this._selectedLayers.length=0,this.selected=!1}},i.prototype.getSelected=function(){var t=this;return this._selectedLayers.map((function(e){return n({target:t,feature:e.feature,layer:e},Sn(e.feature))}))},i.prototype.getFiltered=function(){return this._filteredLayers},i.prototype.filter=function(t){var e=this;this._filterFun=t;var i=this.layer,o=i&&i._map;if(i&&o){i.remove();var r=[];this._layers.forEach((function(o){var s=o.feature,a=o.layer;a&&(!t||t(n({target:e,feature:s,layer:a},Sn(s)))?(i.addLayer(a),r.push(n({target:e,feature:s,layer:a},Sn(s)))):i.removeLayer(a))})),this._filteredLayers=r,i.addTo(o)}return this._filteredLayers},i.prototype.cleanFilter=function(){this.filter()},i.prototype.getLayers=function(){var t=this;return this._layers.map((function(e){var i=e.layer,o=e.feature;return n({feature:o,layer:i,visible:i&&!!i._map,target:t},Sn(o))}))},i.prototype.clearLayer=function(t){this.unselect();var e=this.layer;if(e)if(t)for(var n=this._layers.length;n--;){var i=this._layers[n];if(i){var o=i.feature,r=i.layer;if(o&&r)t(o)&&(e.removeLayer(r),this._layers.splice(n,1))}}else e.clearLayers(),this._layers=[]},i.prototype.setData=function(t){this.clearLayer(),this.addData(t)},i.prototype.addData=function(t){var e,n=this.options;if(n){if(t){var i=void 0;if(n.type)i=n.type;else{var o=function(t){var e;e="FeatureCollection"===t.type?Pn(t.features.map((function(t){return t.geometry.type}))):"GeometryCollection"===t.type?Pn(t.geometries.map((function(t){return t.type}))):"Feature"===t.type?t.geometry.type:t.type;return e}(t);i=Mn[o]}if(this.type&&this.type!==i)return void console.warn("no other data type than layer can be added");this.type=i,t=function(t,e){if("FeatureCollection"===t.type)(n=t).features=n.features.filter((function(t){return En(t.geometry.type,e)}));else if("Feature"===t.type){if(!En(t.geometry.type,e))return!1}else if("GeometryCollection"===t.type){var n;(n=t).geometries=n.geometries.filter((function(t){return En(t.type,e)}))}return t}(t,i),t&&(e=this._getGeoJsonOptions(n,i))}new c.exports.GeoJSON(t||void 0,e)}},i.prototype.openPopup=function(t,e){var n=this;t&&this._layers.filter(t).forEach((function(t){n._openPopup(t,e,"api")}))},i.prototype.closePopup=function(t){var e=this;(t?this._openedPopup.filter((function(e){return t(e[2])})):this._openedPopup).forEach((function(t){e._removePopup(t[0])}))},i.prototype.updateTooltip=function(t){var e=this;t?this._updateTooltip(t):this.getLayers().forEach((function(t){return e._updateTooltip({feature:t.feature,layer:t.layer})}))},i.prototype.getExtent=function(){return this.getBounds()},i.prototype.getBounds=function(){if(this.layer){var t=this.layer.getBounds();if(t.isValid())return Ln(t)}},i.prototype.setOpacity=function(t){this.options.opacity=t,this.setPaint(this.paint),this.setSelectedPaint(this.selectedPaint)},i.prototype.setPaint=function(t){if(t){this.paint=t;for(var e=0,n=this._layers;e<n.length;e++){this._paint.setPaint(n[e],t)}}},i.prototype.setSelectedPaint=function(t){if(t){this.selectedPaint=t;for(var e=0,n=this._selectedLayers;e<n.length;e++){this._paint.setPaint(n[e],t)}}},i.prototype.updatePaint=function(t){this.paint=n(n({},this.paint),t);for(var e=0,i=this._layers;e<i.length;e++){this._paint.setPaint(i[e],this.paint)}},i.prototype.updateSelectedPaint=function(t){this.selectedPaint=n(n({},this.selectedPaint),t);for(var e=0,i=this._selectedLayers;e<i.length;e++){this._paint.setPaint(i[e],this.selectedPaint)}},i.prototype._getSelected=function(t){return this._selectedLayers.find((function(e){return e.layer===t}))},i.prototype._updateTooltip=function(t){var e=t.feature,i=t.layer,o=this.options,r=o.label,s=o.labelField,a=o.labelOnHover;if(i){i.unbindTooltip();var u=void 0;if(e.properties&&s?u=e.properties[s]:r&&(u=r(n(n({target:this},t),Sn(e)))),u){var h=!a;i.bindTooltip(String(u),{permanent:h,sticky:!1})}}},i.prototype._openPopup=function(t,e,i,s){var a,u;return void 0===e&&(e={}),o(this,void 0,void 0,(function(){var o,h,c,l,p,d,f,m,_,y,v,g,b,w,x,L=this;return r(this,(function(r){switch(r.label){case 0:return o=t.feature,h=t.layer,c=n({minWidth:300},e),l=c.minWidth,p=c.autoPan,d=c.maxWidth,m=null!=(f=c.closeButton)?f:!this.options.selectOnHover,y=[],v=function(t){y.push(t)},g=function(){_&&L._removePopup(_)},e.createPopupContent?[4,e.createPopupContent(n({layer:h,feature:o,target:this,type:i,close:g,onClose:v},Sn(o)))]:[3,2];case 1:return b=r.sent(),[3,3];case 2:b=e.popupContent,r.label=3;case 3:return b&&h&&(w={minWidth:l,autoPan:p,closeButton:m,closeOnClick:!1,autoClose:!1},B(d)&&(w.maxWidth=d),_=h.bindPopup(b,w),(null===(u=null===(a=this.options.popupOptions)||void 0===a?void 0:a.unselectOnClose)||void 0===u||u)&&(x=h.getPopup())&&x.once("remove",(function(){g()}),this),this._openedPopup.push([_,y,t]),_.openPopup(s)),[2]}}))}))},i.prototype._removePopup=function(t){var e,n;if(this.map){t.closePopup().unbindPopup();var i=this._openedPopup.findIndex((function(e){return e[0]===t}));if(-1!==i){for(var o=null===(n=null===(e=this.options.popupOptions)||void 0===e?void 0:e.unselectOnClose)||void 0===n||n,r=this._openedPopup[i],s=r[1],a=r[2],u=0,h=s;u<h.length;u++){(0,h[u])(a)}s.length=0,o&&this._unSelectLayer(a),this._openedPopup.splice(i,1)}}},i.prototype._getGeoJsonOptions=function(t,e){var i=this,o=t.paint,r={};return"function"==typeof o?"point"===e?r.pointToLayer=function(t,e){var n=o(t);return i._paint.createPaintToLayer(n)(t,e)}:r={style:function(t){return i._paint.preparePaint(n(n({},Cn),t?o(t):{type:"path"}))}}:r=this._paint.createPaintOptions(o),r.onEachFeature=function(t,e){i._onEachFeature(t,e)},r},i.prototype._onEachFeature=function(t,e){var i=this,o=this.layer;if(o){var r=n({target:this,feature:t,layer:e},Sn(t));e.options.pane=this.pane,this._layers.push(r);var s=!0;if(this._filterFun&&(s=this._filterFun(r)),s){var a=this.options,u=a.popup,h=a.popupOptions,c=a.selectable,l=a.interactive,p=a.selectOnHover;e.options.interactive=!B(l)||l,o.addLayer(e),c&&(p?(e.on("mouseover",(function(){i._selectLayer(r,"hover")})),e.on("mouseout",(function(){i._unSelectLayer(r)}))):e.on("click",(function(t){return i._selectOnLayerClick(t)}),this)),this._events.handleMouseEvents(e),setTimeout((function(){u&&i._openPopup(n({target:i,layer:e,feature:t},Sn(t)),h,"api"),i._updateTooltip({layer:e,feature:t})}))}}},i.prototype._selectOnLayerClick=function(t){c.exports.DomEvent.stopPropagation(t);var e=t.target,i=e.feature,o=n({target:this,layer:e,feature:i},Sn(i)),r=this._getSelected(e);r?this.options&&this.options.unselectOnSecondClick&&this._unSelectLayer(r):this._selectLayer(o,"click",t.latlng)},i.prototype._selectLayer=function(t,e,i){var o=this;this.options.multiselect||(this.map._addUnselectCb((function(){o._unSelectLayer(t)})),this._selectedLayers.forEach((function(t){return o._unSelectLayer(t)}))),this._selectedLayers.push(t),this.selected=!0;var r=this.options,s=r.selectedPaint,a=r.popupOnSelect,u=r.popupOptions;if(s&&t.layer&&this._paint.setPaint(t,s),a&&this._openPopup(t,u,e,i),this.options.onSelect){var h=t.feature?[t.feature]:[];this.options.onSelect(n({type:e,layer:this,features:h},Sn(h)))}},i.prototype._unSelectLayer=function(t){var e=this._selectedLayers.indexOf(t);-1!==e&&(this._selectedLayers.splice(e,1),this.options&&(this.options.paint&&this._paint.setPaint(t,this.options.paint),this.options.popupOnSelect&&t.layer&&this._removePopup(t.layer))),this.selected=this._selectedLayers.length>0},i.prototype._addMapClickListener=function(){var t=this.map;if(t){var e=this.options.unselectOnClick;(null==e||e)&&t.on("click",this.$unselect)}},i.prototype._removeMapClickListener=function(){this.map.off("zoomend",this.$updateTooltip),this.map.off("moveend",this.$updateTooltip),this.map.off("click",this.$unselect)},i.prototype._addMapListener=function(){var t=this.map;if(t){var e=this.options,n=e.label,i=e.labelField,o=e.labelOnHover;this._addMapClickListener(),!i&&!n||o||(t.on("zoomend",this.$updateTooltip),t.on("moveend",this.$updateTooltip))}},i.prototype._removeMapListener=function(){this._removeMapClickListener(),this.map.off("zoomend",this.$updateTooltip),this.map.off("moveend",this.$updateTooltip)},i}(zn);function jn(t,e,n){var i=new XMLHttpRequest;for(var o in i.open("GET",t),i.responseType="arraybuffer",n)i.setRequestHeader(o,n[o]);return i.onload=function(){var t=new Uint8Array(this.response),n=new Blob([t],{type:"image/png"}),i=(window.URL||window.webkitURL).createObjectURL(n);e(i)},i.send(),function(){i.abort()}}var Dn=function(t){function n(e,n,i){var o=t.call(this,e,n,i)||this;return o._abort=[],o}return e(n,t),n.prototype.cancelLoad=function(){this._abort&&(this._abort.forEach((function(t){return t()})),this._abort=[])},n.prototype._initImage=function(){t.prototype._initImage.call(this);var e=this.options.headers;if(e){var n=this._image,i=n.src;n.src="",this._abort.push(jn(i,(function(t){n.src=t}),e))}},n}(c.exports.ImageOverlay),Fn=function(t){function n(e,n){var i=t.call(this,n)||this;i.defaultWmsParams={service:"WMS",request:"GetMap",version:"1.1.1",layers:"",styles:"",format:"image/jpeg",transparent:!1},i.options={crs:null,uppercase:!1,attribution:"",opacity:1,isBack:!1,minZoom:0,pane:"tilePane",headers:null,viewPortBuffer:0,setViewDelay:100},i._url=e;var o,r={},s={};for(o in n)o in i.options?s[o]=n[o]:r[o]=n[o];return c.exports.Util.setOptions(i,s),i.wmsParams=c.exports.Util.extend({},i.defaultWmsParams,r),i}return e(n,t),n.prototype.setParams=function(t){c.exports.Util.extend(this.wmsParams,t),this.update()},n.prototype.getAttribution=function(){return this.options.attribution||""},n.prototype.onAdd=function(){return this.update(),this},n.prototype.onRemove=function(t){return this._currentOverlay&&(this._currentOverlay.cancelLoad(),t.removeLayer(this._currentOverlay),delete this._currentOverlay),this._currentUrl&&delete this._currentUrl,this},n.prototype.getEvents=function(){return{moveend:j(this.update,this.options.setViewDelay)}},n.prototype.update=function(){var t=this;if(this._map){this.updateWmsParams();var e=this.getImageUrl();if(this._currentUrl!==e){this._currentUrl=e;var n=this.options.viewPortBuffer||0,i=this._map.getBounds().pad(n),o=new Dn(e,i,{opacity:0,pane:this.options.pane,headers:this.options.headers});o.addTo(this._map),this._currentOverlay&&this._currentOverlay.cancelLoad(),o.once("load",(function(){t._map&&(o._url===t._currentUrl?(t._currentOverlay&&t._map.removeLayer(t._currentOverlay),t._currentOverlay=o,o.setOpacity(void 0!==t.options.opacity?t.options.opacity:1),!0===t.options.isBack&&o.bringToBack(),!1===t.options.isBack&&o.bringToFront(),void 0!==t.options.zIndex&&o.setZIndex(t.options.zIndex)):t._map.removeLayer(o))}),this);var r=this.options,s=r.minZoom,a=r.maxZoom;(s&&this._map.getZoom()<s||a&&this._map.getZoom()>a)&&this._map.removeLayer(o)}}},n.prototype.setOpacity=function(t){this.options.opacity=t,this._currentOverlay&&this._currentOverlay.setOpacity(t)},n.prototype.bringToBack=function(){this.options.isBack=!0,this._currentOverlay&&this._currentOverlay.bringToBack()},n.prototype.bringToFront=function(){this.options.isBack=!1,this._currentOverlay&&this._currentOverlay.bringToFront()},n.prototype.setZIndex=function(t){this.options.zIndex=t,this._currentOverlay&&this._currentOverlay.setZIndex(t)},n.prototype.updateWmsParams=function(t){t||(t=this._map);var e=this.options.viewPortBuffer||0,n=t.getBounds().pad(e),i=t.getSize();if(0!==this.options.viewPortBuffer){var o=e+1;i.x=Math.ceil(i.x*o),i.y=Math.ceil(i.y*o)}var r=parseFloat(this.wmsParams.version),s=this.options.crs||t.options.crs,a=r>=1.3?"crs":"srs";if(s){var u=s.project(n.getNorthWest()),h=s.project(n.getSouthEast()),l={width:i.x,height:i.y};l[a]=s.code,l.bbox=(r>=1.3&&s===c.exports.CRS.EPSG4326?[h.y,u.x,u.y,h.x]:[u.x,h.y,h.x,u.y]).join(","),c.exports.Util.extend(this.wmsParams,l)}},n.prototype.getImageUrl=function(){var t=c.exports.Util.getParamString(this.wmsParams,this._url,this.options.uppercase||!1);return this._url+t},n}(c.exports.Layer),Un=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return e(i,t),i.prototype.addLayer=function(t){var e=t&&t.url;if(e){var i=(t=n({transparent:!0},t)).updateWmsParams;if(this.layer=new Fn(e,n(n(n({pane:this.pane,headers:t.headers,setViewDelay:t.setViewDelay},t),t.params),t.nativeOptions)),i){var o=this.layer.updateWmsParams;this.layer.updateWmsParams=function(t){o.call(this,t),this.wmsParams=i(this.wmsParams)}}return this.layer}},i}(zn);
|
|
2
|
-
/*!
|
|
3
|
-
* leaflet.wms.js
|
|
4
|
-
* A collection of Leaflet utilities for working with Web Mapping services.
|
|
5
|
-
* (c) 2014-2016, Houston Engineering, Inc.
|
|
6
|
-
* MIT License
|
|
7
|
-
*/function Wn(t){return function(t){function n(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var i=t.apply(this,e)||this;return i.options.setViewDelay&&(i._update=j((function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];(t=c.exports.GridLayer.prototype._update).call.apply(t,a([i],e,!1))}),i.options.setViewDelay)),i}return e(n,t),n.prototype.createTile=function(t,e){var n=this.getTileUrl(t),i=document.createElement("img");return i.abort=jn(n,(function(t){i.src=t,e(null,i)}),this.options.headers),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),i.alt="",i.setAttribute("role","presentation"),i},n.prototype._abortLoading=function(){var t=this._tiles,e=this._tileZoom;for(var n in t)if(t[n].coords.z!==e){var i=t[n].el;i.onload=c.exports.Util.falseFn,i.onerror=c.exports.Util.falseFn,i.complete||(i.abort&&i.abort(),i.src=c.exports.Util.emptyImageUrl,c.exports.DomUtil.remove(i),delete t[n])}},n}(t)}var Hn=Wn(function(t){function n(e,n){var i=t.call(this,e,n)||this;return Object.assign(i.options,n),i}return e(n,t),n}(c.exports.TileLayer)),Vn=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return e(o,t),o.prototype.addLayer=function(t){if(this.options=Object.assign(this.options,t),t){var e=t.url,o=i(t,["url"]);if(e){var r=n({pane:this.pane,attribution:o.attribution,minZoom:o.minZoom,maxZoom:o.maxZoom},o.nativeOptions);o.subdomains&&(r.subdomains=o.subdomains);return o.headers?new Hn(e,n(n({},r),{headers:o.headers,setViewDelay:o.setViewDelay})):new c.exports.TileLayer(e,r)}}},o}(zn),qn=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return e(i,t),i.prototype.addLayer=function(e){return t.prototype.addLayer.call(this,n(n({name:"OpenStreetMap",attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'},e),{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}))},i}(Vn),Gn=Wn(function(t){function n(e,n){return t.call(this,e,n)||this}return e(n,t),n}(c.exports.TileLayer.WMS)),Jn=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return e(o,t),o.prototype.addLayer=function(t){Object.assign(this.options,t);var e=t.url,o=i(t,["url"]);if(e){var r=n({pane:this.pane,attribution:o.attribution,minZoom:o.minZoom,maxZoom:o.maxZoom,layers:t.layers,format:t.format},t.nativeOptions);return o.headers?new Gn(e,n(n({},r),{headers:o.headers})):new c.exports.TileLayer.WMS(e,r)}},o}(zn);function Kn(t){return[[t[3],t[0]],[t[1],t[2]]]}var Yn=function(){function t(){this.options={target:"map"},this.layerAdapters=t.layerAdapters,this.controlAdapters=t.controlAdapters,this.emitter=new p.exports.EventEmitter,this._unselectCb=[],this._universalEvents=["move","zoom","zoomend","zoomstart","moveend","movestart"],this._positionEvents=["mousemove","mouseout","mouseover"]}return t.prototype.create=function(t){var e,i=this;if(this.options=n({},t),this.options.target){var o=(e=this.options).zoom,r=e.center,s=e.maxZoom,a=e.minZoom,u=e.maxBounds,h=e.mapAdapterOptions;this.map=this.options.map||new c.exports.Map(this.options.target,n({attributionControl:!1,zoomControl:!1,maxBounds:u?Kn(u):void 0,maxZoom:s,minZoom:a,center:r&&[r[1],r[0]],zoom:o},h));var l=this.map.createPane("order-0");this.map._addUnselectCb=function(t){i._addUnselectCb(t)},l.style.zIndex=String(0),this.emitter.emit("create",this),this._addMapListeners()}},t.prototype.destroy=function(){this.map&&this.map.remove(),this._stopWatchSizeChangeToUpdateMinZoom()},t.prototype.getContainer=function(){return this.map&&this.map.getContainer()},t.prototype.getControlContainer=function(){var t=this.map&&this.map._controlContainer;if(t)return t;throw new Error("Leaflet Map is not initialized yet")},t.prototype.setCursor=function(t){this.map&&(this.map.getContainer().style.cursor=t)},t.prototype.setView=function(t,e){var n=this.map;if(n)if(Array.isArray(t)){var i=t[0],o=t[1];this.map&&("number"==typeof e?this.map.setView([o,i],e,{animate:!1}):this.setCenter([i,o]))}else{var r=t.zoom,s=t.center,a=t.maxBounds,u=t.bounds,h=t.minZoom,c=t.maxZoom;if(s&&void 0!==r?this.setView(s,r):(void 0!==r&&this.setZoom(r),s&&this.setCenter(s)),u&&this.fitBounds(u),void 0!==a)if(a){var l=Kn(a);n.setMaxBounds(l),n.setMinZoom(n.getBoundsZoom(l)),this._watchSizeChangeToUpdateMinZoom(l)}else n.setMaxBounds(null),this._stopWatchSizeChangeToUpdateMinZoom();void 0!==c&&n.setMaxZoom(c),void 0!==h&&(this._stopWatchSizeChangeToUpdateMinZoom(),n.setMinZoom(h))}},t.prototype.setCenter=function(t){this.map&&this.map.panTo([t[1],t[0]])},t.prototype.getCenter=function(){var t=this.map;if(t){var e=t.getBounds().getCenter();return[e.lng,e.lat]}},t.prototype.setZoom=function(t){this.map&&this.map.setZoom(t)},t.prototype.getZoom=function(){var t;return null!==(t=this.map&&this.map.getZoom())&&void 0!==t?t:void 0},t.prototype.getBounds=function(){if(this.map){var t=this.map.getBounds(),e=t.getSouthWest(),n=t.getNorthEast();return[e.lng,e.lat,n.lng,n.lat]}},t.prototype.fitBounds=function(t,e){if(void 0===e&&(e={}),this.map){var n=e.maxZoom,i=e.offset,o=e.padding,r={};n&&(r.maxZoom=n),o&&(r.padding=[o,o]),i&&(r.padding=i),this.map.fitBounds(Kn(t),r)}},t.prototype.getLayerAdapter=function(e){return t.layerAdapters[e]},t.prototype.createControl=function(t,e){return xn(t,e,this)},t.prototype.createButtonControl=function(t){return function(t,e){var n=document.createElement("a"),i=t.title||"";n.href="#",n.title=i,n.setAttribute("role","button"),n.setAttribute("aria-label",i),t.addClass&&n.classList.add(t.addClass),c.exports.DomEvent.disableClickPropagation(n),c.exports.DomEvent.on(n,"click",c.exports.DomEvent.stop),t.html instanceof HTMLElement?n.appendChild(t.html):"string"==typeof t.html&&(n.innerHTML=t.html);var o=function(e){e.stopPropagation(),t.onClick()};return xn({onAdd:function(){return void 0!==t.onClick&&n.addEventListener("click",o),n},onRemove:function(){var e=n.parentNode;e&&e.removeChild(n),void 0!==t.onClick&&n.removeEventListener("click",o)}},{bar:!0},e)}(t,this)},t.prototype.addControl=function(t,e){if(t.options.position=e.replace("-",""),this.map)return this.map.addControl(t),t},t.prototype.removeControl=function(t){this.map&&this.map.removeControl(t)},t.prototype.removeLayer=function(t){t&&t.remove&&t.remove()},t.prototype.showLayer=function(t){this.map&&t.addTo(this.map)},t.prototype.hideLayer=function(t){t.remove()},t.prototype.setLayerOpacity=function(t,e){"setOpacity"in t&&t.setOpacity(e)},t.prototype.setLayerOrder=function(t,e,n){},t.prototype.onMapClick=function(t){var e=Bn(t);this.emitter.emit("preclick",e),this.emitter.emit("click",e)},t.prototype.locate=function(t,e){var n=this.map;if(n&&(n.locate(t),e)){var i=e.locationfound,o=e.locationerror,r=function(t){i({lngLat:[t.latlng.lng,t.latlng.lat]})};void 0!==i&&n.on("locationfound",r,this),o&&n.on("locationerror",o,this);return{stop:function(){void 0!==i&&n.off("locationfound",r),o&&n.off("locationerror",o)}}}return{stop:function(){}}},t.prototype._addUnselectCb=function(t){for(var e=0,n=this._unselectCb;e<n.length;e++){(0,n[e])()}this._unselectCb.length=0,this._unselectCb.push(t)},t.prototype._watchSizeChangeToUpdateMinZoom=function(t){this._stopWatchSizeChangeToUpdateMinZoom();var e=this.getContainer(),n=this.map;e&&n&&window.ResizeObserver&&(this._resizeObserver=new ResizeObserver((function(){n.setMinZoom(n.getBoundsZoom(t))})),this._resizeObserver.observe(e))},t.prototype._stopWatchSizeChangeToUpdateMinZoom=function(){var t=this.map;t&&t.setMinZoom(0),this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=void 0)},t.prototype._addMapListeners=function(){var t=this,e=this.map;if(e){e.on("click",(function(e){t.onMapClick(e)}));for(var n=function(n){e.on(n,(function(){return t.emitter.emit(n,t)}),e)},i=0,o=this._universalEvents;i<o.length;i++){n(o[i])}for(var r=function(n){e.on(n,(function(e){return t.emitter.emit(n,Bn(e))}),e)},s=0,a=this._positionEvents;s<a.length;s++){r(a[s])}}},t.layerAdapters={GEOJSON:Rn,IMAGE:Un,TILE:Vn,WMS:Jn,OSM:qn},t.controlAdapters={ZOOM:c.exports.Control.Zoom,ATTRIBUTION:wn},t.Map=c.exports.Map,t}();delete c.exports.Icon.Default.prototype._getIconUrl,c.exports.Icon.Default.mergeOptions({iconRetinaUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==",iconUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=",shadowUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC"});var Qn=function(t){function i(e){return e=n(n({},e),{mapAdapter:new Yn}),t.call(this,e)||this}return e(i,t),i.create=function(t){return o(this,void 0,void 0,(function(){return r(this,(function(e){return[2,new i(t).onLoad()]}))}))},i}(bn);return window&&!window.NgwMap&&(window.NgwMap=Qn),Qn}();
|
|
1
|
+
var NgwLeaflet=function(){"use strict";function t(t,e){void 0===e&&(e={});var i=e.insertAt;if(t&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===i&&o.firstChild?o.insertBefore(n,o.firstChild):o.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}}t('.leaflet-image-layer,.leaflet-layer,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-pane,.leaflet-pane>canvas,.leaflet-pane>svg,.leaflet-tile,.leaflet-tile-container,.leaflet-zoom-box{left:0;position:absolute;top:0}.leaflet-container{overflow:hidden}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::-moz-selection{background:transparent}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{height:1600px;-webkit-transform-origin:0 0;width:1600px}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-overlay-pane svg,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer{max-height:none!important;max-width:none!important}.leaflet-container.leaflet-touch-zoom{touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{box-sizing:border-box;height:0;width:0;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{height:1px;width:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{pointer-events:visiblePainted;pointer-events:auto;position:relative;z-index:800}.leaflet-bottom,.leaflet-top{pointer-events:none;position:absolute;z-index:1000}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{clear:both;float:left}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-tile{will-change:opacity}.leaflet-fade-anim .leaflet-popup{opacity:0;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{transform-origin:0 0}.leaflet-zoom-anim .leaflet-zoom-animated{transition:transform .25s cubic-bezier(0,0,.25,1);will-change:transform}.leaflet-pan-anim .leaflet-tile,.leaflet-zoom-anim .leaflet-tile{transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-control,.leaflet-popup-pane{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:grabbing}.leaflet-image-layer,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-image-layer.leaflet-interactive,.leaflet-marker-icon.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline:0}.leaflet-container a{color:#0078a8}.leaflet-container a.leaflet-active{outline:2px solid orange}.leaflet-zoom-box{background:hsla(0,0%,100%,.5);border:2px dotted #38f}.leaflet-container{font:12px/1.5 Helvetica Neue,Arial,Helvetica,sans-serif}.leaflet-bar{border-radius:4px;box-shadow:0 1px 5px rgba(0,0,0,.65)}.leaflet-bar a,.leaflet-bar a:hover{background-color:#fff;border-bottom:1px solid #ccc;color:#000;display:block;height:26px;line-height:26px;text-align:center;text-decoration:none;width:26px}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom:none;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.leaflet-bar a.leaflet-disabled{background-color:#f4f4f4;color:#bbb;cursor:default}.leaflet-touch .leaflet-bar a{height:30px;line-height:30px;width:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{background:#fff;border-radius:5px;box-shadow:0 1px 5px rgba(0,0,0,.4)}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);height:36px;width:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{height:44px;width:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{background:#fff;color:#333;padding:6px 10px 6px 6px}.leaflet-control-layers-scrollbar{overflow-x:hidden;overflow-y:scroll;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block}.leaflet-control-layers-separator{border-top:1px solid #ddd;height:0;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fff;background:hsla(0,0%,100%,.7);margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{color:#333;padding:0 5px}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover{text-decoration:underline}.leaflet-container .leaflet-control-attribution,.leaflet-container .leaflet-control-scale{font-size:11px}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{background:#fff;background:hsla(0,0%,100%,.5);border:2px solid #777;border-top:none;box-sizing:border-box;font-size:11px;line-height:1.1;overflow:hidden;padding:2px 5px 1px;white-space:nowrap}.leaflet-control-scale-line:not(:first-child){border-bottom:none;border-top:2px solid #777;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers{box-shadow:none}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-layers{background-clip:padding-box;border:2px solid rgba(0,0,0,.2)}.leaflet-popup{margin-bottom:20px;position:absolute;text-align:center}.leaflet-popup-content-wrapper{border-radius:12px;padding:1px;text-align:left}.leaflet-popup-content{line-height:1.4;margin:13px 19px}.leaflet-popup-content p{margin:18px 0}.leaflet-popup-tip-container{height:20px;left:50%;margin-left:-20px;overflow:hidden;pointer-events:none;position:absolute;width:40px}.leaflet-popup-tip{height:17px;margin:-10px auto 0;padding:1px;transform:rotate(45deg);width:17px}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;box-shadow:0 3px 14px rgba(0,0,0,.4);color:#333}.leaflet-container a.leaflet-popup-close-button{background:transparent;border:none;color:#c3c3c3;font:16px/14px Tahoma,Verdana,sans-serif;font-weight:700;height:14px;padding:4px 4px 0 0;position:absolute;right:0;text-align:center;text-decoration:none;top:0;width:18px}.leaflet-container a.leaflet-popup-close-button:hover{color:#999}.leaflet-popup-scrolled{border-bottom:1px solid #ddd;border-top:1px solid #ddd;overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678,M12=0.70710678,M21=-0.70710678,M22=0.70710678);margin:0 auto;width:24px}.leaflet-oldie .leaflet-popup-tip-container{margin-top:-1px}.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{background-color:#fff;border:1px solid #fff;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.4);color:#222;padding:6px;pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}.leaflet-tooltip.leaflet-clickable{cursor:pointer;pointer-events:auto}.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before,.leaflet-tooltip-top:before{background:transparent;border:6px solid transparent;content:"";pointer-events:none;position:absolute}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{border-top-color:#fff;bottom:0;margin-bottom:-12px}.leaflet-tooltip-bottom:before{border-bottom-color:#fff;margin-left:-6px;margin-top:-12px;top:0}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{margin-top:-6px;top:50%}.leaflet-tooltip-left:before{border-left-color:#fff;margin-right:-12px;right:0}.leaflet-tooltip-right:before{border-right-color:#fff;left:0;margin-left:-12px}');function e(){}function i(){i.init.call(this)}function o(t){return void 0===t._maxListeners?i.defaultMaxListeners:t._maxListeners}function n(t,i,n,r){var s,a,l,h;if("function"!=typeof n)throw new TypeError('"listener" argument must be a function');if((a=t._events)?(a.newListener&&(t.emit("newListener",i,n.listener?n.listener:n),a=t._events),l=a[i]):(a=t._events=new e,t._eventsCount=0),l){if("function"==typeof l?l=a[i]=r?[n,l]:[l,n]:r?l.unshift(n):l.push(n),!l.warned&&(s=o(t))&&s>0&&l.length>s){l.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+l.length+" "+i+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=i,c.count=l.length,h=c,"function"==typeof console.warn?console.warn(h):console.log(h)}}else l=a[i]=n,++t._eventsCount;return t}function r(t,e,i){var o=!1;function n(){t.removeListener(e,n),o||(o=!0,i.apply(t,arguments))}return n.listener=i,n}function s(t){var e=this._events;if(e){var i=e[t];if("function"==typeof i)return 1;if(i)return i.length}return 0}function a(t,e){for(var i=new Array(e);e--;)i[e]=t[e];return i}t(".ngw-map-container.leaflet-container{background:#fff}.leaflet-pane .leaflet-popup-pane{z-index:9999999999}"),e.prototype=Object.create(null),i.EventEmitter=i,i.usingDomains=!1,i.prototype.domain=void 0,i.prototype._events=void 0,i.prototype._maxListeners=void 0,i.defaultMaxListeners=10,i.init=function(){this.domain=null,i.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new e,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||isNaN(t))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=t,this},i.prototype.getMaxListeners=function(){return o(this)},i.prototype.emit=function(t){var e,i,o,n,r,s,l,h="error"===t;if(s=this._events)h=h&&null==s.error;else if(!h)return!1;if(l=this.domain,h){if(e=arguments[1],!l){if(e instanceof Error)throw e;var c=new Error('Uncaught, unspecified "error" event. ('+e+")");throw c.context=e,c}return e||(e=new Error('Uncaught, unspecified "error" event')),e.domainEmitter=this,e.domain=l,e.domainThrown=!1,l.emit("error",e),!1}if(!(i=s[t]))return!1;var u="function"==typeof i;switch(o=arguments.length){case 1:!function(t,e,i){if(e)t.call(i);else for(var o=t.length,n=a(t,o),r=0;r<o;++r)n[r].call(i)}(i,u,this);break;case 2:!function(t,e,i,o){if(e)t.call(i,o);else for(var n=t.length,r=a(t,n),s=0;s<n;++s)r[s].call(i,o)}(i,u,this,arguments[1]);break;case 3:!function(t,e,i,o,n){if(e)t.call(i,o,n);else for(var r=t.length,s=a(t,r),l=0;l<r;++l)s[l].call(i,o,n)}(i,u,this,arguments[1],arguments[2]);break;case 4:!function(t,e,i,o,n,r){if(e)t.call(i,o,n,r);else for(var s=t.length,l=a(t,s),h=0;h<s;++h)l[h].call(i,o,n,r)}(i,u,this,arguments[1],arguments[2],arguments[3]);break;default:for(n=new Array(o-1),r=1;r<o;r++)n[r-1]=arguments[r];!function(t,e,i,o){if(e)t.apply(i,o);else for(var n=t.length,r=a(t,n),s=0;s<n;++s)r[s].apply(i,o)}(i,u,this,n)}return!0},i.prototype.on=i.prototype.addListener=function(t,e){return n(this,t,e,!1)},i.prototype.prependListener=function(t,e){return n(this,t,e,!0)},i.prototype.once=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.on(t,r(this,t,e)),this},i.prototype.prependOnceListener=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.prependListener(t,r(this,t,e)),this},i.prototype.removeListener=function(t,i){var o,n,r,s,a;if("function"!=typeof i)throw new TypeError('"listener" argument must be a function');if(!(n=this._events))return this;if(!(o=n[t]))return this;if(o===i||o.listener&&o.listener===i)0==--this._eventsCount?this._events=new e:(delete n[t],n.removeListener&&this.emit("removeListener",t,o.listener||i));else if("function"!=typeof o){for(r=-1,s=o.length;s-- >0;)if(o[s]===i||o[s].listener&&o[s].listener===i){a=o[s].listener,r=s;break}if(r<0)return this;if(1===o.length){if(o[0]=void 0,0==--this._eventsCount)return this._events=new e,this;delete n[t]}else!function(t,e){for(var i=e,o=i+1,n=t.length;o<n;i+=1,o+=1)t[i]=t[o];t.pop()}(o,r);n.removeListener&&this.emit("removeListener",t,a||i)}return this},i.prototype.off=function(t,e){return this.removeListener(t,e)},i.prototype.removeAllListeners=function(t){var i,o;if(!(o=this._events))return this;if(!o.removeListener)return 0===arguments.length?(this._events=new e,this._eventsCount=0):o[t]&&(0==--this._eventsCount?this._events=new e:delete o[t]),this;if(0===arguments.length){for(var n,r=Object.keys(o),s=0;s<r.length;++s)"removeListener"!==(n=r[s])&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=new e,this._eventsCount=0,this}if("function"==typeof(i=o[t]))this.removeListener(t,i);else if(i)do{this.removeListener(t,i[i.length-1])}while(i[0]);return this},i.prototype.listeners=function(t){var e,i=this._events;return i&&(e=i[t])?"function"==typeof e?[e.listener||e]:function(t){for(var e=new Array(t.length),i=0;i<e.length;++i)e[i]=t[i].listener||t[i];return e}(e):[]},i.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):s.call(t,e)},i.prototype.listenerCount=s,i.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var l={exports:{}};(function(t){var e="1.7.1";function i(t){var e,i,o,n;for(i=1,o=arguments.length;i<o;i++)for(e in n=arguments[i])t[e]=n[e];return t}var o=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function n(t,e){var i=Array.prototype.slice;if(t.bind)return t.bind.apply(t,i.call(arguments,1));var o=i.call(arguments,2);return function(){return t.apply(e,o.length?o.concat(i.call(arguments)):arguments)}}var r=0;function s(t){return t._leaflet_id=t._leaflet_id||++r,t._leaflet_id}function a(t,e,i){var o,n,r,s;return s=function(){o=!1,n&&(r.apply(i,n),n=!1)},r=function(){o?n=arguments:(t.apply(i,arguments),setTimeout(s,e),o=!0)},r}function l(t,e,i){var o=e[1],n=e[0],r=o-n;return t===o&&i?t:((t-n)%r+r)%r+n}function h(){return!1}function c(t,e){var i=Math.pow(10,void 0===e?6:e);return Math.round(t*i)/i}function u(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function p(t){return u(t).split(/\s+/)}function d(t,e){for(var i in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?o(t.options):{}),e)t.options[i]=e[i];return t.options}function f(t,e,i){var o=[];for(var n in t)o.push(encodeURIComponent(i?n.toUpperCase():n)+"="+encodeURIComponent(t[n]));return(e&&-1!==e.indexOf("?")?"&":"?")+o.join("&")}var m=/\{ *([\w_-]+) *\}/g;function _(t,e){return t.replace(m,(function(t,i){var o=e[i];if(void 0===o)throw new Error("No value provided for variable "+t);return"function"==typeof o&&(o=o(e)),o}))}var y=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function g(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1}var v="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function b(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var w=0;function x(t){var e=+new Date,i=Math.max(0,16-(e-w));return w=e+i,window.setTimeout(t,i)}var P=window.requestAnimationFrame||b("RequestAnimationFrame")||x,O=window.cancelAnimationFrame||b("CancelAnimationFrame")||b("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function M(t,e,i){if(!i||P!==x)return P.call(window,n(t,e));t.call(e)}function C(t){t&&O.call(window,t)}var k={extend:i,create:o,bind:n,lastId:r,stamp:s,throttle:a,wrapNum:l,falseFn:h,formatNum:c,trim:u,splitWords:p,setOptions:d,getParamString:f,template:_,isArray:y,indexOf:g,emptyImageUrl:v,requestFn:P,cancelFn:O,requestAnimFrame:M,cancelAnimFrame:C};function E(){}function A(t){if("undefined"!=typeof L&&L&&L.Mixin){t=y(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}}E.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},n=e.__super__=this.prototype,r=o(n);for(var s in r.constructor=e,e.prototype=r,this)Object.prototype.hasOwnProperty.call(this,s)&&"prototype"!==s&&"__super__"!==s&&(e[s]=this[s]);return t.statics&&(i(e,t.statics),delete t.statics),t.includes&&(A(t.includes),i.apply(null,[r].concat(t.includes)),delete t.includes),r.options&&(t.options=i(o(r.options),t.options)),i(r,t),r._initHooks=[],r.callInitHooks=function(){if(!this._initHooksCalled){n.callInitHooks&&n.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=r._initHooks.length;t<e;t++)r._initHooks[t].call(this)}},e},E.include=function(t){return i(this.prototype,t),this},E.mergeOptions=function(t){return i(this.prototype.options,t),this},E.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};var T={on:function(t,e,i){if("object"==typeof t)for(var o in t)this._on(o,t[o],e);else for(var n=0,r=(t=p(t)).length;n<r;n++)this._on(t[n],e,i);return this},off:function(t,e,i){if(t)if("object"==typeof t)for(var o in t)this._off(o,t[o],e);else for(var n=0,r=(t=p(t)).length;n<r;n++)this._off(t[n],e,i);else delete this._events;return this},_on:function(t,e,i){this._events=this._events||{};var o=this._events[t];o||(this._events[t]=o=[]),i===this&&(i=void 0);for(var n={fn:e,ctx:i},r=o,s=0,a=r.length;s<a;s++)if(r[s].fn===e&&r[s].ctx===i)return;r.push(n)},_off:function(t,e,i){var o,n,r;if(this._events&&(o=this._events[t]))if(e){if(i===this&&(i=void 0),o)for(n=0,r=o.length;n<r;n++){var s=o[n];if(s.ctx===i&&s.fn===e)return s.fn=h,this._firingCount&&(this._events[t]=o=o.slice()),void o.splice(n,1)}}else{for(n=0,r=o.length;n<r;n++)o[n].fn=h;delete this._events[t]}},fire:function(t,e,o){if(!this.listens(t,o))return this;var n=i({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var r=this._events[t];if(r){this._firingCount=this._firingCount+1||1;for(var s=0,a=r.length;s<a;s++){var l=r[s];l.fn.call(l.ctx||this,n)}this._firingCount--}}return o&&this._propagateEvent(n),this},listens:function(t,e){var i=this._events&&this._events[t];if(i&&i.length)return!0;if(e)for(var o in this._eventParents)if(this._eventParents[o].listens(t,e))return!0;return!1},once:function(t,e,i){if("object"==typeof t){for(var o in t)this.once(o,t[o],e);return this}var r=n((function(){this.off(t,e,i).off(t,r,i)}),this);return this.on(t,e,i).on(t,r,i)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[s(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[s(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,i({layer:t.target,propagatedFrom:t.target},t),!0)}};T.addEventListener=T.on,T.removeEventListener=T.clearAllEventListeners=T.off,T.addOneTimeEventListener=T.once,T.fireEvent=T.fire,T.hasEventListeners=T.listens;var I=E.extend(T);function S(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e}var z=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function j(t,e,i){return t instanceof S?t:y(t)?new S(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new S(t.x,t.y):new S(t,e,i)}function B(t,e){if(t)for(var i=e?[t,e]:t,o=0,n=i.length;o<n;o++)this.extend(i[o])}function Z(t,e){return!t||t instanceof B?t:new B(t,e)}function N(t,e){if(t)for(var i=e?[t,e]:t,o=0,n=i.length;o<n;o++)this.extend(i[o])}function R(t,e){return t instanceof N?t:new N(t,e)}function D(t,e,i){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==i&&(this.alt=+i)}function F(t,e,i){return t instanceof D?t:y(t)&&"object"!=typeof t[0]?3===t.length?new D(t[0],t[1],t[2]):2===t.length?new D(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new D(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new D(t,e,i)}S.prototype={clone:function(){return new S(this.x,this.y)},add:function(t){return this.clone()._add(j(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(j(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new S(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new S(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=z(this.x),this.y=z(this.y),this},distanceTo:function(t){var e=(t=j(t)).x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return(t=j(t)).x===this.x&&t.y===this.y},contains:function(t){return t=j(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+c(this.x)+", "+c(this.y)+")"}},B.prototype={extend:function(t){return t=j(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new S((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new S(this.min.x,this.max.y)},getTopRight:function(){return new S(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,i;return(t="number"==typeof t[0]||t instanceof S?j(t):Z(t))instanceof B?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=Z(t);var e=this.min,i=this.max,o=t.min,n=t.max;return n.x>=e.x&&o.x<=i.x&&n.y>=e.y&&o.y<=i.y},overlaps:function(t){t=Z(t);var e=this.min,i=this.max,o=t.min,n=t.max;return n.x>e.x&&o.x<i.x&&n.y>e.y&&o.y<i.y},isValid:function(){return!(!this.min||!this.max)}},N.prototype={extend:function(t){var e,i,o=this._southWest,n=this._northEast;if(t instanceof D)e=t,i=t;else{if(!(t instanceof N))return t?this.extend(F(t)||R(t)):this;if(i=t._northEast,!(e=t._southWest)||!i)return this}return o||n?(o.lat=Math.min(e.lat,o.lat),o.lng=Math.min(e.lng,o.lng),n.lat=Math.max(i.lat,n.lat),n.lng=Math.max(i.lng,n.lng)):(this._southWest=new D(e.lat,e.lng),this._northEast=new D(i.lat,i.lng)),this},pad:function(t){var e=this._southWest,i=this._northEast,o=Math.abs(e.lat-i.lat)*t,n=Math.abs(e.lng-i.lng)*t;return new N(new D(e.lat-o,e.lng-n),new D(i.lat+o,i.lng+n))},getCenter:function(){return new D((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 D(this.getNorth(),this.getWest())},getSouthEast:function(){return new D(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 D||"lat"in t?F(t):R(t);var e,i,o=this._southWest,n=this._northEast;return t instanceof N?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=o.lat&&i.lat<=n.lat&&e.lng>=o.lng&&i.lng<=n.lng},intersects:function(t){t=R(t);var e=this._southWest,i=this._northEast,o=t.getSouthWest(),n=t.getNorthEast();return n.lat>=e.lat&&o.lat<=i.lat&&n.lng>=e.lng&&o.lng<=i.lng},overlaps:function(t){t=R(t);var e=this._southWest,i=this._northEast,o=t.getSouthWest(),n=t.getNorthEast();return n.lat>e.lat&&o.lat<i.lat&&n.lng>e.lng&&o.lng<i.lng},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=R(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},D.prototype={equals:function(t,e){return!!t&&(t=F(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===e?1e-9:e))},toString:function(t){return"LatLng("+c(this.lat,t)+", "+c(this.lng,t)+")"},distanceTo:function(t){return H.distance(this,F(t))},wrap:function(){return H.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,i=e/Math.cos(Math.PI/180*this.lat);return R([this.lat-e,this.lng-i],[this.lat+e,this.lng+i])},clone:function(){return new D(this.lat,this.lng,this.alt)}};var U,W={latLngToPoint:function(t,e){var i=this.projection.project(t),o=this.scale(e);return this.transformation._transform(i,o)},pointToLatLng:function(t,e){var i=this.scale(e),o=this.transformation.untransform(t,i);return this.projection.unproject(o)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,i=this.scale(t);return new B(this.transformation.transform(e.min,i),this.transformation.transform(e.max,i))},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?l(t.lng,this.wrapLng,!0):t.lng;return new D(this.wrapLat?l(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),i=this.wrapLatLng(e),o=e.lat-i.lat,n=e.lng-i.lng;if(0===o&&0===n)return t;var r=t.getSouthWest(),s=t.getNorthEast();return new N(new D(r.lat-o,r.lng-n),new D(s.lat-o,s.lng-n))}},H=i({},W,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var i=Math.PI/180,o=t.lat*i,n=e.lat*i,r=Math.sin((e.lat-t.lat)*i/2),s=Math.sin((e.lng-t.lng)*i/2),a=r*r+Math.cos(o)*Math.cos(n)*s*s,l=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*l}}),q=6378137,V={R:q,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,i=this.MAX_LATITUDE,o=Math.max(Math.min(i,t.lat),-i),n=Math.sin(o*e);return new S(this.R*t.lng*e,this.R*Math.log((1+n)/(1-n))/2)},unproject:function(t){var e=180/Math.PI;return new D((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(U=q*Math.PI,new B([-U,-U],[U,U]))};function G(t,e,i,o){if(y(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=i,this._d=o}function J(t,e,i,o){return new G(t,e,i,o)}G.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return t.x=(e=e||1)*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return new S((t.x/(e=e||1)-this._b)/this._a,(t.y/e-this._d)/this._c)}};var K=i({},H,{code:"EPSG:3857",projection:V,transformation:function(){var t=.5/(Math.PI*V.R);return J(t,.5,-t,.5)}()}),Y=i({},K,{code:"EPSG:900913"});function Q(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function X(t,e){var i,o,n,r,s,a,l="";for(i=0,n=t.length;i<n;i++){for(o=0,r=(s=t[i]).length;o<r;o++)l+=(o?"L":"M")+(a=s[o]).x+" "+a.y;l+=e?At?"z":"x":""}return l||"M0 0"}var $=document.documentElement.style,tt="ActiveXObject"in window,et=tt&&!document.addEventListener,it="msLaunchUri"in navigator&&!("documentMode"in document),ot=It("webkit"),nt=It("android"),rt=It("android 2")||It("android 3"),st=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),at=nt&&It("Google")&&st<537&&!("AudioNode"in window),lt=!!window.opera,ht=!it&&It("chrome"),ct=It("gecko")&&!ot&&!lt&&!tt,ut=!ht&&It("safari"),pt=It("phantom"),dt="OTransition"in $,ft=0===navigator.platform.indexOf("Win"),mt=tt&&"transition"in $,_t="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!rt,yt="MozPerspective"in $,gt=!window.L_DISABLE_3D&&(mt||_t||yt)&&!dt&&!pt,vt="undefined"!=typeof orientation||It("mobile"),bt=vt&&ot,wt=vt&&_t,xt=!window.PointerEvent&&window.MSPointerEvent,Lt=!(!window.PointerEvent&&!xt),Pt=!window.L_NO_TOUCH&&(Lt||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),Ot=vt&<,Mt=vt&&ct,Ct=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,kt=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",h,e),window.removeEventListener("testPassiveEventSupport",h,e)}catch(i){}return t}(),Et=!!document.createElement("canvas").getContext,At=!(!document.createElementNS||!Q("svg").createSVGRect),Tt=!At&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(i){return!1}}();function It(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var St={ie:tt,ielt9:et,edge:it,webkit:ot,android:nt,android23:rt,androidStock:at,opera:lt,chrome:ht,gecko:ct,safari:ut,phantom:pt,opera12:dt,win:ft,ie3d:mt,webkit3d:_t,gecko3d:yt,any3d:gt,mobile:vt,mobileWebkit:bt,mobileWebkit3d:wt,msPointer:xt,pointer:Lt,touch:Pt,mobileOpera:Ot,mobileGecko:Mt,retina:Ct,passiveEvents:kt,canvas:Et,svg:At,vml:Tt},zt=xt?"MSPointerDown":"pointerdown",jt=xt?"MSPointerMove":"pointermove",Bt=xt?"MSPointerUp":"pointerup",Zt=xt?"MSPointerCancel":"pointercancel",Nt={},Rt=!1;function Dt(t,e,i,o){return"touchstart"===e?Ut(t,i,o):"touchmove"===e?Gt(t,i,o):"touchend"===e&&Jt(t,i,o),this}function Ft(t,e,i){var o=t["_leaflet_"+e+i];return"touchstart"===e?t.removeEventListener(zt,o,!1):"touchmove"===e?t.removeEventListener(jt,o,!1):"touchend"===e&&(t.removeEventListener(Bt,o,!1),t.removeEventListener(Zt,o,!1)),this}function Ut(t,e,i){var o=n((function(t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&He(t),Vt(t,e)}));t["_leaflet_touchstart"+i]=o,t.addEventListener(zt,o,!1),Rt||(document.addEventListener(zt,Wt,!0),document.addEventListener(jt,Ht,!0),document.addEventListener(Bt,qt,!0),document.addEventListener(Zt,qt,!0),Rt=!0)}function Wt(t){Nt[t.pointerId]=t}function Ht(t){Nt[t.pointerId]&&(Nt[t.pointerId]=t)}function qt(t){delete Nt[t.pointerId]}function Vt(t,e){for(var i in t.touches=[],Nt)t.touches.push(Nt[i]);t.changedTouches=[t],e(t)}function Gt(t,e,i){var o=function(t){t.pointerType===(t.MSPOINTER_TYPE_MOUSE||"mouse")&&0===t.buttons||Vt(t,e)};t["_leaflet_touchmove"+i]=o,t.addEventListener(jt,o,!1)}function Jt(t,e,i){var o=function(t){Vt(t,e)};t["_leaflet_touchend"+i]=o,t.addEventListener(Bt,o,!1),t.addEventListener(Zt,o,!1)}var Kt=xt?"MSPointerDown":Lt?"pointerdown":"touchstart",Yt=xt?"MSPointerUp":Lt?"pointerup":"touchend",Qt="_leaflet_";function Xt(t,e,i){var o,n,r=!1,s=250;function a(t){if(Lt){if(!t.isPrimary)return;if("mouse"===t.pointerType)return}else if(t.touches.length>1)return;var e=Date.now(),i=e-(o||e);n=t.touches?t.touches[0]:t,r=i>0&&i<=s,o=e}function l(t){if(r&&!n.cancelBubble){if(Lt){if("mouse"===t.pointerType)return;var i,s,a={};for(s in n)a[s]=(i=n[s])&&i.bind?i.bind(n):i;n=a}n.type="dblclick",n.button=0,e(n),o=null}}return t[Qt+Kt+i]=a,t[Qt+Yt+i]=l,t[Qt+"dblclick"+i]=e,t.addEventListener(Kt,a,!!kt&&{passive:!1}),t.addEventListener(Yt,l,!!kt&&{passive:!1}),t.addEventListener("dblclick",e,!1),this}function $t(t,e){var i=t[Qt+Yt+e],o=t[Qt+"dblclick"+e];return t.removeEventListener(Kt,t[Qt+Kt+e],!!kt&&{passive:!1}),t.removeEventListener(Yt,i,!!kt&&{passive:!1}),t.removeEventListener("dblclick",o,!1),this}var te,ee,ie,oe,ne,re=xe(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),se=xe(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ae="webkitTransition"===se||"OTransition"===se?se+"End":"transitionend";function le(t){return"string"==typeof t?document.getElementById(t):t}function he(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||"auto"===i)&&document.defaultView){var o=document.defaultView.getComputedStyle(t,null);i=o?o[e]:null}return"auto"===i?null:i}function ce(t,e,i){var o=document.createElement(t);return o.className=e||"",i&&i.appendChild(o),o}function ue(t){var e=t.parentNode;e&&e.removeChild(t)}function pe(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function de(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function fe(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function me(t,e){if(void 0!==t.classList)return t.classList.contains(e);var i=ve(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function _e(t,e){if(void 0!==t.classList)for(var i=p(e),o=0,n=i.length;o<n;o++)t.classList.add(i[o]);else if(!me(t,e)){var r=ve(t);ge(t,(r?r+" ":"")+e)}}function ye(t,e){void 0!==t.classList?t.classList.remove(e):ge(t,u((" "+ve(t)+" ").replace(" "+e+" "," ")))}function ge(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function ve(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function be(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&we(t,e)}function we(t,e){var i=!1,o="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(o)}catch(n){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+o+"(opacity="+e+")"}function xe(t){for(var e=document.documentElement.style,i=0;i<t.length;i++)if(t[i]in e)return t[i];return!1}function Le(t,e,i){var o=e||new S(0,0);t.style[re]=(mt?"translate("+o.x+"px,"+o.y+"px)":"translate3d("+o.x+"px,"+o.y+"px,0)")+(i?" scale("+i+")":"")}function Pe(t,e){t._leaflet_pos=e,gt?Le(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function Oe(t){return t._leaflet_pos||new S(0,0)}if("onselectstart"in document)te=function(){ze(window,"selectstart",He)},ee=function(){Be(window,"selectstart",He)};else{var Me=xe(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);te=function(){if(Me){var t=document.documentElement.style;ie=t[Me],t[Me]="none"}},ee=function(){Me&&(document.documentElement.style[Me]=ie,ie=void 0)}}function Ce(){ze(window,"dragstart",He)}function ke(){Be(window,"dragstart",He)}function Ee(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Ae(),oe=t,ne=t.style.outline,t.style.outline="none",ze(window,"keydown",Ae))}function Ae(){oe&&(oe.style.outline=ne,oe=void 0,ne=void 0,Be(window,"keydown",Ae))}function Te(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function Ie(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Se={TRANSFORM:re,TRANSITION:se,TRANSITION_END:ae,get:le,getStyle:he,create:ce,remove:ue,empty:pe,toFront:de,toBack:fe,hasClass:me,addClass:_e,removeClass:ye,setClass:ge,getClass:ve,setOpacity:be,testProp:xe,setTransform:Le,setPosition:Pe,getPosition:Oe,disableTextSelection:te,enableTextSelection:ee,disableImageDrag:Ce,enableImageDrag:ke,preventOutline:Ee,restoreOutline:Ae,getSizedParentNode:Te,getScale:Ie};function ze(t,e,i,o){if("object"==typeof e)for(var n in e)Re(t,n,e[n],i);else for(var r=0,s=(e=p(e)).length;r<s;r++)Re(t,e[r],i,o);return this}var je="_leaflet_events";function Be(t,e,i,o){if("object"==typeof e)for(var n in e)De(t,n,e[n],i);else if(e)for(var r=0,s=(e=p(e)).length;r<s;r++)De(t,e[r],i,o);else{for(var a in t[je])De(t,a,t[je][a]);delete t[je]}return this}function Ze(){if(Lt)return!(it||ut)}var Ne={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Re(t,e,i,o){var n=e+s(i)+(o?"_"+s(o):"");if(t[je]&&t[je][n])return this;var r=function(e){return i.call(o||t,e||window.event)},a=r;Lt&&0===e.indexOf("touch")?Dt(t,e,r,n):Pt&&"dblclick"===e&&!Ze()?Xt(t,r,n):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(Ne[e]||e,r,!!kt&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?t.addEventListener(Ne[e],r=function(e){e=e||window.event,Xe(t,e)&&a(e)},!1):t.addEventListener(e,a,!1):"attachEvent"in t&&t.attachEvent("on"+e,r),t[je]=t[je]||{},t[je][n]=r}function De(t,e,i,o){var n=e+s(i)+(o?"_"+s(o):""),r=t[je]&&t[je][n];if(!r)return this;Lt&&0===e.indexOf("touch")?Ft(t,e,n):Pt&&"dblclick"===e&&!Ze()?$t(t,n):"removeEventListener"in t?t.removeEventListener(Ne[e]||e,r,!1):"detachEvent"in t&&t.detachEvent("on"+e,r),t[je][n]=null}function Fe(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,Qe(t),this}function Ue(t){return Re(t,"wheel",Fe),this}function We(t){return ze(t,"mousedown touchstart dblclick",Fe),Re(t,"click",Ye),this}function He(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function qe(t){return He(t),Fe(t),this}function Ve(t,e){if(!e)return new S(t.clientX,t.clientY);var i=Ie(e),o=i.boundingClientRect;return new S((t.clientX-o.left)/i.x-e.clientLeft,(t.clientY-o.top)/i.y-e.clientTop)}var Ge=ft&&ht?2*window.devicePixelRatio:ct?window.devicePixelRatio:1;function Je(t){return it?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Ge:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}var Ke={};function Ye(t){Ke[t.type]=!0}function Qe(t){var e=Ke[t.type];return Ke[t.type]=!1,e}function Xe(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(o){return!1}return i!==t}var $e={on:ze,off:Be,stopPropagation:Fe,disableScrollPropagation:Ue,disableClickPropagation:We,preventDefault:He,stop:qe,getMousePosition:Ve,getWheelDelta:Je,fakeStop:Ye,skipped:Qe,isExternalTarget:Xe,addListener:ze,removeListener:Be},ti=I.extend({run:function(t,e,i,o){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(o||.5,.2),this._startPos=Oe(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=M(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=1e3*this._duration;e<i?this._runFrame(this._easeOut(e/i),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var i=this._startPos.add(this._offset.multiplyBy(t));e&&i._round(),Pe(this._el,i),this.fire("step")},_complete:function(){C(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),ei=I.extend({options:{crs:K,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=d(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=n(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(F(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=se&>&&!Ot&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),ze(this._proxy,ae,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,o){return e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(F(t),e,this.options.maxBounds),o=o||{},this._stop(),this._loaded&&!o.reset&&!0!==o&&(void 0!==o.animate&&(o.zoom=i({animate:o.animate},o.zoom),o.pan=i({animate:o.animate,duration:o.duration},o.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,o.zoom):this._tryAnimatedPan(t,o.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,e),this)},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return this.setZoom(this._zoom+(t=t||(gt?this.options.zoomDelta:1)),e)},zoomOut:function(t,e){return this.setZoom(this._zoom-(t=t||(gt?this.options.zoomDelta:1)),e)},setZoomAround:function(t,e,i){var o=this.getZoomScale(e),n=this.getSize().divideBy(2),r=(t instanceof S?t:this.latLngToContainerPoint(t)).subtract(n).multiplyBy(1-1/o),s=this.containerPointToLatLng(n.add(r));return this.setView(s,e,{zoom:i})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():R(t);var i=j(e.paddingTopLeft||e.padding||[0,0]),o=j(e.paddingBottomRight||e.padding||[0,0]),n=this.getBoundsZoom(t,!1,i.add(o));if((n="number"==typeof e.maxZoom?Math.min(e.maxZoom,n):n)===1/0)return{center:t.getCenter(),zoom:n};var r=o.subtract(i).divideBy(2),s=this.project(t.getSouthWest(),n),a=this.project(t.getNorthEast(),n);return{center:this.unproject(s.add(a).divideBy(2).add(r),n),zoom:n}},fitBounds:function(t,e){if(!(t=R(t)).isValid())throw new Error("Bounds are not valid.");var i=this._getBoundsCenterZoom(t,e);return this.setView(i.center,i.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(e=e||{},!(t=j(t).round()).x&&!t.y)return this.fire("moveend");if(!0!==e.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new ti,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){_e(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,i){if(!1===(i=i||{}).animate||!gt)return this.setView(t,e,i);this._stop();var o=this.project(this.getCenter()),n=this.project(t),r=this.getSize(),s=this._zoom;t=F(t),e=void 0===e?s:e;var a=Math.max(r.x,r.y),l=a*this.getZoomScale(s,e),h=n.distanceTo(o)||1,c=1.42,u=c*c;function p(t){var e=(l*l-a*a+(t?-1:1)*u*u*h*h)/(2*(t?l:a)*u*h),i=Math.sqrt(e*e+1)-e;return i<1e-9?-18:Math.log(i)}function d(t){return(Math.exp(t)-Math.exp(-t))/2}function f(t){return(Math.exp(t)+Math.exp(-t))/2}function m(t){return d(t)/f(t)}var _=p(0);function y(t){return a*(f(_)/f(_+c*t))}function g(t){return a*(f(_)*m(_+c*t)-d(_))/u}function v(t){return 1-Math.pow(1-t,1.5)}var b=Date.now(),w=(p(1)-_)/c,x=i.duration?1e3*i.duration:1e3*w*.8;function L(){var i=(Date.now()-b)/x,r=v(i)*w;i<=1?(this._flyToFrame=M(L,this),this._move(this.unproject(o.add(n.subtract(o).multiplyBy(g(r)/h)),s),this.getScaleZoom(a/y(r),s),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}return this._moveStart(!0,i.noMoveStart),L.call(this),this},flyToBounds:function(t,e){var i=this._getBoundsCenterZoom(t,e);return this.flyTo(i.center,i.zoom,e)},setMaxBounds:function(t){return(t=R(t)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),o=this._limitCenter(i,this._zoom,R(t));return i.equals(o)||this.panTo(o,e),this._enforcingBounds=!1,this},panInside:function(t,e){var i=j((e=e||{}).paddingTopLeft||e.padding||[0,0]),o=j(e.paddingBottomRight||e.padding||[0,0]),n=this.getCenter(),r=this.project(n),s=this.project(t),a=this.getPixelBounds(),l=a.getSize().divideBy(2),h=Z([a.min.add(i),a.max.subtract(o)]);if(!h.contains(s)){this._enforcingBounds=!0;var c=r.subtract(s),u=j(s.x+c.x,s.y+c.y);(s.x<h.min.x||s.x>h.max.x)&&(u.x=r.x-c.x,c.x>0?u.x+=l.x-i.x:u.x-=l.x-o.x),(s.y<h.min.y||s.y>h.max.y)&&(u.y=r.y-c.y,c.y>0?u.y+=l.y-i.y:u.y-=l.y-o.y),this.panTo(this.unproject(u),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=i({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var o=this.getSize(),r=e.divideBy(2).round(),s=o.divideBy(2).round(),a=r.subtract(s);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(n(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:o})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=i({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=n(this._handleGeolocationResponse,this),o=n(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,o,t):navigator.geolocation.getCurrentPosition(e,o,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,i=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})},_handleGeolocationResponse:function(t){var e=new D(t.coords.latitude,t.coords.longitude),i=e.toBounds(2*t.coords.accuracy),o=this._locateOptions;if(o.setView){var n=this.getBoundsZoom(i);this.setView(e,o.maxZoom?Math.min(n,o.maxZoom):n)}var r={latlng:e,bounds:i,timestamp:t.timestamp};for(var s in t.coords)"number"==typeof t.coords[s]&&(r[s]=t.coords[s]);this.fire("locationfound",r)},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){if(this._initEvents(!0),this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(e){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ue(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(C(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)ue(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var i=ce("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=i),i},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new N(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=R(t),i=j(i||[0,0]);var o=this.getZoom()||0,n=this.getMinZoom(),r=this.getMaxZoom(),s=t.getNorthWest(),a=t.getSouthEast(),l=this.getSize().subtract(i),h=Z(this.project(a,o),this.project(s,o)).getSize(),c=gt?this.options.zoomSnap:1,u=l.x/h.x,p=l.y/h.y,d=e?Math.max(u,p):Math.min(u,p);return o=this.getScaleZoom(d,o),c&&(o=Math.round(o/(c/100))*(c/100),o=e?Math.ceil(o/c)*c:Math.floor(o/c)*c),Math.max(n,Math.min(r,o))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new S(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new B(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs,o=i.zoom(t*i.scale(e=void 0===e?this._zoom:e));return isNaN(o)?1/0:o},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(F(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(j(t),e)},layerPointToLatLng:function(t){var e=j(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(F(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(F(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(R(t))},distance:function(t,e){return this.options.crs.distance(F(t),F(e))},containerPointToLayerPoint:function(t){return j(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return j(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(j(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(F(t)))},mouseEventToContainerPoint:function(t){return Ve(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=le(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");ze(e,"scroll",this._onScroll,this),this._containerId=s(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&>,_e(t,"leaflet-container"+(Pt?" leaflet-touch":"")+(Ct?" leaflet-retina":"")+(et?" leaflet-oldie":"")+(ut?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=he(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Pe(this._mapPane,new S(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(_e(t.markerPane,"leaflet-zoom-hide"),_e(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){Pe(this._mapPane,new S(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var o=this._zoom!==e;this._moveStart(o,!1)._move(t,e)._moveEnd(o),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i){void 0===e&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(o||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return C(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Pe(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[s(this._container)]=this;var e=t?Be:ze;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),gt&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){C(this._resizeRequest),this._resizeRequest=M((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i,o=[],n="mouseout"===e||"mouseover"===e,r=t.target||t.srcElement,a=!1;r;){if((i=this._targets[s(r)])&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(i)){a=!0;break}if(i&&i.listens(e,!0)){if(n&&!Xe(r,t))break;if(o.push(i),n)break}if(r===this._container)break;r=r.parentNode}return o.length||a||n||!Xe(r,t)||(o=[this]),o},_handleDOMEvent:function(t){if(this._loaded&&!Qe(t)){var e=t.type;"mousedown"!==e&&"keypress"!==e&&"keyup"!==e&&"keydown"!==e||Ee(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,o){if("click"===t.type){var n=i({},t);n.type="preclick",this._fireDOMEvent(n,n.type,o)}if(!t._stopped&&(o=(o||[]).concat(this._findEventTargets(t,e))).length){var r=o[0];"contextmenu"===e&&r.listens(e,!0)&&He(t);var s={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var a=r.getLatLng&&(!r._radius||r._radius<=10);s.containerPoint=a?this.latLngToContainerPoint(r.getLatLng()):this.mouseEventToContainerPoint(t),s.layerPoint=this.containerPointToLayerPoint(s.containerPoint),s.latlng=a?r.getLatLng():this.layerPointToLatLng(s.layerPoint)}for(var l=0;l<o.length;l++)if(o[l].fire(e,s,!0),s.originalEvent._stopped||!1===o[l].options.bubblingMouseEvents&&-1!==g(this._mouseEvents,e))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return Oe(this._mapPane)||new S(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,i){var o=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(o)},_latLngBoundsToNewLayerBounds:function(t,e,i){var o=this._getNewPixelOrigin(i,e);return Z([this.project(t.getSouthWest(),e)._subtract(o),this.project(t.getNorthWest(),e)._subtract(o),this.project(t.getSouthEast(),e)._subtract(o),this.project(t.getNorthEast(),e)._subtract(o)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var o=this.project(t,e),n=this.getSize().divideBy(2),r=new B(o.subtract(n),o.add(n)),s=this._getBoundsOffset(r,i,e);return s.round().equals([0,0])?t:this.unproject(o.add(s),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),o=new B(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(o,e))},_getBoundsOffset:function(t,e,i){var o=Z(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i)),n=o.min.subtract(t.min),r=o.max.subtract(t.max);return new S(this._rebound(n.x,-r.x),this._rebound(n.y,-r.y))},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),o=gt?this.options.zoomSnap:1;return o&&(t=Math.round(t/o)*o),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){ye(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(i)||(this.panBy(i,e),0))},_createAnimProxy:function(){var t=this._proxy=ce("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var e=re,i=this._proxy.style[e];Le(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),i===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ue(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();Le(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||!1===i.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var o=this.getZoomScale(e),n=this._getCenterOffset(t)._divideBy(1-1/o);return!(!0!==i.animate&&!this.getSize().contains(n)||(M((function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)}),this),0))},_animateZoom:function(t,e,i,o){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,_e(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:o}),setTimeout(n(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&ye(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),M((function(){this._moveEnd(!0)}),this))}});function ii(t,e){return new ei(t,e)}var oi=E.extend({options:{position:"topright"},initialize:function(t){d(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),o=t._controlCorners[i];return _e(e,"leaflet-control"),-1!==i.indexOf("bottom")?o.insertBefore(e,o.firstChild):o.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(ue(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),ni=function(t){return new oi(t)};ei.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",i=this._controlContainer=ce("div",e+"control-container",this._container);function o(o,n){t[o+n]=ce("div",e+o+" "+e+n,i)}o("top","left"),o("top","right"),o("bottom","left"),o("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)ue(this._controlCorners[t]);ue(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var ri=oi.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,o){return i<o?-1:o<i?1:0}},initialize:function(t,e,i){for(var o in d(this,i),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[o],o);for(o in e)this._addLayer(e[o],o,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return oi.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(s(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){_e(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(_e(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):ye(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return ye(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=ce("div",t),i=this.options.collapsed;e.setAttribute("aria-haspopup",!0),We(e),Ue(e);var o=this._section=ce("section",t+"-list");i&&(this._map.on("click",this.collapse,this),nt||ze(e,{mouseenter:this.expand,mouseleave:this.collapse},this));var n=this._layersLink=ce("a",t+"-toggle",e);n.href="#",n.title="Layers",Pt?(ze(n,"click",qe),ze(n,"click",this.expand,this)):ze(n,"focus",this.expand,this),i||this.expand(),this._baseLayersList=ce("div",t+"-base",o),this._separator=ce("div",t+"-separator",o),this._overlaysList=ce("div",t+"-overlays",o),e.appendChild(o)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&s(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,i){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:i}),this.options.sortLayers&&this._layers.sort(n((function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)}),this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;pe(this._baseLayersList),pe(this._overlaysList),this._layerControlInputs=[];var t,e,i,o,n=0;for(i=0;i<this._layers.length;i++)this._addItem(o=this._layers[i]),e=e||o.overlay,t=t||!o.overlay,n+=o.overlay?0:1;return this.options.hideSingleBase&&(this._baseLayersList.style.display=(t=t&&n>1)?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(s(t.target)),i=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)},_createRadioElement:function(t,e){var i='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",o=document.createElement("div");return o.innerHTML=i,o.firstChild},_addItem:function(t){var e,i=document.createElement("label"),o=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=o):e=this._createRadioElement("leaflet-base-layers_"+s(this),o),this._layerControlInputs.push(e),e.layerId=s(t.layer),ze(e,"click",this._onInputClick,this);var n=document.createElement("span");n.innerHTML=" "+t.name;var r=document.createElement("div");return i.appendChild(r),r.appendChild(e),r.appendChild(n),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(i),this._checkDisabledLayers(),i},_onInputClick:function(){var t,e,i=this._layerControlInputs,o=[],n=[];this._handlingClick=!0;for(var r=i.length-1;r>=0;r--)e=this._getLayer((t=i[r]).layerId).layer,t.checked?o.push(e):t.checked||n.push(e);for(r=0;r<n.length;r++)this._map.hasLayer(n[r])&&this._map.removeLayer(n[r]);for(r=0;r<o.length;r++)this._map.hasLayer(o[r])||this._map.addLayer(o[r]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,e,i=this._layerControlInputs,o=this._map.getZoom(),n=i.length-1;n>=0;n--)e=this._getLayer((t=i[n]).layerId).layer,t.disabled=void 0!==e.options.minZoom&&o<e.options.minZoom||void 0!==e.options.maxZoom&&o>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),si=function(t,e,i){return new ri(t,e,i)},ai=oi.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=ce("div",e+" leaflet-bar"),o=this.options;return this._zoomInButton=this._createButton(o.zoomInText,o.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(o.zoomOutText,o.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,o,n){var r=ce("a",i,o);return r.innerHTML=t,r.href="#",r.title=e,r.setAttribute("role","button"),r.setAttribute("aria-label",e),We(r),ze(r,"click",qe),ze(r,"click",n,this),ze(r,"click",this._refocusOnMap,this),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";ye(this._zoomInButton,e),ye(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMinZoom())&&_e(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMaxZoom())&&_e(this._zoomInButton,e)}});ei.mergeOptions({zoomControl:!0}),ei.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new ai,this.addControl(this.zoomControl))}));var li=function(t){return new ai(t)},hi=oi.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=ce("div",e),o=this.options;return this._addScales(o,e+"-line",i),t.on(o.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=ce("div",e,i)),t.imperial&&(this._iScale=ce("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t);this._updateScale(this._mScale,e<1e3?e+" m":e/1e3+" km",e/t)},_updateImperial:function(t){var e,i,o,n=3.2808399*t;n>5280?(i=this._getRoundNum(e=n/5280),this._updateScale(this._iScale,i+" mi",i/e)):(o=this._getRoundNum(n),this._updateScale(this._iScale,o+" ft",o/n))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return e*(i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1)}}),ci=function(t){return new hi(t)},ui=oi.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){d(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=ce("div","leaflet-control-attribution"),We(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(" | ")}}});ei.mergeOptions({attributionControl:!0}),ei.addInitHook((function(){this.options.attributionControl&&(new ui).addTo(this)}));var pi=function(t){return new ui(t)};oi.Layers=ri,oi.Zoom=ai,oi.Scale=hi,oi.Attribution=ui,ni.layers=si,ni.zoom=li,ni.scale=ci,ni.attribution=pi;var di=E.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});di.addTo=function(t,e){return t.addHandler(e,this),this};var fi,mi={Events:T},_i=Pt?"touchstart mousedown":"mousedown",yi={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},gi={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},vi=I.extend({options:{clickTolerance:3},initialize:function(t,e,i,o){d(this,o),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(ze(this._dragStartTarget,_i,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(vi._dragging===this&&this.finishDrag(),Be(this._dragStartTarget,_i,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!me(this._element,"leaflet-zoom-anim")&&!(vi._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(vi._dragging=this,this._preventOutline&&Ee(this._element),Ce(),te(),this._moving)))){this.fire("down");var e=t.touches?t.touches[0]:t,i=Te(this._element);this._startPoint=new S(e.clientX,e.clientY),this._parentScale=Ie(i),ze(document,gi[t.type],this._onMove,this),ze(document,yi[t.type],this._onUp,this)}},_onMove:function(t){if(!t._simulated&&this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,i=new S(e.clientX,e.clientY)._subtract(this._startPoint);(i.x||i.y)&&(Math.abs(i.x)+Math.abs(i.y)<this.options.clickTolerance||(i.x/=this._parentScale.x,i.y/=this._parentScale.y,He(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=Oe(this._element).subtract(i),_e(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),_e(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(i),this._moving=!0,C(this._animRequest),this._lastEvent=t,this._animRequest=M(this._updatePosition,this,!0)))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),Pe(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){!t._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){for(var t in ye(document.body,"leaflet-dragging"),this._lastTarget&&(ye(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),gi)Be(document,gi[t],this._onMove,this),Be(document,yi[t],this._onUp,this);ke(),ee(),this._moved&&this._moving&&(C(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,vi._dragging=!1}});function bi(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=Li(t=Oi(t,i),i)}function wi(t,e,i){return Math.sqrt(Ai(t,e,i,!0))}function xi(t,e,i){return Ai(t,e,i)}function Li(t,e){var i=t.length,o=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(i);o[0]=o[i-1]=1,Pi(t,o,e,0,i-1);var n,r=[];for(n=0;n<i;n++)o[n]&&r.push(t[n]);return r}function Pi(t,e,i,o,n){var r,s,a,l=0;for(s=o+1;s<=n-1;s++)(a=Ai(t[s],t[o],t[n],!0))>l&&(r=s,l=a);l>i&&(e[r]=1,Pi(t,e,i,o,r),Pi(t,e,i,r,n))}function Oi(t,e){for(var i=[t[0]],o=1,n=0,r=t.length;o<r;o++)Ei(t[o],t[n])>e&&(i.push(t[o]),n=o);return n<r-1&&i.push(t[r-1]),i}function Mi(t,e,i,o,n){var r,s,a,l=o?fi:ki(t,i),h=ki(e,i);for(fi=h;;){if(!(l|h))return[t,e];if(l&h)return!1;a=ki(s=Ci(t,e,r=l||h,i,n),i),r===l?(t=s,l=a):(e=s,h=a)}}function Ci(t,e,i,o,n){var r,s,a=e.x-t.x,l=e.y-t.y,h=o.min,c=o.max;return 8&i?(r=t.x+a*(c.y-t.y)/l,s=c.y):4&i?(r=t.x+a*(h.y-t.y)/l,s=h.y):2&i?(r=c.x,s=t.y+l*(c.x-t.x)/a):1&i&&(r=h.x,s=t.y+l*(h.x-t.x)/a),new S(r,s,n)}function ki(t,e){var i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8),i}function Ei(t,e){var i=e.x-t.x,o=e.y-t.y;return i*i+o*o}function Ai(t,e,i,o){var n,r=e.x,s=e.y,a=i.x-r,l=i.y-s,h=a*a+l*l;return h>0&&((n=((t.x-r)*a+(t.y-s)*l)/h)>1?(r=i.x,s=i.y):n>0&&(r+=a*n,s+=l*n)),a=t.x-r,l=t.y-s,o?a*a+l*l:new S(r,s)}function Ti(t){return!y(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function Ii(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Ti(t)}var Si={simplify:bi,pointToSegmentDistance:wi,closestPointOnSegment:xi,clipSegment:Mi,_getEdgeIntersection:Ci,_getBitCode:ki,_sqClosestPointOnSegment:Ai,isFlat:Ti,_flat:Ii};function zi(t,e,i){var o,n,r,s,a,l,h,c,u,p=[1,4,2,8];for(n=0,h=t.length;n<h;n++)t[n]._code=ki(t[n],e);for(s=0;s<4;s++){for(c=p[s],o=[],n=0,r=(h=t.length)-1;n<h;r=n++)l=t[r],(a=t[n])._code&c?l._code&c||((u=Ci(l,a,c,e,i))._code=ki(u,e),o.push(u)):(l._code&c&&((u=Ci(l,a,c,e,i))._code=ki(u,e),o.push(u)),o.push(a));t=o}return t}var ji={clipPolygon:zi},Bi={project:function(t){return new S(t.lng,t.lat)},unproject:function(t){return new D(t.y,t.x)},bounds:new B([-180,-90],[180,90])},Zi={R:6378137,R_MINOR:6356752.314245179,bounds:new B([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,i=this.R,o=t.lat*e,n=this.R_MINOR/i,r=Math.sqrt(1-n*n),s=r*Math.sin(o),a=Math.tan(Math.PI/4-o/2)/Math.pow((1-s)/(1+s),r/2);return o=-i*Math.log(Math.max(a,1e-10)),new S(t.lng*e*i,o)},unproject:function(t){for(var e,i=180/Math.PI,o=this.R,n=this.R_MINOR/o,r=Math.sqrt(1-n*n),s=Math.exp(-t.y/o),a=Math.PI/2-2*Math.atan(s),l=0,h=.1;l<15&&Math.abs(h)>1e-7;l++)e=r*Math.sin(a),e=Math.pow((1-e)/(1+e),r/2),a+=h=Math.PI/2-2*Math.atan(s*e)-a;return new D(a*i,t.x*i/o)}},Ni={LonLat:Bi,Mercator:Zi,SphericalMercator:V},Ri=i({},H,{code:"EPSG:3395",projection:Zi,transformation:function(){var t=.5/(Math.PI*Zi.R);return J(t,.5,-t,.5)}()}),Di=i({},H,{code:"EPSG:4326",projection:Bi,transformation:J(1/180,1,-1/180,.5)}),Fi=i({},W,{projection:Bi,transformation:J(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,o=e.lat-t.lat;return Math.sqrt(i*i+o*o)},infinite:!0});W.Earth=H,W.EPSG3395=Ri,W.EPSG3857=K,W.EPSG900913=Y,W.EPSG4326=Di,W.Simple=Fi;var Ui=I.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[s(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[s(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",(function(){e.off(i,this)}),this)}this.onAdd(e),this.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this})}}});ei.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=s(t);return this._layers[e]||(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=s(t);return this._layers[e]?(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return!!t&&s(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){for(var e=0,i=(t=t?y(t)?t:[t]:[]).length;e<i;e++)this.addLayer(t[e])},_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[s(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=s(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,i=this._getZoomSpan();for(var o in this._zoomBoundLayers){var n=this._zoomBoundLayers[o].options;t=void 0===n.minZoom?t:Math.min(t,n.minZoom),e=void 0===n.maxZoom?e:Math.max(e,n.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,i!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Wi=Ui.extend({initialize:function(t,e){var i,o;if(d(this,e),this._layers={},t)for(i=0,o=t.length;i<o;i++)this.addLayer(t[i])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return!!t&&("number"==typeof t?t:this.getLayerId(t))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,i,o=Array.prototype.slice.call(arguments,1);for(e in this._layers)(i=this._layers[e])[t]&&i[t].apply(i,o);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return s(t)}}),Hi=function(t,e){return new Wi(t,e)},qi=Wi.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Wi.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),Wi.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new N;for(var e in this._layers){var i=this._layers[e];t.extend(i.getBounds?i.getBounds():i.getLatLng())}return t}}),Vi=function(t,e){return new qi(t,e)},Gi=E.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function(t){d(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var o=this._createImg(i,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(o,t),o},_setIconStyles:function(t,e){var i=this.options,o=i[e+"Size"];"number"==typeof o&&(o=[o,o]);var n=j(o),r=j("shadow"===e&&i.shadowAnchor||i.iconAnchor||n&&n.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),r&&(t.style.marginLeft=-r.x+"px",t.style.marginTop=-r.y+"px"),n&&(t.style.width=n.x+"px",t.style.height=n.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return Ct&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function Ji(t){return new Gi(t)}var Ki=Gi.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 Ki.imagePath||(Ki.imagePath=this._detectIconPath()),(this.options.imagePath||Ki.imagePath)+Gi.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=ce("div","leaflet-default-icon-path",document.body),e=he(t,"background-image")||he(t,"backgroundImage");return document.body.removeChild(t),e=null===e||0!==e.indexOf("url")?"":e.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),Yi=di.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new vi(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),_e(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&ye(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,i=e._map,o=this._marker.options.autoPanSpeed,n=this._marker.options.autoPanPadding,r=Oe(e._icon),s=i.getPixelBounds(),a=i.getPixelOrigin(),l=Z(s.min._subtract(a).add(n),s.max._subtract(a).subtract(n));if(!l.contains(r)){var h=j((Math.max(l.max.x,r.x)-l.max.x)/(s.max.x-l.max.x)-(Math.min(l.min.x,r.x)-l.min.x)/(s.min.x-l.min.x),(Math.max(l.max.y,r.y)-l.max.y)/(s.max.y-l.max.y)-(Math.min(l.min.y,r.y)-l.min.y)/(s.min.y-l.min.y)).multiplyBy(o);i.panBy(h,{animate:!1}),this._draggable._newPos._add(h),this._draggable._startPos._add(h),Pe(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=M(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(C(this._panRequest),this._panRequest=M(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,i=e._shadow,o=Oe(e._icon),n=e._map.layerPointToLatLng(o);i&&Pe(i,o),e._latlng=n,t.latlng=n,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){C(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Qi=Ui.extend({options:{icon:new Ki,interactive:!0,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){d(this,e),this._latlng=F(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=F(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),i=t.icon.createIcon(this._icon),o=!1;i!==this._icon&&(this._icon&&this._removeIcon(),o=!0,t.title&&(i.title=t.title),"IMG"===i.tagName&&(i.alt=t.alt||"")),_e(i,e),t.keyboard&&(i.tabIndex="0"),this._icon=i,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var n=t.icon.createShadow(this._shadow),r=!1;n!==this._shadow&&(this._removeShadow(),r=!0),n&&(_e(n,e),n.alt=""),this._shadow=n,t.opacity<1&&this._updateOpacity(),o&&this.getPane().appendChild(this._icon),this._initInteraction(),n&&r&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),ue(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&ue(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&Pe(this._icon,t),this._shadow&&Pe(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(_e(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Yi)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Yi(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&be(this._icon,t),this._shadow&&be(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function Xi(t,e){return new Qi(t,e)}var $i=Ui.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return d(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+this._renderer.options.tolerance}}),to=$i.extend({options:{fill:!0,radius:10},initialize:function(t,e){d(this,e),this._latlng=F(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=F(t),this.redraw(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return $i.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,i=this._clickTolerance(),o=[t+i,e+i];this._pxBounds=new B(this._point.subtract(o),this._point.add(o))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function eo(t,e){return new to(t,e)}var io=to.extend({initialize:function(t,e,o){if("number"==typeof e&&(e=i({},o,{radius:e})),d(this,e),this._latlng=F(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new N(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:$i.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,i=this._map,o=i.options.crs;if(o.distance===H.distance){var n=Math.PI/180,r=this._mRadius/H.R/n,s=i.project([e+r,t]),a=i.project([e-r,t]),l=s.add(a).divideBy(2),h=i.unproject(l).lat,c=Math.acos((Math.cos(r*n)-Math.sin(e*n)*Math.sin(h*n))/(Math.cos(e*n)*Math.cos(h*n)))/n;(isNaN(c)||0===c)&&(c=r/Math.cos(Math.PI/180*e)),this._point=l.subtract(i.getPixelOrigin()),this._radius=isNaN(c)?0:l.x-i.project([h,t-c]).x,this._radiusY=l.y-s.y}else{var u=o.unproject(o.project(this._latlng).subtract([this._mRadius,0]));this._point=i.latLngToLayerPoint(this._latlng),this._radius=this._point.x-i.latLngToLayerPoint(u).x}this._updateBounds()}});function oo(t,e,i){return new io(t,e,i)}var no=$i.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){d(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e,i,o=1/0,n=null,r=Ai,s=0,a=this._parts.length;s<a;s++)for(var l=this._parts[s],h=1,c=l.length;h<c;h++){var u=r(t,e=l[h-1],i=l[h],!0);u<o&&(o=u,n=r(t,e,i))}return n&&(n.distance=Math.sqrt(o)),n},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,i,o,n,r,s,a=this._rings[0],l=a.length;if(!l)return null;for(t=0,e=0;t<l-1;t++)e+=a[t].distanceTo(a[t+1])/2;if(0===e)return this._map.layerPointToLatLng(a[0]);for(t=0,o=0;t<l-1;t++)if((o+=i=(n=a[t]).distanceTo(r=a[t+1]))>e)return this._map.layerPointToLatLng([r.x-(s=(o-e)/i)*(r.x-n.x),r.y-s*(r.y-n.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=F(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new N,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return Ti(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=Ti(t),o=0,n=t.length;o<n;o++)i?(e[o]=F(t[o]),this._bounds.extend(e[o])):e[o]=this._convertLatLngs(t[o]);return e},_project:function(){var t=new B;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),e=new S(t,t);this._pxBounds=new B([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)])},_projectLatlngs:function(t,e,i){var o,n,r=t.length;if(t[0]instanceof D){for(n=[],o=0;o<r;o++)n[o]=this._map.latLngToLayerPoint(t[o]),i.extend(n[o]);e.push(n)}else for(o=0;o<r;o++)this._projectLatlngs(t[o],e,i)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var e,i,o,n,r,s,a,l=this._parts;for(e=0,o=0,n=this._rings.length;e<n;e++)for(i=0,r=(a=this._rings[e]).length;i<r-1;i++)(s=Mi(a[i],a[i+1],t,i,!0))&&(l[o]=l[o]||[],l[o].push(s[0]),s[1]===a[i+1]&&i!==r-2||(l[o].push(s[1]),o++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,i=0,o=t.length;i<o;i++)t[i]=bi(t[i],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var i,o,n,r,s,a,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,r=this._parts.length;i<r;i++)for(o=0,n=(s=(a=this._parts[i]).length)-1;o<s;n=o++)if((e||0!==o)&&wi(t,a[n],a[o])<=l)return!0;return!1}});function ro(t,e){return new no(t,e)}no._flat=Ii;var so=no.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,i,o,n,r,s,a,l=this._rings[0],h=l.length;if(!h)return null;for(r=s=a=0,t=0,e=h-1;t<h;e=t++)s+=((i=l[t]).x+(o=l[e]).x)*(n=i.y*o.x-o.y*i.x),a+=(i.y+o.y)*n,r+=3*n;return this._map.layerPointToLatLng(0===r?l[0]:[s/r,a/r])},_convertLatLngs:function(t){var e=no.prototype._convertLatLngs.call(this,t),i=e.length;return i>=2&&e[0]instanceof D&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){no.prototype._setLatLngs.call(this,t),Ti(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Ti(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new S(e,e);if(t=new B(t.min.subtract(i),t.max.add(i)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var o,n=0,r=this._rings.length;n<r;n++)(o=zi(this._rings[n],t,!0)).length&&this._parts.push(o)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,i,o,n,r,s,a,l,h=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(n=0,a=this._parts.length;n<a;n++)for(r=0,s=(l=(e=this._parts[n]).length)-1;r<l;s=r++)(i=e[r]).y>t.y!=(o=e[s]).y>t.y&&t.x<(o.x-i.x)*(t.y-i.y)/(o.y-i.y)+i.x&&(h=!h);return h||no.prototype._containsPoint.call(this,t,!0)}});function ao(t,e){return new so(t,e)}var lo=qi.extend({initialize:function(t,e){d(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,o,n=y(t)?t:t.features;if(n){for(e=0,i=n.length;e<i;e++)((o=n[e]).geometries||o.geometry||o.features||o.coordinates)&&this.addData(o);return this}var r=this.options;if(r.filter&&!r.filter(t))return this;var s=ho(t,r);return s?(s.feature=yo(t),s.defaultOptions=s.options,this.resetStyle(s),r.onEachFeature&&r.onEachFeature(t,s),this.addLayer(s)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=i({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer((function(e){this._setLayerStyle(e,t)}),this)},_setLayerStyle:function(t,e){t.setStyle&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))}});function ho(t,e){var i,o,n,r,s="Feature"===t.type?t.geometry:t,a=s?s.coordinates:null,l=[],h=e&&e.pointToLayer,c=e&&e.coordsToLatLng||uo;if(!a&&!s)return null;switch(s.type){case"Point":return co(h,t,i=c(a),e);case"MultiPoint":for(n=0,r=a.length;n<r;n++)i=c(a[n]),l.push(co(h,t,i,e));return new qi(l);case"LineString":case"MultiLineString":return o=po(a,"LineString"===s.type?0:1,c),new no(o,e);case"Polygon":case"MultiPolygon":return o=po(a,"Polygon"===s.type?1:2,c),new so(o,e);case"GeometryCollection":for(n=0,r=s.geometries.length;n<r;n++){var u=ho({geometry:s.geometries[n],type:"Feature",properties:t.properties},e);u&&l.push(u)}return new qi(l);default:throw new Error("Invalid GeoJSON object.")}}function co(t,e,i,o){return t?t(e,i):new Qi(i,o&&o.markersInheritOptions&&o)}function uo(t){return new D(t[1],t[0],t[2])}function po(t,e,i){for(var o,n=[],r=0,s=t.length;r<s;r++)o=e?po(t[r],e-1,i):(i||uo)(t[r]),n.push(o);return n}function fo(t,e){return e="number"==typeof e?e:6,void 0!==t.alt?[c(t.lng,e),c(t.lat,e),c(t.alt,e)]:[c(t.lng,e),c(t.lat,e)]}function mo(t,e,i,o){for(var n=[],r=0,s=t.length;r<s;r++)n.push(e?mo(t[r],e-1,i,o):fo(t[r],o));return!e&&i&&n.push(n[0]),n}function _o(t,e){return t.feature?i({},t.feature,{geometry:e}):yo(e)}function yo(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var go={toGeoJSON:function(t){return _o(this,{type:"Point",coordinates:fo(this.getLatLng(),t)})}};function vo(t,e){return new lo(t,e)}Qi.include(go),io.include(go),to.include(go),no.include({toGeoJSON:function(t){var e=!Ti(this._latlngs);return _o(this,{type:(e?"Multi":"")+"LineString",coordinates:mo(this._latlngs,e?1:0,!1,t)})}}),so.include({toGeoJSON:function(t){var e=!Ti(this._latlngs),i=e&&!Ti(this._latlngs[0]),o=mo(this._latlngs,i?2:e?1:0,!0,t);return e||(o=[o]),_o(this,{type:(i?"Multi":"")+"Polygon",coordinates:o})}}),Wi.include({toMultiPoint:function(t){var e=[];return this.eachLayer((function(i){e.push(i.toGeoJSON(t).geometry.coordinates)})),_o(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var i="GeometryCollection"===e,o=[];return this.eachLayer((function(e){if(e.toGeoJSON){var n=e.toGeoJSON(t);if(i)o.push(n.geometry);else{var r=yo(n);"FeatureCollection"===r.type?o.push.apply(o,r.features):o.push(r)}}})),i?_o(this,{geometries:o,type:"GeometryCollection"}):{type:"FeatureCollection",features:o}}});var bo=vo,wo=Ui.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,i){this._url=t,this._bounds=R(e),d(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(_e(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ue(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&&de(this._image),this},bringToBack:function(){return this._map&&fe(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=R(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:ce("img");_e(e,"leaflet-image-layer"),this._zoomAnimated&&_e(e,"leaflet-zoom-animated"),this.options.className&&_e(e,this.options.className),e.onselectstart=h,e.onmousemove=h,e.onload=n(this.fire,this,"load"),e.onerror=n(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;Le(this._image,i,e)},_reset:function(){var t=this._image,e=new B(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();Pe(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){be(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&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)}}),xo=function(t,e,i){return new wo(t,e,i)},Lo=wo.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:ce("video");if(_e(e,"leaflet-image-layer"),this._zoomAnimated&&_e(e,"leaflet-zoom-animated"),this.options.className&&_e(e,this.options.className),e.onselectstart=h,e.onmousemove=h,e.onloadeddata=n(this.fire,this,"load"),t){for(var i=e.getElementsByTagName("source"),o=[],r=0;r<i.length;r++)o.push(i[r].src);this._url=i.length>0?o:[e.src]}else{y(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted;for(var s=0;s<this._url.length;s++){var a=ce("source");a.src=this._url[s],e.appendChild(a)}}}});function Po(t,e,i){return new Lo(t,e,i)}var Oo=wo.extend({_initImage:function(){var t=this._image=this._url;_e(t,"leaflet-image-layer"),this._zoomAnimated&&_e(t,"leaflet-zoom-animated"),this.options.className&&_e(t,this.options.className),t.onselectstart=h,t.onmousemove=h}});function Mo(t,e,i){return new Oo(t,e,i)}var Co=Ui.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,e){d(this,t),this._source=e},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&be(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&be(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(be(this._container,0),this._removeTimeout=setTimeout(n(ue,void 0,this._container),200)):ue(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=F(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&&de(this._container),this},bringToBack:function(){return this._map&&fe(this._container),this},_prepareOpen:function(t,e,i){if(e instanceof Ui||(i=e,e=t),e instanceof qi)for(var o in t._layers){e=t._layers[o];break}if(!i)if(e.getCenter)i=e.getCenter();else{if(!e.getLatLng)throw new Error("Unable to get source layer LatLng.");i=e.getLatLng()}return this._source=e,this.update(),i},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=j(this.options.offset),i=this._getAnchor();this._zoomAnimated?Pe(this._container,t.add(i)):e=e.add(t).add(i);var o=this._containerBottom=-e.y,n=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=o+"px",this._container.style.left=n+"px"}},_getAnchor:function(){return[0,0]}}),ko=Co.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return t.openPopup(this),this},onAdd:function(t){Co.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof $i||this._source.on("preclick",Fe))},onRemove:function(t){Co.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof $i||this._source.off("preclick",Fe))},getEvents:function(){var t=Co.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t="leaflet-popup",e=this._container=ce("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),i=this._wrapper=ce("div",t+"-content-wrapper",e);if(this._contentNode=ce("div",t+"-content",i),We(e),Ue(this._contentNode),ze(e,"contextmenu",Fe),this._tipContainer=ce("div",t+"-tip-container",e),this._tip=ce("div",t+"-tip",this._tipContainer),this.options.closeButton){var o=this._closeButton=ce("a",t+"-close-button",e);o.href="#close",o.innerHTML="×",ze(o,"click",this._onCloseButtonClick,this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth;i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="";var o=this.options.maxHeight,n="leaflet-popup-scrolled";o&&t.offsetHeight>o?(e.height=o+"px",_e(t,n)):ye(t,n),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();Pe(this._container,e.add(i))},_adjustPan:function(){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var t=this._map,e=parseInt(he(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,o=this._containerWidth,n=new S(this._containerLeft,-i-this._containerBottom);n._add(Oe(this._container));var r=t.layerPointToContainerPoint(n),s=j(this.options.autoPanPadding),a=j(this.options.autoPanPaddingTopLeft||s),l=j(this.options.autoPanPaddingBottomRight||s),h=t.getSize(),c=0,u=0;r.x+o+l.x>h.x&&(c=r.x+o-h.x+l.x),r.x-c-a.x<0&&(c=r.x-a.x),r.y+i+l.y>h.y&&(u=r.y+i-h.y+l.y),r.y-u-a.y<0&&(u=r.y-a.y),(c||u)&&t.fire("autopanstart").panBy([c,u])}},_onCloseButtonClick:function(t){this._close(),qe(t)},_getAnchor:function(){return j(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Eo=function(t,e){return new ko(t,e)};ei.mergeOptions({closePopupOnClick:!0}),ei.include({openPopup:function(t,e,i){return t instanceof ko||(t=new ko(i).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),Ui.include({bindPopup:function(t,e){return t instanceof ko?(d(t,e),this._popup=t,t._source=this):(this._popup&&!e||(this._popup=new ko(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,e){return this._popup&&this._map&&(e=this._popup._prepareOpen(this,t,e),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e=t.layer||t.target;this._popup&&this._map&&(qe(t),e instanceof $i?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var Ao=Co.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){Co.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){Co.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=Co.prototype.getEvents.call(this);return Pt&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){this._contentNode=this._container=ce("div","leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i,o=this._map,n=this._container,r=o.latLngToContainerPoint(o.getCenter()),s=o.layerPointToContainerPoint(t),a=this.options.direction,l=n.offsetWidth,h=n.offsetHeight,c=j(this.options.offset),u=this._getAnchor();"top"===a?(e=l/2,i=h):"bottom"===a?(e=l/2,i=0):"center"===a?(e=l/2,i=h/2):"right"===a?(e=0,i=h/2):"left"===a?(e=l,i=h/2):s.x<r.x?(a="right",e=0,i=h/2):(a="left",e=l+2*(c.x+u.x),i=h/2),t=t.subtract(j(e,i,!0)).add(c).add(u),ye(n,"leaflet-tooltip-right"),ye(n,"leaflet-tooltip-left"),ye(n,"leaflet-tooltip-top"),ye(n,"leaflet-tooltip-bottom"),_e(n,"leaflet-tooltip-"+a),Pe(n,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&be(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return j(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),To=function(t,e){return new Ao(t,e)};ei.include({openTooltip:function(t,e,i){return t instanceof Ao||(t=new Ao(i).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),Ui.include({bindTooltip:function(t,e){return t instanceof Ao?(d(t,e),this._tooltip=t,t._source=this):(this._tooltip&&!e||(this._tooltip=new Ao(e,this)),this._tooltip.setContent(t)),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(t||!this._tooltipHandlersAdded){var e=t?"off":"on",i={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?i.add=this._openTooltip:(i.mouseover=this._openTooltip,i.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(i.mousemove=this._moveTooltip),Pt&&(i.click=this._openTooltip)),this[e](i),this._tooltipHandlersAdded=!t}},openTooltip:function(t,e){return this._tooltip&&this._map&&(e=this._tooltip._prepareOpen(this,t,e),this._map.openTooltip(this._tooltip,e),this._tooltip.options.interactive&&this._tooltip._container&&(_e(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&&(ye(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){this._tooltip&&this._map&&this.openTooltip(t.layer||t.target,this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var e,i,o=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),i=this._map.containerPointToLayerPoint(e),o=this._map.layerPointToLatLng(i)),this._tooltip.setLatLng(o)}});var Io=Gi.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),i=this.options;if(i.html instanceof Element?(pe(e),e.appendChild(i.html)):e.innerHTML=!1!==i.html?i.html:"",i.bgPos){var o=j(i.bgPos);e.style.backgroundPosition=-o.x+"px "+-o.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});function So(t){return new Io(t)}Gi.Default=Ki;var zo=Ui.extend({options:{tileSize:256,opacity:1,updateWhenIdle:vt,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){d(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),ue(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(de(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(fe(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=a(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof S?t:new S(t,t)},_updateZIndex:function(){this._container&&null!=this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,i=this.getPane().children,o=-t(-1/0,1/0),n=0,r=i.length;n<r;n++)e=i[n].style.zIndex,i[n]!==this._container&&e&&(o=t(o,+e));isFinite(o)&&(this.options.zIndex=o+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!et){be(this._container,this.options.opacity);var t=+new Date,e=!1,i=!1;for(var o in this._tiles){var n=this._tiles[o];if(n.current&&n.loaded){var r=Math.min(1,(t-n.loaded)/200);be(n.el,r),r<1?e=!0:(n.active?i=!0:this._onOpaqueTile(n),n.active=!0)}}i&&!this._noPrune&&this._pruneTiles(),e&&(C(this._fadeFrame),this._fadeFrame=M(this._updateOpacity,this))}},_onOpaqueTile:h,_initContainer:function(){this._container||(this._container=ce("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var i in this._levels)i=Number(i),this._levels[i].el.children.length||i===t?(this._levels[i].el.style.zIndex=e-Math.abs(t-i),this._onUpdateLevel(i)):(ue(this._levels[i].el),this._removeTilesAtZoom(i),this._onRemoveLevel(i),delete this._levels[i]);var o=this._levels[t],n=this._map;return o||((o=this._levels[t]={}).el=ce("div","leaflet-tile-container leaflet-zoom-animated",this._container),o.el.style.zIndex=e,o.origin=n.project(n.unproject(n.getPixelOrigin()),t).round(),o.zoom=t,this._setZoomTransform(o,n.getCenter(),n.getZoom()),h(o.el.offsetWidth),this._onCreateLevel(o)),this._level=o,o}},_onUpdateLevel:h,_onRemoveLevel:h,_onCreateLevel:h,_pruneTiles:function(){if(this._map){var t,e,i=this._map.getZoom();if(i>this.options.maxZoom||i<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)if((e=this._tiles[t]).current&&!e.active){var o=e.coords;this._retainParent(o.x,o.y,o.z,o.z-5)||this._retainChildren(o.x,o.y,o.z,o.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)ue(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,i,o){var n=Math.floor(t/2),r=Math.floor(e/2),s=i-1,a=new S(+n,+r);a.z=+s;var l=this._tileCoordsToKey(a),h=this._tiles[l];return h&&h.active?(h.retain=!0,!0):(h&&h.loaded&&(h.retain=!0),s>o&&this._retainParent(n,r,s,o))},_retainChildren:function(t,e,i,o){for(var n=2*t;n<2*t+2;n++)for(var r=2*e;r<2*e+2;r++){var s=new S(n,r);s.z=i+1;var a=this._tileCoordsToKey(s),l=this._tiles[a];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),i+1<o&&this._retainChildren(n,r,i+1,o))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,i,o){var n=Math.round(e);n=void 0!==this.options.maxZoom&&n>this.options.maxZoom||void 0!==this.options.minZoom&&n<this.options.minZoom?void 0:this._clampZoom(n),o&&!(this.options.updateWhenZooming&&n!==this._tileZoom)||(this._tileZoom=n,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==n&&this._update(t),i||this._pruneTiles(),this._noPrune=!!i),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var i in this._levels)this._setZoomTransform(this._levels[i],t,e)},_setZoomTransform:function(t,e,i){var o=this._map.getZoomScale(i,t.zoom),n=t.origin.multiplyBy(o).subtract(this._map._getNewPixelOrigin(e,i)).round();gt?Le(t.el,n,o):Pe(t.el,n)},_resetGrid:function(){var t=this._map,e=t.options.crs,i=this._tileSize=this.getTileSize(),o=this._tileZoom,n=this._map.getPixelWorldBounds(this._tileZoom);n&&(this._globalTileRange=this._pxBoundsToTileRange(n)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],o).x/i.x),Math.ceil(t.project([0,e.wrapLng[1]],o).x/i.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],o).y/i.x),Math.ceil(t.project([e.wrapLat[1],0],o).y/i.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,i=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),o=e.getZoomScale(i,this._tileZoom),n=e.project(t,this._tileZoom).floor(),r=e.getSize().divideBy(2*o);return new B(n.subtract(r),n.add(r))},_update:function(t){var e=this._map;if(e){var i=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var o=this._getTiledPixelBounds(t),n=this._pxBoundsToTileRange(o),r=n.getCenter(),s=[],a=this.options.keepBuffer,l=new B(n.getBottomLeft().subtract([a,-a]),n.getTopRight().add([a,-a]));if(!(isFinite(n.min.x)&&isFinite(n.min.y)&&isFinite(n.max.x)&&isFinite(n.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var h in this._tiles){var c=this._tiles[h].coords;c.z===this._tileZoom&&l.contains(new S(c.x,c.y))||(this._tiles[h].current=!1)}if(Math.abs(i-this._tileZoom)>1)this._setView(t,i);else{for(var u=n.min.y;u<=n.max.y;u++)for(var p=n.min.x;p<=n.max.x;p++){var d=new S(p,u);if(d.z=this._tileZoom,this._isValidTile(d)){var f=this._tiles[this._tileCoordsToKey(d)];f?f.current=!0:s.push(d)}}if(s.sort((function(t,e){return t.distanceTo(r)-e.distanceTo(r)})),0!==s.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(p=0;p<s.length;p++)this._addTile(s[p],m);this._level.el.appendChild(m)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var i=this._globalTileRange;if(!e.wrapLng&&(t.x<i.min.x||t.x>i.max.x)||!e.wrapLat&&(t.y<i.min.y||t.y>i.max.y))return!1}if(!this.options.bounds)return!0;var o=this._tileCoordsToBounds(t);return R(this.options.bounds).overlaps(o)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),o=t.scaleBy(i),n=o.add(i);return[e.unproject(o,t.z),e.unproject(n,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new N(e[0],e[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new S(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(ue(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){_e(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=h,t.onmousemove=h,et&&this.options.opacity<1&&be(t,this.options.opacity),nt&&!rt&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var i=this._getTilePos(t),o=this._tileCoordsToKey(t),r=this.createTile(this._wrapCoords(t),n(this._tileReady,this,t));this._initTile(r),this.createTile.length<2&&M(n(this._tileReady,this,t,null,r)),Pe(r,i),this._tiles[o]={el:r,coords:t,current:!0},e.appendChild(r),this.fire("tileloadstart",{tile:r,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var o=this._tileCoordsToKey(t);(i=this._tiles[o])&&(i.loaded=+new Date,this._map._fadeAnimated?(be(i.el,0),C(this._fadeFrame),this._fadeFrame=M(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(_e(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),et||!this._map._fadeAnimated?M(this._pruneTiles,this):setTimeout(n(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new S(this._wrapX?l(t.x,this._wrapX):t.x,this._wrapY?l(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new B(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function jo(t){return new zo(t)}var Bo=zo.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,(e=d(this,e)).detectRetina&&Ct&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),nt||this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var i=document.createElement("img");return ze(i,"load",n(this._tileOnLoad,this,e,i)),ze(i,"error",n(this._tileOnError,this,e,i)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),i.alt="",i.setAttribute("role","presentation"),i.src=this.getTileUrl(t),i},getTileUrl:function(t){var e={r:Ct?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var o=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=o),e["-y"]=o}return _(this._url,i(e,this.options))},_tileOnLoad:function(t,e){et?setTimeout(n(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var o=this.options.errorTileUrl;o&&e.getAttribute("src")!==o&&(e.src=o),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom;return this.options.zoomReverse&&(t=this.options.maxZoom-t),t+this.options.zoomOffset},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=h,e.onerror=h,e.complete||(e.src=v,ue(e),delete this._tiles[t]))},_removeTile:function(t){var e=this._tiles[t];if(e)return at||e.el.setAttribute("src",v),zo.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(this._map&&(!i||i.getAttribute("src")!==v))return zo.prototype._tileReady.call(this,t,e,i)}});function Zo(t,e){return new Bo(t,e)}var No=Bo.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var o=i({},this.defaultWmsParams);for(var n in e)n in this.options||(o[n]=e[n]);var r=(e=d(this,e)).detectRetina&&Ct?2:1,s=this.getTileSize();o.width=s.x*r,o.height=s.y*r,this.wmsParams=o},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version),this.wmsParams[this._wmsVersion>=1.3?"crs":"srs"]=this._crs.code,Bo.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,o=Z(i.project(e[0]),i.project(e[1])),n=o.min,r=o.max,s=(this._wmsVersion>=1.3&&this._crs===Di?[n.y,n.x,r.y,r.x]:[n.x,n.y,r.x,r.y]).join(","),a=Bo.prototype.getTileUrl.call(this,t);return a+f(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+s},setParams:function(t,e){return i(this.wmsParams,t),e||this.redraw(),this}});function Ro(t,e){return new No(t,e)}Bo.WMS=No,Zo.wms=Ro;var Do=Ui.extend({options:{padding:.1,tolerance:0},initialize:function(t){d(this,t),s(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&_e(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var i=this._map.getZoomScale(e,this._zoom),o=Oe(this._container),n=this._map.getSize().multiplyBy(.5+this.options.padding),r=this._map.project(this._center,e),s=this._map.project(t,e).subtract(r),a=n.multiplyBy(-i).add(o).add(n).subtract(s);gt?Le(this._container,a,i):Pe(this._container,a)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new B(i,i.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Fo=Do.extend({getEvents:function(){var t=Do.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Do.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");ze(t,"mousemove",this._onMouseMove,this),ze(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),ze(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){C(this._redrawRequest),delete this._ctx,ue(this._container),Be(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){Do.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),o=Ct?2:1;Pe(e,t.min),e.width=o*i.x,e.height=o*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",Ct&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){Do.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[s(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,i=e.next,o=e.prev;i?i.prev=o:this._drawLast=o,o?o.next=i:this._drawFirst=i,delete t._order,delete this._layers[s(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var e,i,o=t.options.dashArray.split(/[, ]+/),n=[];for(i=0;i<o.length;i++){if(e=Number(o[i]),isNaN(e))return;n.push(e)}t.options._dashArray=n}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||M(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new B,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var i=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,i.x,i.y),this._ctx.clip()}this._drawing=!0;for(var o=this._drawFirst;o;o=o.next)t=o.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var i,o,n,r,s=t._parts,a=s.length,l=this._ctx;if(a){for(l.beginPath(),i=0;i<a;i++){for(o=0,n=s[i].length;o<n;o++)l[o?"lineTo":"moveTo"]((r=s[i][o]).x,r.y);e&&l.closePath()}this._fillStroke(l,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,i=this._ctx,o=Math.max(Math.round(t._radius),1),n=(Math.max(Math.round(t._radiusY),1)||o)/o;1!==n&&(i.save(),i.scale(1,n)),i.beginPath(),i.arc(e.x,e.y/n,o,0,2*Math.PI,!1),1!==n&&i.restore(),this._fillStroke(i,t)}},_fillStroke:function(t,e){var i=e.options;i.fill&&(t.globalAlpha=i.fillOpacity,t.fillStyle=i.fillColor||i.color,t.fill(i.fillRule||"evenodd")),i.stroke&&0!==i.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=i.opacity,t.lineWidth=i.weight,t.strokeStyle=i.color,t.lineCap=i.lineCap,t.lineJoin=i.lineJoin,t.stroke())},_onClick:function(t){for(var e,i,o=this._map.mouseEventToLayerPoint(t),n=this._drawFirst;n;n=n.next)(e=n.layer).options.interactive&&e._containsPoint(o)&&("click"!==t.type&&"preclick"===t.type||!this._map._draggableMoved(e))&&(i=e);i&&(Ye(t),this._fireEvent([i],t))},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(ye(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,e){if(!this._mouseHoverThrottled){for(var i,o,r=this._drawFirst;r;r=r.next)(i=r.layer).options.interactive&&i._containsPoint(e)&&(o=i);o!==this._hoveredLayer&&(this._handleMouseOut(t),o&&(_e(this._container,"leaflet-interactive"),this._fireEvent([o],t,"mouseover"),this._hoveredLayer=o)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(n((function(){this._mouseHoverThrottled=!1}),this),32)}},_fireEvent:function(t,e,i){this._map._fireDOMEvent(e,i||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var i=e.next,o=e.prev;i&&(i.prev=o,o?o.next=i:i&&(this._drawFirst=i),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t))}},_bringToBack:function(t){var e=t._order;if(e){var i=e.next,o=e.prev;o&&(o.next=i,i?i.prev=o:o&&(this._drawLast=o),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}});function Uo(t){return Et?new Fo(t):null}var Wo=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">')}}}(),Ho={_initContainer:function(){this._container=ce("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Do.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Wo("shape");_e(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Wo("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[s(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;ue(e),t.removeInteractiveTarget(e),delete this._layers[s(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,o=t.options,n=t._container;n.stroked=!!o.stroke,n.filled=!!o.fill,o.stroke?(e||(e=t._stroke=Wo("stroke")),n.appendChild(e),e.weight=o.weight+"px",e.color=o.color,e.opacity=o.opacity,e.dashStyle=o.dashArray?y(o.dashArray)?o.dashArray.join(" "):o.dashArray.replace(/( *, *)/g," "):"",e.endcap=o.lineCap.replace("butt","flat"),e.joinstyle=o.lineJoin):e&&(n.removeChild(e),t._stroke=null),o.fill?(i||(i=t._fill=Wo("fill")),n.appendChild(i),i.color=o.fillColor||o.color,i.opacity=o.fillOpacity):i&&(n.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),o=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+o+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){de(t._container)},_bringToBack:function(t){fe(t._container)}},qo=Tt?Wo:Q,Vo=Do.extend({getEvents:function(){var t=Do.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=qo("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=qo("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ue(this._container),Be(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){Do.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),Pe(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=qo("path");t.options.className&&_e(e,t.options.className),t.options.interactive&&_e(e,"leaflet-interactive"),this._updateStyle(t),this._layers[s(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ue(t._path),t.removeInteractiveTarget(t._path),delete this._layers[s(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,i=t.options;e&&(i.stroke?(e.setAttribute("stroke",i.color),e.setAttribute("stroke-opacity",i.opacity),e.setAttribute("stroke-width",i.weight),e.setAttribute("stroke-linecap",i.lineCap),e.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?e.setAttribute("stroke-dasharray",i.dashArray):e.removeAttribute("stroke-dasharray"),i.dashOffset?e.setAttribute("stroke-dashoffset",i.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),i.fill?(e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,X(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),o="a"+i+","+(Math.max(Math.round(t._radiusY),1)||i)+" 0 1,0 ",n=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+o+2*i+",0 "+o+2*-i+",0 ";this._setPath(t,n)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){de(t._path)},_bringToBack:function(t){fe(t._path)}});function Go(t){return At||Tt?new Vo(t):null}Tt&&Vo.include(Ho),ei.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&Uo(t)||Go(t)}});var Jo=so.extend({initialize:function(t,e){so.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=R(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function Ko(t,e){return new Jo(t,e)}Vo.create=qo,Vo.pointsToPath=X,lo.geometryToLayer=ho,lo.coordsToLatLng=uo,lo.coordsToLatLngs=po,lo.latLngToCoords=fo,lo.latLngsToCoords=mo,lo.getFeature=_o,lo.asFeature=yo,ei.mergeOptions({boxZoom:!0});var Yo=di.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){ze(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Be(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ue(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),te(),Ce(),this._startPoint=this._map.mouseEventToContainerPoint(t),ze(document,{contextmenu:qe,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=ce("div","leaflet-zoom-box",this._container),_e(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new B(this._point,this._startPoint),i=e.getSize();Pe(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(ue(this._box),ye(this._container,"leaflet-crosshair")),ee(),ke(),Be(document,{contextmenu:qe,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(n(this._resetState,this),0);var e=new N(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});ei.addInitHook("addHandler","boxZoom",Yo),ei.mergeOptions({doubleClickZoom:!0});var Qo=di.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),o=e.options.zoomDelta,n=t.originalEvent.shiftKey?i-o:i+o;"center"===e.options.doubleClickZoom?e.setZoom(n):e.setZoomAround(t.containerPoint,n)}});ei.addInitHook("addHandler","doubleClickZoom",Qo),ei.mergeOptions({dragging:!0,inertia:!rt,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Xo=di.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new vi(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))}_e(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){ye(this._map._container,"leaflet-grab"),ye(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=R(this._map.options.maxBounds);this._offsetLimit=Z(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,o=this._draggable._newPos.x,n=(o-e+i)%t+e-i,r=(o+e+i)%t-e-i,s=Math.abs(n+i)<Math.abs(r+i)?n:r;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=s},_onDragEnd:function(t){var e=this._map,i=e.options,o=!i.inertia||this._times.length<2;if(e.fire("dragend",t),o)e.fire("moveend");else{this._prunePositions(+new Date);var n=this._lastPos.subtract(this._positions[0]),r=i.easeLinearity,s=n.multiplyBy(r/((this._lastTime-this._times[0])/1e3)),a=s.distanceTo([0,0]),l=Math.min(i.inertiaMaxSpeed,a),h=s.multiplyBy(l/a),c=l/(i.inertiaDeceleration*r),u=h.multiplyBy(-c/2).round();u.x||u.y?(u=e._limitOffset(u,e.options.maxBounds),M((function(){e.panBy(u,{duration:c,easeLinearity:r,noMoveStart:!0,animate:!0})}))):e.fire("moveend")}}});ei.addInitHook("addHandler","dragging",Xo),ei.mergeOptions({keyboard:!0,keyboardPanDelta:80});var $o=di.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),ze(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Be(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,e=document.documentElement,i=t.scrollTop||e.scrollTop,o=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(o,i)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,i,o=this._panKeys={},n=this.keyCodes;for(e=0,i=n.left.length;e<i;e++)o[n.left[e]]=[-1*t,0];for(e=0,i=n.right.length;e<i;e++)o[n.right[e]]=[t,0];for(e=0,i=n.down.length;e<i;e++)o[n.down[e]]=[0,t];for(e=0,i=n.up.length;e<i;e++)o[n.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,i,o=this._zoomKeys={},n=this.keyCodes;for(e=0,i=n.zoomIn.length;e<i;e++)o[n.zoomIn[e]]=t;for(e=0,i=n.zoomOut.length;e<i;e++)o[n.zoomOut[e]]=-t},_addHooks:function(){ze(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Be(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,i=t.keyCode,o=this._map;if(i in this._panKeys)o._panAnim&&o._panAnim._inProgress||(e=this._panKeys[i],t.shiftKey&&(e=j(e).multiplyBy(3)),o.panBy(e),o.options.maxBounds&&o.panInsideBounds(o.options.maxBounds));else if(i in this._zoomKeys)o.setZoom(o.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[i]);else{if(27!==i||!o._popup||!o._popup.options.closeOnEscapeKey)return;o.closePopup()}qe(t)}}});ei.addInitHook("addHandler","keyboard",$o),ei.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var tn=di.extend({addHooks:function(){ze(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Be(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=Je(t),i=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var o=Math.max(i-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(n(this._performZoom,this),o),qe(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),i=this._map.options.zoomSnap||0;t._stop();var o=4*Math.log(2/(1+Math.exp(-Math.abs(this._delta/(4*this._map.options.wheelPxPerZoomLevel)))))/Math.LN2,n=i?Math.ceil(o/i)*i:o,r=t._limitZoom(e+(this._delta>0?n:-n))-e;this._delta=0,this._startTime=null,r&&("center"===t.options.scrollWheelZoom?t.setZoom(e+r):t.setZoomAround(this._lastMousePos,e+r))}});ei.addInitHook("addHandler","scrollWheelZoom",tn),ei.mergeOptions({tap:!0,tapTolerance:15});var en=di.extend({addHooks:function(){ze(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Be(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(He(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var e=t.touches[0],i=e.target;this._startPos=this._newPos=new S(e.clientX,e.clientY),i.tagName&&"a"===i.tagName.toLowerCase()&&_e(i,"leaflet-active"),this._holdTimeout=setTimeout(n((function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))}),this),1e3),this._simulateEvent("mousedown",e),ze(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),Be(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var e=t.changedTouches[0],i=e.target;i&&i.tagName&&"a"===i.tagName.toLowerCase()&&ye(i,"leaflet-active"),this._simulateEvent("mouseup",e),this._isTapValid()&&this._simulateEvent("click",e)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new S(e.clientX,e.clientY),this._simulateEvent("mousemove",e)},_simulateEvent:function(t,e){var i=document.createEvent("MouseEvents");i._simulated=!0,e.target._simulatedClick=!0,i.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(i)}});!Pt||Lt&&!ut||ei.addInitHook("addHandler","tap",en),ei.mergeOptions({touchZoom:Pt&&!rt,bounceAtZoomLimits:!0});var on=di.extend({addHooks:function(){_e(this._map._container,"leaflet-touch-zoom"),ze(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){ye(this._map._container,"leaflet-touch-zoom"),Be(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var i=e.mouseEventToContainerPoint(t.touches[0]),o=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(i.add(o)._divideBy(2))),this._startDist=i.distanceTo(o),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),ze(document,"touchmove",this._onTouchMove,this),ze(document,"touchend",this._onTouchEnd,this),He(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),o=e.mouseEventToContainerPoint(t.touches[1]),r=i.distanceTo(o)/this._startDist;if(this._zoom=e.getScaleZoom(r,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&r<1||this._zoom>e.getMaxZoom()&&r>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===r)return}else{var s=i._add(o)._divideBy(2)._subtract(this._centerPoint);if(1===r&&0===s.x&&0===s.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(s),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),C(this._animRequest);var a=n(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=M(a,this,!0),He(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,C(this._animRequest),Be(document,"touchmove",this._onTouchMove,this),Be(document,"touchend",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});ei.addInitHook("addHandler","touchZoom",on),ei.BoxZoom=Yo,ei.DoubleClickZoom=Qo,ei.Drag=Xo,ei.Keyboard=$o,ei.ScrollWheelZoom=tn,ei.Tap=en,ei.TouchZoom=on,t.version=e,t.Control=oi,t.control=ni,t.Browser=St,t.Evented=I,t.Mixin=mi,t.Util=k,t.Class=E,t.Handler=di,t.extend=i,t.bind=n,t.stamp=s,t.setOptions=d,t.DomEvent=$e,t.DomUtil=Se,t.PosAnimation=ti,t.Draggable=vi,t.LineUtil=Si,t.PolyUtil=ji,t.Point=S,t.point=j,t.Bounds=B,t.bounds=Z,t.Transformation=G,t.transformation=J,t.Projection=Ni,t.LatLng=D,t.latLng=F,t.LatLngBounds=N,t.latLngBounds=R,t.CRS=W,t.GeoJSON=lo,t.geoJSON=vo,t.geoJson=bo,t.Layer=Ui,t.LayerGroup=Wi,t.layerGroup=Hi,t.FeatureGroup=qi,t.featureGroup=Vi,t.ImageOverlay=wo,t.imageOverlay=xo,t.VideoOverlay=Lo,t.videoOverlay=Po,t.SVGOverlay=Oo,t.svgOverlay=Mo,t.DivOverlay=Co,t.Popup=ko,t.popup=Eo,t.Tooltip=Ao,t.tooltip=To,t.Icon=Gi,t.icon=Ji,t.DivIcon=Io,t.divIcon=So,t.Marker=Qi,t.marker=Xi,t.TileLayer=Bo,t.tileLayer=Zo,t.GridLayer=zo,t.gridLayer=jo,t.SVG=Vo,t.svg=Go,t.Renderer=Do,t.Canvas=Fo,t.canvas=Uo,t.Path=$i,t.CircleMarker=to,t.circleMarker=eo,t.Circle=io,t.circle=oo,t.Polyline=no,t.polyline=ro,t.Polygon=so,t.polygon=ao,t.Rectangle=Jo,t.rectangle=Ko,t.Map=ei,t.map=ii;var nn=window.L;t.noConflict=function(){return window.L=nn,this},window.L=t})(l.exports);var h=l.exports;function c(t,e={},i){return new(h.Control.extend({onAdd(){const o=document.createElement("div"),n=t.onAdd(i);return o.classList.add("leaflet-control"),e.bar&&o.classList.add("leaflet-bar"),e.addClass&&o.classList.add(e.addClass),e.margin||e.bar||(o.style.marginBottom="0px",o.style.marginTop="0px",o.style.marginLeft="0px",o.style.marginRight="0px"),n&&o.appendChild(n),h.DomEvent.disableClickPropagation(o),o},onRemove(){t.onRemove()}}))}function u(t,e,i={}){const o=function(t,e=[]){for(;null!==t;t=Object.getPrototypeOf(t)){const i=Object.getOwnPropertyNames(t);for(let t=0;t<i.length;t++)-1==e.indexOf(i[t])&&e.push(i[t])}return e}(t.prototype);const n=void 0===i.replace||i.replace;e.forEach((e=>{Object.getOwnPropertyNames(e.prototype).forEach((i=>{const r=-1!==o.indexOf(i);if(!n&&!r||n){const o=Object.getOwnPropertyDescriptor(e.prototype,i);o&&Object.defineProperty(t.prototype,i,o)}}))}))}function p(t){return null!=t}function d(t){return"string"==typeof t?!!t:p(t)}function f(t,e,i=!1){let o=t;const n=e,r=Array.isArray(n);let s=r&&[]||{};return r&&Array.isArray(n)?i?(o=o||[],s=s.concat(o),n.forEach(((t,e)=>{void 0===s[e]?s[e]=t:"object"==typeof t?s[e]=f(o[e],t,i):-1===o.indexOf(t)&&s.push(t)}))):s=n:(o&&"object"==typeof o&&Object.keys(o).forEach((function(t){s[t]=o[t]})),Object.keys(n).forEach((function(t){s[t]="object"==typeof n[t]&&n[t]&&"object"==typeof o[t]&&"object"==typeof n[t]?f(o[t],n[t],i):n[t]}))),s}function m(t){if(!t.lngLat&&t.latLng){t.lngLat=[t.latLng.lng,t.latLng.lat]}return t}function _(t,e=10){let i;function o(...n){o.clear(),i=setTimeout((()=>{i=null,t.apply(this,n)}),e)}return o.clear=function(){i&&(clearTimeout(i),i=null)},o}const y=6371;function g(t){return{type:"Polygon",coordinates:[v(t)]}}function v(t){const e=[t[0],t[1]];return[e,[t[2],t[1]],[t[2],t[3]],[t[0],t[3]],e]}const b=Math.PI/180,w=180/Math.PI;function x(t,e){e=e>85.06?85.06:e<-85.06?-85.06:e;const i=20037508.34*t/180;let o=Math.log(Math.tan((90+e)*Math.PI/360))/(Math.PI/180);return o=20037508.34*o/180,[i,o]}function P(t,e,i,o){if(t instanceof Array)return e instanceof Array&&e.sort().join("")===t.sort().join("");if(t instanceof Date)return e instanceof Date&&""+t==""+e;if(t instanceof Function){if(!(e instanceof Function))return!1}else if(t instanceof Object)return e instanceof Object&&(t===i?e===o:O(t,e));return t===e}function O(t,e){const i=Object.keys(t).sort(),o=Object.keys(e).sort();if(i.length!==o.length)return!1;if(i.join("")!==o.join(""))return!1;for(let n=0;n<i.length;n++){if(!P(t[i[n]],e[o[n]],t,e))return!1}return!0}function M(t){const e={};return Object.keys(t).forEach((i=>{t[i]instanceof Array||t[i]!==Object(t[i])?void 0!==t[i]&&(e[i]=t[i]):e[i]=M(t[i])})),e}function C(t){return"[object Object]"===Object.prototype.toString.call(t)}function k(t){return t.replace(/([^:]\/)\/+/g,"$1")}function E(t){const e=t.getNorthEast(),i=t.getSouthWest();return[i.lng,i.lat,e.lng,e.lat]}function A(t){const e={};for(let o=0;o<t.length;o++)e[t[o]]=1+(e[t[o]]||0);let i="";for(const o in e){e[o]>(i?e[i]:0)&&(i=o)}return i}const T={Point:"point",LineString:"line",MultiPoint:"point",Polygon:"polygon",MultiLineString:"line",MultiPolygon:"polygon",GeometryCollection:"polygon"},I={stroke:!1,opacity:1},S={};for(const L in T){const t=T[L],e=S[t]||[];e.push(L),S[t]=e}function z(t,e){return-1!==(S[e]||[]).indexOf(t)}function j(t){const e=new h.GeoJSON;return(Array.isArray(t)?t:[t]).forEach((t=>e.addData(t))),e.getBounds()}function B(t){return{getBounds:()=>function(t){return E(j(t))}(t),getCenter:()=>function(t){const{lat:e,lng:i}=j(t).getCenter();return[i,e]}(t)}}var Z=Object.defineProperty,N=(t,e,i)=>(((t,e,i)=>{e in t?Z(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i})(t,"symbol"!=typeof e?e+"":e,i),i);class R{constructor(t,e){if(this.map=t,this.options=e,N(this,"layer"),N(this,"pane","order-0"),void 0!==e.order){const i="order-"+e.order;let o=t.getPane(i);o||(o=t.createPane(i)),o.style.zIndex=String(Math.round(100*e.order)),this.pane=i}}addLayer(t){Object.assign(this.options,t)}}function D(t){const e=t.containerPoint,i=t.latlng,{lat:o,lng:n}=i;return{latLng:i,lngLat:[n,o],pixel:{left:e.x,top:e.y},source:t}}var F=Object.defineProperty,U=Object.getOwnPropertySymbols,W=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable,q=(t,e,i)=>e in t?F(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;function V({layer:t,source:e}){const i=e.target.feature;return((t,e)=>{for(var i in e||(e={}))W.call(e,i)&&q(t,i,e[i]);if(U)for(var i of U(e))H.call(e,i)&&q(t,i,e[i]);return t})({layer:t,feature:i,event:D(e),source:e},B(i))}var G=Object.defineProperty,J=Object.getOwnPropertySymbols,K=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable,Q=(t,e,i)=>e in t?G(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,X=(t,e,i)=>(Q(t,"symbol"!=typeof e?e+"":e,i),i);class ${constructor(t){X(this,"layer"),X(this,"_onclick"),X(this,"_mouseout"),X(this,"_mouseover"),this.layer=t}handleMouseEvents(t){const{onClick:e,onLayerClick:i,onMouseOut:o,onMouseOver:n}=this.layer.options,r=e||i;r&&(this._onclick=e=>{const i=!!this.layer._getSelected(t);r(((t,e)=>{for(var i in e||(e={}))K.call(e,i)&&Q(t,i,e[i]);if(J)for(var i of J(e))Y.call(e,i)&&Q(t,i,e[i]);return t})({selected:i},this._createMouseEvent(e)))},t.on("click",this._onclick,this)),o&&(this._mouseout=t=>{o(this._createMouseEvent(t))},t.on("mouseout",this._mouseout,this)),n&&(this._mouseover=t=>{n(this._createMouseEvent(t))},t.on("mouseover",this._mouseover,this))}stopMouseEvents(t){this._mouseover&&t.off("mouseover",this._mouseover,this),this._mouseout&&t.off("mouseout",this._mouseout,this),this._onclick&&t.off("click",this._onclick,this)}_createMouseEvent(t){return V({layer:this.layer,source:t})}}function tt(t){return"[object Object]"===Object.prototype.toString.call(t)}function et(t){return"function"==typeof t}function it(t){return(e,i)=>{const o=e.map((t=>t()));return t(o,i)}}const ot={"!":it((function([t]){return!t})),"!=":it((function([t,e]){return t!==e})),"<":it((function([t,e]){return t<e})),"<=":it((function([t,e]){return t<=e})),"==":it((function([t,e]){return t===e})),">":it((function([t,e]){return t>e})),">=":it((function([t,e]){return t>=e})),coalesce:t=>{for(let e=0;e<t.length;e++){const i=t[e]();if(null!=i)return i}return null},all:t=>{for(let e=0;e<t.length;e++){if(!t[e]())return!1}return!0},any:t=>{for(let e=0;e<t.length;e++){if(t[e]())return!0}return!1},case:t=>{if(t.length<2)throw new Error('The "case" function requires at least a condition and a corresponding output.');if(t.length%2==0)throw new Error("Missing a fallback value or unmatched condition-output pair.");for(let e=0;e<t.length-1;e+=2){const i=t[e](),o=t[e+1]();if(i)return o}return(0,t[t.length-1])()},match:t=>{const[e,...i]=t,o=e(),n=i.splice(-1,i.length%2)[0];for(let r=0;r<i.length-1;r+=2){if(i[r]()===o)return i[r+1]()}return n()}},nt={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function rt(t){if("string"==typeof(i=t)&&/^#([A-Fa-f0-9]{3}){1,2}$/.test(i))return st(t);if("string"==typeof(e=t)&&e in nt)return function(t){return st(nt[t])}(t);if(function(t){return"string"==typeof t&&/^rgb(a?)\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)(?:\s*,\s*([01](?:\.\d+)?))?\s*\)$/.test(t)}(t))return function(t){const e=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)$/;let i;if(i=t.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/))return[parseInt(i[1],10),parseInt(i[2],10),parseInt(i[3],10)];if(i=t.match(e))return[parseInt(i[1],10),parseInt(i[2],10),parseInt(i[3],10),parseFloat(i[4])];throw new Error(`The '${t}' Is not valid rgb`)}(t);if(function(t){if("object"==typeof t&&null!==t)return"r"in t&&"g"in t&&"b"in t&&(!("a"in t)||"number"==typeof t.a&&t.a>=0&&t.a<=1);return!1}(t))return function({r:t,g:e,b:i,a:o}){return[t,e,i,...void 0!==o?[o]:[]]}(t);var e,i;throw new Error(`The '${t}' cannot be converted to color`)}function st(t){let e;if(e=/^#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])$/.exec(t))return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)];if(e=/^#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])$/.exec(t))return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16),parseInt(e[4]+e[4],16)/255];if(e=/^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/.exec(t))return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)];if(e=/^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/.exec(t))return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16),parseInt(e[4],16)/255];throw new Error(`The '${t}' Is not valid hex`)}function at(t,e,i,o,n){if("number"==typeof i&&"number"==typeof n)return i+(t-e)/(o-e)*(n-i);try{const r=rt(i),s=rt(n);return function(t){return`rgb(${t.join(",")})`}(r.map(((i,n)=>Math.ceil(at(t,e,i,o,s[n])))))}catch(r){console.log(r)}throw new Error("Unsupported output type for linear interpolation.")}const lt={step:t=>{const[e,i,...o]=t,n=e();if("number"!=typeof n)return i();for(let r=0;r<o.length-2;r+=2){const t=o[r](),e=o[r+1](),i=o[r+2]();if(n>=t&&n<i)return e}return n>=o[o.length-2]()?o[o.length-1]():i()},interpolate:([t,e,...i])=>{if(i.length<2)throw new Error("At least two stops are required");if(i.length<2||i.length%2!=0)throw new Error("Invalid stops provided.");const o=e();if("number"!=typeof o)throw new Error("Input must be a number.");const n=t();for(let r=0;r<i.length-2;r+=2){const t=i[r](),e=i[r+1](),s=i[r+2](),a=i[r+3]();if(o>=t&&o<=s&&"linear"===n[0])return at(o,t,e,s,a)}throw new Error("Invalid interpolation type.")}};const ht={get:it((function([t,e],i){const o=e||i;return o&&"object"==typeof o&&t in o?o[t]:null})),length:it((([t])=>{if("string"==typeof t||Array.isArray(t))return t.length})),at:it((function([t,e]){return e[t]})),has:it((function([t,e],i){const o=e||i;return!(!o||"object"!=typeof o||!(t in o))})),in:it((function([t,e]){if("string"==typeof e)return e.includes(String(t));if(Array.isArray(e))return e.includes(t);throw new Error(`Invalid input type for 'in'. Expected string or array, got ${typeof e}.`)})),"index-of":it((function([t,e,i]){if("string"==typeof e)return e.indexOf(String(t),i);if(Array.isArray(e))return e.indexOf(t,i);throw new Error(`Invalid input type for 'index-of'. Expected string or array, got ${typeof e}.`)})),slice:it((function(t){const[e,i,o]=t;if("string"==typeof e)return e.slice(i,o);if(Array.isArray(e))return e.slice(i,o);throw new Error(`Invalid input type for 'slice'. Expected string or array, got ${typeof e}.`)}))},ct={"+":it((t=>t.reduce(((t,e)=>t+e),0))),"-":it((t=>t.reduce(((t,e)=>t-e)))),"*":it((t=>t.reduce(((t,e)=>t*e),1))),"/":it((t=>t.reduce(((t,e)=>t/e)))),"%":it((t=>t[0]%t[1])),"^":it((t=>Math.pow(t[0],t[1]))),abs:it((t=>Math.abs(t[0]))),acos:it((t=>Math.acos(t[0]))),asin:it((t=>Math.asin(t[0]))),atan:it((t=>Math.atan(t[0]))),ceil:it((t=>Math.ceil(t[0]))),cos:it((t=>Math.cos(t[0]))),e:()=>Math.E,floor:it((t=>Math.floor(t[0]))),ln:it((t=>Math.log(t[0]))),ln2:()=>Math.LN2,log10:it((t=>Math.log10(t[0]))),log2:it((t=>Math.log2(t[0]))),max:it((t=>Math.max(...t))),min:it((t=>Math.min(...t))),pi:()=>Math.PI,round:it((t=>Math.round(t[0]))),sin:it((t=>Math.sin(t[0]))),sqrt:it((t=>Math.sqrt(t[0]))),tan:it((t=>Math.tan(t[0])))},ut={concat:it((t=>t.reduce(((t,e)=>String(t)+String(e)),""))),downcase:it((t=>String(t[0]).toLowerCase())),upcase:it((t=>String(t[0]).toUpperCase()))},pt=(t,e,i)=>{try{const o=t(e,i);if(void 0!==o)return o}catch(o){}};function dt(t){return(e,i)=>{for(const o of e){const e=pt(t,o,i);if(void 0!==e)return e}throw new Error("Received a mismatched type")}}const ft={array:it((t=>{const[e,i,o]=t;let n,r,s;if("string"==typeof e&&["string","number","boolean"].includes(e)?(n=e,"number"==typeof i?(r=i,s=o):s=i):Array.isArray(e)&&(s=e),!Array.isArray(s))throw new Error("Expected an array");if(n&&!s.every((t=>typeof t===n)))throw new Error(`Expected all items in array to be of type ${n}`);if(r&&s.length!==r)throw new Error(`Expected array of length ${r}`);return s})),boolean:it(dt((t=>"boolean"==typeof t?t:void 0))),literal:it((([t])=>t)),number:it(dt((t=>"number"==typeof t?t:void 0))),object:it(dt((t=>null===t||"object"!=typeof t||Array.isArray(t)?void 0:t))),string:it(dt((t=>"string"==typeof t?t:void 0))),"to-boolean":it(dt(Boolean)),"to-number":it(dt(Number)),"to-string":it(dt(String)),typeof:it((([t])=>function(t){if(null===t)return"null";switch(typeof t){case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"object":if(Array.isArray(t)){let e="value";return t.every((t=>"number"==typeof t))?e="number":t.every((t=>"string"==typeof t))?e="string":t.every((t=>"boolean"==typeof t))&&(e="boolean"),`array<${e}, ${t.length}>`}return"object";default:return"undefined"}}(t)))};var mt=Object.defineProperty,_t=Object.getOwnPropertySymbols,yt=Object.prototype.hasOwnProperty,gt=Object.prototype.propertyIsEnumerable,vt=(t,e,i)=>e in t?mt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,bt=(t,e)=>{for(var i in e||(e={}))yt.call(e,i)&&vt(t,i,e[i]);if(_t)for(var i of _t(e))gt.call(e,i)&&vt(t,i,e[i]);return t};function wt(t){if(Array.isArray(t)){const[e,...i]=t;return"string"==typeof e&&"literal"!==e&&e in xt&&i.length>0}return!1}const xt=bt(bt(bt(bt(bt(bt({},ct),ft),ut),ht),ot),lt);function Lt(t,e={}){const[i,...o]=t,n=xt[i];if(n)return n(o.map((t=>()=>wt(t)?Lt(t,e):t)),e);throw new Error(`Expression "${i}" is not supported.`)}var Pt=Object.defineProperty,Ot=Object.getOwnPropertySymbols,Mt=Object.prototype.hasOwnProperty,Ct=Object.prototype.propertyIsEnumerable,kt=(t,e,i)=>e in t?Pt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Et=(t,e)=>{for(var i in e||(e={}))Mt.call(e,i)&&kt(t,i,e[i]);if(Ot)for(var i of Ot(e))Ct.call(e,i)&&kt(t,i,e[i]);return t};function At(t){return e=>{const i=e.properties;return!!i&&Lt(t,i)}}const Tt=["iconSize","iconAnchor"];var It=Object.defineProperty,St=Object.getOwnPropertySymbols,zt=Object.prototype.hasOwnProperty,jt=Object.prototype.propertyIsEnumerable,Bt=(t,e,i)=>e in t?It(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Zt=(t,e)=>{for(var i in e||(e={}))zt.call(e,i)&&Bt(t,i,e[i]);if(St)for(var i of St(e))jt.call(e,i)&&Bt(t,i,e[i]);return t};function Nt(t,e,i){if((e=String(e))===(t=String(t)))return!0;if(i&&e.toUpperCase()===t.toUpperCase())return!0;const o=`^${n=e,n.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}$`.replace(/%/g,".*").replace("_",".");var n;return null!==new RegExp(o,i?"i":"").exec(t)}const Rt={gt:(t,e)=>t>e,lt:(t,e)=>t<e,ge:(t,e)=>t>=e,le:(t,e)=>t<=e,eq:(t,e)=>t===e,ne:(t,e)=>t!==e,in:(t,e)=>-1!==e.indexOf(t),notin:(t,e)=>-1===e.indexOf(t),like:(t,e)=>Nt(t,e),ilike:(t,e)=>Nt(t,e,!0)};function Dt(t){return 3===t.length&&"string"==typeof t[0]&&"string"==typeof t[1]}function Ft(t,e){const i="string"==typeof e[0]?e[0]:"all",o=e=>{if(Dt(e)){const[i,o,n]=e,r=Rt[o];if(r){if(("like"===o||"ilike"===o)&&"string"==typeof i){let e="";const o=i.replace(/^%?(\w+)%?$/,((o,r)=>(e=t[r],i.replace(r,n))));return r(e,o)}return r(t[i],n)}return!1}return Ft(t,e)},n=e.filter((t=>Array.isArray(t)));return"any"===i?n.some(o):n.every(o)}var Ut=Object.defineProperty,Wt=Object.getOwnPropertySymbols,Ht=Object.prototype.hasOwnProperty,qt=Object.prototype.propertyIsEnumerable,Vt=(t,e,i)=>e in t?Ut(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Gt=(t,e)=>{for(var i in e||(e={}))Ht.call(e,i)&&Vt(t,i,e[i]);if(Wt)for(var i of Wt(e))qt.call(e,i)&&Vt(t,i,e[i]);return t};function Jt(t){let e={};const i=[];for(const o of t)o&&(Array.isArray(o)?i.push(o):e=o);return t=>{const o=i.find((e=>function(t,e){const i=Zt({},t.properties);return!!i&&(i.$id=t.id,Ft(i,e))}(t,e[0])));return o?Gt(Gt({},e),o[1]):e}}function Kt({paint:t,defaultPaint:e}){const i=function(t){let e=!1;const i={};for(const o in t)if(-1===Tt.indexOf(o)){const n=o,r=t[n];wt(r)&&(e=!0,i[n]=At(r))}if(e)return e=>{const o={};for(const t in i)o[t]=i[t](e);return Et(Et({},t),o)}}(t);if(i){const o=t=>Qt({paint:i(t),defaultPaint:e});return o.paint=Yt({paint:t,defaultPaint:e}),o}return Yt({paint:t,defaultPaint:e})}function Yt({paint:t,defaultPaint:e}){var i;let o=Gt({},e);return o=Gt(Gt({},o),t),o.fill=null==(i=o.fill)||i,o.stroke=void 0!==o.stroke?o.stroke:!o.fill||!(!o.strokeColor&&!o.strokeOpacity),o}function Qt({paint:t,defaultPaint:e,getPaintFunctions:i}){if(!t)throw new Error("paint is empty");let o=Gt({},e);if(et(t)){const o=o=>{const n=Qt({paint:t(o),defaultPaint:e,getPaintFunctions:i});return n.type=t.type,n};return o.type=t.type,o}if(function(t){return!!Array.isArray(t)}(t))return o=>Qt({paint:Jt(t)(o),defaultPaint:e,getPaintFunctions:i});if("get-paint"===t.type){const n=function(t,e){if("function"==typeof t.from)return t.from(t.options);if("string"==typeof t.from&&e){const i=e[t.from];if(i)return i(t.options)}}(t,i);n&&(o=Qt({paint:n,defaultPaint:e,getPaintFunctions:i}))}else{if("icon"===t.type)return t;o=Kt({paint:t,defaultPaint:e})}return et(o)||("color"in o&&(o.strokeColor||(o.strokeColor=o.color),o.fillColor||(o.fillColor=o.color)),"opacity"in o&&(void 0===o.strokeOpacity&&(o.strokeOpacity=o.opacity),void 0===o.fillOpacity&&(o.fillOpacity=o.opacity))),o}var Xt=Object.defineProperty,$t=Object.defineProperties,te=Object.getOwnPropertyDescriptors,ee=Object.getOwnPropertySymbols,ie=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable,ne=(t,e,i)=>e in t?Xt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,re=(t,e)=>{for(var i in e||(e={}))ie.call(e,i)&&ne(t,i,e[i]);if(ee)for(var i of ee(e))oe.call(e,i)&&ne(t,i,e[i]);return t};class se{constructor(t){var e,i;ne(this,"symbol"!=typeof(e="layer")?e+"":e,i),this.layer=t}setPaintEachLayer(t){this.layer._layers.forEach((e=>{this.setPaint(e,t)}))}setPaint(t,e){let i;const{layer:o,feature:n}=t;if(o&&n&&(et(e)?i=e(n):tt(e)&&(i=e),i))if("point"===this.layer.type&&"icon"===i.type){const t=o,e=this._createDivIcon(i);setTimeout((()=>{t.setIcon(e)}),10)}else"setStyle"in o&&o.setStyle(this.preparePaint(i))}preparePaint(t){if("get-paint"!==t.type){const e="line"===this.layer.type?[["color","strokeColor"],["opacity","strokeOpacity"],["weight","weight"]]:[["color","strokeColor"],["opacity","strokeOpacity"],["stroke","stroke"],["fillColor","fillColor"],["fillOpacity","fillOpacity"],["fill","fill"],["weight","weight"]],i={};"radius"in t&&"number"==typeof t.radius&&(i.radius=t.radius);for(const[o,n]of e){const e=this.layer.options.opacity;let r=t[n];p(e)&&-1!==n.toLowerCase().indexOf("opacity")&&(r=Number(r)*e),void 0!==r&&Object.defineProperty(i,o,{enumerable:!0,value:r})}return i}return I}_createDivIcon(t){const e=t,{html:i,rotate:o,className:n}=e,r=((t,e)=>{var i={};for(var o in t)ie.call(t,o)&&e.indexOf(o)<0&&(i[o]=t[o]);if(null!=t&&ee)for(var o of ee(t))e.indexOf(o)<0&&oe.call(t,o)&&(i[o]=t[o]);return i})(e,["html","rotate","className"]),s=document.createElement("div");n&&(s.className=n),o&&(s.style.transform=`rotateZ(${o}deg)`),i&&(s.innerHTML=i);var a;return new h.DivIcon((a=re({className:""},r),$t(a,te({html:s}))))}createPaintToLayer(t){if(t&&t.type)if("icon"===t.type){if(t.className||t.html)return(e,i)=>{const o=this._createDivIcon(t);return new h.Marker(i,{icon:o})}}else if("pin"===t.type)return(t,e)=>new h.Marker(e);return(e,i)=>new h.CircleMarker(i,this.preparePaint(re(re({},I),t)))}createPaintOptions(t){const e={},i=this.preparePaint(t);return t&&(e.style=()=>i),"point"===this.layer.type?e.pointToLayer=this.createPaintToLayer(t):"line"===this.layer.type&&(i.stroke=!0),e}}var ae=Object.defineProperty,le=Object.defineProperties,he=Object.getOwnPropertyDescriptors,ce=Object.getOwnPropertySymbols,ue=Object.prototype.hasOwnProperty,pe=Object.prototype.propertyIsEnumerable,de=(t,e,i)=>e in t?ae(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,fe=(t,e)=>{for(var i in e||(e={}))ue.call(e,i)&&de(t,i,e[i]);if(ce)for(var i of ce(e))pe.call(e,i)&&de(t,i,e[i]);return t},me=(t,e)=>le(t,he(e)),_e=(t,e,i)=>(de(t,"symbol"!=typeof e?e+"":e,i),i);function ye(t,e,i){const o=new XMLHttpRequest;o.open("GET",t),o.responseType="arraybuffer";for(const n in i)o.setRequestHeader(n,i[n]);return o.onload=function(){const t=new Uint8Array(this.response),i=new Blob([t],{type:"image/png"}),o=(window.URL||window.webkitURL).createObjectURL(i);e(o)},o.send(),()=>{o.abort()}}var ge=Object.defineProperty,ve=(t,e,i)=>(((t,e,i)=>{e in t?ge(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i})(t,"symbol"!=typeof e?e+"":e,i),i);class be extends h.ImageOverlay{constructor(t,e,i){super(t,e,i),ve(this,"_abort",[])}cancelLoad(){this._abort&&(this._abort.forEach((t=>t())),this._abort=[])}_initImage(){super._initImage();const t=this.options.headers;if(t){const e=this._image,i=e.src;e.src="",this._abort.push(ye(i,(t=>{e.src=t}),t))}}}var we=Object.defineProperty,xe=(t,e,i)=>(((t,e,i)=>{e in t?we(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i})(t,"symbol"!=typeof e?e+"":e,i),i);class Le extends h.Layer{constructor(t,e){super(e),xe(this,"defaultWmsParams",{service:"WMS",request:"GetMap",version:"1.1.1",layers:"",styles:"",format:"image/jpeg",transparent:!1}),xe(this,"options",{crs:null,uppercase:!1,attribution:"",opacity:1,isBack:!1,minZoom:0,pane:"tilePane",headers:null,viewPortBuffer:0,setViewDelay:100}),xe(this,"wmsParams"),xe(this,"_url"),xe(this,"_currentUrl"),xe(this,"_currentOverlay"),this._url=t;const i={},o={};let n;for(n in e)n in this.options?o[n]=e[n]:i[n]=e[n];h.Util.setOptions(this,o),this.wmsParams=h.Util.extend({},this.defaultWmsParams,i)}setParams(t){h.Util.extend(this.wmsParams,t),this.update()}getAttribution(){return this.options.attribution||""}onAdd(){return this.update(),this}onRemove(t){return this._currentOverlay&&(this._currentOverlay.cancelLoad(),t.removeLayer(this._currentOverlay),delete this._currentOverlay),this._currentUrl&&delete this._currentUrl,this}getEvents(){return{moveend:_(this.update,this.options.setViewDelay)}}update(){if(!this._map)return;this.updateWmsParams();const t=this.getImageUrl();if(this._currentUrl===t)return;this._currentUrl=t;const e=this.options.viewPortBuffer||0,i=this._map.getBounds().pad(e),o=new be(t,i,{opacity:0,pane:this.options.pane,headers:this.options.headers});o.addTo(this._map),this._currentOverlay&&this._currentOverlay.cancelLoad(),o.once("load",(()=>{this._map&&(o._url===this._currentUrl?(this._currentOverlay&&this._map.removeLayer(this._currentOverlay),this._currentOverlay=o,o.setOpacity(void 0!==this.options.opacity?this.options.opacity:1),!0===this.options.isBack&&o.bringToBack(),!1===this.options.isBack&&o.bringToFront(),void 0!==this.options.zIndex&&o.setZIndex(this.options.zIndex)):this._map.removeLayer(o))}),this);const{minZoom:n,maxZoom:r}=this.options;(n&&this._map.getZoom()<n||r&&this._map.getZoom()>r)&&this._map.removeLayer(o)}setOpacity(t){this.options.opacity=t,this._currentOverlay&&this._currentOverlay.setOpacity(t)}bringToBack(){this.options.isBack=!0,this._currentOverlay&&this._currentOverlay.bringToBack()}bringToFront(){this.options.isBack=!1,this._currentOverlay&&this._currentOverlay.bringToFront()}setZIndex(t){this.options.zIndex=t,this._currentOverlay&&this._currentOverlay.setZIndex(t)}updateWmsParams(t){t||(t=this._map);const e=this.options.viewPortBuffer||0,i=t.getBounds().pad(e),o=t.getSize();if(0!==this.options.viewPortBuffer){const t=e+1;o.x=Math.ceil(o.x*t),o.y=Math.ceil(o.y*t)}const n=parseFloat(this.wmsParams.version),r=this.options.crs||t.options.crs,s=n>=1.3?"crs":"srs";if(r){const t=r.project(i.getNorthWest()),e=r.project(i.getSouthEast()),a={width:o.x,height:o.y};a[s]=r.code,a.bbox=(n>=1.3&&r===h.CRS.EPSG4326?[e.y,t.x,t.y,e.x]:[t.x,e.y,e.x,t.y]).join(","),h.Util.extend(this.wmsParams,a)}}getImageUrl(){const t=h.Util.getParamString(this.wmsParams,this._url,this.options.uppercase||!1);return this._url+t}}var Pe=Object.defineProperty,Oe=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,ke=(t,e,i)=>e in t?Pe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Ee=(t,e)=>{for(var i in e||(e={}))Me.call(e,i)&&ke(t,i,e[i]);if(Oe)for(var i of Oe(e))Ce.call(e,i)&&ke(t,i,e[i]);return t};function Ae(t){return class extends t{constructor(...t){super(...t),this.options.setViewDelay&&(this._update=_(((...t)=>{h.GridLayer.prototype._update.call(this,...t)}),this.options.setViewDelay))}createTile(t,e){const i=this.getTileUrl(t),o=document.createElement("img");return o.abort=ye(i,(t=>{o.src=t,e(null,o)}),this.options.headers),(this.options.crossOrigin||""===this.options.crossOrigin)&&(o.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),o.alt="",o.setAttribute("role","presentation"),o}_abortLoading(){const t=this._tiles,e=this._tileZoom;for(const i in t)if(t[i].coords.z!==e){const e=t[i].el;e.onload=h.Util.falseFn,e.onerror=h.Util.falseFn,e.complete||(e.abort&&e.abort(),e.src=h.Util.emptyImageUrl,h.DomUtil.remove(e),delete t[i])}}}}const Te=Ae(class extends h.TileLayer{constructor(t,e){super(t,e),Object.assign(this.options,e)}});var Ie=Object.defineProperty,Se=Object.defineProperties,ze=Object.getOwnPropertyDescriptors,je=Object.getOwnPropertySymbols,Be=Object.prototype.hasOwnProperty,Ze=Object.prototype.propertyIsEnumerable,Ne=(t,e,i)=>e in t?Ie(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Re=(t,e)=>{for(var i in e||(e={}))Be.call(e,i)&&Ne(t,i,e[i]);if(je)for(var i of je(e))Ze.call(e,i)&&Ne(t,i,e[i]);return t};class De extends R{addLayer(t){if(this.options=Object.assign(this.options,t),t){const i=t,{url:o}=i,n=((t,e)=>{var i={};for(var o in t)Be.call(t,o)&&e.indexOf(o)<0&&(i[o]=t[o]);if(null!=t&&je)for(var o of je(t))e.indexOf(o)<0&&Ze.call(t,o)&&(i[o]=t[o]);return i})(i,["url"]);if(o){const t=Re({pane:this.pane,attribution:n.attribution,minZoom:n.minZoom,maxZoom:n.maxZoom},n.nativeOptions);let i;return n.subdomains&&(t.subdomains=n.subdomains),i=n.headers?new Te(o,(e=Re({},t),Se(e,ze({headers:n.headers,setViewDelay:n.setViewDelay})))):new h.TileLayer(o,t),i}}var e}}var Fe=Object.defineProperty,Ue=Object.defineProperties,We=Object.getOwnPropertyDescriptors,He=Object.getOwnPropertySymbols,qe=Object.prototype.hasOwnProperty,Ve=Object.prototype.propertyIsEnumerable,Ge=(t,e,i)=>e in t?Fe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;const Je=Ae(class extends h.TileLayer.WMS{constructor(t,e){super(t,e)}});var Ke=Object.defineProperty,Ye=Object.defineProperties,Qe=Object.getOwnPropertyDescriptors,Xe=Object.getOwnPropertySymbols,$e=Object.prototype.hasOwnProperty,ti=Object.prototype.propertyIsEnumerable,ei=(t,e,i)=>e in t?Ke(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,ii=(t,e)=>{for(var i in e||(e={}))$e.call(e,i)&&ei(t,i,e[i]);if(Xe)for(var i of Xe(e))ti.call(e,i)&&ei(t,i,e[i]);return t};function oi(t){return[[t[3],t[0]],[t[1],t[2]]]}var ni=Object.defineProperty,ri=Object.getOwnPropertySymbols,si=Object.prototype.hasOwnProperty,ai=Object.prototype.propertyIsEnumerable,li=(t,e,i)=>e in t?ni(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,hi=(t,e)=>{for(var i in e||(e={}))si.call(e,i)&&li(t,i,e[i]);if(ri)for(var i of ri(e))ai.call(e,i)&&li(t,i,e[i]);return t},ci=(t,e,i)=>(li(t,"symbol"!=typeof e?e+"":e,i),i);const ui=class t{constructor(){ci(this,"options",{target:"map"}),ci(this,"layerAdapters",t.layerAdapters),ci(this,"controlAdapters",t.controlAdapters),ci(this,"emitter",new i),ci(this,"map"),ci(this,"_resizeObserver"),ci(this,"_unselectCb",[]),ci(this,"_universalEvents",["move","zoom","zoomend","zoomstart","moveend","movestart"]),ci(this,"_positionEvents",["mousemove","mouseout","mouseover"])}create(t){if(this.options=hi({},t),this.options.target){const{zoom:t,center:e,maxZoom:i,minZoom:o,maxBounds:n,mapAdapterOptions:r}=this.options;this.map=this.options.map||new h.Map(this.options.target,hi({attributionControl:!1,zoomControl:!1,maxBounds:n?oi(n):void 0,maxZoom:i,minZoom:o,center:e&&[e[1],e[0]],zoom:t},r));const s=this.map.createPane("order-0");this.map._addUnselectCb=t=>{this._addUnselectCb(t)},s.style.zIndex=String(0),this.emitter.emit("create",this),this._addMapListeners()}}destroy(){this.map&&this.map.remove(),this._stopWatchSizeChangeToUpdateMinZoom()}getContainer(){return this.map&&this.map.getContainer()}getControlContainer(){const t=this.map&&this.map._controlContainer;if(t)return t;throw new Error("Leaflet Map is not initialized yet")}setCursor(t){this.map&&(this.map.getContainer().style.cursor=t)}setView(t,e){const i=this.map;if(i)if(Array.isArray(t)){const i=t,[o,n]=i;this.map&&("number"==typeof e?this.map.setView([n,o],e,{animate:!1}):this.setCenter([o,n]))}else{const{zoom:e,center:o,maxBounds:n,bounds:r,minZoom:s,maxZoom:a}=t;if(o&&void 0!==e?this.setView(o,e):(void 0!==e&&this.setZoom(e),o&&this.setCenter(o)),r&&this.fitBounds(r),void 0!==n)if(n){const t=oi(n);i.setMaxBounds(t),i.setMinZoom(i.getBoundsZoom(t)),this._watchSizeChangeToUpdateMinZoom(t)}else i.setMaxBounds(null),this._stopWatchSizeChangeToUpdateMinZoom();void 0!==a&&i.setMaxZoom(a),void 0!==s&&(this._stopWatchSizeChangeToUpdateMinZoom(),i.setMinZoom(s))}}setCenter(t){const[e,i]=t;this.map&&this.map.panTo([i,e])}getCenter(){const t=this.map;if(t){const e=t.getBounds().getCenter();return[e.lng,e.lat]}}setZoom(t){this.map&&this.map.setZoom(t)}getZoom(){var t;return null!=(t=this.map&&this.map.getZoom())?t:void 0}getBounds(){if(!this.map)return;const t=this.map.getBounds(),e=t.getSouthWest(),i=t.getNorthEast();return[e.lng,e.lat,i.lng,i.lat]}fitBounds(t,e={}){if(this.map){const{maxZoom:i,offset:o,padding:n}=e,r={};i&&(r.maxZoom=i),n&&(r.padding=[n,n]),o&&(r.padding=o),this.map.fitBounds(oi(t),r)}}getLayerAdapter(e){return t.layerAdapters[e]}createControl(t,e){return c(t,e,this)}createButtonControl(t){return function(t,e){const i=document.createElement("a"),o=t.title||"";i.href="#",i.title=o,i.setAttribute("role","button"),i.setAttribute("aria-label",o),t.addClass&&i.classList.add(t.addClass),h.DomEvent.disableClickPropagation(i),h.DomEvent.on(i,"click",h.DomEvent.stop),t.html instanceof HTMLElement?i.appendChild(t.html):"string"==typeof t.html&&(i.innerHTML=t.html);const n=e=>{e.stopPropagation(),t.onClick()};return c({onAdd:()=>(void 0!==t.onClick&&i.addEventListener("click",n),i),onRemove(){const e=i.parentNode;e&&e.removeChild(i),void 0!==t.onClick&&i.removeEventListener("click",n)}},{bar:!0},e)}(t,this)}addControl(t,e){if(t.options.position=e.replace("-",""),this.map)return this.map.addControl(t),t}removeControl(t){this.map&&this.map.removeControl(t)}removeLayer(t){t&&t.remove&&t.remove()}showLayer(t){this.map&&t.addTo(this.map)}hideLayer(t){t.remove()}setLayerOpacity(t,e){"setOpacity"in t&&t.setOpacity(e)}setLayerOrder(t,e,i){}onMapClick(t){const e=D(t);this.emitter.emit("preclick",e),this.emitter.emit("click",e)}locate(t,e){const i=this.map;if(i&&(i.locate(t),e)){const{locationfound:t,locationerror:o}=e,n=e=>{t({lngLat:[e.latlng.lng,e.latlng.lat]})};void 0!==t&&i.on("locationfound",n,this),o&&i.on("locationerror",o,this);return{stop:()=>{void 0!==t&&i.off("locationfound",n),o&&i.off("locationerror",o)}}}return{stop:()=>{}}}_addUnselectCb(t){for(const e of this._unselectCb)e();this._unselectCb.length=0,this._unselectCb.push(t)}_watchSizeChangeToUpdateMinZoom(t){this._stopWatchSizeChangeToUpdateMinZoom();const e=this.getContainer(),i=this.map;e&&i&&window.ResizeObserver&&(this._resizeObserver=new ResizeObserver((()=>{i.setMinZoom(i.getBoundsZoom(t))})),this._resizeObserver.observe(e))}_stopWatchSizeChangeToUpdateMinZoom(){const t=this.map;t&&t.setMinZoom(0),this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=void 0)}_addMapListeners(){const t=this.map;if(t){t.on("click",(t=>{this.onMapClick(t)}));for(const e of this._universalEvents)t.on(e,(()=>this.emitter.emit(e,this)),t);for(const e of this._positionEvents)t.on(e,(t=>this.emitter.emit(e,D(t))),t)}}};ci(ui,"layerAdapters",{GEOJSON:class extends R{constructor(t,e){super(t,e),_e(this,"layer"),_e(this,"selected",!1),_e(this,"type"),_e(this,"_layers",[]),_e(this,"_events"),_e(this,"paint"),_e(this,"selectedPaint"),_e(this,"_selectedLayers",[]),_e(this,"_filteredLayers",[]),_e(this,"_filterFun"),_e(this,"_openedPopup",[]),_e(this,"_paint"),_e(this,"$updateTooltip",_((()=>{this.updateTooltip()}),300)),_e(this,"$unselect",(()=>{this.unselect()})),this._events=new $(this),this._paint=new se(this)}addLayer(t){return Object.assign(this.options,t),this.paint=t.paint,this.layer=new h.FeatureGroup([],me(fe({},t.nativeOptions),{pane:this.pane})),this.selectedPaint=t.selectedPaint,t.paint=this.paint,t.data&&this.addData(t.data),this._addMapListener(),this.layer}beforeRemove(){this._removeMapListener()}select(t){if(this.unselect(),t){const e=this._layers.filter(t);for(const t of e)this._selectLayer(t,"api")}else this.selected||(this.selected=!0,this.selectedPaint&&this._paint.setPaintEachLayer(this.selectedPaint))}unselect(t){if(t){this._layers.filter(t).forEach((t=>{this._unSelectLayer(t)}))}else if(this.selected){for(const t of this._openedPopup)this._removePopup(t[0]);this.paint&&this._paint.setPaintEachLayer(this.paint),this._selectedLayers.length=0,this.selected=!1}}getSelected(){return this._selectedLayers.map((t=>fe({target:this,feature:t.feature,layer:t},B(t.feature))))}getFiltered(){return this._filteredLayers}filter(t){this._filterFun=t;const e=this.layer,i=e&&e._map;if(e&&i){e.remove();const o=[];this._layers.forEach((({feature:i,layer:n})=>{if(n){!t||t(fe({target:this,feature:i,layer:n},B(i)))?(e.addLayer(n),o.push(fe({target:this,feature:i,layer:n},B(i)))):e.removeLayer(n)}})),this._filteredLayers=o,e.addTo(i)}return this._filteredLayers}cleanFilter(){this.filter()}getLayers(){return this._layers.map((({layer:t,feature:e})=>fe({feature:e,layer:t,visible:t&&!!t._map,target:this},B(e))))}clearLayer(t){this.unselect();const e=this.layer;if(e)if(t)for(let i=this._layers.length;i--;){const o=this._layers[i];if(o){const{feature:n,layer:r}=o;if(n&&r){t(n)&&(e.removeLayer(r),this._layers.splice(i,1))}}}else e.clearLayers(),this._layers=[]}setData(t){this.clearLayer(),this.addData(t)}addData(t){const e=this.options;let i;if(e){if(t){let o;if(e.type)o=e.type;else{const e=function(t){let e;e="FeatureCollection"===t.type?A(t.features.map((t=>t.geometry.type))):"GeometryCollection"===t.type?A(t.geometries.map((t=>t.type))):"Feature"===t.type?t.geometry.type:t.type;return e}(t);o=T[e]}if(this.type&&this.type!==o)return void console.warn("no other data type than layer can be added");this.type=o,t=function(t,e){if("FeatureCollection"===t.type)t.features=t.features.filter((t=>z(t.geometry.type,e)));else if("Feature"===t.type){if(!z(t.geometry.type,e))return!1}else"GeometryCollection"===t.type&&(t.geometries=t.geometries.filter((t=>z(t.type,e))));return t}(t,o),t&&(i=this._getGeoJsonOptions(e,o))}new h.GeoJSON(t||void 0,i)}}openPopup(t,e){if(t){this._layers.filter(t).forEach((t=>{this._openPopup(t,e,"api")}))}}closePopup(t){(t?this._openedPopup.filter((e=>t(e[2]))):this._openedPopup).forEach((t=>{this._removePopup(t[0])}))}updateTooltip(t){t?this._updateTooltip(t):this.getLayers().forEach((t=>this._updateTooltip({feature:t.feature,layer:t.layer})))}getExtent(){return this.getBounds()}getBounds(){if(this.layer){const t=this.layer.getBounds();if(t.isValid())return E(t)}}setOpacity(t){this.options.opacity=t,this.setPaint(this.paint),this.setSelectedPaint(this.selectedPaint)}setPaint(t){if(t){this.paint=t;for(const e of this._layers)this._paint.setPaint(e,t)}}setSelectedPaint(t){if(t){this.selectedPaint=t;for(const e of this._selectedLayers)this._paint.setPaint(e,t)}}updatePaint(t){this.paint=fe(fe({},this.paint),t);for(const e of this._layers)this._paint.setPaint(e,this.paint)}updateSelectedPaint(t){this.selectedPaint=fe(fe({},this.selectedPaint),t);for(const e of this._selectedLayers)this._paint.setPaint(e,this.selectedPaint)}_getSelected(t){return this._selectedLayers.find((e=>e.layer===t))}_updateTooltip(t){const{feature:e,layer:i}=t,{label:o,labelField:n,labelOnHover:r}=this.options;if(i){let s;if(i.unbindTooltip(),e.properties&&n?s=e.properties[n]:o&&(s=o(fe(fe({target:this},t),B(e)))),s){const t=!r;i.bindTooltip(String(s),{permanent:t,sticky:!1})}}}_openPopup(t){return e=this,i=arguments,o=function*(t,e={},i,o){var n,r;const{feature:s,layer:a}=t,{minWidth:l,autoPan:h,maxWidth:c,closeButton:u}=fe({minWidth:300},e),d=null!=u?u:!this.options.selectOnHover;let f;const m=[],_=t=>{m.push(t)},y=()=>{f&&this._removePopup(f)};let g;if(g=e.createPopupContent?yield e.createPopupContent(fe({layer:a,feature:s,target:this,type:i,close:y,onClose:_},B(s))):e.popupContent,g&&a){const e={minWidth:l,autoPan:h,closeButton:d,closeOnClick:!1,autoClose:!1};if(p(c)&&(e.maxWidth=c),f=a.bindPopup(g,e),null==(r=null==(n=this.options.popupOptions)?void 0:n.unselectOnClose)||r){const t=a.getPopup();t&&t.once("remove",(()=>{y()}),this)}this._openedPopup.push([f,m,t]),f.openPopup(o)}},new Promise(((t,n)=>{var r=t=>{try{a(o.next(t))}catch(e){n(e)}},s=t=>{try{a(o.throw(t))}catch(e){n(e)}},a=e=>e.done?t(e.value):Promise.resolve(e.value).then(r,s);a((o=o.apply(e,i)).next())}));var e,i,o}_removePopup(t){var e,i;if(this.map){t.closePopup().unbindPopup();const o=this._openedPopup.findIndex((e=>e[0]===t));if(-1!==o){const t=null==(i=null==(e=this.options.popupOptions)?void 0:e.unselectOnClose)||i,[,n,r]=this._openedPopup[o];for(const e of n)e(r);n.length=0,t&&this._unSelectLayer(r),this._openedPopup.splice(o,1)}}}_getGeoJsonOptions(t,e){const i=t.paint;let o={};return"function"==typeof i?"point"===e?o.pointToLayer=(t,e)=>{const o=i(t);return this._paint.createPaintToLayer(o)(t,e)}:o={style:t=>this._paint.preparePaint(t?fe(fe({},I),i(t)):me(fe({},I),{type:"path"}))}:o=this._paint.createPaintOptions(i),o.onEachFeature=(t,e)=>{this._onEachFeature(t,e)},o}_onEachFeature(t,e){const i=this.layer;if(i){const o=fe({target:this,feature:t,layer:e},B(t));e.options.pane=this.pane,this._layers.push(o);let n=!0;if(this._filterFun&&(n=this._filterFun(o)),n){const{popup:n,popupOptions:r,selectable:s,interactive:a,selectOnHover:l}=this.options;e.options.interactive=!p(a)||a,i.addLayer(e),s&&(l?(e.on("mouseover",(()=>{this._selectLayer(o,"hover")})),e.on("mouseout",(()=>{this._unSelectLayer(o)}))):e.on("click",(t=>this._selectOnLayerClick(t)),this)),this._events.handleMouseEvents(e),setTimeout((()=>{n&&this._openPopup(fe({target:this,layer:e,feature:t},B(t)),r,"api"),this._updateTooltip({layer:e,feature:t})}))}}}_selectOnLayerClick(t){h.DomEvent.stopPropagation(t);const e=t.target,i=e.feature,o=fe({target:this,layer:e,feature:i},B(i)),n=this._getSelected(e);n?this.options&&this.options.unselectOnSecondClick&&this._unSelectLayer(n):this._selectLayer(o,"click",t.latlng)}_selectLayer(t,e,i){const{multiselect:o}=this.options;o||(this.map._addUnselectCb((()=>{this._unSelectLayer(t)})),this._selectedLayers.forEach((t=>this._unSelectLayer(t)))),this._selectedLayers.push(t),this.selected=!0;const{selectedPaint:n,popupOnSelect:r,popupOptions:s}=this.options;if(n&&t.layer&&this._paint.setPaint(t,n),r&&this._openPopup(t,s,e,i),this.options.onSelect){const i=t.feature?[t.feature]:[];this.options.onSelect(fe({type:e,layer:this,features:i},B(i)))}}_unSelectLayer(t){const e=this._selectedLayers.indexOf(t);-1!==e&&(this._selectedLayers.splice(e,1),this.options&&(this.options.paint&&this._paint.setPaint(t,this.options.paint),this.options.popupOnSelect&&t.layer&&this._removePopup(t.layer))),this.selected=this._selectedLayers.length>0}_addMapClickListener(){const t=this.map;if(t){const{unselectOnClick:e}=this.options;(null==e||e)&&t.on("click",this.$unselect)}}_removeMapClickListener(){this.map.off("zoomend",this.$updateTooltip),this.map.off("moveend",this.$updateTooltip),this.map.off("click",this.$unselect)}_addMapListener(){const t=this.map;if(t){const{label:e,labelField:i,labelOnHover:o}=this.options;this._addMapClickListener(),!i&&!e||o||(t.on("zoomend",this.$updateTooltip),t.on("moveend",this.$updateTooltip))}}_removeMapListener(){this._removeMapClickListener(),this.map.off("zoomend",this.$updateTooltip),this.map.off("moveend",this.$updateTooltip)}},IMAGE:class extends R{constructor(){var t,e;super(...arguments),ke(this,"symbol"!=typeof(t="layer")?t+"":t,e)}addLayer(t){const e=t&&t.url;if(e){const i=(t=Ee({transparent:!0},t)).updateWmsParams;if(this.layer=new Le(e,Ee(Ee(Ee({pane:this.pane,headers:t.headers,setViewDelay:t.setViewDelay},t),t.params),t.nativeOptions)),i){const t=this.layer.updateWmsParams;this.layer.updateWmsParams=function(e){t.call(this,e),this.wmsParams=i(this.wmsParams)}}return this.layer}}},TILE:De,WMS:class extends R{addLayer(t){Object.assign(this.options,t);const e=t,{url:i}=e,o=((t,e)=>{var i={};for(var o in t)$e.call(t,o)&&e.indexOf(o)<0&&(i[o]=t[o]);if(null!=t&&Xe)for(var o of Xe(t))e.indexOf(o)<0&&ti.call(t,o)&&(i[o]=t[o]);return i})(e,["url"]);if(i){const e=ii({pane:this.pane,attribution:o.attribution,minZoom:o.minZoom,maxZoom:o.maxZoom,layers:t.layers,format:t.format},t.nativeOptions);let r;return r=o.headers?new Je(i,(n=ii({},e),Ye(n,Qe({headers:o.headers})))):new h.TileLayer.WMS(i,e),r}var n}},OSM:class extends De{addLayer(t){return super.addLayer((e=((t,e)=>{for(var i in e||(e={}))qe.call(e,i)&&Ge(t,i,e[i]);if(He)for(var i of He(e))Ve.call(e,i)&&Ge(t,i,e[i]);return t})({name:"OpenStreetMap",attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'},t),Ue(e,We({url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}))));var e}}}),ci(ui,"controlAdapters",{ZOOM:h.Control.Zoom,ATTRIBUTION:class extends h.Control.Attribution{constructor(t){super(t);const e=t&&t.customAttribution;if(e){let t=[];Array.isArray(e)?t=e:e&&(t=[e]),t.forEach((t=>this.addAttribution(t)))}}}}),ci(ui,"Map",h.Map);let pi=ui;var di=Object.defineProperty,fi=(t,e,i)=>(((t,e,i)=>{e in t?di(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i})(t,"symbol"!=typeof e?e+"":e,i),i);class mi extends Error{constructor(){super(),fi(this,"name","CancelError"),Object.setPrototypeOf(this,mi.prototype)}}var _i=Object.defineProperty,yi=(t,e,i)=>(((t,e,i)=>{e in t?_i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i})(t,"symbol"!=typeof e?e+"":e,i),i);class gi{constructor(t={}){this.options=t,yi(this,"_promises",new Map)}get isLoaded(){return this._promises.size>0}remove(t){this._promises.has(t)&&(this._promises.delete(t),this._onStop())}get(t){return this._promises.get(t)}add(t,e){const i=e||t,o=this._promises.get(i);return this.options.onStart&&!this.isLoaded&&this.options.onStart(),o||(this._promises.set(i,t),t.finally((()=>{this.remove(i)})),t)}abort(){this.isLoaded&&(this._promises.forEach((t=>{t.cancel&&t.cancel()})),this._promises.clear(),this._onStop())}waitFunc(t,e=""){const i=this.get(e=e||t.name);return i||this.add(t(),e)}WaitForMe(t=""){const e=this.get.bind(this),i=this.add.bind(this);return function(o,n,r){const s=r.value;return t=t||n,r.value=function(...o){const n=e(t);if(n)return n;return i(s.apply(this,o),t)},r}}GetOrCreateDecorator(t=""){return this.WaitForMe(t)}_onStop(){this.options.onStop&&!this.isLoaded&&this.options.onStop()}}var vi=Object.defineProperty,bi=(t,e,i)=>(((t,e,i)=>{e in t?vi(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i})(t,"symbol"!=typeof e?e+"":e,i),i);class wi extends Error{constructor(){super(),bi(this,"name","TimeoutError"),Object.setPrototypeOf(this,wi.prototype)}}var xi,Li=Object.defineProperty,Pi=(t,e,i)=>(((t,e,i)=>{e in t?Li(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i})(t,"symbol"!=typeof e?e+"":e,i),i);const Oi=(t,e,i,o)=>{try{t(i(o))}catch(n){e(n)}};let Mi=0;const Ci=class t{constructor(e,i){Pi(this,xi),Pi(this,"id",Mi++),Pi(this,"_isCanceled",!1),Pi(this,"_isPending",!0),Pi(this,"_promise"),Pi(this,"_cancelPromise"),Pi(this,"_cancelHandlers",[]),Pi(this,"_setCanceledCallback"),Pi(this,"_parentPromise"),Pi(this,"_children",[]),this._cancelPromise=new Promise(((t,e)=>{this._setCanceledCallback=e=>t(e||new mi)}));const o=[this._cancelPromise,new Promise(((i,o)=>e((e=>{e instanceof t?this.attach(e):this._isPending=!1,i(e)}),(t=>{this._isPending=!1,o(t)}),(t=>{if(!this._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");this._cancelHandlers.push(t)}))))];i&&o.push(new Promise(((t,e)=>{setTimeout((()=>{if(this._isPending)try{this.cancel()}finally{e(new wi)}}),i)}))),this._promise=Promise.race(o)}static createControl(t){return new gi(t)}static resolve(e){return new t((t=>t(e)))}static reject(e){return new t(((t,i)=>i(e)))}static all(e){return new t(((t,i)=>{Promise.all(e).then(t).catch(i)})).catch((t=>{if(t instanceof this.CancelError)for(const i of e){"cancel"in i&&i.cancel()}throw t}))}attach(t){this._isCanceled?t.cancel():this._children.push(t)}then(e,i){const o=new t(((t,o)=>{if(this._promise){const n=e=>{i?Oi(t,o,i,e):o(e)};this._promise.then((i=>{this._isCanceled?n(i):e?Oi(t,o,e,i):t(i)}),n)}}));return o._parentPromise=this,this._children.push(o),o}catch(t){return this._isCanceled&&t&&t(new mi),this.then(void 0,t)}finally(t){return this._promise?this._promise.finally(t):Promise.reject(this._isCanceled?new mi:t)}cancel(){if(this._isCanceled||!this._isPending)return this;this._isCanceled=!0;const t=this._getTopParent();if(t&&t.cancel(),this._children&&this._children.forEach((t=>t.cancel())),this._isPending){if(this._cancelHandlers.length)try{for(const t of this._cancelHandlers)t()}catch(e){}this._setCanceledCallback&&this._setCanceledCallback()}return this._destroy(),this}_getTopParent(){let t=this._parentPromise,e=!!t;for(;e;)t&&t._parentPromise?(t=t._parentPromise,e=!!t):e=!1;return t}_destroy(){this._setCanceledCallback=void 0,this._cancelPromise=void 0,this._promise=void 0}};xi=Symbol.toStringTag,Pi(Ci,"CancelError",mi),Pi(Ci,"TimeoutError",wi),Pi(Ci,"PromiseControl",gi);let ki=Ci;Object.setPrototypeOf(ki.prototype,Promise.prototype);const Ei={brill:'<path d="m6 0-5 6 5 6 5-6z"/>',circle:'<circle cx="6" cy="6" r="6"/>',rect:'<rect width="12" height="12"/>',marker:'<path d="m6 0c-1.85 0-4 1.19-4 4.22 0 2.05 3.08 6.59 4 7.78 0.821-1.19 4-5.62 4-7.78 0-3.03-2.15-4.22-4-4.22z"/>',cross:'<path d="M 2.4,12 6,8.4 9.6,12 12,9.6 8.4,6 12,2.4 9.6,0 6,3.6 2.4,0 0,2.4 3.6,6 0,9.6 Z"/>',star:'<path d="m6 0.25 1.71 4.18 4.29-1.04e-4 -3.43 3.14 0.857 4.18-3.43-3.14-3.43 3.14 0.857-4.18-3.43-3.14 4.29-0.209z"/>',triangle:'<path d="m12 11.7h-12l6-11.2z"/>',plus:'<path d="m7.5 12v-4.5h4.5v-3h-4.5v-4.5h-3v4.5h-4.5v3h4.5v4.5z"/>',minus:'<path d="m12 7.5v-3h-12v3z"/>',asterisk:'<path d="m7.59 12v-3.27l2.83 1.64 1.58-2.74-2.85-1.64 2.83-1.64-1.56-2.74-2.83 1.64v-3.24h-3.17v3.24l-2.85-1.64-1.57 2.74 2.84 1.64-2.84 1.64 1.57 2.74 2.85-1.64v3.27z"/>'},Ai=12;var Ti=Object.defineProperty,Ii=(t,e,i)=>(((t,e,i)=>{e in t?Ti(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i})(t,"symbol"!=typeof e?e+"":e,i),i);const Si=class t{constructor(e={}){var i;Ii(this,"cache",[]);const o=null!=(i=e.namespace)?i:"default";return t.instance[o]?t.instance[o]:(t.instance[o]=this,this)}clean(){this.cache.length=0}all(){return this.cache}addFull(t,e,i){return this.add(t,e,i,!0)}add(t,e,i,o){const n=this._find(t,i);if(n)return n.value;{let n;n=e instanceof Function?e():e;const r=i&&JSON.parse(JSON.stringify(M(i))),s={key:t,value:n,props:r,options:r};return o&&!d(n)?n:(this.cache.push(s),n instanceof Promise?(n.catch((e=>{throw this.delete(t,i),e})),o&&n.then((e=>(d(e)||this.delete(t,i),e))),n):n)}}match(t,e){const i=this._find(t,e);if(i)return i.value}matchAll(t,e){return t?this.cache.filter((i=>this._filter(i,t,e))).map((t=>t.value)):this.cache.map((t=>t.value))}delete(t,e){let i=[];"string"==typeof t?i=this.cache.filter((i=>this._filter(i,t,e))):i.push(t);for(const o of i){const t=this.cache.indexOf(o);this.cache.splice(t,1)}}_find(t,e){return this.cache.find((i=>this._filter(i,t,e)))}_filter(t,e,i){if(t.key===e){if(i){return O(t.props||t.options||{},M(i))}return!0}return!1}};Ii(Si,"instance",{});let zi=Si;var ji=Object.defineProperty,Bi=(t,e,i)=>(((t,e,i)=>{e in t?ji(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i})(t,"symbol"!=typeof e?e+"":e,i),i);class Zi extends Error{constructor(t){super(),Bi(this,"name","NgwError"),Bi(this,"title"),Bi(this,"message"),Bi(this,"detail"),Bi(this,"exception"),Bi(this,"status_code"),Bi(this,"data"),Bi(this,"guru_meditation"),Object.assign(this,t),Object.setPrototypeOf(this,Zi.prototype)}}var Ni=Object.defineProperty,Ri=(t,e,i)=>(((t,e,i)=>{e in t?Ni(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i})(t,"symbol"!=typeof e?e+"":e,i),i);class Di extends Zi{constructor(t){super(t),Ri(this,"name","ResourceNotFoundError"),Ri(this,"exception","nextgisweb.resource.exception.ResourceNotFound"),Object.setPrototypeOf(this,Di.prototype)}}function Fi(t){return"[object Object]"===Object.prototype.toString.call(t)}const Ui=["description"];function Wi(t,e=""){e=e?e+"__":"";const i={};for(const[o,n]of Object.entries(t))if(-1===Ui.indexOf(o))if(Fi(n))if("owner_user"===o){const t=Wi(n,o);Object.assign(i,t)}else"parent"===o&&"id"in n&&(i.parent_id=n.id);else p(n)&&(i[e+o]=n);return i}var Hi=Object.defineProperty,qi=Object.defineProperties,Vi=Object.getOwnPropertyDescriptors,Gi=Object.getOwnPropertySymbols,Ji=Object.prototype.hasOwnProperty,Ki=Object.prototype.propertyIsEnumerable,Yi=(t,e,i)=>e in t?Hi(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Qi=(t,e)=>{for(var i in e||(e={}))Ji.call(e,i)&&Yi(t,i,e[i]);if(Gi)for(var i of Gi(e))Ki.call(e,i)&&Yi(t,i,e[i]);return t};class Xi{constructor(t){var e,i,o;this.connector=t,e=this,i="cache",o=new zi,Yi(e,"symbol"!=typeof i?i+"":i,o)}getOne(t,e){const i=new zi,o={},n=(r=Qi({},e),qi(r,Vi({cache:!1})));var r;"string"==typeof t?o.keyname=t:"number"==typeof t?o.id=t:Fi(t)&&(void 0!==t.id?o.id=t.id:(t.keyname&&(o.keyname=t.keyname),t.display_name&&(o.display_name=t.display_name)));return i.addFull("resource",(()=>"string"==typeof t?this._fetchResourceBy({keyname:t},n):"number"==typeof t?this._fetchResourceById(t,n):Fi(t)?this._fetchResourceBy(t,n):ki.resolve(void 0)),o)}getOneOrFail(t,e){return this.getOne(t,e).then((t=>{if(t)return t;throw new Di}))}getId(t,e){return"number"==typeof t?ki.resolve(t):"string"==typeof t||Fi(t)?this.getOne(t,e).then((t=>{if(t)return t.resource.id})):ki.resolve(void 0)}getIdOrFail(t,e){return this.getId(t,e).then((t=>{if(void 0===t)throw new Error;return t}))}getMany(t,e){return this._resourceCacheFilter(t).then((i=>{if(!i.length){const i={};return t.keyname?i.keyname=t.keyname:Object.assign(i,Wi(t)),this.connector.get("resource.search",e,Qi({serialization:"full"},i)).then((t=>{if(t)for(const e of t)this.cache.add("resource.item",ki.resolve(e),{id:e.resource.id});return t}))}return i}))}getParent(t,e){return this.getOne(t,e).then((t=>t?this.getOne(t.resource.parent.id,e):ki.resolve(void 0)))}getChildrenOf(t,e){return this.getIdOrFail(t).then((t=>this._getChildrenOf(t,e)))}update(t,e){return this.getId(t).then((t=>{if(void 0!==t)return this.connector.put("resource.item",{data:e},{id:t})}))}delete(t){return this.getId(t).then((t=>{if(void 0!==t)return this.connector.delete("resource.item",null,{id:t}).then((()=>{this._cleanResourceItemCache(t)}))}))}_getChildrenOf(t,e,i=[]){return this.connector.get("resource.collection",Qi({cache:!0},e),{parent:t}).then((t=>{const o=[];for(const n of t)this.cache.add("resource.item",ki.resolve(n),{id:n.resource.id}),i.push(n),(null==e?void 0:e.recursive)&&n.resource.children&&o.push(this._getChildrenOf(n.resource.id,e,i));return o.length?ki.all(o).then((()=>i)):i}))}_cleanResourceItemCache(t){return e=this,i=null,o=function*(){const e=this.cache.all(),i=[];for(const o of e){const e=o.options&&o.options.id;["resource.item","resource"].includes(o.key)&&void 0!==e&&("number"==typeof e?e===t&&i.push(o):(yield this.getId(e))===t&&i.push(o))}for(const t of i)this.cache.delete(t)},new Promise(((t,n)=>{var r=t=>{try{a(o.next(t))}catch(e){n(e)}},s=t=>{try{a(o.throw(t))}catch(e){n(e)}},a=e=>e.done?t(e.value):Promise.resolve(e.value).then(r,s);a((o=o.apply(e,i)).next())}));var e,i,o}_fetchResourceById(t,e){return this.cache.add("resource.item",(()=>this.connector.get("resource.item",e,{id:t})),{id:t}).catch((t=>{if(!(t instanceof Di))throw t}))}_fetchResourceBy(t,e){return this.getMany(t,e).then((t=>t[0]))}_resourceCacheFilter(t){return ki.all(this.cache.matchAll("resource.item")).then((e=>(e.filter((e=>{if(e)return t.keyname&&e.resource.keyname?t.keyname===e.resource.keyname:p(t.id)&&p(e.resource.id)?t.id===e.resource.id:O(t,e.resource)})),[])))}}const $i=[];function to(t){$i.push(t)}var eo=Object.defineProperty,io=(t,e,i)=>(((t,e,i)=>{e in t?eo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i})(t,"symbol"!=typeof e?e+"":e,i),i);class oo extends Zi{constructor(t){super(t),io(this,"name","InsufficientPermissionsError"),io(this,"exception","nextgisweb.core.exception.InsufficientPermissions"),Object.setPrototypeOf(this,oo.prototype)}}const no=/\{ *([\w_-]+) *\}/g;function ro(t,e){return t.replace(no,((t,i)=>{let o=e[i];if(void 0===o)throw new Error("No value provided for letiable "+t);return"function"==typeof o&&(o=o(e)),o}))}var so=Object.defineProperty,ao=(t,e,i)=>(((t,e,i)=>{e in t?so(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i})(t,"symbol"!=typeof e?e+"":e,i),i);class lo extends Error{constructor(t){super(),ao(this,"name","NetworkError"),Object.setPrototypeOf(this,lo.prototype),this.message=`Unable to request ${t}.\n Possibly invalid NGW URL entered or CORS not configured to get request from ${location.origin}`}}let ho;ho=(t,e,i={},o,n)=>{i.method=i.method||"GET";const r=new XMLHttpRequest;r.open(i.method||"GET",t,!0),"blob"===i.responseType&&(r.responseType=i.responseType);const s=()=>{try{return JSON.parse(r.responseText)}catch(t){return r.responseText}};r.onload=()=>{-1!==[401,403,404,422,500].indexOf(r.status)&&o(new Zi(s())),((t=!1)=>{const n=t?o:e;"blob"===i.responseType?n(r.response):r.responseText?n(s()):o({message:""})})()},r.onerror=e=>{o(0===r.status?new lo(t):e)},r.upload.onprogress=function(t){if(t.lengthComputable){i.onProgress&&i.onProgress(t.loaded/t.total*100,t)}};const a=i.headers;if(a)for(const h in a){const t=a[h];"string"==typeof t&&r.setRequestHeader(h,t)}let l;if(void 0!==i.withCredentials&&(r.withCredentials=i.withCredentials),i.file){if(l=new FormData,l.append("file",i.file),i.data)for(const h in i.data)l.append(h,l[h])}else l=i.data?"string"==typeof i.data?i.data:JSON.stringify(i.data):null;n&&n((()=>{r.abort()})),r.send(l)};var co=Object.defineProperty,uo=Object.getOwnPropertySymbols,po=Object.prototype.hasOwnProperty,fo=Object.prototype.propertyIsEnumerable,mo=(t,e,i)=>e in t?co(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,_o=(t,e)=>{for(var i in e||(e={}))po.call(e,i)&&mo(t,i,e[i]);if(uo)for(var i of uo(e))fo.call(e,i)&&mo(t,i,e[i]);return t},yo=(t,e,i)=>(mo(t,"symbol"!=typeof e?e+"":e,i),i);let go=0;class vo{constructor(t){this.options=t,yo(this,"id",go++),yo(this,"emitter",new i),yo(this,"user"),yo(this,"resources"),yo(this,"routeStr","/api/component/pyramid/route"),yo(this,"activeRequests",[]),yo(this,"requestTransform");const e=function(t){return $i.find((e=>{if(e.options.baseUrl===t.baseUrl){if(!t.auth)return!0;if(e.options.auth)return O(e.options.auth,t.auth)}}))}(t);if(e)return e;this.options.route&&(this.routeStr=this.options.route),this.options.requestTransform&&(this.requestTransform=this.options.requestTransform),this.resources=new Xi(this),to(this)}static create(t){return new this(t)}setRequestTransform(t){this.requestTransform=t}setNgw(t){this.logout(),this.options.baseUrl=t,to(this)}connect(){const t=new zi,e=this.options.auth;return t.add("route",(()=>new ki(((t,i)=>{const o=()=>this.makeQuery(this.routeStr,{},{}).then((e=>{t(e)})).catch((t=>{i(t)}));if(e){const{login:t,password:n}=e;if(t&&n)return this._login({login:t,password:n}).then((()=>o())).catch((t=>i(t)))}return o()}))),{id:this.id,auth:e,baseUrl:this.options.baseUrl})}login(t,e){return this.logout(),to(this),this._login(t,e)}logout(){this.abort(),function(t){const e=$i.indexOf(t);-1!==e&&$i.splice(e,1)}(this),this.options.auth=void 0,this.user=void 0,this.emitter.emit("logout"),this.resources.cache.clean()}getUserInfo(t,e){if(this.user&&this.user.id)return ki.resolve(this.user);t&&(this.options.auth=t);const i=_o({headers:this.getAuthorizationHeaders(t)},e);return this.makeQuery("/api/component/auth/current_user",{},i)}getAuthorizationHeaders(t){const e=this.makeClientId(t);if(e)return{Authorization:"Basic "+e}}makeClientId(t){if(t=t||this.options.auth){const{login:e,password:i}=t,o=unescape(encodeURIComponent(`${e}:${i}`));return window.btoa(o)}}abort(){for(const t of this.activeRequests)t.cancel();this.activeRequests=[]}getActiveApiRequests(){return[...this.activeRequests]}apiRequest(t,e={},i={}){var o,n;const{method:r,headers:s,withCredentials:a,responseType:l}=i,h=M(e=null!=(o=i.params)?o:e),c=()=>function(t){const e=t.params;return new ki(((i,o)=>{t.connector.connect().then((n=>{let r=n&&n[t.name];if(r){r=[...r];let n=r.shift();if(r.length){const t={};for(let i=0;i<r.length;i++){const o=r[i];if(t[i]="{"+o+"}",void 0===e[o])throw new Error("`"+o+"` url api argument is not specified")}n&&(n=ro(n,t))}if(e){const t=[],i=e.paramList;Array.isArray(i)&&(delete e.paramList,i.forEach((e=>{t.push(`${e[0]}=${e[1]}`)})));for(const o in e)-1===r.indexOf(o)&&t.push(`${o}=${e[o]}`);t.length&&(n=n+"?"+t.join("&"))}n?i(t.connector.makeQuery(n,e,t.requestOptions)):o(new Error("request url is not set"))}else i(void 0)})).catch((t=>{o(t)}))}))}({name:t,params:h,requestOptions:i,connector:this});if(i.cache&&"GET"===r){return(new zi).add(t,c,_o({params:h},M({headers:s,withCredentials:a,responseType:l,baseUrl:this.options.baseUrl,userId:null==(n=this.user)?void 0:n.id})))}return c()}post(t,e,i){return(e=e||{}).method="POST",this.apiRequest(t,i,e)}get(t,e,i){return(e=e||{}).method="GET",this.apiRequest(t,i,e)}patch(t,e,i){return(e=e||{}).method="PATCH",this.apiRequest(t,i,e)}put(t,e,i){return(e=e||{}).method="PUT",this.apiRequest(t,i,e)}delete(t,e,i){return(e=e||{}).method="DELETE",this.apiRequest(t,i,e)}makeQuery(t,e,i={}){if(t=(this.options.baseUrl?this.options.baseUrl:"")+t)return e&&(t=ro(t,e)),t=encodeURI(k(t)),this._loadData(t,i);throw new Error("Empty `url` not allowed")}getResource(t,e){return this.resources.getOne(t,e)}getResourceOrFail(t,e){return this.resources.getOneOrFail(t,e)}getResourceBy(t){return this.resources.getOne(t)}getResourceByKeyname(t){return this.resources.getOne(t)}getResourceById(t){return this.resources.getOne(t)}getResourceId(t,e){return this.resources.getId(t,e)}getResourceIdOrFail(t,e){return this.resources.getIdOrFail(t,e)}getResourcesBy(t,e){return this.resources.getMany(t,e)}getResourceParent(t,e){return this.resources.getParent(t,e)}getResourceChildren(t,e){return this.resources.getChildrenOf(t,e)}updateResource(t,e){return this.resources.update(t,e)}deleteResource(t){return this.resources.delete(t)}_loadData(t,e){if(e.responseType=e.responseType||"json",e.signal&&e.signal.aborted)return ki.reject(new ki.CancelError);const i=new ki(((i,o,n)=>{if(this.user&&((e=e||{}).headers=_o(_o({},this.getAuthorizationHeaders()),e.headers)),this.requestTransform){const[i,o]=this.requestTransform(t,e);t=i,e=o}ho(t,i,e,o,n)})).then((t=>(this._cleanActiveRequests(i),t))).catch((t=>{if(this._cleanActiveRequests(i),t instanceof ki.CancelError);else{const e=this._handleHttpError(t);if(e)throw e}}));return e.signal&&"function"==typeof e.signal.addEventListener&&e.signal.addEventListener("abort",(()=>{i.cancel(),this._cleanActiveRequests(i)})),this.activeRequests.push(i),i}_login(t,e){return this.getUserInfo(t,e).then((t=>(this.user=t,this.emitter.emit("login",t),t))).catch((t=>{throw this.emitter.emit("login:error",t),t}))}_cleanActiveRequests(t){const e=this.activeRequests.indexOf(t);-1!==e&&this.activeRequests.splice(e,1)}_handleHttpError(t){if(t&&t instanceof Zi){if("nextgisweb.resource.exception.ResourceNotFound"===t.exception)throw new Di(t);if("nextgisweb.core.exception.InsufficientPermissions"===t.exception)throw new oo(t)}return t}}yo(vo,"errors",{NgwError:Zi,ResourceNotFoundError:Di});var bo=Object.defineProperty,wo=Object.defineProperties,xo=Object.getOwnPropertyDescriptors,Lo=Object.getOwnPropertySymbols,Po=Object.prototype.hasOwnProperty,Oo=Object.prototype.propertyIsEnumerable,Mo=(t,e,i)=>e in t?bo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Co=(t,e)=>{for(var i in e||(e={}))Po.call(e,i)&&Mo(t,i,e[i]);if(Lo)for(var i of Lo(e))Oo.call(e,i)&&Mo(t,i,e[i]);return t},ko=(t,e)=>wo(t,xo(e));const Eo={srs:4326,geom_format:"geojson"};function Ao(t){return{geometry:t.geom,id:t.id,type:"Feature",properties:t.fields}}function To(t,e){const{extensions:i,geom:o,fields:n,srs:r,ilike:s,like:a}=e,l=i?i.join(","):"";"*"!==l&&(t.extensions=l),void 0!==n&&(t.fields=Array.isArray(n)?n.join(","):""),void 0!==o&&(t.geom=o?"yes":"no",o||(delete t.srs,delete t.geom_format)),p(s)?t.ilike=s:p(a)&&(t.like=a),p(r)&&(t.srs=r)}function Io(t){const e=zo(t);return ki.all(e).then((e=>{const i=[],o=[];for(const t of e)for(const e of t)i.includes(e.id)||(o.push(e),i.push(e.id));return t.offset||t.limit?o.splice(void 0!==t.offset?t.offset:0,void 0!==t.limit?t.limit:o.length):o}))}function So(t){const[e,i,o]=t;let n="",r="";return[`${"id"!==e?"fld_":""}${String(e).trim().replace(/^(%?)(.+?)(%?)$/,((t,e,i,o)=>(n=e,r=o,i)))}__${i}`,n+o+r]}function zo(t,e=[],i=[]){const{filters:o}=t,n="string"==typeof o[0]?o[0]:"all",r=o.filter((t=>Array.isArray(t)));if("any"===n)for(const s of r)Dt(s)?e.push(Bo(ko(Co({},t),{paramList:[...i,So(s)]}))):zo(ko(Co({},t),{filters:s}),e,[...i]);else if("all"===n){const o=[],n=[];for(const t of r)Dt(t)?o.push(So(t)):n.push(t);if(n.length)for(const r of n)zo(ko(Co({},t),{filters:r}),e,[...i,...o]);else e.push(Bo(ko(Co({},t),{paramList:[...i,...o]})))}return e}function jo(t){return`POLYGON((${t.map((([t,e])=>{const[i,o]=x(t,e).map((t=>function(t,e){const i=e?Number("1e+"+e):1;return Math.round((t+Number.EPSILON)*i)/i}(t)));return i+" "+o})).join(", ")}))`}function Bo(t){const e=Co({},Eo),{limit:i,cache:o,signal:n,offset:r,orderBy:s,paramList:a,connector:l,geomFormat:h,intersects:c,resourceId:u}=t;if(i?i!==Number.POSITIVE_INFINITY&&(e.limit=i):e.limit=7e3,r&&(e.offset=r),h&&(e.geom_format=h),To(e,t),s&&(e.order_by=s.join(",")),Array.isArray(c)){const t=function(t){return Array.isArray(t)&&4===t.length&&t.every((t=>"number"==typeof t))}(c)?v(c):c;e.intersects=jo(t)}else"string"==typeof c&&(e.intersects=c);a&&(e.paramList=a);const p=Co({id:u},e);return l.get("feature_layer.feature.collection",{cache:o,signal:n},p)}var Zo=Object.defineProperty,No=Object.defineProperties,Ro=Object.getOwnPropertyDescriptors,Do=Object.getOwnPropertySymbols,Fo=Object.prototype.hasOwnProperty,Uo=Object.prototype.propertyIsEnumerable,Wo=(t,e,i)=>e in t?Zo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Ho=(t,e)=>{for(var i in e||(e={}))Fo.call(e,i)&&Wo(t,i,e[i]);if(Do)for(var i of Do(e))Uo.call(e,i)&&Wo(t,i,e[i]);return t},qo=(t,e)=>No(t,Ro(e));function Vo(t){const e=Ho({},Eo);To(e,t);const i=Ho({id:t.resourceId,fid:t.featureId},e);return t.connector.get("feature_layer.feature.item",{cache:t.cache||!0},i).then((e=>qo(Ho({},e),{toGeojson:()=>e.geom?ki.resolve(Ao(e)):Vo(qo(Ho({},t),{geom:!0,fields:null,extensions:null})).then((t=>{const i=t.geom;return Ao(qo(Ho({},e),{geom:i}))}))})))}var Go=Object.defineProperty,Jo=(t,e,i)=>(((t,e,i)=>{e in t?Go(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i})(t,"symbol"!=typeof e?e+"":e,i),i);class Ko{constructor(t){this.options=t,Jo(this,"name"),Jo(this,"resourceId"),Jo(this,"item"),Jo(this,"_extent"),this.resourceId=t.resourceId;const e=t.item;this.item=e,this.name=t.labelField&&e.fields?e.fields[t.labelField]:String(e.id)}extent(){return this._extent?ki.resolve(this._extent):this.options.connector.get("feature_layer.feature.item_extent",null,{id:this.resourceId,fid:this.item.id}).then((t=>{const{minLat:e,minLon:i,maxLat:o,maxLon:n}=t.extent,r=[i,e,n,o];return this._extent=r,r}))}geoJson(){return this.item.geom?ki.resolve(Ao(this.item)):Vo({resourceId:this.resourceId,featureId:this.item.id,connector:this.options.connector,geom:!0,fields:null,extensions:null}).then((t=>(this.item.geom=t.geom,Ao(this.item))))}}function Yo(t,e,i,o){return!!$o(t,e,i,tn,o)}function Qo(t,e,i,o){return $o(t,e,i,en,o)}function Xo(t,e="children"){let i=[];const o=("function"==typeof e?e:t=>t[e])(t);return o&&(Array.isArray(o)?i=o:i.push(o)),o?i:void 0}function $o(t,e=(t=>!!t),i="children",o,n){const r="function"==typeof e?e:t=>Ft(t,e);return o(t,n?t=>r(n(t)):r,i)}function tn(t,e=(t=>!!t),i,o=[]){let n=[];if(Array.isArray(t))n=t;else{if(e(t))return t;const o=Xo(t,i);o&&(n=o)}for(let r=0;r<n.length;r++)if(n[r]){const t=tn(n[r],e,i,o);if(t)return t}}function en(t,e=(t=>!!t),i,o=[]){let n=[];if(Array.isArray(t))n=t;else{e(t)&&o.push(t);const r=Xo(t,i);r&&(n=r)}for(let r=0;r<n.length;r++)n[r]&&en(n[r],e,i,o);return o}function on(t,e=(t=>!!t),i,o=[]){let n=[];if(Array.isArray(t))n=t;else{if(!e(t))return!1;const o=Xo(t,i);o&&(n=o)}for(let r=0;r<n.length;r++)if(n[r]){if(!on(n[r],e,i,o))return!1}return!0}var nn=Object.defineProperty,rn=(t,e,i)=>(((t,e,i)=>{e in t?nn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i})(t,"symbol"!=typeof e?e+"":e,i),i);class sn{constructor(t){rn(this,"item"),rn(this,"_children",[]),rn(this,"_parent"),this.item=t}setParent(t){this._parent=t}addChild(t){this._children.push(t)}getParent(){return this._parent}getParents(t){const e=this.getParent();return e?Qo(e,t,(t=>t.tree.getParent())):[]}getRoot(){let t=this.getParent(),e=t;for(;t;)t=t.tree.getParent(),t&&(e=t);return e}find(t){return $o(this._children,t,(t=>t.tree.getChildren()),tn,e);var e}every(t){return!!$o(this._children,t,(t=>t.tree.getChildren()),on,e);var e}some(t){return Yo(this._children,t,(t=>t.tree.getChildren()))}all(t){return this.getDescendants(t)}getDescendants(t){return Qo(this._children,t,(t=>t.tree.getChildren()))}getChildren(){return[...this._children]}}var an=Object.defineProperty,ln=(t,e,i)=>(((t,e,i)=>{e in t?an(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i})(t,"symbol"!=typeof e?e+"":e,i),i);class hn{constructor(t,e,o){ln(this,"options"),ln(this,"emitter",new i),ln(this,"name"),ln(this,"item"),ln(this,"_blocked",!1),ln(this,"_container"),ln(this,"_value"),ln(this,"_removeEventsListener"),this.item=e,this.options=Object.assign({},o),this.name=t,this._value=this.getProperty()}getProperty(){return"function"==typeof this.options.getProperty?this.options.getProperty.call(this,this.item):this.options.value}getParents(){return this.item.tree.getParents()||[]}getParent(){return this.item.tree.getParent()}getChildren(){return this.item.tree.getChildren()}isGroup(){return this.item.tree.getDescendants().length}isBlocked(){if(void 0!==this._blocked)return this._blocked;const t=this.item.tree.getParents();return this._blocked=this._calculateBlockedStatus(t),this._blocked}set(t,e){this._value=this._prepareValue(t),this.update(this._value,e),this._fireChangeEvent(this._value,e)}get(){return this.getValue()}update(t,e){this._callOnSet(t,e)}getContainer(){return this._container}destroy(){if(this._container){const t=this._container.parentNode;t&&t.removeChild(this._container)}this._removeEventsListener&&this._removeEventsListener()}getValue(){return void 0!==this._value?this._value:this.getProperty()}_prepareValue(t){return t}_callOnSet(t,e){this.options.onSet&&this.options.onSet.call(this,t,e,this.item)}_fireChangeEvent(t,e){if(this.emitter){t=void 0!==t?t:this.getValue(),this.emitter.emit("change",{value:t,options:e});this.item.tree.getParents().forEach((i=>{const o=i.properties&&i.properties.property(this.name);o&&o.emitter.emit("change-tree",{value:t,options:e,item:this.item})}))}}_calculateBlockedStatus(t){const e=t.some((t=>{var e;const i=null==(e=t.properties)?void 0:e.property(this.name);return!!i&&!i.get()}));return e}}var cn=Object.defineProperty,un=Object.getOwnPropertySymbols,pn=Object.prototype.hasOwnProperty,dn=Object.prototype.propertyIsEnumerable,fn=(t,e,i)=>e in t?cn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,mn=(t,e)=>{for(var i in e||(e={}))pn.call(e,i)&&fn(t,i,e[i]);if(un)for(var i of un(e))dn.call(e,i)&&fn(t,i,e[i]);return t};const _n=class t extends hn{constructor(e,i,o){super(e,i,mn(mn({},t.options),o)),this.set(this.get())}update(t,e){if(t){if(e&&e.bubble||this.options.bubble){this.unBlock(e);const i=this.getParent(),o=i&&i.properties&&i.properties.property(this.name);o&&o.set(t,Object.assign({},e,{bubble:!0,propagation:!1}))}this.isBlocked()||this._turnOn(e)}else this._turnOff(e);(e&&e.propagation||this.options.propagation)&&this._propagation(t,e)}getHierarchyValue(){return this.get()&&this.getParents().every((t=>{const e=t.properties&&t.properties.get(this.name);return e&&e.get()}))}block(t){this._blocked=!0,this._block(t)}unBlock(t){this._blocked=!1,this.getValue()&&this._unBlock(t)}blockChild(t){this.item.tree.getDescendants().forEach((e=>this._blockChild(e,t)))}unblockChild(t){this.item.tree.getChildren().forEach((e=>this._unBlockChild(e,t)))}_prepareValue(t){return t}_turnOff(t){this.options.turnOff&&this.options.turnOff.call(this,t),this._callOnSet(!1,t),this.options.hierarchy&&this.isGroup()&&this.blockChild(t)}_turnOn(t){this.options.turnOn&&this.options.turnOn.call(this,t),this._callOnSet(!0,t),this.options.hierarchy&&this.isGroup()&&this.unblockChild(t)}_block(t){this._turnOff(t)}_unBlock(t){this._turnOn(t)}_blockChild(t,e){const i=t.properties&&t.properties.property(this.name);i&&i.block&&i.block(e)}_unBlockChild(t,e){const i=t.properties&&t.properties.property(this.name);i&&i.unBlock&&i.unBlock(e)}_propagation(t,e){if(this.isGroup()){const i=this.item.tree.getChildren();for(let o=0;o<i.length;o++){const n=i[o],r=n.properties&&n.properties.property(this.name);r&&r.set(t,mn(mn({},e),{propagation:!0,bubble:!1}))}}}};var yn;fn(_n,"symbol"!=typeof(yn="options")?yn+"":yn,{hierarchy:!0,bubble:!1,propagation:!1,label:"Toggle"});let gn=_n;var vn=Object.defineProperty,bn=Object.getOwnPropertySymbols,wn=Object.prototype.hasOwnProperty,xn=Object.prototype.propertyIsEnumerable,Ln=(t,e,i)=>e in t?vn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Pn=(t,e,i)=>(Ln(t,"symbol"!=typeof e?e+"":e,i),i);const On=class t{constructor(t,e){this.item=t,Pn(this,"options",{}),Pn(this,"_properties",{}),Pn(this,"_propertiesList",[]),e&&e.forEach(this._setPropertyHandler.bind(this))}add(t){this._setPropertyHandler(t)}update(){this.list().forEach((t=>t.update()))}get(t){const e=this.property(t);return e?e.get():void 0}set(t,e,i){const o=this.property(t);o&&o.getValue()!==e&&o.set(e,i)}property(t){return this._properties[t]}list(){return this._propertiesList.map((t=>this._properties[t]))}destroy(){for(const t in this._properties){const e=this.property(t);e&&e.destroy&&e.destroy()}this._properties={},this._propertiesList=[]}_setPropertyHandler(t){const e=this._getHandler(t);if(e&&t.name){const i=((t,e)=>{for(var i in e||(e={}))wn.call(e,i)&&Ln(t,i,e[i]);if(bn)for(var i of bn(e))xn.call(e,i)&&Ln(t,i,e[i]);return t})({},t);this._properties[t.name]=new e(t.name,this.item,i),this._propertiesList.push(t.name)}}_getHandler(e){const i=e.handler;return!i&&e.type?"boolean"===e.type?t.handlers.CheckProperty:t.handlers.BaseProperty:i}};Pn(On,"handlers",{CheckProperty:gn});let Mn=On;var Cn=Object.defineProperty,kn=Object.getOwnPropertySymbols,En=Object.prototype.hasOwnProperty,An=Object.prototype.propertyIsEnumerable,Tn=(t,e,i)=>e in t?Cn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,In=(t,e,i)=>(Tn(t,"symbol"!=typeof e?e+"":e,i),i);let Sn=0;class zn{constructor(t){In(this,"options",{}),In(this,"properties"),In(this,"tree"),In(this,"id",Sn),Sn+=1,this.options=((t,e)=>{for(var i in e||(e={}))En.call(e,i)&&Tn(t,i,e[i]);if(kn)for(var i of kn(e))An.call(e,i)&&Tn(t,i,e[i]);return t})({},t),this.tree=new sn(this)}initProperties(){this.properties=new Mn(this,this.options.properties)}}var jn=Object.defineProperty,Bn=Object.defineProperties,Zn=Object.getOwnPropertyDescriptors,Nn=Object.getOwnPropertySymbols,Rn=Object.prototype.hasOwnProperty,Dn=Object.prototype.propertyIsEnumerable,Fn=(t,e,i)=>e in t?jn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Un=(t,e)=>{for(var i in e||(e={}))Rn.call(e,i)&&Fn(t,i,e[i]);if(Nn)for(var i of Nn(e))Dn.call(e,i)&&Fn(t,i,e[i]);return t},Wn=(t,e)=>Bn(t,Zn(e));function Hn(t){const e=t.extent_bottom,i=t.extent_left,o=t.extent_top,n=t.extent_right;if(e&&i&&o&&n){const t=[i,e,n,o];return t[3]>82&&(t[3]=82),t[1]<-82&&(t[1]=-82),t}}function qn({resourceId:t,connector:e,cache:i=!0}){return e.get("layer.extent",{cache:i},{id:t}).then((t=>{if(t){const{maxLat:e,maxLon:i,minLat:o,minLon:n}=t.extent;return[n,o,i,e]}}))}function Vn(t){return t.connector.getResource(t.resourceId).then((e=>{if(e)return Gn(e,t.connector,t)}))}function Gn(t,e,i){if(t.webmap)return ki.resolve(Hn(t.webmap));{const o=t.resource;return o.cls&&-1!==o.cls.indexOf("style")?e.getResource(o.parent.id).then((t=>{if(t)return qn(Wn(Un({},i),{resourceId:t.resource.id,connector:e}))})):qn(Wn(Un({},i),{resourceId:o.id,connector:e}))}}var Jn=Object.defineProperty,Kn=(t,e,i)=>(((t,e,i)=>{e in t?Jn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i})(t,"symbol"!=typeof e?e+"":e,i),i),Yn=(t,e,i)=>new Promise(((o,n)=>{var r=t=>{try{a(i.next(t))}catch(e){n(e)}},s=t=>{try{a(i.throw(t))}catch(e){n(e)}},a=t=>t.done?o(t.value):Promise.resolve(t.value).then(r,s);a((i=i.apply(t,e)).next())}));class Qn{constructor(){Kn(this,"item"),Kn(this,"connector"),Kn(this,"_extent")}getExtent(){return Yn(this,null,(function*(){return this.getBounds()}))}getBounds(t){return Yn(this,null,(function*(){return this._extent?this._extent:this.item?(this._extent=yield Gn(this.item,this.connector,t),this._extent):void 0}))}}var Xn=(t,e,i)=>new Promise(((o,n)=>{var r=t=>{try{a(i.next(t))}catch(e){n(e)}},s=t=>{try{a(i.throw(t))}catch(e){n(e)}},a=t=>t.done?o(t.value):Promise.resolve(t.value).then(r,s);a((i=i.apply(t,e)).next())}));function $n(t,e){return Xn(this,null,(function*(){const i=t.resource,o=i;let{keyname:n,resourceId:r}=t;if(i&&("string"==typeof i?n=i:r="number"==typeof i?i:o.resource&&void 0!==o.resource&&"resource"in o?i.resource.id:yield $n(i,e)),!r&&n){const t=yield e.getResource(n);t&&(r=t.resource.id)}return r}))}const tr={tms:"TILE"};var er=Object.defineProperty,ir=Object.getOwnPropertySymbols,or=Object.prototype.hasOwnProperty,nr=Object.prototype.propertyIsEnumerable,rr=(t,e,i)=>e in t?er(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,sr=(t,e)=>{for(var i in e||(e={}))or.call(e,i)&&rr(t,i,e[i]);if(ir)for(var i of ir(e))nr.call(e,i)&&rr(t,i,e[i]);return t},ar=(t,e,i)=>(rr(t,"symbol"!=typeof e?e+"":e,i),i);const lr="https://qms.nextgis.com";function hr(t,e=lr,i={}){let o;if("webMap"in t){const n=t,{webMap:r,url:s}=n,a=((t,e)=>{var i={};for(var o in t)or.call(t,o)&&e.indexOf(o)<0&&(i[o]=t[o]);if(null!=t&&ir)for(var o of ir(t))e.indexOf(o)<0&&nr.call(t,o)&&(i[o]=t[o]);return i})(n,["webMap","url"]);o=r,s&&(e=s),a&&(i=a)}else o=t;e||(e=lr);class n{constructor(t,e){ar(this,"qms"),ar(this,"options"),ar(this,"map"),this.map=t;const o=sr(sr({},i),e);this.options=o,this.options.baselayer=!0,o.qms&&(this.qms=o.qms)}addLayer(t){return i=this,r=null,s=function*(){if(!this.qms&&t.qmsId)try{this.qms=yield function(t){return new Promise(((e,i)=>{const o=new XMLHttpRequest;o.onreadystatechange=()=>{if(4===o.readyState&&200===o.status&&o.responseText)try{e(JSON.parse(o.responseText))}catch(t){i(t)}},o.open("GET",k(t),!0),o.send()}))}(e+"/api/v1/geoservices/"+t.qmsId)}catch(a){console.error(a)}const i=this.qms;if(i){const e=tr[i.type||"tms"],a=o.mapAdapter.layerAdapters[e];if(a&&(r=n,s=a,["showLayer","hideLayer"].forEach((t=>{const e=Object.getOwnPropertyDescriptor(s.prototype,t);e&&Object.defineProperty(r.prototype,t,e)})),"TILE"===e)){if(t=sr(sr({order:0,maxZoom:o.options.maxZoom,minZoom:o.options.minZoom},this.options),function(t){const e=("https:"===location.protocol?"https":"http")+"://";let i=t.url.replace(/^(https?|ftp):\/\//,e);return t.y_origin_top||(i=i.replace("{y}","{-y}")),{url:i,name:t.name,attribution:t.copyright_text,maxZoom:t.z_max,minZoom:t.z_min}}(i)),i.origin_url){const[e,o]=function(t){const e=[];return[t=t.replace(/{switch:(.*?)}/,((t,i)=>("string"==typeof i&&i.split(",").forEach((t=>e.push(t))),"{s}"))),e]}(i.origin_url);o.length&&(t.subdomains=o,t.url=e)}return this.options=t,new a(this.map,t).addLayer(t)}}var r,s},new Promise(((t,e)=>{var o=t=>{try{a(s.next(t))}catch(i){e(i)}},n=t=>{try{a(s.throw(t))}catch(i){e(i)}},a=e=>e.done?t(e.value):Promise.resolve(e.value).then(o,n);a((s=s.apply(i,r)).next())}));var i,r,s}}return n}var cr=Object.defineProperty,ur=Object.getOwnPropertySymbols,pr=Object.prototype.hasOwnProperty,dr=Object.prototype.propertyIsEnumerable,fr=(t,e,i)=>e in t?cr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,mr=(t,e)=>{for(var i in e||(e={}))pr.call(e,i)&&fr(t,i,e[i]);if(ur)for(var i of ur(e))dr.call(e,i)&&fr(t,i,e[i]);return t},_r=(t,e,i)=>(fr(t,"symbol"!=typeof e?e+"":e,i),i);class yr{constructor(t){_r(this,"options",{url:"https://qms.nextgis.com"}),_r(this,"url"),this.options=mr(mr({},this.options),t),this.url=this.options.url}getLayerAdapters(){return Promise.resolve([{name:"QMS",createAdapter:t=>Promise.resolve(this._createAdapter(t))}])}_createAdapter(t){return hr({webMap:t,url:this.url})}}_r(yr,"utils",{createQmsAdapter:hr});var gr=Object.defineProperty,vr=Object.defineProperties,br=Object.getOwnPropertyDescriptors,wr=Object.getOwnPropertySymbols,xr=Object.getPrototypeOf,Lr=Object.prototype.hasOwnProperty,Pr=Object.prototype.propertyIsEnumerable,Or=Reflect.get,Mr=(t,e,i)=>e in t?gr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Cr=(t,e)=>{for(var i in e||(e={}))Lr.call(e,i)&&Mr(t,i,e[i]);if(wr)for(var i of wr(e))Pr.call(e,i)&&Mr(t,i,e[i]);return t},kr=(t,e)=>vr(t,br(e)),Er=(t,e,i)=>Or(xr(t),i,e),Ar=(t,e,i)=>new Promise(((o,n)=>{var r=t=>{try{a(i.next(t))}catch(e){n(e)}},s=t=>{try{a(i.throw(t))}catch(e){n(e)}},a=t=>t.done?o(t.value):Promise.resolve(t.value).then(r,s);a((i=i.apply(t,e)).next())}));function Tr(t){let e;for(e in t){const i=t[e];if(C(i)){const o=i;if(p(o.year)&&p(o.month)&&p(o.day)){const i=[o.year,o.month-1,o.day];"hour"in o&&[o.hour,o.minute,o.second].forEach((t=>{i.push(t)})),t[e]=new Date(...i).toISOString()}}else"id"===e&&"string"==typeof i&&(t[e]=i.split(",").map(Number))}return t}var Ir=Object.defineProperty,Sr=Object.defineProperties,zr=Object.getOwnPropertyDescriptors,jr=Object.getOwnPropertySymbols,Br=Object.prototype.hasOwnProperty,Zr=Object.prototype.propertyIsEnumerable,Nr=(t,e,i)=>e in t?Ir(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Rr=(t,e)=>{for(var i in e||(e={}))Br.call(e,i)&&Nr(t,i,e[i]);if(jr)for(var i of jr(e))Zr.call(e,i)&&Nr(t,i,e[i]);return t},Dr=(t,e)=>Sr(t,zr(e));function Fr(t){const e=t.filters;return e?Io(Dr(Rr({},t),{filters:e})).then((i=>{var o;return(null!=(o=t.clientFilterValidate)?o:Ur(e))&&(i=i.filter((t=>Ft(Tr(Dr(Rr({},t.fields),{id:t.id})),e)))),i})):Bo(t)}function Ur(t){if("any"===t[0])return!0;for(let e=1;e<t.length;e++){const i=t[e];if("[object Array]"===Object.prototype.toString.call(i)){if(Ur(i))return!0}}return!1}function Wr(t){return function(t){return Fr(t).then((t=>{const e=[];return t.forEach((t=>{e.push(Ao(t))})),e}))}(t).then((t=>({type:"FeatureCollection",features:t})))}const Hr=["fields","intersects","limit","orderBy","strategy"];function qr(t){const e={};return Hr.forEach((i=>{const o=t[i];void 0!==o&&(e[i]=o)})),e}var Vr=Object.defineProperty,Gr=Object.defineProperties,Jr=Object.getOwnPropertyDescriptors,Kr=Object.getOwnPropertySymbols,Yr=Object.getPrototypeOf,Qr=Object.prototype.hasOwnProperty,Xr=Object.prototype.propertyIsEnumerable,$r=Reflect.get,ts=(t,e,i)=>e in t?Vr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,es=(t,e)=>{for(var i in e||(e={}))Qr.call(e,i)&&ts(t,i,e[i]);if(Kr)for(var i of Kr(e))Xr.call(e,i)&&ts(t,i,e[i]);return t},is=(t,e)=>Gr(t,Jr(e)),os=(t,e,i)=>(ts(t,"symbol"!=typeof e?e+"":e,i),i),ns=(t,e,i)=>$r(Yr(t),i,e),rs=(t,e,i)=>new Promise(((o,n)=>{var r=t=>{try{a(i.next(t))}catch(e){n(e)}},s=t=>{try{a(i.throw(t))}catch(e){n(e)}},a=t=>t.done?o(t.value):Promise.resolve(t.value).then(r,s);a((i=i.apply(t,e)).next())}));function ss(t){return rs(this,null,(function*(){var e,o;const{item:n,webMap:r,Adapter:s,connector:a,layerOptions:l,addLayerOptionsPriority:h}=t,c=null==h||h,u=l,p=s||r.mapAdapter.layerAdapters.GEOJSON,d=[];let f,m,y=!1;const g=yield $n(u,a);(null==(o=null==(e=u.adapterOptions)?void 0:e.popupOptions)?void 0:o.fromProperties)&&(u.adapterOptions.popupOptions.createPopupContent=({feature:t})=>t&&function(t,e){{const i=document.createElement("div");if(e&&e.feature_layer)e.feature_layer.fields.forEach((e=>{if(e.grid_visibility){const o=t.properties&&t.properties[e.keyname];if(o){const t=document.createElement("div");i.appendChild(t),t.innerHTML=`<span>${e.display_name}</span>: ${o}<span></span>`}}}));else if(t.properties)for(const e in t.properties){const o=document.createElement("div");i.appendChild(o),o.innerHTML=`<span>${e}</span>: ${t.properties[e]}<span></span>`}return i}}(t,n));const v=(t,e)=>rs(this,null,(function*(){return w(),f={filters:t,options:e},m=Wr(es({resourceId:g,filters:t,connector:a,cache:!0},e)),yield m}));let b=!1;const w=()=>{m&&(m.cancel(),m=void 0)};class x extends p{constructor(){super(...arguments),os(this,"emitter",new i),os(this,"__onMapMove"),os(this,"__onMapMoveStart"),os(this,"__enableMapMoveListener"),os(this,"__disableMapMoveListener")}addLayer(t){return rs(this,null,(function*(){let e=!t.data;const i=void 0===t.waitFullLoad||t.waitFullLoad;void 0!==u.id&&(t.id=u.id),n&&n.vector_layer&&(t.type=Us[n.vector_layer.geometry_type]),u.adapterOptions&&(t=c?es(es({},u.adapterOptions),t):es(es({},t),u.adapterOptions)),t.data&&0===Object.keys(t.data).length&&(t.data=void 0,e=!1);const o=t.strategy||void 0;this.options.strategy=o;const r=ns(x.prototype,this,"addLayer").call(this,t);let s;return f={filters:t.propertiesFilter,options:qr(t)},e&&(s=this.updateLayer()),i&&s&&(yield s),o&&o.startsWith("BBOX")&&!y&&this._addBboxEventListener(),r}))}getExtent(){return this.getBounds()}getBounds(){return rs(this,null,(function*(){const t=this.getLayers&&this.getLayers().length,e=this.options.strategy;return(null==e?void 0:e.startsWith("BBOX"))||t?Vn({connector:a,resourceId:n.resource.id}):ns(x.prototype,this,"getBounds")?ns(x.prototype,this,"getBounds").call(this):void 0}))}beforeRemove(){b=!0,this._removeMoveEventListener(),this._removeBboxEventListener(),this.__disableMapMoveListener=void 0,this.__enableMapMoveListener=void 0,this.__onMapMove=void 0,this.__onMapMoveStart=void 0,w()}getCount(){return function({connector:t,resourceId:e,cache:i=!0}){return t.get("feature_layer.feature.count",{cache:i},{id:e}).then((t=>t.total_count))}({connector:a,resourceId:g,cache:!0})}updateLayer(t){return rs(this,null,(function*(){var e;if(t=t||f||{},null==(e=this.options.strategy)?void 0:e.startsWith("BBOX")){yield r.onLoad("create"),t.options=t.options||{},t.options.intersects=r.getBounds();const{minZoom:e,maxZoom:i}=this.options,o=r.getZoom();if(void 0!==o){if(void 0!==e&&o<e)return;if(void 0!==i&&o>i)return;if(y)return}}if(!b){try{this.emitter.emit("preupdate",t),r._emitLayerEvent("layer:preupdate",u.id||"",t);const e=yield v(t.filters,is(es({},t.options),{srs:this.options.srs}));let i=e;const o=yield this.getCount();if("BBOX+"===this.options.strategy){i={type:"FeatureCollection",features:[]};for(const t of e.features)-1===d.indexOf(String(t.id))&&(d.push(String(t.id)),i.features.push(t));y=void 0!==o&&d.length>=o,yield r.addLayerData(this,i)}else y=void 0!==o&&e.features.length>=o,yield r.setLayerData(this,e);this.emitter.emit("updated",e),r._emitLayerEvent("layer:updated",u.id||"",{data:e,newData:i,isFull:y})}catch(i){if(i instanceof Error&&"CancelError"!==i.name)throw i}ns(x.prototype,this,"updateLayer")&&ns(x.prototype,this,"updateLayer").call(this)}}))}propertiesFilter(t,e){return rs(this,null,(function*(){if(w(),this.filter&&y)this.filter((e=>{const i=e.feature&&e.feature.properties&&Tr(es({},e.feature.properties));return!i||Ft(i,t)}));else if(this.setData){this.clearLayer&&this.clearLayer();const i=yield v(t,is(es({},e),{srs:this.options.srs}));this.setData(i)}}))}removeFilter(){f=void 0,this.propertiesFilter([]),this.filter&&this.filter((()=>!0))}_addBboxEventListener(){this.__enableMapMoveListener=t=>{t===this&&(this._removeMoveEventListener(),this.updateLayer(),this._addMoveEventListener())},this.__disableMapMoveListener=t=>{t===this&&this._removeMoveEventListener()},r.emitter.on("layer:show",this.__enableMapMoveListener),r.emitter.on("layer:hide",this.__disableMapMoveListener),this.__enableMapMoveListener(this)}_removeBboxEventListener(){this.__enableMapMoveListener&&r.emitter.on("layer:show",this.__enableMapMoveListener),this.__disableMapMoveListener&&r.emitter.on("layer:hide",this.__disableMapMoveListener)}_addMoveEventListener(){this.__onMapMove=_((()=>this.updateLayer())),this.__onMapMoveStart=w,r.emitter.on("movestart",this.__onMapMoveStart),r.emitter.on("moveend",this.__onMapMove)}_removeMoveEventListener(){this.__onMapMove&&r.emitter.removeListener("moveend",this.__onMapMove),this.__onMapMoveStart&&r.emitter.removeListener("movestart",this.__onMapMoveStart)}}return x}))}var as=(t,e,i)=>new Promise(((o,n)=>{var r=t=>{try{a(i.next(t))}catch(e){n(e)}},s=t=>{try{a(i.throw(t))}catch(e){n(e)}},a=t=>t.done?o(t.value):Promise.resolve(t.value).then(r,s);a((i=i.apply(t,e)).next())}));function ls({options:t,webMap:e,baseUrl:i}){var o;let n,r=t.adapter||"IMAGE";const s=e&&e.getLayerAdapters(),a=t.resource,l=t.tileNoData?t.tileNoData:200;if("number"==typeof a){if("IMAGE"===r){if(!s||s.IMAGE)return function({resourceId:t,baseUrl:e,nd:i,headers:o}){const n=e+"/api/component/render/image",r={resource:t};return i&&(r.nd=i),{url:n,resourceId:t,headers:o,params:r,updateWmsParams:e=>(i&&(e.nd=i),Fs(e,t))}}({resourceId:a,headers:t.headers,nd:l,baseUrl:i});r="TILE"}if("WMS"===r){n=`${i}/api/resource/${a}/wms`;const e=t.adapterOptions;return{url:n,format:"image/png",version:"1.1.1",layers:e&&e.layers,headers:t.headers}}if("MVT"===r)return n=i+"/api/component/feature_layer/mvt?x={x}&y={y}&z={z}&resource="+a+"&simplification="+(null!=(o=t.simplification)?o:6),{url:n,sourceLayer:"ngw:"+a,featureIdName:"$id"};if("TERRAIN"===r)return n=i+`/api/resource/${a}/terrain_provider`,{url:n,adapter:r};if("MODEL_3D"===r)return n=i+`/api/component/model_3d/${a}/data.glb`,{url:n};if("TILE"===r)return n=i+"/api/component/render/tile?z={z}&x={x}&y={y}&resource="+a+"&nd="+l,{url:n,adapter:r}}else{if(void 0!==a)throw new Error("Option `resource` must be number, not "+typeof a);console.log("Option `resource` not set")}}var hs=Object.defineProperty,cs=Object.defineProperties,us=Object.getOwnPropertyDescriptors,ps=Object.getOwnPropertySymbols,ds=Object.prototype.hasOwnProperty,fs=Object.prototype.propertyIsEnumerable,ms=(t,e,i)=>e in t?hs(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,_s=(t,e)=>{for(var i in e||(e={}))ds.call(e,i)&&ms(t,i,e[i]);if(ps)for(var i of ps(e))fs.call(e,i)&&ms(t,i,e[i]);return t},ys=(t,e)=>cs(t,us(e)),gs=(t,e,i)=>(ms(t,"symbol"!=typeof e?e+"":e,i),i),vs=(t,e,i)=>new Promise(((o,n)=>{var r=t=>{try{a(i.next(t))}catch(e){n(e)}},s=t=>{try{a(i.throw(t))}catch(e){n(e)}},a=t=>t.done?o(t.value):Promise.resolve(t.value).then(r,s);a((i=i.apply(t,e)).next())}));function bs(t){return vs(this,arguments,(function*({layerOptions:t,webMap:e,connector:i,item:o}){const n=o.resource.cls;let r=t.adapter||n&&{wmsserver_service:"WMS",tmsclient_layer:"IMAGE"}[n]||"IMAGE";if(void 0!==r&&(t.adapter=r),"IMAGE"===r){const t=e.getLayerAdapters();!t||t.IMAGE||(r="TILE")}const s=e.mapAdapter.layerAdapters[r];if(s){const n=yield $n(t,i);return class extends s{constructor(r,s){super(r,s),this.map=r,gs(this,"item",o),gs(this,"resourceId",n);const a=ls({options:t,webMap:e,baseUrl:i.options.baseUrl||""});if(a){const e=ys(_s(_s({},a),t.adapterOptions),{params:{resource:n},layers:a.layers||String(n),resourceId:n});t.adapterOptions&&p(t.adapterOptions.setViewDelay)&&(e.setViewDelay=t.adapterOptions.setViewDelay),this.options=_s(_s({},this.options),e)}}addLayer(t){return super.addLayer(_s(_s({},this.options),t))}getLegend(t){return vs(this,null,(function*(){const e=yield i.get("render.legend_symbols",_s({params:{id:n},cache:!0},t)),o=this.options.id;if(void 0!==o){return[{layerId:o,legend:e.map((({display_name:t,icon:e})=>({name:t,symbol:e})))}]}return[]}))}getIdentificationIds(){return vs(this,null,(function*(){if(this.item){if("MVT"===r)return[this.item.resource.id];const t=this.item.resource.parent.id;if(p(t))return[t]}return[]}))}}}throw new Error(r+" not supported yet. Only TILE")}))}var ws=Object.defineProperty,xs=Object.defineProperties,Ls=Object.getOwnPropertyDescriptors,Ps=Object.getOwnPropertySymbols,Os=Object.prototype.hasOwnProperty,Ms=Object.prototype.propertyIsEnumerable,Cs=(t,e,i)=>e in t?ws(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,ks=(t,e)=>{for(var i in e||(e={}))Os.call(e,i)&&Cs(t,i,e[i]);if(Ps)for(var i of Ps(e))Ms.call(e,i)&&Cs(t,i,e[i]);return t},Es=(t,e)=>xs(t,Ls(e)),As=(t,e,i)=>new Promise(((o,n)=>{var r=t=>{try{a(i.next(t))}catch(e){n(e)}},s=t=>{try{a(i.throw(t))}catch(e){n(e)}},a=t=>t.done?o(t.value):Promise.resolve(t.value).then(r,s);a((i=i.apply(t,e)).next())}));const Ts={},Is=["mapserver_style","qgis_vector_style","qgis_raster_style","wmsserver_service","raster_style","basemap_layer","vector_layer","raster_layer","postgis_layer","webmap","tmsclient_layer"];function Ss(t){return As(this,arguments,(function*({layerOptions:t,webMap:e,connector:i,item:o}){const n=o.resource.id,r=yield i.getResourceChildren(n),s=r&&r[0];if(s)return zs(Es(ks({},t),{resource:s.resource.id}),e,i)}))}function zs(t,e,i){return As(this,null,(function*(){let o,n;const r=t.adapter,s=yield $n(t,i);if(s){const a=t.resource;if(n=a&&a.resource&&void 0!==a.resource.id?a:yield i.getResource(s),!n)throw"Resource item is not found";{const a=n.resource.cls,l={layerOptions:Es(ks({},t),{resource:s}),webMap:e,connector:i,item:n};if(-1!==Is.indexOf(a))if("webmap"===a)o=function(t){return as(this,arguments,(function*({layerOptions:t,webMap:e,connector:i}){const o=yield $n(t,i);return class extends ga{constructor(t){super(t,{url:"",webMap:e,resourceId:o,connector:i})}}}))}(l);else if("vector_layer"===a||"postgis_layer"===a){const e=l.layerOptions.adapterOptions||{};if(e.type=e.type||n.vector_layer&&Us[n.vector_layer.geometry_type],l.layerOptions.adapterOptions=e,t.adapterOptions=l,void 0!==r&&"GEOJSON"!==r){if("MVT"!==r)return Ss(l);o=bs(l)}else o=ss(l)}else{if("raster_layer"===a)return Ss(l);if("basemap_layer"===a)o=function(t){return Ar(this,arguments,(function*({webMap:t,item:e}){if(e.basemap_layer){const i=e.basemap_layer.qms,o=e.basemap_layer.url;if(i){const e=JSON.parse(i);return Promise.resolve(yr.utils.createQmsAdapter(t,void 0,{qms:e,baselayer:!0}))}if(o){const e=t.mapAdapter.layerAdapters.TILE;if(e){class t extends e{addLayer(e){return Ar(this,null,(function*(){return Er(t.prototype,this,"addLayer").call(this,kr(Cr({},e),{url:o}))}))}}return t}}}}))}(l);else if("GEOJSON"===r){const e=yield i.getResource(n.resource.parent.id);if(e){const i=Es(ks({},t),{resource:n.resource.parent.id});o=ss(Es(ks({},l),{item:e,layerOptions:i}))}}else o=bs(l)}else{if(!Ts[a])throw`Resource class '${a}' not yet supported.`;{const t=Ts[a];let e;e=r&&"function"!=typeof e?t[r]:t,e&&(o=e(l))}}}}if(o)return o.then((t=>{if(t){const e=t;return n&&(e.prototype.item=n,e.prototype.resourceId=n.resource.id,e.prototype.connector=i),u(e,[Qn],{replace:!1}),e}}))}))}var js=Object.defineProperty,Bs=Object.getOwnPropertySymbols,Zs=Object.prototype.hasOwnProperty,Ns=Object.prototype.propertyIsEnumerable,Rs=(t,e,i)=>e in t?js(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Ds=(t,e)=>{for(var i in e||(e={}))Zs.call(e,i)&&Rs(t,i,e[i]);if(Bs)for(var i of Bs(e))Ns.call(e,i)&&Rs(t,i,e[i]);return t};function Fs(t,e){const{bbox:i,width:o,height:n,nd:r}=t;return{resource:Array.isArray(e)?e.join(","):e,extent:i,size:o+","+n,timestamp:Date.now(),nd:null!=r?r:200}}const Us={POINT:"point",LINESTRING:"line",POLYGON:"polygon",MULTIPOINT:"point",MULTILINESTRING:"line",MULTIPOLYGON:"polygon",POINTZ:"point",LINESTRINGZ:"line",POLYGONZ:"polygon",MULTIPOINTZ:"point",MULTILINESTRINGZ:"line",MULTIPOLYGONZ:"polygon"};let Ws;function Hs(t,e=0){const i=e,o=function(){if(void 0===Ws){const t=document.createElement("div");t.style.cssText="position: absolute; left: -100%; top: -100%; width: 100cm;",document.body.appendChild(t);const e=t.offsetWidth;document.body.removeChild(t),Ws=e}return Ws}()*function(t){return 12756274*Math.PI*Math.cos(t*Math.PI/180)}(i)/t,n=function(t){return Math.log(t/256)/Math.LN2}(o);return n}var qs=Object.defineProperty,Vs=Object.getOwnPropertySymbols,Gs=Object.prototype.hasOwnProperty,Js=Object.prototype.propertyIsEnumerable,Ks=(t,e,i)=>e in t?qs(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Ys=(t,e)=>{for(var i in e||(e={}))Gs.call(e,i)&&Ks(t,i,e[i]);if(Vs)for(var i of Vs(e))Js.call(e,i)&&Ks(t,i,e[i]);return t},Qs=(t,e,i)=>(Ks(t,"symbol"!=typeof e?e+"":e,i),i),Xs=(t,e,i)=>new Promise(((o,n)=>{var r=t=>{try{a(i.next(t))}catch(e){n(e)}},s=t=>{try{a(i.throw(t))}catch(e){n(e)}},a=t=>t.done?o(t.value):Promise.resolve(t.value).then(r,s);a((i=i.apply(t,e)).next())}));const $s=class t extends zn{constructor(e,o,n,r,s,a){if(super(Ys(Ys({},t.options),n)),this.webMap=e,Qs(this,"item"),Qs(this,"connector"),Qs(this,"layer"),Qs(this,"emitter",new i),Qs(this,"_rootDescendantsCount",0),r&&(this.connector=r),s&&this.tree.setParent(s),this.item=o,"root"===this.item.item_type)this._rootDescendantsCount=this._sumUp(this.item.children);else{const t=this.tree.getRoot();t&&(this._rootDescendantsCount=t._rootDescendantsCount)}this.initProperties(),a||this._init(o)}static create(e,i,o,n,r){return Xs(this,null,(function*(){const s=new t(e,i,o,n,r,!0);return yield s._init(i),s}))}initItem(t){return"group"===t.item_type||"root"===t.item_type?this.initGroupItem(t):this.initLayerItem(t)}bringToFront(){}fit(){}getLayer(){return this.layer}getLegend(t){return Xs(this,null,(function*(){var e;const i=null==(e=this.layer)?void 0:e.id;if(void 0!==i){const e=this.connector;if(e){return[{layerId:i,legend:(yield e.get("render.legend_symbols",Ys({params:{id:this.item.resourceId},cache:!0},t))).map((({display_name:t,icon:e})=>({name:t,symbol:e})))}]}}return[]}))}getItemOptions(t){const e="layer"===t.item_type&&t.layer_transparency,i="number"==typeof e?(100-e)/100:void 0,o={visibility:!1,name:t.display_name,headers:this.options.headers,crossOrigin:this.options.crossOrigin,setViewDelay:this.options.setViewDelay,params:{resource:this.item.resourceId,item:this.item}};if(this.options.order){const e=String(this.options.drawOrderEnabled&&"draw_order_position"in t?this._rootDescendantsCount-t.draw_order_position:this.id).padStart(4,"0");o.order=Number((0|this.options.order)+"."+e)}if(this.options.popupOptions&&(o.popupOptions=this.options.popupOptions),"layer"===t.item_type){const{maxZoom:e,minZoom:i}=this._getZoomRange(t);Object.assign(o,{updateWmsParams:t.updateWmsParams,url:t.url,headers:this.options.headers,ratio:this.options.ratio,maxZoom:e,minZoom:i,minScale:t.layer_min_scale_denom,maxScale:t.layer_max_scale_denom,interactive:t.layer_identifiable})}return void 0!==i&&(o.opacity=i),o}getChildren(t){return[...t.children].reverse()}_mapScaleToZoomLevel(t){return Hs(t)}initGroupItem(t){if(t.children&&t.children.length){const e=this.getChildren(t);for(const t of e){const e=new this.constructor(this.webMap,t,this.options,this.connector,this);this.tree.addChild(e)}}return Promise.resolve()}initLayerItem(e){const i=this.getItemOptions(e),o=t=>{e._layer=t,this.layer=t;this.properties.get("visibility")&&this.properties.set("visibility",!0),void 0!==i.opacity&&this.webMap.setLayerOpacity(t,i.opacity)};let n;if("layer"===e.item_type)n=e.adapter||e.layer_adapter.toUpperCase();else if(t.GetAdapterFromLayerType[e.item_type]){n=(0,t.GetAdapterFromLayerType[e.item_type])(e,i,this.webMap,this.connector)}return n?this.webMap.addLayer(n,i).then((t=>{o(t)})):e._layer?Promise.resolve(o(e._layer)):Promise.reject("No layer added")}_getZoomRange(t){const e=this.options.minZoom,i=this.options.maxZoom,o=t.layer_min_scale_denom?this._mapScaleToZoomLevel(t.layer_min_scale_denom):void 0,n=t.layer_max_scale_denom?this._mapScaleToZoomLevel(t.layer_max_scale_denom):void 0,r=[e,o].filter(Boolean),s=[i,n].filter(Boolean);return{minZoom:r.length?Math.max(...r):void 0,maxZoom:s.length?Math.min(...s):void 0}}_init(t){this.initItem(t).then((()=>{this.emitter.emit("init")}))}_sumUp(t,e=0){for(const i of t)"layer"===i.item_type?(e+=1,i.draw_order_position=i.draw_order_position||e):"group"===i.item_type&&(e=this._sumUp(i.children,e));return e}};Qs($s,"GetAdapterFromLayerType",{}),Qs($s,"options",{properties:[{type:"boolean",name:"visibility",getProperty(t){if(t){if("group"===t.item.item_type||"root"===t.item.item_type)return Yo(t.item,(t=>"layer_enabled"in t&&t.layer_enabled),(t=>t.children));if("layer"===t.item.item_type)return t.item.layer_enabled}return!1},onSet(t,e,i){i&&"layer"===i.item.item_type&&(i.layer&&(t?i.webMap.showLayer(i.layer):i.webMap.hideLayer(i.layer)),i.item.layer_enabled=t)}},{name:"opacity",handler:class extends hn{getProperty(){const t=this.item.layer;return t&&t&&t.options&&void 0!==t.options.opacity?t.options.opacity:1}update(t,e){if(e=e||{},this.isGroup()){this._value=this._prepareValue(t,e);const i=this.getChildren();for(const o of i){const i=o.properties.property(this.name);i&&(e.propagation?i.set(t,e):i.update(i.get(),e))}}const i=this.item.layer;if(i){const e=this.getParents().reduce(((t,e)=>{const i=e.properties.property(this.name);return t*(i?i.getValue():1)}),1);this.item.webMap.setLayerOpacity(i,this._prepareValue(t*e))}}_prepareValue(t,e){return e&&e.propagation&&this.isGroup()?1:Number(t)}}}]});let ta=$s;var ea=Object.defineProperty,ia=Object.getOwnPropertySymbols,oa=Object.prototype.hasOwnProperty,na=Object.prototype.propertyIsEnumerable,ra=(t,e,i)=>e in t?ea(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,sa=(t,e)=>{for(var i in e||(e={}))oa.call(e,i)&&ra(t,i,e[i]);if(ia)for(var i of ia(e))na.call(e,i)&&ra(t,i,e[i]);return t},aa=(t,e,i)=>(ra(t,"symbol"!=typeof e?e+"":e,i),i),la=(t,e,i)=>new Promise(((o,n)=>{var r=t=>{try{a(i.next(t))}catch(e){n(e)}},s=t=>{try{a(i.throw(t))}catch(e){n(e)}},a=t=>t.done?o(t.value):Promise.resolve(t.value).then(r,s);a((i=i.apply(t,e)).next())}));function ha(t){return e=this,i=arguments,o=function*({webMap:t,connector:e,item:i,adapterOptions:o={},idPrefix:n="first-show-adapter"}){const r=function(t){return la(this,arguments,(function*({webMap:t,adapterOptions:e={},onLayerAdded:i,createAdapter:o}){return class{constructor(){aa(this,"options",{}),aa(this,"layer",[]),aa(this,"_removed",!1),aa(this,"_creatingInProgress",!1)}addLayer(){return this.layer}removeLayer(){this._removed=!0;for(const e of this.layer)t.removeLayer(e)}destroyed(){return this._removed}showLayer(){return la(this,null,(function*(){if(this.options.visibility=!0,this.layer.length)for(const e of this.layer)yield t.showLayer(e);else yield this.loadLayer()}))}hideLayer(){return la(this,null,(function*(){if(this.options.visibility=!1,this.layer)for(const e of this.layer)yield t.hideLayer(e)}))}loadLayer(){return la(this,null,(function*(){if(!this.layer.length&&!this._creatingInProgress){this._creatingInProgress=!0;const n=yield o(this);if(n){const o=new n(t.mapAdapter.map,sa({},e)),r=yield o.addLayer({order:this.options.order,headers:this.options.headers,baselayer:this.options.baselayer});i&&i(o),Object.assign(o.options,e),o.layer=r,this._removed&&t.removeLayer(o),this.layer.push(o),this.options.visibility&&(yield t.showLayer(o)),this._creatingInProgress=!1}}return this.layer}))}}}))}({webMap:t,adapterOptions:o,onLayerAdded:t=>{t.options.baselayer=!1,t.id=n+"-"+i.resource_id},createAdapter:()=>zs({resource:i.resource_id,adapterOptions:{name:i.display_name,opacity:i.opacity}},t,e)});return r},new Promise(((t,n)=>{var r=t=>{try{a(o.next(t))}catch(e){n(e)}},s=t=>{try{a(o.throw(t))}catch(e){n(e)}},a=e=>e.done?t(e.value):Promise.resolve(e.value).then(r,s);a((o=o.apply(e,i)).next())}));var e,i,o}var ca=Object.defineProperty,ua=Object.getOwnPropertySymbols,pa=Object.prototype.hasOwnProperty,da=Object.prototype.propertyIsEnumerable,fa=(t,e,i)=>e in t?ca(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,ma=(t,e)=>{for(var i in e||(e={}))pa.call(e,i)&&fa(t,i,e[i]);if(ua)for(var i of ua(e))da.call(e,i)&&fa(t,i,e[i]);return t},_a=(t,e,i)=>(fa(t,"symbol"!=typeof e?e+"":e,i),i),ya=(t,e,i)=>new Promise(((o,n)=>{var r=t=>{try{a(i.next(t))}catch(e){n(e)}},s=t=>{try{a(i.throw(t))}catch(e){n(e)}},a=t=>t.done?o(t.value):Promise.resolve(t.value).then(r,s);a((i=i.apply(t,e)).next())}));class ga{constructor(t,e){this.map=t,this.options=e,_a(this,"layer"),_a(this,"NgwWebmapItem",ta),_a(this,"pixelRadius",10),_a(this,"resourceId"),_a(this,"webmapClassName","webmap"),_a(this,"emitter",new i),_a(this,"_extent"),_a(this,"response"),_a(this,"_webmapLayersIds"),_a(this,"_webmapBaselayersIds",[]),_a(this,"_lastActiveBaselayer");const o=e.resourceId;if(Array.isArray(o)?(this.resourceId=o[0],this.options.id=o[1]):this.resourceId=o,!this.resourceId)throw new Error("NGW `resourceId` is not defined")}addLayer(t){return ya(this,null,(function*(){var e,i;this.options=ma(ma({},this.options),t),this.layer=yield this._getWebMapLayerItem();const o=null==(i=null==(e=this.response)?void 0:e.webmap)?void 0:i.extent_constrained;return this.options.useExtentConstrained&&this._extent&&o&&this.options.webMap.setView({maxBounds:this._extent}),this.layer}))}removeLayer(){const t=this.options.webMap.mapAdapter;if(this.getDependLayers().forEach((e=>{"layer"in e&&t.removeLayer(e.layer.layer)})),this._webmapBaselayersIds.length){for(const t of this._webmapBaselayersIds)this.options.webMap.removeLayer(t);this._lastActiveBaselayer&&this.options.webMap.showLayer(this._lastActiveBaselayer)}this.options.useExtentConstrained&&this._extent&&this.options.webMap.setView({maxBounds:null}),delete this.layer,delete this.response,delete this._webmapLayersIds}showLayer(){return ya(this,null,(function*(){if(this.layer&&this.layer.properties)return this.layer.properties.property("visibility").set(!0)}))}hideLayer(){return ya(this,null,(function*(){if(this.layer&&this.layer.properties)return this.layer.properties.property("visibility").set(!1)}))}setOpacity(t){return ya(this,null,(function*(){if(this.layer&&this.layer.properties)return this.layer.properties.property("opacity").set(t)}))}getExtent(){return this.getBounds()}getBounds(){const t=this.response&&this.response.webmap;if(t)return Hn(t)}getDependLayers(){return this.layer&&this.layer.tree.getDescendants()||[]}getBookmarksResourceId(){const t=this.response&&this.response.webmap;if(t)return t.bookmark_resource.id}fetchBookmarks(){const t=this.getBookmarksResourceId(),e=this.options.connector;if(t)return e.getResourceOrFail(t).then((i=>{var o;const n=null==(o=i.feature_layer)?void 0:o.fields.find((t=>t.label_field)),r=n&&n.keyname;return Fr({connector:e,resourceId:t,geom:!1,fields:r?[r]:void 0}).then((i=>{const o=[];for(const n of i){const i=new Ko({item:n,resourceId:t,labelField:r,connector:e});o.push(i)}return o}))}));throw new Error("Webmap was not loaded correctly, it is impossible to extract bookmarks")}getLegend(){return ya(this,null,(function*(){const t=[];let e=this.getDependLayers();e=e.sort(((t,e)=>e.id-t.id));for(const i of e){const e=yield i.getLegend();t.push(...e)}return t}))}getIdentificationIds(){return ya(this,null,(function*(){const t=[];let e=this._webmapLayersIds;if(e||(e=yield this._getWebMapIds(),this._webmapLayersIds=e),e&&e.length){let e=this.getDependLayers();e=e.sort(((t,e)=>e.id-t.id)),e.forEach((e=>{const i=e.item,o=i.parentId;if(void 0!==o&&"layer"===i.item_type&&i.layer_identifiable){const i=e.properties.property("visibility");i.get()&&!i.isBlocked()&&t.push(o)}}))}return t}))}_getWebMapLayerItem(){return ya(this,null,(function*(){if(this.resourceId){const t=yield this.getWebMapConfig(this.resourceId);if(t&&t.root_item)return new Promise((e=>{const i={};if(this.options.connector&&this.options.connector.options.auth){const t=this.options.connector.getAuthorizationHeaders();t&&(i.headers=t)}i.setViewDelay=this.options.setViewDelay,i.order=this.options.order,i.ratio=this.options.ratio,i.crossOrigin=this.options.crossOrigin,i.minZoom=this.options.minZoom,i.maxZoom=this.options.maxZoom,i.drawOrderEnabled=t.draw_order_enabled,i.popupOptions=this.options.popupOptions;const o=new this.NgwWebmapItem(this.options.webMap,t.root_item,i,this.options.connector);o.emitter.on("init",(()=>e(o)))}))}}))}getWebMapConfig(t){return ya(this,null,(function*(){const e=yield this.options.connector.getResource(t);if(e){this.response=e;const t=e[this.webmapClassName];if(this._setupBaselayers(e),t)return this._extent=[t.extent_left,t.extent_bottom,t.extent_right,t.extent_top],this._updateItemsParams(t.root_item,this.options.webMap,e),t}}))}_setupBaselayers(t){var e;const i=this.options.webMap;if(null==(e=this.options.useBasemap)||e)if(t.basemap_webmap&&t.basemap_webmap.basemaps.length){const e=i.getActiveBaseLayer();this._lastActiveBaselayer=e?e.id:void 0,this._setBasemaps(t.basemap_webmap)}else this.options.defaultBasemap&&i.addBaseLayer("OSM",{id:"webmap-default-baselayer",name:"OpenStreetMap"})}_setBasemaps(t){const e=this.options.webMap;let i=!1;for(const o of t.basemaps)ha({webMap:e,connector:this.options.connector,item:o,adapterOptions:{crossOrigin:this.options.crossOrigin}}).then((t=>{const n=!i&&o.enabled;return o.enabled&&(i=!0),e.addBaseLayer(t,{id:"webmap-baselayer"+o.resource_id,name:o.display_name,opacity:o.opacity,visibility:n}).then((t=>{t.id&&this._webmapBaselayersIds.push(t.id)}))}))}_updateItemsParams(t,e,i){if(t)if("group"===t.item_type||"root"===t.item_type)t.children&&(t.children=t.children.map((t=>this._updateItemsParams(t,e,i)))),"root"===t.item_type&&(t.display_name=i.resource.display_name);else if("layer"===t.item_type){const i=k(this.options.connector.options.baseUrl+"/api/component/render/image"),o=t.layer_style_id;t.url=i,t.resourceId=o,t.updateWmsParams=t=>Fs(t,o);const n=ls({options:{adapter:t.layer_adapter.toUpperCase(),resource:o},webMap:e,baseUrl:this.options.connector.options.baseUrl||""});t=ma(ma({},t),n)}return t}_getWebMapIds(){return ya(this,null,(function*(){const t=this.layer;if(t&&"root"===t.item.item_type){const e=t.tree.getDescendants(),i=[];for(const t of e){const e=t.item;if("layer"===e.item_type){const t=this.options.connector.getResource(e.layer_style_id).then((t=>{if(t){const i=Number(t.resource.parent.id);return e.parentId=i,i}}));i.push(t)}}return(yield Promise.all(i)).filter((t=>void 0!==t))}}))}}var va=Object.defineProperty,ba=Object.getOwnPropertySymbols,wa=Object.prototype.hasOwnProperty,xa=Object.prototype.propertyIsEnumerable,La=(t,e,i)=>e in t?va(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Pa=(t,e)=>{for(var i in e||(e={}))wa.call(e,i)&&La(t,i,e[i]);if(ba)for(var i of ba(e))xa.call(e,i)&&La(t,i,e[i]);return t},Oa=(t,e,i)=>(La(t,"symbol"!=typeof e?e+"":e,i),i);class Ma{constructor(t){if(this.options=t,Oa(this,"url"),Oa(this,"connector"),Oa(this,"webMap"),this.options.connector)this.url=this.options.connector.options.baseUrl||"",this.connector=this.options.connector;else{if(!this.options.baseUrl)throw new Error("url is not defined");this.url=this.options.baseUrl,this.connector=new vo({baseUrl:this.url,auth:this.options.auth})}}static addClassAdapters(t,e){Ts[t]=e}onLoadSync(t){return e=this,i=null,o=function*(){if(this.options.resourceId&&this.url){const e=[this.options.resourceId];if(e.length)for(const i of e){const e={resourceId:i,connector:this.connector,webMap:t};return yield t.addLayer(ga,Pa({visibility:!0,fit:!0,pixelRadius:this.options.pixelRadius},e))}}},new Promise(((t,n)=>{var r=t=>{try{a(o.next(t))}catch(e){n(e)}},s=t=>{try{a(o.throw(t))}catch(e){n(e)}},a=e=>e.done?t(e.value):Promise.resolve(e.value).then(r,s);a((o=o.apply(e,i)).next())}));var e,i,o}getLayerAdapters(){return Promise.resolve([this._getLayerAdapter()])}_getLayerAdapter(){return{name:"WEBMAP",createAdapter:t=>Promise.resolve(this._createAdapter(t))}}_createAdapter(t){return e={webMap:t,connector:this.connector,baseUrl:this.url},class extends ga{constructor(t,i){super(t,i=Ds(Ds({},e),i))}};var e}}var Ca=Object.defineProperty,ka=Object.getOwnPropertySymbols,Ea=Object.prototype.hasOwnProperty,Aa=Object.prototype.propertyIsEnumerable,Ta=(t,e,i)=>e in t?Ca(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Ia=(t,e,i)=>(Ta(t,"symbol"!=typeof e?e+"":e,i),i);class Sa{constructor(t){Ia(this,"id"),Ia(this,"label"),Ia(this,"layerId"),Ia(this,"parent"),Ia(this,"fields"),Ia(this,"geom"),Ia(this,"extensions"),Ia(this,"connector"),Ia(this,"_item"),Ia(this,"_geojson"),Ia(this,"_resource"),Ia(this,"_extent");const e=t.feature;this.id=e.id,this.geom=e.geom,this.label=e.label,this.parent=e.parent,this.fields=e.fields,this.layerId=e.layerId,this.connector=t.connector}identify(t={}){return this._item?ki.resolve(this._item):Vo(((t,e)=>{for(var i in e||(e={}))Ea.call(e,i)&&Ta(t,i,e[i]);if(ka)for(var i of ka(e))Aa.call(e,i)&&Ta(t,i,e[i]);return t})({connector:this.connector,featureId:this.id,resourceId:this.layerId,fields:null,extensions:["attachment","description"]},t)).then((t=>(this._item=t,this.geom=t.geom,this.extensions=t.extensions,t)))}resource(){return this._resource?ki.resolve(this._resource.feature_layer):this.connector.getResource(this.layerId).then((t=>(this._resource=t,this._resource.feature_layer)))}getBounds(){return this._extent?ki.resolve(this._extent):function({resourceId:t,featureId:e,connector:i,cache:o=!0}){return i.get("feature_layer.feature.item_extent",{cache:o},{id:t,fid:e}).then((t=>{if(t){const{maxLat:e,maxLon:i,minLat:o,minLon:n}=t.extent;return[n,o,i,e]}}))}({connector:this.connector,featureId:this.id,resourceId:this.layerId})}geojson(){return this._geojson?ki.resolve(this._geojson):this.identify().then((t=>t.toGeojson().then((t=>(this._geojson=t,t)))))}}function za(t){return Vo(t).then((t=>Ao(t)))}var ja=Object.defineProperty,Ba=Object.defineProperties,Za=Object.getOwnPropertyDescriptors,Na=Object.getOwnPropertySymbols,Ra=Object.prototype.hasOwnProperty,Da=Object.prototype.propertyIsEnumerable,Fa=(t,e,i)=>e in t?ja(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Ua=(t,e)=>{for(var i in e||(e={}))Ra.call(e,i)&&Fa(t,i,e[i]);if(Na)for(var i of Na(e))Da.call(e,i)&&Fa(t,i,e[i]);return t},Wa=(t,e)=>Ba(t,Za(e));function Ha(t,e=!1){const i=[],o=[];for(const r in t){const t=Number(r);isNaN(t)||i.push(t)}const n=t.resources;n&&i.sort(((t,e)=>n.indexOf(t)-n.indexOf(e)));for(let r=0;r<i.length;r++){const n=i[r],s=t[n];if("features"in s){const t=qa(s.features,Number(n),e);if(t.length&&(o.push(...t),!e))break}}return o}function qa(t,e,i){const o=[];for(const n of t){if(o.push({featureId:n.id,resourceId:e,feature:n}),!i)break}return o}function Va(t){const{geom:e,signal:i,cache:o,layers:n}=t,r="string"==typeof e?e:function(t){const e=function(t){var e;if(Array.isArray(t))return t;if("Feature"===t.type)return null==(e=t.geometry)?void 0:e.coordinates[0];if("Polygon"===t.type)return t.coordinates[0];return null}(t);if(!e)return null;return`POLYGON((${e.map((([t,e])=>{const[i,o]=x(t,e);return`${i} ${o}`})).join(",")}))`}(e);if(!r)throw new Error("Not valid geometry format to make intersection");return t.connector.post("feature_layer.identify",{data:{geom:r,srs:3857,layers:n},signal:i,cache:o})}function Ga(t,e){m(t);const[i,o]=t.lngLat,{geom:n,radius:r,signal:s,cache:a}=e,l=null!=n?n:function(t,e,i=10,o=6){const n=i/y*w,r=n/Math.cos(e*b),s=[];for(let a=0;a<o+1;a++){const i=Math.PI*(a/(o/2)),l=t+r*Math.cos(i),h=e+n*Math.sin(i);s.push([l,h])}return s}(i,o,r);return Va(Wa(Ua({},e),{geom:l,signal:s,cache:a}))}function Ja(t,e){return i=this,o=null,n=function*(){var i;const o=yield t.get("pyramid.settings",null,{component:"pyramid"});if(o&&o.company_logo&&o.company_logo.enabled){const r=document.createElement("a");r.style.position="absolute",r.style.bottom="0",r.style.right="0",r.style.padding=null!=(i=null==e?void 0:e.padding)?i:"10px",r.className="ngw-map-logo",e&&e.cssClass&&(r.className+=" "+e.cssClass);const s=new Image;s.style.maxHeight="100px",s.style.maxWidth="100px",s.src="";try{const e=yield t.get("pyramid.company_logo",{responseType:"blob"}),i=(window.URL||window.webkitURL).createObjectURL(e);s.src=i}catch(n){console.warn(n)}return null!==o.company_logo.link&&""!==o.company_logo.link.trim()&&(r.href=o.company_logo.link,r.target="_blank",-1!==o.company_logo.link.search(/:\/\/nextgis/)&&(s.alt="Get your own Web GIS at nextgis.com")),r.appendChild(s),r}},new Promise(((t,e)=>{var r=t=>{try{a(n.next(t))}catch(i){e(i)}},s=t=>{try{a(n.throw(t))}catch(i){e(i)}},a=e=>e.done?t(e.value):Promise.resolve(e.value).then(r,s);a((n=n.apply(i,o)).next())}));var i,o,n}var Ka=Object.defineProperty,Ya=(t,e,i)=>(((t,e,i)=>{e in t?Ka(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i})(t,"symbol"!=typeof e?e+"":e,i),i);class Qa{constructor(){Ya(this,"backspace",8),Ya(this,"tab",9),Ya(this,"enter",13),Ya(this,"shift",16),Ya(this,"ctrl",17),Ya(this,"alt",18),Ya(this,"pause/break",19),Ya(this,"caps_lock",20),Ya(this,"escape",27),Ya(this,"page_up",33),Ya(this,"page_down",34),Ya(this,"end",35),Ya(this,"home",36),Ya(this,"left_arrow",37),Ya(this,"up_arrow",38),Ya(this,"right_arrow",39),Ya(this,"down_arrow",40),Ya(this,"insert",45),Ya(this,"delete",46),Ya(this,"left_window_key",91),Ya(this,"right_window_key",92),Ya(this,"select_key",93),Ya(this,"numpad_0",96),Ya(this,"numpad_1",97),Ya(this,"numpad_2",98),Ya(this,"numpad_3",99),Ya(this,"numpad_4",100),Ya(this,"numpad_5",101),Ya(this,"numpad_6",102),Ya(this,"numpad_7",103),Ya(this,"numpad_8",104),Ya(this,"numpad_9",105),Ya(this,"multiply",106),Ya(this,"add",107),Ya(this,"subtract",109),Ya(this,"decimal_point",110),Ya(this,"divide",111),Ya(this,"f1",112),Ya(this,"f2",113),Ya(this,"f3",114),Ya(this,"f4",115),Ya(this,"f5",116),Ya(this,"f6",117),Ya(this,"f7",118),Ya(this,"f8",119),Ya(this,"f9",120),Ya(this,"f10",121),Ya(this,"f11",122),Ya(this,"f12",123),Ya(this,"num_lock",144),Ya(this,"scroll_lock",145),Ya(this,"semi-colon",186),Ya(this,"equal_sign",187),Ya(this,",",188),Ya(this,"-",189),Ya(this,".",190),Ya(this,"/",191),Ya(this,"`",192),Ya(this,"[",219),Ya(this,"\\",220),Ya(this,"]",221),Ya(this,"'",222)}}var Xa=Object.defineProperty,$a=(t,e,i)=>(((t,e,i)=>{e in t?Xa(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i})(t,"symbol"!=typeof e?e+"":e,i),i);var tl=Object.defineProperty,el=(t,e,i)=>(((t,e,i)=>{e in t?tl(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i})(t,"symbol"!=typeof e?e+"":e,i),i);class il{constructor(t,e){this.webMap=t,el(this,"name"),el(this,"event"),el(this,"value"),e&&(e.value&&this.setValue(e.value),e.name&&(this.name=e.name),e.event&&(this.event=e.event))}getValue(){return this.value}setValue(t){this.value=t}}var ol=Object.defineProperty,nl=(t,e,i)=>(((t,e,i)=>{e in t?ol(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i})(t,"symbol"!=typeof e?e+"":e,i),i);class rl extends il{constructor(){super(...arguments),nl(this,"name","center"),nl(this,"event","moveend")}getValue(){return this.webMap.getCenter()}setValue(t){this.webMap.setCenter(t)}toString(t){const e=t.map((t=>t.toFixed(5)));return e[0]+"_"+e[1]}parse(t){return t.split("_").map(Number)}}var sl=Object.defineProperty,al=(t,e,i)=>(((t,e,i)=>{e in t?sl(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i})(t,"symbol"!=typeof e?e+"":e,i),i);class ll extends il{constructor(){super(...arguments),al(this,"name","zoom"),al(this,"event","zoomend")}getValue(){const t=this.webMap.getZoom();return void 0!==t?Math.round(t):void 0}setValue(t){this.webMap.setZoom(t)}toString(t){return String(t)}parse(t){return Number(t)}}var hl=Object.defineProperty,cl=(t,e,i)=>(((t,e,i)=>{e in t?hl(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i})(t,"symbol"!=typeof e?e+"":e,i),i),ul=(t,e,i)=>new Promise(((o,n)=>{var r=t=>{try{a(i.next(t))}catch(e){n(e)}},s=t=>{try{a(i.throw(t))}catch(e){n(e)}},a=t=>t.done?o(t.value):Promise.resolve(t.value).then(r,s);a((i=i.apply(t,e)).next())}));let pl=0;const dl={minZoom:0,maxZoom:22,paint:{color:"#0000ff",opacity:.4,strokeOpacity:1,stroke:!0,radius:8,weight:1},selectedPaint:{color:"#00008b",opacity:.4,strokeOpacity:1,stroke:!0,radius:12,weight:1},create:!0},fl=class t{constructor(e){cl(this,"options",dl),cl(this,"emitter",new i),cl(this,"keys",t.keys),cl(this,"mapAdapter"),cl(this,"runtimeParams",[]),cl(this,"getPaintFunctions",t.getPaintFunctions),cl(this,"mapState",[rl,ll]),cl(this,"id",pl++),cl(this,"_initMapState",{}),cl(this,"_starterKits"),cl(this,"_mapState",[]),cl(this,"_extent"),cl(this,"_eventsStatus",{}),cl(this,"_coordFromMapClickPromise"),cl(this,"_mapEvents",{}),this.mapAdapter=e.mapAdapter,this._starterKits=e.starterKits||[],e&&(this.options=f(dl||{},e)),this.options.runtimeParams&&(this.runtimeParams=this.options.runtimeParams),this._addEventsListeners(),this.options.tileJson&&this._setTileJsonOptions(this.options.tileJson),this.options.create&&this.create()}getId(){return this.id}create(){return ul(this,null,(function*(){return this.getEventStatus("create")||(yield this._setInitMapState(this.mapState),yield this._setupMap(),this._emitStatusEvent("create",this)),this}))}setRuntimeParams(t){this.runtimeParams.push(t)}destroy(){this._removeEventListeners(),function(t){for(const e in t)delete t[e]}(this._emitStatusEvent),this.mapAdapter.destroy&&this.mapAdapter.destroy()}getState(){const t={};return this._mapState.forEach((e=>{t[e.name]=e.getValue()})),t}getRuntimeParams(){const t={};return this._mapState.forEach((e=>{for(const i of this.runtimeParams){const o=i.get(e.name);if(void 0!==o){t[e.name]=e.parse(o);break}}})),t}getContainer(){if(this.mapAdapter.getContainer)return this.mapAdapter.getContainer();if(this.options.target){if(this.options.target instanceof HTMLElement)return this.options.target;if("string"==typeof this.options.target){const t=document.getElementById(this.options.target);if(t)return t}}}setCursor(t){this.mapAdapter.setCursor&&this.mapAdapter.setCursor(t)}getCursor(){if(this.mapAdapter.getCursor)return this.mapAdapter.getCursor();const t=this.getContainer();return t?t.style.cursor:void 0}setCenter(t){return this.mapAdapter.setCenter(t),this}getCenter(){return this.mapAdapter.getCenter()}getBounds(){if(this.mapAdapter.getBounds)return this.mapAdapter.getBounds()}getBoundsPolygon(){const t=this.getBounds();if(t){return{type:"Feature",properties:{},geometry:g(t)}}}setZoom(t){return this.mapAdapter.setZoom(t),this}getZoom(){const t=this.mapAdapter.getZoom();if("number"==typeof t)return t}zoomIn(){if(this.mapAdapter.zoomIn)this.mapAdapter.zoomIn();else{const t=this.getZoom();if(void 0!==t){this.setZoom(t+1)}}}zoomOut(){if(this.mapAdapter.zoomOut)this.mapAdapter.zoomOut();else{const t=this.getZoom();if(void 0!==t){this.setZoom(t-1)}}}setView(t,e){if(Array.isArray(t)){const i=t;this.mapAdapter.setView&&i&&p(e)?this.mapAdapter.setView(i,e):(i&&this.mapAdapter.setCenter(i),p(e)&&this.mapAdapter.setZoom(e))}else{this.mapAdapter.setView&&this.mapAdapter.setView(t)}}fitBounds(t,e){return t.every((t=>p(t)))&&(t[1]<-85.06&&(t[1]=-85.06),t[3]>85.06&&(t[3]=85.06),this.mapAdapter.fitBounds(t,e)),this}getEventStatus(t){const e=this._eventsStatus[t];return null!=e&&e}onLoad(t="create"){return new Promise((e=>{this.getEventStatus(t)?e(this):this.emitter.once(t,(()=>{e(this)}))}))}onMapLoad(t){return new Promise((e=>{var i;const o=()=>{const i=this.mapAdapter;t&&t(i),i&&e(i)},n=null==(i=this.mapAdapter.isLoaded)||i;this.mapAdapter.map&&n?o():this.mapAdapter.emitter.once("create",(()=>{o()}))}))}getLayerAdapters(){return this.mapAdapter.layerAdapters}getLayerAdapter(t){return this.mapAdapter.layerAdapters[t]}locate(t,e){if(this.mapAdapter&&this.mapAdapter.locate)return this.mapAdapter.locate(t,e);return{stop:()=>({})}}stopGetCoordFromMapClick(){this._coordFromMapClickPromise&&this._coordFromMapClickPromise.cancel()}getCoordFromMapClick(){return this._coordFromMapClickPromise?this.getCoordFromMapClick():(this._coordFromMapClickPromise=new ki(((t,e,i)=>{const o=this.getCursor()||"grab";this._removeEventListeners({include:["click"]}),this.setCursor("crosshair");const n=()=>{this.setCursor(o),this._addEventsListeners({include:["click"]}),this.mapAdapter.emitter.off("click",r),this._coordFromMapClickPromise=void 0},r=e=>{n(),m(e),t(e.lngLat)};this.mapAdapter.emitter.once("click",r),i(n)})),this._coordFromMapClickPromise)}_emitStatusEvent(t,e){const i=t;this._eventsStatus[i]=!0,this.emitter.emit(i,e)}_addLayerProviders(){return ul(this,null,(function*(){}))}_onLoadSync(){return ul(this,null,(function*(){}))}_setupMap(){return ul(this,null,(function*(){if(!this.mapAdapter)throw new Error("WebMap `mapAdapter` option is not set");return yield this.mapAdapter.create(this.options),this._zoomToInitialExtent(),yield this._addLayerProviders(),yield this._onLoadSync(),this._emitStatusEvent("build-map",this.mapAdapter),this}))}_setTileJsonOptions(t){t.center&&(this.options.center=t.center),t.bounds&&(this.options.bounds=t.bounds),p(t.maxzoom)&&(this.options.zoom=t.maxzoom),p(t.minzoom)&&(this.options.zoom=t.minzoom),p(t.maxzoom)&&p(t.minzoom)&&(this.options.zoom=(t.maxzoom+t.minzoom)/2)}_zoomToInitialExtent(){const{center:t,zoom:e,bounds:i}=this.options;this._extent?this.fitBounds(this._extent):t&&e?this.setView(t,e):i&&this.fitBounds(i)}_setInitMapState(t){for(const e of t){const t=new e(this);this._mapState.push(t);for(const e of this.runtimeParams){const i=e.get(t.name);if(void 0!==i){const e=t.parse(i);this._initMapState[t.name]=e,Object.defineProperty(this.options,t.name,{value:e,configurable:!0,enumerable:!0});break}}}}_addEventsListeners(t){let e=["preclick","click","zoomstart","zoom","zoomend","movestart","move","moveend","mousemove","mouseout","mouseover"];t&&t.include&&(e=e.filter((e=>t.include.includes(e)))),e.forEach((t=>{this._mapEvents[t]=e=>{if(this.runtimeParams.length){const e=this._mapState.find((e=>e.event===t));if(e){const t=e.toString(e.getValue());this.runtimeParams.forEach((i=>{i.set(e.name,t)}))}}this._eventsStatus&&this.emitter.emit(t,e)};const e=this._mapEvents[t];e&&this.mapAdapter.emitter.on(t,e)}))}_removeEventListeners(t){let e=Object.entries(this._mapEvents);t&&t.include&&(e=e.filter((e=>t.include.includes(e[0])))),e.forEach((([t,e])=>{e&&this.mapAdapter.emitter.removeListener(t,e)}))}};cl(fl,"keys",new class{constructor(){$a(this,"keyCodeAlias",new Qa),$a(this,"keys",{}),$a(this,"_windowOnFocus"),$a(this,"_keysPressed"),$a(this,"_keysReleased"),this._windowOnFocus=this.windowOnFocus.bind(this),this._keysPressed=this.keysPressed.bind(this),this._keysReleased=this.keysReleased.bind(this),this.addKeyboardEventsListener()}pressed(t){const e=this.keyCodeAlias[t];return!!e&&this.keys[e]}addKeyboardEventsListener(){"undefined"!=typeof window&&(window.addEventListener("focus",this._windowOnFocus,!1),window.addEventListener("keydown",this._keysPressed,!1),window.addEventListener("keyup",this._keysReleased,!1))}removeKeyboardEventsListener(){"undefined"!=typeof window&&(window.removeEventListener("focus",this._windowOnFocus,!1),window.removeEventListener("keydown",this._keysPressed,!1),window.removeEventListener("keyup",this._keysReleased,!1))}keysPressed(t){t.stopPropagation(),this.keys[t.keyCode]||(this.keys[t.keyCode]=!0)}keysReleased(t){t.stopPropagation(),this.keys[t.keyCode]=!1}windowOnFocus(){this.keys={}}}),cl(fl,"getPaintFunctions");let ml=fl;function _l(t){const e={};for(let o=0;o<t.length;o++)e[t[o]]=1+(e[t[o]]||0);let i;for(const o in e){e[o]>((void 0!==i?e[i]:0)||0)&&(i=o)}return i}const yl={polygon:"path",line:"path",point:"circle"},gl={Point:"point",LineString:"line",MultiPoint:"point",Polygon:"polygon",MultiLineString:"line",MultiPolygon:"polygon"};function vl(t){if(t.data){const e=gl[function(t){let e;e="FeatureCollection"===t.type?_l(t.features.map((t=>t.geometry.type))):"GeometryCollection"===t.type?_l(t.geometries.map((t=>t.type))):"Feature"===t.type?t.geometry.type:t.type;return e}(t.data)],i=t.paint;i&&tt(i)&&(i.type=i.type?i.type:"polygon"===e||"line"===e?"path":"html"in i||"className"in i?"icon":yl[e]),t.type=t.type||e}return t}var bl=Object.defineProperty,wl=Object.defineProperties,xl=Object.getOwnPropertyDescriptors,Ll=Object.getOwnPropertySymbols,Pl=Object.prototype.hasOwnProperty,Ol=Object.prototype.propertyIsEnumerable,Ml=(t,e,i)=>e in t?bl(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Cl=(t,e)=>{for(var i in e||(e={}))Pl.call(e,i)&&Ml(t,i,e[i]);if(Ll)for(var i of Ll(e))Ol.call(e,i)&&Ml(t,i,e[i]);return t},kl=(t,e)=>wl(t,xl(e)),El=(t,e,i)=>(Ml(t,"symbol"!=typeof e?e+"":e,i),i),Al=(t,e,i)=>new Promise(((o,n)=>{var r=t=>{try{a(i.next(t))}catch(e){n(e)}},s=t=>{try{a(i.throw(t))}catch(e){n(e)}},a=t=>t.done?o(t.value):Promise.resolve(t.value).then(r,s);a((i=i.apply(t,e)).next())}));class Tl extends ml{constructor(t){super(t),El(this,"_layersIdCounter",1),El(this,"_layersOrderCounter",1),El(this,"_baselayers",[]),El(this,"_layers",{}),El(this,"_selectedLayers",[]);const e=this.options.tileJson;e&&this.emitter.once("build-map",(()=>this.addTileJsonLayer(e)))}fitLayer(t,e){return Al(this,null,(function*(){const i=this.getLayer(t),o=i&&(i.getBounds||i.getExtent);if(o){const t=yield o.call(i);t&&this.fitBounds(t,e)}}))}isBaseLayer(t){const e=this.getLayer(t);if(e&&e.id)return-1!==this._baselayers.indexOf(e.id)}getBaseLayers(){const t=[];return this._baselayers.forEach((e=>{const i=this._layers[e];i&&t.push(i)})),t}getBaseLayersIds(){return this._baselayers}getLayer(t){return"string"==typeof t?this._layers[t]:t}getLayerId(t){const e=this.getLayer(t);if(e){if(e.id)return null==e?void 0:e.id;if(e&&e.options)return e.options.id}throw new Error("No id for layer")}getLayers(){return Object.keys(this._layers)}allLayers(){return this._layers}orderedLayers(){return Object.values(this._layers).sort(((t,e)=>t.order&&e.order?t.order-e.order:0))}findLayer(t){for(const e in this._layers){const i=this._layers[e];if(t(i))return i}}isLayerVisible(t){const e=this.getLayer(t);return!(!e||void 0===e.options.visibility)&&e.options.visibility}addBaseLayer(t,e){return Al(this,null,(function*(){return yield this.addLayer(t,kl(Cl({},e),{baselayer:!0}),void 0)}))}addLayer(t){return Al(this,arguments,(function*(t,e={},i){var o,n;const r=this._layersIdCounter++,s=p(i)?i:void 0!==e.order?e.order:this.reserveOrder();let a;"string"==typeof t?a=this.getLayerAdapter(t):"function"==typeof t?a=t:"then"in t&&(a=yield t);const l=e;this._updateGeoJsonOptions(l);const h=null==(o=(e=Cl({id:String(r),order:s},e)).visibility)||o;if(e.visibility=!1,e.baselayer&&(e.order=0),this.options.onBeforeAddLayer){const t=this.options.onBeforeAddLayer({options:e,adapter:a});t&&(t.options&&(e=t.options),t.adapter&&(a=t.adapter))}if(void 0!==a){const t=new a(this.mapAdapter.map,e);let i;t.options=Cl(Cl({},e),t.options),t.options.baselayer&&(e.baselayer=!0,e.order=0,t.options.order=0),t.options.id&&(i=String(t.options.id),this._layers[i]=t),this._emitLayerEvent("layer:preadd",i||"",t),yield this.onMapLoad(),t.map=this.mapAdapter.map;const o=yield t.addLayer(t.options);if(t.layer=o,t.id=t.options.id||String(r),t.options.id=t.id,e.baselayer&&(t.options.order=0),t.order=null!=(n=t.options.order)?n:s,i&&delete this._layers[i],i=String(t.id),this._layers[i])throw Error(`layer with id '${i}' already exist`);i&&(this._layers[i]=t,l.filter&&this.filterLayer(t,l.filter),e.baselayer&&this._baselayers.push(i),h&&(yield this.showLayer(i)));const c=e.opacity;void 0!==c&&c<=1&&this.setLayerOpacity(t,c);const u=o&&(t.getBounds||t.getExtent);if(e.fit&&u){const e=yield u.call(t);e&&(yield this.fitBounds(e))}return e.onAdded&&e.onAdded(t),this._emitLayerEvent("layer:add",i,t),t}return Promise.reject("No adapter")}))}addLayerFromAsyncAdapter(t,e,i){return Al(this,null,(function*(){const o=i||void 0!==e.order?e.order:this.reserveOrder(),n=t(),r=yield n;return r?this.addLayer(r,e,o):Promise.reject("No adapter")}))}removeLayers(t){for(const e in this._layers){let i=!0;t&&(i=t(e,this._layers[e])),i&&(this.removeLayer(e),delete this._layers[e])}}getLegend(t){return Al(this,null,(function*(){const e=[];for(const i of this.orderedLayers())i.getLegend&&e.push(i.getLegend(t));return(yield Promise.all(e)).flat()}))}reserveOrder(){return this._layersOrderCounter++}removeOverlays(){this.removeLayers(((t,e)=>!(e&&e.options&&e.options.baselayer)))}removeLayer(t){const e=this.getLayer(t),i=e&&this.getLayerId(e);if(e&&i){if(this.emitter.emit("layer:preremove",e),e.beforeRemove&&e.beforeRemove(),e.removeLayer?e.removeLayer():this.mapAdapter.removeLayer(e.layer),e.options&&e.options.baselayer){const t=this._baselayers.indexOf(i);t&&this._baselayers.splice(t,1)}delete this._layers[i],this.emitter.emit("layer:remove",e)}}addGeoJsonLayer(t={},e){return(t=t||{}).multiselect=void 0!==t.multiselect&&t.multiselect,t.unselectOnSecondClick=void 0===t.unselectOnSecondClick||t.unselectOnSecondClick,e||(t=vl(t)),t.paint=t.paint||{},this.addLayer(e||"GEOJSON",t)}addFeatureLayer(t={}){return this.addGeoJsonLayer(t)}addTileLayer(t,e={}){return this.addLayer("TILE",kl(Cl({},e),{url:t}))}addImageLayer(t,e){let i;return"string"==typeof t?i=t:(i=t.url,e=t),this.addLayer("IMAGE",kl(Cl({},e),{url:i}))}showLayer(t,e={}){return this.toggleLayer(t,!0,e)}hideLayer(t,e={}){return this.toggleLayer(t,!1,e)}toggleLayer(t,e,i={}){const o=this.getLayer(t),n=void 0!==e?e:!(o&&o.options.visibility),r=void 0!==i.silent&&i.silent,s=t=>Al(this,null,(function*(){const e=String(t.id),i=n?"layer:show":"layer:hide";if(r||(this._emitLayerEvent(n?"layer:preshow":"layer:prehide",e,t),this._emitLayerEvent("layer:pretoggle",e,t)),n&&this.mapAdapter){const e=t.options.baselayer?0:t.options.order;if(t.options.baselayer&&this._baselayers.length){const e=this._baselayers.filter((e=>e!==t.id&&this.isLayerVisible(e)));for(const t of e)yield this.hideLayer(t)}t.showLayer?yield t.showLayer.call(t,t.layer):void 0!==t.layer&&(yield this.mapAdapter.showLayer(t.layer)),void 0!==e&&this.mapAdapter.setLayerOrder(t.layer,e,this._layers)}else t.hideLayer?yield t.hideLayer.call(t,t.layer):void 0!==t.layer&&(yield this.mapAdapter.hideLayer(t.layer));t.options.visibility=n,r||(this._emitLayerEvent(i,e,t),this._emitLayerEvent("layer:toggle",e,t))}));return o?this.onMapLoad().then((()=>s(o))):Promise.resolve()}updateLayer(t){const e=this.getLayer(t);if(e){if(e.updateLayer)return Promise.resolve(e.updateLayer());if(this.isLayerVisible(e))return this.hideLayer(e,{silent:!0}).then((()=>this.showLayer(e,{silent:!0})))}return Promise.resolve()}setLayerOpacity(t,e){const i=this.getLayer(t);i&&(i.setOpacity?i.setOpacity(e):this.mapAdapter.setLayerOpacity&&this.mapAdapter.setLayerOpacity(i.layer,e))}isLayerLabelVisible(t){var e;const i=this.getLayer(t);return i.isLabelVisible?i.isLabelVisible():null==(e=i.options.labelVisibility)||e}showLayerLabel(t){this.toggleLayerLabel(t,!0)}hideLayerLabel(t){this.toggleLayerLabel(t,!1)}toggleLayerLabel(t,e){const i=this.getLayer(t);return e=null!=e?e:!this.isLayerLabelVisible(t),i&&(e?i.showLabel&&(i.options.labelVisibility=!0,i.showLabel()):i.hideLabel&&(i.options.labelVisibility=!1,i.hideLabel()),i.id&&this._emitLayerEvent("layer:label:toggle",i.id,i)),e}selectLayer(t,e){const i=this.getLayer(t);if(i){i&&i.select&&i.select(e);const t=this.getLayerId(i);t&&this._selectedLayers.push(t)}}unSelectLayer(t,e){const i=this.getLayer(t);if(i){const t=i&&i;t.unselect&&t.unselect(e);const o=this.getLayerId(i);if(o){const t=this._selectedLayers.indexOf(o);-1!==t&&this._selectedLayers.splice(t,1)}}}unSelectLayers(){const t=Object.values(this.allLayers());let e;for(e of t)e.unselect&&e.unselect()}filterLayer(t,e){const i=this.getLayer(t);return i.filter?i.filter(e):[]}propertiesFilter(t,e,i){const o=this.getLayer(t);if(o){const t=o;if(t.propertiesFilter)return t.propertiesFilter(e,i);t.filter&&this.filterLayer(t,(t=>!t.feature||!t.feature.properties||Ft(t.feature.properties,e)))}return Promise.resolve()}removeLayerFilter(t){const e=this.getLayer(t);e.removeFilter?e.removeFilter():e.filter&&e.filter((()=>!0))}setLayerData(t,e){const i=this.getLayer(t);if(i){if(i.setData)return i.setData(e);if(i.clearLayer&&i.addData)return i.clearLayer(),i.addData(e)}return Promise.resolve()}addLayerData(t,e){const i=this.getLayer(t);i.addData&&i.addData(e)}clearLayerData(t,e){const i=this.getLayer(t);i&&i.clearLayer&&i.clearLayer(e)}setLayerPaint(t,e){const i=this.getLayer(t);e&&i&&i.setPaint&&i.setPaint(e)}setLayerSelectedPaint(t,e){const i=this.getLayer(t);e&&i&&i.setSelectedPaint&&i.setSelectedPaint(e)}updateLayerPaint(t,e){const i=this.getLayer(t);e&&i&&i.updatePaint&&i.updatePaint(e)}updateLayerSelectedPaint(t,e){const i=this.getLayer(t);e&&i&&i.updateSelectedPaint&&i.updateSelectedPaint(e)}getAttributions(t){const e=[];for(const i in this._layers){const o=this._layers[i];let n=!(void 0===t.onlyVisible||t.onlyVisible)||o.options.visibility;if(n&&t.onlyBaselayer&&(n=this._baselayers.includes(i)),n){const t=o.options&&o.options.attribution;t&&e.push(t)}}return e}getActiveBaseLayer(){const t=this.getBaseLayers().find((t=>this.isLayerVisible(t)));if(t)return this.getLayer(t)}addTileJsonLayer(t){return this.addLayer("TILE",{url:t.tiles[0],maxZoom:t.maxzoom,minZoom:t.minzoom,subdomains:t.scheme,attribution:t.attribution})}_emitLayerEvent(t,e,i){const o=String(t);if(p(e)&&o.startsWith("layer:")){const t=o.replace("layer:","layer-"+e+":");this.emitter.emit(t,i)}this.emitter.emit(t,i)}_onLayerClick(t){return Al(this,null,(function*(){return this._emitLayerEvent("layer:click",t.layer.id||"",t),Promise.resolve(t)}))}_onLayerSelect(t){return Al(this,null,(function*(){return this._emitLayerEvent("layer:select",t.layer.id||"",t),Promise.resolve(t)}))}_updateGeoJsonOptions(t){const{onSelect:e,onLayerSelect:i,onClick:o,onLayerClick:n,onMouseOut:r,onMouseOver:s}=t,a=o||n;t.onClick=t=>(a&&a(t),this._onLayerClick(t)),t.onMouseOut=t=>{const e=t.layer.id;r&&r(t),p(e)&&this._emitLayerEvent("layer:mouseout",e,t)},t.onMouseOver=t=>{const e=t.layer.id;s&&s(t),p(e)&&this._emitLayerEvent("layer:mouseover",e,t)};const l=e||i;t.onSelect=t=>(l&&l(t),this._onLayerSelect(t)),t.nativePaint||(this.options.paint&&(t.paint=Qt({paint:t.paint||{},defaultPaint:this.options.paint,getPaintFunctions:this.getPaintFunctions})),t.selectedPaint&&this.options.selectedPaint&&(t.selectedPaint=Qt({paint:t.selectedPaint,defaultPaint:this.options.selectedPaint,getPaintFunctions:this.getPaintFunctions})))}}var Il=Object.defineProperty,Sl=(t,e,i)=>(((t,e,i)=>{e in t?Il(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i})(t,"symbol"!=typeof e?e+"":e,i),i),zl=(t,e,i)=>new Promise(((o,n)=>{var r=t=>{try{a(i.next(t))}catch(e){n(e)}},s=t=>{try{a(i.throw(t))}catch(e){n(e)}},a=t=>t.done?o(t.value):Promise.resolve(t.value).then(r,s);a((i=i.apply(t,e)).next())}));const jl=class t extends Tl{constructor(){super(...arguments),Sl(this,"_loadControlQueue",{"top-right":[],"bottom-right":[],"top-left":[],"bottom-left":[]}),Sl(this,"_isControlLoading",{"top-right":!1,"bottom-right":!1,"top-left":!1,"bottom-left":!1})}addControl(t,e,i){return zl(this,null,(function*(){let o;if(e=null!=e?e:"top-left",o="string"==typeof t?this.getControl(t,i):t,o)return new Promise((t=>{this._setControlQueue(e,(()=>zl(this,null,(function*(){const i=yield o,n=this.mapAdapter.addControl(i,e);t(n)}))))}))}))}createControl(t,e){return zl(this,null,(function*(){if(yield this.onLoad("build-map"),this.mapAdapter.createControl)return this.mapAdapter.createControl(t,e)}))}createButtonControl(t){return zl(this,null,(function*(){if(yield this.onLoad("build-map"),this.mapAdapter.createButtonControl)return this.mapAdapter.createButtonControl(t)}))}createToggleControl(t){return zl(this,null,(function*(){return yield this.onLoad("build-map"),this.mapAdapter.createToggleControl?this.mapAdapter.createToggleControl(t):this.mapAdapter.createButtonControl?function(t,e){const i=document.createElement("div");let o=!1;e.getStatus?o=e.getStatus():e.status&&(o=e.status);const n=e.title||"",r=e.html;function s(){n&&(i.title="string"==typeof n?n:o?n.on:n.off,i.setAttribute("aria-label",i.title))}function a(t){t instanceof HTMLElement?(i.innerHTML="",i.appendChild(t)):"string"==typeof t&&(i.innerHTML=t)}function l(){r&&("string"==typeof r||r instanceof HTMLElement?a(r):a(o?r.on:r.off),i.setAttribute("aria-label",i.title))}function h(t,e){t.split(" ").forEach((t=>{e?i.classList.add(t):i.classList.remove(t)}))}function c(){e.addClassOn&&h(e.addClassOn,o),e.addClassOff&&h(e.addClassOff,!o)}s(),l(),e.addClass&&h(e.addClass,!0),c();const u=t=>{void 0!==t&&(o=t),l(),s(),c()},p=t=>{if(o=void 0!==t?t:!o,e.onClick){const t=e.onClick(o);Promise.resolve(t).then((()=>u())).catch((()=>o=!o))}else u()},d=t({html:i,onClick:p});return d.onClick=p,d.changeStatus=u,d}(this.mapAdapter.createButtonControl,t):void 0}))}removeControl(t){"remove"in t?t.remove():this.mapAdapter.removeControl&&Promise.resolve(t).then((t=>{this.mapAdapter.removeControl(t)}))}getControl(e,i){const o=this.mapAdapter.controlAdapters[e];if(o)return new o(i);{const o=t.controls[e];if(o)return o(this,i)}}getControlContainer(){if(this.mapAdapter.getControlContainer)return this.mapAdapter.getControlContainer()}_setControlQueue(t,e){this._loadControlQueue[t].push(e),this._isControlLoading[t]||this._applyControls(t)}_applyControls(t){return zl(this,null,(function*(){if(this._loadControlQueue[t].length){this._isControlLoading[t]=!0;const e=this._loadControlQueue[t][0];yield e(),this._loadControlQueue[t].splice(0,1),this._applyControls(t)}else this._isControlLoading[t]=!1}))}};Sl(jl,"controls",{CONTROL:(t,e)=>t.createControl(e.control,e.options),BUTTON:(t,e)=>t.createButtonControl(e),TOGGLE:(t,e)=>t.createToggleControl(e)});let Bl=jl;const Zl={};var Nl=Object.getOwnPropertySymbols,Rl=Object.prototype.hasOwnProperty,Dl=Object.prototype.propertyIsEnumerable,Fl=(t,e)=>(e=Symbol[t])?e:Symbol.for("Symbol."+t),Ul=(t,e,i)=>new Promise(((o,n)=>{var r=t=>{try{a(i.next(t))}catch(e){n(e)}},s=t=>{try{a(i.throw(t))}catch(e){n(e)}},a=t=>t.done?o(t.value):Promise.resolve(t.value).then(r,s);a((i=i.apply(t,e)).next())})),Wl=(t,e,i)=>(e=t[Fl("asyncIterator")])?e.call(t):(t=t[Fl("iterator")](),e={},i=(i,o)=>(o=t[i])&&(e[i]=e=>new Promise(((i,n,r)=>(e=o.call(t,e),r=e.done,Promise.resolve(e.value).then((t=>i({value:t,done:r})),n))))),i("next"),i("return"),e);class Hl extends Bl{constructor(t){super(t),this._addControls(),Zl[this.id]=this}static get(t){return function(t){return Zl[t]}(t)}_addLayerProviders(){return Ul(this,null,(function*(){try{for(var t,e,i,o=Wl(this._starterKits);t=!(e=yield o.next()).done;t=!1){const t=e.value;if(t.getLayerAdapters){const e=yield t.getLayerAdapters.call(t);if(e)try{for(var n,r,s,a=Wl(e);n=!(r=yield a.next()).done;n=!1){const t=r.value,e=yield t.createAdapter(this);e&&(this.mapAdapter.layerAdapters[t.name]=e)}}catch(r){s=[r]}finally{try{n&&(r=a.return)&&(yield r.call(a))}finally{if(s)throw s[0]}}}}}catch(e){i=[e]}finally{try{t&&(e=o.return)&&(yield e.call(o))}finally{if(i)throw i[0]}}}))}_onLoadSync(){return Ul(this,null,(function*(){try{for(var t,e,i,o=Wl(this._starterKits);t=!(e=yield o.next()).done;t=!1){const t=e.value;if(t.onLoadSync)try{yield t.onLoadSync.call(t,this)}catch(n){console.error(n)}}}catch(e){i=[e]}finally{try{t&&(e=o.return)&&(yield e.call(o))}finally{if(i)throw i[0]}}}))}_addControls(){this.options.controls&&this.options.controls.forEach((t=>{let e=t,i={};"string"==typeof t&&this.options.controlsOptions&&this.options.controlsOptions[t]&&(i=this.options.controlsOptions[t],void 0!==i.control&&(e=i.control));const o=i,{position:n}=o,r=((t,e)=>{var i={};for(var o in t)Rl.call(t,o)&&e.indexOf(o)<0&&(i[o]=t[o]);if(null!=t&&Nl)for(var o of Nl(t))e.indexOf(o)<0&&Dl.call(t,o)&&(i[o]=t[o]);return i})(o,["position"]);this.addControl(e,n||"top-left",r)})),this._emitStatusEvent("controls:create")}}var ql=Object.defineProperty,Vl=Object.defineProperties,Gl=Object.getOwnPropertyDescriptors,Jl=Object.getOwnPropertySymbols,Kl=Object.prototype.hasOwnProperty,Yl=Object.prototype.propertyIsEnumerable,Ql=(t,e,i)=>e in t?ql(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Xl=(t,e)=>{for(var i in e||(e={}))Kl.call(e,i)&&Ql(t,i,e[i]);if(Jl)for(var i of Jl(e))Yl.call(e,i)&&Ql(t,i,e[i]);return t},$l=(t,e)=>Vl(t,Gl(e));function th(t,e,i,o){if("number"==typeof e||"string"==typeof e)e=Number(e),t.push($l(Xl({},i),{resource:e}));else if(Array.isArray(e)){const[n,r]=e;t.push(Xl($l(Xl({},i),{resource:n,id:r}),o))}else"object"==typeof e&&t.push(Xl(Xl(Xl({},i),e),o))}var eh=Object.defineProperty,ih=Object.defineProperties,oh=Object.getOwnPropertyDescriptors,nh=Object.getOwnPropertySymbols,rh=Object.prototype.hasOwnProperty,sh=Object.prototype.propertyIsEnumerable,ah=(t,e,i)=>e in t?eh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;const lh={target:"map",baseUrl:"",whitlabel:!1,controls:["ZOOM","ATTRIBUTION"],controlsOptions:{ZOOM:{position:"top-left"},ATTRIBUTION:{position:"bottom-right",customAttribution:['<a href="https://nextgis.com" target="_blank">©NextGIS</a>']}},pixelRadius:10};function hh(t){const e=[new yr];var i;return t.starterKits&&t.starterKits.forEach((t=>{e.push(t)})),t.connector?t.connector&&(t.baseUrl=t.connector.options.baseUrl):t.connector=new vo({baseUrl:t.baseUrl||"",auth:t.auth}),(t=f(lh,t)).center||t.bounds||(t.bounds=[-179,-90,180,90]),t.connector&&e.push(new Ma({connector:t.connector,auth:t.auth})),i=((t,e)=>{for(var i in e||(e={}))rh.call(e,i)&&ah(t,i,e[i]);if(nh)for(var i of nh(e))sh.call(e,i)&&ah(t,i,e[i]);return t})({},t),t=ih(i,oh({starterKits:e,create:!1}))}var ch=Object.defineProperty,uh=Object.defineProperties,ph=Object.getOwnPropertyDescriptors,dh=Object.getOwnPropertySymbols,fh=Object.getPrototypeOf,mh=Object.prototype.hasOwnProperty,_h=Object.prototype.propertyIsEnumerable,yh=Reflect.get,gh=(t,e,i)=>e in t?ch(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,vh=(t,e)=>{for(var i in e||(e={}))mh.call(e,i)&&gh(t,i,e[i]);if(dh)for(var i of dh(e))_h.call(e,i)&&gh(t,i,e[i]);return t},bh=(t,e)=>uh(t,ph(e)),wh=(t,e,i)=>(gh(t,"symbol"!=typeof e?e+"":e,i),i),xh=(t,e,i)=>yh(fh(t),i,e),Lh=(t,e,i)=>new Promise(((o,n)=>{var r=t=>{try{a(i.next(t))}catch(e){n(e)}},s=t=>{try{a(i.throw(t))}catch(e){n(e)}},a=t=>t.done?o(t.value):Promise.resolve(t.value).then(r,s);a((i=i.apply(t,e)).next())}));const Ph=class t extends Hl{constructor(t){super(hh(t)),wh(this,"emitter",new i),wh(this,"connector"),wh(this,"_ngwLayers",{}),wh(this,"$$selectFromNgwRaster"),wh(this,"$$selectFromNgwVector"),wh(this,"_promises",{select:[],identify:[]}),t.connector&&(this.connector=t.connector),this._createWebMap().then((()=>{const t=this.getContainer();t&&t.classList.add("ngw-map-container"),this.options.whitlabel&&this._whiteLabel()}))}addControl(e,i,o){return Lh(this,null,(function*(){return yield this.onLoad("controls:create"),xh(t.prototype,this,"addControl").call(this,e,i,o)}))}addNgwLayer(t){return Lh(this,null,(function*(){yield this.onMapLoad();const{keyname:e,resourceId:i}=t;(e||void 0!==i)&&console.warn(`DEPRECATED WARN: ${"set `resource` options instead of `keyname` or `resourceId`"}`);const o=t.resource;if(!e&&!i&&!o)throw new Error("resource, resourceId or keyname is required parameter to add NGW layer");if(p(this.options.baseUrl))try{p(this.options.setViewDelay)&&(t.adapterOptions=t.adapterOptions||{},p(t.adapterOptions.setViewDelay)||(t.adapterOptions.setViewDelay=this.options.setViewDelay));const e=function(t,e,i){const o=i.getAuthorizationHeaders();return o&&(t.headers=o),zs(t,e,i)}(t,this,this.connector),i=vh(vh({visibility:!0},t),t.adapterOptions),o=yield this.addLayer(e,i),n=o&&this.getLayerId(o);if(o&&n&&(this._ngwLayers[n]={layer:o,resourceId:o.resourceId},o.options.name=o.options.name||o.item&&o.item.resource.display_name,o.options.baselayer)){if(this.getActiveBaseLayer())return o}return o}catch(n){const t=C(o)&&"id"in o?o.id:e||i||o;console.error(`Can't add NGW layer ${t}.`,n)}}))}fit(){const{center:t,zoom:e,bounds:i}=this.options;t?(this.setCenter(t),e&&this.setZoom(e)):i&&this.fitBounds(i)}fetchNgwLayerItem(t){return Vo(vh({connector:this.connector},t))}fetchNgwLayerItems(t){return Fr(vh({connector:this.connector},t))}fetchNgwLayerFeature(t){return za(vh({connector:this.connector},t))}fetchNgwLayerFeatures(t){return Wr(vh({connector:this.connector},t))}fetchIdentifyItem(t,e){const i=function(t){const{connector:e,identify:i}=t,o=Ha(i);return o&&o.length?Vo(Ua(Ua({connector:e},t.requestOptions),o[0])):ki.resolve(void 0)}({identify:t,connector:this.connector,requestOptions:e});return this._addPromise("identify",i),i}fetchIdentifyGeoJson(t,e=!1){const i=function(t){const{connector:e,identify:i,requestOptions:o}=t;for(const r in i){const t=Number(r);if(!isNaN(t)){const t=i[r];if("features"in t){const e=t.features.find((t=>t.geom));if(e&&e.geom){const t=e.geom;return ki.resolve(Ao(Wa(Ua({},e),{geom:t})))}}}}const n=Ha(i);return n&&n.length?za(Ua(Wa(Ua({},o),{connector:e}),n[0])):ki.resolve(void 0)}({identify:t,connector:this.connector,multiple:e});return i&&"then"in i?(this._addPromise("identify",i),i):ki.resolve(i)}getIdentifyGeoJson(t,e=!1){return this.fetchIdentifyGeoJson(t,e)}getNgwLayers(){return Lh(this,null,(function*(){return yield this.onLoad(),this._ngwLayers}))}getNgwLayerByResourceId(t){return Lh(this,null,(function*(){for(const e in this._ngwLayers){const i=this._ngwLayers[e];if(i.resourceId===t)return i&&i.layer;if(i.layer.getIdentificationIds){const e=yield i.layer.getIdentificationIds();if(e&&e.some((e=>e===t)))return i.layer}if(i.layer.getDependLayers){const e=i.layer.getDependLayers().find((e=>e.item&&e.item.parentId===t));if(e)return e.layer}}}))}fitLayer(e,i){return Lh(this,null,(function*(){let o;o="string"==typeof e||"number"==typeof e?String(o):e.id;const n=o&&this._ngwLayers[o];if(n)if(n.layer.getBounds){const t=yield n.layer.getBounds();t&&this.fitBounds(t,i)}else{let t;if(n.layer.item)t=n.layer.item;else{const e=n.resourceId;t=yield this.connector.getResource(e)}t&&Vn({resourceId:t.resource.id,connector:this.connector}).then((t=>{t&&this.fitBounds(t,i)}))}else xh(t.prototype,this,"fitLayer").call(this,"number"==typeof e?String(e):e,i)}))}zoomToLayer(t){return Lh(this,null,(function*(){return this.fitLayer(t)}))}onLoad(t="ngw-map:create"){return super.onLoad(t)}removeLayer(t){const e=this.getLayer(t);if(e){const t=this.getLayerId(e);t&&delete this._ngwLayers[t],super.removeLayer(e)}}enableSelection(){this.$$selectFromNgwRaster||(this.$$selectFromNgwRaster=t=>{this._getSelectListenersCount()&&this.selectFromNgwRaster(t)},this.$$selectFromNgwVector=t=>{this._getSelectListenersCount()&&this._selectFromNgwVector(t)},this.emitter.on("click",this.$$selectFromNgwRaster),this.emitter.on("layer:click",this.$$selectFromNgwVector))}disableSelection(){this.$$selectFromNgwRaster&&(this.emitter.removeListener("click",this.$$selectFromNgwRaster),this.$$selectFromNgwRaster=void 0),this.$$selectFromNgwVector&&(this.emitter.removeListener("layer:click",this.$$selectFromNgwVector),this.$$selectFromNgwVector=void 0)}getNgwLayerItem(t){return this.fetchNgwLayerItem(t)}getNgwLayerItems(t){return this.fetchNgwLayerItems(t)}getNgwLayerFeature(t){return this.fetchNgwLayerFeature(t)}getNgwLayerFeatures(t){return this.fetchNgwLayerFeatures(t)}cancelPromise(...t){this.cancelPromises(...t)}cancelPromises(...t){t.length||(t=Object.keys(this._promises)),t.forEach((t=>{const e=this._promises[t];e&&(e.forEach((t=>t.cancel())),this._promises[t]=[])}))}selectFromNgwRaster(t){return Lh(this,null,(function*(){var e;this._emitStatusEvent("ngw:preselect");const i=[],o=Object.values(this._ngwLayers);o.sort(((t,e)=>t.layer.order&&e.layer.order?e.layer.order-t.layer.order:1));for(const t of o){const o=t.layer,n="function"==typeof o.getIdentificationIds&&o.getIdentificationIds,r=null==(e=o.options.interactive)||e;n&&o.options.selectable&&r&&this.isLayerVisible(o)&&i.push(n.call(o))}const n=Promise.all(i),r=yield n,s=[];for(const t of r)t&&s.push(...t);if(!s.length)return void this._emitStatusEvent("ngw:select",null);const a=this.options.pixelRadius||10,l=this.getCenter();let h=this.getZoom();if(h=void 0!==h?h:20,!l||!h)return void this._emitStatusEvent("ngw:select",null);const c=function(t,e,i){return(i=null!=i?i:10)*(40075016.686*Math.abs(Math.cos(180*t[1]/Math.PI))/Math.pow(2,e+8))*5e-4}(l,h,a),u=Ga(t,{layers:s,connector:this.connector,radius:c}).then((e=>{const i=bh(vh({},e),{resources:s,sourceType:"raster",event:t}),o=this._prepareToIdentify(i);return this._emitStatusEvent("ngw:select",o),o}));return this._addPromise("select",u),u}))}_addPromise(t,e){const i=this._promises[t];if(i&&-1===i.indexOf(e)){const t=()=>{const t=i.indexOf(e);-1!==t&&i.splice(t,1)};e.then(t),e.catch(t),i.push(e)}}_isFitFromResource(){const t=this._initMapState;return!t.zoom||!t.center}_createWebMap(){return Lh(this,null,(function*(){yield this.create(),this.options.qmsId&&this._addQmsBaseLayer(),this.options.osm&&this._addOsmBaseLayer();const t=[],e=this._isFitFromResource();if(this.options.webmapId&&th(t,this.options.webmapId,{fit:e}),this.options.resources&&Array.isArray(this.options.resources))for(const o of this.options.resources){const i={};e||(i.fit=!1),th(t,o,{},i)}for(const o of t)try{yield this.addNgwLayer(o)}catch(i){console.warn(i)}this._emitStatusEvent("ngw-map:create",this),this.enableSelection()}))}_addOsmBaseLayer(){this.addBaseLayer("OSM")}_addQmsBaseLayer(){let t,e;Array.isArray(this.options.qmsId)?(t=this.options.qmsId[0],e=this.options.qmsId[1]):t=Number(this.options.qmsId);const i={qmsId:t};e&&(i.id=e),this.addBaseLayer("QMS",i)}_selectFromNgwVector(t){const e=t.layer;if(!(e.options.selectable&&this.isLayerVisible(e)))return;const i=e.item&&e.item.resource.id,o=t.feature;if(void 0!==i&&o){const t=o.id;if(t){const e={featureCount:1,[i]:{featureCount:1,features:[{id:Number(t),fields:o.properties||{},label:`#${i}`,layerId:Number(i),parent:"",geom:o.geometry}]}};return this._emitStatusEvent("ngw:select",this._prepareToIdentify(bh(vh({},e),{resources:[i],sourceType:"vector"}))),e}}}_prepareToIdentify(t){return bh(vh({},t),{getIdentifyItems:()=>Ha(t,!0).map((t=>new Sa({feature:t.feature,connector:this.connector})))})}_getSelectListenersCount(){return this.emitter.listenerCount("ngw:select")}_whiteLabel(){return Lh(this,null,(function*(){const t=this.getContainer();if(t){const e=yield Ja(this.connector,this.options.companyLogoOptions);e&&t.appendChild(e)}}))}};wh(Ph,"getIcon",(function(t={}){var e,i,o,n,r,s;const a=null!=(e=t.shape)?e:"circle",l=null!=(i=t.color)?i:"blue",h=null!=(o=t.strokeColor)?o:"white",c=null!=(n=t.size)?n:Ai,u=null!=(r=t.rotate)?r:0,p=null!=(s=t.anchor)?s:[c/2,c/2],d=void 0!==t.stroke?Number(t.stroke):.8,f=t.p||Ei[a]||"circle",m="string"==typeof f?f:f(t),_=function(t){return(new DOMParser).parseFromString(t,"image/svg+xml").documentElement}(t.svg||function({width:t,height:e,stroke:i=0,content:o}){const n=i/2;return`<svg\n version="1.1"\n xmlns="http://www.w3.org/2000/svg"\n width="${t}"\n height="${e}"\n viewBox="-${n} -${n} ${Ai+i} ${Ai+i}"\n >${o}</svg>`}({width:c,height:c,stroke:d,content:m}));return _.setAttribute("width",String(c)),_.setAttribute("height",String(c)),_.setAttribute("fill",l),d&&(_.setAttribute("stroke",h),_.setAttribute("stroke-width",String(d))),{type:"icon",iconSize:[c,c],iconAnchor:p,html:(new XMLSerializer).serializeToString(_),rotate:u,svg:_}}));let Oh=Ph;var Mh=Object.defineProperty,Ch=Object.defineProperties,kh=Object.getOwnPropertyDescriptors,Eh=Object.getOwnPropertySymbols,Ah=Object.prototype.hasOwnProperty,Th=Object.prototype.propertyIsEnumerable,Ih=(t,e,i)=>e in t?Mh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;delete h.Icon.Default.prototype._getIconUrl,h.Icon.Default.mergeOptions({iconRetinaUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==",iconUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=",shadowUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC"});class Sh extends Oh{constructor(t){var e,i;e=((t,e)=>{for(var i in e||(e={}))Ah.call(e,i)&&Ih(t,i,e[i]);if(Eh)for(var i of Eh(e))Th.call(e,i)&&Ih(t,i,e[i]);return t})({},t),i={mapAdapter:new pi},super(t=Ch(e,kh(i)))}static create(t){return e=this,i=null,o=function*(){return new Sh(t).onLoad()},new Promise(((t,n)=>{var r=t=>{try{a(o.next(t))}catch(e){n(e)}},s=t=>{try{a(o.throw(t))}catch(e){n(e)}},a=e=>e.done?t(e.value):Promise.resolve(e.value).then(r,s);a((o=o.apply(e,i)).next())}));var e,i,o}}return window&&!window.NgwMap&&(window.NgwMap=Sh),Sh}();
|
|
8
2
|
//# sourceMappingURL=ngw-leaflet.global.prod.js.map
|